FIX Date of invoice generated from membership must be current date

This commit is contained in:
Laurent Destailleur 2021-06-08 16:01:26 +02:00
parent 6eab0f5661
commit facf594b2d
2 changed files with 5 additions and 2 deletions

View File

@ -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;

View File

@ -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 '<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans("Designation");
print '</td><td class="CTableRow2">'.$text;
print '<input type="hidden" name="source" value="'.dol_escape_htmltag($source).'">';
print '<input type="hidden" name="source" value="'.dol_escape_htmltag($newsource).'">';
print '<input type="hidden" name="ref" value="'.dol_escape_htmltag($member->ref).'">';
print '</td></tr>'."\n";