Check minimal and maximal issues for all BoM Position linked to a routing position
In the Configuration wizard it's possible to define the min/max value for Bill of materials position. With this function you can check if the count of issues are correct based on this rule.
if LineNumber2 is 0, then the system checks all positions.
WorkorderBom/CheckMinMaxRouting(DocEntry,LineNumber,Routing-LineNumber2,IssueQuantityString,BaseQuantity)
Parameter |
Description |
---|---|
DocEntry |
Work order number |
LineNumber |
Work order position |
Routing-LineNumber |
Routing Position Defines the routing position, for which you want to check BoM Positions Use "0" for backflushing processes
If Pos > 0, the system checks all linked Bill of material positions If Pos = last position (or first position and backflush = first position) If Pos = last position (or first position and backflush = first position) |
IssueQuantityString |
Quantities for the current issue process "pos_id:quantity,pos_id:quantity" |
BaseQuantity |
Receipt - Quantity (only as information) 0=complete planned quantity If > 0, the system calculates needed material in % to planned quantity |
return
status = ok -> all ok, question, blocked
if the statusis not OK, the system returns the following information (values are only examples)
{
"Status": "question",
"DocEntry": "4030",
"LineNumber": "10",
"LineNumber3": "10",
"PositionText": "10",
"ItemCode": "RM",
"MinQuantityAllowed": "3.000000",
"MaxQuantityAllowed": "3.000000",
"BookingQuantity": "5.200000",
"ShortText": "Maximum overrun",
"LongText": ""Entered posting quantity for item RM is bigger than allowed quantity!\nAllowed quantity: 3.0000\nCharge-off quantity: 5.2000\nalready posted: 0.00000\nCharge-off and proceed?""
}