From 34d09bc575a870d5b327ee7e7ba4e20dfd2b577e Mon Sep 17 00:00:00 2001 From: FrancescoUK Date: Sun, 24 Apr 2016 17:11:37 +0100 Subject: [PATCH] Made invoice optional from store config checkbox, updated and regen database script, few config fixes (#410) --- application/controllers/Config.php | 10 ++-- application/controllers/Reports.php | 42 +++++++++++++-- application/controllers/Sales.php | 20 +++++-- application/helpers/table_helper.php | 48 ++++++++++++----- .../models/reports/Detailed_receivings.php | 16 ++++-- application/views/configs/invoice_config.php | 12 +++-- application/views/configs/receipt_config.php | 15 +++--- application/views/receivings/form.php | 53 +++++++++++++------ application/views/receivings/receiving.php | 53 +++++++++++-------- application/views/sales/form.php | 29 ++++++---- application/views/sales/register.php | 41 ++++++++------ database/2.4_to_3.0.sql | 3 +- database/database.sql | 9 ++-- database/migrate_phppos_dist.sql | 9 ++-- database/tables.sql | 9 ++-- 15 files changed, 247 insertions(+), 122 deletions(-) diff --git a/application/controllers/Config.php b/application/controllers/Config.php index 9a395e9ae..f874233ed 100644 --- a/application/controllers/Config.php +++ b/application/controllers/Config.php @@ -23,7 +23,7 @@ class Config extends Secure_area $upload_success = $this->_handle_logo_upload(); $upload_data = $this->upload->data(); - $batch_save_data=array( + $batch_save_data = array( 'company'=>$this->input->post('company'), 'address'=>$this->input->post('address'), 'phone'=>$this->input->post('phone'), @@ -48,7 +48,7 @@ class Config extends Secure_area function save_general() { - $batch_save_data=array( + $batch_save_data = array( 'default_tax_1_rate'=>$this->input->post('default_tax_1_rate'), 'default_tax_1_name'=>$this->input->post('default_tax_1_name'), 'default_tax_2_rate'=>$this->input->post('default_tax_2_rate'), @@ -148,7 +148,7 @@ class Config extends Secure_area function save_barcode() { - $batch_save_data=array( + $batch_save_data = array( 'barcode_type'=>$this->input->post('barcode_type'), 'barcode_quality'=>$this->input->post('barcode_quality'), 'barcode_width'=>$this->input->post('barcode_width'), @@ -197,8 +197,8 @@ class Config extends Secure_area { $batch_save_data = array ( 'invoice_enable'=>$this->input->post('invoice_enable') != null, - 'recv_invoice_format'=>$this->input->post('recv_invoice_format'), 'sales_invoice_format'=>$this->input->post('sales_invoice_format'), + 'recv_invoice_format'=>$this->input->post('recv_invoice_format'), 'use_invoice_template'=>$this->input->post('use_invoice_template') != null, 'invoice_default_comments'=>$this->input->post('invoice_default_comments'), 'invoice_email_message'=>$this->input->post('invoice_email_message') @@ -236,7 +236,7 @@ class Config extends Secure_area function backup_db() { - $employee_id=$this->Employee->get_logged_in_employee_info()->person_id; + $employee_id = $this->Employee->get_logged_in_employee_info()->person_id; if($this->Employee->has_module_grant('config',$employee_id)) { $this->load->dbutil(); diff --git a/application/controllers/Reports.php b/application/controllers/Reports.php index cf50a0ace..2ddf362fd 100644 --- a/application/controllers/Reports.php +++ b/application/controllers/Reports.php @@ -76,9 +76,15 @@ class Reports extends Secure_area $report_data['employee_name'], $report_data['supplier_name'], to_currency($report_data['total']), - $report_data['payment_type'], - $report_data['invoice_number'], - $report_data['comment']); + $report_data['payment_type'] + ); + + if($this->config->item('invoice_enable') == TRUE) + { + $summary_data[] = $report_data['invoice_number']; + } + + $summary_data[] = $report_data['comment']; echo get_detailed_data_row($summary_data, $this); } @@ -949,7 +955,35 @@ class Reports extends Secure_area foreach($report_data['summary'] as $key=>$row) { - $summary_data[] = array(anchor('receivings/edit/'.$row['receiving_id'], 'RECV '.$row['receiving_id'], array('class'=>'modal-dlg modal-btn-delete modal-btn-submit')), $row['receiving_date'], to_quantity_decimals($row['items_purchased']), $row['employee_name'], $row['supplier_name'], to_currency($row['total']), $row['payment_type'], $row['invoice_number'], $row['comment']); + if($this->config->item('invoice_enable') == TRUE) + { + $summary_data[] = array( + anchor('receivings/edit/'.$row['receiving_id'], + 'RECV '.$row['receiving_id'], + array('class'=>'modal-dlg modal-btn-delete modal-btn-submit')), + $row['receiving_date'], + to_quantity_decimals($row['items_purchased']), + $row['employee_name'], $row['supplier_name'], + to_currency($row['total']), + $row['payment_type'], + $row['invoice_number'], + $row['comment'] + ); + } + else + { + $summary_data[] = array( + anchor('receivings/edit/'.$row['receiving_id'], + 'RECV '.$row['receiving_id'], + array('class'=>'modal-dlg modal-btn-delete modal-btn-submit')), + $row['receiving_date'], + to_quantity_decimals($row['items_purchased']), + $row['employee_name'], $row['supplier_name'], + to_currency($row['total']), + $row['payment_type'], + $row['comment'] + ); + } foreach($report_data['details'][$key] as $drow) { diff --git a/application/controllers/Sales.php b/application/controllers/Sales.php index 723f08bc8..ee9929497 100644 --- a/application/controllers/Sales.php +++ b/application/controllers/Sales.php @@ -56,8 +56,15 @@ class Sales extends Secure_area $total_rows = $this->Sale->get_found_rows($search, $filters); // filters that will be loaded in the multiselect dropdown - $data['filters'] = array('only_cash' => $this->lang->line('sales_cash_filter'), - 'only_invoices' => $this->lang->line('sales_invoice_filter')); + if($this->config->item('invoice_enable') == TRUE) + { + $data['filters'] = array('only_cash' => $this->lang->line('sales_cash_filter'), + 'only_invoices' => $this->lang->line('sales_invoice_filter')); + } + else + { + $data['filters'] = array('only_cash' => $this->lang->line('sales_cash_filter')); + } $data['selected'] = array( ($only_cash ? 'only_cash' : ''), ($only_invoices ? 'only_invoices' : '') ); $data['start_date'] = $start_date; @@ -103,7 +110,14 @@ class Sales extends Secure_area $sale_type = 'all'; $location_id = 'all'; - $only_invoices = $this->input->post('only_invoices') != null; + if($this->config->item('invoice_enable') == TRUE) + { + $only_invoices = $this->input->post('only_invoices') != null; + } + else + { + $only_invoices = FALSE; + } $only_cash = $this->input->post('only_cash') != null; $filters = array('sale_type' => $sale_type, diff --git a/application/helpers/table_helper.php b/application/helpers/table_helper.php index 5f74365ca..8511d4b58 100644 --- a/application/helpers/table_helper.php +++ b/application/helpers/table_helper.php @@ -6,17 +6,26 @@ function get_sales_manage_table($sales, $controller) $table=''; $headers = array(' ', - $CI->lang->line('sales_receipt_number'), - $CI->lang->line('sales_sale_time'), - $CI->lang->line('customers_customer'), - $CI->lang->line('sales_amount_tendered'), - $CI->lang->line('sales_amount_due'), - $CI->lang->line('sales_change_due'), - $CI->lang->line('sales_payment'), - $CI->lang->line('sales_invoice_number'), - ' ', - ' ', - ' '); + $CI->lang->line('sales_receipt_number'), + $CI->lang->line('sales_sale_time'), + $CI->lang->line('customers_customer'), + $CI->lang->line('sales_amount_tendered'), + $CI->lang->line('sales_amount_due'), + $CI->lang->line('sales_change_due'), + $CI->lang->line('sales_payment')); + + if($CI->config->item('invoice_enable') == TRUE) + { + $headers[] = $CI->lang->line('sales_invoice_number'); + $headers[] = ' '; + $headers[] = ' '; + $headers[] = ' '; + } + else + { + $headers[] = ' '; + $headers[] = ' '; + } $table.=''; foreach($headers as $header) @@ -75,11 +84,22 @@ function get_sales_manage_sale_data_row($sale, $controller) $table_data_row.=''; $table_data_row.=''; $table_data_row.=''; - $table_data_row.=''; - $table_data_row.=''; + if($CI->config->item('invoice_enable') == TRUE) + { + $table_data_row.=''; + $table_data_row.=''; + } + else + { + // this size includes the 8% of invoice number and 5% of the invoice gliphicon, pluf of course the 12% for the field itself + $table_data_row.=''; + } $table_data_row.=''; $table_data_row.=''; - $table_data_row.=''; + if($CI->config->item('invoice_enable') == TRUE) + { + $table_data_row.=''; + } $table_data_row.=''; return $table_data_row; diff --git a/application/models/reports/Detailed_receivings.php b/application/models/reports/Detailed_receivings.php index 771f87ac5..20e35085b 100644 --- a/application/models/reports/Detailed_receivings.php +++ b/application/models/reports/Detailed_receivings.php @@ -9,9 +9,18 @@ class Detailed_receivings extends Report public function getDataColumns() { - return array('summary' => array($this->lang->line('reports_receiving_id'), $this->lang->line('reports_date'), $this->lang->line('reports_quantity'), $this->lang->line('reports_received_by'), $this->lang->line('reports_supplied_by'), $this->lang->line('reports_total'), $this->lang->line('reports_payment_type'), $this->lang->line('recvs_invoice_number'), $this->lang->line('reports_comments')), - 'details' => array($this->lang->line('reports_item_number'), $this->lang->line('reports_name'), $this->lang->line('reports_category'), $this->lang->line('reports_quantity'), $this->lang->line('reports_total'), $this->lang->line('reports_discount')) - ); + if(get_instance()->config->item('invoice_enable') == TRUE) + { + return array('summary' => array($this->lang->line('reports_receiving_id'), $this->lang->line('reports_date'), $this->lang->line('reports_quantity'), $this->lang->line('reports_received_by'), $this->lang->line('reports_supplied_by'), $this->lang->line('reports_total'), $this->lang->line('reports_payment_type'), $this->lang->line('recvs_invoice_number'), $this->lang->line('reports_comments')), + 'details' => array($this->lang->line('reports_item_number'), $this->lang->line('reports_name'), $this->lang->line('reports_category'), $this->lang->line('reports_quantity'), $this->lang->line('reports_total'), $this->lang->line('reports_discount')) + ); + } + else + { + return array('summary' => array($this->lang->line('reports_receiving_id'), $this->lang->line('reports_date'), $this->lang->line('reports_quantity'), $this->lang->line('reports_received_by'), $this->lang->line('reports_supplied_by'), $this->lang->line('reports_total'), $this->lang->line('reports_payment_type'), $this->lang->line('reports_comments')), + 'details' => array($this->lang->line('reports_item_number'), $this->lang->line('reports_name'), $this->lang->line('reports_category'), $this->lang->line('reports_quantity'), $this->lang->line('reports_total'), $this->lang->line('reports_discount')) + ); + } } public function getDataByReceivingId($receiving_id) @@ -90,6 +99,7 @@ class Detailed_receivings extends Report { $this->db->where('quantity_purchased = 0'); } + return $this->db->get()->row_array(); } } diff --git a/application/views/configs/invoice_config.php b/application/views/configs/invoice_config.php index c642e8270..fe3cc2634 100644 --- a/application/views/configs/invoice_config.php +++ b/application/views/configs/invoice_config.php @@ -83,16 +83,14 @@ //validation and submit handling $(document).ready(function() { - var enable_disable_invoice_enable = (function() - { + var enable_disable_invoice_enable = (function() { var invoice_enable = $("#invoice_enable").is(":checked"); $("#sales_invoice_format, #recv_invoice_format, #use_invoice_template").prop('disabled', !invoice_enable); return arguments.callee; })(); $("#invoice_enable").change(enable_disable_invoice_enable); - var enable_disable_use_invoice_template = (function() - { + var enable_disable_use_invoice_template = (function() { var use_invoice_template = $("#use_invoice_template").is(":checked"); $("#invoice_default_comments, #invoice_email_message").prop('disabled', !use_invoice_template); return arguments.callee; @@ -102,6 +100,11 @@ $(document).ready(function() $('#invoice_config_form').validate({ submitHandler: function(form) { $(form).ajaxSubmit({ + beforeSerialize: function(arr, $form, options) { + //$("input:disabled, textarea:disabled").prop("disabled", false); + $("#sales_invoice_format, #recv_invoice_format, #use_invoice_template, #invoice_default_comments, #invoice_email_message").prop("disabled", false); + return true; + }, success: function(response) { if(response.success) { @@ -112,6 +115,7 @@ $(document).ready(function() set_feedback(response.message, 'alert alert-dismissible alert-danger', true); } // set back disabled state + enable_disable_invoice_enable(); enable_disable_use_invoice_template(); }, dataType:'json' diff --git a/application/views/configs/receipt_config.php b/application/views/configs/receipt_config.php index 28b19c9c4..8d8521882 100644 --- a/application/views/configs/receipt_config.php +++ b/application/views/configs/receipt_config.php @@ -215,9 +215,7 @@ $(document).ready(function() submitHandler: function(form) { $(form).ajaxSubmit({ beforeSerialize: function(arr, $form, options) { - dialog_confirmed = dialog_confirmed || confirm('lang->line('config_jsprintsetup_required'); ?>'); - $("input:disabled, textarea:disabled").prop("disabled", false); - return dialog_confirmed; + return ( dialog_confirmed || confirm('lang->line('config_jsprintsetup_required'); ?>') ); }, success: function(response) { if(response.success) @@ -228,8 +226,6 @@ $(document).ready(function() { set_feedback(response.message, 'alert alert-dismissible alert-danger', true); } - // set back disabled state - enable_disable_use_invoice_template(); }, dataType:'json' }); @@ -238,6 +234,7 @@ $(document).ready(function() errorClass: "has-error", errorLabelContainer: "#receipt_error_message_box", wrapper: "li", + highlight: function (e) { $(e).closest('.form-group').addClass('has-error'); }, @@ -274,22 +271,22 @@ $(document).ready(function() print_top_margin: { required:"lang->line('config_print_top_margin_required'); ?>", - number:"lang->line('config_print_top_margin_number'); ?>", + number:"lang->line('config_print_top_margin_number'); ?>" }, print_left_margin: { required:"lang->line('config_print_left_margin_required'); ?>", - number:"lang->line('config_print_left_margin_number'); ?>", + number:"lang->line('config_print_left_margin_number'); ?>" }, print_bottom_margin: { required:"lang->line('config_print_bottom_margin_required'); ?>", - number:"lang->line('config_print_bottom_margin_number'); ?>", + number:"lang->line('config_print_bottom_margin_number'); ?>" }, print_right_margin: { required:"lang->line('config_print_right_margin_required'); ?>", - number:"lang->line('config_print_right_margin_number'); ?>", + number:"lang->line('config_print_right_margin_number'); ?>" } } }); diff --git a/application/views/receivings/form.php b/application/views/receivings/form.php index 9e0c5fb4e..c191076f5 100755 --- a/application/views/receivings/form.php +++ b/application/views/receivings/form.php @@ -23,13 +23,20 @@ - -
- lang->line('recvs_invoice_number'), 'invoice_number', array('class'=>'control-label col-xs-3')); ?> -
- 'invoice_number', 'value' => $receiving_info['invoice_number'], 'id' => 'invoice_number', 'class'=>'form-control input-sm'));?> + + config->item('invoice_enable') == TRUE) + { + ?> +
+ lang->line('recvs_invoice_number'), 'invoice_number', array('class'=>'control-label col-xs-3')); ?> +
+ 'invoice_number', 'value' => $receiving_info['invoice_number'], 'id' => 'invoice_number', 'class'=>'form-control input-sm'));?> +
-
+
lang->line('recvs_employee'), 'employee', array('class'=>'control-label col-xs-3')); ?> @@ -125,26 +132,40 @@ $(document).ready(function() }, rules: { - invoice_number: { + config->item('invoice_enable') == TRUE) + { + ?> + invoice_number: { - remote: - { - url: "", - type: "POST", - data: + remote: { - "receiving_id" : , - "invoice_number" : function() + url: "", + type: "POST", + data: { - return $("#invoice_number").val(); + "receiving_id" : , + "invoice_number" : function() + { + return $("#invoice_number").val(); + } } } } + }, messages: { - invoice_number: 'lang->line("recvs_invoice_number_duplicate"); ?>' + config->item('invoice_enable') == TRUE) + { + ?> + invoice_number: 'lang->line("recvs_invoice_number_duplicate"); ?>' + } }, dialog_support.error)); diff --git a/application/views/receivings/receiving.php b/application/views/receivings/receiving.php index f7b517ee2..1c0db1618 100644 --- a/application/views/receivings/receiving.php +++ b/application/views/receivings/receiving.php @@ -119,7 +119,7 @@ if (isset($error))
@@ -301,7 +301,7 @@ if (isset($error)) config->item('invoice_enable') == TRUE) { ?> @@ -376,31 +376,38 @@ $(document).ready(function() $.post('', {comment: $('#comment').val()}); }); - $('#recv_invoice_number').keyup(function() + config->item('invoice_enable') == TRUE) { - $.post('', {recv_invoice_number: $('#recv_invoice_number').val()}); - }); + ?> + $('#recv_invoice_number').keyup(function() + { + $.post('', {recv_invoice_number: $('#recv_invoice_number').val()}); + }); - $("#recv_print_after_sale").change(function() - { - $.post('', {recv_print_after_sale: $(this).is(":checked")}); - }); + $("#recv_print_after_sale").change(function() + { + $.post('', {recv_print_after_sale: $(this).is(":checked")}); + }); - var enable_invoice_number = function() - { - var enabled = $("#recv_invoice_enable").is(":checked"); - $("#recv_invoice_number").prop("disabled", !enabled).parents('tr').show(); - return enabled; + var enable_invoice_number = function() + { + var enabled = $("#recv_invoice_enable").is(":checked"); + $("#recv_invoice_number").prop("disabled", !enabled).parents('tr').show(); + return enabled; + } + + enable_invoice_number(); + + $("#recv_invoice_enable").change(function() + { + var enabled = enable_invoice_number(); + $.post('', {recv_invoice_number_enabled: enabled}); + + }); + ', {recv_invoice_number_enabled: enabled}); - - }); + ?> $('#item,#supplier').click(function() { diff --git a/application/views/sales/form.php b/application/views/sales/form.php index 0a9406024..d463c1a6c 100755 --- a/application/views/sales/form.php +++ b/application/views/sales/form.php @@ -16,18 +16,25 @@ -
- lang->line('sales_invoice_number'), 'invoice_number', array('class'=>'control-label col-xs-3')); ?> -
- - 'invoice_number', 'size'=>10, 'value'=>$sale_info['invoice_number'], 'id'=>'invoice_number', 'class'=>'form-control input-sm'));?> - lang->line('sales_send_invoice');?> - - 'invoice_number', 'value'=>$sale_info['invoice_number'], 'id'=>'invoice_number', 'class'=>'form-control input-sm'));?> - + config->item('invoice_enable') == TRUE) + { + ?> +
+ lang->line('sales_invoice_number'), 'invoice_number', array('class'=>'control-label col-xs-3')); ?> +
+ + 'invoice_number', 'size'=>10, 'value'=>$sale_info['invoice_number'], 'id'=>'invoice_number', 'class'=>'form-control input-sm'));?> + lang->line('sales_send_invoice');?> + + 'invoice_number', 'value'=>$sale_info['invoice_number'], 'id'=>'invoice_number', 'class'=>'form-control input-sm'));?> + +
-
+ config->item('invoice_enable') == TRUE) { ?>
@@ -564,31 +564,38 @@ $(document).ready(function() $.post('', {comment: $('#comment').val()}); }); - $('#sales_invoice_number').keyup(function() + config->item('invoice_enable') == TRUE) { - $.post('', {sales_invoice_number: $('#sales_invoice_number').val()}); - }); + ?> + $('#sales_invoice_number').keyup(function() + { + $.post('', {sales_invoice_number: $('#sales_invoice_number').val()}); + }); - var enable_invoice_number = function() - { - var enabled = $("#sales_invoice_enable").is(":checked"); - $("#sales_invoice_number").prop("disabled", !enabled).parents('tr').show(); - return enabled; + var enable_invoice_number = function() + { + var enabled = $("#sales_invoice_enable").is(":checked"); + $("#sales_invoice_number").prop("disabled", !enabled).parents('tr').show(); + return enabled; + } + + enable_invoice_number(); + + $("#sales_invoice_enable").change(function() + { + var enabled = enable_invoice_number(); + $.post('', {sales_invoice_number_enabled: enabled}); + }); + $("#sales_print_after_sale").change(function() { $.post('', {sales_print_after_sale: $(this).is(":checked")}); }); - $("#sales_invoice_enable").change(function() - { - var enabled = enable_invoice_number(); - $.post('', {sales_invoice_number_enabled: enabled}); - }); - $('#email_receipt').change(function() { $.post('', {email_receipt: $('#email_receipt').is(':checked') ? '1' : '0'}); diff --git a/database/2.4_to_3.0.sql b/database/2.4_to_3.0.sql index 23aa8b7a5..34eb0aa66 100644 --- a/database/2.4_to_3.0.sql +++ b/database/2.4_to_3.0.sql @@ -36,5 +36,6 @@ UPDATE `ospos_app_config` SET `key` = 'receipt_show_total_discount' WHERE `key` INSERT INTO `ospos_app_config` (`key`, `value`) VALUES ('receipt_show_description', '1'), - ('receipt_show_serialnumber', '1'); + ('receipt_show_serialnumber', '1'), + ('invoice_enable', '1'); \ No newline at end of file diff --git a/database/database.sql b/database/database.sql index bf67dce9c..815759bcb 100644 --- a/database/database.sql +++ b/database/database.sql @@ -23,11 +23,8 @@ INSERT INTO `ospos_app_config` (`key`, `value`) VALUES ('return_policy', 'Test'), ('timezone', 'America/New_York'), ('website', ''), -('recv_invoice_format', '$CO'), -('sales_invoice_format', '$CO'), -('tax_included', '0'), -('invoice_default_comments', 'This is a default comment'), ('company_logo', ''), +('tax_included', '0'), ('barcode_content', 'id'), ('barcode_type', 'Code39'), ('barcode_width', '250'), @@ -46,8 +43,12 @@ INSERT INTO `ospos_app_config` (`key`, `value`) VALUES ('receipt_show_total_discount', '1'), ('receipt_show_description', '1'), ('receipt_show_serialnumber', '1'), +('invoice_enable', '1'), ('use_invoice_template', '1'), +('recv_invoice_format', '$CO'), +('sales_invoice_format', '$CO'), ('invoice_email_message', 'Dear $CU, In attachment the receipt for sale $INV'), +('invoice_default_comments', 'This is a default comment'), ('print_silently', '1'), ('print_header', '0'), ('print_footer', '0'), diff --git a/database/migrate_phppos_dist.sql b/database/migrate_phppos_dist.sql index 4c7aa8db3..f15c0e291 100644 --- a/database/migrate_phppos_dist.sql +++ b/database/migrate_phppos_dist.sql @@ -23,11 +23,8 @@ INSERT INTO `ospos_app_config` (`key`, `value`) VALUES ('return_policy', 'Test'), ('timezone', 'America/New_York'), ('website', ''), -('recv_invoice_format', '$CO'), -('sales_invoice_format', '$CO'), -('tax_included', '0'), -('invoice_default_comments', 'This is a default comment'), ('company_logo', ''), +('tax_included', '0'), ('barcode_content', 'id'), ('barcode_type', 'Code39'), ('barcode_width', '250'), @@ -46,8 +43,12 @@ INSERT INTO `ospos_app_config` (`key`, `value`) VALUES ('receipt_show_total_discount', '1'), ('receipt_show_description', '1'), ('receipt_show_serialnumber', '1'), +('invoice_enable', '1'), ('use_invoice_template', '1'), +('recv_invoice_format', '$CO'), +('sales_invoice_format', '$CO'), ('invoice_email_message', 'Dear $CU, In attachment the receipt for sale $INV'), +('invoice_default_comments', 'This is a default comment'), ('print_silently', '1'), ('print_header', '0'), ('print_footer', '0'), diff --git a/database/tables.sql b/database/tables.sql index a1649df54..7651a1565 100644 --- a/database/tables.sql +++ b/database/tables.sql @@ -23,11 +23,8 @@ INSERT INTO `ospos_app_config` (`key`, `value`) VALUES ('return_policy', 'Test'), ('timezone', 'America/New_York'), ('website', ''), -('recv_invoice_format', '$CO'), -('sales_invoice_format', '$CO'), -('tax_included', '0'), -('invoice_default_comments', 'This is a default comment'), ('company_logo', ''), +('tax_included', '0'), ('barcode_content', 'id'), ('barcode_type', 'Code39'), ('barcode_width', '250'), @@ -46,8 +43,12 @@ INSERT INTO `ospos_app_config` (`key`, `value`) VALUES ('receipt_show_total_discount', '1'), ('receipt_show_description', '1'), ('receipt_show_serialnumber', '1'), +('invoice_enable', '1'), ('use_invoice_template', '1'), +('recv_invoice_format', '$CO'), +('sales_invoice_format', '$CO'), ('invoice_email_message', 'Dear $CU, In attachment the receipt for sale $INV'), +('invoice_default_comments', 'This is a default comment'), ('print_silently', '1'), ('print_header', '0'), ('print_footer', '0'),
'.to_currency( $sale['amount_tendered'] ).''.to_currency( $sale['amount_due'] ).''.to_currency( $sale['change_due'] ).''.$sale['payment_type'].''.$sale['invoice_number'].''.$sale['payment_type'].''.$sale['invoice_number'].''.$sale['payment_type'].'
');?> -
+