M3_H5_DistributeVariance
Use this H5 script to match each Purchase Order (PO) in a freight bill with their corresponding
variance. The script calculates and distributes these variances in each PO line within a
supplier invoice. You can start the PO matching with the product, regardless of these
conditions:
- If freight is billed and invoiced simultaneously with the product.
The supplier either bills the freight or spreads additional charges. The script uses the received quantity of each PO line to identify the additional cost for the selected line.
- If the bill is from a third party.
An example of a third-party bill is when you are using a courier service. The invoiced item and the actual third-party invoice or purchase order are required.
When variance is spread, the calculation follows either of this formula:
- Weight formula
Measure Description Weight variance Received quantity multiplied by weight Total weight Sum of all weight variance Weight percentage Weight variance divided by the total weight Variance total Amount to invoice (on panel) Line variance Weight percentage multiplied by the variance total - Volume formula
Measure Description Volume variance Received quantity multiplied by volume Total volume Sum of all volume variance Volume percentage Volume variance divided by the total volume Variance total Amount to invoice (on panel) Line variance Volume percentage multiplied by the variance total
Limitation
The script is only added to 'Supplier Invoice Match GR Line' (APS360/B).
Script argument
Argument example for (APS360):
3,30, Distribute Variance, true
This table shows the argument and its description:
Argument | Example | Optional | Description |
---|---|---|---|
Target row for the button | 3 | No | Specify any row selection. |
Target row for the column | 30 | No | Specify any column selection. |
Button name | Distribute Variance | No | Use a button name that relates to the purpose of the script. |
Is Variance by Volume? | true | Yes | When the argument is set to true, the script uses the Volume as its basis in calculating the variance instead of the PO line’s weight. Otherwise, the default basis in calculating the variance would be by Weight. |
API used in the script
This table shows details about M3 APIs used in this script:
Program | Transaction |
---|---|
APS360MI | Lst_WD_LstPOVar |