This parameter is used within the context of the management of purchase documents, and namely the stock valuation calculation.

Yes
One or several recordings are created for each document line in a dedicated table (PTDSTKVAL), when the following elements are validated:
    • An invoice
    • A credit memo (see comment below)
    • An additional invoice (see comment below)
    • A credit memo on additional invoice (see comment below)
These records track the history of the links between this invoice or credit memo and the other purchase documents (orders, shipments and receipts). In addition it saves all the valuation data, such as the quantity and the stock cost per unit calculated using the document values.
These data are used in the receipt valuation calculation.

In this table, the TIAFLG flag is set to 1 when the invoice valuation elements have not been considered yet in the stock valuation calculation, and therefore matched with a receipt. Whenever a record is posted to a receipt, the related valuation elements are taken into account and this flag is automatically set to 2.
This new link table is used to consider all the invoices, credit memos and additional invoices associated with the receipts, irrespective of which documents arrived first. The stock value and the stock movement amount associated with the receipt is subsequently adjusted via the stock adjustments.

The shipment and shipment line are entered in this table only for additional invoices on shipment and for the credit memos on these additional invoices. These data are not entered when an invoice, an additional invoice, or a credit memo on order or on receipt is validated, even when a shipment is linked to these documents.

No
The PTDSTKVAL table is not populated.

In the event of a partial invoicing, there can be a difference when determining the stock cost per unit, depending on whether the receipt has been created before or after invoice validation.
In effect, when the receipt is created before invoice validation, the stock cost per unit is recalculated when each invoice is validated. On the other hand, when the invoice occurs before receipt (invoice on order), the stock cost per unit is determined solely from the stock cost per unit of the first invoice and the related additional invoices. It does not take the order price into account although the latter can be different on the next invoices.

Note on credit memos

  • When a credit memo is created for a return linked to a supplier receipt, this credit memo will always impact the input movement of the original receipt (not the output movement relative to the return).
  • When a credit memo is created for a purchase invoice, the link is established between these two documents. Moreover, the credit memo can impact several receipts depending on the link established with the invoice (order or receipt). The record thus created in the PTDSTKVAL table is then linked to the original invoice and to the receipt (or order). If the invoice is linked to several receipts (order invoicing or receipt over-invoicing) and the credit memo is complete with respect to the invoice, the records created in this table for the credit memo are split in the same way as the records for the invoice. In this context, due to possible overinvoicing, the asset linking rule is as follows: a credit memo is linked in priority with the invoice links not yet posted to a receipt. Consequently, credit memos will be considered as credit memos correcting invoices for which receipts are not longer expected. If a new receipt needs to be recorded, the credit memo will then correct this receipt. The priority rule is the following:
    • Link to invoices that are not linked to receipts
    • Link to invoices that are not directly linked to receipts (over-invoicing upon receipt)
    • Link to invoices that are linked to receipts
The process is applied until the quantity on the credit memo has been fully assigned.

Note on additional invoices/credit memos on additional invoices

Only the additional invoices (or credit memos on additional invoices) meeting the following conditions are stored and saved in the PTDSTKVAL table:

For additional invoices on invoices:
  • The related flag, New cost is set to Yes
For additional invoices on receipts:

  • The related flag, New cost is set to Yes
  • The related flag, New cost is set to No and a cost is entered
    The impacted receipts and their stock value are updated by launching the STCREG – Cost matching query: during the first matching operation, the processing replaces on the receipt the amount adjusted with the cost by the amount of the additional invoice. During the following matching operations, the amount of the additional invoices completes the cost amount on the receipt. In addition, the processing recalculates the stock cost per unit and generates adjustment movements.

For additional invoices on orders:

  • The related flag, New cost is set to Yes
    Additional invoices on orders are saved in the table but they are only used when the order is closed.
  • The related flag, New cost is set to No and a cost is entered
    They are saved in the table but they are only used when the following conditions are met: the order is closed and the STCREG – Cost matching query has been launched. This task updates the impacted receipts and their related stock value. During the first matching operation, the processing replaces the cost adjusted amount by the amount of the additional invoice. During the following matching operations, the amount of the additional invoices completes the cost amount.
