NEW Invert logic of default date in proposal/order/invoice creation:

Need option to NOT autofill instead of the opposite.
This commit is contained in:
Laurent Destailleur
2025-11-17 10:57:06 +01:00
parent ed08d6389a
commit 642feb78d2
3 changed files with 9 additions and 11 deletions

View File

@@ -2349,9 +2349,11 @@ if ($action == 'create' && $usercancreate) {
}
// Date
$dateorder = (getDolGlobalString('MAIN_DO_NOT_AUTOFILL_DATE_ORDER') ? -1 : ''); // By default '' so we will autofill date. -1 means keep empty.
print '<tr><td class="fieldrequired">' . $langs->trans('Date') . '</td><td>';
print img_picto('', 'action', 'class="pictofixedwidth"');
print $form->selectDate('', 're', 0, 0, 0, "crea_commande", 1, 1); // Always autofill date with current date
print $form->selectDate($dateorder, 're', 0, 0, 0, "crea_commande", 1, 1); // Always autofill date with current date
print '</td></tr>';
// Date delivery planned