1 &ANALYZE-SUSPEND _VERSION-NUMBER UIB_v8r12 GUI ADM1
6 &Scoped-define WINDOW-NAME CURRENT-WINDOW
7 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS V-table-Win
8 /*------------------------------------------------------------------------
11 ------------------------------------------------------------------------*/
15 /* *************************** Definitions
************************** */
16 DEF VAR key-name
AS CHAR NO-UNDO.
17 DEF VAR key-value
AS CHAR NO-UNDO.
18 DEF VAR bank-account
AS CHAR NO-UNDO.
19 DEF VAR mode
AS CHAR NO-UNDO.
22 {inc
/ofc-acct.i
"CREDITORS" "sundry-creditors"}
24 /* _UIB-CODE-BLOCK-END
*/
28 &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
30 /* ******************** Preprocessor Definitions
******************** */
32 &Scoped-define PROCEDURE-TYPE SmartViewer
33 &Scoped-define DB-AWARE no
35 &Scoped-define ADM-SUPPORTED-LINKS Record-Source,Record-Target,TableIO-Target
37 /* Name of first Frame and
/or Browse and
/or first Query
*/
38 &Scoped-define FRAME-NAME F-Main
41 &Scoped-define EXTERNAL-TABLES Cheque
42 &Scoped-define FIRST-EXTERNAL-TABLE Cheque
45 /* Need to scope the external tables to this procedure
*/
46 DEFINE QUERY external_tables
FOR Cheque.
47 /* Standard List Definitions
*/
48 &Scoped-Define ENABLED-FIELDS Cheque.DatePresented
49 &Scoped-define ENABLED-TABLES Cheque
50 &Scoped-define FIRST-ENABLED-TABLE Cheque
51 &Scoped-define DISPLAYED-TABLES Cheque
52 &Scoped-define FIRST-DISPLAYED-TABLE Cheque
53 &Scoped-Define ENABLED-OBJECTS RECT-1
54 &Scoped-Define DISPLAYED-FIELDS Cheque.CreditorCode Cheque.PayeeName ~
55 Cheque.BankAccountCode Cheque.ChequeNo Cheque.Date Cheque.BatchCode ~
56 Cheque.DatePresented Cheque.DocumentCode Cheque.Cancelled Cheque.Amount
57 &Scoped-Define DISPLAYED-OBJECTS fil_CreditorName fil_BankDescription
59 /* Custom List Definitions
*/
60 /* ADM-CREATE-FIELDS
,ADM-ASSIGN-FIELDS
,List-3
,List-4
,List-5
,List-6
*/
62 /* _UIB-PREPROCESSOR-BLOCK-END
*/
67 /* *********************** Control Definitions
********************** */
70 /* Definitions of the field level widgets
*/
71 DEFINE VARIABLE fil_BankDescription
AS CHARACTER FORMAT "X(256)":U
76 DEFINE VARIABLE fil_CreditorName
AS CHARACTER FORMAT "X(256)":U
81 DEFINE RECTANGLE RECT-1
82 EDGE-PIXELS 2 GRAPHIC-EDGE NO-FILL
86 /* ************************ Frame Definitions
*********************** */
89 Cheque.CreditorCode
AT ROW 1.2 COL 11 COLON-ALIGNED
93 fil_CreditorName
AT ROW 1.2 COL 17.86 COLON-ALIGNED NO-LABEL
94 Cheque.PayeeName
AT ROW 2.2 COL 11 COLON-ALIGNED
99 Cheque.BankAccountCode
AT ROW 3.2 COL 11 COLON-ALIGNED
103 fil_BankDescription
AT ROW 3.2 COL 17.86 COLON-ALIGNED NO-LABEL
104 Cheque.ChequeNo
AT ROW 4.2 COL 11 COLON-ALIGNED
108 Cheque.Date
AT ROW 4.2 COL 36.72 COLON-ALIGNED
113 Cheque.BatchCode
AT ROW 4.2 COL 80.01 RIGHT-ALIGNED
114 LABEL "Batch" FORMAT "99999"
118 Cheque.DatePresented
AT ROW 5.2 COL 36.72 COLON-ALIGNED
123 Cheque.DocumentCode
AT ROW 5.2 COL 72.72 COLON-ALIGNED
128 Cheque.Cancelled
AT ROW 6.4 COL 11 COLON-ALIGNED
132 Cheque.Amount
AT ROW 6.4 COL 61.86 COLON-ALIGNED FORMAT "ZZZ,ZZZ,ZZ9.99"
136 RECT-1
AT ROW 1 COL 1
137 WITH 1 DOWN NO-BOX KEEP-TAB-ORDER OVERLAY
138 SIDE-LABELS NO-UNDERLINE THREE-D
139 AT COL 1 ROW 1 SCROLLABLE .
142 /* *********************** Procedure Settings
************************ */
144 &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
145 /* Settings for
THIS-PROCEDURE
147 External Tables
: ttpl.Cheque
148 Allow
: Basic
,DB-Fields
150 Add Fields to
: EXTERNAL-TABLES
151 Other Settings
: PERSISTENT-ONLY
COMPILE
154 /* This procedure should always be
RUN PERSISTENT. Report the error
, */
155 /* then cleanup and return.
*/
156 IF NOT THIS-PROCEDURE:PERSISTENT THEN DO:
157 MESSAGE "{&FILE-NAME} should only be RUN PERSISTENT.":U
158 VIEW-AS ALERT-BOX ERROR BUTTONS OK.
162 &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
164 /* ************************* Create Window
************************** */
166 &ANALYZE-SUSPEND _CREATE-WINDOW
167 /* DESIGN Window definition
(used by the UIB
)
168 CREATE WINDOW V-table-Win
ASSIGN
171 /* END WINDOW DEFINITION
*/
175 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB V-table-Win
176 /* ************************* Included-Libraries
*********************** */
178 {src
/adm
/method
/viewer.i
}
179 {inc
/method
/m-drlvwr.i
}
181 /* _UIB-CODE-BLOCK-END
*/
187 /* *********** Runtime Attributes and AppBuilder Settings
*********** */
189 &ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES
190 /* SETTINGS
FOR WINDOW V-table-Win
191 VISIBLE,,RUN-PERSISTENT
*/
192 /* SETTINGS
FOR FRAME F-Main
193 NOT-VISIBLE Size-to-Fit
*/
195 FRAME F-Main
:SCROLLABLE = FALSE
196 FRAME F-Main
:HIDDEN = TRUE.
198 /* SETTINGS
FOR FILL-IN Cheque.Amount
IN FRAME F-Main
199 NO-ENABLE EXP-FORMAT
*/
200 /* SETTINGS
FOR FILL-IN Cheque.BankAccountCode
IN FRAME F-Main
202 /* SETTINGS
FOR FILL-IN Cheque.BatchCode
IN FRAME F-Main
203 NO-ENABLE ALIGN-R EXP-LABEL EXP-FORMAT
*/
204 /* SETTINGS
FOR FILL-IN Cheque.Cancelled
IN FRAME F-Main
206 /* SETTINGS
FOR FILL-IN Cheque.ChequeNo
IN FRAME F-Main
208 /* SETTINGS
FOR FILL-IN Cheque.CreditorCode
IN FRAME F-Main
210 /* SETTINGS
FOR FILL-IN Cheque.Date
IN FRAME F-Main
211 NO-ENABLE EXP-LABEL
*/
212 /* SETTINGS
FOR FILL-IN Cheque.DatePresented
IN FRAME F-Main
214 /* SETTINGS
FOR FILL-IN Cheque.DocumentCode
IN FRAME F-Main
215 NO-ENABLE EXP-LABEL
*/
216 /* SETTINGS
FOR FILL-IN fil_BankDescription
IN FRAME F-Main
218 /* SETTINGS
FOR FILL-IN fil_CreditorName
IN FRAME F-Main
220 /* SETTINGS
FOR FILL-IN Cheque.PayeeName
IN FRAME F-Main
221 NO-ENABLE EXP-LABEL
*/
222 /* _RUN-TIME-ATTRIBUTES-END
*/
226 /* Setting information for Queries and Browse Widgets fields
*/
228 &ANALYZE-SUSPEND _QUERY-BLOCK FRAME F-Main
229 /* Query rebuild information for
FRAME F-Main
232 */ /* FRAME F-Main
*/
239 /* ************************ Control Triggers
************************ */
241 &Scoped-define SELF-NAME Cheque.DatePresented
242 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL Cheque.DatePresented V-table-Win
243 ON ANY-KEY
OF Cheque.DatePresented
IN FRAME F-Main
/* Presented On
*/
245 IF LAST-EVENT:LABEL = "DEL" THEN DO:
246 SELF:SCREEN-VALUE = "".
252 /* _UIB-CODE-BLOCK-END
*/
258 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK V-table-Win
261 /* *************************** Main Block
*************************** */
263 /* _UIB-CODE-BLOCK-END
*/
267 /* ********************** Internal Procedures
*********************** */
269 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE adm-row-available V-table-Win _ADM-ROW-AVAILABLE
270 PROCEDURE adm-row-available
:
271 /*------------------------------------------------------------------------------
272 Purpose
: Dispatched to this procedure when the Record-
273 Source has a new row available. This procedure
274 tries to get the new row
(or foriegn keys
) from
275 the Record-Source and process it.
277 ------------------------------------------------------------------------------*/
279 /* Define variables needed by this internal procedure.
*/
280 {src
/adm
/template
/row-head.i
}
282 /* Create a list of all the tables that we need to get.
*/
283 {src
/adm
/template
/row-list.i
"Cheque"}
285 /* Get the record
ROWID's from the RECORD-SOURCE.
*/
286 {src
/adm
/template
/row-get.i
}
288 /* FIND each record specified by the RECORD-SOURCE.
*/
289 {src
/adm
/template
/row-find.i
"Cheque"}
291 /* Process the newly available records
(i.e. display fields
,
292 open queries
, and
/or pass records on to any RECORD-TARGETS
).
*/
293 {src
/adm
/template
/row-end.i
}
297 /* _UIB-CODE-BLOCK-END
*/
300 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE cancel-changes V-table-Win
301 PROCEDURE cancel-changes
:
302 /*------------------------------------------------------------------------------
304 ------------------------------------------------------------------------------*/
305 RUN check-modified
( 'clear'
:U
).
306 RUN dispatch
( 'exit'
:U
).
309 /* _UIB-CODE-BLOCK-END
*/
312 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE cancel-cheque V-table-Win
313 PROCEDURE cancel-cheque
:
314 /*------------------------------------------------------------------------------
315 Purpose
: Cancel the cheque.
316 ------------------------------------------------------------------------------*/
317 DEF VAR yes-do-it
AS LOGICAL INITIAL no
NO-UNDO.
318 DEF VAR cheque-month
LIKE Month.MonthCode
INITIAL ?
NO-UNDO.
319 DEF VAR closing-group
LIKE AcctTran.ClosingGroup
INITIAL ?
NO-UNDO.
320 DEF VAR docref-code
AS INT NO-UNDO.
322 IF Cheque.Cancelled
= Yes
THEN DO:
323 MESSAGE "The cheque is already cancelled!"
324 VIEW-AS ALERT-BOX ERROR TITLE "Cheque Already Cancelled".
328 IF Cheque.DatePresented
<> ?
THEN DO:
329 MESSAGE "The cheque cannot be cancelled as it has already been presented!"
330 VIEW-AS ALERT-BOX ERROR TITLE "Cheque Already Presented".
334 MESSAGE "Are you sure you want to cancel this cheque?"
335 VIEW-AS ALERT-BOX QUESTION BUTTONS OK-CANCEL TITLE "Cancel Cheque"
338 IF NOT yes-do-it
THEN RETURN.
340 DEF VAR cheque-string
AS CHAR NO-UNDO.
341 cheque-string
= TRIM( STRING( Cheque.ChequeNo
, ">>>>>>>9")).
343 FIND Document
WHERE Document.BatchCode
= Cheque.BatchCode
344 AND Document.DocumentCode
= Cheque.DocumentCode
347 IF AVAILABLE(Document
) THEN ASSIGN docref-code
= INTEGER(Document.Reference
) NO-ERROR.
348 IF AVAILABLE(Document
) AND docref-code
= Cheque.ChequeNo
THEN DO:
349 FIND FIRST AcctTran
OF Document
NO-LOCK NO-ERROR.
350 cheque-month
= AcctTran.MonthCode.
353 FOR EACH AcctTran
NO-LOCK WHERE AcctTran.EntityType
= "C"
354 AND AcctTran.EntityCode
= Cheque.CreditorCode
355 AND AcctTran.AccountCode
= sundry-creditors
,
356 FIRST Document
OF AcctTran
NO-LOCK WHERE Document.Reference
= cheque-string
:
357 cheque-month
= AcctTran.MonthCode.
362 FIND FIRST BankAccount
WHERE BankAccount.BankAccountCode
= Cheque.BankAccountCode
NO-LOCK.
367 FIND CURRENT Cheque
EXCLUSIVE-LOCK.
368 Cheque.Cancelled
= yes.
371 ASSIGN NewBatch.BatchType
= "NORM"
372 NewBatch.Description
= "Cancel cheque " + cheque-string.
375 ASSIGN NewDocument.BatchCode
= NewBatch.BatchCode
376 NewDocument.DocumentCode
= 1
377 NewDocument.Reference
= cheque-string
378 NewDocument.Description
= "CANCEL CHEQUE " + cheque-string.
380 /* Credit the creditor to reverse payment
*/
381 RUN create-trans
( NewBatch.BatchCode
, "C", Cheque.CreditorCode
, sundry-creditors
,
382 Cheque.Date
, - Cheque.Amount
, "" ).
384 /* debit the bank account to reverse payment
*/
385 RUN create-trans
( NewBatch.BatchCode
, "L", BankAccount.CompanyCode
, BankAccount.AccountCode
,
386 Cheque.Date
, Cheque.Amount
, "" ).
388 /* unapprove and unallocate all the vouchers
*/
389 FIND FIRST Voucher
WHERE Voucher.ChequeNo
= Cheque.ChequeNo
NO-LOCK NO-ERROR.
390 IF AVAILABLE(Voucher
) AND Voucher.BatchCode
> 0 AND Voucher.DocumentCode
> 0 THEN
391 FIND FIRST AcctTran
WHERE AcctTran.BatchCode
= Voucher.BatchCode
392 AND AcctTran.DocumentCode
= Voucher.DocumentCode
393 AND AcctTran.ConsequenceOf
= 0 NO-LOCK NO-ERROR.
394 IF NOT (AVAILABLE(Voucher
) AND Voucher.BatchCode
> 0 AND Voucher.DocumentCode
> 0 AND AVAILABLE(AcctTran
)) THEN DO:
396 MESSAGE "No transactions for vouchers related to the cheque can be found!" SKIP(2)
397 "The voucher batch may not yet have been updated yet. If you " SKIP
398 "continue, you will need to reverse the voucher allocation manually." SKIP(2)
399 "Are you sure you still want to cancel this cheque?"
400 VIEW-AS ALERT-BOX QUESTION BUTTONS OK-CANCEL TITLE "Allocations for Vouchers of Cheque could not be found!"
403 IF NOT yes-do-it
THEN
404 UNDO cancel-block
, LEAVE cancel-block.
406 FOR EACH Voucher
WHERE Voucher.ChequeNo
= Cheque.ChequeNo
:
407 IF Voucher.BatchCode
> 0 AND Voucher.DocumentCode
> 0 THEN DO:
408 FOR EACH AcctTran
WHERE AcctTran.BatchCode
= Voucher.BatchCode
409 AND AcctTran.DocumentCode
= Voucher.DocumentCode
410 AND AcctTran.ConsequenceOf
= 0
412 RUN create-trans
( NewBatch.BatchCode
, AcctTran.EntityType
, AcctTran.EntityCode
, AcctTran.AccountCode
,
413 AcctTran.Date
, - AcctTran.Amount
, "CANCEL CHEQUE - " + Cheque.PayeeName
).
416 ASSIGN Voucher.VoucherStatus
= "C"
418 Voucher.BatchCode
= ?
419 Voucher.DocumentCode
= ?
423 RUN dispatch
( 'row-available'
:U
).
427 /* _UIB-CODE-BLOCK-END
*/
430 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE confirm-changes V-table-Win
431 PROCEDURE confirm-changes
:
432 /*------------------------------------------------------------------------------
434 ------------------------------------------------------------------------------*/
435 RUN dispatch
( 'update-record'
:U
).
436 RUN dispatch
( 'exit'
:U
).
439 /* _UIB-CODE-BLOCK-END
*/
442 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE create-trans V-table-Win
443 PROCEDURE create-trans
:
444 /*------------------------------------------------------------------------------
446 ------------------------------------------------------------------------------*/
447 DEF INPUT PARAMETER bcode
AS INTEGER NO-UNDO.
448 DEF INPUT PARAMETER et
AS CHAR NO-UNDO.
449 DEF INPUT PARAMETER ec
AS INT NO-UNDO.
450 DEF INPUT PARAMETER ac
AS DEC NO-UNDO.
451 DEF INPUT PARAMETER dt
AS DATE NO-UNDO.
452 DEF INPUT PARAMETER amt
AS DEC NO-UNDO.
453 DEF INPUT PARAMETER dsc
AS CHAR NO-UNDO.
456 ASSIGN NewAcctTrans.BatchCode
= bcode
457 NewAcctTrans.DocumentCode
= 1
458 NewAcctTrans.Reference
= (IF AVAILABLE(Voucher
) THEN "VCHR" + STRING(Voucher.VoucherSeq
) ELSE "")
459 NewAcctTrans.EntityType
= et
460 NewAcctTrans.EntityCode
= ec
461 NewAcctTrans.AccountCode
= ac
462 NewAcctTrans.Date
= dt
463 NewAcctTrans.Amount
= amt
464 NewAcctTrans.Description
= dsc.
468 /* _UIB-CODE-BLOCK-END
*/
471 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI V-table-Win _DEFAULT-DISABLE
472 PROCEDURE disable_UI
:
473 /*------------------------------------------------------------------------------
474 Purpose
: DISABLE the User Interface
476 Notes
: Here we clean-up the user-interface by deleting
477 dynamic widgets we have created and
/or hide
478 frames. This procedure is usually called when
479 we are ready to
"clean-up" after running.
480 ------------------------------------------------------------------------------*/
481 /* Hide all frames.
*/
483 IF THIS-PROCEDURE:PERSISTENT THEN DELETE PROCEDURE THIS-PROCEDURE.
486 /* _UIB-CODE-BLOCK-END
*/
489 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE inst-enable-fields V-table-Win
490 PROCEDURE inst-enable-fields
:
491 /*------------------------------------------------------------------------------
493 ------------------------------------------------------------------------------*/
494 DO WITH FRAME {&FRAME-NAME}:
495 IF mode
= "View" OR Cheque.Cancelled
THEN Cheque.DatePresented
:SENSITIVE = No.
499 /* _UIB-CODE-BLOCK-END
*/
502 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE next-cheque V-table-Win
503 PROCEDURE next-cheque
:
504 /*------------------------------------------------------------------------------
506 ------------------------------------------------------------------------------*/
507 RUN dispatch
( 'update-record'
:U
).
508 RUN notify
( 'next-record
,record-source'
:U
).
511 /* _UIB-CODE-BLOCK-END
*/
514 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE post-row-available V-table-Win
515 PROCEDURE post-row-available
:
516 /*------------------------------------------------------------------------------
518 ------------------------------------------------------------------------------*/
519 IF NOT AVAILABLE(Cheque
) THEN RETURN.
521 FIND Creditor
WHERE Creditor.CreditorCode
= Cheque.CreditorCode
NO-LOCK NO-ERROR.
522 IF AVAILABLE(Creditor
) THEN fil_CreditorName
= Creditor.Name.
524 RUN refresh-window-title
IN sys-mgr
( THIS-PROCEDURE ).
526 FIND BankAccount
WHERE BankAccount.BankAccountCode
= Cheque.BankAccountCode
NO-LOCK NO-ERROR.
527 IF AVAILABLE(BankAccount
) THEN
528 fil_BankDescription
= STRING( BankAccount.CompanyCode
, "999") + "-" + STRING( BankAccount.AccountCode
, "9999.99") + " - "
529 + BankAccount.BankName
+ ", " + BankAccount.BankBranchName .
531 DISPLAY fil_CreditorName fil_BankDescription
WITH FRAME {&FRAME-NAME}.
532 RUN dispatch
( 'enable-fields'
:U
).
536 /* _UIB-CODE-BLOCK-END
*/
539 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE pre-row-available V-table-Win
540 PROCEDURE pre-row-available
:
541 /*------------------------------------------------------------------------------
543 ------------------------------------------------------------------------------*/
547 /* _UIB-CODE-BLOCK-END
*/
550 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE present-cheque V-table-Win
551 PROCEDURE present-cheque
:
552 /*------------------------------------------------------------------------------
553 Purpose
: Mark the cheque as presented
554 ------------------------------------------------------------------------------*/
555 ENABLE Cheque.DatePresented
WITH FRAME {&FRAME-NAME}.
556 APPLY "ENTRY":U
TO Cheque.DatePresented.
559 /* _UIB-CODE-BLOCK-END
*/
562 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE previous-cheque V-table-Win
563 PROCEDURE previous-cheque
:
564 /*------------------------------------------------------------------------------
566 ------------------------------------------------------------------------------*/
567 RUN dispatch
( 'update-record'
:U
).
568 RUN notify
( 'prev-record
,record-source'
:U
).
571 /* _UIB-CODE-BLOCK-END
*/
574 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE send-records V-table-Win _ADM-SEND-RECORDS
575 PROCEDURE send-records
:
576 /*------------------------------------------------------------------------------
577 Purpose
: Send record
ROWID's for all tables used by
579 Parameters
: see template
/snd-head.i
580 ------------------------------------------------------------------------------*/
582 /* Define variables needed by this internal procedure.
*/
583 {src
/adm
/template
/snd-head.i
}
585 /* For each requested table
, put it's
ROWID in the output list.
*/
586 {src
/adm
/template
/snd-list.i
"Cheque"}
588 /* Deal with any unexpected table requests before closing.
*/
589 {src
/adm
/template
/snd-end.i
}
593 /* _UIB-CODE-BLOCK-END
*/
596 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE state-changed V-table-Win
597 PROCEDURE state-changed
:
598 /* -----------------------------------------------------------
602 -------------------------------------------------------------*/
603 DEFINE INPUT PARAMETER p-issuer-hdl
AS HANDLE NO-UNDO.
604 DEFINE INPUT PARAMETER p-state
AS CHARACTER NO-UNDO.
607 /* Object instance CASEs can go here to replace standard behavior
609 {src
/adm
/template
/vstates.i
}
613 /* _UIB-CODE-BLOCK-END
*/
616 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE use-Key-Name V-table-Win
617 PROCEDURE use-Key-Name
:
618 /*------------------------------------------------------------------------------
620 ------------------------------------------------------------------------------*/
621 DEF INPUT PARAMETER new-name
AS CHAR NO-UNDO.
625 /* _UIB-CODE-BLOCK-END
*/
628 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE use-Key-Value V-table-Win
629 PROCEDURE use-Key-Value
:
630 /*------------------------------------------------------------------------------
632 ------------------------------------------------------------------------------*/
633 DEF INPUT PARAMETER new-value
AS CHAR NO-UNDO.
635 key-value
= new-value.
637 IF key-name
= "ChequeNo" THEN DO:
638 bank-account
= find-parent-key
( "BankAccountCode" ).
639 FIND Cheque
WHERE Cheque.BankAccountCode
= bank-account
640 AND Cheque.ChequeNo
= INT(key-value
)
645 /* _UIB-CODE-BLOCK-END
*/
648 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE use-Mode V-table-Win
650 /*------------------------------------------------------------------------------
652 ------------------------------------------------------------------------------*/
653 DEF INPUT PARAMETER new-mode
AS CHAR NO-UNDO.
657 /* _UIB-CODE-BLOCK-END
*/