admin 管理员组

文章数量: 887007

用友U8以项目号统计合同金额、订单金额、开票金额、付款金额

SELECT  A.strCorrItemID AS 项目编码 ,
        B.主项目号 ,
        SUM(dblSum) AS 合同金额
FROM    CM_Contract_Item_B A
        LEFT JOIN fitemss00 B ON A.strCorrItemID = B.citemcode
GROUP BY A.strCorrItemID ,
        B.主项目号;


SELECT  cItemCode AS 项目编码 ,
        SUM(iSum) AS 销售订单金额
FROM    SO_SODetails
GROUP BY cItemCode;


SELECT  cItemCode AS 项目编码 ,
        SUM(iSum) AS 开票金额
FROM    SaleBillVouchs
GROUP BY cItemCode;


SELECT  A.cXm AS 项目编码 ,
        SUM(iAmt) AS 收款金额
FROM    Ap_CloseBills A
        JOIN dbo.Ap_CloseBill B ON A.iID = B.iID
WHERE   B.cVouchType = 48
GROUP BY A.cXm;

本文标签: 用友U8以项目号统计合同金额订单金额开票金额付款金额