From 3132f3b7cea68eb1c721ce7aef4e500036b0c96f Mon Sep 17 00:00:00 2001 From: Jean-Christophe Engel Date: Mon, 2 Dec 2024 09:33:02 +0100 Subject: [PATCH] =?UTF-8?q?ajout=20contr=C3=B4le=20quantit=C3=A9=20entr?= =?UTF-8?q?=C3=A9e=20mat=C3=A9riel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mouvements/entrees/repertorie.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mouvements/entrees/repertorie.html b/mouvements/entrees/repertorie.html index d417d16..2cc72ca 100644 --- a/mouvements/entrees/repertorie.html +++ b/mouvements/entrees/repertorie.html @@ -32,6 +32,12 @@ {{* Traiter l'envoi du formulaire *}} {{#form on="save"}} + + {{* vérifier la quantité saisie *}} + {{if $_POST.quantite <= 0}} + {{:error message="La quantité (%s) doit être strictement positive !!"|args:$_POST.quantite}} + {{/if}} + {{* Enregistrer le mouvement *}} {{:assign mvt_key=""|uuid}} {{:assign var="operation" from="input_labels.%d|args:$_POST.nature_operation}}