Tuesday, May 16, 2017

QTY USAGE & VENDOR PO Forecast

Forecast report. The import department wanted to forecast what they need to order based on past years as well as materials already on order. The company does import raw materials and parts but does the assembling, and engraving, as well as custom embellishments and design. We are talking about many 10's of thousands of pieces for each of our major parts. QTY USAGE + VENDOR PO Forecast. I used sub-reports for this because it's a long and complex display row. Sub-reports are useful when there is a lot of data from various tables and you just need to branch off and pick up a passenger. In this case, past years data to show against current year data, showing the projected difference, so they can place an order for more parts. We show usage in 3 month increments and this includes our marked data, the PO and inventory on order to get a rolling 3 months. The main formula here is pulling for the next 3 months. We need to format the date because it is stored as YYYYMMDD. numbervar mm1:=0; numbervar dd1:=0; numbervar yy1:=0; numbervar newmm1:=0; numbervar newyy1:=0; mm1:= tonumber(Mid (CStr ({@S1AckFromDate2}),6 ,1 )& Mid (CStr ({@S1AckFromDate2}),8 ,1 )); dd1:= tonumber(Mid (CStr ({@S1AckFromDate2}),9 ,2 ) ); yy1:= tonumber(Mid (CStr ({@S1AckFromDate2}),1 ,2 )& Mid (CStr ({@S1AckFromDate2}),4 ,2 )); if mm1+1>12 then newmm1:=1; if mm1+1>12 then newyy1:= yy1+1; if mm1+1<=12 then newmm1:=mm1+1; if mm1+1<=12 then newyy1:= yy1; tonumber(cstr(newyy1,0) & right("00" & cstr(newmm1,0),2) & right("00" & cstr(dd1,0),2))

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home