From 4aaed6f3c256f5a4802fb3e44465bcd5bdd464a6 Mon Sep 17 00:00:00 2001 From: Noizette Date: Mon, 17 Apr 2023 01:10:08 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20#45=20champs=20num=C3=A9ro=20vide=20en=20?= =?UTF-8?q?cr=C3=A9ant=20des=20cotis?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- www/admin/_facture_common.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/www/admin/_facture_common.php b/www/admin/_facture_common.php index 7e892c4..cd3f03e 100644 --- a/www/admin/_facture_common.php +++ b/www/admin/_facture_common.php @@ -131,7 +131,7 @@ if (f('save')) elseif (f('select_cotis')) { $form->check('add_cotis_1',[ - 'numero_facture' => 'required|string', + 'numero_facture' => $require_number ? 'required|string' : 'string', 'date_emission' => 'required|date_format:d/m/Y', 'membre_cotis' => 'required|numeric', ]); @@ -141,7 +141,7 @@ elseif (f('select_cotis')) elseif (f('add_cotis')) { $form->check('add_cotis_2',[ - 'numero_facture' => 'required|string', + 'numero_facture' => $require_number ? 'required|string' : 'string', 'date_emission' => 'required|date_format:d/m/Y', 'membre_cotis' => 'required|numeric', 'cotisation' => 'required', @@ -168,6 +168,7 @@ elseif (f('add_cotis')) 'receveur_membre' => 1, 'receveur_id' => f('membre_cotis'), 'date_emission' => f('date_emission'), + 'moyen_paiement' => 'AU', 'total' => $r->paid_amount ?? $r->amount, 'contenu' => ['id' => $cotis['id'], 'intitule' => $cotis['label'], @@ -181,8 +182,6 @@ elseif (f('add_cotis')) $form->addError($e->getMessage()); } } - - // $step = true; } if ($step)