details: https://code.openbravo.com/erp/devel/pi/rev/d5ef0e6e6273 changeset: 19931:d5ef0e6e6273 user: Ioritz Cia <ioritz.cia <at> openbravo.com> date: Mon Mar 18 13:32:51 2013 +0100 summary: Fixes issue 23307: Error in trial balance translation.
details: https://code.openbravo.com/erp/devel/pi/rev/4d356fa5dded changeset: 19932:4d356fa5dded user: Ioritz Cia <ioritz.cia <at> openbravo.com> date: Mon Mar 18 16:34:51 2013 +0100 summary: Fixes issue 23314: Trial balance Organization and General Legder are not shown. diffstat: src-db/database/sourcedata/AD_MESSAGE.xml | 11 + src/org/openbravo/erpCommon/ad_reports/ReportTrialBalance.java | 24 +++- src/org/openbravo/erpCommon/ad_reports/ReportTrialBalanceExcel.jrxml | 2 +- src/org/openbravo/erpCommon/ad_reports/ReportTrialBalancePDF.jrxml | 56 +++++----- 4 files changed, 58 insertions(+), 35 deletions(-) diffs (249 lines): diff -r e7473bc1847d -r 4d356fa5dded src-db/database/sourcedata/AD_MESSAGE.xml --- a/src-db/database/sourcedata/AD_MESSAGE.xml Mon Mar 18 15:56:50 2013 +0100 +++ b/src-db/database/sourcedata/AD_MESSAGE.xml Mon Mar 18 16:34:51 2013 +0100 @@ -19839,6 +19839,17 @@ <!--A7A03E75597E401EAB5632F9DA9355BF--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> <!--A7A03E75597E401EAB5632F9DA9355BF--></AD_MESSAGE> +<!--A7F4F16CC6BF44C89EAA8EFD71ABD397--><AD_MESSAGE> +<!--A7F4F16CC6BF44C89EAA8EFD71ABD397--> <AD_MESSAGE_ID><![CDATA[A7F4F16CC6BF44C89EAA8EFD71ABD397]]></AD_MESSAGE_ID> +<!--A7F4F16CC6BF44C89EAA8EFD71ABD397--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> +<!--A7F4F16CC6BF44C89EAA8EFD71ABD397--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID> +<!--A7F4F16CC6BF44C89EAA8EFD71ABD397--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> +<!--A7F4F16CC6BF44C89EAA8EFD71ABD397--> <VALUE><![CDATA[asof]]></VALUE> +<!--A7F4F16CC6BF44C89EAA8EFD71ABD397--> <MSGTEXT><![CDATA[As of]]></MSGTEXT> +<!--A7F4F16CC6BF44C89EAA8EFD71ABD397--> <MSGTYPE><![CDATA[I]]></MSGTYPE> +<!--A7F4F16CC6BF44C89EAA8EFD71ABD397--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> +<!--A7F4F16CC6BF44C89EAA8EFD71ABD397--></AD_MESSAGE> + <!--A833B74092AB46698E7FBE68721800F1--><AD_MESSAGE> <!--A833B74092AB46698E7FBE68721800F1--> <AD_MESSAGE_ID><![CDATA[A833B74092AB46698E7FBE68721800F1]]></AD_MESSAGE_ID> <!--A833B74092AB46698E7FBE68721800F1--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> diff -r e7473bc1847d -r 4d356fa5dded src/org/openbravo/erpCommon/ad_reports/ReportTrialBalance.java --- a/src/org/openbravo/erpCommon/ad_reports/ReportTrialBalance.java Mon Mar 18 15:56:50 2013 +0100 +++ b/src/org/openbravo/erpCommon/ad_reports/ReportTrialBalance.java Mon Mar 18 16:34:51 2013 +0100 @@ -38,6 +38,7 @@ import org.openbravo.base.filter.IsIDFilter; import org.openbravo.base.secureApp.HttpSecureAppServlet; import org.openbravo.base.secureApp.VariablesSecureApp; +import org.openbravo.dal.service.OBDal; import org.openbravo.erpCommon.businessUtility.AccountingSchemaMiscData; import org.openbravo.erpCommon.businessUtility.Tree; import org.openbravo.erpCommon.businessUtility.TreeData; @@ -50,6 +51,7 @@ import org.openbravo.erpCommon.utility.OBError; import org.openbravo.erpCommon.utility.ToolBar; import org.openbravo.erpCommon.utility.Utility; +import org.openbravo.model.financialmgmt.accounting.coa.AcctSchema; import org.openbravo.xmlEngine.XmlDocument; public class ReportTrialBalance extends HttpSecureAppServlet { @@ -528,6 +530,7 @@ Utility.messageBD(this, "ProcessStatus-W", vars.getLanguage()), Utility.messageBD(this, "NoDataFound", vars.getLanguage())); } else { + AcctSchema acctSchema = OBDal.getInstance().get(AcctSchema.class, strcAcctSchemaId); String strReportName = "@basedesign@/org/openbravo/erpCommon/ad_reports/ReportTrialBalanceExcel.jrxml"; @@ -538,10 +541,13 @@ StringBuilder strSubTitle = new StringBuilder(); strSubTitle.append(Utility.messageBD(this, "LegalEntity", vars.getLanguage()) + ": "); - strSubTitle.append(ReportTrialBalanceData.selectCompany(this, vars.getClient())+ " ("); - strSubTitle.append(Utility.messageBD(this, "ACCS_AD_ORG_ID_D", vars.getLanguage())+": " ); - strSubTitle.append(ReportTrialBalanceData.selectOrgName(this, strOrg)+ ") \n"); - strSubTitle.append("As of: " + strDateTo); + strSubTitle.append(ReportTrialBalanceData.selectCompany(this, vars.getClient()) + " ("); + strSubTitle.append(Utility.messageBD(this, "ACCS_AD_ORG_ID_D", vars.getLanguage()) + ": "); + strSubTitle.append(ReportTrialBalanceData.selectOrgName(this, strOrg) + ") \n"); + strSubTitle.append(Utility.messageBD(this, "asof", vars.getLanguage()) + ": " + strDateTo + + " \n"); + strSubTitle.append(Utility.messageBD(this, "generalLedger", vars.getLanguage()) + ": " + + acctSchema.getName()); parameters.put("REPORT_SUBTITLE", strSubTitle.toString()); parameters.put("SHOWTOTALS", false); @@ -609,6 +615,7 @@ Utility.messageBD(this, "ProcessStatus-W", vars.getLanguage()), Utility.messageBD(this, "NoDataFound", vars.getLanguage())); } else { + AcctSchema acctSchema = OBDal.getInstance().get(AcctSchema.class, strcAcctSchemaId); String strLanguage = vars.getLanguage(); String strReportName = "@basedesign@/org/openbravo/erpCommon/ad_reports/ReportTrialBalancePDF.jrxml"; @@ -618,8 +625,13 @@ StringBuilder strSubTitle = new StringBuilder(); strSubTitle.append(Utility.messageBD(this, "LegalEntity", vars.getLanguage()) + ": "); - strSubTitle.append(ReportTrialBalanceData.selectCompany(this, vars.getClient()) + "\n"); - strSubTitle.append("As of: " + strDateTo); + strSubTitle.append(ReportTrialBalanceData.selectCompany(this, vars.getClient()) + " \n"); + strSubTitle.append(Utility.messageBD(this, "asof", vars.getLanguage()) + ": " + strDateTo + + " \n"); + strSubTitle.append(Utility.messageBD(this, "ACCS_AD_ORG_ID_D", vars.getLanguage()) + ": " + + ReportTrialBalanceData.selectOrgName(this, strOrg) + " \n"); + strSubTitle.append(Utility.messageBD(this, "generalLedger", vars.getLanguage()) + ": " + + acctSchema.getName()); parameters.put("REPORT_SUBTITLE", strSubTitle.toString()); diff -r e7473bc1847d -r 4d356fa5dded src/org/openbravo/erpCommon/ad_reports/ReportTrialBalanceExcel.jrxml --- a/src/org/openbravo/erpCommon/ad_reports/ReportTrialBalanceExcel.jrxml Mon Mar 18 15:56:50 2013 +0100 +++ b/src/org/openbravo/erpCommon/ad_reports/ReportTrialBalanceExcel.jrxml Mon Mar 18 16:34:51 2013 +0100 @@ -228,7 +228,7 @@ <textElement textAlignment="Left"> <font size="10" isBold="false"/> </textElement> - <text><![CDATA[ Account No.]]></text> + <text><![CDATA[Account No.]]></text> </staticText> <staticText> <reportElement key="element-95" style="Detail_Header" x="79" y="84" width="200" height="15" forecolor="#000000" backcolor="#FFFFFF"/> diff -r e7473bc1847d -r 4d356fa5dded src/org/openbravo/erpCommon/ad_reports/ReportTrialBalancePDF.jrxml --- a/src/org/openbravo/erpCommon/ad_reports/ReportTrialBalancePDF.jrxml Mon Mar 18 15:56:50 2013 +0100 +++ b/src/org/openbravo/erpCommon/ad_reports/ReportTrialBalancePDF.jrxml Mon Mar 18 16:34:51 2013 +0100 @@ -2,7 +2,7 @@ <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="ReportTrialBalancePDF" pageWidth="595" pageHeight="842" columnWidth="535" leftMargin="30" rightMargin="30" topMargin="20" bottomMargin="20"> <property name="ireport.scriptlethandling" value="0"/> <property name="ireport.encoding" value="UTF-8"/> - <property name="ireport.zoom" value="1.5"/> + <property name="ireport.zoom" value="2.0"/> <property name="ireport.x" value="0"/> <property name="ireport.y" value="0"/> <import value="net.sf.jasperreports.engine.*"/> @@ -404,9 +404,9 @@ </band> </title> <pageHeader> - <band height="68" splitType="Stretch"> + <band height="96" splitType="Stretch"> <textField isBlankWhenNull="false"> - <reportElement key="textField-2" style="Report_Subtitle" x="2" y="0" width="535" height="28" forecolor="#000000"/> + <reportElement key="textField-2" style="Report_Subtitle" x="2" y="0" width="535" height="56" forecolor="#000000"/> <box leftPadding="5"> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> @@ -419,20 +419,7 @@ <textFieldExpression class="java.lang.String"><![CDATA[$P{REPORT_SUBTITLE}]]></textFieldExpression> </textField> <staticText> - <reportElement key="staticText-14" style="GroupHeader_DarkGray" x="0" y="52" width="67" height="15" forecolor="#000000" backcolor="#FFFFFF"/> - <box leftPadding="5"> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <bottomPen lineWidth="0.0" lineColor="#000000"/> - <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - </box> - <textElement> - <font fontName="SansSerif" size="10" isBold="false"/> - </textElement> - <text><![CDATA[Account No.]]></text> - </staticText> - <staticText> - <reportElement key="staticText-14" style="GroupHeader_DarkGray" x="67" y="52" width="168" height="15" forecolor="#000000" backcolor="#FFFFFF"/> + <reportElement key="staticText-14" style="GroupHeader_DarkGray" x="68" y="79" width="168" height="15" forecolor="#000000" backcolor="#FFFFFF"/> <box leftPadding="5"> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> @@ -445,7 +432,7 @@ <text><![CDATA[Name]]></text> </staticText> <staticText> - <reportElement key="staticText-14" style="GroupHeader_DarkGray" x="0" y="38" width="235" height="15" forecolor="#000000" backcolor="#FFFFFF"/> + <reportElement key="staticText-14" style="GroupHeader_DarkGray" x="1" y="64" width="235" height="15" forecolor="#000000" backcolor="#FFFFFF"/> <box leftPadding="5"> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> @@ -458,7 +445,7 @@ <text><![CDATA[]]></text> </staticText> <staticText> - <reportElement key="staticText-14" style="GroupHeader_DarkGray" x="231" y="38" width="76" height="15" forecolor="#000000" backcolor="#FFFFFF"/> + <reportElement key="staticText-14" style="GroupHeader_DarkGray" x="231" y="64" width="76" height="15" forecolor="#000000" backcolor="#FFFFFF"/> <box leftPadding="5"> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> @@ -471,7 +458,7 @@ <text><![CDATA[Balance As Of]]></text> </staticText> <staticText> - <reportElement key="staticText-14" style="GroupHeader_DarkGray" x="310" y="36" width="150" height="15" forecolor="#000000" backcolor="#FFFFFF"/> + <reportElement key="staticText-14" style="GroupHeader_DarkGray" x="310" y="63" width="150" height="15" forecolor="#000000" backcolor="#FFFFFF"/> <box leftPadding="5"> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> @@ -484,7 +471,7 @@ <text><![CDATA[Activity]]></text> </staticText> <staticText> - <reportElement key="staticText-14" style="GroupHeader_DarkGray" x="458" y="36" width="76" height="15" forecolor="#000000" backcolor="#FFFFFF"/> + <reportElement key="staticText-14" style="GroupHeader_DarkGray" x="458" y="63" width="76" height="15" forecolor="#000000" backcolor="#FFFFFF"/> <box leftPadding="5"> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> @@ -497,7 +484,7 @@ <text><![CDATA[Balance As Of]]></text> </staticText> <staticText> - <reportElement key="staticText-10" style="GroupHeader_DarkGray" x="385" y="52" width="75" height="15" forecolor="#000000" backcolor="#FFFFFF"/> + <reportElement key="staticText-10" style="GroupHeader_DarkGray" x="385" y="79" width="75" height="15" forecolor="#000000" backcolor="#FFFFFF"/> <box leftPadding="5" rightPadding="3"> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> @@ -510,7 +497,7 @@ <text><![CDATA[Credit]]></text> </staticText> <staticText> - <reportElement key="staticText-11" style="GroupHeader_DarkGray" x="310" y="52" width="75" height="15" forecolor="#000000" backcolor="#FFFFFF"/> + <reportElement key="staticText-11" style="GroupHeader_DarkGray" x="310" y="79" width="75" height="15" forecolor="#000000" backcolor="#FFFFFF"/> <box leftPadding="5" rightPadding="3"> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> @@ -523,28 +510,41 @@ <text><![CDATA[Debit]]></text> </staticText> <textField> - <reportElement mode="Opaque" x="232" y="52" width="75" height="15" forecolor="#000000" backcolor="#FFFFFF"/> + <reportElement mode="Opaque" x="232" y="79" width="75" height="15" forecolor="#000000" backcolor="#FFFFFF"/> <textElement textAlignment="Center" verticalAlignment="Middle" rotation="None" lineSpacing="Single" markup="none"> <font fontName="SansSerif" size="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Helvetica" pdfEncoding="Cp1252" isPdfEmbedded="false"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$P{DATE_FROM}]]></textFieldExpression> </textField> <textField> - <reportElement mode="Opaque" x="459" y="52" width="77" height="15" forecolor="#000000" backcolor="#FFFFFF"/> + <reportElement mode="Opaque" x="459" y="79" width="77" height="15" forecolor="#000000" backcolor="#FFFFFF"/> <textElement textAlignment="Center" verticalAlignment="Middle" rotation="None" lineSpacing="Single" markup="none"> <font fontName="SansSerif" size="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Helvetica" pdfEncoding="Cp1252" isPdfEmbedded="false"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$P{DATE_TO}]]></textFieldExpression> </textField> <line> - <reportElement key="line-1" x="3" y="31" width="531" height="1" forecolor="#555555"/> + <reportElement key="line-1" x="3" y="59" width="531" height="1" forecolor="#555555"/> </line> <line> - <reportElement key="line-1" x="316" y="51" width="140" height="1" forecolor="#555555"/> + <reportElement key="line-1" x="316" y="79" width="140" height="1" forecolor="#555555"/> </line> <line> - <reportElement key="line-1" x="2" y="67" width="532" height="1" forecolor="#555555"/> + <reportElement key="line-1" x="2" y="95" width="532" height="1" forecolor="#555555"/> </line> + <staticText> + <reportElement key="staticText-14" style="GroupHeader_DarkGray" stretchType="RelativeToTallestObject" x="0" y="79" width="72" height="15" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF"/> + <box leftPadding="5"> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineColor="#000000"/> + <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement> + <font fontName="SansSerif" size="10" isBold="false"/> + </textElement> + <text><![CDATA[Account No.]]></text> + </staticText> </band> </pageHeader> <columnHeader> ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits