Fix error message

This commit is contained in:
ldestailleur
2025-10-02 01:47:05 +02:00
parent 869aab8960
commit 4ed605e31e
3 changed files with 4 additions and 1 deletions

View File

@@ -122,7 +122,7 @@ if (($action == 'add_payment' || ($action == 'confirm_paiement' && $confirm == '
$paymentid = $paiement->create($user, (GETPOST('closepaidcontrib') == 'on' ? 1 : 0));
if ($paymentid < 0) {
$error++;
setEventMessages($paiement->error, null, 'errors');
setEventMessages($paiement->error, $paiement->errors, 'errors');
$action = 'create';
}
}

View File

@@ -215,6 +215,7 @@ class PaymentSocialContribution extends CommonObject
// Check parameters
if ($totalamount == 0) {
$this->error = 'ErrorPaymentAmountMustNotBeNull';
return -1; // On accepte les montants negatifs pour les rejets de prelevement mais pas null
}
@@ -503,6 +504,7 @@ class PaymentSocialContribution extends CommonObject
$object->fetch($fromid);
$object->id = 0;
$object->statut = 0;
$object->status = 0;
// Clear fields
// ...

View File

@@ -363,6 +363,7 @@ ErrorThisGroupIsAlreadyDefinedAsThisType=The contacts with this group are alread
ErrorIsNotInError=%s is not in error
ErrorFilenameExtensionNotAllowed=File %s has a forbidden file extension
ErrorNoValueForSelectListType=Error, a value for this type of field is mandatory
ErrorPaymentAmountMustNotBeNull=Error, payment amount must be defined and not zero
# Warnings
WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup.