Merge branch 'fixes/fix-thanato-export' into staging
This commit is contained in:
commit
595d269136
@ -1919,19 +1919,23 @@ class Bdd {
|
||||
lieu.latitude as lieu_latitude,
|
||||
lieu.longitude as lieu_longitude,
|
||||
client.nom as nom_client,
|
||||
client.entreprise as client_entreprise
|
||||
client.entreprise as client_entreprise,
|
||||
client.adresse as client_adresse,
|
||||
facture.num as facture_num
|
||||
FROM ".$this->tableprefix."devis as devis
|
||||
LEFT JOIN ".$this->tableprefix."thanato as thanato on devis.id_thanato = thanato.id
|
||||
LEFT JOIN ".$this->tableprefix."lieu as lieu on devis.id_lieu = lieu.id
|
||||
LEFT JOIN ".$this->tableprefix."defunt as defunt on devis.id_defunt = defunt.id
|
||||
LEFT JOIN ".$this->tableprefix."client as client on devis.id_client = client.id
|
||||
LEFT JOIN ".$this->tableprefix."facture as facture on devis.id = facture.id_devis
|
||||
WHERE YEAR(devis.date) = ? AND
|
||||
MONTH(devis.date) = ? AND
|
||||
devis.id_thanato IN ($sqlConditionsPlaceholder)
|
||||
devis.id_thanato IN ($sqlConditionsPlaceholder) AND
|
||||
devis.mentions = ?
|
||||
ORDER BY devis.date ASC;";
|
||||
$devisList = $this->execSQLNoJsonReturn(
|
||||
$sql,
|
||||
array_merge([$currentYear, $currentMonth],$thanatoIds));
|
||||
array_merge([$currentYear, $currentMonth],$thanatoIds,["facturé"]));
|
||||
return $devisList;
|
||||
}
|
||||
|
||||
|
||||
@ -59,6 +59,7 @@ class ExportThanatoStatisticService {
|
||||
|
||||
public function getExportThanatoFileHeader(): string{
|
||||
$fileHeader =
|
||||
'Facture'.';'.
|
||||
'Thanatopracteur'.';'.
|
||||
'Date'.';'.
|
||||
utf8_decode(html_entity_decode('Heure de début')).';'.
|
||||
@ -102,6 +103,7 @@ class ExportThanatoStatisticService {
|
||||
''.';'.
|
||||
''.';'.
|
||||
''.';'.
|
||||
''.';'.
|
||||
utf8_decode(html_entity_decode("$distance"))."\n";
|
||||
return $fileContent;
|
||||
}
|
||||
@ -119,6 +121,7 @@ class ExportThanatoStatisticService {
|
||||
private function populateDevisDataIntoThanatoExportFileContent(string $fileContent,array $devis){
|
||||
$produitAsString = $this->getFormatDevisProduitsAsString($devis["produits"]);
|
||||
$fileContent = $fileContent.
|
||||
utf8_decode(html_entity_decode($devis["facture_num"])).';'.
|
||||
utf8_decode(html_entity_decode($devis['nom_thanato'] . ' ' . $devis['prenom_thanatho'])).';'.
|
||||
utf8_decode(html_entity_decode($devis["date"])).';'.
|
||||
utf8_decode(html_entity_decode($devis["startTime"])).';'.
|
||||
@ -128,7 +131,7 @@ class ExportThanatoStatisticService {
|
||||
utf8_decode(html_entity_decode($devis["nom_defunt"])).';'.
|
||||
utf8_decode(html_entity_decode($devis["nom_lieu"] ?? "")).';'.
|
||||
utf8_decode(html_entity_decode($devis["nom_client"] ?? "")).';'.
|
||||
utf8_decode(html_entity_decode($devis["client_entreprise"] ?? ""))."\n";
|
||||
utf8_decode(html_entity_decode($devis["client_adresse"] ?? ""))."\n";
|
||||
|
||||
return $fileContent;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user