summaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorkarl <noreply@maennchen1.de>2023-06-19 07:00:27 +0000
committerkarl <noreply@maennchen1.de>2023-06-19 07:00:27 +0000
commit35950a969ca233e26397e512fcdce53f9a840c27 (patch)
tree5f9a93c7ae4ad3cfc28018d3577cb470d29ff5e9 /views
parent5790bddc1f36be0ec9e0d5e6c72f2b9bd9ba0132 (diff)
- Bugfix: Modul Rechnungen: standard Rechnungspdf - Darstellung der MwSt. wurde korrigiert
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@8301 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views')
-rw-r--r--views/mods/mod_rechnungen/invoice_pdf.phtml65
1 files changed, 39 insertions, 26 deletions
diff --git a/views/mods/mod_rechnungen/invoice_pdf.phtml b/views/mods/mod_rechnungen/invoice_pdf.phtml
index 4f49dad..89fb3b5 100644
--- a/views/mods/mod_rechnungen/invoice_pdf.phtml
+++ b/views/mods/mod_rechnungen/invoice_pdf.phtml
@@ -34,9 +34,6 @@
$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']);
@@ -203,12 +200,16 @@
$shipping_cost = $this->view['basket']['arCalculation']['sum']['shipping_netto'];
$payment_cost = $this->view['basket']['arCalculation']['sum']['payment_netto'];
+ $taxdisplay = 'netto';
+
} else {
$discount_value = abs($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;
@@ -480,7 +481,7 @@
$gs_value_einzel = wpsg_ff($v[$taxdisplay.'_single'], $this->get_option('wpsg_currency'));
$gs_value_gesamt = wpsg_ff($v[$taxdisplay], $this->get_option('wpsg_currency'));
-
+
$pdf->setXY($prod_left + 127, $prod_top + $offset);
$pdf->Cell(25, 8, $gs_value_einzel, 1, 0, 'R');
@@ -507,11 +508,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)
+ // {
+ if ($bNoTax)
+ {
+
+ $mwst = wpsg_ff(0.00, '%');
+
+ } else {
- if ($this->view['basket']['arCalculation']['shipping'][0]['tax_key'] === '0') $mwst = _('anteilig');
- else {
+ if ($this->view['basket']['arCalculation']['shipping'][0]['tax_key'] === '0') {
+
+ $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'], '%');
@@ -552,7 +562,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, '%');
@@ -639,7 +651,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) )
{
@@ -647,19 +672,18 @@
$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');
+ $pdf->Cell(37, 8, wpsg_ff($this->view['basket']['arCalculation']['sum']['brutto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
if ( !$bNoTax || ($arCalculation['sum']['topay_brutto'] != $arCalculation['sum']['brutto']) ) $offset += 5;
} else {
if ($bNoTax)
{
-
+
$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']) )
+ $pdf->Cell(37, 8, wpsg_ff($this->view['basket']['arCalculation']['sum']['brutto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$offset += 5;
if ( !(($this->view['oOrder']->isInnerEu() || $deliverycountrytax) && ($this->view['oCalculationOrder']->getTaxMode() === \wpsg\wpsg_calculation::TAXMODE_B2B)) ) {
@@ -704,7 +728,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)
{
@@ -741,17 +765,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'] ) {