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)