-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Testing credits for costcenters #86
Comments
…ith different settings with default costcenter given (#86) filed because of #86 (comment)
Hi, the idea is, that the amount of the empty costcenter can be used by any other costcenter. The reason is, that currently the booking fee has no costcenter. when we cancel a purchase, including the booking fee, we still want to be able to reuse it. Also, when we introduce costcenters only later and there are still credits without costcenters, we want to be able to use them later on. |
so, having 10 Euros without coustcenter and 10 euros with cc1, we will get 20 Euros in the get balance function. but also, when we have additionally 10 euros in cc, we should get 25 on cc2. But this is not true for the view where we see all costcenters. There, we will see 10 on empty, 10 on cc1 and 15 on cc2 Thank you for finding the problem. We will solve this. Obviously, there can't be a difference only in the order in which we add the costcenters. We found a strange behaviour on the production site as well, which might be linked to this bug, actually. |
…orgotten to call require_login() or $PAGE->set_context(). The page may not display correctly as a result (#86)
Hi, sorry, the amounts don't add up, no? The logic should be, that we always deduce first from the empty costcenter. Only when sth is left, we get it from the matching cost center. but these are tricky operations. the problem here seems to me only that we took credit from costcenter 2. |
@georgmaisser Thank you for clarification... |
… with credits enforced per costcenter . Issue Wunderbyte-GmbH#86 (comment) (Wunderbyte-GmbH#86)
…ith credits enforced per costcenter (#86)
…ith credits enforced per costcenter .Issue #86 (comment) (#86)
Hi,
I think you are right! Can you implement that? |
|
… with credits enforced per costcenter . Issue #86 (comment) (#86)
…ith credits enforced per costcenter .Issue #86 (comment) (#86)
…ith no enough credits in both empty and dedicated costcenters and no default costcenter (#86)
…kout with no costcenter credits and default costcenter credits" into pair for better coverage (#86)
@georgmaisser I made few fixes and adjustments. All tests seems working OK...
because above conditions as well as definitions of defaultcostcenter
had preventing of usage of "no costcenter" credits |
…lt costcenter than make checkout (#86)
…ault costcenter is being set than make checkout (#86)
- If item(s) do not have costcenter defined, chain of costcenters will be: "nocostcenter" -> default costcenter (if set) - If item(s) have costcenter defined, chain of costcenters will be: "nocostcenter" -> given costcenter
…its in nocostcenter plus matching costcenter when default costcenter is being set and than make checkout" to cover potential error (#86)
…costcenter and default costcenter is being set than make checkout (#86)
@georgmaisser In last commit I have proposed the approach to deal with $defaultcostcenter. Working (#86)
I have created few behat and phpunit tests . Definitely, much more phpunit will be necessary to cover all possible combinations (costcenters/credits). But before it would be fine to know if proposed approach is acceptable at all. |
Hi Andrii, your proposition sounds fine to me! Thank you |
… with credits enforced per costcenter . Issue #86 (comment) (#86)
…ith credits enforced per costcenter .Issue #86 (comment) (#86)
…t with no costcenter credits and default costcenter credits (#86)
…ith no enough credits in both empty and dedicated costcenters and no default costcenter (#86)
…kout with no costcenter credits and default costcenter credits" into pair for better coverage (#86)
…lt costcenter than make checkout (#86)
…ault costcenter is being set than make checkout (#86)
- If item(s) do not have costcenter defined, chain of costcenters will be: "nocostcenter" -> default costcenter (if set) - If item(s) have costcenter defined, chain of costcenters will be: "nocostcenter" -> given costcenter
…its in nocostcenter plus matching costcenter when default costcenter is being set and than make checkout" to cover potential error (#86)
…costcenter and default costcenter is being set than make checkout (#86)
It is now possible to assign credits to costcenters.
So in cashiers desk some changes apply:
Credits for different costcenters are listed in the history
each costcenter has a button confirm refund (via cash or transfer)
Credits Manager modal contains a field to define costcenter
there are settings in shoppingcart about how to handle credits with no costcenter applied:
samecostcenterforcredits (If this setting is turned on and a user receives credits, these credits can only be used for items with the same costcenter.) & defaultcostcenterforcredits (If no cost center is specified, credits can be redeemed for items from this cost center. If no value is entered here, credits without defined costcenters can be used for any item.)
there is also a setting in booking "cfcostcenter" that defines which custom booking option field should be used for the costcenter.
We would need to test:
behat
phpunit
The text was updated successfully, but these errors were encountered: