Process PAYPROPAL2: PAYPROPAL2

CREPYH: Access to the payment header

PAYPROPAL2 is the process that automatically generates payments depending on open items. It contains two entry points:

  • The entry point CREPYH is found before the posting of a payment in the PAYMENTH [PYH] table. It makes it possible to either modify the payment (class [F:PYH]) before this posting, or to avoid this posting by setting the GOK variable.
  • Entry point INIPYD is found after the assignment of [PYD]NUM, [PYD]LIN, [PYD]DENCOD, and before the assignment of the remaining fields in the payment line (table PAYMENTD [PYD]).

In both cases, GOK<1 interrupts the generation, GOK>1 skips the payment.

Context and operating mode

Transaction

There is one transaction in progress. The transaction corresponds to the creation of a payment.

Log file

A log file may be open. In this case, GTRACE<>empty.

Available variables and masks

The mask PAYPROPAL [DIA] where the user has entered the payment proposition criteria is available.

Variable

Type

Definition

GDIV(0)

Char

Payment attributes for the payment lines

GDIV(1)

Char

Payment attributes for the pre-payments

GDIV(2)

Char

Payment attributes for the discounts

GDIV(5)

Char

Payment attributes for the charges

TOTESC

Decimal

Discount/charge total of the payment

NOREL

Char

Open item statement number associated with the payment

NBBAN

Integer

Maximum number of banks for a bank pool

POOBAN

Char (1..NBBAN)

Bank from the bank pool entered

POOMTMAX

Decimal (1..NBBAN)

Maximum amount to be assigned to the bank POOBAN(i) in company currency

POOMTIMP

Decimal (1..NBBAN)

Amount assigned to the bank POOBAN(i) in company currency

Open tables

Table

Significant content

Table title

TABCUR [TCU]

No

Currencies

ATABDIV [ADI]

No

Miscellaneous tables

GRPSAC [GSC]

No

Control account groups

GRPCUR [GCU]

No

Currency groups

BID [BID]

No

Bank ID no

COMPANY [CPY]

Yes

Companies

GACCOUNT [GAC]

No

Accounts

GACCCODE [ACC]

No

Accounting codes

SOI [SOI]

No

Due date statements

BANK [BAN]

No

Banks

POOL [POO]

No

Bank pools

GACCDUDATE [DUD]

No

Open items

TABCOUAFF [TCA]

No

Assignment of sequence number counters

GACCENCOD [CDA]

No

Payment attributes

TABPAYTYP [TPY]

Yes

Payment types

PAYMENTH [PYH]

Yes

Payments headers

PAYMENTD [PYD]

No

Payments lines

PAYMENTA [PYA]

No

Payments analytical lines

GACCENTRY [HAE]

No

Journal postings

BPARTNER [BPR]

No

BP

BPCUSTOMER [BPC]

No

Customers

BPSUPPLIER [BPS]

No

Suppliers

TMPPAYDUD [ TPD], [TPD2]

No

Temporary table

TMPAYDUD2 [TP2]

No

Temporary table

INIPYD: Access to the payment lines

PAYPROPAL2 is the process that automatically generates payments depending on open items. It contains two entry points:

  • Entry point CREPYH is to be found before the posting of a payment in the PAYMENTH [PYH] table. It makes it possible to either modify the payment (class [F:PYH]) before this posting, or to avoid this posting by setting the GOK variable.
  • Entry point INIPYD is found after the assignment of [PYD]NUM, [PYD]LIN, [PYD]DENCOD, and before the assignment of the remaining fields in the payment line (table PAYMENTD [PYD]).

In both cases, GOK<1 interrupts the generation, GOK>1 skips the payment.

Context and operating mode

Transaction

There is one transaction in progress. The transaction corresponds to the creation of a payment.

Log file

A log file may be open. In this case, GTRACE<>empty.

Available variables and masks

The mask PAYPROPAL [DIA] where the user has entered the payment proposition criteria is available.

