You'll have to have a SIM written that can access the Micros database, and a table and stored procedure to hold, process and purge discount requests. Somewhere in the docs for Res4 is a section on using an API for database access from a SIM.
Here's one way to do it.
POS Side:
- Make the employee button a call to your new SIM.
- When it's called it will send the employee id, check # and $ to a stored procedure.
- Assign the return value from the stored procedure to a variable.
- If the return is > 0, apply that amount of discount to the check. You can add pop-up messages if the amount left doesn't cover the check if you want.
Database Side:
-Add a new table in the database with columns for business date, employee id, check #, and amount.
-Add a stored procedure that accepts the employee# and check amount.
-When called, the procedure would
-- sum up the discount amounts for the day for that employee
-- subtract it from 25, the result being the discount balance for the day.
-- Return either the check amount or the discount balance, whichever is lower.
-- Write the date, employee id, check# and return amount to the new table.
I'd use the employee sequence number as the id to keep things consistent.
You'll also have to write a procedure to purge the data from the new table. This could be added to the end of night.
Hope that helps get you started.
Pat