mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-05-24 16:28:40 -04:00
new discount on sales
This commit is contained in:
@@ -31,12 +31,12 @@ class Tax_lib
|
||||
/*
|
||||
* Compute the tax basis and returns the tax amount
|
||||
*/
|
||||
public function get_item_sales_tax($quantity, $price, $discount_percentage, $discount_fixed, $tax_percentage, $rounding_code)
|
||||
public function get_item_sales_tax($quantity, $price, $discount, $discount_type, $tax_percentage, $rounding_code)
|
||||
{
|
||||
$decimals = tax_decimals();
|
||||
|
||||
// The tax basis should be returned at the currency scale
|
||||
$tax_basis = $this->CI->sale_lib->get_item_total($quantity, $price, $discount_percentage, $discount_fixed, TRUE);
|
||||
$tax_basis = $this->CI->sale_lib->get_item_total($quantity, $price, $discount, $discount_type, TRUE);
|
||||
|
||||
return $this->get_sales_tax_for_amount($tax_basis, $tax_percentage, $rounding_code, $decimals);
|
||||
}
|
||||
@@ -223,7 +223,7 @@ class Tax_lib
|
||||
$decimals = tax_decimals();
|
||||
|
||||
// The tax basis should be returned at the currency scale
|
||||
$tax_basis = $this->CI->sale_lib->get_item_total($item['quantity'], $item['price'], $item['discount'], $item['discount_fixed'], TRUE);
|
||||
$tax_basis = $this->CI->sale_lib->get_item_total($item['quantity'], $item['price'], $item['discount'], $item['discount_type'], TRUE);
|
||||
$tax_amount = $this->get_sales_tax_for_amount($tax_basis, $tax_rate, $rounding_code, $decimals);
|
||||
|
||||
$tax_group = (float)$tax_rate . '% ' . $tax_category;
|
||||
|
||||
Reference in New Issue
Block a user