Variable

Type

Definition

GDIV(0)

Char

Payment attributes for the payment lines

GDIV(1)

Char

Payment attributes for the pre-payments

GDIV(2)

Char

Payment attributes for the discounts

GDIV(5)

Char

Payment attributes for the charges

TOTESC

Decimal

Discount/charge total of the payment

NOREL

Char

Open item statement number associated with the payment

NBBAN

Integer

Maximum number of banks for a bank pool

POOBAN

Char (1..NBBAN)

Bank from the bank pool entered

POOMTMAX

Decimal (1..NBBAN)

Maximum amount to be assigned to the bank POOBAN(i) in company currency

POOMTIMP

Decimal (1..NBBAN)

Amount assigned to the bank POOBAN(i) in company currency

Open tables

Table

Significant content

Table title

TABCUR [TCU]

No

Currencies

ATABDIV [ADI]

No

Miscellaneous tables

GRPSAC [GSC]

No

Control account groups

GRPCUR [GCU]

No

Currency groups

BID [BID]

No

Bank ID no

COMPANY [CPY]

Yes

Companies

GACCOUNT [GAC]

No

Accounts

GACCCODE [ACC]

No

Accounting codes

SOI [SOI]

No

Due date statements

BANK [BAN]

No

Banks

POOL [POO]

No

Bank pools

GACCDUDATE [DUD]

No

Open items

TABCOUAFF [TCA]

No

Assignment of sequence number counters

GACCENCOD [CDA]

No

Payment attributes

TABPAYTYP [TPY]

Yes

Payment types

PAYMENTH [PYH]

Yes

Payments headers

PAYMENTD [PYD]

No

Payments lines

PAYMENTA [PYA]

No

Payments analytical lines

GACCENTRY [HAE]

No

Journal postings

BPARTNER [BPR]

No

BP

BPCUSTOMER [BPC]

No

Customers

BPSUPPLIER [BPS]

No

Suppliers

TMPPAYDUD [ TPD], [TPD2]

No

Temporary table

TMPAYDUD2 [TP2]

No

Temporary table

ESCAGIO: Discount/charge calculation

Entry point CAL_ESCAGIO is used to introduce specific developments just before the discount/charge calculation in order to launch the discount/charge calculation in automatic payment proposition for credit memo type 'credit notes'.

Context and operating mode

Transaction

There is one transaction in progress. The transaction corresponds to the creation of a payment.

Log file

A log file may be open. In this case, GTRACE<>empty.

Call case

The entry point is placed just before the discount/charge calculation.

Available variables and masks

In standard mode, the discount/charge calculation is not launched in case of credit memos in automatic payment proposition. If variable CAL_ESCAGIO is initialized to 2 in specific, the discount/charge calculation will also be launched for credit memos.

The mask PAYPROPAL [DIA] where the user has entered the payment proposition criteria is also available, as well as the following variable:

Variable

Type

Definition

GDIV(0)

Char

Payment attributes for the payment lines

GDIV(1)

Char

Payment attributes for the pre-payments

GDIV(2)

Char

Payment attributes for the discounts

GDIV(5)

Char

Payment attributes for the charges

TOTESC

Decimal

Discount/charge total of the payment

NOREL

Char

Open item statement number associated with the payment

NBBAN

Integer

Maximum number of banks for a bank pool

POOBAN

Char (1..NBBAN)

Bank from the bank pool entered

POOMTMAX

Decimal (1..NBBAN)

Maximum amount to be assigned to the bank POOBAN(i) in company currency

POOMTIMP

Decimal (1..NBBAN)

Amount assigned to the bank POOBAN(i) in company currency

Open tables

Table

Significant content

Table title

TABCUR [TCU]

No

Currencies

ATABDIV [ADI]

No

Miscellaneous tables

GRPSAC [GSC]

No

Control account groups

GRPCUR [GCU]

No

Currency groups

BID [BID]

No

Bank ID no

