0

I have altered the order of the summary items in the summary cart, so that the shipping service is showing before the VAT line.

Total amount excl. VAT and shipping 13 735

Shipping cost 160

VAT 3 435 (should be 3 475 as the VAT is 25% for the shipping cost)

Total amount incl VAT 17 330 (should be 17 370 when shipping VAT is included)

I now need to include the cost for the shipping service in the VAT calculation. I have spent many hours trying to come up with a rule for this, with no luck.

This what I have got so far. I have created a new tax type called "fraktmoms" and the name of the shipping service is "postens_foretagspaket". I simply try to calculate a new value using the action "Calculate a value", if there is a shipping service selected:

{ "commerce_tax_type_fraktmoms" : {
    "LABEL" : "Calculate taxes: Fraktmoms",
    "PLUGIN" : "reaction rule",
    "OWNER" : "rules",
    "TAGS" : [ "Commerce Tax" ],
    "REQUIRES" : [ "commerce_shipping", "rules", "commerce_product_reference" ],
    "ON" : { "commerce_product_calculate_sell_price" : [] },
    "IF" : [
      { "commerce_shipping_compare_shipping_service" : {
          "commerce_order" : [ "commerce-line-item:order" ],
          "service" : "postens_foretagspaket"
        }
      }
    ],
    "DO" : [
      { "data_calc" : {
          "USING" : {
            "input_1" : [
              "commerce-line-item:commerce-unit-price:flat-rate-postens-foretagspaket:amount"
            ],
            "op" : "*",
            "input_2" : "0.25"
          },
          "PROVIDE" : { "result" : { "fraktmoms" : "Fraktmoms" } }
        }

Anybody who can give me a hint on how to apply the 25% VAT on the shipping cost and add it to the total amount?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.