Merge branch 'kcordes/55-defaults-po-order-ack' into 'master'
Kcordes/55 defaults po order ack See merge request minimalist.software/cmc-sales!3
This commit is contained in:
commit
9fe3814f95
|
|
@ -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)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue