Monday, September 4, 2017

Dynamics NAV - LS Retail - Custom Gift Card Import

SPL will send list of gift card numbers for $50 and $500 cards to be uploaded into system
The numbers are based on cards physically printed with barcodes

Clear all values from T50008 before starting, or they will be re-uploaded
Copy Number, Initial amount, Used Amount into Table 50008 Gift Card Staging

Modify Codeunit 50009 Proces Staging Gift Cards, change "Receipt" variable to increment xx number by one 00000INITxx00000000

Run C50009

Gift card entries will be created with incrementing numbers

Check T990015558 POS Data Entry to confirm gift cards imported correctly
Filter by "Created by receipt No." it will contain the INIT receipt numbers

Check T99001467 Voucher Entries to confirm gift cards imported correctly
Filter by "receipt No." it will contain the INIT receipt numbers

If numbers need to be reloaded, delete all entries in the T990015558 and T99001467 for that init number, and reimport all
/****** Script for SelectTopNRows command from SSMS  ******/
SELECT *
--delete
FROM [POS Data Entry] where [Created by Receipt No_] like '00000INIT14%' and [Applied Amount] = 0
SELECT *
--delete
FROM [Voucher Entries] where [Receipt Number] like '00000INIT14%' and [Voucher No_] not in ('20170811349')
---------------------------------------------------------------------------------
SELECT     [CRONUS$POS Data Entry].[Entry Type], [CRONUS$POS Data Entry].[Entry Code], [CRONUS$POS Data Entry].Amount,
                      [CRONUS$POS Data Entry].[Applied Amount], [CRONUS$POS Data Entry].[Created by Receipt No_] AS RctNum_POSDataEntry,
                      [CRONUS$Voucher Entries].[Receipt Number] AS RctNum_VchEntry, [CRONUS$POS Data Entry].[Date Created],
                      [CRONUS$POS Data Entry].[Expiring Date]
FROM         [CRONUS$POS Data Entry] LEFT OUTER JOIN
                      [CRONUS$Voucher Entries] ON [CRONUS$POS Data Entry].[Created by Receipt No_] = [CRONUS$Voucher Entries].[Receipt Number]
WHERE     ([CRONUS$POS Data Entry].[Created by Receipt No_] LIKE N'%INIT11%')

No comments:

Post a Comment