From facf594b2da40a8462b7b744c4a8040896daed9c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 8 Jun 2021 16:01:26 +0200 Subject: [PATCH] FIX Date of invoice generated from membership must be current date --- htdocs/adherents/class/adherent.class.php | 3 ++- htdocs/public/payment/newpayment.php | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index b7852280ddf..4c0c602cbc1 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -1740,7 +1740,8 @@ class Adherent extends CommonObject } } $invoice->socid = $this->fk_soc; - $invoice->date = $datesubscription; + //$invoice->date = $datesubscription; + $invoice->date = dol_now(); // Possibility to add external linked objects with hooks $invoice->linked_objects['subscription'] = $subscriptionid; diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index 3a7f9a4ed9f..fb95432256d 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -1419,6 +1419,8 @@ if ($source == 'contractline') { // Payment on member subscription if ($source == 'member' || $source == 'membersubscription') { + $newsource = 'member'; + $found = true; $langs->load("members"); @@ -1478,7 +1480,7 @@ if ($source == 'member' || $source == 'membersubscription') { } print ''.$langs->trans("Designation"); print ''.$text; - print ''; + print ''; print ''; print ''."\n";