From 3d24c7b8dd5b9545cfc0016c02b2c638b7052e70 Mon Sep 17 00:00:00 2001 From: teo_sarca Date: Thu, 15 Jan 2009 07:26:12 +0000 Subject: [PATCH] Cost BOM Multi Level Review http://sourceforge.net/tracker2/?func=detail&atid=879335&aid=2504885&group_id=176962 Fix T_BOMLine.Cost reference type (changed from table dir to cost+price) --- base/src/org/eevolution/model/I_T_BOMLine.java | 4 ++-- base/src/org/eevolution/model/X_T_BOMLine.java | 14 +++++++------- .../oracle/397_FR2504885_CostBOMMultiLevel.sql | 5 +++++ .../postgresql/397_FR2504885_CostBOMMultiLevel.sql | 5 +++++ 4 files changed, 19 insertions(+), 9 deletions(-) create mode 100644 migration/353a-trunk/oracle/397_FR2504885_CostBOMMultiLevel.sql create mode 100644 migration/353a-trunk/postgresql/397_FR2504885_CostBOMMultiLevel.sql diff --git a/base/src/org/eevolution/model/I_T_BOMLine.java b/base/src/org/eevolution/model/I_T_BOMLine.java index 74a61f8739..304a2b3ca4 100644 --- a/base/src/org/eevolution/model/I_T_BOMLine.java +++ b/base/src/org/eevolution/model/I_T_BOMLine.java @@ -93,12 +93,12 @@ public interface I_T_BOMLine /** Set Cost. * Cost information */ - public void setCost (int Cost); + public void setCost (BigDecimal Cost); /** Get Cost. * Cost information */ - public int getCost(); + public BigDecimal getCost(); /** Column name CurrentCostPrice */ public static final String COLUMNNAME_CurrentCostPrice = "CurrentCostPrice"; diff --git a/base/src/org/eevolution/model/X_T_BOMLine.java b/base/src/org/eevolution/model/X_T_BOMLine.java index e4ca6dc2a6..cb65b323f7 100644 --- a/base/src/org/eevolution/model/X_T_BOMLine.java +++ b/base/src/org/eevolution/model/X_T_BOMLine.java @@ -157,20 +157,20 @@ public class X_T_BOMLine extends PO implements I_T_BOMLine, I_Persistent @param Cost Cost information */ - public void setCost (int Cost) + public void setCost (BigDecimal Cost) { - set_Value (COLUMNNAME_Cost, Integer.valueOf(Cost)); + set_Value (COLUMNNAME_Cost, Cost); } /** Get Cost. @return Cost information */ - public int getCost () + public BigDecimal getCost () { - Integer ii = (Integer)get_Value(COLUMNNAME_Cost); - if (ii == null) - return 0; - return ii.intValue(); + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Cost); + if (bd == null) + return Env.ZERO; + return bd; } /** Set Current Cost Price. diff --git a/migration/353a-trunk/oracle/397_FR2504885_CostBOMMultiLevel.sql b/migration/353a-trunk/oracle/397_FR2504885_CostBOMMultiLevel.sql new file mode 100644 index 0000000000..09bb853fc5 --- /dev/null +++ b/migration/353a-trunk/oracle/397_FR2504885_CostBOMMultiLevel.sql @@ -0,0 +1,5 @@ +-- 14.01.2009 14:44:43 EET +-- FR [ 2457781 ] Introduce NoVendorForProductException +UPDATE AD_Column SET AD_Reference_ID=37,Updated=TO_DATE('2009-01-14 14:44:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=56629 +; + diff --git a/migration/353a-trunk/postgresql/397_FR2504885_CostBOMMultiLevel.sql b/migration/353a-trunk/postgresql/397_FR2504885_CostBOMMultiLevel.sql new file mode 100644 index 0000000000..30d24b0ce5 --- /dev/null +++ b/migration/353a-trunk/postgresql/397_FR2504885_CostBOMMultiLevel.sql @@ -0,0 +1,5 @@ +-- 14.01.2009 14:44:43 EET +-- FR [ 2457781 ] Introduce NoVendorForProductException +UPDATE AD_Column SET AD_Reference_ID=37,Updated=TO_TIMESTAMP('2009-01-14 14:44:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=56629 +; +