When statement is posted, loyalty points granted to customer are doubled up


Symptoms


When statement is posted, loyalty points granted to customer are doubled up

Resolution


The problem happen because the loyalty points are posted two times in the repro step. The first time is in paying transaction in MPOS. The second time is in posting statement. During statement posting, there is validation logic to block duplicate loyalty points posted:
     RetailLoyaltyManager::PostCardTransFromSalesTable()
     ...
             // Exit if we already posted loyalty points for this sales order.
             select firstOnly RecId from trans
                 where trans.SalesId == salesTable.SalesId
                    && trans.CardNumber == loyaltyCard.CardNumber;
             if (trans.RecId)
             {
                 return;
             }
     Because loyalty point trans posted in MPOS don't contain Sales Id, this validation code would by passed. Then this loyalty points is posted double times.
     The proposed fix update the posted loyalty points with SalesId during statement posting. That would make the validation logic works.

More information


Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained here in is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.