11-19-2018, 09:22 PM
WorkOrderReceive.php
On line 248 we compare costs to determine if a change has occurred:
Then on line 254 we compute the difference/variance to find value:
Then on lines 269 and 288 we write the difference to a GL entry:
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...
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 . ' x ' . _('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...