select top #attributes.monthsToAverage# dw.timeframeId, dw.startDate from tbl_DW_Timeframes dw where dw.ownerId = and dw.ownerType = and exists ( select * from tbl_MFR_TPF_Detail tpf where tpf.mfr_id = and tpf.tpartnerType = 'CDR' and tpf.forecast_status = 'A' and tpf.timeframeId = dw.timeframeId ) order by dw.startDate desc select skuId, convert( int, sum( forecast_qty ) / #_monthsToAverage# ) avgSales from tbl_MFR_TPF_Detail where mfr_id = and forecast_status = 'A' and tpartnerType = 'CDR' and tpartnerId = and productLevel = 'SKU' and skuId is not null and timeframeId in ( ) group by skuId having (sum( forecast_qty ) / #_monthsToAverage#) between and select -1 avgSales ,qmd_stockingGuide.#_c# from qmd_stockingGuide where skuId in ( ) select qmd_skuSales.avgSales ,qmd_stockingGuide.#_c# from qmd_skuSales, qmd_stockingGuide where qmd_stockingGuide.skuId = qmd_skuSales.skuId select * from qmd_stockingGuide order by product, sku
&##160;

Stocking
SKU Pack Dst. SKU #attributes.monthsToAverage# Month
Average
&##160;#htmleditformat( product )# - #htmleditformat( productDesc )#(#lsnumberformat( _skuCount )# skus)
YN #htmleditformat( packSizeDesc )# #htmleditformat( customerSku )# &##160;<1#lsnumberformat( avgSales )#
No SKUs matching the search criteria above were found.

Loading, Please wait...

#_portletBodyHTML#