diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 32f7749190a..c96d0d1389a 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -2129,7 +2129,6 @@ class Propal extends CommonObject $this->ref = $num; $this->statut = self::STATUS_VALIDATED; - $this->status = self::STATUS_VALIDATED; $this->user_validation_id = $user->id; $this->datev = $now; $this->date_validation = $now; diff --git a/htdocs/core/class/commoninvoice.class.php b/htdocs/core/class/commoninvoice.class.php index 828d5192eab..b4c6346a18e 100644 --- a/htdocs/core/class/commoninvoice.class.php +++ b/htdocs/core/class/commoninvoice.class.php @@ -1819,6 +1819,9 @@ abstract class CommonInvoice extends CommonObject // Get the amount to pay $amount_to_pay = $this->getRemainToPay(); + // Prevent negative values (e.g. overpayments) + $amount_to_pay = max(0, $amount_to_pay); + // Ensure numeric formatting for EPC QR code $amount_to_pay = price2num($amount_to_pay, 'MT'); diff --git a/htdocs/core/class/html.formsetup.class.php b/htdocs/core/class/html.formsetup.class.php index 8eb90fe329b..efedd7be7ab 100644 --- a/htdocs/core/class/html.formsetup.class.php +++ b/htdocs/core/class/html.formsetup.class.php @@ -267,7 +267,6 @@ class FormSetup $this->errors = $hookmanager->errors; return -1; } - if ($reshook > 0) { return $reshook; } diff --git a/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php b/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php index 39cee230d3e..5a10de98ed8 100644 --- a/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php +++ b/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php @@ -445,7 +445,7 @@ class InterfaceTicketEmail extends DolibarrTriggers $message_customer .= '
'.$langs->trans('Message').' :
'.$message.'
'.$langs->trans($see_ticket).' : '.$url_public_ticket.'
'; $message_customer .= ''.$langs->trans('TicketEmailPleaseDoNotReplyToThisEmail').'
'; } else {