<div class="shipmentInvoices index">
<h2><?php __('ShipmentInvoices');?></h2>
<p>
<?php
echo $paginator->counter(array(
'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
));
?></p>
<table cellpadding="0" cellspacing="0">
<tr>
	<th><?php echo $paginator->sort('id');?></th>
	<th><?php echo $paginator->sort('shipment_id');?></th>
	<th><?php echo $paginator->sort('principle_id');?></th>
	<th><?php echo $paginator->sort('currency_id');?></th>
	<th><?php echo $paginator->sort('freight_forwarder_id');?></th>
	<th><?php echo $paginator->sort('invoice_number');?></th>
	<th><?php echo $paginator->sort('invoice_amount');?></th>
	<th><?php echo $paginator->sort('deferred_gst');?></th>
	<th><?php echo $paginator->sort('approved');?></th>
	<th><?php echo $paginator->sort('invoice_type');?></th>
	<th class="actions"><?php __('Actions');?></th>
</tr>
<?php
$i = 0;
foreach ($shipmentInvoices as $shipmentInvoice):
	$class = null;
	if ($i++ % 2 == 0) {
		$class = ' class="altrow"';
	}
?>
	<tr<?php echo $class;?>>
		<td>
			<?php echo $shipmentInvoice['ShipmentInvoice']['id']; ?>
		</td>
		<td>
			<?php echo $html->link($shipmentInvoice['Shipment']['id'], array('controller' => 'shipments', 'action' => 'view', $shipmentInvoice['Shipment']['id'])); ?>
		</td>
		<td>
			<?php echo $html->link($shipmentInvoice['Principle']['name'], array('controller' => 'principles', 'action' => 'view', $shipmentInvoice['Principle']['id'])); ?>
		</td>
		<td>
			<?php echo $html->link($shipmentInvoice['Currency']['name'], array('controller' => 'currencies', 'action' => 'view', $shipmentInvoice['Currency']['id'])); ?>
		</td>
		<td>
			<?php echo $html->link($shipmentInvoice['FreightForwarder']['name'], array('controller' => 'freight_forwarders', 'action' => 'view', $shipmentInvoice['FreightForwarder']['id'])); ?>
		</td>
		<td>
			<?php echo $shipmentInvoice['ShipmentInvoice']['invoice_number']; ?>
		</td>
		<td>
			<?php echo $shipmentInvoice['ShipmentInvoice']['invoice_amount']; ?>
		</td>
		<td>
			<?php echo $shipmentInvoice['ShipmentInvoice']['deferred_gst']; ?>
		</td>
		<td>
			<?php echo $shipmentInvoice['ShipmentInvoice']['approved']; ?>
		</td>
		<td>
			<?php echo $shipmentInvoice['ShipmentInvoice']['invoice_type']; ?>
		</td>
		<td class="actions">
			<?php echo $html->link(__('View', true), array('action' => 'view', $shipmentInvoice['ShipmentInvoice']['id'])); ?>
			<?php echo $html->link(__('Edit', true), array('action' => 'edit', $shipmentInvoice['ShipmentInvoice']['id'])); ?>
			<?php echo $html->link(__('Delete', true), array('action' => 'delete', $shipmentInvoice['ShipmentInvoice']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $shipmentInvoice['ShipmentInvoice']['id'])); ?>
		</td>
	</tr>
<?php endforeach; ?>
</table>
</div>
<div class="paging">
	<?php echo $paginator->prev('<< '.__('previous', true), array(), null, array('class'=>'disabled'));?>
 | 	<?php echo $paginator->numbers();?>
	<?php echo $paginator->next(__('next', true).' >>', array(), null, array('class' => 'disabled'));?>
</div>
<div class="actions">
	<ul>
		<li><?php echo $html->link(__('New ShipmentInvoice', true), array('action' => 'add')); ?></li>
		<li><?php echo $html->link(__('List Shipments', true), array('controller' => 'shipments', 'action' => 'index')); ?> </li>
		<li><?php echo $html->link(__('New Shipment', true), array('controller' => 'shipments', 'action' => 'add')); ?> </li>
		<li><?php echo $html->link(__('List Principles', true), array('controller' => 'principles', 'action' => 'index')); ?> </li>
		<li><?php echo $html->link(__('New Principle', true), array('controller' => 'principles', 'action' => 'add')); ?> </li>
		<li><?php echo $html->link(__('List Freight Forwarders', true), array('controller' => 'freight_forwarders', 'action' => 'index')); ?> </li>
		<li><?php echo $html->link(__('New Freight Forwarder', true), array('controller' => 'freight_forwarders', 'action' => 'add')); ?> </li>
		<li><?php echo $html->link(__('List Currencies', true), array('controller' => 'currencies', 'action' => 'index')); ?> </li>
		<li><?php echo $html->link(__('New Currency', true), array('controller' => 'currencies', 'action' => 'add')); ?> </li>
	</ul>
</div>
