Hi,
I want to add 6 months to the Received date to update Expiry date on Stock for a client on V6513.
They don’t want the stock items to ‘Use Expiry dates’ because then they would need to enter the date on every line – they want it automated!
I have used the syntax below but obviously have the syntax or names incorrect! Some guidance would be appreciated.
1. Form - Receive Inventory – Form IN_SOH Insert
' SPB add 6 months to expiry date
rtnExpiryDate = DateAdd (m, 6, FormObject.DateIn)
MsgBox "Exp Date : " & rtnExpiryDate
2. Form - Shipment Book In – BookIn Saved
' SPB add 6 months to expiry date
NewDate = DateAdd (m, 6, JiwaBookInObject.BookIn.BookInDate)
MsgBox "Exp Date : " & NewDate
For Each BookInLine In JiwaBookInObject.BookIn.BookInLine
JiwaBookInObject.BookIn.detailLine.ExpiryDate = NewDate
Next