Jobs now linked to POs

This commit is contained in:
Karl Cordes 2010-09-07 14:27:01 +10:00
parent 8ff0e2b315
commit 1f9a11d371
2 changed files with 12 additions and 4 deletions

View file

@ -14,6 +14,7 @@
<th><?php echo $paginator->sort('created');?></th> <th><?php echo $paginator->sort('created');?></th>
<th><?php echo $paginator->sort('Job Number');?></th> <th><?php echo $paginator->sort('Job Number');?></th>
<th><?php echo $paginator->sort('enquiry_id');?></th> <th><?php echo $paginator->sort('enquiry_id');?></th>
<th>POs</th>
<th><?php echo $paginator->sort('Customer');?></th> <th><?php echo $paginator->sort('Customer');?></th>
<th><?php echo $paginator->sort('customer_order_number');?></th> <th><?php echo $paginator->sort('customer_order_number');?></th>
@ -35,7 +36,13 @@
if ($i++ % 2 == 0) { if ($i++ % 2 == 0) {
$class = ' class="altrow"'; $class = ' class="altrow"';
} }
?>
$poLink = "";
foreach($job['PurchaseOrder'] as $po) {
$poLink .= $html->link($po['title']." ", array('controller'=>'purchase_orders', 'action'=>'view', $po['id']));
}
?>
<tr<?php echo $class;?>> <tr<?php echo $class;?>>
@ -52,6 +59,7 @@
<td class="tinytext"> <td class="tinytext">
<?php echo $html->link($job['Enquiry']['title'], array('controller' => 'enquiries', 'action' => 'view', $job['Enquiry']['id'])); ?> <?php echo $html->link($job['Enquiry']['title'], array('controller' => 'enquiries', 'action' => 'view', $job['Enquiry']['id'])); ?>
</td> </td>
<td><?=$poLink?></td>
<td> <td>
<?php echo $html->link($customers[$job['Enquiry']['customer_id']], array('controller'=>'customers', <?php echo $html->link($customers[$job['Enquiry']['customer_id']], array('controller'=>'customers',
'action'=>'view', $job['Enquiry']['customer_id'])); ?> 'action'=>'view', $job['Enquiry']['customer_id'])); ?>
@ -80,7 +88,7 @@
<td> <td>
<?php echo $job['Job']['shipment_category']; ?> <?php echo $job['Job']['shipment_category']; ?>
</td> </td>
<td> <td class="tinytext">
<?php echo $job['Job']['comments']; ?> <?php echo $job['Job']['comments']; ?>
</td> </td>
<td class="actions"> <td class="actions">

View file

@ -12,7 +12,7 @@ echo $paginator->counter(array(
<th><?php echo $paginator->sort('issue_date');?></th> <th><?php echo $paginator->sort('issue_date');?></th>
<th><?php echo $paginator->sort('dispatch_date');?></th> <th><?php echo $paginator->sort('dispatch_date');?></th>
<th><?php echo $paginator->sort('date_arrived');?></th> <th><?php echo $paginator->sort('date_arrived');?></th>
<th><?php echo $paginator->sort('title');?></th> <th><?php echo $paginator->sort('PO Number');?></th>
<th>Jobs</th> <th>Jobs</th>
<th><?php echo $paginator->sort('principle_id');?></th> <th><?php echo $paginator->sort('principle_id');?></th>
<th><?php echo $paginator->sort('principle_reference');?></th> <th><?php echo $paginator->sort('principle_reference');?></th>
@ -44,7 +44,7 @@ foreach ($purchaseOrders as $purchaseOrder):
<?php echo isEmptyDate($purchaseOrder['PurchaseOrder']['date_arrived']); ?> <?php echo isEmptyDate($purchaseOrder['PurchaseOrder']['date_arrived']); ?>
</td> </td>
<td> <td>
<?php echo $purchaseOrder['PurchaseOrder']['title']; ?> <?php echo $html->link($purchaseOrder['PurchaseOrder']['title'], array('controller'=>'purchase_orders', 'action'=>'view', $purchaseOrder['PurchaseOrder']['id'])); ?>
</td> </td>
<td class="tinytext"> <td class="tinytext">
<?php echo $jobLink; ?> <?php echo $jobLink; ?>