View POs for a job. Closes #59
This commit is contained in:
parent
8b95717de7
commit
b3a93ead5a
|
|
@ -63,6 +63,10 @@ class Job extends AppModel {
|
|||
'OrderAcknowledgement' => array(
|
||||
'className' => 'OrderAcknowledgement',
|
||||
'foreign_key' => 'job_id'
|
||||
),
|
||||
'PackingList' => array(
|
||||
'className' => 'PackingList',
|
||||
'foreign_key' => 'job_id'
|
||||
)
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -113,6 +113,42 @@ foreach ($job['PurchaseOrder'] as $purchaseOrder):
|
|||
<?php endif;?>
|
||||
|
||||
|
||||
<div class="related">
|
||||
<h3>Packing Lists for this Job</h3>
|
||||
<?php if (!empty($packingLists)): ?>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<th>Packing List</th>
|
||||
<th>Issue Date</th>
|
||||
<th class="actions">Actions</th>
|
||||
</tr>
|
||||
<?php
|
||||
$i = 0;
|
||||
foreach ($job['PackingList'] as $packingList):
|
||||
$class = null;
|
||||
if ($i++ % 2 == 0) {
|
||||
$class = ' class="altrow"';
|
||||
}
|
||||
?>
|
||||
|
||||
<tr<?php echo $class;?>>
|
||||
<td>
|
||||
<a href="/documents/view/<?php echo $packingList["document_id"];?>"><?php echo $packingList['title']; ?></a>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo $packingList['issue_date']; ?>
|
||||
</td>
|
||||
|
||||
<td class="actions">
|
||||
<?php echo $html->link(__('View', true), array('controller'=>'documents', 'action' => 'view', $packingList['document_id'])); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="related">
|
||||
<h3>
|
||||
|
|
@ -123,4 +159,4 @@ foreach ($job['PurchaseOrder'] as $purchaseOrder):
|
|||
</div>
|
||||
|
||||
|
||||
<?php debug($job);?>
|
||||
<?php // debug($job);?>
|
||||
|
|
|
|||
Loading…
Reference in a new issue