<tbody class="table_order_items">

	<tr>
		
		<td style="width:40px;">
			<input value="{$item->user_data}" name="order_item[user_data][]" type="hidden" value='' />
			<input name="order_item[parent_item_id][]" type="hidden" value="0" />
			<input name="order_item[stamp][]" type="hidden" value="{$stamp}" />
			
			<a class="button drop_box_button down" title="Artikelstatus setzen"></a>
			<a class="button delete_button delete" title="Artikel l&ouml;schen"></a>
			<input type="hidden" class="is_shippable" value="{$item->shippable}" />
			{if $item->shippable == '0'}
				<img class="shipping_status" src="themes/admin/media/images/red_notice.png" title="nicht lieferbar" />
			{elseif $item->shippable == '1'}
				<img class="shipping_status" src="themes/admin/media/images/green_notice.png" title="lieferbar" />
			{elseif $item->shippable == '2'}
				<img class="shipping_status" src="themes/admin/media/images/orange_notice.png" title="lieferbar ab {$item->available_from} bis {$item->available_till}" />
			{elseif $item->shippable == '3'}
				<img class="shipping_status" src="themes/admin/media/images/orange_notice.png" title="lieferzeit unbekannt" />
			{/if}
		</td>
		
		<td class="pos">
		</td>
		
		<td class="quantity">
			<input class="item_id" type="hidden" name="order_item[item_id][]" value="{$item->id}" />
			<input class="amount" type="text" name="order_item[amount][]" value="1" />
		</td>
		
		<td class="item">
			<a href="./index.php?admin_modul=admin_item_editor&action=edit&id={$item->id}" target="_blank">{$item->name}</a>
			<div>
			Art-Nr.: {$item->number}
			</div>
		</td>
		
		<td class="tax_rate">
			<input type="hidden" class="taxes" name="order_item[taxes][]" value="{$item->tax_value}" />
			<span>{$item->tax}</span> %
		</td>
		
		<td class="price">
			<input type="text" name="order_item[price][]" class="item_price_edit" value="{if $item->shop_bargain_price_1 > 0}{if $show_with_tax == '1'}{$item->bargain_price_1_tax}{else}{$item->shop_bargain_price_1}{/if}{else}{if $show_with_tax == '1'}{$item->price_1_tax}{else}{$item->shop_price_1}{/if}{/if}" />
			
			&euro;
		</td>
		
		<td class="total">
			{if $show_with_tax == '1'}
				{if $item->shop_bargain_price_1 > 0}
					<span>{$item->bargain_price_1_tax|number_format:"4":".":""}</span>
				{else}	
					<span>{$item->price_1_tax|number_format:"4":".":""}</span>
				{/if}
			{else}
				{if $item->shop_bargain_price_1 > 0}
					<span>{$item->shop_bargain_price_1|number_format:"4":".":""}</span>
				{else}	
					<span>{$item->shop_price_1|number_format:"4":".":""}</span>
				{/if}
			{/if}
			
			&euro;
		</td>
		
	</tr>
	
	<tr class="hidable">
	
		<td colspan="3"></td>
		
		<td>
			<select name="order_item[variant1][]" class="order_item_variant_1">
			{foreach $item->price_variants_1 as $variant}
				<option value="{$variant}">{$variant}</option>
			{/foreach}
			</select>
		</td>
		
		<td colspan="2">
			<select name="order_item[variant2][]" class="order_item_variant_2">
			{foreach $item->price_variants_2 as $variant}
				<option value="{$variant}">{$variant}</option>
			{/foreach}
			</select>
		</td>
		
		<td></td>
		
	</tr>
	
	<tr class="hidable">
	
		<td colspan="2">
			<label>Artikel Status</label>
			<select class="item_status" name="order_item[item_status][]">
				<option value="0">-</option>
				<option value="1">nicht lieferbar</option>
				<option value="2">nachliefern</option>
				<option value="3">info</option>
			</select>
		</td>
		
		<td>
			<label>St.</label>
			<select class="backorder_quantity" name="order_item[backorder_quantity][]" readonly="readonly">
				<option value="0">0</option>
				<option value="1">1</option>
			</select>
		</td>
		
		<td colspan="2">
			<label>Kommentar</label>
			<input type="text" name="order_item[item_status_text][]" />
		</td>
		
		<td>
			<label>Datum</label>
			<input class="delivery_date" type="text" name="order_item[delivery_date][]" readonly="readonly" />
		</td>
		
		<td class="inventory">
			<label>Lager</label>
			<span>{if $item->inventory}{$item->inventory}{else}0{/if}</span>
		</td>
		
	</tr>
	
	{foreach $item->assignedItemSet as $subItem}
		<tr class="hidable combination_item" style="background:#F9F9F9;">
			<td colspan="7">
				<div>					
					<span style="color:#003580;font-weight:bold;line-height:1em;">{$subItem->name}</span>
				</div>
				
				<div class="child_data_wrapper" style="height:35px;">
					<input class="child_quantity" name="child_item[amount][]" value="1" type="hidden" />
					<input name="child_item[item_id][]" value="{$subItem->id}" type="hidden" />
					<input name="child_item[taxes][]" value="{$subItem->tax_value}" type="hidden" />
					<input name="child_item[parent_item_id][]" value="{$item->id}" type="hidden" />
					<input name="child_item[stamp][]" value="{$stamp}" type="hidden" />
					
					<div style="display:inline-block;width:20px;float:left;">
						<input class="is_child_item_selected_hidden" name="child_item[is_selected][]" value="0" type="hidden" />
						<input class="is_child_item_selected_check" style="margin-top:15px;" type="checkbox" />
					</div>
					
					<div style="display:inline-block;width:133px;float:left;margin-left:5px;">
						{if $subItem->schema_data_attributes[0]}
							<label style="font-weight:normal;">{$subItem->schema_data_attributes[0]['name']}</label>
							<select class="not_used" name="child_item[variant1][]">
								{foreach $subItem->price_variants_1 as $variant}
									<option value="{$variant}">{$variant}</option>
								{/foreach}
							</select>
						{else}
							<input name="child_item[variant1][]" value="" type="hidden" />
						{/if}
					</div>
					
					<div style="display:inline-block;width:133px;float:left;margin-left:5px;">
						{if $subItem->schema_data_attributes[1]}
							<label style="font-weight:normal;">{$subItem->schema_data_attributes[1]['name']}</label>
							<select class="not_used" name="child_item[variant2][]">
								{foreach $subItem->price_variants_2 as $variant}
									<option value="{$variant}">{$variant}</option>
								{/foreach}
							</select>
						{else}
							<input name="child_item[variant2][]" value="" type="hidden" />
						{/if}
					</div>
					
					<div style="display:inline-block;width:70px;float:left;margin-left:5px;">
						{if $subItem->has_user_data}
							<label style="font-weight:normal;">Zusatz</label>
							<input class="child_user_data not_used" name="child_item[user_data][]" type="text" />
						{else}
							<input name="child_item[user_data][]" value="" type="hidden" />
						{/if}
					</div>
					
					<div style="display:inline-block;width:70px;float:right;text-align:right;">
						<input class="child_price" name="child_item[price][]" value="{if $subItem->shop_bargain_price_1 > 0}{if $show_with_tax == '1'}{$subItem->bargain_price_1_tax}{else}{$subItem->shop_bargain_price_1}{/if}{else}{if $show_with_tax == '1'}{$subItem->price_1_tax}{else}{$subItem->shop_price_1}{/if}{/if}" type="hidden" />
						<br />
						<span class="child_total">
						{if $subItem->shop_bargain_price_1 > 0}
							{if $show_with_tax == '1'}
								{$subItem->bargain_price_1_tax}
							{else}
								{$subItem->shop_bargain_price_1}
							{/if}
						{else}
							{if $show_with_tax == '1'}
								{$subItem->price_1_tax}
							{else}
								{$subItem->shop_price_1}
							{/if}
						{/if}
						</span> &euro;
					</div>
				</div>
			</td>
		</tr>
	{/foreach}	
	
</tbody>
