Mapping inventory adjustment note to the GL note:
Yet another new issue in Inventory! Here in the Middle East, managers are looking for descriptions for every single transaction, while Inventory Transaction Entry DOES NOT HAVE DESCRIPTION FIELD.
Financial controller is posting GL Transactions that generated by Inventory people, while they are issuing the items by using “Transaction Entry” form --> Adjustment Transaction.
When they create allot of transaction using inventory adjustment form, the financial controller will have a big issue identifying the transaction caused to generate the journal and also the reason of that transaction.
To avoid this miss, I have created a database trigger that links “Transaction Entry” NOTE with the GL Voucher NOTE.
Below is the script I used:
CREATE TRIGGER [UPDATENOTE] ON [dbo].[IV30200]
FOR INSERT, UPDATE
DECLARE @DTAControlNum varchar(500)
DECLARE @JRNENTRY varchar(500)
DECLARE @NOTEINDX varchar(500)
SELECT @DTAControlNum = DOCNUMBR, @NOTEINDX = NOTEINDX From INSERTED
SELECT @JRNENTRY = JRNENTRY From GL10000 WHERE DTAControlNum = @DTAControlNum
UPDATE GL10000 SET NOTEINDX = @NOTEINDX WHERE JRNENTRY = @JRNENTRY
Mohammad R. Daoud
MCP, MCBMSP, MCTS, MCBMSS
Software Development Manager
+962 - 79 - 999 65 85