Related to issue 23159: apply feedback
authorMikel Irurita <mikel.irurita@openbravo.com>
Mon, 04 Mar 2013 14:00:58 +0100
changeset 19851 5b0c0bf9cb86
parent 19850 4dc628a238c0
child 19852 4c43923b5c2d
Related to issue 23159: apply feedback
src-db/database/model/tables/A_ASSET.xml
src-db/database/model/tables/A_ASSET_GROUP.xml
src/org/openbravo/erpCommon/ad_process/assets/AssetLinearDepreciationMethodProcess.java
--- a/src-db/database/model/tables/A_ASSET.xml	Thu Feb 28 13:41:35 2013 +0530
+++ b/src-db/database/model/tables/A_ASSET.xml	Mon Mar 04 14:00:58 2013 +0100
@@ -289,6 +289,7 @@
       <foreign-key foreignTable="M_PRODUCT" name="A_ASSET_M_PRODUCT">
         <reference local="M_PRODUCT_ID" foreign="M_PRODUCT_ID"/>
       </foreign-key>
+      <check name="A_ASSET_IS30DAYMONTH_CHK"><![CDATA[IS30DAYMONTH IN ('Y', 'N')]]></check>
       <check name="A_ASSET_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
       <check name="A_ASSET_ISDISPOSED_CHK"><![CDATA[ISDISPOSED IN ('Y', 'N')]]></check>
       <check name="A_ASSET_ISINPOSESSION_CHK"><![CDATA[ISINPOSESSION IN ('Y', 'N')]]></check>
--- a/src-db/database/model/tables/A_ASSET_GROUP.xml	Thu Feb 28 13:41:35 2013 +0530
+++ b/src-db/database/model/tables/A_ASSET_GROUP.xml	Mon Mar 04 14:00:58 2013 +0100
@@ -89,5 +89,6 @@
       </foreign-key>
       <check name="A_ASSET_GROUP_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
       <check name="A_ASSET_GROUP_ISOWNED_CHK"><![CDATA[ISOWNED IN ('Y', 'N')]]></check>
+      <check name="A_ASSETGROUP_IS30DAY_CHK"><![CDATA[IS30DAYMONTH IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src/org/openbravo/erpCommon/ad_process/assets/AssetLinearDepreciationMethodProcess.java	Thu Feb 28 13:41:35 2013 +0530
+++ b/src/org/openbravo/erpCommon/ad_process/assets/AssetLinearDepreciationMethodProcess.java	Mon Mar 04 14:00:58 2013 +0100
@@ -57,7 +57,7 @@
 import org.openbravo.service.db.DbUtility;
 
 public class AssetLinearDepreciationMethodProcess extends DalBaseProcess {
-  static Logger log4j = Logger.getLogger(AssetLinearDepreciationMethodProcess.class);
+  private static final Logger log4j = Logger.getLogger(AssetLinearDepreciationMethodProcess.class);
   private static final String LINEAR = "LI";
   private static final String TIME = "TI";
   private static final String PERCENTAGE = "PE";
@@ -66,7 +66,7 @@
   private static final BigDecimal HUNDRED = new BigDecimal("100");
   private static final BigDecimal THIRTY = new BigDecimal("30");
   private static final BigDecimal YEARDAYS = new BigDecimal("365");
-  private final static MathContext mc = new MathContext(32, RoundingMode.HALF_UP);
+  private static final MathContext mc = new MathContext(32, RoundingMode.HALF_UP);
 
   @Override
   public void doExecute(ProcessBundle bundle) throws Exception {
@@ -515,7 +515,6 @@
     if (amortizationList.size() == 0) {
       return null;
     } else if (amortizationList.size() > 1) {
-      // FIXME do not hardcode the message
       throw new OBException("More than one amortization exist from " + startDate == null ? " null "
           : startDate.toString() + " to " + endDate.toString() + " for " + org.getName()
               + " organization");
@@ -557,7 +556,6 @@
     if (amortizationLineList.size() == 0) {
       return null;
     } else if (amortizationLineList.size() > 1) {
-      // FIXME do not hardcode the message
       throw new OBException("More than one amortization line exist from " + startDate.toString()
           + " to " + endDate.toString() + " for " + asset.getName() + " asset");
     }