RailsEventStore / ecommerce

Application with CQRS and Event Sourcing built on Rails and Rails Event Store
MIT License
425 stars 72 forks source link

Allow creating custom vat rates #377

Closed marlena-b closed 3 months ago

marlena-b commented 3 months ago

Issue: https://github.com/RailsEventStore/ecommerce/issues/174

This PR lets users create custom VAT rates. Previously, VAT rates were hardcoded in the configuration files, but now users can add their own. It is not possible to add two VAT rates with the same code (it would be very confusing if we had duplicates).

In my changes VAT rate codes can be strings, like "20.0 % S" or "5.0 % R" (source). However, when adding a product, the system still checks if the VAT rate code is a number, which breaks the flow for vat rates with string names. I’ll fix that in a separate PR, along with some confusing naming, to keep this one focused.

https://github.com/user-attachments/assets/e9aee011-ae6b-4c3f-9fb2-81e48ff91558

netlify[bot] commented 3 months ago

Deploy Preview for ecommerce-events failed.

Name Link
Latest commit 265b7c287de78f8340e4d7e23cf6723989d1bab9
Latest deploy log https://app.netlify.com/sites/ecommerce-events/deploys/66c31a99f3cb3a0008ecc40f