Email is sent by [interface].[traxs_AccountPosting_PopulateSales2_MissingLedgerCodes_Email] called in [interface].[traxs_AccountPosting_PopulateSales2_Wrap]
Generated by :
drop table #missing SELECT product INTO #missing FROM product WHERE ledger_code IS NULL AND archive = 0 IF @@ROWCOUNT = 0 RETURN DECLARE @message varchar(max) = '' SELECT DISTINCT @message = @message + D.barcode + char(9) + D.description + CHAR(13) FROM invoice_hdr H INNER JOIN invoice_det D ON D.guid_hdr = H.guid INNER JOIN #missing P ON P.product = D.product WHERE CONVERT(date, H.date_time) > DATEADD(day, -30, getdate()) GROUP BY D.barcode, D.description print @message
Email identified by:
SELECT * FROM email_queue2 WHERE date_time > '2021-08-02' and subject like '%missing ledger%'
Problem is its difficult to recreate the message for multiple missing ledger codes because Nicola adds them abd so they are no longer missiing !!