cmc-sales/app/views/costings/index.ctp
2013-03-23 16:25:52 +11:00

127 lines
4.9 KiB
PHP
Executable file

<div class="costings index">
<h2><?php __('Costings');?></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('created');?></th>
<th><?php echo $paginator->sort('product_id');?></th>
<th><?php echo $paginator->sort('line_item_id');?></th>
<th><?php echo $paginator->sort('purchase_currency_id');?></th>
<th><?php echo $paginator->sort('sale_currency_id');?></th>
<th><?php echo $paginator->sort('quantity');?></th>
<th><?php echo $paginator->sort('unit_cost_price');?></th>
<th><?php echo $paginator->sort('exchange_rate');?></th>
<th><?php echo $paginator->sort('our_discount_percent');?></th>
<th><?php echo $paginator->sort('packing');?></th>
<th><?php echo $paginator->sort('shipping_weight');?></th>
<th><?php echo $paginator->sort('shipping_cost');?></th>
<th><?php echo $paginator->sort('duty_percent');?></th>
<th><?php echo $paginator->sort('customs');?></th>
<th><?php echo $paginator->sort('finance_percent');?></th>
<th><?php echo $paginator->sort('misc_costs');?></th>
<th><?php echo $paginator->sort('gross_sell_price');?></th>
<th><?php echo $paginator->sort('sale_discount_percent');?></th>
<th><?php echo $paginator->sort('net_sell_price');?></th>
<th class="actions"><?php __('Actions');?></th>
</tr>
<?php
$i = 0;
foreach ($costings as $costing):
$class = null;
if ($i++ % 2 == 0) {
$class = ' class="altrow"';
}
?>
<tr<?php echo $class;?>>
<td>
<?php echo $costing['Costing']['id']; ?>
</td>
<td>
<?php echo $costing['Costing']['created']; ?>
</td>
<td>
<?php echo $html->link($costing['Product']['title'], array('controller' => 'products', 'action' => 'view', $costing['Product']['id'])); ?>
</td>
<td>
<?php echo $html->link($costing['LineItem']['title'], array('controller' => 'line_items', 'action' => 'view', $costing['LineItem']['id'])); ?>
</td>
<td>
<?php echo $html->link($costing['PurchaseCurrency']['name'], array('controller' => 'currencies', 'action' => 'view', $costing['PurchaseCurrency']['id'])); ?>
</td>
<td>
<?php echo $html->link($costing['SaleCurrency']['name'], array('controller' => 'currencies', 'action' => 'view', $costing['SaleCurrency']['id'])); ?>
</td>
<td>
<?php echo $costing['Costing']['quantity']; ?>
</td>
<td>
<?php echo $costing['Costing']['unit_cost_price']; ?>
</td>
<td>
<?php echo $costing['Costing']['exchange_rate']; ?>
</td>
<td>
<?php echo $costing['Costing']['our_discount_percent']; ?>
</td>
<td>
<?php echo $costing['Costing']['packing']; ?>
</td>
<td>
<?php echo $costing['Costing']['shipping_weight']; ?>
</td>
<td>
<?php echo $costing['Costing']['shipping_cost']; ?>
</td>
<td>
<?php echo $costing['Costing']['duty_percent']; ?>
</td>
<td>
<?php echo $costing['Costing']['customs']; ?>
</td>
<td>
<?php echo $costing['Costing']['finance_percent']; ?>
</td>
<td>
<?php echo $costing['Costing']['misc_costs']; ?>
</td>
<td>
<?php echo $costing['Costing']['gross_sell_price']; ?>
</td>
<td>
<?php echo $costing['Costing']['sale_discount_percent']; ?>
</td>
<td>
<?php echo $costing['Costing']['net_sell_price']; ?>
</td>
<td class="actions">
<?php echo $html->link(__('View', true), array('action' => 'view', $costing['Costing']['id'])); ?>
<?php echo $html->link(__('Edit', true), array('action' => 'edit', $costing['Costing']['id'])); ?>
<?php echo $html->link(__('Delete', true), array('action' => 'delete', $costing['Costing']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $costing['Costing']['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 Costing', 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 Line Items', true), array('controller' => 'line_items', 'action' => 'index')); ?> </li>
<li><?php echo $html->link(__('New Line Item', true), array('controller' => 'line_items', 'action' => 'add')); ?> </li>
<li><?php echo $html->link(__('List Currencies', true), array('controller' => 'currencies', 'action' => 'index')); ?> </li>
<li><?php echo $html->link(__('New Purchase Currency', true), array('controller' => 'currencies', 'action' => 'add')); ?> </li>
</ul>
</div>