Calling Developers!
We are reenergizing our code contribution process! Learn More

What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Hi, is there a Spryker module which handles adding the “Equivalence Surcharge” in Spain? I’ve been

Options
U019WGU7SM9
U019WGU7SM9 Posts: 24 🧑🏻‍🚀 - Cadet

Hi, is there a Spryker module which handles adding the “Equivalence Surcharge” in Spain? I’ve been looking at SalesOrderThreshold but it doesn’t really seem suitable without quite a lot of overriding

Comments

  • Andriy Netseplyayev
    Andriy Netseplyayev Domain Lead Solution Architecture Sprykee Posts: 519 🧑🏻‍🚀 - Cadet
    edited September 2021
    Options

    Hi Peter, what is this “Equivalence Surcharge” supposed to do?

  • U019WGU7SM9
    U019WGU7SM9 Posts: 24 🧑🏻‍🚀 - Cadet
    Options

    It is an extra tax charge added to an order at a b2b customer’s request. If the customer pays it for stock they buy, then they do not have to submit tax returns. https://www.selfemployedspain.com/everything-you-need-to-know-about-spanish-vat/

  • U019WGU7SM9
    U019WGU7SM9 Posts: 24 🧑🏻‍🚀 - Cadet
    Options

    It is calculated based on the tax rates of the products in the cart

  • U019WGU7SM9
    U019WGU7SM9 Posts: 24 🧑🏻‍🚀 - Cadet
    Options

    I thought about using SalesOrderThreshold, but it doesn’t seem like the right fit

  • Andriy Netseplyayev
    Andriy Netseplyayev Domain Lead Solution Architecture Sprykee Posts: 519 🧑🏻‍🚀 - Cadet
    Options

    hm, okay. My intention would be just to add another “total” for the cart and calculate it they way you need. If that needs to be summed up from item level surcharges - just add your plugin(s) to the Calculation stack - \Pyz\Zed\Calculation\CalculationDependencyProvider::getQuoteCalculatorPluginStack()

  • Andriy Netseplyayev
    Andriy Netseplyayev Domain Lead Solution Architecture Sprykee Posts: 519 🧑🏻‍🚀 - Cadet
    Options

    It will be way easier than trying to adjust an existing feature that is doing something else..

  • U019WGU7SM9
    U019WGU7SM9 Posts: 24 🧑🏻‍🚀 - Cadet
    Options

    yes I think that is the way I will go, after looking at how it’s done in other systems, using an ‘expense’ doesn’t seem right. I’ll add a new column to spy_sales_order_totals and make the calculator changes to populate it