Many car owners use different loyalty programs from gas stations, and certainly everyone knows about the existence of such. Networks of gas stations are trying to attract regular buyers of fuel to give cumulative discounts, free liters or bonuses. There are a lot of programs, like their users. There is a logical question: How can you calculate the benefits of the bonus system? At one gas station it is a bonus point system, at the other it is free fuel and the third gives a constant percentage discount.
As we know, each category, including fuel, can contain multiple templates for expenses.
- Fuel costs are kept separately, fuel incomes (and the discount is essentially an income) is ketp separately, and at the same time all fuel records pass through one common category “Fuel”. All entries are taken into account correctly.
- Everything is customized and works as expected. But what if you add a new “Bonuses” template to the fuel category, indicate that it is “Revenue” and consider it to handle all the fuel bonuses?
- All discounts in one place are records of a separate template, they are easy to evaluate or check.
- No additional menus / settings / interfaces that confuse the user – it’s easier for both the car owner and me as a developer.
- Such discount handling is somehow not obvious – otherwise there would not be this record, moreover, an example is needed for the concept of the principle (see below).
- Fuel bonuses (1/3/5 gal/liters as a gift, etc.) can cause certain problems.
Suppose you’ve already worked on it and want to try it. Here is an example: