Added POs to job list
This commit is contained in:
parent
b6c251d479
commit
5253da4afd
|
|
@ -15,10 +15,10 @@ class JobsController extends AppController {
|
|||
);
|
||||
|
||||
function index() {
|
||||
/* $this->Job->recursive = 1;
|
||||
$this->Job->recursive = 1;
|
||||
$this->set('jobs', $this->paginate());
|
||||
$this->set('customers', $this->Job->Enquiry->Customer->find('list'));
|
||||
$this->set('currencies', $this->Job->Currency->find('list'));*/
|
||||
$this->set('currencies', $this->Job->Currency->find('list'));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,12 @@ $i=0;
|
|||
foreach($jobs as $job) {
|
||||
|
||||
|
||||
$poString = '';
|
||||
foreach($job['PurchaseOrder'] as $po) {
|
||||
$poString .= ' '.$html->link($po['title'], array('controller'=>'purchase_orders', 'action'=>'view', $po['id']));
|
||||
}
|
||||
|
||||
|
||||
$cellArray = array(
|
||||
|
||||
// $job['Job']['id'],
|
||||
|
|
@ -33,6 +39,9 @@ foreach($jobs as $job) {
|
|||
$job['Job']['sale_category'],
|
||||
$job['Job']['shipment_category'],
|
||||
$html->link($job['Job']['title'], array('controller'=>'jobs','action'=>'view', $job['Job']['id'])),
|
||||
$poString,
|
||||
|
||||
|
||||
$html->link($customers[$job['Enquiry']['customer_id']], array('controller'=>'customers','action'=>'view', $job['Enquiry']['customer_id'])),
|
||||
$job['Job']['comments'],
|
||||
$job['Job']['customer_order_number'],
|
||||
|
|
|
|||
|
|
@ -22,5 +22,5 @@ echo $javascript->link('job_index');
|
|||
<div id="editDiv">
|
||||
</div>
|
||||
|
||||
<? //debug($jobs);
|
||||
<? debug($jobs);
|
||||
?>
|
||||
|
|
@ -36,7 +36,7 @@ jQuery(document).ready(function(){
|
|||
mtype: 'GET',
|
||||
colNames:[
|
||||
//'id',
|
||||
'Status', 'Sale Cat.','Shipment Cat.','Job Number','Customer','Description','Customer O/N','Order Received','Supplier Ref',
|
||||
'Status', 'Sale Cat.','Shipment Cat.','Job Number','CMC POs', 'Customer','Description','Customer O/N','Order Received','Supplier Ref',
|
||||
'Order Placed Principle','date_scheduled_ex_works','date_order_sent_to_customer','Freight Paid By',
|
||||
'company_gross_sales_aud','net_sales_aud','gross_profit_aud','ato_exchange_rate',
|
||||
'gst','Sale Currency','gst_amount','gross_commisions','invoiced_amount_inc_gst','net_export_sales_aud',
|
||||
|
|
@ -107,6 +107,13 @@ jQuery(document).ready(function(){
|
|||
editable:false
|
||||
},
|
||||
|
||||
{
|
||||
name:'purchase_orders',
|
||||
index:'purchase_orders',
|
||||
width:100,
|
||||
editable:false
|
||||
},
|
||||
|
||||
{
|
||||
name:'customer',
|
||||
index:'customer',
|
||||
|
|
|
|||
Loading…
Reference in a new issue