CHGALLQTY: Quantity to be allocated on the receipt of a back-to-back order

This entry point located in the SUBPTHA processing (purchase receipt management), generates a "CHGALLQTY" action.

The purpose of this action is to give the possibility to act on the quantity to be allocated for a sales order within the context of a back-to-back receipt.

Context and operating mode

Transaction

There is one transaction in progress.

Log file

There is an open log file.

Different call cases

The call is carried out upon creation of a back-to-back order receipt line during the update transaction.

Available variables and masks

The following file classes are loaded when calling the "CHGALLQTY" action. 

[F :PTH] Back-to-back receipt header

[F :PTD] Back-to-back receipt line

[F :SOQ] Sales order line 

The classes given above must not be modified. 

The following variable can be modified 

WQTERES

Quantity to allocate for the sales order.

Note: This quantity must not be superior to the [F :PTD]QTYSTU received quantity. If this is the case, it will be readjusted.

 

Open tables

In the table below, the significant content flag indicates that the content matches the context.

Table

Significant content

Table Title

PRECEIPT

Yes

Receipt headers

PRECEIPTD

Yes

Receipt lines

SORDERQ

Yes

Price order lines

Miscellaneous remarks

This entry point is called only in the case of a back-to-back order receipt.

CLCQTYPTH: Recalculation of the quantities in purchase units

This entry point located in the SUBPTHA processing (purchase receipt management), generates a "CLCQTYPTH" action.

The purpose of this action is to give the possibility to act on on the re-calculation of quantities in purchase units after the detailed entry of the stock receipts.

Example of use:

- Order of 100 Kg (PU) corresponding to 2,000 Sheets (STK units)

- Receipt of the order of 100 Kg (PU) and entry detail of 1,900 sheets (STK units) causing a re-calculation to 95Kg (PU)

Since the weight of a sheet varies according to its humidity content, the quantity in PU should not be modified because the 1,900 sheets do have a weight of 100 Kg.

It is thus possible to consider that below a certain level of difference, the quantities should not be re-calculated:

