Description: Distributes a total quality-loss quantity proportionally across matching hourly dryer events and inserts corresponding reason rows.
Calling convention: WES_SI_distributeQLossesInHourlyEvents(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 the hourly reason table and does not assign a success value.
Availability: Default; Wesseling Silica-specific. TotalProduction and event duration must be non-zero.
Example:
WES_SI_distributeQLossesInHourlyEvents(DryerChoice, Week, Year, ProductID, QLoss, Production);