X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Fincludes%2Fdb%2Fcustalloc_db.inc;h=7260f0e10ed0702b19ab0c4e0dd8648cd8eb9693;hb=1e4cd218cd0b7e1093b4b63d6636f5360b3c7958;hp=896649090fedf2658b5dd85ac8b4b4d1a4d4d289;hpb=2bbf52478cf6cbf4fb89395f18390f1a6af93f40;p=fa-stable.git diff --git a/sales/includes/db/custalloc_db.inc b/sales/includes/db/custalloc_db.inc index 89664909..7260f0e1 100644 --- a/sales/includes/db/custalloc_db.inc +++ b/sales/includes/db/custalloc_db.inc @@ -286,7 +286,7 @@ function credit_sales_invoice_allocate($invoice_no, $credit_no, $amount, $date) $free += $unalloc; } } - if ($free < $amount) { + if (floatcmp($free, $amount)<0) { // this should never happen unless sparse credit notices were allocated to // the invoice, or summarized freight costs on credit notes is more than those on invoice. display_error(_("Unsuspected overallocation happened due to sparse credit notes exists for this invoice.