From f8550ed45dfce7566f074c569fb1a43301d24b1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josep=20Llu=C3=ADs?= Date: Tue, 25 Mar 2025 16:34:28 +0100 Subject: [PATCH] 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 --- htdocs/compta/paiement.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index b82d2b6216e..8ea4795af4a 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -13,6 +13,7 @@ * Copyright (C) 2023 Sylvain Legrand * Copyright (C) 2023 William Mead * Copyright (C) 2024-2025 MDW + * Copyright (C) 2025 Josep LluĂ­s Amador * * 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 ''.$langs->trans('Date').''; $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 ''; // Payment mode