webERP Forum

Full Version: Work Order Receive Cost Issue?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
WorkOrderReceive.php

On line 248 we compare costs to determine if a change has occurred:
PHP Code:
if (($Cost $ItemCostRow['labourcost'] + $ItemCostRow['overheadcost']) != $ItemCostRow['cost']){ //the cost roll-up cost <> standard cost 

Then on line 254 we compute the difference/variance to find value:
PHP Code:
$ValueOfChange $ItemCostRow['totalqoh'] * (($Cost $ItemCostRow['labourcost'] + $ItemCostRow['overheadcost']) - $ItemCostRow['cost']); 

Then on lines 269 and 288 we write the difference to a GL entry:
PHP Code:
'" . _('Cost roll on release of WO') . '' . $_POST['WO'] . ' ' . $_POST['StockID'] . ' ' . _('cost was') . ' ' . $ItemCostRow['cost'] . ' ' . _('changed to') . ' ' . $Cost . ' ' . _('Quantity on hand of') . ' ' . $ItemCostRow['totalqoh'] . "'

Note we write the GL entry using $Cost but above we use $Cost + $ItemCostRow['labourcost'] + $ItemCostRow['overheadcost'].

Should not the GL entry be $Cost + $ItemCostRow['labourcost'] + $ItemCostRow['overheadcost']?

Something appears to be out of sync here...
I have been testing this all morning and I believe lines 268 and 288 should be:

PHP Code:
'" . _('Cost roll on release of WO') . '' . $_POST['WO'] . ' ' . $_POST['StockID'] . ' ' . _('cost was') . ' ' . $ItemCostRow['cost'] . ' ' . _('changed to') . ' ' . ($Cost + $ItemCostRow['labourcost'] + $ItemCostRow['overheadcost']) . ' ' . _('Quantity on hand of') . ' ' . $ItemCostRow['totalqoh'] . "'