Versandkosten Mehrwertsteuer

Hier können Sie Fragen bezüglich des Shop Moduls stellen.
FranzID
Junior Member
Beiträge: 3
Registriert: Mo 12. Feb 2018, 19:27

Versandkosten Mehrwertsteuer

Beitragvon FranzID » Di 13. Feb 2018, 19:55

Hallo,
ich möchte die Mehrwertsteuer auf Versandkosten berechnen. Da 7% oder 19% vorhanden sind, benötige ich einen Vergleich, welche Summe der beiden Varianten größer ist.

Code: Alles auswählen

<we:ifShopVat id="3">
                              <we:calculate print="false" sum="totalVat1">
                                <we:showShopItemNumber type="print" shopname="shop" /> *
                                <we:field name="price" />*<we:field type="shopVat" />/(<we:field type="shopVat" />+100)
                              </we:calculate>
                            </we:ifShopVat>
                            
                            <we:ifShopVat id="4">
                              <we:calculate print="false" sum="totalVat2">
                                <we:showShopItemNumber type="print" shopname="shop" /> *
                                <we:field name="price" />*<we:field type="shopVat" />/(<we:field type="shopVat" />+100)
                              </we:calculate>
                            </we:ifShopVat>
                            
                            
Hat jemand eine Idee, wie ich einen Vergleich machen kann, damit die Mehrwertsteuer auf den größeren Betrag berechnet wird?
Schönen Gruß
Franz

AndreasWitt

Re: Versandkosten Mehrwertsteuer

Beitragvon AndreasWitt » Mi 14. Feb 2018, 20:35

... also so kannst du alle MwSt.-Sätze aufaddieren und zum Schluss kannst du die dann vergleichen, wenn du magst. Aber beim Versand kann man auch einfach den höchsten MwSt.-Satz nehmen, der ermittelt wurde.

Code: Alles auswählen

<we:ifShopPayVat>
	<we:field type="shopVat" to="global" nameto="articleShopVat"/>
	<we:calculate to="global" nameto="totalArticleSum"><we:showShopItemNumber shopname="shop" type="print" floatquantities="false" />*<we:field type="float" name="price"/></we:calculate>
	
	<we:comment>Berechnung der MwSt.</we:comment>
	<?php 
	if(array_key_exists($GLOBALS['articleShopVat'], $GLOBALS['allShopVats'])){
		$GLOBALS['allShopVats'][$GLOBALS['articleShopVat']] = ($GLOBALS['allShopVats'][$GLOBALS['articleShopVat']] + round(($GLOBALS["totalArticleSum"]-($GLOBALS["totalArticleSum"]/(1+($GLOBALS['articleShopVat']/100)))),2));
	}else{
		$GLOBALS['allShopVats'][$GLOBALS['articleShopVat']] = round(($GLOBALS["totalArticleSum"]-($GLOBALS["totalArticleSum"]/(1+($GLOBALS['articleShopVat']/100)))),2);
	}
	?>
<we:else comment="Kunde zahlt keine MwSt."/>
	<td><we:calculate num_format="german" print="true" sum="totalArticlePriceBasket"><we:showShopItemNumber shopname="shop" type="print" floatquantities="false" />*<we:field type="float" name="price"/></we:calculate> EUR</td>
</we:ifShopPayVat>
Grüße, Andreas


Zurück zu „Shop Modul“

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 5 Gäste