details: https://code.openbravo.com/erp/devel/pi/rev/7f424d6d3d3f changeset: 16442:7f424d6d3d3f user: Ioritz Cia <ioritz.cia <at> openbravo.com> date: Fri May 04 11:56:26 2012 +0200 summary: Fixes issue 20122: Error in Reconciliation window. When saving a transaction in the reconcile window, it errors when you try to reconcile it next.
details: https://code.openbravo.com/erp/devel/pi/rev/95209e7e8c53 changeset: 16443:95209e7e8c53 user: Ioritz Cia <ioritz.cia <at> openbravo.com> date: Mon May 07 11:35:39 2012 +0200 summary: Fixes issue 20253: Total Gross Amount is not updated correctly. details: https://code.openbravo.com/erp/devel/pi/rev/f7213e32a921 changeset: 16444:f7213e32a921 user: Ioritz Cia <ioritz.cia <at> openbravo.com> date: Mon May 07 12:27:17 2012 +0200 summary: Fixes issue 20202: Stock report always shows Kgs as Unity of weight. details: https://code.openbravo.com/erp/devel/pi/rev/fdeddce9c1fd changeset: 16445:fdeddce9c1fd user: Ioritz Cia <ioritz.cia <at> openbravo.com> date: Mon May 07 12:49:59 2012 +0200 summary: Fixes issue 20250: Conversion Rate error with date 29/02/2012. details: https://code.openbravo.com/erp/devel/pi/rev/0f8d38881acc changeset: 16446:0f8d38881acc user: Ioritz Cia <ioritz.cia <at> openbravo.com> date: Mon May 07 16:11:44 2012 +0200 summary: Fixes issue 20263: Can not unprocess amortization in accounting status 'error'. details: https://code.openbravo.com/erp/devel/pi/rev/8f9bfd7b3d7f changeset: 16447:8f9bfd7b3d7f user: Ioritz Cia <ioritz.cia <at> openbravo.com> date: Mon May 07 17:15:04 2012 +0200 summary: Fixes issue 20246: Message in Tax Payment needs to be improved. Tax payment process does not show a properly message when the document is posted. diffstat: modules/org.openbravo.advpaymentmngt/src-db/database/model/functions/APRM_TAX_PAYMENT.xml | 2 +- modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/Reconciliation.html | 1 - modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/Reconciliation.java | 11 +- modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/dao/TransactionsDao.java | 23 + referencedata/standard/Unit_of_Measure.xml | 147 ++++++++ src-db/database/model/functions/A_AMORTIZATION_PROCESS.xml | 2 +- src-db/database/model/triggers/C_INVOICETAX_TRG2.xml | 4 + src-db/database/sourcedata/AD_DATASET.xml | 15 + src-db/database/sourcedata/AD_DATASET_TABLE.xml | 70 ++++ src-db/database/sourcedata/referencedData/C_UOM.xml | 169 ---------- src/org/openbravo/erpCommon/ad_reports/ReportWarehousePartner_data.xsql | 7 +- src/org/openbravo/erpReports/RptC_Bpartner.java | 12 +- src/org/openbravo/erpReports/RptC_BpartnerSales_data.xsql | 12 +- 13 files changed, 291 insertions(+), 184 deletions(-) diffs (truncated from 647 to 300 lines): diff -r db844fd182a7 -r 8f9bfd7b3d7f modules/org.openbravo.advpaymentmngt/src-db/database/model/functions/APRM_TAX_PAYMENT.xml --- a/modules/org.openbravo.advpaymentmngt/src-db/database/model/functions/APRM_TAX_PAYMENT.xml Tue May 08 17:58:23 2012 +0200 +++ b/modules/org.openbravo.advpaymentmngt/src-db/database/model/functions/APRM_TAX_PAYMENT.xml Mon May 07 17:15:04 2012 +0200 @@ -209,7 +209,7 @@ ELSIF (v_ispayment = 'Y' AND v_Processed = 'Y') THEN select posted into v_posted from FIN_PAYMENT where FIN_PAYMENT_ID = v_FIN_PAYMENT_ID; if v_posted = 'Y' then - RAISE_APPLICATION_ERROR(-20000, '@PaymentDocumentPosted@') ; + RAISE_APPLICATION_ERROR(-20000, '@PostedDocument@') ; end if; select count(*) INTO v_Count from fin_finacc_transaction diff -r db844fd182a7 -r 8f9bfd7b3d7f modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/Reconciliation.html --- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/Reconciliation.html Tue May 08 17:58:23 2012 +0200 +++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/Reconciliation.html Mon May 07 17:15:04 2012 +0200 @@ -310,7 +310,6 @@ //initialize_MessageBox('messageBoxID'); if (document.frmMain.inpIsFirstLoad.value == "true") { - updateTotalAmounts(); document.frmMain.inpIsFirstLoad.value = "false"; } updateWhenAjaxResponse(); diff -r db844fd182a7 -r 8f9bfd7b3d7f modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/Reconciliation.java --- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/Reconciliation.java Tue May 08 17:58:23 2012 +0200 +++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/Reconciliation.java Mon May 07 17:15:04 2012 +0200 @@ -342,9 +342,14 @@ xmlDocument.setParameter("calcTotalDeposit", BigDecimal.ZERO.toString()); xmlDocument.setParameter("calcDifferenceToClear", currentEndBalance.subtract(beginBalance) .toString()); - xmlDocument.setParameter("calcCurrentlyCleared", BigDecimal.ZERO.toString()); - xmlDocument.setParameter("calcDifference", currentEndBalance.subtract(beginBalance) - .toString()); + xmlDocument.setParameter("calcCurrentlyCleared", + TransactionsDao.getCurrentlyClearedAmt(account.getId()).toString()); + xmlDocument + .setParameter( + "calcDifference", + currentEndBalance.subtract( + beginBalance.add(TransactionsDao.getCurrentlyClearedAmt(account.getId()))) + .toString()); OBContext.setAdminMode(); try { diff -r db844fd182a7 -r 8f9bfd7b3d7f modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/dao/TransactionsDao.java --- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/dao/TransactionsDao.java Tue May 08 17:58:23 2012 +0200 +++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/dao/TransactionsDao.java Mon May 07 17:15:04 2012 +0200 @@ -25,6 +25,8 @@ import java.util.Date; import java.util.List; +import org.hibernate.Query; +import org.hibernate.Session; import org.hibernate.criterion.Restrictions; import org.openbravo.advpaymentmngt.utility.FIN_Utility; import org.openbravo.base.exception.OBException; @@ -381,4 +383,25 @@ } } + + public static BigDecimal getCurrentlyClearedAmt(String strAccountId) { + final StringBuilder hqlString = new StringBuilder(); + hqlString.append("select sum(ft.depositAmount) - sum(ft.paymentAmount)"); + hqlString.append(" from FIN_Finacc_Transaction as ft"); + hqlString.append(" left outer join ft.reconciliation as rec"); + hqlString.append(" where ft.account.id = '" + strAccountId + "'"); + hqlString.append(" and rec.processed = 'N'"); + hqlString.append(" and ft.processed = 'Y'"); + + final Session session = OBDal.getInstance().getSession(); + final Query query = session.createQuery(hqlString.toString()); + + for (Object resultObject : query.list()) { + if (resultObject != null && resultObject.getClass().isInstance(BigDecimal.ONE)) { + return (BigDecimal) resultObject; + } + } + + return BigDecimal.ZERO; + } } diff -r db844fd182a7 -r 8f9bfd7b3d7f referencedata/standard/Unit_of_Measure.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/referencedata/standard/Unit_of_Measure.xml Mon May 07 17:15:04 2012 +0200 @@ -0,0 +1,147 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ob:Openbravo xmlns:ob="http://www.openbravo.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <UOM id="100" identifier="Unit"> + <id>100</id> + <active>true</active> + <eDICode>EA</eDICode> + <symbol>Ud </symbol> + <name>Unit</name> + <description xsi:nil="true"/> + <standardPrecision>0</standardPrecision> + <costingPrecision>4</costingPrecision> + <default>true</default> + <breakdown>false</breakdown> + </UOM> + <UOM id="101" identifier="Hour"> + <id>101</id> + <active>true</active> + <eDICode>HR</eDICode> + <symbol>h </symbol> + <name>Hour</name> + <description xsi:nil="true"/> + <standardPrecision>2</standardPrecision> + <costingPrecision>2</costingPrecision> + <default>false</default> + <breakdown>false</breakdown> + </UOM> + <UOM id="102" identifier="Day"> + <id>102</id> + <active>true</active> + <eDICode>DA</eDICode> + <symbol>d </symbol> + <name>Day</name> + <description xsi:nil="true"/> + <standardPrecision>2</standardPrecision> + <costingPrecision>2</costingPrecision> + <default>false</default> + <breakdown>false</breakdown> + </UOM> + <UOM id="103" identifier="Minutes"> + <id>103</id> + <active>true</active> + <eDICode>MJ</eDICode> + <symbol>min</symbol> + <name>Minutes</name> + <description>(lowest unit for resorce assigments)</description> + <standardPrecision>0</standardPrecision> + <costingPrecision>0</costingPrecision> + <default>false</default> + <breakdown>false</breakdown> + </UOM> + <UOM id="104" identifier="Labour day"> + <id>104</id> + <active>true</active> + <eDICode>WD</eDICode> + <symbol>D </symbol> + <name>Labour day</name> + <description>8 hours</description> + <standardPrecision>2</standardPrecision> + <costingPrecision>2</costingPrecision> + <default>false</default> + <breakdown>false</breakdown> + </UOM> + <UOM id="105" identifier="Week"> + <id>105</id> + <active>true</active> + <eDICode>WK</eDICode> + <symbol>w </symbol> + <name>Week</name> + <description xsi:nil="true"/> + <standardPrecision>2</standardPrecision> + <costingPrecision>2</costingPrecision> + <default>false</default> + <breakdown>false</breakdown> + </UOM> + <UOM id="106" identifier="Month"> + <id>106</id> + <active>true</active> + <eDICode>MO</eDICode> + <symbol>m </symbol> + <name>Month</name> + <description>30 days</description> + <standardPrecision>2</standardPrecision> + <costingPrecision>2</costingPrecision> + <default>false</default> + <breakdown>false</breakdown> + </UOM> + <UOM id="107" identifier="Labour month"> + <id>107</id> + <active>true</active> + <eDICode>WM</eDICode> + <symbol>M </symbol> + <name>Labour month</name> + <description>20 days</description> + <standardPrecision>2</standardPrecision> + <costingPrecision>2</costingPrecision> + <default>false</default> + <breakdown>false</breakdown> + </UOM> + <UOM id="108" identifier="Year"> + <id>108</id> + <active>true</active> + <eDICode>YR</eDICode> + <symbol>Y </symbol> + <name>Year</name> + <description xsi:nil="true"/> + <standardPrecision>2</standardPrecision> + <costingPrecision>2</costingPrecision> + <default>false</default> + <breakdown>false</breakdown> + </UOM> + <UOM id="2EBC93C05D75431E9EEFB29CEC76F244" identifier="Ounce"> + <id>2EBC93C05D75431E9EEFB29CEC76F244</id> + <active>true</active> + <eDICode>OZ</eDICode> + <symbol>oz </symbol> + <name>Ounce</name> + <description xsi:nil="true"/> + <standardPrecision>2</standardPrecision> + <costingPrecision>2</costingPrecision> + <default>false</default> + <breakdown>false</breakdown> + </UOM> + <UOM id="6FA87C4EE1FD4C86940A5F2E47C429DA" identifier="Pound"> + <id>6FA87C4EE1FD4C86940A5F2E47C429DA</id> + <active>true</active> + <eDICode>LB</eDICode> + <symbol>Lb </symbol> + <name>Pound</name> + <description xsi:nil="true"/> + <standardPrecision>2</standardPrecision> + <costingPrecision>2</costingPrecision> + <default>false</default> + <breakdown>false</breakdown> + </UOM> + <UOM id="72BA247D31F745F3AF11F74A5E2CCBEF" identifier="Kilogram"> + <id>72BA247D31F745F3AF11F74A5E2CCBEF</id> + <active>true</active> + <eDICode>KG</eDICode> + <symbol>kg </symbol> + <name>Kilogram</name> + <description xsi:nil="true"/> + <standardPrecision>2</standardPrecision> + <costingPrecision>2</costingPrecision> + <default>false</default> + <breakdown>false</breakdown> + </UOM> +</ob:Openbravo> diff -r db844fd182a7 -r 8f9bfd7b3d7f src-db/database/model/functions/A_AMORTIZATION_PROCESS.xml --- a/src-db/database/model/functions/A_AMORTIZATION_PROCESS.xml Tue May 08 17:58:23 2012 +0200 +++ b/src-db/database/model/functions/A_AMORTIZATION_PROCESS.xml Mon May 07 17:15:04 2012 +0200 @@ -64,7 +64,7 @@ INTO v_PROCESSED, v_POSTED, v_AD_Org_ID, v_date FROM A_AMORTIZATION WHERE A_AMORTIZATION_ID=V_Record_ID; - IF(v_PROCESSED='Y' AND v_POSTED='N') THEN + IF(v_PROCESSED='Y' AND v_POSTED<>'Y') THEN --UnProcess amortization v_ResultStr:='ProcessAmortization'; UPDATE A_Amortization diff -r db844fd182a7 -r 8f9bfd7b3d7f src-db/database/model/triggers/C_INVOICETAX_TRG2.xml --- a/src-db/database/model/triggers/C_INVOICETAX_TRG2.xml Tue May 08 17:58:23 2012 +0200 +++ b/src-db/database/model/triggers/C_INVOICETAX_TRG2.xml Mon May 07 17:15:04 2012 +0200 @@ -117,6 +117,10 @@ END IF; END IF; + UPDATE c_invoice + SET grandtotal = grandtotal + taxamountnew + WHERE c_invoice_id = v_invoiceid; + END C_INVOICETAX_TRG2 ]]></body> </trigger> diff -r db844fd182a7 -r 8f9bfd7b3d7f src-db/database/sourcedata/AD_DATASET.xml --- a/src-db/database/sourcedata/AD_DATASET.xml Tue May 08 17:58:23 2012 +0200 +++ b/src-db/database/sourcedata/AD_DATASET.xml Mon May 07 17:15:04 2012 +0200 @@ -43,6 +43,21 @@ <!--10C9DA9D9A6345DC9080E0102492FF1B--> <CHECKSUM><![CDATA[243275087004039337180988074877255832548]]></CHECKSUM> <!--10C9DA9D9A6345DC9080E0102492FF1B--></AD_DATASET> +<!--575BE80AA7864187966A3FCFA1B1854D--><AD_DATASET> +<!--575BE80AA7864187966A3FCFA1B1854D--> <AD_DATASET_ID><![CDATA[575BE80AA7864187966A3FCFA1B1854D]]></AD_DATASET_ID> +<!--575BE80AA7864187966A3FCFA1B1854D--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> +<!--575BE80AA7864187966A3FCFA1B1854D--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID> +<!--575BE80AA7864187966A3FCFA1B1854D--> <ISACTIVE><![CDATA[N]]></ISACTIVE> +<!--575BE80AA7864187966A3FCFA1B1854D--> <VALUE><![CDATA[UOM]]></VALUE> +<!--575BE80AA7864187966A3FCFA1B1854D--> <NAME><![CDATA[Unit of Measure]]></NAME> +<!--575BE80AA7864187966A3FCFA1B1854D--> <DESCRIPTION><![CDATA[Dataset for system's unit of measure]]></DESCRIPTION> +<!--575BE80AA7864187966A3FCFA1B1854D--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> +<!--575BE80AA7864187966A3FCFA1B1854D--> <EXPORT><![CDATA[N]]></EXPORT> +<!--575BE80AA7864187966A3FCFA1B1854D--> <ACCESSLEVEL><![CDATA[4]]></ACCESSLEVEL> +<!--575BE80AA7864187966A3FCFA1B1854D--> <EXPORTALLOWED><![CDATA[Y]]></EXPORTALLOWED> +<!--575BE80AA7864187966A3FCFA1B1854D--> <CHECKSUM><![CDATA[308697733150044261045374981032369053451]]></CHECKSUM> +<!--575BE80AA7864187966A3FCFA1B1854D--></AD_DATASET> + <!--D81C5C810AEF47C690E4F688ABC8AAC8--><AD_DATASET> <!--D81C5C810AEF47C690E4F688ABC8AAC8--> <AD_DATASET_ID><![CDATA[D81C5C810AEF47C690E4F688ABC8AAC8]]></AD_DATASET_ID> <!--D81C5C810AEF47C690E4F688ABC8AAC8--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> diff -r db844fd182a7 -r 8f9bfd7b3d7f src-db/database/sourcedata/AD_DATASET_TABLE.xml --- a/src-db/database/sourcedata/AD_DATASET_TABLE.xml Tue May 08 17:58:23 2012 +0200 +++ b/src-db/database/sourcedata/AD_DATASET_TABLE.xml Mon May 07 17:15:04 2012 +0200 @@ -923,6 +923,20 @@ <!--676D5346B0C545BF92B94A691204648B--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> <!--676D5346B0C545BF92B94A691204648B--></AD_DATASET_TABLE> +<!--6CFD9E37121E4805AB0536168B7C0FB1--><AD_DATASET_TABLE> +<!--6CFD9E37121E4805AB0536168B7C0FB1--> <AD_DATASET_TABLE_ID><![CDATA[6CFD9E37121E4805AB0536168B7C0FB1]]></AD_DATASET_TABLE_ID> +<!--6CFD9E37121E4805AB0536168B7C0FB1--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> +<!--6CFD9E37121E4805AB0536168B7C0FB1--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID> +<!--6CFD9E37121E4805AB0536168B7C0FB1--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> +<!--6CFD9E37121E4805AB0536168B7C0FB1--> <AD_DATASET_ID><![CDATA[1]]></AD_DATASET_ID> +<!--6CFD9E37121E4805AB0536168B7C0FB1--> <AD_TABLE_ID><![CDATA[300]]></AD_TABLE_ID> +<!--6CFD9E37121E4805AB0536168B7C0FB1--> <INCLUDEALLCOLUMNS><![CDATA[Y]]></INCLUDEALLCOLUMNS> +<!--6CFD9E37121E4805AB0536168B7C0FB1--> <WHERECLAUSE><![CDATA[ad_client_id='0']]></WHERECLAUSE> ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Openbravo-commits mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openbravo-commits
