{extends file="widgets/big_widget_base.tpl"}

{block name=widget_name}dashboard_widget_backorder_items{/block}

{block name=widget_title}Nachzuliefernde Artikel{/block}

{block name=widget_content}
	{if $backordered_items}
		<table>
			<thead>
				<tr>
					<th>Bestellung</th>
					<th>Kunde</th>
					<th>Artikel</th>
					<th>Hersteller</th>
					<th class="quantity">Anzahl</th>
					<th class="money">Preis</th>
					<th class="date">Datum</th>
				</tr>
			</thead>
			<tbody>
				{foreach $backordered_items as $order_item}
					<tr>
						<td>
							<a href="./index.php?admin_modul=admin_order_editor&action=edit&id={$order_item->order_id}">
							{$order_item->order_number}{if $order_item->order_revision}-{$order_item->order_revision}{/if}{if $order_item->order_addendum} {$order_item->order_addendum}{/if}
							</a>
						</td>
						<td>
							<a href="./index.php?admin_modul=admin_customer_editor&id={$order_item->customer_id}">
							{$order_item->customer_name}
							</a>
						</td>
						<td>
							<a href="./index.php?admin_modul=admin_item_editor&id={$order_item->item_id}">
							{$order_item->item_name}
							</a>
						</td>
						<td>
							<a href="./index.php?admin_modul=admin_manufacturer_editor&id={$order_item->manufacturer_id}">
							{$order_item->manufacturer_name}
							</a>
						</td>
						<td class="quantity">{$order_item->item_quantity}</td>
						<td class="money">{$order_item->item_price|number_format:2:",":" "} &euro;</td>
						<td class="date">{if $order_item->item_delivery_date}{$order_item->item_delivery_date}{else}Kein Datum{/if}</td>
					</tr>
				{/foreach}
			</tbody>
		</table>
	{else}
		<p>Keine Nachlieferung</p>
	{/if}
{/block}