diff --git a/controllers/quotes_controller.php b/controllers/quotes_controller.php index 6aa48527..6ceb242f 100755 --- a/controllers/quotes_controller.php +++ b/controllers/quotes_controller.php @@ -21,7 +21,6 @@ class QuotesController extends AppController { $quote = $this->Quote->read(null, $id); $this->data = $quote; $this->set('quote', $quote); - } diff --git a/vendors/xtcpdf.php b/vendors/xtcpdf.php index 17cd85e1..e0ae24ab 100755 --- a/vendors/xtcpdf.php +++ b/vendors/xtcpdf.php @@ -78,9 +78,9 @@ class XTCPDF extends TCPDF { //$this->ln(); //$this->ln(); $this->SetFontSize(12); - $this->MultiCell(120, 2, "EXPLOSION PREVENTION AND PROTECTION", 0, 'L', null, 0, null, null, true, 0, true, false); + $this->MultiCell(120, 2, "EXPLOSION PREVENTION", 0, 'L', null, 0, null, null, true, 0, true, false); $this->MultiCell(0, 2, "PRESSURE RELIEF", 0, 'R', null, 1, null, null, true, 0, true, false); - // $this->ln(); + $this->MultiCell(120, 2, "EXPLOSION PROTECTION", 0, 'L', null, 0, null, null, true, 0, true, false); $this->MultiCell(0, 2, "VISION IN THE PROCESS", 0, 'R', null, 1, null, null, true, 0, true, false); // $this->ln(); $this->MultiCell(80, 2, "FLOW MEASUREMENT", 0, 'L', null, 0, null, null, true, 0, true, false); @@ -105,10 +105,6 @@ class XTCPDF extends TCPDF { $pageNo = $this->PageNoFormatted(); - - - - $this->SetXY($boxXstart, 55); $heightNeeded = $this->getNumLines($companyName, $secondColWidth); @@ -486,8 +482,6 @@ ENDHTMLCONTENTS; $this->MultiCell(0, 0, "Signed: ____________________________", 0, 'L'); $this->MultiCell(0, 0, " ".$details["salesEngineer"], 0, 'L'); - - } diff --git a/views/quotes/view.ctp b/views/quotes/view.ctp index df436df0..96a376ec 100755 --- a/views/quotes/view.ctp +++ b/views/quotes/view.ctp @@ -60,18 +60,109 @@ foreach ($quote['QuotePage'] as $quotePage):
| - | - | - | - | Unit Price () | + +|||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| + | + | + | + | Unit Price () | -() | +() | -- | + + + + $dontTotal = 0; //if we encounter an optional item. Make Subtotal, GST and total payable to be $TBA + + $subTotal = 0; + + foreach ($quoteProducts as $quoteProduct) { + $thisNetPrice = $quoteProduct['LineItem']['unit_price']*$quoteProduct['LineItem']['quantity']; + + $subTotal += $thisNetPrice; + + if($quoteProduct['LineItem']['option'] == 1) { + $dontTotal = 1; + } + + } + + ?> + | |||||
| + | + | + | SUB-TOTAL (Excluding GST) | ++ | + | + | |||||||
| + | + | + | GST (10%) | ++ | + | + | |||||||
| + | + | + | TOTAL PAYABLE | ++ | + | ++ | - | ||||||
| - | - | - | SUB-TOTAL (Excluding GST) | -- | - | - | |||||||
| - | - | - | GST (10%) | -- | - | - | |||||||
| - | - | - | TOTAL PAYABLE | -- | - | -- |