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