summaryrefslogtreecommitdiff
path: root/views/mods
diff options
context:
space:
mode:
Diffstat (limited to 'views/mods')
-rw-r--r--views/mods/mod_rechnungen/accounting_pdf.phtml62
1 files changed, 38 insertions, 24 deletions
diff --git a/views/mods/mod_rechnungen/accounting_pdf.phtml b/views/mods/mod_rechnungen/accounting_pdf.phtml
index 60930cc..2f45f66 100644
--- a/views/mods/mod_rechnungen/accounting_pdf.phtml
+++ b/views/mods/mod_rechnungen/accounting_pdf.phtml
@@ -33,9 +33,6 @@
$prod_break = $this->get_option('wpsg_rechnungen_pdfperpage');
$arCalculation = $this->view['basket']['arCalculation'];
-
- if ($this->getFrontendTaxView() === WPSG_NETTO) $taxdisplay = 'netto';
- else $taxdisplay = 'brutto';
// Damit die Steuer bei der Kleinunternehmerregelung nicht angezeigt wird leer ich den Array sicherheitshalber
if ( ($this->get_option('wpsg_kleinunternehmer') == '1') || ($this->view['oCalculationOrder']->getTaxMode() === \wpsg\wpsg_calculation::TAXMODE_SMALLBUSINESS) ) unset($this->view['basket']['mwst']);
@@ -175,19 +172,22 @@
if ($this->get_option('wpsg_showMwstAlways') === '1') $bTaxCol = true;
else if (!$bNoTax) $bTaxCol = true;
-
if ($bNoTax) {
$discount_value = $this->view['basket']['arCalculation']['sum']['discount_netto'];
$shipping_cost = $this->view['basket']['arCalculation']['sum']['shipping_netto'];
$payment_cost = $this->view['basket']['arCalculation']['sum']['payment_netto'];
+ $taxdisplay = 'netto';
+
} else {
$discount_value = $this->view['basket']['arCalculation']['sum']['discount_brutto'];
$shipping_cost = $this->view['basket']['arCalculation']['sum']['shipping_brutto'];
$payment_cost = $this->view['basket']['arCalculation']['sum']['payment_brutto'];
+ $taxdisplay = 'brutto';
+
}
$summe = 0;
@@ -483,11 +483,20 @@
if ($bTaxCol)
{
- if ($this->arShipping[$this->view['data']['type_shipping']]['mwst_null'] == '1' && $bNoTax) $mwst = wpsg_ff(0.00, '%');
- else {
+ // if ($this->arShipping[$this->view['data']['type_shipping']]['mwst_null'] == '1' && $bNoTax) $mwst = wpsg_ff(0.00, '%');
+ // {
+ if ($bNoTax)
+ {
+
+ $mwst = wpsg_ff(0.00, '%');
+
+ } else {
+
+ if ($this->view['basket']['arCalculation']['shipping'][0]['tax_key'] === '0') {
- if ($this->view['basket']['arCalculation']['shipping'][0]['tax_key'] === '0') $mwst = _('anteilig');
- else {
+ $mwst = _('anteilig');
+
+ } else {
$mwst = wpsg_ff($this->view['basket']['arCalculation']['shipping'][0]['tax'], '%');
$mwst = wpsg_ff($this->view['basket']['arCalculation']['tax'][$this->view['basket']['arCalculation']['shipping'][0]['tax_key']]['tax_value'], '%');
@@ -528,7 +537,9 @@
if ($bTaxCol)
{
- if ($this->arPayment[$this->view['data']['type_payment']]['mwst_null'] == '1' && $bNoTax)
+ // if ($this->arPayment[$this->view['data']['type_payment']]['mwst_null'] == '1' && $bNoTax)
+ // {
+ if ($bNoTax)
{
$mwst = wpsg_ff(0.00, '%');
@@ -615,7 +626,20 @@
$pdf->Cell(37, 8, $this->view['kunde']['ustidnr'], 0, 0, 'R');
}
- $offset += 10; // Abstand zwischen Tabelle und Auswertung
+ $offset += 5; // Abstand zwischen Tabelle und Rabatt
+
+ // Rabatt
+ if ($discount_value > 0)
+ {
+
+ $offset += 5;
+ $pdf->Text($prod_left + 80, $prod_top + $offset, __("Rabatt", "wpsg"));
+ $pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
+ $pdf->Cell(37, 8, '-'.wpsg_ff($discount_value, $this->get_option('wpsg_currency')), 0, 0, 'R');
+
+ }
+
+ $offset += 5; // Abstand zwischen Rabatt und Auswertung
if ( ($this->get_option('wpsg_kleinunternehmer') == '1') || ($this->view['oCalculationOrder']->getTaxMode() === \wpsg\wpsg_calculation::TAXMODE_SMALLBUSINESS) )
{
@@ -623,8 +647,9 @@
$pdf->Text($prod_left, $prod_top + $offset, __("Es ergibt sich folgender Gesamtbetrag", "wpsg").':');
$pdf->Text($prod_left + 80, $prod_top + $offset, __("Summe", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
- $pdf->Cell(37, 8, wpsg_ff($this->view['basket']['arCalculation']['sum']['brutto'] + $this->view['basket']['arCalculation']['sum']['discount_brutto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
- if ( !$bNoTax || ($arCalculation['sum']['topay_brutto'] != $arCalculation['sum']['brutto']) ) $offset += 5;
+ $pdf->Cell(37, 8, wpsg_ff($this->view['basket']['arCalculation']['sum']['brutto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
+
+ $offset += 5;
} else {
@@ -680,7 +705,7 @@
$pdf->Text($prod_left + 80, $prod_top + $offset, __("NETTOBETRAG", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
- $pdf->Cell(37, 8, wpsg_ff($this->view['basket']['arCalculation']['sum']['netto'] + $this->view['basket']['arCalculation']['sum']['discount_netto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
+ $pdf->Cell(37, 8, wpsg_ff($this->view['basket']['arCalculation']['sum']['topay_netto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
if (sizeof($this->view['basket']['arCalculation']['tax']) >= 1)
{
@@ -717,17 +742,6 @@
}
}
-
- // Rabatt
- if ($discount_value > 0)
- {
-
- $offset += 5;
- $pdf->Text($prod_left + 80, $prod_top + $offset, __("Rabatt", "wpsg"));
- $pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
- $pdf->Cell(37, 8, '-'.wpsg_ff($discount_value, $this->get_option('wpsg_currency')), 0, 0, 'R');
-
- }
// Wertgutschein
if ( $arCalculation['sum']['topay_brutto'] != $arCalculation['sum']['brutto'] ) {