mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-13 20:42:45 +01:00
Bug has been fixed.
This commit is contained in:
@@ -3675,7 +3675,8 @@ abstract class CommonObject
|
||||
$diff = price2num($total_tva_by_vats[$obj->vatrate] - $tmpvat, 'MT', 1);
|
||||
//print 'Line '.$i.' rowid='.$obj->rowid.' vat_rate='.$obj->vatrate.' total_ht='.$obj->total_ht.' total_tva='.$obj->total_tva.' total_ttc='.$obj->total_ttc.' total_ht_by_vats='.$total_ht_by_vats[$obj->vatrate].' total_tva_by_vats='.$total_tva_by_vats[$obj->vatrate].' (new calculation = '.$tmpvat.') total_ttc_by_vats='.$total_ttc_by_vats[$obj->vatrate].($diff?" => DIFF":"")."<br>\n";
|
||||
if ($diff) {
|
||||
if (abs($diff) > 0.1) {
|
||||
if (abs($diff) > (10 * pow(10, -1 * getDolGlobalInt('MAIN_MAX_DECIMALS_TOT', 0)))) {
|
||||
// If error is more than 10 times the accurancy of rounding. This should not happen.
|
||||
$errmsg = 'A rounding difference was detected into TOTAL but is too high to be corrected. Some data in your line may be corrupted. Try to edit each line manually.';
|
||||
dol_syslog($errmsg, LOG_WARNING);
|
||||
dol_print_error('', $errmsg);
|
||||
|
||||
Reference in New Issue
Block a user