FIX payment method exception

This commit is contained in:
Quentin Vial-Gouteyron 2017-01-24 12:22:23 +01:00
parent 39a92df647
commit 6011c98515
2 changed files with 6 additions and 1 deletions

View File

@ -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
{

View File

@ -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