The cashier's reward system

It is necessary to make such a system so that at the end of the cashier’s working day, 10% points are credited to the cashier from the amount of all checks that he accepted for the working shift, For example: At the end of the cashier’s shift, there were 15 checks in the amount of $ 1,000, it is necessary that at the end of his shift, $ 100 was credited

Would there be any cases that there are 2+ cashiers working at the same time?

Yes

Is it always 10%? Is the amount of credited for a specific shift being shown anywhere in the app? If not, I think you can just rollup the full checks for a cashier and calculate 10% of it.

It was not possible to implement the system according to your words. Now the task is as follows: Every month the cashier needs to receive 10% of the amount of checks for the month, for example: Now it’s August, the cashier at the end of August will receive bonuses in the amount of 10% of checks only for August. Then the cashier worked for September, and Glide needs to count only receipts for the current month. Please help.

  • Make sure you record the cashier’s ID/email in your checks table.
  • Create a math column in the checks table: YEAR(D)*10^2+MONTH(D) with D being the check’s timestamp. You’ll get a numerical value for each row, let’s say 202408 for a check recorded today.
  • Create a math column in the users table: YEAR(N)*10^2+MONTH(N) with N being the “now” value.
  • Create a query in the users table, targetting the checks table, filter by ID/email being current row’s ID/email, and numerical value for check’s date equal to “now” numerical value.
  • Create a rollup in the users table, sum the amount of checks from the query.
  • Add a math column, S*0.1 with S being the rollup sum above. You’ll get the amount of money each cashier receives for that month. Make sure you check that and pay them on the last day of the month.
2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.