Comments (8)
@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.
cc @vvasiloi @maximehuran @jacquesbh
from sylius.
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:
- the way tax category with multiple taxes work - meant to be addressed by this issue in core
- 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.
We have implemented such taxes for the french exotax.
Maybe @lanfisis has more details.
from sylius.
@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.
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.
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:
- either continue having the relation with Product - 1 Tax Category - n Taxes
- 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)
- \Sylius\Bundle\ResourceBundle\Controller\ControllerTrait::addFlash throw error on Sylius 1.12 HOT 17
- Symfony 7 support HOT 3
- Varnish invalidation is incomplete HOT 1
- [Shop] Cart page breaks styling on invalid coupon submit HOT 1
- Add default repository classes
- [Potential Issue] update cart lead to order id appears in url HOT 3
- [Issue] Too many database calls during warmup cache
- DefaultProductVariantResolver is not getting the first positioned variant
- Flash messages can't be added from Ajax requests HOT 1
- Unable to apply promotions
- How do you make an existing Sylius resource translatable?
- Console error with symfony 6.4 HOT 5
- Addresses created with shop endpoint do not bind customer HOT 4
- Localized datetime depending of browser or logged in admin HOT 2
- [ADMIN][UI] Administrator form display issue HOT 2
- Bug with docker, chmod required for public directory
- Add a new rule to promotion HOT 2
- Base_currency_id cannot be null when creating a new channel
- On product attribuites of type select the apply to all button doesn't select the correct options
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sylius.