facture payment type on facture details

This commit is contained in:
Tiavina 2025-02-05 17:38:43 +03:00
parent 83f8c7c0eb
commit 5e243c92c3
2 changed files with 4 additions and 2 deletions

View File

@ -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));

View File

@ -48,7 +48,7 @@
<hr/>
<div class="col col-xl mb-3 text-center">
<span>Date de facture : <b><?php echo (new DateTime($_['facture'][0]->date_paiement))->format('d-m-Y');?></b>, </span><span><?php p($l->t('Date of service'));?> : <b><?php echo (new DateTime($_['facture'][0]->date))->format('d-m-Y');?></b></span><br/>
<span id="devisid" data-id=<?php echo $_['facture'][0]->id_devis;?>>Defunt associé : <b><?php echo $_['facture'][0]->nom_defunt;?></b>, </span><span><?php p($l->t('Means of payment'));?> : <b><?php echo $_['facture'][0]->type_paiement;?></b></span><br/>
<span id="devisid" data-id=<?php echo $_['facture'][0]->id_devis;?>>Defunt associé : <b><?php echo $_['facture'][0]->nom_defunt;?></b>, </span><span><?php p($l->t('Means of payment'));?> : <b><?php echo $_['facture'][0]->facture_payment_type_label ?? "Aucun";?></b></span><br/>
<span>Lieu : <b><?php echo $_['facture'][0]->lieu;?> (<?php echo $_['facture'][0]->adresse_soin;?>)</b>
</div>
<hr/>