Merge branch 'fixes/fix-recap-text-multiligne' into staging
This commit is contained in:
commit
9b1f4c3553
@ -47,7 +47,8 @@ class Bdd {
|
||||
"portal_code","alarm_code","funeral_code",
|
||||
"product_brand","product_reference",
|
||||
"fk_user_uuid",
|
||||
"phone_number","address",'postal_code','city','email','siret_number','tva_intracommu');
|
||||
"phone_number","address",'postal_code','city','email','siret_number','tva_intracommu',
|
||||
'order_number','case_number');
|
||||
$this->whiteTable = array(
|
||||
"client", "lieu", "trajet", "devis", "produit_devis", "facture", "produit", "configuration", "ligne_trajet", "thanato", "article", "defunt", "article_devis", "bibliotheque", "bijou_defunt", "obs_defunt", "hypo_defunt",
|
||||
"client_group_discount","client_group",
|
||||
@ -536,6 +537,8 @@ class Bdd {
|
||||
.$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."devis.order_number as order_number, "
|
||||
.$this->tableprefix."devis.case_number as case_number, "
|
||||
.$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
|
||||
@ -2868,10 +2871,14 @@ class Bdd {
|
||||
devis.num as calendar_uuid,
|
||||
devis.comment as devis_comment,
|
||||
devis.id_client as devis_id_client,
|
||||
devis.order_number as order_number,
|
||||
devis.case_number as case_number,
|
||||
client.nom as client_nom,
|
||||
client.prenom as client_prenom,
|
||||
client.entreprise as client_entreprise,
|
||||
client.adresse as client_adresse,
|
||||
client.mail as client_mail,
|
||||
client.legal_one as client_legal_one,
|
||||
defunt.nom as defunt_nom,
|
||||
defunt.sexe as defunt_sexe,
|
||||
lieu.nom as lieu_nom,
|
||||
@ -2930,10 +2937,14 @@ class Bdd {
|
||||
devis.num as calendar_uuid,
|
||||
devis.comment as devis_comment,
|
||||
devis.id_client as devis_id_client,
|
||||
devis.order_number as order_number,
|
||||
devis.case_number as case_number,
|
||||
client.nom as client_nom,
|
||||
client.prenom as client_prenom,
|
||||
client.entreprise as client_entreprise,
|
||||
client.adresse as client_adresse,
|
||||
client.legal_one as client_legal_one,
|
||||
client.mail as client_mail,
|
||||
defunt.nom as defunt_nom,
|
||||
defunt.sexe as defunt_sexe,
|
||||
lieu.nom as lieu_nom,
|
||||
@ -3015,6 +3026,8 @@ class Bdd {
|
||||
devis.date as devis_date,
|
||||
devis.num as calendar_uuid,
|
||||
devis.comment as devis_comment,
|
||||
devis.order_number as order_number,
|
||||
devis.case_number as case_number,
|
||||
client.nom as client_nom,
|
||||
client.entreprise as client_entreprise,
|
||||
client.adresse as client_adresse,
|
||||
|
||||
@ -145,7 +145,7 @@ class InvoicePdfHandler extends FPDF {
|
||||
}
|
||||
|
||||
private function DrawInvoiceInfoTable(){
|
||||
$this->setY(70);
|
||||
$this->setY(67);
|
||||
$factureDatePaiement = $this->factureData['date_paiement'];
|
||||
$factureDatePaiement = DateTime::createFromFormat('Y-m-d',$factureDatePaiement);
|
||||
$factureDateEcheance = $factureDatePaiement;
|
||||
@ -164,6 +164,12 @@ class InvoicePdfHandler extends FPDF {
|
||||
$this->Cell(40, 7, $this->factureData['num'], 1, 0, 'C');
|
||||
$this->Cell(40, 7, $factureDateEcheance, 1, 1, 'C');
|
||||
|
||||
$this->Ln(2);
|
||||
$orderNumber = ($this->factureData['order_number'] == "" || $this->factureData['order_number'] == "-" ) ? "Aucun" : $this->factureData['order_number'];
|
||||
$caseNumber = ($this->factureData['case_number'] == "" || $this->factureData['case_number'] == "-") ? "Aucun" : $this->factureData['case_number'];
|
||||
$this->Cell(0, 5, FileExportHelpers::FormatTextForExport("Bon de commande: ".$orderNumber),0,1,'C');
|
||||
$this->Cell(0, 5, FileExportHelpers::FormatTextForExport("Numéro de dossier: ".$caseNumber),0,1,'C');
|
||||
|
||||
$this->Ln(8);
|
||||
}
|
||||
|
||||
|
||||
@ -371,19 +371,24 @@ class InvoiceRecapService {
|
||||
|
||||
for ($index_facture_position; $index_facture_position < ($init_index + $max_nb_toget) ; $index_facture_position++) {
|
||||
$date_soin_temp = new DateTime($mois[$index_facture_position]['date_soin']);
|
||||
|
||||
$pdf->SetXY( 6, $y_facture ); $pdf->SetFont('ComicSans','',8); $pdf->Cell( 28, 8, $mois[$index_facture_position]['num'], 0, 0, '');
|
||||
$pdf->SetXY( 29, $y_facture ); $pdf->SetFont('ComicSans','',8); $pdf->Cell( 28, 8, utf8_decode($formatter_ds->format($date_soin_temp)), 0, 0, '');
|
||||
$pdf->SetXY( 47, $y_facture ); $pdf->SetFont('ComicSans','',8); $pdf->Cell( 18, 8, utf8_decode(html_entity_decode($mois[$index_facture_position]['defunt'])), 0, 0, '');
|
||||
$pdf->SetXY( 85, $y_facture ); $pdf->SetFont('ComicSans','',8); $pdf->Cell( 38, 8, FileExportHelpers::FormatTextForExport($mois[$index_facture_position]['produit_references']), 0, 0, '');
|
||||
$pdf->SetXY( 147, $y_facture ); $pdf->SetFont('ComicSans','',8); $pdf->Cell( 13, 8, number_format($mois[$index_facture_position]['montant_htc'],2,'.','').chr(128), 0, 0, 'C');
|
||||
$pdf->SetXY( 168, $y_facture ); $pdf->SetFont('ComicSans','',8); $pdf->Cell( 10, 8, number_format($mois[$index_facture_position]['montant_tva'],2,'.','').chr(128), 0, 0, 'C');
|
||||
$pdf->SetXY( 183, $y_facture ); $pdf->SetFont('ComicSans','',8); $pdf->Cell( 22, 8, number_format($mois[$index_facture_position]['montant_ttc'],2,'.','').chr(128), 0, 0, 'C');
|
||||
$defuntNameText = FileExportHelpers::FormatTextForExport($mois[$index_facture_position]['defunt']);
|
||||
$pdf->SetXY( 6, $y_facture ); $pdf->SetFont('ComicSans','',8); $pdf->Cell( 28, 5, $mois[$index_facture_position]['num'], 0, 0, '');
|
||||
$pdf->SetXY( 29, $y_facture ); $pdf->SetFont('ComicSans','',8); $pdf->Cell( 28, 5, utf8_decode($formatter_ds->format($date_soin_temp)), 0, 0, '');
|
||||
$pdf->SetXY( 47, $y_facture ); $pdf->SetFont('ComicSans','',8); $pdf->MultiCell( 35, 5, $defuntNameText);
|
||||
$pdf->SetXY( 85, $y_facture ); $pdf->SetFont('ComicSans','',8); $pdf->Cell( 38, 5, FileExportHelpers::FormatTextForExport($mois[$index_facture_position]['produit_references']), 0, 0, '');
|
||||
$pdf->SetXY( 147, $y_facture ); $pdf->SetFont('ComicSans','',8); $pdf->Cell( 13, 5, number_format($mois[$index_facture_position]['montant_htc'],2,'.','').chr(128), 0, 0, 'C');
|
||||
$pdf->SetXY( 168, $y_facture ); $pdf->SetFont('ComicSans','',8); $pdf->Cell( 10, 5, number_format($mois[$index_facture_position]['montant_tva'],2,'.','').chr(128), 0, 0, 'C');
|
||||
$pdf->SetXY( 183, $y_facture ); $pdf->SetFont('ComicSans','',8); $pdf->Cell( 22, 5, number_format($mois[$index_facture_position]['montant_ttc'],2,'.','').chr(128), 0, 0, 'C');
|
||||
|
||||
$montant_ht_total = $montant_ht_total+$mois[$index_facture_position]['montant_htc'];
|
||||
$montant_tva_total = $montant_tva_total+$mois[$index_facture_position]['montant_tva'];
|
||||
$montant_ttc_total = $montant_ttc_total+$mois[$index_facture_position]['montant_ttc'];
|
||||
|
||||
$defuntNameTextWidth = $pdf->GetStringWidth($defuntNameText);
|
||||
$defuntNameTextIsMultiline = $defuntNameTextWidth > 35;
|
||||
if($defuntNameTextIsMultiline){
|
||||
$y_facture=$y_facture+5;
|
||||
}
|
||||
$y_facture=$y_facture+5;
|
||||
}
|
||||
|
||||
@ -775,19 +780,24 @@ class InvoiceRecapService {
|
||||
|
||||
for ($index_facture_position; $index_facture_position < ($init_index + $max_nb_toget) ; $index_facture_position++) {
|
||||
$date_soin_temp = new DateTime($client[$index_facture_position]['date_soin']);
|
||||
|
||||
$pdf->SetXY( 6, $y_facture ); $pdf->SetFont('ComicSans','',8); $pdf->Cell( 28, 8, $client[$index_facture_position]['num'], 0, 0, '');
|
||||
$pdf->SetXY( 29, $y_facture ); $pdf->SetFont('ComicSans','',8); $pdf->Cell( 18, 8, utf8_decode($formatter_ds->format($date_soin_temp)), 0, 0, '');
|
||||
$pdf->SetXY( 47, $y_facture ); $pdf->SetFont('ComicSans','',8); $pdf->Cell( 38, 8, utf8_decode(html_entity_decode($client[$index_facture_position]['defunt'])), 0, 0, '');
|
||||
$pdf->SetXY( 85, $y_facture ); $pdf->SetFont('ComicSans','',8); $pdf->Cell( 28, 8, utf8_decode(html_entity_decode($client[$index_facture_position]['produit_references'])), 0, 0, '');
|
||||
$pdf->SetXY( 147, $y_facture ); $pdf->SetFont('ComicSans','',8); $pdf->Cell( 13, 8, number_format($client[$index_facture_position]['montant_htc'],2,'.','').chr(128), 0, 0, 'C');
|
||||
$pdf->SetXY( 168, $y_facture ); $pdf->SetFont('ComicSans','',8); $pdf->Cell( 10, 8, number_format($client[$index_facture_position]['montant_tva'],2,'.','').chr(128), 0, 0, 'C');
|
||||
$pdf->SetXY( 183, $y_facture ); $pdf->SetFont('ComicSans','',8); $pdf->Cell( 22, 8, number_format($client[$index_facture_position]['montant_ttc'],2,'.','').chr(128), 0, 0, 'C');
|
||||
$defuntNameText = FileExportHelpers::FormatTextForExport($client[$index_facture_position]['defunt']);
|
||||
$pdf->SetXY( 6, $y_facture ); $pdf->SetFont('ComicSans','',8); $pdf->Cell( 28, 5, $client[$index_facture_position]['num'], 0, 0, '');
|
||||
$pdf->SetXY( 29, $y_facture ); $pdf->SetFont('ComicSans','',8); $pdf->Cell( 18, 5, utf8_decode($formatter_ds->format($date_soin_temp)), 0, 0, '');
|
||||
$pdf->SetXY( 47, $y_facture ); $pdf->SetFont('ComicSans','',8); $pdf->MultiCell( 35, 5, $defuntNameText);
|
||||
$pdf->SetXY( 85, $y_facture ); $pdf->SetFont('ComicSans','',8); $pdf->Cell( 28, 5, utf8_decode(html_entity_decode($client[$index_facture_position]['produit_references'])), 0, 0, '');
|
||||
$pdf->SetXY( 147, $y_facture ); $pdf->SetFont('ComicSans','',8); $pdf->Cell( 13, 5, number_format($client[$index_facture_position]['montant_htc'],2,'.','').chr(128), 0, 0, 'C');
|
||||
$pdf->SetXY( 168, $y_facture ); $pdf->SetFont('ComicSans','',8); $pdf->Cell( 10, 5, number_format($client[$index_facture_position]['montant_tva'],2,'.','').chr(128), 0, 0, 'C');
|
||||
$pdf->SetXY( 183, $y_facture ); $pdf->SetFont('ComicSans','',8); $pdf->Cell( 22, 5, number_format($client[$index_facture_position]['montant_ttc'],2,'.','').chr(128), 0, 0, 'C');
|
||||
|
||||
$montant_ht_total = $montant_ht_total+$client[$index_facture_position]['montant_htc'];
|
||||
$montant_tva_total = $montant_tva_total+$client[$index_facture_position]['montant_tva'];
|
||||
$montant_ttc_total = $montant_ttc_total+$client[$index_facture_position]['montant_ttc'];
|
||||
|
||||
$defuntNameTextWidth = $pdf->GetStringWidth($defuntNameText);
|
||||
$defuntNameTextIsMultiline = $defuntNameTextWidth > 35;
|
||||
if($defuntNameTextIsMultiline){
|
||||
$y_facture=$y_facture+5;
|
||||
}
|
||||
$y_facture=$y_facture+5;
|
||||
}
|
||||
|
||||
|
||||
6
gestion/lib/Sql/20250206-ADD-ORDER-AND-CASE-NUMBER.sql
Normal file
6
gestion/lib/Sql/20250206-ADD-ORDER-AND-CASE-NUMBER.sql
Normal file
@ -0,0 +1,6 @@
|
||||
alter table oc_gestion_devis
|
||||
add column order_number VARCHAR(255) DEFAULT '',
|
||||
add column case_number VARCHAR(255) DEFAULT '';
|
||||
|
||||
update oc_gestion_devis set order_number = comment;
|
||||
update oc_gestion_devis set order_number = '' where order_number = '-' or order_number = 'Commentaire' or order_number = 'New comment';
|
||||
@ -56,10 +56,27 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col col-md">
|
||||
<hr />
|
||||
<div class="col col-xl mb-3 text-center editable" style="display:inline" data-table="devis" data-column="comment" data-id="<?php echo $_['facture'][0]->id_devis;?>"><?php echo ($_['facture'][0]->dcomment == "" ) ? "-" : $_['facture'][0]->dcomment ; ?></div>
|
||||
<hr />
|
||||
<label class="fw-bold">Commentaires:</label>
|
||||
<div class="col col-xl mb-3 text-center editable"
|
||||
style="display:inline"
|
||||
data-table="devis" data-column="order_number"
|
||||
data-id="<?php echo $_['facture'][0]->id_devis;?>">
|
||||
<?php echo ($_['facture'][0]->order_number == "" ) ? "-" : $_['facture'][0]->order_number ; ?>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col col-md">
|
||||
<label class="fw-bold">Numéro de dossier :</label>
|
||||
<div class="col col-xl mb-3 text-center editable"
|
||||
style="display:inline"
|
||||
data-table="devis" data-column="case_number"
|
||||
data-id="<?php echo $_['facture'][0]->id_devis;?>">
|
||||
<?php echo ($_['facture'][0]->case_number == "" ) ? "-" : $_['facture'][0]->case_number ; ?>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
</div>
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<div><h2>Articles</h2></div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user