This commit is contained in:
Karl Cordes 2023-05-08 18:24:47 +10:00
parent b8489d86a8
commit 9a9faebd6c

View file

@ -13,6 +13,16 @@ class DocumentsController extends AppController {
var $components = array('Email');
var $defaultShippingText = <<<ENDDETAILS
COURIER NAME: TNT , COURIER SERVICE: TBA<br>
CON NOTE NO: TBA<br>
1 BOX @ Gross: TBA kg, Net: TBA kg, DIMS: TBA cm<br>
<br>
CMC Technologies payment terms are net 30 days from invoice date unless stated otherwise in the terms box above. This contract is subject to CMC Technologies terms and conditions of sale dated 1/7/ 2006 (attached).
ENDDETAILS;
var $defaultFOB = "Ex-works CMC Technologies, Alexandria NSW";
function index() {
$this->Document->recursive = 0;
//$this->set('documents', $this->paginate());
@ -325,6 +335,9 @@ ENDINSTRUCTIONS;
$this->data['Document']['user_id']= $enquiry['Enquiry']['user_id'];
$this->data['Document']['revision'] = 0; //No revisions for Order Acks. I have decreed it!
$this->data['Document']['type'] = 'orderAck';
$this->data['Document']['shipping_details'] = $this->defaultShippingText;
break;
@ -612,6 +625,10 @@ ENDINSTRUCTIONS;
/** Copy the LineItems from this Document. Applies to all of the Document Types */
$newDoc['Document']['shipping_details'] = $this->defaultShippingText;
$newDoc['OrderAcknowledgement']['fob'] = $this->defaultFOB;
if ($this->Document->saveAll($newDoc)) {
$newid = $this->Document->id;
if(isset($job)) {