diff --git a/htdocs/compta/facture/class/api_invoices.class.php b/htdocs/compta/facture/class/api_invoices.class.php index b913b405734..0ab4974ce7f 100644 --- a/htdocs/compta/facture/class/api_invoices.class.php +++ b/htdocs/compta/facture/class/api_invoices.class.php @@ -1499,7 +1499,7 @@ class Invoices extends DolibarrApi $amount = price2num($amountarray["multicurrency_amount"], 'MT'); } - if ($amount > $remainstopay && $accepthigherpayment == false) { + if ($amount > $remainstopay && !$accepthigherpayment) { $this->db->rollback(); throw new RestException(400, 'Payment amount on invoice ID '.$id.' ('.$amount.') is higher than remain to pay ('.$remainstopay.')'); }