From 61caf49a0f6bc19ee72afeb35845a96642d8abfd Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Thu, 14 May 2009 17:26:50 +1200 Subject: [PATCH] Really, this should be it, for the passing income. --- process/report/schdtgg2.p | 54 ++++++++++++----------------------------------- 1 file changed, 14 insertions(+), 40 deletions(-) diff --git a/process/report/schdtgg2.p b/process/report/schdtgg2.p index 0cdf3e5..d6a15c3 100644 --- a/process/report/schdtgg2.p +++ b/process/report/schdtgg2.p @@ -81,8 +81,6 @@ DEF VAR psm-format AS CHAR NO-UNDO INITIAL "->>,>>9.99psm". /* Global Variables calculated for each property */ DEF VAR annual-income AS DECIMAL NO-UNDO. DEF VAR annual-recexp AS DECIMAL NO-UNDO. -DEF VAR frcast-income AS DECIMAL NO-UNDO. -DEF VAR frcast-recexp AS DECIMAL NO-UNDO. DEF VAR net-income AS DECIMAL NO-UNDO. DEF VAR net-frcast AS DECIMAL NO-UNDO. @@ -531,15 +529,16 @@ PROCEDURE clear-property : wale-income = income-years / annual-income. FOR EACH Tenant WHERE Tenant.Entitytype = "P" AND Tenant.EntityCode = Property.PropertyCode NO-LOCK: - FOR EACH TenancyLease OF Tenant WHERE TenancyLease.LeaseStatus <> "PAST" NO-LOCK, - EACH RentReview OF TenancyLease WHERE RentReview.DateDue <= (as-at-date + 90): - CREATE tenant-reviews. - ASSIGN tenant-reviews.TenantName = Tenant.NAME - tenant-reviews.TenantCode = Tenant.TenantCode - tenant-reviews.DateDue = RentReview.DateDue - tenant-reviews.EstimateBasis = RentReview.EstimateBasis - tenant-reviews.ReviewType = RentReview.ReviewType. - + FOR EACH TenancyLease OF Tenant WHERE TenancyLease.LeaseStatus <> "PAST" NO-LOCK: + annual-recexp = annual-recexp + TenancyLease.OutgoingsBudget. + FOR EACH RentReview OF TenancyLease WHERE RentReview.DateDue <= (as-at-date + 90) NO-LOCK: + CREATE tenant-reviews. + ASSIGN tenant-reviews.TenantName = Tenant.NAME + tenant-reviews.TenantCode = Tenant.TenantCode + tenant-reviews.DateDue = RentReview.DateDue + tenant-reviews.EstimateBasis = RentReview.EstimateBasis + tenant-reviews.ReviewType = RentReview.ReviewType. + END. END. END. @@ -845,6 +844,9 @@ DEF VAR found AS LOGICAL NO-UNDO INITIAL No. FIND FIRST account-total WHERE ttype = 'RENT'. account-total.fyr-budget = annual-income. +FIND FIRST account-total WHERE ttype = 'OGREC'. +account-total.fyr-budget = annual-recexp. + report = tr( empty(13), 'class="groupbreak"') + tbody( tr( @@ -1579,45 +1581,17 @@ DEF VAR acctgroup AS CHAR NO-UNDO. + empty(6), ''). acctgroup = ChartOfAccount.AccountGroupCode. -/* - IF ChartOfAccount.AccountGroupCode = 'OGREC' AND ChartOfAccount.AccountCode <> 160.0 THEN DO: - acctgroup = 'ONEINC'. - END. -*/ FIND FIRST account-total WHERE ttype = acctgroup NO-ERROR. IF NOT AVAILABLE(account-total) THEN DO: CREATE account-total. ttype = acctgroup. END. - IF ChartOfAccount.AccountGroupCode = 'RENT' OR - ChartOfAccount.AccountGroupCode = 'OGREC' OR - ChartOfAccount.AccountGroupCode = 'OOI' - THEN DO: - frcast-income = frcast-income - fyr-frcast. - END. - ELSE DO: - annual-recexp = annual-recexp - fyr-budget. - frcast-recexp = frcast-recexp - fyr-frcast. - END. account-total.mth-actual = account-total.mth-actual - mth-actual. account-total.mth-budget = account-total.mth-budget - mth-budget. account-total.ytd-actual = account-total.ytd-actual - ytd-actual. account-total.ytd-budget = account-total.ytd-budget - ytd-budget. account-total.fyr-frcast = account-total.fyr-frcast - fyr-frcast. - - IF ChartOfAccount.AccountGroupCode = 'OGREC' THEN DO: - IF (ChartOfAccount.AccountCode = 121.0 - OR ChartOfAccount.AccountCode = 124.0 - OR ChartOfAccount.AccountCode = 126.0 - OR ChartOfAccount.AccountCode = 127.0 - OR ChartOfAccount.AccountCode = 128.0 - OR ChartOfAccount.AccountCode = 160.0 ) THEN DO: - account-total.fyr-budget = account-total.fyr-budget - fyr-budget. - END. - END. - ELSE DO: - account-total.fyr-budget = account-total.fyr-budget - fyr-budget. - END. + account-total.fyr-budget = account-total.fyr-budget - fyr-budget. END. RETURN rrow. -- 2.11.4.GIT