mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-03-06 16:18:14 -05:00
Revert "Check if payments cover total using currency decimals configuration"
This reverts commit 9a7061e9c5.
This commit is contained in:
@@ -533,7 +533,8 @@ class Sales extends Secure_Controller
|
||||
|
||||
private function _payments_cover_total()
|
||||
{
|
||||
return !bccomp($this->sale_lib->get_amount_due(), 0, $this->config->item('currency_decimals'));
|
||||
// Changed the conditional to account for floating point rounding
|
||||
return ($this->sale_lib->get_amount_due() <= 1e-6);
|
||||
}
|
||||
|
||||
private function _load_customer_data($customer_id, &$data, $totals = FALSE)
|
||||
|
||||
@@ -24,7 +24,7 @@ function totals_decimals()
|
||||
return $config->item('currency_decimals') ? $config->item('currency_decimals') : 0;
|
||||
}
|
||||
|
||||
function to_currency($number)
|
||||
function to_currency($number, $escape = FALSE)
|
||||
{
|
||||
return to_decimals($number, 'currency_decimals', \NumberFormatter::CURRENCY);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user