COMPANY [CPY]

Yes

Companies

GACCOUNT [GAC]

No

Accounts

GACCCODE [ACC]

No

Accounting codes

SOI [SOI]

No

Due date statements

BANK [BAN]

No

Banks

POOL [POO]

No

Bank pools

GACCDUDATE [DUD]

No

Open items

TABCOUAFF [TCA]

No

Assignment of sequence number counters

GACCENCOD [CDA]

No

Payment attributes

TABPAYTYP [TPY]

Yes

Payment types

PAYMENTH [PYH]

Yes

Payments headers

PAYMENTD [PYD]

No

Payments lines

PAYMENTA [PYA]

No

Payments analytical lines

GACCENTRY [HAE]

No

Journal postings

BPARTNER [BPR]

No

BP

BPCUSTOMER [BPC]

No

Customers

BPSUPPLIER [BPS]

No

Suppliers

TMPPAYDUD [ TPD], [TPD2]

No

Temporary table

TMPAYDUD2 [TP2]

No

Temporary table

TRITRC: Sort order in the log

The entry point TRITRC allows to sort the payment lines in the log. It does not override the sort order selected when launching the proposal and which sorts the payment headers. This additional sorting is performed by valuing the ORDSORT variable.

Context and operating method

Transaction

There is one transaction in progress. The transaction corresponds to the creation of a payment.

Log file

The log file is open.

Different call cases

The ORDSORT variable must be valued with the field(s) of the PAYMENTD table which will be used to sort the payments in the log.

Available variables and masks

The mask PAYPROPAL [DIA] where the user has entered the payment proposition criteria is available.

Variable

Type

Definition

ORDSORT

Char

Contains the default sort order of the
PAYMENTD payment lines table, which is NUM;LIN

Open tables

Table

Significant content

Table title

TABCUR [TCU]

No

Currencies

ATABDIV [ADI]

No

Miscellaneous tables

GRPSAC [GSC]

No

Control account groups

GRPCUR [GCU]

No

Currency groups

BID [BID]

No

Bank ID no

COMPANY [CPY]

Yes

Companies

GACCOUNT [GAC]

No

Accounts

GACCCODE [ACC]

No

Accounting codes

SOI [SOI]

No

Due date statements

BANK [BAN]

No

Banks

POOL [POO]

No

Bank pools

GACCDUDATE [DUD]

No

Open items

TABCOUAFF [TCA]

No

Assignment of sequence number counters

GACCENCOD [CDA]

No

Payment attributes

TABPAYTYP [TPY]

Yes

Payment types

PAYMENTH [PYH]

Yes

Payments headers

PAYMENTD [PYD]

No

Payments lines

PAYMENTA [PYA]

No

Payments analytical lines

GACCENTRY [HAE]

No

Journal postings

BPARTNER [BPR]

No

BP

BPCUSTOMER [BPC]

No

Customers

BPSUPPLIER [BPS]

No

Suppliers

TMPPAYDUD [ TPD], [TPD2]

No

Temporary table

TMPAYDUD2 [TP2]

No

Temporary table

BEFWRIDEP: Access to the discount/charge lines of the payment

The entry point is used to take control immediately before writing the payment lines when the line is related to a payment attribute of discount/charge type.

Context and operating method

Transaction

There is one transaction in progress. The transaction corresponds to the creation of a payment.

Log file

A log file may be open. In this case, GTRACE<>empty.

Available variables and masks

The mask PAYPROPAL [DIA] where the user has entered the payment proposition criteria is available.

Variable

Type

Definition

GDIV(0)

Char

Payment attributes for the payment lines

GDIV(1)

Char

Payment attributes for the pre-payments

GDIV(2)

Char

Payment attributes for the discounts

GDIV(5)

Char

Payment attributes for the charges

TOTESC

Decimal

Discount/charge total of the payment

NOREL

Char

Open item statement number associated with the payment

NBBAN

Integer

