Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Work Order - Inventory Value Mismatch
11-20-2018, 10:34 PM (This post was last modified: 11-20-2018 11:00 PM by VortecCPI.)
Post: #1
Work Order - Inventory Value Mismatch
I created a simple manufactured part with a BoM containing (1) Labor item and (1) Raw material item. I also added Labor and Overhead to Std Cost at the manufactured part level.

I added the part to a Work Order and received it and the value of receipt in the GL ignores Labor and Overhead added to Std Cost at the manufactured part level. That is it consists only of material values in the BoM.

If I look at GL 1420 and compare it to an Inventory Valuation report there is a discrepancy due to the difference caused by ignoring Labor and Overhead added to Std Cost at the manufactured part level upon WO receipt.

Is this as expected or are we missing pieces here? Should not the Inventory Valuation report yield the same value as GL 1420? It seems to me the Labor and Overhead costs are being lost. Should we not be adding Labor and Overhead costs to the value of the manufactured part in inventory?

Also when viewing WO costing there is no place where Labor and Overhead costs for the top-level part are shown. Perhaps we are not to use Labor/Overhead std costs on a manufactured part that is being used in Work Orders?

This whole Work Order thing is about to become very important to us so I must fully understand the above.

Please help!
Test #1 - Restore clean DB, create WO for part and receive 10
Test #2 - Restore clean DB, adjust inventory for part by qty 10

Test #2 works as expected -- That is 1420 matches Inventory Valuation report
Test #1 leaves discrepancy -- That is 1420 does not match Inventory Valuation report

Test #1 results in loss of Labor and Overhead std costs at the manufactured part level.

Surely this is not correct...

https://www.linkedin.com/in/eclipsepaulbecker
Visit this user's website Find all posts by this user
Quote this message in a reply
11-21-2018, 01:38 AM (This post was last modified: 11-21-2018 01:44 AM by VortecCPI.)
Post: #2
RE: Work Order - Inventory Value Mismatch
Looks to me like the whole Work Order feature is only half baked. The only thing I can think of is that it is not meant to be used where Labor and/or Overhead costs are set at the top level part.

In our case we must have at least overhead set at the part level so we know true cost and margins. Are you guys perhaps somehow addressing Overhead as some sort of BoM item associated with GL accounts as we are doing with the Labor Stock Type?

https://www.linkedin.com/in/eclipsepaulbecker
Visit this user's website Find all posts by this user
Quote this message in a reply
11-21-2018, 02:54 AM (This post was last modified: 11-21-2018 04:29 AM by VortecCPI.)
Post: #3
RE: Work Order - Inventory Value Mismatch
So I see here: http://www.weberp.org/forum/showthread.p...t=overhead

Phil states: "...so setting up an item for each type of labour or department/cost centre."

This seems to imply that Overhead might be addressed as a BoM item as Labour is addressed as a BoM Item. That makes sense to me as it would add Overhead to the item cost via costed BoM and we would have GL accounts to manage the same. However, if this is the case should we not remove or disable input for Labour and Overhead so these items work properly with Work Orders? Seems to me Labour and Overhead Std Cost inputs for "M" items are in conflict with the design and use of the Work Orders feature.

Do any of you have a sample Stock Category you are using for Overhead I can use as a guideline?
Also confusing to me...

In WorkOrderReceive.php we are checking current Std Cost (using Labour and Overhead) against WO costs and adjusting inventory to suit (i.e., Cost roll on release of WO...) but we still end up with mismatched reports. Perhaps this was simply overlooked?
Okay... So after creating a new Stock Category of type Labor and assigning GL codes for overhead I see all works as expected.

It seems this entire time I was thrown off by the Labour and Overhead Std Cost inputs for "M" items as well as the code in WorkOrderReceive.php that checks current Std Cost (using Labour and Overhead) against WO cost.

So correct me if I am wrong but this brings me to these conclusions:

1 - No Labour nor Overhead Std Cost inputs for "M" items used with Work Orders?
2 - No need to check current Std Cost (using Labour and Overhead) vs. WO cost?

<OR>

3 - Work Labour and Overhead costs in to the Work Orders so the GL balances?

Below are the lines of code that had me very confused and led me to believe Labour and Overhead Std Cost inputs were in scope for Work Orders:

PHP Code:
//if GL linked then do the GL entries to DR stock and CR invadj
            
