$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.