Description: Distributes a total quality-loss quantity proportionally across matching weekly dryer events, inserts reason rows and writes each event's corrected off-spec loss.
Calling convention: WES_SI_distributeQLosses(TrocknerSelectListEntryID: Integer, CalendarWeek: Double, CalendarYear: Double, ProductID: Integer, TotalQualityLosses: Double, TotalProduction: Double)
Parameters:
TrocknerSelectListEntryID: SelectListEntries ID used to resolve the dryer number.
CalendarWeek: target calendar week.
CalendarYear: target calendar year.
ProductID: target product.
TotalQualityLosses: quantity to distribute.
TotalProduction: denominator for proportional allocation.
Returns: NULL; the routine modifies event and reason tables and does not assign a success value.
Availability: Default; Wesseling Silica-specific. TotalProduction and event duration must be non-zero.
Example:
WES_SI_distributeQLosses(DryerChoice, Week, Year, ProductID, QLoss, Production);