Libero Cost Engine In Idempiere

170 views
Skip to first unread message

HellBoy

unread,
Jul 12, 2016, 11:08:54 PM7/12/16
to iDempiere
Hi People,

Where I'm find Libero Cost Engine for Idempiere ?

redhuan d. oon

unread,
Jul 13, 2016, 12:45:50 AM7/13/16
to iDempiere
iDempiere does not use Libero Cost Engine. Here is an old reason http://red1.org/adempiere/viewtopic.php?f=28&t=1155
However iDempiere already has its own improvements to the cost engine. Libero Mfg uses only Standard Costing.

Vasanthakumar S

unread,
Jul 13, 2016, 12:55:15 AM7/13/16
to idem...@googlegroups.com
Hi,

in red1.org forum, the following two links point to sourceforge, that does not exists.
here is the cashed version



#49 Multiple Cost Methods cannot be active 

Status: open
Owner: Victor Perez Juarez
Labels: Cost Engine (44)
Priority: 5
Updated: 2014-08-15
Created: 2011-02-23
Creator: Redhuan D. Oon
Private: No
As allowed in the Costing Engine roadmap, I want to test multiple Costing Methods when used concurrently. When i test using Fitnesse for Average Invoice on a new product Apple, i have to deactivate the other Cost Methods. Or else i get this (failed to get cost details):

-----------> MTransaction.saveFinish: afterSave
java.lang.NullPointerException
at org.adempiere.engine.StandardCostingMethod.getNewCumulatedAmt(StandardCostingMethod.java:179)
at org.adempiere.engine.AbstractCostingMethod.createReversalCostDetail(AbstractCostingMethod.java:174)
at org.adempiere.engine.StandardCostingMethod.createCostDetail(StandardCostingMethod.java:85)
at org.adempiere.engine.StandardCostingMethod.process(StandardCostingMethod.java:149)
at org.adempiere.engine.CostEngine.createCostDetail(CostEngine.java:417)
at org.adempiere.engine.CostEngine.createCostDetail(CostEngine.java:297)
at org.adempiere.engine.CostEngine.createCostDetail(CostEngine.java:273)
at org.adempiere.engine.CostEngine.createCostDetail(CostEngine.java:262)
at org.compiere.model.MTransaction.afterSave(MTransaction.java:228)
at org.compiere.model.PO.saveFinish(PO.java:2190)
at org.compiere.model.PO.saveNew(PO.java:2751)
at org.compiere.model.PO.save(PO.java:2076)
at org.compiere.model.MInOut.completeIt(MInOut.java:1383)
at org.compiere.process.DocumentEngine.completeIt(DocumentEngine.java:475)
at org.compiere.process.DocumentEngine.processIt(DocumentEngine.java:292)
at org.compiere.process.DocumentEngine.processIt(DocumentEngine.java:256)
at org.compiere.model.MInOut.processIt(MInOut.java:1033)
at org.compiere.model.MInOut.reverseCorrectIt(MInOut.java:2042)
at org.compiere.process.DocumentEngine.reverseCorrectIt(DocumentEngine.java:559)
at org.compiere.process.DocumentEngine.processIt(DocumentEngine.java:338)
at org.compiere.process.DocumentEngine.processIt(DocumentEngine.java:256)
at org.compiere.model.MInOut.processIt(MInOut.java:1033)

