diff --git a/controllers/documents_controller.php b/controllers/documents_controller.php index c53ba0cf..24f66078 100755 --- a/controllers/documents_controller.php +++ b/controllers/documents_controller.php @@ -47,12 +47,19 @@ class DocumentsController extends AppController { break; case 'invoice': $docTypeElement = 'document_invoice_view'; + + $this->set('currencies', $this->Document->Invoice->Currency->find('list')); $this->set('invoice', $this->Document->Invoice->find('first', array('conditions'=>array('Invoice.id'=>$document['Invoice']['id'])))); break; case 'purchaseOrder': $docTypeElement = 'document_purchase_order_view'; break; + + case 'orderAck': + $this->set('currencies', $this->Document->OrderAcknowledgement->Currency->find('list')); + $this->set('job', $this->Document->OrderAcknowledgement->Job->find('first', array('conditions'=>array('Job.id'=>$document['OrderAcknowledgement']['job_id'])))); + $docTypeElement = 'document_orderack_view'; } $this->set('docTypeElement', $docTypeElement); @@ -161,13 +168,16 @@ class DocumentsController extends AppController { break; case "purchaseOrder": - - - break; case "orderAck": - + $enquiry = $this->Document->OrderAcknowledgement->Enquiry->read(null, $enquiryid); + $this->data['OrderAcknowledgement']['job_id'] = $jobid; + $this->data['OrderAcknowledgement']['enquiry_id'] = $enquiryid; + $this->data['OrderAcknowledgement']['currency_id'] = 2; //Default to AUD. + $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'; break; @@ -179,7 +189,7 @@ class DocumentsController extends AppController { $this->Session->setFlash(__('The Document has been saved', true)); $this->redirect(array('action'=>'view',$newid)); } else { - $this->Session->setFlash(__('The Document could not be saved. Please, try again.', true)); + $this->Session->setFlash(__('The Document could not be saved. Something went wrong! Ensure all fields are entered correctly.', true)); } @@ -276,41 +286,6 @@ class DocumentsController extends AppController { } - /** - * Create a new Quote, along with its associated Document and the first two pages. - * @param int $id - the Enquiry ID that this quote belongs to. - */ - function newInvoice($id = null) { - $enquiryid = $id; - $this->Document->create(); - - $enquiry = $this->Document->Quote->Enquiry->findById($id); - - $this->data['Document']['enquiry_id'] = $enquiryid; - - $this->data['Invoice']['enquiry_id'] = $enquiryid; - $invoice_number_offset = 4436; //What Invoice number we were up to before the new system. - $number_of_invoices = $this->Document->Invoice->findCount(); - - $newInvoiceNumber = $invoice_number_offset + $number_of_invoices; - - $this->data['Invoice']['title'] = "CMCIN".$newInvoiceNumber; - $this->data['Document']['user_id']= $enquiry['Enquiry']['user_id']; - $this->data['Document']['type'] = 'invoice'; - - if ($this->Document->saveAll($this->data)) { - $newid = $this->Document->id; - - $this->Session->setFlash(__('The Document has been saved', true)); - $this->redirect(array('action'=>'view',$newid)); - } else { - $this->Session->setFlash(__('The Document could not be saved. Please, try again.', true)); - } - - - } - - function ajax_edit($id = null) { $this->layout = 'ajax'; @@ -369,14 +344,14 @@ class DocumentsController extends AppController { if($gst == 1) { $totalsDescText = array( - 'subtotal' => 'SUB-TOTAL (EXCLUDING GST)', + 'subtotal' => 'SUBTOTAL', 'gst' => 'GST (10%)', - 'total' => 'TOTAL PAYABLE (INCLUDING GST)' + 'total' => 'TOTAL DUE' ); } else { $totalsDescText = array( - 'subtotal' => 'SUB-TOTAL', + 'subtotal' => 'SUBTOTAL', 'gst' => 'GST (10%)', 'total' => 'TOTAL PAYABLE' ); @@ -386,49 +361,6 @@ class DocumentsController extends AppController { $totals = $this->calculateTotals($document, $gst); $this->set('totals',$totals); $this->set('totalsDescText',$totalsDescText); - /** - * Call the commercial Comments. Need to have already figured out what page to do this on.. - * - * * Passing a data structure in the following format. - * - * $details = array( - * 'deliveryTime' => (String) eg. 2-3 - * 'paymentTerms => (String) eg. 100% PAYMENT WITH ORDER || NET 30 DAYS FOR APPROVED ACCOUNTS - * 'dateIssued' => (String) eg. 2009-05-20 - * 'daysValid' => (Int) eg. 30 - * 'deliveryPoint' => (String) eg. EX-CMC Technologies, NSW. || EX-SUPPLIER NAME - * 'exchangeRate' => (String) eg. FIXED - * 'customsDuty' => (String) eg. NIL || 5% - * 'gst' => (String) eg. 10% EXTRA || Not Applicable for Export - * 'salesEngineer' => (String) eg. Karl Cordes || Con Carpis || Kenan Fernandes etc - * ); - * - * - */ - - if($enquiry['Enquiry']['gst'] == 1) { - $gstPhrase = "10% EXTRA"; - } - else { - $gstPhrase = "Not Applicable for Export"; - } - - $commercialDetails = array ( - 'deliveryTime' => strtoupper($document['Quote']['delivery_time']), - 'paymentTerms' => strtoupper($document['Quote']['payment_terms']), - 'dateIssued' => $document['Quote']['date_issued'], - 'validFor' => $document['Quote']['days_valid'], - 'deliveryPoint' => strtoupper($document['Quote']['delivery_point']), - 'exchangeRate' => strtoupper($document['Quote']['exchange_rate']), - 'customsDuty' => strtoupper($document['Quote']['customs_duty']), - 'gst' => strtoupper($gstPhrase), - 'salesEngineer' => strtoupper($document['User']['first_name'].' '.$document['User']['last_name']) - ); - - $this->set('commercialDetails', $commercialDetails); - - //debug($quote); - //debug($commercialDetails); $this->set('currency', $currency); $this->set('enquiry', $enquiry); @@ -449,7 +381,14 @@ class DocumentsController extends AppController { case "invoice": $filename = $document['Invoice']['title']; + $this->set('docTitle', $document['Invoice']['title']); $this->set('job', $this->Document->Invoice->Job->find('first', array('conditions'=>array('Job.id'=>$document['Invoice']['job_id'])))); + $this->set('issue_date_string', date('d F Y', strtotime($document['Invoice']['issue_date']))); + + $this->set('ship_via', $document['Invoice']['ship_via']); + $this->set('fob', $document['Invoice']['fob']); + + $template_name = 'pdf_invoice'; break; @@ -458,7 +397,21 @@ class DocumentsController extends AppController { break; case "orderAck": - $filename = $document['Job']['title']; + + $job = $this->Document->OrderAcknowledgement->Job->find('first', array('conditions'=>array('Job.id'=>$document['OrderAcknowledgement']['job_id']))); + + $filename = $job['Job']['title'].'_OrderAcknowledgement'; + $this->set('docTitle', $job['Job']['title']); + + $this->set('docTypeFullName', 'JOB'); //So it doesnt say CMC order Ack # in the pdf_shipping_billing_box. This string is too long + $this->set('job', $job); + $this->set('issue_date_string', date('d F Y', strtotime($document['OrderAcknowledgement']['issue_date']))); + + $this->set('ship_via', $document['OrderAcknowledgement']['ship_via']); + $this->set('fob', $document['OrderAcknowledgement']['fob']); + $this->set('estimated_delivery', $document['OrderAcknowledgement']['estimated_delivery']); + + $template_name = 'pdf_orderack'; break; } @@ -482,11 +435,11 @@ class DocumentsController extends AppController { $colWidths = array( - 'item' => '8%', - 'qty' => '8%', - 'desc' => '60%', - 'unit' => '12%', - 'total' => '12%' + 'item' => '7%', + 'qty' => '7%', + 'desc' => '56%', + 'unit' => '15%', + 'total' => '15%' ); diff --git a/controllers/invoices_controller.php b/controllers/invoices_controller.php index 307e071b..64a15db1 100755 --- a/controllers/invoices_controller.php +++ b/controllers/invoices_controller.php @@ -44,47 +44,9 @@ class InvoicesController extends AppController { - function add() { //No longer creating invoices directly. Done through the Documents Controller + - if (!empty($this->data)) { - $this->Invoice->create(); - - $invoice_number_offset = 4436; //What Invoice number we are up to. Starting at 4500 due to the data loss. - - $number_of_invoices = $this->Invoice->findCount(); - - $newInvoiceNumber = $invoice_number_offset + $number_of_invoices; - - $this->data['Invoice']['title'] = "CMCIN".$newInvoiceNumber; - - $enqid = $this->data['Invoice']['enquiry_id']; - - - if ($this->Invoice->save($this->data)) { - $this->Session->setFlash(__('The Invoice has been saved', true)); - $this->redirect(array('controller'=>'enquiries', 'action'=>'view/'.$enqid)); - } else { - $this->Session->setFlash(__('The Invoice could not be saved. Please, try again.', true)); - } - } - else { - if(isset($this->params['named']['enquiryid'])) { - $enquiryid = $this->params['named']['enquiryid']; - $enquiry = $this->Invoice->Enquiry->findById($enquiryid); - - $jobs = $this->Invoice->Job->find('list', array('conditions'=>array('Job.enquiry_id'=>$enquiryid))); - - $user = $this->Auth->user(); - $this->set(compact('enquiry', 'user','jobs')); - } - else { - $this->Session->setFlash(__('Invalid Enquiry ID', true)); - $this->redirect(array('action'=>'index')); - } - } - } - - /* function edit($id = null) { + /*function edit($id = null) { if (!$id && empty($this->data)) { $this->Session->setFlash(__('Invalid Invoice', true)); $this->redirect(array('action'=>'index')); diff --git a/models/address.php b/models/address.php index d0f698c7..342e85a4 100755 --- a/models/address.php +++ b/models/address.php @@ -1,73 +1,73 @@ array( - 'rule' => array('notEmpty'), - 'message' => 'Please Enter the Addess', - 'required' => true, - 'allowEmpty' => false - ), - - 'city' => array( - 'rule' => array('notEmpty'), - 'message' => 'Please Enter the City', - 'required' => true, - 'allowEmpty' => false - ), - 'state_id' => array( - 'rule' => array('notEmpty'), - 'message' => 'Please select the State', - 'required' => true, - 'allowEmpty' => false - ), - 'postcode' => array( - 'rule' => array('notEmpty'), - 'message' => 'Please enter the Post Code', - 'required' => true, - 'allowEmpty' => false - ), - 'country_id' => array( - 'rule' => array('notEmpty'), - 'message' => 'Please select the Country', - 'required' => true, - 'allowEmpty' => false - ), - 'type' => array( - 'rule' => array('notEmpty'), - 'message' => 'Please select the Type of Address', - 'required' => true, - 'allowEmpty' => false - ), - ); - - + var $validate = array( + 'address' => array( + 'rule' => array('notEmpty'), + 'message' => 'Please Enter the Addess', + 'required' => true, + 'allowEmpty' => false + ), - //The Associations below have been created with all possible keys, those that are not needed can be removed - var $belongsTo = array( - 'Customer' => array('className' => 'Customer', - 'foreignKey' => 'customer_id', - 'conditions' => '', - 'fields' => '', - 'order' => '' - ), - - 'State' => array('className' => 'State', - 'foreignKey' => 'state_id', - 'conditions' => '', - 'fields' => '', - 'order' => ''), - - 'Country' => array('className' => 'Country', - 'foreignKey' => 'country_id', - 'conditions' => '', - 'fields' => '', - 'order' => '' - - - )); + 'city' => array( + 'rule' => array('notEmpty'), + 'message' => 'Please Enter the City', + 'required' => true, + 'allowEmpty' => false + ), + 'state_id' => array( + 'rule' => array('notEmpty'), + 'message' => 'Please select the State', + 'required' => true, + 'allowEmpty' => false + ), + 'postcode' => array( + 'rule' => array('notEmpty'), + 'message' => 'Please enter the Post Code', + 'required' => true, + 'allowEmpty' => false + ), + 'country_id' => array( + 'rule' => array('notEmpty'), + 'message' => 'Please select the Country', + 'required' => true, + 'allowEmpty' => false + ), + 'type' => array( + 'rule' => array('notEmpty'), + 'message' => 'Please select the Type of Address', + 'required' => true, + 'allowEmpty' => false + ), + ); + + + + //The Associations below have been created with all possible keys, those that are not needed can be removed + var $belongsTo = array( + 'Customer' => array('className' => 'Customer', + 'foreignKey' => 'customer_id', + 'conditions' => '', + 'fields' => '', + 'order' => '' + ), + + 'State' => array('className' => 'State', + 'foreignKey' => 'state_id', + 'conditions' => '', + 'fields' => '', + 'order' => ''), + + 'Country' => array('className' => 'Country', + 'foreignKey' => 'country_id', + 'conditions' => '', + 'fields' => '', + 'order' => '' + + + )); } ?> diff --git a/models/document.php b/models/document.php index 6a2b11e7..81b31c16 100755 --- a/models/document.php +++ b/models/document.php @@ -53,6 +53,8 @@ class Document extends AppModel { ) ); + + //So much refactoring possible on this. function getCurrency($document) { if(!empty($document['Invoice']['id'])) { @@ -73,6 +75,11 @@ class Document extends AppModel { $conditions = $this->__getCurrencyConditions($currencyID); return $this->PurchaseOrder->Currency->find('first',$conditions); } + elseif(!empty($document['OrderAcknowledgement']['id'])) { + $currencyID = $document['OrderAcknowledgement']['currency_id']; + $conditions = $this->__getCurrencyConditions($currencyID); + return $this->OrderAcknowledgement->Currency->find('first',$conditions); + } } @@ -136,6 +143,10 @@ class Document extends AppModel { elseif(!empty($document['PurchaseOrder']['id'])) { return $this->PurchaseOrder->Enquiry->find('first',array('conditions'=>array('Enquiry.id'=>$document['Invoice']['enquiry_id']))); } + elseif(!empty($document['OrderAcknowledgement']['id'])) { + return $this->OrderAcknowledgement->Enquiry->find('first',array('conditions'=>array('Enquiry.id'=>$document['OrderAcknowledgement']['enquiry_id']))); + + } } /** * Does GST apply on this document. Based on the Enquiry GST TinyInt. diff --git a/models/enquiry.php b/models/enquiry.php index a9b99710..6ac82308 100755 --- a/models/enquiry.php +++ b/models/enquiry.php @@ -177,6 +177,10 @@ class Enquiry extends AppModel { 'Job' => array('className' => 'Job', 'foreignKey' =>'enquiry_id'), + 'OrderAcknowledgement' => array('className'=>'OrderAcknowledgement', 'foreignKey'=>'enquiry_id') + + + ); diff --git a/models/order_acknowledgement.php b/models/order_acknowledgement.php new file mode 100755 index 00000000..53705524 --- /dev/null +++ b/models/order_acknowledgement.php @@ -0,0 +1,33 @@ + array('numeric'), + 'revision' => array('alphanumeric'), + 'deliverytime' => array('alphanumeric'), + 'paymentterms' => array('alphanumeric'), + 'daysvalid' => array('numeric') + + );*/ + + //The Associations below have been created with all possible keys, those that are not needed can be removed + var $belongsTo = array( + 'Enquiry' => array('className' => 'Enquiry', + 'foreignKey' => 'enquiry_id', + 'conditions' => '', + 'fields' => '', + 'order' => '', + 'counterCache'=>true + ), + + 'Currency' => array('className' => 'Currency', 'foreignKey' => 'currency_id'), + + 'Document' => array('className'=>'Document', 'foreignKey'=>'document_id'), + + 'Job' => array('className'=>'Job', 'foreignKey'=>'job_id') + ); + + +} +?> \ No newline at end of file diff --git a/views/documents/pdf_invoice.ctp b/views/documents/pdf_invoice.ctp index f0bdecd0..0c536569 100644 --- a/views/documents/pdf_invoice.ctp +++ b/views/documents/pdf_invoice.ctp @@ -14,22 +14,23 @@ $pageTitle = "

TAX INVOICE

"; $pdfdoc->writeHTML($pageTitle, true, false, false, false, 'C'); $pdfdoc->SetTextColor(0); -$shippingBillingBox = $this->element('pdf_shipping_billing_box'); + +$pageNo = $pdfdoc->PageNoFormatted(); +$totalCount = $pdfdoc->getAliasNbPages(); + + +$shippingBillingBox = $this->element('pdf_shipping_billing_box', array('pageNo'=>$pageNo, 'totalCount'=>$totalCount)); $pdfdoc->writeHTML($shippingBillingBox, false); -$LineItemTable = $this->element('line_items_table'); +$LineItemTable = $this->element('line_items_table_with_shipping'); $pdfdoc->SetPrintHeader(true); $pdfdoc->pageContent($LineItemTable); + + $pdfdoc->lastPage(); -if($docType == 'quote') { - - $commercialComments = '
'.$document['Quote']['commercial_comments'].'
'; - $pdfdoc->pageContent($commercialComments); -} - $output_dir = '/Users/karlcordes/Sites/quotenik/app/webroot/pdf/'; @@ -69,5 +70,5 @@ $newpdf->Output($output_dir.$filename, "F"); - + \ No newline at end of file diff --git a/views/documents/pdf_order_ack.ctp b/views/documents/pdf_order_ack.ctp deleted file mode 100644 index e69de29b..00000000 diff --git a/views/documents/pdf_orderack.ctp b/views/documents/pdf_orderack.ctp new file mode 100644 index 00000000..e02b496b --- /dev/null +++ b/views/documents/pdf_orderack.ctp @@ -0,0 +1,75 @@ +SetPrintHeader(false); +$pdfdoc->SetPrintFooter(false); + + +$pdfdoc->AddPage(); +$pdfdoc->Page1Header(); + +$pageTitle = "

ORDER ACKNOWLEDGEMENT

"; +$pdfdoc->writeHTML($pageTitle, true, false, false, false, 'C'); + +$pdfdoc->SetTextColor(0); + +$pageNo = $pdfdoc->PageNoFormatted(); +$totalCount = $pdfdoc->getAliasNbPages(); + + +$shippingBillingBox = $this->element('pdf_shipping_billing_box', array('pageNo'=>$pageNo, 'totalCount'=>$totalCount)); + +$pdfdoc->writeHTML($shippingBillingBox, false); + +$LineItemTable = $this->element('line_items_table_with_shipping'); + +$pdfdoc->SetPrintHeader(true); + +$pdfdoc->pageContent($LineItemTable); + + +$pdfdoc->lastPage(); + + +$output_dir = '/Users/karlcordes/Sites/quotenik/app/webroot/pdf/'; + +$debuglevel = Configure::read('debug'); + +if($debuglevel == 0) { + $output_dir = '/var/www/cakephp/app/webroot/pdf/'; +} + + +$pdfdoc->Output($output_dir.$filename, 'F'); + +echo "
Wrote: ".$output_dir.$filename; + +App::import('Vendor', 'xfpdi'); + + +//$newpdf = new concat_pdf(); + +$newpdf = new XFPDI(); + +$newpdf->SetMargins(2, 2); +$newpdf->setPrintHeader(false); +$newpdf->setPrintFooter(false); + +$newpdf->setFiles(array($output_dir.$filename, $output_dir.'CMC_terms_and_conditions2006_A4.pdf')); +$newpdf->concat(); +$newpdf->Output($output_dir.$filename, "F"); +//$pdfdoc->Output($output_dir = '/Users/karlcordes/Sites/quotenik/app/webroot/pdf/'.'example_060.pdf', 'F'); + +//echo $html->link($filename, '/pdf/'.$filename); + +?> + + + + + + \ No newline at end of file diff --git a/views/documents/revise.ctp b/views/documents/revise.ctp new file mode 100644 index 00000000..b76726dd --- /dev/null +++ b/views/documents/revise.ctp @@ -0,0 +1,3 @@ + +
+ \ No newline at end of file diff --git a/views/elements/document_invoice_view.ctp b/views/elements/document_invoice_view.ctp index 280ee8c5..83bc6131 100644 --- a/views/elements/document_invoice_view.ctp +++ b/views/elements/document_invoice_view.ctp @@ -1,20 +1,28 @@

Invoice: for link($enquiry['Customer']['name'], '/customers/view/'.$enquiry['Customer']['id']);?>

Job: link($invoice['Job']['title'], array('controller'=>'jobs', 'action'=>'view', $invoice['Job']['id']));?>

-create('Document',array('type'=>'post','action'=>'edit', 'default'=>false)); -echo $form->input('Document.id'); -?> - -
- - - - link('Generate PDF of this Invoice', '/documents/pdf/'.$document['Document']['id']);?> -
+
+ + link('Generate PDF of this Invoice', '/documents/pdf/'.$document['Document']['id']);?> +
+
+
+ create('Document',array('type'=>'post','action'=>'edit', 'default'=>false)); + echo $form->input('Document.id'); + echo $form->input('Invoice.id'); + echo $form->input('Invoice.currency_id'); + echo $form->input('Invoice.issue_date'); + echo $form->input('Invoice.due_date'); + echo $form->input('Invoice.ship_via'); + echo $form->input('Invoice.fob'); + echo $form->input('Document.shipping_details', array('id'=>'shippingDetails')); + echo $form->end(array('label'=>'Save Invoice Details', 'id'=>'saveInvoiceButton')); + ?> +
+
+ diff --git a/views/elements/document_orderack_view.ctp b/views/elements/document_orderack_view.ctp new file mode 100644 index 00000000..60703851 --- /dev/null +++ b/views/elements/document_orderack_view.ctp @@ -0,0 +1,35 @@ +

Order Acknowledgement: link($job['Job']['title'], array('controller'=>'jobs', 'action'=>'view', $job['Job']['id']));?> for link($enquiry['Customer']['name'], '/customers/view/'.$enquiry['Customer']['id']);?>

+ +
+
+
+ link('Generate PDF of this Order Acknowledgement', '/documents/pdf/'.$document['Document']['id']);?> +
+
+
+ create('Document',array('type'=>'post','action'=>'edit', 'default'=>false)); + echo $form->input('Document.id'); + echo $form->input('OrderAcknowledgement.id'); + echo $form->input('OrderAcknowledgement.currency_id'); + echo $form->input('OrderAcknowledgement.issue_date'); + + echo $form->input('OrderAcknowledgement.ship_via'); + echo $form->input('OrderAcknowledgement.fob'); + echo $form->input('OrderAcknowledgement.estimated_delivery'); + echo $form->input('Document.shipping_details', array('id'=>'shippingDetails')); + echo $form->end(array('label'=>'Save OA Details', 'id'=>'saveOAButton')); + ?> +
+
+ + + + +data);?> + + + + + +
+ \ No newline at end of file diff --git a/views/elements/format_address.ctp b/views/elements/format_address.ctp new file mode 100644 index 00000000..68d1cea9 --- /dev/null +++ b/views/elements/format_address.ctp @@ -0,0 +1,14 @@ +
+
+
+ + + + + + + +
+ + \ No newline at end of file diff --git a/views/elements/line_items_table.ctp b/views/elements/line_items_table.ctp index d94b8afb..636649ae 100644 --- a/views/elements/line_items_table.ctp +++ b/views/elements/line_items_table.ctp @@ -1,6 +1,6 @@ - + diff --git a/views/elements/line_items_table_with_shipping.ctp b/views/elements/line_items_table_with_shipping.ctp new file mode 100644 index 00000000..23a2234a --- /dev/null +++ b/views/elements/line_items_table_with_shipping.ctp @@ -0,0 +1,101 @@ +
ITEM
NO.
QTY DESCRIPTION
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ITEM
NO.
QTYDESCRIPTIONUNIT
PRICE
TOTAL
PRICE
+ '; + $hasOptions = true; + } + ?> + + formatDecimal($li['quantity']);?>
+ + currency($li['gross_unit_price'], $currencyCode);?> + +
less
%
+ discount*
+ (-currency($li['discount_amount_unit'], $currencyCode);?>)
+ =
+ currency($li['net_unit_price'], $currencyCode);?> + +
+ currency($li['gross_price'], $currencyCode);?> + +
less
%
+ discount*
+ (currency($li['discount_amount_total'], $currencyCode);?>)
+ =
+ currency($li['net_price'], $currencyCode);?> + +
SHIPPING DETAILS: + + currency($totals['subtotal'], $currencyCode); + } + else { + echo $currencySymbol.'TBA'; + } + ?>
+ currency($totals['gst'], $currencyCode); + } + else { + echo $currencySymbol.'TBA'; + } + + ?> +

