From f91b98d326f6a2f591e6538f1dba9e7ba22ff338 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 13 Oct 2019 20:50:03 +0200 Subject: [PATCH] Add frequency in template invoice popup --- .../compta/facture/class/facture-rec.class.php | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index a71860c01c1..e65db4d2f5e 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2015 Laurent Destailleur + * Copyright (C) 2004-2019 Laurent Destailleur * Copyright (C) 2009-2012 Regis Houssin * Copyright (C) 2010-2011 Juanjo Menent * Copyright (C) 2012 Cedric Salvador @@ -1241,14 +1241,17 @@ class FactureRec extends CommonInvoice $result=''; $label = '' . $langs->trans("ShowInvoice") . ''; - if (! empty($this->ref)) + if (! empty($this->ref)) { $label .= '
'.$langs->trans('Ref') . ': ' . $this->ref; - if (! empty($this->date_last_gen)) + } + if ($this->frequency > 0) { + $label .= '
'.$langs->trans('Frequency') . ': ' . $this->frequency.$this->unit_frequency; + } + 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)) - { + } + 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").')';