Giter VIP home page Giter VIP logo

Comments (8)

vvasiloi avatar vvasiloi commented on June 15, 2024 1

@Prometee we did go with the custom tax adjustments in the end. Changing Sylius to allow applying multiple taxes without a BC does not seem possible, or at least it's not trivial.

from sylius.

gabiudrescu avatar gabiudrescu commented on June 15, 2024

cc @vvasiloi @maximehuran @jacquesbh

from sylius.

gabiudrescu avatar gabiudrescu commented on June 15, 2024

Context: in Romania, starting the 1st of Dec. 2023 the govt. started an initiative called „SGR - Sistem Garanție Returnare” (roughly translated to „Return guarantee system” - https://returosgr.ro/).

Basically, everybody that is selling packaged goods have to charge customers a fixed fee of 0.5 RON for each package.

Those money will be refunded to the customers when they return the empty package, in order to encourage people to recycle.

Implementing this in Sylius felt like a no-brainer, but after some testing, things proved more complex. Two issues were identified:

  1. the way tax category with multiple taxes work - meant to be addressed by this issue in core
  2. a fixed tax calculator - this was implemented as a custom plugin (specific to the shop, as it we didn't thought it would worth have this in core)

In the end, both solutions were implemented as a custom, specific plugin - but I think this is relevant to the entire community as well.

also, if mr. Google-bot will visit this page, maybe indexing this for „SGR Sylius” or Sylius SGR would be beneficial, from SEO POV 😀

Same for „Returo Sylius

from sylius.

jacquesbh avatar jacquesbh commented on June 15, 2024

We have implemented such taxes for the french exotax.
Maybe @lanfisis has more details.

from sylius.

gabiudrescu avatar gabiudrescu commented on June 15, 2024

@TheMilek not sure I understand why this is marked as Feature.

My take is that this is a bug, because we do have the following relations: a Product can have one tax category and a tax category can have multiple taxes.

if we would have had relations like a Product can have one tax and now I would have requested a product can have multiple taxes then I would agree with the Feature label.

Otherwise, shouldn't this be considered a bug?

from sylius.

Prometee avatar Prometee commented on June 15, 2024

What about not considering it like a taxe but like a specific adjustment type ?


In an other hand, being able to set multiple tax rates on an item or item unit must be possible, I can imagine some countries applying multiple taxes on the same product.
I can also see this requirement in almost all international accounting tools like QuickBook, Sage, Odoo or Xero.

Now technically, the very center of the issue is focused on the sylius.tax_rate_resolver which is used by :

  • sylius.taxation.order_shipment_taxes_applicator
  • sylius.taxation.order_items_taxes_applicator
  • sylius.taxation.order_item_units_taxes_applicator

If we wanted multiple returned taxes from sylius.tax_rate_resolver then we also need a new way to know that the Taxable (eg Product) have multiple tax categories (with a way to sort them).
Then we just have to change each taxe applicator to apply multiple taxes.

@gabiudrescu WDYT ?

from sylius.

gabiudrescu avatar gabiudrescu commented on June 15, 2024

@Prometee

If we wanted multiple returned taxes from sylius.tax_rate_resolver then we also need a new way to know that the Taxable (eg Product) have multiple tax categories (with a way to sort them).

When I brainstormed with @vvasiloi on this, the conclusions we agreed on was:

  1. either continue having the relation with Product - 1 Tax Category - n Taxes
  2. or switch on having a Many to Many between Product and Taxes, thus removing the need of having the Tax Category in between

Either way, what we have now in main branch is not consistent. Hence the open bug.

But since 2.0 is right around the corner, shouldn't this be considered now rather than wait for 3.0 ?

from sylius.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.