From 3dbc124f6296fc82a0bd84773c807cc8832c5688 Mon Sep 17 00:00:00 2001 From: Steve Ireland Date: Thu, 22 Feb 2018 22:48:10 -0500 Subject: [PATCH 1/2] Various fixes for comments for quotes, work orders, and invoices --- application/controllers/Config.php | 1 + application/language/en-GB/config_lang.php | 3 +- application/language/en-US/config_lang.php | 1 + .../migrations/sqlscripts/3.1.1_to_3.2.0.sql | 8 +- application/views/configs/invoice_config.php | 15 +- application/views/sales/invoice.php | 2 +- application/views/sales/invoice_email.php | 60 +++---- application/views/sales/quote.php | 6 +- application/views/sales/quote_email.php | 151 +++++++++--------- application/views/sales/work_order.php | 7 + application/views/sales/work_order_email.php | 8 +- database/database.sql | 3 +- database/tables.sql | 4 +- 13 files changed, 147 insertions(+), 122 deletions(-) diff --git a/application/controllers/Config.php b/application/controllers/Config.php index 72d59d6b4..a5650a7aa 100644 --- a/application/controllers/Config.php +++ b/application/controllers/Config.php @@ -851,6 +851,7 @@ class Config extends Secure_Controller 'line_sequence' => $this->input->post('line_sequence'), 'last_used_invoice_number' =>$this->input->post('last_used_invoice_number'), 'last_used_quote_number' =>$this->input->post('last_used_quote_number'), + 'quote_default_comments' => $this->input->post('quote_default_comments'), 'work_order_enable' => $this->input->post('work_order_enable') != NULL, 'work_order_format' => $this->input->post('work_order_format'), 'last_used_work_order_number' =>$this->input->post('last_used_work_order_number') diff --git a/application/language/en-GB/config_lang.php b/application/language/en-GB/config_lang.php index 5d2b45696..c91bc2f09 100644 --- a/application/language/en-GB/config_lang.php +++ b/application/language/en-GB/config_lang.php @@ -1,4 +1,4 @@ - +
+ lang->line('config_quote_default_comments'), 'quote_default_comments', array('class' => 'control-label col-xs-2')); ?> +
+ 'quote_default_comments', + 'id' => 'quote_default_comments', + 'class' => 'form-control input-sm', + 'value' => $this->config->item('quote_default_comments')));?> +
+
+
lang->line('config_work_order_enable'), 'work_order_enable', array('class' => 'control-label col-xs-2')); ?>
@@ -158,7 +169,7 @@ $(document).ready(function() var enable_disable_invoice_enable = (function() { var invoice_enabled = $("#invoice_enable").is(":checked"); var work_order_enabled = $("#work_order_enable").is(":checked"); - $("#sales_invoice_format, #recv_invoice_format, #invoice_default_comments, #invoice_email_message, select[name='default_register_mode'], #sales_quote_format, select[name='line_sequence'], #last_used_invoice_number, #last_used_quote_number, #work_order_enable, #work_order_format, #last_used_work_order_number").prop("disabled", !invoice_enabled); + $("#sales_invoice_format, #recv_invoice_format, #invoice_default_comments, #invoice_email_message, select[name='default_register_mode'], #sales_quote_format, select[name='line_sequence'], #last_used_invoice_number, #last_used_quote_number, #quote_default_comments, #work_order_enable, #work_order_format, #last_used_work_order_number").prop("disabled", !invoice_enabled); if(invoice_enabled) { $("#work_order_format, #last_used_work_order_number").prop("disabled", !work_order_enabled); } else { @@ -187,7 +198,7 @@ $(document).ready(function() submitHandler: function(form) { $(form).ajaxSubmit({ beforeSerialize: function(arr, $form, options) { - $("#sales_invoice_format, #sales_quote_format, #recv_invoice_format, #invoice_default_comments, #invoice_email_message, #last_used_invoice_number, #last_used_quote_number, #work_order_enable, #work_order_format, #last_used_work_order_number").prop("disabled", false); + $("#sales_invoice_format, #sales_quote_format, #recv_invoice_format, #invoice_default_comments, #invoice_email_message, #last_used_invoice_number, #last_used_quote_number, #quote_default_comments, #work_order_enable, #work_order_format, #last_used_work_order_number").prop("disabled", false); return true; }, success: function(response) { diff --git a/application/views/sales/invoice.php b/application/views/sales/invoice.php index 0da338b17..29992012d 100755 --- a/application/views/sales/invoice.php +++ b/application/views/sales/invoice.php @@ -214,7 +214,7 @@ $(document).ready(function()
- +
config->item('return_policy')); ?> diff --git a/application/views/sales/invoice_email.php b/application/views/sales/invoice_email.php index 5d1615c3d..942937c00 100644 --- a/application/views/sales/invoice_email.php +++ b/application/views/sales/invoice_email.php @@ -22,8 +22,8 @@ - - +
-
+
-
config->item('company'); ?>
-
+
+
config->item('company'); ?>
+
- - - - - - - - - - +
lang->line('sales_invoice_number');?>
lang->line('common_date'); ?>
+ + + + + + + + + 0) - { - ?> - - - - - + + + + + + ?>
lang->line('sales_invoice_number');?>
lang->line('common_date'); ?>
lang->line('sales_amount_due'); ?>
lang->line('sales_amount_due'); ?>
-
@@ -125,10 +125,10 @@
-
-
config->item('payment_message')); ?>
-
lang->line('sales_comments'). ': ' . (empty($comments) ? $this->config->item('invoice_default_comments') : $comments); ?>
-
+
+ + +
config->item('return_policy')); ?>
diff --git a/application/views/sales/quote.php b/application/views/sales/quote.php index 3a84f3c6e..40f910ef3 100644 --- a/application/views/sales/quote.php +++ b/application/views/sales/quote.php @@ -189,9 +189,9 @@ if (isset($error_message))
- - -
+ + +
diff --git a/application/views/sales/quote_email.php b/application/views/sales/quote_email.php index c92a54002..1e67efb0d 100644 --- a/application/views/sales/quote_email.php +++ b/application/views/sales/quote_email.php @@ -1,8 +1,8 @@ - - + + @@ -18,90 +18,90 @@ ?>
- - - - + +
- - - - - - - +
lang->line('sales_item_number'); ?>lang->line('sales_item_name'); ?>lang->line('sales_quantity'); ?>lang->line('sales_price'); ?>lang->line('sales_discount'); ?>
+ + + + + + - - + + $item) { ?> - - - - - - + + + + + + - - + + - - - + + + - - - + + + - + $sales_tax) @@ -116,25 +116,26 @@ } ?> - - - - - -
lang->line('sales_item_number'); ?>lang->line('sales_item_name'); ?>lang->line('sales_quantity'); ?>lang->line('sales_price'); ?>lang->line('sales_discount'); ?> lang->line('sales_customer_discount');?>lang->line('sales_total'); ?>
lang->line('sales_total'); ?>
lang->line('sales_sub_total'); ?>
lang->line('sales_sub_total'); ?>
lang->line('sales_total'); ?>
+ + + lang->line('sales_total'); ?> + + + -
-
-
-
config->item('payment_message')); ?>
-
lang->line('sales_comments'). ': ' . (empty($comments) ? $this->config->item('invoice_default_comments') : $comments); ?>
-
+
+ + + + config->item('return_policy')); ?> -
-
+
+
-
-
+
+
diff --git a/application/views/sales/work_order.php b/application/views/sales/work_order.php index 6dc578a5c..c8c49668a 100644 --- a/application/views/sales/work_order.php +++ b/application/views/sales/work_order.php @@ -179,6 +179,13 @@ if (isset($error_message)) } ?> +
+
+
+ +
+
+