From 9a9faebd6c3c016c2a84e065ad540241538cefe1 Mon Sep 17 00:00:00 2001 From: Karl Cordes Date: Mon, 8 May 2023 18:24:47 +1000 Subject: [PATCH] Misc --- app/controllers/documents_controller.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/app/controllers/documents_controller.php b/app/controllers/documents_controller.php index c2dbee39..e072d1c0 100755 --- a/app/controllers/documents_controller.php +++ b/app/controllers/documents_controller.php @@ -13,6 +13,16 @@ class DocumentsController extends AppController { var $components = array('Email'); + var $defaultShippingText = << +CON NOTE NO: TBA
+1 BOX @ Gross: TBA kg, Net: TBA kg, DIMS: TBA cm
+
+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)) {