#Mr Stinky Pants
1 messages · Page 1 of 1 (latest)
Hey, can you elaborate more on your use case?
sorry i missed the info that when you use a coupon on a subscription it doesnt calculate the tax correct
as it does it per line
it looks daft
im just making a subscription so you can see
I'm not understanding the issue
can you see this? sub_1M3zl8JKY8YXH2zhcGEUZJbA
Yep, can you outline the issue?
can you see the total is 78 and the tax should be 15.60
im told its because tax is computed on the items
Ah, so you're querying the discrepency between 15.60 and 15.61?
Yes tax is calculated at the line item level (there may be line items that are tax exempt)
yes but if you calc it on line items it still doesnt add an extra penny
if you look at it in excel
i mean there is no decimals to round
it looks like a bug with the coupons to me
you just cant send that to a customer
?
Checking on this
Ok, so been looking at the calculations on the invoice. The fixed 13.20 discount is actually applied at the item level unevenly across the 4 items. So you end up with split discounts like this:
- 38.4 (w/ 5.55 discount) = 32.85
- 26.4 (w/ 3.82 discount) = 22.58
- 13.2 (w/ 1.91 discount) = 11.29
- 13.2 (w/ 1.92 discount) = 11.28
And then tax (20%) is applied on a per item level too, after the discount:
- 32.85 + 6.57 = 39.42
- 22.58 + 4.52= 27.10
- 11.29 + 2.26 = 13.55
- 11.28 + 2.26 = 13.54
£93.61
thats annoying
so have you got any ideas?
i was looking at invoice items but it looks like they only get added to 1 invoice
to do negative 13.2
What is the desired outcome?
remove the extra penny
I guess an additional invoice line item to deduct the exact amount is likely the best bet then based on how we calculate discounts/taxes
but it says in the api they only apply to the next invoice
and you cant add them to subsriptions in the dashboard
it has to be a product
and products cant have negative prices
Correct, you would need to apply them after each recurring invoice was generated by listening for invoice.created events and add the line item in the 1 hour window before finalisation
not good