From 81d76b0c03b6554da599d8741337fe42f0c71281 Mon Sep 17 00:00:00 2001 From: Steve Ireland Date: Thu, 15 Feb 2018 20:42:01 -0500 Subject: [PATCH 1/2] Expand comments for quotes and invoices add notice when customer is required. --- application/controllers/Sales.php | 23 +++++++++++++++++++++++ application/language/en-GB/sales_lang.php | 4 +++- application/language/en-US/sales_lang.php | 4 +++- application/views/sales/invoice.php | 3 ++- application/views/sales/quote.php | 3 ++- application/views/sales/register.php | 2 +- 6 files changed, 34 insertions(+), 5 deletions(-) diff --git a/application/controllers/Sales.php b/application/controllers/Sales.php index 4df21f37e..2b24b46ae 100644 --- a/application/controllers/Sales.php +++ b/application/controllers/Sales.php @@ -951,14 +951,27 @@ class Sales extends Secure_Controller if($this->sale_lib->get_mode() == 'sale_invoice') { $data['mode_label'] = $this->lang->line('sales_invoice'); + $data['customer_required'] = $this->lang->line('sales_customer_required'); } elseif($this->sale_lib->get_mode() == 'sale_quote') { $data['mode_label'] = $this->lang->line('sales_quote'); + $data['customer_required'] = $this->lang->line('sales_customer_required'); } elseif($this->sale_lib->get_mode() == 'sale_work_order') { $data['mode_label'] = $this->lang->line('sales_work_order'); + $data['customer_required'] = $this->lang->line('sales_customer_required'); + } + elseif($this->sale_lib->get_mode() == 'return') + { + $data['mode_label'] = $this->lang->line('return'); + $data['customer_required'] = $this->lang->line('sales_customer_optional'); + } + else + { + $data['mode_label'] = $this->lang->line('sales_receipt'); + $data['customer_required'] = $this->lang->line('sales_customer_optional'); } return $this->xss_clean($data); @@ -1047,19 +1060,29 @@ class Sales extends Secure_Controller if($this->sale_lib->get_mode() == 'sale_invoice') { $data['mode_label'] = $this->lang->line('sales_invoice'); + $data['customer_required'] = $this->lang->line('sales_customer_required'); } elseif($this->sale_lib->get_mode() == 'sale_quote') { $data['mode_label'] = $this->lang->line('sales_quote'); + $data['customer_required'] = $this->lang->line('sales_customer_required'); } elseif($this->sale_lib->get_mode() == 'sale_work_order') { $data['mode_label'] = $this->lang->line('sales_work_order'); + $data['customer_required'] = $this->lang->line('sales_customer_required'); } + elseif($this->sale_lib->get_mode() == 'return') + { + $data['mode_label'] = $this->lang->line('return'); + $data['customer_required'] = $this->lang->line('sales_customer_optional'); + } else { $data['mode_label'] = $this->lang->line('sales_receipt'); + $data['customer_required'] = $this->lang->line('sales_customer_optional'); } + $data = $this->xss_clean($data); $this->load->view("sales/register", $data); diff --git a/application/language/en-GB/sales_lang.php b/application/language/en-GB/sales_lang.php index 31bfb113c..cb86900ff 100644 --- a/application/language/en-GB/sales_lang.php +++ b/application/language/en-GB/sales_lang.php @@ -28,6 +28,8 @@ $lang["sales_customer_discount"] = "Discount"; $lang["sales_customer_email"] = "Email"; $lang["sales_customer_location"] = "Location"; $lang["sales_customer_mailchimp_status"] = "Mailchimp status"; +$lang["sales_customer_optional"] = "(Optional)"; +$lang["sales_customer_required"] = "(Required)"; $lang["sales_customer_total"] = "Total"; $lang["sales_date"] = "Sale Date"; $lang["sales_date_range"] = "Date Range"; @@ -119,7 +121,7 @@ $lang["sales_sale_by_invoice"] = "Sale by Invoice"; $lang["sales_sale_for_customer"] = "Customer:"; $lang["sales_sale_time"] = "Time"; $lang["sales_sales_tax"] = "Sales Tax"; -$lang["sales_select_customer"] = "Select Customer (Optional)"; +$lang["sales_select_customer"] = "Select Customer"; $lang["sales_send_invoice"] = "Send Invoice"; $lang["sales_send_quote"] = "Send Quote"; $lang["sales_send_receipt"] = "Send Receipt"; diff --git a/application/language/en-US/sales_lang.php b/application/language/en-US/sales_lang.php index eb2faafbc..7030eb1db 100644 --- a/application/language/en-US/sales_lang.php +++ b/application/language/en-US/sales_lang.php @@ -28,6 +28,8 @@ $lang["sales_customer_discount"] = "Discount"; $lang["sales_customer_email"] = "Email"; $lang["sales_customer_location"] = "Location"; $lang["sales_customer_mailchimp_status"] = "Mailchimp status"; +$lang["sales_customer_optional"] = "(Optional)"; +$lang["sales_customer_required"] = "(Required)"; $lang["sales_customer_total"] = "Total"; $lang["sales_date"] = "Sale Date"; $lang["sales_date_range"] = "Date Range"; @@ -119,7 +121,7 @@ $lang["sales_sale_by_invoice"] = "Sale by Invoice"; $lang["sales_sale_for_customer"] = "Customer:"; $lang["sales_sale_time"] = "Time"; $lang["sales_sales_tax"] = "Sales Tax"; -$lang["sales_select_customer"] = "Select Customer (Optional)"; +$lang["sales_select_customer"] = "Select Customer"; $lang["sales_send_invoice"] = "Send Invoice"; $lang["sales_send_quote"] = "Send Quote"; $lang["sales_send_receipt"] = "Send Receipt"; diff --git a/application/views/sales/invoice.php b/application/views/sales/invoice.php index 978d60f42..862a775df 100755 --- a/application/views/sales/invoice.php +++ b/application/views/sales/invoice.php @@ -209,7 +209,8 @@ $(document).ready(function()
- + +
config->item('return_policy')); ?>
diff --git a/application/views/sales/quote.php b/application/views/sales/quote.php index b83da481b..a2b9af33e 100644 --- a/application/views/sales/quote.php +++ b/application/views/sales/quote.php @@ -181,7 +181,8 @@ if (isset($error_message))
- + +
diff --git a/application/views/sales/register.php b/application/views/sales/register.php index e3b2c15b7..eff7d1876 100644 --- a/application/views/sales/register.php +++ b/application/views/sales/register.php @@ -344,7 +344,7 @@ if(isset($success)) ?> 'select_customer_form', 'class'=>'form-horizontal')); ?>
- + 'customer', 'id'=>'customer', 'class'=>'form-control input-sm', 'value'=>$this->lang->line('sales_start_typing_customer_name')));?>