details: https://code.openbravo.com/erp/devel/pi/rev/3d8d31130f98
changeset: 21105:3d8d31130f98
user: Pandeeswari Ramakrishnan <pandeeswari.ramakrishnan <at>
openbravo.com>
date: Sun Sep 08 13:00:39 2013 +0530
summary: Fixes Issue 24134: Document disabled when posting the document
When using Old cost engine, if the product does not have cost, the post process
shows the document is disabled for accounting
diffstat:
src/org/openbravo/erpCommon/ad_forms/DocInOut.java | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diffs (30 lines):
diff -r f5ae2c87a97b -r 3d8d31130f98
src/org/openbravo/erpCommon/ad_forms/DocInOut.java
--- a/src/org/openbravo/erpCommon/ad_forms/DocInOut.java Mon Sep 09
18:23:35 2013 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/DocInOut.java Sun Sep 08
13:00:39 2013 +0530
@@ -11,7 +11,7 @@
* Portions created by Jorg Janke are Copyright (C) 1999-2001 Jorg Janke, parts
* created by ComPiere are Copyright (C) ComPiere, Inc.; All Rights Reserved.
* Contributor(s): Openbravo SLU
- * Contributions are Copyright (C) 2001-2012 Openbravo S.L.U.
+ * Contributions are Copyright (C) 2001-2013 Openbravo S.L.U.
******************************************************************************
*/
package org.openbravo.erpCommon.ad_forms;
@@ -567,6 +567,17 @@
} else {
trxCost = new
BigDecimal(ProductInfoData.selectProductAverageCost(conn,
data[i].getField("mProductId"), strDateAcct));
+ if (trxCost == null || trxCost.signum() == 0) {
+ ShipmentInOutLine inOutLine =
OBDal.getInstance().get(ShipmentInOutLine.class,
+ data[i].mInoutlineId);
+ if (inOutLine.getProduct() == null) {
+ continue;
+ }
+ Map<String, String> parameters =
getInvalidCostParameters(inOutLine.getProduct()
+ .getIdentifier(), strDateAcct);
+ setMessageResult(conn, STATUS_InvalidCost, "error", parameters);
+ throw new IllegalStateException();
+ }
}
if (trxCost != null && trxCost.signum() != 0) {
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits