NEW: Add DateMaxPayment option on selectDate (#33601)

* Add DateMaxPayment option on selectDate

Add DateMaxPayment option on selectDate, in customers invoices, as in suppliers invoices

* Update paiement.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
Josep Lluís
2025-03-25 16:34:28 +01:00
committed by GitHub
parent 1f15c35b15
commit f8550ed45d

View File

@@ -13,6 +13,7 @@
* Copyright (C) 2023 Sylvain Legrand <technique@infras.fr>
* Copyright (C) 2023 William Mead <william.mead@manchenumerique.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2025 Josep Lluís Amador <joseplluis@lliuretic.cat>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -501,7 +502,9 @@ if ($result >= 0) {
print '<tr><td><span class="fieldrequired">'.$langs->trans('Date').'</span></td><td>';
$datepayment = dol_mktime(12, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'));
$datepayment = ($datepayment == '' ? (!getDolGlobalString('MAIN_AUTOFILL_DATE') ? -1 : '') : $datepayment);
print $form->selectDate($datepayment, '', 0, 0, 0, "add_paiement", 1, 1, 0, '', '', $facture->date);
$adddateof = array(array('adddateof'=>$facture->date));
$adddateof[] = array('adddateof'=>$facture->date_lim_reglement, 'labeladddateof'=>$langs->transnoentities('DateDue'));
print $form->selectDate($datepayment, '', 0, 0, 0, "add_paiement", 1, 1, 0, '', '', $adddateof);
print '</td></tr>';
// Payment mode