Add blank column, rename column.
[capital-apms-progress.git] / process / report / schdtgg2.p
blobc26633c91b376f90cb196a3d66c28cb3d8ad8fd0
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(1) + empty(5)
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("PCA Rate", '')
1388 + td("Comments", 'colspan="5"')
1389 , ''), 'class="colhead"').
1390 END.
1391 mth-actual-t = 0.0 .
1392 mth-budget-t = 0.0 .
1393 ytd-actual-t = 0.0 .
1394 ytd-budget-t = 0.0 .
1395 fyr-budget-t = 0.0 .
1396 fyr-frcast-t = 0.0 .
1397 last-section = this-section.
1398 END.
1399 do-5a-building-account( month-from, month-to, mth-actual, mth-budget,
1400 ytd-actual, ytd-budget, fyr-budget, fyr-frcast ).
1402 IF mth-actual <> 0.0 OR mth-budget <> 0.0
1403 OR ytd-actual <> 0.0 OR ytd-budget <> 0.0
1404 OR fyr-frcast <> 0.0 OR ytd-budget <> 0.0
1405 THEN DO:
1407 mth-actual-t = mth-actual-t + mth-actual.
1408 mth-budget-t = mth-budget-t + mth-budget.
1409 ytd-actual-t = ytd-actual-t + ytd-actual.
1410 ytd-budget-t = ytd-budget-t + ytd-budget.
1411 fyr-budget-t = fyr-budget-t + fyr-budget.
1412 fyr-frcast-t = fyr-frcast-t + fyr-frcast.
1413 END.
1415 END.
1417 IF last-section = ? THEN RETURN ''.
1419 report = report + tr(
1420 td(last-section, 'colspan="2"')
1421 + td(TRIM(STRING(mth-actual-t,money-format)), 'class="money"')
1422 + td(TRIM(STRING(mth-budget-t,money-format)), 'class="money"')
1423 + td(TRIM(STRING(ytd-actual-t,money-format)), 'class="money"')
1424 + td(TRIM(STRING(ytd-budget-t,money-format)), 'class="money"')
1425 + td(TRIM(STRING(fyr-budget-t,money-format)), 'class="money"')
1426 + td(TRIM(STRING(fyr-frcast-t,money-format)), 'class="money"')
1427 + td(TRIM(STRING( (fyr-frcast-t / total-area), money-format)), 'class="money"')
1428 + td(TRIM(STRING(((fyr-frcast-t - fyr-budget-t) / fyr-budget-t) * 100,pcnt-format)), 'class="decimal"')
1429 + empty(1) + empty(5)
1430 , '').
1432 mth-actual-g = mth-actual-g + mth-actual-t.
1433 mth-budget-g = mth-budget-g + mth-budget-t.
1434 ytd-actual-g = ytd-actual-g + ytd-actual-t.
1435 ytd-budget-g = ytd-budget-g + ytd-budget-t.
1436 fyr-budget-g = fyr-budget-g + fyr-budget-t.
1437 fyr-frcast-g = fyr-frcast-g + fyr-frcast-t.
1439 report = report + tbody( tr(
1440 td("Property Expense Totals", 'colspan="2"')
1441 + td(TRIM(STRING(mth-actual-g,money-format)), 'class="money"')
1442 + td(TRIM(STRING(mth-budget-g,money-format)), 'class="money"')
1443 + td(TRIM(STRING(ytd-actual-g,money-format)), 'class="money"')
1444 + td(TRIM(STRING(ytd-budget-g,money-format)), 'class="money"')
1445 + td(TRIM(STRING(fyr-budget-g,money-format)), 'class="money"')
1446 + td(TRIM(STRING(fyr-frcast-g,money-format)), 'class="money"')
1447 + td(TRIM(STRING( (fyr-frcast-g / total-area), money-format)), 'class="money"')
1448 + td(TRIM(STRING(((fyr-frcast-g - fyr-budget-g) / fyr-budget-g) * 100,pcnt-format)), 'class="decimal"')
1449 + empty(1) + empty(5)
1450 , ''), 'class="totals"').
1452 RETURN report.
1454 END FUNCTION.
1456 /* _UIB-CODE-BLOCK-END */
1457 &ANALYZE-RESUME
1459 &ENDIF
1461 &IF DEFINED(EXCLUDE-do-5a-building-account) = 0 &THEN
1463 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION do-5a-building-account Procedure
1464 FUNCTION do-5a-building-account RETURNS CHARACTER
1465 ( INPUT month-from AS INT, INPUT month-to AS INT,
1466 OUTPUT mth-actual AS DECIMAL, OUTPUT mth-budget AS DECIMAL,
1467 OUTPUT ytd-actual AS DECIMAL, OUTPUT ytd-budget AS DECIMAL,
1468 OUTPUT fyr-budget AS DECIMAL, OUTPUT fyr-frcast AS DECIMAL
1470 /*------------------------------------------------------------------------------
1471 Purpose:
1472 Notes:
1473 ------------------------------------------------------------------------------*/
1474 DEF VAR rrow AS CHAR NO-UNDO INITIAL ''.
1475 DEF VAR acctgroup AS CHAR NO-UNDO.
1477 mth-actual = 0.0 . mth-budget = 0.0 .
1478 ytd-actual = 0.0 . ytd-budget = 0.0 .
1479 fyr-budget = 0.0 . fyr-frcast = 0.0 .
1480 FOR EACH AccountBalance NO-LOCK WHERE
1481 AccountBalance.EntityType = 'P' AND
1482 AccountBalance.EntityCode = Property.PropertyCode AND
1483 AccountBalance.AccountCode = ChartOfAccount.AccountCode AND
1484 AccountBalance.MonthCode >= month-from AND
1485 AccountBalance.MonthCode <= Month.MonthCode:
1487 IF AccountBalance.MonthCode = month-to THEN DO:
1488 mth-actual = AccountBalance.Balance.
1489 mth-budget = AccountBalance.Budget.
1490 END.
1492 IF AccountBalance.MonthCode <= month-to THEN DO:
1493 ytd-actual = ytd-actual + AccountBalance.Balance.
1494 ytd-budget = ytd-budget + AccountBalance.Budget.
1495 fyr-frcast = fyr-frcast + AccountBalance.Balance.
1496 END.
1497 ELSE DO:
1498 fyr-frcast = fyr-frcast + AccountBalance.Budget.
1499 END.
1501 fyr-budget = fyr-budget + AccountBalance.Budget.
1503 END.
1505 END FUNCTION.
1507 /* _UIB-CODE-BLOCK-END */
1508 &ANALYZE-RESUME
1510 &ENDIF
1512 &IF DEFINED(EXCLUDE-do-6-building-income) = 0 &THEN
1514 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION do-6-building-income Procedure
1515 FUNCTION do-6-building-income RETURNS CHARACTER
1516 ( /* parameter-definitions */ ) :
1517 /*------------------------------------------------------------------------------
1518 Purpose:
1519 Notes:
1520 ------------------------------------------------------------------------------*/
1521 IF building-income-report = ? THEN DO:
1522 DEF VAR report AS CHAR NO-UNDO.
1523 DEF VAR rrows AS CHAR NO-UNDO INITIAL ''.
1524 DEF VAR rrow AS CHAR NO-UNDO.
1525 DEF VAR found AS LOGICAL NO-UNDO INITIAL No.
1527 DEF VAR month-from AS INT NO-UNDO.
1528 DEF VAR month-to AS INT NO-UNDO.
1529 DEF VAR fin-year AS INT NO-UNDO.
1530 DEF VAR totals AS DECIMAL EXTENT 6 NO-UNDO INITIAL 0.0 .
1532 DEF VAR mth-actual AS DECIMAL NO-UNDO INITIAL 0.0 .
1533 DEF VAR mth-budget AS DECIMAL NO-UNDO INITIAL 0.0 .
1534 DEF VAR ytd-actual AS DECIMAL NO-UNDO INITIAL 0.0 .
1535 DEF VAR ytd-budget AS DECIMAL NO-UNDO INITIAL 0.0 .
1536 DEF VAR fyr-budget AS DECIMAL NO-UNDO INITIAL 0.0 .
1537 DEF VAR fyr-frcast AS DECIMAL NO-UNDO INITIAL 0.0 .
1539 DEF VAR mth-actual-t AS DECIMAL NO-UNDO INITIAL 0.0 .
1540 DEF VAR mth-budget-t AS DECIMAL NO-UNDO INITIAL 0.0 .
1541 DEF VAR ytd-actual-t AS DECIMAL NO-UNDO INITIAL 0.0 .
1542 DEF VAR ytd-budget-t AS DECIMAL NO-UNDO INITIAL 0.0 .
1543 DEF VAR fyr-budget-t AS DECIMAL NO-UNDO INITIAL 0.0 .
1544 DEF VAR fyr-frcast-t AS DECIMAL NO-UNDO INITIAL 0.0 .
1546 DEF VAR mth-actual-g AS DECIMAL NO-UNDO INITIAL 0.0 .
1547 DEF VAR mth-budget-g AS DECIMAL NO-UNDO INITIAL 0.0 .
1548 DEF VAR ytd-actual-g AS DECIMAL NO-UNDO INITIAL 0.0 .
1549 DEF VAR ytd-budget-g AS DECIMAL NO-UNDO INITIAL 0.0 .
1550 DEF VAR fyr-budget-g AS DECIMAL NO-UNDO INITIAL 0.0 .
1551 DEF VAR fyr-frcast-g AS DECIMAL NO-UNDO INITIAL 0.0 .
1553 FIND LAST Month WHERE Month.StartDate < as-at-date NO-LOCK.
1554 month-to = Month.MonthCode.
1555 fin-year = Month.FinancialYearCode.
1556 FIND FIRST Month WHERE Month.FinancialYearCode = fin-year NO-LOCK.
1557 month-from = Month.MonthCode.
1558 FIND LAST Month WHERE Month.FinancialYearCode = fin-year NO-LOCK.
1560 report =
1561 tr( empty(15), 'class="groupbreak"') +
1562 tbody( tr(
1563 td("Account", 'colspan="2"')
1564 + td("Mth Actual", '')
1565 + td("Mth Budget", '')
1566 + td("YTD Actual", '')
1567 + td("YTD Budget", '')
1568 + td("FY Budget", '')
1569 + td("FY Forecast", '')
1570 + td("$PSM", '')
1571 + td("Variance", '')
1572 + td("Notes", 'colspan="6"')
1573 , ''), 'class="colhead"').
1575 /* A pass through the rent accounts, for the financial report. We don't show these */
1576 FOR EACH ChartOfAccount NO-LOCK WHERE
1577 ( ChartOfAccount.AccountGroupCode = 'RENT' ) OR
1578 ( ChartOfAccount.AccountGroupCode = 'OGREC' ) OR
1579 ( ChartOfAccount.AccountGroupCode = 'OOI'):
1580 rrow = do-6a-building-account( month-from, month-to, mth-actual, mth-budget,
1581 ytd-actual, ytd-budget, fyr-budget, fyr-frcast ).
1582 END.
1584 FOR EACH ChartOfAccount NO-LOCK WHERE
1585 ( ChartOfAccount.AccountGroupCode = 'PROPEX' ) OR
1586 ( ChartOfAccount.AccountGroupCode = 'TENEX' ) OR
1587 ( ChartOfAccount.AccountGroupCode = 'LEASNG'):
1589 rrow = do-6a-building-account( month-from, month-to, mth-actual, mth-budget,
1590 ytd-actual, ytd-budget, fyr-budget, fyr-frcast ).
1592 IF mth-actual <> 0.0 OR mth-budget <> 0.0
1593 OR ytd-actual <> 0.0 OR ytd-budget <> 0.0
1594 OR fyr-frcast <> 0.0 OR ytd-budget <> 0.0
1595 THEN DO:
1596 found = Yes.
1597 rrows = rrows + rrow.
1599 mth-actual-t = mth-actual-t + mth-actual.
1600 mth-budget-t = mth-budget-t + mth-budget.
1601 ytd-actual-t = ytd-actual-t + ytd-actual.
1602 ytd-budget-t = ytd-budget-t + ytd-budget.
1603 fyr-budget-t = fyr-budget-t + fyr-budget.
1604 fyr-frcast-t = fyr-frcast-t + fyr-frcast.
1605 END.
1607 END.
1609 IF rrows <> '' THEN DO:
1610 mth-actual-g = mth-actual-g + mth-actual-t.
1611 mth-budget-g = mth-budget-g + mth-budget-t.
1612 ytd-actual-g = ytd-actual-g + ytd-actual-t.
1613 ytd-budget-g = ytd-budget-g + ytd-budget-t.
1614 fyr-budget-g = fyr-budget-g + fyr-budget-t.
1615 fyr-frcast-g = fyr-frcast-g + fyr-frcast-t.
1617 report = report + tbody( rrows, '' ).
1619 report = report + tbody( tr(
1620 td("General Expense Totals", 'colspan="2"')
1621 + td(TRIM(STRING(mth-actual-t,money-format)), 'class="money"')
1622 + td(TRIM(STRING(mth-budget-t,money-format)), 'class="money"')
1623 + td(TRIM(STRING(ytd-actual-t,money-format)), 'class="money"')
1624 + td(TRIM(STRING(ytd-budget-t,money-format)), 'class="money"')
1625 + td(TRIM(STRING(fyr-budget-t,money-format)), 'class="money"')
1626 + td(TRIM(STRING(fyr-frcast-t,money-format)), 'class="money"')
1627 + td(TRIM(STRING( (fyr-frcast-t / total-area), money-format)), 'class="money"')
1628 + td(TRIM(STRING(((fyr-frcast-t - fyr-budget-t) / fyr-budget-t) * 100,pcnt-format)), 'class="decimal"')
1629 + empty(6)
1630 , ''), 'class="totals"').
1632 mth-actual-t = 0.0 .
1633 mth-budget-t = 0.0 .
1634 ytd-actual-t = 0.0 .
1635 ytd-budget-t = 0.0 .
1636 fyr-budget-t = 0.0 .
1637 fyr-frcast-t = 0.0 .
1638 rrows = ''.
1639 END.
1641 FOR EACH ChartOfAccount NO-LOCK WHERE
1642 ( ChartOfAccount.AccountGroupCode = 'OWNEX' ):
1644 rrow = do-6a-building-account( month-from, month-to, mth-actual, mth-budget,
1645 ytd-actual, ytd-budget, fyr-budget, fyr-frcast ).
1647 IF mth-actual <> 0.0 OR mth-budget <> 0.0
1648 OR ytd-actual <> 0.0 OR ytd-budget <> 0.0
1649 OR fyr-frcast <> 0.0 OR ytd-budget <> 0.0
1650 THEN DO:
1651 found = Yes.
1652 rrows = rrows + rrow.
1654 mth-actual-t = mth-actual-t + mth-actual.
1655 mth-budget-t = mth-budget-t + mth-budget.
1656 ytd-actual-t = ytd-actual-t + ytd-actual.
1657 ytd-budget-t = ytd-budget-t + ytd-budget.
1658 fyr-budget-t = fyr-budget-t + fyr-budget.
1659 fyr-frcast-t = fyr-frcast-t + fyr-frcast.
1660 END.
1662 END.
1664 IF NOT found THEN RETURN ''.
1666 IF rrows <> '' THEN DO:
1667 mth-actual-g = mth-actual-g + mth-actual-t.
1668 mth-budget-g = mth-budget-g + mth-budget-t.
1669 ytd-actual-g = ytd-actual-g + ytd-actual-t.
1670 ytd-budget-g = ytd-budget-g + ytd-budget-t.
1671 fyr-budget-g = fyr-budget-g + fyr-budget-t.
1672 fyr-frcast-g = fyr-frcast-g + fyr-frcast-t.
1675 report = report + tbody( rrows, '' ).
1677 report = report + tbody( tr(
1678 td("Owners Expense Totals", 'colspan="2"')
1679 + td(TRIM(STRING(mth-actual-t,money-format)), 'class="money"')
1680 + td(TRIM(STRING(mth-budget-t,money-format)), 'class="money"')
1681 + td(TRIM(STRING(ytd-actual-t,money-format)), 'class="money"')
1682 + td(TRIM(STRING(ytd-budget-t,money-format)), 'class="money"')
1683 + td(TRIM(STRING(fyr-budget-t,money-format)), 'class="money"')
1684 + td(TRIM(STRING(fyr-frcast-t,money-format)), 'class="money"')
1685 + td(TRIM(STRING( (fyr-frcast-t / total-area), money-format)), 'class="money"')
1686 + td(TRIM(STRING(((fyr-frcast-t - fyr-budget-t) / fyr-budget-t) * 100,pcnt-format)), 'class="decimal"')
1687 + empty(6)
1688 , ''), 'class="totals"').
1689 END.
1691 report = report + tbody( tr(
1692 td("Building Expense Totals", 'colspan="2"')
1693 + td(TRIM(STRING(mth-actual-g,money-format)), 'class="money"')
1694 + td(TRIM(STRING(mth-budget-g,money-format)), 'class="money"')
1695 + td(TRIM(STRING(ytd-actual-g,money-format)), 'class="money"')
1696 + td(TRIM(STRING(ytd-budget-g,money-format)), 'class="money"')
1697 + td(TRIM(STRING(fyr-budget-g,money-format)), 'class="money"')
1698 + td(TRIM(STRING(fyr-frcast-g,money-format)), 'class="money"')
1699 + td(TRIM(STRING( (fyr-frcast-g / total-area), money-format)), 'class="money"')
1700 + td(TRIM(STRING(((fyr-frcast-g - fyr-budget-g) / fyr-budget-g) * 100,pcnt-format)), 'class="decimal"')
1701 + empty(6)
1702 , ''), 'class="totals"').
1704 building-income-report = report.
1705 END.
1707 RETURN building-income-report.
1709 END FUNCTION.
1711 /* _UIB-CODE-BLOCK-END */
1712 &ANALYZE-RESUME
1714 &ENDIF
1716 &IF DEFINED(EXCLUDE-do-6a-building-account) = 0 &THEN
1718 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION do-6a-building-account Procedure
1719 FUNCTION do-6a-building-account RETURNS CHARACTER
1720 ( INPUT month-from AS INT, INPUT month-to AS INT,
1721 OUTPUT mth-actual AS DECIMAL, OUTPUT mth-budget AS DECIMAL,
1722 OUTPUT ytd-actual AS DECIMAL, OUTPUT ytd-budget AS DECIMAL,
1723 OUTPUT fyr-budget AS DECIMAL, OUTPUT fyr-frcast AS DECIMAL
1725 /*------------------------------------------------------------------------------
1726 Purpose:
1727 Notes:
1728 ------------------------------------------------------------------------------*/
1729 DEF VAR rrow AS CHAR NO-UNDO INITIAL ''.
1730 DEF VAR acctgroup AS CHAR NO-UNDO.
1732 mth-actual = 0.0 . mth-budget = 0.0 .
1733 ytd-actual = 0.0 . ytd-budget = 0.0 .
1734 fyr-budget = 0.0 . fyr-frcast = 0.0 .
1735 FOR EACH AccountBalance NO-LOCK WHERE
1736 AccountBalance.EntityType = 'P' AND
1737 AccountBalance.EntityCode = Property.PropertyCode AND
1738 AccountBalance.AccountCode = ChartOfAccount.AccountCode AND
1739 AccountBalance.MonthCode >= month-from AND
1740 AccountBalance.MonthCode <= Month.MonthCode:
1742 IF AccountBalance.MonthCode = month-to THEN DO:
1743 mth-actual = AccountBalance.Balance.
1744 mth-budget = AccountBalance.Budget.
1745 END.
1747 IF AccountBalance.MonthCode <= month-to THEN DO:
1748 ytd-actual = ytd-actual + AccountBalance.Balance.
1749 ytd-budget = ytd-budget + AccountBalance.Budget.
1750 fyr-frcast = fyr-frcast + AccountBalance.Balance.
1751 END.
1752 ELSE DO:
1753 fyr-frcast = fyr-frcast + AccountBalance.Budget.
1754 END.
1756 fyr-budget = fyr-budget + AccountBalance.Budget.
1758 END.
1760 IF mth-actual <> 0.0 OR mth-budget <> 0.0
1761 OR ytd-actual <> 0.0 OR ytd-budget <> 0.0
1762 OR fyr-frcast <> 0.0 OR ytd-budget <> 0.0
1763 THEN DO:
1764 rrow = tr(
1765 td(ChartOfAccount.Name, 'colspan="2"')
1766 + td(TRIM(STRING(mth-actual,money-format)), 'class="money"')
1767 + td(TRIM(STRING(mth-budget,money-format)), 'class="money"')
1768 + td(TRIM(STRING(ytd-actual,money-format)), 'class="money"')
1769 + td(TRIM(STRING(ytd-budget,money-format)), 'class="money"')
1770 + td(TRIM(STRING(fyr-budget,money-format)), 'class="money"')
1771 + td(TRIM(STRING(fyr-frcast,money-format)), 'class="money"')
1772 + td(TRIM(STRING( (fyr-frcast / total-area), money-format)), 'class="money"')
1773 + td(TRIM(STRING(((fyr-frcast - fyr-budget) / fyr-budget) * 100,pcnt-format)), 'class="decimal"')
1774 + empty(6), '').
1776 acctgroup = ChartOfAccount.AccountGroupCode.
1777 FIND FIRST account-total WHERE ttype = acctgroup NO-ERROR.
1778 IF NOT AVAILABLE(account-total) THEN DO:
1779 CREATE account-total.
1780 ttype = acctgroup.
1781 END.
1782 account-total.mth-actual = account-total.mth-actual - mth-actual.
1783 account-total.mth-budget = account-total.mth-budget - mth-budget.
1784 account-total.ytd-actual = account-total.ytd-actual - ytd-actual.
1785 account-total.ytd-budget = account-total.ytd-budget - ytd-budget.
1786 account-total.fyr-frcast = account-total.fyr-frcast - fyr-frcast.
1787 account-total.fyr-budget = account-total.fyr-budget - fyr-budget.
1788 END.
1790 RETURN rrow.
1792 END FUNCTION.
1794 /* _UIB-CODE-BLOCK-END */
1795 &ANALYZE-RESUME
1797 &ENDIF
1799 &IF DEFINED(EXCLUDE-empty) = 0 &THEN
1801 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION empty Procedure
1802 FUNCTION empty RETURNS CHARACTER
1803 ( INPUT num AS INT ) :
1804 /*------------------------------------------------------------------------------
1805 Purpose: Return some empty cells
1806 ------------------------------------------------------------------------------*/
1808 RETURN td("", 'colspan="' + TRIM(STRING(num,">>9")) + '" class="empty"').
1810 END FUNCTION.
1812 /* _UIB-CODE-BLOCK-END */
1813 &ANALYZE-RESUME
1815 &ENDIF
1817 &IF DEFINED(EXCLUDE-financial-report-row) = 0 &THEN
1819 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION financial-report-row Procedure
1820 FUNCTION financial-report-row RETURNS CHARACTER
1821 ( INPUT in-ttype AS CHAR, INPUT line-desc AS CHAR ) :
1822 /*------------------------------------------------------------------------------
1823 Purpose:
1824 Notes:
1825 ------------------------------------------------------------------------------*/
1826 DEF VAR answer AS CHAR NO-UNDO INITIAL ''.
1827 DEF VAR i AS INT NO-UNDO.
1828 DEF VAR style AS CHAR NO-UNDO INITIAL 'decimal'.
1829 DEFINE BUFFER net-income-buffer FOR account-total.
1831 FIND FIRST account-total WHERE ttype = in-ttype NO-ERROR.
1832 IF NOT AVAILABLE(account-total) THEN DO:
1833 DO i = 1 TO 11:
1834 answer = answer + td('','').
1835 END.
1836 answer = tr( td(line-desc, 'colspan="2"') + answer, '' ).
1837 RETURN answer.
1838 END.
1840 IF in-ttype = 'NETINC' THEN DO:
1841 net-income = account-total.fyr-budget.
1842 net-frcast = account-total.fyr-frcast.
1843 style = 'moneytotal'.
1844 END.
1845 answer = tr( td(line-desc, 'colspan="2"')
1846 + td-amount(account-total.fyr-budget, money-format, style)
1847 + td-amount(account-total.fyr-budget / total-area, psm-format, style)
1849 + td-amount(account-total.fyr-frcast, money-format, style)
1850 + td-amount(account-total.fyr-frcast / total-area, psm-format, style)
1851 */ + td('','') + td('','')
1852 + td-amount(((account-total.fyr-frcast - account-total.fyr-budget) / account-total.fyr-budget) * 100, pcnt-format, style)
1853 + td-amount(account-total.mth-actual, money-format, style)
1854 + td-amount(account-total.mth-budget, money-format, style)
1855 + td-amount(((account-total.mth-budget - account-total.mth-actual) / account-total.mth-actual) * 100, pcnt-format, style)
1856 + td-amount(account-total.ytd-actual, money-format, style)
1857 + td-amount(account-total.ytd-budget, money-format, style)
1858 + td-amount(((account-total.ytd-budget - account-total.ytd-actual) / account-total.ytd-actual) * 100, pcnt-format, style)
1859 , '').
1861 FIND FIRST net-income-buffer WHERE net-income-buffer.ttype = 'NETINC' NO-ERROR.
1862 IF NOT AVAILABLE(net-income-buffer) THEN DO:
1863 CREATE net-income-buffer.
1864 net-income-buffer.ttype = 'NETINC'.
1865 END.
1866 net-income-buffer.mth-actual = net-income-buffer.mth-actual + account-total.mth-actual.
1867 net-income-buffer.mth-budget = net-income-buffer.mth-budget + account-total.mth-budget.
1868 net-income-buffer.ytd-actual = net-income-buffer.ytd-actual + account-total.ytd-actual.
1869 net-income-buffer.ytd-budget = net-income-buffer.ytd-budget + account-total.ytd-budget.
1870 net-income-buffer.fyr-budget = net-income-buffer.fyr-budget + account-total.fyr-budget.
1871 net-income-buffer.fyr-frcast = net-income-buffer.fyr-frcast + account-total.fyr-frcast.
1873 RETURN answer.
1875 END FUNCTION.
1877 /* _UIB-CODE-BLOCK-END */
1878 &ANALYZE-RESUME
1880 &ENDIF
1882 &IF DEFINED(EXCLUDE-get-acctgrp-amnt) = 0 &THEN
1884 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION get-acctgrp-amnt Procedure
1885 FUNCTION get-acctgrp-amnt RETURNS DECIMAL
1886 ( INPUT actual AS LOGICAL, INPUT acctgrp AS CHAR ) :
1887 /*------------------------------------------------------------------------------
1888 Purpose: Get the sum of the accounts in a particular entity
1889 ------------------------------------------------------------------------------*/
1890 IF NOT AVAILABLE(Property) THEN RETURN 0.0 .
1892 DEF VAR sum AS DECIMAL NO-UNDO INITIAL 0.0 .
1894 FOR EACH ChartOfAccount WHERE ChartOfAccount.AccountGroupCode = acctgrp NO-LOCK:
1895 FOR EACH AccountSummary WHERE EntityType = 'P' AND EntityCode = PropertyCode
1896 AND AccountSummary.AccountCode = ChartOfAccount.AccountCode NO-LOCK:
1897 sum = sum + (IF actual THEN AccountSummary.Balance ELSE AccountSummary.Budget).
1898 END.
1899 END.
1901 RETURN sum.
1903 END FUNCTION.
1905 /* _UIB-CODE-BLOCK-END */
1906 &ANALYZE-RESUME
1908 &ENDIF
1910 &IF DEFINED(EXCLUDE-get-prop-og) = 0 &THEN
1912 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION get-prop-og Procedure
1913 FUNCTION get-prop-og RETURNS DECIMAL
1914 ( INPUT doit AS LOGICAL, INPUT pc AS INTEGER, INPUT ac AS DECIMAL ) :
1915 /*------------------------------------------------------------------------------
1916 Purpose:
1917 Notes:
1918 ------------------------------------------------------------------------------*/
1919 IF doit <> Yes THEN RETURN 1.0 .
1920 FIND PropertyOutgoing WHERE PropertyOutgoing.PropertyCode = pc
1921 AND PropertyOutgoing.AccountCode = ac NO-LOCK NO-ERROR.
1922 IF AVAILABLE(PropertyOutgoing) THEN
1923 RETURN PropertyOutgoing.BudgetAmount / 100 .
1925 RETURN 0.00 .
1927 END FUNCTION.
1929 /* _UIB-CODE-BLOCK-END */
1930 &ANALYZE-RESUME
1932 &ENDIF
1934 &IF DEFINED(EXCLUDE-lease-years-remaining) = 0 &THEN
1936 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION lease-years-remaining Procedure
1937 FUNCTION lease-years-remaining RETURNS DECIMAL
1938 ( /* parameter-definitions */ ) :
1940 /*------------------------------------------------------------------------------
1941 Purpose: How much time is remaining on this lease
1942 ------------------------------------------------------------------------------*/
1943 FIND TenancyLease OF RentalSpace WHERE TenancyLease.LeaseStatus <> "PAST" NO-LOCK NO-ERROR.
1944 IF NOT AVAILABLE(TenancyLease) THEN RETURN 0.0 .
1946 DEF VAR remaining AS DECIMAL.
1947 remaining = TenancyLease.LeaseEndDate - as-at-date.
1948 IF remaining = ? OR remaining < 30.4375 THEN DO:
1949 remaining = 30.4375.
1950 END.
1951 remaining = remaining / 365.25.
1953 RETURN remaining.
1955 END FUNCTION.
1957 /* _UIB-CODE-BLOCK-END */
1958 &ANALYZE-RESUME
1960 &ENDIF
1962 &IF DEFINED(EXCLUDE-show-one-review) = 0 &THEN
1964 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION show-one-review Procedure
1965 FUNCTION show-one-review RETURNS CHARACTER
1966 ( /* no parameter-definitions */ ) :
1967 /*------------------------------------------------------------------------------
1968 Purpose: Return a string containing one review.
1969 Notes:
1970 ------------------------------------------------------------------------------*/
1971 DEF VAR cells AS CHAR NO-UNDO INITIAL "".
1973 IF NOT AVAILABLE(tenant-reviews) THEN DO:
1974 cells = EMPTY(4).
1975 END.
1976 ELSE DO:
1977 cells = td( tenant-reviews.TenantName, '' )
1978 + td( STRING(tenant-reviews.DateDue, '99/99/9999'), 'date' )
1979 + td( tenant-reviews.ReviewType, '' )
1980 + td( tenant-reviews.EstimateBasis, '' ).
1981 FIND NEXT tenant-reviews.
1982 END.
1984 RETURN cells.
1986 END FUNCTION.
1988 /* _UIB-CODE-BLOCK-END */
1989 &ANALYZE-RESUME
1991 &ENDIF
1993 &IF DEFINED(EXCLUDE-tbl) = 0 &THEN
1995 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION tbl Procedure
1996 FUNCTION tbl RETURNS CHARACTER
1997 ( INPUT content AS CHAR, INPUT attributes AS CHAR ) :
1998 /*------------------------------------------------------------------------------
1999 Purpose: Shorthand for specific html tag, 'table' is a reserved word.
2000 ------------------------------------------------------------------------------*/
2002 RETURN tag("table", content, attributes ).
2004 END FUNCTION.
2006 /* _UIB-CODE-BLOCK-END */
2007 &ANALYZE-RESUME
2009 &ENDIF
2011 &IF DEFINED(EXCLUDE-tbody) = 0 &THEN
2013 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION tbody Procedure
2014 FUNCTION tbody RETURNS CHARACTER
2015 ( INPUT content AS CHAR, INPUT attributes AS CHAR ) :
2016 /*------------------------------------------------------------------------------
2017 Purpose:
2018 ------------------------------------------------------------------------------*/
2020 RETURN tag("tbody", content, attributes) + "~n".
2022 END FUNCTION.
2024 /* _UIB-CODE-BLOCK-END */
2025 &ANALYZE-RESUME
2027 &ENDIF
2029 &IF DEFINED(EXCLUDE-td) = 0 &THEN
2031 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION td Procedure
2032 FUNCTION td RETURNS CHARACTER
2033 ( INPUT content AS CHAR, INPUT attributes AS CHAR ) :
2034 /*------------------------------------------------------------------------------
2035 Purpose: Shorthand for specific html tag
2036 ------------------------------------------------------------------------------*/
2038 RETURN " " + tag("td", content, attributes ) + "~n".
2040 END FUNCTION.
2042 /* _UIB-CODE-BLOCK-END */
2043 &ANALYZE-RESUME
2045 &ENDIF
2047 &IF DEFINED(EXCLUDE-td-amount) = 0 &THEN
2049 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION td-amount Procedure
2050 FUNCTION td-amount RETURNS CHARACTER
2051 ( INPUT amount AS DECIMAL, INPUT fmt AS CHAR, INPUT class AS CHAR ) :
2052 /*------------------------------------------------------------------------------
2053 Purpose: Return an appropriate attribute string for negative amounts.
2054 ------------------------------------------------------------------------------*/
2055 DEF VAR attributes AS CHAR NO-UNDO INITIAL ''.
2057 attributes = "class='" + class + "'".
2059 IF amount < 0.0 THEN attributes = attributes + ' style="color:red"'.
2061 RETURN td( TRIM(STRING(amount,fmt)), attributes ).
2063 END FUNCTION.
2065 /* _UIB-CODE-BLOCK-END */
2066 &ANALYZE-RESUME
2068 &ENDIF
2070 &IF DEFINED(EXCLUDE-test-floor-space) = 0 &THEN
2072 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION test-floor-space Procedure
2073 FUNCTION test-floor-space RETURNS CHARACTER
2074 ( INPUT type AS CHAR, INPUT area AS DECIMAL ) :
2075 /*------------------------------------------------------------------------------
2076 Purpose: Decide if this is actual floor space
2077 ------------------------------------------------------------------------------*/
2078 DEF BUFFER LocAreaType FOR AreaType.
2080 IF area = ? THEN RETURN "No".
2081 FIND LocAreaType WHERE LocAreaType.AreaType = type NO-LOCK NO-ERROR.
2082 IF AVAILABLE(LocAreaType) THEN DO:
2083 IF LocAreaType.IsCarPark THEN RETURN "Park".
2084 IF LocAreaType.IsFloorArea THEN RETURN "Yes".
2085 RETURN "No".
2086 END.
2088 CASE type:
2089 WHEN "C" THEN RETURN "Park".
2090 WHEN "O" THEN RETURN "Yes".
2091 WHEN "R" THEN RETURN "Yes".
2092 WHEN "W" THEN RETURN "Yes".
2093 WHEN "N" THEN RETURN "No".
2094 /* OTHERWISE
2095 IF area > 10 OR (area <> INTEGER(area)) THEN RETURN "Yes". */
2096 END CASE.
2098 RETURN "No".
2100 END FUNCTION.
2102 /* _UIB-CODE-BLOCK-END */
2103 &ANALYZE-RESUME
2105 &ENDIF
2107 &IF DEFINED(EXCLUDE-tr) = 0 &THEN
2109 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION tr Procedure
2110 FUNCTION tr RETURNS CHARACTER
2111 ( INPUT content AS CHAR, INPUT attributes AS CHAR ) :
2112 /*------------------------------------------------------------------------------
2113 Purpose: Shorthand for specific html tag
2114 ------------------------------------------------------------------------------*/
2116 RETURN " " + tag("tr", content, attributes ) + "~n".
2118 END FUNCTION.
2120 /* _UIB-CODE-BLOCK-END */
2121 &ANALYZE-RESUME
2123 &ENDIF