-----------> MCostQueue.getQueueForAdjustment: Not found cost queue for MCost[AD_Client_ID=11,M_Product_ID=50028,M_CostElement_ID=100, CurrentCost=0, C.Amt=0,C.Qty=0]
-----------> MCostQueue.getQueueForAdjustment: Not found cost queue for MCost[AD_Client_ID=11,M_Product_ID=50028,M_CostElement_ID=100, CurrentCost=0, C.Amt=0,C.Qty=0]
-----------> FactLine.updateReverseLine: Not Found (try later) ,C_AcctSchema_ID=101, AD_Table_ID=319,Record_ID=1000136,Line_ID=1000136, Account_ID=587
-----------> MTransaction.saveFinish: afterSave
org.adempiere.exceptions.DBException: org.postgresql.util.PSQLException: ERROR: column c.costingmethod does not exist
at org.compiere.model.MCost.getCurrentCostLayers(MCost.java:184)
at org.compiere.model.MCost.getCurrentCostLayers(MCost.java:271)
at org.compiere.model.ProductCost.getProductCostsLayers(ProductCost.java:694)
at org.adempiere.engine.FifoLifoCostingMethod.calculate(FifoLifoCostingMethod.java:56)
at org.adempiere.engine.FifoLifoCostingMethod.getCalculatedCosts(FifoLifoCostingMethod.java:68)
at org.adempiere.engine.AbstractCostingMethod.createCostDetails(AbstractCostingMethod.java:80)
at org.adempiere.engine.FifoLifoCostingMethod.processCostDetail(FifoLifoCostingMethod.java:123)
at org.adempiere.engine.FifoLifoCostingMethod.process(FifoLifoCostingMethod.java:100)
at org.adempiere.engine.CostEngine.createCostDetail(CostEngine.java:417)
at org.adempiere.engine.CostEngine.createCostDetail(CostEngine.java:297)
at org.adempiere.engine.CostEngine.createCostDetail(CostEngine.java:273)
at org.adempiere.engine.CostEngine.createCostDetail(CostEngine.java:262)
at org.compiere.model.MTransaction.afterSave(MTransaction.java:228)
at org.compiere.model.PO.saveFinish(PO.java:2190)
at org.compiere.model.PO.saveNew(PO.java:2751)
at org.compiere.model.PO.save(PO.java:2076)
at org.compiere.model.MInOut.completeIt(MInOut.java:1341)
at org.compiere.process.DocumentEngine.completeIt(DocumentEngine.java:475)
at org.compiere.process.DocumentEngine.processIt(DocumentEngine.java:292)
at org.compiere.process.DocumentEngine.processIt(DocumentEngine.java:256)
at org.compiere.model.MInOut.processIt(MInOut.java:1033)
at org.compiere.model.MOrder.createShipment(MOrder.java:1884)
at org.compiere.model.MOrder.completeIt(MOrder.java:1772)
at org.compiere.process.DocumentEngine.completeIt(DocumentEngine.java:475)
at org.compiere.process.DocumentEngine.processIt(DocumentEngine.java:292)
at org.compiere.process.DocumentEngine.processIt(DocumentEngine.java:256)
at org.compiere.model.MOrder.processIt(MOrder.java:1096)
caused by: org.postgresql.util.PSQLException: ERROR: column c.costingmethod does not exist; State=42703; ErrorCode=0
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1548)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1316)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:191)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:351)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:255)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:76)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.compiere.db.StatementProxy.invoke(StatementProxy.java:100)
at $Proxy0.executeQuery(Unknown Source)
at org.compiere.model.MCost.getCurrentCostLayers(MCost.java:154)
at org.compiere.model.MCost.getCurrentCostLayers(MCost.java:271)
at org.compiere.model.ProductCost.getProductCostsLayers(ProductCost.java:694)
at org.adempiere.engine.FifoLifoCostingMethod.calculate(FifoLifoCostingMethod.java:56)
at org.adempiere.engine.FifoLifoCostingMethod.getCalculatedCosts(FifoLifoCostingMethod.java:68)
at org.adempiere.engine.AbstractCostingMethod.createCostDetails(AbstractCostingMethod.java:80)
at org.adempiere.engine.FifoLifoCostingMethod.processCostDetail(FifoLifoCostingMethod.java:123)
at org.adempiere.engine.FifoLifoCostingMethod.process(FifoLifoCostingMethod.java:100)
at org.adempiere.engine.CostEngine.createCostDetail(CostEngine.java:417)

If i use alone just FIFO, i get -----------> Doc_InOut.createFacts: Resubmit - No Costs for Apple
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------

#47 FIFO cannot have starting zero Costs 

Status: open
Owner: Victor Perez Juarez
Labels: Cost Engine (44)
Priority: 5
Updated: 2014-08-14
Created: 2011-02-18
Creator: Redhuan D. Oon
Private: No
I tested manually (after failing the Fitnesse test) to see if FIFO works. But it hits some constraints, and when i cleared those constraints, it can create some CostDetail but cannot post any costs to Fact_Acct.

Steps to replicate:
1. Create all Cost Types such as AveragePO, FIFO and LIFO but deactivate all else except FIFO for this test
2. Create PO for 1 Hoe and its Material Receipt.
3. Press Complete but hit AmtLL is mandatory as a null was passed into it
3.b Hit DivideByZero error in line 151 of LifoFifoCostingMethod.java:
m_CurrentCostPrice = m_CumulatedAmt.divide(m_CumulatedQty, m_as.getCostingPrecision());
Workaround by overstepping this with:
+ m_CurrentCostPrice = Env.ZERO;
+ if (!m_CumulatedQty.equals(Env.ZERO))
m_CurrentCostPrice = m_CumulatedAmt.divide(m_CumulatedQty, m_as.getCostingPrecision());

