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:
commit
bb5cf1ed2e
@ -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;
|
||||||
@ -616,19 +618,19 @@ class FactureFournisseurRec extends CommonInvoice
|
|||||||
$this->model_pdf = $obj->modelpdf;
|
$this->model_pdf = $obj->modelpdf;
|
||||||
|
|
||||||
// Multicurrency
|
// Multicurrency
|
||||||
$this->fk_multicurrency = $obj->fk_multicurrency;
|
$this->fk_multicurrency = $obj->fk_multicurrency;
|
||||||
$this->multicurrency_code = $obj->multicurrency_code;
|
$this->multicurrency_code = $obj->multicurrency_code;
|
||||||
$this->multicurrency_tx = $obj->multicurrency_tx;
|
$this->multicurrency_tx = $obj->multicurrency_tx;
|
||||||
$this->multicurrency_total_ht = $obj->multicurrency_total_ht;
|
$this->multicurrency_total_ht = $obj->multicurrency_total_ht;
|
||||||
$this->multicurrency_total_tva = $obj->multicurrency_total_tva;
|
$this->multicurrency_total_tva = $obj->multicurrency_total_tva;
|
||||||
$this->multicurrency_total_ttc = $obj->multicurrency_total_ttc;
|
$this->multicurrency_total_ttc = $obj->multicurrency_total_ttc;
|
||||||
|
|
||||||
$this->usenewprice = $obj->usenewprice;
|
$this->usenewprice = $obj->usenewprice;
|
||||||
$this->frequency = $obj->frequency;
|
$this->frequency = $obj->frequency;
|
||||||
$this->unit_frequency = $obj->unit_frequency;
|
$this->unit_frequency = $obj->unit_frequency;
|
||||||
$this->date_when = $this->db->jdate($obj->date_when);
|
$this->date_when = $this->db->jdate($obj->date_when);
|
||||||
$this->date_last_gen = $this->db->jdate($obj->date_last_gen);
|
$this->date_last_gen = $this->db->jdate($obj->date_last_gen);
|
||||||
$this->nb_gen_done = $obj->nb_gen_done;
|
$this->nb_gen_done = $obj->nb_gen_done;
|
||||||
$this->nb_gen_max = $obj->nb_gen_max;
|
$this->nb_gen_max = $obj->nb_gen_max;
|
||||||
$this->auto_validate = $obj->auto_validate;
|
$this->auto_validate = $obj->auto_validate;
|
||||||
$this->generate_pdf = $obj->generate_pdf;
|
$this->generate_pdf = $obj->generate_pdf;
|
||||||
@ -673,8 +675,7 @@ 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
|
||||||
*
|
*
|
||||||
@ -682,7 +683,7 @@ class FactureFournisseurRec extends CommonInvoice
|
|||||||
*/
|
*/
|
||||||
public function fetch_lines()
|
public function fetch_lines()
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
$this->lines = array();
|
$this->lines = array();
|
||||||
|
|
||||||
// Retrieve all extrafield for line
|
// Retrieve all extrafield for line
|
||||||
@ -746,7 +747,7 @@ class FactureFournisseurRec extends CommonInvoice
|
|||||||
$line->product_type = $objp->product_type;
|
$line->product_type = $objp->product_type;
|
||||||
$line->date_start = $objp->date_start;
|
$line->date_start = $objp->date_start;
|
||||||
$line->date_end = $objp->date_end;
|
$line->date_end = $objp->date_end;
|
||||||
$line->info_bits = $objp->info_bits ;
|
$line->info_bits = $objp->info_bits ;
|
||||||
$line->special_code = $objp->special_code;
|
$line->special_code = $objp->special_code;
|
||||||
$line->rang = $objp->rang;
|
$line->rang = $objp->rang;
|
||||||
$line->fk_unit = $objp->fk_unit;
|
$line->fk_unit = $objp->fk_unit;
|
||||||
@ -1462,7 +1463,7 @@ class FactureFournisseurRec extends CommonInvoice
|
|||||||
return $this->LibStatut($this->frequency ? 1 : 0, $this->suspended, $mode, $alreadypaid, empty($this->type) ? 0 : $this->type);
|
return $this->LibStatut($this->frequency ? 1 : 0, $this->suspended, $mode, $alreadypaid, empty($this->type) ? 0 : $this->type);
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Return label of a status
|
* Return label of a status
|
||||||
*
|
*
|
||||||
@ -1475,7 +1476,7 @@ class FactureFournisseurRec extends CommonInvoice
|
|||||||
*/
|
*/
|
||||||
public function LibStatut($recur, $status, $mode = 0, $alreadypaid = -1, $type = 0)
|
public function LibStatut($recur, $status, $mode = 0, $alreadypaid = -1, $type = 0)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $langs;
|
global $langs;
|
||||||
$langs->load('bills');
|
$langs->load('bills');
|
||||||
|
|
||||||
@ -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;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user