-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Epic][Pricing][MOC][B to B] : Method Of Calculating a cart total without discount #32227
Comments
Just saw your issue. Thanks for looking into that!
That does work only if you have prices excluding tax. If the customer gets shown the prices including tax, you need to sum up the cart total with prices including tax to minimise the rounding error. So the procedure needs to be different depending on the VAT included / excluded setting. Example for VAT included pricing calculation:
|
Hello @cruftex, we are yet working on the new pricing :-) I try to understand you example 👍 |
Is is 1,19 Euro, of course. I correct it |
More formal in pseudo code:
My recommendation: remove the tax_excl and tax_incl prices on the position level and likewise in the order details. There is only one price which needs to be displayed and calculated with on the level of a position. This price is either tax inclusive or tax exclusive. The shipping costs need to be included as well in the total. If there are different tax rates, you need to do the sum total for each tax rate each. Rounding: Discounts: |
@cruftex this point is very interesting. |
I don't understand the question. Prices need to match everywhere, in the BO, FO and on the invoice. The VAT rate is defined on product level. Whether the pricing is VAT inclusive or VAT exclusive is, as far as I know, defined per customer group. |
@RosaBenouamer Hope this is helpful. Thanks for working on this! |
@cruftex thank you for your feedback. I will take a look :-) |
Hello @cruftex, "Discounts: |
@RosaBenouamer |
@cruftex :
|
My basic rule is: If something is displayed, that amount is used further calculations. Options I can think of:
Sorry, the rule should better say: With the invoice above, positions are okay since there is only tax exclusive prices. What is a problem though, is the breakdown into Products and Shipping. The separate total tax will not add up. |
Guys, in Czech republic, it's pretty standard to display both prices on the product, with and without VAT. We should find out what is the proper way of calculating multiple quantity price in this case. |
@Hlavtox: Can you please give examples? I saw in your shop you are only displaying VAT incl. price, e.g.: |
@RosaBenouamer Regarding the user stories, I am already confused with the first one:
That is kind of a functional description wrapped in a user story. What about this: As a merchant, selling to consumers, to one country, I want to enter product prices with VAT included As a merchant, selling to companies, I want to enter product prices without VAT |
@cruftex I don't have it on our stores, but some examples from TOP 50 stores in our country:
|
Hello @cruftex, Thank you for your feed back. @cruftex : here the googlesheet with futur formulas. I make you a copy. The document is not finished. The formula are described in the specification not finished If you are available we can plan a meet so I can present you the googlesheet so we can validate some concret example. |
@cruftex Either we have to display 1289,86 as a unit price and so 1066 * 1,21 * 25 = 32246,5 is ok Isn't it ? |
Unfortunately, you added three times the same spreadsheet. Was that intentional?
Oh, I missed that. I quickly checked that in the shop, when I put the product in the cart and then I see this: 290 x 25 is not 32250,13, also 1290,01 x 25 is not 32250,13. So the shop is calculating not transparently. IMHO this shop is also doing it wrong. Therefor a good example how not to do it. |
@cruftex I correct the wrong spreadsheet :-) Dont't worry for the 1290,01 I think that the question is the same :-) |
I quickly put that in LibreOffice Calc, when I copy it here, I can actually include it with Markdown tables. What about this:
|
@cruftex so you are for the third solution even if incl Vat are different. |
@RosaBenouamer
There is a problem, though: To get a consistent calculation, the calculation needs to be done with the prices as displayed. But, if you have low unit prices, you might want to calculate with more precision than two digits. If this is the case and your prices have more precision, you need to display more than two digits, so the calculation is transparent to the customer. Think about gasoline prices. Just now, the litre price is at 1.956 Euros. So, there needs to be a setting for precision of the displayed unit prices, or, prices need to displayed and used exactly as entered. Actually, I would recommend to first write down a collection of user stories in natural language that can be understood by everyone, before writing down functional specifications, meaning, before writing how things should be done, we should know all the "whys". |
@cruftex : this sentence "Actually, I would recommend to first write down a collection of user stories in natural language that can be understood by everyone, before writing down functional specifications, meaning, before writing how things should be done, we should know all the "whys"." |
I get a 404 :( |
@jolelievre do you have an idea about 404 error. Is the Link ok for you ? |
→ As a merchant, I want the amount of my customer's
US linked :
Lot 1 :
The text was updated successfully, but these errors were encountered: