From 9ace734b22d51ab38bece97d3e0cd97ab6fc1802 Mon Sep 17 00:00:00 2001 From: karl Date: Tue, 28 Feb 2023 13:32:59 +0000 Subject: - Bugfix: Rechnungsmodul: MwSt. gemäß Lieferland wird nun richtig auf der Rechnung angezeigt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://[internal]/wordpress/plugins/wpsg4@8243 0d5edaf7-2b12-4e95-93f4-047927463d4b --- views/mods/mod_rechnungen/invoice_pdf.phtml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'views/mods') diff --git a/views/mods/mod_rechnungen/invoice_pdf.phtml b/views/mods/mod_rechnungen/invoice_pdf.phtml index fe2ee97..d11e6d6 100644 --- a/views/mods/mod_rechnungen/invoice_pdf.phtml +++ b/views/mods/mod_rechnungen/invoice_pdf.phtml @@ -178,8 +178,17 @@ $pdf->SetAutoPageBreak(true, 5); AddRechnungPage($this, $pdf); - if ( ($this->view['oCalculationOrder']->getTaxMode() === \wpsg\wpsg_calculation::TAXMODE_B2B && $this->view['oOrder']->isInnerEu()) - || ($this->view['oCalculationOrder']->getTaxMode() === \wpsg\wpsg_calculation::TAXMODE_SMALLBUSINESS) + if ($this->get_option('wpsg_deliverycountrytax') === '1') { + $value = false; + $kl = $this->view['kunde']['land']; + if ( ($kl['mwst_a']) && ($kl['mwst_b']) && ($kl['mwst_c']) && ($kl['mwst_d']) == 0.0000 ) $value = true; + $deliverycountrytax = $value; + } + + if ( + ( ($this->view['oCalculationOrder']->getTaxMode() === \wpsg\wpsg_calculation::TAXMODE_B2B) && ( $this->view['oOrder']->isInnerEu() || $deliverycountrytax ) ) + || + ( $this->view['oCalculationOrder']->getTaxMode() === \wpsg\wpsg_calculation::TAXMODE_SMALLBUSINESS ) ) $bNoTax = true; else $bNoTax = false; @@ -650,7 +659,7 @@ //if ( !$bNoTax || ($arCalculation['sum']['topay_brutto'] != $arCalculation['sum']['brutto']) ) $offset += 5; - if ( !(($this->view['oOrder']->isInnerEu()) && ($this->view['oCalculationOrder']->getTaxMode() === \wpsg\wpsg_calculation::TAXMODE_B2B)) ) { + if ( !(($this->view['oOrder']->isInnerEu() || $deliverycountrytax) && ($this->view['oCalculationOrder']->getTaxMode() === \wpsg\wpsg_calculation::TAXMODE_B2B)) ) { if (sizeof($this->view['basket']['arCalculation']['tax']) >= 1) { -- cgit v1.2.3