Files
startup/pdf/position_lv.php

47 lines
1.9 KiB
PHP

<?php
$pdf->SetFont('Helvetica', 'B', 10);
$pdf->Cell(10, 4, "Pos.", 'B');
$pdf->Cell(170, 4, "Beschreibung", 'B', 1);
$pdf->SetFont('Helvetica', '', 10);
$pdf_type = "lv";
$Gesamtpreis = 0;
while ($ntp = $resultp->fetch_assoc())
{
$pdf->Cell(10, 4, $ntp['Position']);
$pdf->MultiCell(170, 4, $ntp['Bezeichnung'], 0, 'L');
if (("" != $_SESSION['Firma']['Feld1_Name']) AND (preg_match("/" . $pdf_type . ",/", $_SESSION['Firma']['Feld1'])) AND ("" != $ntp['Feld1']))
{
$pdf->SetFont('Helvetica', '', 8);
$pdf->SetX(30);
$pdf->MultiCell(170, 4, $ntp['Feld1'], 0, 'L');
}
if (("" != $_SESSION['Firma']['Feld2_Name']) AND (preg_match("/" . $pdf_type . ",/", $_SESSION['Firma']['Feld2'])) AND ("" != $ntp['Feld2']))
{
$pdf->SetFont('Helvetica', 'I', 8);
$pdf->SetX(30);
$pdf->MultiCell(170, 4, $_SESSION['Firma']['Feld2_Name'] . ": " . $ntp['Feld2'], 0, 'L');
}
if (("" != $_SESSION['Firma']['Feld3_Name']) AND (preg_match("/" . $pdf_type . ",/", $_SESSION['Firma']['Feld3'])) AND ("" != $ntp['Feld3']))
{
$pdf->SetFont('Helvetica', 'I', 8);
$pdf->SetX(30);
$pdf->MultiCell(170, 4, $_SESSION['Firma']['Feld3_Name'] . ": " . $ntp['Feld3'], 0, 'L');
}
if (("" != $_SESSION['Firma']['Feld4_Name']) AND (preg_match("/" . $pdf_type . ",/", $_SESSION['Firma']['Feld4'])) AND ("" != $ntp['Feld4']))
{
$pdf->SetFont('Helvetica', 'I', 8);
$pdf->SetX(30);
$pdf->MultiCell(170, 4, $_SESSION['Firma']['Feld4_Name'] . ": " . $ntp['Feld4'], 0, 'L');
}
if ((("" != $_SESSION['Firma']['Feld5_Name']) AND ("Intern" != $_SESSION['Firma']['Feld5_Name'])) AND (preg_match("/" . $pdf_type . ",/", $_SESSION['Firma']['Feld5'])) AND ("" != $ntp['Feld5']))
{
$pdf->SetFont('Helvetica', 'I', 8);
$pdf->SetX(30);
$pdf->MultiCell(170, 4, $_SESSION['Firma']['Feld5_Name'] . ": " . $ntp['Feld5'], 0, 'L');
}
$pdf->SetFont('Helvetica', '', 10);
$y = $pdf->GetY();
$pdf->Line(20, $y, 200, $y);
}