From 7862c0a612e79d1af34f9819fde6240cdb67990a Mon Sep 17 00:00:00 2001 From: chris Date: Fri, 26 Oct 2007 14:00:05 +1300 Subject: [PATCH] Changes for Catalyst APMS. Added PDF checkboxes to screens the generate remittance advice. Also corrected file name of PDF for remittance. --- process/report/remittance.p | 2 +- vwr/mnt/v-chqrep.w | 37 +++++++++++++++++++++++++++++++++++-- vwr/mnt/v-chqrun.w | 1 - 3 files changed, 36 insertions(+), 4 deletions(-) diff --git a/process/report/remittance.p b/process/report/remittance.p index 246b6fd..ff54c5a 100644 --- a/process/report/remittance.p +++ b/process/report/remittance.p @@ -412,7 +412,7 @@ PROCEDURE print-cheques : /* If in PDF mode then open a new PDF file per cheque number */ IF output-to-pdf THEN DO: - RUN txtrep-pdf-filename( 'Cheque-' + STRING( Cheque.ChequeNo ) ). + RUN txtrep-pdf-filename( 'Remittance-' + STRING( Cheque.ChequeNo ) ). OUTPUT TO VALUE(txtrep-print-file) KEEP-MESSAGES PAGE-SIZE 0. END. diff --git a/vwr/mnt/v-chqrep.w b/vwr/mnt/v-chqrep.w index 7f54772..3d8dddf 100644 --- a/vwr/mnt/v-chqrep.w +++ b/vwr/mnt/v-chqrep.w @@ -20,11 +20,17 @@ CREATE WIDGET-POOL. &SCOPED-DEFINE REPORT-ID "Cheque Reprint" DEF BUFFER ToBank FOR BankAccount. +DEF VAR pdf-support AS LOGICAL INIT YES NO-UNDO. +DEF VAR pdf-output AS LOGICAL INIT NO NO-UNDO. {inc/ofc-this.i} {inc/method/m-bankimportfile-gen.i} +{inc/ofc-set.i "PDF-Output-Directory" "pdf-output-directory"} +IF NOT AVAILABLE(OfficeSetting) THEN + pdf-support = NO. + /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME @@ -54,12 +60,13 @@ RP.Log2 RP.Date1 RP.Char1 RP.Log3 RP.Log7 RP.Char3 &Scoped-define ENABLED-TABLES RP &Scoped-define FIRST-ENABLED-TABLE RP &Scoped-Define ENABLED-OBJECTS cmb_bnkact cmb_PaymentStyle cmb_bnkact-2 ~ -btn-select-file btn_print RECT-27 +btn-select-file btn_print cbx_pdfoutput RECT-27 &Scoped-Define DISPLAYED-FIELDS RP.Int1 RP.Int2 RP.Log4 RP.Log1 RP.Int3 ~ RP.Log2 RP.Date1 RP.Char1 RP.Log3 RP.Log7 RP.Char3 &Scoped-define DISPLAYED-TABLES RP &Scoped-define FIRST-DISPLAYED-TABLE RP -&Scoped-Define DISPLAYED-OBJECTS cmb_bnkact cmb_PaymentStyle cmb_bnkact-2 +&Scoped-Define DISPLAYED-OBJECTS cmb_bnkact cmb_PaymentStyle cmb_bnkact-2 ~ +cbx_pdfoutput /* Custom List Definitions */ /* ADM-CREATE-FIELDS,ADM-ASSIGN-FIELDS,List-3,List-4,List-5,List-6 */ @@ -83,6 +90,11 @@ DEFINE BUTTON btn_print DEFAULT SIZE 9.43 BY .9 FONT 9. +DEFINE VARIABLE cbx_pdfoutput AS LOGICAL INITIAL no + LABEL "PDF remittance" + VIEW-AS TOGGLE-BOX + SIZE 14 BY .8 TOOLTIP "Generate the remittance advice from this cheque batch in PDF format" NO-UNDO. + DEFINE VARIABLE cmb_bnkact AS CHARACTER FORMAT "X(256)":U VIEW-AS COMBO-BOX INNER-LINES 5 DROP-DOWN-LIST @@ -162,6 +174,7 @@ DEFINE FRAME F-Main SIZE 46.29 BY 1 btn-select-file AT ROW 16.4 COL 58.72 btn_print AT ROW 17.75 COL 56.86 + cbx_pdfoutput AT ROW 17.95 COL 42.86 RECT-27 AT ROW 1 COL 1 "To Bank A/C:" VIEW-AS TEXT SIZE 9.72 BY .8 AT ROW 6.75 COL 4.43 @@ -308,6 +321,19 @@ END. &ANALYZE-RESUME +&Scoped-define SELF-NAME cbx_pdfoutput +&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL cbx_pdfoutput V-table-Win +ON VALUE-CHANGED OF cbx_pdfoutput IN FRAME F-Main /* OK */ +DO: +DO WITH FRAME {&FRAME-NAME}: + pdf-output = cbx_pdfoutput:CHECKED IN FRAME {&FRAME-NAME}. +END. +END. + +/* _UIB-CODE-BLOCK-END */ +&ANALYZE-RESUME + + &Scoped-define SELF-NAME RP.Char3 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL RP.Char3 V-table-Win ON LEAVE OF RP.Char3 IN FRAME F-Main /* Directory */ @@ -502,6 +528,10 @@ END. /* *************************** Main Block *************************** */ +IF NOT pdf-support THEN DO: + cbx_pdfoutput:VISIBLE IN FRAME {&FRAME-NAME} = NO. +END. + /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME @@ -986,6 +1016,9 @@ modify-cheques: IF RP.Log7 AND LENGTH(RP.Char3) > 0 THEN report-options = report-options + "~nWriteBankImportFileTo," + RP.Char3. + IF pdf-output THEN + report-options = report-options + "~nOutputPDF". + RUN process/report/chqprt.p( report-options ). END. diff --git a/vwr/mnt/v-chqrun.w b/vwr/mnt/v-chqrun.w index b6255ec..c242f29 100644 --- a/vwr/mnt/v-chqrun.w +++ b/vwr/mnt/v-chqrun.w @@ -525,7 +525,6 @@ END. /* *************************** Main Block *************************** */ IF NOT pdf-support THEN DO: - MESSAGE "PDF not enabled". cbx_pdfoutput:VISIBLE IN FRAME {&FRAME-NAME} = NO. END. -- 2.11.4.GIT