diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index e93f64fbc67..e526b4049f2 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -496,8 +496,7 @@ class FactureRec extends CommonInvoice $sql .= " localtax1 = ".((float) $this->total_localtax1).","; $sql .= " localtax2 = ".((float) $this->total_localtax2).","; $sql .= " total_ht = ".((float) $this->total_ht).","; - $sql .= " total_ttc = ".((float) $this->total_ttc).","; - //$sql .= " remise_percent = ".((float) $this->remise_percent); + $sql .= " total_ttc = ".((float) $this->total_ttc); // TODO Add missing fields $sql .= " WHERE rowid = ".((int) $this->id); diff --git a/htdocs/fourn/class/fournisseur.facture-rec.class.php b/htdocs/fourn/class/fournisseur.facture-rec.class.php index 851a6a76998..373441b0136 100644 --- a/htdocs/fourn/class/fournisseur.facture-rec.class.php +++ b/htdocs/fourn/class/fournisseur.facture-rec.class.php @@ -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( diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index f2f7318b3b4..5417fdc3669 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -451,7 +451,7 @@ class FactureFournisseur extends CommonInvoice } $this->note_public = trim($this->note_public); $this->note_private = trim($this->note_private); - $this->note_private = dol_concatdesc($this->note_private, $langs->trans("GeneratedFromRecurringInvoice", $_facrec->titre)); + $this->note_private = dol_concatdesc($this->note_private, $langs->trans("GeneratedFromRecurringInvoice", $_facrec->title)); $this->array_options = $_facrec->array_options; diff --git a/htdocs/fourn/facture/card-rec.php b/htdocs/fourn/facture/card-rec.php index b58434d6291..d18b2dcf9a3 100644 --- a/htdocs/fourn/facture/card-rec.php +++ b/htdocs/fourn/facture/card-rec.php @@ -191,7 +191,7 @@ if (empty($reshook)) { if (! $error) { $object->titre = GETPOST('title', 'alphanohtml'); // deprecated $object->title = GETPOST('title', 'alphanohtml'); - $object->libelle = GETPOST('libelle', 'alpha'); + $object->libelle = GETPOST('libelle', 'alpha'); // deprecated $object->label = GETPOST('libelle', 'alpha'); $object->fk_project = GETPOST('projectid', 'int'); $object->ref_supplier = GETPOST('ref_supplier', 'alphanohtml'); @@ -287,7 +287,7 @@ if (empty($reshook)) { $result = $object->setValueFrom('titre', $title, '', null, 'text', '', $user); if ($result > 0) { - $object->titre = $title; + $object->titre = $title; // deprecated $object->title = $title; $object->ref = $object->title; } else { @@ -1133,9 +1133,9 @@ if ($action == 'create') { $morehtmlref = ''; if ($action != 'edittitle') { - $morehtmlref .= $form->editfieldkey($object->titre, 'title', $object->titre, $object, $usercancreate, '', '', 0, 2); + $morehtmlref .= $form->editfieldkey($object->title, 'title', $object->titre, $object, $usercancreate, '', '', 0, 2); } else { - $morehtmlref .= $form->editfieldval('', 'title', $object->titre, $object, $usercancreate, 'string'); + $morehtmlref .= $form->editfieldval('', 'title', $object->title, $object, $usercancreate, 'string'); } $morehtmlref .= '