From 13a098f95cabf78a0231017e9227dca37d49c32c Mon Sep 17 00:00:00 2001 From: Christian Steinle Date: Sat, 6 Jul 2019 14:51:37 +0000 Subject: [PATCH] =?UTF-8?q?Anpassung=20bei=20der=20Erstellung=20der=20PDF?= =?UTF-8?q?=20=C3=9Cbersichten=20f=C3=BCr=20die=20E=C3=9CR?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pdf/ausist_pdf.php | 28 +++++++++++----------------- pdf/aussoll_pdf.php | 24 ++++++++++++++---------- pdf/einist_pdf.php | 19 ++++++++----------- pdf/einsoll_pdf.php | 19 ++++++++----------- 4 files changed, 41 insertions(+), 49 deletions(-) diff --git a/pdf/ausist_pdf.php b/pdf/ausist_pdf.php index befbcaf..76e219e 100644 --- a/pdf/ausist_pdf.php +++ b/pdf/ausist_pdf.php @@ -19,6 +19,7 @@ $pdf->SetDisplayMode('fullpage'); $pdf->AddPage(); $pdf->SetRightMargin(10); +$pdf->SetLeftMargin(20); $pdf->SetY(50); $pdf->SetFont('Helvetica', 'B', 14); $pdf->SetTextColor($_SESSION['Firma']['F2_Red'], $_SESSION['Firma']['F2_Green'], $_SESSION['Firma']['F2_Blue']); @@ -185,7 +186,6 @@ $pdf->Cell(15, 4, number_format($Teil_MwSt, '2', ',', '.') . " €", 0, 0, 'R'); $pdf->Cell(20, 4, number_format($Teil + $Teil_MwSt, '2', ',', '.') . " €", 0, 0, 'R'); $pdf->Write(4, "\n"); - $pdf->SetFont('Helvetica', 'B', 14); $pdf->SetTextColor($_SESSION['Firma']['F2_Red'], $_SESSION['Firma']['F2_Green'], $_SESSION['Firma']['F2_Blue']); @@ -195,8 +195,8 @@ $pdf->SetFont('Helvetica', 'B', 10); $pdf->Cell(105, 4, "", 0); $pdf->Cell(25, 4, "Netto", 0, 0, 'R'); $pdf->Cell(25, 4, "MwSt", 0, 0, 'R'); -$pdf->Cell(25, 4, "Gesamt", 0, 0, 'R'); -$pdf->Write(4, "\n\n"); +$pdf->Cell(25, 4, "Gesamt", 0, 1, 'R'); +$pdf->Write(4, "\n"); $y = $pdf->GetY() - 2; $pdf->Line(20, $y, 200, $y); $pdf->SetFont('Helvetica', '', 10); @@ -209,8 +209,7 @@ if (0 != $_19) $pdf->SetFont('Helvetica', 'B', 10); $pdf->Cell(25, 4, number_format($_19_MwSt, '2', ',', '.') . " €", 0, 0, 'R'); $pdf->SetFont('Helvetica', '', 10); - $pdf->Cell(25, 4, number_format($_19 + $_19_MwSt, '2', ',', '.') . " €", 0, 0, 'R'); - $pdf->Write(4, "\n"); + $pdf->Cell(25, 4, number_format($_19 + $_19_MwSt, '2', ',', '.') . " €", 0, 1, 'R'); } if (0 != $_7) { @@ -219,8 +218,7 @@ if (0 != $_7) $pdf->SetFont('Helvetica', 'B', 10); $pdf->Cell(25, 4, number_format($_7_MwSt, '2', ',', '.') . " €", 0, 0, 'R'); $pdf->SetFont('Helvetica', '', 10); - $pdf->Cell(25, 4, number_format($_7 + $_7_MwSt, '2', ',', '.') . " €", 0, 0, 'R'); - $pdf->Write(4, "\n"); + $pdf->Cell(25, 4, number_format($_7 + $_7_MwSt, '2', ',', '.') . " €", 0, 1, 'R'); } if (0 != $_0) { @@ -229,8 +227,7 @@ if (0 != $_0) $pdf->SetFont('Helvetica', 'B', 10); $pdf->Cell(25, 4, number_format(0, '2', ',', '.') . " €", 0, 0, 'R'); $pdf->SetFont('Helvetica', '', 10); - $pdf->Cell(25, 4, number_format($_0, '2', ',', '.') . " €", 0, 0, 'R'); - $pdf->Write(4, "\n"); + $pdf->Cell(25, 4, number_format($_0, '2', ',', '.') . " €", 0, 1, 'R'); } if (0 != $Sonst_Preis) { @@ -239,18 +236,15 @@ if (0 != $Sonst_Preis) $pdf->SetFont('Helvetica', 'B', 10); $pdf->Cell(25, 4, number_format($Sonst_MwSt, '2', ',', '.') . " €", 0, 0, 'R'); $pdf->SetFont('Helvetica', '', 10); - $pdf->Cell(25, 4, number_format($Sonst_Preis + $Sonst_MwSt, '2', ',', '.') . " €", 0, 0, 'R'); - $pdf->Write(4, "\n"); + $pdf->Cell(25, 4, number_format($Sonst_Preis + $Sonst_MwSt, '2', ',', '.') . " €", 0, 1, 'R'); } -/* -$ntsum = $resultsum->fetch_assoc(); + $pdf->Cell(105, 4, "Gesamt", 0); -$pdf->Cell(25, 4, number_format($ntsum['Preis'], '2', ',', '.')." €", 0, 0, 'R'); +$pdf->Cell(25, 4, number_format(($_19 + $_7 + $_0 + $Sonst_Preis), '2', ',', '.')." €", 0, 0, 'R'); $pdf->SetFont('Helvetica','B', 10); -$pdf->Cell(25, 4, number_format($ntsum['MwSt'], '2', ',', '.')." €", 0, 0, 'R'); +$pdf->Cell(25, 4, number_format(($_19_MwSt + $_7_MwSt + $Sonst_MwSt), '2', ',', '.')." €", 0, 0, 'R'); $pdf->SetFont('Helvetica','', 10); -$pdf->Cell(25, 4, number_format($ntsum['Gesamt'], '2', ',', '.')." €", 0, 0, 'R'); -*/ +$pdf->Cell(25, 4, number_format(($_19 + $_7 + $_0 + $Sonst_Preis + $_19_MwSt + $_7_MwSt + $Sonst_MwSt), '2', ',', '.')." €", 0, 0, 'R'); if(!is_dir(__DIR__ . "/" . PREFIX . "/eur")) { diff --git a/pdf/aussoll_pdf.php b/pdf/aussoll_pdf.php index 312e76a..fcf50b5 100644 --- a/pdf/aussoll_pdf.php +++ b/pdf/aussoll_pdf.php @@ -19,6 +19,7 @@ $pdf->SetDisplayMode('fullpage'); $pdf->AddPage(); $pdf->SetRightMargin(10); +$pdf->SetLeftMargin(20); $pdf->SetY(50); $pdf->SetFont('Helvetica', 'B', 14); $pdf->SetTextColor($_SESSION['Firma']['F2_Red'], $_SESSION['Firma']['F2_Green'], $_SESSION['Firma']['F2_Blue']); @@ -118,8 +119,8 @@ $pdf->SetFont('Helvetica', 'B', 10); $pdf->Cell(105, 4, "", 0); $pdf->Cell(25, 4, "Netto", 0, 0, 'R'); $pdf->Cell(25, 4, "MwSt", 0, 0, 'R'); -$pdf->Cell(25, 4, "Gesamt", 0, 0, 'R'); -$pdf->Write(4, "\n\n"); +$pdf->Cell(25, 4, "Gesamt", 0, 1, 'R'); +$pdf->Write(4, "\n"); $y = $pdf->GetY() - 2; $pdf->Line(20, $y, 200, $y); $pdf->SetFont('Helvetica', '', 10); @@ -132,8 +133,7 @@ if (0 != $_19) $pdf->SetFont('Helvetica', 'B', 10); $pdf->Cell(25, 4, number_format($_19_MwSt, '2', ',', '.') . " €", 0, 0, 'R'); $pdf->SetFont('Helvetica', '', 10); - $pdf->Cell(25, 4, number_format($_19 + $_19_MwSt, '2', ',', '.') . " €", 0, 0, 'R'); - $pdf->Write(4, "\n"); + $pdf->Cell(25, 4, number_format($_19 + $_19_MwSt, '2', ',', '.') . " €", 0, 1, 'R'); } if (0 != $_7) { @@ -142,8 +142,7 @@ if (0 != $_7) $pdf->SetFont('Helvetica', 'B', 10); $pdf->Cell(25, 4, number_format($_7_MwSt, '2', ',', '.') . " €", 0, 0, 'R'); $pdf->SetFont('Helvetica', '', 10); - $pdf->Cell(25, 4, number_format($_7 + $_7_MwSt, '2', ',', '.') . " €", 0, 0, 'R'); - $pdf->Write(4, "\n"); + $pdf->Cell(25, 4, number_format($_7 + $_7_MwSt, '2', ',', '.') . " €", 0, 1, 'R'); } if (0 != $_0) { @@ -152,8 +151,7 @@ if (0 != $_0) $pdf->SetFont('Helvetica', 'B', 10); $pdf->Cell(25, 4, number_format(0, '2', ',', '.') . " €", 0, 0, 'R'); $pdf->SetFont('Helvetica', '', 10); - $pdf->Cell(25, 4, number_format($_0, '2', ',', '.') . " €", 0, 0, 'R'); - $pdf->Write(4, "\n"); + $pdf->Cell(25, 4, number_format($_0, '2', ',', '.') . " €", 0, 1, 'R'); } if (0 != $Sonst_Preis) { @@ -162,10 +160,16 @@ if (0 != $Sonst_Preis) $pdf->SetFont('Helvetica', 'B', 10); $pdf->Cell(25, 4, number_format($Sonst_MwSt, '2', ',', '.') . " €", 0, 0, 'R'); $pdf->SetFont('Helvetica', '', 10); - $pdf->Cell(25, 4, number_format($Sonst_Preis + $Sonst_MwSt, '2', ',', '.') . " €", 0, 0, 'R'); - $pdf->Write(4, "\n"); + $pdf->Cell(25, 4, number_format($Sonst_Preis + $Sonst_MwSt, '2', ',', '.') . " €", 0, 1, 'R'); } +$pdf->Cell(105, 4, "Gesamt", 0); +$pdf->Cell(25, 4, number_format(($_19 + $_7 + $_0 + $Sonst_Preis), '2', ',', '.')." €", 0, 0, 'R'); +$pdf->SetFont('Helvetica','B', 10); +$pdf->Cell(25, 4, number_format(($_19_MwSt + $_7_MwSt + $Sonst_MwSt), '2', ',', '.')." €", 0, 0, 'R'); +$pdf->SetFont('Helvetica','', 10); +$pdf->Cell(25, 4, number_format(($_19 + $_7 + $_0 + $Sonst_Preis + $_19_MwSt + $_7_MwSt + $Sonst_MwSt), '2', ',', '.')." €", 0, 0, 'R'); + if(!is_dir(__DIR__ . "/" . PREFIX . "/eur")) { mkdir(__DIR__ . "/" . PREFIX . "/eur", 0777, true); diff --git a/pdf/einist_pdf.php b/pdf/einist_pdf.php index 790a830..ae87bae 100644 --- a/pdf/einist_pdf.php +++ b/pdf/einist_pdf.php @@ -19,6 +19,7 @@ $pdf->SetDisplayMode('fullpage'); $pdf->AddPage(); $pdf->SetRightMargin(10); +$pdf->SetLeftMargin(20); $pdf->SetY(50); $pdf->SetFont('Helvetica', 'B', 14); $pdf->SetTextColor($_SESSION['Firma']['F2_Red'], $_SESSION['Firma']['F2_Green'], $_SESSION['Firma']['F2_Blue']); @@ -91,8 +92,8 @@ $pdf->SetFont('Helvetica', 'B', 10); $pdf->Cell(105, 4, "", 0); $pdf->Cell(25, 4, "Netto", 0, 0, 'R'); $pdf->Cell(25, 4, "MwSt", 0, 0, 'R'); -$pdf->Cell(25, 4, "Gesamt", 0, 0, 'R'); -$pdf->Write(4, "\n\n"); +$pdf->Cell(25, 4, "Gesamt", 0, 1, 'R'); +$pdf->Write(4, "\n"); $y = $pdf->GetY() - 2; $pdf->Line(20, $y, 200, $y); $pdf->SetFont('Helvetica', '', 10); @@ -108,8 +109,7 @@ while ($ntust = $resultust->fetch_assoc()) $pdf->SetFont('Helvetica', 'B', 10); $pdf->Cell(25, 4, number_format($ntust['Preis'] * 0.19, '2', ',', '.') . " €", 0, 0, 'R'); $pdf->SetFont('Helvetica', '', 10); - $pdf->Cell(25, 4, number_format($ntust['Preis'] * 1.19, '2', ',', '.') . " €", 0, 0, 'R'); - $pdf->Write(4, "\n"); + $pdf->Cell(25, 4, number_format($ntust['Preis'] * 1.19, '2', ',', '.') . " €", 0, 1, 'R'); } elseif (7 == $ntust['MwSt']) { @@ -118,8 +118,7 @@ while ($ntust = $resultust->fetch_assoc()) $pdf->SetFont('Helvetica', 'B', 10); $pdf->Cell(25, 4, number_format($ntust['Preis'] * 0.07, '2', ',', '.') . " €", 0, 0, 'R'); $pdf->SetFont('Helvetica', '', 10); - $pdf->Cell(25, 4, number_format($ntust['Preis'] * 1.07, '2', ',', '.') . " €", 0, 0, 'R'); - $pdf->Write(4, "\n"); + $pdf->Cell(25, 4, number_format($ntust['Preis'] * 1.07, '2', ',', '.') . " €", 0, 1, 'R'); } elseif (0 == $ntust['MwSt']) { @@ -128,8 +127,7 @@ while ($ntust = $resultust->fetch_assoc()) $pdf->SetFont('Helvetica', 'B', 10); $pdf->Cell(25, 4, number_format(0, '2', ',', '.') . " €", 0, 0, 'R'); $pdf->SetFont('Helvetica', '', 10); - $pdf->Cell(25, 4, number_format($ntust['Preis'], '2', ',', '.') . " €", 0, 0, 'R'); - $pdf->Write(4, "\n"); + $pdf->Cell(25, 4, number_format($ntust['Preis'], '2', ',', '.') . " €", 0, 1, 'R'); } else { @@ -144,8 +142,7 @@ if (0 != $Sonst_Preis) $pdf->SetFont('Helvetica', 'B', 10); $pdf->Cell(25, 4, number_format($Sonst_MwSt, '2', ',', '.') . " €", 0, 0, 'R'); $pdf->SetFont('Helvetica', '', 10); - $pdf->Cell(25, 4, number_format($Sonst_Preis + $Sonst_MwSt, '2', ',', '.') . " €", 0, 0, 'R'); - $pdf->Write(4, "\n"); + $pdf->Cell(25, 4, number_format($Sonst_Preis + $Sonst_MwSt, '2', ',', '.') . " €", 0, 1, 'R'); } $ntsum = $resultsum->fetch_assoc(); $pdf->Cell(105, 4, "Gesamt", 0); @@ -153,7 +150,7 @@ $pdf->Cell(25, 4, number_format($ntsum['Preis'], '2', ',', '.') . " €", 0, 0, $pdf->SetFont('Helvetica', 'B', 10); $pdf->Cell(25, 4, number_format($ntsum['MwSt'], '2', ',', '.') . " €", 0, 0, 'R'); $pdf->SetFont('Helvetica', '', 10); -$pdf->Cell(25, 4, number_format($ntsum['Gesamt'], '2', ',', '.') . " €", 0, 0, 'R'); +$pdf->Cell(25, 4, number_format($ntsum['Gesamt'], '2', ',', '.') . " €", 0, 1, 'R'); if(!is_dir(__DIR__ . "/" . PREFIX . "/eur")) { diff --git a/pdf/einsoll_pdf.php b/pdf/einsoll_pdf.php index 6e0d17d..c160e23 100644 --- a/pdf/einsoll_pdf.php +++ b/pdf/einsoll_pdf.php @@ -19,6 +19,7 @@ $pdf->SetDisplayMode('fullpage'); $pdf->AddPage(); $pdf->SetRightMargin(10); +$pdf->SetLeftMargin(20); $pdf->SetY(50); $pdf->SetFont('Helvetica', 'B', 14); $pdf->SetTextColor($_SESSION['Firma']['F2_Red'], $_SESSION['Firma']['F2_Green'], $_SESSION['Firma']['F2_Blue']); @@ -89,8 +90,8 @@ $pdf->SetFont('Helvetica', 'B', 10); $pdf->Cell(105, 4, "", 0); $pdf->Cell(25, 4, "Netto", 0, 0, 'R'); $pdf->Cell(25, 4, "MwSt", 0, 0, 'R'); -$pdf->Cell(25, 4, "Gesamt", 0, 0, 'R'); -$pdf->Write(4, "\n\n"); +$pdf->Cell(25, 4, "Gesamt", 0, 1, 'R'); +$pdf->Write(4, "\n"); $y = $pdf->GetY() - 2; $pdf->Line(20, $y, 200, $y); $pdf->SetFont('Helvetica', '', 10); @@ -106,8 +107,7 @@ while ($ntust = $resultust->fetch_assoc()) $pdf->SetFont('Helvetica', 'B', 10); $pdf->Cell(25, 4, number_format($ntust['Preis'] * 0.19, '2', ',', '.') . " €", 0, 0, 'R'); $pdf->SetFont('Helvetica', '', 10); - $pdf->Cell(25, 4, number_format($ntust['Preis'] * 1.19, '2', ',', '.') . " €", 0, 0, 'R'); - $pdf->Write(4, "\n"); + $pdf->Cell(25, 4, number_format($ntust['Preis'] * 1.19, '2', ',', '.') . " €", 0, 1, 'R'); } elseif (7 == $ntust['MwSt']) { @@ -116,8 +116,7 @@ while ($ntust = $resultust->fetch_assoc()) $pdf->SetFont('Helvetica', 'B', 10); $pdf->Cell(25, 4, number_format($ntust['Preis'] * 0.07, '2', ',', '.') . " €", 0, 0, 'R'); $pdf->SetFont('Helvetica', '', 10); - $pdf->Cell(25, 4, number_format($ntust['Preis'] * 1.07, '2', ',', '.') . " €", 0, 0, 'R'); - $pdf->Write(4, "\n"); + $pdf->Cell(25, 4, number_format($ntust['Preis'] * 1.07, '2', ',', '.') . " €", 0, 1, 'R'); } elseif (0 == $ntust['MwSt']) { @@ -126,8 +125,7 @@ while ($ntust = $resultust->fetch_assoc()) $pdf->SetFont('Helvetica', 'B', 10); $pdf->Cell(25, 4, number_format(0, '2', ',', '.') . " €", 0, 0, 'R'); $pdf->SetFont('Helvetica', '', 10); - $pdf->Cell(25, 4, number_format($ntust['Preis'], '2', ',', '.') . " €", 0, 0, 'R'); - $pdf->Write(4, "\n"); + $pdf->Cell(25, 4, number_format($ntust['Preis'], '2', ',', '.') . " €", 0, 1, 'R'); } else { @@ -142,8 +140,7 @@ if (0 != $Sonst_Preis) $pdf->SetFont('Helvetica', 'B', 10); $pdf->Cell(25, 4, number_format($Sonst_MwSt, '2', ',', '.') . " €", 0, 0, 'R'); $pdf->SetFont('Helvetica', '', 10); - $pdf->Cell(25, 4, number_format($Sonst_Preis + $Sonst_MwSt, '2', ',', '.') . " €", 0, 0, 'R'); - $pdf->Write(4, "\n"); + $pdf->Cell(25, 4, number_format($Sonst_Preis + $Sonst_MwSt, '2', ',', '.') . " €", 0, 1, 'R'); } $ntsum = $resultsum->fetch_assoc(); $pdf->Cell(105, 4, "Gesamt", 0); @@ -151,7 +148,7 @@ $pdf->Cell(25, 4, number_format($ntsum['Preis'], '2', ',', '.') . " €", 0, 0, $pdf->SetFont('Helvetica', 'B', 10); $pdf->Cell(25, 4, number_format($ntsum['MwSt'], '2', ',', '.') . " €", 0, 0, 'R'); $pdf->SetFont('Helvetica', '', 10); -$pdf->Cell(25, 4, number_format($ntsum['Gesamt'], '2', ',', '.') . " €", 0, 0, 'R'); +$pdf->Cell(25, 4, number_format($ntsum['Gesamt'], '2', ',', '.') . " €", 0, 1, 'R'); if(!is_dir(__DIR__ . "/" . PREFIX . "/eur")) {