Add missing language element for rounding code "Unknown" and eliminate duplicate statements in upgrade statement, and fix issue with 0 tax_category_id

This commit is contained in:
Steve Ireland
2017-07-15 19:05:15 -04:00
committed by jekkos
parent 5d49728c74
commit 641e2f414c
10 changed files with 96 additions and 78 deletions

View File

@@ -179,7 +179,7 @@ class Tax_lib
*/
public function apply_sales_tax(&$item, &$city, &$state, &$sales_tax_code, $register_mode, $sale_id, &$sales_taxes)
{
$tax_code = $this->get_applicable_tax_mode($register_mode, $city, $state, $sales_tax_code);
$tax_code = $this->get_applicable_tax_code($register_mode, $city, $state, $sales_tax_code);
// If tax code cannot be determined or the price is zero then skip this item
if($tax_code != '' && $item['price'] != 0)
@@ -261,9 +261,9 @@ class Tax_lib
}
}
public function get_applicable_tax_mode($register_mode, $city, $state, $sales_tax_code)
public function get_applicable_tax_code($register_mode, $city, $state, $sales_tax_code)
{
if($register_mode == "SALE")
if($register_mode == "sale")
{
$tax_code = $this->CI->config->config['default_origin_tax_code']; // overrides customer assigned code
}