Merge
This commit is contained in:
commit
479deb9b27
|
@ -8,6 +8,7 @@ alpn-boot.jar
|
|||
org.adempiere.webstore/bin
|
||||
org.idempiere.hazelcast.service.config/bin
|
||||
*/target
|
||||
runtime-server.product
|
||||
syntax: regexp
|
||||
^adempiere$
|
||||
^org\.adempiere\.install/lib$
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
<feature
|
||||
id="org.adempiere.base.feature"
|
||||
label="Adempiere Base"
|
||||
version="5.1.0.qualifier">
|
||||
version="5.1.0.qualifier"
|
||||
provider-name="iDempiere Community">
|
||||
|
||||
<description url="http://www.example.com/description">
|
||||
[Enter Feature Description here.]
|
||||
|
@ -99,13 +100,6 @@
|
|||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="javax.activation"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="javax.jms"
|
||||
download-size="0"
|
||||
|
@ -162,13 +156,6 @@
|
|||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="javax.management.j2ee-api"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.apache.commons.logging"
|
||||
download-size="0"
|
||||
|
@ -176,34 +163,6 @@
|
|||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="javax.ejb"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="javax.xml.rpc"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="javax.xml.soap"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="javax.xml.bind"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="javax.xml.stream"
|
||||
download-size="0"
|
||||
|
@ -329,13 +288,6 @@
|
|||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="groovy-all"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="2.4.13"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="com.ibm.icu"
|
||||
download-size="0"
|
||||
|
@ -371,14 +323,6 @@
|
|||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="javax.transaction"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
fragment="true"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.apache.commons.commons-collections4"
|
||||
download-size="0"
|
||||
|
@ -386,13 +330,6 @@
|
|||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.apache.commons.configuration"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.apache.commons.net"
|
||||
download-size="0"
|
||||
|
@ -421,4 +358,145 @@
|
|||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="jaxb-api"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="javax.transaction-api"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="javax.interceptor-api"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="javax.enterprise.cdi-api"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="javax.inject"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.apache.geronimo.specs.geronimo-j2ee-management_1.1_spec"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="javax.annotation-api"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="groovy"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.apache.commons.commons-configuration2"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="javax.transaction"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
fragment="true"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="groovy-console"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
fragment="true"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="groovy-datetime"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
fragment="true"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="groovy-json"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
fragment="true"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="groovy-jsr223"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
fragment="true"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="groovy-nio"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
fragment="true"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="groovy-swing"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
fragment="true"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="groovy-xml"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
fragment="true"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="javax.jws"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="javax.activation"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
</feature>
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
|
||||
<attributes>
|
||||
<attribute name="module" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="src" path="src/"/>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
||||
org.eclipse.jdt.core.compiler.release=enabled
|
||||
|
|
|
@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
|
|||
Bundle-Name: iDempiere Callout
|
||||
Bundle-SymbolicName: org.adempiere.base.callout
|
||||
Bundle-Version: 5.1.0.qualifier
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
||||
Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version>=1.10))"
|
||||
Require-Bundle: org.adempiere.base;bundle-version="0.0.0"
|
||||
Eclipse-RegisterBuddy: org.adempiere.base
|
||||
Service-Component: OSGI-INF/costadjustmentcalloutfactory.xml, OSGI-INF/bpartnerquickentrycalloutFactory.xml
|
||||
|
@ -11,4 +11,5 @@ Bundle-ActivationPolicy: lazy
|
|||
Export-Package: org.compiere.model
|
||||
Bundle-ClassPath: .
|
||||
Automatic-Module-Name: org.adempiere.base.callout
|
||||
Bundle-Vendor: iDempiere Community
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
package org.adempiere.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.adempiere.base.Core;
|
||||
|
@ -101,7 +102,7 @@ public class CalloutRMA extends CalloutEngine {
|
|||
BigDecimal lineNetAmt = invoiceLine.getQtyEntered().multiply(invoiceLine.getPriceEntered());
|
||||
int precision = invoiceLine.getPrecision();
|
||||
if (lineNetAmt.scale() > precision)
|
||||
lineNetAmt = lineNetAmt.setScale(precision, BigDecimal.ROUND_HALF_UP);
|
||||
lineNetAmt = lineNetAmt.setScale(precision, RoundingMode.HALF_UP);
|
||||
mTab.setValue(MRMALine.COLUMNNAME_LineNetAmt, lineNetAmt);
|
||||
}
|
||||
else if (iol.getC_OrderLine_ID() != 0)
|
||||
|
@ -122,7 +123,7 @@ public class CalloutRMA extends CalloutEngine {
|
|||
BigDecimal lineNetAmt = orderLine.getQtyEntered().multiply(orderLine.getPriceEntered());
|
||||
int precision = orderLine.getPrecision();
|
||||
if (lineNetAmt.scale() > precision)
|
||||
lineNetAmt = lineNetAmt.setScale(precision, BigDecimal.ROUND_HALF_UP);
|
||||
lineNetAmt = lineNetAmt.setScale(precision, RoundingMode.HALF_UP);
|
||||
mTab.setValue(MRMALine.COLUMNNAME_LineNetAmt, lineNetAmt);
|
||||
}
|
||||
|
||||
|
@ -193,7 +194,7 @@ public class CalloutRMA extends CalloutEngine {
|
|||
|
||||
BigDecimal lineNetAmt = Env.ONE.multiply(pp.getPriceStd());
|
||||
if (lineNetAmt.scale() > precision)
|
||||
lineNetAmt = lineNetAmt.setScale(precision, BigDecimal.ROUND_HALF_UP);
|
||||
lineNetAmt = lineNetAmt.setScale(precision, RoundingMode.HALF_UP);
|
||||
mTab.setValue(MRMALine.COLUMNNAME_LineNetAmt, lineNetAmt);
|
||||
|
||||
return "";
|
||||
|
@ -246,7 +247,7 @@ public class CalloutRMA extends CalloutEngine {
|
|||
|
||||
BigDecimal lineNetAmt = Env.ONE.multiply(charge.getChargeAmt());
|
||||
if (lineNetAmt.scale() > precision)
|
||||
lineNetAmt = lineNetAmt.setScale(precision, BigDecimal.ROUND_HALF_UP);
|
||||
lineNetAmt = lineNetAmt.setScale(precision, RoundingMode.HALF_UP);
|
||||
mTab.setValue(MRMALine.COLUMNNAME_LineNetAmt, lineNetAmt);
|
||||
|
||||
return "";
|
||||
|
|
|
@ -92,7 +92,7 @@ public class CalloutAssignment extends CalloutEngine
|
|||
if (log.isLoggable(Level.FINE)) log.fine("S_ResourceAssignment_ID=" + S_ResourceAssignment_ID + " - M_Product_ID=" + M_Product_ID);
|
||||
if (M_Product_ID != 0)
|
||||
{
|
||||
mTab.setValue ("M_Product_ID", new Integer (M_Product_ID));
|
||||
mTab.setValue ("M_Product_ID", Integer.valueOf(M_Product_ID));
|
||||
if (Description != null)
|
||||
Name += " (" + Description + ")";
|
||||
if (!".".equals(Name))
|
||||
|
|
|
@ -84,7 +84,7 @@ public class CalloutCashJournal extends CalloutEngine
|
|||
rs = pstmt.executeQuery();
|
||||
if (rs.next())
|
||||
{
|
||||
mTab.setValue("C_Currency_ID", new Integer(rs.getInt(2)));
|
||||
mTab.setValue("C_Currency_ID", Integer.valueOf(rs.getInt(2)));
|
||||
BigDecimal PayAmt = rs.getBigDecimal(3);
|
||||
BigDecimal DiscountAmt = rs.getBigDecimal(5);
|
||||
boolean isSOTrx = "Y".equals(rs.getString(4));
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
package org.compiere.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
|
@ -103,7 +104,7 @@ public class CalloutGLJournal extends CalloutEngine
|
|||
pstmt = null;
|
||||
}
|
||||
if (C_Period_ID != 0)
|
||||
mTab.setValue("C_Period_ID", new Integer(C_Period_ID));
|
||||
mTab.setValue("C_Period_ID", Integer.valueOf(C_Period_ID));
|
||||
}
|
||||
|
||||
// When C_Period_ID is changed, check if in DateAcct range and set to end date if not
|
||||
|
@ -222,10 +223,10 @@ public class CalloutGLJournal extends CalloutEngine
|
|||
AmtSourceCr = Env.ZERO;
|
||||
|
||||
BigDecimal AmtAcctDr = AmtSourceDr.multiply(CurrencyRate);
|
||||
AmtAcctDr = AmtAcctDr.setScale(Precision, BigDecimal.ROUND_HALF_UP);
|
||||
AmtAcctDr = AmtAcctDr.setScale(Precision, RoundingMode.HALF_UP);
|
||||
mTab.setValue("AmtAcctDr", AmtAcctDr);
|
||||
BigDecimal AmtAcctCr = AmtSourceCr.multiply(CurrencyRate);
|
||||
AmtAcctCr = AmtAcctCr.setScale(Precision, BigDecimal.ROUND_HALF_UP);
|
||||
AmtAcctCr = AmtAcctCr.setScale(Precision, RoundingMode.HALF_UP);
|
||||
mTab.setValue("AmtAcctCr", AmtAcctCr);
|
||||
|
||||
return "";
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
package org.compiere.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
|
@ -61,28 +62,28 @@ public class CalloutInOut extends CalloutEngine
|
|||
{
|
||||
mTab.setValue("DateOrdered", order.getDateOrdered());
|
||||
mTab.setValue("POReference", order.getPOReference());
|
||||
mTab.setValue("AD_Org_ID", new Integer(order.getAD_Org_ID()));
|
||||
mTab.setValue("AD_OrgTrx_ID", new Integer(order.getAD_OrgTrx_ID()));
|
||||
mTab.setValue("C_Activity_ID", new Integer(order.getC_Activity_ID()));
|
||||
mTab.setValue("C_Campaign_ID", new Integer(order.getC_Campaign_ID()));
|
||||
mTab.setValue("C_Project_ID", new Integer(order.getC_Project_ID()));
|
||||
mTab.setValue("User1_ID", new Integer(order.getUser1_ID()));
|
||||
mTab.setValue("User2_ID", new Integer(order.getUser2_ID()));
|
||||
mTab.setValue("M_Warehouse_ID", new Integer(order.getM_Warehouse_ID()));
|
||||
mTab.setValue("AD_Org_ID", Integer.valueOf(order.getAD_Org_ID()));
|
||||
mTab.setValue("AD_OrgTrx_ID", Integer.valueOf(order.getAD_OrgTrx_ID()));
|
||||
mTab.setValue("C_Activity_ID", Integer.valueOf(order.getC_Activity_ID()));
|
||||
mTab.setValue("C_Campaign_ID", Integer.valueOf(order.getC_Campaign_ID()));
|
||||
mTab.setValue("C_Project_ID", Integer.valueOf(order.getC_Project_ID()));
|
||||
mTab.setValue("User1_ID", Integer.valueOf(order.getUser1_ID()));
|
||||
mTab.setValue("User2_ID", Integer.valueOf(order.getUser2_ID()));
|
||||
mTab.setValue("M_Warehouse_ID", Integer.valueOf(order.getM_Warehouse_ID()));
|
||||
//
|
||||
mTab.setValue("DeliveryRule", order.getDeliveryRule());
|
||||
mTab.setValue("DeliveryViaRule", order.getDeliveryViaRule());
|
||||
mTab.setValue("M_Shipper_ID", new Integer(order.getM_Shipper_ID()));
|
||||
mTab.setValue("M_Shipper_ID", Integer.valueOf(order.getM_Shipper_ID()));
|
||||
mTab.setValue("FreightCostRule", order.getFreightCostRule());
|
||||
mTab.setValue("FreightAmt", order.getFreightAmt());
|
||||
|
||||
mTab.setValue("C_BPartner_ID", new Integer(order.getC_BPartner_ID()));
|
||||
mTab.setValue("C_BPartner_ID", Integer.valueOf(order.getC_BPartner_ID()));
|
||||
|
||||
//[ 1867464 ]
|
||||
mTab.setValue("C_BPartner_Location_ID", new Integer(order.getC_BPartner_Location_ID()));
|
||||
mTab.setValue("C_BPartner_Location_ID", Integer.valueOf(order.getC_BPartner_Location_ID()));
|
||||
|
||||
if (order.getAD_User_ID() > 0)
|
||||
mTab.setValue("AD_User_ID", new Integer(order.getAD_User_ID()));
|
||||
mTab.setValue("AD_User_ID", Integer.valueOf(order.getAD_User_ID()));
|
||||
else
|
||||
mTab.setValue("AD_User_ID", null);
|
||||
}
|
||||
|
@ -128,28 +129,28 @@ public class CalloutInOut extends CalloutEngine
|
|||
{
|
||||
mTab.setValue("DateOrdered", originalReceipt.getDateOrdered());
|
||||
mTab.setValue("POReference", originalReceipt.getPOReference());
|
||||
mTab.setValue("AD_Org_ID", new Integer(originalReceipt.getAD_Org_ID()));
|
||||
mTab.setValue("AD_OrgTrx_ID", new Integer(originalReceipt.getAD_OrgTrx_ID()));
|
||||
mTab.setValue("C_Activity_ID", new Integer(originalReceipt.getC_Activity_ID()));
|
||||
mTab.setValue("C_Campaign_ID", new Integer(originalReceipt.getC_Campaign_ID()));
|
||||
mTab.setValue("C_Project_ID", new Integer(originalReceipt.getC_Project_ID()));
|
||||
mTab.setValue("User1_ID", new Integer(originalReceipt.getUser1_ID()));
|
||||
mTab.setValue("User2_ID", new Integer(originalReceipt.getUser2_ID()));
|
||||
mTab.setValue("M_Warehouse_ID", new Integer(originalReceipt.getM_Warehouse_ID()));
|
||||
mTab.setValue("AD_Org_ID", Integer.valueOf(originalReceipt.getAD_Org_ID()));
|
||||
mTab.setValue("AD_OrgTrx_ID", Integer.valueOf(originalReceipt.getAD_OrgTrx_ID()));
|
||||
mTab.setValue("C_Activity_ID", Integer.valueOf(originalReceipt.getC_Activity_ID()));
|
||||
mTab.setValue("C_Campaign_ID", Integer.valueOf(originalReceipt.getC_Campaign_ID()));
|
||||
mTab.setValue("C_Project_ID", Integer.valueOf(originalReceipt.getC_Project_ID()));
|
||||
mTab.setValue("User1_ID", Integer.valueOf(originalReceipt.getUser1_ID()));
|
||||
mTab.setValue("User2_ID", Integer.valueOf(originalReceipt.getUser2_ID()));
|
||||
mTab.setValue("M_Warehouse_ID", Integer.valueOf(originalReceipt.getM_Warehouse_ID()));
|
||||
//
|
||||
mTab.setValue("DeliveryRule", originalReceipt.getDeliveryRule());
|
||||
mTab.setValue("DeliveryViaRule", originalReceipt.getDeliveryViaRule());
|
||||
mTab.setValue("M_Shipper_ID", new Integer(originalReceipt.getM_Shipper_ID()));
|
||||
mTab.setValue("M_Shipper_ID", Integer.valueOf(originalReceipt.getM_Shipper_ID()));
|
||||
mTab.setValue("FreightCostRule", originalReceipt.getFreightCostRule());
|
||||
mTab.setValue("FreightAmt", originalReceipt.getFreightAmt());
|
||||
|
||||
mTab.setValue("C_BPartner_ID", new Integer(originalReceipt.getC_BPartner_ID()));
|
||||
mTab.setValue("C_BPartner_ID", Integer.valueOf(originalReceipt.getC_BPartner_ID()));
|
||||
|
||||
//[ 1867464 ]
|
||||
mTab.setValue("C_BPartner_Location_ID", new Integer(originalReceipt.getC_BPartner_Location_ID()));
|
||||
mTab.setValue("C_BPartner_Location_ID", Integer.valueOf(originalReceipt.getC_BPartner_Location_ID()));
|
||||
|
||||
if (originalReceipt.getAD_User_ID() > 0)
|
||||
mTab.setValue("AD_User_ID", new Integer(originalReceipt.getAD_User_ID()));
|
||||
mTab.setValue("AD_User_ID", Integer.valueOf(originalReceipt.getAD_User_ID()));
|
||||
else
|
||||
mTab.setValue("AD_User_ID", null);
|
||||
}
|
||||
|
@ -290,13 +291,13 @@ public class CalloutInOut extends CalloutEngine
|
|||
if (!IsSOTrx)
|
||||
{
|
||||
// Location
|
||||
Integer ii = new Integer(rs.getInt("C_BPartner_Location_ID"));
|
||||
Integer ii = Integer.valueOf(rs.getInt("C_BPartner_Location_ID"));
|
||||
if (rs.wasNull())
|
||||
mTab.setValue("C_BPartner_Location_ID", null);
|
||||
else
|
||||
mTab.setValue("C_BPartner_Location_ID", ii);
|
||||
// Contact
|
||||
ii = new Integer(rs.getInt("AD_User_ID"));
|
||||
ii = Integer.valueOf(rs.getInt("AD_User_ID"));
|
||||
if (rs.wasNull())
|
||||
mTab.setValue("AD_User_ID", null);
|
||||
else
|
||||
|
@ -361,12 +362,12 @@ public class CalloutInOut extends CalloutEngine
|
|||
if (rs.next())
|
||||
{
|
||||
// Org
|
||||
Integer ii = new Integer(rs.getInt(1));
|
||||
Integer ii = Integer.valueOf(rs.getInt(1));
|
||||
int AD_Org_ID = Env.getContextAsInt(ctx, WindowNo, "AD_Org_ID");
|
||||
if (AD_Org_ID != ii.intValue())
|
||||
mTab.setValue("AD_Org_ID", ii);
|
||||
// Locator
|
||||
ii = new Integer(rs.getInt(2));
|
||||
ii = Integer.valueOf(rs.getInt(2));
|
||||
if (rs.wasNull())
|
||||
Env.setContext(ctx, WindowNo, 0, "M_Locator_ID", null);
|
||||
else
|
||||
|
@ -416,17 +417,17 @@ public class CalloutInOut extends CalloutEngine
|
|||
if (ol.get_ID() != 0)
|
||||
{
|
||||
if (ol.getC_Charge_ID() > 0 && ol.getM_Product_ID() <= 0) {
|
||||
mTab.setValue("C_Charge_ID", new Integer(ol.getC_Charge_ID()));
|
||||
mTab.setValue("C_Charge_ID", Integer.valueOf(ol.getC_Charge_ID()));
|
||||
mTab.setValue("M_Product_ID", null);
|
||||
mTab.setValue("M_AttributeSetInstance_ID", null);
|
||||
}
|
||||
else {
|
||||
mTab.setValue("M_Product_ID", new Integer(ol.getM_Product_ID()));
|
||||
mTab.setValue("M_AttributeSetInstance_ID", new Integer(ol.getM_AttributeSetInstance_ID()));
|
||||
mTab.setValue("M_Product_ID", Integer.valueOf(ol.getM_Product_ID()));
|
||||
mTab.setValue("M_AttributeSetInstance_ID", Integer.valueOf(ol.getM_AttributeSetInstance_ID()));
|
||||
mTab.setValue("C_Charge_ID", null);
|
||||
}
|
||||
//
|
||||
mTab.setValue("C_UOM_ID", new Integer(ol.getC_UOM_ID()));
|
||||
mTab.setValue("C_UOM_ID", Integer.valueOf(ol.getC_UOM_ID()));
|
||||
BigDecimal MovementQty = ol.getQtyOrdered().subtract(ol.getQtyDelivered());
|
||||
BigDecimal runningqty = DB.getSQLValueBDEx(null, "SELECT SUM(MovementQty) FROM M_InOutLine WHERE M_InOut_ID=? AND M_InOutLine_ID!=? AND C_OrderLine_ID=?",
|
||||
Env.getContextAsInt(ctx, WindowNo, "M_InOut_ID"),
|
||||
|
@ -439,17 +440,17 @@ public class CalloutInOut extends CalloutEngine
|
|||
BigDecimal QtyEntered = MovementQty;
|
||||
if (ol.getQtyEntered().compareTo(ol.getQtyOrdered()) != 0)
|
||||
QtyEntered = QtyEntered.multiply(ol.getQtyEntered())
|
||||
.divide(ol.getQtyOrdered(), 12, BigDecimal.ROUND_HALF_UP);
|
||||
.divide(ol.getQtyOrdered(), 12, RoundingMode.HALF_UP);
|
||||
mTab.setValue("QtyEntered", QtyEntered);
|
||||
//
|
||||
mTab.setValue("C_Activity_ID", new Integer(ol.getC_Activity_ID()));
|
||||
mTab.setValue("C_Campaign_ID", new Integer(ol.getC_Campaign_ID()));
|
||||
mTab.setValue("C_Project_ID", new Integer(ol.getC_Project_ID()));
|
||||
mTab.setValue("C_ProjectPhase_ID", new Integer(ol.getC_ProjectPhase_ID()));
|
||||
mTab.setValue("C_ProjectTask_ID", new Integer(ol.getC_ProjectTask_ID()));
|
||||
mTab.setValue("AD_OrgTrx_ID", new Integer(ol.getAD_OrgTrx_ID()));
|
||||
mTab.setValue("User1_ID", new Integer(ol.getUser1_ID()));
|
||||
mTab.setValue("User2_ID", new Integer(ol.getUser2_ID()));
|
||||
mTab.setValue("C_Activity_ID", Integer.valueOf(ol.getC_Activity_ID()));
|
||||
mTab.setValue("C_Campaign_ID", Integer.valueOf(ol.getC_Campaign_ID()));
|
||||
mTab.setValue("C_Project_ID", Integer.valueOf(ol.getC_Project_ID()));
|
||||
mTab.setValue("C_ProjectPhase_ID", Integer.valueOf(ol.getC_ProjectPhase_ID()));
|
||||
mTab.setValue("C_ProjectTask_ID", Integer.valueOf(ol.getC_ProjectTask_ID()));
|
||||
mTab.setValue("AD_OrgTrx_ID", Integer.valueOf(ol.getAD_OrgTrx_ID()));
|
||||
mTab.setValue("User1_ID", Integer.valueOf(ol.getUser1_ID()));
|
||||
mTab.setValue("User2_ID", Integer.valueOf(ol.getUser2_ID()));
|
||||
}
|
||||
return "";
|
||||
} // orderLine
|
||||
|
@ -474,30 +475,30 @@ public class CalloutInOut extends CalloutEngine
|
|||
if (rl.get_ID() != 0)
|
||||
{
|
||||
if (rl.getC_Charge_ID() > 0 && rl.getM_Product_ID() <= 0) {
|
||||
mTab.setValue("C_Charge_ID", new Integer(rl.getC_Charge_ID()));
|
||||
mTab.setValue("C_Charge_ID", Integer.valueOf(rl.getC_Charge_ID()));
|
||||
mTab.setValue("M_Product_ID", null);
|
||||
mTab.setValue("M_AttributeSetInstance_ID", null);
|
||||
}
|
||||
else {
|
||||
mTab.setValue("M_Product_ID", new Integer(rl.getM_Product_ID()));
|
||||
mTab.setValue("M_AttributeSetInstance_ID", new Integer(rl.getM_AttributeSetInstance_ID()));
|
||||
mTab.setValue("M_Product_ID", Integer.valueOf(rl.getM_Product_ID()));
|
||||
mTab.setValue("M_AttributeSetInstance_ID", Integer.valueOf(rl.getM_AttributeSetInstance_ID()));
|
||||
mTab.setValue("C_Charge_ID", null);
|
||||
}
|
||||
//
|
||||
mTab.setValue("C_UOM_ID", new Integer(rl.getC_UOM_ID()));
|
||||
mTab.setValue("C_UOM_ID", Integer.valueOf(rl.getC_UOM_ID()));
|
||||
BigDecimal MovementQty = rl.getQty().subtract(rl.getQtyDelivered());
|
||||
mTab.setValue("MovementQty", MovementQty);
|
||||
BigDecimal QtyEntered = MovementQty;
|
||||
mTab.setValue("QtyEntered", QtyEntered);
|
||||
//
|
||||
mTab.setValue("C_Activity_ID", new Integer(rl.getC_Activity_ID()));
|
||||
mTab.setValue("C_Campaign_ID", new Integer(rl.getC_Campaign_ID()));
|
||||
mTab.setValue("C_Project_ID", new Integer(rl.getC_Project_ID()));
|
||||
mTab.setValue("C_ProjectPhase_ID", new Integer(rl.getC_ProjectPhase_ID()));
|
||||
mTab.setValue("C_ProjectTask_ID", new Integer(rl.getC_ProjectTask_ID()));
|
||||
mTab.setValue("AD_OrgTrx_ID", new Integer(rl.getAD_OrgTrx_ID()));
|
||||
mTab.setValue("User1_ID", new Integer(rl.getUser1_ID()));
|
||||
mTab.setValue("User2_ID", new Integer(rl.getUser2_ID()));
|
||||
mTab.setValue("C_Activity_ID", Integer.valueOf(rl.getC_Activity_ID()));
|
||||
mTab.setValue("C_Campaign_ID", Integer.valueOf(rl.getC_Campaign_ID()));
|
||||
mTab.setValue("C_Project_ID", Integer.valueOf(rl.getC_Project_ID()));
|
||||
mTab.setValue("C_ProjectPhase_ID", Integer.valueOf(rl.getC_ProjectPhase_ID()));
|
||||
mTab.setValue("C_ProjectTask_ID", Integer.valueOf(rl.getC_ProjectTask_ID()));
|
||||
mTab.setValue("AD_OrgTrx_ID", Integer.valueOf(rl.getAD_OrgTrx_ID()));
|
||||
mTab.setValue("User1_ID", Integer.valueOf(rl.getUser1_ID()));
|
||||
mTab.setValue("User2_ID", Integer.valueOf(rl.getUser2_ID()));
|
||||
}
|
||||
return "";
|
||||
} // rmaLine
|
||||
|
@ -525,10 +526,10 @@ public class CalloutInOut extends CalloutEngine
|
|||
&& Env.getContextAsInt(ctx, WindowNo, Env.TAB_INFO, "M_AttributeSetInstance_ID") != 0)
|
||||
{
|
||||
mTab.setValue("M_AttributeSetInstance_ID",
|
||||
new Integer(Env.getContextAsInt(ctx, WindowNo, Env.TAB_INFO, "M_AttributeSetInstance_ID")));
|
||||
Integer.valueOf(Env.getContextAsInt(ctx, WindowNo, Env.TAB_INFO, "M_AttributeSetInstance_ID")));
|
||||
M_Locator_ID = Env.getContextAsInt(ctx, WindowNo, Env.TAB_INFO, "M_Locator_ID");
|
||||
if (M_Locator_ID != 0)
|
||||
mTab.setValue("M_Locator_ID", new Integer(M_Locator_ID));
|
||||
mTab.setValue("M_Locator_ID", Integer.valueOf(M_Locator_ID));
|
||||
}
|
||||
else
|
||||
mTab.setValue("M_AttributeSetInstance_ID", null);
|
||||
|
@ -542,7 +543,7 @@ public class CalloutInOut extends CalloutEngine
|
|||
|
||||
// Set UOM/Locator/Qty
|
||||
MProduct product = MProduct.get(ctx, M_Product_ID.intValue());
|
||||
mTab.setValue("C_UOM_ID", new Integer (product.getC_UOM_ID()));
|
||||
mTab.setValue("C_UOM_ID", Integer.valueOf(product.getC_UOM_ID()));
|
||||
BigDecimal QtyEntered = (BigDecimal)mTab.getValue("QtyEntered");
|
||||
mTab.setValue("MovementQty", QtyEntered);
|
||||
if (M_Locator_ID != 0)
|
||||
|
@ -551,7 +552,7 @@ public class CalloutInOut extends CalloutEngine
|
|||
{
|
||||
MLocator loc = MLocator.get(ctx, product.getM_Locator_ID());
|
||||
if (M_Warehouse_ID == loc.getM_Warehouse_ID())
|
||||
mTab.setValue("M_Locator_ID", new Integer (product.getM_Locator_ID()));
|
||||
mTab.setValue("M_Locator_ID", Integer.valueOf(product.getM_Locator_ID()));
|
||||
else
|
||||
if (log.isLoggable(Level.FINE)) log.fine("No Locator for M_Product_ID=" + M_Product_ID + " and M_Warehouse_ID=" + M_Warehouse_ID);
|
||||
}
|
||||
|
@ -591,7 +592,7 @@ public class CalloutInOut extends CalloutEngine
|
|||
{
|
||||
int C_UOM_To_ID = ((Integer)value).intValue();
|
||||
QtyEntered = (BigDecimal)mTab.getValue("QtyEntered");
|
||||
BigDecimal QtyEntered1 = QtyEntered.setScale(MUOM.getPrecision(ctx, C_UOM_To_ID), BigDecimal.ROUND_HALF_UP);
|
||||
BigDecimal QtyEntered1 = QtyEntered.setScale(MUOM.getPrecision(ctx, C_UOM_To_ID), RoundingMode.HALF_UP);
|
||||
if (QtyEntered.compareTo(QtyEntered1) != 0)
|
||||
{
|
||||
if (log.isLoggable(Level.FINE)) log.fine("Corrected QtyEntered Scale UOM=" + C_UOM_To_ID
|
||||
|
@ -622,7 +623,7 @@ public class CalloutInOut extends CalloutEngine
|
|||
{
|
||||
int C_UOM_To_ID = Env.getContextAsInt(ctx, WindowNo, mTab.getTabNo(), "C_UOM_ID");
|
||||
QtyEntered = (BigDecimal)value;
|
||||
BigDecimal QtyEntered1 = QtyEntered.setScale(MUOM.getPrecision(ctx, C_UOM_To_ID), BigDecimal.ROUND_HALF_UP);
|
||||
BigDecimal QtyEntered1 = QtyEntered.setScale(MUOM.getPrecision(ctx, C_UOM_To_ID), RoundingMode.HALF_UP);
|
||||
if (QtyEntered.compareTo(QtyEntered1) != 0)
|
||||
{
|
||||
if (log.isLoggable(Level.FINE)) log.fine("Corrected QtyEntered Scale UOM=" + C_UOM_To_ID
|
||||
|
@ -648,7 +649,7 @@ public class CalloutInOut extends CalloutEngine
|
|||
int C_UOM_To_ID = Env.getContextAsInt(ctx, WindowNo, mTab.getTabNo(), "C_UOM_ID");
|
||||
MovementQty = (BigDecimal)value;
|
||||
int precision = MProduct.get(ctx, M_Product_ID).getUOMPrecision();
|
||||
BigDecimal MovementQty1 = MovementQty.setScale(precision, BigDecimal.ROUND_HALF_UP);
|
||||
BigDecimal MovementQty1 = MovementQty.setScale(precision, RoundingMode.HALF_UP);
|
||||
if (MovementQty.compareTo(MovementQty1) != 0)
|
||||
{
|
||||
if (log.isLoggable(Level.FINE)) log.fine("Corrected MovementQty "
|
||||
|
@ -704,7 +705,7 @@ public class CalloutInOut extends CalloutEngine
|
|||
if (selectedM_Locator_ID != 0)
|
||||
{
|
||||
if (log.isLoggable(Level.FINE)) log.fine("Selected M_Locator_ID=" + selectedM_Locator_ID);
|
||||
mTab.setValue("M_Locator_ID", new Integer (selectedM_Locator_ID));
|
||||
mTab.setValue("M_Locator_ID", Integer.valueOf(selectedM_Locator_ID));
|
||||
}
|
||||
}
|
||||
MAttributeSetInstance asi = MAttributeSetInstance.get(ctx, M_ASI_ID.intValue(), 0);
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
package org.compiere.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
|
@ -161,7 +162,7 @@ public class CalloutInvoice extends CalloutEngine
|
|||
}
|
||||
|
||||
// PriceList & IsTaxIncluded & Currency
|
||||
Integer ii = new Integer(rs.getInt(IsSOTrx ? "M_PriceList_ID" : "PO_PriceList_ID"));
|
||||
Integer ii = Integer.valueOf(rs.getInt(IsSOTrx ? "M_PriceList_ID" : "PO_PriceList_ID"));
|
||||
if (!rs.wasNull())
|
||||
mTab.setValue("M_PriceList_ID", ii);
|
||||
else
|
||||
|
@ -171,13 +172,13 @@ public class CalloutInvoice extends CalloutEngine
|
|||
{
|
||||
MPriceList pl = new MPriceList(ctx, i, null);
|
||||
if (IsSOTrx == pl.isSOPriceList())
|
||||
mTab.setValue("M_PriceList_ID", new Integer(i));
|
||||
mTab.setValue("M_PriceList_ID", Integer.valueOf(i));
|
||||
else
|
||||
{
|
||||
String sql2 = "SELECT M_PriceList_ID FROM M_PriceList WHERE AD_Client_ID=? AND IsSOPriceList=? AND IsActive='Y' ORDER BY IsDefault DESC";
|
||||
ii = DB.getSQLValue (null, sql2, Env.getAD_Client_ID(ctx), IsSOTrx);
|
||||
if (ii != 0)
|
||||
mTab.setValue("M_PriceList_ID", new Integer(ii));
|
||||
mTab.setValue("M_PriceList_ID", Integer.valueOf(ii));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -189,7 +190,7 @@ public class CalloutInvoice extends CalloutEngine
|
|||
if (Env.getContext(ctx, WindowNo, "DocBaseType").endsWith("C")) // Credits are Payment Term
|
||||
s = X_C_Invoice.PAYMENTRULE_OnCredit;
|
||||
// Payment Term
|
||||
ii = new Integer(rs.getInt(IsSOTrx ? "C_PaymentTerm_ID" : "PO_PaymentTerm_ID"));
|
||||
ii = Integer.valueOf(rs.getInt(IsSOTrx ? "C_PaymentTerm_ID" : "PO_PaymentTerm_ID"));
|
||||
if (!rs.wasNull())
|
||||
mTab.setValue("C_PaymentTerm_ID", ii);
|
||||
|
||||
|
@ -206,7 +207,7 @@ public class CalloutInvoice extends CalloutEngine
|
|||
if (locID == 0)
|
||||
mTab.setValue("C_BPartner_Location_ID", null);
|
||||
else
|
||||
mTab.setValue("C_BPartner_Location_ID", new Integer(locID));
|
||||
mTab.setValue("C_BPartner_Location_ID", Integer.valueOf(locID));
|
||||
|
||||
// Contact - overwritten by InfoBP selection
|
||||
int contID = rs.getInt("AD_User_ID");
|
||||
|
@ -219,7 +220,7 @@ public class CalloutInvoice extends CalloutEngine
|
|||
if (contID == 0)
|
||||
mTab.setValue("AD_User_ID", null);
|
||||
else
|
||||
mTab.setValue("AD_User_ID", new Integer(contID));
|
||||
mTab.setValue("AD_User_ID", Integer.valueOf(contID));
|
||||
|
||||
// CreditAvailable
|
||||
if (IsSOTrx)
|
||||
|
@ -358,9 +359,9 @@ public class CalloutInvoice extends CalloutEngine
|
|||
mTab.setValue("PriceLimit", pp.getPriceLimit());
|
||||
mTab.setValue("PriceActual", pp.getPriceStd());
|
||||
mTab.setValue("PriceEntered", pp.getPriceStd());
|
||||
mTab.setValue("C_Currency_ID", new Integer(pp.getC_Currency_ID()));
|
||||
mTab.setValue("C_Currency_ID", Integer.valueOf(pp.getC_Currency_ID()));
|
||||
// mTab.setValue("Discount", pp.getDiscount());
|
||||
mTab.setValue("C_UOM_ID", new Integer(pp.getC_UOM_ID()));
|
||||
mTab.setValue("C_UOM_ID", Integer.valueOf(pp.getC_UOM_ID()));
|
||||
Env.setContext(ctx, WindowNo, "EnforcePriceLimit", pp.isEnforcePriceLimit() ? "Y" : "N");
|
||||
Env.setContext(ctx, WindowNo, "DiscountSchema", pp.isDiscountSchema() ? "Y" : "N");
|
||||
//
|
||||
|
@ -393,7 +394,7 @@ public class CalloutInvoice extends CalloutEngine
|
|||
}
|
||||
mTab.setValue("M_AttributeSetInstance_ID", null);
|
||||
mTab.setValue("S_ResourceAssignment_ID", null);
|
||||
mTab.setValue("C_UOM_ID", new Integer(100)); // EA
|
||||
mTab.setValue("C_UOM_ID", Integer.valueOf(100)); // EA
|
||||
|
||||
Env.setContext(ctx, WindowNo, "DiscountSchema", "N");
|
||||
String sql = "SELECT ChargeAmt FROM C_Charge WHERE C_Charge_ID=?";
|
||||
|
@ -490,7 +491,7 @@ public class CalloutInvoice extends CalloutEngine
|
|||
if (C_Tax_ID == 0)
|
||||
mTab.fireDataStatusEEvent(CLogger.retrieveError());
|
||||
else
|
||||
mTab.setValue("C_Tax_ID", new Integer(C_Tax_ID));
|
||||
mTab.setValue("C_Tax_ID", Integer.valueOf(C_Tax_ID));
|
||||
//
|
||||
return amt (ctx, WindowNo, mTab, mField, value);
|
||||
} // tax
|
||||
|
@ -618,7 +619,7 @@ public class CalloutInvoice extends CalloutEngine
|
|||
{
|
||||
PriceActual = new BigDecimal ((100.0 - Discount.doubleValue()) / 100.0 * PriceList.doubleValue());
|
||||
if (PriceActual.scale() > StdPrecision)
|
||||
PriceActual = PriceActual.setScale(StdPrecision, BigDecimal.ROUND_HALF_UP);
|
||||
PriceActual = PriceActual.setScale(StdPrecision, RoundingMode.HALF_UP);
|
||||
PriceEntered = MUOMConversion.convertProductFrom (ctx, M_Product_ID,
|
||||
C_UOM_To_ID, PriceActual);
|
||||
if (PriceEntered == null)
|
||||
|
@ -634,7 +635,7 @@ public class CalloutInvoice extends CalloutEngine
|
|||
else
|
||||
Discount = new BigDecimal ((PriceList.doubleValue() - PriceActual.doubleValue()) / PriceList.doubleValue() * 100.0);
|
||||
if (Discount.scale() > 2)
|
||||
Discount = Discount.setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
Discount = Discount.setScale(2, RoundingMode.HALF_UP);
|
||||
mTab.setValue("Discount", Discount);
|
||||
}
|
||||
log.fine("amt = PriceEntered=" + PriceEntered + ", Actual" + PriceActual + ", Discount=" + Discount);
|
||||
|
@ -663,7 +664,7 @@ public class CalloutInvoice extends CalloutEngine
|
|||
{
|
||||
Discount = BigDecimal.valueOf((PriceList.doubleValue () - PriceActual.doubleValue ()) / PriceList.doubleValue () * 100.0);
|
||||
if (Discount.scale () > 2)
|
||||
Discount = Discount.setScale (2, BigDecimal.ROUND_HALF_UP);
|
||||
Discount = Discount.setScale (2, RoundingMode.HALF_UP);
|
||||
// mTab.setValue ("Discount", Discount);
|
||||
}
|
||||
}
|
||||
|
@ -671,7 +672,7 @@ public class CalloutInvoice extends CalloutEngine
|
|||
// Line Net Amt
|
||||
BigDecimal LineNetAmt = QtyInvoiced.multiply(PriceActual);
|
||||
if (LineNetAmt.scale() > StdPrecision)
|
||||
LineNetAmt = LineNetAmt.setScale(StdPrecision, BigDecimal.ROUND_HALF_UP);
|
||||
LineNetAmt = LineNetAmt.setScale(StdPrecision, RoundingMode.HALF_UP);
|
||||
if (log.isLoggable(Level.INFO)) log.info("amt = LineNetAmt=" + LineNetAmt);
|
||||
mTab.setValue("LineNetAmt", LineNetAmt);
|
||||
|
||||
|
@ -757,7 +758,7 @@ public class CalloutInvoice extends CalloutEngine
|
|||
{
|
||||
int C_UOM_To_ID = ((Integer)value).intValue();
|
||||
QtyEntered = (BigDecimal)mTab.getValue("QtyEntered");
|
||||
BigDecimal QtyEntered1 = QtyEntered.setScale(MUOM.getPrecision(ctx, C_UOM_To_ID), BigDecimal.ROUND_HALF_UP);
|
||||
BigDecimal QtyEntered1 = QtyEntered.setScale(MUOM.getPrecision(ctx, C_UOM_To_ID), RoundingMode.HALF_UP);
|
||||
if (QtyEntered.compareTo(QtyEntered1) != 0)
|
||||
{
|
||||
if (log.isLoggable(Level.FINE)) log.fine("Corrected QtyEntered Scale UOM=" + C_UOM_To_ID
|
||||
|
@ -788,7 +789,7 @@ public class CalloutInvoice extends CalloutEngine
|
|||
{
|
||||
int C_UOM_To_ID = Env.getContextAsInt(ctx, WindowNo, mTab.getTabNo(), "C_UOM_ID");
|
||||
QtyEntered = (BigDecimal)value;
|
||||
BigDecimal QtyEntered1 = QtyEntered.setScale(MUOM.getPrecision(ctx, C_UOM_To_ID), BigDecimal.ROUND_HALF_UP);
|
||||
BigDecimal QtyEntered1 = QtyEntered.setScale(MUOM.getPrecision(ctx, C_UOM_To_ID), RoundingMode.HALF_UP);
|
||||
if (QtyEntered.compareTo(QtyEntered1) != 0)
|
||||
{
|
||||
if (log.isLoggable(Level.FINE)) log.fine("Corrected QtyEntered Scale UOM=" + C_UOM_To_ID
|
||||
|
@ -814,7 +815,7 @@ public class CalloutInvoice extends CalloutEngine
|
|||
int C_UOM_To_ID = Env.getContextAsInt(ctx, WindowNo, mTab.getTabNo(), "C_UOM_ID");
|
||||
QtyInvoiced = (BigDecimal)value;
|
||||
int precision = MProduct.get(ctx, M_Product_ID).getUOMPrecision();
|
||||
BigDecimal QtyInvoiced1 = QtyInvoiced.setScale(precision, BigDecimal.ROUND_HALF_UP);
|
||||
BigDecimal QtyInvoiced1 = QtyInvoiced.setScale(precision, RoundingMode.HALF_UP);
|
||||
if (QtyInvoiced.compareTo(QtyInvoiced1) != 0)
|
||||
{
|
||||
if (log.isLoggable(Level.FINE)) log.fine("Corrected QtyInvoiced Scale "
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
package org.compiere.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
|
@ -108,7 +109,7 @@ public class CalloutInvoiceBatch extends CalloutEngine
|
|||
if (Env.getContext(ctx, WindowNo, "DocBaseType").endsWith("C")) // Credits are Payment Term
|
||||
s = X_C_Invoice.PAYMENTRULE_OnCredit;
|
||||
// Payment Term
|
||||
Integer ii = new Integer(rs.getInt(IsSOTrx ? "C_PaymentTerm_ID" : "PO_PaymentTerm_ID"));
|
||||
Integer ii = Integer.valueOf(rs.getInt(IsSOTrx ? "C_PaymentTerm_ID" : "PO_PaymentTerm_ID"));
|
||||
if (!rs.wasNull())
|
||||
mTab.setValue("C_PaymentTerm_ID", ii);
|
||||
|
||||
|
@ -125,7 +126,7 @@ public class CalloutInvoiceBatch extends CalloutEngine
|
|||
if (locID == 0)
|
||||
mTab.setValue("C_BPartner_Location_ID", null);
|
||||
else
|
||||
mTab.setValue("C_BPartner_Location_ID", new Integer(locID));
|
||||
mTab.setValue("C_BPartner_Location_ID", Integer.valueOf(locID));
|
||||
|
||||
// Contact - overwritten by InfoBP selection
|
||||
int contID = rs.getInt("AD_User_ID");
|
||||
|
@ -138,7 +139,7 @@ public class CalloutInvoiceBatch extends CalloutEngine
|
|||
if (contID == 0)
|
||||
mTab.setValue("AD_User_ID", null);
|
||||
else
|
||||
mTab.setValue("AD_User_ID", new Integer(contID));
|
||||
mTab.setValue("AD_User_ID", Integer.valueOf(contID));
|
||||
|
||||
// CreditAvailable
|
||||
if (IsSOTrx)
|
||||
|
@ -324,7 +325,7 @@ public class CalloutInvoiceBatch extends CalloutEngine
|
|||
if (C_Tax_ID == 0)
|
||||
mTab.fireDataStatusEEvent(CLogger.retrieveError());
|
||||
else
|
||||
mTab.setValue("C_Tax_ID", new Integer(C_Tax_ID));
|
||||
mTab.setValue("C_Tax_ID", Integer.valueOf(C_Tax_ID));
|
||||
//
|
||||
return amt (ctx, WindowNo, mTab, mField, value);
|
||||
} // tax
|
||||
|
@ -360,7 +361,7 @@ public class CalloutInvoiceBatch extends CalloutEngine
|
|||
// Line Net Amt
|
||||
BigDecimal LineNetAmt = QtyEntered.multiply(PriceEntered);
|
||||
if (LineNetAmt.scale() > StdPrecision)
|
||||
LineNetAmt = LineNetAmt.setScale(StdPrecision, BigDecimal.ROUND_HALF_UP);
|
||||
LineNetAmt = LineNetAmt.setScale(StdPrecision, RoundingMode.HALF_UP);
|
||||
|
||||
// Calculate Tax Amount
|
||||
boolean IsTaxIncluded = "Y".equals(Env.getContext(Env.getCtx(), WindowNo, "IsTaxIncluded"));
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
package org.compiere.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
|
@ -186,7 +187,7 @@ public class CalloutOrder extends CalloutEngine
|
|||
if (s != null && s.length() != 0)
|
||||
mTab.setValue("PaymentRule", s);
|
||||
// Payment Term
|
||||
Integer ii =new Integer(rs.getInt(IsSOTrx ? "C_PaymentTerm_ID" : "PO_PaymentTerm_ID"));
|
||||
Integer ii =Integer.valueOf(rs.getInt(IsSOTrx ? "C_PaymentTerm_ID" : "PO_PaymentTerm_ID"));
|
||||
if (!rs.wasNull())
|
||||
mTab.setValue("C_PaymentTerm_ID", ii);
|
||||
// InvoiceRule
|
||||
|
@ -278,7 +279,7 @@ public class CalloutOrder extends CalloutEngine
|
|||
}
|
||||
|
||||
// PriceList (indirect: IsTaxIncluded & Currency)
|
||||
Integer ii = new Integer(rs.getInt(IsSOTrx ? "M_PriceList_ID" : "PO_PriceList_ID"));
|
||||
Integer ii = Integer.valueOf(rs.getInt(IsSOTrx ? "M_PriceList_ID" : "PO_PriceList_ID"));
|
||||
if (!rs.wasNull())
|
||||
mTab.setValue("M_PriceList_ID", ii);
|
||||
else
|
||||
|
@ -288,13 +289,13 @@ public class CalloutOrder extends CalloutEngine
|
|||
{
|
||||
MPriceList pl = new MPriceList(ctx, i, null);
|
||||
if (IsSOTrx == pl.isSOPriceList())
|
||||
mTab.setValue("M_PriceList_ID", new Integer(i));
|
||||
mTab.setValue("M_PriceList_ID", Integer.valueOf(i));
|
||||
else
|
||||
{
|
||||
String sql2 = "SELECT M_PriceList_ID FROM M_PriceList WHERE AD_Client_ID=? AND IsSOPriceList=? AND IsActive='Y' ORDER BY IsDefault DESC";
|
||||
ii = DB.getSQLValue (null, sql2, Env.getAD_Client_ID(ctx), IsSOTrx);
|
||||
if (ii != 0)
|
||||
mTab.setValue("M_PriceList_ID", new Integer(ii));
|
||||
mTab.setValue("M_PriceList_ID", Integer.valueOf(ii));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -325,7 +326,7 @@ public class CalloutOrder extends CalloutEngine
|
|||
if (bill_Location_ID == 0)
|
||||
mTab.setValue("Bill_Location_ID", null);
|
||||
else
|
||||
mTab.setValue("Bill_Location_ID", new Integer(bill_Location_ID));
|
||||
mTab.setValue("Bill_Location_ID", Integer.valueOf(bill_Location_ID));
|
||||
// Ship-To Location
|
||||
if (shipTo_ID == 0)
|
||||
shipTo_ID = rs.getInt("C_BPartner_Location_ID");
|
||||
|
@ -333,7 +334,7 @@ public class CalloutOrder extends CalloutEngine
|
|||
if (shipTo_ID == 0)
|
||||
mTab.setValue("C_BPartner_Location_ID", null);
|
||||
else
|
||||
mTab.setValue("C_BPartner_Location_ID", new Integer(shipTo_ID));
|
||||
mTab.setValue("C_BPartner_Location_ID", Integer.valueOf(shipTo_ID));
|
||||
|
||||
// Contact - overwritten by InfoBP selection
|
||||
int contID = rs.getInt("AD_User_ID");
|
||||
|
@ -347,8 +348,8 @@ public class CalloutOrder extends CalloutEngine
|
|||
mTab.setValue("AD_User_ID", null);
|
||||
else
|
||||
{
|
||||
mTab.setValue("AD_User_ID", new Integer(contID));
|
||||
mTab.setValue("Bill_User_ID", new Integer(contID));
|
||||
mTab.setValue("AD_User_ID", Integer.valueOf(contID));
|
||||
mTab.setValue("Bill_User_ID", Integer.valueOf(contID));
|
||||
}
|
||||
|
||||
// CreditAvailable
|
||||
|
@ -399,7 +400,7 @@ public class CalloutOrder extends CalloutEngine
|
|||
if (s != null && s.length() != 0)
|
||||
mTab.setValue("PaymentRule", s);
|
||||
// Payment Term
|
||||
ii = new Integer(rs.getInt(IsSOTrx ? "C_PaymentTerm_ID" : "PO_PaymentTerm_ID"));
|
||||
ii = Integer.valueOf(rs.getInt(IsSOTrx ? "C_PaymentTerm_ID" : "PO_PaymentTerm_ID"));
|
||||
if (!rs.wasNull())
|
||||
mTab.setValue("C_PaymentTerm_ID", ii);
|
||||
// InvoiceRule
|
||||
|
@ -479,7 +480,7 @@ public class CalloutOrder extends CalloutEngine
|
|||
if (rs.next())
|
||||
{
|
||||
// PriceList (indirect: IsTaxIncluded & Currency)
|
||||
Integer ii = new Integer(rs.getInt(IsSOTrx ? "M_PriceList_ID" : "PO_PriceList_ID"));
|
||||
Integer ii = Integer.valueOf(rs.getInt(IsSOTrx ? "M_PriceList_ID" : "PO_PriceList_ID"));
|
||||
if (!rs.wasNull())
|
||||
mTab.setValue("M_PriceList_ID", ii);
|
||||
else
|
||||
|
@ -489,13 +490,13 @@ public class CalloutOrder extends CalloutEngine
|
|||
{
|
||||
MPriceList pl = new MPriceList(ctx, i, null);
|
||||
if (IsSOTrx == pl.isSOPriceList())
|
||||
mTab.setValue("M_PriceList_ID", new Integer(i));
|
||||
mTab.setValue("M_PriceList_ID", Integer.valueOf(i));
|
||||
else
|
||||
{
|
||||
String sql2 = "SELECT M_PriceList_ID FROM M_PriceList WHERE AD_Client_ID=? AND IsSOPriceList=? AND IsActive='Y' ORDER BY IsDefault DESC";
|
||||
ii = DB.getSQLValue (null, sql2, Env.getAD_Client_ID(ctx), IsSOTrx);
|
||||
if (ii != 0)
|
||||
mTab.setValue("M_PriceList_ID", new Integer(ii));
|
||||
mTab.setValue("M_PriceList_ID", Integer.valueOf(ii));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -518,7 +519,7 @@ public class CalloutOrder extends CalloutEngine
|
|||
if (bill_Location_ID == 0)
|
||||
mTab.setValue("Bill_Location_ID", null);
|
||||
else
|
||||
mTab.setValue("Bill_Location_ID", new Integer(bill_Location_ID));
|
||||
mTab.setValue("Bill_Location_ID", Integer.valueOf(bill_Location_ID));
|
||||
|
||||
// Contact - overwritten by InfoBP selection
|
||||
int contID = rs.getInt("AD_User_ID");
|
||||
|
@ -531,7 +532,7 @@ public class CalloutOrder extends CalloutEngine
|
|||
if (contID == 0)
|
||||
mTab.setValue("Bill_User_ID", null);
|
||||
else
|
||||
mTab.setValue("Bill_User_ID", new Integer(contID));
|
||||
mTab.setValue("Bill_User_ID", Integer.valueOf(contID));
|
||||
|
||||
// CreditAvailable
|
||||
if (IsSOTrx)
|
||||
|
@ -577,7 +578,7 @@ public class CalloutOrder extends CalloutEngine
|
|||
if (s != null && s.length() != 0)
|
||||
mTab.setValue("PaymentRule", s);
|
||||
// Payment Term
|
||||
ii = new Integer(rs.getInt(IsSOTrx ? "C_PaymentTerm_ID" : "PO_PaymentTerm_ID"));
|
||||
ii = Integer.valueOf(rs.getInt(IsSOTrx ? "C_PaymentTerm_ID" : "PO_PaymentTerm_ID"));
|
||||
if (!rs.wasNull())
|
||||
mTab.setValue("C_PaymentTerm_ID", ii);
|
||||
// InvoiceRule
|
||||
|
@ -783,9 +784,9 @@ public class CalloutOrder extends CalloutEngine
|
|||
mTab.setValue("PriceLimit", pp.getPriceLimit());
|
||||
mTab.setValue("PriceActual", pp.getPriceStd());
|
||||
mTab.setValue("PriceEntered", pp.getPriceStd());
|
||||
mTab.setValue("C_Currency_ID", new Integer(pp.getC_Currency_ID()));
|
||||
mTab.setValue("C_Currency_ID", Integer.valueOf(pp.getC_Currency_ID()));
|
||||
mTab.setValue("Discount", pp.getDiscount());
|
||||
mTab.setValue("C_UOM_ID", new Integer(pp.getC_UOM_ID()));
|
||||
mTab.setValue("C_UOM_ID", Integer.valueOf(pp.getC_UOM_ID()));
|
||||
mTab.setValue("QtyOrdered", mTab.getValue("QtyEntered"));
|
||||
Env.setContext(ctx, WindowNo, "EnforcePriceLimit", pp.isEnforcePriceLimit() ? "Y" : "N");
|
||||
Env.setContext(ctx, WindowNo, "DiscountSchema", pp.isDiscountSchema() ? "Y" : "N");
|
||||
|
@ -795,7 +796,7 @@ public class CalloutOrder extends CalloutEngine
|
|||
// Integer wh = (Integer)mTab.getValue("M_Warehouse_ID");
|
||||
// if (wh.intValue() != M_Warehouse_ID)
|
||||
// {
|
||||
// mTab.setValue("M_Warehouse_ID", new Integer(M_Warehouse_ID));
|
||||
// mTab.setValue("M_Warehouse_ID", Integer.valueOf(M_Warehouse_ID));
|
||||
// ADialog.warn(,WindowNo, "WarehouseChanged");
|
||||
// }
|
||||
|
||||
|
@ -822,7 +823,7 @@ public class CalloutOrder extends CalloutEngine
|
|||
{
|
||||
Integer C_OrderLine_ID = (Integer)mTab.getValue("C_OrderLine_ID");
|
||||
if (C_OrderLine_ID == null)
|
||||
C_OrderLine_ID = new Integer(0);
|
||||
C_OrderLine_ID = Integer.valueOf(0);
|
||||
BigDecimal notReserved = MOrderLine.getNotReserved(ctx,
|
||||
M_Warehouse_ID, M_Product_ID, M_AttributeSetInstance_ID,
|
||||
C_OrderLine_ID.intValue());
|
||||
|
@ -869,7 +870,7 @@ public class CalloutOrder extends CalloutEngine
|
|||
}
|
||||
mTab.setValue("M_AttributeSetInstance_ID", null);
|
||||
mTab.setValue("S_ResourceAssignment_ID", null);
|
||||
mTab.setValue("C_UOM_ID", new Integer(100)); // EA
|
||||
mTab.setValue("C_UOM_ID", Integer.valueOf(100)); // EA
|
||||
|
||||
Env.setContext(ctx, WindowNo, "DiscountSchema", "N");
|
||||
String sql = "SELECT ChargeAmt FROM C_Charge WHERE C_Charge_ID=?";
|
||||
|
@ -976,7 +977,7 @@ public class CalloutOrder extends CalloutEngine
|
|||
if (C_Tax_ID == 0)
|
||||
mTab.fireDataStatusEEvent(CLogger.retrieveError());
|
||||
else
|
||||
mTab.setValue("C_Tax_ID", new Integer(C_Tax_ID));
|
||||
mTab.setValue("C_Tax_ID", Integer.valueOf(C_Tax_ID));
|
||||
//
|
||||
if (steps) log.warning("fini");
|
||||
return amt(ctx, WindowNo, mTab, mField, value);
|
||||
|
@ -1119,7 +1120,7 @@ public class CalloutOrder extends CalloutEngine
|
|||
if ( PriceList.doubleValue() != 0 )
|
||||
PriceActual = BigDecimal.valueOf((100.0 - Discount.doubleValue()) / 100.0 * PriceList.doubleValue());
|
||||
if (PriceActual.scale() > StdPrecision)
|
||||
PriceActual = PriceActual.setScale(StdPrecision, BigDecimal.ROUND_HALF_UP);
|
||||
PriceActual = PriceActual.setScale(StdPrecision, RoundingMode.HALF_UP);
|
||||
PriceEntered = MUOMConversion.convertProductFrom (ctx, M_Product_ID,
|
||||
C_UOM_To_ID, PriceActual);
|
||||
if (PriceEntered == null)
|
||||
|
@ -1135,7 +1136,7 @@ public class CalloutOrder extends CalloutEngine
|
|||
else
|
||||
Discount = BigDecimal.valueOf((PriceList.doubleValue() - PriceActual.doubleValue()) / PriceList.doubleValue() * 100.0);
|
||||
if (Discount.scale() > 2)
|
||||
Discount = Discount.setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
Discount = Discount.setScale(2, RoundingMode.HALF_UP);
|
||||
mTab.setValue("Discount", Discount);
|
||||
}
|
||||
if (log.isLoggable(Level.FINE)) log.fine("PriceEntered=" + PriceEntered + ", Actual=" + PriceActual + ", Discount=" + Discount);
|
||||
|
@ -1163,7 +1164,7 @@ public class CalloutOrder extends CalloutEngine
|
|||
{
|
||||
Discount = BigDecimal.valueOf((PriceList.doubleValue () - PriceActual.doubleValue ()) / PriceList.doubleValue () * 100.0);
|
||||
if (Discount.scale () > 2)
|
||||
Discount = Discount.setScale (2, BigDecimal.ROUND_HALF_UP);
|
||||
Discount = Discount.setScale (2, RoundingMode.HALF_UP);
|
||||
mTab.setValue ("Discount", Discount);
|
||||
}
|
||||
}
|
||||
|
@ -1171,7 +1172,7 @@ public class CalloutOrder extends CalloutEngine
|
|||
// Line Net Amt
|
||||
BigDecimal LineNetAmt = QtyOrdered.multiply(PriceActual);
|
||||
if (LineNetAmt.scale() > StdPrecision)
|
||||
LineNetAmt = LineNetAmt.setScale(StdPrecision, BigDecimal.ROUND_HALF_UP);
|
||||
LineNetAmt = LineNetAmt.setScale(StdPrecision, RoundingMode.HALF_UP);
|
||||
if (log.isLoggable(Level.INFO)) log.info("LineNetAmt=" + LineNetAmt);
|
||||
mTab.setValue("LineNetAmt", LineNetAmt);
|
||||
//
|
||||
|
@ -1210,7 +1211,7 @@ public class CalloutOrder extends CalloutEngine
|
|||
{
|
||||
int C_UOM_To_ID = ((Integer)value).intValue();
|
||||
QtyEntered = (BigDecimal)mTab.getValue("QtyEntered");
|
||||
BigDecimal QtyEntered1 = QtyEntered.setScale(MUOM.getPrecision(ctx, C_UOM_To_ID), BigDecimal.ROUND_HALF_UP);
|
||||
BigDecimal QtyEntered1 = QtyEntered.setScale(MUOM.getPrecision(ctx, C_UOM_To_ID), RoundingMode.HALF_UP);
|
||||
if (QtyEntered.compareTo(QtyEntered1) != 0)
|
||||
{
|
||||
if (log.isLoggable(Level.FINE)) log.fine("Corrected QtyEntered Scale UOM=" + C_UOM_To_ID
|
||||
|
@ -1241,7 +1242,7 @@ public class CalloutOrder extends CalloutEngine
|
|||
{
|
||||
int C_UOM_To_ID = Env.getContextAsInt(ctx, WindowNo, mTab.getTabNo(), "C_UOM_ID");
|
||||
QtyEntered = (BigDecimal)value;
|
||||
BigDecimal QtyEntered1 = QtyEntered.setScale(MUOM.getPrecision(ctx, C_UOM_To_ID), BigDecimal.ROUND_HALF_UP);
|
||||
BigDecimal QtyEntered1 = QtyEntered.setScale(MUOM.getPrecision(ctx, C_UOM_To_ID), RoundingMode.HALF_UP);
|
||||
if (QtyEntered.compareTo(QtyEntered1) != 0)
|
||||
{
|
||||
if (log.isLoggable(Level.FINE)) log.fine("Corrected QtyEntered Scale UOM=" + C_UOM_To_ID
|
||||
|
@ -1267,7 +1268,7 @@ public class CalloutOrder extends CalloutEngine
|
|||
int C_UOM_To_ID = Env.getContextAsInt(ctx, WindowNo, mTab.getTabNo(), "C_UOM_ID");
|
||||
QtyOrdered = (BigDecimal)value;
|
||||
int precision = MProduct.get(ctx, M_Product_ID).getUOMPrecision();
|
||||
BigDecimal QtyOrdered1 = QtyOrdered.setScale(precision, BigDecimal.ROUND_HALF_UP);
|
||||
BigDecimal QtyOrdered1 = QtyOrdered.setScale(precision, RoundingMode.HALF_UP);
|
||||
if (QtyOrdered.compareTo(QtyOrdered1) != 0)
|
||||
{
|
||||
if (log.isLoggable(Level.FINE)) log.fine("Corrected QtyOrdered Scale "
|
||||
|
@ -1315,7 +1316,7 @@ public class CalloutOrder extends CalloutEngine
|
|||
{
|
||||
Integer C_OrderLine_ID = (Integer)mTab.getValue("C_OrderLine_ID");
|
||||
if (C_OrderLine_ID == null)
|
||||
C_OrderLine_ID = new Integer(0);
|
||||
C_OrderLine_ID = Integer.valueOf(0);
|
||||
BigDecimal notReserved = MOrderLine.getNotReserved(ctx,
|
||||
M_Warehouse_ID, M_Product_ID, M_AttributeSetInstance_ID,
|
||||
C_OrderLine_ID.intValue());
|
||||
|
|
|
@ -127,7 +127,7 @@ public class CalloutPaySelection extends CalloutEngine
|
|||
{
|
||||
OpenAmt = rs.getBigDecimal(1);
|
||||
DiscountAmt = rs.getBigDecimal(2);
|
||||
IsSOTrx = new Boolean ("Y".equals(rs.getString(3)));
|
||||
IsSOTrx = Boolean.valueOf ("Y".equals(rs.getString(3)));
|
||||
}
|
||||
}
|
||||
catch (SQLException e)
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
package org.compiere.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
|
@ -94,9 +95,9 @@ public class CalloutPayment extends CalloutEngine
|
|||
rs = pstmt.executeQuery ();
|
||||
if (rs.next ())
|
||||
{
|
||||
mTab.setValue ("C_BPartner_ID", new Integer (rs.getInt (1)));
|
||||
mTab.setValue ("C_BPartner_ID", Integer.valueOf(rs.getInt (1)));
|
||||
int C_Currency_ID = rs.getInt (2); // Set Invoice Currency
|
||||
mTab.setValue ("C_Currency_ID", new Integer (C_Currency_ID));
|
||||
mTab.setValue ("C_Currency_ID", Integer.valueOf(C_Currency_ID));
|
||||
//
|
||||
BigDecimal InvoiceOpen = rs.getBigDecimal (3); // Set Invoice
|
||||
// OPen Amount
|
||||
|
@ -170,9 +171,9 @@ public class CalloutPayment extends CalloutEngine
|
|||
rs = pstmt.executeQuery ();
|
||||
if (rs.next ())
|
||||
{
|
||||
mTab.setValue ("C_BPartner_ID", new Integer (rs.getInt (1)));
|
||||
mTab.setValue ("C_BPartner_ID", Integer.valueOf(rs.getInt (1)));
|
||||
int C_Currency_ID = rs.getInt (2); // Set Order Currency
|
||||
mTab.setValue ("C_Currency_ID", new Integer (C_Currency_ID));
|
||||
mTab.setValue ("C_Currency_ID", Integer.valueOf(C_Currency_ID));
|
||||
//
|
||||
BigDecimal GrandTotal = rs.getBigDecimal (3); // Set Pay
|
||||
// Amount
|
||||
|
@ -411,7 +412,7 @@ public class CalloutPayment extends CalloutEngine
|
|||
}
|
||||
//
|
||||
InvoiceOpenAmt = InvoiceOpenAmt.multiply (CurrencyRate).setScale (
|
||||
currency.getStdPrecision (), BigDecimal.ROUND_HALF_UP);
|
||||
currency.getStdPrecision (), RoundingMode.HALF_UP);
|
||||
if (log.isLoggable(Level.FINE)) log.fine ("Rate=" + CurrencyRate + ", InvoiceOpenAmt="
|
||||
+ InvoiceOpenAmt);
|
||||
}
|
||||
|
@ -420,16 +421,16 @@ public class CalloutPayment extends CalloutEngine
|
|||
|| colName.equals ("C_ConversionType_ID"))
|
||||
{
|
||||
PayAmt = PayAmt.multiply (CurrencyRate).setScale (
|
||||
currency.getStdPrecision (), BigDecimal.ROUND_HALF_UP);
|
||||
currency.getStdPrecision (), RoundingMode.HALF_UP);
|
||||
mTab.setValue ("PayAmt", PayAmt);
|
||||
DiscountAmt = DiscountAmt.multiply (CurrencyRate).setScale (
|
||||
currency.getStdPrecision (), BigDecimal.ROUND_HALF_UP);
|
||||
currency.getStdPrecision (), RoundingMode.HALF_UP);
|
||||
mTab.setValue ("DiscountAmt", DiscountAmt);
|
||||
WriteOffAmt = WriteOffAmt.multiply (CurrencyRate).setScale (
|
||||
currency.getStdPrecision (), BigDecimal.ROUND_HALF_UP);
|
||||
currency.getStdPrecision (), RoundingMode.HALF_UP);
|
||||
mTab.setValue ("WriteOffAmt", WriteOffAmt);
|
||||
OverUnderAmt = OverUnderAmt.multiply (CurrencyRate).setScale (
|
||||
currency.getStdPrecision (), BigDecimal.ROUND_HALF_UP);
|
||||
currency.getStdPrecision (), RoundingMode.HALF_UP);
|
||||
mTab.setValue ("OverUnderAmt", OverUnderAmt);
|
||||
}
|
||||
// No Invoice - Set Discount, Witeoff, Under/Over to 0
|
||||
|
|
|
@ -95,9 +95,9 @@ public class CalloutPaymentAllocate extends CalloutEngine
|
|||
rs = pstmt.executeQuery();
|
||||
if (rs.next())
|
||||
{
|
||||
// mTab.setValue("C_BPartner_ID", new Integer(rs.getInt(1)));
|
||||
// mTab.setValue("C_BPartner_ID", Integer.valueOf(rs.getInt(1)));
|
||||
// int C_Currency_ID = rs.getInt(2); // Set Invoice Currency
|
||||
// mTab.setValue("C_Currency_ID", new Integer(C_Currency_ID));
|
||||
// mTab.setValue("C_Currency_ID", Integer.valueOf(C_Currency_ID));
|
||||
//
|
||||
BigDecimal InvoiceOpen = rs.getBigDecimal(3); // Set Invoice OPen Amount
|
||||
if (InvoiceOpen == null)
|
||||
|
|
|
@ -43,7 +43,7 @@ public class CalloutProductCategory extends CalloutEngine
|
|||
|
||||
Integer productCategoryId = (Integer) mTab.getValue(MProductCategory.COLUMNNAME_M_Product_Category_ID);
|
||||
if (productCategoryId == null)
|
||||
productCategoryId = new Integer(0);
|
||||
productCategoryId = Integer.valueOf(0);
|
||||
|
||||
if (productCategoryId.intValue() > 0) {
|
||||
MProductCategory pc = new MProductCategory(ctx, productCategoryId.intValue(), null);
|
||||
|
|
|
@ -51,7 +51,7 @@ public class CalloutProduction extends CalloutEngine
|
|||
if (Env.getContextAsInt(ctx, WindowNo, Env.TAB_INFO, "M_Product_ID") == M_Product_ID.intValue()
|
||||
&& Env.getContextAsInt(ctx, WindowNo, Env.TAB_INFO, "M_AttributeSetInstance_ID") != 0)
|
||||
{
|
||||
mTab.setValue("M_AttributeSetInstance_ID", new Integer(Env.getContextAsInt(ctx, WindowNo, Env.TAB_INFO, "M_AttributeSetInstance_ID")));
|
||||
mTab.setValue("M_AttributeSetInstance_ID", Integer.valueOf(Env.getContextAsInt(ctx, WindowNo, Env.TAB_INFO, "M_AttributeSetInstance_ID")));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
package org.compiere.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.Properties;
|
||||
import java.util.logging.Level;
|
||||
|
||||
|
@ -61,7 +62,7 @@ public class CalloutProject extends CalloutEngine
|
|||
//
|
||||
BigDecimal PlannedAmt = PlannedQty.multiply(PlannedPrice);
|
||||
if (PlannedAmt.scale() > StdPrecision)
|
||||
PlannedAmt = PlannedAmt.setScale(StdPrecision, BigDecimal.ROUND_HALF_UP);
|
||||
PlannedAmt = PlannedAmt.setScale(StdPrecision, RoundingMode.HALF_UP);
|
||||
//
|
||||
if (log.isLoggable(Level.FINE)) log.fine("PlannedQty=" + PlannedQty + " * PlannedPrice=" + PlannedPrice + " -> PlannedAmt=" + PlannedAmt + " (Precision=" + StdPrecision+ ")");
|
||||
mTab.setValue("PlannedAmt", PlannedAmt);
|
||||
|
|
|
@ -138,7 +138,7 @@ public class CalloutRequest extends CalloutEngine
|
|||
MRequestType rt = MRequestType.get(ctx, R_RequestType_ID);
|
||||
int R_Status_ID = rt.getDefaultR_Status_ID();
|
||||
if (R_Status_ID != 0)
|
||||
mTab.setValue("R_Status_ID", new Integer(R_Status_ID));
|
||||
mTab.setValue("R_Status_ID", Integer.valueOf(R_Status_ID));
|
||||
|
||||
return "";
|
||||
} // type
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
package org.compiere.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.Properties;
|
||||
import java.util.logging.Level;
|
||||
|
@ -89,7 +90,7 @@ public class CalloutRequisition extends CalloutEngine
|
|||
// Multiply
|
||||
BigDecimal LineNetAmt = Qty.multiply(PriceActual);
|
||||
if (LineNetAmt.scale() > StdPrecision)
|
||||
LineNetAmt = LineNetAmt.setScale(StdPrecision, BigDecimal.ROUND_HALF_UP);
|
||||
LineNetAmt = LineNetAmt.setScale(StdPrecision, RoundingMode.HALF_UP);
|
||||
line.setLineNetAmt(LineNetAmt);
|
||||
if (log.isLoggable(Level.INFO)) log.info("amt - LineNetAmt=" + LineNetAmt);
|
||||
//
|
||||
|
|
|
@ -98,7 +98,7 @@ public class CalloutTimeExpense extends CalloutEngine
|
|||
if (priceActual == null)
|
||||
priceActual = rs.getBigDecimal("PriceLimit");
|
||||
// Currency
|
||||
Integer ii = new Integer(rs.getInt("C_Currency_ID"));
|
||||
Integer ii = Integer.valueOf(rs.getInt("C_Currency_ID"));
|
||||
if (!rs.wasNull())
|
||||
mTab.setValue("C_Currency_ID", ii);
|
||||
}
|
||||
|
@ -143,7 +143,7 @@ public class CalloutTimeExpense extends CalloutEngine
|
|||
if (priceActual == null)
|
||||
priceActual = rs.getBigDecimal("PriceLimit");
|
||||
// Currency
|
||||
Integer ii = new Integer(rs.getInt("C_Currency_ID"));
|
||||
Integer ii = Integer.valueOf(rs.getInt("C_Currency_ID"));
|
||||
if (!rs.wasNull())
|
||||
mTab.setValue("C_Currency_ID", ii);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
|
||||
<attributes>
|
||||
<attribute name="module" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="src" path="src/"/>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
||||
org.eclipse.jdt.core.compiler.release=enabled
|
||||
|
|
|
@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
|
|||
Bundle-Name: iDempiere Processes
|
||||
Bundle-SymbolicName: org.adempiere.base.process
|
||||
Bundle-Version: 5.1.0.qualifier
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
||||
Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version>=1.10))"
|
||||
Require-Bundle: org.adempiere.base;bundle-version="0.0.0"
|
||||
Export-Package: org.adempiere.process,
|
||||
org.compiere.process,
|
||||
|
@ -16,3 +16,4 @@ Import-Package: javax.mail;version="1.5",
|
|||
Eclipse-RegisterBuddy: org.adempiere.base
|
||||
Bundle-ClassPath: .
|
||||
Automatic-Module-Name: org.adempiere.base.process
|
||||
Bundle-Vendor: iDempiere Community
|
||||
|
|
|
@ -173,7 +173,7 @@ public class Export extends SvrProcess
|
|||
if (rs.next())
|
||||
{
|
||||
HashMap<String, Integer> variableMap = new HashMap<String, Integer>();
|
||||
variableMap.put(TOTAL_SEGMENTS, new Integer(1));
|
||||
variableMap.put(TOTAL_SEGMENTS, Integer.valueOf(1));
|
||||
|
||||
Element rootElement = outDocument.createElement(exportFormat.getValue());
|
||||
rootElement.appendChild(outDocument.createComment(exportFormat.getDescription()));
|
||||
|
@ -395,11 +395,11 @@ public class Export extends SvrProcess
|
|||
if (variableName != null && !"".equals(variableName) ) {
|
||||
Integer var = variableMap.get(variableName);
|
||||
if (var == null) {
|
||||
var = new Integer(0);
|
||||
var = Integer.valueOf(0);
|
||||
}
|
||||
int intValue = var.intValue();
|
||||
intValue++;
|
||||
variableMap.put(variableName, new Integer(intValue));
|
||||
variableMap.put(variableName, Integer.valueOf(intValue));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -122,7 +122,7 @@ public class AcctSchemaCopyAcct extends SvrProcess
|
|||
String columnName = pp.getName();
|
||||
MAccount sourceAccount = MAccount.get(getCtx(), sourceC_ValidCombination_ID);
|
||||
MAccount targetAccount = createAccount(targetAS, sourceAccount);
|
||||
target.setValue(columnName, new Integer(targetAccount.getC_ValidCombination_ID()));
|
||||
target.setValue(columnName, Integer.valueOf(targetAccount.getC_ValidCombination_ID()));
|
||||
}
|
||||
if (!target.save())
|
||||
throw new AdempiereSystemError("Could not Save GL");
|
||||
|
@ -147,7 +147,7 @@ public class AcctSchemaCopyAcct extends SvrProcess
|
|||
String columnName = pp.getName();
|
||||
MAccount sourceAccount = MAccount.get(getCtx(), sourceC_ValidCombination_ID);
|
||||
MAccount targetAccount = createAccount(targetAS, sourceAccount);
|
||||
target.setValue(columnName, new Integer(targetAccount.getC_ValidCombination_ID()));
|
||||
target.setValue(columnName, Integer.valueOf(targetAccount.getC_ValidCombination_ID()));
|
||||
}
|
||||
if (!target.save())
|
||||
throw new AdempiereSystemError("Could not Save Default");
|
||||
|
|
|
@ -91,9 +91,9 @@ public class ChangeLogProcess extends SvrProcess
|
|||
if (para[i].getParameter() == null)
|
||||
;
|
||||
else if (name.equals("CheckNewValue"))
|
||||
p_CheckNewValue = new Boolean("Y".equals(para[i].getParameter()));
|
||||
p_CheckNewValue = Boolean.valueOf("Y".equals(para[i].getParameter()));
|
||||
else if (name.equals("CheckOldValue"))
|
||||
p_CheckOldValue = new Boolean("Y".equals(para[i].getParameter()));
|
||||
p_CheckOldValue = Boolean.valueOf("Y".equals(para[i].getParameter()));
|
||||
else if (name.equals("SetCustomization"))
|
||||
p_SetCustomization = "Y".equals(para[i].getParameter());
|
||||
else
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
package org.compiere.process;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.compiere.model.MBPartner;
|
||||
|
@ -191,7 +192,7 @@ public class DistributionCreate extends SvrProcess
|
|||
BigDecimal ratio = dll.getRatio();
|
||||
BigDecimal qty = p_Qty.multiply(ratio);
|
||||
if (qty.compareTo(Env.ZERO) != 0)
|
||||
qty = qty.divide(m_dl.getRatioTotal(), m_product.getUOMPrecision(), BigDecimal.ROUND_HALF_UP);
|
||||
qty = qty.divide(m_dl.getRatioTotal(), m_product.getUOMPrecision(), RoundingMode.HALF_UP);
|
||||
BigDecimal minQty = dll.getMinQty();
|
||||
if (qty.compareTo(minQty) < 0)
|
||||
qty = minQty;
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
package org.compiere.process;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.Timestamp;
|
||||
|
@ -413,7 +414,7 @@ public class DistributionRun extends SvrProcess
|
|||
if (detail.isCanAdjust())
|
||||
{
|
||||
BigDecimal diffRatio = detail.getRatio().multiply(difference)
|
||||
.divide(ratioTotal, BigDecimal.ROUND_HALF_UP); // precision from total
|
||||
.divide(ratioTotal, RoundingMode.HALF_UP); // precision from total
|
||||
if (log.isLoggable(Level.FINE)) log.fine("Detail=" + detail.toString()
|
||||
+ ", Allocation=" + detail.getActualAllocation()
|
||||
+ ", DiffRatio=" + diffRatio);
|
||||
|
@ -646,7 +647,7 @@ public class DistributionRun extends SvrProcess
|
|||
log.info("Qty Total Available:" + drl.getTotalQty());
|
||||
log.info("Qty Total Demand:" + totalration);
|
||||
}
|
||||
BigDecimal factor = ration.divide(totalration, 12 , BigDecimal.ROUND_HALF_UP);
|
||||
BigDecimal factor = ration.divide(totalration, 12 , RoundingMode.HALF_UP);
|
||||
record.setQty(drl.getTotalQty().multiply(factor));
|
||||
record.saveEx();
|
||||
}
|
||||
|
@ -750,7 +751,7 @@ public class DistributionRun extends SvrProcess
|
|||
, p_M_DistributionRun_ID, record.getM_Product_ID());
|
||||
MDistributionRunLine drl = (MDistributionRunLine) MTable.get(getCtx(), MDistributionRunLine.Table_ID).getPO(record.getM_DistributionRunLine_ID(), get_TrxName());
|
||||
BigDecimal ration = record.getRatio();
|
||||
BigDecimal factor = ration.divide(total_ration,BigDecimal.ROUND_HALF_UP);
|
||||
BigDecimal factor = ration.divide(total_ration,RoundingMode.HALF_UP);
|
||||
record.setQty(factor.multiply(drl.getTotalQty()));
|
||||
record.saveEx();
|
||||
}
|
||||
|
|
|
@ -159,7 +159,7 @@ public class DunningPrint extends SvrProcess
|
|||
// query
|
||||
MQuery query = new MQuery("C_Dunning_Header_v");
|
||||
query.addRestriction("C_DunningRunEntry_ID", MQuery.EQUAL,
|
||||
new Integer(entry.getC_DunningRunEntry_ID()));
|
||||
Integer.valueOf(entry.getC_DunningRunEntry_ID()));
|
||||
|
||||
// Engine
|
||||
PrintInfo info = new PrintInfo(
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
package org.compiere.process;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.compiere.model.MCurrency;
|
||||
|
@ -122,7 +123,7 @@ public class InOutCreateInvoice extends SvrProcess
|
|||
BigDecimal igt = invoice.getGrandTotal();
|
||||
BigDecimal percent = Env.ONE;
|
||||
if (ogt.compareTo(igt) != 0)
|
||||
percent = igt.divide(ogt, 10, BigDecimal.ROUND_HALF_UP);
|
||||
percent = igt.divide(ogt, 10, RoundingMode.HALF_UP);
|
||||
MCurrency cur = MCurrency.get(order.getCtx(), order.getC_Currency_ID());
|
||||
int scale = cur.getStdPrecision();
|
||||
|
||||
|
@ -132,7 +133,7 @@ public class InOutCreateInvoice extends SvrProcess
|
|||
if (percent != Env.ONE) {
|
||||
BigDecimal propDueAmt = ops.getDueAmt().multiply(percent);
|
||||
if (propDueAmt.scale() > scale)
|
||||
propDueAmt = propDueAmt.setScale(scale, BigDecimal.ROUND_HALF_UP);
|
||||
propDueAmt = propDueAmt.setScale(scale, RoundingMode.HALF_UP);
|
||||
ips.setDueAmt(propDueAmt);
|
||||
}
|
||||
ips.setC_Invoice_ID(invoice.getC_Invoice_ID());
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
package org.compiere.process;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.Timestamp;
|
||||
|
@ -448,7 +449,7 @@ public class InOutGenerate extends SvrProcess
|
|||
if (orderLine.getQtyEntered().compareTo(orderLine.getQtyOrdered()) != 0)
|
||||
line.setQtyEntered(qty
|
||||
.multiply(orderLine.getQtyEntered())
|
||||
.divide(orderLine.getQtyOrdered(), 12, BigDecimal.ROUND_HALF_UP));
|
||||
.divide(orderLine.getQtyOrdered(), 12, RoundingMode.HALF_UP));
|
||||
line.setLine(m_line + orderLine.getLine());
|
||||
if (!line.save())
|
||||
throw new IllegalStateException("Could not create Shipment Line");
|
||||
|
@ -504,7 +505,7 @@ public class InOutGenerate extends SvrProcess
|
|||
line.setQty(line.getMovementQty().add(deliver));
|
||||
if (orderLine.getQtyEntered().compareTo(orderLine.getQtyOrdered()) != 0)
|
||||
line.setQtyEntered(line.getMovementQty().multiply(orderLine.getQtyEntered())
|
||||
.divide(orderLine.getQtyOrdered(), 12, BigDecimal.ROUND_HALF_UP));
|
||||
.divide(orderLine.getQtyOrdered(), 12, RoundingMode.HALF_UP));
|
||||
line.setLine(m_line + orderLine.getLine());
|
||||
if (!line.save())
|
||||
throw new IllegalStateException("Could not create Shipment Line");
|
||||
|
@ -530,7 +531,7 @@ public class InOutGenerate extends SvrProcess
|
|||
line.setQty(toDeliver);
|
||||
if (orderLine.getQtyEntered().compareTo(orderLine.getQtyOrdered()) != 0)
|
||||
line.setQtyEntered(line.getMovementQty().multiply(orderLine.getQtyEntered())
|
||||
.divide(orderLine.getQtyOrdered(), 12, BigDecimal.ROUND_HALF_UP));
|
||||
.divide(orderLine.getQtyOrdered(), 12, RoundingMode.HALF_UP));
|
||||
line.setLine(m_line + orderLine.getLine());
|
||||
if (!line.save())
|
||||
throw new IllegalStateException("Could not create Shipment Line");
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
package org.compiere.process;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
|
@ -300,7 +301,7 @@ public class InvoiceGenerate extends SvrProcess
|
|||
if (oLine.getQtyEntered().compareTo(oLine.getQtyOrdered()) != 0)
|
||||
qtyEntered = toInvoice
|
||||
.multiply(oLine.getQtyEntered())
|
||||
.divide(oLine.getQtyOrdered(), 12, BigDecimal.ROUND_HALF_UP);
|
||||
.divide(oLine.getQtyOrdered(), 12, RoundingMode.HALF_UP);
|
||||
createLine (order, oLine, toInvoice, qtyEntered);
|
||||
}
|
||||
else if (!completeOrder)
|
||||
|
@ -492,7 +493,7 @@ public class InvoiceGenerate extends SvrProcess
|
|||
BigDecimal igt = m_invoice.getGrandTotal();
|
||||
BigDecimal percent = Env.ONE;
|
||||
if (ogt.compareTo(igt) != 0)
|
||||
percent = igt.divide(ogt, 10, BigDecimal.ROUND_HALF_UP);
|
||||
percent = igt.divide(ogt, 10, RoundingMode.HALF_UP);
|
||||
MCurrency cur = MCurrency.get(order.getCtx(), order.getC_Currency_ID());
|
||||
int scale = cur.getStdPrecision();
|
||||
|
||||
|
@ -502,7 +503,7 @@ public class InvoiceGenerate extends SvrProcess
|
|||
if (percent != Env.ONE) {
|
||||
BigDecimal propDueAmt = ops.getDueAmt().multiply(percent);
|
||||
if (propDueAmt.scale() > scale)
|
||||
propDueAmt = propDueAmt.setScale(scale, BigDecimal.ROUND_HALF_UP);
|
||||
propDueAmt = propDueAmt.setScale(scale, RoundingMode.HALF_UP);
|
||||
ips.setDueAmt(propDueAmt);
|
||||
}
|
||||
ips.setC_Invoice_ID(m_invoice.getC_Invoice_ID());
|
||||
|
|
|
@ -275,7 +275,7 @@ public class InvoicePrint extends SvrProcess
|
|||
format.setTranslationLanguage(language);
|
||||
// query
|
||||
MQuery query = new MQuery("C_Invoice_Header_v");
|
||||
query.addRestriction("C_Invoice_ID", MQuery.EQUAL, new Integer(C_Invoice_ID));
|
||||
query.addRestriction("C_Invoice_ID", MQuery.EQUAL, Integer.valueOf(C_Invoice_ID));
|
||||
|
||||
// Engine
|
||||
PrintInfo info = new PrintInfo(
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
package org.compiere.process;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
|
@ -544,7 +545,7 @@ public class M_PriceList_Create extends SvrProcess {
|
|||
}
|
||||
if (conversion != null)
|
||||
{
|
||||
price = price.divide(conversion.getDivideRate(), precision, BigDecimal.ROUND_HALF_DOWN);
|
||||
price = price.divide(conversion.getDivideRate(), precision, RoundingMode.HALF_DOWN);
|
||||
StringBuilder sqlupdate = new StringBuilder();
|
||||
sqlupdate.append("UPDATE M_ProductPrice SET PriceList=").append(price).append(" WHERE M_PriceList_Version_ID=").append(p_PriceList_Version_ID)
|
||||
.append(" AND M_Product_ID= ").append(product_id);
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
package org.compiere.process;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.compiere.model.MProduct;
|
||||
|
@ -95,8 +96,8 @@ public class ProductUOMConvert extends SvrProcess
|
|||
throw new AdempiereUserError("@NotFound@: @C_UOM_Conversion_ID@");
|
||||
|
||||
MUOM uomTo = MUOM.get(getCtx(), productTo.getC_UOM_ID());
|
||||
BigDecimal qtyTo = p_Qty.divide(conversion.getDivideRate(), uomTo.getStdPrecision(), BigDecimal.ROUND_HALF_UP);
|
||||
BigDecimal qtyTo6 = p_Qty.divide(conversion.getDivideRate(), 6, BigDecimal.ROUND_HALF_UP);
|
||||
BigDecimal qtyTo = p_Qty.divide(conversion.getDivideRate(), uomTo.getStdPrecision(), RoundingMode.HALF_UP);
|
||||
BigDecimal qtyTo6 = p_Qty.divide(conversion.getDivideRate(), 6, RoundingMode.HALF_UP);
|
||||
if (qtyTo.compareTo(qtyTo6) != 0)
|
||||
throw new AdempiereUserError("@StdPrecision@: " + qtyTo + " <> " + qtyTo6
|
||||
+ " (" + p_Qty + "/" + conversion.getDivideRate() + ")");
|
||||
|
|
|
@ -358,7 +358,7 @@ public class ReplenishReport extends SvrProcess
|
|||
if(custom==null){
|
||||
// if no OSGi plugin is found try the legacy way (in my own classpath)
|
||||
Class<?> clazz = Class.forName(className);
|
||||
custom = (ReplenishInterface) clazz.newInstance();
|
||||
custom = (ReplenishInterface) clazz.getDeclaredConstructor().newInstance();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
|
|
|
@ -392,7 +392,7 @@ public class ReplenishReportProduction extends SvrProcess
|
|||
if(custom==null){
|
||||
// if no OSGi plugin is found try the legacy way (in my own classpath)
|
||||
Class<?> clazz = Class.forName(className);
|
||||
custom = (ReplenishInterface) clazz.newInstance();
|
||||
custom = (ReplenishInterface) clazz.getDeclaredConstructor().newInstance();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
|
|
|
@ -170,7 +170,7 @@ public class ReplicationLocal extends SvrProcess
|
|||
+ "WHERE rt.IsActive='Y' AND t.IsActive='Y'"
|
||||
+ " AND AD_ReplicationStrategy_ID=? " // #1
|
||||
+ "ORDER BY t.LoadSeq";
|
||||
RowSet rowset = getRowSet(sql, new Object[]{new Integer(m_replication.getAD_ReplicationStrategy_ID())});
|
||||
RowSet rowset = getRowSet(sql, new Object[]{Integer.valueOf(m_replication.getAD_ReplicationStrategy_ID())});
|
||||
if (rowset == null)
|
||||
throw new Exception("setupRemote - No RowSet Data");
|
||||
|
||||
|
@ -222,7 +222,7 @@ public class ReplicationLocal extends SvrProcess
|
|||
+ " AND AD_ReplicationStrategy_ID=?" // #1
|
||||
+ " AND rt.ReplicationType='M' " // Merge
|
||||
+ "ORDER BY t.LoadSeq";
|
||||
RowSet rowset = getRowSet(sql, new Object[]{new Integer(m_replication.getAD_ReplicationStrategy_ID())});
|
||||
RowSet rowset = getRowSet(sql, new Object[]{Integer.valueOf(m_replication.getAD_ReplicationStrategy_ID())});
|
||||
try
|
||||
{
|
||||
while (rowset.next())
|
||||
|
@ -400,7 +400,7 @@ public class ReplicationLocal extends SvrProcess
|
|||
+ " AND AD_ReplicationStrategy_ID=?" // #1
|
||||
+ " AND rt.ReplicationType='R' " // Reference
|
||||
+ "ORDER BY t.LoadSeq";
|
||||
RowSet rowset = getRowSet(sql, new Object[]{new Integer(m_replication.getAD_ReplicationStrategy_ID())});
|
||||
RowSet rowset = getRowSet(sql, new Object[]{Integer.valueOf(m_replication.getAD_ReplicationStrategy_ID())});
|
||||
try
|
||||
{
|
||||
while (rowset.next())
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
package org.compiere.process;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.compiere.model.MBPartner;
|
||||
|
@ -129,7 +130,7 @@ public class RfQCreateSO extends SvrProcess
|
|||
{
|
||||
margin = margin.add(Env.ONEHUNDRED);
|
||||
price = price.multiply(margin)
|
||||
.divide(Env.ONEHUNDRED, 2, BigDecimal.ROUND_HALF_UP);
|
||||
.divide(Env.ONEHUNDRED, 2, RoundingMode.HALF_UP);
|
||||
}
|
||||
}
|
||||
} // price
|
||||
|
|
|
@ -252,7 +252,7 @@ public class SendMailText extends SvrProcess
|
|||
private Boolean sendIndividualMail (String Name, int AD_User_ID, StringBuilder unsubscribe)
|
||||
{
|
||||
// Prevent two email
|
||||
Integer ii = new Integer (AD_User_ID);
|
||||
Integer ii = Integer.valueOf(AD_User_ID);
|
||||
if (m_list.contains(ii))
|
||||
return null;
|
||||
m_list.add(ii);
|
||||
|
@ -290,7 +290,7 @@ public class SendMailText extends SvrProcess
|
|||
}
|
||||
StringBuilder msglog = new StringBuilder((OK ? "@OK@" : "@ERROR@")).append(" - ").append(to.getEMail());
|
||||
addLog(0, null, null, msglog.toString());
|
||||
return new Boolean(OK);
|
||||
return Boolean.valueOf(OK);
|
||||
} // sendIndividualMail
|
||||
|
||||
} // SendMailText
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
|
||||
<attributes>
|
||||
<attribute name="module" value="true"/>
|
||||
<attribute name="add-exports" value="java.sql.rowset/com.sun.rowset=ALL-UNNAMED"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="src" path="src/"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/bsh.jar"/>
|
||||
|
|
|
@ -10,15 +10,12 @@ org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
|
|||
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.APILeak=warning
|
||||
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
|
||||
org.eclipse.jdt.core.compiler.problem.deadCode=warning
|
||||
|
@ -27,7 +24,6 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
|
|||
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
|
||||
|
@ -108,4 +104,4 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
|
|||
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
|
||||
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
||||
org.eclipse.jdt.core.compiler.release=enabled
|
||||
|
|
|
@ -56,14 +56,14 @@ Export-Package: bsh,
|
|||
org.idempiere.broadcast,
|
||||
org.idempiere.distributed,
|
||||
org.idempiere.model
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
||||
Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version>=1.10))"
|
||||
Import-Package: com.sun.mail.smtp;version="1.5",
|
||||
javax.activation,
|
||||
javax.jms;version="1.1.0",
|
||||
javax.mail;version="1.5",
|
||||
javax.mail.internet;version="1.5",
|
||||
javax.servlet;version="3.0.0",
|
||||
javax.servlet.http;version="3.0.0",
|
||||
javax.xml.bind;version="2.3.0",
|
||||
junit.framework;version="3.8.2";resolution:=optional,
|
||||
junit.textui;version="3.8.2";resolution:=optional,
|
||||
net.sf.cglib.proxy,
|
||||
|
@ -77,8 +77,6 @@ Import-Package: com.sun.mail.smtp;version="1.5",
|
|||
org.apache.ecs,
|
||||
org.apache.ecs.xhtml,
|
||||
org.apache.felix.scr;version="1.6.0",
|
||||
org.apache.poi.hssf.usermodel,
|
||||
org.apache.poi.ss.usermodel,
|
||||
org.apache.tools.ant,
|
||||
org.apache.tools.ant.taskdefs,
|
||||
org.eclipse.core.runtime;version="3.4.0",
|
||||
|
@ -121,6 +119,11 @@ Require-Bundle: org.eclipse.equinox.app;bundle-version="0.0.0",
|
|||
com.itextpdf;bundle-version="0.0.0",
|
||||
net.sf.supercsv.super-csv;bundle-version="0.0.0",
|
||||
bcprov;bundle-version="1.54.0",
|
||||
groovy-all;bundle-version="0.0.0",
|
||||
org.krysalis.barcode4j;bundle-version="0.0.0"
|
||||
org.krysalis.barcode4j;bundle-version="0.0.0",
|
||||
groovy,
|
||||
javax.xml;bundle-version="1.3.4",
|
||||
org.apache.poi.poi;bundle-version="3.15.0",
|
||||
org.apache.poi.poi-ooxml;bundle-version="3.15.0",
|
||||
javax.activation;bundle-version="1.1.0"
|
||||
Automatic-Module-Name: org.adempiere.base
|
||||
Bundle-Vendor: iDempiere Community
|
||||
|
|
|
@ -17,7 +17,11 @@
|
|||
<artifactId>tycho-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=367431 -->
|
||||
<compilerArgument>-warn:+forbidden</compilerArgument>
|
||||
<compilerArgs>
|
||||
<arg>-warn:+forbidden</arg>
|
||||
<arg>--add-exports</arg>
|
||||
<arg>java.sql.rowset/com.sun.rowset=ALL-UNNAMED</arg>
|
||||
</compilerArgs>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
|
@ -45,7 +49,7 @@
|
|||
<artifactItem>
|
||||
<groupId>org.python</groupId>
|
||||
<artifactId>jython</artifactId>
|
||||
<version>2.2.1</version>
|
||||
<version>2.7.0</version>
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
<groupId>it.sauronsoftware.cron4j</groupId>
|
||||
|
|
|
@ -252,7 +252,7 @@ public class AddressLookup implements AddressLookupInterface {
|
|||
NodeList firstValueList = firstElement.getElementsByTagName("Value");
|
||||
Element ValueElement = (Element) firstValueList.item(0);
|
||||
if (log.isLoggable(Level.FINE)){log.log(Level.FINE, "Value: " + ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim() + " Node: " + i);}
|
||||
resultCode = (int) new Integer(ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim());
|
||||
resultCode = (int) Integer.valueOf(ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ public class DefaultAddressValidationFactory implements IAddressValidationFactor
|
|||
{
|
||||
Class<?> ppClass = Class.forName(className);
|
||||
if (ppClass != null)
|
||||
myProcessor = (IAddressValidation) ppClass.newInstance();
|
||||
myProcessor = (IAddressValidation) ppClass.getDeclaredConstructor().newInstance();
|
||||
}
|
||||
catch (Error e1)
|
||||
{ // NoClassDefFound
|
||||
|
|
|
@ -80,7 +80,7 @@ public class DefaultCalloutFactory implements ICalloutFactory {
|
|||
//Get callout
|
||||
try
|
||||
{
|
||||
callout = (Callout)calloutClass.newInstance();
|
||||
callout = (Callout)calloutClass.getDeclaredConstructor().newInstance();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
@ -269,7 +269,7 @@ public class DefaultModelFactory implements IModelFactory {
|
|||
s_log.warning("No transaction Constructor for " + clazz + " (" + msg + ")");
|
||||
}
|
||||
|
||||
PO po = constructor!=null ? (PO)constructor.newInstance(new Object[] {Env.getCtx(), new Integer(Record_ID), trxName}) : null;
|
||||
PO po = constructor!=null ? (PO)constructor.newInstance(new Object[] {Env.getCtx(), Integer.valueOf(Record_ID), trxName}) : null;
|
||||
return po;
|
||||
}
|
||||
catch (Exception e)
|
||||
|
|
|
@ -56,7 +56,7 @@ public class DefaultModelValidatorFactory implements IModelValidatorFactory {
|
|||
}
|
||||
if (clazz != null) {
|
||||
try {
|
||||
validator = (ModelValidator)clazz.newInstance();
|
||||
validator = (ModelValidator)clazz.getDeclaredConstructor().newInstance();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ public class DefaultPaymentExporterFactory implements IPaymentExporterFactory {
|
|||
try {
|
||||
Class<?> peClass = Class.forName(className);
|
||||
if (peClass != null)
|
||||
myExporter = (PaymentExport)peClass.newInstance();
|
||||
myExporter = (PaymentExport)peClass.getDeclaredConstructor().newInstance();
|
||||
} catch (Error e1) { // NoClassDefFound
|
||||
s_log.log(Level.SEVERE, className + " - Error=" + e1.getMessage());
|
||||
return null;
|
||||
|
|
|
@ -45,7 +45,7 @@ public class DefaultPaymentProcessorFactory implements IPaymentProcessorFactory
|
|||
try {
|
||||
Class<?> ppClass = Class.forName(className);
|
||||
if (ppClass != null)
|
||||
myProcessor = (PaymentProcessor)ppClass.newInstance();
|
||||
myProcessor = (PaymentProcessor)ppClass.getDeclaredConstructor().newInstance();
|
||||
} catch (Error e1) { // NoClassDefFound
|
||||
s_log.log(Level.SEVERE, className + " - Error=" + e1.getMessage());
|
||||
return null;
|
||||
|
|
|
@ -77,7 +77,7 @@ public class DefaultProcessFactory implements IProcessFactory {
|
|||
//Get Process
|
||||
try
|
||||
{
|
||||
process = (ProcessCall)processClass.newInstance();
|
||||
process = (ProcessCall)processClass.getDeclaredConstructor().newInstance();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
@ -43,7 +43,7 @@ public class DefaultShipmentProcessorFactory implements IShipmentProcessorFactor
|
|||
{
|
||||
Class<?> ppClass = Class.forName(className);
|
||||
if (ppClass != null)
|
||||
myProcessor = (IShipmentProcessor) ppClass.newInstance();
|
||||
myProcessor = (IShipmentProcessor) ppClass.getDeclaredConstructor().newInstance();
|
||||
}
|
||||
catch (Error e1)
|
||||
{ // NoClassDefFound
|
||||
|
|
|
@ -38,7 +38,7 @@ public class DefaultTaxProviderFactory implements ITaxProviderFactory {
|
|||
{
|
||||
Class<?> ppClass = Class.forName(className);
|
||||
if (ppClass != null)
|
||||
myCalculator = (ITaxProvider) ppClass.newInstance();
|
||||
myCalculator = (ITaxProvider) ppClass.getDeclaredConstructor().newInstance();
|
||||
}
|
||||
catch (Error e1)
|
||||
{ // NoClassDefFound
|
||||
|
|
|
@ -368,7 +368,7 @@ public class RequestEventHandler extends AbstractEventHandler implements Managed
|
|||
}
|
||||
|
||||
// Check duplicate receivers
|
||||
Integer ii = new Integer (AD_User_ID);
|
||||
Integer ii = Integer.valueOf(AD_User_ID);
|
||||
if (userList.contains(ii))
|
||||
continue;
|
||||
userList.add(ii);
|
||||
|
|
|
@ -35,6 +35,7 @@ import org.apache.poi.hssf.usermodel.HSSFRichTextString;
|
|||
import org.apache.poi.hssf.usermodel.HSSFRow;
|
||||
import org.apache.poi.hssf.usermodel.HSSFSheet;
|
||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||
import org.apache.poi.ss.usermodel.BorderStyle;
|
||||
import org.compiere.model.MSysConfig;
|
||||
import org.compiere.util.CLogger;
|
||||
import org.compiere.util.DisplayType;
|
||||
|
@ -166,13 +167,13 @@ public abstract class AbstractExcelExporter
|
|||
if (isHeader) {
|
||||
if (m_fontHeader == null) {
|
||||
m_fontHeader = m_workbook.createFont();
|
||||
m_fontHeader.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
|
||||
m_fontHeader.setBold(true);
|
||||
}
|
||||
font = m_fontHeader;
|
||||
}
|
||||
else if (isFunctionRow()) {
|
||||
font = m_workbook.createFont();
|
||||
font.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
|
||||
font.setBold(true);
|
||||
font.setItalic(true);
|
||||
}
|
||||
else {
|
||||
|
@ -232,10 +233,10 @@ public abstract class AbstractExcelExporter
|
|||
HSSFFont font = getFont(false);
|
||||
cs.setFont(font);
|
||||
// Border
|
||||
cs.setBorderLeft((short)1);
|
||||
cs.setBorderTop((short)1);
|
||||
cs.setBorderRight((short)1);
|
||||
cs.setBorderBottom((short)1);
|
||||
cs.setBorderLeft(BorderStyle.THIN);
|
||||
cs.setBorderTop(BorderStyle.THIN);
|
||||
cs.setBorderRight(BorderStyle.THIN);
|
||||
cs.setBorderBottom(BorderStyle.THIN);
|
||||
//
|
||||
String cellFormat = getCellFormat(row, col);
|
||||
if (cellFormat != null)
|
||||
|
@ -268,10 +269,10 @@ public abstract class AbstractExcelExporter
|
|||
HSSFFont font_header = getFont(true);
|
||||
cs_header = m_workbook.createCellStyle();
|
||||
cs_header.setFont(font_header);
|
||||
cs_header.setBorderLeft((short)2);
|
||||
cs_header.setBorderTop((short)2);
|
||||
cs_header.setBorderRight((short)2);
|
||||
cs_header.setBorderBottom((short)2);
|
||||
cs_header.setBorderLeft(BorderStyle.MEDIUM);
|
||||
cs_header.setBorderTop(BorderStyle.MEDIUM);
|
||||
cs_header.setBorderRight(BorderStyle.MEDIUM);
|
||||
cs_header.setBorderBottom(BorderStyle.MEDIUM);
|
||||
cs_header.setDataFormat(HSSFDataFormat.getBuiltinFormat("text"));
|
||||
cs_header.setWrapText(true);
|
||||
m_styles.put(key, cs_header);
|
||||
|
|
|
@ -114,7 +114,7 @@ public class GenericPO extends PO {
|
|||
if (AD_OrgTrx_ID == 0)
|
||||
set_Value("AD_OrgTrx_ID", null);
|
||||
else
|
||||
set_Value("AD_OrgTrx_ID", new Integer(AD_OrgTrx_ID));
|
||||
set_Value("AD_OrgTrx_ID", Integer.valueOf(AD_OrgTrx_ID));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -50,7 +50,7 @@ public class MBroadcastMessage extends X_AD_BroadcastMessage
|
|||
|
||||
public static MBroadcastMessage get (Properties ctx, int AD_BroadcastMessage_ID)
|
||||
{
|
||||
Integer key = new Integer(AD_BroadcastMessage_ID);
|
||||
Integer key = Integer.valueOf(AD_BroadcastMessage_ID);
|
||||
MBroadcastMessage retValue = (MBroadcastMessage)s_cache.get(key);
|
||||
if (retValue == null)
|
||||
{
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
package org.adempiere.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
|
@ -295,7 +296,7 @@ public class PromotionRule {
|
|||
nol.setC_Charge_ID(C_Charge_ID);
|
||||
nol.setQty(qty);
|
||||
if (discount.scale() > 2)
|
||||
discount = discount.setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
discount = discount.setScale(2, RoundingMode.HALF_UP);
|
||||
nol.setPriceEntered(discount.negate());
|
||||
nol.setPriceActual(discount.negate());
|
||||
if (ol != null && Integer.toString(ol.getLine()).endsWith("0")) {
|
||||
|
|
|
@ -216,7 +216,7 @@ public abstract class AbstractDocumentSearch {
|
|||
rsSO = pstmtSO.executeQuery();
|
||||
Vector<Integer> idSO = new Vector<Integer>();
|
||||
while (rsSO.next()) {
|
||||
idSO.add(new Integer(rsSO.getInt(1)));
|
||||
idSO.add(Integer.valueOf(rsSO.getInt(1)));
|
||||
}
|
||||
if (role.getWindowAccess(msd.getAD_Window_ID()) != null) {
|
||||
msglog = new StringBuilder("Open Window: ").append(msd.getAD_Window_ID()).append(" / Table: ")
|
||||
|
@ -225,7 +225,7 @@ public abstract class AbstractDocumentSearch {
|
|||
|
||||
if (idSO.size() == 0 && (searchString == null || searchString.trim().length() == 0)) {
|
||||
// No search string - open the window with new record
|
||||
idSO.add(new Integer(0));
|
||||
idSO.add(Integer.valueOf(0));
|
||||
}
|
||||
|
||||
openWindow(idSO, table.getTableName(), msd.getAD_Window_ID());
|
||||
|
@ -239,7 +239,7 @@ public abstract class AbstractDocumentSearch {
|
|||
rsPO = pstmtPO.executeQuery();
|
||||
Vector<Integer> idPO = new Vector<Integer>();
|
||||
while (rsPO.next()) {
|
||||
idPO.add(new Integer(rsPO.getInt(1)));
|
||||
idPO.add(Integer.valueOf(rsPO.getInt(1)));
|
||||
}
|
||||
if (role.getWindowAccess(msd.getPO_Window_ID()) != null) {
|
||||
msglog = new StringBuilder("Open Window: ").append(msd.getPO_Window_ID()).append(" / Table: ")
|
||||
|
|
|
@ -406,10 +406,10 @@ public class GenerateModelJPA
|
|||
sb.append("if (").append (columnName).append (" <= 0) ")
|
||||
.append(setValue).append(" (\"").append(columnName).append("\", null); else \n");
|
||||
}
|
||||
sb.append(setValue).append(" (\"").append(columnName).append("\", new Integer(").append(columnName).append("));");
|
||||
sb.append(setValue).append(" (\"").append(columnName).append("\", Integer.valueOf(").append(columnName).append("));");
|
||||
}
|
||||
else if (clazz.equals(Boolean.class))
|
||||
sb.append(setValue).append(" (\"").append(columnName).append("\", new Boolean(").append(columnName).append("));");
|
||||
sb.append(setValue).append(" (\"").append(columnName).append("\", Boolean.valueOf(").append(columnName).append("));");
|
||||
else
|
||||
{
|
||||
if (isMandatory && AD_Reference_ID == 0) // does not apply to int/boolean
|
||||
|
|
|
@ -1036,12 +1036,12 @@ public abstract class Doc
|
|||
}
|
||||
// Get All Currencies
|
||||
HashSet<Integer> set = new HashSet<Integer>();
|
||||
set.add(new Integer(getC_Currency_ID()));
|
||||
set.add(Integer.valueOf(getC_Currency_ID()));
|
||||
for (int i = 0; p_lines != null && i < p_lines.length; i++)
|
||||
{
|
||||
int C_Currency_ID = p_lines[i].getC_Currency_ID();
|
||||
if (C_Currency_ID != NO_CURRENCY)
|
||||
set.add(new Integer(C_Currency_ID));
|
||||
set.add(Integer.valueOf(C_Currency_ID));
|
||||
}
|
||||
|
||||
// just one and the same
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
package org.compiere.acct;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.util.ArrayList;
|
||||
|
@ -780,7 +781,7 @@ public class Doc_AllocationHdr extends Doc
|
|||
// Round
|
||||
int precision = as.getStdPrecision();
|
||||
if (invoiceDifference.scale() > precision)
|
||||
invoiceDifference = invoiceDifference.setScale(precision, BigDecimal.ROUND_HALF_UP);
|
||||
invoiceDifference = invoiceDifference.setScale(precision, RoundingMode.HALF_UP);
|
||||
StringBuilder d2 = new StringBuilder("(partial) = ").append(invoiceDifference).append(" - Multiplier=").append(multiplier);
|
||||
if (log.isLoggable(Level.FINE)) log.fine(d2.toString());
|
||||
descriptionInv.append(" - ").append(d2);
|
||||
|
@ -847,7 +848,7 @@ public class Doc_AllocationHdr extends Doc
|
|||
// Round
|
||||
int precision = as.getStdPrecision();
|
||||
if (paymentDifference.scale() > precision)
|
||||
paymentDifference = paymentDifference.setScale(precision, BigDecimal.ROUND_HALF_UP);
|
||||
paymentDifference = paymentDifference.setScale(precision, RoundingMode.HALF_UP);
|
||||
StringBuilder d2 = new StringBuilder("(partial) = ").append(paymentDifference).append(" - Multiplier=").append(multiplier);
|
||||
if (log.isLoggable(Level.FINE)) log.fine(d2.toString());
|
||||
descriptionPay.append(" - ").append(d2);
|
||||
|
@ -1193,10 +1194,10 @@ class Doc_AllocationTax
|
|||
|| amt.signum() == 0)
|
||||
return Env.ZERO;
|
||||
//
|
||||
BigDecimal multiplier = tax.divide(total, 10, BigDecimal.ROUND_HALF_UP);
|
||||
BigDecimal multiplier = tax.divide(total, 10, RoundingMode.HALF_UP);
|
||||
BigDecimal retValue = multiplier.multiply(amt);
|
||||
if (retValue.scale() > precision)
|
||||
retValue = retValue.setScale(precision, BigDecimal.ROUND_HALF_UP);
|
||||
retValue = retValue.setScale(precision, RoundingMode.HALF_UP);
|
||||
if (log.isLoggable(Level.FINE)) log.fine(retValue + " (Mult=" + multiplier + "(Prec=" + precision + ")");
|
||||
return retValue;
|
||||
} // calcAmount
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
package org.compiere.acct;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
|
@ -922,7 +923,7 @@ public class Doc_Invoice extends Doc
|
|||
BigDecimal qty = allocation.getQty();
|
||||
if (qty.compareTo(iol.getMovementQty()) != 0)
|
||||
{
|
||||
amt = amt.multiply(iol.getMovementQty()).divide(qty, 12, BigDecimal.ROUND_HALF_UP);
|
||||
amt = amt.multiply(iol.getMovementQty()).divide(qty, 12, RoundingMode.HALF_UP);
|
||||
}
|
||||
estimatedAmt = estimatedAmt.add(amt);
|
||||
}
|
||||
|
@ -931,7 +932,7 @@ public class Doc_Invoice extends Doc
|
|||
|
||||
if (estimatedAmt.scale() > as.getCostingPrecision())
|
||||
{
|
||||
estimatedAmt = estimatedAmt.setScale(as.getCostingPrecision(), BigDecimal.ROUND_HALF_UP);
|
||||
estimatedAmt = estimatedAmt.setScale(as.getCostingPrecision(), RoundingMode.HALF_UP);
|
||||
}
|
||||
BigDecimal costAdjustmentAmt = allocationAmt;
|
||||
if (estimatedAmt.signum() > 0)
|
||||
|
@ -996,7 +997,7 @@ public class Doc_Invoice extends Doc
|
|||
getDateAcct(), getC_ConversionType_ID(),
|
||||
getAD_Client_ID(), getAD_Org_ID());
|
||||
if (costDetailAmt.scale() > as.getCostingPrecision())
|
||||
costDetailAmt = costDetailAmt.setScale(as.getCostingPrecision(), BigDecimal.ROUND_HALF_UP);
|
||||
costDetailAmt = costDetailAmt.setScale(as.getCostingPrecision(), RoundingMode.HALF_UP);
|
||||
|
||||
String key = lca.getM_Product_ID()+"_"+lca.getM_AttributeSetInstance_ID();
|
||||
BigDecimal prevAmt = costDetailAmtMap.remove(key);
|
||||
|
@ -1041,11 +1042,11 @@ public class Doc_Invoice extends Doc
|
|||
{
|
||||
if (allocationAmt.scale() > as.getStdPrecision())
|
||||
{
|
||||
allocationAmt = allocationAmt.setScale(as.getStdPrecision(), BigDecimal.ROUND_HALF_UP);
|
||||
allocationAmt = allocationAmt.setScale(as.getStdPrecision(), RoundingMode.HALF_UP);
|
||||
}
|
||||
if (estimatedAmt.scale() > as.getStdPrecision())
|
||||
{
|
||||
estimatedAmt = estimatedAmt.setScale(as.getStdPrecision(), BigDecimal.ROUND_HALF_UP);
|
||||
estimatedAmt = estimatedAmt.setScale(as.getStdPrecision(), RoundingMode.HALF_UP);
|
||||
}
|
||||
int compare = allocationAmt.compareTo(estimatedAmt);
|
||||
if (compare > 0)
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
package org.compiere.acct;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Savepoint;
|
||||
|
@ -167,7 +168,7 @@ public class Doc_MatchInv extends Doc
|
|||
// NotInvoicedReceipt DR
|
||||
// From Receipt
|
||||
BigDecimal multiplier = getQty()
|
||||
.divide(m_receiptLine.getMovementQty(), 12, BigDecimal.ROUND_HALF_UP)
|
||||
.divide(m_receiptLine.getMovementQty(), 12, RoundingMode.HALF_UP)
|
||||
.abs();
|
||||
FactLine dr = fact.createLine (null,
|
||||
getAccount(Doc.ACCTTYPE_NotInvoicedReceipts, as),
|
||||
|
@ -212,7 +213,7 @@ public class Doc_MatchInv extends Doc
|
|||
expense = m_pc.getAccount(ProductCost.ACCTTYPE_P_Expense, as);
|
||||
BigDecimal LineNetAmt = m_invoiceLine.getLineNetAmt();
|
||||
multiplier = getQty()
|
||||
.divide(m_invoiceLine.getQtyInvoiced(), 12, BigDecimal.ROUND_HALF_UP)
|
||||
.divide(m_invoiceLine.getQtyInvoiced(), 12, RoundingMode.HALF_UP)
|
||||
.abs();
|
||||
if (multiplier.compareTo(Env.ONE) != 0)
|
||||
LineNetAmt = LineNetAmt.multiply(multiplier);
|
||||
|
@ -453,7 +454,7 @@ public class Doc_MatchInv extends Doc
|
|||
|
||||
BigDecimal LineNetAmt = m_invoiceLine.getLineNetAmt();
|
||||
BigDecimal multiplier = getQty()
|
||||
.divide(m_invoiceLine.getQtyInvoiced(), 12, BigDecimal.ROUND_HALF_UP)
|
||||
.divide(m_invoiceLine.getQtyInvoiced(), 12, RoundingMode.HALF_UP)
|
||||
.abs();
|
||||
if (multiplier.compareTo(Env.ONE) != 0)
|
||||
LineNetAmt = LineNetAmt.multiply(multiplier);
|
||||
|
@ -469,7 +470,7 @@ public class Doc_MatchInv extends Doc
|
|||
{
|
||||
tQty = tQty.add(mInv[i].getQty());
|
||||
multiplier = mInv[i].getQty()
|
||||
.divide(m_invoiceLine.getQtyInvoiced(), 12, BigDecimal.ROUND_HALF_UP).abs();
|
||||
.divide(m_invoiceLine.getQtyInvoiced(), 12, RoundingMode.HALF_UP).abs();
|
||||
tAmt = tAmt.add(m_invoiceLine.getLineNetAmt().multiply(multiplier));
|
||||
}
|
||||
}
|
||||
|
@ -516,7 +517,7 @@ public class Doc_MatchInv extends Doc
|
|||
{
|
||||
BigDecimal totalAmt = allocation.getAmt();
|
||||
BigDecimal totalQty = allocation.getQty();
|
||||
BigDecimal amt = totalAmt.multiply(tQty).divide(totalQty, 12, BigDecimal.ROUND_HALF_UP);
|
||||
BigDecimal amt = totalAmt.multiply(tQty).divide(totalQty, 12, RoundingMode.HALF_UP);
|
||||
if (orderLine.getC_Currency_ID() != as.getC_Currency_ID())
|
||||
{
|
||||
I_C_Order order = orderLine.getC_Order();
|
||||
|
@ -532,7 +533,7 @@ public class Doc_MatchInv extends Doc
|
|||
}
|
||||
amt = amt.multiply(rate);
|
||||
if (amt.scale() > as.getCostingPrecision())
|
||||
amt = amt.setScale(as.getCostingPrecision(), BigDecimal.ROUND_HALF_UP);
|
||||
amt = amt.setScale(as.getCostingPrecision(), RoundingMode.HALF_UP);
|
||||
}
|
||||
int elementId = allocation.getC_OrderLandedCost().getM_CostElement_ID();
|
||||
BigDecimal elementAmt = landedCostMap.get(elementId);
|
||||
|
|
|
@ -233,7 +233,7 @@ public class Doc_MatchPO extends Doc
|
|||
amt = amt.divide(getQty(), 12, RoundingMode.HALF_UP);
|
||||
landedCost = landedCost.add(amt);
|
||||
if (landedCost.scale() > as.getCostingPrecision())
|
||||
landedCost = landedCost.setScale(as.getCostingPrecision(), BigDecimal.ROUND_HALF_UP);
|
||||
landedCost = landedCost.setScale(as.getCostingPrecision(), RoundingMode.HALF_UP);
|
||||
int elementId = allocation.getC_OrderLandedCost().getM_CostElement_ID();
|
||||
BigDecimal elementAmt = landedCostMap.get(elementId);
|
||||
if (elementAmt == null)
|
||||
|
@ -263,7 +263,7 @@ public class Doc_MatchPO extends Doc
|
|||
}
|
||||
poCost = poCost.multiply(rate);
|
||||
if (poCost.scale() > as.getCostingPrecision())
|
||||
poCost = poCost.setScale(as.getCostingPrecision(), BigDecimal.ROUND_HALF_UP);
|
||||
poCost = poCost.setScale(as.getCostingPrecision(), RoundingMode.HALF_UP);
|
||||
}
|
||||
|
||||
String costingError = createMatchPOCostDetail(as, poCost, landedCostMap);
|
||||
|
@ -492,7 +492,7 @@ public class Doc_MatchPO extends Doc
|
|||
}
|
||||
|
||||
if (tAmt.scale() > as.getCostingPrecision())
|
||||
tAmt = tAmt.setScale(as.getCostingPrecision(), BigDecimal.ROUND_HALF_UP);
|
||||
tAmt = tAmt.setScale(as.getCostingPrecision(), RoundingMode.HALF_UP);
|
||||
// Set Total Amount and Total Quantity from Matched PO
|
||||
if (!MCostDetail.createOrder(as, m_oLine.getAD_Org_ID(),
|
||||
getM_Product_ID(), mMatchPO.getM_AttributeSetInstance_ID(),
|
||||
|
@ -523,7 +523,7 @@ public class Doc_MatchPO extends Doc
|
|||
BigDecimal amt = landedCostMap.get(elementId);
|
||||
amt = amt.multiply(tQty);
|
||||
if (amt.scale() > as.getCostingPrecision())
|
||||
amt = amt.setScale(as.getCostingPrecision(), BigDecimal.ROUND_HALF_UP);
|
||||
amt = amt.setScale(as.getCostingPrecision(), RoundingMode.HALF_UP);
|
||||
if (!MCostDetail.createOrder(as, m_oLine.getAD_Org_ID(),
|
||||
getM_Product_ID(), mMatchPO.getM_AttributeSetInstance_ID(),
|
||||
m_oLine.getC_OrderLine_ID(), elementId,
|
||||
|
|
|
@ -159,7 +159,7 @@ public class Doc_Order extends Doc
|
|||
for (int i = 0; i < oLines.length; i++)
|
||||
{
|
||||
MOrderLine line = oLines[i];
|
||||
qtys.put(new Integer(line.getC_OrderLine_ID()), line.getQtyOrdered());
|
||||
qtys.put(Integer.valueOf(line.getC_OrderLine_ID()), line.getQtyOrdered());
|
||||
}
|
||||
//
|
||||
ArrayList<DocLine> list = new ArrayList<DocLine>();
|
||||
|
@ -182,7 +182,7 @@ public class Doc_Order extends Doc
|
|||
DocLine docLine = new DocLine (line, this);
|
||||
// Quantity - not more then OrderLine
|
||||
// Issue: Split of Requisition to multiple POs & different price
|
||||
Integer key = new Integer(line.getC_OrderLine_ID());
|
||||
Integer key = Integer.valueOf(line.getC_OrderLine_ID());
|
||||
BigDecimal maxQty = qtys.get(key);
|
||||
BigDecimal Qty = line.getQty().max(maxQty);
|
||||
if (Qty.signum() == 0)
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
package org.compiere.acct;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.util.ArrayList;
|
||||
|
@ -318,7 +319,7 @@ public class Doc_Production extends Doc
|
|||
costMap.put(line0.get_ID()+ "_"+ ma.getM_AttributeSetInstance_ID(),maCost);
|
||||
costs0 = costs0.add(maCost);
|
||||
}
|
||||
bomCost = bomCost.add(costs0.setScale(2,BigDecimal.ROUND_HALF_UP));
|
||||
bomCost = bomCost.add(costs0.setScale(2,RoundingMode.HALF_UP));
|
||||
}
|
||||
else
|
||||
p_Error = "Failed to post - No Attribute Set for line";
|
||||
|
@ -339,7 +340,7 @@ public class Doc_Production extends Doc
|
|||
costs0 = line0.getProductCosts(as, line0.getAD_Org_ID(), false);
|
||||
}
|
||||
costMap.put(line0.get_ID()+ "_"+ line0.getM_AttributeSetInstance_ID(),costs0);
|
||||
bomCost = bomCost.add(costs0.setScale(2,BigDecimal.ROUND_HALF_UP));
|
||||
bomCost = bomCost.add(costs0.setScale(2,RoundingMode.HALF_UP));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -358,7 +359,7 @@ public class Doc_Production extends Doc
|
|||
costs0 = line0.getProductCosts(as, line0.getAD_Org_ID(), false);
|
||||
}
|
||||
costMap.put(line0.get_ID()+ "_"+ line0.getM_AttributeSetInstance_ID(),costs0);
|
||||
bomCost = bomCost.add(costs0.setScale(2,BigDecimal.ROUND_HALF_UP));
|
||||
bomCost = bomCost.add(costs0.setScale(2,RoundingMode.HALF_UP));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -366,8 +367,8 @@ public class Doc_Production extends Doc
|
|||
qtyProduced = manipulateQtyProduced (mQtyProduced, endProLine, prod.isUseProductionPlan(), null);
|
||||
if (line.getQty().compareTo(qtyProduced) != 0)
|
||||
{
|
||||
BigDecimal factor = line.getQty().divide(qtyProduced, 12, BigDecimal.ROUND_HALF_UP);
|
||||
bomCost = bomCost.multiply(factor).setScale(2,BigDecimal.ROUND_HALF_UP);
|
||||
BigDecimal factor = line.getQty().divide(qtyProduced, 12, RoundingMode.HALF_UP);
|
||||
bomCost = bomCost.multiply(factor).setScale(2,RoundingMode.HALF_UP);
|
||||
}
|
||||
|
||||
if (MAcctSchema.COSTINGLEVEL_BatchLot.equals(CostingLevel))
|
||||
|
@ -386,7 +387,7 @@ public class Doc_Production extends Doc
|
|||
else
|
||||
{
|
||||
int precision = as.getStdPrecision();
|
||||
BigDecimal variance = (costs.setScale(precision, BigDecimal.ROUND_HALF_UP)).subtract(bomCost.negate());
|
||||
BigDecimal variance = (costs.setScale(precision, RoundingMode.HALF_UP)).subtract(bomCost.negate());
|
||||
// only post variance if it's not zero
|
||||
if (variance.signum() != 0)
|
||||
{
|
||||
|
|
|
@ -378,7 +378,7 @@ public final class Fact
|
|||
for (int i = 0; i < m_lines.size(); i++)
|
||||
{
|
||||
FactLine line = (FactLine)m_lines.get(i);
|
||||
Integer key = new Integer(line.getAD_Org_ID());
|
||||
Integer key = Integer.valueOf(line.getAD_Org_ID());
|
||||
BigDecimal bal = line.getSourceBalance();
|
||||
BigDecimal oldBal = (BigDecimal)map.get(key);
|
||||
if (oldBal != null)
|
||||
|
@ -445,7 +445,7 @@ public final class Fact
|
|||
for (int i = 0; i < m_lines.size(); i++)
|
||||
{
|
||||
FactLine line = (FactLine)m_lines.get(i);
|
||||
Integer key = new Integer(line.getAD_Org_ID());
|
||||
Integer key = Integer.valueOf(line.getAD_Org_ID());
|
||||
// BigDecimal balance = line.getSourceBalance();
|
||||
Balance oldBalance = (Balance)map.get(key);
|
||||
if (oldBalance == null)
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
package org.compiere.acct;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
|
@ -252,14 +253,14 @@ public final class FactLine extends X_Fact_Acct
|
|||
int precision = MCurrency.getStdPrecision(getCtx(), C_Currency_ID);
|
||||
if (AmtSourceDr != null && AmtSourceDr.scale() > precision)
|
||||
{
|
||||
BigDecimal AmtSourceDr1 = AmtSourceDr.setScale(precision, BigDecimal.ROUND_HALF_UP);
|
||||
BigDecimal AmtSourceDr1 = AmtSourceDr.setScale(precision, RoundingMode.HALF_UP);
|
||||
if (AmtSourceDr1.compareTo(AmtSourceDr) != 0)
|
||||
log.warning("Source DR Precision " + AmtSourceDr + " -> " + AmtSourceDr1);
|
||||
setAmtSourceDr(AmtSourceDr1);
|
||||
}
|
||||
if (AmtSourceCr != null && AmtSourceCr.scale() > precision)
|
||||
{
|
||||
BigDecimal AmtSourceCr1 = AmtSourceCr.setScale(precision, BigDecimal.ROUND_HALF_UP);
|
||||
BigDecimal AmtSourceCr1 = AmtSourceCr.setScale(precision, RoundingMode.HALF_UP);
|
||||
if (AmtSourceCr1.compareTo(AmtSourceCr) != 0)
|
||||
log.warning("Source CR Precision " + AmtSourceCr + " -> " + AmtSourceCr1);
|
||||
setAmtSourceCr(AmtSourceCr1);
|
||||
|
@ -326,14 +327,14 @@ public final class FactLine extends X_Fact_Acct
|
|||
int precision = MCurrency.getStdPrecision(getCtx(), C_Currency_ID);
|
||||
if (AmtAcctDr != null && AmtAcctDr.scale() > precision)
|
||||
{
|
||||
BigDecimal AmtAcctDr1 = AmtAcctDr.setScale(precision, BigDecimal.ROUND_HALF_UP);
|
||||
BigDecimal AmtAcctDr1 = AmtAcctDr.setScale(precision, RoundingMode.HALF_UP);
|
||||
if (AmtAcctDr1.compareTo(AmtAcctDr) != 0)
|
||||
log.warning("Accounted DR Precision " + AmtAcctDr + " -> " + AmtAcctDr1);
|
||||
setAmtAcctDr(AmtAcctDr1);
|
||||
}
|
||||
if (AmtAcctCr != null && AmtAcctCr.scale() > precision)
|
||||
{
|
||||
BigDecimal AmtAcctCr1 = AmtAcctCr.setScale(precision, BigDecimal.ROUND_HALF_UP);
|
||||
BigDecimal AmtAcctCr1 = AmtAcctCr.setScale(precision, RoundingMode.HALF_UP);
|
||||
if (AmtAcctCr1.compareTo(AmtAcctCr) != 0)
|
||||
log.warning("Accounted CR Precision " + AmtAcctCr + " -> " + AmtAcctCr1);
|
||||
setAmtAcctCr(AmtAcctCr1);
|
||||
|
|
|
@ -94,7 +94,7 @@ public class WebProjectDeploy extends SvrProcess
|
|||
// Stage
|
||||
MCStage[] stages = MCStage.getStages(m_project);
|
||||
for (int i = 0; i < stages.length; i++)
|
||||
m_map.put(new Integer(stages[i].getCM_CStage_ID()), stages[i]);
|
||||
m_map.put(Integer.valueOf(stages[i].getCM_CStage_ID()), stages[i]);
|
||||
|
||||
// Copy Stage Tree
|
||||
MTree treeS = new MTree (getCtx(), m_project.getAD_TreeCMS_ID(), false, false, get_TrxName());
|
||||
|
@ -106,7 +106,7 @@ public class WebProjectDeploy extends SvrProcess
|
|||
for (int i = 0; i < containers.length; i++)
|
||||
{
|
||||
MContainer container = containers[i];
|
||||
if (!m_idList.contains(new Integer(container.getCM_Container_ID())))
|
||||
if (!m_idList.contains(Integer.valueOf(container.getCM_Container_ID())))
|
||||
{
|
||||
String name = container.getName();
|
||||
if (container.delete(true)) {
|
||||
|
@ -155,14 +155,14 @@ public class WebProjectDeploy extends SvrProcess
|
|||
private void copyStage (MTreeNode node, String path)
|
||||
{
|
||||
org.compiere.cm.CacheHandler thisHandler = new org.compiere.cm.CacheHandler(org.compiere.cm.CacheHandler.convertJNPURLToCacheURL(getCtx().getProperty("java.naming.provider.url")), log, getCtx(), get_TrxName());
|
||||
Integer ID = new Integer(node.getNode_ID());
|
||||
Integer ID = Integer.valueOf(node.getNode_ID());
|
||||
MCStage stage = m_map.get(ID);
|
||||
//
|
||||
int size = node.getChildCount();
|
||||
for (int i = 0; i < size; i++)
|
||||
{
|
||||
MTreeNode child = (MTreeNode)node.getChildAt(i);
|
||||
ID = new Integer(child.getNode_ID());
|
||||
ID = Integer.valueOf(child.getNode_ID());
|
||||
stage = m_map.get(ID);
|
||||
if (stage == null)
|
||||
{
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
package org.compiere.impexp;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.sql.Timestamp;
|
||||
import java.text.DateFormat;
|
||||
import java.text.ParseException;
|
||||
|
@ -309,7 +310,7 @@ public final class ImpFormatRow
|
|||
if (methodStart != -1) // no class
|
||||
{
|
||||
Class<?> cClass = Class.forName(callout.substring(0,methodStart));
|
||||
m_callout = (Callout)cClass.newInstance();
|
||||
m_callout = (Callout)cClass.getDeclaredConstructor().newInstance();
|
||||
m_method = callout.substring(methodStart+1);
|
||||
}
|
||||
}
|
||||
|
@ -525,7 +526,7 @@ public final class ImpFormatRow
|
|||
bd = BigDecimal.ZERO;
|
||||
|
||||
if (m_divideBy100) // assumed two decimal scale
|
||||
bd = bd.divide(Env.ONEHUNDRED, 2, BigDecimal.ROUND_HALF_UP);
|
||||
bd = bd.divide(Env.ONEHUNDRED, 2, RoundingMode.HALF_UP);
|
||||
return bd.toString();
|
||||
} // parseNumber
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ package org.compiere.model;
|
|||
|
||||
import java.lang.reflect.Method;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.Properties;
|
||||
import java.util.logging.Level;
|
||||
|
@ -103,9 +104,9 @@ public class CalloutEngine implements Callout
|
|||
{
|
||||
Object[] args = null;
|
||||
if (argLength == 6)
|
||||
args = new Object[] {ctx, new Integer(WindowNo), mTab, mField, value, oldValue};
|
||||
args = new Object[] {ctx, Integer.valueOf(WindowNo), mTab, mField, value, oldValue};
|
||||
else
|
||||
args = new Object[] {ctx, new Integer(WindowNo), mTab, mField, value};
|
||||
args = new Object[] {ctx, Integer.valueOf(WindowNo), mTab, mField, value};
|
||||
retValue = (String)method.invoke(this, args);
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -303,7 +304,7 @@ public class CalloutEngine implements Callout
|
|||
BigDecimal rate2 = Env.ZERO;
|
||||
|
||||
if (rate1.signum() != 0.0) // no divide by zero
|
||||
rate2 = Env.ONE.divide(rate1, 12, BigDecimal.ROUND_HALF_UP);
|
||||
rate2 = Env.ONE.divide(rate1, 12, RoundingMode.HALF_UP);
|
||||
//
|
||||
if (mField.getColumnName().equals("MultiplyRate"))
|
||||
mTab.setValue("DivideRate", rate2);
|
||||
|
|
|
@ -791,14 +791,14 @@ public class GridField
|
|||
&& (m_vo.ColumnName.equals("AD_Client_ID") || m_vo.ColumnName.equals("AD_Org_ID")))
|
||||
{
|
||||
if (log.isLoggable(Level.FINE)) log.fine("[SystemAccess] " + m_vo.ColumnName + "=0");
|
||||
return new Integer(0);
|
||||
return Integer.valueOf(0);
|
||||
}
|
||||
// Set Org to System, if Client access
|
||||
else if (X_AD_Table.ACCESSLEVEL_SystemPlusClient.equals(Env.getContext(m_vo.ctx, m_vo.WindowNo, m_vo.TabNo, GridTab.CTX_AccessLevel))
|
||||
&& m_vo.ColumnName.equals("AD_Org_ID"))
|
||||
{
|
||||
if (log.isLoggable(Level.FINE)) log.fine("[ClientAccess] " + m_vo.ColumnName + "=0");
|
||||
return new Integer(0);
|
||||
return Integer.valueOf(0);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
@ -1057,17 +1057,17 @@ public class GridField
|
|||
int ii = Integer.parseInt(value);
|
||||
if (ii < 0)
|
||||
return null;
|
||||
return new Integer(ii);
|
||||
return Integer.valueOf(ii);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
log.warning("Cannot parse: " + value + " - " + e.getMessage());
|
||||
}
|
||||
return new Integer(0);
|
||||
return Integer.valueOf(0);
|
||||
}
|
||||
// Integer
|
||||
if (m_vo.displayType == DisplayType.Integer)
|
||||
return new Integer(value);
|
||||
return Integer.valueOf(value);
|
||||
|
||||
// Number
|
||||
if (DisplayType.isNumeric(m_vo.displayType))
|
||||
|
@ -2057,7 +2057,7 @@ public class GridField
|
|||
|| (DisplayType.isID(dt) && getColumnName().endsWith("_ID")))
|
||||
{
|
||||
int i = Integer.parseInt(newValue);
|
||||
setValue (new Integer(i), inserting);
|
||||
setValue (Integer.valueOf(i), inserting);
|
||||
}
|
||||
// Return BigDecimal
|
||||
else if (DisplayType.isNumeric(dt))
|
||||
|
|
|
@ -870,7 +870,7 @@ public class GridFieldVO implements Serializable
|
|||
public static class SeqNoComparator implements Comparator<GridFieldVO> {
|
||||
@Override
|
||||
public int compare(GridFieldVO gf1, GridFieldVO gf2) {
|
||||
return (new Integer(gf1.SeqNo)).compareTo(new Integer(gf2.SeqNo));
|
||||
return (Integer.valueOf(gf1.SeqNo)).compareTo(Integer.valueOf(gf2.SeqNo));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1818,13 +1818,13 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
|||
if (rs.next())
|
||||
{
|
||||
// {0} - Number of lines
|
||||
Integer lines = new Integer(rs.getInt(1));
|
||||
Integer lines = Integer.valueOf(rs.getInt(1));
|
||||
arguments[0] = lines;
|
||||
// {1} - Line net
|
||||
Double net = new Double(rs.getDouble(2));
|
||||
Double net = Double.valueOf(rs.getDouble(2));
|
||||
arguments[1] = net;
|
||||
// {2} - Line net
|
||||
Double total = new Double(rs.getDouble(3));
|
||||
Double total = Double.valueOf(rs.getDouble(3));
|
||||
arguments[2] = total;
|
||||
filled = true;
|
||||
}
|
||||
|
@ -1905,19 +1905,19 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
|||
if (rs.next())
|
||||
{
|
||||
// {0} - Number of lines
|
||||
Integer lines = new Integer(rs.getInt(1));
|
||||
Integer lines = Integer.valueOf(rs.getInt(1));
|
||||
arguments[0] = lines;
|
||||
// {1} - Line toral
|
||||
Double lineTotal = new Double(rs.getDouble(3));
|
||||
Double lineTotal = Double.valueOf(rs.getDouble(3));
|
||||
arguments[1] = lineTotal;
|
||||
// {2} - Grand total (including tax, etc.)
|
||||
Double grandTotal = new Double(rs.getDouble(4));
|
||||
Double grandTotal = Double.valueOf(rs.getDouble(4));
|
||||
arguments[2] = grandTotal;
|
||||
// {3} - Currency
|
||||
String currency = rs.getString(2);
|
||||
arguments[3] = currency;
|
||||
// (4) - Grand total converted to Euro
|
||||
Double grandEuro = new Double(rs.getDouble(5));
|
||||
Double grandEuro = Double.valueOf(rs.getDouble(5));
|
||||
arguments[4] = grandEuro;
|
||||
filled = true;
|
||||
}
|
||||
|
@ -1979,10 +1979,10 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
|||
if (rs.next())
|
||||
{
|
||||
// {0} - Number of lines
|
||||
Integer lines = new Integer(rs.getInt(1));
|
||||
Integer lines = Integer.valueOf(rs.getInt(1));
|
||||
arguments[0] = lines;
|
||||
// {1} - Line total
|
||||
Double total = new Double(rs.getDouble(2));
|
||||
Double total = Double.valueOf(rs.getDouble(2));
|
||||
arguments[1] = total;
|
||||
// {3} - Currency
|
||||
arguments[2] = " ";
|
||||
|
@ -2234,7 +2234,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
|||
rs = pstmt.executeQuery();
|
||||
while (rs.next())
|
||||
{
|
||||
Integer key = new Integer(rs.getInt(1));
|
||||
Integer key = Integer.valueOf(rs.getInt(1));
|
||||
m_Lock.add(key);
|
||||
}
|
||||
}
|
||||
|
@ -2264,7 +2264,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
|||
if (m_Lock == null || m_Lock.isEmpty())
|
||||
return false;
|
||||
//
|
||||
Integer key = new Integer(m_mTable.getKeyID (m_currentRow));
|
||||
Integer key = Integer.valueOf(m_mTable.getKeyID (m_currentRow));
|
||||
return m_Lock.contains(key);
|
||||
} // isLocked
|
||||
|
||||
|
@ -2927,7 +2927,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
|||
if (call == null) {
|
||||
//no match from factory, check java classpath
|
||||
Class<?> cClass = Class.forName(className);
|
||||
call = (Callout)cClass.newInstance();
|
||||
call = (Callout)cClass.getDeclaredConstructor().newInstance();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3190,9 +3190,9 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
|||
lineNoCurrentRow = (Integer) m_mTable.getValueAt(from, lineCol);
|
||||
lineNoNextRow = (Integer) m_mTable.getValueAt(to, lineCol);
|
||||
} else if (m_mTable.getValueAt(from, lineCol) instanceof BigDecimal) {
|
||||
lineNoCurrentRow = new Integer(((BigDecimal) m_mTable.getValueAt(from, lineCol))
|
||||
lineNoCurrentRow = Integer.valueOf(((BigDecimal) m_mTable.getValueAt(from, lineCol))
|
||||
.intValue());
|
||||
lineNoNextRow = new Integer(((BigDecimal) m_mTable.getValueAt(to, lineCol))
|
||||
lineNoNextRow = Integer.valueOf(((BigDecimal) m_mTable.getValueAt(to, lineCol))
|
||||
.intValue());
|
||||
} else {
|
||||
log.fine("unknown value format - return");
|
||||
|
|
|
@ -1303,8 +1303,8 @@ public class GridTable extends AbstractTableModel
|
|||
|
||||
// Save old value
|
||||
m_oldValue = new Object[3];
|
||||
m_oldValue[0] = new Integer(row);
|
||||
m_oldValue[1] = new Integer(col);
|
||||
m_oldValue[0] = Integer.valueOf(row);
|
||||
m_oldValue[1] = Integer.valueOf(col);
|
||||
m_oldValue[2] = oldValue;
|
||||
|
||||
// Set Data item
|
||||
|
@ -1894,7 +1894,7 @@ public class GridTable extends AbstractTableModel
|
|||
if (dd instanceof Integer)
|
||||
iii = (Integer)dd;
|
||||
else
|
||||
iii = new Integer(dd.toString());
|
||||
iii = Integer.valueOf(dd.toString());
|
||||
if (encrypted)
|
||||
iii = (Integer)encrypt(iii, getAD_Client_ID());
|
||||
if (manualUpdate)
|
||||
|
@ -3242,7 +3242,7 @@ public class GridTable extends AbstractTableModel
|
|||
// Integer, ID, Lookup
|
||||
if (displayType == DisplayType.Integer || (DisplayType.isID(displayType) && !(columnName.equals("EntityType") || columnName.equals("AD_Language"))))
|
||||
{
|
||||
rowData[j] = new Integer(rs.getInt(j+1)); // Integer
|
||||
rowData[j] = Integer.valueOf(rs.getInt(j+1)); // Integer
|
||||
if (rs.wasNull())
|
||||
rowData[j] = null;
|
||||
}
|
||||
|
@ -3261,7 +3261,7 @@ public class GridTable extends AbstractTableModel
|
|||
String str = rs.getString(j+1);
|
||||
if (field.isEncryptedColumn())
|
||||
str = (String)decrypt(str, getAD_Client_ID(rs));
|
||||
rowData[j] = new Boolean ("Y".equals(str)); // Boolean
|
||||
rowData[j] = Boolean.valueOf("Y".equals(str)); // Boolean
|
||||
}
|
||||
// LOB
|
||||
else if (DisplayType.isLOB(displayType))
|
||||
|
|
|
@ -62,7 +62,7 @@ public class MAcctSchema extends X_C_AcctSchema
|
|||
public static MAcctSchema get (Properties ctx, int C_AcctSchema_ID, String trxName)
|
||||
{
|
||||
// Check Cache
|
||||
Integer key = new Integer(C_AcctSchema_ID);
|
||||
Integer key = Integer.valueOf(C_AcctSchema_ID);
|
||||
MAcctSchema retValue = (MAcctSchema)s_cache.get(key);
|
||||
if (retValue != null)
|
||||
return retValue;
|
||||
|
@ -93,7 +93,7 @@ public class MAcctSchema extends X_C_AcctSchema
|
|||
public static synchronized MAcctSchema[] getClientAcctSchema (Properties ctx, int AD_Client_ID, String trxName)
|
||||
{
|
||||
// Check Cache
|
||||
Integer key = new Integer(AD_Client_ID);
|
||||
Integer key = Integer.valueOf(AD_Client_ID);
|
||||
if (s_schema.containsKey(key))
|
||||
return (MAcctSchema[])s_schema.get(key);
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ public class MAcctSchemaElement extends X_C_AcctSchema_Element
|
|||
*/
|
||||
public static MAcctSchemaElement[] getAcctSchemaElements (MAcctSchema as)
|
||||
{
|
||||
Integer key = new Integer (as.getC_AcctSchema_ID());
|
||||
Integer key = Integer.valueOf(as.getC_AcctSchema_ID());
|
||||
MAcctSchemaElement[] retValue = (MAcctSchemaElement[]) s_cache.get (key);
|
||||
if (retValue != null)
|
||||
return retValue;
|
||||
|
|
|
@ -116,9 +116,9 @@ public class MAging extends X_T_Aging
|
|||
|
||||
// Optional
|
||||
// setC_Invoice_ID (C_Invoice_ID); // may be zero
|
||||
set_ValueNoCheck ("C_Invoice_ID", new Integer(C_Invoice_ID));
|
||||
set_ValueNoCheck ("C_Invoice_ID", Integer.valueOf(C_Invoice_ID));
|
||||
// setC_InvoicePaySchedule_ID(C_InvoicePaySchedule_ID); // may be zero
|
||||
set_Value ("C_InvoicePaySchedule_ID", new Integer(C_InvoicePaySchedule_ID));
|
||||
set_Value ("C_InvoicePaySchedule_ID", Integer.valueOf(C_InvoicePaySchedule_ID));
|
||||
setIsListInvoices(C_Invoice_ID != 0);
|
||||
//
|
||||
setDueDate(DueDate); // only sensible if List invoices
|
||||
|
@ -156,9 +156,9 @@ public class MAging extends X_T_Aging
|
|||
|
||||
// Optional
|
||||
// setC_Invoice_ID (C_Invoice_ID); // may be zero
|
||||
set_ValueNoCheck ("C_Invoice_ID", new Integer(C_Invoice_ID));
|
||||
set_ValueNoCheck ("C_Invoice_ID", Integer.valueOf(C_Invoice_ID));
|
||||
// setC_InvoicePaySchedule_ID(C_InvoicePaySchedule_ID); // may be zero
|
||||
set_Value ("C_InvoicePaySchedule_ID", new Integer(C_InvoicePaySchedule_ID));
|
||||
set_Value ("C_InvoicePaySchedule_ID", Integer.valueOf(C_InvoicePaySchedule_ID));
|
||||
setIsListInvoices(C_Invoice_ID != 0);
|
||||
//
|
||||
setDueDate(DueDate); // only sensible if List invoices
|
||||
|
|
|
@ -18,6 +18,7 @@ package org.compiere.model;
|
|||
|
||||
import java.io.File;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.Timestamp;
|
||||
|
@ -1066,7 +1067,7 @@ public class MAllocationHdr extends X_C_AllocationHdr implements DocAction
|
|||
// Round
|
||||
int precision = MCurrency.getStdPrecision(getCtx(), client.getC_Currency_ID());
|
||||
if (openBalanceDiff.scale() > precision)
|
||||
openBalanceDiff = openBalanceDiff.setScale(precision, BigDecimal.ROUND_HALF_UP);
|
||||
openBalanceDiff = openBalanceDiff.setScale(precision, RoundingMode.HALF_UP);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ public class MAttributeSet extends X_M_AttributeSet
|
|||
*/
|
||||
public static MAttributeSet get (Properties ctx, int M_AttributeSet_ID)
|
||||
{
|
||||
Integer key = new Integer (M_AttributeSet_ID);
|
||||
Integer key = Integer.valueOf(M_AttributeSet_ID);
|
||||
MAttributeSet retValue = (MAttributeSet) s_cache.get (key);
|
||||
if (retValue != null)
|
||||
return retValue;
|
||||
|
|
|
@ -45,7 +45,7 @@ public class MBOM extends X_M_BOM
|
|||
*/
|
||||
public static MBOM get (Properties ctx, int M_BOM_ID)
|
||||
{
|
||||
Integer key = new Integer (M_BOM_ID);
|
||||
Integer key = Integer.valueOf(M_BOM_ID);
|
||||
MBOM retValue = (MBOM) s_cache.get (key);
|
||||
if (retValue != null)
|
||||
return retValue;
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
package org.compiere.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.util.Properties;
|
||||
|
@ -49,7 +50,7 @@ public class MBPGroup extends X_C_BP_Group
|
|||
*/
|
||||
public static MBPGroup get (Properties ctx, int C_BP_Group_ID)
|
||||
{
|
||||
Integer key = new Integer (C_BP_Group_ID);
|
||||
Integer key = Integer.valueOf(C_BP_Group_ID);
|
||||
MBPGroup retValue = (MBPGroup) s_cache.get (key);
|
||||
if (retValue != null)
|
||||
return retValue;
|
||||
|
@ -82,7 +83,7 @@ public class MBPGroup extends X_C_BP_Group
|
|||
public static MBPGroup getDefault (Properties ctx)
|
||||
{
|
||||
int AD_Client_ID = Env.getAD_Client_ID(ctx);
|
||||
Integer key = new Integer (AD_Client_ID);
|
||||
Integer key = Integer.valueOf(AD_Client_ID);
|
||||
MBPGroup retValue = (MBPGroup) s_cacheDefault.get (key);
|
||||
if (retValue != null)
|
||||
return retValue;
|
||||
|
@ -141,7 +142,7 @@ public class MBPGroup extends X_C_BP_Group
|
|||
if (rs.next ())
|
||||
{
|
||||
retValue = new MBPGroup (ctx, rs, null);
|
||||
Integer key = new Integer (retValue.getC_BP_Group_ID());
|
||||
Integer key = Integer.valueOf(retValue.getC_BP_Group_ID());
|
||||
if (retValue.get_ID () != 0)
|
||||
s_cache.put (key, retValue);
|
||||
}
|
||||
|
@ -220,7 +221,7 @@ public class MBPGroup extends X_C_BP_Group
|
|||
{
|
||||
BigDecimal bd = super.getCreditWatchPercent();
|
||||
if (bd.compareTo(Env.ZERO) != 0)
|
||||
return bd.divide(Env.ONEHUNDRED, 2, BigDecimal.ROUND_HALF_UP);
|
||||
return bd.divide(Env.ONEHUNDRED, 2, RoundingMode.HALF_UP);
|
||||
return BigDecimal.valueOf(0.90);
|
||||
} // getCreditWatchRatio
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ public class MBPartner extends X_C_BPartner
|
|||
// Reset
|
||||
if (template != null)
|
||||
{
|
||||
template.set_ValueNoCheck ("C_BPartner_ID", new Integer(0));
|
||||
template.set_ValueNoCheck ("C_BPartner_ID", Integer.valueOf(0));
|
||||
template.set_ValueNoCheck ("C_BPartner_UU", (String)null);
|
||||
template.setAD_OrgBP_ID(0);
|
||||
template.setLogo_ID(0);
|
||||
|
@ -660,7 +660,7 @@ public class MBPartner extends X_C_BPartner
|
|||
*/
|
||||
public void setPrimaryC_BPartner_Location_ID(int C_BPartner_Location_ID)
|
||||
{
|
||||
m_primaryC_BPartner_Location_ID = new Integer (C_BPartner_Location_ID);
|
||||
m_primaryC_BPartner_Location_ID = Integer.valueOf(C_BPartner_Location_ID);
|
||||
} // setPrimaryC_BPartner_Location_ID
|
||||
|
||||
/**
|
||||
|
@ -669,7 +669,7 @@ public class MBPartner extends X_C_BPartner
|
|||
*/
|
||||
public void setPrimaryAD_User_ID(int AD_User_ID)
|
||||
{
|
||||
m_primaryAD_User_ID = new Integer (AD_User_ID);
|
||||
m_primaryAD_User_ID = Integer.valueOf(AD_User_ID);
|
||||
} // setPrimaryAD_User_ID
|
||||
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ public class MBPartnerLocation extends X_C_BPartner_Location {
|
|||
this(bp.getCtx(), 0, bp.get_TrxName());
|
||||
setClientOrg(bp);
|
||||
// may (still) be 0
|
||||
set_ValueNoCheck("C_BPartner_ID", new Integer(bp.getC_BPartner_ID()));
|
||||
set_ValueNoCheck("C_BPartner_ID", Integer.valueOf(bp.getC_BPartner_ID()));
|
||||
} // MBPartner_Location
|
||||
|
||||
/**
|
||||
|
|
|
@ -43,7 +43,7 @@ public class MBank extends X_C_Bank
|
|||
*/
|
||||
public static MBank get (Properties ctx, int C_Bank_ID)
|
||||
{
|
||||
Integer key = new Integer (C_Bank_ID);
|
||||
Integer key = Integer.valueOf(C_Bank_ID);
|
||||
MBank retValue = (MBank)s_cache.get (key);
|
||||
if (retValue != null)
|
||||
return retValue;
|
||||
|
|
|
@ -47,7 +47,7 @@ public class MBankAccount extends X_C_BankAccount
|
|||
*/
|
||||
public static MBankAccount get (Properties ctx, int C_BankAccount_ID)
|
||||
{
|
||||
Integer key = new Integer (C_BankAccount_ID);
|
||||
Integer key = Integer.valueOf(C_BankAccount_ID);
|
||||
MBankAccount retValue = (MBankAccount) s_cache.get (key);
|
||||
if (retValue != null)
|
||||
return retValue;
|
||||
|
|
|
@ -132,7 +132,7 @@ import org.compiere.util.Util;
|
|||
if(m_loader==null){
|
||||
// if no OSGi plugin is found try the legacy way (in my own classpath)
|
||||
Class<?> bsrClass = Class.forName(getStmtLoaderClass());
|
||||
m_loader = (BankStatementLoaderInterface) bsrClass.newInstance();
|
||||
m_loader = (BankStatementLoaderInterface) bsrClass.getDeclaredConstructor().newInstance();
|
||||
}
|
||||
}
|
||||
catch(Exception e)
|
||||
|
|
|
@ -141,7 +141,7 @@ public class MBankStatementMatcher extends X_C_BankStatementMatcher
|
|||
if(m_matcher==null){
|
||||
// if no OSGi plugin is found try the legacy way (in my own classpath)
|
||||
Class<?> bsrClass = Class.forName(className);
|
||||
m_matcher = (BankStatementMatcherInterface) bsrClass.newInstance();
|
||||
m_matcher = (BankStatementMatcherInterface) bsrClass.getDeclaredConstructor().newInstance();
|
||||
}
|
||||
m_matcherValid = Boolean.TRUE;
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ public class MCalendar extends X_C_Calendar
|
|||
*/
|
||||
public static MCalendar get (Properties ctx, int C_Calendar_ID)
|
||||
{
|
||||
Integer key = new Integer (C_Calendar_ID);
|
||||
Integer key = Integer.valueOf(C_Calendar_ID);
|
||||
MCalendar retValue = (MCalendar) s_cache.get (key);
|
||||
if (retValue != null)
|
||||
return retValue;
|
||||
|
|
|
@ -57,7 +57,7 @@ public class MCashBook extends X_C_CashBook
|
|||
*/
|
||||
public static MCashBook get(Properties ctx, int C_CashBook_ID, String trxName)
|
||||
{
|
||||
Integer key = new Integer (C_CashBook_ID);
|
||||
Integer key = Integer.valueOf(C_CashBook_ID);
|
||||
MCashBook retValue = (MCashBook) s_cache.get (key);
|
||||
if (retValue != null)
|
||||
return retValue;
|
||||
|
@ -93,7 +93,7 @@ public class MCashBook extends X_C_CashBook
|
|||
.first();
|
||||
if (retValue!=null)
|
||||
{
|
||||
Integer key = new Integer (retValue.getC_CashBook_ID());
|
||||
Integer key = Integer.valueOf(retValue.getC_CashBook_ID());
|
||||
s_cache.put (key, retValue);
|
||||
}
|
||||
return retValue;
|
||||
|
|
|
@ -72,7 +72,7 @@ public class MChangeLog extends X_AD_ChangeLog
|
|||
pstmt = DB.prepareStatement(sql, null);
|
||||
rs = pstmt.executeQuery();
|
||||
while (rs.next())
|
||||
list.add(new Integer(rs.getInt(1)));
|
||||
list.add(Integer.valueOf(rs.getInt(1)));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
|
|
@ -87,7 +87,7 @@ public class MCharge extends X_C_Charge
|
|||
*/
|
||||
public static MCharge get (Properties ctx, int C_Charge_ID)
|
||||
{
|
||||
Integer key = new Integer (C_Charge_ID);
|
||||
Integer key = Integer.valueOf(C_Charge_ID);
|
||||
MCharge retValue = (MCharge)s_cache.get (key);
|
||||
if (retValue != null)
|
||||
return retValue;
|
||||
|
|
|
@ -42,7 +42,7 @@ public class MChatType extends X_CM_ChatType
|
|||
*/
|
||||
public static MChatType get (Properties ctx, int CM_ChatType_ID)
|
||||
{
|
||||
Integer key = new Integer (CM_ChatType_ID);
|
||||
Integer key = Integer.valueOf(CM_ChatType_ID);
|
||||
MChatType retValue = (MChatType)s_cache.get (key);
|
||||
if (retValue != null)
|
||||
return retValue;
|
||||
|
|
|
@ -46,7 +46,7 @@ public class MCity extends X_C_City
|
|||
*/
|
||||
public static MCity get (Properties ctx, int C_City_ID)
|
||||
{
|
||||
Integer key = new Integer (C_City_ID);
|
||||
Integer key = Integer.valueOf(C_City_ID);
|
||||
MCity r = s_Cities.get(key);
|
||||
if (r != null)
|
||||
return r;
|
||||
|
|
|
@ -66,7 +66,7 @@ public class MClient extends X_AD_Client
|
|||
*/
|
||||
public static MClient get (Properties ctx, int AD_Client_ID)
|
||||
{
|
||||
Integer key = new Integer (AD_Client_ID);
|
||||
Integer key = Integer.valueOf(AD_Client_ID);
|
||||
MClient client = (MClient)s_cache.get(key);
|
||||
if (client != null)
|
||||
return client;
|
||||
|
@ -97,7 +97,7 @@ public class MClient extends X_AD_Client
|
|||
.setOrderBy(orderBy)
|
||||
.list();
|
||||
for(MClient client:list ){
|
||||
s_cache.put (new Integer (client.getAD_Client_ID()), client);
|
||||
s_cache.put (Integer.valueOf(client.getAD_Client_ID()), client);
|
||||
}
|
||||
MClient[] retValue = new MClient[list.size ()];
|
||||
list.toArray (retValue);
|
||||
|
|
|
@ -61,7 +61,7 @@ public class MClientInfo extends X_AD_ClientInfo
|
|||
*/
|
||||
public static MClientInfo get (Properties ctx, int AD_Client_ID, String trxName)
|
||||
{
|
||||
Integer key = new Integer (AD_Client_ID);
|
||||
Integer key = Integer.valueOf(AD_Client_ID);
|
||||
MClientInfo info = (MClientInfo)s_cache.get(key);
|
||||
if (info != null)
|
||||
return info;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue