Merge branch 'fixes/fix-facture-design' into staging
This commit is contained in:
commit
e19a01d0de
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -839,7 +839,7 @@ class PageController extends Controller {
|
||||
$pdf->SetMargins(0,0,0);
|
||||
|
||||
// logo : 80 de largeur et 55 de hauteur
|
||||
$pdf->Image($this->src_path."logo.png", 10, 10, 55, 30);
|
||||
$pdf->Image($this->src_path."logo.png", 10, 10, 55, 30);
|
||||
// adresse du facture
|
||||
$pdf->SetFont('ComicSans','B',11); $_x = 122 ; $_y = 40;
|
||||
$pdf->SetXY( $_x, $_y ); $pdf->Cell( 100, 8, utf8_decode($current_client), 0, 0, ''); $_y += 8;
|
||||
|
||||
@ -324,44 +324,19 @@ class Bdd {
|
||||
return $this->execSQL($sql, array());
|
||||
}
|
||||
|
||||
private function getClientsWithClientGroupDetails(){
|
||||
$sql = "SELECT * FROM ".$this->tableprefix."client as client;";
|
||||
$clientsGroupedByClientEntreprise = $this->execSQLNoJsonReturn($sql,[]);
|
||||
foreach($clientsGroupedByClientEntreprise as &$client){
|
||||
if($client['fk_client_group_id'] == null){
|
||||
$client['client_group_name'] = '';
|
||||
}
|
||||
else{
|
||||
$clientGroup = $this->getClientGroupById($client['fk_client_group_id']);
|
||||
$client['client_group_name'] = $clientGroup != null ? $clientGroup['client_group_name'] : '';
|
||||
}
|
||||
$client['client_type'] = MultipleFactureTypeConstant::CLIENT_FILTER_TYPE;
|
||||
}
|
||||
return $clientsGroupedByClientEntreprise;
|
||||
private function getClientsWithClientType(){
|
||||
$sql = "SELECT client.*,'client' as client_type FROM ".$this->tableprefix."client as client;";
|
||||
$clientsWithClientType = $this->execSQLNoJsonReturn($sql,[]);
|
||||
return $clientsWithClientType;
|
||||
}
|
||||
|
||||
public function getClientsAndClientGroupFacturations(){
|
||||
$clients = $this->getClientsWithClientGroupDetails();
|
||||
$clients = $this->getClientsWithClientType();
|
||||
$clientGroupFacturations = $this->getClientGroupFacturationsWithType();
|
||||
$result = [...$clientGroupFacturations,...$clients];
|
||||
return json_encode($result);
|
||||
}
|
||||
|
||||
public function getClientsGroupedByClientEntreprise(){
|
||||
$sql = "SELECT * FROM ".$this->tableprefix."client as client GROUP BY client.entreprise;";
|
||||
$clientsGroupedByClientEntreprise = $this->execSQLNoJsonReturn($sql,[]);
|
||||
foreach($clientsGroupedByClientEntreprise as &$client){
|
||||
if($client['fk_client_group_id'] == null){
|
||||
$client['client_group_name'] = '';
|
||||
}
|
||||
else{
|
||||
$clientGroup = $this->getClientGroupById($client['fk_client_group_id']);
|
||||
$client['client_group_name'] = $clientGroup != null ? $clientGroup['client_group_name'] : '';
|
||||
}
|
||||
}
|
||||
return json_encode($clientsGroupedByClientEntreprise);
|
||||
}
|
||||
|
||||
public function getFactures($idNextcloud){
|
||||
$sql = "SELECT ".$this->tableprefix."facture.id, ".$this->tableprefix."facture.user_id, ".$this->tableprefix."facture.num, ".$this->tableprefix."facture.date, "
|
||||
.$this->tableprefix."facture.fk_facture_status_key, ".$this->tableprefix."facture.fk_facture_payment_type_id, ".$this->tableprefix."facture.payment_date, "
|
||||
@ -416,7 +391,7 @@ class Bdd {
|
||||
LEFT JOIN ".$this->tableprefix."defunt on ".$this->tableprefix."devis.id_defunt = ".$this->tableprefix."defunt.id
|
||||
LEFT JOIN ".$this->tableprefix."client_group_facturation on ".$this->tableprefix."client.fk_client_group_facturation_id = ".$this->tableprefix."client_group_facturation.id
|
||||
WHERE YEAR(".$this->tableprefix."facture.date_paiement) = ".explode('-', $date)[2]." AND MONTH(".$this->tableprefix."facture.date_paiement) = ".explode('-', $date)[1]."
|
||||
AND ".$this->tableprefix."client.id IN($clientIdsSqlPlaceholder) ORDER BY year DESC, month DESC;";
|
||||
AND ".$this->tableprefix."client.id IN($clientIdsSqlPlaceholder) ORDER BY date_soin ASC";
|
||||
$result = $this->execSQL(
|
||||
sql: $sql,
|
||||
conditions: $clientIdList );
|
||||
@ -447,7 +422,7 @@ class Bdd {
|
||||
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
|
||||
WHERE YEAR(".$this->tableprefix."facture.date_paiement) = ".explode('-', $date)[2]." AND MONTH(".$this->tableprefix."facture.date_paiement) = ".explode('-', $date)[1]."
|
||||
AND ".$this->tableprefix."client.id = ? ORDER BY year DESC, month DESC;";
|
||||
AND ".$this->tableprefix."client.id = ? ORDER BY date_soin ASC";
|
||||
$result = $this->execSQL($sql, array($clientId));
|
||||
return $result;
|
||||
}
|
||||
|
||||
@ -94,6 +94,9 @@ class InvoiceRecapService {
|
||||
$tvaIntraCommuValue = $firstClient["legal_one"];
|
||||
}
|
||||
$defaultConfig = json_decode($this->gestionBdd->getConfiguration(self::DEFAULT_NEXTCLOUD_ADMIN));
|
||||
$configurationAddresses = FileExportHelpers::GetAddressAndCityFromAddress($defaultConfig[0]->adresse);
|
||||
$configurationAddress = $configurationAddresses["address"];
|
||||
$configurationAddressCity = $configurationAddresses["city"];
|
||||
$factures = json_decode($this->gestionBdd->getClientFacturesByClientGroupFacturationIdAndDate($clientGroupId,$date));
|
||||
$factures = array_filter($factures, callback: function($facture) {return $facture->id_client != NULL; });
|
||||
$groupName = "";
|
||||
@ -158,6 +161,7 @@ class InvoiceRecapService {
|
||||
} catch(\OCP\Files\NotPermittedException $e) { }
|
||||
|
||||
$pdf->AddPage();
|
||||
$pdf->SetLineWidth(0.2);
|
||||
// on sup les 2 cm en bas
|
||||
$pdf->SetAutoPagebreak(False);
|
||||
$pdf->SetMargins(0,0,0);
|
||||
@ -166,27 +170,52 @@ class InvoiceRecapService {
|
||||
if($doesLogoExist){
|
||||
$pdf->Image($this->defaultImagePath."logo.png", 10, 10, 75, 25);
|
||||
}
|
||||
|
||||
//adresse de mon entreprise
|
||||
$companyInfoXAxis = 10;
|
||||
$companyInfoYAxis = 40;
|
||||
$pdf->SetFont('ComicSans', '', 11);
|
||||
$pdf->SetXY($companyInfoXAxis,$companyInfoYAxis);
|
||||
$pdf->Cell(0, 7, FileExportHelpers::FormatTextForExport($defaultConfig[0]->entreprise));
|
||||
$companyInfoYAxis += 7;
|
||||
$pdf->SetXY($companyInfoXAxis,$companyInfoYAxis);
|
||||
$pdf->Cell(0, 7, FileExportHelpers::FormatTextForExport($configurationAddress));
|
||||
$companyInfoYAxis += 7;
|
||||
$pdf->SetXY($companyInfoXAxis,$companyInfoYAxis);
|
||||
$pdf->Cell(0, 7, FileExportHelpers::FormatTextForExport($configurationAddressCity));
|
||||
$companyInfoYAxis += 7;
|
||||
$pdf->SetXY($companyInfoXAxis,$companyInfoYAxis);
|
||||
$pdf->Cell(0, 7, FileExportHelpers::FormatTextForExport('Tél : ') . FileExportHelpers::FormatTextForExport($defaultConfig[0]->telephone));
|
||||
$companyInfoYAxis += 7;
|
||||
$pdf->SetXY($companyInfoXAxis,$companyInfoYAxis);
|
||||
$pdf->Cell(0, 7, 'Mail : ' . $defaultConfig[0]->mail);
|
||||
|
||||
|
||||
// adresse du facture
|
||||
$pdf->SetFont('ComicSans','B',11); $_x = 122 ; $_y = 40;
|
||||
$pdf->SetXY( $_x, $_y ); $pdf->Cell( 100, 8, utf8_decode('Groupe '.$groupName), 0, 0, ''); $_y += 8;
|
||||
$clientInfoXAxis = 125;
|
||||
$clientInfoYAxis = 40;
|
||||
$pdf->SetFont('ComicSans','',size: 11);
|
||||
$pdf->SetXY($clientInfoXAxis,$clientInfoYAxis);
|
||||
$pdf->Cell( 0, 7, utf8_decode('Groupe '.$groupName));
|
||||
$clientInfoYAxis += 7;
|
||||
$pdf->SetXY($clientInfoXAxis,$clientInfoYAxis);
|
||||
// date facture
|
||||
$pdf->SetFont('ComicSans','',11); $pdf->SetXY( 122, 60 );
|
||||
$pdf->Cell( 60, 8, "Saint Senoux, le ".utf8_decode($date_formated), 0, 0, '');
|
||||
$pdf->Cell( 0, 7, "Saint Senoux, le ".utf8_decode($date_formated));
|
||||
|
||||
// observations
|
||||
$pdf->SetFont( "ComicSans", "BU", 10 ); $pdf->SetXY( 10, 85 ) ; $pdf->Cell($pdf->GetStringWidth("Objet:"), 0, "Objet:", 0, "L");
|
||||
$pdf->SetFont( "ComicSans", "BU", 10 ); $pdf->SetXY( 10, 95 ) ; $pdf->Cell($pdf->GetStringWidth("Objet:"), 0, "Objet:", 0, "L");
|
||||
$objet = utf8_decode("Récapitulatif Facturation du mois de ").strtoupper(FileExportHelpers::ConvertSpecialChar(explode(' ', $date_formated)[1]));
|
||||
$pdf->SetFont( "ComicSans", "", 10 ); $pdf->SetXY( $pdf->GetStringWidth("Objet")+15, 85 ) ; $pdf->Cell($pdf->GetStringWidth($objet), 0, $objet, 0, "L");
|
||||
$pdf->SetFont( "ComicSans", "", 10 ); $pdf->SetXY( $pdf->GetStringWidth("Objet")+15, 95 ) ; $pdf->Cell($pdf->GetStringWidth($objet), 0, $objet, 0, "L");
|
||||
|
||||
$pdf->SetFont( "ComicSans", "", 10 ); $pdf->SetXY( $pdf->GetStringWidth("Objet")+15, 95 ); $pdf->Cell($pdf->GetStringWidth("Madame, Monsieur"), 0, "Madame, Monsieur", 0, "L");
|
||||
$pdf->SetFont( "ComicSans", "", 10 ); $pdf->SetXY( $pdf->GetStringWidth("Objet")+15, 105 ); $pdf->Cell($pdf->GetStringWidth("Madame, Monsieur"), 0, "Madame, Monsieur", 0, "L");
|
||||
|
||||
$text1 = utf8_decode("Veuillez trouver ci-dessous le récapitulatif de la facturation du mois de ").strtoupper(FileExportHelpers::ConvertSpecialChar(explode(' ', $date_formated)[1])).".";
|
||||
$text2 = utf8_decode("Vous en souhaitant bonne réception.");
|
||||
$text3 = utf8_decode("Veuillez agréer, Madame, Monsieur, mes salutations les meilleures.");
|
||||
|
||||
$pdf->SetFont( "ComicSans", "", 10 ); $pdf->SetXY( $pdf->GetStringWidth("Objet")+15, 105 ) ; $pdf->Cell($pdf->GetStringWidth($text1), 0, $text1, 0, "L");
|
||||
$pdf->SetFont( "ComicSans", "", 10 ); $pdf->SetXY( $pdf->GetStringWidth("Objet")+15, 110 ) ; $pdf->Cell($pdf->GetStringWidth($text2), 0, $text2, 0, "L");
|
||||
$pdf->SetFont( "ComicSans", "", 10 ); $pdf->SetXY( $pdf->GetStringWidth("Objet")+15, 120 ) ; $pdf->Cell($pdf->GetStringWidth($text3), 0, $text3, 0, "L");
|
||||
$pdf->SetFont( "ComicSans", "", 10 ); $pdf->SetXY( $pdf->GetStringWidth("Objet")+15, 115 ) ; $pdf->Cell($pdf->GetStringWidth($text1), 0, $text1, 0, "L");
|
||||
$pdf->SetFont( "ComicSans", "", 10 ); $pdf->SetXY( $pdf->GetStringWidth("Objet")+15, 120 ) ; $pdf->Cell($pdf->GetStringWidth($text2), 0, $text2, 0, "L");
|
||||
$pdf->SetFont( "ComicSans", "", 10 ); $pdf->SetXY( $pdf->GetStringWidth("Objet")+15, 125 ) ; $pdf->Cell($pdf->GetStringWidth($text3), 0, $text3, 0, "L");
|
||||
|
||||
// signature
|
||||
$pdf->SetFont('ComicSans','',11); $pdf->SetXY( 145, 145 );
|
||||
@ -226,26 +255,36 @@ class InvoiceRecapService {
|
||||
$pdf->Image($this->defaultImagePath."logo.png", 10, 10, 75, 25);
|
||||
}
|
||||
|
||||
//adresse de mon entreprise
|
||||
$companyInfoXAxis = 10;
|
||||
$companyInfoYAxis = 40;
|
||||
$pdf->SetFont('ComicSans', '', 11);
|
||||
$pdf->SetXY($companyInfoXAxis,$companyInfoYAxis);
|
||||
$pdf->Cell(0, 7, FileExportHelpers::FormatTextForExport($defaultConfig[0]->entreprise));
|
||||
$companyInfoYAxis += 7;
|
||||
$pdf->SetXY($companyInfoXAxis,$companyInfoYAxis);
|
||||
$pdf->Cell(0, 7, FileExportHelpers::FormatTextForExport($configurationAddress));
|
||||
$companyInfoYAxis += 7;
|
||||
$pdf->SetXY($companyInfoXAxis,$companyInfoYAxis);
|
||||
$pdf->Cell(0, 7, FileExportHelpers::FormatTextForExport($configurationAddressCity));
|
||||
$companyInfoYAxis += 7;
|
||||
$pdf->SetXY($companyInfoXAxis,$companyInfoYAxis);
|
||||
$pdf->Cell(0, 7, FileExportHelpers::FormatTextForExport('Tél : ') . FileExportHelpers::FormatTextForExport($defaultConfig[0]->telephone));
|
||||
$companyInfoYAxis += 7;
|
||||
$pdf->SetXY($companyInfoXAxis,$companyInfoYAxis);
|
||||
$pdf->Cell(0, 7, 'Mail : ' . $defaultConfig[0]->mail);
|
||||
|
||||
// n° page en haute à droite
|
||||
if($nb_page>1){
|
||||
$pdf->SetXY( 120, 5 ); $pdf->SetFont( "ComicSans", "B", 9 ); $pdf->Cell( 160, 8, $num_page . '/' . $nb_page, 0, 0, 'C');
|
||||
}
|
||||
|
||||
// date facture
|
||||
$pdf->SetFont('ComicSans','',11); $pdf->SetXY( 122, 15 );
|
||||
$pdf->SetY(10);
|
||||
$pdf->Cell( 0, 8, "Saint Senoux, le ".utf8_decode($date_formated), 0, 0, 'R');
|
||||
|
||||
// n° facture, date echeance et reglement et obs
|
||||
$pdf->SetLineWidth(0.2); $pdf->SetFillColor(255); $pdf->Rect(114, 20, 85, 8, "DF");
|
||||
$pdf->SetXY( 114, 20 ); $pdf->SetFont( "ComicSans", "B", 12 ); $pdf->Cell( 85, 8, 'FACTURE N'.utf8_decode('°').' FAC/'.$key_annee.'/'.strtoupper(FileExportHelpers::ConvertSpecialChar(explode(' ', $date_formated)[1])), 0, 0, 'C');
|
||||
|
||||
// adresse du facture
|
||||
$pdf->SetFont('ComicSans','B',11);
|
||||
$pdf->SetY(32);
|
||||
// $pdf->SetXY( $x, $y ); $pdf->Cell( 100, 8, 'doit', 0, 0, ''); $y += 8;
|
||||
$pdf->Cell( 0, 6, 'Groupe '.$groupName, 0, 1, 'R');
|
||||
$pdf->Cell( 0, 6, FileExportHelpers::FormatTextForExport('Numéro') . ' Siret: ' . FileExportHelpers::FormatTextForExport($tvaIntraCommuValue), 0, 1, 'R');
|
||||
$clientInfoXAxis = 125;
|
||||
$clientInfoYAxis = 40;
|
||||
$pdf->SetFont('ComicSans','',size: 11);
|
||||
$pdf->SetXY($clientInfoXAxis,$clientInfoYAxis);
|
||||
$pdf->Cell( 0, 7, utf8_decode('Groupe '.$groupName));
|
||||
|
||||
// ***********************
|
||||
// le cadre des articles
|
||||
@ -253,13 +292,24 @@ class InvoiceRecapService {
|
||||
// cadre avec 18 lignes max ! et 118 de hauteur --> 80 + 118 = 198 pour les traits verticaux
|
||||
$pdf->SetLineWidth(0.2); $pdf->Rect(5, 80, 200, 153, "D");
|
||||
// cadre titre des colonnes
|
||||
$pdf->SetFillColor(255);
|
||||
$pdf->Line(5, 90, 205, 90);
|
||||
// les traits verticaux colonnes
|
||||
$pdf->Line(25, 80, 25, 225);
|
||||
$pdf->Line(46, 80, 46, 225);
|
||||
$pdf->Line(84, 80, 84, 225);
|
||||
$pdf->Line(145, 80, 145, 233); $pdf->Line(163, 80, 163, 233);
|
||||
if($num_page == $nb_page) $pdf->Line(183, 80, 183, 240);
|
||||
else $pdf->Line(183, 80, 183, 233);
|
||||
if($num_page == $nb_page){
|
||||
$pdf->Line(183, 80, 183, 240);
|
||||
}
|
||||
else{
|
||||
$pdf->Line(183, 80, 183, 233);
|
||||
}
|
||||
// titre colonne
|
||||
$pdf->SetXY( 1, 81 ); $pdf->SetFont('ComicSans','B',8); $pdf->Cell( 140, 8, "OBJET", 0, 0, 'C');
|
||||
$pdf->SetXY( 1, 81 ); $pdf->SetFont('ComicSans','B',8); $pdf->Cell( 30, 8, FileExportHelpers::FormatTextForExport("N°"), 0, 0, 'C');
|
||||
$pdf->SetXY( 26, 81 ); $pdf->SetFont('ComicSans','B',8); $pdf->Cell( 18, 8, "Date", 0, 0, 'C');
|
||||
$pdf->SetXY( 47, 81 ); $pdf->SetFont('ComicSans','B',8); $pdf->Cell( 35, 8, FileExportHelpers::FormatTextForExport("Défunt"), 0, 0, 'C');
|
||||
$pdf->SetXY( 85, 81 ); $pdf->SetFont('ComicSans','B',8); $pdf->Cell( 60, 8, FileExportHelpers::FormatTextForExport("Société"), 0, 0, 'C');
|
||||
$pdf->SetXY( 147, 81 ); $pdf->SetFont('ComicSans','B',8); $pdf->Cell( 13, 8, "H.T.", 0, 0, 'C');
|
||||
$pdf->SetXY( 168, 81 ); $pdf->SetFont('ComicSans','B',8); $pdf->Cell( 10, 8, "TVA 20%", 0, 0, 'C');
|
||||
$pdf->SetXY( 183, 81 ); $pdf->SetFont('ComicSans','B',8); $pdf->Cell( 22, 8, "T.T.C", 0, 0, 'C');
|
||||
@ -279,9 +329,9 @@ class InvoiceRecapService {
|
||||
$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( 26, $y_facture ); $pdf->SetFont('ComicSans','',8); $pdf->Cell( 28, 8, utf8_decode($formatter_ds->format($date_soin_temp)), 0, 0, '');
|
||||
$pdf->SetXY( 40, $y_facture ); $pdf->SetFont('ComicSans','',8); $pdf->Cell( 18, 8, utf8_decode(html_entity_decode($mois[$index_facture_position]['defunt'])), 0, 0, '');
|
||||
$pdf->SetXY( 86, $y_facture ); $pdf->SetFont('ComicSans','',8); $pdf->Cell( 38, 8, $mois[$index_facture_position]['prenoms_client'].' '.$mois[$index_facture_position]['nom_client'], 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, $mois[$index_facture_position]['nom_client'], 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');
|
||||
@ -306,9 +356,13 @@ class InvoiceRecapService {
|
||||
$pdf->SetFont('ComicSans','',8); $pdf->SetXY( 168, 225 ); $pdf->Cell( 10, 8, number_format($montant_tva_total,2,'.','').chr(128), 0, 0, 'C');
|
||||
$pdf->SetFont('ComicSans','',8); $pdf->SetXY( 183, 225 ); $pdf->Cell( 22, 8, number_format($montant_ttc_total,2,'.','').chr(128), 0, 0, 'C');
|
||||
|
||||
$pdf->Rect(145, 233, 60, 7, "D");
|
||||
$pdf->SetFont('ComicSans','B',8); $pdf->SetXY( 147, 233 ); $pdf->Cell( 30, 6.5, 'TOTAL TTC', 0, 0, 'C');
|
||||
$pdf->SetFont('ComicSans','B',8); $pdf->SetXY( 183, 233 ); $pdf->Cell( 22, 6.5, number_format($montant_ttc_total,2,'.','').chr(128), 0, 0, 'C', true);
|
||||
$pdf->Line(145, 233, 145, 240);
|
||||
$pdf->Line(183, 233, 183, 240);
|
||||
$pdf->Line(183, 233, 205, 233);
|
||||
$pdf->Line(205, 233, 205, 240);
|
||||
$pdf->Line(145, 240, 205, 240);
|
||||
}
|
||||
|
||||
$y1 = 245;
|
||||
@ -336,7 +390,6 @@ class InvoiceRecapService {
|
||||
|
||||
$num_page++;
|
||||
}
|
||||
// var_dump("tonga aty ve");die;
|
||||
$ff_pdf = html_entity_decode(
|
||||
$defaultConfig[0]->path).
|
||||
'/DOCUMENTS RECAPITULATIFS/'.$key_annee.'/'.$key_mois.' '.
|
||||
@ -365,6 +418,9 @@ class InvoiceRecapService {
|
||||
$tvaIntraCommuValue = $firstClient["legal_one"];
|
||||
}
|
||||
$defaultConfig = json_decode($this->gestionBdd->getConfiguration(self::DEFAULT_NEXTCLOUD_ADMIN));
|
||||
$configurationAddresses = FileExportHelpers::GetAddressAndCityFromAddress($defaultConfig[0]->adresse);
|
||||
$configurationAddress = $configurationAddresses["address"];
|
||||
$configurationAddressCity = $configurationAddresses["city"];
|
||||
$factures = json_decode($this->gestionBdd->getClientFacturesByClientIdAndDate(
|
||||
clientId: $clientId,
|
||||
date: $date
|
||||
@ -443,6 +499,7 @@ class InvoiceRecapService {
|
||||
} catch(\OCP\Files\NotPermittedException $e) { }
|
||||
|
||||
$pdf->AddPage();
|
||||
$pdf->SetLineWidth(0.2);
|
||||
// on sup les 2 cm en bas
|
||||
$pdf->SetAutoPagebreak(False);
|
||||
$pdf->SetMargins(0,0,10);
|
||||
@ -451,32 +508,58 @@ class InvoiceRecapService {
|
||||
if($doesLogoExist){
|
||||
$pdf->Image($this->defaultImagePath."logo.png", 10, 10, 75, 25);
|
||||
}
|
||||
|
||||
//adresse de mon entreprise
|
||||
$companyInfoXAxis = 10;
|
||||
$companyInfoYAxis = 40;
|
||||
$pdf->SetFont('ComicSans', '', 11);
|
||||
$pdf->SetXY($companyInfoXAxis,$companyInfoYAxis);
|
||||
$pdf->Cell(0, 7, FileExportHelpers::FormatTextForExport($defaultConfig[0]->entreprise));
|
||||
$companyInfoYAxis += 7;
|
||||
$pdf->SetXY($companyInfoXAxis,$companyInfoYAxis);
|
||||
$pdf->Cell(0, 7, FileExportHelpers::FormatTextForExport($configurationAddress));
|
||||
$companyInfoYAxis += 7;
|
||||
$pdf->SetXY($companyInfoXAxis,$companyInfoYAxis);
|
||||
$pdf->Cell(0, 7, FileExportHelpers::FormatTextForExport($configurationAddressCity));
|
||||
$companyInfoYAxis += 7;
|
||||
$pdf->SetXY($companyInfoXAxis,$companyInfoYAxis);
|
||||
$pdf->Cell(0, 7, FileExportHelpers::FormatTextForExport('Tél : ') . FileExportHelpers::FormatTextForExport($defaultConfig[0]->telephone));
|
||||
$companyInfoYAxis += 7;
|
||||
$pdf->SetXY($companyInfoXAxis,$companyInfoYAxis);
|
||||
$pdf->Cell(0, 7, 'Mail : ' . $defaultConfig[0]->mail);
|
||||
|
||||
|
||||
// adresse du facture
|
||||
$pdf->SetFont('ComicSans','B',size: 11);
|
||||
$pdf->SetY(40);
|
||||
$pdf->Cell( 0, 8, utf8_decode($current_client), 0, 1, 'R');
|
||||
$pdf->Cell( 0, 8, trim(utf8_decode(html_entity_decode($clientAddress))), 0,1,'R');
|
||||
if($clientCity != ''){
|
||||
$pdf->Cell( 0, 8, trim(utf8_decode(html_entity_decode($clientCity))), 0, 1, 'R');
|
||||
}
|
||||
$clientInfoXAxis = 125;
|
||||
$clientInfoYAxis = 40;
|
||||
$pdf->SetFont('ComicSans','',size: 11);
|
||||
$pdf->SetXY($clientInfoXAxis,$clientInfoYAxis);
|
||||
$pdf->Cell( 0, 7, utf8_decode($current_client));
|
||||
$clientInfoYAxis += 7;
|
||||
$pdf->SetXY($clientInfoXAxis,$clientInfoYAxis);
|
||||
$pdf->Cell( 0, 7, trim(utf8_decode(html_entity_decode($clientAddress))));
|
||||
$clientInfoYAxis += 7;
|
||||
$pdf->SetXY($clientInfoXAxis,$clientInfoYAxis);
|
||||
$pdf->Cell( 0, 7, trim(utf8_decode(html_entity_decode($clientCity))));
|
||||
$clientInfoYAxis += 7;
|
||||
$pdf->SetXY($clientInfoXAxis,$clientInfoYAxis);
|
||||
// date facture
|
||||
$pdf->SetFont('ComicSans','',11);
|
||||
$pdf->Cell( 0, 8, "Saint Senoux, le ".utf8_decode($date_formated), 0, 1, 'R');
|
||||
$pdf->Cell( 0, 7, "Saint Senoux, le ".utf8_decode($date_formated));
|
||||
|
||||
// observations
|
||||
$pdf->SetFont( "ComicSans", "BU", 10 ); $pdf->SetXY( 10, 85 ) ; $pdf->Cell($pdf->GetStringWidth("Objet:"), 0, "Objet:", 0, "L");
|
||||
$pdf->SetFont( "ComicSans", "BU", 10 ); $pdf->SetXY( 10, 95 ) ; $pdf->Cell($pdf->GetStringWidth("Objet:"), 0, "Objet:", 0, "L");
|
||||
$objet = utf8_decode("Récapitulatif Facturation du mois de ").strtoupper(FileExportHelpers::ConvertSpecialChar(explode(' ', $date_formated)[1]));
|
||||
$pdf->SetFont( "ComicSans", "", 10 ); $pdf->SetXY( $pdf->GetStringWidth("Objet")+15, 85 ) ; $pdf->Cell($pdf->GetStringWidth($objet), 0, $objet, 0, "L");
|
||||
$pdf->SetFont( "ComicSans", "", 10 ); $pdf->SetXY( $pdf->GetStringWidth("Objet")+15, 95 ) ; $pdf->Cell($pdf->GetStringWidth($objet), 0, $objet, 0, "L");
|
||||
|
||||
$pdf->SetFont( "ComicSans", "", 10 ); $pdf->SetXY( $pdf->GetStringWidth("Objet")+15, 95 ); $pdf->Cell($pdf->GetStringWidth("Madame, Monsieur"), 0, "Madame, Monsieur", 0, "L");
|
||||
$pdf->SetFont( "ComicSans", "", 10 ); $pdf->SetXY( $pdf->GetStringWidth("Objet")+15, 105 ); $pdf->Cell($pdf->GetStringWidth("Madame, Monsieur"), 0, "Madame, Monsieur", 0, "L");
|
||||
|
||||
$text1 = utf8_decode("Veuillez trouver ci-dessous le récapitulatif de la facturation du mois de ").strtoupper(FileExportHelpers::ConvertSpecialChar(explode(' ', $date_formated)[1])).".";
|
||||
$text2 = utf8_decode("Vous en souhaitant bonne réception.");
|
||||
$text3 = utf8_decode("Veuillez agréer, Madame, Monsieur, mes salutations les meilleures.");
|
||||
|
||||
$pdf->SetFont( "ComicSans", "", 10 ); $pdf->SetXY( $pdf->GetStringWidth("Objet")+15, 105 ) ; $pdf->Cell($pdf->GetStringWidth($text1), 0, $text1, 0, "L");
|
||||
$pdf->SetFont( "ComicSans", "", 10 ); $pdf->SetXY( $pdf->GetStringWidth("Objet")+15, 110 ) ; $pdf->Cell($pdf->GetStringWidth($text2), 0, $text2, 0, "L");
|
||||
$pdf->SetFont( "ComicSans", "", 10 ); $pdf->SetXY( $pdf->GetStringWidth("Objet")+15, 120 ) ; $pdf->Cell($pdf->GetStringWidth($text3), 0, $text3, 0, "L");
|
||||
$pdf->SetFont( "ComicSans", "", 10 ); $pdf->SetXY( $pdf->GetStringWidth("Objet")+15, 115 ) ; $pdf->Cell($pdf->GetStringWidth($text1), 0, $text1, 0, "L");
|
||||
$pdf->SetFont( "ComicSans", "", 10 ); $pdf->SetXY( $pdf->GetStringWidth("Objet")+15, 120 ) ; $pdf->Cell($pdf->GetStringWidth($text2), 0, $text2, 0, "L");
|
||||
$pdf->SetFont( "ComicSans", "", 10 ); $pdf->SetXY( $pdf->GetStringWidth("Objet")+15, 125 ) ; $pdf->Cell($pdf->GetStringWidth($text3), 0, $text3, 0, "L");
|
||||
|
||||
// signature
|
||||
$pdf->SetFont('ComicSans','',11); $pdf->SetXY( 145, 145 );
|
||||
@ -516,44 +599,75 @@ class InvoiceRecapService {
|
||||
$pdf->Image($this->defaultImagePath."logo.png", 10, 10, 75, 25);
|
||||
}
|
||||
|
||||
//adresse de mon entreprise
|
||||
$companyInfoXAxis = 10;
|
||||
$companyInfoYAxis = 40;
|
||||
$pdf->SetFont('ComicSans', '', 11);
|
||||
$pdf->SetXY($companyInfoXAxis,$companyInfoYAxis);
|
||||
$pdf->Cell(0, 7, FileExportHelpers::FormatTextForExport($defaultConfig[0]->entreprise));
|
||||
$companyInfoYAxis += 7;
|
||||
$pdf->SetXY($companyInfoXAxis,$companyInfoYAxis);
|
||||
$pdf->Cell(0, 7, FileExportHelpers::FormatTextForExport($configurationAddress));
|
||||
$companyInfoYAxis += 7;
|
||||
$pdf->SetXY($companyInfoXAxis,$companyInfoYAxis);
|
||||
$pdf->Cell(0, 7, FileExportHelpers::FormatTextForExport($configurationAddressCity));
|
||||
$companyInfoYAxis += 7;
|
||||
$pdf->SetXY($companyInfoXAxis,$companyInfoYAxis);
|
||||
$pdf->Cell(0, 7, FileExportHelpers::FormatTextForExport('Tél : ') . FileExportHelpers::FormatTextForExport($defaultConfig[0]->telephone));
|
||||
$companyInfoYAxis += 7;
|
||||
$pdf->SetXY($companyInfoXAxis,$companyInfoYAxis);
|
||||
$pdf->Cell(0, 7, 'Mail : ' . $defaultConfig[0]->mail);
|
||||
|
||||
// n° page en haute à droite
|
||||
if($nb_page>1){
|
||||
$pdf->SetXY( 120, 5 ); $pdf->SetFont( "ComicSans", "B", 9 ); $pdf->Cell( 160, 8, $num_page . '/' . $nb_page, 0, 0, 'C');
|
||||
}
|
||||
|
||||
// date facture
|
||||
$pdf->SetFont('ComicSans','',11);
|
||||
$pdf->SetY(10);
|
||||
$pdf->Cell( 0, 8,"Saint Senoux, le ".utf8_decode($date_formated), 0, 0, 'R');
|
||||
|
||||
// n° facture, date echeance et reglement et obs
|
||||
$pdf->SetLineWidth(0.2); $pdf->SetFillColor(255); $pdf->Rect(114, 20, 85, 8, "DF");
|
||||
$pdf->SetXY( 114, 20 ); $pdf->SetFont( "ComicSans", "B", 12 ); $pdf->Cell( 85, 8, 'FACTURE N'.utf8_decode('°').' FAC/'.$key_annee.'/'.strtoupper(FileExportHelpers::ConvertSpecialChar(explode(' ', $date_formated)[1])), 0, 0, 'C');
|
||||
|
||||
// adresse du facture
|
||||
$pdf->SetFont('ComicSans','B',11);
|
||||
$pdf->SetY(y: 32);
|
||||
$pdf->Cell( 0, 6, utf8_decode($current_client), 0, 1, 'R');
|
||||
$pdf->Cell( 0, 6, trim(utf8_decode(html_entity_decode($clientAddress))), 0, 1, 'R');
|
||||
if($clientCity != ''){
|
||||
$pdf->Cell( 0, 6, trim(utf8_decode(html_entity_decode($clientCity))), 0, 1, 'R');
|
||||
}
|
||||
$pdf->Cell( 0, 6, FileExportHelpers::FormatTextForExport('Numéro') . ' Siret: ' . FileExportHelpers::FormatTextForExport($tvaIntraCommuValue), 0, 1, 'R');
|
||||
$pdf->Cell( 0, 6, 'Email: ' . utf8_decode(html_entity_decode($facture['mail_client'])), 0, 1, 'R');
|
||||
$clientInfoXAxis = 125;
|
||||
$clientInfoYAxis = 40;
|
||||
$pdf->SetFont('ComicSans','',size: 11);
|
||||
$pdf->SetXY($clientInfoXAxis,$clientInfoYAxis);
|
||||
$pdf->Cell( 0, 7, utf8_decode($current_client));
|
||||
$clientInfoYAxis += 7;
|
||||
$pdf->SetXY($clientInfoXAxis,$clientInfoYAxis);
|
||||
$pdf->Cell( 0, 7, trim(utf8_decode(html_entity_decode($clientAddress))));
|
||||
$clientInfoYAxis += 7;
|
||||
$pdf->SetXY($clientInfoXAxis,$clientInfoYAxis);
|
||||
$pdf->Cell( 0, 7, trim(utf8_decode(html_entity_decode($clientCity))));
|
||||
$clientInfoYAxis += 7;
|
||||
$pdf->SetXY($clientInfoXAxis,$clientInfoYAxis);
|
||||
$pdf->Cell( 0, 7, FileExportHelpers::FormatTextForExport('Numéro') . ' Siret: ' . FileExportHelpers::FormatTextForExport($tvaIntraCommuValue));
|
||||
$clientInfoYAxis += 7;
|
||||
$pdf->SetXY($clientInfoXAxis,$clientInfoYAxis);
|
||||
$pdf->Cell( 0, 7, 'Email: ' . utf8_decode(html_entity_decode($facture['mail_client'])),0,1);
|
||||
|
||||
// ***********************
|
||||
// le cadre des articles
|
||||
// ***********************
|
||||
// cadre avec 18 lignes max ! et 118 de hauteur --> 80 + 118 = 198 pour les traits verticaux
|
||||
$pdf->SetLineWidth(0.2); $pdf->Rect(5, 80, 200, 153, "D");
|
||||
$pdf->SetFillColor(255);
|
||||
$pdf->Rect(5, 80, 200, 153, "DF");
|
||||
// cadre titre des colonnes
|
||||
$pdf->Line(5, 90, 205, 90);
|
||||
// les traits verticaux colonnes
|
||||
$pdf->Line(145, 80, 145, 233); $pdf->Line(163, 80, 163, 233);
|
||||
if($num_page == $nb_page) $pdf->Line(183, 80, 183, 240);
|
||||
else $pdf->Line(183, 80, 183, 233);
|
||||
$pdf->Line(25, 80, 25, 225);
|
||||
$pdf->Line(46, 80, 46, 225);
|
||||
$pdf->Line(84, 80, 84, 225);
|
||||
$pdf->Line(145, 80, 145, 233);
|
||||
$pdf->Line(163, 80, 163, 233);
|
||||
if($num_page == $nb_page){
|
||||
|
||||
$pdf->Line(183, 80, 183, 240);
|
||||
}
|
||||
else{
|
||||
$pdf->Line(183, 80, 183, 233);
|
||||
}
|
||||
// titre colonne
|
||||
$pdf->SetXY( 1, 81 ); $pdf->SetFont('ComicSans','B',8); $pdf->Cell( 140, 8, "OBJET", 0, 0, 'C');
|
||||
$pdf->SetXY( 1, 81 ); $pdf->SetFont('ComicSans','B',8); $pdf->Cell( 30, 8, FileExportHelpers::FormatTextForExport("N°"), 0, 0, 'C');
|
||||
$pdf->SetXY( 26, 81 ); $pdf->SetFont('ComicSans','B',8); $pdf->Cell( 18, 8, "Date", 0, 0, 'C');
|
||||
$pdf->SetXY( 47, 81 ); $pdf->SetFont('ComicSans','B',8); $pdf->Cell( 35, 8, FileExportHelpers::FormatTextForExport("Défunt"), 0, 0, 'C');
|
||||
$pdf->SetXY( 85, 81 ); $pdf->SetFont('ComicSans','B',8); $pdf->Cell( 60, 8, "Articles", 0, 0, 'C');
|
||||
$pdf->SetXY( 147, 81 ); $pdf->SetFont('ComicSans','B',8); $pdf->Cell( 13, 8, "H.T.", 0, 0, 'C');
|
||||
$pdf->SetXY( 168, 81 ); $pdf->SetFont('ComicSans','B',8); $pdf->Cell( 10, 8, "TVA 20%", 0, 0, 'C');
|
||||
$pdf->SetXY( 183, 81 ); $pdf->SetFont('ComicSans','B',8); $pdf->Cell( 22, 8, "T.T.C", 0, 0, 'C');
|
||||
@ -573,9 +687,9 @@ class InvoiceRecapService {
|
||||
$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( 32, $y_facture ); $pdf->SetFont('ComicSans','',8); $pdf->Cell( 18, 8, utf8_decode($formatter_ds->format($date_soin_temp)), 0, 0, '');
|
||||
$pdf->SetXY( 50, $y_facture ); $pdf->SetFont('ComicSans','',8); $pdf->Cell( 38, 8, utf8_decode(html_entity_decode($client[$index_facture_position]['defunt'])), 0, 0, '');
|
||||
$pdf->SetXY( 90, $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( 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');
|
||||
@ -594,15 +708,20 @@ class InvoiceRecapService {
|
||||
// si derniere page alors afficher cadre des TVA
|
||||
if ($num_page == $nb_page)
|
||||
{
|
||||
|
||||
$pdf->Line(5, 225, 205, 225);
|
||||
$pdf->SetFont('ComicSans','B',8); $pdf->SetXY( 5, 225 ); $pdf->Cell( 140, 8, 'TOTAL', 0, 0, 'C');
|
||||
$pdf->SetFont('ComicSans','',8); $pdf->SetXY( 147, 225 ); $pdf->Cell( 13, 8, number_format($montant_ht_total,2,'.','').chr(128), 0, 0, 'C');
|
||||
$pdf->SetFont('ComicSans','',8); $pdf->SetXY( 168, 225 ); $pdf->Cell( 10, 8, number_format($montant_tva_total,2,'.','').chr(128), 0, 0, 'C');
|
||||
$pdf->SetFont('ComicSans','',8); $pdf->SetXY( 183, 225 ); $pdf->Cell( 22, 8, number_format($montant_ttc_total,2,'.','').chr(128), 0, 0, 'C');
|
||||
|
||||
$pdf->Rect(145, 233, 60, 7, "D");
|
||||
$pdf->SetFont('ComicSans','B',8); $pdf->SetXY( 147, 233 ); $pdf->Cell( 30, 6.5, 'TOTAL TTC', 0, 0, 'C');
|
||||
$pdf->SetFont('ComicSans','B',8); $pdf->SetXY( 183, 233 ); $pdf->Cell( 22, 6.5, number_format($montant_ttc_total,2,'.','').chr(128), 0, 0, 'C', true);
|
||||
$pdf->Line(145, 233, 145, 240);
|
||||
$pdf->Line(183, 233, 183, 240);
|
||||
$pdf->Line(183, 233, 205, 233);
|
||||
$pdf->Line(205, 233, 205, 240);
|
||||
$pdf->Line(145, 240, 205, 240);
|
||||
}
|
||||
|
||||
$y1 = 245;
|
||||
|
||||
@ -15,18 +15,20 @@ window.addEventListener("DOMContentLoaded", function () {
|
||||
|
||||
$('#clientselector').select2();
|
||||
var documentRecap = document.getElementById("documentrecap");
|
||||
documentRecap.addEventListener("click", async ()=> {
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
const filter = urlParams.get('cli');
|
||||
const year = urlParams.get('annee');
|
||||
const month = urlParams.get('mois');
|
||||
const filterType = urlParams.get('filterType') ?? 'client';
|
||||
|
||||
saveDocumentRecap({
|
||||
filter: filter,
|
||||
year: year,
|
||||
month: month,
|
||||
filterType: filterType
|
||||
});
|
||||
})
|
||||
if(documentRecap){
|
||||
documentRecap.addEventListener("click", async ()=> {
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
const filter = urlParams.get('cli');
|
||||
const year = urlParams.get('annee');
|
||||
const month = urlParams.get('mois');
|
||||
const filterType = urlParams.get('filterType') ?? 'client';
|
||||
|
||||
saveDocumentRecap({
|
||||
filter: filter,
|
||||
year: year,
|
||||
month: month,
|
||||
filterType: filterType
|
||||
});
|
||||
})
|
||||
}
|
||||
});
|
||||
@ -7,7 +7,9 @@ window.addEventListener("DOMContentLoaded", function () {
|
||||
const today = new Date();
|
||||
const formattedDate = today.toISOString().split('T')[0];
|
||||
const dateInput = document.getElementById('facturePaymentDate');
|
||||
dateInput.value = formattedDate;
|
||||
if(dateInput){
|
||||
dateInput.value = formattedDate;
|
||||
}
|
||||
});
|
||||
|
||||
$('body').on('click', '#showFacturePaymentModal', function () {
|
||||
@ -106,15 +108,15 @@ $('body').on('click', '#exportMultipleFactureToPdf', function () {
|
||||
|
||||
});
|
||||
|
||||
let clientSelector = document.getElementById('clientselector');
|
||||
if (clientSelector) {
|
||||
clientSelector.addEventListener('change', function() {
|
||||
let selectedOption = this.options[this.selectedIndex];
|
||||
document.onchange = function(event) {
|
||||
if (event.target && event.target.id === 'clientselector') {
|
||||
let selectedOption = event.target.options[event.target.selectedIndex];
|
||||
let filterType = selectedOption.getAttribute('data-type');
|
||||
let filterTypeInput = document.getElementById('filterType');
|
||||
console.log("filterTypeInput", filterTypeInput);
|
||||
|
||||
if (filterTypeInput) {
|
||||
filterTypeInput.value = filterType;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -122,7 +122,8 @@ document.body.addEventListener('click', e => {
|
||||
} else if("saveIk" == e.target.id) {
|
||||
TrajetDetails.saveIkNextcloud();
|
||||
} else if("apercusFactures" === e.target.id) {
|
||||
let url = generateUrl(`/apps/gestion/factures/apercus?cli=&annee=${(new Date()).getFullYear()}&mois=${(new Date()).getMonth()}&filterType=client`);
|
||||
let url = generateUrl(`/apps/gestion/factures/apercus?cli=&annee=${(new Date()).getFullYear()}&mois=${(new Date()).getMonth()}&filterType=group`);
|
||||
console.log(url);
|
||||
window.location.replace(url);
|
||||
} else if("apercusDevis" === e.target.id) {
|
||||
window.location.replace(generateUrl(`/apps/gestion/devis/apercus?cli=&annee=${(new Date()).getFullYear()}&mois=${(new Date()).getMonth()}`));
|
||||
|
||||
@ -120,15 +120,15 @@
|
||||
?>
|
||||
</div>
|
||||
<div class="col-5 h-100 m-0" style="min-height:250px;">
|
||||
<h5 class="p-3 m-0 text-dark text-center border border-2 border-dark"><?php p($l->t('TO'));?> <span id="entreprise"><?php echo $facture->entreprise ?></span></h6>
|
||||
<h5 class="p-3 m-0 text-dark text-center border border-2 border-dark"><?php p($l->t('TO'));?> <span id="entreprise"><?php echo $facture->nom ?></span></h6>
|
||||
<p class="p-3 m-0 h-auto text-center text-dark text-center border border-top-0 border-2 border-dark">
|
||||
<span id="nomprenom" data-id="0" data-table="devis" data-column="id_client"><?php echo $facture->prenom.' '.$facture->nom ?></span><br />
|
||||
<span id="nomprenom" data-id="0" data-table="devis" data-column="id_client"><?php echo $facture->nom ?></span><br />
|
||||
<span id="adresse"><?php echo $facture->adresse_cli ?></span><br />
|
||||
<span id="mail"><?php echo $facture->mail_cli ?></span><br />
|
||||
<span id="telephone"><?php echo $facture->telephone_cli ?></span><br />
|
||||
<span id="legal_one"><?php echo $facture->legalone_cli ?></span><br />
|
||||
<span id="dateContext" style="display: none"><?php echo $facture->date ?></span>
|
||||
<span id="nomcli" style="display: none"><?php echo $facture->prenom.' '.$facture->nom ?></span>
|
||||
<span id="nomcli" style="display: none"><?php echo $facture->nom ?></span>
|
||||
<span id="idcli" style="display: none"><?php echo $facture->id_cli ?></span>
|
||||
<span id="etp" style="display: none"><?php echo $facture->entreprise ?></span>
|
||||
<span class="pdf" style="display: none"><?php echo $facture->entreprise."_".$facture->id."_v".$facture->version?></span>
|
||||
@ -140,7 +140,7 @@
|
||||
<hr/>
|
||||
<div class="col col-xl text-center">
|
||||
<span>Date de facture : <b><?php echo (new DateTime($facture->date_paiement))->format('d-m-Y');?></b>, </span><span><?php p($l->t('Date of service'));?> : <b><?php echo (new DateTime($facture->date))->format('d-m-Y');?></b></span><br/>
|
||||
<span id="devisid" data-id=<?php echo $facture->id_devis;?>>Défunt associé : <b><?php echo $facture->dnum;?></b>, </span><span><?php p($l->t('Means of payment'));?> : <b><?php echo $facture->type_paiement;?></b></span><br/>
|
||||
<span id="devisid" data-id=<?php echo $facture->id_devis;?>>Défunt associé : <b><?php echo $facture->nom_defunt;?></b>, </span><span><?php p($l->t('Means of payment'));?> : <b><?php echo $facture->facture_payment_type_label ?? "Aucun";?></b></span><br/>
|
||||
<span>Lieu : <b><?php echo $facture->lieu;?> (<?php echo $facture->adresse_soin;?>)</b>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user