Notes:
  • When several receipts are associated with the order, the record linked to the additional invoice is split in as many records as there are receipts. It is split in proportion to the received quantities. The different amounts (amount on the line, invoicing elements and non-deductible costs) are applied to the stock and the records are matched.
  • If the order is closed although the quantity has not been fully received, the additional invoice is distributed onto the existing receipts in proportion to the quantities. Records are updated in the table using this new distribution.
  • If one of the receipts is deleted and the order is reopened, links are removed in the table. A message is displayed to inform you that costs (originating from an additional invoice) have already been matched for this document (using the STCREG – Cost matching task). In other words, after a receipt has been deleted, the distribution of costs onto the remaining receipts is not updated. The stock cost of these receipts remains unchanged. In actual fact, it is not possible to go back, as the table used by the STCREG – Cost matching task has been cleared during the matching operation.
  • When the New cost flag is set to No and no cost has been entered, the stock valuation is not updated and therefore the table is not completed.

For additional invoices on invoices linked to orders:

  • The related flag, New cost is set to Yes
    They are saved in the table. They are distributed onto the existing receipts or new receipts as they arrive, in proportion to the received quantities. When the order is closed, any remainder tracked by the records of the table is distributed onto all the receipts.
Note:
  • When the related New cost flag is set to No, no cost can be entered, the stock valuation is not updated and therefore the table is not completed.

For additional invoices on shipments

  • The related flag, New cost is set to Yes
    Additional invoices on shipments are saved in the table but they are only considered when the shipment is closed, in proportion to the existing receipts.
  • The related flag, New cost is set to No and a cost is entered
    They are saved in the table but they are only considered when the following conditions are met: the shipment is closed and the STCREG - Cost matching query has been launched. This task updates the impacted receipts and their related stock value. During the first matching operation, the processing replaces the cost adjusted amount by the amount of the additional invoice. During the following matching operations, the amount of the additional invoices completes the cost amount.
Notes:
  • When several receipts are associated with the shipment, the record linked to the additional invoice is split in as many records as there are receipts. It is split in proportion to the received quantities.
  • If the shipment is closed although the quantity has not been fully received, the additional invoice is distributed onto the existing receipts in proportion to the received quantities and the invoice amount is integrated into the stock valuation. Records are updated in the table using this new distribution.
  • If one of the receipts is deleted and the shipment is reopened, links are removed in the table. A message is displayed to inform you that costs (originating from an additional invoice) have already been matched for this document (using the STCREG – Cost matching task). In other words, after a receipt has been deleted, the distribution of costs onto the remaining receipts is not updated. The stock cost of these receipts remains unchanged. In actual fact, it is not possible to go back, as the table used by the STCREG – Cost matching task has been cleared during the matching operation.

Example of the impact of this parameter in the event of an invoice on order

  • Order with a quantity of 10 and a unit amount of €100.
    Total order: € 1000
    Cost amount: € 100
    Stock cost: € 1100
    Stock cost per unit: € 110

  • 1st partial invoice on order for a quantity of 4 and a unit price of €100. The total amount excluding tax is € 400.

  • 2nd partial invoice on order for a quantity of 6 and a unit price of €160. The total amount excluding tax is € 960.

  • Total receipt of a quantity of 10.
If the parameter is set to No:
The stock cost per unit is €110, solely calculated on the basis of the stock cost per unit of €110 from the first invoice.

If the parameter is set to Yes:
The stock cost per unit is €146, calculated on the basis of the stock cost per unit of €110 from the first invoice and of stock cost per unit of €170 from the second invoice.

Localization level / Global variable

This parameter is defined at the level Site. It belongs to Chapter ACH (Purchase) and the Group REC (Receipt management rules), The following parameters are also associated with this chapter and group :

  • PTHDIR (Direct receipt)
  • STCPTH (Cost loading upon order rcpt)

The global variable GPRIFLG is associated with it.

Functions concerned

The following functions are associated with this parameter :

  Purchasing > Invoices > Invoice validation

  Purchasing > Invoices > Invoices

  Stock > Receipt/issue transactions > Receipts

Notes

Choosing to set the parameter to Yescannot be undone. The parameter can no longer be set to No as soon as the table starts to be populated, in other words, from the first invoice validation.
The setup becomes effective on the date when the parameter is set to Yes:
  • Orders and receipts created on this date follow the method defined for the stock cost per unit associated with the Yes value, as soon as they are invoiced.
  • Orders and receipts created before this date keep the method defined for the stock cost per unit associated with the No value, when they are invoiced.