webERP Forum

Full Version: Add Work Center to W/O Processing
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
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.
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.
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.
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...
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.
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...

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?
Slowly but surely...

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,
                                FROM workcentres
                                INNER JOIN woitems 
                                ON workcentres.code=woitems.wccode
                                WHERE woitems.wo='"
$_POST['WO'] . "'
                                AND woitems.stockid='" 
$_POST['StockID'] . "'");
            if (
$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...
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?
Pages: 1 2
Reference URL's