And tests for assignPackage() and assignSku()
Details
- Reviewers
mollekopf - Group Reviewers
Restricted Project - Commits
- rKa657c85c7c96: Fix plan/package cost calculation
./phpunit
Diff Detail
- Repository
- rK kolab
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Looks reasonable, with some comments on the comments.
A description on *how* the cost calculation is fixed would be useful in the commit.
src/app/PackageSku.php | ||
---|---|---|
70 | I think the confusing aspect is that we have entitlements.cost, sku.cost, sku_package.cost and it's not clear what is authoritative. The reason that we have those values is so the cost get's locked in when e.g. an entitlement is taken out, and doesn't change if sku prices are adjusted, but I think it would be good if the those relationsships would be documented someplace, which is also where we should document how discounts are applied. | |
src/app/Plan.php | ||
88 | I don't think we want the discount to apply here currently, so I would remove the comment unless you have something specific in mind that we need to take care of. | |
94–96 | I don't think free months should have any effect here. This is about the cost per period of the plan. |