Check minimal and maximal issues for a Bill of materials position or all Bill of materials positions.
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/CheckMinMax(DocEntry,LineNumber,LineNumber2,IssueQuantity,BaseQuantity)
DocEntry = work order number
LineNumber = work order position
LineNumber2 = Bill of material position or 0 for all positions
IssueQuantity = Issue Qty for current process
Note: if BaseQuantity>0 then the system ignore booked quantity
BaseQuantity = calculate min/max based on this quantity without checking booked Qty
or 0 for total quantity with min/max check with checking booked Qty
or -1 for total quantity with only max check with checking booked Qty
checkBooked = check booked quantity true/false
return
status = ok or locked
if status not ok then
Status = Locked
StatusText = Minimum/Maximum information
LineNumber = Bill of Material position
ItemCode = The Material Id
MaxQuantity = max. allowed as string or "not checked"
MinQuantity = min. allowed as string or "not checked"
BookedQuantity = current booked quantity as string
PlanQuantity = planned quantity as string
Note: all numbers as string based on "BaseQuantity"
{
"Status": "locked",
"StatusText": "Minimum undershoot",
"LineNumber": "10",
"ItemCode": "RM",
"MaxQuantity": "not checked",
"MinQuantity": "5.000000",
"BookedQuantity": "1.000000",
"PlanQuantity": "10.000000"
}