Added capital works blank section. Synced calling screen.
[capital-apms-progress.git] / process / report / vchrappr.p
blobacca080e14a297e8e916b6e4c8f53707903565c1
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 :
12 Author(s) :
13 Created :
14 Notes :
15 ------------------------------------------------------------------------*/
17 DEF INPUT PARAMETER voucher-start LIKE Voucher.VoucherSeq NO-UNDO.
18 DEF INPUT PARAMETER voucher-end LIKE Voucher.VoucherSeq NO-UNDO.
19 DEF INPUT PARAMETER voucher-list AS CHAR NO-UNDO.
21 DEF VAR fixed-codes AS CHAR NO-UNDO.
22 DEF VAR variable-codes AS CHAR NO-UNDO.
23 DEF VAR transaction-codes AS CHAR NO-UNDO.
24 DEF VAR preview AS LOGICAL INITIAL No NO-UNDO.
25 DEF VAR prt-ctrl AS CHAR NO-UNDO.
26 DEF VAR rows AS INT NO-UNDO.
27 DEF VAR cols AS INT NO-UNDO.
29 DEF VAR gst-applies AS LOGI NO-UNDO.
30 DEF VAR continued-on-attached AS LOGICAL NO-UNDO INITIAL No.
32 {inc/ofc-set.i "AcctGroup-Ownex" "AcctGroup-Ownex"}
35 &GLOB MAX-P1-ALLOC 7
37 /* _UIB-CODE-BLOCK-END */
38 &ANALYZE-RESUME
41 &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
43 /* ******************** Preprocessor Definitions ******************** */
45 &Scoped-define PROCEDURE-TYPE Procedure
46 &Scoped-define DB-AWARE no
50 /* _UIB-PREPROCESSOR-BLOCK-END */
51 &ANALYZE-RESUME
55 /* *********************** Procedure Settings ************************ */
57 &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
58 /* Settings for THIS-PROCEDURE
59 Type: Procedure
60 Allow:
61 Frames: 0
62 Add Fields to: Neither
63 Other Settings: CODE-ONLY COMPILE
65 &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
67 /* ************************* Create Window ************************** */
69 &ANALYZE-SUSPEND _CREATE-WINDOW
70 /* DESIGN Window definition (used by the UIB)
71 CREATE WINDOW Procedure ASSIGN
72 HEIGHT = .1
73 WIDTH = 40.
74 /* END WINDOW DEFINITION */
76 &ANALYZE-RESUME
78 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB Procedure
79 /* ************************* Included-Libraries *********************** */
81 {inc/method/m-txtrep.i}
82 {inc/method/m-hpgl.i}
83 {inc/entity.i}
85 /* _UIB-CODE-BLOCK-END */
86 &ANALYZE-RESUME
92 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK Procedure
95 /* *************************** Main Block *************************** */
97 FIND Office WHERE Office.ThisOffice NO-LOCK.
98 gst-applies = Office.GST <> ?.
100 RUN make-control-string ( "PCL", "reset,simplex,portrait,tm,0,a4,lm,0,courier,cpi,18,lpi,9",
101 OUTPUT prt-ctrl, OUTPUT rows, OUTPUT cols ).
102 RUN output-control-file ( prt-ctrl ).
103 OUTPUT TO VALUE(txtrep-print-file) KEEP-MESSAGES PAGE-SIZE 0.
105 RUN voucher-approval-forms.
107 OUTPUT CLOSE.
108 RUN view-output-file ( no ).
110 /* _UIB-CODE-BLOCK-END */
111 &ANALYZE-RESUME
114 /* ********************** Internal Procedures *********************** */
116 &IF DEFINED(EXCLUDE-approval-prompts) = 0 &THEN
118 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE approval-prompts Procedure
119 PROCEDURE approval-prompts :
120 /*------------------------------------------------------------------------------
121 Purpose:
122 Parameters: <none>
123 Notes:
124 ------------------------------------------------------------------------------*/
126 /* Approval Prompts */
127 RUN hpgl-moveto( 23, 39 ).
128 RUN hpgl-text( "Helvetica,Point,12,Proportional", "Certified Correct:" ).
129 RUN hpgl-move-relative( 50, 0 ).
130 RUN hpgl-line-relative( 77, 0 ).
131 RUN hpgl-move-relative( 4, 0 ).
132 RUN hpgl-text( hpgl-last-font, "Date:" ).
133 RUN hpgl-move-relative( 14, 0 ).
134 RUN hpgl-line-relative( 32, 0 ).
135 RUN hpgl-move-relative( -177, -9 ).
136 RUN hpgl-text( "Helvetica,Point,12,Proportional", "Approved for Payment:" ).
137 RUN hpgl-move-relative( 50, 0 ).
138 RUN hpgl-line-relative( 77, 0 ).
139 RUN hpgl-move-relative( 4, 0 ).
140 RUN hpgl-text( hpgl-last-font, "Date:" ).
141 RUN hpgl-move-relative( 14, 0 ).
142 RUN hpgl-line-relative( 32, 0 ).
144 END PROCEDURE.
146 /* _UIB-CODE-BLOCK-END */
147 &ANALYZE-RESUME
149 &ENDIF
151 &IF DEFINED(EXCLUDE-approval-variables) = 0 &THEN
153 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE approval-variables Procedure
154 PROCEDURE approval-variables :
155 /*------------------------------------------------------------------------------
156 Purpose:
157 Parameters: <none>
158 Notes:
159 ------------------------------------------------------------------------------*/
161 RUN hpgl-moveto( 23, 39 ).
162 RUN hpgl-move-relative( 50, -2.2 ).
163 RUN hpgl-text( "Helvetica,Point,6,Proportional", "@Certified Correct@" ).
164 RUN hpgl-move-relative( 0, -9 ).
165 RUN hpgl-text( "Helvetica,Point,6,Proportional", "@Payment Approval@" ).
167 END PROCEDURE.
169 /* _UIB-CODE-BLOCK-END */
170 &ANALYZE-RESUME
172 &ENDIF
174 &IF DEFINED(EXCLUDE-budget-prompts) = 0 &THEN
176 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE budget-prompts Procedure
177 PROCEDURE budget-prompts :
178 /*------------------------------------------------------------------------------
179 Purpose:
180 Parameters: <none>
181 Notes:
182 ------------------------------------------------------------------------------*/
184 /* Budget Prompts */
185 RUN hpgl-moveto( 23, 162.2 ).
186 RUN hpgl-text( "Helvetica,Point,10,Proportional", "YTD Actual:" ).
187 RUN hpgl-move-relative( 60, 0 ).
188 RUN hpgl-text( hpgl-last-font, "YTD Budget:" ).
189 RUN hpgl-move-relative( 58, 0 ).
190 RUN hpgl-text( hpgl-last-font, "Full Year Budget:" ).
192 END PROCEDURE.
194 /* _UIB-CODE-BLOCK-END */
195 &ANALYZE-RESUME
197 &ENDIF
199 &IF DEFINED(EXCLUDE-budget-variables) = 0 &THEN
201 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE budget-variables Procedure
202 PROCEDURE budget-variables :
203 /*------------------------------------------------------------------------------
204 Purpose:
205 Parameters: <none>
206 Notes:
207 ------------------------------------------------------------------------------*/
209 RUN hpgl-moveto( 23, 162.2 ).
210 RUN hpgl-move-relative( 21, 0 ).
211 RUN hpgl-text( "Times,Point,12,Proportional,Bold", "@YTD Actual@" ).
212 RUN hpgl-move-relative( 62, 0 ).
213 RUN hpgl-text( hpgl-last-font, "@YTD Budget@" ).
214 RUN hpgl-move-relative( 64, 0 ).
215 RUN hpgl-text( hpgl-last-font, "@FY Budget@" ).
217 END PROCEDURE.
219 /* _UIB-CODE-BLOCK-END */
220 &ANALYZE-RESUME
222 &ENDIF
224 &IF DEFINED(EXCLUDE-each-voucher) = 0 &THEN
226 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE each-voucher Procedure
227 PROCEDURE each-voucher :
228 /*------------------------------------------------------------------------------
229 Purpose:
230 Parameters: <none>
231 Notes:
232 ------------------------------------------------------------------------------*/
233 DEF VAR printer-codes AS CHAR NO-UNDO.
235 PUT CONTROL fixed-codes.
236 RUN variable-replacements.
237 PUT CONTROL hpgl-codes.
238 hpgl-codes = "".
240 RUN client-logo(
241 Voucher.EntityType,
242 Voucher.EntityCode,
243 get-entity-client( Voucher.EntityType, Voucher.EntityCode )
245 RUN hpgl-get-codes( no, yes, OUTPUT printer-codes ).
246 PUT CONTROL printer-codes.
248 RUN print-transactions.
249 PUT CONTROL transaction-codes.
251 RUN make-control-string ( "PCL", "eject",
252 OUTPUT prt-ctrl, OUTPUT rows, OUTPUT cols ).
253 PUT CONTROL prt-ctrl.
255 IF continued-on-attached THEN DO:
256 RUN print-continuation.
257 continued-on-attached = No.
258 END.
260 END PROCEDURE.
262 /* _UIB-CODE-BLOCK-END */
263 &ANALYZE-RESUME
265 &ENDIF
267 &IF DEFINED(EXCLUDE-each-voucherline) = 0 &THEN
269 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE each-voucherline Procedure
270 PROCEDURE each-voucherline :
271 /*------------------------------------------------------------------------------
272 Purpose:
273 Parameters: <none>
274 Notes:
275 ------------------------------------------------------------------------------*/
277 DEF VAR entity-name AS CHAR NO-UNDO.
278 DEF VAR account-desc AS CHAR NO-UNDO.
280 RUN hpgl-text( "Courier,Point,9,Proportional,Normal",
281 IF VoucherLine.EntityType = ? THEN "" ELSE VoucherLine.EntityType ).
282 RUN hpgl-move-relative( 5.5, 1.5 ).
284 RUN hpgl-text( hpgl-last-font,
285 IF VoucherLine.EntityCode = ? OR VoucherLine.EntityCode = 0 THEN "" ELSE
286 STRING( VoucherLine.EntityCode, "99999" ) ).
287 RUN hpgl-move-relative( -1, -2 ).
289 RUN voucher-entity-name( OUTPUT entity-name ).
290 RUN hpgl-text( "Point,4", entity-name ).
291 RUN hpgl-move-relative( 14, IF LOOKUP( VoucherLine.EntityType, "C,T" ) <> 0
292 THEN 0.5 ELSE 2 ).
295 RUN hpgl-text( "Point,9",
296 IF VoucherLine.AccountCode = ? OR VoucherLine.AccountCode = 0 THEN "" ELSE
297 STRING( VoucherLine.AccountCode, "9999.99" ) ).
298 RUN hpgl-move-relative( -2, IF LOOKUP( VoucherLine.EntityType, "C,T" ) <> 0
299 THEN -0.5 ELSE -2 ).
301 RUN get-account-desc( OUTPUT account-desc ).
302 RUN hpgl-text( "Point,4", account-desc ).
303 RUN hpgl-move-relative( 21, 0.5 ).
305 RUN hpgl-text( "Point,9", VoucherLine.Description ).
306 RUN hpgl-move-relative( 104, 0 ).
308 RUN hpgl-text( "Courier,Fixed,cpi,12",
309 STRING( TRUNCATE( VoucherLine.Amount, 0 ), "->>,>>>,>>9" ) ).
310 RUN hpgl-move-relative( 27, 0 ).
312 RUN hpgl-text( hpgl-last-font,
313 STRING( ABSOLUTE( ( VoucherLine.Amount - TRUNCATE( VoucherLine.Amount, 0 )) * 100 ), "99" ) ).
315 RUN hpgl-move-relative( -168.5, -6 ).
317 END PROCEDURE.
319 /* _UIB-CODE-BLOCK-END */
320 &ANALYZE-RESUME
322 &ENDIF
324 &IF DEFINED(EXCLUDE-entity-variables) = 0 &THEN
326 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE entity-variables Procedure
327 PROCEDURE entity-variables :
328 /*------------------------------------------------------------------------------
329 Purpose:
330 Parameters: <none>
331 Notes:
332 ------------------------------------------------------------------------------*/
334 RUN hpgl-moveto( 23, 153 ).
335 RUN hpgl-text( "Helvetica,Point,10,Proportional,Normal", "@Entity@" ).
337 END PROCEDURE.
339 /* _UIB-CODE-BLOCK-END */
340 &ANALYZE-RESUME
342 &ENDIF
344 &IF DEFINED(EXCLUDE-get-account-desc) = 0 &THEN
346 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE get-account-desc Procedure
347 PROCEDURE get-account-desc :
348 /*------------------------------------------------------------------------------
349 Purpose:
350 Parameters: <none>
351 Notes:
352 ------------------------------------------------------------------------------*/
354 DEF OUTPUT PARAMETER account-desc AS CHAR NO-UNDO.
356 FIND ChartOfAccount WHERE ChartOfAccount.AccountCode = VoucherLine.AccountCode
357 NO-LOCK NO-ERROR.
359 IF AVAILABLE ChartOfAccount THEN
360 account-desc = SUBSTR( ChartOfAccount.Name, 1, 18 ).
362 END PROCEDURE.
364 /* _UIB-CODE-BLOCK-END */
365 &ANALYZE-RESUME
367 &ENDIF
369 &IF DEFINED(EXCLUDE-get-fixed-codes) = 0 &THEN
371 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE get-fixed-codes Procedure
372 PROCEDURE get-fixed-codes :
373 /*------------------------------------------------------------------------------
374 Purpose:
375 Parameters: <none>
376 Notes:
377 ------------------------------------------------------------------------------*/
379 /* The constant parts of the page */
380 RUN hpgl-initialize.
381 RUN hpgl-set-line-width( 0.25 ).
382 RUN hpgl-moveto( 55, 256 ).
383 RUN hpgl-text( 'helvetica,point,20,proportional,bold', "INVOICE APPROVAL VOUCHER" ).
384 RUN print-boxes.
385 RUN print-prompts.
386 RUN hpgl-get-codes( no, yes, OUTPUT fixed-codes ).
388 END PROCEDURE.
390 /* _UIB-CODE-BLOCK-END */
391 &ANALYZE-RESUME
393 &ENDIF
395 &IF DEFINED(EXCLUDE-get-variables) = 0 &THEN
397 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE get-variables Procedure
398 PROCEDURE get-variables :
399 /*------------------------------------------------------------------------------
400 Purpose:
401 Parameters: <none>
402 Notes:
403 ------------------------------------------------------------------------------*/
405 RUN invoice-detail-variables.
406 RUN budget-variables.
407 RUN entity-variables.
408 RUN recoverable-variables.
409 RUN approval-variables.
410 RUN signatory-variables.
412 RUN hpgl-get-codes( no, yes, OUTPUT variable-codes ).
414 END PROCEDURE.
416 /* _UIB-CODE-BLOCK-END */
417 &ANALYZE-RESUME
419 &ENDIF
421 &IF DEFINED(EXCLUDE-invoice-detail-prompts) = 0 &THEN
423 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE invoice-detail-prompts Procedure
424 PROCEDURE invoice-detail-prompts :
425 /*------------------------------------------------------------------------------
426 Purpose:
427 Parameters: <none>
428 Notes:
429 ------------------------------------------------------------------------------*/
431 RUN hpgl-moveto( 151, 271 ).
432 RUN hpgl-text( "Helvetica,Point,13,Proportional,Normal", "Voucher No:" ).
434 /* Invoice Detail Prompts */
435 RUN hpgl-moveto( 23, 246 ).
436 RUN hpgl-text( "Helvetica,Point,10,Proportional", "Creditor Number:" ).
437 RUN hpgl-move-relative( 51, 0 ).
438 RUN hpgl-text( hpgl-last-font, "Creditor Name:" ).
439 RUN hpgl-move-relative( -51, -8.5 ).
440 RUN hpgl-text( "Helvetica,Point,12,Proportional", "Invoice Details" ).
441 RUN hpgl-move-relative( 0, -7.2 ).
442 RUN hpgl-text( "Helvetica,Point,10,Proportional", "Invoice Number:" ).
443 RUN hpgl-move-relative( 0, -6 ).
444 RUN hpgl-text( hpgl-last-font, "Order Number:" ).
445 RUN hpgl-move-relative( 0, -6 ).
446 /* RUN hpgl-text( hpgl-last-font, "Capex Reference:" ). */
447 RUN hpgl-move-relative( 0, -10 ).
448 RUN hpgl-text( hpgl-last-font, "Description:" ).
450 RUN hpgl-move-relative( 68.5, 16 ).
451 RUN hpgl-text( hpgl-last-font, "Date:" ).
452 RUN hpgl-move-relative( 0, -6 ).
453 RUN hpgl-text( hpgl-last-font, "Approval:" ).
455 RUN hpgl-move-relative( 53.5, 12 ).
456 RUN hpgl-text( "Helvetica,Point,13,Proportional", "Value" ).
457 RUN hpgl-move-relative( 0, -6 ).
458 IF gst-applies THEN RUN hpgl-text( hpgl-last-font, "GST" ).
459 RUN hpgl-move-relative( 0, -6 ).
460 RUN hpgl-text( hpgl-last-font, "Total" ).
462 END PROCEDURE.
464 /* _UIB-CODE-BLOCK-END */
465 &ANALYZE-RESUME
467 &ENDIF
469 &IF DEFINED(EXCLUDE-invoice-detail-variables) = 0 &THEN
471 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE invoice-detail-variables Procedure
472 PROCEDURE invoice-detail-variables :
473 /*------------------------------------------------------------------------------
474 Purpose:
475 Parameters: <none>
476 Notes:
477 ------------------------------------------------------------------------------*/
479 RUN hpgl-moveto( 24, 289 ).
480 RUN hpgl-text( "Times,Point,6,Normal", "@LastModified@" ).
482 RUN hpgl-moveto( 181, 271 ).
483 RUN hpgl-text( "Times,Point,16,Proportional,Bold", "@VoucherNo@" ).
485 /* Invoice Detail Variables */
486 RUN hpgl-moveto( 53, 246 ).
487 RUN hpgl-text( "Times,Point,12,Proportional", "@Creditor@" ).
488 RUN hpgl-move-relative( 47, 0 ).
489 RUN hpgl-text( hpgl-last-font, "@CreditorName@" ).
490 RUN hpgl-move-relative( -43, -15 ).
491 RUN hpgl-text( hpgl-last-font, "@InvoiceNo@" ).
492 RUN hpgl-move-relative( 0, -6 ).
493 RUN hpgl-text( hpgl-last-font, "@OrderNo@" ).
494 RUN hpgl-move-relative( 0, -17 ).
495 RUN hpgl-text( hpgl-last-font, "@VoucherDescription@" ).
497 RUN hpgl-move-relative( 53, 16 ).
498 RUN hpgl-text( hpgl-last-font, "@Date@" ).
499 RUN hpgl-move-relative( 0, -6 ).
500 RUN hpgl-text( hpgl-last-font, "@Approval@" ).
502 RUN hpgl-move-relative( 54, 13 ).
503 RUN hpgl-text( "Courier,Fixed,cpi,12", "@Value@" ).
504 RUN hpgl-move-relative( 0, -6 ).
505 IF gst-applies THEN RUN hpgl-text( hpgl-last-font, "@GST@" ).
506 RUN hpgl-move-relative( 0, -6 ).
507 RUN hpgl-text( hpgl-last-font, "@Total@" ).
509 END PROCEDURE.
511 /* _UIB-CODE-BLOCK-END */
512 &ANALYZE-RESUME
514 &ENDIF
516 &IF DEFINED(EXCLUDE-notes-prompts) = 0 &THEN
518 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE notes-prompts Procedure
519 PROCEDURE notes-prompts :
520 /*------------------------------------------------------------------------------
521 Purpose:
522 Parameters: <none>
523 Notes:
524 ------------------------------------------------------------------------------*/
526 /* Notes */
527 DEF VAR i AS INT INIT 0 NO-UNDO.
528 RUN hpgl-moveto( 23, 198 ).
529 RUN hpgl-text( "Helvetica,Point,12,Proportional", "Notes:" ).
530 RUN hpgl-move-relative( 14, 0 ).
531 RUN hpgl-set-line-type( -2, 1, 1 ).
532 RUN hpgl-line-relative( 163, 0 ).
533 DO i = 1 TO 5:
534 RUN hpgl-move-relative( -177, -6 ).
535 RUN hpgl-line-relative( 177, 0 ).
536 END.
538 END PROCEDURE.
540 /* _UIB-CODE-BLOCK-END */
541 &ANALYZE-RESUME
543 &ENDIF
545 &IF DEFINED(EXCLUDE-print-boxes) = 0 &THEN
547 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE print-boxes Procedure
548 PROCEDURE print-boxes :
549 /*------------------------------------------------------------------------------
550 Purpose: Print the voucher approval boxes.
551 ------------------------------------------------------------------------------*/
553 RUN hpgl-moveto( 20, 205).
555 /* box 1 */
556 RUN hpgl-box-relative( 180, 38 ).
557 RUN hpgl-move-relative( 37, 19 ).
558 RUN hpgl-line-relative( 27, 0).
559 RUN hpgl-move-relative( -27, 6 ).
560 RUN hpgl-line-relative( 27, 0).
561 RUN hpgl-move-relative( -61, 6.5 ).
562 RUN hpgl-line-relative( 30, 0).
563 RUN hpgl-move-relative( 105.5, -12.5 ).
564 RUN hpgl-line-relative( 33, 0).
565 RUN hpgl-move-relative( 0, -8).
566 RUN hpgl-set-line-width( 0.5 ).
567 RUN hpgl-line-relative( -33, 0).
568 RUN hpgl-set-line-width( 0.25 ).
570 /* box 2 */
571 RUN hpgl-move-relative( -138.5, -56.5).
572 RUN hpgl-box-relative( 180, 7).
574 /* box 3 */
575 RUN hpgl-move-relative( 0, -41).
576 RUN hpgl-box-relative( 93, 31).
577 RUN hpgl-move-relative( 0, 6).
578 RUN hpgl-line-relative( 93, 0).
579 RUN hpgl-move-relative( -53, 0).
580 RUN hpgl-line-relative( 0, 25).
581 RUN hpgl-move-relative( 16.5, 0).
582 RUN hpgl-box-relative( 21.5, -25).
584 /* box 4 */
585 RUN hpgl-move-relative( -56, -54 ).
586 RUN hpgl-box-relative( 180, -45 ).
587 RUN hpgl-move-relative( 5, 0).
588 RUN hpgl-box-relative( 12, -45 ).
589 RUN hpgl-move-relative( 30, 0).
590 RUN hpgl-box-relative( 108, -45 ).
591 RUN hpgl-move-relative( 132, 0 ).
592 RUN hpgl-line-relative( 0, -45 ).
593 RUN hpgl-move-relative( 13, 41 ).
594 RUN hpgl-line-relative( -180, 0 ).
596 RUN hpgl-set-line-type( 2, 1, 1).
597 RUN hpgl-move-relative( 0, -5 ).
598 RUN hpgl-box-relative( 180, -6 ).
599 RUN hpgl-move-relative( 0, -12 ).
600 RUN hpgl-box-relative( 180, -6 ).
601 RUN hpgl-move-relative( 0, -12 ).
602 RUN hpgl-box-relative( 180, -6 ).
604 END PROCEDURE.
606 /* _UIB-CODE-BLOCK-END */
607 &ANALYZE-RESUME
609 &ENDIF
611 &IF DEFINED(EXCLUDE-print-continuation) = 0 &THEN
613 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE print-continuation Procedure
614 PROCEDURE print-continuation :
615 /*------------------------------------------------------------------------------
616 Purpose:
617 ------------------------------------------------------------------------------*/
618 DEF VAR i AS INT NO-UNDO INITIAL 0.
619 DEF VAR continuation-codes AS CHAR NO-UNDO.
621 RUN hpgl-initialize.
622 RUN office-logo.
623 RUN hpgl-set-line-width( 0.25 ).
624 RUN hpgl-moveto( 70, 256 ).
625 RUN hpgl-text( 'helvetica,point,20,proportional,bold', "Voucher Continuation" ).
626 RUN hpgl-moveto( 151, 271 ).
627 RUN hpgl-text( "Helvetica,Point,13,Proportional,Normal", "Voucher No:" ).
628 RUN hpgl-moveto( 181, 271 ).
629 RUN hpgl-text( "Times,Point,16,Proportional,Bold", STRING( Voucher.VoucherSeq, ">>>>>>>9" ) ).
631 RUN hpgl-moveto( 22, 240 ).
632 RUN hpgl-text( "Helvetica,Point,9,Proportional", "T" ).
633 RUN hpgl-move-relative( 6, 0 ).
634 RUN hpgl-text( hpgl-last-font, "Code" ).
635 RUN hpgl-move-relative( 12, 0 ).
636 RUN hpgl-text( hpgl-last-font, "Account" ).
637 RUN hpgl-move-relative( 19, 0 ).
638 RUN hpgl-text( hpgl-last-font, "Narrative" ).
639 RUN hpgl-move-relative( 116.5, 0 ).
640 RUN hpgl-text( hpgl-last-font, "$" ).
641 RUN hpgl-move-relative( 17.5, 0 ).
642 RUN hpgl-text( hpgl-last-font, "c" ).
644 RUN hpgl-moveto( 21.5, 230 ).
645 FOR EACH VoucherLine OF Voucher NO-LOCK:
646 i = i + 1.
647 IF i <= {&MAX-P1-ALLOC} THEN NEXT.
648 RUN each-voucherline.
649 END.
651 RUN hpgl-get-codes( no, yes, OUTPUT continuation-codes ).
652 PUT CONTROL continuation-codes.
654 RUN make-control-string ( "PCL", "eject",
655 OUTPUT prt-ctrl, OUTPUT rows, OUTPUT cols ).
656 PUT CONTROL prt-ctrl.
658 END PROCEDURE.
660 /* _UIB-CODE-BLOCK-END */
661 &ANALYZE-RESUME
663 &ENDIF
665 &IF DEFINED(EXCLUDE-print-prompts) = 0 &THEN
667 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE print-prompts Procedure
668 PROCEDURE print-prompts :
669 /*------------------------------------------------------------------------------
670 Purpose:
671 Parameters: <none>
672 Notes:
673 ------------------------------------------------------------------------------*/
675 RUN invoice-detail-prompts.
676 RUN notes-prompts.
677 RUN budget-prompts.
678 RUN recoverable-prompts.
679 RUN verification-prompts.
680 RUN transaction-prompts.
681 RUN approval-prompts.
683 END PROCEDURE.
685 /* _UIB-CODE-BLOCK-END */
686 &ANALYZE-RESUME
688 &ENDIF
690 &IF DEFINED(EXCLUDE-print-transactions) = 0 &THEN
692 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE print-transactions Procedure
693 PROCEDURE print-transactions :
694 /*------------------------------------------------------------------------------
695 Purpose:
696 Parameters: <none>
697 Notes:
698 ------------------------------------------------------------------------------*/
699 DEF VAR i AS INT NO-UNDO INITIAL 0.
701 hpgl-codes = "".
702 RUN hpgl-moveto( 21.5, 87.5 ).
703 FOR EACH VoucherLine OF Voucher NO-LOCK:
704 i = i + 1.
705 IF i > {&MAX-P1-ALLOC} THEN DO:
706 continued-on-attached = Yes.
707 RUN hpgl-move-relative( 48, 0 ).
708 RUN hpgl-text( "Helvetica,Point,12,Proportional,Bold",
709 "Continued On Attached Sheet" ).
710 LEAVE.
711 END.
712 RUN each-voucherline.
713 END.
715 RUN hpgl-get-codes( no, yes, OUTPUT transaction-codes ).
717 END PROCEDURE.
719 /* _UIB-CODE-BLOCK-END */
720 &ANALYZE-RESUME
722 &ENDIF
724 &IF DEFINED(EXCLUDE-recoverable-prompts) = 0 &THEN
726 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE recoverable-prompts Procedure
727 PROCEDURE recoverable-prompts :
728 /*------------------------------------------------------------------------------
729 Purpose:
730 Parameters: <none>
731 Notes:
732 ------------------------------------------------------------------------------*/
734 /* Recoverable Prompts */
735 RUN hpgl-moveto( 23, 145 ).
736 RUN hpgl-text( "Helvetica,Point,10,Proportional", "Recoverable:" ).
737 RUN hpgl-move-relative( 135, 0 ).
738 RUN hpgl-text( "Helvetica,Point,12,Proportional", "Due:" ).
739 RUN hpgl-move-relative( -135, -6 ).
740 RUN hpgl-text( "Helvetica,Point,10,Proportional", "Source:" ).
741 RUN hpgl-move-relative( 0, -6 ).
742 RUN hpgl-text( hpgl-last-font, "By Annual Rec:" ).
743 RUN hpgl-move-relative( 0, -6 ).
744 RUN hpgl-text( hpgl-last-font, "Outgoings Received:" ).
745 RUN hpgl-move-relative( 0, -7 ).
746 RUN hpgl-text( hpgl-last-font, "Percentage Recoverable:" ).
748 RUN hpgl-move-relative( 44, 25 ).
749 RUN hpgl-text( hpgl-last-font, "Y" ).
750 RUN hpgl-move-relative( -4, -6 ).
751 RUN hpgl-text( hpgl-last-font, "Lessee" ).
752 RUN hpgl-move-relative( 4, -6 ).
753 RUN hpgl-text( hpgl-last-font, "Y" ).
754 RUN hpgl-move-relative( 0, -6 ).
755 RUN hpgl-text( hpgl-last-font, "Y" ).
757 RUN hpgl-move-relative( 19, 18 ).
758 RUN hpgl-text( hpgl-last-font, "N" ).
759 RUN hpgl-move-relative( -6.5, -6 ).
760 RUN hpgl-text( hpgl-last-font, "Insurance" ).
761 RUN hpgl-move-relative( 6.5, -6 ).
762 RUN hpgl-text( hpgl-last-font, "N" ).
763 RUN hpgl-move-relative( 0, -6 ).
764 RUN hpgl-text( hpgl-last-font, "N" ).
766 RUN hpgl-move-relative( 16.5, 18 ).
767 RUN hpgl-text( hpgl-last-font, "Part" ).
768 RUN hpgl-move-relative( -1, -6 ).
769 RUN hpgl-text( hpgl-last-font, "Other" ).
770 RUN hpgl-move-relative( 1, -6 ).
771 RUN hpgl-text( hpgl-last-font, "N/A" ).
772 RUN hpgl-move-relative( 0, -6 ).
773 RUN hpgl-text( hpgl-last-font, "N/A" ).
775 END PROCEDURE.
777 /* _UIB-CODE-BLOCK-END */
778 &ANALYZE-RESUME
780 &ENDIF
782 &IF DEFINED(EXCLUDE-recoverable-variables) = 0 &THEN
784 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE recoverable-variables Procedure
785 PROCEDURE recoverable-variables :
786 /*------------------------------------------------------------------------------
787 Purpose:
788 Parameters: <none>
789 Notes:
790 ------------------------------------------------------------------------------*/
792 RUN hpgl-moveto( 170, 145 ).
793 RUN hpgl-text( "Times,Point,16,Proportional,Bold", "@DueDate@" ).
794 RUN hpgl-text( "Normal", "" ).
796 RUN hpgl-moveto( 65, 120 ).
797 RUN hpgl-text( "Times,Point,12,Proportional,Bold", "@Percentage@" ).
799 END PROCEDURE.
801 /* _UIB-CODE-BLOCK-END */
802 &ANALYZE-RESUME
804 &ENDIF
806 &IF DEFINED(EXCLUDE-replace-approvers) = 0 &THEN
808 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE replace-approvers Procedure
809 PROCEDURE replace-approvers :
810 /*------------------------------------------------------------------------------
811 Purpose:
812 Parameters: <none>
813 Notes:
814 ------------------------------------------------------------------------------*/
816 DEF VAR approver-1 AS CHAR NO-UNDO.
817 DEF VAR approver-2 AS CHAR NO-UNDO.
819 FIND FIRST Approver WHERE
820 Approver.ApproverCode = Voucher.ApproverCode AND
821 Approver.Active
822 NO-LOCK NO-ERROR.
824 IF AVAILABLE Approver THEN
826 FIND Person OF Approver NO-LOCK NO-ERROR.
827 IF AVAILABLE Person THEN approver-1 = Person.FirstName + " " + Person.LastName.
828 END.
830 FIND FIRST Approver WHERE
831 Approver.ApproverCode = Voucher.SecondApprover AND
832 Approver.Active
833 NO-LOCK NO-ERROR.
835 IF AVAILABLE Approver THEN DO:
836 FIND Person OF Approver NO-LOCK NO-ERROR.
837 IF AVAILABLE Person THEN approver-2 = Person.FirstName + " " + Person.LastName.
838 END.
840 RUN hpgl-replace( "@Certified Correct@", IF Voucher.SecondApprover = "" THEN "" ELSE approver-1 ).
841 RUN hpgl-replace( "@Payment Approval@", IF Voucher.SecondApprover = "" THEN approver-1 ELSE approver-2 ).
843 END PROCEDURE.
845 /* _UIB-CODE-BLOCK-END */
846 &ANALYZE-RESUME
848 &ENDIF
850 &IF DEFINED(EXCLUDE-replace-budgets) = 0 &THEN
852 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE replace-budgets Procedure
853 PROCEDURE replace-budgets :
854 /*------------------------------------------------------------------------------
855 Purpose:
856 Parameters: <none>
857 Notes:
858 ------------------------------------------------------------------------------*/
860 DEF VAR ytd-actual AS DEC NO-UNDO.
861 DEF VAR ytd-budget AS DEC NO-UNDO.
862 DEF VAR fy-budget AS DEC NO-UNDO.
864 DEF VAR first-month LIKE Month.MonthCode NO-UNDO.
865 DEF VAR last-month LIKE Month.MonthCode NO-UNDO.
866 DEF VAR this-month LIKE Month.MonthCode NO-UNDO.
868 IF LOOKUP( Voucher.EntityType, "P,L" ) = 0 THEN
870 RUN hpgl-replace( "@YTD Actual@", "" ).
871 RUN hpgl-replace( "@YTD Budget@", "" ).
872 RUN hpgl-replace( "@FY Budget@", "" ).
873 RETURN.
874 END.
876 FIND FIRST Month WHERE Month.StartDate <= Voucher.Date AND Month.EndDate >= Voucher.Date
877 NO-LOCK NO-ERROR.
878 FIND FinancialYear OF Month NO-LOCK NO-ERROR.
880 IF AVAILABLE FinancialYear THEN
882 this-month = Month.MonthCode.
883 FIND FIRST Month OF FinancialYear NO-LOCK. first-month = Month.MonthCode.
884 FIND LAST Month OF FinancialYear NO-LOCK. last-month = Month.MonthCode.
886 FOR EACH AccountBalance NO-LOCK WHERE
887 AccountBalance.EntityType = Voucher.EntityType AND
888 AccountBalance.EntityCode = Voucher.EntityCode AND
889 AccountBalance.AccountCode = Voucher.AccountCode AND
890 AccountBalance.MonthCode >= first-month AND
891 AccountBalance.MonthCode <= last-month:
892 IF AccountBalance.MonthCode <= this-month THEN
893 ASSIGN
894 ytd-actual = ytd-actual + AccountBalance.Balance
895 ytd-budget = ytd-budget + AccountBalance.Budget.
896 fy-budget = fy-budget + AccountBalance.Budget.
897 END.
899 END.
901 RUN hpgl-replace( "@YTD Actual@", TRIM( STRING( ytd-actual, "$>>>,>>>,>>9.99CR" ) ) ).
902 RUN hpgl-replace( "@YTD Budget@", TRIM( STRING( ytd-budget, "$>>>,>>>,>>9.99CR" ) ) ).
903 RUN hpgl-replace( "@FY Budget@", TRIM( STRING( fy-budget, "$>>>,>>>,>>9.99CR" ) ) ).
905 END PROCEDURE.
907 /* _UIB-CODE-BLOCK-END */
908 &ANALYZE-RESUME
910 &ENDIF
912 &IF DEFINED(EXCLUDE-replace-entity) = 0 &THEN
914 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE replace-entity Procedure
915 PROCEDURE replace-entity :
916 /*------------------------------------------------------------------------------
917 Purpose:
918 Parameters: <none>
919 Notes:
920 ------------------------------------------------------------------------------*/
922 DEF VAR entity-name AS CHAR NO-UNDO.
923 DEF VAR entity-type AS CHAR NO-UNDO.
925 CASE Voucher.EntityType:
927 WHEN 'L' THEN DO:
928 FIND Company WHERE Company.CompanyCode = Voucher.EntityCode NO-LOCK NO-ERROR.
929 IF AVAILABLE Company THEN entity-name = Company.LegalName.
930 entity-type = "Company".
931 END.
933 WHEN 'P' THEN DO:
934 FIND Property WHERE Property.PropertyCode = Voucher.EntityCode NO-LOCK NO-ERROR.
935 IF AVAILABLE Property THEN entity-name = Property.Name.
936 entity-type = "Property".
937 END.
939 WHEN 'T' THEN DO:
940 FIND Tenant WHERE Tenant.TenantCode = Voucher.EntityCode NO-LOCK NO-ERROR.
941 IF AVAILABLE Tenant THEN entity-name = Tenant.Name.
942 entity-type = "Tenant".
943 END.
945 WHEN 'J' THEN DO:
946 FIND Project WHERE Project.ProjectCode = Voucher.EntityCode NO-LOCK NO-ERROR.
947 IF AVAILABLE Project THEN entity-name = Project.Name.
948 entity-type = "Project".
949 END.
951 END.
953 FIND ChartOfAccount WHERE ChartOfAccount.AccountCode = Voucher.AccountCode
954 NO-LOCK NO-ERROR.
956 IF AVAILABLE ChartOfAccount AND entity-name <> "" THEN
957 entity-name = entity-name + ", " + ChartOfAccount.Name.
959 DEF VAR normal AS CHAR NO-UNDO.
960 RUN make-control-string( "PCL", "Courier,Point,12,Proportional,Bold", OUTPUT prt-ctrl, OUTPUT rows, OUTPUT cols ).
961 RUN make-control-string( "PCL", "Courier,Point,12,Proportional,Normal", OUTPUT normal, OUTPUT rows, OUTPUT cols ).
962 RUN hpgl-replace( "@Entity@", entity-type + ": " + prt-ctrl + entity-name + normal ).
964 END PROCEDURE.
966 /* _UIB-CODE-BLOCK-END */
967 &ANALYZE-RESUME
969 &ENDIF
971 &IF DEFINED(EXCLUDE-replace-percentage-recoverable) = 0 &THEN
973 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE replace-percentage-recoverable Procedure
974 PROCEDURE replace-percentage-recoverable :
975 /*------------------------------------------------------------------------------
976 Purpose:
977 Parameters: <none>
978 Notes:
979 ------------------------------------------------------------------------------*/
981 DEF VAR percent-recoverable AS DEC NO-UNDO.
983 FIND ChartOfAccount WHERE ChartOfAccount.AccountCode = Voucher.AccountCode
984 NO-LOCK NO-ERROR.
985 FIND AccountGroup OF ChartOfAccount NO-LOCK NO-ERROR.
987 /* 0% recoverable expense if balance sheet account or non recoverable account */
988 IF AVAILABLE(AccountGroup) AND
989 ( AccountGroup.GroupType = "B" OR
990 AccountGroup.AccountGroupCode = AcctGroup-ownex )
991 THEN percent-recoverable = 0.
992 ELSE DO:
993 IF AVAILABLE AccountGroup AND AccountGroup.AccountGroupCode = "TENEX" THEN
994 percent-recoverable = 100.00.
995 ELSE IF Voucher.EntityType = "P" THEN DO:
996 FIND Property WHERE Property.PropertyCode = Voucher.EntityCode
997 NO-LOCK NO-ERROR.
998 FOR EACH TenancyLease OF Property NO-LOCK WHERE TenancyLease.LeaseStatus <> "PAST" AND NOT TenancyLease.GrossLease:
999 FIND FIRST TenancyOutgoing OF TenancyLease WHERE TenancyOutgoing.AccountCode = Voucher.AccountCode NO-LOCK NO-ERROR.
1000 percent-recoverable = percent-recoverable + (IF AVAILABLE(TenancyOutgoing) THEN TenancyOutgoing.Percentage ELSE TenancyLease.OutgoingsRate ).
1001 END.
1002 END. /* EntityType = "P" */
1003 END.
1006 RUN hpgl-replace( "@Percentage@", TRIM( STRING( percent-recoverable, ">>9.99%" ) ) ).
1009 RUN hpgl-replace( "@Percentage@", "" ).
1012 END PROCEDURE.
1014 /* _UIB-CODE-BLOCK-END */
1015 &ANALYZE-RESUME
1017 &ENDIF
1019 &IF DEFINED(EXCLUDE-signatory-variables) = 0 &THEN
1021 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE signatory-variables Procedure
1022 PROCEDURE signatory-variables :
1023 /*------------------------------------------------------------------------------
1024 Purpose:
1025 ------------------------------------------------------------------------------*/
1027 DEF VAR approver-list AS CHAR NO-UNDO.
1029 FIND Office WHERE Office.ThisOffice NO-LOCK.
1030 FIND OfficeSettings OF Office WHERE
1031 OfficeSettings.SetName = "VOUCHER-SIGN" NO-LOCK.
1033 approver-list = OfficeSettings.SetValue.
1035 DEF VAR n AS DEC NO-UNDO.
1036 DEF VAR box-width AS DEC NO-UNDO.
1037 DEF VAR box-height AS DEC NO-UNDO.
1038 DEF VAR gap-width AS DEC NO-UNDO.
1040 n = NUM-ENTRIES( approver-list ).
1041 box-width = ( 3 / ( 4 * n - 1 ) ) * 180.
1042 gap-width = box-width / 3.
1043 box-height = 9.
1045 DEF VAR i AS INT NO-UNDO.
1046 RUN hpgl-moveto( 21, 13 ).
1047 RUN hpgl-append( "LT" ). /* Solid Line */
1048 DO i = 1 TO n:
1049 RUN hpgl-box-relative( box-width, box-height ).
1050 RUN hpgl-move-relative( 1, 1 ).
1051 RUN hpgl-text( "Helvetica,Point,10,Proportional", ENTRY( i, approver-list ) ).
1052 RUN hpgl-move-relative( box-width + gap-width - 1 , -1 ).
1053 END.
1055 END PROCEDURE.
1057 /* _UIB-CODE-BLOCK-END */
1058 &ANALYZE-RESUME
1060 &ENDIF
1062 &IF DEFINED(EXCLUDE-transaction-prompts) = 0 &THEN
1064 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE transaction-prompts Procedure
1065 PROCEDURE transaction-prompts :
1066 /*------------------------------------------------------------------------------
1067 Purpose:
1068 Parameters: <none>
1069 Notes:
1070 ------------------------------------------------------------------------------*/
1072 /* Transaction Prompts */
1073 RUN hpgl-moveto( 22, 92.3 ).
1074 RUN hpgl-text( "Helvetica,Point,9,Proportional", "T" ).
1075 RUN hpgl-move-relative( 6, 0 ).
1076 RUN hpgl-text( hpgl-last-font, "Code" ).
1077 RUN hpgl-move-relative( 12, 0 ).
1078 RUN hpgl-text( hpgl-last-font, "Account" ).
1079 RUN hpgl-move-relative( 19, 0 ).
1080 RUN hpgl-text( hpgl-last-font, "Narrative" ).
1081 RUN hpgl-move-relative( 116.5, 0 ).
1082 RUN hpgl-text( hpgl-last-font, "$" ).
1083 RUN hpgl-move-relative( 17.5, 0 ).
1084 RUN hpgl-text( hpgl-last-font, "c" ).
1086 END PROCEDURE.
1088 /* _UIB-CODE-BLOCK-END */
1089 &ANALYZE-RESUME
1091 &ENDIF
1093 &IF DEFINED(EXCLUDE-variable-replacements) = 0 &THEN
1095 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE variable-replacements Procedure
1096 PROCEDURE variable-replacements :
1097 /*------------------------------------------------------------------------------
1098 Purpose:
1099 Parameters: <none>
1100 Notes:
1101 ------------------------------------------------------------------------------*/
1103 hpgl-codes = variable-codes.
1105 RUN hpgl-replace( "@LastModified@",
1106 IF Voucher.LastModifiedUser = ? THEN "Unknown" ELSE Voucher.LastModifiedUser + ' - ' +
1107 STRING( Voucher.LastModifiedDate, "99/99/9999" ) + ' ' +
1108 STRING( Voucher.LastModifiedTime, "HH:MM:SS" ) ).
1109 RUN hpgl-replace( "@VoucherNo@", STRING( Voucher.VoucherSeq, ">>>>>>>9" ) ).
1111 FIND Creditor OF Voucher NO-LOCK NO-ERROR.
1112 RUN hpgl-replace( "@Creditor@", IF AVAILABLE Creditor THEN
1113 STRING( Creditor.CreditorCode, "99999" ) ELSE "" ).
1114 RUN hpgl-replace( "@CreditorName@", IF AVAILABLE Creditor THEN
1115 Creditor.Name ELSE "" ).
1117 RUN hpgl-replace( "@InvoiceNo@", Voucher.InvoiceReference ).
1118 RUN hpgl-replace( "@OrderNo@", IF Voucher.OurOrderNo = ? THEN "" ELSE Voucher.OurOrderNo ).
1119 RUN hpgl-replace( "@CapexRef@", STRING( Voucher.CapexCode, "99999" ) ).
1120 RUN hpgl-replace( "@VoucherDescription@", Voucher.Description ).
1121 RUN hpgl-replace( "@Date@", IF Voucher.Date = ? THEN "" ELSE
1122 STRING( Voucher.Date, "99/99/9999" ) ).
1123 RUN hpgl-replace( "@Approval@", Voucher.ApproverCode ).
1124 RUN hpgl-replace( "@Value@", STRING( Voucher.GoodsValue, ">>,>>>,>>9.99CR" ) ).
1125 IF gst-applies THEN
1126 RUN hpgl-replace( "@GST@", STRING( Voucher.TaxValue, ">>,>>>,>>9.99CR" ) ).
1127 RUN hpgl-replace( "@Total@", STRING( Voucher.GoodsValue + Voucher.TaxValue, ">>,>>>,>>9.99CR" ) ).
1129 RUN replace-budgets.
1130 RUN replace-entity.
1131 RUN replace-percentage-recoverable.
1133 RUN hpgl-replace( "@DueDate@", IF Voucher.DateDue = ? THEN "" ELSE
1134 STRING( Voucher.DateDue, "99/99/9999" ) ).
1136 RUN replace-approvers.
1138 END PROCEDURE.
1140 /* _UIB-CODE-BLOCK-END */
1141 &ANALYZE-RESUME
1143 &ENDIF
1145 &IF DEFINED(EXCLUDE-verification-prompts) = 0 &THEN
1147 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE verification-prompts Procedure
1148 PROCEDURE verification-prompts :
1149 /*------------------------------------------------------------------------------
1150 Purpose:
1151 Parameters: <none>
1152 Notes:
1153 ------------------------------------------------------------------------------*/
1155 /* Verification Prompts */
1156 RUN hpgl-moveto( 23, 110 ).
1157 RUN hpgl-text( "Helvetica,Point,12,Proportional", "Invoice Numbers( office use only ):" ).
1158 RUN hpgl-move-relative( 71, 0 ).
1159 RUN hpgl-line-relative( 106, 0 ).
1160 RUN hpgl-move-relative( -177, -9 ).
1161 RUN hpgl-text( hpgl-last-font, "Extensions Checked:" ).
1162 RUN hpgl-move-relative( 44, 0 ).
1163 RUN hpgl-line-relative( 43, 0 ).
1164 RUN hpgl-move-relative( 4, 0 ).
1165 RUN hpgl-text( hpgl-last-font, "Coding Verified:" ).
1166 RUN hpgl-move-relative( 34, 0 ).
1167 RUN hpgl-line-relative( 52, 0 ).
1169 END PROCEDURE.
1171 /* _UIB-CODE-BLOCK-END */
1172 &ANALYZE-RESUME
1174 &ENDIF
1176 &IF DEFINED(EXCLUDE-voucher-approval-forms) = 0 &THEN
1178 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE voucher-approval-forms Procedure
1179 PROCEDURE voucher-approval-forms :
1180 /*------------------------------------------------------------------------------
1181 Purpose:
1182 Parameters: <none>
1183 Notes:
1184 ------------------------------------------------------------------------------*/
1186 RUN get-fixed-codes.
1187 RUN get-variables.
1189 /* The voucher-dependent parts of the page */
1190 DEF VAR i AS INT NO-UNDO.
1192 IF voucher-list <> ? THEN
1193 DO i = 1 TO NUM-ENTRIES( voucher-list ):
1194 FIND Voucher WHERE
1195 Voucher.VoucherSeq = INT ( ENTRY( i, voucher-list ) ) NO-LOCK NO-ERROR.
1196 IF AVAILABLE Voucher THEN RUN each-voucher.
1197 END.
1199 IF voucher-start <> ? AND voucher-end <> ? THEN
1200 FOR EACH Voucher NO-LOCK WHERE
1201 Voucher.VoucherSeq >= voucher-start AND
1202 Voucher.VoucherSeq <= voucher-end:
1203 RUN each-voucher.
1204 END.
1206 END PROCEDURE.
1208 /* _UIB-CODE-BLOCK-END */
1209 &ANALYZE-RESUME
1211 &ENDIF
1213 &IF DEFINED(EXCLUDE-voucher-entity-name) = 0 &THEN
1215 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE voucher-entity-name Procedure
1216 PROCEDURE voucher-entity-name :
1217 /*------------------------------------------------------------------------------
1218 Purpose:
1219 ------------------------------------------------------------------------------*/
1221 DEF OUTPUT PARAMETER entity-name AS CHAR NO-UNDO INITIAL "Unknown".
1223 IF VoucherLine.EntityType = "L" THEN DO:
1224 FIND Company WHERE Company.CompanyCode = VoucherLine.EntityCode NO-LOCK NO-ERROR.
1225 IF AVAILABLE Company THEN entity-name = SUBSTR( Company.ShortName, 1, 12 ).
1226 END.
1227 ELSE
1228 entity-name = get-entity-name( VoucherLine.EntityType, VoucherLine.EntityCode ).
1230 entity-name = SUBSTR( entity-name, 1, 12 ).
1232 END PROCEDURE.
1234 /* _UIB-CODE-BLOCK-END */
1235 &ANALYZE-RESUME
1237 &ENDIF