Labour Items, costing and work orders #880
Replies: 6 comments
-
|
Hi Andrew, I think that LB-1 needs to have it's mbflag set to and the stocktype of it's category set to to 'Labour'. If I am reading the code correctly that should allow you to enter a Labour cost. |
Beta Was this translation helpful? Give feedback.
-
|
Tim,
That is how I am setup, I am trying to determine if there is a change that
needs to be made to allow the Labor Cost to be updated when mbflag = D, NOT
material Cost. This would make sense for Labour/Service. We want the cost
of the effort, not goods correct?
stockid description mbflag categoryid categoryid categorydescription
stocktype stockact adjglact issueglact purchpricevaract materialuseagevarac
wipact defaulttaxcatid
LABOR Labor D LABOR LABOR Labor L 5500 1 1 1 5100 1440 8
The code prevents the update of Labor Cost on the Item, Only shows
/* CostUpdate is NOT a script, but a flag maintained in the scripts table
that allows the user role to update (or not) the standard costs of the
items */
if (!
in_array($_SESSION['PageSecurityArray']['CostUpdate'],$_SESSION['AllowedPageSecurityTokens'])){
/* CostUpdate is not assigned to the user role, so just show the costs as
text */
echo '<field>
<td>' . __('Cost') . ':</td>
<td class="number">' .
locale_number_format($MyRow['materialcost']+$MyRow['labourcost']+$MyRow['overheadcost'],$_SESSION['StandardCostDecimalPlaces'])
. '</td>
</field>
</table>';
} else {
/* CostUpdate is assigned to the user role, so user can modify the costs */
if ($MyRow['mbflag']=='M'){
echo '<field>
<label for="MaterialCost">' . __('Standard Material Cost Per Unit')
.':</label>
<input type="text" class="number" name="MaterialCost" value="' .
locale_number_format($MyRow['materialcost'],$_SESSION['StandardCostDecimalPlaces'])
. '" />
</field>
<field>
<label for="LabourCost">' . __('Standard Labour Cost Per Unit') . ':</label>
<input type="text" class="number" name="LabourCost" value="' .
locale_number_format($MyRow['labourcost'],$_SESSION['StandardCostDecimalPlaces'])
. '" />
</field>
<field>
<label for="OverheadCost">' . __('Standard Overhead Cost Per Unit') .
':</label>
<input type="text" class="number" name="OverheadCost" value="' .
locale_number_format($MyRow['overheadcost'],$_SESSION['StandardCostDecimalPlaces'])
. '" />
</field>';
} elseif ($MyRow['mbflag']=='B' OR $MyRow['mbflag']=='D') {
echo '<field>
<td>' . __('Standard Cost') .':</td>
<td class="number"><input type="text" class="number" name="MaterialCost"
value="' .
locale_number_format($MyRow['materialcost'],$_SESSION['StandardCostDecimalPlaces'])
. '" /></td>
</field>';
}
…On Wed, Mar 25, 2026 at 5:54 AM Tim Schofield ***@***.***> wrote:
Hi Andrew, I think that LB-1 needs to have it's mbflag set to and the
stocktype of it's category set to to 'Labour'. If I am reading the code
correctly that should allow you to enter a Labour cost.
—
Reply to this email directly, view it on GitHub
<#880?email_source=notifications&email_token=BVSBZ62SLYKCUMTYTSOX4S34SO3HZA5CNFSNUABIM5UWIORPF5TWS5BNNB2WEL2ENFZWG5LTONUW63SDN5WW2ZLOOQXTCNRTGA3TSNZYUZZGKYLTN5XKMYLVORUG64VFMV3GK3TUVRTG633UMVZF6Y3MNFRWW#discussioncomment-16307978>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BVSBZ6ZMHUC35GTQCZA3IPT4SO3HZAVCNFSM6AAAAACW6ALKNSVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTMMZQG44TOOA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
I think that this is a problem of descriptions. If an item is of type 'Labour' then the whole cost of that item is taken to be Labour cost. This should be taken into account when the costs of the WO are rolled up. At least this is how it is intended to work. Tim |
Beta Was this translation helpful? Give feedback.
-
|
@andrewgaluski Can you copy and update the original scenario when the dust settles for the rest of us to follow? Thanks! ;-) I've been wondering how to capture these jems of wisdom for others to follow. Is this information for the manual? Is it a wiki page? How might I find this information if I was doing something similar? Also, was the code above intended? I wasn't sure how it was to be interpreted. |
Beta Was this translation helpful? Give feedback.
-
|
I would do the following: 1 Ensure LB-1's stock category has Stock Type = L (Labour) — not just a generic service type |
Beta Was this translation helpful? Give feedback.
-
|
The code above was intended to show that the system ONLY allows input to the field labourcost for input IF the item is "Manufactured", mbflag="M".
I have an Item setup JUST like this. I was assuming I had to get THAT stock to have "$10" in the stockmaster.labourcost field for the timesheet posting to use it for the posting of the timesheet to WIP/Labor Recovery. I was wrong. It uses stockmaster.actualcost which is a database calculation done that adds up materialcost, labourcost, overheadcost . So, for items setup to track labor, you can still enter a Material Cost in the StockCostsUpdate script and it will get put into the actual cost field and used in the timesheet posting. There is nothing that really needs to be done specifically for this request. I will be testing more and perhaps entering a defect, as my first test of this functionality worked on the timesheet approval side, but when I closed my work order and was expecting the variance on the work order to post to the Stock itself (Running average costing) and the stockmaster for the FG produced to have the full cost of the issued materials and labor, it did not. It was wrong and the variance on the work order was NOT taken out of WIP. My "Share of variance" posting was made at 0 and the offset -0 I am running a fork of stable 5.0 code so I will re-download the latest code and determine if it is my fork or the original code or a setup problem. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Consider I have the following
FG-1 (Defined as Manufactured i Stockmaster table (M). Has an Item Category of Stock Type= Finished Goods
RM-1 (Defined as Purchased in stockmaster table (B). Has Item Category of Stock Type = Raw Materials
LB-1 (Defined as Service/Labour" in stockmaster table (D). Has Item Category Stock Type = Labour.
Consider the Process to build a finished good (Recondition a RM into a sellable Item using a single RM and labor).
FG-1 (1 Each)
I have an employee setup tied to Item/Labour Type = LB-1.
When I try to Approve a Timesheet with time billed to the work order I get an error on $0 cost for the LB-1 item because it has no Labour Cost.
When I try to update the Cost using StockCostUpdate.php for LB-1 I am ONLY allowed to enter a cost as "Material". based on the flags in the stockmaster.
Beta Was this translation helpful? Give feedback.
All reactions