diff --git a/application/controllers/Config.php b/application/controllers/Config.php index 74837bbc4..a42ca8cf5 100644 --- a/application/controllers/Config.php +++ b/application/controllers/Config.php @@ -817,7 +817,6 @@ class Config extends Secure_Controller { $batch_save_data = array ( 'invoice_enable' => $this->input->post('invoice_enable') != NULL, - 'default_register_mode' => $this->input->post('default_register_mode'), 'sales_invoice_format' => $this->input->post('sales_invoice_format'), 'sales_quote_format' => $this->input->post('sales_quote_format'), 'recv_invoice_format' => $this->input->post('recv_invoice_format'), diff --git a/application/libraries/Sale_lib.php b/application/libraries/Sale_lib.php index 5530113be..ebf372350 100644 --- a/application/libraries/Sale_lib.php +++ b/application/libraries/Sale_lib.php @@ -591,18 +591,10 @@ class Sale_lib public function get_mode() { - if(!$this->CI->session->userdata('sales_mode')) - { - if($this->CI->config->item('invoice_enable') == '1') - { - $this->set_mode($this->CI->config->item('default_register_mode')); - } - else - { - $this->set_mode('sale'); - } - } - + if(!$this->CI->session->userdata('sales_mode')) + { + $this->set_mode('sale'); + } return $this->CI->session->userdata('sales_mode'); } @@ -1037,6 +1029,7 @@ class Sale_lib public function clear_all() { $this->CI->session->set_userdata('sale_id', -1); + $this->clear_mode(); $this->clear_table(); $this->empty_cart(); $this->clear_comment(); diff --git a/application/views/configs/invoice_config.php b/application/views/configs/invoice_config.php index 9ec52a2d2..844b582fb 100644 --- a/application/views/configs/invoice_config.php +++ b/application/views/configs/invoice_config.php @@ -22,13 +22,6 @@ -