if ($_SESSION['CompanyRecord']['gllink_stock']==AND ($ItemCostRow['labourcost'] + $ItemCostRow['overheadcost'])!=0){
                
                
$WOIssueNo GetNextTransNo(28$db);
                
$PeriodNo GetPeriod(Date($_SESSION['DefaultDateFormat']), $db);
                
                if (
$ItemCostRow['labourcost']!=AND $ItemCostRow['overheadcost']!=0){
                    
$Description _('Labour+Overhead');
                } elseif(
$ItemCostRow['overhead']!=0){
                    
$Description _('Overhead');
                } else {
                    
$Description _('Labour');
                }
                
$Description $Description _('cost') . ' x ' $WORow['qtyreqd'] . ' @ ' . ($ItemCostRow['labourcost'] + $ItemCostRow['overheadcost']);                

                
$SQL "INSERT INTO gltrans (type,
                            typeno,
                            trandate,
                            periodno,
                            account,
                            narrative,
                            amount)
                    VALUES (28,
                        '" 
$WOIssueNo "',
                        '" 
Date('Y-m-d') . "',
                        '" 
$PeriodNo "',
                        '" 
$StockGLCode['adjglact'] . "',
                        '" 
$_POST['WO'] . ' - ' $_POST['StockID'] . ' -> ' $Description "',
                        '" 
. -($WORow['qtyreqd'] * ($ItemCostRow['labourcost'] + $ItemCostRow['overheadcost'])) . "')";

                
$ErrMsg _('CRITICAL ERROR') . '! ' _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' _('The GL credit for the stock cost adjustment posting could not be inserted because');
                
$DbgMsg =  _('The following SQL to insert the WO issue GLTrans record was used');
                
$Result DB_query($SQL$ErrMsg$DbgMsgtrue);

                
$SQL "INSERT INTO gltrans (type,
                            typeno,
                            trandate,
                            periodno,
                            account,
                            narrative,
                            amount)
                    VALUES (28,
                        '" 
$WOIssueNo "',
                        '" 
Date('Y-m-d') . "',
                        '" 
$PeriodNo "',
                        '" 
$StockGLCode['stockact'] . "',
                        '" 
$_POST['WO'] . ' - ' $_POST['StockID'] . ' -> ' $Description "',
                        '" 
. ($WORow['qtyreqd'] * ($ItemCostRow['labourcost'] + $ItemCostRow['overheadcost'])) . "')";

                
$ErrMsg _('CRITICAL ERROR') . '! ' _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' _('The GL debit for the stock cost adjustment posting could not be inserted because');
                
$DbgMsg =  _('The following SQL to insert the WO issue GLTrans record was used');
                
$Result DB_query($SQL$ErrMsg$DbgMsgtrue); 

https://www.linkedin.com/in/eclipsepaulbecker
Visit this user's website Find all posts by this user
Quote this message in a reply
11-21-2018, 04:05 AM (This post was last modified: 11-21-2018 05:08 AM by VortecCPI.)
Post: #4
RE: Work Order - Inventory Value Mismatch
What I now see using above code:

   

Please note above also reflects custom code to manage WC setup.

https://www.linkedin.com/in/eclipsepaulbecker
Visit this user's website Find all posts by this user
Quote this message in a reply
11-21-2018, 05:15 AM (This post was last modified: 11-21-2018 05:38 AM by VortecCPI.)
Post: #5
RE: Work Order - Inventory Value Mismatch
New WorkOrderReceive.php attached if anybody wants to give it a sanity check...
So now we must address missing Labour and Overhead costs on Work Order costing screen and report...
And... If we want to use Labour and Overhead in WOs we need to be able to enter amounts during WO issue...


Attached File(s)
.php  WorkOrderReceiveTEST.php (Size: 46.43 KB / Downloads: 0)

https://www.linkedin.com/in/eclipsepaulbecker
Visit this user's website Find all posts by this user
Quote this message in a reply
11-27-2018, 09:50 AM
Post: #6
RE: Work Order - Inventory Value Mismatch
Or define employees with the labour item they map to and record employee timesheets ... see new script Timesheets.php in git

Phil Daintree
webERP Admin
Logic Works Ltd
http://www.logicworks.co.nz
Visit this user's website Find all posts by this user
Quote this message in a reply
11-27-2018, 10:10 AM
Post: #7
RE: Work Order - Inventory Value Mismatch
Looking forward to testing and using your new scripts!

https://www.linkedin.com/in/eclipsepaulbecker
Visit this user's website Find all posts by this user
Quote this message in a reply
12-04-2018, 12:26 AM (This post was last modified: 12-04-2018 01:39 AM by VortecCPI.)
Post: #8
RE: Work Order - Inventory Value Mismatch
So... Going back to basics...

On line 248 of 4.14.1 we have:
PHP Code:
if (($Cost $ItemCostRow['labourcost'] + $ItemCostRow['overheadcost']) != $ItemCostRow['cost']){ //the cost roll-up cost <> standard cost 

But on lines 269 and 288 of 4.14.1 we have:
PHP Code:
..._('cost was') . ' ' $ItemCostRow['cost'] . ' ' _('changed to') . ' ' $Cost... 

Should not these three lines of code share the exact same math? Either the comparison on line 248 is wrong or the narrative on lines 269 and 288 is wrong.

On line 258 of 4.14.1 we have:
PHP Code:
$ValueOfChange $ItemCostRow['totalqoh'] * (($Cost $ItemCostRow['labourcost'] + $ItemCostRow['overheadcost']) - $ItemCostRow['cost']); 

Since $ValueOfChange is written to the GL that leads me to believe lines 268 and 288 are writing incorrect narratives to the GL.

Should not the code on lines 268 and 288 in 4.14.1 be:
PHP Code:
..._('cost was') . ' ' $ItemCostRow['cost'] . ' ' _('changed to') . ' ' . ($Cost $ItemCostRow['labourcost'] + $ItemCostRow['overheadcost'])... 

Okay... I have tried this all again with a clean DB and same results. When receiving M parts from WO with Labour and/or Overhead Std Cost values at the top parent level these costs are lost. GL entries only account for Labour and/or Overhead Std Cost values at the BoM item level.

Simple to see... Take any M part and assign to it Labour and/or Overhead Std Cost values. Put that part into a WO and receive the WO. GL values are off because Labour and/or Overhead Std Cost values at the top parent level are not included. Should not those values go into WIP while WO is processed and then back to inventory when items are received?

So... Is this as expected and, if so, should we not disallow entry of Labour and Overhead Std Cost values values at the top parent level? Since I see no Labour nor Overhead Std Cost values in WO Costing I must assume these are not to be used at the top parent level?

I am using 4.14.1 with Standard Costing with GL stock integration.

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 


Forum Jump:


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