Changes to Job and Job table. Replicated Book1s fields rather than calculating the derived values..
This commit is contained in:
parent
b20e930935
commit
a6e46794c4
|
|
@ -17,6 +17,7 @@ class JobsController extends AppController {
|
||||||
//$this->Job->recursive = 1;
|
//$this->Job->recursive = 1;
|
||||||
$this->set('jobs', $this->paginate());
|
$this->set('jobs', $this->paginate());
|
||||||
$this->set('customers', $this->Job->Enquiry->Customer->find('list'));
|
$this->set('customers', $this->Job->Enquiry->Customer->find('list'));
|
||||||
|
$this->set('currencies', $this->Job->Currency->find('list'));
|
||||||
}
|
}
|
||||||
|
|
||||||
function view($id = null) {
|
function view($id = null) {
|
||||||
|
|
@ -123,7 +124,7 @@ class JobsController extends AppController {
|
||||||
if (empty($this->data)) {
|
if (empty($this->data)) {
|
||||||
$job = $this->Job->read(null, $id);
|
$job = $this->Job->read(null, $id);
|
||||||
$this->data = $job;
|
$this->data = $job;
|
||||||
|
$this->set('currencies', $this->Job->Currency->find('list'));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,9 @@ class Job extends AppModel {
|
||||||
'fields' => '',
|
'fields' => '',
|
||||||
'order' => '',
|
'order' => '',
|
||||||
'counterCache' => true
|
'counterCache' => true
|
||||||
)
|
),
|
||||||
|
|
||||||
|
'Currency'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -184,6 +184,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<?php if( ($contactCount == 0) && ($enqCount == 0) && ($custCount == 0) && ($jobCount == 0) ) {
|
<?php if( ($contactCount == 0) && ($enqCount == 0) && ($custCount == 0) && ($jobCount == 0) ) {
|
||||||
echo "<h2>No matching records found :( Try modifying your search terms</h2>";
|
echo "<h2>No matching records found :( Try modifying your search terms</h2>";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,7 @@
|
||||||
echo $form->input('date_scheduled_ex_works', array('type'=>'hidden'));
|
echo $form->input('date_scheduled_ex_works', array('type'=>'hidden'));
|
||||||
echo $form->input('date_order_sent_to_customer', array('type'=>'hidden'));
|
echo $form->input('date_order_sent_to_customer', array('type'=>'hidden'));
|
||||||
echo $form->input('customer_order_number');
|
echo $form->input('customer_order_number');
|
||||||
|
echo $form->input('supplier_reference');
|
||||||
echo $form->input('domestic_freight_paid_by', array('type'=>'select', 'options'=>$freight_paid_options));
|
echo $form->input('domestic_freight_paid_by', array('type'=>'select', 'options'=>$freight_paid_options));
|
||||||
echo $form->input('sale_category', array('type'=>'select', 'options'=>$sale_category_options));
|
echo $form->input('sale_category', array('type'=>'select', 'options'=>$sale_category_options));
|
||||||
echo $form->input('shipment_category', array('type'=>'select', 'options'=>$shipment_category_options));
|
echo $form->input('shipment_category', array('type'=>'select', 'options'=>$shipment_category_options));
|
||||||
|
|
|
||||||
|
|
@ -85,12 +85,37 @@
|
||||||
echo $form->input('date_scheduled_ex_works', array('type'=>'hidden'));
|
echo $form->input('date_scheduled_ex_works', array('type'=>'hidden'));
|
||||||
echo $form->input('date_order_sent_to_customer', array('type'=>'hidden'));
|
echo $form->input('date_order_sent_to_customer', array('type'=>'hidden'));
|
||||||
echo $form->input('customer_order_number');
|
echo $form->input('customer_order_number');
|
||||||
|
echo $form->input('supplier_reference');
|
||||||
echo $form->input('domestic_freight_paid_by', array('type'=>'select', 'options'=>$freight_paid_options, 'showEmpty'=>true));
|
echo $form->input('domestic_freight_paid_by', array('type'=>'select', 'options'=>$freight_paid_options, 'showEmpty'=>true));
|
||||||
echo $form->input('sale_category', array('type'=>'select', 'options'=>$sale_category_options));
|
echo $form->input('sale_category', array('type'=>'select', 'options'=>$sale_category_options));
|
||||||
echo $form->input('shipment_category', array('type'=>'select', 'options'=>$shipment_category_options));
|
echo $form->input('shipment_category', array('type'=>'select', 'options'=>$shipment_category_options));
|
||||||
echo $form->input('id');
|
echo $form->input('id');
|
||||||
echo $form->input('comments');
|
echo $form->input('comments');
|
||||||
?>
|
?>
|
||||||
|
<div id="financialData">
|
||||||
|
<?
|
||||||
|
echo $form->input('company_gross_sales_aud');
|
||||||
|
echo $form->input('net_sales_aud');
|
||||||
|
echo $form->input('gross_profit_aud');
|
||||||
|
echo $form->input('ato_exchange_rate');
|
||||||
|
echo $form->input('gst');
|
||||||
|
echo $form->input('currency_id');
|
||||||
|
echo $form->input('gst_amount');
|
||||||
|
echo $form->input('gross_commisions');
|
||||||
|
echo $form->input('invoiced_amount_inc_gst');
|
||||||
|
echo $form->input('net_export_sales_aud');
|
||||||
|
echo $form->input('gross_profit_exports_aud');
|
||||||
|
echo $form->input('gp_percent');
|
||||||
|
echo $form->input('gross_australian_sales_foriegn_currency');
|
||||||
|
echo $form->input('net_australian_sales_foreign_currency');
|
||||||
|
echo $form->input('gross_profit_value_australian_sales_foreign_currency');
|
||||||
|
echo $form->input('gross_export_sales_foreign_currency');
|
||||||
|
echo $form->input('net_export_sales_foreign_currency');
|
||||||
|
echo $form->input('gross_profit_value_after_discount_exports_foreign_currency');
|
||||||
|
echo $form->input('gross_commissions');
|
||||||
|
echo $form->input('net_commissions');
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<?php echo $form->end('Submit');?>
|
<?php echo $form->end('Submit');?>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
<div class="jobs index">
|
<?php //echo $javascript->link('jobindex'); ?>
|
||||||
|
|
||||||
|
|
||||||
<h2><?php __('Jobs');?></h2>
|
<h2><?php __('Jobs');?></h2>
|
||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
|
|
@ -13,12 +15,16 @@
|
||||||
<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><?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('supplier_reference');?></th>
|
||||||
|
|
||||||
|
|
||||||
<th><?php echo $paginator->sort('date_order_received');?></th>
|
<th><?php echo $paginator->sort('date_order_received');?></th>
|
||||||
<th><?php echo $paginator->sort('date_order_placed_on_principle');?></th>
|
<th><?php echo $paginator->sort('date_order_placed_on_principle');?></th>
|
||||||
<th><?php echo $paginator->sort('date_scheduled_ex_works');?></th>
|
<th><?php echo $paginator->sort('date_scheduled_ex_works');?></th>
|
||||||
<th><?php echo $paginator->sort('date_order_sent_to_customer');?></th>
|
<th><?php echo $paginator->sort('date_order_sent_to_customer');?></th>
|
||||||
<th><?php echo $paginator->sort('customer_order_number');?></th>
|
|
||||||
|
|
||||||
<th><?php echo $paginator->sort('domestic_freight_paid_by');?></th>
|
<th><?php echo $paginator->sort('domestic_freight_paid_by');?></th>
|
||||||
<th><?php echo $paginator->sort('sale_category');?></th>
|
<th><?php echo $paginator->sort('sale_category');?></th>
|
||||||
<th><?php echo $paginator->sort('shipment_category');?></th>
|
<th><?php echo $paginator->sort('shipment_category');?></th>
|
||||||
|
|
@ -43,20 +49,28 @@
|
||||||
echo date('j M Y',$time->toUnix($job['Job']['created'])); ?>
|
echo date('j M Y',$time->toUnix($job['Job']['created'])); ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<?php echo $job['Job']['title']; ?>
|
<?php echo $html->link(__($job['Job']['title'], true), array('action' => 'view', $job['Job']['id'])); ?>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<?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>
|
<td>
|
||||||
<?php echo $customers[$job['Enquiry']['customer_id']]; ?>
|
<?php echo $html->link($customers[$job['Enquiry']['customer_id']], array('controller'=>'customers',
|
||||||
|
'action'=>'view', $job['Enquiry']['customer_id'])); ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<?php echo $job['Job']['date_order_received']; ?>
|
<?php echo $job['Job']['customer_order_number']; ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
<?php echo $job['Job']['supplier_reference']; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<?php echo $job['Job']['date_order_received']; ?>
|
||||||
|
</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<?php echo isEmptyDate($job['Job']['date_order_placed_on_principle']); ?>
|
<?php echo isEmptyDate($job['Job']['date_order_placed_on_principle']); ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -66,9 +80,7 @@
|
||||||
<td>
|
<td>
|
||||||
<?php echo isEmptyDate($job['Job']['date_order_sent_to_customer']); ?>
|
<?php echo isEmptyDate($job['Job']['date_order_sent_to_customer']); ?>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
|
||||||
<?php echo $job['Job']['customer_order_number']; ?>
|
|
||||||
</td>
|
|
||||||
<td>
|
<td>
|
||||||
<?php echo $job['Job']['domestic_freight_paid_by']; ?>
|
<?php echo $job['Job']['domestic_freight_paid_by']; ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -78,29 +90,22 @@
|
||||||
<td>
|
<td>
|
||||||
<?php echo $job['Job']['shipment_category']; ?>
|
<?php echo $job['Job']['shipment_category']; ?>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<?php echo $job['Job']['comments']; ?>
|
<?php echo $job['Job']['comments']; ?>
|
||||||
</td>
|
</td>
|
||||||
<td class="actions">
|
<td class="actions">
|
||||||
<?php echo $html->link(__('View', true), array('action' => 'view', $job['Job']['id'])); ?>
|
<?php //echo $html->link(__('View', true), array('action' => 'view', $job['Job']['id'])); ?>
|
||||||
<?php echo $html->link(__('Edit', true), array('action' => 'edit', $job['Job']['id'])); ?>
|
<?php echo $html->link(__('Edit', true), array('action' => 'edit', $job['Job']['id']), array('class'=>'editWindow')); ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
|
||||||
<div class="paging">
|
<div class="paging">
|
||||||
<?php echo $paginator->prev('<< '.__('previous', true), array(), null, array('class'=>'disabled'));?>
|
<?php echo $paginator->prev('<< '.__('previous', true), array(), null, array('class'=>'disabled'));?>
|
||||||
| <?php echo $paginator->numbers();?>
|
| <?php echo $paginator->numbers();?>
|
||||||
<?php echo $paginator->next(__('next', true).' >>', array(), null, array('class' => 'disabled'));?>
|
<?php echo $paginator->next(__('next', true).' >>', array(), null, array('class' => 'disabled'));?>
|
||||||
</div>
|
</div>
|
||||||
<div class="actions">
|
|
||||||
<ul>
|
|
||||||
<li><?php echo $html->link(__('New Job', true), array('action' => 'add')); ?></li>
|
|
||||||
<li><?php echo $html->link(__('List Enquiries', true), array('controller' => 'enquiries', 'action' => 'index')); ?> </li>
|
|
||||||
<li><?php echo $html->link(__('New Enquiry', true), array('controller' => 'enquiries', 'action' => 'add')); ?> </li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
@ -115,4 +120,4 @@ function isEmptyDate($date) {
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php debug($customers); ?>
|
<?php // debug($customers); ?>
|
||||||
|
|
@ -279,7 +279,7 @@ li .last {
|
||||||
clear: both;
|
clear: both;
|
||||||
color: #333;
|
color: #333;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
overflow: auto;
|
overflow: scroll;
|
||||||
}
|
}
|
||||||
#footer {
|
#footer {
|
||||||
clear: both;
|
clear: both;
|
||||||
|
|
@ -305,8 +305,6 @@ a#mailheaders {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#printemailbody {
|
#printemailbody {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
font-size: 90%;
|
font-size: 90%;
|
||||||
|
|
@ -457,6 +455,8 @@ td.PriceSummary {
|
||||||
|
|
||||||
/* Master Enquiry Register Styling */
|
/* Master Enquiry Register Styling */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
table.mer {
|
table.mer {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border:1px solid #ccc;
|
border:1px solid #ccc;
|
||||||
|
|
@ -467,7 +467,6 @@ table.mer {
|
||||||
font-size: 85%;
|
font-size: 85%;
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
padding-right: 0;
|
padding-right: 0;
|
||||||
overflow: auto;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
th.mer {
|
th.mer {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue