From 5e243c92c3ebab76eb65b50bf231a3baba353bfd Mon Sep 17 00:00:00 2001 From: Tiavina Date: Wed, 5 Feb 2025 17:38:43 +0300 Subject: [PATCH] facture payment type on facture details --- gestion/lib/Db/Bdd.php | 4 +++- gestion/templates/content/factureshow.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gestion/lib/Db/Bdd.php b/gestion/lib/Db/Bdd.php index f62607b..5774f97 100644 --- a/gestion/lib/Db/Bdd.php +++ b/gestion/lib/Db/Bdd.php @@ -535,12 +535,14 @@ class Bdd { $sql = "SELECT ".$this->tableprefix."facture.id," . $this->tableprefix . "facture.version," . $this->tableprefix . "facture.num, " .$this->tableprefix."facture.date, ".$this->tableprefix."devis.num as dnum, comment, date_paiement, type_paiement, id_devis, ".$this->tableprefix."client.nom, prenom, entreprise," .$this->tableprefix."devis.comment as dcomment,".$this->tableprefix."lieu.nom as lieu, ".$this->tableprefix."lieu.adresse as adresse_soin," - .$this->tableprefix."defunt.nom as nom_defunt + .$this->tableprefix."defunt.nom as nom_defunt, " + .$this->tableprefix."facture_payment_type.facture_payment_type_label as facture_payment_type_label FROM (".$this->tableprefix."facture LEFT JOIN ".$this->tableprefix."devis on ".$this->tableprefix."facture.id_devis = ".$this->tableprefix."devis.id LEFT JOIN ".$this->tableprefix."lieu on ".$this->tableprefix."devis.id_lieu = ".$this->tableprefix."lieu.id) LEFT JOIN ".$this->tableprefix."client on ".$this->tableprefix."devis.id_client = ".$this->tableprefix."client.id LEFT JOIN ".$this->tableprefix."defunt on ".$this->tableprefix."devis.id_defunt = ".$this->tableprefix."defunt.id + LEFT JOIN ".$this->tableprefix."facture_payment_type on ".$this->tableprefix."facture.fk_facture_payment_type_id = ".$this->tableprefix."facture_payment_type.id WHERE ".$this->tableprefix."facture.id = ?"; // return $this->execSQL($sql, array($numfacture, $idNextcloud)); return $this->execSQL($sql, array($numfacture)); diff --git a/gestion/templates/content/factureshow.php b/gestion/templates/content/factureshow.php index 121ab5e..69a85a3 100644 --- a/gestion/templates/content/factureshow.php +++ b/gestion/templates/content/factureshow.php @@ -48,7 +48,7 @@
Date de facture : date_paiement))->format('d-m-Y');?>, t('Date of service'));?> : date))->format('d-m-Y');?>
- id_devis;?>>Defunt associƩ : nom_defunt;?>, t('Means of payment'));?> : type_paiement;?>
+ id_devis;?>>Defunt associƩ : nom_defunt;?>, t('Means of payment'));?> : facture_payment_type_label ?? "Aucun";?>
Lieu : lieu;?> (adresse_soin;?>)