109 lines
3.9 KiB
PHP
Executable file
109 lines
3.9 KiB
PHP
Executable file
<div class="lineItems index">
|
|
<h2><?php __('LineItems');?></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('item_number');?></th>
|
|
<th><?php echo $paginator->sort('option');?></th>
|
|
<th><?php echo $paginator->sort('quantity');?></th>
|
|
<th><?php echo $paginator->sort('title');?></th>
|
|
<th><?php echo $paginator->sort('description');?></th>
|
|
<th><?php echo $paginator->sort('document_id');?></th>
|
|
<th><?php echo $paginator->sort('product_id');?></th>
|
|
<th><?php echo $paginator->sort('costing_id');?></th>
|
|
<th><?php echo $paginator->sort('unit_price');?></th>
|
|
<th><?php echo $paginator->sort('net_price_each');?></th>
|
|
<th><?php echo $paginator->sort('discount_percent');?></th>
|
|
<th><?php echo $paginator->sort('discount_amount_each');?></th>
|
|
<th><?php echo $paginator->sort('total_discount_amount');?></th>
|
|
<th><?php echo $paginator->sort('gross_price');?></th>
|
|
<th><?php echo $paginator->sort('net_price');?></th>
|
|
<th class="actions"><?php __('Actions');?></th>
|
|
</tr>
|
|
<?php
|
|
$i = 0;
|
|
foreach ($lineItems as $lineItem):
|
|
$class = null;
|
|
if ($i++ % 2 == 0) {
|
|
$class = ' class="altrow"';
|
|
}
|
|
?>
|
|
<tr<?php echo $class;?>>
|
|
<td>
|
|
<?php echo $lineItem['LineItem']['id']; ?>
|
|
</td>
|
|
<td>
|
|
<?php echo $lineItem['LineItem']['item_number']; ?>
|
|
</td>
|
|
<td>
|
|
<?php echo $lineItem['LineItem']['option']; ?>
|
|
</td>
|
|
<td>
|
|
<?php echo $lineItem['LineItem']['quantity']; ?>
|
|
</td>
|
|
<td>
|
|
<?php echo $lineItem['LineItem']['title']; ?>
|
|
</td>
|
|
<td>
|
|
<?php echo $lineItem['LineItem']['description']; ?>
|
|
</td>
|
|
<td>
|
|
<?php echo $lineItem['LineItem']['document_id']; ?>
|
|
</td>
|
|
<td>
|
|
<?php echo $html->link($lineItem['Product']['title'], array('controller' => 'products', 'action' => 'view', $lineItem['Product']['id'])); ?>
|
|
</td>
|
|
<td>
|
|
<?php echo $lineItem['LineItem']['costing_id']; ?>
|
|
</td>
|
|
<td>
|
|
<?php echo $lineItem['LineItem']['unit_price']; ?>
|
|
</td>
|
|
<td>
|
|
<?php echo $lineItem['LineItem']['net_price_each']; ?>
|
|
</td>
|
|
<td>
|
|
<?php echo $lineItem['LineItem']['discount_percent']; ?>
|
|
</td>
|
|
<td>
|
|
<?php echo $lineItem['LineItem']['discount_amount_each']; ?>
|
|
</td>
|
|
<td>
|
|
<?php echo $lineItem['LineItem']['total_discount_amount']; ?>
|
|
</td>
|
|
<td>
|
|
<?php echo $lineItem['LineItem']['gross_price']; ?>
|
|
</td>
|
|
<td>
|
|
<?php echo $lineItem['LineItem']['net_price']; ?>
|
|
</td>
|
|
<td class="actions">
|
|
<?php echo $html->link(__('View', true), array('action' => 'view', $lineItem['LineItem']['id'])); ?>
|
|
<?php echo $html->link(__('Edit', true), array('action' => 'edit', $lineItem['LineItem']['id'])); ?>
|
|
<?php echo $html->link(__('Delete', true), array('action' => 'delete', $lineItem['LineItem']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $lineItem['LineItem']['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 LineItem', true), array('action' => 'add')); ?></li>
|
|
<li><?php echo $html->link(__('List Products', true), array('controller' => 'products', 'action' => 'index')); ?> </li>
|
|
<li><?php echo $html->link(__('New Product', true), array('controller' => 'products', 'action' => 'add')); ?> </li>
|
|
<li><?php echo $html->link(__('List Costings', true), array('controller' => 'costings', 'action' => 'index')); ?> </li>
|
|
<li><?php echo $html->link(__('New Costing', true), array('controller' => 'costings', 'action' => 'add')); ?> </li>
|
|
</ul>
|
|
</div>
|