November 2011
M T W T F S S
« Oct   Dec »
 123456
78910111213
14151617181920
21222324252627
282930  
Archives

Purchase Order Commitments View

I been working on a report where the customer requested to view the payment voucher with its corresponding commitments information and had a need to have Committed Amount, Actual Amount and Budget Amount, view below details all the needed information about this subject:

SELECT     ACTINDX, BUDGETAMT,  ISNULL((SELECT     SUM(DEBITAMT - CRDTAMNT) AS Actual FROM          dbo.GL20000 WHERE      (OPENYEAR = MAIN.YEAR1) AND (ACTINDX = MAIN.ACTINDX)), 0) AS ACTUAL,

ISNULL((SELECT     SUM(DEBITAMT - CRDTAMNT) AS Actual FROM          dbo.GL10001 WHERE      (YEAR1 = MAIN.YEAR1) AND (ACTINDX = MAIN.ACTINDX)), 0) AS UNPOSTED,

ISNULL((SELECT     SUM(Committed_Amount) FROM         dbo.CPO10110 WHERE      (YEAR(REQDATE)= MAIN.YEAR1) AND (ACTINDX = MAIN.ACTINDX)), 0) AS Committed_Amount

FROM         (SELECT     YEAR1, SUM(BUDGETAMT) AS BUDGETAMT, ACTINDX FROM         dbo.GL00201 AS MASTERWHERE     (BUDGETID = (SELECT     TOP (1) BUDGETID FROM         dbo.CPO40002 WHERE     (YEAR1 = YEAR(GETDATE())))) GROUP BY ACTINDX, YEAR1) AS MAIN


Regards,

Mohammad R. Daoud MVP – MCT
MCP, MCBMSP, MCTS, MCBMSS
+962 – 79 – 999 65 85
me@mohdaoud.com
www.mohdaoud.com

More:
Purchase Order Commitments View

VA:F [1.9.17_1161]
Rating: 0.0/10 (0 votes cast)
VA:F [1.9.17_1161]
Rating: 0 (from 0 votes)