+ currency($totals['total'], $currencyCode); + } + else { + echo $currencySymbol.'TBA'; + } + ?>
diff --git a/views/elements/pdf_shipping_billing_box.ctp b/views/elements/pdf_shipping_billing_box.ctp index 964e9f84..4464a529 100644 --- a/views/elements/pdf_shipping_billing_box.ctp +++ b/views/elements/pdf_shipping_billing_box.ctp @@ -10,10 +10,14 @@ $col3width = '30%'; SHIP TO: - CMC INVOICE#: CMCIN4745
- Date:

- MAKE PAYMENT TO:
- Account Name: CMC Technologies Pty Ltd
+ CMC #:
+ Date:
+ + Estimated Delivery:
+ + Page: of

+ MAKE PAYMENT TO:
+ Account Name: CMC Technologies Pty Ltd
Bank Number BSB#: 062-458
Account Number: 10067982
SWIFT Code: CTBAAU2S @@ -22,16 +26,22 @@ $col3width = '30%'; -
-
- -
+
+ +
+
+ +
+ -
-
- -
+
+ +
+
+ +
+ @@ -39,7 +49,7 @@ $col3width = '30%'; - + @@ -49,9 +59,10 @@ $col3width = '30%'; - - + + -
CUSTOMER ORDER NOCUSTOMER ORDER NO CMC JOB # FOB SHIP VIA
???? element('abn', array('abn'=>$job['Customer']['abn']));?>
\ No newline at end of file + +
\ No newline at end of file diff --git a/views/elements/pdf_shipping_details.ctp b/views/elements/pdf_shipping_details.ctp new file mode 100644 index 00000000..11174164 --- /dev/null +++ b/views/elements/pdf_shipping_details.ctp @@ -0,0 +1,12 @@ + + + + + + + + + + + +
Shipping Details
\ No newline at end of file diff --git a/views/enquiries/view.ctp b/views/enquiries/view.ctp index 781917cc..76db5c82 100755 --- a/views/enquiries/view.ctp +++ b/views/enquiries/view.ctp @@ -153,7 +153,6 @@ - - -