Maximum number of banks for a bank pool

POOBAN

Char (1..NBBAN)

Bank from the bank pool entered

POOMTMAX

Decimal (1..NBBAN)

Maximum amount to be assigned to the bank POOBAN(i) in company currency

POOMTIMP

Decimal (1..NBBAN)

Amount assigned to the bank POOBAN(i) in company currency

Open tables

Table

Significant content

Table title

TABCUR [TCU]

No

Currencies

ATABDIV [ADI]

No

Miscellaneous tables

GRPSAC [GSC]

No

Control account groups

GRPCUR [GCU]

No

Currency groups

BID [BID]

No

Bank ID no

COMPANY [CPY]

Yes

Companies

GACCOUNT [GAC]

No

Accounts

GACCCODE [ACC]

No

Accounting codes

SOI [SOI]

No

Due date statements

BANK [BAN]

No

Banks

POOL [POO]

No

Bank pools

GACCDUDATE [DUD]

No

Open items

TABCOUAFF [TCA]

No

Assignment of sequence number counters

GACCENCOD [CDA]

No

Payment attributes

TABPAYTYP [TPY]

Yes

Payment types

PAYMENTH [PYH]

Yes

Payments headers

PAYMENTD [PYD]

No

Payments lines

PAYMENTA [PYA]

No

Payments analytical lines

GACCENTRY [HAE]

No

Journal postings

BPARTNER [BPR]

No

BP

BPCUSTOMER [BPC]

No

Customers

BPSUPPLIER [BPS]

No

Suppliers

TMPPAYDUD [ TPD], [TPD2]

No

Temporary table

TMPAYDUD2 [TP2]

No

Temporary table

MODCRIT_BID: Manage the Bank ID statement table BID

Use this entry point to manage the Bank ID statement table, BID.

Context and operating method

Transaction

There is no transaction in progress.

Log file

A log file may be open.

Variable

To use this entry point, you need to place the BID table in the correct record.The variable CRITBID is available to apply filters. It is empty when the entry point is invoked.

To signal that a match was found, you need to use of the variable TROUVE by assigning it the value 1.

If TROUVE equals 0, the BID table is positioned in the default record as if the entry point wasn't being used.

PAY_SORT_GCLE: payment sort order GLCE

Context and operating method

Transaction

There is a transaction in progress.

Log file

There is an open log file.

Code context

This entry point is called just after the standard assignment of the GCLE key in the temporary work trace.

It allows you to modify the value of GCLE if needed.

Important: This entry point must be used in coordination with the following entry points:

  • PAY_SORT in the SUBPAYS process

  • PAY_SORT in the PAYPROPAL process

Copy
Standard affectation of GCLE:
I=val(mid$(GCLE,36,10))
Case [M:DIA]ORDRE
When 1 : GCLE=format$("K:35X",[F:PYH]BPR)+format$("N:10#",I)
When 2 : Call LEC_BPR([F:PYH]BPR) From CPTLEC
GCLE=format$("K:35X",[F:BPR]BPRNAM)+format$("N:10#",I)
When 3 : GCLE=format$("K:35X",[F:PYH]PAYTYP)+format$("N:10#",I)
When 4 : GCLE=format$("D:YYYYMMDD",[F:PYH]DUDDAT)+string$(27," ")+format$("N:10#",I)
Endcase

This logic determines how the GCLE key is built based on the selected sort order (ORDRE).

Available variables and masks

Variable / Mask Description
PAYPROP0 [DIA] Criteria entry mask
PAYPROP1 [DI1] Criteria entry mask
PAYPROP2 [DI2] Criteria entry mask
GCLE Key used in the temporary work trace
Local variable I Line number, used at the end of the key

Open tables

In the table below, the significant content flag indicates that the content is in phase with the context.

Table Significant content Table title
TABPAYTYP [TPY] Yes Payment transactions
PAYMENTH [PYH] Yes Payment header
(Others) No Same as other entry points in this proces