|
@@ -273,7 +273,8 @@ class FactureFournisseurRec extends CommonInvoice
|
|
|
$now = dol_now();
|
|
|
|
|
|
// Clean parameters
|
|
|
- $this->titre = empty($this->titre) ? '' : $this->titre;
|
|
|
+ $this->titre = empty($this->titre) ? '' : $this->titre; // deprecated
|
|
|
+ $this->title = empty($this->title) ? '' : $this->title;
|
|
|
$keyforref = $this->table_ref_field;
|
|
|
$this->ref = $this->$keyforref;
|
|
|
$this->ref_supplier = empty($this->ref_supplier) ? '' : $this->ref_supplier;
|
|
@@ -327,7 +328,7 @@ class FactureFournisseurRec extends CommonInvoice
|
|
|
$sql .= ', auto_validate';
|
|
|
$sql .= ', generate_pdf';
|
|
|
$sql .= ') VALUES (';
|
|
|
- $sql .= "'".$this->db->escape($this->titre)."'";
|
|
|
+ $sql .= "'".$this->db->escape($this->title)."'";
|
|
|
$sql .= ", '".$this->db->escape($this->ref_supplier)."'";
|
|
|
$sql .= ", ".((int) $conf->entity);
|
|
|
$sql .= ", ".((int) $facfourn_src->socid);
|
|
@@ -496,7 +497,7 @@ class FactureFournisseurRec extends CommonInvoice
|
|
|
$error = 0;
|
|
|
|
|
|
$sql = "UPDATE ".MAIN_DB_PREFIX."facture_fourn_rec SET";
|
|
|
- $sql .= " titre = '" . (!empty($this->titre) ? $this->db->escape($this->titre) : "")."'," ;
|
|
|
+ $sql .= " titre = '" . (!empty($this->title) ? $this->db->escape($this->title) : "")."'," ;
|
|
|
$sql .= " ref_supplier = '". (!empty($this->ref_supplier) ? $this->db->escape($this->ref_supplier) : "")."',";
|
|
|
$sql .= " entity = ". (!empty($this->entity) ? ((int) $this->entity) : 1) . ',';
|
|
|
if ($this->fk_soc > 0) $sql .= " fk_soc = ". (int) $this->fk_soc. ',';
|
|
@@ -571,7 +572,7 @@ class FactureFournisseurRec extends CommonInvoice
|
|
|
*/
|
|
|
public function fetch($rowid, $ref = '', $ref_ext = '')
|
|
|
{
|
|
|
- $sql = 'SELECT f.rowid, f.titre, f.ref_supplier, f.entity, f.fk_soc';
|
|
|
+ $sql = 'SELECT f.rowid, f.titre as title, f.ref_supplier, f.entity, f.fk_soc';
|
|
|
$sql .= ', f.datec, f.tms, f.suspended';
|
|
|
$sql .= ', f.libelle as label';
|
|
|
$sql .= ', f.vat_src_code, f.localtax1, f.localtax2';
|
|
@@ -605,7 +606,8 @@ class FactureFournisseurRec extends CommonInvoice
|
|
|
$keyforref = $this->table_ref_field;
|
|
|
|
|
|
$this->id = $obj->rowid;
|
|
|
- $this->titre = $obj->titre;
|
|
|
+ $this->titre = $obj->title;
|
|
|
+ $this->title = $obj->title;
|
|
|
$this->ref = $obj->$keyforref;
|
|
|
$this->ref_supplier = $obj->ref_supplier;
|
|
|
$this->entity = $obj->entity;
|
|
@@ -1375,12 +1377,12 @@ class FactureFournisseurRec extends CommonInvoice
|
|
|
$facturerec->date_last_gen = dol_now();
|
|
|
$facturerec->date_when= $facturerec->getNextDate();
|
|
|
$facturerec->update($user);
|
|
|
- $this->db->commit('createRecurringInvoices Process invoice template id=' .$facturerec->id. ', title=' .$facturerec->titre);
|
|
|
- dol_syslog('createRecurringInvoices Process invoice template ' .$facturerec->titre. ' is finished with a success generation');
|
|
|
+ $this->db->commit('createRecurringInvoices Process invoice template id=' .$facturerec->id. ', title=' .$facturerec->title);
|
|
|
+ dol_syslog('createRecurringInvoices Process invoice template ' .$facturerec->title. ' is finished with a success generation');
|
|
|
$nb_create++;
|
|
|
- $this->output .= $langs->trans('InvoiceGeneratedFromTemplate', $new_fac_fourn->ref, $facturerec->titre)."\n";
|
|
|
+ $this->output .= $langs->trans('InvoiceGeneratedFromTemplate', $new_fac_fourn->ref, $facturerec->title)."\n";
|
|
|
} else {
|
|
|
- $this->db->rollback('createRecurringInvoices Process invoice template id=' .$facturerec->id. ', title=' .$facturerec->titre);
|
|
|
+ $this->db->rollback('createRecurringInvoices Process invoice template id=' .$facturerec->id. ', title=' .$facturerec->title);
|
|
|
}
|
|
|
|
|
|
$parameters = array(
|