From 660e4b40c422cf23caca8e9e88795c92bd2fee4d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 23 Mar 2011 18:25:53 +0000 Subject: [PATCH] Fix: Error report --- htdocs/adherents/card_subscriptions.php | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/htdocs/adherents/card_subscriptions.php b/htdocs/adherents/card_subscriptions.php index 049e209ce6b..51794f67f22 100644 --- a/htdocs/adherents/card_subscriptions.php +++ b/htdocs/adherents/card_subscriptions.php @@ -193,6 +193,10 @@ if ($user->rights->adherent->cotisation->creer && $action == 'cotisation' && ! $ { $datesubend=dol_mktime(0, 0, 0, $_POST["endmonth"], $_POST["endday"], $_POST["endyear"]); } + if ($_POST["paymentyear"] && $_POST["paymentmonth"] && $_POST["paymentday"]) + { + $paymentdate=dol_mktime(0, 0, 0, $_POST["paymentmonth"], $_POST["paymentday"], $_POST["paymentyear"]); + } $cotisation=$_POST["cotisation"]; // Amount of subscription $label=$_POST["label"]; @@ -593,7 +597,7 @@ if ($rowid) dol_fiche_end(); - dol_htmloutput_errors($errmg,$errmsgs); + dol_htmloutput_errors($errmsg,$errmsgs); /* @@ -791,6 +795,13 @@ if ($rowid) $today=mktime(); $datefrom=0; $dateto=0; + $paymentdate=-1; + + // Date payment + if ($_POST["paymentyear"] && $_POST["paymentmonth"] && $_POST["paymentday"]) + { + $paymentdate=dol_mktime(0, 0, 0, $_POST["paymentmonth"], $_POST["paymentday"], $_POST["paymentyear"]); + } // Date start subscription print ''.$langs->trans("DateSubscription").''; @@ -899,6 +910,11 @@ if ($rowid) $html->select_types_paiements($_POST["operation"],'operation','',2); print "\n"; + // Date of payment + print ''.$langs->trans("DatePayment").''; + $html->select_date($paymentdate?$paymentdate:-1,'payment',0,0,1,'cotisation',1,1); + print "\n"; + print ''.$langs->trans('Numero'); print ' ('.$langs->trans("ChequeOrTransferNumber").')'; print '';