Repository navigation
fix(promotions): a free-setup code waives the setup fee, in the cart and on the invoice - #445
Conversation
…and on the invoice The promotions form offers a 'free setup' type that nothing read. The invoice gave no discount for it, while the cart treated every type but a percentage as a fixed amount of the code's value and quoted that as money off. A free-setup code now waives the setup fees of the lines it covers, and the cart quotes a discount only for the types the invoice gives one for.
|
Merged — thank you. The bigger finding here is the one in your first paragraph: the cart was quoting a discount the invoice would not give, for three of the five types the form offers. A quote that does not match the bill is worse than a feature that does nothing. Read line by line, because it moves money:
One thing left standing, worth its own decision rather than a quiet gap: Merging is not shipping: this reaches installations with the next release. |
|
Released in 1.29.0 — thank you. Gates on the tag: the full suite 5426 passed, 0 failed; the update lab's 14 scenarios green on a run of its own; the real package updating 1.28.0 on the stable channel and the last beta on the beta channel. |
What was wrong
The promotions form offers five types. Two are worked out (percentage, fixed amount). The other three were read by nothing, and the cart and the invoice disagreed about them:
free_setup,price_overrideoroverride_recurring.So an operator who made a "free setup" code got a code that waived nothing, and a customer could be quoted a discount the invoice did not give.
What changes
Discountline every other code gets, taxed as the fee was, so its tax goes with it.price_overrideandoverride_recurringnow show no discount in the cart, which is what the invoice has always charged.No migration, no new setting, no new text.
Not in this PR
price_overrideandoverride_recurringare still offered on the form and still do nothing. They need a decision first: implement them, or take them off the form. I can do either as a follow-up.Tests
PromotionFreeSetupTest(10): the fee is waived and the price left alone; the code's value is not money off; every fee on an unrestricted code; only the covered product's fee; one fee under a per-order limit; tax follows the waived fee; nothing given and nothing spent when there is no fee; the two unread types quote nothing; percentage and fixed codes as before. Full suite run in two halves.