If abs(OLDQTY-GTOTQTY<=1000  WCLCFLG=0 : Endif

The value assigned in the purchase quantities may also be forced by short-circuiting the automatic recalculation.

Context and operating mode

Transaction

A transaction is under progress if [M :PTH1]CREFLG(WNOL)<>0

Log file

There is an open log file.

Different call cases

The call is carried out after the detailed entry of the receipts to stock has been entered.

Available variables and masks

The following variables are loaded at the time of the call to the "CLCQTYPTH" action.

OLDQTY

Former global quantity in stock unit of the receipt line before the detailed entry.

GTOTQTY

New global quantity in stock unit of the receipt line after the detailed entry.

WNOL

Index for the receipt line currently in process (usable with the class [M:PTH1]).

The variables given above must not be modified.

WCLCFLG

Flag for the recalculation of the quantities in purchase units

0 = No recalculation

1 = Automatic recalculation of the quantities in purchase units based on the STK-PUR conversion factor.

[M :PTH1]QTYPUU(WNOL)

Total quantity in purchase unit of the receipt line before any calculation.

Open tables

In the table below, the significant content flag indicates that the content matches the context.

Table

Significant content

Table Title

ITMMASTER

Yes

Products

ITMBPS

Yes if creation

Products - suppliers

Miscellaneous remarks

This entry point is called after each click on the Action icon, "Entry detail".

CPRCOE: Receipt cost factor for the price

This entry point located in the SUBPTHA processing (purchase receipt management), generates a "CPRCOE" action.

The purpose of this action is to give the possibility to act on the approximation coefficient used to calculate the unit production cost of a received product from the purchase order net unit price.

Context and operating mode

Transaction

There is no transaction in progress.

Log file

There is no open log file.

Different call cases

The call is carried out upon creation of a receipt line whether this line is entered manually or loaded by "picking" the order lines.

Available variables and masks

The following variable is loaded at the time of the call to the "CPRCOE" action.

NOL

Index for the receipt line being processed (can be used with the [M:PTH1] class).

The following screen mask is available : [M:PIH1]

The variable and the class given above must not be modified.


WCPRCOE

Approximation coefficient coming from the product-supplier, which can be modified by the entry point in order to obtain a different unit production cost.


Open tables

In the table below, the significant content flag indicates that the content matches the context.

Table

Significant content

Table Title

PORDER

Yes

Order headers

PORDERQ

Yes

Quantity order lines

PORDERP

Yes

Price order lines

Miscellaneous remarks

This entry point is called only in the case of a receipt for a non invoiced order line with a product managed in stock.

Warning: the product receipt costing parameter must be at set to "order price" so that the recovery of the production cost can be effective in the stock movements.

CHXPRIORD: Order price choice.

This entry point located in the SUBPTHA processing (purchase receipt management), generates a "CHXPRIORD" action.

The purpose of this action is to give the possibility to act on the loading of the order price, also called unit cost price.

Context and operating mode

Transaction

There is no transaction in progress.

Log file

There is no open log file.

Different call cases

The call is carried out upon creation of a receipt line whether this line is entered manually or loaded by "picking" the order lines.

This call is only performed if the receipt is coming from an order that was partially or totally invoiced.

Available variables and masks

The following variable is loaded when calling the "CHXPRIORD" action. 

NOL

Index for the receipt line being processed (can be used with the [M:PTH1] class).

The following screen mask is available : [M:PIH1] 

The variable and the class given above must not be modified. 

WPRIFLG

Indicator for the loading of the order price, also called unit production cost. The possible values are the following:

1 = order price

2 = price of the first posted invoice

3 = price of the first posted invoice with the additional invoices if there are some (standard functioning).

4 = price of the last posted invoice

5 = price of the last posted invoice with the additional invoices if there are some

6 = price specified in the WPRIORD variable

WPRIORD

Specific price of the order (gross unit cost price before applying the approximation coefficient) to enter only if WPRIFLG = 6

This price is the price for a stock unit expressed in company currency.

Open tables

In the table below, the significant content flag indicates that the content matches the context.

Table

Significant content

Table Title

PORDER

Yes

Order headers

PORDERQ

Yes

Quantity order lines

PORDERP

Yes

Price order lines

Miscellaneous remarks

This entry point is called only in the case of a receipt for an invoiced order line with a product managed in stock.

If the price is equal to zero (WPRIFLG=6 et WPRIORD=0), the order price is the one recovered in the end.

Warning: the product receipt costing parameter must be at set to "order price" so that the recovery of the production cost can be effective in the stock movements.

CHARGLIGPTH: Loading receipt line

This entry point located in the SUBPTHA processing (purchase receipt management), generates a "CHARGLIGPTH" action.

The purpose of this action is to give the possibility to act on the quantity to receive when loading the receipt line.

Context and operating mode

Transaction

There is no transaction in progress.

Log file

There is no open log file.

Different call cases

The call is carried out upon creation of a receipt line whether this line is entered manually or loaded by "picking" the order lines.

Available variables and masks

The following variable is loaded when calling the "CHXPRIORD" action. 

NOL

Index for the receipt line being processed (can be used with the [M:PTH1] class).

The following screen mask is available : [M:PIH1] 

The variable and the class given above must not be modified. 

WQTE

Quantity to receive, expressed in stock unit

This quantity is loaded automatically but can be modified and even reset to zero in order to force manual entry.

MAJRCPSTO: Update of the receipts to stock

This entry point located in the SUBPTHA processing (purchase receipt management), generates a "MAJRCPSTO" action.

The purpose of this action is to give the possibility not to carry out the receipts into stock in the case of a receipt import.

Context and operating mode

Transaction

There is one transaction in progress.

Log file

There is an open log file.

Different call cases

The call is carried out on import of a receipt line during the update transaction.

Available variables and masks

The following file classes are loaded when calling the "MAJRCPSTO" action. 

[F :PTH] Receipt header.

[F :PTD] Receipt line.

The classes given above must not be modified. 

The following variable can be modified 

WUPDSTOFLG

Stock update indicator

0 = No update, receipts are imported in order to have a history, stocks are already updated

1 = Update of receipts into stock (default value)

Open tables

In the table below, the significant content flag indicates that the content matches the context.

Table

Significant content

Table Title

PRECEIPT

Yes

Receipt headers

PRECEIPTD

Yes

Receipt lines

Miscellaneous remarks

This entry point is called only in the case of an import.

CPRCAL: Update cost price

This entry point located in the SUBPTHA processing (purchase receipt management), generates a "CPRCAL" action.

The purpose of this action is to give the possibility not to update the cost price and even force a new price.

Context and operating mode

Transaction

There is no transaction in process.

Log file

There is no open log file.

Different call cases

The call is made each time the cost price of a receipt line needs to be updated.

When modifying a line or an invoicing element of the receipt footer.

Available variables and masks

The following variables are loaded when calling the "CPRCAL" action. 

NOL

Index for the receipt line being processed (can be used with the [M:PTH1] class).

The following screen mask is available : [M:PIH1] 

WCPRFLG

Cost price recalculation indicator

1 = Yes: recalculation and update of the receipt line cost price

2= No: the line cost price is kept (in case of manual modification for instance)

[M:PTH1]CPR(NOL)

Former cost price


The WCPRFLG recalculation indicator can be modified so as not to update

MAJCTMALL: Update of allocations

This entry point has been replaced by the MAJSOFALL entry point in the PURMTOLIB processing.

Context and operating mode

CUSADDTRT: Launching of specific processings

This entry point, which is located in the SUBPTHA processing for the management of purchase receipts, is used to launch additional and specific processings when creating or modifying a line.

Context and operating mode

Transaction

There is one transaction in progress.

Log file

There is an open log file.

Different call cases

The call is made on creation or modification of a receipt line during the update transaction.

Available variables and masks

The following file classes are loaded during the call: 

[F :PTH] Receipt header.

[F :PTD] Receipt line.

Open tables

In the table below, the significant content flag indicates that the content matches the context.

Table

Significant content

Table Title

PRECEIPT

Yes

Receipt headers

PRECEIPTD

Yes

Receipt lines

CHGINVQTY: Modification of the invoiced quantity

This entry point, which is located in the SUBPTHA processing for the management of purchase receipts, is used to modify the invoiced quantity when creating or modifying a line.

Context and operating mode

Transaction

There is one transaction in progress.

Log file

There is an open log file.

Different call cases

This entry point is located in the POSITION_QTYINV sub-program of the SUBPTHA processing

Available variables and masks

The following file classes are loaded during the call:

Fields that can be modified are [F:PTD]INVQTYPUU and [F:PTD]INVQTYSTU

Example when forcing quantities to 0:

[F:PTD]INVQTYPUU =0

[F:PTD]INVQTYSTU=0

Caution: the context needs to be well-defined in order to launch updates.

Open tables

In the table below, the significant content flag indicates that the content matches the context.

Table

Significant content

Table Title

PRECEIPTD

Yes

Receipt lines

CHGACCFCY: change of site to control analytical dimension types

This entry point, which is located in the SUBPTHA processing for recording a purchase receipt, is used to take control after clicking 'Create' or 'Save'.

The purpose is to give the possibility to change the site used to control the analytical dimension types of the receipt lines.

Context and operating mode

Transaction

There is no transaction in process.

Log file

There is no open log file.

Different call cases

The call is performed during the creation or modification of a purchase receipt.

Available variables and masks

The WFCY variable is loaded during the call. It includes the financial site of the receipt header site. This variable can be modified.

The following screen masks can be used: [M:PTH0], [M:PTH1],[M:PTH2],[M:CSTT]

The classes given above must not be modified.

Open tables

In the table below, the significant content flag indicates that the content matches the context.

Table

Significant content

Table Title

PRECEIPT

No

Receipt header

PRECEIPTD

No

Receipt line