}
date_default_timezone_set('America/Los_Angeles');
$pdf = new myPDF('L', 'mm', 'Letter');
$date = date("m/d/Y h:i A");
$pdf->date = $date;
$header1 = array('Usage Order #', 'Used By', 'For Tool', 'Date', 'Notes', 'Status');
$header = array('Component Used', 'Quantity Used', 'Cost', 'Status', 'Date Used', 'Subtotal');
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetY(35);
$pdf->BuildTable1($header1, $data1);
$pdf->SetY(55);
$pdf->BuildTable($header, $data);
$pdf->Ln(6);
$substring = " Total Subtotal: \$" . $subtotal . " ";
$substrwidth = $pdf->GetStringWidth($substring);
$substrX = 260 - $substrwidth;
$pdf->SetX($substrX);
$pdf->Cell($substrwidth, 6, $substring, 1, 1, 'C');
$tax = $subtotal * 0.075;
$tax = round($tax, 2);
$tax = number_format((double) $tax, 2, '.', '');
$taxstring = " Tax (7.5%): \$" . $tax . " ";
$taxstrwidth = $pdf->GetStringWidth($taxstring);
$taxstrX = 260 - $taxstrwidth;
$pdf->SetX($taxstrX);
$pdf->Cell($taxstrwidth, 6, $taxstring, 1, 1, 'C');
$pdf->SetFont('', 'B', 12);
$grandtotal = $tax + $subtotal;
$grandtotal = round($grandtotal, 2);
$grandtotal = number_format((double) $grandtotal, 2, '.', '');
예제 #2
0
$pdf->getValue("profession");
$pdf->SetX(88);
$pdf->choix("inscription", array("1èreInscription", "Renouvellement"));
$pdf->ecrire("\n");
$pdf->ecrire("Niveau: ");
$pdf->choix("niveau", array("Débutant", "Moyen", "Comfirmé"));
$pdf->ecrire("\n");
$pdf->ecrire("Je désire passer ma visite médicale obligatoire au centre médico-sportif: ");
$pdf->choix("medecin", array("oui", "non"));
$pdf->ecrire("\n");
$pdf->ecrire("J'autorise la prise de photos et leur publication dans les média: ");
$pdf->choix("media", array("oui", "non"));
$pdf->ecrire("\n");
$pdf->ecrire("\n");
$signature = "Signature précédée de la mention \"Lu et Approuvé\"";
$ln = $pdf->GetStringWidth($signature);
$start = (210 - $ln) / 2;
if ($_REQUEST["majeur"] == "mineur") {
    $pdf->ecrire("AUTORISATION PARENTALE:");
    $pdf->ecrire("\n");
    $pdf->ecrire("\n");
    $pdf->ecrire("Je sousigné(e) ");
    $pdf->getValue("soussignataire");
    //	$pdf->SetX(88);
    $pdf->ecrire(" autorise mon enfant ");
    $pdf->getValue("nom_enfant");
    //	$pdf->SetX(160);
    $pdf->ecrire(" à pratiquer l'aïkido au club \"Aïkido Saint Cyr Club 78\"");
    $pdf->ecrire("\n");
    $pdf->ecrire("J'autorise mon fils ou ma fille à quitter seul(e) le lieu d'entrainement et celà sous ma responsabilité: ");
    $pdf->choix("quitter", array("oui", "non"));