Merge branch 'features/feature-pacemaker-certificate' into staging

This commit is contained in:
Tiavina 2025-01-21 10:23:13 +03:00
commit da4cf40faa
16 changed files with 399 additions and 170 deletions

File diff suppressed because one or more lines are too long

View File

@ -821,7 +821,8 @@ class PageController extends Controller {
foreach ($annee as $key_mois => $mois) { foreach ($annee as $key_mois => $mois) {
foreach ($mois as $key_client => $client) { foreach ($mois as $key_client => $client) {
$pdf = new FPDF(); $pdf = new FPDF();
$pdf->AddFont('ComicSans','','Comic Sans MS.php');
$pdf->AddFont('ComicSans','B','comic-sans-bold.php');
$current_client = ''; $current_client = '';
$clientAddress = ''; $clientAddress = '';
$clientCity = ''; $clientCity = '';
@ -855,7 +856,7 @@ class PageController extends Controller {
$pdf->Image($this->defaultImagePath."logo.png", 10, 10, 75, 25); $pdf->Image($this->defaultImagePath."logo.png", 10, 10, 75, 25);
} }
// adresse du facture // adresse du facture
$pdf->SetFont('Arial','B',size: 11); $pdf->SetFont('ComicSans','B',size: 11);
$pdf->SetY(40); $pdf->SetY(40);
$pdf->Cell( 0, 8, utf8_decode($current_client), 0, 1, 'R'); $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'); $pdf->Cell( 0, 8, trim(utf8_decode(html_entity_decode($clientAddress))), 0,1,'R');
@ -863,26 +864,26 @@ class PageController extends Controller {
$pdf->Cell( 0, 8, trim(utf8_decode(html_entity_decode($clientCity))), 0, 1, 'R'); $pdf->Cell( 0, 8, trim(utf8_decode(html_entity_decode($clientCity))), 0, 1, 'R');
} }
// date facture // date facture
$pdf->SetFont('Arial','',11); $pdf->SetFont('ComicSans','',11);
$pdf->Cell( 0, 8, "Saint Senoux, le ".utf8_decode($date_formated), 0, 1, 'R'); $pdf->Cell( 0, 8, "Saint Senoux, le ".utf8_decode($date_formated), 0, 1, 'R');
// observations // observations
$pdf->SetFont( "Arial", "BU", 10 ); $pdf->SetXY( 10, 85 ) ; $pdf->Cell($pdf->GetStringWidth("Objet:"), 0, "Objet:", 0, "L"); $pdf->SetFont( "ComicSans", "BU", 10 ); $pdf->SetXY( 10, 85 ) ; $pdf->Cell($pdf->GetStringWidth("Objet:"), 0, "Objet:", 0, "L");
$objet = utf8_decode("Récapitulatif Facturation du mois de ").strtoupper($this->convert_special_char(explode(' ', $date_formated)[1])); $objet = utf8_decode("Récapitulatif Facturation du mois de ").strtoupper($this->convert_special_char(explode(' ', $date_formated)[1]));
$pdf->SetFont( "Arial", "", 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, 85 ) ; $pdf->Cell($pdf->GetStringWidth($objet), 0, $objet, 0, "L");
$pdf->SetFont( "Arial", "", 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, 95 ); $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($this->convert_special_char(explode(' ', $date_formated)[1]))."."; $text1 = utf8_decode("Veuillez trouver ci-dessous le récapitulatif de la facturation du mois de ").strtoupper($this->convert_special_char(explode(' ', $date_formated)[1])).".";
$text2 = utf8_decode("Vous en souhaitant bonne réception."); $text2 = utf8_decode("Vous en souhaitant bonne réception.");
$text3 = utf8_decode("Veuillez agréer, Madame, Monsieur, mes salutations les meilleures."); $text3 = utf8_decode("Veuillez agréer, Madame, Monsieur, mes salutations les meilleures.");
$pdf->SetFont( "Arial", "", 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, 105 ) ; $pdf->Cell($pdf->GetStringWidth($text1), 0, $text1, 0, "L");
$pdf->SetFont( "Arial", "", 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, 110 ) ; $pdf->Cell($pdf->GetStringWidth($text2), 0, $text2, 0, "L");
$pdf->SetFont( "Arial", "", 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, 120 ) ; $pdf->Cell($pdf->GetStringWidth($text3), 0, $text3, 0, "L");
// signature // signature
$pdf->SetFont('Arial','',11); $pdf->SetXY( 145, 145 ); $pdf->SetFont('ComicSans','',11); $pdf->SetXY( 145, 145 );
$pdf->Cell( $pdf->GetStringWidth($current_config[0]->nom.' '.$current_config[0]->prenom), 0, utf8_decode(html_entity_decode($current_config[0]->nom.' '.$current_config[0]->prenom)), 0, 0, 'L'); $pdf->Cell( $pdf->GetStringWidth($current_config[0]->nom.' '.$current_config[0]->prenom), 0, utf8_decode(html_entity_decode($current_config[0]->nom.' '.$current_config[0]->prenom)), 0, 0, 'L');
$signatureExists = $this->signatureImageExists('sign.png'); $signatureExists = $this->signatureImageExists('sign.png');
if($signatureExists){ if($signatureExists){
@ -892,7 +893,7 @@ class PageController extends Controller {
$y0 = 260; $y0 = 260;
$pageWidth = $pdf->GetPageWidth(); $pageWidth = $pdf->GetPageWidth();
//Positionnement en bas et tout centrer //Positionnement en bas et tout centrer
$pdf->SetFont('Arial','',7); $pdf->SetFont('ComicSans','',7);
$pdf->SetXY( 1, $y0 + 4 ); $pdf->Cell( $pageWidth, 5, utf8_decode(html_entity_decode($current_config[0]->mentions_default)), 0, 0, 'C'); $pdf->SetXY( 1, $y0 + 4 ); $pdf->Cell( $pageWidth, 5, utf8_decode(html_entity_decode($current_config[0]->mentions_default)), 0, 0, 'C');
$pdf->SetXY( 1, $y0 + 8 ); $pdf->Cell( $pageWidth, 5, utf8_decode(html_entity_decode($current_config[0]->legal_one)), 0, 0, 'C'); $pdf->SetXY( 1, $y0 + 8 ); $pdf->Cell( $pageWidth, 5, utf8_decode(html_entity_decode($current_config[0]->legal_one)), 0, 0, 'C');
$pdf->SetXY( 1, $y0 + 12 ); $pdf->Cell( $pageWidth, 5, utf8_decode(html_entity_decode($current_config[0]->legal_two)), 0, 0, 'C'); $pdf->SetXY( 1, $y0 + 12 ); $pdf->Cell( $pageWidth, 5, utf8_decode(html_entity_decode($current_config[0]->legal_two)), 0, 0, 'C');
@ -921,20 +922,20 @@ class PageController extends Controller {
// n° page en haute à droite // n° page en haute à droite
if($nb_page>1){ if($nb_page>1){
$pdf->SetXY( 120, 5 ); $pdf->SetFont( "Arial", "B", 9 ); $pdf->Cell( 160, 8, $num_page . '/' . $nb_page, 0, 0, 'C'); $pdf->SetXY( 120, 5 ); $pdf->SetFont( "ComicSans", "B", 9 ); $pdf->Cell( 160, 8, $num_page . '/' . $nb_page, 0, 0, 'C');
} }
// date facture // date facture
$pdf->SetFont('Arial','',11); $pdf->SetFont('ComicSans','',11);
$pdf->SetY(10); $pdf->SetY(10);
$pdf->Cell( 0, 8,"Saint Senoux, le ".utf8_decode($date_formated), 0, 0, 'R'); $pdf->Cell( 0, 8,"Saint Senoux, le ".utf8_decode($date_formated), 0, 0, 'R');
// n° facture, date echeance et reglement et obs // n° facture, date echeance et reglement et obs
$pdf->SetLineWidth(0.1); $pdf->SetFillColor(255); $pdf->Rect(114, 20, 85, 8, "DF"); $pdf->SetLineWidth(0.1); $pdf->SetFillColor(255); $pdf->Rect(114, 20, 85, 8, "DF");
$pdf->SetXY( 114, 20 ); $pdf->SetFont( "Arial", "B", 12 ); $pdf->Cell( 85, 8, 'FACTURE N'.utf8_decode('°').' FAC/'.$key_annee.'/'.strtoupper($this->convert_special_char(explode(' ', $date_formated)[1])), 0, 0, 'C'); $pdf->SetXY( 114, 20 ); $pdf->SetFont( "ComicSans", "B", 12 ); $pdf->Cell( 85, 8, 'FACTURE N'.utf8_decode('°').' FAC/'.$key_annee.'/'.strtoupper($this->convert_special_char(explode(' ', $date_formated)[1])), 0, 0, 'C');
// adresse du facture // adresse du facture
$pdf->SetFont('Arial','B',11); $pdf->SetFont('ComicSans','B',11);
$pdf->SetY(y: 32); $pdf->SetY(y: 32);
$pdf->Cell( 0, 6, utf8_decode($current_client), 0, 1, 'R'); $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'); $pdf->Cell( 0, 6, trim(utf8_decode(html_entity_decode($clientAddress))), 0, 1, 'R');
@ -956,10 +957,10 @@ class PageController extends Controller {
if($num_page == $nb_page) $pdf->Line(183, 80, 183, 240); if($num_page == $nb_page) $pdf->Line(183, 80, 183, 240);
else $pdf->Line(183, 80, 183, 233); else $pdf->Line(183, 80, 183, 233);
// titre colonne // titre colonne
$pdf->SetXY( 1, 81 ); $pdf->SetFont('Arial','B',8); $pdf->Cell( 140, 8, "OBJET", 0, 0, 'C'); $pdf->SetXY( 1, 81 ); $pdf->SetFont('ComicSans','B',8); $pdf->Cell( 140, 8, "OBJET", 0, 0, 'C');
$pdf->SetXY( 147, 81 ); $pdf->SetFont('Arial','B',8); $pdf->Cell( 13, 8, "H.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('Arial','B',8); $pdf->Cell( 10, 8, "TVA 20%", 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('Arial','B',8); $pdf->Cell( 22, 8, "T.T.C", 0, 0, 'C'); $pdf->SetXY( 183, 81 ); $pdf->SetFont('ComicSans','B',8); $pdf->Cell( 22, 8, "T.T.C", 0, 0, 'C');
// (new DateTime($facture['date_soin']))->format('d-M') // (new DateTime($facture['date_soin']))->format('d-M')
$formatter_ds = new IntlDateFormatter('fr_FR', IntlDateFormatter::SHORT, IntlDateFormatter::NONE); $formatter_ds = new IntlDateFormatter('fr_FR', IntlDateFormatter::SHORT, IntlDateFormatter::NONE);
@ -975,13 +976,13 @@ class PageController extends Controller {
for ($index_facture_position; $index_facture_position < ($init_index + $max_nb_toget) ; $index_facture_position++) { 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']); $date_soin_temp = new DateTime($client[$index_facture_position]['date_soin']);
$pdf->SetXY( 6, $y_facture ); $pdf->SetFont('Arial','',8); $pdf->Cell( 28, 8, $client[$index_facture_position]['num'], 0, 0, ''); $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('Arial','',8); $pdf->Cell( 18, 8, utf8_decode($formatter_ds->format($date_soin_temp)), 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('Arial','',8); $pdf->Cell( 38, 8, utf8_decode(html_entity_decode($client[$index_facture_position]['defunt'])), 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('Arial','',8); $pdf->Cell( 28, 8, utf8_decode(html_entity_decode($client[$index_facture_position]['produit_references'])), 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( 147, $y_facture ); $pdf->SetFont('Arial','',8); $pdf->Cell( 13, 8, number_format($client[$index_facture_position]['montant_htc'],2,'.','').chr(128), 0, 0, 'C'); $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('Arial','',8); $pdf->Cell( 10, 8, number_format($client[$index_facture_position]['montant_tva'],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('Arial','',8); $pdf->Cell( 22, 8, number_format($client[$index_facture_position]['montant_ttc'],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');
$montant_ht_total = $montant_ht_total+$client[$index_facture_position]['montant_htc']; $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_tva_total = $montant_tva_total+$client[$index_facture_position]['montant_tva'];
@ -998,14 +999,14 @@ class PageController extends Controller {
if ($num_page == $nb_page) if ($num_page == $nb_page)
{ {
$pdf->Line(5, 225, 205, 225); $pdf->Line(5, 225, 205, 225);
$pdf->SetFont('Arial','B',8); $pdf->SetXY( 5, 225 ); $pdf->Cell( 140, 8, 'TOTAL', 0, 0, 'C'); $pdf->SetFont('ComicSans','B',8); $pdf->SetXY( 5, 225 ); $pdf->Cell( 140, 8, 'TOTAL', 0, 0, 'C');
$pdf->SetFont('Arial','',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( 147, 225 ); $pdf->Cell( 13, 8, number_format($montant_ht_total,2,'.','').chr(128), 0, 0, 'C');
$pdf->SetFont('Arial','',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( 168, 225 ); $pdf->Cell( 10, 8, number_format($montant_tva_total,2,'.','').chr(128), 0, 0, 'C');
$pdf->SetFont('Arial','',8); $pdf->SetXY( 183, 225 ); $pdf->Cell( 22, 8, number_format($montant_ttc_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->Rect(145, 233, 60, 7, "D");
$pdf->SetFont('Arial','B',8); $pdf->SetXY( 147, 233 ); $pdf->Cell( 30, 6.5, 'TOTAL TTC', 0, 0, 'C'); $pdf->SetFont('ComicSans','B',8); $pdf->SetXY( 147, 233 ); $pdf->Cell( 30, 6.5, 'TOTAL TTC', 0, 0, 'C');
$pdf->SetFont('Arial','B',8); $pdf->SetXY( 183, 233 ); $pdf->Cell( 22, 6.5, number_format($montant_ttc_total,2,'.','').chr(128), 0, 0, 'C', true); $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);
} }
$y1 = 245; $y1 = 245;
@ -1013,7 +1014,7 @@ class PageController extends Controller {
$pdf->SetFillColor(255); $pdf->SetFillColor(255);
$pdf->SetTextColor(0, 0, 0); $pdf->SetTextColor(0, 0, 0);
$pdf->SetFont('Arial','',9); $pdf->SetFont('ComicSans','',9);
$pdf->SetXY( 10, $y1 );$pdf->Cell( $pdf->GetPageWidth(), 4, utf8_decode("Loi N° 92-442 du 31 décembre 1992: La présente facture est payable en comptant a réception."), 0, 0, 'L'); $pdf->SetXY( 10, $y1 );$pdf->Cell( $pdf->GetPageWidth(), 4, utf8_decode("Loi N° 92-442 du 31 décembre 1992: La présente facture est payable en comptant a réception."), 0, 0, 'L');
$pdf->SetXY( 10, $y1 + 4 );$pdf->Cell( $pdf->GetPageWidth(), 4, utf8_decode("Indemnité forfaitaire pour frais de recouvrement due en cas de retard de paiement: 40").chr(128), 0, 0, 'L'); $pdf->SetXY( 10, $y1 + 4 );$pdf->Cell( $pdf->GetPageWidth(), 4, utf8_decode("Indemnité forfaitaire pour frais de recouvrement due en cas de retard de paiement: 40").chr(128), 0, 0, 'L');
@ -1023,7 +1024,7 @@ class PageController extends Controller {
// pied de page // pied de page
// ************************** // **************************
$pdf->SetFont('Arial','',7); $pdf->SetFont('ComicSans','',7);
$pdf->SetXY( 1, $y0 + 4 ); $pdf->Cell( $pageWidth, 5, utf8_decode(html_entity_decode($current_config[0]->mentions_default)), 0, 0, 'C'); $pdf->SetXY( 1, $y0 + 4 ); $pdf->Cell( $pageWidth, 5, utf8_decode(html_entity_decode($current_config[0]->mentions_default)), 0, 0, 'C');
$pdf->SetXY( 1, $y0 + 8 );$pdf->Cell( $pageWidth, 5, utf8_decode(html_entity_decode($current_config[0]->legal_one)), 0, 0, 'C'); $pdf->SetXY( 1, $y0 + 8 );$pdf->Cell( $pageWidth, 5, utf8_decode(html_entity_decode($current_config[0]->legal_one)), 0, 0, 'C');
$pdf->SetXY( 1, $y0 + 12 );$pdf->Cell( $pageWidth, 5, utf8_decode(html_entity_decode($current_config[0]->legal_two)), 0, 0, 'C'); $pdf->SetXY( 1, $y0 + 12 );$pdf->Cell( $pageWidth, 5, utf8_decode(html_entity_decode($current_config[0]->legal_two)), 0, 0, 'C');
@ -2246,103 +2247,6 @@ class PageController extends Controller {
return json_encode($res); return json_encode($res);
} }
/**
* @NoAdminRequired
* @NoCSRFRequired
* @param string $numdefunt
*/
public function saveAttestationPacemaker($numdefunt){
$defunt = json_decode($this->myDb->getOneDefunt($numdefunt, $this->idNextcloud))[0];
$date_deces = new DateTimeImmutable($defunt->date_defunt);
$date_naissance = new DateTimeImmutable($defunt->date_naissance);
$date_habilitation = new DateTimeImmutable($defunt->date_habilitation);
$today = new DateTimeImmutable();
$current_config = json_decode($this->myDb->getConfiguration($this->idNextcloud));
if($defunt->id_devis != NULL) {
try {
$nomDefunt = $defunt->nom_defunt;
$folderDestination = html_entity_decode($current_config[0]->path).'/CLIENTS/'.strtoupper($defunt->entreprise).'/DEFUNTS/'.strtoupper($nomDefunt).'/ATTESTATION/';
try {
$this->storage->newFolder($folderDestination);
} catch(\OCP\Files\NotPermittedException $e) { }
// TODO: init pdf
$pdf = new FPDF();
$pdf->AddPage();
// on sup les 2 cm en bas
$pdf->SetAutoPagebreak(True);
$pdf->SetMargins(0,0,0);
// logo : 80 de largeur et 55 de hauteur
$logo = $this->getLogo();
if($logo != 'nothing'){
$pdf->Image($this->defaultImagePath."logo.png", 10, 10, 75, 20);
}
$pdf->SetY(55); $pdf->SetFont('Arial', 'B', 15); $pdf->Cell(0, 10, "ATTESTATION", 0, 0, 'C');
$pdf->SetMargins(15,0,15);
$pdf->SetY(80); $pdf->SetFont('Arial', '', 10);
$pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("Je soussigné(e) ".$defunt->prenom_thanato." ".strtoupper($defunt->nom_thanato).", Thanatopracteur, agissant pour le compte de la société ".strtoupper($current_config[0]->entreprise)." titulaire de l'habilitation n°".$defunt->reference_habilitation." du ". $date_habilitation->format('d/m/Y') . " certifie avoir procédé au retrait du simulateur cardiaque ou de la prothèse fonctionnant au moyen d'une pile de référence : ".$defunt->ref_pacemaker." ainsi qu'à la reconstruction tégumentaire de :
".(strcmp($defunt->sexe, 'm')==0 ? 'Monsieur' : 'Madame').". ".$defunt->nom_defunt."
Date de naissance : ".$date_naissance->format('d/m/Y')."
Date de décès : ".utf8_decode($date_deces->format('d/m/Y')))), '','J',0);
$pdf->setY($pdf->GetY()+10);
$pdf->Line(15, $pdf->GetY(), $pdf->GetPageWidth()-15, $pdf->GetY());
$pdf->setY($pdf->GetY()+10);
$pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("Acte effectué à l'adresse suivante:
".$defunt->nom_lieu."
".$defunt->adresse_lieu)), '','J',0);
$pdf->setY($pdf->GetY()+10);
$pdf->Line(15, $pdf->GetY(), $pdf->GetPageWidth()-15, $pdf->GetY());
$pdf->setY($pdf->GetY()+10);
$pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("Cette attestation est remise pour faire valoir ce que de droit.
Fait à Saint Senoux le ".$today->format('d/m/Y'))), '','J',0);
$pdf->setY($pdf->GetY()+10);
// signature
$pdf->SetFont('Arial','',11);
$pdf->setY($pdf->GetY()+10);
$pdf->Cell( $pdf->GetPageWidth()-30, 0, utf8_decode(html_entity_decode($current_config[0]->nom).' '.html_entity_decode($current_config[0]->prenom)), 0, 0, 'L');
$pdf->setY($pdf->GetY()+5);
$signatureExist = $this->signatureImageExists('sign.png');
if($signatureExist){
$pdf->Image($this->defaultImagePath."sign.png", 15, $pdf->GetY(), 55, 30);
}
$pdf->setY($pdf->GetY()-5);
$pdf->SetFont('Arial','',11); $pdf->Cell( $pdf->GetPageWidth()-80, 0, "Pour :", 0, 0, 'R');
// Positionnement à 1,5 cm du bas
$pdf->SetY(-30); $pdf->SetFont('Arial', '', 8); $pdf->MultiCell($pdf->GetPageWidth()-30, 5, utf8_decode(html_entity_decode(iconv("UTF-8", "ISO-8859-1//TRANSLIT", $current_config[0]->legal_one))), '', 'C');
$pdf->SetFont('Arial', '', 8); $pdf->MultiCell($pdf->GetPageWidth()-30, 5, utf8_decode(html_entity_decode(iconv("UTF-8", "ISO-8859-1//TRANSLIT", $current_config[0]->legal_two))), '', 'C');
$pdf->SetFont('Arial', '', 8); $pdf->MultiCell($pdf->GetPageWidth()-30, 5, utf8_decode(html_entity_decode(iconv("UTF-8", "ISO-8859-1//TRANSLIT", $current_config[0]->telephone))), '', 'C');
$ff_pdf = $folderDestination.'ATTESTATION_PACEMAKER_'.strtoupper($nomDefunt).'.pdf';
$this->storage->newFile($ff_pdf);
$pdfContent = $pdf->Output('','S');
$file_pdf = $this->storage->get($ff_pdf);
$file_pdf->putContent($pdfContent);
$res = array();
$res['path'] = $folderDestination;
return json_encode($res);
} catch(\OCP\Files\NotFoundException $e) {
return $e;
}
} else {
return false;
}
}
private function calculAge($dateNaissance) { private function calculAge($dateNaissance) {
// Convertir la date de naissance en objet DateTime // Convertir la date de naissance en objet DateTime
$dateNaissance = new DateTime($dateNaissance); $dateNaissance = new DateTime($dateNaissance);
@ -3072,4 +2976,19 @@ class PageController extends Controller {
public function createDefaultClientGroupFacturation(){ public function createDefaultClientGroupFacturation(){
return $this->myDb->createDefaultClientGroup(); return $this->myDb->createDefaultClientGroup();
} }
/**
* @NoAdminRequired
* @NoCSRFRequired
* @param int $defuntId
*/
public function saveAttestationPacemaker($defuntId){
try{
$careCertificateFilename = $this->certificateService->generatePacemakerCertificate($defuntId,$this->idNextcloud);
return $careCertificateFilename;
}
catch(\OCP\Files\NotFoundException $e) { }
}
} }

View File

@ -2996,6 +2996,7 @@ class Bdd {
lieu.adresse as lieu_adresse, lieu.adresse as lieu_adresse,
defunt.nom as defunt_nom, defunt.nom as defunt_nom,
defunt.sexe as defunt_sexe, defunt.sexe as defunt_sexe,
defunt.ref_pacemaker as defunt_reference_pacemaker,
client.nom as client_nom, client.nom as client_nom,
client.prenom as client_prenom, client.prenom as client_prenom,
client.entreprise as client_entreprise, client.entreprise as client_entreprise,

View File

@ -31,6 +31,7 @@ use DateTimeImmutable;
use OCA\Gestion\Db\Bdd; use OCA\Gestion\Db\Bdd;
use OCA\Gestion\Helpers\DateHelpers; use OCA\Gestion\Helpers\DateHelpers;
use OCA\Gestion\Service\Certificate\PdfHandler\CareCertificatePdfHandler; use OCA\Gestion\Service\Certificate\PdfHandler\CareCertificatePdfHandler;
use OCA\Gestion\Service\Certificate\PdfHandler\PacemakerCertificatePdfHandler;
use OCP\Files\IRootFolder; use OCP\Files\IRootFolder;
class CertificateService { class CertificateService {
@ -96,14 +97,23 @@ class CertificateService {
$devisOfDefunt["configuration"] = $currentConfig; $devisOfDefunt["configuration"] = $currentConfig;
$devisOfDefunt["thanato_date_habilitation"] = new DateTimeImmutable($devisOfDefunt["thanato_date_habilitation"]); $devisOfDefunt["thanato_date_habilitation"] = new DateTimeImmutable($devisOfDefunt["thanato_date_habilitation"]);
$devisOfDefunt["devis_date"] = new DateTimeImmutable($devisOfDefunt["devis_date"]); $devisOfDefunt["devis_date"] = new DateTimeImmutable($devisOfDefunt["devis_date"]);
$locationOfDevis = "";
if($devisOfDefunt['lieu_nom'] != null){
$locationOfDevis .= $devisOfDefunt['lieu_nom'];
}
if($devisOfDefunt['lieu_adresse'] != null){
$locationOfDevis .= " ". $devisOfDefunt['lieu_adresse'];
}
$devisOfDefunt['location_of_devis'] = $locationOfDevis;
$clean_folder = html_entity_decode(string: $currentConfig->path).'/'; $clean_folder = html_entity_decode(string: $currentConfig->path).'/';
$careCertificateFolder = $this->getCareCertificateFolder($devisOfDefunt); $careCertificateFolder = $this->getCareCertificateFolder($devisOfDefunt);
$folderDestination = $clean_folder.$careCertificateFolder; $folderDestination = $clean_folder.$careCertificateFolder;
$pdfFilename = $this->GetCareCertificateFilename($devisOfDefunt); $pdfFilename = $this->GetCareCertificateFilename($devisOfDefunt);
$filenamePath = $clean_folder.$careCertificateFolder.$pdfFilename.'.pdf'; $filenamePath = $clean_folder.$careCertificateFolder.$pdfFilename.'.pdf';
$pdf = new CareCertificatePdfHandler(); $pdf = new CareCertificatePdfHandler();
$pdf->AddFont('Corsiva','','Monotype-Corsiva-Regular.php'); $pdf->AddFont('ComicSans','','Comic Sans MS.php');
$pdf->AddFont('Corsiva Bold','','Monotype-Corsiva-Bold.php'); $pdf->AddFont('ComicSans','B','comic-sans-bold.php');
$signatureImageExist = $this->signatureImageExists(); $signatureImageExist = $this->signatureImageExists();
$pdf->SetCareCertificateData($devisOfDefunt,$logo,$signatureImageExist); $pdf->SetCareCertificateData($devisOfDefunt,$logo,$signatureImageExist);
$pdf->SetCareCertificate(); $pdf->SetCareCertificate();
@ -134,4 +144,63 @@ class CertificateService {
return $filename; return $filename;
} }
private function getPacemakerCertificateFolder($devisOfDefunt){
$folder = 'CLIENTS/'
.strtoupper($devisOfDefunt["client_entreprise"])
.'/DEFUNTS/'
.strtoupper($devisOfDefunt["defunt_nom"]).'/'
.'ATTESTATION/';
return $folder;
}
private function getPacemakerCertificateFilename($devisOfDefunt){
$filename = 'ATTESTATION_PACEMAKER_'.strtoupper($devisOfDefunt['defunt_nom']);
return $filename;
}
public function generatePacemakerCertificate($defuntId,$idNextCloud){
$storage = $this->rootFolder->getUserFolder($idNextCloud);
$configs = json_decode($this->gestionBdd->getConfiguration(self::DEFAULT_NEXTCLOUD_ADMIN));
$currentConfig = $configs[0];
$logo = $this->getLogo();
$devisOfDefunt = $this->gestionBdd->getDevisOfDefunt($defuntId);
if($devisOfDefunt == null){
return null;
}
$devisOfDefunt["configuration"] = $currentConfig;
$devisOfDefunt["thanato_date_habilitation"] = new DateTimeImmutable($devisOfDefunt["thanato_date_habilitation"]);
$devisOfDefunt["devis_date"] = new DateTimeImmutable($devisOfDefunt["devis_date"]);
$locationOfDevis = "";
if($devisOfDefunt['lieu_nom'] != null){
$locationOfDevis .= $devisOfDefunt['lieu_nom'];
}
if($devisOfDefunt['lieu_adresse'] != null){
$locationOfDevis .= " ". $devisOfDefunt['lieu_adresse'];
}
$devisOfDefunt['location_of_devis'] = $locationOfDevis;
$clean_folder = html_entity_decode(string: $currentConfig->path).'/';
$pacemakerCertificateFolder = $this->getPacemakerCertificateFolder($devisOfDefunt);
$folderDestination = $clean_folder.$pacemakerCertificateFolder;
$pdfFilename = $this->getPacemakerCertificateFilename($devisOfDefunt);
$filenamePath = $clean_folder.$pacemakerCertificateFolder.$pdfFilename.'.pdf';
$pdf = new PacemakerCertificatePdfHandler();
$pdf->AddFont('ComicSans','','Comic Sans MS.php');
$pdf->AddFont('ComicSans','B','comic-sans-bold.php');
$signatureImageExist = $this->signatureImageExists();
$pdf->SetPacemakerCertificateData($devisOfDefunt,$logo,$signatureImageExist);
$pdf->SetPacemakerCertificate();
try {
$storage->newFolder($folderDestination);
}
catch(\OCP\Files\NotPermittedException $e) {
}
$pdfContent = $pdf->Output('','S');
$storage->newFile($filenamePath);
$pdfFile = $storage->get($filenamePath);
$pdfFile->putContent($pdfContent);
return $filenamePath;
}
} }

View File

@ -42,7 +42,7 @@ class CareCertificatePdfHandler extends FPDF {
function Header() function Header()
{ {
if($this->logo != "nothing"){ if($this->logo != "nothing"){
$this->Image($this->imagePath."logo.png", 10, 10, 75, 25); $this->Image($this->imagePath."logo.png", 10, 10, 85, 25);
} }
else{ else{
$this->Cell(55,30,''); $this->Cell(55,30,'');
@ -51,7 +51,7 @@ class CareCertificatePdfHandler extends FPDF {
function Footer() function Footer()
{ {
$this->SetY(-18); $this->SetY(-18);
$this->SetFont('Corsiva', '', 10); $this->SetFont('ComicSans', '', 10);
$this->MultiCell(0, 5, utf8_decode(html_entity_decode($this->devisOfDefunt['configuration']->legal_one)), 0, 'C'); $this->MultiCell(0, 5, utf8_decode(html_entity_decode($this->devisOfDefunt['configuration']->legal_one)), 0, 'C');
$this->MultiCell(0, 5, utf8_decode(html_entity_decode($this->devisOfDefunt['configuration']->adresse)), 0,'C'); $this->MultiCell(0, 5, utf8_decode(html_entity_decode($this->devisOfDefunt['configuration']->adresse)), 0,'C');
} }
@ -71,29 +71,29 @@ class CareCertificatePdfHandler extends FPDF {
} }
private function SetSigning(){ private function SetSigning(){
$this->SetXY(140,$this->GetY() + 30); $this->SetXY(140,$this->GetY() + 15);
$this->Cell(0,10,'Cachet et signature'); $this->Cell(0,10,'Cachet et signature');
if($this->signatureImageExist){ if($this->signatureImageExist){
$this->Image($this->imagePath."sign.png", 135, $this->GetY() + 12, 55, 30); $this->Image($this->imagePath."sign.png", 135, $this->GetY() + 12, 60, 40);
} }
} }
private function SetCareCertificateContent(){ private function SetCareCertificateContent(){
$this->SetFont('Corsiva', '', 14); $this->SetFont('ComicSans', '', 14);
$this->Cell(0,7,FileExportHelpers::FormatTextForExport('La Société '. $this->devisOfDefunt['configuration']->entreprise. ' habilitée sous le numéro ' . $this->devisOfDefunt['thanato_reference'] . ' certifie par '),0,1); $this->Cell(0,7,FileExportHelpers::FormatTextForExport('La Société '. $this->devisOfDefunt['configuration']->entreprise. ' habilitée sous le numéro ' . $this->devisOfDefunt['thanato_reference'] . ' certifie par '),0,1);
$this->Cell(0,7,FileExportHelpers::FormatTextForExport('la présente que : '),0,1); $this->Cell(0,7,FileExportHelpers::FormatTextForExport('la présente que : '),0,1);
$this->SetFont('Corsiva Bold', '', 14); $this->SetFont('ComicSans', 'B', 14);
$this->Cell(0,12, 'Mr/Mlle ' . FileExportHelpers::FormatTextForExport($this->devisOfDefunt['thanato_nom'] . ' ' . $this->devisOfDefunt['thanato_prenom']),0,1); $this->Cell(0,12, 'Mr/Mme ' . FileExportHelpers::FormatTextForExport($this->devisOfDefunt['thanato_nom'] . ' ' . $this->devisOfDefunt['thanato_prenom']),0,1);
$this->SetFont('Corsiva', '', 14); $this->SetFont('ComicSans', '', 14);
$this->MultiCell(0,7, FileExportHelpers::FormatTextForExport('Employé au sein de notre société et titulaire du diplôme national de Thanatopracteur a effectué des soins de conservation sur le corps du défunt :')); $this->MultiCell(0,7, FileExportHelpers::FormatTextForExport('Employé au sein de notre société et titulaire du diplôme national de Thanatopracteur a effectué des soins de conservation sur le corps du défunt :'));
$this->SetFont('Corsiva Bold', '', 14); $this->SetFont('ComicSans', 'B', 14);
$this->Cell(0,12, 'M./Mme '.$this->devisOfDefunt['defunt_nom'],0,1); $this->Cell(0,12, 'Mr/Mme '.$this->devisOfDefunt['defunt_nom'],0,1);
$this->SetFont('Corsiva', '', 14); $this->SetFont('ComicSans', '', 14);
$this->Cell(0,12, FileExportHelpers::FormatTextForExport("Qui reposait à l'adresse suivante") . ': ',0,1); $this->Cell(0,12, FileExportHelpers::FormatTextForExport("Qui reposait à l'adresse suivante") . ': ',0,1);
$this->SetFont('Corsiva Bold', '', 14); $this->SetFont('ComicSans', 'B', 14);
$this->Cell(0,12, FileExportHelpers::FormatTextForExport($this->devisOfDefunt['configuration']->adresse),0,1); $this->Cell(0,12, FileExportHelpers::FormatTextForExport($this->devisOfDefunt['location_of_devis']),0,1);
$this->SetFont('Corsiva', '', 14); $this->SetFont('ComicSans', '', 14);
$this->Cell(0,12, FileExportHelpers::FormatTextForExport("La présente attestion est établie pour faire valoir ce que de droit."),0,5); $this->Cell(0,12, FileExportHelpers::FormatTextForExport("La présente attestion est établie pour faire valoir ce que de droit."),0,5);
$this->Ln(5); $this->Ln(5);
$this->Cell(0,12,FileExportHelpers::FormatTextForExport('Fait à '). FileExportHelpers::FormatTextForExport($this->devisOfDefunt['configuration']->adresse)); $this->Cell(0,12,FileExportHelpers::FormatTextForExport('Fait à '). FileExportHelpers::FormatTextForExport($this->devisOfDefunt['configuration']->adresse));
@ -103,7 +103,7 @@ class CareCertificatePdfHandler extends FPDF {
private function SetCareCertificateTitle(){ private function SetCareCertificateTitle(){
$this->SetY(60); $this->SetY(60);
$this->SetFont('Corsiva Bold', '', 20); $this->SetFont('ComicSans', 'B', 20);
$this->Cell(0, 10, 'ATTESTATION DE SOINS DE CONSERVATION', 0, 1,'C'); $this->Cell(0, 10, 'ATTESTATION DE SOINS DE CONSERVATION', 0, 1,'C');
$this->Ln(20); $this->Ln(20);
} }

View File

@ -0,0 +1,182 @@
<?php
declare(strict_types=1);
/**
* Calendar App
*
* @copyright 2021 Anna Larch <anna.larch@gmx.net>
*
* @author Anna Larch <anna.larch@gmx.net>
* @author Richard Steinmetz <richard@steinmetz.cloud>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
namespace OCA\Gestion\Service\Certificate\PdfHandler;
use DateTime;
use \FPDF;
use OCA\Gestion\Helpers\DateHelpers;
use OCA\Gestion\Helpers\FileExportHelpers;
use OCA\Gestion\Helpers\PriceHelpers;
class PacemakerCertificatePdfHandler extends FPDF {
private $devisOfDefunt = [];
private $logo = null;
private $signatureImageExist = false;
private $imagePath = "/var/www/html/data/admin/files/.gestion/";
function Header()
{
if($this->logo != "nothing"){
$this->Image($this->imagePath."logo.png", 10, 10, 85, 25);
}
else{
$this->Cell(55,30,'');
}
}
function Footer()
{
$this->SetY(-18);
$this->SetFont('ComicSans', '', 10);
$this->MultiCell(0, 5, utf8_decode(html_entity_decode($this->devisOfDefunt['configuration']->legal_one)), 0, 'C');
$this->MultiCell(0, 5, utf8_decode(html_entity_decode($this->devisOfDefunt['configuration']->adresse)), 0,'C');
}
public function SetPacemakerCertificateData(array $devisOfDefunt,$logo = null,$signatureImageExist = false){
$this->devisOfDefunt = $devisOfDefunt;
$this->logo = $logo;
$this->signatureImageExist = $signatureImageExist;
}
public function SetPacemakerCertificate(){
$this->AddPage();
$this->SetMargins(left:20,top:0,right:20);
$this->SetPacemakerCertificateTitle();
$this->SetPacemakerCertificateContent();
$this->SetSigning();
}
private function SetSigning(){
$this->SetXY(140,$this->GetY() + 15);
$this->Cell(0,10,'Cachet et signature');
if($this->signatureImageExist){
$this->Image($this->imagePath."sign.png", 135, $this->GetY() + 12, 60, 40);
}
}
private function SetPacemakerCertificateContent(){
$this->SetFont('ComicSans', '', 14);
$this->MultiCell(0,7,FileExportHelpers::FormatTextForExport('La Société '. $this->devisOfDefunt['configuration']->entreprise. ' habilitée sous le numéro ' . $this->devisOfDefunt['thanato_reference'] . ' certifie par la présente que: '));
$this->SetFont('ComicSans', 'B', 14);
$this->Cell(0,12, 'Mr/Mme ' . FileExportHelpers::FormatTextForExport($this->devisOfDefunt['thanato_nom'] . ' ' . $this->devisOfDefunt['thanato_prenom']),0,1);
$this->SetFont('ComicSans', '', 14);
$this->MultiCell(0,7, FileExportHelpers::FormatTextForExport('Employé au sein de notre société et titulaire du diplôme national de Thanatopracteur a retiré ce jour, la prothèse fonctionnant à pile implantée sur le cors du défunt:'));
$this->SetFont('ComicSans', 'B', 14);
$this->Cell(0,12, 'Mr/Mme '.$this->devisOfDefunt['defunt_nom'],0,1);
$this->SetFont('ComicSans', '', 14);
$this->Cell(0,12, FileExportHelpers::FormatTextForExport("Qui reposait à l'adresse suivante") . ': ',0,1);
$this->SetFont('ComicSans', 'B', 14);
$this->Cell(0,12, FileExportHelpers::FormatTextForExport($this->devisOfDefunt['location_of_devis']),0,1);
$this->SetFont('ComicSans', '', 14);
$this->Cell(0,12,
FileExportHelpers::FormatTextForExport("Numéro de série: ").
FileExportHelpers::FormatTextForExport($this->devisOfDefunt['defunt_reference_pacemaker']),0,1);
$this->Cell(0,12, FileExportHelpers::FormatTextForExport("La présente attestion est établie pour faire valoir ce que de droit."),0,5);
$this->Ln(5);
$this->Cell(0,12,FileExportHelpers::FormatTextForExport('Fait à '). FileExportHelpers::FormatTextForExport($this->devisOfDefunt['configuration']->adresse));
$this->SetX(140);
$this->Cell(0,12,'le '. $this->devisOfDefunt['devis_date']->format('d/m/Y'),0);
}
private function SetPacemakerCertificateTitle(){
$this->SetY(y: 50);
$this->SetFont('ComicSans', 'B', 20);
$this->Cell(0,10,'ATTESTATION DE RETRAIT DE LA',0,1,'C');
$this->Cell(0,10,'PROTHESE FONCTIONNANT A PILE',0,1,'C');
$this->Ln(20);
}
function MultiAlignCell($w,$h,$text,$border=0,$ln=0,$align='L',$fill=false)
{
// Store reset values for (x,y) positions
$x = $this->GetX() + $w;
$y = $this->GetY();
// Make a call to FPDF's MultiCell
$this->MultiCell($w,$h,$text,$border,$align,$fill);
// Reset the line position to the right, like in Cell
if( $ln==0 )
{
$this->SetXY($x,$y);
}
}
function NbLines($w, $txt)
{
// Compute the number of lines a MultiCell of width w will take
if(!isset($this->CurrentFont))
$this->Error('No font has been set');
$cw = $this->CurrentFont['cw'];
if($w==0)
$w = $this->w-$this->rMargin-$this->x;
$wmax = ($w-2*$this->cMargin)*1000/$this->FontSize;
$s = str_replace("\r",'',(string)$txt);
$nb = strlen($s);
if($nb>0 && $s[$nb-1]=="\n")
$nb--;
$sep = -1;
$i = 0;
$j = 0;
$l = 0;
$nl = 1;
while($i<$nb)
{
$c = $s[$i];
if($c=="\n")
{
$i++;
$sep = -1;
$j = $i;
$l = 0;
$nl++;
continue;
}
if($c==' ')
$sep = $i;
$l += $cw[$c];
if($l>$wmax)
{
if($sep==-1)
{
if($i==$j)
$i++;
}
else
$i = $sep+1;
$sep = -1;
$j = $i;
$l = 0;
$nl++;
}
else
$i++;
}
return $nl;
}
}

View File

@ -49,14 +49,14 @@ class DevisPdfHandler extends FPDF {
function Footer() function Footer()
{ {
$this->SetY(-40); $this->SetY(-40);
$this->SetFont('Arial', '', 7); $this->SetFont('ComicSans', '', 7);
$this->MultiCell(0,5,utf8_decode(html_entity_decode('Tout retard de paiement entraînera de plein droit une pénalité de retard de 3 fois le taux légal ( Loi 2008-776 du 4 août 2008) et une indemnité forfaitaire de 40 EUR pour frais de recouvrement sera appliquée.'))); $this->MultiCell(0,5,utf8_decode(html_entity_decode('Tout retard de paiement entraînera de plein droit une pénalité de retard de 3 fois le taux légal ( Loi 2008-776 du 4 août 2008) et une indemnité forfaitaire de 40 EUR pour frais de recouvrement sera appliquée.')));
$this->Ln(1); $this->Ln(1);
$this->MultiCell(0,5,utf8_decode(html_entity_decode('Si les frais de recouvrement sont supérieurs à ce montant forfaitaire, une indemnisation complémentaire sera due sur présentation de justificatifs ( articles L.441-3 et L.441-6 du code de commerce ). $this->MultiCell(0,5,utf8_decode(html_entity_decode('Si les frais de recouvrement sont supérieurs à ce montant forfaitaire, une indemnisation complémentaire sera due sur présentation de justificatifs ( articles L.441-3 et L.441-6 du code de commerce ).
'))); ')));
$this->SetY(-15); $this->SetY(-15);
$this->SetFont('Arial', 'B', 8); $this->SetFont('ComicSans', 'B', 8);
$this->Cell(0, 10, utf8_decode(html_entity_decode($this->devisData['configuration']->legal_one)), 0, 0, 'C'); $this->Cell(0, 10, utf8_decode(html_entity_decode($this->devisData['configuration']->legal_one)), 0, 0, 'C');
} }
@ -72,7 +72,7 @@ class DevisPdfHandler extends FPDF {
private function DrawDevisCompanyAndClientInfo(){ private function DrawDevisCompanyAndClientInfo(){
$this->SetY(40); $this->SetY(40);
$this->SetFont('Arial', '', 12); $this->SetFont('ComicSans', '', 12);
$this->Cell(0, 7, FileExportHelpers::FormatTextForExport($this->devisData['configuration']->entreprise), 0, 0); $this->Cell(0, 7, FileExportHelpers::FormatTextForExport($this->devisData['configuration']->entreprise), 0, 0);
$this->Cell(0, 7, FileExportHelpers::FormatTextForExport($this->devisData['client_nom']), 0, 1,'R'); $this->Cell(0, 7, FileExportHelpers::FormatTextForExport($this->devisData['client_nom']), 0, 1,'R');
$this->Cell(0, 7, FileExportHelpers::FormatTextForExport($this->devisData['configuration_adresse']), 0, 0); $this->Cell(0, 7, FileExportHelpers::FormatTextForExport($this->devisData['configuration_adresse']), 0, 0);
@ -86,12 +86,12 @@ class DevisPdfHandler extends FPDF {
} }
private function DrawDevisInfoTable(){ private function DrawDevisInfoTable(){
$this->SetFont('Arial', 'B', 11); $this->SetFont('ComicSans', 'B', 11);
$this->Cell(30, 7, 'DATE', 1, 0, 'C'); $this->Cell(30, 7, 'DATE', 1, 0, 'C');
$this->Cell(80, 7, 'CLIENT', 1, 0, 'C'); $this->Cell(80, 7, 'CLIENT', 1, 0, 'C');
$this->Cell(40, 7, 'DEVIS', 1, 1, 'C'); $this->Cell(40, 7, 'DEVIS', 1, 1, 'C');
$this->SetFont('Arial', '', 10); $this->SetFont('ComicSans', '', 10);
$this->Cell(30, 7, $this->devisData['devis_date'], 1, 0, 'C'); $this->Cell(30, 7, $this->devisData['devis_date'], 1, 0, 'C');
$this->Cell(80, 7, utf8_decode(html_entity_decode($this->devisData['client_nom'])), 1, 0, 'C'); $this->Cell(80, 7, utf8_decode(html_entity_decode($this->devisData['client_nom'])), 1, 0, 'C');
$this->Cell(40, 7, $this->devisData['devis_full_number'], 1, 1, 'C'); $this->Cell(40, 7, $this->devisData['devis_full_number'], 1, 1, 'C');
@ -113,7 +113,7 @@ class DevisPdfHandler extends FPDF {
private function DrawArticlesTableHeader(){ private function DrawArticlesTableHeader(){
$tvaValue = $this->devisData["configuration"]->tva_default; $tvaValue = $this->devisData["configuration"]->tva_default;
$this->SetFont('Arial','',10); $this->SetFont('ComicSans','',10);
$this->SetXY( 10,106 ); $this->SetXY( 10,106 );
$this->Cell( 20, 8, "Date", 0, 0, 'C'); $this->Cell( 20, 8, "Date", 0, 0, 'C');
@ -132,7 +132,7 @@ class DevisPdfHandler extends FPDF {
} }
public function DrawArticlesTableValueAndReturnTotalPrice(){ public function DrawArticlesTableValueAndReturnTotalPrice(){
$this->SetFont('Arial','',10); $this->SetFont('ComicSans','',10);
$tvaValue = $this->devisData["configuration"]->tva_default; $tvaValue = $this->devisData["configuration"]->tva_default;
$totalHt = 0; $totalHt = 0;
$totalTtc = 0; $totalTtc = 0;
@ -178,14 +178,14 @@ class DevisPdfHandler extends FPDF {
private function DrawBankAndTotalPriceInfo($totalPriceArray){ private function DrawBankAndTotalPriceInfo($totalPriceArray){
$this->SetY(210); $this->SetY(210);
$this->SetFont('Arial', '', 9); $this->SetFont('ComicSans', '', 9);
$this->MultiCell(0,5,utf8_decode(html_entity_decode("Paiement à votre convenance par chèque à l'ordre de ". $this->devisData['configuration']->entreprise))); $this->MultiCell(0,5,utf8_decode(html_entity_decode("Paiement à votre convenance par chèque à l'ordre de ". $this->devisData['configuration']->entreprise)));
$this->MultiCell(0,5,utf8_decode(html_entity_decode("en indiquant le numéro de facture, ou par virement :"))); $this->MultiCell(0,5,utf8_decode(html_entity_decode("en indiquant le numéro de facture, ou par virement :")));
$this->Ln(1); $this->Ln(1);
//Table IBAN //Table IBAN
$this->SetFont('Arial', '', 11); $this->SetFont('ComicSans', '', 11);
$ibanWidth = 90; $ibanWidth = 90;
$ibanCursorY = $this->GetY(); $ibanCursorY = $this->GetY();
$this->Cell($ibanWidth, 7, 'IBAN : FR76 1360 6000 1436 5418 1800 038', 1, 1, 'C'); $this->Cell($ibanWidth, 7, 'IBAN : FR76 1360 6000 1436 5418 1800 038', 1, 1, 'C');

View File

@ -114,6 +114,8 @@ class DevisPdfService {
$clean_folder = html_entity_decode(string: $currentConfig->path).'/'; $clean_folder = html_entity_decode(string: $currentConfig->path).'/';
$devisPdfFolders = $this->getDevisPdfFolder($devisPdfDataFormatted,$clean_folder); $devisPdfFolders = $this->getDevisPdfFolder($devisPdfDataFormatted,$clean_folder);
$pdf = new DevisPdfHandler(); $pdf = new DevisPdfHandler();
$pdf->AddFont('ComicSans','','Comic Sans MS.php');
$pdf->AddFont('ComicSans','B','comic-sans-bold.php');
$pdf->SetDevisPdfData($devisPdfDataFormatted,$logo); $pdf->SetDevisPdfData($devisPdfDataFormatted,$logo);
$pdf->SetDevisContent(); $pdf->SetDevisContent();
$pdfContent = $pdf->Output('','S'); $pdfContent = $pdf->Output('','S');
@ -170,6 +172,8 @@ class DevisPdfService {
} }
$multipleDevisDataFormatted = $this->formatMultipleDevisToPdfFormat($mulitpleDevisData,$currentConfig); $multipleDevisDataFormatted = $this->formatMultipleDevisToPdfFormat($mulitpleDevisData,$currentConfig);
$pdf = new DevisPdfHandler(); $pdf = new DevisPdfHandler();
$pdf->AddFont('ComicSans','','Comic Sans MS.php');
$pdf->AddFont('ComicSans','B','comic-sans-bold.php');
$pdf->SetMultipleDevisPdfData($multipleDevisDataFormatted,$logo); $pdf->SetMultipleDevisPdfData($multipleDevisDataFormatted,$logo);
$pdf->SetMultipleDevisContent(); $pdf->SetMultipleDevisContent();
$racinePath = html_entity_decode(string: $currentConfig->path).'/'; $racinePath = html_entity_decode(string: $currentConfig->path).'/';

View File

@ -51,14 +51,14 @@ class InvoicePdfHandler extends FPDF {
function Footer() function Footer()
{ {
$this->SetY(-40); $this->SetY(-40);
$this->SetFont('Arial', '', 7); $this->SetFont('ComicSans', '', 7);
$this->MultiCell(0,5,utf8_decode(html_entity_decode('Tout retard de paiement entraînera de plein droit une pénalité de retard de 3 fois le taux légal ( Loi 2008-776 du 4 août 2008) et une indemnité forfaitaire de 40 EUR pour frais de recouvrement sera appliquée.'))); $this->MultiCell(0,5,utf8_decode(html_entity_decode('Tout retard de paiement entraînera de plein droit une pénalité de retard de 3 fois le taux légal ( Loi 2008-776 du 4 août 2008) et une indemnité forfaitaire de 40 EUR pour frais de recouvrement sera appliquée.')));
$this->Ln(1); $this->Ln(1);
$this->MultiCell(0,5,utf8_decode(html_entity_decode('Si les frais de recouvrement sont supérieurs à ce montant forfaitaire, une indemnisation complémentaire sera due sur présentation de justificatifs ( articles L.441-3 et L.441-6 du code de commerce ). $this->MultiCell(0,5,utf8_decode(html_entity_decode('Si les frais de recouvrement sont supérieurs à ce montant forfaitaire, une indemnisation complémentaire sera due sur présentation de justificatifs ( articles L.441-3 et L.441-6 du code de commerce ).
'))); ')));
$this->SetY(-15); $this->SetY(-15);
$this->SetFont('Arial', 'B', 8); $this->SetFont('ComicSans', 'B', 8);
$this->Cell(0, 10, utf8_decode(html_entity_decode($this->factureData['configuration']->legal_one)), 0, 0, 'C'); $this->Cell(0, 10, utf8_decode(html_entity_decode($this->factureData['configuration']->legal_one)), 0, 0, 'C');
} }
@ -98,7 +98,7 @@ class InvoicePdfHandler extends FPDF {
private function DrawInvoiceCompanyAndClientInfo(){ private function DrawInvoiceCompanyAndClientInfo(){
$this->SetY(40); $this->SetY(40);
$this->SetFont('Arial', '', 12); $this->SetFont('ComicSans', '', 12);
$this->Cell(0, 7, FileExportHelpers::FormatTextForExport($this->factureData['configuration']->entreprise), 0, 0); $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($this->factureData['client_nom']), 0, 1,'R');
$this->Cell(0, 7, FileExportHelpers::FormatTextForExport($this->factureData['configuration_adresse']), 0, 0); $this->Cell(0, 7, FileExportHelpers::FormatTextForExport($this->factureData['configuration_adresse']), 0, 0);
@ -119,13 +119,13 @@ class InvoicePdfHandler extends FPDF {
$factureDatePaiement = $factureDatePaiement->format('d-m-Y'); $factureDatePaiement = $factureDatePaiement->format('d-m-Y');
$factureDateEcheance->modify('last day of next month'); $factureDateEcheance->modify('last day of next month');
$factureDateEcheance = $factureDateEcheance->format('d-m-Y'); $factureDateEcheance = $factureDateEcheance->format('d-m-Y');
$this->SetFont('Arial', 'B', 11); $this->SetFont('ComicSans', 'B', 11);
$this->Cell(30, 7, 'DATE', 1, 0, 'C'); $this->Cell(30, 7, 'DATE', 1, 0, 'C');
$this->Cell(80, 7, 'CLIENT', 1, 0, 'C'); $this->Cell(80, 7, 'CLIENT', 1, 0, 'C');
$this->Cell(40, 7, 'FACTURE', 1, 0, 'C'); $this->Cell(40, 7, 'FACTURE', 1, 0, 'C');
$this->Cell(40, 7, 'ECHEANCE', 1, 1, 'C'); $this->Cell(40, 7, 'ECHEANCE', 1, 1, 'C');
$this->SetFont('Arial', '', 10); $this->SetFont('ComicSans', '', 10);
$this->Cell(30, 7, $factureDatePaiement, 1, 0, 'C'); $this->Cell(30, 7, $factureDatePaiement, 1, 0, 'C');
$this->Cell(80, 7, utf8_decode(html_entity_decode($this->factureData['client_nom'])), 1, 0, 'C'); $this->Cell(80, 7, utf8_decode(html_entity_decode($this->factureData['client_nom'])), 1, 0, 'C');
$this->Cell(40, 7, $this->factureData['num'], 1, 0, 'C'); $this->Cell(40, 7, $this->factureData['num'], 1, 0, 'C');
@ -148,7 +148,7 @@ class InvoicePdfHandler extends FPDF {
private function DrawArticlesTableHeader(){ private function DrawArticlesTableHeader(){
$tvaValue = $this->factureData["configuration"]->tva_default; $tvaValue = $this->factureData["configuration"]->tva_default;
$this->SetFont('Arial','',10); $this->SetFont('ComicSans','',10);
$this->SetXY( 10,106 ); $this->SetXY( 10,106 );
$this->Cell( 20, 8, "Date", 0, 0, 'C'); $this->Cell( 20, 8, "Date", 0, 0, 'C');
@ -167,7 +167,7 @@ class InvoicePdfHandler extends FPDF {
} }
public function DrawArticlesTableValueAndReturnTotalPrice(){ public function DrawArticlesTableValueAndReturnTotalPrice(){
$this->SetFont('Arial','',10); $this->SetFont('ComicSans','',10);
$devisDate = $this->factureData['devis_date']; $devisDate = $this->factureData['devis_date'];
$devisDate = DateTime::createFromFormat('Y-m-d',$devisDate); $devisDate = DateTime::createFromFormat('Y-m-d',$devisDate);
$devisDate = $devisDate->format('d-m-Y'); $devisDate = $devisDate->format('d-m-Y');
@ -216,14 +216,14 @@ class InvoicePdfHandler extends FPDF {
private function DrawBankAndTotalPriceInfo($totalPriceArray){ private function DrawBankAndTotalPriceInfo($totalPriceArray){
$this->SetY(210); $this->SetY(210);
$this->SetFont('Arial', '', 9); $this->SetFont('ComicSans', '', 9);
$this->MultiCell(0,5,utf8_decode(html_entity_decode("Paiement à votre convenance par chèque à l'ordre de ". $this->factureData['configuration']->entreprise))); $this->MultiCell(0,5,utf8_decode(html_entity_decode("Paiement à votre convenance par chèque à l'ordre de ". $this->factureData['configuration']->entreprise)));
$this->MultiCell(0,5,utf8_decode(html_entity_decode("en indiquant le numéro de facture, ou par virement :"))); $this->MultiCell(0,5,utf8_decode(html_entity_decode("en indiquant le numéro de facture, ou par virement :")));
$this->Ln(1); $this->Ln(1);
//Table IBAN //Table IBAN
$this->SetFont('Arial', '', 11); $this->SetFont('ComicSans', '', 11);
$ibanWidth = 90; $ibanWidth = 90;
$ibanCursorY = $this->GetY(); $ibanCursorY = $this->GetY();
$this->Cell($ibanWidth, 7, 'IBAN : FR76 1360 6000 1436 5418 1800 038', 1, 1, 'C'); $this->Cell($ibanWidth, 7, 'IBAN : FR76 1360 6000 1436 5418 1800 038', 1, 1, 'C');

View File

@ -78,6 +78,8 @@ class InvoicePdfService {
$clean_folder = html_entity_decode(string: $currentConfig->path).'/'; $clean_folder = html_entity_decode(string: $currentConfig->path).'/';
$factureFolders = $this->getFacturesFolder($invoicePdfData,$clean_folder); $factureFolders = $this->getFacturesFolder($invoicePdfData,$clean_folder);
$pdf = new InvoicePdfHandler(); $pdf = new InvoicePdfHandler();
$pdf->AddFont('ComicSans','','Comic Sans MS.php');
$pdf->AddFont('ComicSans','B','comic-sans-bold.php');
$pdf->InvoicePdfFactory($invoicePdfData,$logo); $pdf->InvoicePdfFactory($invoicePdfData,$logo);
$pdf->SetFactureContent(); $pdf->SetFactureContent();
$pdfContent = $pdf->Output('','S'); $pdfContent = $pdf->Output('','S');
@ -128,6 +130,8 @@ class InvoicePdfService {
return null; return null;
} }
$pdf = new InvoicePdfHandler(); $pdf = new InvoicePdfHandler();
$pdf->AddFont('ComicSans','','Comic Sans MS.php');
$pdf->AddFont('ComicSans','B','comic-sans-bold.php');
$pdf->MutlipleInvoicePdfFactory($invoiceData,$logo); $pdf->MutlipleInvoicePdfFactory($invoiceData,$logo);
$pdf->SetMultipleFactureContent(); $pdf->SetMultipleFactureContent();
$racinePath = html_entity_decode(string: $currentConfig->path).'/'; $racinePath = html_entity_decode(string: $currentConfig->path).'/';

View File

@ -93,7 +93,7 @@ window.addEventListener("DOMContentLoaded", function () {
exportCareCertificate({defuntId : defuntid}); exportCareCertificate({defuntId : defuntid});
}) })
pacemakerBtn.addEventListener("click", function(){ pacemakerBtn.addEventListener("click", function(){
saveAttestationPacemaker({ numdefunt: defuntid }); saveAttestationPacemaker({ defuntId: defuntid });
}); });
rapportSoinBtn.addEventListener("click", function(){ rapportSoinBtn.addEventListener("click", function(){

View File

@ -656,10 +656,10 @@ export function saveAttestationPacemaker(myData) {
if(!response) { if(!response) {
showMessage('Ce defunt n\'appartient à aucun devis.'); showMessage('Ce defunt n\'appartient à aucun devis.');
} else { } else {
showSuccess('Sauvegardé dans '+JSON.parse(response)['path']); showSuccess('Sauvegardé dans '+ response);
} }
}).fail(function (response, code) { }).fail(function (response, code) {
showMessage(t('gestion', 'There is an error')); showMessage(t('gestion', 'Erreur dans la génération d\'attestation pacemaker'));
error(response); error(response);
}); });
}; };

View File

@ -0,0 +1,25 @@
<?php
$type = 'TrueType';
$name = 'ComicSansMS';
$desc = array('Ascent'=>800,'Descent'=>-292,'CapHeight'=>800,'Flags'=>32,'FontBBox'=>'[-93 -312 1187 1102]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>500);
$up = -133;
$ut = 85;
$cw = array(
chr(0)=>500,chr(1)=>500,chr(2)=>500,chr(3)=>500,chr(4)=>500,chr(5)=>500,chr(6)=>500,chr(7)=>500,chr(8)=>500,chr(9)=>500,chr(10)=>500,chr(11)=>500,chr(12)=>500,chr(13)=>500,chr(14)=>500,chr(15)=>500,chr(16)=>500,chr(17)=>500,chr(18)=>500,chr(19)=>500,chr(20)=>500,chr(21)=>500,
chr(22)=>500,chr(23)=>500,chr(24)=>500,chr(25)=>500,chr(26)=>500,chr(27)=>500,chr(28)=>500,chr(29)=>500,chr(30)=>500,chr(31)=>500,' '=>299,'!'=>238,'"'=>424,'#'=>843,'$'=>693,'%'=>820,'&'=>654,'\''=>388,'('=>366,')'=>366,'*'=>530,'+'=>480,
','=>277,'-'=>417,'.'=>249,'/'=>512,'0'=>610,'1'=>450,'2'=>610,'3'=>610,'4'=>610,'5'=>610,'6'=>610,'7'=>610,'8'=>610,'9'=>610,':'=>299,';'=>299,'<'=>381,'='=>510,'>'=>381,'?'=>524,'@'=>931,'A'=>731,
'B'=>630,'C'=>603,'D'=>722,'E'=>625,'F'=>607,'G'=>680,'H'=>768,'I'=>546,'J'=>665,'K'=>611,'L'=>551,'M'=>883,'N'=>797,'O'=>798,'P'=>521,'Q'=>876,'R'=>628,'S'=>693,'T'=>680,'U'=>737,'V'=>650,'W'=>1040,
'X'=>724,'Y'=>635,'Z'=>693,'['=>376,'\\'=>550,']'=>376,'^'=>581,'_'=>627,'`'=>556,'a'=>512,'b'=>593,'c'=>514,'d'=>587,'e'=>548,'f'=>508,'g'=>531,'h'=>578,'i'=>280,'j'=>403,'k'=>540,'l'=>274,'m'=>777,
'n'=>523,'o'=>526,'p'=>535,'q'=>520,'r'=>480,'s'=>487,'t'=>471,'u'=>520,'v'=>486,'w'=>684,'x'=>590,'y'=>521,'z'=>538,'{'=>366,'|'=>421,'}'=>366,'~'=>598,chr(127)=>500,chr(128)=>610,chr(129)=>500,chr(130)=>299,chr(131)=>427,
chr(132)=>412,chr(133)=>675,chr(134)=>597,chr(135)=>597,chr(136)=>556,chr(137)=>1241,chr(138)=>693,chr(139)=>381,chr(140)=>1194,chr(141)=>500,chr(142)=>693,chr(143)=>500,chr(144)=>500,chr(145)=>180,chr(146)=>180,chr(147)=>394,chr(148)=>394,chr(149)=>387,chr(150)=>441,chr(151)=>883,chr(152)=>556,chr(153)=>883,
chr(154)=>403,chr(155)=>381,chr(156)=>897,chr(157)=>500,chr(158)=>538,chr(159)=>635,chr(160)=>299,chr(161)=>238,chr(162)=>623,chr(163)=>793,chr(164)=>612,chr(165)=>636,chr(166)=>404,chr(167)=>635,chr(168)=>556,chr(169)=>795,chr(170)=>527,chr(171)=>578,chr(172)=>480,chr(173)=>417,chr(174)=>795,chr(175)=>627,
chr(176)=>409,chr(177)=>480,chr(178)=>651,chr(179)=>651,chr(180)=>556,chr(181)=>520,chr(182)=>694,chr(183)=>249,chr(184)=>556,chr(185)=>651,chr(186)=>449,chr(187)=>578,chr(188)=>651,chr(189)=>651,chr(190)=>651,chr(191)=>524,chr(192)=>731,chr(193)=>731,chr(194)=>731,chr(195)=>731,chr(196)=>731,chr(197)=>731,
chr(198)=>1087,chr(199)=>603,chr(200)=>625,chr(201)=>625,chr(202)=>625,chr(203)=>625,chr(204)=>546,chr(205)=>546,chr(206)=>546,chr(207)=>546,chr(208)=>722,chr(209)=>797,chr(210)=>798,chr(211)=>798,chr(212)=>798,chr(213)=>798,chr(214)=>798,chr(215)=>480,chr(216)=>798,chr(217)=>737,chr(218)=>737,chr(219)=>737,
chr(220)=>737,chr(221)=>635,chr(222)=>521,chr(223)=>443,chr(224)=>512,chr(225)=>512,chr(226)=>512,chr(227)=>512,chr(228)=>512,chr(229)=>512,chr(230)=>912,chr(231)=>514,chr(232)=>548,chr(233)=>548,chr(234)=>548,chr(235)=>548,chr(236)=>280,chr(237)=>280,chr(238)=>280,chr(239)=>280,chr(240)=>509,chr(241)=>523,
chr(242)=>526,chr(243)=>526,chr(244)=>526,chr(245)=>526,chr(246)=>526,chr(247)=>480,chr(248)=>526,chr(249)=>520,chr(250)=>520,chr(251)=>520,chr(252)=>520,chr(253)=>521,chr(254)=>535,chr(255)=>431);
$enc = 'cp1252';
$uv = array(0=>array(0,128),128=>8364,130=>8218,131=>402,132=>8222,133=>8230,134=>array(8224,2),136=>710,137=>8240,138=>352,139=>8249,140=>338,142=>381,145=>array(8216,2),147=>array(8220,2),149=>8226,150=>array(8211,2),152=>732,153=>8482,154=>353,155=>8250,156=>339,158=>382,159=>376,160=>array(160,96));
$file = 'Comic Sans MS.z';
$originalsize = 50960;
$subsetted = true;
?>

Binary file not shown.

View File

@ -0,0 +1,25 @@
<?php
$type = 'TrueType';
$name = 'ComicSans-Bold';
$desc = array('Ascent'=>800,'Descent'=>-275,'CapHeight'=>784,'Flags'=>32,'FontBBox'=>'[-375 -292 2867 1102]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>500);
$up = -133;
$ut = 85;
$cw = array(
chr(0)=>500,chr(1)=>500,chr(2)=>500,chr(3)=>500,chr(4)=>500,chr(5)=>500,chr(6)=>500,chr(7)=>500,chr(8)=>500,chr(9)=>500,chr(10)=>500,chr(11)=>500,chr(12)=>500,chr(13)=>500,chr(14)=>500,chr(15)=>500,chr(16)=>500,chr(17)=>500,chr(18)=>500,chr(19)=>500,chr(20)=>500,chr(21)=>500,
chr(22)=>500,chr(23)=>500,chr(24)=>500,chr(25)=>500,chr(26)=>500,chr(27)=>500,chr(28)=>500,chr(29)=>500,chr(30)=>500,chr(31)=>500,' '=>434,'!'=>238,'"'=>437,'#'=>843,'$'=>693,'%'=>820,'&'=>654,'\''=>434,'('=>366,')'=>366,'*'=>530,'+'=>610,
','=>434,'-'=>610,'.'=>434,'/'=>512,'0'=>610,'1'=>450,'2'=>610,'3'=>610,'4'=>610,'5'=>610,'6'=>610,'7'=>610,'8'=>610,'9'=>610,':'=>434,';'=>434,'<'=>610,'='=>610,'>'=>610,'?'=>566,'@'=>931,'A'=>731,
'B'=>630,'C'=>619,'D'=>722,'E'=>625,'F'=>607,'G'=>680,'H'=>768,'I'=>546,'J'=>665,'K'=>611,'L'=>551,'M'=>883,'N'=>813,'O'=>798,'P'=>533,'Q'=>876,'R'=>640,'S'=>693,'T'=>696,'U'=>737,'V'=>675,'W'=>1040,
'X'=>724,'Y'=>635,'Z'=>693,'['=>376,'\\'=>550,']'=>376,'^'=>610,'_'=>627,'`'=>556,'a'=>556,'b'=>593,'c'=>514,'d'=>587,'e'=>559,'f'=>479,'g'=>531,'h'=>578,'i'=>280,'j'=>331,'k'=>540,'l'=>274,'m'=>777,
'n'=>523,'o'=>526,'p'=>535,'q'=>520,'r'=>480,'s'=>487,'t'=>471,'u'=>520,'v'=>486,'w'=>684,'x'=>590,'y'=>553,'z'=>538,'{'=>366,'|'=>421,'}'=>366,'~'=>610,chr(127)=>500,chr(128)=>648,chr(129)=>500,chr(130)=>434,chr(131)=>589,
chr(132)=>430,chr(133)=>675,chr(134)=>610,chr(135)=>597,chr(136)=>556,chr(137)=>1241,chr(138)=>693,chr(139)=>610,chr(140)=>1207,chr(141)=>500,chr(142)=>693,chr(143)=>500,chr(144)=>500,chr(145)=>226,chr(146)=>226,chr(147)=>434,chr(148)=>434,chr(149)=>610,chr(150)=>441,chr(151)=>883,chr(152)=>556,chr(153)=>883,
chr(154)=>487,chr(155)=>610,chr(156)=>934,chr(157)=>500,chr(158)=>538,chr(159)=>635,chr(160)=>476,chr(161)=>238,chr(162)=>610,chr(163)=>793,chr(164)=>610,chr(165)=>610,chr(166)=>421,chr(167)=>635,chr(168)=>556,chr(169)=>795,chr(170)=>548,chr(171)=>639,chr(172)=>610,chr(173)=>610,chr(174)=>795,chr(175)=>556,
chr(176)=>610,chr(177)=>610,chr(178)=>460,chr(179)=>460,chr(180)=>556,chr(181)=>610,chr(182)=>761,chr(183)=>610,chr(184)=>556,chr(185)=>500,chr(186)=>548,chr(187)=>639,chr(188)=>610,chr(189)=>610,chr(190)=>610,chr(191)=>566,chr(192)=>731,chr(193)=>731,chr(194)=>731,chr(195)=>731,chr(196)=>731,chr(197)=>731,
chr(198)=>1087,chr(199)=>619,chr(200)=>625,chr(201)=>625,chr(202)=>625,chr(203)=>625,chr(204)=>546,chr(205)=>546,chr(206)=>546,chr(207)=>546,chr(208)=>722,chr(209)=>813,chr(210)=>798,chr(211)=>798,chr(212)=>798,chr(213)=>798,chr(214)=>798,chr(215)=>610,chr(216)=>798,chr(217)=>737,chr(218)=>737,chr(219)=>737,
chr(220)=>737,chr(221)=>635,chr(222)=>521,chr(223)=>534,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>936,chr(231)=>514,chr(232)=>559,chr(233)=>559,chr(234)=>559,chr(235)=>559,chr(236)=>280,chr(237)=>280,chr(238)=>280,chr(239)=>280,chr(240)=>509,chr(241)=>523,
chr(242)=>526,chr(243)=>526,chr(244)=>526,chr(245)=>526,chr(246)=>526,chr(247)=>610,chr(248)=>533,chr(249)=>520,chr(250)=>520,chr(251)=>520,chr(252)=>520,chr(253)=>553,chr(254)=>535,chr(255)=>553);
$enc = 'cp1252';
$uv = array(0=>array(0,128),128=>8364,130=>8218,131=>402,132=>8222,133=>8230,134=>array(8224,2),136=>710,137=>8240,138=>352,139=>8249,140=>338,142=>381,145=>array(8216,2),147=>array(8220,2),149=>8226,150=>array(8211,2),152=>732,153=>8482,154=>353,155=>8250,156=>339,158=>382,159=>376,160=>array(160,96));
$file = 'comic-sans-bold.z';
$originalsize = 46544;
$subsetted = true;
?>

Binary file not shown.