Skip to main content

Notifications

Microsoft Dynamics RMS (Archived)

Fix Gift Certificate / voucher

Posted on by Microsoft Employee

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

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    Re: Fix Gift Certificate / voucher

    Thanks - will try on my test database - does any RMS Gurus see anything pitfalls by doing this?

    Danny

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    Re: Fix Gift Certificate / voucher

    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'

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    Re: Fix Gift Certificate / voucher

    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

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    Re: Fix Gift Certificate / voucher

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Complete!

🔔 Be sure to subscribe to the new forums you are interested in to stay up to date! 🔔

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,902 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,336 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans