diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php
index f5ddc38e52c..c27f2f4f79f 100644
--- a/htdocs/comm/card.php
+++ b/htdocs/comm/card.php
@@ -1001,7 +1001,7 @@ if ($object->id > 0)
$sql.= ', f.tva as total_tva';
$sql.= ', f.total_ttc';
$sql.= ', f.datec as dc';
- $sql.= ', f.date_last_gen';
+ $sql.= ', f.date_last_gen, f.date_when';
$sql.= ', f.frequency';
$sql.= ', f.unit_frequency';
$sql.= ', f.suspended as suspended';
@@ -1044,6 +1044,8 @@ if ($object->id > 0)
$invoicetemplate->total_ht = $objp->total_ht;
$invoicetemplate->total_tva = $objp->total_tva;
$invoicetemplate->total_ttc = $objp->total_ttc;
+ $invoicetemplate->date_last_gen = $objp->date_last_gen;
+ $invoicetemplate->date_when = $objp->date_when;
print '
';
print '';
diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php
index 4d102e73377..71123d1c6e2 100644
--- a/htdocs/compta/facture/class/facture-rec.class.php
+++ b/htdocs/compta/facture/class/facture-rec.class.php
@@ -1118,7 +1118,21 @@ class FactureRec extends CommonInvoice
global $langs;
$result='';
- $label=$langs->trans("ShowInvoice").': '.$this->ref;
+
+ $label = '' . $langs->trans("ShowInvoice") . '';
+ if (! empty($this->ref))
+ $label .= ' '.$langs->trans('Ref') . ': ' . $this->ref;
+ if (! empty($this->date_last_gen))
+ $label .= ' '.$langs->trans('DateLastGeneration') . ': ' . dol_print_date($this->date_last_gen, 'dayhour');
+ if ($this->frequency > 0)
+ {
+ if (! empty($this->date_when))
+ {
+ $label .= ' '.$langs->trans('NextDateToExecution') . ': ';
+ $label .= (empty($this->suspended)?'':''). dol_print_date($this->date_when, 'day').(empty($this->suspended)?'':''); // No hour for this property
+ if (! empty($this->suspended)) $label .= ' ('.$langs->trans("Disabled").')';
+ }
+ }
$url = DOL_URL_ROOT.'/compta/facture/fiche-rec.php?facid='.$this->id;
|