From f998feda851620eb57d01badf0b6f4dcaa082368 Mon Sep 17 00:00:00 2001 From: Noizette Date: Sat, 6 Nov 2021 03:56:49 +0100 Subject: [PATCH] =?UTF-8?q?Fix=20s=C3=A9lection=20membre=20cass=C3=A9e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/facture_modifier.tpl | 2 +- www/admin/facture_modifier.php | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/templates/facture_modifier.tpl b/templates/facture_modifier.tpl index b148a29..34ef178 100644 --- a/templates/facture_modifier.tpl +++ b/templates/facture_modifier.tpl @@ -144,7 +144,7 @@
- {input type="select" name="membre" label="Membre" options=$membres required=1 source=$doc} + {input type="select" name="membre_cotis" label="Membre" options=$membres required=1 source=$doc}
diff --git a/www/admin/facture_modifier.php b/www/admin/facture_modifier.php index e61527d..a9c352d 100644 --- a/www/admin/facture_modifier.php +++ b/www/admin/facture_modifier.php @@ -120,7 +120,7 @@ if (f('select_cotis')) $form->check('add_cotis_1',[ 'numero_facture' => 'required|string', 'date_emission' => 'required|date', - 'membre' => 'required|numeric', + 'membre_cotis' => 'required|numeric', ]); $step = true; @@ -130,7 +130,7 @@ elseif (f('add_cotis')) $form->check('add_cotis_2',[ 'numero_facture' => 'required|string', 'date_emission' => 'required|date', - 'membre' => 'required|numeric', + 'membre_cotis' => 'required|numeric', 'cotisation' => 'required', ]); @@ -146,14 +146,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' => 3, '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, @@ -182,7 +182,7 @@ if ($step) { try { - $liste = $facture->getCotis((int)f('membre')); + $liste = $facture->getCotis((int)f('membre_cotis')); } catch (UserException $e) {