Added Freight Forwarder link to Shipments menu
This commit is contained in:
parent
791384075e
commit
9d3de7620a
|
|
@ -333,8 +333,14 @@ class DocumentsController extends AppController {
|
||||||
|
|
||||||
$enquiry = $this->Document->OrderAcknowledgement->Enquiry->find('first', array('conditions'=>array('Enquiry.id'=>$originalDoc['Quote']['enquiry_id'])));
|
$enquiry = $this->Document->OrderAcknowledgement->Enquiry->find('first', array('conditions'=>array('Enquiry.id'=>$originalDoc['Quote']['enquiry_id'])));
|
||||||
$enquiry['Enquiry']['status_id'] = 3; //Job Won, Order Placed
|
$enquiry['Enquiry']['status_id'] = 3; //Job Won, Order Placed
|
||||||
|
|
||||||
$this->Document->OrderAcknowledgement->Enquiry->save($enquiry);
|
$this->Document->OrderAcknowledgement->Enquiry->save($enquiry);
|
||||||
|
|
||||||
|
$customer = $this->Document->OrderAcknowledgement->Enquiry->Customer->find('first', array('conditions'=>array('Customer.id'=>$enquiry['Enquiry']['customer_id'])));
|
||||||
|
|
||||||
|
$customer['Customer']['customer_category_id'] = 3; //make Customer a Creditor
|
||||||
|
|
||||||
|
$this->Document->OrderAcknowledgement->Enquiry->Customer->save($customer);
|
||||||
|
|
||||||
$job = $this->Document->OrderAcknowledgement->Job->newJob($enquiry); //Only way to know Enquiry ID is if it's a Quote.
|
$job = $this->Document->OrderAcknowledgement->Job->newJob($enquiry); //Only way to know Enquiry ID is if it's a Quote.
|
||||||
|
|
||||||
if($job == false) {
|
if($job == false) {
|
||||||
|
|
@ -376,7 +382,7 @@ class DocumentsController extends AppController {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert an Order Acknowledgement to an Invoice.
|
* Convert an Order Acknowledgement to an Invoice.
|
||||||
*
|
*
|
||||||
* @TODO Finish this.
|
* @TODO Finish this.
|
||||||
*
|
*
|
||||||
|
|
@ -390,7 +396,7 @@ class DocumentsController extends AppController {
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ echo $paginator->counter(array(
|
||||||
?></p>
|
?></p>
|
||||||
<table cellpadding="0" cellspacing="0">
|
<table cellpadding="0" cellspacing="0">
|
||||||
<tr>
|
<tr>
|
||||||
<th><?php echo $paginator->sort('id');?></th>
|
|
||||||
<th><?php echo $paginator->sort('name');?></th>
|
<th><?php echo $paginator->sort('name');?></th>
|
||||||
<th class="actions"><?php __('Actions');?></th>
|
<th class="actions"><?php __('Actions');?></th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -21,16 +20,12 @@ foreach ($freightForwarders as $freightForwarder):
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<tr<?php echo $class;?>>
|
<tr<?php echo $class;?>>
|
||||||
<td>
|
|
||||||
<?php echo $freightForwarder['FreightForwarder']['id']; ?>
|
|
||||||
</td>
|
|
||||||
<td>
|
<td>
|
||||||
<?php echo $freightForwarder['FreightForwarder']['name']; ?>
|
<?php echo $freightForwarder['FreightForwarder']['name']; ?>
|
||||||
</td>
|
</td>
|
||||||
<td class="actions">
|
<td class="actions">
|
||||||
<?php echo $html->link(__('View', true), array('action' => 'view', $freightForwarder['FreightForwarder']['id'])); ?>
|
<?php echo $html->link(__('View', true), array('action' => 'view', $freightForwarder['FreightForwarder']['id'])); ?>
|
||||||
<?php echo $html->link(__('Edit', true), array('action' => 'edit', $freightForwarder['FreightForwarder']['id'])); ?>
|
<?php echo $html->link(__('Edit', true), array('action' => 'edit', $freightForwarder['FreightForwarder']['id'])); ?>
|
||||||
<?php echo $html->link(__('Delete', true), array('action' => 'delete', $freightForwarder['FreightForwarder']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $freightForwarder['FreightForwarder']['id'])); ?>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
|
|
@ -44,9 +39,6 @@ foreach ($freightForwarders as $freightForwarder):
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<ul>
|
<ul>
|
||||||
<li><?php echo $html->link(__('New FreightForwarder', true), array('action' => 'add')); ?></li>
|
<li><?php echo $html->link(__('New FreightForwarder', true), array('action' => 'add')); ?></li>
|
||||||
<li><?php echo $html->link(__('List Shipments', true), array('controller' => 'shipments', 'action' => 'index')); ?> </li>
|
|
||||||
<li><?php echo $html->link(__('New Shipment', true), array('controller' => 'shipments', 'action' => 'add')); ?> </li>
|
|
||||||
<li><?php echo $html->link(__('List Freight Services', true), array('controller' => 'freight_services', 'action' => 'index')); ?> </li>
|
|
||||||
<li><?php echo $html->link(__('New Freight Service', true), array('controller' => 'freight_services', 'action' => 'add')); ?> </li>
|
<li><?php echo $html->link(__('New Freight Service', true), array('controller' => 'freight_services', 'action' => 'add')); ?> </li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,8 @@ if ($currentuser['User']['access_level'] == 'manager' || $currentuser['User']['a
|
||||||
<li class=""><?php echo $html->link('Import Shipments', '/shipments/index/import'); ?></li>
|
<li class=""><?php echo $html->link('Import Shipments', '/shipments/index/import'); ?></li>
|
||||||
<li class=""><?php echo $html->link('Direct Shipments', '/shipments/index/direct'); ?></li>
|
<li class=""><?php echo $html->link('Direct Shipments', '/shipments/index/direct'); ?></li>
|
||||||
<li class=""><?php echo $html->link('Export Shipments', '/shipments/index/export'); ?></li>
|
<li class=""><?php echo $html->link('Export Shipments', '/shipments/index/export'); ?></li>
|
||||||
<li class="last"><?php echo $html->link('Local Shipments', '/shipments/index/local'); ?></li>
|
<li class=""><?php echo $html->link('Local Shipments', '/shipments/index/local'); ?></li>
|
||||||
|
<li class="last"><?php echo $html->link('Freight Forwarders', '/freight_forwarders'); ?></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue