Ok, So i tried to read through the links properly and re-evaluated what im trying to accomplish.
So my current simplified conclusion to what i am trying to do is:
Coupons:
• An Entity object with Unique ID, Redemption status, expiry date and Text Description.
• On the Ticket screen, there will be an automation command (Button) ‘Issue Coupon’. OnClick generates a popup that will ask for Description. This description will be saved into the New Coupon generated. So technically submission of the message triggers ‘Create Coupon’ action which should be able to take the message as input. The created Coupon’s code has to be returned and added to the Ticket so that it can be printed along with the Bill for the customer(When Deliverer is assigned).
Vouchers:
• An Entity object with Unique ID, Redemption status, expiry date and Amount in numbers.
• Vouchers will be auto-generated depending on the total amount in the ticket. This generation will have to be done as soon as i assign the Deliverer to the ticket. Again, voucher code will be printed along with the customer Bill.
Redeeming Coupons and Vouchers
• Both Coupons and Vouchers will be redeemed by providing the code in the numberpad. If available, the coupon or voucher is assigned to the ticket.
• For Coupon the Description will need to be displayed in the ticket header so the sales employee is able to read that and mark relative products free/gift and flag it with the coupon.
• For Vouchers the amount has to be subtracted from the ticket as discount with the voucher code as the flag.
So that’s my whole idea.
To implement this, im following these two tutorials:
• Coupons: https://sambapos.org/wiki/doku.php/en/promotion_coupons_documentation
[The link i had shared earlier … The Coffee shop example]
• Vouchers: Printing Custom Discount Vouchers
[The Vouchers link from sid252uk]
So i currently need to figure out how to:
• Create a popup text input, and submit this to a Create Entity Action.
• set the date on the Create Entity Action.
• Add discounts to the Ticket with some explanation text (Voucher ID)