GustavoFernandes / order-splitter

https://gustavofernandes.github.io/order-splitter/
MIT License
3 stars 3 forks source link

Tax is not calculated properly #54

Open dumbbillyhardy opened 7 years ago

dumbbillyhardy commented 7 years ago

In orderup, the tax is calculated based off of the subtotal and delivery fee. Currently order-splitter calculates each person's tax share based on the subtotal solely

Example of an actual orderup order:

Subtotal $60.08 Sales Tax $3.84 Processing Fee $0.79 Delivery Fee $3.99 Total $68.70 Tip $8.00 Total w/ tip $76.70

Subtotal WVSalesTax = 60.08 0.06 = 3.6048 (Subtotal + deliveryFee) WVSalesTax = (60.08 + 3.99) 0.06 = 3.8442 (Subtotal + deliveryFee + processingFee) WVSalesTax = (60.08 + 3.99 + 0.79) 0.06 = 3.8916

Only the second one equals the actual tax charged.

GustavoFernandes commented 7 years ago

Related to #26