Question: Is anyone using Solidus' short-shipping ...
# general
m
Question: Is anyone using Solidus' short-shipping feature
OrderCancellations
? I have a hunch it really messes with tax calculations on the order as these adjustments are calculating after taxes are done, and I think they should be calculated before....
✋🏻 1
✋🏼 1
@Jared Norman do you have tax troubles on those instances?
j
Yeah, I think so.
m
I'm trying to deprecate
Spree::Adjustment#recalculate
because it's terrible, but that system makes use of it. And the I found out that unit cancels do not change order taxes. Then I was weirded out. 🙂
j
Yeah, I don't think it works correctly. 😔
m
j
I'm so behind on reviewing your existing (very good) PRs 😅
m
I'm trying to make simple ones now that ease reviewing the big ones. This is actually tiny!
🙏🏻 1
c
Just did a quick test and it looks like it only adjusts the line item for the item amount, but leaves the taxes behind, and recalculates the tax amount. Not sure if that’s intended or we have some customizations on the store I am testing this on, but that doesn’t seem quite right to me. I know the store I am testing on uses this feature extensively.
Or maybe that is correct (unless taxes changed), since taxes would be recalculated 🤔
m
@Chris Todorov Oh yeah that's absolutely intended; at least in Europe, tax recalculation could take into account historical tax rates through their valid_from/valid_until timestamps, but for core I would love it if the system we ship is really, really straightforward (and adjustments that include taxes next to adjustments that are taxes are... difficult)
💯 1
c
I agree, since taxes take into account adjustments, this should just work if things are done in the correct order. I don’t think your change has any functional difference from the current behaviour, but correct me if I am wrong
One question I had on your change is re: using the line item price and how that plays with promotion adjustments? Is the idea there that by applying the cancellation adjustment first the promotion adjustment will be recalculated to $0 🤔
One concern with this approach may be that the cancellation adjustment will no longer reflect what the customer actually paid for the item. This may be an issue if anyone is doing accounting based on these adjustments.
m
Promotion adjustments are finalized so they do not get recalculated. Taxes do get recalculated no matter what. A good question would be: do we recalculate the promotion amount, but keep the eligibility? That way if the user ordered 5 for the price of three, and we can't ship number 5, he now gets four for the price of two
c
Yeah, this is tricky