details: https://code.openbravo.com/erp/devel/pi/rev/428e2ed70542 changeset: 18526:428e2ed70542 user: Pandeeswari Ramakrishnan <pandeeswari.ramakrishnan <at> openbravo.com> date: Wed Nov 07 10:05:49 2012 +0100 summary: Fixes Issue 22190: Unnecessary code in ReportGeneralLedgerJournal
details: https://code.openbravo.com/erp/devel/pi/rev/64eab57b5609 changeset: 18527:64eab57b5609 user: Pandeeswari Ramakrishnan <pandeeswari.ramakrishnan <at> openbravo.com> date: Wed Oct 31 16:44:30 2012 +0100 summary: Fixes Issue 22177: Empty option is available on Accounting Schema combo box details: https://code.openbravo.com/erp/devel/pi/rev/9d488c89c09e changeset: 18528:9d488c89c09e user: Pandeeswari Ramakrishnan <pandeeswari.ramakrishnan <at> openbravo.com> date: Wed Nov 07 15:33:57 2012 +0100 summary: Fixes Issue 22106: NPE in purchase invoice while adding payment details: https://code.openbravo.com/erp/devel/pi/rev/a08511286b67 changeset: 18529:a08511286b67 user: Pandeeswari Ramakrishnan <pandeeswari.ramakrishnan <at> openbravo.com> date: Thu Nov 08 12:29:22 2012 +0100 summary: Fixes Issue 22004: Wrong Amortization Percent details: https://code.openbravo.com/erp/devel/pi/rev/5df4320d0a69 changeset: 18530:5df4320d0a69 user: Pandeeswari Ramakrishnan <pandeeswari.ramakrishnan <at> openbravo.com> date: Fri Nov 09 12:48:06 2012 +0100 summary: Fixes Issue 22248: Generate invoice from Receipt shows error message with uuid diffstat: modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromInvoice.java | 11 +++- src-db/database/model/functions/A_ASSET_POST.xml | 6 +- src-db/database/model/functions/M_INOUT_CREATEINVOICE.xml | 2 +- src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedger.html | 4 +- src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedgerJournal.java | 28 +++------ src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedgerJournal.xml | 1 - 6 files changed, 25 insertions(+), 27 deletions(-) diffs (205 lines): diff -r a72b44e625e7 -r 5df4320d0a69 modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromInvoice.java --- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromInvoice.java Mon Nov 12 19:34:06 2012 +0100 +++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromInvoice.java Fri Nov 09 12:48:06 2012 +0100 @@ -11,7 +11,7 @@ * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU - * All portions are Copyright (C) 2010-2011 Openbravo SLU + * All portions are Copyright (C) 2010-2012 Openbravo SLU * All Rights Reserved. * Contributor(s): Enterprise Intelligence Systems (http://www.eintel.com.au). ************************************************************************* @@ -421,6 +421,15 @@ BigDecimal exchangeRate = findExchangeRate(vars, paymentCurrency, financialAccountCurrency, new Date(), OBDal.getInstance().get(Organization.class, strOrgId), conversionRatePrecision); + + if (exchangeRate == null) { + final OBError myMessage = Utility.translateError(this, vars, vars.getLanguage(), + Utility.messageBD(this, "NoCurrencyConversion", vars.getLanguage())); + vars.setMessage(strTabId, myMessage); + printPageClosePopUp(response, vars); + return; + } + xmlDocument.setParameter("exchangeRate", exchangeRate.toPlainString()); } finally { diff -r a72b44e625e7 -r 5df4320d0a69 src-db/database/model/functions/A_ASSET_POST.xml --- a/src-db/database/model/functions/A_ASSET_POST.xml Mon Nov 12 19:34:06 2012 +0100 +++ b/src-db/database/model/functions/A_ASSET_POST.xml Fri Nov 09 12:48:06 2012 +0100 @@ -197,8 +197,8 @@ v_PercentageGeneral:=v_AMORTIZATIONPERCENTAGE; v_UseLifeYears:=ceil(100/v_PercentageGeneral) ; else - -- v_PercentageGeneral := 100 / v_USELIFEYEARS; - v_PercentageGeneral:=((v_AMORTIZATIONVALUEAMT-v_DEPRECIATEDPREVIOUSAMT-v_depreciatedPlan) *100/v_AMORTIZATIONVALUEAMT) /(v_USELIFEYEARS-v_DepreciatedLines) ; + v_PercentageGeneral := (100-(v_depreciatedPlan*100/(v_AMORTIZATIONVALUEAMT-v_DEPRECIATEDPREVIOUSAMT))) / (v_USELIFEYEARS-v_DepreciatedLines); + --v_PercentageGeneral:=((v_AMORTIZATIONVALUEAMT-v_DEPRECIATEDPREVIOUSAMT-v_depreciatedPlan) *100/v_AMORTIZATIONVALUEAMT) /(v_USELIFEYEARS-v_DepreciatedLines) ; SELECT to_number(TO_DATE(ADD_MONTHS(v_AMORTIZATIONSTARTDATE, 12*v_USELIFEYEARS)) - v_AMORTIZATIONSTARTDATE) INTO v_TOTAL_DAYS FROM DUAL; @@ -260,7 +260,7 @@ v_PERCENTAGE:=100 - v_PERCENTAGE; finish:=true; ELSE - v_AMOUNT:=(v_AMORTIZATIONVALUEAMT+ v_DEPRECIATEDPREVIOUSAMT) *v_PERCENTAGE/100; + v_AMOUNT:=(v_AMORTIZATIONVALUEAMT) *v_PERCENTAGE/100; END IF; if v_percentage>0 then Ad_Sequence_Next('A_Amortizationline', '1000000', v_AMORTIZATIONLINE) ; diff -r a72b44e625e7 -r 5df4320d0a69 src-db/database/model/functions/M_INOUT_CREATEINVOICE.xml --- a/src-db/database/model/functions/M_INOUT_CREATEINVOICE.xml Mon Nov 12 19:34:06 2012 +0100 +++ b/src-db/database/model/functions/M_INOUT_CREATEINVOICE.xml Fri Nov 09 12:48:06 2012 +0100 @@ -144,7 +144,7 @@ END; -- We have an Invoice IF(v_DocumentNo IS NOT NULL) THEN - v_Message:='@ShipmentCreateDocAlreadyExists@ = ' || v_DocumentNo || ' (' || v_Invoice_ID || ')'; + v_Message:='@ShipmentCreateDocAlreadyExists@ = ' || v_DocumentNo; RAISE_APPLICATION_ERROR(-20000, v_Message); -- Shipment must be complete ELSIF(CUR_Shipment.DocStatus NOT IN('CO', 'CL')) THEN diff -r a72b44e625e7 -r 5df4320d0a69 src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedger.html --- a/src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedger.html Mon Nov 12 19:34:06 2012 +0100 +++ b/src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedger.html Fri Nov 09 12:48:06 2012 +0100 @@ -377,8 +377,8 @@ </tr> <tr> <td class="TitleCell"> <span class="LabelText">General Ledger</span></td> - <td class="Combo_ContentCell" colspan="2"> <select name="inpcAcctSchemaId" id="inpcAcctSchemaId" class="ComboKey Combo_TwoCells_width"> - <option value=""> <div id="reportC_ACCTSCHEMA_ID"></div></option> + <td class="Combo_ContentCell" colspan="2"> <select name="inpcAcctSchemaId" id="inpcAcctSchemaId" class="ComboKey Combo_TwoCells_width required Combo_focus" required="true"> + <div id="reportC_ACCTSCHEMA_ID"></div> </select> </td> </tr> diff -r a72b44e625e7 -r 5df4320d0a69 src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedgerJournal.java --- a/src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedgerJournal.java Mon Nov 12 19:34:06 2012 +0100 +++ b/src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedgerJournal.java Fri Nov 09 12:48:06 2012 +0100 @@ -20,7 +20,6 @@ import java.io.IOException; import java.io.PrintWriter; -import java.math.BigDecimal; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -122,13 +121,11 @@ "1"); String strEntryNo = vars.getGlobalVariable("inpEntryNo", "ReportGeneralLedgerJournal|EntryNo", "1"); - String strInitialBalance = vars.getNumericGlobalVariable("inpInitialBalance", - "ReportGeneralLedgerJournal|InitialBalance", "0"); String strShowDescription = vars.getGlobalVariable("inpShowDescription", "ReportGeneralLedgerJournal|ShowDescription", ""); printPageDataSheet(response, vars, strDateFrom, strDateTo, strDocument, strOrg, strTable, strRecord, "", strcAcctSchemaId, strShowClosing, strShowReg, strShowOpening, strPageNo, - strEntryNo, strInitialBalance, strShowDescription, strShowRegular, "", ""); + strEntryNo, strShowDescription, strShowRegular, "", ""); } else if (vars.commandIn("DIRECT")) { String strTable = vars.getGlobalVariable("inpTable", "ReportGeneralLedgerJournal|Table"); String strRecord = vars.getGlobalVariable("inpRecord", "ReportGeneralLedgerJournal|Record"); @@ -155,14 +152,14 @@ setHistoryCommand(request, "DIRECT"); vars.setSessionValue("ReportGeneralLedgerJournal.initRecordNumber", "0"); printPageDataSheet(response, vars, "", "", "", "", strTable, strRecord, "", strcAcctSchemaId, - "", "", "", "1", "1", "0", "", "Y", schemas, strPosted); + "", "", "", "1", "1", "", "Y", schemas, strPosted); } else if (vars.commandIn("DIRECT2")) { String strFactAcctGroupId = vars.getGlobalVariable("inpFactAcctGroupId", "ReportGeneralLedgerJournal|FactAcctGroupId"); setHistoryCommand(request, "DIRECT2"); vars.setSessionValue("ReportGeneralLedgerJournal.initRecordNumber", "0"); printPageDataSheet(response, vars, "", "", "", "", "", "", strFactAcctGroupId, "", "", "", - "", "1", "1", "0", "", "Y", "", ""); + "", "1", "1", "", "Y", "", ""); } else if (vars.commandIn("FIND")) { String strcAcctSchemaId = vars.getRequestGlobalVariable("inpcAcctSchemaId", "ReportGeneralLedger|cAcctSchemaId"); @@ -211,15 +208,13 @@ "ReportGeneralLedgerJournal|PageNo"); String strEntryNo = vars.getRequestGlobalVariable("inpEntryNo", "ReportGeneralLedgerJournal|EntryNo"); - String strInitialBalance = vars.getNumericRequestGlobalVariable("inpInitialBalance", - "ReportGeneralLedgerJournal|InitialBalance"); String strShowDescription = vars.getRequestGlobalVariable("inpShowDescription", "ReportGeneralLedgerJournal|ShowDescription"); if (strShowDescription == null || "".equals(strShowDescription)) vars.setSessionValue("ReportGeneralLedgerJournal|ShowDescription", "N"); printPageDataSheet(response, vars, strDateFrom, strDateTo, strDocument, strOrg, "", "", "", strcAcctSchemaId, strShowClosing, strShowReg, strShowOpening, strPageNo, strEntryNo, - strInitialBalance, strShowDescription, strShowRegular, "", ""); + strShowDescription, strShowRegular, "", ""); } else if (vars.commandIn("PDF", "XLS")) { if (log4j.isDebugEnabled()) log4j.debug("PDF"); @@ -265,8 +260,6 @@ "1"); String strEntryNo = vars.getGlobalVariable("inpEntryNo", "ReportGeneralLedgerJournal|EntryNo", "1"); - String strInitialBalance = vars.getNumericGlobalVariable("inpInitialBalance", - "ReportGeneralLedgerJournal|InitialBalance", "0"); String strShowDescription = vars.getRequestGlobalVariable("inpShowDescription", "ReportGeneralLedgerJournal|ShowDescription"); if (strShowDescription == null || "".equals(strShowDescription)) @@ -298,8 +291,8 @@ setHistoryCommand(request, "DEFAULT"); printPagePDF(response, vars, strDateFrom, strDateTo, strDocument, strOrg, strTable, strRecord, strFactAcctGroupId, strcAcctSchemaId, strShowClosing, strShowReg, - strShowOpening, strPageNo, strEntryNo, strInitialBalance, - "Y".equals(strShowDescription) ? "Y" : "", strShowRegular); + strShowOpening, strPageNo, strEntryNo, "Y".equals(strShowDescription) ? "Y" : "", + strShowRegular); } else if (vars.commandIn("PREVIOUS_RELATION")) { String strInitRecord = vars.getSessionValue("ReportGeneralLedgerJournal.initRecordNumber"); String strPreviousRecordRange = vars.getSessionValue(PREVIOUS_RANGE); @@ -362,8 +355,8 @@ String strDateFrom, String strDateTo, String strDocument, String strOrg, String strTable, String strRecord, String strFactAcctGroupId, String strcAcctSchemaId, String strShowClosing, String strShowReg, String strShowOpening, String strPageNo, String strEntryNo, - String strInitialBalance, String strShowDescription, String strShowRegular, String accShemas, - String strPosted) throws IOException, ServletException { + String strShowDescription, String strShowRegular, String accShemas, String strPosted) + throws IOException, ServletException { String strRecordRange = Utility.getContext(this, vars, "#RecordRange", "ReportGeneralLedgerJournal"); int intRecordRangePredefined = (strRecordRange.equals("") ? 0 : Integer @@ -600,7 +593,6 @@ vars.setSessionValue("ReportGeneralLedgerJournal|Table", strTable); xmlDocument.setParameter("inpPageNo", strPageNo); xmlDocument.setParameter("inpEntryNo", strEntryNo); - xmlDocument.setParameter("inpInitialBalance", strInitialBalance); // If none of the "show" flags is active, then regular is checked xmlDocument.setParameter("showRegular", ("".equals(strShowRegular)) ? "N" : strShowRegular); xmlDocument.setParameter("showClosing", ("".equals(strShowClosing)) ? "N" : strShowClosing); @@ -628,8 +620,7 @@ String strDateFrom, String strDateTo, String strDocument, String strOrg, String strTable, String strRecord, String strFactAcctGroupId, String strcAcctSchemaId, String strShowClosing, String strShowReg, String strShowOpening, String strPageNo, String strEntryNo, - String strInitialBalance, String strShowDescription, String strShowRegular) - throws IOException, ServletException { + String strShowDescription, String strShowRegular) throws IOException, ServletException { ReportGeneralLedgerJournalData[] data = null; @@ -688,7 +679,6 @@ parameters.put("ShowDescription", strShowDescription); parameters.put("Subtitle", strSubtitle); parameters.put("PageNo", strPageNo); - parameters.put("InitialBalance", new BigDecimal(strInitialBalance)); parameters.put("InitialEntryNumber", strEntryNo); parameters.put("TaxID", ReportGeneralLedgerJournalData.selectOrgTaxID(this, strOrg)); renderJR(vars, response, strReportName, "JournalEntriesReport", strOutput, parameters, data, diff -r a72b44e625e7 -r 5df4320d0a69 src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedgerJournal.xml --- a/src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedgerJournal.xml Mon Nov 12 19:34:06 2012 +0100 +++ b/src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedgerJournal.xml Fri Nov 09 12:48:06 2012 +0100 @@ -48,7 +48,6 @@ <PARAMETER id="posted" name="posted" attribute="value" default=""/> <PARAMETER id="paramPageNo" name="inpPageNo" attribute="value" default="1"/> <PARAMETER id="paramEntryNo" name="inpEntryNo" attribute="value" default="1"/> - <PARAMETER id="paramInitialBalance" name="inpInitialBalance" format="euroEdition" attribute="value" default="0"/> <PARAMETER id="fieldCheck" name="check" default="Y"/> <PARAMETER id="paramShowRegular" name="showRegular" boolean="checked" withId="fieldCheck"/> <PARAMETER id="paramShowClosing" name="showClosing" boolean="checked" withId="fieldCheck"/> ------------------------------------------------------------------------------ Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov _______________________________________________ Openbravo-commits mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openbravo-commits
