Merge pull request #20517 from ATM-Consulting/FIX_16.0_getNomUrl_for_supplier_invoice_templates

FIX 16.0 - copy `title` over `ref` on FactureFournisseurRec object
This commit is contained in:
Laurent Destailleur 2022-04-02 16:16:55 +02:00 committed by GitHub
commit bb5cf1ed2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -243,6 +243,7 @@ class FactureFournisseurRec extends CommonInvoice
// Clean parameters // Clean parameters
$this->titre = empty($this->titre) ? '' : $this->titre; $this->titre = empty($this->titre) ? '' : $this->titre;
$this->ref = $this->{$this->table_ref_field};
$this->ref_supplier = empty($this->ref_supplier) ? '' : $this->ref_supplier; $this->ref_supplier = empty($this->ref_supplier) ? '' : $this->ref_supplier;
$this->usenewprice = empty($this->usenewprice) ? 0 : $this->usenewprice; $this->usenewprice = empty($this->usenewprice) ? 0 : $this->usenewprice;
$this->suspended = empty($this->suspended) ? 0 : $this->suspended; $this->suspended = empty($this->suspended) ? 0 : $this->suspended;
@ -584,6 +585,7 @@ class FactureFournisseurRec extends CommonInvoice
$this->id = $obj->rowid; $this->id = $obj->rowid;
$this->titre = $obj->titre; $this->titre = $obj->titre;
$this->ref = $this->{$this->table_ref_field};
$this->ref_supplier = $obj->ref_supplier; $this->ref_supplier = $obj->ref_supplier;
$this->entity = $obj->entity; $this->entity = $obj->entity;
$this->socid = $obj->fk_soc; $this->socid = $obj->fk_soc;
@ -673,7 +675,6 @@ class FactureFournisseurRec extends CommonInvoice
return $this->fetch_lines(); return $this->fetch_lines();
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Get lines of template invoices into this->lines * Get lines of template invoices into this->lines
@ -2098,7 +2099,7 @@ class FactureFournisseurLigneRec extends CommonObjectLine
$this->product_type = $objp->product_type; $this->product_type = $objp->product_type;
$this->date_start = $objp->date_start; $this->date_start = $objp->date_start;
$this->date_end = $objp->date_end; $this->date_end = $objp->date_end;
$this->info_bits = $objp->info_bits ; $this->info_bits = $objp->info_bits;
$this->special_code = $objp->special_code; $this->special_code = $objp->special_code;
$this->rang = $objp->rang; $this->rang = $objp->rang;
$this->fk_unit = $objp->fk_unit; $this->fk_unit = $objp->fk_unit;