Fix: We must use the long label for payment condition on PDF documents
This commit is contained in:
parent
bc5196abd6
commit
45067e7d4d
@ -939,7 +939,7 @@ class Commande extends CommonObject
|
||||
$sql.= ', c.fk_projet, c.remise_percent, c.remise, c.remise_absolue, c.source, c.facture as facturee';
|
||||
$sql.= ', c.note, c.note_public, c.ref_client, c.model_pdf, c.fk_adresse_livraison';
|
||||
$sql.= ', p.code as mode_reglement_code, p.libelle as mode_reglement_libelle';
|
||||
$sql.= ', cr.code as cond_reglement_code, cr.libelle as cond_reglement_libelle, cr.libelle_facture as cond_reglement_libelle_facture';
|
||||
$sql.= ', cr.code as cond_reglement_code, cr.libelle as cond_reglement_libelle, cr.libelle_facture as cond_reglement_libelle_doc';
|
||||
$sql.= ', el.fk_source';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'commande as c';
|
||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'cond_reglement as cr ON (c.fk_cond_reglement = cr.rowid)';
|
||||
@ -983,7 +983,7 @@ class Commande extends CommonObject
|
||||
$this->cond_reglement_id = $obj->fk_cond_reglement;
|
||||
$this->cond_reglement_code = $obj->cond_reglement_code;
|
||||
$this->cond_reglement = $obj->cond_reglement_libelle;
|
||||
$this->cond_reglement_facture = $obj->cond_reglement_libelle_facture;
|
||||
$this->cond_reglement_doc = $obj->cond_reglement_libelle_doc;
|
||||
$this->date_livraison = $obj->date_livraison;
|
||||
$this->adresse_livraison_id = $obj->fk_adresse_livraison; // TODO deprecated
|
||||
$this->fk_delivery_address = $obj->fk_adresse_livraison;
|
||||
@ -1276,9 +1276,9 @@ class Commande extends CommonObject
|
||||
function livraison_array($filtre_statut=-1)
|
||||
{
|
||||
$delivery = new Livraison($this->db);
|
||||
|
||||
|
||||
$deliveryArray = $delivery->livraison_array($filtre_statut);
|
||||
|
||||
|
||||
return $deliveryArray;
|
||||
}
|
||||
|
||||
|
||||
@ -127,7 +127,7 @@ class FactureRec extends Facture
|
||||
$sql.= ", '".$facsrc->cond_reglement_id."'";
|
||||
$sql.= ", '".$facsrc->mode_reglement_id."'";
|
||||
$sql.= ")";
|
||||
|
||||
|
||||
if ( $this->db->query($sql) )
|
||||
{
|
||||
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."facture_rec");
|
||||
@ -194,7 +194,7 @@ class FactureRec extends Facture
|
||||
$sql.= ', f.note, f.note_public, f.fk_user_author';
|
||||
$sql.= ', f.fk_mode_reglement, f.fk_cond_reglement';
|
||||
$sql.= ', p.code as mode_reglement_code, p.libelle as mode_reglement_libelle';
|
||||
$sql.= ', c.code as cond_reglement_code, c.libelle as cond_reglement_libelle, c.libelle_facture as cond_reglement_libelle_facture';
|
||||
$sql.= ', c.code as cond_reglement_code, c.libelle as cond_reglement_libelle, c.libelle_facture as cond_reglement_libelle_doc';
|
||||
$sql.= ', el.fk_source';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'facture_rec as f';
|
||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'cond_reglement as c ON f.fk_cond_reglement = c.rowid';
|
||||
@ -202,7 +202,7 @@ class FactureRec extends Facture
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as el ON el.fk_target = f.rowid AND el.targettype = 'facture'"; // TODO remplacer par une fonction
|
||||
$sql.= ' WHERE f.rowid='.$rowid;
|
||||
if ($socid > 0) $sql.= ' AND f.fk_soc = '.$socid;
|
||||
|
||||
|
||||
$result = $this->db->query($sql);
|
||||
|
||||
if ($result)
|
||||
@ -237,7 +237,7 @@ class FactureRec extends Facture
|
||||
$this->cond_reglement_id = $obj->fk_cond_reglement;
|
||||
$this->cond_reglement_code = $obj->cond_reglement_code;
|
||||
$this->cond_reglement = $obj->cond_reglement_libelle;
|
||||
$this->cond_reglement_facture = $obj->cond_reglement_libelle_facture;
|
||||
$this->cond_reglement_doc = $obj->cond_reglement_libelle_doc;
|
||||
$this->projetid = $obj->fk_projet;
|
||||
$this->fk_facture_source = $obj->fk_facture_source;
|
||||
$this->note = $obj->note;
|
||||
|
||||
@ -554,7 +554,7 @@ class Facture extends CommonObject
|
||||
$sql.= ', f.fk_facture_source';
|
||||
$sql.= ', f.fk_mode_reglement, f.fk_cond_reglement, f.fk_projet';
|
||||
$sql.= ', p.code as mode_reglement_code, p.libelle as mode_reglement_libelle';
|
||||
$sql.= ', c.code as cond_reglement_code, c.libelle as cond_reglement_libelle, c.libelle_facture as cond_reglement_libelle_facture';
|
||||
$sql.= ', c.code as cond_reglement_code, c.libelle as cond_reglement_libelle, c.libelle_facture as cond_reglement_libelle_doc';
|
||||
$sql.= ', el.fk_source';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'facture as f';
|
||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'cond_reglement as c ON f.fk_cond_reglement = c.rowid';
|
||||
@ -599,7 +599,7 @@ class Facture extends CommonObject
|
||||
$this->cond_reglement_id = $obj->fk_cond_reglement;
|
||||
$this->cond_reglement_code = $obj->cond_reglement_code;
|
||||
$this->cond_reglement = $obj->cond_reglement_libelle;
|
||||
$this->cond_reglement_facture = $obj->cond_reglement_libelle_facture;
|
||||
$this->cond_reglement_facture = $obj->cond_reglement_libelle_doc;
|
||||
$this->projetid = $obj->fk_projet;
|
||||
$this->fk_facture_source = $obj->fk_facture_source;
|
||||
$this->note = $obj->note;
|
||||
|
||||
@ -430,7 +430,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
|
||||
$pdf->SetFont('Arial','',8);
|
||||
$pdf->SetXY(50, $posy);
|
||||
$lib_condition_paiement=$outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code)!=('PaymentCondition'.$object->cond_reglement_code)?$outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code):$outputlangs->convToOutputCharset($object->cond_reglement);
|
||||
$lib_condition_paiement=$outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code)!=('PaymentCondition'.$object->cond_reglement_code)?$outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code):$outputlangs->convToOutputCharset($object->cond_reglement_doc);
|
||||
$pdf->MultiCell(80, 5, $lib_condition_paiement,0,'L');
|
||||
|
||||
$posy=$pdf->GetY()+3;
|
||||
|
||||
@ -571,7 +571,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
|
||||
$pdf->SetFont('Arial','',8);
|
||||
$pdf->SetXY(50, $posy);
|
||||
$lib_condition_paiement=$outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code)!=('PaymentCondition'.$object->cond_reglement_code)?$outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code):$outputlangs->convToOutputCharset($object->cond_reglement);
|
||||
$lib_condition_paiement=$outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code)!=('PaymentCondition'.$object->cond_reglement_code)?$outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code):$outputlangs->convToOutputCharset($object->cond_reglement_doc);
|
||||
$pdf->MultiCell(80, 5, $lib_condition_paiement,0,'L');
|
||||
|
||||
$posy=$pdf->GetY()+3;
|
||||
|
||||
@ -481,7 +481,7 @@ class pdf_oursin extends ModelePDFFactures
|
||||
|
||||
$pdf->SetFont('Arial','',8);
|
||||
$pdf->SetXY(50, $posy);
|
||||
$lib_condition_paiement=$outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code)!=('PaymentCondition'.$object->cond_reglement_code)?$outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code):$outputlangs->convToOutputCharset($object->cond_reglement);
|
||||
$lib_condition_paiement=$outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code)!=('PaymentCondition'.$object->cond_reglement_code)?$outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code):$outputlangs->convToOutputCharset($object->cond_reglement_doc);
|
||||
$pdf->MultiCell(80, 5, $lib_condition_paiement,0,'L');
|
||||
|
||||
$posy=$pdf->GetY()+3;
|
||||
|
||||
@ -450,7 +450,7 @@ class pdf_propale_azur extends ModelePDFPropales
|
||||
|
||||
$pdf->SetFont('Arial','',8);
|
||||
$pdf->SetXY(50, $posy);
|
||||
$lib_condition_paiement=$outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code)!=('PaymentCondition'.$object->cond_reglement_code)?$outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code):$outputlangs->convToOutputCharset($object->cond_reglement);
|
||||
$lib_condition_paiement=$outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code)!=('PaymentCondition'.$object->cond_reglement_code)?$outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code):$outputlangs->convToOutputCharset($object->cond_reglement_doc);
|
||||
$pdf->MultiCell(80, 5, $lib_condition_paiement,0,'L');
|
||||
|
||||
$posy=$pdf->GetY()+3;
|
||||
|
||||
@ -802,7 +802,7 @@ class Propal extends CommonObject
|
||||
$sql.= ", p.fk_cond_reglement";
|
||||
$sql.= ", p.fk_mode_reglement";
|
||||
$sql.= ", c.label as statut_label";
|
||||
$sql.= ", cr.code as cond_reglement_code, cr.libelle as cond_reglement, cr.libelle_facture";
|
||||
$sql.= ", cr.code as cond_reglement_code, cr.libelle as cond_reglement, cr.libelle_facture as cond_reglement_libelle_doc";
|
||||
$sql.= ", cp.code as mode_reglement_code, cp.libelle as mode_reglement";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."c_propalst as c, ".MAIN_DB_PREFIX."propal as p";
|
||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as cp ON p.fk_mode_reglement = cp.id';
|
||||
@ -854,7 +854,7 @@ class Propal extends CommonObject
|
||||
$this->cond_reglement_id = $obj->fk_cond_reglement;
|
||||
$this->cond_reglement_code = $obj->cond_reglement_code;
|
||||
$this->cond_reglement = $obj->cond_reglement;
|
||||
$this->cond_reglement_document = $obj->libelle_facture;
|
||||
$this->cond_reglement_doc = $obj->cond_reglement_libelle_doc;
|
||||
|
||||
$this->user_author_id = $obj->fk_user_author;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user