Add blank column, rename column.
[capital-apms-progress.git] / process / report / unprschq.p
blob80081b7c4534e3a11b36cbc57e7f9efe8cebb224
1 &ANALYZE-SUSPEND _VERSION-NUMBER UIB_v8r12
2 &ANALYZE-RESUME
3 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS Procedure
4 /*--------------------------------------------------------------------------
5 File :
6 Purpose :
8 Syntax :
10 Description :
11 ------------------------------------------------------------------------*/
12 DEF INPUT PARAMETER report-options AS CHAR NO-UNDO.
14 DEF VAR bankaccount-code LIKE BankAccount.BankAccountCode NO-UNDO INITIAL ?.
15 DEF VAR date-1 AS DATE NO-UNDO.
16 DEF VAR date-n AS DATE NO-UNDO.
17 DEF VAR preview AS LOGI NO-UNDO INITIAL No.
18 DEF VAR sent AS LOGI NO-UNDO INITIAL No.
19 DEF VAR cheque-1 LIKE Cheque.ChequeNo NO-UNDO.
20 DEF VAR cheque-n LIKE Cheque.ChequeNo NO-UNDO.
21 RUN parse-parameters.
23 /* Report counters */
24 DEF VAR ln AS DEC INIT 0.00 NO-UNDO.
25 DEF VAR reset-page AS CHAR NO-UNDO.
26 DEF VAR half-line AS CHAR NO-UNDO. half-line = CHR(27) + "=".
27 DEF VAR title-font AS CHAR NO-UNDO.
28 DEF VAR option-font AS CHAR NO-UNDO.
29 DEF VAR bankaccount-font AS CHAR NO-UNDO.
30 DEF VAR line-printer AS CHAR NO-UNDO.
32 DEF VAR bank-account-total AS DEC NO-UNDO.
33 DEF VAR bank-account-not-sent-total AS DEC NO-UNDO.
34 DEF VAR total-pre-space AS CHAR NO-UNDO.
35 DEF VAR day-sent AS INTEGER NO-UNDO.
36 DEF VAR day-sent-total AS DEC EXTENT 7.
37 DEF VAR option-string AS CHAR NO-UNDO.
39 DEF VAR prt-ctrl AS CHAR NO-UNDO.
40 DEF VAR cols AS INT NO-UNDO.
41 DEF VAR rows AS INT NO-UNDO.
43 &SCOPED-DEFINE EARLY-DATE DATE(1,1,1)
44 &SCOPED-DEFINE LATE-DATE DATE(12,31,2999)
45 &SCOPED-DEFINE lines-per-page 82
47 /* _UIB-CODE-BLOCK-END */
48 &ANALYZE-RESUME
51 &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
53 /* ******************** Preprocessor Definitions ******************** */
55 &Scoped-define PROCEDURE-TYPE Procedure
56 &Scoped-define DB-AWARE no
60 /* _UIB-PREPROCESSOR-BLOCK-END */
61 &ANALYZE-RESUME
65 /* *********************** Procedure Settings ************************ */
67 &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
68 /* Settings for THIS-PROCEDURE
69 Type: Procedure
70 Allow:
71 Frames: 0
72 Add Fields to: Neither
73 Other Settings: CODE-ONLY COMPILE
75 &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
77 /* ************************* Create Window ************************** */
79 &ANALYZE-SUSPEND _CREATE-WINDOW
80 /* DESIGN Window definition (used by the UIB)
81 CREATE WINDOW Procedure ASSIGN
82 HEIGHT = .15
83 WIDTH = 40.
84 /* END WINDOW DEFINITION */
86 &ANALYZE-RESUME
88 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB Procedure
89 /* ************************* Included-Libraries *********************** */
91 {inc/method/m-sysmgr.i}
92 {inc/method/m-txtrep.i}
94 /* _UIB-CODE-BLOCK-END */
95 &ANALYZE-RESUME
101 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK Procedure
104 /* *************************** Main Block *************************** */
107 RUN make-control-string ( "PCL", "reset", OUTPUT prt-ctrl, OUTPUT rows, OUTPUT cols ).
108 RUN output-control-file ( prt-ctrl ).
110 RUN get-control-strings.
111 OUTPUT TO VALUE(txtrep-print-file) KEEP-MESSAGES PAGE-SIZE 0.
113 RUN unpresented-cheques.
115 OUTPUT CLOSE.
116 RUN view-output-file ( preview ).
118 /* _UIB-CODE-BLOCK-END */
119 &ANALYZE-RESUME
122 /* ********************** Internal Procedures *********************** */
124 &IF DEFINED(EXCLUDE-bank-account-footer) = 0 &THEN
126 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE bank-account-footer Procedure
127 PROCEDURE bank-account-footer :
128 /*------------------------------------------------------------------------------
129 Purpose:
130 Parameters: <none>
131 Notes:
132 ------------------------------------------------------------------------------*/
134 RUN separator-line.
135 PUT UNFORMATTED
136 total-pre-space
137 STRING( "Total for Bank Account","X(30)" )
138 STRING( bank-account-total, "->>>,>>>,>>9.99" ).
140 RUN skip-line(2).
142 DEF VAR balance LIKE AccountSummary.Balance NO-UNDO.
144 FIND AccountSummary WHERE AccountSummary.EntityType = "L"
145 AND AccountSummary.EntityCode = BankAccount.CompanyCode
146 AND AccountSummary.AccountCode = BankAccount.AccountCode
147 NO-LOCK NO-ERROR.
148 IF AVAILABLE(AccountSummary) THEN DO:
149 balance = AccountSummary.Balance.
150 END.
151 ELSE DO:
152 balance = 0.
153 END.
154 PUT UNFORMATTED
155 total-pre-space
156 STRING( "Balance from GL","X(30)" )
157 STRING( balance, "->>>,>>>,>>9.99" ).
159 IF bank-account-total = 0 AND bank-account-not-sent-total = 0 THEN DO:
160 RUN skip-line(3).
161 RETURN.
162 END.
164 RUN skip-line(1).
165 RUN separator-line.
166 PUT UNFORMATTED
167 total-pre-space
168 STRING( "Estimated Balance at Bank","X(30)" )
169 STRING( balance + bank-account-total, "->>>,>>>,>>9.99" ).
171 IF sent THEN DO:
172 RUN skip-line(2).
173 PUT UNFORMATTED
174 total-pre-space
175 STRING( "If sent cheques are presented","X(30)" )
176 STRING( balance + bank-account-total - bank-account-not-sent-total, "->>>,>>>,>>9.99" ).
177 END.
179 RUN skip-line(3).
181 END PROCEDURE.
183 /* _UIB-CODE-BLOCK-END */
184 &ANALYZE-RESUME
186 &ENDIF
188 &IF DEFINED(EXCLUDE-bank-account-header) = 0 &THEN
190 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE bank-account-header Procedure
191 PROCEDURE bank-account-header :
192 /*------------------------------------------------------------------------------
193 Purpose:
194 Parameters: <none>
195 Notes:
196 ------------------------------------------------------------------------------*/
198 PUT CONTROL bankaccount-font.
199 PUT UNFORMATTED
200 "(L" + STRING( BankAccount.CompanyCode, "9999" ) + " - " +
201 STRING( BankAccount.AccountCode, "9999.99" ) + ") " +
202 BankAccount.BankName + ", " +
203 BankAccount.BankBranchName + ", " +
204 BankAccount.AccountName + " " +
205 "(" + STRING( BankAccount.BankAccount ) + ")".
206 PUT CONTROL line-printer.
207 RUN skip-line(2).
209 END PROCEDURE.
211 /* _UIB-CODE-BLOCK-END */
212 &ANALYZE-RESUME
214 &ENDIF
216 &IF DEFINED(EXCLUDE-carriage-return) = 0 &THEN
218 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE carriage-return Procedure
219 PROCEDURE carriage-return :
220 /*------------------------------------------------------------------------------
221 Purpose:
222 Parameters: <none>
223 Notes:
224 ------------------------------------------------------------------------------*/
226 PUT CONTROL CHR(13).
228 END PROCEDURE.
230 /* _UIB-CODE-BLOCK-END */
231 &ANALYZE-RESUME
233 &ENDIF
235 &IF DEFINED(EXCLUDE-column-header) = 0 &THEN
237 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE column-header Procedure
238 PROCEDURE column-header :
239 /*------------------------------------------------------------------------------
240 Purpose:
241 Parameters: <none>
242 Notes:
243 ------------------------------------------------------------------------------*/
245 PUT UNFORMATTED SPACE(3)
246 STRING( "Payee Name", "X(50)" ) SPACE(2)
247 STRING( "Chq No.", "X(7)" ) SPACE(2)
248 STRING( "Date", "X(10)" ) SPACE(2).
250 IF sent THEN
251 PUT UNFORMATTED
252 STRING( "Sent", "X(10)" ) SPACE(2).
254 PUT UNFORMATTED
255 STRING( " Amount", "X(15)" ).
257 RUN skip-line(2).
259 END PROCEDURE.
261 /* _UIB-CODE-BLOCK-END */
262 &ANALYZE-RESUME
264 &ENDIF
266 &IF DEFINED(EXCLUDE-each-bank-account) = 0 &THEN
268 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE each-bank-account Procedure
269 PROCEDURE each-bank-account :
270 /*------------------------------------------------------------------------------
271 Purpose:
272 Parameters: <none>
273 Notes:
274 ------------------------------------------------------------------------------*/
276 bank-account-total = 0.
277 bank-account-not-sent-total = 0.
278 DO day-sent = 1 TO 7:
279 day-sent-total[ day-sent ] = 0.
280 END.
282 RUN bank-account-header.
284 IF cheque-1 = ? OR cheque-n = ? THEN DO:
285 FOR EACH Cheque NO-LOCK WHERE Cheque.BankAccountCode = BankAccount.BankAccountCode
286 AND Cheque.Date >= date-1 AND Cheque.Date <= date-n
287 AND (Cheque.DatePresented > date-n OR Cheque.DatePresented = ?)
288 AND NOT(Cheque.Cancelled):
289 RUN each-cheque.
290 END.
291 END.
292 ELSE DO:
293 FOR EACH Cheque NO-LOCK WHERE Cheque.BankAccountCode = BankAccount.BankAccountCode
294 AND Cheque.ChequeNo >= cheque-1 AND Cheque.ChequeNo <= cheque-n
295 AND Cheque.Date >= date-1 AND Cheque.Date <= date-n
296 AND ( Cheque.DatePresented > date-n OR Cheque.DatePresented = ?)
297 AND NOT(Cheque.Cancelled):
298 RUN each-cheque.
299 END.
300 END.
302 RUN bank-account-footer.
304 IF sent THEN RUN sent-summary.
306 END PROCEDURE.
308 /* _UIB-CODE-BLOCK-END */
309 &ANALYZE-RESUME
311 &ENDIF
313 &IF DEFINED(EXCLUDE-each-cheque) = 0 &THEN
315 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE each-cheque Procedure
316 PROCEDURE each-cheque :
317 /*------------------------------------------------------------------------------
318 Purpose:
319 Parameters: <none>
320 Notes:
321 ------------------------------------------------------------------------------*/
323 IF Cheque.Cancelled THEN RETURN.
324 FIND Creditor OF Cheque NO-LOCK.
326 PUT UNFORMATTED SPACE(3)
327 STRING( Cheque.PayeeName, "X(50)" ) SPACE(2)
328 STRING( Cheque.ChequeNo, "9999999" ) SPACE(2)
329 STRING( Cheque.Date, "99/99/9999" ) SPACE(2).
331 IF sent THEN
332 PUT UNFORMATTED
333 STRING( IF Cheque.DateSent = ? THEN "" ELSE
334 STRING( Cheque.DateSent, "99/99/9999" ), "X(10)" ) SPACE(2).
336 PUT UNFORMATTED
337 STRING( Cheque.Amount, "->>>,>>>,>>9.99" ).
339 bank-account-total = bank-account-total + Cheque.Amount.
340 IF Cheque.DateSent = ? THEN
341 bank-account-not-sent-total = bank-account-not-sent-total + Cheque.Amount.
342 ELSE DO:
343 day-sent = TODAY - Cheque.DateSent.
344 IF day-sent >=0 AND day-sent <= 6 THEN
345 day-sent-total[ day-sent + 1 ] = day-sent-total[ day-sent + 1] + Cheque.Amount.
346 END.
347 RUN skip-line(1).
349 END PROCEDURE.
351 /* _UIB-CODE-BLOCK-END */
352 &ANALYZE-RESUME
354 &ENDIF
356 &IF DEFINED(EXCLUDE-get-control-strings) = 0 &THEN
358 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE get-control-strings Procedure
359 PROCEDURE get-control-strings :
360 /*------------------------------------------------------------------------------
361 Purpose:
362 ------------------------------------------------------------------------------*/
363 DEF VAR rows AS DEC NO-UNDO.
364 DEF VAR cols AS DEC NO-UNDO.
366 RUN make-control-string( "PCL", "reset,portrait,a4,tm,0,lm,5",
367 OUTPUT reset-page, OUTPUT rows, OUTPUT cols ).
369 IF preview THEN RETURN.
371 RUN make-control-string( "PCL", "Proportional,Helvetica,Bold,Point,12",
372 OUTPUT title-font, OUTPUT rows, OUTPUT cols ).
374 RUN make-control-string( "PCL", "Proportional,Helvetica,Bold,Point,7",
375 OUTPUT option-font, OUTPUT rows, OUTPUT cols ).
377 RUN make-control-string( "PCL", "Proportional,Helvetica,Bold,Point,8",
378 OUTPUT bankaccount-font, OUTPUT rows, OUTPUT cols ).
380 RUN make-control-string( "PCL", "LinePrinter,lpi,8",
381 OUTPUT line-printer, OUTPUT rows, OUTPUT cols ).
383 END PROCEDURE.
385 /* _UIB-CODE-BLOCK-END */
386 &ANALYZE-RESUME
388 &ENDIF
390 &IF DEFINED(EXCLUDE-get-option-string) = 0 &THEN
392 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE get-option-string Procedure
393 PROCEDURE get-option-string :
394 /*------------------------------------------------------------------------------
395 Purpose:
396 ------------------------------------------------------------------------------*/
397 DEF VAR bank-account-string AS CHAR NO-UNDO.
398 DEF VAR date-string AS CHAR NO-UNDO.
399 DEF VAR cheque-string AS CHAR NO-UNDO.
401 option-string = "".
403 bank-account-string = IF bankaccount-code = ? THEN "All Bank Accounts, " ELSE "".
404 date-string = IF date-1 = {&EARLY-DATE} AND date-n = {&LATE-DATE} THEN
405 "All Dates"
406 ELSE
407 (IF date-1 = {&EARLY-DATE} THEN "" ELSE ", from " + STRING( date-1, "99/99/9999" ) ) +
408 (IF date-n = {&LATE-DATE} THEN "" ELSE ", to " + STRING( date-n, "99/99/9999" ) ).
409 cheque-string = IF cheque-1 = ? OR cheque-n = ? THEN
410 "All Cheque Numbers"
411 ELSE
412 "Cheque Numbers " + STRING( cheque-1, ">999999" ) + " to" + STRING( cheque-n, ">999999" ).
414 option-string = bank-account-string + date-string + ", " + cheque-string.
416 END PROCEDURE.
418 /* _UIB-CODE-BLOCK-END */
419 &ANALYZE-RESUME
421 &ENDIF
423 &IF DEFINED(EXCLUDE-page-feed) = 0 &THEN
425 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE page-feed Procedure
426 PROCEDURE page-feed :
427 /*------------------------------------------------------------------------------
428 Purpose:
429 Parameters: <none>
430 Notes:
431 ------------------------------------------------------------------------------*/
433 PUT CONTROL CHR(12).
435 END PROCEDURE.
437 /* _UIB-CODE-BLOCK-END */
438 &ANALYZE-RESUME
440 &ENDIF
442 &IF DEFINED(EXCLUDE-page-header) = 0 &THEN
444 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE page-header Procedure
445 PROCEDURE page-header :
446 /*------------------------------------------------------------------------------
447 Purpose:
448 Parameters: <none>
449 Notes:
450 ------------------------------------------------------------------------------*/
451 DEF VAR report-title AS CHAR NO-UNDO INITIAL "Unpresented Cheques".
453 RUN reset-page.
454 PUT CONTROL line-printer.
456 DEF VAR user-name AS CHAR NO-UNDO.
457 {inc/username.i "user-name"}
459 RUN skip-line(2).
460 PUT UNFORMATTED STRING( TODAY, "99/99/9999" ) ' ' STRING( TIME, "HH:MM:SS" ) + " for " + user-name.
461 RUN skip-line(3).
463 PUT CONTROL title-font.
464 IF date-n <> {&LATE-DATE} THEN report-title = report-title + " as at " + STRING( date-n, "99/99/9999").
465 IF date-1 <> {&EARLY-DATE} THEN report-title = report-title + " produced from " + STRING( date-1, "99/99/9999") + " onwards".
466 PUT UNFORMATTED STRING( report-title, "X(100)" ).
468 PUT CONTROL line-printer.
469 RUN skip-line(1.5).
471 PUT CONTROL option-font.
472 PUT UNFORMATTED STRING( option-string, "X(100)" ).
474 PUT CONTROL line-printer.
475 RUN skip-line(2).
476 RUN column-header.
478 END PROCEDURE.
480 /* _UIB-CODE-BLOCK-END */
481 &ANALYZE-RESUME
483 &ENDIF
485 &IF DEFINED(EXCLUDE-parse-parameters) = 0 &THEN
487 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE parse-parameters Procedure
488 PROCEDURE parse-parameters :
489 /*------------------------------------------------------------------------------
490 Purpose:
491 ------------------------------------------------------------------------------*/
492 DEF VAR token AS CHAR NO-UNDO.
493 DEF VAR i AS INT NO-UNDO.
495 {inc/showopts.i "report-options"}
497 DO i = 1 TO NUM-ENTRIES( report-options, "~n" ):
498 token = ENTRY( i, report-options, "~n" ).
500 CASE ENTRY( 1, token ):
501 WHEN "Preview" THEN preview = Yes.
502 WHEN "BankAccount" THEN bankaccount-code = ENTRY( 2, token).
504 WHEN "Period" THEN ASSIGN
505 date-1 = DATE( ENTRY( 2, token ) )
506 date-n = DATE( ENTRY( 3, token ) ) NO-ERROR.
508 WHEN "Cheques" THEN ASSIGN
509 cheque-1 = INT(ENTRY(2,token))
510 cheque-n = INT(ENTRY(3,token)) NO-ERROR.
512 WHEN "Sent" THEN sent = Yes.
513 END CASE.
514 END.
516 IF date-1 = ? OR date-1 < DATE(1,1,1980) THEN date-1 = {&EARLY-DATE} .
517 IF date-n = ? OR date-n > (TODAY + 365) THEN date-n = {&LATE-DATE} .
519 total-pre-space = FILL( " ", IF sent THEN 58 ELSE 46 ).
521 END PROCEDURE.
523 /* _UIB-CODE-BLOCK-END */
524 &ANALYZE-RESUME
526 &ENDIF
528 &IF DEFINED(EXCLUDE-reset-page) = 0 &THEN
530 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE reset-page Procedure
531 PROCEDURE reset-page :
532 /*------------------------------------------------------------------------------
533 Purpose:
534 Parameters: <none>
535 Notes:
536 ------------------------------------------------------------------------------*/
538 PUT CONTROL reset-page.
539 ln = 0.
541 END PROCEDURE.
543 /* _UIB-CODE-BLOCK-END */
544 &ANALYZE-RESUME
546 &ENDIF
548 &IF DEFINED(EXCLUDE-sent-summary) = 0 &THEN
550 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE sent-summary Procedure
551 PROCEDURE sent-summary :
552 /*------------------------------------------------------------------------------
553 Purpose:
554 ------------------------------------------------------------------------------*/
556 PUT UNFORMATTED
557 SPACE(2)
558 "Sent Cheque Summary".
559 RUN skip-line(1).
560 PUT UNFORMATTED
561 SPACE(2)
562 STRING( "Date", "X(10)" ) SPACE(2)
563 STRING( " Total", "X(15)" ).
564 RUN skip-line(1).
566 DEF VAR total-sent-in-last-week AS DEC.
568 DO day-sent = 1 TO 5:
569 PUT UNFORMATTED
570 SPACE(2)
571 STRING( TODAY - day-sent + 1, "99/99/9999" ) SPACE(2)
572 STRING( day-sent-total[day-sent], "->>>,>>>,>>9.99" ).
573 RUN skip-line(1).
574 total-sent-in-last-week = total-sent-in-last-week + day-sent-total[day-sent].
575 END.
577 PUT UNFORMATTED
578 SPACE(2)
579 STRING( "Prior", "X(10)" ) SPACE(2)
580 STRING( bank-account-total - (bank-account-not-sent-total + total-sent-in-last-week), "->>>,>>>,>>9.99" ).
581 RUN skip-line(1).
583 PUT UNFORMATTED
584 SPACE(2)
585 STRING( "Not sent", "X(10)" ) SPACE(2)
586 STRING( bank-account-not-sent-total, "->>>,>>>,>>9.99" ).
587 RUN skip-line(1).
589 PUT UNFORMATTED
590 SPACE(14)
591 FILL( "-", 15 ).
592 RUN skip-line(1).
594 PUT UNFORMATTED
595 SPACE(14)
596 STRING( bank-account-total, "->>>,>>>,>>9.99" ).
597 RUN skip-line(2).
599 END PROCEDURE.
601 /* _UIB-CODE-BLOCK-END */
602 &ANALYZE-RESUME
604 &ENDIF
606 &IF DEFINED(EXCLUDE-separator-line) = 0 &THEN
608 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE separator-line Procedure
609 PROCEDURE separator-line :
610 /*------------------------------------------------------------------------------
611 Purpose:
612 Parameters: <none>
613 Notes:
614 ------------------------------------------------------------------------------*/
616 PUT UNFORMATTED
617 total-pre-space
618 SPACE(30) FILL( "-", 15 ).
619 RUN skip-line(1).
621 END PROCEDURE.
623 /* _UIB-CODE-BLOCK-END */
624 &ANALYZE-RESUME
626 &ENDIF
628 &IF DEFINED(EXCLUDE-skip-line) = 0 &THEN
630 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE skip-line Procedure
631 PROCEDURE skip-line :
632 /*------------------------------------------------------------------------------
633 Purpose:
634 ------------------------------------------------------------------------------*/
635 DEF INPUT PARAMETER n AS DEC NO-UNDO.
637 DEF VAR int-part AS INT NO-UNDO.
638 DEF VAR dec-part AS DEC NO-UNDO.
640 int-part = TRUNCATE( n, 0 ).
641 IF int-part < 0 THEN RETURN.
642 dec-part = n - int-part.
643 IF int-part = 0 AND dec-part = 0 THEN RETURN.
645 IF (ln + n) > {&lines-per-page} THEN DO:
646 RUN page-feed.
647 RUN page-header.
648 END.
649 ELSE DO:
650 IF dec-part <> 0 THEN PUT CONTROL half-line.
652 IF int-part = 1 THEN
653 PUT SKIP.
654 ELSE
655 PUT SKIP(int-part).
657 ln = ln + n.
658 END.
660 END PROCEDURE.
662 /* _UIB-CODE-BLOCK-END */
663 &ANALYZE-RESUME
665 &ENDIF
667 &IF DEFINED(EXCLUDE-unpresented-cheques) = 0 &THEN
669 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE unpresented-cheques Procedure
670 PROCEDURE unpresented-cheques :
671 /*------------------------------------------------------------------------------
672 Purpose:
673 Parameters: <none>
674 Notes:
675 ------------------------------------------------------------------------------*/
677 RUN get-option-string.
678 RUN get-control-strings.
679 RUN page-header.
681 IF bankaccount-code = ? THEN
682 FOR EACH BankAccount NO-LOCK:
683 RUN each-bank-account.
684 END.
685 ELSE
687 FIND FIRST BankAccount WHERE BankAccount.BankAccountCode = bankaccount-code
688 NO-LOCK NO-ERROR.
689 IF AVAILABLE BankAccount THEN RUN each-bank-account.
690 END.
692 RUN page-feed.
694 END PROCEDURE.
696 /* _UIB-CODE-BLOCK-END */
697 &ANALYZE-RESUME
699 &ENDIF