webERP Forum
Add Work Center to W/O Processing - Printable Version

+- webERP Forum (http://www.weberp.org/forum)
+-- Forum: webERP Discussion (/forumdisplay.php?fid=1)
+--- Forum: Feature Requests (/forumdisplay.php?fid=5)
+--- Thread: Add Work Center to W/O Processing (/showthread.php?tid=2117)

Pages: 1 2


Add Work Center to W/O Processing - agaluski - 02-20-2014 01:03 AM

Currently a Work Center is added to BOM in BOM Maintenance but the W/O processing uses Location, not work center to determine which parts of the BOM to use. Ideally a work center should be assigned to a factory location and Work Orders assigned to a Work Center, not a location. The location will be assigned from the Work Center/Location reference. BOM Maintenance, cost calculations etc should use Work Center as part of the key in addition to location. The reason for this is that a product can be made differently on different manufacturing lines within the same factory.


RE: Add Work Center to W/O Processing - phil - 02-21-2014 12:53 PM

Well the thinking here was that in a different factory there is potential to use a different BOM for the same item. There could be completely different work centres as the factories are configured differently. There can be any number of work centres per BOM - but they are really specific to a location (warehouse or factory)

We can't currently accommodate different BOMs for the same factory.


RE: Add Work Center to W/O Processing - agaluski - 02-21-2014 11:33 PM

Right Phil,
Not sure what the final solution is but have worked in many places where factory is the same, work centers are different as same product. So we used different BOMs by Work Center. That is all I am looking to discuss. That capability.


RE: Add Work Center to W/O Processing - VortecCPI - 10-25-2018 03:10 AM

I have done some work in this respect and now have some partial functionality.

When I get it in a place I feel good about I will share it with everybody...


RE: Add Work Center to W/O Processing - VortecCPI - 10-25-2018 07:08 AM

For now I am using the Reference field for holding the WorkCentre code.

I am trying to do this with as few changes as possible for the sake of a demo.


RE: Add Work Center to W/O Processing - VortecCPI - 10-26-2018 01:15 AM

Getting close to what I need but there is one small issue...

Currently there is no way to assign a Work Center to the top-level assembly. As a top-level manufactured assembly requires work to be done in a Work Center this is necessary.

A quick preview...

[attachment=860]


RE: Add Work Center to W/O Processing - VortecCPI - 10-28-2018 09:53 PM

Attached is code for MRP.php for review...
Also... I noted when running MRP the AuditTrail table gets filled with entries making SQL backup files HUGE. It sure would be nice to be able to choose this as an option for MRP as it does not actually affect data in the ERP system -- That must be done manually.

Is there any way to defeat Audit Table updates via a change to MRP.php code?


RE: Add Work Center to W/O Processing - VortecCPI - 11-14-2018 12:25 AM

Slowly but surely...

[attachment=872]


RE: Add Work Center to W/O Processing - VortecCPI - 11-16-2018 12:40 PM

Now have Work Centers per Work Order line item:

[attachment=878] [attachment=879]

Also have number of setups required for WO and Std Cost update via overhead from same. So if WC cost (i.e., rate and/or time and/or capacity) is changed stock overhead value will also change.

Below is from WorkOrderReceive.php:

PHP Code:
            //Check overhead cost value and update if it does not match Work Center setup value                                     
            
$OvhdResult DB_query("SELECT workcentres.setuphrs,
                                            workcentres.overheadperhour,
                                            workcentres.capacity,
                                            woitems.qtyreqd
                                FROM workcentres
                                INNER JOIN woitems 
                                ON workcentres.code=woitems.wccode
                                WHERE woitems.wo='"
$_POST['WO'] . "'
                                AND woitems.stockid='" 
$_POST['StockID'] . "'");
                                
            if (
DB_num_rows($OvhdResult)>0){
                
$OvhdRow DB_fetch_array($OvhdResult); 
                if (
$OvhdRow['qtyreqd'] <= $OvhdRow['capacity']){
                    
$QtySetups 1//Within capacity so only one setup required
                
} else {
                    
$QtySetups Round(($OvhdRow['qtyreqd'] / $OvhdRow['capacity'] + 0.999); //Qty setups
                
}
                
$OverheadCost = ($QtySetups $OvhdRow['setuphrs'] * $OvhdRow['overheadperhour']) / $OvhdRow['qtyreqd'];
                
$ItemCostRow['overheadcost'] = $OverheadCost//Set to cost of Work Centre setup
            
} else {
                
$ItemCostRow['overheadcost'] = 0//Set to zero if Work Order has no Work Centre
            


Still have a lot of testing to do but seems sane. I assume Absorption/Recovery GL Account can be incorporated and implemented when timesheets are done...


RE: Add Work Center to W/O Processing - VortecCPI - 11-17-2018 02:05 AM

Okay... I believe I am close to having this wrapped up. All the work I have done is in the context of 4.14.1 but the changes are easy enough to see and reconcile with the newer scripts.

Do we know when 4.15.1 will be released? If it will not be for some time I will add and test my changes in a current GIT instance prior to 4.15.1 release so perhaps we can release this work with it. Perhaps Phil's Employees and Timesheets feature will also be ready? I see these scripts update workorders.costissued as do my new scripts so together we should be able to track both WC overhead and WC labor.

Is anybody using Work Orders and Work Centers able to give me a hand with checking?