From c0462d016001242fcd87ba6266c3950d461c820c Mon Sep 17 00:00:00 2001 From: Karl Cordes Date: Wed, 10 Aug 2011 13:18:32 +1000 Subject: [PATCH] Fixed 0.00 displaying in PDF totals for quotes with options --- views/documents/view.ctp | 6 +++--- views/elements/document_quote_view.ctp | 1 - views/elements/line_items_table.ctp | 21 ++++++++------------- views/enquiries/view.ctp | 7 +------ webroot/css/quotenik.css | 8 ++++---- webroot/js/document_add_edit.js | 5 +---- 6 files changed, 17 insertions(+), 31 deletions(-) diff --git a/views/documents/view.ctp b/views/documents/view.ctp index 5852c625..1b7cdbce 100755 --- a/views/documents/view.ctp +++ b/views/documents/view.ctp @@ -19,10 +19,10 @@ switch($docType) { } ?> +
-
- +
@@ -44,7 +44,7 @@ switch($docType) {
- +
diff --git a/views/elements/document_quote_view.ctp b/views/elements/document_quote_view.ctp index 21d21a91..ad8a82ba 100644 --- a/views/elements/document_quote_view.ctp +++ b/views/elements/document_quote_view.ctp @@ -17,7 +17,6 @@ echo $form->input('Document.id');
- link('Generate PDF of this Quote', '/documents/pdf/'.$document['Document']['id']);?>
diff --git a/views/elements/line_items_table.ctp b/views/elements/line_items_table.ctp index 3e39d849..c342cf7a 100644 --- a/views/elements/line_items_table.ctp +++ b/views/elements/line_items_table.ctp @@ -22,9 +22,8 @@ '; $hasOptions = true; - } ?> @@ -67,7 +66,7 @@ echo $number->currency($totals['subtotal'], $currencyCode); } else { - echo $number->currency('TBA', $currencyCode); + echo $currencySymbol.'TBA'; } ?> @@ -76,19 +75,15 @@ - " align="center"> + currency($totals['gst'], $currencyCode); - } - else { - echo 'N/A'; - } + echo $number->currency($totals['gst'], $currencyCode); } else { - echo $number->currency('TBA', $currencyCode); + echo $currencySymbol.'TBA'; } + ?> @@ -103,7 +98,7 @@ echo $number->currency($totals['total'], $currencyCode); } else { - echo $number->currency('TBA', $currencyCode); + echo $currencySymbol.'TBA'; } ?> diff --git a/views/enquiries/view.ctp b/views/enquiries/view.ctp index d04efb2e..b4ac0340 100755 --- a/views/enquiries/view.ctp +++ b/views/enquiries/view.ctp @@ -14,7 +14,7 @@ link($enquiry['Principle']['name'], array('controller'=> 'principles', 'action'=>'view', $enquiry['Principle']['id'])); ?>   - > - > - link($enquiry['Status']['name'], array('controller'=> 'statuses', 'action'=>'view', $enquiry['Status']['id'])); ?> -   - > > diff --git a/webroot/css/quotenik.css b/webroot/css/quotenik.css index 7ff24574..a24a9562 100755 --- a/webroot/css/quotenik.css +++ b/webroot/css/quotenik.css @@ -1611,10 +1611,10 @@ table.lineItems tr td.price { div.pdfGeneratedMessage { - margin-top: 2em; - margin-bottom: 2em; - padding: 1em; + margin-top: 1em; + margin-bottom: 1em; + padding: 0.5em; border: 2px dashed; width: 50%; - font-size: 140%; + font-size: 120%; } \ No newline at end of file diff --git a/webroot/js/document_add_edit.js b/webroot/js/document_add_edit.js index dd40c046..a00abc02 100644 --- a/webroot/js/document_add_edit.js +++ b/webroot/js/document_add_edit.js @@ -39,8 +39,6 @@ $(function() { if(data == 'SUCCESS') { loadLineItems(); $( "#addLineItemModal" ).dialog('close'); - - } else { alert("Line Item could not be saved") @@ -56,7 +54,6 @@ $(function() { }, close: function() { loadLineItems(); - } }); @@ -143,7 +140,7 @@ $(function() { //Open the LineItem dialog - $("#addLineItem").button().click(function() { + $(".addLineItem").button().click(function() {