diff --git a/controllers/documents_controller.php b/controllers/documents_controller.php
index 3183ab18..82616e40 100755
--- a/controllers/documents_controller.php
+++ b/controllers/documents_controller.php
@@ -202,7 +202,7 @@ class DocumentsController extends AppController {
$this->set('docTypeFullName',strtoupper($docTypeFullName));
$this->set('currency',$currency);
$this->set('currencyCode', $currency['Currency']['iso4217']);
-
+ $this->set('currencySymbol', $currency['Currency']['symbol']);
$gst = $enquiry['Enquiry']['gst'];
diff --git a/views/elements/line_items_table.ctp b/views/elements/line_items_table.ctp
index be985ef7..4fb59e6b 100644
--- a/views/elements/line_items_table.ctp
+++ b/views/elements/line_items_table.ctp
@@ -16,11 +16,15 @@
-
+
+ $hasOptions = false;
+ foreach($document['LineItem'] as $li):?>
|
if($li['option'] == 1) {
echo 'Option';
+ $hasOptions = true;
+
}
?>
=$li['item_number'];?>
@@ -57,7 +61,15 @@
| |
=$totalsDescText['subtotal']?> |
|
- =$number->currency($totals['subtotal'], $currencyCode);?> |
+
+
+ if(!$hasOptions) {
+ echo $number->currency($totals['subtotal'], $currencyCode);
+ }
+ else {
+ echo $currencySymbol.'TBA';
+ }
+ ?> |
|
@@ -65,12 +77,19 @@
=$totalsDescText['gst'];?> |
|
- if($gst ==1) {
- echo $number->currency($totals['gst'], $currencyCode);
+
+ if(!$hasOptions) {
+ if($gst ==1) {
+ echo $number->currency($totals['gst'], $currencyCode);
+ }
+ else {
+ echo 'N/A';
+ }
}
else {
- echo 'N/A';
- }?>
+ echo $currencySymbol.'TBA';
+ }
+ ?>
|
@@ -78,7 +97,15 @@
|
=$totalsDescText['total'];?> |
=$currencyCode?> |
- =$number->currency($totals['total'], $currencyCode);?> |
+
+
+ if(!$hasOptions) {
+ echo $number->currency($totals['total'], $currencyCode);
+ }
+ else {
+ echo $currencySymbol.'TBA';
+ }
+ ?> |
-
+
diff --git a/views/line_items/get_table.ctp b/views/line_items/get_table.ctp
index d7c4c574..e43722ba 100644
--- a/views/line_items/get_table.ctp
+++ b/views/line_items/get_table.ctp
@@ -27,11 +27,16 @@
-
+
+ $hasOptions = false;
+
+ foreach($document['LineItem'] as $li):?>
if($li['option'] == 1) {
echo 'Option ';
+
+ $hasOptions = true;
}
?>
=$li['item_number'];?> |
@@ -57,7 +62,7 @@
discount
=$number->currency($li['discount_amount_total'], $currencyCode);?>)
=
- =$number->currency($li['net_price'], $currencyCode);?>
+ =$number->currency($li['net_price'], $currencyCode);?>
@@ -73,7 +78,16 @@
| |
SUB-TOTAL (Excluding GST) |
|
- =$number->currency($totals['subtotal'], $currencyCode);?> |
+
+ if(!$hasOptions) {
+ echo $number->currency($totals['subtotal'], $currencyCode);
+ }
+ else {
+ echo $currencySymbol.'TBA';
+ }
+ ?>
+ |
+
|
@@ -81,7 +95,16 @@
|
GST (10%) |
|
- =$number->currency($totals['gst'], $currencyCode);?> |
+
+
+ if(!$hasOptions) {
+ echo $number->currency($totals['gst'], $currencyCode);
+ }
+ else {
+ echo $currencySymbol.'TBA';
+ }
+ ?>
+ |
|
@@ -89,7 +112,14 @@
|
TOTAL PAYABLE (INCLUDING GST) |
|
- =$number->currency($totals['total'], $currencyCode);?> |
+
+ if(!$hasOptions) {
+ echo $number->currency($totals['total'], $currencyCode);
+ }
+ else {
+ echo $currencySymbol.'TBA';
+ }
+ ?> |
|