164 lines
5.1 KiB
PHP
Executable file
164 lines
5.1 KiB
PHP
Executable file
<div class="jobs view">
|
|
<h2><?php __('Job: '.$job['Job']['title']." for ".$customer['Customer']['name']);?></h2>
|
|
<dl><?php $i = 0; $class = ' class="altrow"';?>
|
|
|
|
|
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Job Number'); ?></dt>
|
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
|
<?php echo $job['Job']['title']; ?>
|
|
|
|
</dd>
|
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Enquiry'); ?></dt>
|
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
|
<?php echo $html->link($job['Enquiry']['title'], array('controller' => 'enquiries', 'action' => 'view', $job['Enquiry']['id'])); ?>
|
|
|
|
</dd>
|
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Comments'); ?></dt>
|
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
|
<?php echo $job['Job']['comments']; ?>
|
|
|
|
</dd>
|
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Date Order Received'); ?></dt>
|
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
|
<?php echo $this->element('isEmptyDate',
|
|
array('date'=>$job['Job']['date_order_received'])); ?>
|
|
|
|
</dd>
|
|
|
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Date Order Sent To Customer'); ?></dt>
|
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
|
<?php echo $this->element('isEmptyDate',
|
|
array('date'=> $job['Job']['date_order_sent_to_customer'])); ?>
|
|
|
|
</dd>
|
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Customer Order Number'); ?></dt>
|
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
|
<?php echo $job['Job']['customer_order_number']; ?>
|
|
|
|
</dd>
|
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Domestic Freight Paid By'); ?></dt>
|
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
|
<?php echo $job['Job']['domestic_freight_paid_by']; ?>
|
|
|
|
</dd>
|
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Sale Category'); ?></dt>
|
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
|
<?php echo $job['Job']['sale_category']; ?>
|
|
|
|
</dd>
|
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Shipment Category'); ?></dt>
|
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
|
<?php echo $job['Job']['shipment_category']; ?>
|
|
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
|
|
<div class="related">
|
|
<h3><?php __('Purchase Orders for this Job');?></h3>
|
|
<?php if (!empty($job['PurchaseOrder'])):?>
|
|
<table cellpadding = "0" cellspacing = "0">
|
|
<tr>
|
|
|
|
<th>Issue Date</th>
|
|
<th>Dispatch Date</th>
|
|
<th>Date Arrived</th>
|
|
<th>PO Number</th>
|
|
<th>Principle</th>
|
|
<th>Principle Reference</th>
|
|
<th>Document</th>
|
|
<th class="actions"><?php __('Actions');?></th>
|
|
</tr>
|
|
|
|
<?php
|
|
$i = 0;
|
|
foreach ($job['PurchaseOrder'] as $purchaseOrder):
|
|
$class = null;
|
|
if ($i++ % 2 == 0) {
|
|
$class = ' class="altrow"';
|
|
}
|
|
?>
|
|
<tr<?php echo $class;?>>
|
|
|
|
<td>
|
|
<?php echo $purchaseOrder['issue_date']; ?>
|
|
</td>
|
|
<td>
|
|
<?php echo $purchaseOrder['dispatch_date']; ?>
|
|
</td>
|
|
<td>
|
|
<?php echo $purchaseOrder['date_arrived']; ?>
|
|
</td>
|
|
<td>
|
|
<?php echo $purchaseOrder['title']; ?>
|
|
</td>
|
|
<td>
|
|
<?php echo $html->link($principles[$purchaseOrder['principle_id']], array('controller' => 'principles', 'action' => 'view', $purchaseOrder['principle_id'])); ?>
|
|
</td>
|
|
<td>
|
|
<?php echo $purchaseOrder['principle_reference']; ?>
|
|
</td>
|
|
<td>
|
|
<?php //echo $html->link($purchaseOrder['Document']['id'], array('controller' => 'documents', 'action' => 'view', $purchaseOrder['Document']['id'])); ?>
|
|
</td>
|
|
<td class="actions">
|
|
<?php echo $html->link(__('View', true), array('controller'=>'purchase_orders', 'action' => 'view', $purchaseOrder['id'])); ?>
|
|
<?php echo $html->link(__('Edit', true), array('controller'=>'purchase_orders','action' => 'edit', $purchaseOrder['id'])); ?>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</table>
|
|
</div>
|
|
|
|
<?php endif;?>
|
|
|
|
|
|
<div class="related">
|
|
<h3>Packing Lists for this Job</h3>
|
|
<?php if (!empty($job['PackingList'])): ?>
|
|
<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>
|
|
Emails for this Job<?php echo $html->image('internet-mail.png'); ?>
|
|
</h3>
|
|
<?php echo $this->element('email_table_ajax', array('emails' => $emails)); ?>
|
|
<?php //echo $this->element('email_table_ajax', $enquiry, array('cache'=>'+1 day')); ?>
|
|
</div>
|
|
|
|
|
|
<pre><?php //print_r($job); ?></pre>
|
|
<?php // debug($job);?>
|