From 69c728e8ad21b6f4212287dcfde96818f378a6f8 Mon Sep 17 00:00:00 2001 From: Noizette Date: Sat, 6 Nov 2021 21:08:49 +0100 Subject: [PATCH] =?UTF-8?q?Fix=20s=C3=A9lection=20membre=20aussi=20sur=20n?= =?UTF-8?q?ouveaux=20doc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/facture_ajouter.tpl | 2 +- www/admin/facture_ajouter.php | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/templates/facture_ajouter.tpl b/templates/facture_ajouter.tpl index a8b1112..dfa4f4c 100644 --- a/templates/facture_ajouter.tpl +++ b/templates/facture_ajouter.tpl @@ -151,7 +151,7 @@
- {input type="select" name="membre" label="Membre" options=$membres required=1} + {input type="select" name="membre_cotis" label="Membre" options=$membres required=1}
diff --git a/www/admin/facture_ajouter.php b/www/admin/facture_ajouter.php index 67d0b70..903d6f3 100644 --- a/www/admin/facture_ajouter.php +++ b/www/admin/facture_ajouter.php @@ -97,7 +97,7 @@ elseif (f('select_cotis')) $form->check('add_cotis_1',[ 'numero_facture' => 'required|string', 'date_emission' => 'required|date_format:d/m/Y', - 'membre' => 'required|numeric', + 'membre_cotis' => 'required|numeric', ]); $step = true; @@ -107,7 +107,7 @@ elseif (f('add_cotis')) $form->check('add_cotis_2',[ 'numero_facture' => 'required|string', 'date_emission' => 'required|date_format:d/m/Y', - 'membre' => 'required|numeric', + 'membre_cotis' => 'required|numeric', 'cotisation' => 'required', ]); @@ -123,14 +123,14 @@ elseif (f('add_cotis')) $cotis[$field] = f($field.'_'.$num); } - $r = $facture->getCotis(f('membre'), $cotis['id']); + $r = $facture->getCotis(f('membre_cotis'), $cotis['id']); $r = $r[0]; $data = [ 'type_facture' => COTIS, 'numero' => f('numero_facture'), 'receveur_membre' => 1, - 'receveur_id' => f('membre'), + 'receveur_id' => f('membre_cotis'), 'date_emission' => f('date_emission'), 'moyen_paiement' => f('moyen_paiement'), 'total' => $r->paid_amount ?? $r->amount, @@ -157,7 +157,7 @@ if ($step) { try { - $liste = $facture->getCotis((int)f('membre')); + $liste = $facture->getCotis((int)f('membre_cotis')); } catch (UserException $e) {