3.c Hit posting error:
11:51:50.424 Doc_InOut.postLogic: (0) MInOut[1000060-10000516,DocStatus=CO] [11]
11:51:50.425 Doc_InOut.isConvertible: (none) - MInOut[1000060-10000516,DocStatus=CO] [11]
11:51:50.425 MAcctSchema.set_ValueNoCheck: C_Period_ID = 1000001 (java.lang.Integer) [11]
11:51:50.426 MAcctSchema.save: Nothing changed - C_AcctSchema [11]
11:51:50.426 Doc_InOut.setPeriod: 2011-02-18 00:00:00.0 - MMR => 1000001 [11]
11:51:50.426 Doc_InOut.isPeriodOpen: Yes - MInOut[1000060-10000516,DocStatus=CO] [11]
11:51:50.426 Fact.<init>: Fact[MInOut[1000060-10000516,DocStatus=CO],AcctSchema[101-GardenWorld US/A/US Dollar],PostType=A] [11]
11:51:50.426 Query.buildSQL: TableName = M_CostType... SQL = SELECT AD_Client_ID,AD_Org_ID,CostingMethod,Created,CreatedBy,Description,Help,IsActive,M_CostType_ID,Name,Updated,UpdatedBy FROM M_CostType WHERE (AD_Org_ID=?) AND IsActive=? AND AD_Client_ID=? ORDER BY M_CostType_ID [11]
11:51:50.428 Query.createResultSet: Parameter IsActive = Y [11]
11:51:50.428 Query.createResultSet: Parameter AD_Client_ID = 11 [11]
11:51:50.429 MCostType.load: (rs) [11]
11:51:50.429 MCostType.setKeyInfo: (PK) M_CostType_ID=50002 [11]
11:51:50.432 MTable.load: (rs) [11]
11:51:50.433 MTable.setKeyInfo: (PK) AD_Table_ID=808 [11]
11:51:50.433 Query.buildSQL: TableName = M_CostDetail... SQL = SELECT AD_Client_ID,AD_Org_ID,Amt,AmtLL,C_AcctSchema_ID,C_InvoiceLine_ID,C_LandedCostAllocation_ID,C_OrderLine_ID,C_ProjectIssue_ID,CostAdjustment,CostAdjustmentDate,CostAdjustmentDateLL,CostAdjustmentLL,CostAmt,CostAmtLL,CostingMethod,Created,CreatedBy,CumulatedAmt,CumulatedAmtLL,CumulatedQty,CurrentCostPrice,CurrentCostPriceLL,CurrentQty,DateAcct,DeltaAmt,DeltaQty,Description,IsActive,IsReversal,IsSOTrx,M_AttributeSetInstance_ID,M_CostDetail_ID,M_CostElement_ID,M_CostType_ID,M_InOutLine_ID,M_InventoryLine_ID,M_MovementLine_ID,M_Product_ID,M_ProductionLine_ID,M_Transaction_ID,PP_Cost_Collector_ID,(CASE WHEN Qty=0 THEN 0 ELSE Amt/Qty END) AS Price,Processed,Processing,Qty,Updated,UpdatedBy FROM M_CostDetail WHERE (AD_Client_ID=? AND C_AcctSchema_ID=? AND M_Product_ID=? AND M_CostType_ID=? AND M_InOutLine_ID=?) [11]
11:51:50.438 MCostDetail.load: (rs) [11]
11:51:50.439 MCostDetail.setKeyInfo: (PK) M_CostDetail_ID=1000538 [11]
11:51:50.439 MCostDetail.load: (rs) [11]
11:51:50.439 MCostDetail.setKeyInfo: (PK) M_CostDetail_ID=1000539 [11]
11:51:50.439 MCostDetail.load: (rs) [11]
11:51:50.440 MCostDetail.setKeyInfo: (PK) M_CostDetail_ID=1000540 [11]
11:51:50.440 MCostDetail.load: (rs) [11]
11:51:50.440 MCostDetail.setKeyInfo: (PK) M_CostDetail_ID=1000541 [11]
11:51:50.440 MCostDetail.load: (rs) [11]
11:51:50.440 MCostDetail.setKeyInfo: (PK) M_CostDetail_ID=1000542 [11]
11:51:50.441 MCostDetail.load: (rs) [11]
11:51:50.441 MCostDetail.setKeyInfo: (PK) M_CostDetail_ID=1000543 [11]
-----------> Doc_InOut.createFacts: Resubmit - No Costs for Hoe 4 ft [11]
11:51:50.441 Doc_InOut.postCommit: Sta=E DT=MMR ID=1000060 [11]
11:51:50.441 Doc_InOut.save: MInOut[1000060-10000516,DocStatus=CO]->E [11]

SUGGESTED REMEDY:
Study if the business logic of other Costing Methods such as FIFO/LIFO is testable. Has anyone used it? How is it really used? It worked for AveragePO and AverageInvoice.

Discussion

Redhuan D. Oon 
Redhuan D. Oon 
2011-02-21

assigned_to: teo_sarca --> vpj-cd
summary: FIFO testing issues --> FIFO cannot have starting zero Costs
 
Link
Redhuan D. Oon 
Redhuan D. Oon 
2011-02-22


 
Link
Redhuan D. Oon 
Redhuan D. Oon 
2011-02-22

labels: --> Cost Engine
 
Link
Redhuan D. Oon 
Redhuan D. Oon 
2011-02-22

Here are Fitnesse Tests returning exceptions for MCost and not able to post its accounts for LIFO / FIFO organisations. http://www.adempiere.com/index.php/Cost_Engine/Case_III#Results


Regards
Vasanth

--
You received this message because you are subscribed to the Google Groups "iDempiere" group.
To unsubscribe from this group and stop receiving emails from it, send an email to idempiere+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/idempiere/f021c0a1-3f9f-484f-bfaf-c5f0cca2e917%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages