From fbc841095e8209f81a9b96725728f2b29f555c61 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sun, 1 Oct 2023 11:47:37 +0200 Subject: [PATCH] NEW possibility to deselect line when create a recurring invoice --- htdocs/compta/facture/card-rec.php | 11 +- .../facture/class/facture-rec.class.php | 131 ++++++++++++------ htdocs/compta/facture/class/facture.class.php | 14 +- htdocs/core/class/commonobject.class.php | 2 +- 4 files changed, 107 insertions(+), 51 deletions(-) diff --git a/htdocs/compta/facture/card-rec.php b/htdocs/compta/facture/card-rec.php index 0a54475792e..caed8177b3b 100644 --- a/htdocs/compta/facture/card-rec.php +++ b/htdocs/compta/facture/card-rec.php @@ -70,6 +70,7 @@ $projectid = GETPOST('projectid', 'int'); $year_date_when = GETPOST('year_date_when'); $month_date_when = GETPOST('month_date_when'); +$selectedLines = GETPOST('toselect', 'array'); $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); @@ -1148,13 +1149,11 @@ if ($action == 'create') { * Invoice lines */ print '
'; - print ''; + print '
'; + // Show object lines if (!empty($object->lines)) { - $disableedit = 1; - $disablemove = 1; - $disableremove = 1; - $object->printObjectLines('', $mysoc, $object->thirdparty, $lineid, 0); // No date selector for template invoice + $object->printOriginLinesList('', $selectedLines); } print "
\n"; @@ -1162,7 +1161,7 @@ if ($action == 'create') { print ''; - if ($flag_price_may_change) { + if (!empty($flag_price_may_change)) { print ''; print '