I have an old Gift certificate /voucher that I need to remove from my system since it was already used. The cashier ran it under cash a few years ago.
What is the best way to remove this GC / Voucher. Should I be using an SQL query?
Thanks for the help.
Danny
*This post is locked for comments
Thanks - will try on my test database - does any RMS Gurus see anything pitfalls by doing this?
Danny
This is how I would attempt it. Try this during downtime and backup database first in case it goes wrong and you need to restore the database (I am not the best at relational queries so it's in 3 steps, sorry) I HAVE NO IDEA IF THIS WILL ADVERSLY EFFECT RMS - TRY AT OWN RISK:
1) Run the following query and write down the StoreID and ID column value of that record, replace 'yourvouchernumber' with your voucher number in single quotes.
SELECT * from Voucher WHERE Number ='yourvouchernumber'
2) Run the following query and replace 'yourvouchernumber' with your voucher number in single quotes.
UPDATE Voucher set Balance = '0.0000'
Where Number = 'yourvouchernumber'
3) Run the following query and replace the values X, Y, and Z as well as 'yourvouchernumber' with the values in the list below.
INSERT INTO VoucherEntry
(StoreID, VoucherID, TransactionEntryID, TenderEntryID, Date, Amount, TransactionNumber, voucheronlineID)
VALUES
(X, Y, 0, 0, '2012-01-25 12:00:00.000', Z, 0, 0)
WHERE VoucherID= 'yourvouchernumber'
X= the StoreID value from step 1
Y= the ID from step 1
Z= the amount the vouchers value was lowered to get to zero, i.e. '-25.0000'
Thanks
This is a record from a long time ago so the return option is not a valid one in this case. I need something at the database level.
Dan
In the POS, you could return the items sold on that transaction to cash, then re-ring the same items and pay with the voucher.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,902 Super User 2024 Season 2
Martin Dráb 229,336 Most Valuable Professional
nmaenpaa 101,156