Rewrite FM section to group by first part of accountname for PROPEX.
[capital-apms-progress.git] / process / report / schdtgg2.p
blobf94080d25d6dc54480eb087d0307539dc7b38dfd
1 &ANALYZE-SUSPEND _VERSION-NUMBER UIB_v8r12
2 &ANALYZE-RESUME
3 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS Procedure
4 /*--------------------------------------------------------------------------
5 ------------------------------------------------------------------------*/
6 DEF INPUT PARAMETER report-options AS CHAR NO-UNDO.
8 DEF VAR preview AS LOGICAL NO-UNDO.
9 DEF VAR property-1 AS INTEGER NO-UNDO.
10 DEF VAR property-n AS INTEGER NO-UNDO.
12 DEF VAR print-financials AS LOGICAL INITIAL Yes NO-UNDO.
13 DEF VAR print-arrears AS LOGICAL INITIAL Yes NO-UNDO.
14 DEF VAR print-vacancies AS LOGICAL INITIAL Yes NO-UNDO.
15 DEF VAR print-issues AS LOGICAL INITIAL Yes NO-UNDO.
16 DEF VAR print-facilities AS LOGICAL INITIAL Yes NO-UNDO.
17 DEF VAR print-bldgincome AS LOGICAL INITIAL Yes NO-UNDO.
19 DEF VAR as-at-date AS DATE NO-UNDO INITIAL TODAY.
20 DEF VAR selection-style AS CHAR NO-UNDO.
21 DEF VAR test-client-code AS CHAR NO-UNDO INITIAL ?.
22 DEF VAR company-list AS CHAR NO-UNDO INITIAL ?.
23 DEF VAR show-warnings AS LOGI NO-UNDO INITIAL ?.
24 RUN parse-parameters.
26 /* for accumulating outgoing details over a property */
27 DEF WORK-TABLE bldg-sublease NO-UNDO LIKE SubLease.
28 DEF WORK-TABLE og-acct NO-UNDO
29 FIELD AccountCode LIKE ChartOfAccount.AccountCode
30 FIELD ShortName AS CHAR FORMAT "X(9)"
31 FIELD Recovered AS DECIMAL
32 FIELD Gross AS DECIMAL
33 FIELD Vacant AS DECIMAL.
34 DEFINE WORKFILE og-desc NO-UNDO
35 FIELD percent AS DEC
36 FIELD accounts AS CHAR
37 FIELD description AS CHAR
38 FIELD count AS INT.
40 DEF WORK-TABLE tenant-reviews NO-UNDO
41 FIELD TenantName LIKE Tenant.NAME
42 FIELD TenantCode LIKE Tenant.TenantCode
43 FIELD DateDue LIKE RentReview.DateDue
44 FIELD EstimateBasis LIKE RentReview.EstimateBasis
45 FIELD ReviewType LIKE RentReview.ReviewType.
47 DEF WORK-TABLE account-total NO-UNDO
48 FIELD ttype AS CHAR
49 FIELD tname AS CHAR
50 FIELD mth-actual LIKE AccountBalance.Balance
51 FIELD mth-budget LIKE AccountBalance.Balance
52 FIELD ytd-actual LIKE AccountBalance.Balance
53 FIELD ytd-budget LIKE AccountBalance.Balance
54 FIELD fyr-budget LIKE AccountBalance.Balance
55 FIELD fyr-frcast LIKE AccountBalance.Balance.
57 DEF VAR first-building AS LOGICAL INITIAL yes NO-UNDO.
58 DEF VAR user-name AS CHAR NO-UNDO.
59 {inc/username.i "user-name"}
61 {inc/ofc-this.i}
62 {inc/ofc-set-l.i "Use-Rent-Charges" "use-rent-charges"}
63 {inc/ofc-set.i "RentCharge-Outgoings" "og-rentcharge-type"}
64 IF NOT AVAILABLE(OfficeSetting) THEN og-rentcharge-type = "".
66 {inc/ofc-acct.i "DEBTORS" "sundry-debtors"}
68 DEF VAR timeStamp AS CHAR FORMAT "X(40)" NO-UNDO.
69 timeStamp = STRING( TODAY, "99/99/9999") + ", " + STRING( TIME, "HH:MM:SS") + " for " + user-name + " as at " + STRING( as-at-date, "99/99/9999").
71 /* We calculate the building income report into this string */
72 DEF VAR building-income-report AS CHAR NO-UNDO INITIAL "".
74 /* Formats */
75 DEF VAR area-format AS CHAR NO-UNDO INITIAL "->>>,>>9.99".
76 DEF VAR unit-format AS CHAR NO-UNDO INITIAL "->>>,>>9".
77 DEF VAR money-format AS CHAR NO-UNDO INITIAL "->>,>>>,>>9.99".
78 DEF VAR pcnt-format AS CHAR NO-UNDO INITIAL "->>,>>9.99%".
79 DEF VAR psm-format AS CHAR NO-UNDO INITIAL "->>,>>9.99psm".
81 /* Global Variables calculated for each property */
82 DEF VAR annual-income AS DECIMAL NO-UNDO.
83 DEF VAR annual-recexp AS DECIMAL NO-UNDO.
84 DEF VAR net-income AS DECIMAL NO-UNDO.
85 DEF VAR net-frcast AS DECIMAL NO-UNDO.
87 DEF VAR office-rent AS DECIMAL NO-UNDO.
88 DEF VAR office-area AS DECIMAL NO-UNDO.
89 DEF VAR retail-rent AS DECIMAL NO-UNDO.
90 DEF VAR retail-area AS DECIMAL NO-UNDO.
91 DEF VAR indust-rent AS DECIMAL NO-UNDO.
92 DEF VAR indust-area AS DECIMAL NO-UNDO.
93 DEF VAR carpk-rent AS DECIMAL NO-UNDO.
94 DEF VAR carpk-count AS DECIMAL NO-UNDO.
95 DEF VAR other-rent AS DECIMAL NO-UNDO.
96 DEF VAR other-area AS DECIMAL NO-UNDO.
97 DEF VAR total-area AS DECIMAL NO-UNDO.
99 DEF VAR wale-area AS DECIMAL NO-UNDO.
100 DEF VAR wale-income AS DECIMAL NO-UNDO.
102 DEF VAR purchase-price AS DECIMAL NO-UNDO.
104 /* _UIB-CODE-BLOCK-END */
105 &ANALYZE-RESUME
108 &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
110 /* ******************** Preprocessor Definitions ******************** */
112 &Scoped-define PROCEDURE-TYPE Procedure
113 &Scoped-define DB-AWARE no
117 /* _UIB-PREPROCESSOR-BLOCK-END */
118 &ANALYZE-RESUME
121 /* ************************ Function Prototypes ********************** */
123 &IF DEFINED(EXCLUDE-div) = 0 &THEN
125 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD div Procedure
126 FUNCTION div RETURNS CHARACTER
127 ( INPUT content AS CHAR, INPUT attributes AS CHAR ) FORWARD.
129 /* _UIB-CODE-BLOCK-END */
130 &ANALYZE-RESUME
132 &ENDIF
134 &IF DEFINED(EXCLUDE-do-0-property-header) = 0 &THEN
136 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD do-0-property-header Procedure
137 FUNCTION do-0-property-header RETURNS CHARACTER
138 ( /* parameter-definitions */ ) FORWARD.
140 /* _UIB-CODE-BLOCK-END */
141 &ANALYZE-RESUME
143 &ENDIF
145 &IF DEFINED(EXCLUDE-do-1-financial-report) = 0 &THEN
147 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD do-1-financial-report Procedure
148 FUNCTION do-1-financial-report RETURNS CHARACTER
149 ( /* parameter-definitions */ ) FORWARD.
151 /* _UIB-CODE-BLOCK-END */
152 &ANALYZE-RESUME
154 &ENDIF
156 &IF DEFINED(EXCLUDE-do-2-arrears) = 0 &THEN
158 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD do-2-arrears Procedure
159 FUNCTION do-2-arrears RETURNS CHARACTER
160 ( /* parameter-definitions */ ) FORWARD.
162 /* _UIB-CODE-BLOCK-END */
163 &ANALYZE-RESUME
165 &ENDIF
167 &IF DEFINED(EXCLUDE-do-3-vacancies) = 0 &THEN
169 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD do-3-vacancies Procedure
170 FUNCTION do-3-vacancies RETURNS CHARACTER
171 ( /* parameter-definitions */ ) FORWARD.
173 /* _UIB-CODE-BLOCK-END */
174 &ANALYZE-RESUME
176 &ENDIF
178 &IF DEFINED(EXCLUDE-do-3a-reviews) = 0 &THEN
180 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD do-3a-reviews Procedure
181 FUNCTION do-3a-reviews RETURNS CHARACTER
182 ( /* parameter-definitions */ ) FORWARD.
184 /* _UIB-CODE-BLOCK-END */
185 &ANALYZE-RESUME
187 &ENDIF
189 &IF DEFINED(EXCLUDE-do-4-tenancy-issues) = 0 &THEN
191 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD do-4-tenancy-issues Procedure
192 FUNCTION do-4-tenancy-issues RETURNS CHARACTER
193 ( /* parameter-definitions */ ) FORWARD.
195 /* _UIB-CODE-BLOCK-END */
196 &ANALYZE-RESUME
198 &ENDIF
200 &IF DEFINED(EXCLUDE-do-5-facilities-management) = 0 &THEN
202 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD do-5-facilities-management Procedure
203 FUNCTION do-5-facilities-management RETURNS CHARACTER
204 ( /* parameter-definitions */ ) FORWARD.
206 /* _UIB-CODE-BLOCK-END */
207 &ANALYZE-RESUME
209 &ENDIF
211 &IF DEFINED(EXCLUDE-do-5a-building-account) = 0 &THEN
213 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD do-5a-building-account Procedure
214 FUNCTION do-5a-building-account RETURNS CHARACTER
215 ( INPUT month-from AS INT, INPUT month-to AS INT,
216 OUTPUT mth-actual AS DECIMAL, OUTPUT mth-budget AS DECIMAL,
217 OUTPUT ytd-actual AS DECIMAL, OUTPUT ytd-budget AS DECIMAL,
218 OUTPUT fyr-budget AS DECIMAL, OUTPUT fyr-frcast AS DECIMAL
219 ) FORWARD.
221 /* _UIB-CODE-BLOCK-END */
222 &ANALYZE-RESUME
224 &ENDIF
226 &IF DEFINED(EXCLUDE-do-6-building-income) = 0 &THEN
228 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD do-6-building-income Procedure
229 FUNCTION do-6-building-income RETURNS CHARACTER
230 ( /* parameter-definitions */ ) FORWARD.
232 /* _UIB-CODE-BLOCK-END */
233 &ANALYZE-RESUME
235 &ENDIF
237 &IF DEFINED(EXCLUDE-do-6a-building-account) = 0 &THEN
239 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD do-6a-building-account Procedure
240 FUNCTION do-6a-building-account RETURNS CHARACTER
241 ( INPUT month-from AS INT, INPUT month-to AS INT,
242 OUTPUT mth-actual AS DECIMAL, OUTPUT mth-budget AS DECIMAL,
243 OUTPUT ytd-actual AS DECIMAL, OUTPUT ytd-budget AS DECIMAL,
244 OUTPUT fyr-budget AS DECIMAL, OUTPUT fyr-frcast AS DECIMAL
245 ) FORWARD.
247 /* _UIB-CODE-BLOCK-END */
248 &ANALYZE-RESUME
250 &ENDIF
252 &IF DEFINED(EXCLUDE-empty) = 0 &THEN
254 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD empty Procedure
255 FUNCTION empty RETURNS CHARACTER
256 ( INPUT num AS INT ) FORWARD.
258 /* _UIB-CODE-BLOCK-END */
259 &ANALYZE-RESUME
261 &ENDIF
263 &IF DEFINED(EXCLUDE-financial-report-row) = 0 &THEN
265 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD financial-report-row Procedure
266 FUNCTION financial-report-row RETURNS CHARACTER
267 ( INPUT in-ttype AS CHAR, INPUT line-desc AS CHAR ) FORWARD.
269 /* _UIB-CODE-BLOCK-END */
270 &ANALYZE-RESUME
272 &ENDIF
274 &IF DEFINED(EXCLUDE-get-acctgrp-amnt) = 0 &THEN
276 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD get-acctgrp-amnt Procedure
277 FUNCTION get-acctgrp-amnt RETURNS DECIMAL
278 ( INPUT actual AS LOGICAL, INPUT acctgrp AS CHAR ) FORWARD.
280 /* _UIB-CODE-BLOCK-END */
281 &ANALYZE-RESUME
283 &ENDIF
285 &IF DEFINED(EXCLUDE-get-prop-og) = 0 &THEN
287 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD get-prop-og Procedure
288 FUNCTION get-prop-og RETURNS DECIMAL
289 ( INPUT doit AS LOGICAL, INPUT pc AS INTEGER, INPUT ac AS DECIMAL ) FORWARD.
291 /* _UIB-CODE-BLOCK-END */
292 &ANALYZE-RESUME
294 &ENDIF
296 &IF DEFINED(EXCLUDE-lease-years-remaining) = 0 &THEN
298 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD lease-years-remaining Procedure
299 FUNCTION lease-years-remaining RETURNS DECIMAL
300 ( /* parameter-definitions */ ) FORWARD.
302 /* _UIB-CODE-BLOCK-END */
303 &ANALYZE-RESUME
305 &ENDIF
307 &IF DEFINED(EXCLUDE-show-one-review) = 0 &THEN
309 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD show-one-review Procedure
310 FUNCTION show-one-review RETURNS CHARACTER
311 ( /* no parameter-definitions */ ) FORWARD.
313 /* _UIB-CODE-BLOCK-END */
314 &ANALYZE-RESUME
316 &ENDIF
318 &IF DEFINED(EXCLUDE-tbl) = 0 &THEN
320 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD tbl Procedure
321 FUNCTION tbl RETURNS CHARACTER
322 ( INPUT content AS CHAR, INPUT attributes AS CHAR ) FORWARD.
324 /* _UIB-CODE-BLOCK-END */
325 &ANALYZE-RESUME
327 &ENDIF
329 &IF DEFINED(EXCLUDE-tbody) = 0 &THEN
331 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD tbody Procedure
332 FUNCTION tbody RETURNS CHARACTER
333 ( INPUT content AS CHAR, INPUT attributes AS CHAR ) FORWARD.
335 /* _UIB-CODE-BLOCK-END */
336 &ANALYZE-RESUME
338 &ENDIF
340 &IF DEFINED(EXCLUDE-td) = 0 &THEN
342 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD td Procedure
343 FUNCTION td RETURNS CHARACTER
344 ( INPUT content AS CHAR, INPUT attributes AS CHAR ) FORWARD.
346 /* _UIB-CODE-BLOCK-END */
347 &ANALYZE-RESUME
349 &ENDIF
351 &IF DEFINED(EXCLUDE-td-amount) = 0 &THEN
353 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD td-amount Procedure
354 FUNCTION td-amount RETURNS CHARACTER
355 ( INPUT amount AS DECIMAL, INPUT fmt AS CHAR, INPUT class AS CHAR ) FORWARD.
357 /* _UIB-CODE-BLOCK-END */
358 &ANALYZE-RESUME
360 &ENDIF
362 &IF DEFINED(EXCLUDE-test-floor-space) = 0 &THEN
364 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD test-floor-space Procedure
365 FUNCTION test-floor-space RETURNS CHARACTER
366 ( INPUT type AS CHAR, INPUT area AS DECIMAL ) FORWARD.
368 /* _UIB-CODE-BLOCK-END */
369 &ANALYZE-RESUME
371 &ENDIF
373 &IF DEFINED(EXCLUDE-tr) = 0 &THEN
375 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD tr Procedure
376 FUNCTION tr RETURNS CHARACTER
377 ( INPUT content AS CHAR, INPUT attributes AS CHAR ) FORWARD.
379 /* _UIB-CODE-BLOCK-END */
380 &ANALYZE-RESUME
382 &ENDIF
385 /* *********************** Procedure Settings ************************ */
387 &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
388 /* Settings for THIS-PROCEDURE
389 Type: Procedure
390 Allow:
391 Frames: 0
392 Add Fields to: Neither
393 Other Settings: CODE-ONLY COMPILE
395 &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
397 /* ************************* Create Window ************************** */
399 &ANALYZE-SUSPEND _CREATE-WINDOW
400 /* DESIGN Window definition (used by the UIB)
401 CREATE WINDOW Procedure ASSIGN
402 HEIGHT = .05
403 WIDTH = 29.57.
404 /* END WINDOW DEFINITION */
406 &ANALYZE-RESUME
408 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB Procedure
409 /* ************************* Included-Libraries *********************** */
411 {inc/method/m-txtrep.i}
412 {inc/method/m-charged-rent.i}
414 /* _UIB-CODE-BLOCK-END */
415 &ANALYZE-RESUME
421 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK Procedure
424 /* *************************** Main Block *************************** */
426 txtrep-file-suffix = ".html".
427 RUN txtrep-initialise.
429 OUTPUT TO VALUE(txtrep-print-file) KEEP-MESSAGES PAGE-SIZE 0.
431 RUN htmlrep-start('TGG Property Management Report').
432 RUN report-headers.
433 RUN htmlrep-body.
435 IF selection-style = "OneClient" THEN RUN for-one-client.
436 ELSE IF selection-style = "CompanyList" THEN RUN for-company-list.
437 ELSE
438 RUN for-each-property.
440 /* OUTPUT CLOSE. */
441 RUN htmlrep-finish.
443 /* _UIB-CODE-BLOCK-END */
444 &ANALYZE-RESUME
447 /* ********************** Internal Procedures *********************** */
449 &IF DEFINED(EXCLUDE-clear-property) = 0 &THEN
451 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE clear-property Procedure
452 PROCEDURE clear-property :
453 /*------------------------------------------------------------------------------
454 Purpose: Clear the work-tables we are using for each property
455 ------------------------------------------------------------------------------*/
456 FOR EACH bldg-sublease: DELETE bldg-sublease. END.
457 FOR EACH og-acct: DELETE og-acct. END.
458 FOR EACH tenant-reviews: DELETE tenant-reviews. END.
459 FOR EACH account-total: DELETE account-total. END.
461 IF Property.PurchasePrice NE ? AND Property.PurchasePrice GT 0.0 THEN DO:
462 purchase-price = Property.PurchasePrice.
463 END.
464 ELSE DO:
465 /* Get 'Historical Cost' valuation for purchase-price */
466 FIND FIRST Valuation OF Property WHERE ValuationType = 'HCST' NO-LOCK NO-ERROR.
467 IF NOT AVAILABLE(Valuation) THEN DO:
468 FIND LAST Valuation OF Property WHERE ValuationType = 'CVAL' NO-LOCK NO-ERROR.
469 END.
470 IF AVAILABLE(Valuation) THEN purchase-price = Valuation.Amount. ELSE purchase-price = 1.0.
471 END.
474 building-income-report = ?.
475 do-6-building-income().
477 annual-income = 0.0.
478 annual-recexp = 0.0.
479 office-rent= 0.0.
480 office-area= 0.0.
481 retail-rent= 0.0.
482 retail-area= 0.0.
483 indust-rent= 0.0.
484 indust-area= 0.0.
485 carpk-rent = 0.0.
486 carpk-count= 0.
487 other-rent = 0.0.
488 other-area = 0.0.
490 DEF VAR charged-rental AS DECIMAL NO-UNDO.
491 DEF VAR income-years AS DECIMAL NO-UNDO INITIAL 0.0.
492 DEF VAR area-years AS DECIMAL NO-UNDO INITIAL 0.0.
493 DEF VAR years AS DECIMAL NO-UNDO.
495 FOR EACH RentalSpace OF Property NO-LOCK:
496 IF RentalSpace.AreaStatus = "V"
497 OR NOT CAN-FIND( TenancyLease OF RentalSpace WHERE TenancyLease.LeaseStatus <> "PAST" )
498 THEN DO:
499 charged-rental = 0.
500 years = 0.0.
501 END.
502 ELSE DO:
503 charged-rental = get-charged-rent( RentalSpace.ChargedRental, RentalSpace.ContractedRental, RentalSpace.AreaType, RentalSpace.TenancyLeaseCode ).
504 years = lease-years-remaining().
505 income-years = income-years + (years * charged-rental).
506 END.
508 annual-income = annual-income + charged-rental.
510 FIND AreaType WHERE AreaType.AreaType = RentalSpace.AreaType NO-LOCK NO-ERROR.
511 IF (AVAILABLE(AreaType) AND AreaType.IsCarPark) OR RentalSpace.AreaType = 'C' THEN DO:
512 carpk-rent = carpk-rent + charged-rental.
513 carpk-count= carpk-count + RentalSpace.AreaSize.
514 NEXT.
515 END.
516 IF RentalSpace.AreaType EQ 'O' OR RentalSpace.AreaType EQ 'R' OR RentalSpace.AreaType EQ 'W'
517 OR (AVAILABLE(AreaType) AND AreaType.IsFloorArea) THEN DO:
518 area-years = area-years + (years * RentalSpace.AreaSize).
519 END.
521 CASE RentalSpace.AreaType:
522 WHEN "O" THEN DO:
523 office-rent = office-rent + charged-rental.
524 office-area = office-area + RentalSpace.AreaSize.
525 END.
526 WHEN "R" THEN DO:
527 retail-rent = retail-rent + charged-rental.
528 retail-area = retail-area + RentalSpace.AreaSize.
529 END.
530 WHEN "W" THEN DO:
531 indust-rent = indust-rent + charged-rental.
532 indust-area = indust-area + RentalSpace.AreaSize.
533 END.
534 OTHERWISE DO:
535 other-rent = other-rent + charged-rental.
536 IF (AVAILABLE(AreaType) AND AreaType.IsFloorArea) THEN DO:
537 other-area = other-area + RentalSpace.AreaSize.
538 END.
539 END.
540 END.
541 END.
542 total-area = (office-area + retail-area + indust-area + other-area).
543 wale-area = area-years / (office-area + retail-area + indust-area + other-area).
544 wale-income = income-years / annual-income.
546 FOR EACH Tenant WHERE Tenant.Entitytype = "P" AND Tenant.EntityCode = Property.PropertyCode NO-LOCK:
547 FOR EACH TenancyLease OF Tenant WHERE TenancyLease.LeaseStatus <> "PAST" NO-LOCK:
548 annual-recexp = annual-recexp + TenancyLease.OutgoingsBudget.
549 FOR EACH RentReview OF TenancyLease
550 WHERE RentReview.DateDue <= (as-at-date + 190)
551 AND (RentReview.DateComplete >= as-at-date OR RentReview.DateComplete = ?)
552 NO-LOCK:
553 CREATE tenant-reviews.
554 ASSIGN tenant-reviews.TenantName = Tenant.NAME
555 tenant-reviews.TenantCode = Tenant.TenantCode
556 tenant-reviews.DateDue = RentReview.DateDue
557 tenant-reviews.EstimateBasis = RentReview.EstimateBasis
558 tenant-reviews.ReviewType = RentReview.ReviewType.
559 END.
560 END.
561 END.
563 END PROCEDURE.
565 /* _UIB-CODE-BLOCK-END */
566 &ANALYZE-RESUME
568 &ENDIF
570 &IF DEFINED(EXCLUDE-each-property) = 0 &THEN
572 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE each-property Procedure
573 PROCEDURE each-property :
574 /*------------------------------------------------------------------------------
575 Purpose:
576 ------------------------------------------------------------------------------*/
577 DEF VAR report-0 AS CHAR NO-UNDO.
578 DEF VAR report-1 AS CHAR NO-UNDO.
579 DEF VAR report-2 AS CHAR NO-UNDO.
580 DEF VAR report-3 AS CHAR NO-UNDO.
581 DEF VAR report-4 AS CHAR NO-UNDO.
582 DEF VAR report-5 AS CHAR NO-UNDO.
583 DEF VAR report-6 AS CHAR NO-UNDO.
584 DEF VAR did-something AS LOGICAL INITIAL NO NO-UNDO.
585 DEF VAR did-header AS LOGICAL INITIAL NO NO-UNDO.
587 RUN clear-property.
589 IF print-financials THEN DO:
590 RUN print-line( '<table class="property">' ).
591 RUN print-line( do-0-property-header() ).
593 do-1-financial-report().
595 did-something = YES.
596 did-header = YES.
597 END.
599 IF print-arrears THEN DO:
600 report-2 = do-2-arrears().
601 IF report-2 <> '' THEN did-something = YES.
602 END.
603 IF print-vacancies THEN DO:
604 report-3 = do-3-vacancies() + do-3a-reviews().
605 IF report-3 <> '' THEN did-something = YES.
606 END.
607 IF print-issues THEN DO:
608 report-4 = do-4-tenancy-issues().
609 IF report-4 <> '' THEN did-something = YES.
610 END.
611 IF print-facilities THEN DO:
612 report-5 = do-5-facilities-management().
613 IF report-5 <> '' THEN did-something = YES.
614 END.
615 IF print-bldgincome THEN DO:
616 report-6 = do-6-building-income().
617 IF report-6 <> '' THEN did-something = YES.
618 END.
620 IF did-something THEN DO:
621 IF NOT( did-header ) THEN DO:
622 END.
623 RUN print-line( report-2 ).
624 RUN print-line( report-3 ).
625 RUN print-line( report-4 ).
626 RUN print-line( report-5 ).
627 RUN print-line( report-6 ).
628 RUN print-line( '</table>' ).
629 END.
631 END PROCEDURE.
633 /* _UIB-CODE-BLOCK-END */
634 &ANALYZE-RESUME
636 &ENDIF
638 &IF DEFINED(EXCLUDE-for-company-list) = 0 &THEN
640 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE for-company-list Procedure
641 PROCEDURE for-company-list :
642 /*------------------------------------------------------------------------------
643 Purpose:
644 ------------------------------------------------------------------------------*/
645 DEF VAR i AS INT NO-UNDO.
646 DEF VAR n AS INT NO-UNDO.
647 DEF VAR company-code AS INT NO-UNDO.
649 FIND ConsolidationList WHERE ConsolidationList.Name = company-list NO-LOCK.
650 n = NUM-ENTRIES( ConsolidationList.CompanyList ).
651 DO i = 1 TO n:
652 company-code = INT( ENTRY( i, ConsolidationList.CompanyList ) ).
653 FOR EACH Property WHERE Property.CompanyCode = company-code
654 AND Property.Active NO-LOCK:
656 RUN each-property.
657 END.
658 END.
660 END PROCEDURE.
662 /* _UIB-CODE-BLOCK-END */
663 &ANALYZE-RESUME
665 &ENDIF
667 &IF DEFINED(EXCLUDE-for-each-property) = 0 &THEN
669 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE for-each-property Procedure
670 PROCEDURE for-each-property :
671 /*------------------------------------------------------------------------------
672 Purpose:
673 ------------------------------------------------------------------------------*/
675 FOR EACH Property WHERE Property.Active AND Property.PropertyCode >= property-1
676 AND Property.PropertyCode <= property-n
677 NO-LOCK:
678 RUN each-property.
680 END.
682 END PROCEDURE.
684 /* _UIB-CODE-BLOCK-END */
685 &ANALYZE-RESUME
687 &ENDIF
689 &IF DEFINED(EXCLUDE-for-one-client) = 0 &THEN
691 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE for-one-client Procedure
692 PROCEDURE for-one-client :
693 /*------------------------------------------------------------------------------
694 Purpose:
695 ------------------------------------------------------------------------------*/
697 FOR EACH Company WHERE Company.ClientCode = test-client-code NO-LOCK:
698 FOR EACH Property OF Company WHERE Property.Active NO-LOCK:
699 RUN each-property.
700 END.
701 END.
703 END PROCEDURE.
705 /* _UIB-CODE-BLOCK-END */
706 &ANALYZE-RESUME
708 &ENDIF
710 &IF DEFINED(EXCLUDE-parse-parameters) = 0 &THEN
712 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE parse-parameters Procedure
713 PROCEDURE parse-parameters :
714 /*------------------------------------------------------------------------------
715 Purpose:
716 ------------------------------------------------------------------------------*/
717 DEF VAR i AS INT NO-UNDO.
718 DEF VAR token AS CHAR NO-UNDO.
720 {inc/showopts.i "report-options"}
722 DO i = 1 TO NUM-ENTRIES( report-options, "~n" ):
723 token = ENTRY( i, report-options, "~n" ).
725 CASE( ENTRY( 1, token ) ):
726 WHEN "Properties" THEN ASSIGN
727 property-1 = INT( ENTRY(2,token) )
728 property-n = INT( ENTRY(3,token) ).
730 WHEN "Client" THEN test-client-code = ENTRY(2,token).
731 WHEN "CompanyList" THEN company-list = ENTRY(2,token).
732 WHEN "Selection" THEN selection-style = ENTRY(2,token).
733 WHEN "Warnings" THEN show-warnings = ENTRY(2,token) BEGINS "Y".
734 WHEN "Financials" THEN print-financials = ENTRY(2,token) BEGINS "Y".
735 WHEN "Arrears" THEN print-arrears = ENTRY(2,token) BEGINS "Y".
736 WHEN "Vacancies" THEN print-vacancies = ENTRY(2,token) BEGINS "Y".
737 WHEN "Issues" THEN print-issues = ENTRY(2,token) BEGINS "Y".
738 WHEN "Facilities Management" THEN print-facilities = ENTRY(2,token) BEGINS "Y".
739 WHEN "Building Income" THEN print-bldgincome = ENTRY(2,token) BEGINS "Y".
740 WHEN "As At Date" THEN as-at-date = DATE(ENTRY(2,token)).
741 END CASE.
742 END.
744 IF property-n < property-1 THEN property-n = property-1.
745 IF selection-style = "AP" THEN ASSIGN
746 property-1 = 0
747 property-n = 999999.
748 ELSE IF selection-style = "1P" THEN ASSIGN
749 property-n = property-1.
751 END PROCEDURE.
753 /* _UIB-CODE-BLOCK-END */
754 &ANALYZE-RESUME
756 &ENDIF
758 &IF DEFINED(EXCLUDE-print-line) = 0 &THEN
760 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE print-line Procedure
761 PROCEDURE print-line :
762 /*------------------------------------------------------------------------------
763 Purpose: Print a line of output
764 ------------------------------------------------------------------------------*/
765 DEF INPUT PARAMETER the-line AS CHAR NO-UNDO.
767 PUT CONTROL REPLACE(the-line, '&', '&amp;').
769 END PROCEDURE.
771 /* _UIB-CODE-BLOCK-END */
772 &ANALYZE-RESUME
774 &ENDIF
776 &IF DEFINED(EXCLUDE-report-headers) = 0 &THEN
778 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE report-headers Procedure
779 PROCEDURE report-headers :
780 /*------------------------------------------------------------------------------
781 Purpose: Print the headers for the whole report. The style sheet link, mainly
782 ------------------------------------------------------------------------------*/
784 PUT CONTROL '<link rel="stylesheet" type="text/css" href="schdtgg2.css">~n' .
785 htmlrep-css-file = 'support/css/schdtgg2.css'.
787 END PROCEDURE.
789 /* _UIB-CODE-BLOCK-END */
790 &ANALYZE-RESUME
792 &ENDIF
794 /* ************************ Function Implementations ***************** */
796 &IF DEFINED(EXCLUDE-div) = 0 &THEN
798 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION div Procedure
799 FUNCTION div RETURNS CHARACTER
800 ( INPUT content AS CHAR, INPUT attributes AS CHAR ) :
801 /*------------------------------------------------------------------------------
802 Purpose: Shorthand for specific html tag
803 ------------------------------------------------------------------------------*/
805 RETURN tag("div", content, attributes ).
807 END FUNCTION.
809 /* _UIB-CODE-BLOCK-END */
810 &ANALYZE-RESUME
812 &ENDIF
814 &IF DEFINED(EXCLUDE-do-0-property-header) = 0 &THEN
816 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION do-0-property-header Procedure
817 FUNCTION do-0-property-header RETURNS CHARACTER
818 ( /* parameter-definitions */ ) :
819 /*------------------------------------------------------------------------------
820 Purpose: The per-property headers for the report.
821 Notes:
822 ------------------------------------------------------------------------------*/
823 DEF VAR report AS CHAR NO-UNDO INITIAL ''.
825 report = tr( td("logo image",'rowspan="4"') + tag("th", "Monthly Management Report", 'colspan="15" class="reportheader"'), '' ).
827 report = report + tr(
828 td("Property",'class="prompt"') +
829 td(Property.Name, 'class="propertyname" colspan="3"') +
830 td("Month",'class="prompt"') +
831 td("",'class="reportmonth"') +
832 td('', 'colspan="9"'), '').
834 report = report + tr( empty(15), '') + tr( empty(15), '').
836 report = tag("thead", report, '').
838 /* report = tbl(report,'class="header"'). */
840 RETURN report.
842 END FUNCTION.
844 /* _UIB-CODE-BLOCK-END */
845 &ANALYZE-RESUME
847 &ENDIF
849 &IF DEFINED(EXCLUDE-do-1-financial-report) = 0 &THEN
851 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION do-1-financial-report Procedure
852 FUNCTION do-1-financial-report RETURNS CHARACTER
853 ( /* parameter-definitions */ ) :
854 /*------------------------------------------------------------------------------
855 Purpose: Returns nothing - it always prints something.
856 ------------------------------------------------------------------------------*/
857 DEF VAR report AS CHAR NO-UNDO INITIAL ''.
858 DEF VAR rrows AS CHAR NO-UNDO INITIAL ''.
859 DEF VAR rrow AS CHAR NO-UNDO.
860 DEF VAR found AS LOGICAL NO-UNDO INITIAL No.
862 FIND FIRST account-total WHERE ttype = 'RENT'.
863 account-total.fyr-budget = annual-income.
865 FIND FIRST account-total WHERE ttype = 'OGREC'.
866 account-total.fyr-budget = annual-recexp.
868 report =
869 tr( empty(13), 'class="groupbreak"') +
870 tbody( tr(
871 td("Income", 'colspan="2"')
872 + td("Ann. Passing", '')
873 + td("Annual $PSM", '')
874 + td("30June Fcast", '')
875 + td("F'cast $PSM", '')
876 + td("% Var", '')
877 + td("Month Actual", '')
878 + td("Month Budget", '')
879 + td("% VAR", '')
880 + td("YTD Actual", '')
881 + td("YTD Budget", '')
882 + td("% Var", '')
883 , ''), 'class="colhead"').
885 rrows = financial-report-row( 'RENT', 'Gross Income' ).
886 rrows = rrows + financial-report-row( 'OGREC', 'Recoverable Outgoings' ).
887 rrows = rrows + financial-report-row( 'OOI', 'One Off Income' ).
888 rrows = rrows + financial-report-row( 'PROPEX', 'Opp Expense' ).
889 rrows = rrows + financial-report-row( 'TENEX', 'One Off Expense' ).
890 rrows = rrows + financial-report-row( 'OWNEX', 'Non-rec Outgoings' ).
891 rrows = rrows + financial-report-row( 'NETINC', 'Net Income' ).
893 report = report + tbody( rrows, '') + tr( empty(15), 'class="groupbreak"').
894 RUN print-line( report ).
896 /* Yield */
897 rrows = tr( td('Yield', 'colspan="5"')
898 + td('','class="groupbreak"')
899 + td('Financial Commentary', 'colspan="8"')
900 , '').
901 rrows = rrows + tr( td("", 'colspan="2"')
902 + td("Capital $", '')
903 + td("Actual Yield", '')
904 + td("F'cast Yield", '')
905 + td('','class="groupbreak"')
906 + td('','colspan="8" class="empty" style="border-bottom-style:none"'), '').
908 report = tbody( rrows, 'class="colhead"').
910 rrows = tr( td('Purchase Price','colspan="2" align="right"')
911 + td-amount(purchase-price, money-format, 'money')
912 + td-amount((net-income / purchase-price) * 100, pcnt-format, 'decimal')
913 + td-amount((net-frcast / purchase-price) * 100, pcnt-format, 'decimal')
914 + td('','class="groupbreak" rowspan="2"')
915 + td('','colspan="7" class="empty" rowspan="2" style="border-bottom-style:none;border-top-style:none"'), '').
917 DEF VAR account-sum AS DECIMAL NO-UNDO.
918 account-sum = get-acctgrp-amnt( true, 'INVPRP' ).
919 rrows = rrows + tr( td('TCO to Date','colspan="2" align="right"')
920 + td-amount(account-sum, money-format, 'money')
921 + td-amount((net-income / account-sum) * 100, pcnt-format, 'decimal')
922 + td-amount((net-frcast / account-sum) * 100, pcnt-format, 'decimal')
923 , '').
925 report = report + tbody( rrows, '')
926 + tr( empty(5) + td('','class="groupbreak"')
927 + td('','colspan="7" class="empty" style="border-left:thin solid #ffd080;border-right:thin solid #ffd080;"'), 'class="groupbreak"').
928 RUN print-line( report ).
931 /* Rent Distribution */
932 rrows = tr( td('RENT DISTRIBUTION', 'colspan="5"')
933 + td('','class="groupbreak"')
934 + td('','colspan="7" class="empty"'), '').
935 rrows = rrows + tr( td("Income Type", 'colspan="2"')
936 + td("$ of Income", '')
937 + td("% Gross Inc.", '')
938 + td("$ PSM", '')
939 + td('','class="groupbreak"')
940 + td('','colspan="7" class="empty"'), '').
942 report = tbody( rrows, 'class="colhead"').
944 rrows = tr( td('Office Rent', 'colspan="2" ')
945 + td-amount(office-rent, money-format, 'money')
946 + td-amount((office-rent / annual-income) * 100, pcnt-format, 'decimal')
947 + td-amount((office-rent / office-area), psm-format, 'decimal')
948 + td('','class="groupbreak" rowspan="8"')
949 + td('','colspan="7" rowspan="8" style="border-top-style:none"'), '').
951 rrows = rrows + tr( td('Retail Rent', 'colspan="2" ')
952 + td-amount(retail-rent, money-format, 'money')
953 + td-amount((retail-rent / annual-income) * 100, pcnt-format, 'decimal')
954 + td-amount((retail-rent / retail-area), psm-format, 'decimal')
955 , '').
957 rrows = rrows + tr( td('Industrial Rent', 'colspan="2" ')
958 + td-amount(indust-rent, money-format, 'money')
959 + td-amount((indust-rent / annual-income) * 100, pcnt-format, 'decimal')
960 + td-amount((indust-rent / indust-area), psm-format, 'decimal')
961 , '').
963 rrows = rrows + tr( td('Carpark Rent', 'colspan="2" ')
964 + td-amount(carpk-rent, money-format, 'money')
965 + td-amount((carpk-rent / annual-income) * 100, pcnt-format, 'decimal')
966 + td(TRIM(STRING(((carpk-rent / Property.TotalParks) / 52),money-format)) + 'pw', 'class="decimal"')
967 , '').
969 rrows = rrows + tr( td('Other Rent', 'colspan="2" ')
970 + td-amount(other-rent, money-format, 'money')
971 + td-amount((other-rent / annual-income) * 100, pcnt-format, 'decimal')
972 + td-amount((other-rent / other-area), psm-format, 'decimal')
973 , '').
975 rrows = rrows + tr( td('Retail', 'colspan="2" class="subhead"')
976 + td(TRIM(STRING(retail-area,money-format)) + 'sqm', 'class="money"')
977 + td('W.A.L.E', 'class="subhead"')
978 + empty(1)
979 , '').
981 rrows = rrows + tr( td('Office', 'colspan="2" class="subhead"')
982 + td(TRIM(STRING(office-area,money-format)) + 'sqm', 'class="money"')
983 + td('By Income', 'class="subhead"')
984 + td-amount(wale-income, area-format, 'decimal')
985 , '').
987 rrows = rrows + tr( td('NLA', 'colspan="2" class="subhead"')
988 + td(TRIM(STRING(total-area,money-format)) + 'sqm', 'class="money"')
989 + td('By Area', 'class="subhead"')
990 + td-amount(wale-area, area-format, 'decimal')
991 , '').
993 report = report + tbody( rrows, '').
994 RUN print-line( report ).
998 RUN print-line( '<tbody>' ).
1000 FIND FIRST tenant-reviews NO-LOCK.
1001 DO WHILE AVAILABLE(tenant-reviews):
1002 RUN print-line( tr( EMPTY(3) + show-one-review() + EMPTY(8), '') ).
1003 END.
1005 RUN print-line( '</tbody>' ).
1008 END FUNCTION.
1010 /* _UIB-CODE-BLOCK-END */
1011 &ANALYZE-RESUME
1013 &ENDIF
1015 &IF DEFINED(EXCLUDE-do-2-arrears) = 0 &THEN
1017 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION do-2-arrears Procedure
1018 FUNCTION do-2-arrears RETURNS CHARACTER
1019 ( /* parameter-definitions */ ) :
1020 /*------------------------------------------------------------------------------
1021 Purpose: Get the current arrears for the tenants of this property.
1022 ------------------------------------------------------------------------------*/
1023 DEF VAR report AS CHAR NO-UNDO.
1024 DEF VAR rrows AS CHAR NO-UNDO.
1025 DEF VAR found AS LOGICAL NO-UNDO INITIAL No.
1027 DEF VAR total-00 AS DECIMAL NO-UNDO INITIAL 0.0 .
1028 DEF VAR total-30 AS DECIMAL NO-UNDO INITIAL 0.0 .
1029 DEF VAR total-60 AS DECIMAL NO-UNDO INITIAL 0.0 .
1030 DEF VAR total-90 AS DECIMAL NO-UNDO INITIAL 0.0 .
1032 DEF VAR billings AS DECIMAL NO-UNDO INITIAL 0.0 .
1033 DEF VAR receipts AS DECIMAL NO-UNDO INITIAL 0.0 .
1034 DEF VAR arrears AS DECIMAL NO-UNDO INITIAL 0.0 .
1036 DEF VAR month-30 AS INT NO-UNDO.
1037 DEF VAR month-60 AS INT NO-UNDO.
1038 DEF VAR month-90 AS INT NO-UNDO.
1040 report =
1041 tr( empty(13), 'class="groupbreak"') +
1042 tbody(
1043 tr(
1044 td("Arrears", 'colspan="8"')
1045 + td('','class="groupbreak" rowspan="2"')
1046 + td("Arrears Commentary", 'colspan="4" rowspan="2"')
1047 , '')
1048 + tr(
1049 td("Billings", '')
1050 + td("Receipts", '')
1051 + td('','')
1052 + td("Total Arrears", '')
1053 + td("Current", '')
1054 + td("30 days", '')
1055 + td("60 days", '')
1056 + td("90 days +", '')
1057 , '')
1058 , 'class="colhead"').
1060 FIND LAST Month WHERE Month.EndDate < as-at-date NO-LOCK.
1061 month-30 = Month.MonthCode.
1062 FIND LAST Month WHERE Month.MonthCode < month-30 NO-LOCK.
1063 month-60 = Month.MonthCode.
1064 FIND LAST Month WHERE Month.MonthCode < month-60 NO-LOCK.
1065 month-90 = Month.MonthCode.
1068 FOR EACH Tenant WHERE Tenant.EntityType = 'P' AND Tenant.EntityCode = Property.PropertyCode NO-LOCK,
1069 EACH AcctTran WHERE AcctTran.EntityType = 'T' AND AcctTran.EntityCode = Tenant.TenantCode
1070 AND AcctTran.AccountCode = sundry-debtors AND ClosedState <> 'F' NO-LOCK:
1071 IF AcctTran.MonthCode > month-30 THEN DO:
1072 total-00 = total-00 + AcctTran.Amount .
1073 END.
1074 ELSE IF AcctTran.MonthCode > month-60 THEN DO:
1075 total-30 = total-30 + AcctTran.Amount .
1076 END.
1077 ELSE IF AcctTran.MonthCode > month-90 THEN DO:
1078 total-60 = total-60 + AcctTran.Amount .
1079 END.
1080 ELSE DO:
1081 total-90 = total-90 + AcctTran.Amount .
1082 END.
1083 found = yes.
1084 END.
1085 arrears = total-00 + total-30 + total-60 + total-90.
1087 FOR EACH Tenant WHERE Tenant.EntityType = 'P' AND Tenant.EntityCode = Property.PropertyCode NO-LOCK,
1088 EACH AcctTran WHERE AcctTran.EntityType = 'T' AND AcctTran.EntityCode = Tenant.TenantCode
1089 AND AcctTran.AccountCode = sundry-debtors AND AcctTran.MonthCode > month-30 NO-LOCK:
1090 IF AcctTran.Amount > 0 THEN
1091 billings = billings + AcctTran.Amount.
1092 ELSE
1093 receipts = receipts + AcctTran.Amount.
1094 found = yes.
1095 END.
1097 IF NOT found THEN RETURN ''.
1099 rrows = tr(
1100 td(TRIM(STRING(billings,money-format)),'class="money"')
1101 + td(TRIM(STRING(receipts,money-format)),'class="money"')
1102 + td('','')
1103 + td(TRIM(STRING(arrears,money-format)),'class="money"')
1104 + td(TRIM(STRING(total-00,money-format)),'class="money"')
1105 + td(TRIM(STRING(total-30,money-format)),'class="money"')
1106 + td(TRIM(STRING(total-60,money-format)),'class="money"')
1107 + td(TRIM(STRING(total-90,money-format)),'class="money"')
1108 + td('','class="groupbreak"')
1109 + td( '','colspan="4"')
1110 , '').
1112 rrows = rrows + tr(
1113 td(TRIM(STRING((arrears / billings) * 100, pcnt-format)), 'class="decimal"')
1114 + td(TRIM(STRING((arrears / receipts) * 100, pcnt-format)), 'class="decimal"')
1115 + td('','') + td('-','')
1116 + td(TRIM(STRING((total-00 / arrears) * 100, pcnt-format)), 'class="decimal"')
1117 + td(TRIM(STRING((total-30 / arrears) * 100, pcnt-format)), 'class="decimal"')
1118 + td(TRIM(STRING((total-60 / arrears) * 100, pcnt-format)), 'class="decimal"')
1119 + td(TRIM(STRING((total-90 / arrears) * 100, pcnt-format)), 'class="decimal"')
1120 + td('','class="groupbreak"')
1121 + td( '','colspan="4"')
1122 , '').
1124 report = report + tbody(rrows,'').
1126 RETURN report.
1128 END FUNCTION.
1130 /* _UIB-CODE-BLOCK-END */
1131 &ANALYZE-RESUME
1133 &ENDIF
1135 &IF DEFINED(EXCLUDE-do-3-vacancies) = 0 &THEN
1137 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION do-3-vacancies Procedure
1138 FUNCTION do-3-vacancies RETURNS CHARACTER
1139 ( /* parameter-definitions */ ) :
1140 /*------------------------------------------------------------------------------
1141 Purpose: Do the vacant space listing for the report.
1142 ------------------------------------------------------------------------------*/
1143 DEF VAR report AS CHAR NO-UNDO.
1144 DEF VAR rrows AS CHAR NO-UNDO.
1145 DEF VAR rrow AS CHAR NO-UNDO.
1146 DEF VAR found AS LOGICAL NO-UNDO INITIAL No.
1148 DEF VAR total-area AS DECIMAL NO-UNDO INITIAL 0.0 .
1149 DEF VAR total-rent AS DECIMAL NO-UNDO INITIAL 0.0 .
1151 report = tr( empty(14), 'class="groupbreak"') +
1152 tbody(
1153 tr(
1154 td("Leasing Activity", 'colspan="8"')
1155 + td('','class="groupbreak" rowspan="2"')
1156 + td("Leasing Commentary", 'colspan="4" rowspan="2"')
1157 , '')
1158 + tr(
1159 td("Vacant Unit", '')
1160 + td("Area", '')
1161 + td("$PSM", '')
1162 + td("Rent Income PA", '')
1163 + td("New Deals", '')
1164 + td("Type of Deal", '')
1165 + td("Rent Income PA", '')
1166 + td("Gross $PSM", '')
1167 , ''), 'class="colhead"').
1169 FOR EACH RentalSpace OF Property WHERE RentalSpace.AreaStatus = "V"
1170 OR NOT CAN-FIND( TenancyLease OF RentalSpace WHERE TenancyLease.LeaseStatus <> "PAST") NO-LOCK
1171 BY RentalSpace.PropertyCode BY RentalSpace.Level BY RentalSpace.LevelSequence:
1172 rrow = td(RentalSpace.Description,'').
1173 rrow = rrow + td( TRIM(STRING(RentalSpace.AreaSize,area-format)),'class="decimal"').
1174 rrow = rrow + td( TRIM(STRING(RentalSpace.MarketRental / RentalSpace.AreaSize,money-format)),'class="decimal"').
1175 rrow = rrow + td( TRIM(STRING(RentalSpace.MarketRental,money-format)),'class="money"').
1176 rrow = rrow + td('','') + td('','') + td('','') + td('','')
1177 + td( '','class="groupbreak" style="border-bottom-style:none"')
1178 + td( '','colspan="4"').
1180 rrows = rrows + tr(rrow,'').
1182 IF test-floor-space(RentalSpace.AreaType,RentalSpace.AreaSize) = "Yes" THEN DO:
1183 total-area = total-area + RentalSpace.AreaSize.
1184 total-rent = total-rent + RentalSpace.MarketRental.
1185 END.
1186 found = Yes.
1188 END.
1190 IF NOT found THEN RETURN ''.
1192 rrow = tr(
1193 td(TRIM(STRING((total-area / total-area) * 100,pcnt-format)), '')
1194 + td(TRIM(STRING(total-area,area-format)), 'class="decimal"')
1195 + td(TRIM(STRING(total-rent / total-area,money-format)), 'class="decimal"')
1196 + td(TRIM(STRING(total-rent,money-format)), 'class="money"')
1197 + td('','') + td('','') + td('','') + td('','')
1198 + td( '','class="groupbreak" style="border-top-style:none"')
1199 + td( '','colspan="4"')
1200 , '').
1202 report = report + tbody(rrows,'') + tbody(rrow,'class="totals"').
1203 /* report = tbl(report,'class="vacancies"'). */
1205 RETURN report.
1207 END FUNCTION.
1209 /* _UIB-CODE-BLOCK-END */
1210 &ANALYZE-RESUME
1212 &ENDIF
1214 &IF DEFINED(EXCLUDE-do-3a-reviews) = 0 &THEN
1216 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION do-3a-reviews Procedure
1217 FUNCTION do-3a-reviews RETURNS CHARACTER
1218 ( /* parameter-definitions */ ) :
1219 /*------------------------------------------------------------------------------
1220 Purpose:
1221 Notes:
1222 ------------------------------------------------------------------------------*/
1223 DEF VAR report AS CHAR NO-UNDO INITIAL ''.
1225 report = tr( empty(14), 'class="groupbreak"') +
1226 tbody(
1227 tr(
1228 td("Rent Reviews", 'colspan="8"')
1229 + td('','class="groupbreak" rowspan="2"')
1230 + td("Review Notes", 'colspan="4" rowspan="2"')
1231 , '')
1232 + tr(
1233 td("Tenant Name", 'colspan="4"')
1234 + td("Date Due", '')
1235 + td("Type", '')
1236 + td("Basis", 'colspan="2"')
1237 , ''), 'class="colhead"').
1239 report = report + '<tbody>'.
1240 FOR EACH tenant-reviews NO-LOCK:
1241 report = report + tr(
1242 td( tenant-reviews.TenantName, 'colspan="4"' )
1243 + td( STRING(tenant-reviews.DateDue, '99/99/9999'), 'date' )
1244 + td( tenant-reviews.ReviewType, '' )
1245 + td( tenant-reviews.EstimateBasis, 'colspan="2"' )
1246 + td( '','class="groupbreak" style="border-top-style:none"')
1247 + td( '','colspan="4"')
1248 ,'').
1249 END.
1250 report = report + '</tbody>'.
1252 RETURN report.
1254 END FUNCTION.
1256 /* _UIB-CODE-BLOCK-END */
1257 &ANALYZE-RESUME
1259 &ENDIF
1261 &IF DEFINED(EXCLUDE-do-4-tenancy-issues) = 0 &THEN
1263 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION do-4-tenancy-issues Procedure
1264 FUNCTION do-4-tenancy-issues RETURNS CHARACTER
1265 ( /* parameter-definitions */ ) :
1266 /*------------------------------------------------------------------------------
1267 Purpose: Get the current arrears for the tenants of this property.
1268 ------------------------------------------------------------------------------*/
1269 DEF VAR report AS CHAR NO-UNDO.
1270 DEF VAR rrows AS CHAR NO-UNDO.
1271 DEF VAR i AS INT NO-UNDO.
1273 rrows = tr( empty(16), 'class="groupbreak"').
1274 rrows = rrows + tr(
1275 td("Tenant Activity Report by Exception", 'colspan="3" class="subhead"')
1276 + empty(13)
1277 , '').
1279 DO i = 1 TO 4:
1280 rrows = rrows + tr( empty(16), '').
1281 END.
1283 rrows = rrows + tr(
1284 td("Outstanding Legal Issues", 'colspan="3" class="subhead"')
1285 + empty(13)
1286 , '').
1288 DO i = 1 TO 3:
1289 rrows = rrows + tr( empty(16), '').
1290 END.
1292 report = tbody(rrows,'class="tenancyissues"').
1294 RETURN report.
1296 END FUNCTION.
1298 /* _UIB-CODE-BLOCK-END */
1299 &ANALYZE-RESUME
1301 &ENDIF
1303 &IF DEFINED(EXCLUDE-do-5-facilities-management) = 0 &THEN
1305 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION do-5-facilities-management Procedure
1306 FUNCTION do-5-facilities-management RETURNS CHARACTER
1307 ( /* parameter-definitions */ ) :
1308 /*------------------------------------------------------------------------------
1309 Purpose: Get the current arrears for the tenants of this property.
1310 ------------------------------------------------------------------------------*/
1311 DEF VAR report AS CHAR NO-UNDO INITIAL ''.
1313 DEF VAR month-from AS INT NO-UNDO.
1314 DEF VAR month-to AS INT NO-UNDO.
1315 DEF VAR fin-year AS INT NO-UNDO.
1316 DEF VAR totals AS DECIMAL EXTENT 6 NO-UNDO INITIAL 0.0 .
1318 DEF VAR mth-actual AS DECIMAL NO-UNDO INITIAL 0.0 .
1319 DEF VAR mth-budget AS DECIMAL NO-UNDO INITIAL 0.0 .
1320 DEF VAR ytd-actual AS DECIMAL NO-UNDO INITIAL 0.0 .
1321 DEF VAR ytd-budget AS DECIMAL NO-UNDO INITIAL 0.0 .
1322 DEF VAR fyr-budget AS DECIMAL NO-UNDO INITIAL 0.0 .
1323 DEF VAR fyr-frcast AS DECIMAL NO-UNDO INITIAL 0.0 .
1325 DEF VAR mth-actual-t AS DECIMAL NO-UNDO INITIAL 0.0 .
1326 DEF VAR mth-budget-t AS DECIMAL NO-UNDO INITIAL 0.0 .
1327 DEF VAR ytd-actual-t AS DECIMAL NO-UNDO INITIAL 0.0 .
1328 DEF VAR ytd-budget-t AS DECIMAL NO-UNDO INITIAL 0.0 .
1329 DEF VAR fyr-budget-t AS DECIMAL NO-UNDO INITIAL 0.0 .
1330 DEF VAR fyr-frcast-t AS DECIMAL NO-UNDO INITIAL 0.0 .
1332 DEF VAR mth-actual-g AS DECIMAL NO-UNDO INITIAL 0.0 .
1333 DEF VAR mth-budget-g AS DECIMAL NO-UNDO INITIAL 0.0 .
1334 DEF VAR ytd-actual-g AS DECIMAL NO-UNDO INITIAL 0.0 .
1335 DEF VAR ytd-budget-g AS DECIMAL NO-UNDO INITIAL 0.0 .
1336 DEF VAR fyr-budget-g AS DECIMAL NO-UNDO INITIAL 0.0 .
1337 DEF VAR fyr-frcast-g AS DECIMAL NO-UNDO INITIAL 0.0 .
1339 FIND LAST Month WHERE Month.StartDate < as-at-date NO-LOCK.
1340 month-to = Month.MonthCode.
1341 fin-year = Month.FinancialYearCode.
1342 FIND FIRST Month WHERE Month.FinancialYearCode = fin-year NO-LOCK.
1343 month-from = Month.MonthCode.
1344 FIND LAST Month WHERE Month.FinancialYearCode = fin-year NO-LOCK.
1346 DEF VAR last-section AS CHAR INITIAL ?.
1347 DEF VAR this-section AS CHAR INITIAL ?.
1348 FOR EACH ChartOfAccount NO-LOCK WHERE ChartOfAccount.AccountGroupCode = 'PROPEX' BY NAME:
1349 IF INDEX( ChartOfAccount.NAME, '-' ) = 0 THEN NEXT.
1350 this-section = TRIM( ENTRY( 1, ChartOfAccount.NAME, '-') ).
1351 IF this-section <> last-section THEN DO:
1352 IF last-section <> ? THEN DO:
1353 report = report + tr(
1354 td(last-section, 'colspan="2"')
1355 + td(TRIM(STRING(mth-actual-t,money-format)), 'class="money"')
1356 + td(TRIM(STRING(mth-budget-t,money-format)), 'class="money"')
1357 + td(TRIM(STRING(ytd-actual-t,money-format)), 'class="money"')
1358 + td(TRIM(STRING(ytd-budget-t,money-format)), 'class="money"')
1359 + td(TRIM(STRING(fyr-budget-t,money-format)), 'class="money"')
1360 + td(TRIM(STRING(fyr-frcast-t,money-format)), 'class="money"')
1361 + td(TRIM(STRING( (fyr-frcast-t / total-area), money-format)), 'class="money"')
1362 + td(TRIM(STRING(((fyr-frcast-t - fyr-budget-t) / fyr-budget-t) * 100,pcnt-format)), 'class="decimal"')
1363 + empty(6)
1364 , '').
1366 mth-actual-g = mth-actual-g + mth-actual-t.
1367 mth-budget-g = mth-budget-g + mth-budget-t.
1368 ytd-actual-g = ytd-actual-g + ytd-actual-t.
1369 ytd-budget-g = ytd-budget-g + ytd-budget-t.
1370 fyr-budget-g = fyr-budget-g + fyr-budget-t.
1371 fyr-frcast-g = fyr-frcast-g + fyr-frcast-t.
1373 END.
1374 ELSE DO:
1375 report =
1376 tr( empty(15), 'class="groupbreak"') +
1377 tbody( tr(
1378 td("Account", 'colspan="2"')
1379 + td("Mth Actual", '')
1380 + td("Mth Budget", '')
1381 + td("YTD Actual", '')
1382 + td("YTD Budget", '')
1383 + td("FY Budget", '')
1384 + td("FY Forecast", '')
1385 + td("$PSM", '')
1386 + td("Variance", '')
1387 + td("Notes", 'colspan="6"')
1388 , ''), 'class="colhead"').
1389 END.
1390 mth-actual-t = 0.0 .
1391 mth-budget-t = 0.0 .
1392 ytd-actual-t = 0.0 .
1393 ytd-budget-t = 0.0 .
1394 fyr-budget-t = 0.0 .
1395 fyr-frcast-t = 0.0 .
1396 last-section = this-section.
1397 END.
1398 do-5a-building-account( month-from, month-to, mth-actual, mth-budget,
1399 ytd-actual, ytd-budget, fyr-budget, fyr-frcast ).
1401 IF mth-actual <> 0.0 OR mth-budget <> 0.0
1402 OR ytd-actual <> 0.0 OR ytd-budget <> 0.0
1403 OR fyr-frcast <> 0.0 OR ytd-budget <> 0.0
1404 THEN DO:
1406 mth-actual-t = mth-actual-t + mth-actual.
1407 mth-budget-t = mth-budget-t + mth-budget.
1408 ytd-actual-t = ytd-actual-t + ytd-actual.
1409 ytd-budget-t = ytd-budget-t + ytd-budget.
1410 fyr-budget-t = fyr-budget-t + fyr-budget.
1411 fyr-frcast-t = fyr-frcast-t + fyr-frcast.
1412 END.
1414 END.
1416 IF last-section = ? THEN RETURN ''.
1418 report = report + tr(
1419 td(last-section, 'colspan="2"')
1420 + td(TRIM(STRING(mth-actual-t,money-format)), 'class="money"')
1421 + td(TRIM(STRING(mth-budget-t,money-format)), 'class="money"')
1422 + td(TRIM(STRING(ytd-actual-t,money-format)), 'class="money"')
1423 + td(TRIM(STRING(ytd-budget-t,money-format)), 'class="money"')
1424 + td(TRIM(STRING(fyr-budget-t,money-format)), 'class="money"')
1425 + td(TRIM(STRING(fyr-frcast-t,money-format)), 'class="money"')
1426 + td(TRIM(STRING( (fyr-frcast-t / total-area), money-format)), 'class="money"')
1427 + td(TRIM(STRING(((fyr-frcast-t - fyr-budget-t) / fyr-budget-t) * 100,pcnt-format)), 'class="decimal"')
1428 + empty(6)
1429 , '').
1431 mth-actual-g = mth-actual-g + mth-actual-t.
1432 mth-budget-g = mth-budget-g + mth-budget-t.
1433 ytd-actual-g = ytd-actual-g + ytd-actual-t.
1434 ytd-budget-g = ytd-budget-g + ytd-budget-t.
1435 fyr-budget-g = fyr-budget-g + fyr-budget-t.
1436 fyr-frcast-g = fyr-frcast-g + fyr-frcast-t.
1438 report = report + tbody( tr(
1439 td("Property Expense Totals", 'colspan="2"')
1440 + td(TRIM(STRING(mth-actual-g,money-format)), 'class="money"')
1441 + td(TRIM(STRING(mth-budget-g,money-format)), 'class="money"')
1442 + td(TRIM(STRING(ytd-actual-g,money-format)), 'class="money"')
1443 + td(TRIM(STRING(ytd-budget-g,money-format)), 'class="money"')
1444 + td(TRIM(STRING(fyr-budget-g,money-format)), 'class="money"')
1445 + td(TRIM(STRING(fyr-frcast-g,money-format)), 'class="money"')
1446 + td(TRIM(STRING( (fyr-frcast-g / total-area), money-format)), 'class="money"')
1447 + td(TRIM(STRING(((fyr-frcast-g - fyr-budget-g) / fyr-budget-g) * 100,pcnt-format)), 'class="decimal"')
1448 + empty(6)
1449 , ''), 'class="totals"').
1451 RETURN report.
1453 END FUNCTION.
1455 /* _UIB-CODE-BLOCK-END */
1456 &ANALYZE-RESUME
1458 &ENDIF
1460 &IF DEFINED(EXCLUDE-do-5a-building-account) = 0 &THEN
1462 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION do-5a-building-account Procedure
1463 FUNCTION do-5a-building-account RETURNS CHARACTER
1464 ( INPUT month-from AS INT, INPUT month-to AS INT,
1465 OUTPUT mth-actual AS DECIMAL, OUTPUT mth-budget AS DECIMAL,
1466 OUTPUT ytd-actual AS DECIMAL, OUTPUT ytd-budget AS DECIMAL,
1467 OUTPUT fyr-budget AS DECIMAL, OUTPUT fyr-frcast AS DECIMAL
1469 /*------------------------------------------------------------------------------
1470 Purpose:
1471 Notes:
1472 ------------------------------------------------------------------------------*/
1473 DEF VAR rrow AS CHAR NO-UNDO INITIAL ''.
1474 DEF VAR acctgroup AS CHAR NO-UNDO.
1476 mth-actual = 0.0 . mth-budget = 0.0 .
1477 ytd-actual = 0.0 . ytd-budget = 0.0 .
1478 fyr-budget = 0.0 . fyr-frcast = 0.0 .
1479 FOR EACH AccountBalance NO-LOCK WHERE
1480 AccountBalance.EntityType = 'P' AND
1481 AccountBalance.EntityCode = Property.PropertyCode AND
1482 AccountBalance.AccountCode = ChartOfAccount.AccountCode AND
1483 AccountBalance.MonthCode >= month-from AND
1484 AccountBalance.MonthCode <= Month.MonthCode:
1486 IF AccountBalance.MonthCode = month-to THEN DO:
1487 mth-actual = AccountBalance.Balance.
1488 mth-budget = AccountBalance.Budget.
1489 END.
1491 IF AccountBalance.MonthCode <= month-to THEN DO:
1492 ytd-actual = ytd-actual + AccountBalance.Balance.
1493 ytd-budget = ytd-budget + AccountBalance.Budget.
1494 fyr-frcast = fyr-frcast + AccountBalance.Balance.
1495 END.
1496 ELSE DO:
1497 fyr-frcast = fyr-frcast + AccountBalance.Budget.
1498 END.
1500 fyr-budget = fyr-budget + AccountBalance.Budget.
1502 END.
1504 END FUNCTION.
1506 /* _UIB-CODE-BLOCK-END */
1507 &ANALYZE-RESUME
1509 &ENDIF
1511 &IF DEFINED(EXCLUDE-do-6-building-income) = 0 &THEN
1513 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION do-6-building-income Procedure
1514 FUNCTION do-6-building-income RETURNS CHARACTER
1515 ( /* parameter-definitions */ ) :
1516 /*------------------------------------------------------------------------------
1517 Purpose:
1518 Notes:
1519 ------------------------------------------------------------------------------*/
1520 IF building-income-report = ? THEN DO:
1521 DEF VAR report AS CHAR NO-UNDO.
1522 DEF VAR rrows AS CHAR NO-UNDO INITIAL ''.
1523 DEF VAR rrow AS CHAR NO-UNDO.
1524 DEF VAR found AS LOGICAL NO-UNDO INITIAL No.
1526 DEF VAR month-from AS INT NO-UNDO.
1527 DEF VAR month-to AS INT NO-UNDO.
1528 DEF VAR fin-year AS INT NO-UNDO.
1529 DEF VAR totals AS DECIMAL EXTENT 6 NO-UNDO INITIAL 0.0 .
1531 DEF VAR mth-actual AS DECIMAL NO-UNDO INITIAL 0.0 .
1532 DEF VAR mth-budget AS DECIMAL NO-UNDO INITIAL 0.0 .
1533 DEF VAR ytd-actual AS DECIMAL NO-UNDO INITIAL 0.0 .
1534 DEF VAR ytd-budget AS DECIMAL NO-UNDO INITIAL 0.0 .
1535 DEF VAR fyr-budget AS DECIMAL NO-UNDO INITIAL 0.0 .
1536 DEF VAR fyr-frcast AS DECIMAL NO-UNDO INITIAL 0.0 .
1538 DEF VAR mth-actual-t AS DECIMAL NO-UNDO INITIAL 0.0 .
1539 DEF VAR mth-budget-t AS DECIMAL NO-UNDO INITIAL 0.0 .
1540 DEF VAR ytd-actual-t AS DECIMAL NO-UNDO INITIAL 0.0 .
1541 DEF VAR ytd-budget-t AS DECIMAL NO-UNDO INITIAL 0.0 .
1542 DEF VAR fyr-budget-t AS DECIMAL NO-UNDO INITIAL 0.0 .
1543 DEF VAR fyr-frcast-t AS DECIMAL NO-UNDO INITIAL 0.0 .
1545 DEF VAR mth-actual-g AS DECIMAL NO-UNDO INITIAL 0.0 .
1546 DEF VAR mth-budget-g AS DECIMAL NO-UNDO INITIAL 0.0 .
1547 DEF VAR ytd-actual-g AS DECIMAL NO-UNDO INITIAL 0.0 .
1548 DEF VAR ytd-budget-g AS DECIMAL NO-UNDO INITIAL 0.0 .
1549 DEF VAR fyr-budget-g AS DECIMAL NO-UNDO INITIAL 0.0 .
1550 DEF VAR fyr-frcast-g AS DECIMAL NO-UNDO INITIAL 0.0 .
1552 FIND LAST Month WHERE Month.StartDate < as-at-date NO-LOCK.
1553 month-to = Month.MonthCode.
1554 fin-year = Month.FinancialYearCode.
1555 FIND FIRST Month WHERE Month.FinancialYearCode = fin-year NO-LOCK.
1556 month-from = Month.MonthCode.
1557 FIND LAST Month WHERE Month.FinancialYearCode = fin-year NO-LOCK.
1559 report =
1560 tr( empty(15), 'class="groupbreak"') +
1561 tbody( tr(
1562 td("Account", 'colspan="2"')
1563 + td("Mth Actual", '')
1564 + td("Mth Budget", '')
1565 + td("YTD Actual", '')
1566 + td("YTD Budget", '')
1567 + td("FY Budget", '')
1568 + td("FY Forecast", '')
1569 + td("$PSM", '')
1570 + td("Variance", '')
1571 + td("Notes", 'colspan="6"')
1572 , ''), 'class="colhead"').
1574 /* A pass through the rent accounts, for the financial report. We don't show these */
1575 FOR EACH ChartOfAccount NO-LOCK WHERE
1576 ( ChartOfAccount.AccountGroupCode = 'RENT' ) OR
1577 ( ChartOfAccount.AccountGroupCode = 'OGREC' ) OR
1578 ( ChartOfAccount.AccountGroupCode = 'OOI'):
1579 rrow = do-6a-building-account( month-from, month-to, mth-actual, mth-budget,
1580 ytd-actual, ytd-budget, fyr-budget, fyr-frcast ).
1581 END.
1583 FOR EACH ChartOfAccount NO-LOCK WHERE
1584 ( ChartOfAccount.AccountGroupCode = 'PROPEX' ) OR
1585 ( ChartOfAccount.AccountGroupCode = 'TENEX' ) OR
1586 ( ChartOfAccount.AccountGroupCode = 'LEASNG'):
1588 rrow = do-6a-building-account( month-from, month-to, mth-actual, mth-budget,
1589 ytd-actual, ytd-budget, fyr-budget, fyr-frcast ).
1591 IF mth-actual <> 0.0 OR mth-budget <> 0.0
1592 OR ytd-actual <> 0.0 OR ytd-budget <> 0.0
1593 OR fyr-frcast <> 0.0 OR ytd-budget <> 0.0
1594 THEN DO:
1595 found = Yes.
1596 rrows = rrows + rrow.
1598 mth-actual-t = mth-actual-t + mth-actual.
1599 mth-budget-t = mth-budget-t + mth-budget.
1600 ytd-actual-t = ytd-actual-t + ytd-actual.
1601 ytd-budget-t = ytd-budget-t + ytd-budget.
1602 fyr-budget-t = fyr-budget-t + fyr-budget.
1603 fyr-frcast-t = fyr-frcast-t + fyr-frcast.
1604 END.
1606 END.
1608 IF rrows <> '' THEN DO:
1609 mth-actual-g = mth-actual-g + mth-actual-t.
1610 mth-budget-g = mth-budget-g + mth-budget-t.
1611 ytd-actual-g = ytd-actual-g + ytd-actual-t.
1612 ytd-budget-g = ytd-budget-g + ytd-budget-t.
1613 fyr-budget-g = fyr-budget-g + fyr-budget-t.
1614 fyr-frcast-g = fyr-frcast-g + fyr-frcast-t.
1616 report = report + tbody( rrows, '' ).
1618 report = report + tbody( tr(
1619 td("General Expense Totals", 'colspan="2"')
1620 + td(TRIM(STRING(mth-actual-t,money-format)), 'class="money"')
1621 + td(TRIM(STRING(mth-budget-t,money-format)), 'class="money"')
1622 + td(TRIM(STRING(ytd-actual-t,money-format)), 'class="money"')
1623 + td(TRIM(STRING(ytd-budget-t,money-format)), 'class="money"')
1624 + td(TRIM(STRING(fyr-budget-t,money-format)), 'class="money"')
1625 + td(TRIM(STRING(fyr-frcast-t,money-format)), 'class="money"')
1626 + td(TRIM(STRING( (fyr-frcast-t / total-area), money-format)), 'class="money"')
1627 + td(TRIM(STRING(((fyr-frcast-t - fyr-budget-t) / fyr-budget-t) * 100,pcnt-format)), 'class="decimal"')
1628 + empty(6)
1629 , ''), 'class="totals"').
1631 mth-actual-t = 0.0 .
1632 mth-budget-t = 0.0 .
1633 ytd-actual-t = 0.0 .
1634 ytd-budget-t = 0.0 .
1635 fyr-budget-t = 0.0 .
1636 fyr-frcast-t = 0.0 .
1637 rrows = ''.
1638 END.
1640 FOR EACH ChartOfAccount NO-LOCK WHERE
1641 ( ChartOfAccount.AccountGroupCode = 'OWNEX' ):
1643 rrow = do-6a-building-account( month-from, month-to, mth-actual, mth-budget,
1644 ytd-actual, ytd-budget, fyr-budget, fyr-frcast ).
1646 IF mth-actual <> 0.0 OR mth-budget <> 0.0
1647 OR ytd-actual <> 0.0 OR ytd-budget <> 0.0
1648 OR fyr-frcast <> 0.0 OR ytd-budget <> 0.0
1649 THEN DO:
1650 found = Yes.
1651 rrows = rrows + rrow.
1653 mth-actual-t = mth-actual-t + mth-actual.
1654 mth-budget-t = mth-budget-t + mth-budget.
1655 ytd-actual-t = ytd-actual-t + ytd-actual.
1656 ytd-budget-t = ytd-budget-t + ytd-budget.
1657 fyr-budget-t = fyr-budget-t + fyr-budget.
1658 fyr-frcast-t = fyr-frcast-t + fyr-frcast.
1659 END.
1661 END.
1663 IF NOT found THEN RETURN ''.
1665 IF rrows <> '' THEN DO:
1666 mth-actual-g = mth-actual-g + mth-actual-t.
1667 mth-budget-g = mth-budget-g + mth-budget-t.
1668 ytd-actual-g = ytd-actual-g + ytd-actual-t.
1669 ytd-budget-g = ytd-budget-g + ytd-budget-t.
1670 fyr-budget-g = fyr-budget-g + fyr-budget-t.
1671 fyr-frcast-g = fyr-frcast-g + fyr-frcast-t.
1674 report = report + tbody( rrows, '' ).
1676 report = report + tbody( tr(
1677 td("Owners Expense Totals", 'colspan="2"')
1678 + td(TRIM(STRING(mth-actual-t,money-format)), 'class="money"')
1679 + td(TRIM(STRING(mth-budget-t,money-format)), 'class="money"')
1680 + td(TRIM(STRING(ytd-actual-t,money-format)), 'class="money"')
1681 + td(TRIM(STRING(ytd-budget-t,money-format)), 'class="money"')
1682 + td(TRIM(STRING(fyr-budget-t,money-format)), 'class="money"')
1683 + td(TRIM(STRING(fyr-frcast-t,money-format)), 'class="money"')
1684 + td(TRIM(STRING( (fyr-frcast-t / total-area), money-format)), 'class="money"')
1685 + td(TRIM(STRING(((fyr-frcast-t - fyr-budget-t) / fyr-budget-t) * 100,pcnt-format)), 'class="decimal"')
1686 + empty(6)
1687 , ''), 'class="totals"').
1688 END.
1690 report = report + tbody( tr(
1691 td("Building Expense Totals", 'colspan="2"')
1692 + td(TRIM(STRING(mth-actual-g,money-format)), 'class="money"')
1693 + td(TRIM(STRING(mth-budget-g,money-format)), 'class="money"')
1694 + td(TRIM(STRING(ytd-actual-g,money-format)), 'class="money"')
1695 + td(TRIM(STRING(ytd-budget-g,money-format)), 'class="money"')
1696 + td(TRIM(STRING(fyr-budget-g,money-format)), 'class="money"')
1697 + td(TRIM(STRING(fyr-frcast-g,money-format)), 'class="money"')
1698 + td(TRIM(STRING( (fyr-frcast-g / total-area), money-format)), 'class="money"')
1699 + td(TRIM(STRING(((fyr-frcast-g - fyr-budget-g) / fyr-budget-g) * 100,pcnt-format)), 'class="decimal"')
1700 + empty(6)
1701 , ''), 'class="totals"').
1703 building-income-report = report.
1704 END.
1706 RETURN building-income-report.
1708 END FUNCTION.
1710 /* _UIB-CODE-BLOCK-END */
1711 &ANALYZE-RESUME
1713 &ENDIF
1715 &IF DEFINED(EXCLUDE-do-6a-building-account) = 0 &THEN
1717 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION do-6a-building-account Procedure
1718 FUNCTION do-6a-building-account RETURNS CHARACTER
1719 ( INPUT month-from AS INT, INPUT month-to AS INT,
1720 OUTPUT mth-actual AS DECIMAL, OUTPUT mth-budget AS DECIMAL,
1721 OUTPUT ytd-actual AS DECIMAL, OUTPUT ytd-budget AS DECIMAL,
1722 OUTPUT fyr-budget AS DECIMAL, OUTPUT fyr-frcast AS DECIMAL
1724 /*------------------------------------------------------------------------------
1725 Purpose:
1726 Notes:
1727 ------------------------------------------------------------------------------*/
1728 DEF VAR rrow AS CHAR NO-UNDO INITIAL ''.
1729 DEF VAR acctgroup AS CHAR NO-UNDO.
1731 mth-actual = 0.0 . mth-budget = 0.0 .
1732 ytd-actual = 0.0 . ytd-budget = 0.0 .
1733 fyr-budget = 0.0 . fyr-frcast = 0.0 .
1734 FOR EACH AccountBalance NO-LOCK WHERE
1735 AccountBalance.EntityType = 'P' AND
1736 AccountBalance.EntityCode = Property.PropertyCode AND
1737 AccountBalance.AccountCode = ChartOfAccount.AccountCode AND
1738 AccountBalance.MonthCode >= month-from AND
1739 AccountBalance.MonthCode <= Month.MonthCode:
1741 IF AccountBalance.MonthCode = month-to THEN DO:
1742 mth-actual = AccountBalance.Balance.
1743 mth-budget = AccountBalance.Budget.
1744 END.
1746 IF AccountBalance.MonthCode <= month-to THEN DO:
1747 ytd-actual = ytd-actual + AccountBalance.Balance.
1748 ytd-budget = ytd-budget + AccountBalance.Budget.
1749 fyr-frcast = fyr-frcast + AccountBalance.Balance.
1750 END.
1751 ELSE DO:
1752 fyr-frcast = fyr-frcast + AccountBalance.Budget.
1753 END.
1755 fyr-budget = fyr-budget + AccountBalance.Budget.
1757 END.
1759 IF mth-actual <> 0.0 OR mth-budget <> 0.0
1760 OR ytd-actual <> 0.0 OR ytd-budget <> 0.0
1761 OR fyr-frcast <> 0.0 OR ytd-budget <> 0.0
1762 THEN DO:
1763 rrow = tr(
1764 td(ChartOfAccount.Name, 'colspan="2"')
1765 + td(TRIM(STRING(mth-actual,money-format)), 'class="money"')
1766 + td(TRIM(STRING(mth-budget,money-format)), 'class="money"')
1767 + td(TRIM(STRING(ytd-actual,money-format)), 'class="money"')
1768 + td(TRIM(STRING(ytd-budget,money-format)), 'class="money"')
1769 + td(TRIM(STRING(fyr-budget,money-format)), 'class="money"')
1770 + td(TRIM(STRING(fyr-frcast,money-format)), 'class="money"')
1771 + td(TRIM(STRING( (fyr-frcast / total-area), money-format)), 'class="money"')
1772 + td(TRIM(STRING(((fyr-frcast - fyr-budget) / fyr-budget) * 100,pcnt-format)), 'class="decimal"')
1773 + empty(6), '').
1775 acctgroup = ChartOfAccount.AccountGroupCode.
1776 FIND FIRST account-total WHERE ttype = acctgroup NO-ERROR.
1777 IF NOT AVAILABLE(account-total) THEN DO:
1778 CREATE account-total.
1779 ttype = acctgroup.
1780 END.
1781 account-total.mth-actual = account-total.mth-actual - mth-actual.
1782 account-total.mth-budget = account-total.mth-budget - mth-budget.
1783 account-total.ytd-actual = account-total.ytd-actual - ytd-actual.
1784 account-total.ytd-budget = account-total.ytd-budget - ytd-budget.
1785 account-total.fyr-frcast = account-total.fyr-frcast - fyr-frcast.
1786 account-total.fyr-budget = account-total.fyr-budget - fyr-budget.
1787 END.
1789 RETURN rrow.
1791 END FUNCTION.
1793 /* _UIB-CODE-BLOCK-END */
1794 &ANALYZE-RESUME
1796 &ENDIF
1798 &IF DEFINED(EXCLUDE-empty) = 0 &THEN
1800 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION empty Procedure
1801 FUNCTION empty RETURNS CHARACTER
1802 ( INPUT num AS INT ) :
1803 /*------------------------------------------------------------------------------
1804 Purpose: Return some empty cells
1805 ------------------------------------------------------------------------------*/
1807 RETURN td("", 'colspan="' + TRIM(STRING(num,">>9")) + '" class="empty"').
1809 END FUNCTION.
1811 /* _UIB-CODE-BLOCK-END */
1812 &ANALYZE-RESUME
1814 &ENDIF
1816 &IF DEFINED(EXCLUDE-financial-report-row) = 0 &THEN
1818 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION financial-report-row Procedure
1819 FUNCTION financial-report-row RETURNS CHARACTER
1820 ( INPUT in-ttype AS CHAR, INPUT line-desc AS CHAR ) :
1821 /*------------------------------------------------------------------------------
1822 Purpose:
1823 Notes:
1824 ------------------------------------------------------------------------------*/
1825 DEF VAR answer AS CHAR NO-UNDO INITIAL ''.
1826 DEF VAR i AS INT NO-UNDO.
1827 DEF VAR style AS CHAR NO-UNDO INITIAL 'decimal'.
1828 DEFINE BUFFER net-income-buffer FOR account-total.
1830 FIND FIRST account-total WHERE ttype = in-ttype NO-ERROR.
1831 IF NOT AVAILABLE(account-total) THEN DO:
1832 DO i = 1 TO 11:
1833 answer = answer + td('','').
1834 END.
1835 answer = tr( td(line-desc, 'colspan="2"') + answer, '' ).
1836 RETURN answer.
1837 END.
1839 IF in-ttype = 'NETINC' THEN DO:
1840 net-income = account-total.fyr-budget.
1841 net-frcast = account-total.fyr-frcast.
1842 style = 'moneytotal'.
1843 END.
1844 answer = tr( td(line-desc, 'colspan="2"')
1845 + td-amount(account-total.fyr-budget, money-format, style)
1846 + td-amount(account-total.fyr-budget / total-area, psm-format, style)
1848 + td-amount(account-total.fyr-frcast, money-format, style)
1849 + td-amount(account-total.fyr-frcast / total-area, psm-format, style)
1850 */ + td('','') + td('','')
1851 + td-amount(((account-total.fyr-frcast - account-total.fyr-budget) / account-total.fyr-budget) * 100, pcnt-format, style)
1852 + td-amount(account-total.mth-actual, money-format, style)
1853 + td-amount(account-total.mth-budget, money-format, style)
1854 + td-amount(((account-total.mth-budget - account-total.mth-actual) / account-total.mth-actual) * 100, pcnt-format, style)
1855 + td-amount(account-total.ytd-actual, money-format, style)
1856 + td-amount(account-total.ytd-budget, money-format, style)
1857 + td-amount(((account-total.ytd-budget - account-total.ytd-actual) / account-total.ytd-actual) * 100, pcnt-format, style)
1858 , '').
1860 FIND FIRST net-income-buffer WHERE net-income-buffer.ttype = 'NETINC' NO-ERROR.
1861 IF NOT AVAILABLE(net-income-buffer) THEN DO:
1862 CREATE net-income-buffer.
1863 net-income-buffer.ttype = 'NETINC'.
1864 END.
1865 net-income-buffer.mth-actual = net-income-buffer.mth-actual + account-total.mth-actual.
1866 net-income-buffer.mth-budget = net-income-buffer.mth-budget + account-total.mth-budget.
1867 net-income-buffer.ytd-actual = net-income-buffer.ytd-actual + account-total.ytd-actual.
1868 net-income-buffer.ytd-budget = net-income-buffer.ytd-budget + account-total.ytd-budget.
1869 net-income-buffer.fyr-budget = net-income-buffer.fyr-budget + account-total.fyr-budget.
1870 net-income-buffer.fyr-frcast = net-income-buffer.fyr-frcast + account-total.fyr-frcast.
1872 RETURN answer.
1874 END FUNCTION.
1876 /* _UIB-CODE-BLOCK-END */
1877 &ANALYZE-RESUME
1879 &ENDIF
1881 &IF DEFINED(EXCLUDE-get-acctgrp-amnt) = 0 &THEN
1883 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION get-acctgrp-amnt Procedure
1884 FUNCTION get-acctgrp-amnt RETURNS DECIMAL
1885 ( INPUT actual AS LOGICAL, INPUT acctgrp AS CHAR ) :
1886 /*------------------------------------------------------------------------------
1887 Purpose: Get the sum of the accounts in a particular entity
1888 ------------------------------------------------------------------------------*/
1889 IF NOT AVAILABLE(Property) THEN RETURN 0.0 .
1891 DEF VAR sum AS DECIMAL NO-UNDO INITIAL 0.0 .
1893 FOR EACH ChartOfAccount WHERE ChartOfAccount.AccountGroupCode = acctgrp NO-LOCK:
1894 FOR EACH AccountSummary WHERE EntityType = 'P' AND EntityCode = PropertyCode
1895 AND AccountSummary.AccountCode = ChartOfAccount.AccountCode NO-LOCK:
1896 sum = sum + (IF actual THEN AccountSummary.Balance ELSE AccountSummary.Budget).
1897 END.
1898 END.
1900 RETURN sum.
1902 END FUNCTION.
1904 /* _UIB-CODE-BLOCK-END */
1905 &ANALYZE-RESUME
1907 &ENDIF
1909 &IF DEFINED(EXCLUDE-get-prop-og) = 0 &THEN
1911 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION get-prop-og Procedure
1912 FUNCTION get-prop-og RETURNS DECIMAL
1913 ( INPUT doit AS LOGICAL, INPUT pc AS INTEGER, INPUT ac AS DECIMAL ) :
1914 /*------------------------------------------------------------------------------
1915 Purpose:
1916 Notes:
1917 ------------------------------------------------------------------------------*/
1918 IF doit <> Yes THEN RETURN 1.0 .
1919 FIND PropertyOutgoing WHERE PropertyOutgoing.PropertyCode = pc
1920 AND PropertyOutgoing.AccountCode = ac NO-LOCK NO-ERROR.
1921 IF AVAILABLE(PropertyOutgoing) THEN
1922 RETURN PropertyOutgoing.BudgetAmount / 100 .
1924 RETURN 0.00 .
1926 END FUNCTION.
1928 /* _UIB-CODE-BLOCK-END */
1929 &ANALYZE-RESUME
1931 &ENDIF
1933 &IF DEFINED(EXCLUDE-lease-years-remaining) = 0 &THEN
1935 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION lease-years-remaining Procedure
1936 FUNCTION lease-years-remaining RETURNS DECIMAL
1937 ( /* parameter-definitions */ ) :
1939 /*------------------------------------------------------------------------------
1940 Purpose: How much time is remaining on this lease
1941 ------------------------------------------------------------------------------*/
1942 FIND TenancyLease OF RentalSpace WHERE TenancyLease.LeaseStatus <> "PAST" NO-LOCK NO-ERROR.
1943 IF NOT AVAILABLE(TenancyLease) THEN RETURN 0.0 .
1945 DEF VAR remaining AS DECIMAL.
1946 remaining = TenancyLease.LeaseEndDate - as-at-date.
1947 IF remaining = ? OR remaining < 30.4375 THEN DO:
1948 remaining = 30.4375.
1949 END.
1950 remaining = remaining / 365.25.
1952 RETURN remaining.
1954 END FUNCTION.
1956 /* _UIB-CODE-BLOCK-END */
1957 &ANALYZE-RESUME
1959 &ENDIF
1961 &IF DEFINED(EXCLUDE-show-one-review) = 0 &THEN
1963 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION show-one-review Procedure
1964 FUNCTION show-one-review RETURNS CHARACTER
1965 ( /* no parameter-definitions */ ) :
1966 /*------------------------------------------------------------------------------
1967 Purpose: Return a string containing one review.
1968 Notes:
1969 ------------------------------------------------------------------------------*/
1970 DEF VAR cells AS CHAR NO-UNDO INITIAL "".
1972 IF NOT AVAILABLE(tenant-reviews) THEN DO:
1973 cells = EMPTY(4).
1974 END.
1975 ELSE DO:
1976 cells = td( tenant-reviews.TenantName, '' )
1977 + td( STRING(tenant-reviews.DateDue, '99/99/9999'), 'date' )
1978 + td( tenant-reviews.ReviewType, '' )
1979 + td( tenant-reviews.EstimateBasis, '' ).
1980 FIND NEXT tenant-reviews.
1981 END.
1983 RETURN cells.
1985 END FUNCTION.
1987 /* _UIB-CODE-BLOCK-END */
1988 &ANALYZE-RESUME
1990 &ENDIF
1992 &IF DEFINED(EXCLUDE-tbl) = 0 &THEN
1994 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION tbl Procedure
1995 FUNCTION tbl RETURNS CHARACTER
1996 ( INPUT content AS CHAR, INPUT attributes AS CHAR ) :
1997 /*------------------------------------------------------------------------------
1998 Purpose: Shorthand for specific html tag, 'table' is a reserved word.
1999 ------------------------------------------------------------------------------*/
2001 RETURN tag("table", content, attributes ).
2003 END FUNCTION.
2005 /* _UIB-CODE-BLOCK-END */
2006 &ANALYZE-RESUME
2008 &ENDIF
2010 &IF DEFINED(EXCLUDE-tbody) = 0 &THEN
2012 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION tbody Procedure
2013 FUNCTION tbody RETURNS CHARACTER
2014 ( INPUT content AS CHAR, INPUT attributes AS CHAR ) :
2015 /*------------------------------------------------------------------------------
2016 Purpose:
2017 ------------------------------------------------------------------------------*/
2019 RETURN tag("tbody", content, attributes) + "~n".
2021 END FUNCTION.
2023 /* _UIB-CODE-BLOCK-END */
2024 &ANALYZE-RESUME
2026 &ENDIF
2028 &IF DEFINED(EXCLUDE-td) = 0 &THEN
2030 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION td Procedure
2031 FUNCTION td RETURNS CHARACTER
2032 ( INPUT content AS CHAR, INPUT attributes AS CHAR ) :
2033 /*------------------------------------------------------------------------------
2034 Purpose: Shorthand for specific html tag
2035 ------------------------------------------------------------------------------*/
2037 RETURN " " + tag("td", content, attributes ) + "~n".
2039 END FUNCTION.
2041 /* _UIB-CODE-BLOCK-END */
2042 &ANALYZE-RESUME
2044 &ENDIF
2046 &IF DEFINED(EXCLUDE-td-amount) = 0 &THEN
2048 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION td-amount Procedure
2049 FUNCTION td-amount RETURNS CHARACTER
2050 ( INPUT amount AS DECIMAL, INPUT fmt AS CHAR, INPUT class AS CHAR ) :
2051 /*------------------------------------------------------------------------------
2052 Purpose: Return an appropriate attribute string for negative amounts.
2053 ------------------------------------------------------------------------------*/
2054 DEF VAR attributes AS CHAR NO-UNDO INITIAL ''.
2056 attributes = "class='" + class + "'".
2058 IF amount < 0.0 THEN attributes = attributes + ' style="color:red"'.
2060 RETURN td( TRIM(STRING(amount,fmt)), attributes ).
2062 END FUNCTION.
2064 /* _UIB-CODE-BLOCK-END */
2065 &ANALYZE-RESUME
2067 &ENDIF
2069 &IF DEFINED(EXCLUDE-test-floor-space) = 0 &THEN
2071 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION test-floor-space Procedure
2072 FUNCTION test-floor-space RETURNS CHARACTER
2073 ( INPUT type AS CHAR, INPUT area AS DECIMAL ) :
2074 /*------------------------------------------------------------------------------
2075 Purpose: Decide if this is actual floor space
2076 ------------------------------------------------------------------------------*/
2077 DEF BUFFER LocAreaType FOR AreaType.
2079 IF area = ? THEN RETURN "No".
2080 FIND LocAreaType WHERE LocAreaType.AreaType = type NO-LOCK NO-ERROR.
2081 IF AVAILABLE(LocAreaType) THEN DO:
2082 IF LocAreaType.IsCarPark THEN RETURN "Park".
2083 IF LocAreaType.IsFloorArea THEN RETURN "Yes".
2084 RETURN "No".
2085 END.
2087 CASE type:
2088 WHEN "C" THEN RETURN "Park".
2089 WHEN "O" THEN RETURN "Yes".
2090 WHEN "R" THEN RETURN "Yes".
2091 WHEN "W" THEN RETURN "Yes".
2092 WHEN "N" THEN RETURN "No".
2093 /* OTHERWISE
2094 IF area > 10 OR (area <> INTEGER(area)) THEN RETURN "Yes". */
2095 END CASE.
2097 RETURN "No".
2099 END FUNCTION.
2101 /* _UIB-CODE-BLOCK-END */
2102 &ANALYZE-RESUME
2104 &ENDIF
2106 &IF DEFINED(EXCLUDE-tr) = 0 &THEN
2108 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION tr Procedure
2109 FUNCTION tr RETURNS CHARACTER
2110 ( INPUT content AS CHAR, INPUT attributes AS CHAR ) :
2111 /*------------------------------------------------------------------------------
2112 Purpose: Shorthand for specific html tag
2113 ------------------------------------------------------------------------------*/
2115 RETURN " " + tag("tr", content, attributes ) + "~n".
2117 END FUNCTION.
2119 /* _UIB-CODE-BLOCK-END */
2120 &ANALYZE-RESUME
2122 &ENDIF