:: $single_stock_item
<<set $here = '$single_stock_item'>>
<<set $ARGS = $location_var[$here]>>
<!-- !! generic function to be used to stock single purchase items in stores-->
<!-- !! see [$shop], specifically the household appliances section for an example of use-->
<!-- !! ARGS 0 is the value identifying when the item is owned-->
<!-- !! it is assumed that anything >= the value is acceptable, this allows for upgrades like regular tv to plasma-->
<!-- !! ARGS 1 is the item description-->
<!-- !! ARGS 2 is the price-->
<!-- !! ARGS 3 is the variable name for the item-->
<!-- !! ARGS 4 is the location to go back to-->
<!-- !! ARGS 5 is $loc_arg-->
<!-- !! ARGS 6 > 0 to  force-disable buy link-->
<!-- !! ARGS 7 is replacement text for 6-->
<!-- !! ARGS 8 is custom buy link when ARGS 6 > 0-->
<!-- !$location = $larg(4)-->
<!-- !! This will check to see if the item is already owned-->
<<set in_inventory = $location_var[$here][3]>>
<<set $in_inventory = iif(in_inventory > 0, '<<in_inventory>>', 'none')>>
<<set $result = '<tr>' + $_>>
<!-- FAILED TO CONVERT
	'<td align="center"><<setup.func(''$stock_item_info'', $larg(3))>></td>' + _
-----
	<<set ERROR: FAILED TO CONVERT LITERAL: """'<td align""" = ERROR: FAILED TO CONVERT LITERAL: """"center"><<setup.func(''$stock_item_info''""" , ERROR: FAILED TO CONVERT LITERAL: """$larg(3))>><""" / ERROR: FAILED TO CONVERT LITERAL: """td>'""" + $_>>

-->
<<warn "CONVERSION ERROR 559b6b4b199bf0fa793c28a10f3857b3">>
<td align="center"><<$larg(1)>></td>
<<if $location_var[$here][6] > 0>>
	<<set $result += '<td align=left>'+$larg(7)+'</td><td align=left>'+$larg(8)+'</td>'>>
<<elseif $location_var[$here][0] > $in_inventory>>
	<<set $result += '<td align="left">(you have $in_inventory)</td>'>>
	<<if $finances.cash >= $larg(2)>>
		<<set $result += '<td align="left"><<link "buy">><<gs '$buy_single_item' $larg(0) '$larg(1)' $larg(2) '$larg(3)' '$larg(4)' '$larg(5)'>><</link>>'>>
	<<else>>
		<<set $result += '<td></td>'>>
	<</if>>
<<else>>
	<<set $result += '<td colspan=2 align=center>You already own this</td>'>>
<</if>>
<<set $result += '</td><td align="left">for ARGS[2] <b>₽</b></td></tr>'>>
