采购报价单报表
小于 1 分钟
代码示例
SELECT T0.[TAXDate], T0.[CardName], T1.[ItemCode], T1.[Dscription], T1.[UseBaseUn]
, T1.[PQTReqQty] AS 所需数量, T1.[PQTReqDate] AS 必需日期, T1.[ShipDate] AS 报价日期, T1.[Quantity] AS 报价数量, T1.[Price]
, T1.[PriceAfVAT] AS 折扣后的含税单价, T1.[DiscPrcnt], T1.[LineTotal], T0.[DocStatus], T1.[VatPrcnt]
, T4.[SlpName] AS 采购员
FROM OPQT T0
INNER JOIN PQT1 T1 ON T0.[DocEntry] = T1.[DocEntry]
INNER JOIN OITM T2 ON T1.[ItemCode] = T2.[ItemCode]
INNER JOIN OITB T3 ON T2.[ItmsGrpCod] = T3.[ItmsGrpCod]
INNER JOIN OSLP T4 ON T0.[SlpCode] = T4.[SlpCode]
WHERE (T1.[ItemCode] >= '[%0]'
OR '[%0]' = '')
AND (T1.[ItemCode] <= '[%1]'
OR '[%1]' = '')
AND (T0.[taxDate] = '[%4]'
OR '[%4]' = '')
AND (T0.[DocStatus] = '[%5]'
OR '[%5]' = '')
AND (T0.[CARDCODE] = '[%7]'
OR '[%7]' = '')
AND (T0.[CARDNAME] = '[%8]'
OR '[%8]' = '')
AND (T4.[slpname] = '[%7]'
OR '[%7]' = '')
AND (T0.[DOCNUM] = [%10]
OR [%10] = '')
ORDER BY T0.[DocNum] DESC