diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index c478387a37a..e8d97f28e29 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -1895,8 +1895,6 @@ class FactureLigneRec extends CommonInvoiceLine */ public $table_element = 'facturedet_rec'; - public $date_start_fill; - public $date_end_fill; /** diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index b5e525f050a..2c890aa21de 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -756,7 +756,7 @@ class Facture extends CommonInvoice $newinvoiceline->origin_id = $this->lines[$i]->id; // Auto set date of service ? - if ($this->lines[$i]->date_start_fill == 1 && $originaldatewhen) // $originaldatewhen is defined when generating from recurring invoice only + if ($this->lines[$i]->date_start_fill == 1 && $originaldatewhen) // $originaldatewhen is defined when generating from recurring invoice only { $newinvoiceline->date_start = $originaldatewhen; } diff --git a/htdocs/core/class/commoninvoice.class.php b/htdocs/core/class/commoninvoice.class.php index c8ca158e981..c0b45d693df 100644 --- a/htdocs/core/class/commoninvoice.class.php +++ b/htdocs/core/class/commoninvoice.class.php @@ -941,6 +941,10 @@ abstract class CommonInvoiceLine extends CommonObjectLine */ public $info_bits = 0; + public $date_start_fill; // If set to 1, when invoice is created from a template invoice, it will also auto set the field date_start at creation + public $date_end_fill; // If set to 1, when invoice is created from a template invoice, it will also auto set the field date_end at creation + + /** * Constructor *