details: /erp/devel/main/rev/58a82148f1c5
changeset: 6739:58a82148f1c5
user: Balamurugan Ramadoss <balamurugan.ramadoss <at> openbravo.com>
date: Wed Mar 17 14:12:25 2010 +0530
summary: Fixes Issue 12600: Tax Amount field is not updated we changed Tax
field
details: /erp/devel/main/rev/88d0c9a94907
changeset: 6740:88d0c9a94907
user: RM packaging bot <staff.rm <at> openbravo.com>
date: Wed Mar 17 20:29:40 2010 +0100
summary: Merge stable changesets from int to main
details: /erp/devel/main/rev/610225e88ac0
changeset: 6741:610225e88ac0
user: RM packaging bot <staff.rm <at> openbravo.com>
date: Wed Mar 17 20:29:41 2010 +0100
summary: Update AD_MODULE version for obx generation
diffstat:
src-db/database/sourcedata/AD_COLUMN.xml | 1 +
src-db/database/sourcedata/AD_FIELD.xml | 4 +-
src-db/database/sourcedata/AD_MODULE.xml | 4 +-
src/org/openbravo/erpCommon/ad_callouts/SL_Invoice_Amt.java | 16 +++++++++++-
4 files changed, 19 insertions(+), 6 deletions(-)
diffs (112 lines):
diff -r 4b170f235044 -r 610225e88ac0 src-db/database/sourcedata/AD_COLUMN.xml
--- a/src-db/database/sourcedata/AD_COLUMN.xml Tue Mar 16 19:38:50 2010 +0100
+++ b/src-db/database/sourcedata/AD_COLUMN.xml Wed Mar 17 20:29:41 2010 +0100
@@ -60318,6 +60318,7 @@
<!--3848--> <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
<!--3848--> <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
<!--3848--> <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--3848--> <AD_CALLOUT_ID><![CDATA[127]]></AD_CALLOUT_ID>
<!--3848--> <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
<!--3848--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
<!--3848--> <POSITION><![CDATA[23]]></POSITION>
diff -r 4b170f235044 -r 610225e88ac0 src-db/database/sourcedata/AD_FIELD.xml
--- a/src-db/database/sourcedata/AD_FIELD.xml Tue Mar 16 19:38:50 2010 +0100
+++ b/src-db/database/sourcedata/AD_FIELD.xml Wed Mar 17 20:29:41 2010 +0100
@@ -79098,7 +79098,7 @@
<!--6430--> <AD_FIELDGROUP_ID><![CDATA[103]]></AD_FIELDGROUP_ID>
<!--6430--> <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
<!--6430--> <DISPLAYLENGTH><![CDATA[10]]></DISPLAYLENGTH>
-<!--6430--> <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--6430--> <ISREADONLY><![CDATA[Y]]></ISREADONLY>
<!--6430--> <SEQNO><![CDATA[180]]></SEQNO>
<!--6430--> <ISSAMELINE><![CDATA[Y]]></ISSAMELINE>
<!--6430--> <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
@@ -79122,7 +79122,7 @@
<!--6431--> <AD_FIELDGROUP_ID><![CDATA[103]]></AD_FIELDGROUP_ID>
<!--6431--> <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
<!--6431--> <DISPLAYLENGTH><![CDATA[10]]></DISPLAYLENGTH>
-<!--6431--> <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--6431--> <ISREADONLY><![CDATA[Y]]></ISREADONLY>
<!--6431--> <SEQNO><![CDATA[190]]></SEQNO>
<!--6431--> <ISSAMELINE><![CDATA[Y]]></ISSAMELINE>
<!--6431--> <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
diff -r 4b170f235044 -r 610225e88ac0 src-db/database/sourcedata/AD_MODULE.xml
--- a/src-db/database/sourcedata/AD_MODULE.xml Tue Mar 16 19:38:50 2010 +0100
+++ b/src-db/database/sourcedata/AD_MODULE.xml Wed Mar 17 20:29:41 2010 +0100
@@ -6,7 +6,7 @@
<!--0--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
<!--0--> <ISACTIVE><![CDATA[Y]]></ISACTIVE>
<!--0--> <NAME><![CDATA[core]]></NAME>
-<!--0--> <VERSION><![CDATA[2.50.16510]]></VERSION>
+<!--0--> <VERSION><![CDATA[2.50.16740]]></VERSION>
<!--0--> <DESCRIPTION><![CDATA[Core module is the base one]]></DESCRIPTION>
<!--0--> <HELP><![CDATA[Core module is the base one, all developments in core
are included as part of the standard Openbravo ERP.]]></HELP>
<!--0--> <URL><![CDATA[www.openbravo.com]]></URL>
@@ -21,7 +21,7 @@
<!--0--> <HASCHARTOFACCOUNTS><![CDATA[N]]></HASCHARTOFACCOUNTS>
<!--0--> <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
<!--0--> <HASREFERENCEDATA><![CDATA[Y]]></HASREFERENCEDATA>
-<!--0--> <VERSION_LABEL><![CDATA[dev]]></VERSION_LABEL>
+<!--0--> <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
<!--0--> <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
<!--0--></AD_MODULE>
diff -r 4b170f235044 -r 610225e88ac0
src/org/openbravo/erpCommon/ad_callouts/SL_Invoice_Amt.java
--- a/src/org/openbravo/erpCommon/ad_callouts/SL_Invoice_Amt.java Tue Mar
16 19:38:50 2010 +0100
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_Invoice_Amt.java Wed Mar
17 20:29:41 2010 +0100
@@ -59,10 +59,11 @@
String strPriceList = vars.getNumericParameter("inppricelist");
String strPriceStd = vars.getNumericParameter("inppricestd");
String strLineNetAmt = vars.getStringParameter("inplinenetamt");
+ String strTaxId = vars.getStringParameter("inpcTaxId");
try {
printPage(response, vars, strChanged, strQtyInvoice, strPriceActual,
strInvoiceId,
- strProduct, strPriceLimit, strTabId, strPriceList, strPriceStd,
strLineNetAmt);
+ strProduct, strPriceLimit, strTabId, strPriceList, strPriceStd,
strLineNetAmt, strTaxId);
} catch (ServletException ex) {
pageErrorCallOut(response);
}
@@ -73,7 +74,7 @@
void printPage(HttpServletResponse response, VariablesSecureApp vars, String
strChanged,
String strQtyInvoice, String strPriceActual, String strInvoiceId, String
strProduct,
String strPriceLimit, String strTabId, String strPriceList, String
strPriceStd,
- String strLineNetAmt) throws IOException, ServletException {
+ String strLineNetAmt, String strTaxId) throws IOException,
ServletException {
if (log4j.isDebugEnabled())
log4j.debug("Output: dataSheet");
XmlDocument xmlDocument = xmlEngine.readXmlTemplate(
@@ -89,12 +90,19 @@
int StdPrecision = Integer.valueOf(strPrecision).intValue();
int PricePrecision = Integer.valueOf(strPricePrecision).intValue();
+ SLInvoiceTaxAmtData[] dataTax = SLInvoiceTaxAmtData.select(this, strTaxId,
strInvoiceId);
+ BigDecimal taxRate = (dataTax[0].rate.equals("") ? new BigDecimal(1) : new
BigDecimal(
+ dataTax[0].rate));
+ Integer taxScale = new Integer(dataTax[0].priceprecision);
+
if (log4j.isDebugEnabled())
log4j.debug("strPriceActual: " + strPriceActual);
if (log4j.isDebugEnabled())
log4j.debug("strPriceLimit: " + strPriceLimit);
if (log4j.isDebugEnabled())
log4j.debug("strLineNetAmt: " + strLineNetAmt);
+ if (log4j.isDebugEnabled())
+ log4j.debug("taxRate: " + taxRate);
BigDecimal qtyInvoice, priceActual, LineNetAmt, priceLimit, priceStd;
@@ -157,9 +165,13 @@
+ FormatUtilities.replaceJS(Utility.messageBD(this,
"UnderLimitPrice", vars
.getLanguage())) + "\"), ");
}
+ BigDecimal taxAmt = ((LineNetAmt.multiply(taxRate)).divide(new
BigDecimal("100"), 12,
+ BigDecimal.ROUND_HALF_EVEN)).setScale(taxScale,
BigDecimal.ROUND_HALF_UP);
+
if (!strChanged.equals("inplinenetamt") ||
LineNetAmt.compareTo(BigDecimal.ZERO) == 0)
resultado.append("new Array(\"inplinenetamt\", " + LineNetAmt.toString()
+ "),");
resultado.append("new Array(\"inptaxbaseamt\", " + LineNetAmt.toString() +
"),");
+ resultado.append("new Array(\"inptaxamt\", " + taxAmt.toPlainString() +
"),");
resultado.append("new Array(\"inppriceactual\", " + priceActual.toString()
+ ")");
resultado.append(");");
xmlDocument.setParameter("array", resultado.toString());
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits