Added capital works blank section. Synced calling screen.
[capital-apms-progress.git] / process / one-off / cr-split.p
blobcf3e4df62a6aad2fda332ef01412a41de74a0cf5
1 DEF VAR n AS INTEGER INITIAL 0 EXTENT 26 NO-UNDO.
2 DEF VAR sundry-creditors AS DECIMAL NO-UNDO INITIAL 6810.00.
3 DEF VAR ltr AS INTEGER NO-UNDO.
4 DEF VAR m1 AS INTEGER NO-UNDO INITIAL 111.
5 DEF VAR m2 AS INTEGER NO-UNDO INITIAL 111.
6 DEF VAR offset AS INTEGER NO-UNDO.
7 offset = ASC( "A" ) - 1.
9 OUTPUT TO "CLIPBOARD".
10 FOR EACH Creditor WHERE Creditor.Active NO-LOCK BY Creditor.Name:
11 ltr = ASC( CAPS( SUBSTRING( Creditor.Name, 1, 1)) ) - offset.
12 FOR EACH AcctTran NO-LOCK WHERE AcctTran.EntityType = "C"
13 AND AcctTran.EntityCode = Creditor.CreditorCode
14 AND AcctTran.AccountCode = sundry-creditors
15 AND AcctTran.MonthCode >= m1
16 AND AcctTran.MonthCode <= m2:
17 n[ltr] = n[ltr] + 1.
18 END.
19 END.
20 DO ltr = 1 TO 26:
21 DISPLAY CHR( ltr + offset ) FORMAT "X(3)"
22 ltr FORMAT ">9"
23 n[ltr] FORMAT ">>,>>9" WITH DOWN FRAME x.
24 DOWN WITH FRAME x.
25 END.
26 OUTPUT CLOSE.