Merge pull request #18383 from marc-dll/12.0_FIX_invoice_tiny_negative_vat
FIX: invoice validation: when checking if any VAT rate has a negative amount, prevent false positives with -1.0E-14 amounts
This commit is contained in:
commit
16c290f735
@ -318,8 +318,8 @@ if (empty($reshook))
|
||||
//var_dump($array_of_total_ht_per_vat_rate);exit;
|
||||
foreach ($array_of_total_ht_per_vat_rate as $vatrate => $tmpvalue)
|
||||
{
|
||||
$tmp_total_ht = $array_of_total_ht_per_vat_rate[$vatrate];
|
||||
$tmp_total_ht_devise = $array_of_total_ht_devise_per_vat_rate[$vatrate];
|
||||
$tmp_total_ht = price2num($array_of_total_ht_per_vat_rate[$vatrate]);
|
||||
$tmp_total_ht_devise = price2num($array_of_total_ht_devise_per_vat_rate[$vatrate]);
|
||||
|
||||
if (($tmp_total_ht < 0 || $tmp_total_ht_devise < 0) && empty($conf->global->FACTURE_ENABLE_NEGATIVE_LINES))
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user