group facturation
This commit is contained in:
parent
be2554650c
commit
52f0c6c6c8
@ -2670,6 +2670,7 @@ class Bdd {
|
||||
devis.comment as devis_comment,
|
||||
devis.id_client as devis_id_client,
|
||||
client.nom as client_nom,
|
||||
client.prenom as client_prenom,
|
||||
client.entreprise as client_entreprise,
|
||||
client.adresse as client_adresse,
|
||||
defunt.nom as defunt_nom,
|
||||
@ -2678,6 +2679,7 @@ class Bdd {
|
||||
lieu.adresse as lieu_adresse,
|
||||
thanato.nom as thanato_nom,
|
||||
thanato.prenom as thanato_prenom,
|
||||
client_group_facturation.group_facturation_name as group_facturation_name,
|
||||
'group' as facture_type
|
||||
FROM ".$this->tableprefix."facture as facture
|
||||
LEFT JOIN ".$this->tableprefix."devis as devis on facture.id_devis = devis.id
|
||||
@ -2685,6 +2687,7 @@ class Bdd {
|
||||
LEFT JOIN ".$this->tableprefix."defunt as defunt on devis.id_defunt = defunt.id
|
||||
LEFT JOIN ".$this->tableprefix."lieu as lieu on devis.id_lieu = lieu.id
|
||||
LEFT JOIN ".$this->tableprefix."thanato as thanato on devis.id_thanato = thanato.id
|
||||
LEFT JOIN ".$this->tableprefix."client_group_facturation as client_group_facturation on client.fk_client_group_facturation_id = client_group_facturation.id
|
||||
WHERE client.id IN ($clientIdsSqlPlaceholder) AND
|
||||
YEAR(facture.date_paiement) = ?";
|
||||
|
||||
@ -2721,6 +2724,7 @@ class Bdd {
|
||||
devis.comment as devis_comment,
|
||||
devis.id_client as devis_id_client,
|
||||
client.nom as client_nom,
|
||||
client.prenom as client_prenom,
|
||||
client.entreprise as client_entreprise,
|
||||
client.adresse as client_adresse,
|
||||
defunt.nom as defunt_nom,
|
||||
|
||||
@ -80,7 +80,7 @@ class InvoicePdfHandler extends FPDF {
|
||||
$filename = mb_strtoupper($factureData["client_prenom"],'UTF-8');
|
||||
}
|
||||
else{
|
||||
$filename = 'GROUP_'.mb_strtoupper($factureData["client_nom"],'UTF-8');
|
||||
$filename = 'GROUPE_'.mb_strtoupper($factureData["group_facturation_name"],'UTF-8');
|
||||
}
|
||||
$filename .= $month != 0 ? '_'.DateHelpers::GetMonthPlainString($month) :'';
|
||||
$filename .= "_".$year;
|
||||
@ -97,10 +97,14 @@ class InvoicePdfHandler extends FPDF {
|
||||
}
|
||||
|
||||
private function DrawInvoiceCompanyAndClientInfo(){
|
||||
$clientName = $this->factureData['client_nom'];
|
||||
if($this->factureData['facture_type'] == MultipleFactureTypeConstant::GROUP_FILTER_TYPE){
|
||||
$clientName = $this->factureData['group_facturation_name'];
|
||||
}
|
||||
$this->SetY(40);
|
||||
$this->SetFont('ComicSans', '', 12);
|
||||
$this->Cell(0, 7, FileExportHelpers::FormatTextForExport($this->factureData['configuration']->entreprise), 0, 0);
|
||||
$this->Cell(0, 7, FileExportHelpers::FormatTextForExport($this->factureData['client_nom']), 0, 1,'R');
|
||||
$this->Cell(0, 7, FileExportHelpers::FormatTextForExport($clientName), 0, 1,'R');
|
||||
$this->Cell(0, 7, FileExportHelpers::FormatTextForExport($this->factureData['configuration_adresse']), 0, 0);
|
||||
$this->Cell(0, 7, trim(FileExportHelpers::FormatTextForExport($this->factureData['client_real_adress'])), 0, 1,'R');
|
||||
$this->Cell(0, 7, FileExportHelpers::FormatTextForExport($this->factureData['configuration_adresse_city']), 0, 0);border:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user