My case is: some time I must recreate a product. (repackage, recreate, fix)
because I make a production document with data as below in case fix product:
1. product in document head is PChair
2. a production line with product is PChair (is end product = true) (line 1)
3. a production line with product is Seat_Seat (line 2)
4. a production line with product is PChair (is end product = false) (line 3)
when i complete, it make "Not Balanced" error in post document.
reason:
1. logic in line 167 class Doc_Production
line 1 and line 3 is consider as productionBOM.
because a line make 2 fact account with symmetric value
=> balance of line 1 and 3 =0.
line 2 make total balance not balance
solution
modified line 102 class Doc_Production
docLine.setProductionBOM(line.getM_Product_ID() == prod.getM_Product_ID());
=>
docLine.setProductionBOM(line.getM_Product_ID() == prod.getM_Product_ID() && line.isEndProduct());
my way for this case is correct?