General parameters > Chapter Purchase > Parameter PRIFLG (Full stock valuation) 

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

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:
For additional invoices on invoices linked to orders:
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

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.