SUBPIHB processing: Purchase invoice
ORIPRIAVR: Load prices for a credit memo on return line
This entry point is located in the SUBPIHBprocessing (loading of a credit memo on supplier return line). It generates an ORIPRIAVR action.
The purpose of this action is to allow specific unit prices to be loaded.
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 performed when the credit memo line is being loaded. The credit memo line can either be the result of a supplier return picking or of a manual entry.
Available variables
The following variables are loaded when the "ORIPRIAVR" action is being called.
[M:PIH1]CUR
Currency in which prices should be expressed.
NOL
Index of the line being loaded.
The following masks can be used: [M:PIH0], [M:PIH1], [M:PIH2], [M:PIH3], [M:PIH4]
The variable and the classes mentioned above should not be modified with the exception of the following.
The following variable should be modified to force a specific unit price.
M:PIH3]NETPRI (NOL)
Net unit price.
The following variables can be modified for information purposes only because this will not influence the calculation of the line.
[M:PIH3]GROPRI (NOL)
Gross unit price.
[[M:PIH3]DISCRGVAL1 (NOL) to [M:PIH3]DISCRGVAL9 (NOL)
Discounts/Charges 1 to 9.
[M:PIH3]PRIREN (NOL)
Gross price reason.
[M:PIH3]DISCRGREN1 (NOL) à [M:PIH3]DISCRGREN9 (NOL)
Reasons for discounts/charges 1 to 9.
Open tables
In the table below, the Significant content flag means that the content matches the context.
Table |
Significant content |
Table title |
PINVOICE |
No |
Invoice header |
PINVOICEV |
No |
Purchase invoice header addition |
PINVOICED |
No |
Purchase invoice lines |
PRETURN |
Yes |
Supplier return header |
PRETURND |
Yes |
Supplier return line |
PRECEIPT |
Yes |
Receipt header |
PRECEIPTD |
Yes |
Receipt line |
Miscellaneous remarks
This entry point is called only if the credit memo line originates from a supplier return.
ORIPRIFAC: Invoice line price origin
This entry point is located in the SUBPIHB processing (loading of purchase invoice lines). It generates an ORIPRIFAC action.
The purpose of this action is to allow an intervention on the loading of the original 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 performed when the invoice line is being loaded. The invoice line can either be the result of a picking or of a manual entry.
Available variables
The following variable is loaded when the "ORIPRIFAC" action is called.
NOL
Index of the line being loaded.
The following masks can be used: [M:PIH0], [M:PIH1], [M:PIH2], [M:PIH3], [M:PIH4]
The variable and the classes mentioned above should not be modified.
The following variable should be modified to allow an intervention on the loading of the original unit price.
ORIPRIRCP
Loading indicator of the original unit price of the invoice line.
1 = Loading from the price saved on the order line (default value)
2 = Loading from the price saved on the receipt line
Open tables
In the table below, the Significant content flag means that the content matches the context.
Table |
Significant content |
Table title |
PINVOICE |
No |
Invoice header |
PINVOICEV |
No |
Purchase invoice header addition |
PINVOICED |
No |
Purchase invoice lines |
PORDER |
Yes |
Order header |
PORDERP |
Yes |
Order price line |
PORDERQ |
Yes |
Order quantity line |
PRECEIPT |
Yes |
Receipt header |
PRECEIPTD |
Yes |
Receipt line |
Miscellaneous remarks
This entry point is called only if the invoice line comes from a receipt.
ALILIGFAC: Loading of the invoice line
This entry point is located in the SUBPIHBprocessing (loading of purchase invoice lines). It generates an ALILIGFAC action.
The purpose of this action is to allow the modification of the values on the line or the loading of specific fields.
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 performed when the invoice line is being loaded. The invoice line can either be the result of a picking or of a manual entry.
Available variables
The following variable is loaded when calling the "ALILIGFAC" action.
NOL
Index of the line being loaded. This variable cannot be modified.
The following masks can be used: [M:PIH0], [M:PIH1], [M:PIH2], [M:PIH3], [M:PIH4]
[M:PIH3]TYPORI (NOL)
This field is used to specify the loading type.
- 1 Preloading from the orders
- 2 Preloading from the receipts
- 3 Preloading from the returns
- 4 Preloading of the credit memo from the invoice if field [M:PIH0]PIHTYP=3
- 4 Preloading of the additional invoice line if field [M:PIH0]PIHTYP=2
- 5 Preloading of the miscellaneous line
Main fields that can be modified
[M:PIH3]QTYUOM(NOL)
This field contains the invoiced quantity. It is linked to the [M:PIH3]UOM(NOL) unit.
If this field is modified, the program will recalculate two items: the quantity in purchase unit contained in the [M:PIH3]QTYUPUU(NOL) field linked to the [M:PIH3]PUU(NOL) unit based on the factor contained in the [M:PIH3]UOMPUUCOE(NOL) field; and the ex-tax amount for the line contained in the [M:PIH3]AMTNOTLIG(NOL) field in the currency specified in the [M:PIH1]CUR field.
[M:PIH3]QTYPUU(NOL)
This field contains the quantity invoiced in purchase unit. It is linked to the [M:PIH3]PUU(NOL) unit.
If this field is modified, the program will recalculate two items: the quantity in UOM contained in the [M:PIH3]QTYUOM(NOL) field linked to the [M:PIH3]UOM(NOL) unit based on the factor contained in the [M:PIH3]UOMPUUCOE(NOL) field; and the ex-tax amount for the line contained in the [M:PIH3]AMTNOTLIG(NOL) field in the currency specified in the [M:PIH1]CUR field.
[M:PIH3]ORIQTYPUU(NOL)
This field contains the original quantity to be invoiced in purchase unit. It is used to detect whether or not there is a difference in the quantity.
Warning: This field is not automatically loaded if the [M:PIH3]QTYPUU(NOL) field is modified. In that case, it must be managed in the entry point, if needed.
[M:PIH3]NETPRI(NOL)
This field contains the net price in the currency specified in the [M:PIH1]CUR field.
If this field is modified, the program will recalculate the ex-tax amount of the line contained in the [M:PIH3]AMTNOTLIG(NOL) field in the currency specified in the [M:PIH1]CUR field.
[M:PIH3]ORIPRINET(NOL)
This field contains the original net price. It is used to detect whether or not there is a difference in the price.
Warning: This field is not automatically loaded if the [M:PIH3]NETPRI(NOL) field is modified. In that case, it must be managed in the entry point, if needed.
[M:PIH3]AMTNOTLIG(NOL)
This field contains the ex-tax line amount.
If this field is modified and the quantity and net price have not been modified, the program recalculates the [M:PIH3]NETPRI(NOL) net price of the line in the currency specified in the [M:PIH1]CUR field.
[M:PIH3]PRTFLG(NOL)
This field contains the flag used to identify whether or not there is partial invoicing.
1 No
2 Yes
Open tables
In the table below, the Significant content flag means that the content matches the context.
Table |
Significant content |
Table title |
PINVOICE |
No |
Invoice header |
PINVOICEV |
No |
Purchase invoice header addition |
PINVOICED |
No |
Purchase invoice lines |
PORDER |
Yes |
Order header |
PORDERP |
Yes |
Order price line |
PORDERQ |
Yes |
Order quantity line |
PRECEIPT |
Yes |
Receipt header |
PRECEIPTD |
Yes |
Receipt line |
CTLVALFAC: Deactivation of the control on the validated invoice or credit memo
This entry point is located in the SUBPIHB processing (processing of purchase invoices). It generates a CTLVALFAC action.
The purpose of this action is to allow the process to continue without controlling the invoices or credit memos relating to the original document.
This control is applied to ensure that the invoices or credit memos previously entered have been validated. This requires that they are validated in the chronological order of their creation to guarantee the correct adjustment of the stock movement prices.
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 performed when a purchase invoice/credit memo is being created. The purchase invoice/credit memo can either be the result of the picking or of the manual entry of the original document (order, receipt or return).
Available variables
The following variable should be modified to prevent the control from being performed.
WCONTROLE
Flag of the control to perform
0 = No control to perform on the invoices or credit memos previously entered.
1 = The standard control is performed (default value).
Open tables
In the table below, the Significant content flag means that the content matches the context.
Table |
Significant content |
Table title |
PINVOICE |
No |
Invoice header |
PINVOICEV |
No |
Purchase invoice header addition |
PINVOICED |
No |
Purchase invoice lines |
PORDER |
No |
Order header |
PORDERP |
No |
Order price line |
PORDERQ |
No |
Order quantity line |
PRECEIPT |
No |
Receipt header |
PRECEIPTD |
No |
Receipt line |
Miscellaneous remarks
Warning: The deletion of the control followed by the validation of the invoices in the wrong order can lead to an incorrect price adjustment.
CALTAXEGLOB: Intervening when the global calculation of the purchase invoice tax
This entry point is located in the SUBPIHB processing (purchase invoice processing). It generates a CALTAXEGLOB action.
The purpose of this action is to allow interventions during the global calculation of the purchase invoice taxes.
This entry point is mainly used in the context of the Argentine localization.
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 performed for each tax when the PIHCALTAX parameter is set to 2 "Tax basis".
This call is performed when a purchase invoice/credit memo is entered and before selecting the "Create" or "Save" button.
Available variables
The following masks are loaded: [M:PIH0], [M:PIH1], [M:PIH3] and [M:PIH4]
I
Index of the line of the table of taxes being processed.
[M:PIH4]TAXE(I)
Code of the tax being processed.
[M:PIH4]BASTAX(I)
Calculation basis of the tax being processed.
MONTANT
Amount of the tax being processed.
MONTDED
Amount of the deductible part of the tax being processed.
SEUIL
Minimum tax amount below which tax should no longer be calculated.
Open tables
In the table below, the Significant content flag means that the content matches the context.
Table |
Significant content |
Table title |
PINVOICE |
No |
Invoice header |
PINVOICEV |
No |
Purchase invoice header addition |
PINVOICED |
No |
Purchase invoice lines |
PORDER |
No |
Order header |
PORDERP |
No |
Order price line |
PORDERQ |
No |
Order quantity line |
PRECEIPT |
No |
Receipt header |
PRECEIPTD |
No |
Receipt line |
Miscellaneous remarks
This entry point is normally used in the context of the Argentine localization.
ALIINVDTA: Modification of invoicing elements
This entry point is located in the SUBPIHD processing (modification of invoicing elements). It generates a ALIINVDTA action.
The purpose of this action is to allow the modification of the values of the fields of the invoicing elements and invoicing lines.
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 performed after an invoicing element has been modified.
Available variables
The following variable is loaded when calling the "ALIINVDTA" action.
NOL
Index of the line being processed. This variable cannot be modified.
The following masks can be used: [M:PIH0], [M:PIH1], [M:PIH2], [M:PIH3], [M:PIH4]
Open tables
In the table below, the Significant content flag means that the content matches the context.
Table |
Significant content |
Table title |
PINVOICE |
No |
Invoice header |
PINVOICEV |
No |
Purchase invoice header addition |
PINVOICED |
No |
Purchase invoice lines |
PORDER |
Yes |
Order header |
PORDERP |
Yes |
Order price line |
PORDERQ |
Yes |
Order quantity line |
PRECEIPT |
Yes |
Receipt header |
PRECEIPTD |
Yes |
Receipt ilne |