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 '