details:   /erp/stable/2.50/rev/efd9369d413c
changeset: 9222:efd9369d413c
user:      Egoitz Castillo <egoitz.castillo <at> openbravo.com>
date:      Fri Feb 18 12:27:57 2011 +0100
summary:   Fixes issue 0015908: The page number should appear in the balance 
sheet report
Fixes issue 0015904: The page number should appear in the P&L report
It has been added a new field in the "Balance sheet and P&L structure"
form to set the page number in the report. The report has been modified to show
the page number.

diffstat:

 src/org/openbravo/erpCommon/ad_reports/GeneralAccountingReports.html   |   6 
++-
 src/org/openbravo/erpCommon/ad_reports/GeneralAccountingReports.java   |   7 
++-
 src/org/openbravo/erpCommon/ad_reports/GeneralAccountingReports.xml    |   1 +
 src/org/openbravo/erpCommon/ad_reports/GeneralAccountingReportsPDF.fo  |  21 
+++++++++-
 src/org/openbravo/erpCommon/ad_reports/GeneralAccountingReportsPDF.xml |   1 +
 5 files changed, 31 insertions(+), 5 deletions(-)

diffs (111 lines):

diff -r 646cb1ee1724 -r efd9369d413c 
src/org/openbravo/erpCommon/ad_reports/GeneralAccountingReports.html
--- a/src/org/openbravo/erpCommon/ad_reports/GeneralAccountingReports.html      
Thu Feb 17 17:52:32 2011 +0100
+++ b/src/org/openbravo/erpCommon/ad_reports/GeneralAccountingReports.html      
Fri Feb 18 12:27:57 2011 +0100
@@ -534,7 +534,11 @@
                     </TABLE>
                   </TD>
                 </tr>
-
+               <tr>
+                       <td class="TitleCell"><span class="LabelText">Initial 
page number</span></td>
+                               <td class="TextBox_ContentCell"> <input 
dojoType="openbravo:Textbox"  class="dojoValidateValid TextBox_OneCell_width" 
type="text" name="inpPageNo" id="paramPageNo" size="10" maxlength="10" 
value=""></input><script>djConfig.searchIds.push("paramPageNo");</script>
+                       </td>
+               </tr>
                 <tr>
                 <td colspan="6">
                   <table class="FieldGroup" cellspacing="0" cellpadding="0" 
border="0">
diff -r 646cb1ee1724 -r efd9369d413c 
src/org/openbravo/erpCommon/ad_reports/GeneralAccountingReports.java
--- a/src/org/openbravo/erpCommon/ad_reports/GeneralAccountingReports.java      
Thu Feb 17 17:52:32 2011 +0100
+++ b/src/org/openbravo/erpCommon/ad_reports/GeneralAccountingReports.java      
Fri Feb 18 12:27:57 2011 +0100
@@ -99,9 +99,10 @@
       String strOrg = vars.getRequestGlobalVariable("inpOrganizacion",
           "GeneralAccountingReports|organizacion");
       String strLevel = vars.getRequestGlobalVariable("inpLevel", 
"GeneralAccountingReports|level");
+      String strPageNo = vars.getStringParameter("inpPageNo", "1");
       printPagePDF(request, response, vars, strAgno, strAgnoRef, strDateFrom, 
strDateTo,
           strDateFromRef, strDateToRef, strAsDateTo, strAsDateToRef, 
strElementValue,
-          strConImporte, strOrg, strLevel, strConCodigo, strcAcctSchemaId);
+          strConImporte, strOrg, strLevel, strConCodigo, strcAcctSchemaId, 
strPageNo);
     } else
       pageError(response);
   }
@@ -110,7 +111,7 @@
       VariablesSecureApp vars, String strAgno, String strAgnoRef, String 
strDateFrom,
       String strDateTo, String strDateFromRef, String strDateToRef, String 
strAsDateTo,
       String strAsDateToRef, String strElementValue, String strConImporte, 
String strOrg,
-      String strLevel, String strConCodigo, String strcAcctSchemaId) throws 
IOException,
+      String strLevel, String strConCodigo, String strcAcctSchemaId, String 
strPageNo) throws IOException,
       ServletException {
     if (log4j.isDebugEnabled())
       log4j.debug("Output: pdf");
@@ -265,6 +266,8 @@
               strElementValue)
               + " (Provisional)" : GeneralAccountingReportsData.rptTitle(this, 
strElementValue));
 
+      xmlDocument.setParameter("pageNo", strPageNo);
+
       AccountTreeData[][] trees = new AccountTreeData[strGroups.length][];
 
       for (int i = 0; i < strGroups.length; i++)
