summaryrefslogtreecommitdiff
path: root/views/mods
diff options
context:
space:
mode:
authorkarl <noreply@maennchen1.de>2023-02-28 13:32:59 +0000
committerkarl <noreply@maennchen1.de>2023-02-28 13:32:59 +0000
commit9ace734b22d51ab38bece97d3e0cd97ab6fc1802 (patch)
tree4c1a27fc5d062462a88dcc6794f48396117e097d /views/mods
parent1e1aa2131e87179f5cc4dd23fd9946d64df3a894 (diff)
- Bugfix: Rechnungsmodul: MwSt. gemäß Lieferland wird nun richtig auf der Rechnung angezeigt
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@8243 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views/mods')
-rw-r--r--views/mods/mod_rechnungen/invoice_pdf.phtml15
1 files changed, 12 insertions, 3 deletions
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)
{