Merge pull request #15101 from FHenry/12.0_fix_autofilldate_payment_expensereport
fix MAIN_AUTOFILL_DATE for expense payment date
This commit is contained in:
commit
72505b2ad4
@ -249,8 +249,8 @@ if ($action == 'create' || empty($action))
|
|||||||
|
|
||||||
print '<tr><td class="titlefield fieldrequired">'.$langs->trans("Date").'</td><td colspan="2">';
|
print '<tr><td class="titlefield fieldrequired">'.$langs->trans("Date").'</td><td colspan="2">';
|
||||||
$datepaid = dol_mktime(12, 0, 0, GETPOST("remonth", 'int'), GETPOST("reday", 'int'), GETPOST("reyear", 'int'));
|
$datepaid = dol_mktime(12, 0, 0, GETPOST("remonth", 'int'), GETPOST("reday", 'int'), GETPOST("reyear", 'int'));
|
||||||
$datepayment = empty($conf->global->MAIN_AUTOFILL_DATE) ? (empty($_POST["remonth"]) ?-1 : $datepaid) : 0;
|
$datepayment = ($datepaid == '' ? (empty($conf->global->MAIN_AUTOFILL_DATE) ?-1 : '') : $datepaid);
|
||||||
print $form->selectDate($datepayment, '', '', '', '', "add_payment", 1, 1);
|
print $form->selectDate($datepayment, '', '', '', 0, "add_payment", 1, 1);
|
||||||
print "</td>";
|
print "</td>";
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user