diff -r 646cb1ee1724 -r efd9369d413c 
src/org/openbravo/erpCommon/ad_reports/GeneralAccountingReports.xml
--- a/src/org/openbravo/erpCommon/ad_reports/GeneralAccountingReports.xml       
Thu Feb 17 17:52:32 2011 +0100
+++ b/src/org/openbravo/erpCommon/ad_reports/GeneralAccountingReports.xml       
Fri Feb 18 12:27:57 2011 +0100
@@ -62,6 +62,7 @@
   <PARAMETER id="paramArrayAccountingReports" name="accountingReports"/>
   <PARAMETER id="paramArrayOrg" name="orgs"/>
   <PARAMETER id="paramArrayYears" name="years"/>
+  <PARAMETER id="paramPageNo" name="inpPageNo" attribute="value" default="1"/>
 
   <SUBREPORT id="reportLevel" name="reportLevel" 
report="org/openbravo/erpCommon/reference/List">
     <ARGUMENT name="parameterListSelected" withId="paramLevel"/>
diff -r 646cb1ee1724 -r efd9369d413c 
src/org/openbravo/erpCommon/ad_reports/GeneralAccountingReportsPDF.fo
--- a/src/org/openbravo/erpCommon/ad_reports/GeneralAccountingReportsPDF.fo     
Thu Feb 17 17:52:32 2011 +0100
+++ b/src/org/openbravo/erpCommon/ad_reports/GeneralAccountingReportsPDF.fo     
Fri Feb 18 12:27:57 2011 +0100
@@ -21,10 +21,11 @@
        <fo:layout-master-set>
                <fo:simple-page-master master-name="first" page-height="29.7cm" 
page-width="21cm" margin-top="0.5cm" margin-bottom="0.5cm" margin-left="2cm" 
margin-right="1cm">
                        <fo:region-before extent="2.5cm"/>
-                       <fo:region-body margin-top="2.5cm"/>
+                       <fo:region-after extent="1cm"/>
+                       <fo:region-body margin-top="2.5cm" margin-bottom="1cm"/>
                </fo:simple-page-master>
        </fo:layout-master-set>
-       <fo:page-sequence master-reference="first">
+       <fo:page-sequence master-reference="first" initial-page-number="xx" 
id="fieldPageNo">
                <fo:static-content flow-name="xsl-region-before">
                        <fo:table>
                                <fo:table-column column-width="14.5cm"/>
@@ -73,6 +74,22 @@
                                </fo:table-body>
                        </fo:table>
                </fo:static-content>
+               <fo:static-content flow-name="xsl-region-after">
+                       <fo:table>
+                               <fo:table-column column-width="13.5cm"/>
+                                <fo:table-column column-width="4.5cm"/>
+                                <fo:table-body>
+                                       <fo:table-row>
+                                               <fo:table-cell>
+                                                        <fo:block></fo:block>
+                                                </fo:table-cell>
+                                                <fo:table-cell>
+                                                        <fo:block 
text-align="right" font-size="8pt" 
padding-bottom="4pt">Page&#160;<fo:inline><fo:page-number/></fo:inline></fo:block>
+                                                </fo:table-cell>
+                                        </fo:table-row>
+                               </fo:table-body>
+                       </fo:table>
+               </fo:static-content>
                <fo:flow flow-name="xsl-region-body">
      <DIVFO id="sectionGroup">
                        <fo:block font-size="10pt" break-after="page" 
id="fieldBreak">
diff -r 646cb1ee1724 -r efd9369d413c 
src/org/openbravo/erpCommon/ad_reports/GeneralAccountingReportsPDF.xml
--- a/src/org/openbravo/erpCommon/ad_reports/GeneralAccountingReportsPDF.xml    
Thu Feb 17 17:52:32 2011 +0100
+++ b/src/org/openbravo/erpCommon/ad_reports/GeneralAccountingReportsPDF.xml    
Fri Feb 18 12:27:57 2011 +0100
@@ -21,6 +21,7 @@
   <template file="GeneralAccountingReportsPDF.fo"/>
 
   <PARAMETER id="fieldPrincipalTitle" name="principalTitle" 
replaceCharacters="fo"/>
+  <PARAMETER id="fieldPageNo" name="pageNo" attribute="initial-page-number" 
replaceCharacters="fo" default="1"/>
 
 
   <PARAMETER id="fieldAgno" name="agno" replaceCharacters="fo"/>

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to