Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Work Orders With Multiple Items - Context?
11-27-2018, 10:36 PM (This post was last modified: 11-27-2018 11:39 PM by VortecCPI.)
Post: #10
RE: Work Orders With Multiple Items - Not Working
Also... CollectiveWorkOrderCost.php is not grouping like items together when they exist in BoMs for each parent item in the WO.

This change, which adds SUM and GROUP BY, seems to work:

PHP Code:
            //lets do the workorder issued items retrieve
            
$sql "SELECT stockmoves.stockid,
                stockmaster.description,
                stockmaster.decimalplaces,
                trandate,
                SUM(qty) AS qty,
                reference,
                stockmoves.standardcost
                FROM stockmoves INNER JOIN stockmaster
                ON stockmoves.stockid=stockmaster.stockid
                WHERE stockmoves.type=28
                AND reference IN (" 
$WOSelected ")
                GROUP BY stockmoves.stockid,
                    stockmaster.description,
                    stockmaster.decimalplaces,
                    trandate,
                    reference,
                    stockmoves.standardcost
                ORDER BY reference"


I have looked long and hard at all this and I still feel the best way is to fill the StockMoves.Reference field with WOId and ParentStockId instead of just WOId. This gives us enough granularity to manage WOs and every WO item in the context of any report we may need.

But... This presents an issue with respect to backwards compatibility. In our case I believe we MUST have the granularity stated above but I do not really want to maintain a special fork of the code. The obvious fix seems to be to never place more than one item on a Work Order, which seems reasonable, and perhaps even good practice. It also allows for much easier time capture as all time goes against an entire WO, not a certain WO Item. WOs with many items could get confusing very quickly.

We still have the issue that Labour and Overhead costs are not coming over during WO receipt and causing a mismatch with respect to inventory value. The obvious fix seems to be to never use these two fields for items with BoMs but then it is my opinion we should hide these input fields for items with BoMs. My new scripts accommodate Labour and Overhead at the parent level for items with BoMs but again this may present a backwards compatibility issue and, again, I do not really want to maintain a special fork of the code.

So... What do we think about disallowing multiple items on Work Orders (perhaps a system setting) and hiding Labour and Overhead standard cost inputs for items with BoMs? This seems to be a very good compromise in that it prevents these issues from occurring and, in my opinion, makes weERP safer and more intuitive for new users. This forces webERP users to create Stock Categories for Labour and Overhead to be used in BoMs. Does this make sense?

I also have Work Center setup working but that is a whole topic on its own...
So now... What about M parts with no BoM? These parts should have Labour and Overhead costs associated with them. If we add these sort of parts to a WO and receive them do we still have the same issues? My guess is inventory value will again be mismatched after receipt of WO items. As stated above my scripts have addressed Labour and Overhead costs associated with them but not Material for items without BoMs.

   

So... Do we disallow these sorts of items from being placed on WOs?

Many Use Cases for WOs and all should be visited...

https://www.linkedin.com/in/eclipsepaulbecker
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Work Orders With Multiple Items - phil - 11-27-2018, 05:06 AM
RE: Work Orders With Multiple Items - Not Working - VortecCPI - 11-27-2018 10:36 PM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)