From bd99f3943df513830407cc98577fcaff635ae91e Mon Sep 17 00:00:00 2001 From: aspangaro Date: Wed, 3 Sep 2014 21:31:40 +0200 Subject: [PATCH] Payment VAT :: Add control on field required --- htdocs/compta/tva/fiche.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/htdocs/compta/tva/fiche.php b/htdocs/compta/tva/fiche.php index 65c4285d7d1..a4a5a8831c4 100644 --- a/htdocs/compta/tva/fiche.php +++ b/htdocs/compta/tva/fiche.php @@ -72,6 +72,16 @@ if ($action == 'add' && $_POST["cancel"] <> $langs->trans("Cancel")) $tva->label=GETPOST("label"); $tva->note=GETPOST("note"); + if (empty($tva->datev)) + { + setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("DateValue")),'errors'); + $error++; + } + if (empty($tva->datep)) + { + setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("DatePayment")),'errors'); + $error++; + } if (empty($tva->type_payment) || $tva->type_payment < 0) { setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("PaymentMode")),'errors');