Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8082

Re: OIVL query (warehouse Journal)

$
0
0

Got it!

 

/*SELECT FROM [dbo].[OIVL] A*/

Declare  @Date as datetime

/* WHERE */

set @Date = /* A.DocDate */ '[%0]'

SELECT 'CN TO PRIMARY WHs' as 'Type', A.CreatedBy, A.Transtype, A.DocDate, A.ItemCode, A.InQty, A.OutQty, A.Price, A.LocCode, A.SumStock, A.Usersign,CASE WHEN A.Transtype = 13 THEN 'AR INVOICE'

  WHEN A.Transtype = 14 THEN 'ARCM'

  WHEN A.Transtype = 16  THEN 'RETURNS'

  WHEN A.Transtype = 60 THEN 'Goods Issue/Issue for Production'

  WHEN A.Transtype = 59 THEN 'Goods Receipt/Receipt from Production'

  WHEN A.Transtype = 20 then 'Goods Receipt PO'

  WHEN A.Transtype = 18 then 'A/P Invoice'

  WHEN A.Transtype = 10000071 then 'Inventory Posting'

WHEN A.Transtype = 15 THEN 'Delivery 'ELSE 'Others' END AS Document_Type ,A.Base_Ref as Docnum

FROM OIVL A

WHERE A.Docdate >= @Date and A.Transtype NOT IN ('15', '59', '67') and A.LocCode not in ('LLD', 'THD')


Viewing all articles
Browse latest Browse all 8082

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>