Topic: Wrong unit cost for AP Surf Set in demo data

In en_US-demo.sql line 1947, unit cost of item 202 should be 360 instead of 0

So this line needs to be replaced with:

('10', '1', '201', '26', 'DEF', '2017-05-05', '0', '001/2017', '2', '360'),
Phuong

Re: Wrong unit cost for AP Surf Set in demo data

001/2017 can be of different types.
In this case it is type=26, a WorkOrder.
Check to see if it has been voided - No, it is not.

Attached is the default Demo data of Work Order and a new work order's entries for comparison.

@joe: does the Demo Data need any change?

Post's attachments

Manufacturing_WO.png 43.9 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

Re: Wrong unit cost for AP Surf Set in demo data

I will have a look at it later.

Joe

Re: Wrong unit cost for AP Surf Set in demo data

The last field in the workorders table is additional_costs and it seems redundant after our 2.4 release.

It is not used any more. The material costs, overhead_costs etc. is on the stock_moves and stock_master tables.

We will remove this field when releasing the 2.5 version.

So the value of 0 is ok at the moment.

Joe

Re: Wrong unit cost for AP Surf Set in demo data

@Joe
No, the mentioned table is 0_stock_moves not the workorders table.

Phuong

Re: Wrong unit cost for AP Surf Set in demo data

@notrinos

Sorry you are absolutely right. But a good thing is that we got hand of the additional_costs in the 0_workorders table smile

Committed.

/Joe

Re: Wrong unit cost for AP Surf Set in demo data

In the same vein, shouldn't the other entries be type=29 (ST_MANURECEIVE) instead of the current type=26?

Re: Wrong unit cost for AP Surf Set in demo data

@apmuthu

I guess your sharp eyes have spotted an issue belonging to the old 2.3 release.

Will have a look at it later.

Joe

Committed.

Re: Wrong unit cost for AP Surf Set in demo data

Even after the last commit, there is however no change in the WO_Production Costs for WO #1 shown in the attachment in the Post #2 in this thread. Everything still remains in the finished product receival part of the view instead of the input items being part of issues.

The complete anatomy of an Assembly Work Order is listed here and attached as well.


The time of entry is available only in the audit_trail table.
The amounts are not rounded off in the stock_moves and wo_requirements tables.
The amounts are rounded off in the gl_trans and stock_master tables.
The stock_master.material_cost field is computed as the weighted average of existing stock quantity and value and those of the currently produced item (or any other chosen programmed means).

Post's attachments

FA24_Anatomy_of_Assembly_WO.txt 2 kb, 4 downloads since 2018-06-14 

You don't have the permssions to download the attachments of this post.

Re: Wrong unit cost for AP Surf Set in demo data

one more record is missing for table wo_manufacture

INSERT INTO `0_wo_manufacture` VALUES (1, '001/2017', 1, 2, '2017-05-05');
Phuong

Re: Wrong unit cost for AP Surf Set in demo data

Should there be any change in the 0_refs table as well?
Also the wo_requirements costs are listed as 0 for WO # 1.

The type field in the gl_trans table too needs to be set to 29:

UPDATE 0_gl_trans SET `type`='29' WHERE `counter`='13'; 
UPDATE 0_gl_trans SET `type`='29' WHERE `counter`='14'; 
UPDATE 0_gl_trans SET `type`='29' WHERE `counter`='15'; 

and lines 908-910 in en_US-demo.sql should be:

('13', '29', '1', '2017-05-05', '1510', '1 * iPad Air 2 16GB', '-400', '0', '0', NULL, NULL),
('14', '29', '1', '2017-05-05', '1510', '1 * iPhone 6 64GB', '-300', '0', '0', NULL, NULL),
('15', '29', '1', '2017-05-05', '1510', '1 * iPhone Cover Case', '-20', '0', '0', NULL, NULL),

At the moment, any zero amount item (like Support in the WO #0) will be treated as Work in Progress and have it's amount set to total value of all inputs and later contra-ed on finished product receival. See Anatomy SQL in previous post. Wonder what happens when there are more than one zero cost input items!

Re: Wrong unit cost for AP Surf Set in demo data

The demo file, en_US-demo.sql, has now been corrected and committed to repo.

Joe

Re: Wrong unit cost for AP Surf Set in demo data

@joe: Thanks. That was a real re-write! The 0_refs did not need an update - is it?