Skip to Content
0
Former Member
May 09, 2012 at 05:19 AM

Query

12 Views

hi

this is GRPO report For Subcontract . last Financial Year Series Is 40 but Now New Fiscal Year is Starting So I gave the New numbering Series For Subcontract That is 97. i need Show the both series in the same report. is it possible??

SELECT DISTINCT(T0.[DocNum]) AS 'GRN NO', T0.[DocDate] AS 'GRN DATE',T0.[NumAtCard][SUPPLIER REF.], T0.[CardName] AS ' PARTY', T1.[ItemCode] AS 'PART NO', T1.[Dscription] AS 'PART DESCRIPTION', T1.[Quantity] AS'QUANTITY', t6.U_PREACPT[QUALITY CHECKED- QTY],t6.U_BALQTY[QUALITY CHECK BALANCE],

T1.[Price][PRICE], T1.[LineTotal] AS 'TOTAL PRICE'

FROM OPDN T0 INNER JOIN PDN1 T1 ON T0.DocEntry = T1.DocEntry left JOIN PDN4 T2 ON T0.DocEntry = T2.DocEntry

left JOIN OITM T4 ON T1. ItemCode = T4. ItemCode left JOIN OITB T5 ON T4.ItmsGrpCod = T5.ItmsGrpCod

left JOIN OCRD T3 ON T3.CardCode=T0.CardCode

left join [@SU_SUBCONGRN] t18 on t0.DocNum = T18.[U_grnno]

left join [@SU_SUBGRNLINES] t9 on t18.DocEntry = T9.DocEntry

left join [@TI_GRNINSPECTION] T7 ON t7.[U_SUBGRN] = t18.DocNum

left join [@TI_GRNLINE] t6 on t7.DocEntry = t6.DocEntry

WHERE T0.[DocDate] >=[%0] AND T0.[DocDate] <=[%1] AND (T3.[CardName]='[%2]' OR '[%2]'=' ' ) AND (T4.[ItemName]='[%3]' OR '[%3]'=' ' ) AND T1.[BaseType]<>'21' and T1.[TargetType]<>'21' and T0.[Series]='40'

ORDER BY T0.[DocDate], T0.[DocNum]