From 6011c98515c241a1aacae7391e80383b5c2201d5 Mon Sep 17 00:00:00 2001 From: Quentin Vial-Gouteyron Date: Tue, 24 Jan 2017 12:22:23 +0100 Subject: [PATCH] FIX payment method exception --- htdocs/compta/facture/list.php | 6 +++++- htdocs/langs/fr_FR/bills.lang | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 4dce7418159..3757f9fec2a 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -646,6 +646,10 @@ if ($resql) $error++; setEventMessages($objecttmp->ref.' '.$langs->trans("RequestAlreadyDone"), $objecttmp->errors, 'errors'); } + if($objecttmp->mode_reglement_id != 3){ + $error++; + setEventMessages($objecttmp->ref.' '.$langs->trans("BadPaymentMethod"), $objecttmp->errors, 'errors'); + } } } @@ -663,7 +667,7 @@ if ($resql) if ($result > 0) { $db->commit(); - setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); + setEventMessages( $langs->trans("RecordSaved"), null, 'mesgs'); } else { diff --git a/htdocs/langs/fr_FR/bills.lang b/htdocs/langs/fr_FR/bills.lang index bae477e8a09..e361fdb9f2b 100644 --- a/htdocs/langs/fr_FR/bills.lang +++ b/htdocs/langs/fr_FR/bills.lang @@ -490,3 +490,4 @@ ConfirmDeleteRepeatableInvoice=Est-ce votre sûr de vouloir supprimer la facture CreateOneBillByThird=Créer une facture par tiers (sinon, une facture par commande) BillCreated=%s facture(s) créée(s) WithdrawRequest=Demande de prélèvement +BadPaymentMethod=Mauvais mode de paiement \ No newline at end of file