Master: Customer card detail
Id :- 20 char size
Card Details: 16 char size
Card Validation from date
Card Validate to date
Status- active and expired
CustAccountNum from custtable
Standard Tables: salesTable custinvoicejour CustPackingSlipJour
1) 5 record insert using code
2) Valid from date should be less than current date.
3) To date logic: Should be more than current date. If a card todate is less than current date then update status to expired.
4) Create job for updating status
5) Update data
a) Update card num in SalesTable for customer which is having currently active card and cust id should match. Select only top 5 records
b) Update card num in CustInvoiceJour table. Which is available in SalesTable.
c) Update card num and customerref in CustPackingSlipJour table Which is available in salesTable.
6) Delete Data
a) Delete any 2 expired record which are having status expired for card.