Fixed issue 19083:
authorVíctor Martínez Romanos <victor.martinez@openbravo.com>
Wed, 16 Nov 2011 18:50:44 +0100
changeset 14296 1f4815271d27
parent 14295 1f040a883f1c
child 14297 85d05d72f141
Fixed issue 19083:

Several improvements added to the payment report:

1. Remove the Subtotal for the grouping criteria because it provides
useless information

2. Remove the sum of trans. amount because it may sum amounts from
different currencies

3. Remove the last grand total line because it provides useless
information

4. Add a balance field when grouping. This balance will show the
difference between the pending credit to be used and the pending
payments. This information is specially useful when grouping by
business partner.

The pending credit to take into account belongs to payments with the
following status: Withdrawn not cleared, Payment Received, Payment
Cleared, Payment Made and Deposited not Clear.

The pending payments to take into account do NOT have the following
status: Withdrawn not cleared, Payment Received, Payment Cleared,
Payment Made, Deposited not Clear and Voided


Apart from that, some minor bugs have been fixed:
- Order by clause orders by invoice payment schedule
- Improved code that prints the asterisks in case of credit payments
- In the PDF report, the group criteria band is now shown only when
the user has selected a grouping criteria
modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_TEXTINTERFACES.xml
modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReport.html
modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReport.java
modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReport.xml
modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReportDao.java
modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReportPDF.jrxml
--- a/modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_TEXTINTERFACES.xml	Wed Nov 16 22:04:56 2011 +0100
+++ b/modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_TEXTINTERFACES.xml	Wed Nov 16 18:50:44 2011 +0100
@@ -66,17 +66,6 @@
 <!--0F3DBFADCE4F42279BA1E29291982E43-->  <AD_MODULE_ID><![CDATA[2A5EE903D7974AC298C0504FBC4501A7]]></AD_MODULE_ID>
 <!--0F3DBFADCE4F42279BA1E29291982E43--></AD_TEXTINTERFACES>
 
-<!--1492946E7BF44E5686A61AFD288E9318--><AD_TEXTINTERFACES>
-<!--1492946E7BF44E5686A61AFD288E9318-->  <AD_TEXTINTERFACES_ID><![CDATA[1492946E7BF44E5686A61AFD288E9318]]></AD_TEXTINTERFACES_ID>
-<!--1492946E7BF44E5686A61AFD288E9318-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--1492946E7BF44E5686A61AFD288E9318-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--1492946E7BF44E5686A61AFD288E9318-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--1492946E7BF44E5686A61AFD288E9318-->  <TEXT><![CDATA[Grand Total:]]></TEXT>
-<!--1492946E7BF44E5686A61AFD288E9318-->  <FILENAME><![CDATA[/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReportPDF.jrxml]]></FILENAME>
-<!--1492946E7BF44E5686A61AFD288E9318-->  <ISUSED><![CDATA[Y]]></ISUSED>
-<!--1492946E7BF44E5686A61AFD288E9318-->  <AD_MODULE_ID><![CDATA[2A5EE903D7974AC298C0504FBC4501A7]]></AD_MODULE_ID>
-<!--1492946E7BF44E5686A61AFD288E9318--></AD_TEXTINTERFACES>
-
 <!--17234C998EAE47188F5E34F1ECF345C3--><AD_TEXTINTERFACES>
 <!--17234C998EAE47188F5E34F1ECF345C3-->  <AD_TEXTINTERFACES_ID><![CDATA[17234C998EAE47188F5E34F1ECF345C3]]></AD_TEXTINTERFACES_ID>
 <!--17234C998EAE47188F5E34F1ECF345C3-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -275,17 +264,6 @@
 <!--3A59F70C2BE548398EEC5134095FA252-->  <AD_MODULE_ID><![CDATA[2A5EE903D7974AC298C0504FBC4501A7]]></AD_MODULE_ID>
 <!--3A59F70C2BE548398EEC5134095FA252--></AD_TEXTINTERFACES>
 
-<!--3D64879E7FD745A1B8749BE8F92FA1AB--><AD_TEXTINTERFACES>
-<!--3D64879E7FD745A1B8749BE8F92FA1AB-->  <AD_TEXTINTERFACES_ID><![CDATA[3D64879E7FD745A1B8749BE8F92FA1AB]]></AD_TEXTINTERFACES_ID>
-<!--3D64879E7FD745A1B8749BE8F92FA1AB-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--3D64879E7FD745A1B8749BE8F92FA1AB-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--3D64879E7FD745A1B8749BE8F92FA1AB-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--3D64879E7FD745A1B8749BE8F92FA1AB-->  <TEXT><![CDATA[Sub Total (Grouping Criteria):]]></TEXT>
-<!--3D64879E7FD745A1B8749BE8F92FA1AB-->  <FILENAME><![CDATA[/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReportPDF.jrxml]]></FILENAME>
-<!--3D64879E7FD745A1B8749BE8F92FA1AB-->  <ISUSED><![CDATA[Y]]></ISUSED>
-<!--3D64879E7FD745A1B8749BE8F92FA1AB-->  <AD_MODULE_ID><![CDATA[2A5EE903D7974AC298C0504FBC4501A7]]></AD_MODULE_ID>
-<!--3D64879E7FD745A1B8749BE8F92FA1AB--></AD_TEXTINTERFACES>
-
 <!--43C8186236514013ADE1E5C8DB7A043B--><AD_TEXTINTERFACES>
 <!--43C8186236514013ADE1E5C8DB7A043B-->  <AD_TEXTINTERFACES_ID><![CDATA[43C8186236514013ADE1E5C8DB7A043B]]></AD_TEXTINTERFACES_ID>
 <!--43C8186236514013ADE1E5C8DB7A043B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -308,6 +286,17 @@
 <!--47D05363EA0A431E94988745BA473BD1-->  <AD_MODULE_ID><![CDATA[2A5EE903D7974AC298C0504FBC4501A7]]></AD_MODULE_ID>
 <!--47D05363EA0A431E94988745BA473BD1--></AD_TEXTINTERFACES>
 
+<!--4A2C074C97E74A55858699F7AC03BBE7--><AD_TEXTINTERFACES>
+<!--4A2C074C97E74A55858699F7AC03BBE7-->  <AD_TEXTINTERFACES_ID><![CDATA[4A2C074C97E74A55858699F7AC03BBE7]]></AD_TEXTINTERFACES_ID>
+<!--4A2C074C97E74A55858699F7AC03BBE7-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--4A2C074C97E74A55858699F7AC03BBE7-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--4A2C074C97E74A55858699F7AC03BBE7-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--4A2C074C97E74A55858699F7AC03BBE7-->  <TEXT><![CDATA[Balance:]]></TEXT>
+<!--4A2C074C97E74A55858699F7AC03BBE7-->  <FILENAME><![CDATA[/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReportPDF.jrxml]]></FILENAME>
+<!--4A2C074C97E74A55858699F7AC03BBE7-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--4A2C074C97E74A55858699F7AC03BBE7-->  <AD_MODULE_ID><![CDATA[2A5EE903D7974AC298C0504FBC4501A7]]></AD_MODULE_ID>
+<!--4A2C074C97E74A55858699F7AC03BBE7--></AD_TEXTINTERFACES>
+
 <!--4AE673493AE240E5A19DB52BA3FECA21--><AD_TEXTINTERFACES>
 <!--4AE673493AE240E5A19DB52BA3FECA21-->  <AD_TEXTINTERFACES_ID><![CDATA[4AE673493AE240E5A19DB52BA3FECA21]]></AD_TEXTINTERFACES_ID>
 <!--4AE673493AE240E5A19DB52BA3FECA21-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -440,17 +429,6 @@
 <!--8747F91C31704FD0A9EC0C35237158BE-->  <AD_MODULE_ID><![CDATA[2A5EE903D7974AC298C0504FBC4501A7]]></AD_MODULE_ID>
 <!--8747F91C31704FD0A9EC0C35237158BE--></AD_TEXTINTERFACES>
 
-<!--885417437D3B47308536AF8ADF3834B4--><AD_TEXTINTERFACES>
-<!--885417437D3B47308536AF8ADF3834B4-->  <AD_TEXTINTERFACES_ID><![CDATA[885417437D3B47308536AF8ADF3834B4]]></AD_TEXTINTERFACES_ID>
-<!--885417437D3B47308536AF8ADF3834B4-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--885417437D3B47308536AF8ADF3834B4-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--885417437D3B47308536AF8ADF3834B4-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--885417437D3B47308536AF8ADF3834B4-->  <TEXT><![CDATA[Grand Total]]></TEXT>
-<!--885417437D3B47308536AF8ADF3834B4-->  <FILENAME><![CDATA[/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReport.html]]></FILENAME>
-<!--885417437D3B47308536AF8ADF3834B4-->  <ISUSED><![CDATA[Y]]></ISUSED>
-<!--885417437D3B47308536AF8ADF3834B4-->  <AD_MODULE_ID><![CDATA[2A5EE903D7974AC298C0504FBC4501A7]]></AD_MODULE_ID>
-<!--885417437D3B47308536AF8ADF3834B4--></AD_TEXTINTERFACES>
-
 <!--8A613E8D2A304FEF9545C2852FC06EF0--><AD_TEXTINTERFACES>
 <!--8A613E8D2A304FEF9545C2852FC06EF0-->  <AD_TEXTINTERFACES_ID><![CDATA[8A613E8D2A304FEF9545C2852FC06EF0]]></AD_TEXTINTERFACES_ID>
 <!--8A613E8D2A304FEF9545C2852FC06EF0-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -704,17 +682,6 @@
 <!--AFBBE094BB59D031E040007F01013B9F-->  <AD_MODULE_ID><![CDATA[2A5EE903D7974AC298C0504FBC4501A7]]></AD_MODULE_ID>
 <!--AFBBE094BB59D031E040007F01013B9F--></AD_TEXTINTERFACES>
 
-<!--B682A4F7A92C45A4BE2D04E087F45B6D--><AD_TEXTINTERFACES>
-<!--B682A4F7A92C45A4BE2D04E087F45B6D-->  <AD_TEXTINTERFACES_ID><![CDATA[B682A4F7A92C45A4BE2D04E087F45B6D]]></AD_TEXTINTERFACES_ID>
-<!--B682A4F7A92C45A4BE2D04E087F45B6D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--B682A4F7A92C45A4BE2D04E087F45B6D-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--B682A4F7A92C45A4BE2D04E087F45B6D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--B682A4F7A92C45A4BE2D04E087F45B6D-->  <TEXT><![CDATA[Sub Total (Group Crit)]]></TEXT>
-<!--B682A4F7A92C45A4BE2D04E087F45B6D-->  <FILENAME><![CDATA[/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReport.html]]></FILENAME>
-<!--B682A4F7A92C45A4BE2D04E087F45B6D-->  <ISUSED><![CDATA[Y]]></ISUSED>
-<!--B682A4F7A92C45A4BE2D04E087F45B6D-->  <AD_MODULE_ID><![CDATA[2A5EE903D7974AC298C0504FBC4501A7]]></AD_MODULE_ID>
-<!--B682A4F7A92C45A4BE2D04E087F45B6D--></AD_TEXTINTERFACES>
-
 <!--B973837A2C334DC49973CEE4179F43B7--><AD_TEXTINTERFACES>
 <!--B973837A2C334DC49973CEE4179F43B7-->  <AD_TEXTINTERFACES_ID><![CDATA[B973837A2C334DC49973CEE4179F43B7]]></AD_TEXTINTERFACES_ID>
 <!--B973837A2C334DC49973CEE4179F43B7-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReport.html	Wed Nov 16 22:04:56 2011 +0100
+++ b/modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReport.html	Wed Nov 16 18:50:44 2011 +0100
@@ -1111,9 +1111,7 @@
                           </div>
                           <tr class="DataGrid_Body_Row">
                             <th width="10%" class="DataGrid_Header_Cell"><span class="Bold">Sub Total (Status)</span></th>
-                            <th width="100%" class="DataGrid_Header_Cell_Amount" colspan="10"></th>
-                            <th width="10%" class="DataGrid_Header_Cell_Amount"><span class="Bold" id="subtotalTransAmount"></span></th>
-                            <th width="10%" class="DataGrid_Header_Cell"><span class="Bold" id="fieldTransCurrency"></span></th>
+                            <th width="100%" class="DataGrid_Header_Cell_Amount" colspan="12"></th>
                             <th width="10%" class="DataGrid_Header_Cell_Amount"><span class="Bold" id="subtotalBaseAmount"></span></th>
                             <th width="10%" class="DataGrid_Header_Cell"><span class="Bold" id="fieldBaseCurrency"></span></th>
                           </tr>
@@ -1121,27 +1119,18 @@
                             <th colspan="15" height="25px"/>
                           </tr>
                         </div>
-                        <div id="sectionTotal">
-                          <tr>
-                            <th colspan="15" height="25px"/>
-                          </tr>
-                          <tr class="DataGrid_Body_Row">
-                            <th width="10%" class="DataGrid_Header_Cell"><span class="Bold">Grand Total</span></th>
-                            <th width="100%" class="DataGrid_Header_Cell_Amount" colspan="10"></th>
-                            <th width="10%" class="DataGrid_Header_Cell_Amount"><span class="Bold" id="totalTransAmount"></span></th>
-                            <th width="10%" class="DataGrid_Header_Cell"><span class="Bold" id="fieldTransCurrency"></span></th>
-                            <th width="10%" class="DataGrid_Header_Cell_Amount"><span class="Bold" id="totalBaseAmount"></span></th>
-                            <th width="10%" class="DataGrid_Header_Cell"><span class="Bold" id="fieldBaseCurrency"></th>
-                          </tr>
-                        </div>
                       </table>
                       
 
                       <table cellspacing="0" cellpadding="0" width="90%" class="DataGrid_Header_Table DataGrid_Body_Table" style="table-layout: auto;">
                           <div id="sectionGroupCrit">
                             <tr class="DataGrid_Body_Row">
-                              <th colspan="15" class="DataGrid_Header_Cell">Grouping Criteria<span>:&nbsp;</span>
+                              <th colspan="12" class="DataGrid_Header_Cell">Grouping Criteria<span>:&nbsp;</span>
                                 <span id="fieldGroupCritName">xxGroupCritName</span></th>
+                             <!-- <th class="DataGrid_Header_Cell">Balance</th>
+                              <th class="DataGrid_Header_Cell_Amount"><span id="sumBalanceAmount"></span></th>
+                              <th class="DataGrid_Header_Cell"><span id="fieldBaseCurrency2"></span></th> -->
+                              <th colspan="3" class="DataGrid_Header_Cell">Balance<span>:&nbsp;</span><span id="sumBalanceAmount"></span><span>&nbsp;</span><span id="fieldBaseCurrency2"></span></th>
                             </tr>
                             <div id="sectionStatus2">
                                 <tr class="DataGrid_Body_Row">
@@ -1197,39 +1186,16 @@
                                 </div>
                                 <tr class="DataGrid_Body_Row">
                                   <th width="10%" class="DataGrid_Header_Cell"><span class="Bold">Sub Total (Status)</span></th>
-                                  <th width="100%" class="DataGrid_Header_Cell_Amount" colspan="10"></th>
-                                  <th width="10%" class="DataGrid_Header_Cell_Amount"><span class="Bold" id="subtotalTransAmountStatus"></span></th>
-                                  <th width="10%" class="DataGrid_Header_Cell"><span class="Bold" id="fieldTransCurrency2"></span></th>
+                                  <th width="100%" class="DataGrid_Header_Cell_Amount" colspan="12"></th>
                                   <th width="10%" class="DataGrid_Header_Cell_Amount"><span class="Bold" id="subtotalBaseAmountStatus"></span></th>
                                   <th width="10%" class="DataGrid_Header_Cell"><span class="Bold" id="fieldBaseCurrency2"></span></th>
                                 </tr>
                               
                             </div>
-                            <tr class="DataGrid_Body_Row" id="sectionSubtotalGroupCrit">
-                              <th width="10%" class="DataGrid_Header_Cell"><span class="Bold">Sub Total (Group Crit)</span></th>
-                              <th width="100%" class="DataGrid_Header_Cell_Amount" colspan="10"></th>
-                              <th width="10%" class="DataGrid_Header_Cell_Amount"><span class="Bold" id="subtotalTransAmountGroupCrit"></span></th>
-                              <th width="10%" class="DataGrid_Header_Cell"><span class="Bold" id="fieldTransCurrency2"></span></th>
-                              <th width="10%" class="DataGrid_Header_Cell_Amount"><span class="Bold" id="subtotalBaseAmountGroupCrit"></span></th>
-                              <th width="10%" class="DataGrid_Header_Cell"><span class="Bold" id="fieldBaseCurrency2"></span></th>
-                            </tr>
                             <tr>
                               <th colspan="15" style="height:25px"/>
                             </tr>
                           </div>
-                          <div id="sectionTotal2">
-                            <tr>
-                              <th colspan="15" style="height:25px"/>
-                            </tr>
-                            <tr class="DataGrid_Body_Row">
-                              <th width="10%" class="DataGrid_Header_Cell"><span class="Bold">Grand Total</span></th>
-                              <th width="100%" class="DataGrid_Header_Cell_Amount" colspan="10"></th>
-                              <th width="10%" class="DataGrid_Header_Cell_Amount"><span class="Bold" id="totalTransAmount2"></span></th>
-                              <th width="10%" class="DataGrid_Header_Cell"><span class="Bold" id="fieldTransCurrency2"></span></th>
-                              <th width="10%" class="DataGrid_Header_Cell_Amount"><span class="Bold" id="totalBaseAmount2"></span></th>
-                              <th width="10%" class="DataGrid_Header_Cell"><span class="Bold" id="fieldBaseCurrency2"></th>
-                            </tr>
-                          </div>
                       </table>
                     </td>
                   </tr>
--- a/modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReport.java	Wed Nov 16 22:04:56 2011 +0100
+++ b/modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReport.java	Wed Nov 16 18:50:44 2011 +0100
@@ -624,9 +624,12 @@
       return false;
     boolean showAsterisk = false;
     for (final FieldProvider fp : data) {
-      if (fp.getField("INVOICE_NUMBER") != null && !"".equals(fp.getField("INVOICE_NUMBER"))
+      if (fp.getField("INVOICE_NUMBER") != null
+          && !"".equals(fp.getField("INVOICE_NUMBER"))
           && fp.getField("INVOICE_NUMBER").length() >= asterisk.length()
-          && asterisk.equals(fp.getField("INVOICE_NUMBER").substring(0, asterisk.length()))) {
+          && asterisk.equals(fp.getField("INVOICE_NUMBER").substring(0, asterisk.length()))
+          && !"*".equals(fp.getField("INVOICE_NUMBER").substring(asterisk.length(),
+              asterisk.length() + 1))) {
         showAsterisk = true;
         break;
       }
--- a/modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReport.xml	Wed Nov 16 22:04:56 2011 +0100
+++ b/modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReport.xml	Wed Nov 16 18:50:44 2011 +0100
@@ -12,7 +12,7 @@
 * under the License. 
 * The Original Code is Openbravo ERP. 
 * The Initial Developer of the Original Code is Openbravo SL 
-* All portions are Copyright (C) 2009 Openbravo SL 
+* All portions are Copyright (C) 2009-2011 Openbravo SL 
 * All Rights Reserved. 
 * Contributor(s):  ______________________________________.
 ************************************************************************
@@ -147,13 +147,9 @@
     <FIELD id="fieldBaseAmount" format="euroInform">BASE_AMOUNT</FIELD>
     <FIELD id="fieldBaseCurrency">BASE_CURRENCY</FIELD>
 
-<!--     Accumulates Transactional Amount and Base Amount columns values -->
-    <FUNCTION id="subtotalTransAmount" name="SUM" format="euroInform">TRANS_AMOUNT</FUNCTION>
+<!--     Accumulates Base Amount columns values -->
     <FUNCTION id="subtotalBaseAmount" name="SUM" format="euroInform">BASE_AMOUNT</FUNCTION>
     
-    <FUNCTION id="totalTransAmount" name="SUM" format="euroInform">TRANS_AMOUNT</FUNCTION>
-    <FUNCTION id="totalBaseAmount" name="SUM" format="euroInform">BASE_AMOUNT</FUNCTION>
-    
     <SECTION id="sectionStatus" field="STATUS"/>
     <SECTION id="sectionDetail"/>
   </structure>
@@ -191,15 +187,9 @@
     <FIELD id="fieldGroupCritName">GROUP_CRIT_ID</FIELD>
     <FIELD id="fieldGroupCrit">GROUP_CRIT_ID</FIELD>
 
-<!--     Accumulates Transactional Amount and Base Amount columns values -->
-    <FUNCTION id="subtotalTransAmountStatus" name="SUM" format="euroInform">TRANS_AMOUNT</FUNCTION>
+<!--     Base Amount columns values -->
     <FUNCTION id="subtotalBaseAmountStatus" name="SUM" format="euroInform">BASE_AMOUNT</FUNCTION>
-    
-    <FUNCTION id="subtotalTransAmountGroupCrit" name="SUM" format="euroInform">TRANS_AMOUNT</FUNCTION>
-    <FUNCTION id="subtotalBaseAmountGroupCrit" name="SUM" format="euroInform">BASE_AMOUNT</FUNCTION>
-    
-    <FUNCTION id="totalTransAmount2" name="SUM" format="euroInform">TRANS_AMOUNT</FUNCTION>
-    <FUNCTION id="totalBaseAmount2" name="SUM" format="euroInform">BASE_AMOUNT</FUNCTION>
+    <FUNCTION id="sumBalanceAmount" name="SUM" format="euroInform">BALANCE</FUNCTION>
     
     <SECTION id="sectionGroupCrit" field="GROUP_CRIT_ID"/>
     <SECTION id="sectionStatus2" field="STATUS"/>
--- a/modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReportDao.java	Wed Nov 16 22:04:56 2011 +0100
+++ b/modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReportDao.java	Wed Nov 16 18:50:44 2011 +0100
@@ -380,11 +380,9 @@
       }
 
       hsqlScript.append(", fpsd.");
-      hsqlScript.append(FIN_PaymentScheduleDetail.PROPERTY_PAYMENTDETAILS);
+      hsqlScript.append(FIN_PaymentScheduleDetail.PROPERTY_INVOICEPAYMENTSCHEDULE);
       hsqlScript.append(".");
-      hsqlScript.append(FIN_PaymentDetail.PROPERTY_ID);
-      hsqlScript.append(", inv.");
-      hsqlScript.append(Invoice.PROPERTY_ID);
+      hsqlScript.append(FIN_PaymentSchedule.PROPERTY_ID);
 
       final OBQuery<FIN_PaymentScheduleDetail> obqPSD = OBDal.getInstance().createQuery(
           FIN_PaymentScheduleDetail.class, hsqlScript.toString(), parameters);
@@ -400,6 +398,7 @@
       String previousFPSDInvoiceId = null;
       String previousPaymentId = null;
       BigDecimal amountSum = BigDecimal.ZERO;
+      BigDecimal balanceSum = BigDecimal.ZERO;
       FieldProvider previousRow = null;
       ConversionRate previousConvRate = null;
       boolean isReceipt = false;
@@ -631,6 +630,37 @@
         // baseCurrency
         FieldProviderFactory.setField(data[i], "TRANS_CURRENCY", transCurrency.getISOCode());
 
+        // Balance
+        String status = "RPAE";
+        try {
+          status = FIN_PaymentScheduleDetail[i].getPaymentDetails().getFinPayment().getStatus();
+        } catch (NullPointerException e) {
+        }
+        final boolean isCreditPayment = FIN_PaymentScheduleDetail[i].getInvoicePaymentSchedule() == null
+            && FIN_PaymentScheduleDetail[i].getPaymentDetails().getFinPayment() != null;
+
+        BigDecimal balance = BigDecimal.ZERO;
+        if (isCreditPayment && status != null && "PWNC RPR RPPC PPM RDNC".indexOf(status) >= 0) {
+          balance = FIN_PaymentScheduleDetail[i]
+              .getPaymentDetails()
+              .getFinPayment()
+              .getGeneratedCredit()
+              .subtract(
+                  FIN_PaymentScheduleDetail[i].getPaymentDetails().getFinPayment().getUsedCredit());
+          if (isReceipt) {
+            balance = balance.negate();
+          }
+        } else if (!isCreditPayment && status != null
+            && "PWNC RPR RPPC PPM RDNC RPVOID".indexOf(status) == -1) {
+          balance = isReceipt ? transAmount : transAmount.negate();
+        }
+        if (convRate != null) {
+          final int stdPrecission = convRate.getToCurrency().getStandardPrecision().intValue();
+          balance = balance.multiply(convRate.getMultipleRateBy()).setScale(stdPrecission,
+              BigDecimal.ROUND_HALF_UP);
+        }
+        FieldProviderFactory.setField(data[i], "BALANCE", balance.toString());
+
         finPaymDetail = FIN_PaymentScheduleDetail[i].getPaymentDetails();
 
         // Payment Schedule Detail grouping criteria
@@ -660,6 +690,7 @@
 
         if (mustGroup) {
           amountSum = amountSum.add(transAmount);
+          balanceSum = balanceSum.add(balance);
         } else {
           if (previousRow != null) {
             // The current row has nothing to do with the previous one. Because of that, the
@@ -669,6 +700,7 @@
             else
               FieldProviderFactory.setField(previousRow, "TRANS_AMOUNT", amountSum.negate()
                   .toString());
+            FieldProviderFactory.setField(previousRow, "BALANCE", balanceSum.toString());
             if (previousConvRate == null) {
               if (previousRow.getField("ISRECEIPT").equalsIgnoreCase("Y"))
                 FieldProviderFactory.setField(previousRow, "BASE_AMOUNT", amountSum.toString());
@@ -714,6 +746,7 @@
           previousRow = data[i];
           previousConvRate = convRate;
           amountSum = transAmount;
+          balanceSum = balance;
         }
 
         // group_crit_id this is the column that has the ids of the grouping criteria selected
@@ -745,6 +778,7 @@
           FieldProviderFactory.setField(previousRow, "TRANS_AMOUNT", amountSum.toString());
         else
           FieldProviderFactory.setField(previousRow, "TRANS_AMOUNT", amountSum.negate().toString());
+        FieldProviderFactory.setField(previousRow, "BALANCE", balanceSum.toString());
         if (previousConvRate == null) {
           if (previousRow.getField("ISRECEIPT").equalsIgnoreCase("Y"))
             FieldProviderFactory.setField(previousRow, "BASE_AMOUNT", amountSum.toString());
--- a/modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReportPDF.jrxml	Wed Nov 16 22:04:56 2011 +0100
+++ b/modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReportPDF.jrxml	Wed Nov 16 18:50:44 2011 +0100
@@ -1,214 +1,69 @@
-<?xml version="1.0" encoding="UTF-8"  ?>
-<!-- Created with iReport - A designer for JasperReports -->
-<!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd">
-<jasperReport
-		 name="PaymentReportPDF"
-		 columnCount="1"
-		 printOrder="Vertical"
-		 orientation="Landscape"
-		 pageWidth="842"
-		 pageHeight="595"
-		 columnWidth="782"
-		 columnSpacing="0"
-		 leftMargin="30"
-		 rightMargin="30"
-		 topMargin="20"
-		 bottomMargin="20"
-		 whenNoDataType="NoDataSection"
-		 isTitleNewPage="false"
-		 isSummaryNewPage="false">
-	<property name="ireport.scriptlethandling" value="0" />
-	<property name="ireport.encoding" value="UTF-8" />
-	<import value="java.util.*" />
-	<import value="net.sf.jasperreports.engine.*" />
-	<import value="net.sf.jasperreports.engine.data.*" />
-
-	<style 
-		name="default"
-		isDefault="false"
-		vAlign="Middle"
-		fontName="Bitstream Vera Sans"
-		fontSize="8"
-	>
-	</style>
-	<style 
-		name="Report_Title"
-		isDefault="false"
-		fontName="Bitstream Vera Sans"
-		fontSize="18"
-	>
-	</style>
-	<style 
-		name="Report_Subtitle"
-		isDefault="false"
-		forecolor="#555555"
-		fontName="Bitstream Vera Sans"
-		fontSize="14"
-	>
-	</style>
-	<style 
-		name="Report_Data_Label"
-		isDefault="false"
-		fontName="Bitstream Vera Sans"
-		fontSize="11"
-		isBold="true"
-	>
-	</style>
-	<style 
-		name="Report_Data_Field"
-		isDefault="false"
-		fontName="Bitstream Vera Sans"
-		fontSize="11"
-		isBold="false"
-	>
-	</style>
-	<style 
-		name="Total_Field"
-		isDefault="false"
-		mode="Opaque"
-		forecolor="#000000"
-		backcolor="#CCCCCC"
-		vAlign="Middle"
-		fontName="Bitstream Vera Sans"
-		fontSize="11"
-		isBold="true"
-	>
-	</style>
-	<style 
-		name="GroupHeader_DarkGray"
-		isDefault="false"
-		mode="Opaque"
-		forecolor="#FFFFFF"
-		backcolor="#555555"
-		vAlign="Middle"
-		fontName="Bitstream Vera Sans"
-		fontSize="12"
-		isBold="true"
-	>
-	</style>
-	<style 
-		name="Group_Data_Label"
-		isDefault="false"
-		fontName="Bitstream Vera Sans"
-		fontSize="11"
-		isBold="true"
-	>
-	</style>
-	<style 
-		name="Group_Data_Field"
-		isDefault="false"
-		fontName="Bitstream Vera Sans"
-		fontSize="11"
-	>
-	</style>
-	<style 
-		name="Detail_Header"
-		isDefault="false"
-		mode="Opaque"
-		forecolor="#FFFFFF"
-		backcolor="#5D5D5D"
-		vAlign="Middle"
-		fontName="Bitstream Vera Sans"
-		fontSize="10"
-		isBold="true"
-	>
-	</style>
-	<style 
-		name="Detail_Line"
-		isDefault="false"
-		fontName="Bitstream Vera Sans"
-		fontSize="8"
-	>
-
+<?xml version="1.0" encoding="UTF-8"?>
+<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="PaymentReportPDF" pageWidth="842" pageHeight="595" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="782" 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="0.75"/>
+	<property name="ireport.x" value="0"/>
+	<property name="ireport.y" value="0"/>
+	<import value="net.sf.jasperreports.engine.*"/>
+	<import value="java.util.*"/>
+	<import value="net.sf.jasperreports.engine.data.*"/>
+	<style name="default" vAlign="Middle" fontName="Bitstream Vera Sans" fontSize="8"/>
+	<style name="Report_Title" fontName="Bitstream Vera Sans" fontSize="18"/>
+	<style name="Report_Subtitle" forecolor="#555555" fontName="Bitstream Vera Sans" fontSize="14"/>
+	<style name="Report_Data_Label" fontName="Bitstream Vera Sans" fontSize="11" isBold="true"/>
+	<style name="Report_Data_Field" fontName="Bitstream Vera Sans" fontSize="11" isBold="false"/>
+	<style name="Total_Field" mode="Opaque" forecolor="#000000" backcolor="#CCCCCC" vAlign="Middle" fontName="Bitstream Vera Sans" fontSize="11" isBold="true"/>
+	<style name="GroupHeader_DarkGray" mode="Opaque" forecolor="#FFFFFF" backcolor="#555555" vAlign="Middle" fontName="Bitstream Vera Sans" fontSize="12" isBold="true"/>
+	<style name="Group_Data_Label" fontName="Bitstream Vera Sans" fontSize="11" isBold="true"/>
+	<style name="Group_Data_Field" fontName="Bitstream Vera Sans" fontSize="11"/>
+	<style name="Detail_Header" mode="Opaque" forecolor="#FFFFFF" backcolor="#5D5D5D" vAlign="Middle" fontName="Bitstream Vera Sans" fontSize="10" isBold="true"/>
+	<style name="Detail_Line" fontName="Bitstream Vera Sans" fontSize="8">
 		<conditionalStyle>
 			<conditionExpression><![CDATA[new Boolean($V{REPORT_COUNT}.intValue()%2==0)]]></conditionExpression>
-			<style 
-				name="Detail_Line"
-				isDefault="false"
-				mode="Opaque"
-				backcolor="#CCCCCC"
-			>
-			</style>
+			<style mode="Opaque" backcolor="#CCCCCC"/>
 		</conditionalStyle>
 	</style>
-	<style 
-		name="Total_Gray"
-		isDefault="false"
-		mode="Opaque"
-		forecolor="#000000"
-		backcolor="#CCCCCC"
-	>
-	</style>
-	<style 
-		name="Detail_Data_Label"
-		isDefault="false"
-		mode="Opaque"
-		backcolor="#CCCCCC"
-		fontName="Bitstream Vera Sans"
-		fontSize="10"
-		isBold="true"
-	>
-	</style>
-	<style 
-		name="Detail_Data_Field"
-		isDefault="false"
-		mode="Opaque"
-		backcolor="#CCCCCC"
-		fontName="Bitstream Vera Sans"
-		fontSize="10"
-	>
-	</style>
-	<style 
-		name="Group_Footer"
-		isDefault="false"
-		fontName="Bitstream Vera Sans"
-		fontSize="11"
-		isBold="true"
-	>
-	</style>
-	<style 
-		name="Report_Footer"
-		isDefault="true"
-		vAlign="Middle"
-		fontName="Bitstream Vera Sans"
-		fontSize="11"
-	>
-	</style>
-
-	<parameter name="GROUP_CRIT" isForPrompting="false" class="java.lang.String"/>
-	<parameter name="ORG_SHOW" isForPrompting="false" class="java.lang.String"/>
-	<parameter name="INCL_SUBORG_SHOW" isForPrompting="false" class="java.lang.String"/>
-	<parameter name="DUEDATEFROM_SHOW" isForPrompting="false" class="java.lang.String"/>
-	<parameter name="DUEDATETO_SHOW" isForPrompting="false" class="java.lang.String"/>
-	<parameter name="AMTFROM_SHOW" isForPrompting="false" class="java.lang.String"/>
-	<parameter name="AMTTO_SHOW" isForPrompting="false" class="java.lang.String"/>
-	<parameter name="DOCDATEFROM_SHOW" isForPrompting="false" class="java.lang.String"/>
-	<parameter name="DOCDATETO_SHOW" isForPrompting="false" class="java.lang.String"/>
-	<parameter name="BPARTNER_SHOW" isForPrompting="false" class="java.lang.String"/>
-	<parameter name="BPGROUP_SHOW" isForPrompting="false" class="java.lang.String"/>
-	<parameter name="PROJECT_SHOW" isForPrompting="false" class="java.lang.String"/>
-	<parameter name="STATUS_SHOW" isForPrompting="false" class="java.lang.String"/>
-	<parameter name="CURRENCY_SHOW" isForPrompting="false" class="java.lang.String"/>
-	<parameter name="CONVERSIONDATE_SHOW" isForPrompting="false" class="java.lang.String"/>
-	<parameter name="PAYMTYPE_SHOW" isForPrompting="false" class="java.lang.String"/>
-	<parameter name="OVERDUE_SHOW" isForPrompting="false" class="java.lang.String"/>
-	<parameter name="GROUPCRIT_SHOW" isForPrompting="false" class="java.lang.String"/>
-	<parameter name="ORDCRIT_SHOW" isForPrompting="false" class="java.lang.String"/>
-	<parameter name="PAYMENT_METHOD_SHOW" isForPrompting="false" class="java.lang.String"/>
-	<parameter name="FINANCIAL_ACCOUNT_SHOW" isForPrompting="false" class="java.lang.String"/>
-	<parameter name="CONVERT_CURRENCY_SHOW" isForPrompting="false" class="java.lang.String"/>
-	<parameter name="INCL_PAYMENTUSINGCREDIT" isForPrompting="false" class="java.lang.String"/>
-	<parameter name="ONE_ASTERISK_SHOW" isForPrompting="false" class="java.lang.Boolean">
-		<defaultValueExpression ><![CDATA[new Boolean(false)]]></defaultValueExpression>
+	<style name="Total_Gray" mode="Opaque" forecolor="#000000" backcolor="#CCCCCC"/>
+	<style name="Detail_Data_Label" mode="Opaque" backcolor="#CCCCCC" fontName="Bitstream Vera Sans" fontSize="10" isBold="true"/>
+	<style name="Detail_Data_Field" mode="Opaque" backcolor="#CCCCCC" fontName="Bitstream Vera Sans" fontSize="10"/>
+	<style name="Group_Footer" fontName="Bitstream Vera Sans" fontSize="11" isBold="true"/>
+	<style name="Report_Footer" isDefault="true" vAlign="Middle" fontName="Bitstream Vera Sans" fontSize="11"/>
+	<parameter name="GROUP_CRIT" class="java.lang.String" isForPrompting="false"/>
+	<parameter name="ORG_SHOW" class="java.lang.String" isForPrompting="false"/>
+	<parameter name="INCL_SUBORG_SHOW" class="java.lang.String" isForPrompting="false"/>
+	<parameter name="DUEDATEFROM_SHOW" class="java.lang.String" isForPrompting="false"/>
+	<parameter name="DUEDATETO_SHOW" class="java.lang.String" isForPrompting="false"/>
+	<parameter name="AMTFROM_SHOW" class="java.lang.String" isForPrompting="false"/>
+	<parameter name="AMTTO_SHOW" class="java.lang.String" isForPrompting="false"/>
+	<parameter name="DOCDATEFROM_SHOW" class="java.lang.String" isForPrompting="false"/>
+	<parameter name="DOCDATETO_SHOW" class="java.lang.String" isForPrompting="false"/>
+	<parameter name="BPARTNER_SHOW" class="java.lang.String" isForPrompting="false"/>
+	<parameter name="BPGROUP_SHOW" class="java.lang.String" isForPrompting="false"/>
+	<parameter name="PROJECT_SHOW" class="java.lang.String" isForPrompting="false"/>
+	<parameter name="STATUS_SHOW" class="java.lang.String" isForPrompting="false"/>
+	<parameter name="CURRENCY_SHOW" class="java.lang.String" isForPrompting="false"/>
+	<parameter name="CONVERSIONDATE_SHOW" class="java.lang.String" isForPrompting="false"/>
+	<parameter name="PAYMTYPE_SHOW" class="java.lang.String" isForPrompting="false"/>
+	<parameter name="OVERDUE_SHOW" class="java.lang.String" isForPrompting="false"/>
+	<parameter name="GROUPCRIT_SHOW" class="java.lang.String" isForPrompting="false"/>
+	<parameter name="ORDCRIT_SHOW" class="java.lang.String" isForPrompting="false"/>
+	<parameter name="PAYMENT_METHOD_SHOW" class="java.lang.String" isForPrompting="false"/>
+	<parameter name="FINANCIAL_ACCOUNT_SHOW" class="java.lang.String" isForPrompting="false"/>
+	<parameter name="CONVERT_CURRENCY_SHOW" class="java.lang.String" isForPrompting="false"/>
+	<parameter name="INCL_PAYMENTUSINGCREDIT" class="java.lang.String" isForPrompting="false"/>
+	<parameter name="ONE_ASTERISK_SHOW" class="java.lang.Boolean" isForPrompting="false">
+		<defaultValueExpression><![CDATA[new Boolean(false)]]></defaultValueExpression>
 	</parameter>
-	<parameter name="TWO_ASTERISK_SHOW" isForPrompting="false" class="java.lang.Boolean">
-		<defaultValueExpression ><![CDATA[new Boolean(false)]]></defaultValueExpression>
+	<parameter name="TWO_ASTERISK_SHOW" class="java.lang.Boolean" isForPrompting="false">
+		<defaultValueExpression><![CDATA[new Boolean(false)]]></defaultValueExpression>
 	</parameter>
-	<queryString><![CDATA[SELECT 'hello' AS BP_GROUP, 'hello' AS BPARTNER, 'hello' AS PROJECT, 'hello' AS PAYMENT, 'hello' AS SALES_PERSON, 1234 AS INVOICE_NUMBER, to_Date('01/01/2010') AS INVOICE_DATE,
+	<queryString>
+		<![CDATA[SELECT 'hello' AS BP_GROUP, 'hello' AS BPARTNER, 'hello' AS PROJECT, 'hello' AS PAYMENT, 'hello' AS SALES_PERSON, 1234 AS INVOICE_NUMBER, to_Date('01/01/2010') AS INVOICE_DATE,
        to_Date('01/03/2010') AS DUE_DATE, 1234 AS PLANNED_DSO, 1234 AS CURRENT_DSO, 1234 AS OVERDUE, 1234 AS DAYS_OVERDUE, 1234 AS AMOUNT,
        'hello' AS CURRENCY, 1234 AS BASE_AMOUNT, 'hello' AS BASE_CURRENCY, 'hello' AS PAYMENT_METHOD, 'hello' AS FINANCIAL_ACCOUNT
-FROM DUAL]]></queryString>
-
+FROM DUAL]]>
+	</queryString>
 	<field name="BP_GROUP" class="java.lang.String"/>
 	<field name="BPARTNER" class="java.lang.String"/>
 	<field name="PROJECT" class="java.lang.String"/>
@@ -229,479 +84,206 @@
 	<field name="FINANCIAL_ACCOUNT" class="java.lang.String"/>
 	<field name="GROUP_CRIT" class="java.lang.String"/>
 	<field name="STATUS" class="java.lang.String"/>
-
+	<field name="BALANCE" class="java.math.BigDecimal"/>
 	<variable name="SUMSUBTOTALSTATUS" class="java.math.BigDecimal" resetType="Group" resetGroup="Status" calculation="Sum">
 		<variableExpression><![CDATA[$F{BASE_AMOUNT}]]></variableExpression>
 		<initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression>
 	</variable>
-	<variable name="SUMSUBTOTALGC" class="java.math.BigDecimal" resetType="Group" resetGroup="GroupingCriteria" calculation="Sum">
-		<variableExpression><![CDATA[$F{BASE_AMOUNT}]]></variableExpression>
+	<variable name="SUMBALANCE" class="java.math.BigDecimal" resetType="Group" resetGroup="GroupingCriteria" calculation="Sum">
+		<variableExpression><![CDATA[$F{BALANCE}]]></variableExpression>
 		<initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression>
 	</variable>
-	<variable name="SUMSUBTOTALGT" class="java.math.BigDecimal" resetType="Report" calculation="Sum">
-		<variableExpression><![CDATA[$F{BASE_AMOUNT}]]></variableExpression>
-		<initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression>
-	</variable>
-
-		<group  name="MultipleBusinessPartner" >
-			<groupExpression><![CDATA[$F{GROUP_CRIT}]]></groupExpression>
-			<groupHeader>
-			<band height="20"  isSplitAllowed="true" >
+	<group name="MultipleBusinessPartner">
+		<groupExpression><![CDATA[$F{GROUP_CRIT}]]></groupExpression>
+		<groupHeader>
+			<band height="20" splitType="Stretch">
 				<staticText>
-					<reportElement
-						style="Report_Footer"
-						x="11"
-						y="0"
-						width="179"
-						height="18"
-						key="staticText-32"
-						stretchType="RelativeToBandHeight"/>
-					<box></box>
-					<textElement textAlignment="Right">
-						<font/>
-					</textElement>
-				<text><![CDATA[Business Partner:]]></text>
+					<reportElement key="staticText-32" style="Report_Footer" stretchType="RelativeToBandHeight" x="11" y="0" width="179" height="18"/>
+					<textElement textAlignment="Right"/>
+					<text><![CDATA[Business Partner:]]></text>
 				</staticText>
 				<staticText>
-					<reportElement
-						style="Report_Footer"
-						x="408"
-						y="0"
-						width="179"
-						height="18"
-						key="staticText-33"
-						stretchType="RelativeToBandHeight"/>
-					<box></box>
-					<textElement textAlignment="Right">
-						<font/>
-					</textElement>
-				<text><![CDATA[Business Partner Category:]]></text>
+					<reportElement key="staticText-33" style="Report_Footer" stretchType="RelativeToBandHeight" x="408" y="0" width="179" height="18"/>
+					<textElement textAlignment="Right"/>
+					<text><![CDATA[Business Partner Category:]]></text>
 				</staticText>
-				<textField isStretchWithOverflow="true" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						style="Report_Footer"
-						x="196"
-						y="0"
-						width="179"
-						height="18"
-						key="textField-29"
-						stretchType="RelativeToBandHeight"/>
-					<box></box>
-					<textElement>
-						<font/>
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[$P{BPARTNER_SHOW}.toString()]]></textFieldExpression>
+				<textField isStretchWithOverflow="true" isBlankWhenNull="true">
+					<reportElement key="textField-29" style="Report_Footer" stretchType="RelativeToBandHeight" x="196" y="0" width="179" height="18"/>
+					<textElement/>
+					<textFieldExpression class="java.lang.String"><![CDATA[$P{BPARTNER_SHOW}.toString()]]></textFieldExpression>
 				</textField>
-				<textField isStretchWithOverflow="true" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						style="Report_Footer"
-						x="593"
-						y="0"
-						width="179"
-						height="18"
-						key="textField-40"
-						stretchType="RelativeToBandHeight"/>
-					<box></box>
-					<textElement>
-						<font/>
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[$P{BPGROUP_SHOW}.toString()]]></textFieldExpression>
+				<textField isStretchWithOverflow="true" isBlankWhenNull="true">
+					<reportElement key="textField-40" style="Report_Footer" stretchType="RelativeToBandHeight" x="593" y="0" width="179" height="18"/>
+					<textElement/>
+					<textFieldExpression class="java.lang.String"><![CDATA[$P{BPGROUP_SHOW}.toString()]]></textFieldExpression>
 				</textField>
 			</band>
-			</groupHeader>
-			<groupFooter>
-			<band height="0"  isSplitAllowed="true" >
-			</band>
-			</groupFooter>
-		</group>
-		<group  name="MultipleProject" >
-			<groupExpression><![CDATA[$F{GROUP_CRIT}]]></groupExpression>
-			<groupHeader>
-			<band height="20"  isSplitAllowed="true" >
+		</groupHeader>
+		<groupFooter>
+			<band splitType="Stretch"/>
+		</groupFooter>
+	</group>
+	<group name="MultipleProject">
+		<groupExpression><![CDATA[$F{GROUP_CRIT}]]></groupExpression>
+		<groupHeader>
+			<band height="20" splitType="Stretch">
 				<staticText>
-					<reportElement
-						style="Report_Footer"
-						x="11"
-						y="0"
-						width="179"
-						height="18"
-						key="staticText-34"
-						stretchType="RelativeToBandHeight"/>
-					<box></box>
-					<textElement textAlignment="Right">
-						<font/>
-					</textElement>
-				<text><![CDATA[Project:]]></text>
+					<reportElement key="staticText-34" style="Report_Footer" stretchType="RelativeToBandHeight" x="11" y="0" width="179" height="18"/>
+					<textElement textAlignment="Right"/>
+					<text><![CDATA[Project:]]></text>
 				</staticText>
 				<staticText>
-					<reportElement
-						style="Report_Footer"
-						x="408"
-						y="0"
-						width="179"
-						height="18"
-						key="staticText-35"
-						stretchType="RelativeToBandHeight"/>
-					<box></box>
-					<textElement textAlignment="Right">
-						<font/>
-					</textElement>
-				<text><![CDATA[Status:]]></text>
+					<reportElement key="staticText-35" style="Report_Footer" stretchType="RelativeToBandHeight" x="408" y="0" width="179" height="18"/>
+					<textElement textAlignment="Right"/>
+					<text><![CDATA[Status:]]></text>
 				</staticText>
-				<textField isStretchWithOverflow="true" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						style="Report_Footer"
-						x="196"
-						y="0"
-						width="179"
-						height="18"
-						key="textField-30"
-						stretchType="RelativeToBandHeight"/>
-					<box></box>
-					<textElement>
-						<font/>
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[$P{PROJECT_SHOW}.toString()]]></textFieldExpression>
+				<textField isStretchWithOverflow="true" isBlankWhenNull="true">
+					<reportElement key="textField-30" style="Report_Footer" stretchType="RelativeToBandHeight" x="196" y="0" width="179" height="18"/>
+					<textElement/>
+					<textFieldExpression class="java.lang.String"><![CDATA[$P{PROJECT_SHOW}.toString()]]></textFieldExpression>
 				</textField>
-				<textField isStretchWithOverflow="true" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						style="Report_Footer"
-						x="593"
-						y="0"
-						width="179"
-						height="18"
-						key="textField-41"
-						stretchType="RelativeToBandHeight"/>
-					<box></box>
-					<textElement>
-						<font/>
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[$P{STATUS_SHOW}.toString()]]></textFieldExpression>
+				<textField isStretchWithOverflow="true" isBlankWhenNull="true">
+					<reportElement key="textField-41" style="Report_Footer" stretchType="RelativeToBandHeight" x="593" y="0" width="179" height="18"/>
+					<textElement/>
+					<textFieldExpression class="java.lang.String"><![CDATA[$P{STATUS_SHOW}.toString()]]></textFieldExpression>
 				</textField>
 			</band>
-			</groupHeader>
-			<groupFooter>
-			<band height="0"  isSplitAllowed="true" >
-			</band>
-			</groupFooter>
-		</group>
-		<group  name="LastFilters" >
-			<groupExpression><![CDATA[$F{GROUP_CRIT}]]></groupExpression>
-			<groupHeader>
-			<band height="100"  isSplitAllowed="true" >
+		</groupHeader>
+		<groupFooter>
+			<band splitType="Stretch"/>
+		</groupFooter>
+	</group>
+	<group name="LastFilters">
+		<groupExpression><![CDATA[$F{GROUP_CRIT}]]></groupExpression>
+		<groupHeader>
+			<band height="100" splitType="Stretch">
 				<staticText>
-					<reportElement
-						style="Report_Footer"
-						x="408"
-						y="20"
-						width="179"
-						height="18"
-						key="staticText-50"/>
-					<box></box>
-					<textElement textAlignment="Right">
-						<font/>
-					</textElement>
-				<text><![CDATA[Include Payments Using Credit:]]></text>
+					<reportElement key="staticText-50" style="Report_Footer" x="408" y="20" width="179" height="18"/>
+					<textElement textAlignment="Right"/>
+					<text><![CDATA[Include Payments Using Credit:]]></text>
 				</staticText>
-				<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						style="Report_Footer"
-						x="593"
-						y="20"
-						width="179"
-						height="18"
-						key="textField-46"/>
-					<box></box>
-					<textElement>
-						<font/>
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[$P{INCL_PAYMENTUSINGCREDIT}.toString()]]></textFieldExpression>
+				<textField isBlankWhenNull="true">
+					<reportElement key="textField-46" style="Report_Footer" x="593" y="20" width="179" height="18"/>
+					<textElement/>
+					<textFieldExpression class="java.lang.String"><![CDATA[$P{INCL_PAYMENTUSINGCREDIT}.toString()]]></textFieldExpression>
 				</textField>
 				<staticText>
-					<reportElement
-						style="Report_Footer"
-						x="11"
-						y="40"
-						width="179"
-						height="18"
-						key="staticText-36"/>
-					<box></box>
-					<textElement textAlignment="Right">
-						<font/>
-					</textElement>
-				<text><![CDATA[Convert to currency:]]></text>
+					<reportElement key="staticText-36" style="Report_Footer" x="11" y="40" width="179" height="18"/>
+					<textElement textAlignment="Right"/>
+					<text><![CDATA[Convert to currency:]]></text>
 				</staticText>
 				<staticText>
-					<reportElement
-						style="Report_Footer"
-						x="408"
-						y="40"
-						width="179"
-						height="18"
-						key="staticText-37"/>
-					<box></box>
-					<textElement textAlignment="Right">
-						<font/>
-					</textElement>
-				<text><![CDATA[Conversion Date:]]></text>
+					<reportElement key="staticText-37" style="Report_Footer" x="408" y="40" width="179" height="18"/>
+					<textElement textAlignment="Right"/>
+					<text><![CDATA[Conversion Date:]]></text>
 				</staticText>
 				<staticText>
-					<reportElement
-						style="Report_Footer"
-						x="11"
-						y="60"
-						width="179"
-						height="18"
-						key="staticText-38"/>
-					<box></box>
-					<textElement textAlignment="Right">
-						<font/>
-					</textElement>
-				<text><![CDATA[Payment Type:]]></text>
+					<reportElement key="staticText-38" style="Report_Footer" x="11" y="60" width="179" height="18"/>
+					<textElement textAlignment="Right"/>
+					<text><![CDATA[Payment Type:]]></text>
 				</staticText>
 				<staticText>
-					<reportElement
-						style="Report_Footer"
-						x="408"
-						y="60"
-						width="179"
-						height="18"
-						key="staticText-39"/>
-					<box></box>
-					<textElement textAlignment="Right">
-						<font/>
-					</textElement>
-				<text><![CDATA[Overdue:]]></text>
+					<reportElement key="staticText-39" style="Report_Footer" x="408" y="60" width="179" height="18"/>
+					<textElement textAlignment="Right"/>
+					<text><![CDATA[Overdue:]]></text>
 				</staticText>
 				<staticText>
-					<reportElement
-						style="Report_Footer"
-						x="11"
-						y="80"
-						width="179"
-						height="18"
-						key="staticText-41"/>
-					<box></box>
-					<textElement textAlignment="Right">
-						<font/>
-					</textElement>
-				<text><![CDATA[Grouping Criteria:]]></text>
+					<reportElement key="staticText-41" style="Report_Footer" x="11" y="80" width="179" height="18"/>
+					<textElement textAlignment="Right"/>
+					<text><![CDATA[Grouping Criteria:]]></text>
 				</staticText>
-				<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						style="Report_Footer"
-						x="196"
-						y="40"
-						width="179"
-						height="18"
-						key="textField-31"/>
-					<box></box>
-					<textElement>
-						<font/>
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[$P{CONVERT_CURRENCY_SHOW}.toString()]]></textFieldExpression>
+				<textField isBlankWhenNull="true">
+					<reportElement key="textField-31" style="Report_Footer" x="196" y="40" width="179" height="18"/>
+					<textElement/>
+					<textFieldExpression class="java.lang.String"><![CDATA[$P{CONVERT_CURRENCY_SHOW}.toString()]]></textFieldExpression>
 				</textField>
-				<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						style="Report_Footer"
-						x="196"
-						y="60"
-						width="179"
-						height="18"
-						key="textField-32"/>
-					<box></box>
-					<textElement>
-						<font/>
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[$P{PAYMTYPE_SHOW}.toString()]]></textFieldExpression>
+				<textField isBlankWhenNull="true">
+					<reportElement key="textField-32" style="Report_Footer" x="196" y="60" width="179" height="18"/>
+					<textElement/>
+					<textFieldExpression class="java.lang.String"><![CDATA[$P{PAYMTYPE_SHOW}.toString()]]></textFieldExpression>
 				</textField>
-				<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						style="Report_Footer"
-						x="196"
-						y="80"
-						width="179"
-						height="18"
-						key="textField-33"/>
-					<box></box>
-					<textElement>
-						<font/>
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[$P{GROUPCRIT_SHOW}.toString()]]></textFieldExpression>
+				<textField isBlankWhenNull="true">
+					<reportElement key="textField-33" style="Report_Footer" x="196" y="80" width="179" height="18"/>
+					<textElement/>
+					<textFieldExpression class="java.lang.String"><![CDATA[$P{GROUPCRIT_SHOW}.toString()]]></textFieldExpression>
 				</textField>
-				<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						style="Report_Footer"
-						x="593"
-						y="60"
-						width="179"
-						height="18"
-						key="textField-35"/>
-					<box></box>
-					<textElement>
-						<font/>
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[$P{OVERDUE_SHOW}.toString()]]></textFieldExpression>
+				<textField isBlankWhenNull="true">
+					<reportElement key="textField-35" style="Report_Footer" x="593" y="60" width="179" height="18"/>
+					<textElement/>
+					<textFieldExpression class="java.lang.String"><![CDATA[$P{OVERDUE_SHOW}.toString()]]></textFieldExpression>
 				</textField>
-				<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						style="Report_Footer"
-						x="593"
-						y="40"
-						width="179"
-						height="18"
-						key="textField-42"/>
-					<box></box>
-					<textElement>
-						<font/>
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[$P{CONVERSIONDATE_SHOW}.toString()]]></textFieldExpression>
+				<textField isBlankWhenNull="true">
+					<reportElement key="textField-42" style="Report_Footer" x="593" y="40" width="179" height="18"/>
+					<textElement/>
+					<textFieldExpression class="java.lang.String"><![CDATA[$P{CONVERSIONDATE_SHOW}.toString()]]></textFieldExpression>
 				</textField>
 				<staticText>
-					<reportElement
-						style="Report_Footer"
-						x="11"
-						y="0"
-						width="179"
-						height="18"
-						key="staticText-47"/>
-					<box></box>
-					<textElement textAlignment="Right">
-						<font/>
-					</textElement>
-				<text><![CDATA[Payment Method:]]></text>
+					<reportElement key="staticText-47" style="Report_Footer" x="11" y="0" width="179" height="18"/>
+					<textElement textAlignment="Right"/>
+					<text><![CDATA[Payment Method:]]></text>
 				</staticText>
 				<staticText>
-					<reportElement
-						style="Report_Footer"
-						x="408"
-						y="0"
-						width="179"
-						height="18"
-						key="staticText-48"/>
-					<box></box>
-					<textElement textAlignment="Right">
-						<font/>
-					</textElement>
-				<text><![CDATA[Financial Account:]]></text>
+					<reportElement key="staticText-48" style="Report_Footer" x="408" y="0" width="179" height="18"/>
+					<textElement textAlignment="Right"/>
+					<text><![CDATA[Financial Account:]]></text>
 				</staticText>
-				<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						style="Report_Footer"
-						x="196"
-						y="0"
-						width="179"
-						height="18"
-						key="textField-43"/>
-					<box></box>
-					<textElement>
-						<font/>
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[$P{PAYMENT_METHOD_SHOW}.toString()]]></textFieldExpression>
+				<textField isBlankWhenNull="true">
+					<reportElement key="textField-43" style="Report_Footer" x="196" y="0" width="179" height="18"/>
+					<textElement/>
+					<textFieldExpression class="java.lang.String"><![CDATA[$P{PAYMENT_METHOD_SHOW}.toString()]]></textFieldExpression>
 				</textField>
-				<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						style="Report_Footer"
-						x="593"
-						y="0"
-						width="179"
-						height="18"
-						key="textField-44"/>
-					<box></box>
-					<textElement>
-						<font/>
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[$P{FINANCIAL_ACCOUNT_SHOW}.toString()]]></textFieldExpression>
+				<textField isBlankWhenNull="true">
+					<reportElement key="textField-44" style="Report_Footer" x="593" y="0" width="179" height="18"/>
+					<textElement/>
+					<textFieldExpression class="java.lang.String"><![CDATA[$P{FINANCIAL_ACCOUNT_SHOW}.toString()]]></textFieldExpression>
 				</textField>
 				<staticText>
-					<reportElement
-						style="Report_Footer"
-						x="11"
-						y="20"
-						width="179"
-						height="18"
-						key="staticText-49"/>
-					<box></box>
-					<textElement textAlignment="Right">
-						<font/>
-					</textElement>
-				<text><![CDATA[Currency:]]></text>
+					<reportElement key="staticText-49" style="Report_Footer" x="11" y="20" width="179" height="18"/>
+					<textElement textAlignment="Right"/>
+					<text><![CDATA[Currency:]]></text>
 				</staticText>
-				<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						style="Report_Footer"
-						x="196"
-						y="20"
-						width="179"
-						height="18"
-						key="textField-45"/>
-					<box></box>
-					<textElement>
-						<font/>
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[$P{CURRENCY_SHOW}.toString()]]></textFieldExpression>
+				<textField isBlankWhenNull="true">
+					<reportElement key="textField-45" style="Report_Footer" x="196" y="20" width="179" height="18"/>
+					<textElement/>
+					<textFieldExpression class="java.lang.String"><![CDATA[$P{CURRENCY_SHOW}.toString()]]></textFieldExpression>
 				</textField>
 			</band>
-			</groupHeader>
-			<groupFooter>
-			<band height="0"  isSplitAllowed="true" >
-			</band>
-			</groupFooter>
-		</group>
-		<group  name="MultipleOrderingCriteria" >
-			<groupExpression><![CDATA[$F{GROUP_CRIT}]]></groupExpression>
-			<groupHeader>
-			<band height="20"  isSplitAllowed="true" >
+		</groupHeader>
+		<groupFooter>
+			<band splitType="Stretch"/>
+		</groupFooter>
+	</group>
+	<group name="MultipleOrderingCriteria">
+		<groupExpression><![CDATA[$F{GROUP_CRIT}]]></groupExpression>
+		<groupHeader>
+			<band height="20" splitType="Stretch">
 				<staticText>
-					<reportElement
-						style="Report_Footer"
-						x="11"
-						y="0"
-						width="179"
-						height="18"
-						key="staticText-43"
-						stretchType="RelativeToBandHeight"/>
-					<box></box>
-					<textElement textAlignment="Right">
-						<font/>
-					</textElement>
-				<text><![CDATA[Ordering Criteria:]]></text>
+					<reportElement key="staticText-43" style="Report_Footer" stretchType="RelativeToBandHeight" x="11" y="0" width="179" height="18"/>
+					<textElement textAlignment="Right"/>
+					<text><![CDATA[Ordering Criteria:]]></text>
 				</staticText>
-				<textField isStretchWithOverflow="true" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						style="Report_Footer"
-						x="196"
-						y="0"
-						width="179"
-						height="18"
-						key="textField-34"
-						stretchType="RelativeToBandHeight"/>
-					<box></box>
-					<textElement>
-						<font/>
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[$P{ORDCRIT_SHOW}.toString()]]></textFieldExpression>
+				<textField isStretchWithOverflow="true" isBlankWhenNull="true">
+					<reportElement key="textField-34" style="Report_Footer" stretchType="RelativeToBandHeight" x="196" y="0" width="179" height="18"/>
+					<textElement/>
+					<textFieldExpression class="java.lang.String"><![CDATA[$P{ORDCRIT_SHOW}.toString()]]></textFieldExpression>
 				</textField>
 			</band>
-			</groupHeader>
-			<groupFooter>
-			<band height="0"  isSplitAllowed="true" >
-			</band>
-			</groupFooter>
-		</group>
-		<group  name="FirstPage" isStartNewPage="true" minHeightToStartNewPage="500" >
-			<groupExpression><![CDATA[]]></groupExpression>
-			<groupHeader>
-			<band height="20"  isSplitAllowed="true" >
-			</band>
-			</groupHeader>
-			<groupFooter>
-			<band height="0"  isSplitAllowed="true" >
-			</band>
-			</groupFooter>
-		</group>
-		<group  name="GroupingCriteria" >
-			<groupExpression><![CDATA[($P{GROUP_CRIT}.equalsIgnoreCase("APRM_FATS_BPARTNER") ? $F{BPARTNER} : 
+		</groupHeader>
+		<groupFooter>
+			<band splitType="Stretch"/>
+		</groupFooter>
+	</group>
+	<group name="FirstPage" isStartNewPage="true" minHeightToStartNewPage="500">
+		<groupExpression><![CDATA[]]></groupExpression>
+		<groupHeader>
+			<band height="20" splitType="Stretch"/>
+		</groupHeader>
+		<groupFooter>
+			<band splitType="Stretch"/>
+		</groupFooter>
+	</group>
+	<group name="GroupingCriteria">
+		<groupExpression><![CDATA[($P{GROUP_CRIT}.equalsIgnoreCase("APRM_FATS_BPARTNER") ? $F{BPARTNER} :
   ($P{GROUP_CRIT}.equalsIgnoreCase("Project") ? $F{PROJECT} :
     ($P{GROUP_CRIT}.equalsIgnoreCase("FINPR_BPartner_Category") ? $F{BP_GROUP} :
       ($P{GROUP_CRIT}.equalsIgnoreCase("INS_CURRENCY") ? $F{BASE_CURRENCY} : " "
@@ -709,21 +291,15 @@
     )
   )
 )]]></groupExpression>
-			<groupHeader>
-			<band height="30"  isSplitAllowed="true" >
-				<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						style="Detail_Header"
-						x="103"
-						y="0"
-						width="200"
-						height="20"
-						key="textField-19"/>
-					<box></box>
+		<groupHeader>
+			<band height="30" splitType="Stretch">
+				<printWhenExpression><![CDATA[!"".equals($P{GROUP_CRIT})]]></printWhenExpression>
+				<textField isBlankWhenNull="true">
+					<reportElement key="textField-19" style="Detail_Header" x="103" y="0" width="246" height="20"/>
 					<textElement>
 						<font size="10"/>
 					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[($P{GROUP_CRIT}.equalsIgnoreCase("APRM_FATS_BPARTNER") ? $F{BPARTNER}.toString() : 
+					<textFieldExpression class="java.lang.String"><![CDATA[($P{GROUP_CRIT}.equalsIgnoreCase("APRM_FATS_BPARTNER") ? $F{BPARTNER}.toString() :
   ($P{GROUP_CRIT}.equalsIgnoreCase("Project") ? $F{PROJECT}.toString() :
     ($P{GROUP_CRIT}.equalsIgnoreCase("FINPR_BPartner_Category") ? $F{BP_GROUP}.toString() :
       ($P{GROUP_CRIT}.equalsIgnoreCase("INS_CURRENCY") ? $F{TRANS_CURRENCY}.toString() : "None"
@@ -733,1278 +309,511 @@
 )]]></textFieldExpression>
 				</textField>
 				<staticText>
-					<reportElement
-						style="Detail_Header"
-						x="1"
-						y="0"
-						width="103"
-						height="20"
-						key="staticText-44"/>
-					<box></box>
+					<reportElement key="staticText-44" style="Detail_Header" x="1" y="0" width="103" height="20"/>
+					<textElement/>
+					<text><![CDATA[Grouping Criteria:]]></text>
+				</staticText>
+				<staticText>
+					<reportElement key="staticText-44" style="Detail_Header" x="349" y="0" width="58" height="20"/>
+					<textElement textAlignment="Right"/>
+					<text><![CDATA[Balance:]]></text>
+				</staticText>
+				<textField isBlankWhenNull="true">
+					<reportElement key="textField-19" style="Detail_Header" x="459" y="0" width="33" height="20"/>
+					<textElement textAlignment="Justified">
+						<font size="10"/>
+					</textElement>
+					<textFieldExpression class="java.lang.String"><![CDATA[$F{BASE_CURRENCY}]]></textFieldExpression>
+				</textField>
+				<textField evaluationTime="Group" evaluationGroup="GroupingCriteria" isBlankWhenNull="true">
+					<reportElement key="textField-19" style="Detail_Header" x="407" y="0" width="52" height="20"/>
+					<textElement textAlignment="Right">
+						<font size="10"/>
+					</textElement>
+					<textFieldExpression class="java.lang.String"><![CDATA[($V{SUMBALANCE}!=null)?$V{SUMBALANCE}.toString():new String(" ")]]></textFieldExpression>
+				</textField>
+			</band>
+		</groupHeader>
+	</group>
+	<group name="Status">
+		<groupExpression><![CDATA[$F{STATUS}]]></groupExpression>
+		<groupHeader>
+			<band height="60" splitType="Stretch">
+				<staticText>
+					<reportElement key="staticText-2" style="Detail_Header" x="1" y="35" width="100" height="25"/>
+					<box leftPadding="2"/>
+					<textElement verticalAlignment="Middle">
+						<font size="8" isBold="false"/>
+					</textElement>
+					<text><![CDATA[Business Partner]]></text>
+				</staticText>
+				<staticText>
+					<reportElement key="staticText-4" style="Detail_Header" x="285" y="35" width="65" height="25"/>
+					<box leftPadding="2"/>
+					<textElement verticalAlignment="Middle">
+						<font size="8" isBold="false"/>
+					</textElement>
+					<text><![CDATA[Payment]]></text>
+				</staticText>
+				<staticText>
+					<reportElement key="staticText-5" style="Detail_Header" x="102" y="35" width="70" height="25"/>
+					<box leftPadding="2"/>
+					<textElement verticalAlignment="Middle">
+						<font size="8" isBold="false"/>
+					</textElement>
+					<text><![CDATA[Sales Person]]></text>
+				</staticText>
+				<staticText>
+					<reportElement key="staticText-6" style="Detail_Header" x="173" y="35" width="55" height="25"/>
+					<box leftPadding="2"/>
+					<textElement verticalAlignment="Middle">
+						<font size="8" isBold="false"/>
+					</textElement>
+					<text><![CDATA[Invoice
+Number]]></text>
+				</staticText>
+				<staticText>
+					<reportElement key="staticText-7" style="Detail_Header" x="229" y="35" width="55" height="25"/>
+					<box leftPadding="2"/>
+					<textElement textAlignment="Left" verticalAlignment="Middle">
+						<font size="8" isBold="false"/>
+					</textElement>
+					<text><![CDATA[Invoice Date]]></text>
+				</staticText>
+				<staticText>
+					<reportElement key="staticText-8" style="Detail_Header" x="351" y="35" width="61" height="25"/>
+					<box leftPadding="2"/>
+					<textElement textAlignment="Left" verticalAlignment="Middle">
+						<font size="8" isBold="false"/>
+					</textElement>
+					<text><![CDATA[Due Date]]></text>
+				</staticText>
+				<staticText>
+					<reportElement key="staticText-9" style="Detail_Header" x="412" y="35" width="33" height="25"/>
+					<textElement textAlignment="Center" verticalAlignment="Middle">
+						<font size="8" isBold="false"/>
+					</textElement>
+					<text><![CDATA[Planned
+DSO]]></text>
+				</staticText>
+				<staticText>
+					<reportElement key="staticText-10" style="Detail_Header" x="446" y="35" width="33" height="25"/>
+					<textElement textAlignment="Center" verticalAlignment="Middle">
+						<font size="8" isBold="false"/>
+					</textElement>
+					<text><![CDATA[Current
+DSO]]></text>
+				</staticText>
+				<staticText>
+					<reportElement key="staticText-11" style="Detail_Header" x="480" y="35" width="36" height="25"/>
+					<textElement textAlignment="Center" verticalAlignment="Middle">
+						<font size="8" isBold="false"/>
+					</textElement>
+					<text><![CDATA[Overdue]]></text>
+				</staticText>
+				<staticText>
+					<reportElement key="staticText-13" style="Detail_Header" x="659" y="35" width="80" height="25"/>
+					<box rightPadding="2"/>
+					<textElement textAlignment="Right">
+						<font size="8" isBold="false"/>
+					</textElement>
+					<text><![CDATA[Base
+Amount]]></text>
+				</staticText>
+				<staticText>
+					<reportElement key="staticText-14" style="Detail_Header" x="740" y="35" width="41" height="25"/>
+					<box leftPadding="2"/>
+					<textElement textAlignment="Center">
+						<font size="8" isBold="false"/>
+					</textElement>
+					<text><![CDATA[Base
+Currency]]></text>
+				</staticText>
+				<staticText>
+					<reportElement key="staticText-15" style="Detail_Header" x="517" y="35" width="80" height="25"/>
+					<box rightPadding="2"/>
+					<textElement textAlignment="Right">
+						<font size="8" isBold="false"/>
+					</textElement>
+					<text><![CDATA[Transactional
+Amount]]></text>
+				</staticText>
+				<staticText>
+					<reportElement key="staticText-16" style="Detail_Header" x="598" y="35" width="60" height="25"/>
+					<box leftPadding="2"/>
+					<textElement textAlignment="Center">
+						<font size="8" isBold="false"/>
+					</textElement>
+					<text><![CDATA[Transactional Currency]]></text>
+				</staticText>
+				<textField isBlankWhenNull="false">
+					<reportElement key="textField-20" style="Detail_Header" x="42" y="0" width="140" height="20"/>
 					<textElement>
-						<font/>
+						<font size="10"/>
 					</textElement>
-				<text><![CDATA[Grouping Criteria:]]></text>
+					<textFieldExpression class="java.lang.String"><![CDATA[$F{STATUS}]]></textFieldExpression>
+				</textField>
+				<line>
+					<reportElement key="line-36" style="Report_Footer" x="0" y="35" width="782" height="1"/>
+				</line>
+				<line>
+					<reportElement key="line-37" style="Report_Footer" stretchType="RelativeToBandHeight" x="0" y="35" width="1" height="25"/>
+				</line>
+				<line>
+					<reportElement key="line-38" style="Report_Footer" stretchType="RelativeToBandHeight" x="101" y="35" width="1" height="25"/>
+				</line>
+				<line>
+					<reportElement key="line-39" style="Report_Footer" stretchType="RelativeToBandHeight" x="172" y="35" width="1" height="25"/>
+				</line>
+				<line>
+					<reportElement key="line-40" style="Report_Footer" stretchType="RelativeToBandHeight" x="228" y="35" width="1" height="25"/>
+				</line>
+				<line>
+					<reportElement key="line-41" style="Report_Footer" stretchType="RelativeToBandHeight" x="284" y="35" width="1" height="25"/>
+				</line>
+				<line>
+					<reportElement key="line-42" style="Report_Footer" stretchType="RelativeToBandHeight" x="350" y="35" width="1" height="25"/>
+				</line>
+				<line>
+					<reportElement key="line-43" style="Report_Footer" stretchType="RelativeToBandHeight" x="412" y="35" width="1" height="25"/>
+				</line>
+				<line>
+					<reportElement key="line-44" style="Report_Footer" stretchType="RelativeToBandHeight" x="445" y="35" width="1" height="25"/>
+				</line>
+				<line>
+					<reportElement key="line-45" style="Report_Footer" stretchType="RelativeToBandHeight" x="479" y="35" width="1" height="25"/>
+				</line>
+				<line>
+					<reportElement key="line-46" style="Report_Footer" stretchType="RelativeToBandHeight" x="516" y="35" width="1" height="25"/>
+				</line>
+				<line>
+					<reportElement key="line-47" style="Report_Footer" stretchType="RelativeToBandHeight" x="597" y="35" width="1" height="25"/>
+				</line>
+				<line>
+					<reportElement key="line-48" style="Report_Footer" stretchType="RelativeToBandHeight" x="658" y="35" width="1" height="25"/>
+				</line>
+				<line>
+					<reportElement key="line-49" style="Report_Footer" stretchType="RelativeToBandHeight" x="739" y="35" width="1" height="25"/>
+				</line>
+				<line>
+					<reportElement key="line-50" style="Report_Footer" stretchType="RelativeToBandHeight" x="781" y="35" width="1" height="25"/>
+				</line>
+				<staticText>
+					<reportElement key="staticText-45" style="Detail_Header" x="1" y="0" width="41" height="20"/>
+					<textElement/>
+					<text><![CDATA[Status:]]></text>
 				</staticText>
 			</band>
-			</groupHeader>
-			<groupFooter>
-			<band height="30"  isSplitAllowed="true" >
+		</groupHeader>
+		<groupFooter>
+			<band height="30" splitType="Stretch">
+				<line>
+					<reportElement key="line-3" style="Report_Footer" x="0" y="0" width="782" height="1"/>
+				</line>
 				<staticText>
-					<reportElement
-						style="Report_Footer"
-						x="583"
-						y="6"
-						width="118"
-						height="20"
-						key="staticText-22"/>
-					<box></box>
+					<reportElement key="staticText-21" style="Report_Footer" x="626" y="6" width="75" height="20"/>
 					<textElement textAlignment="Right">
 						<font size="8"/>
 					</textElement>
-				<text><![CDATA[Sub Total (Grouping Criteria):]]></text>
+					<text><![CDATA[Sub Total (Status):]]></text>
 				</staticText>
-				<line direction="TopDown">
-					<reportElement
-						style="Report_Footer"
-						x="583"
-						y="5"
-						width="198"
-						height="0"
-						key="line-27"/>
-					<graphicElement stretchType="NoStretch"/>
+				<line>
+					<reportElement key="line-32" style="Report_Footer" x="626" y="27" width="156" height="1"/>
 				</line>
-				<line direction="TopDown">
-					<reportElement
-						style="Report_Footer"
-						x="583"
-						y="27"
-						width="198"
-						height="0"
-						key="line-28"/>
-					<graphicElement stretchType="NoStretch"/>
+				<line>
+					<reportElement key="line-33" style="Report_Footer" x="625" y="5" width="156" height="1"/>
 				</line>
-				<line direction="TopDown">
-					<reportElement
-						style="Report_Footer"
-						x="582"
-						y="5"
-						width="0"
-						height="23"
-						key="line-29"/>
-					<graphicElement stretchType="NoStretch"/>
+				<line>
+					<reportElement key="line-34" style="Report_Footer" x="625" y="5" width="1" height="23"/>
 				</line>
-				<line direction="TopDown">
-					<reportElement
-						style="Report_Footer"
-						x="781"
-						y="5"
-						width="0"
-						height="23"
-						key="line-30"/>
-					<graphicElement stretchType="NoStretch"/>
+				<line>
+					<reportElement key="line-35" style="Report_Footer" x="781" y="5" width="1" height="23"/>
 				</line>
-				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						style="Report_Footer"
-						x="702"
-						y="6"
-						width="78"
-						height="20"
-						key="textField-23"/>
-					<box rightPadding="2"></box>
-					<textElement textAlignment="Right" verticalAlignment="Middle">
-						<font size="10"/>
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[($V{SUMSUBTOTALGC}!=null)?$V{SUMSUBTOTALGC}.toString():new String(" ")]]></textFieldExpression>
-				</textField>
-			</band>
-			</groupFooter>
-		</group>
-		<group  name="Status" >
-			<groupExpression><![CDATA[$F{STATUS}]]></groupExpression>
-			<groupHeader>
-			<band height="60"  isSplitAllowed="true" >
-				<staticText>
-					<reportElement
-						style="Detail_Header"
-						x="1"
-						y="35"
-						width="100"
-						height="25"
-						key="staticText-2"/>
-					<box leftPadding="2"></box>
-					<textElement verticalAlignment="Middle">
-						<font size="8" isBold="false"/>
-					</textElement>
-				<text><![CDATA[Business Partner]]></text>
-				</staticText>
-				<staticText>
-					<reportElement
-						style="Detail_Header"
-						x="285"
-						y="35"
-						width="65"
-						height="25"
-						key="staticText-4"/>
-					<box leftPadding="2"></box>
-					<textElement verticalAlignment="Middle">
-						<font size="8" isBold="false"/>
-					</textElement>
-				<text><![CDATA[Payment]]></text>
-				</staticText>
-				<staticText>
-					<reportElement
-						style="Detail_Header"
-						x="102"
-						y="35"
-						width="70"
-						height="25"
-						key="staticText-5"/>
-					<box leftPadding="2"></box>
-					<textElement verticalAlignment="Middle">
-						<font size="8" isBold="false"/>
-					</textElement>
-				<text><![CDATA[Sales Person]]></text>
-				</staticText>
-				<staticText>
-					<reportElement
-						style="Detail_Header"
-						x="173"
-						y="35"
-						width="55"
-						height="25"
-						key="staticText-6"/>
-					<box leftPadding="2"></box>
-					<textElement verticalAlignment="Middle">
-						<font size="8" isBold="false"/>
-					</textElement>
-				<text><![CDATA[Invoice
-Number]]></text>
-				</staticText>
-				<staticText>
-					<reportElement
-						style="Detail_Header"
-						x="229"
-						y="35"
-						width="55"
-						height="25"
-						key="staticText-7"/>
-					<box leftPadding="2"></box>
-					<textElement textAlignment="Left" verticalAlignment="Middle">
-						<font size="8" isBold="false"/>
-					</textElement>
-				<text><![CDATA[Invoice Date]]></text>
-				</staticText>
-				<staticText>
-					<reportElement
-						style="Detail_Header"
-						x="351"
-						y="35"
-						width="61"
-						height="25"
-						key="staticText-8"/>
-					<box leftPadding="2"></box>
-					<textElement textAlignment="Left" verticalAlignment="Middle">
-						<font size="8" isBold="false"/>
-					</textElement>
-				<text><![CDATA[Due Date]]></text>
-				</staticText>
-				<staticText>
-					<reportElement
-						style="Detail_Header"
-						x="412"
-						y="35"
-						width="33"
-						height="25"
-						key="staticText-9"/>
-					<box></box>
-					<textElement textAlignment="Center" verticalAlignment="Middle">
-						<font size="8" isBold="false"/>
-					</textElement>
-				<text><![CDATA[Planned
-DSO]]></text>
-				</staticText>
-				<staticText>
-					<reportElement
-						style="Detail_Header"
-						x="446"
-						y="35"
-						width="33"
-						height="25"
-						key="staticText-10"/>
-					<box></box>
-					<textElement textAlignment="Center" verticalAlignment="Middle">
-						<font size="8" isBold="false"/>
-					</textElement>
-				<text><![CDATA[Current
-DSO]]></text>
-				</staticText>
-				<staticText>
-					<reportElement
-						style="Detail_Header"
-						x="480"
-						y="35"
-						width="36"
-						height="25"
-						key="staticText-11"/>
-					<box></box>
-					<textElement textAlignment="Center" verticalAlignment="Middle">
-						<font size="8" isBold="false"/>
-					</textElement>
-				<text><![CDATA[Overdue]]></text>
-				</staticText>
-				<staticText>
-					<reportElement
-						style="Detail_Header"
-						x="659"
-						y="35"
-						width="80"
-						height="25"
-						key="staticText-13"/>
-					<box rightPadding="2"></box>
-					<textElement textAlignment="Right">
-						<font size="8" isBold="false"/>
-					</textElement>
-				<text><![CDATA[Base
-Amount]]></text>
-				</staticText>
-				<staticText>
-					<reportElement
-						style="Detail_Header"
-						x="740"
-						y="35"
-						width="41"
-						height="25"
-						key="staticText-14"/>
-					<box leftPadding="2"></box>
-					<textElement textAlignment="Center">
-						<font size="8" isBold="false"/>
-					</textElement>
-				<text><![CDATA[Base
-Currency]]></text>
-				</staticText>
-				<staticText>
-					<reportElement
-						style="Detail_Header"
-						x="517"
-						y="35"
-						width="80"
-						height="25"
-						key="staticText-15"/>
-					<box rightPadding="2"></box>
-					<textElement textAlignment="Right">
-						<font size="8" isBold="false"/>
-					</textElement>
-				<text><![CDATA[Transactional
-Amount]]></text>
-				</staticText>
-				<staticText>
-					<reportElement
-						style="Detail_Header"
-						x="598"
-						y="35"
-						width="60"
-						height="25"
-						key="staticText-16"/>
-					<box leftPadding="2"></box>
-					<textElement textAlignment="Center">
-						<font size="8" isBold="false"/>
-					</textElement>
-				<text><![CDATA[Transactional Currency]]></text>
-				</staticText>
-				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						style="Detail_Header"
-						x="42"
-						y="0"
-						width="140"
-						height="20"
-						key="textField-20"/>
-					<box></box>
-					<textElement>
-						<font size="10"/>
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[$F{STATUS}]]></textFieldExpression>
-				</textField>
-				<line direction="TopDown">
-					<reportElement
-						style="Report_Footer"
-						x="0"
-						y="35"
-						width="782"
-						height="0"
-						key="line-36"/>
-					<graphicElement stretchType="NoStretch"/>
-				</line>
-				<line direction="TopDown">
-					<reportElement
-						style="Report_Footer"
-						x="0"
-						y="35"
-						width="0"
-						height="25"
-						key="line-37"
-						stretchType="RelativeToBandHeight"/>
-					<graphicElement stretchType="RelativeToBandHeight"/>
-				</line>
-				<line direction="TopDown">
-					<reportElement
-						style="Report_Footer"
-						x="101"
-						y="35"
-						width="0"
-						height="25"
-						key="line-38"
-						stretchType="RelativeToBandHeight"/>
-					<graphicElement stretchType="RelativeToBandHeight"/>
-				</line>
-				<line direction="TopDown">
-					<reportElement
-						style="Report_Footer"
-						x="172"
-						y="35"
-						width="0"
-						height="25"
-						key="line-39"
-						stretchType="RelativeToBandHeight"/>
-					<graphicElement stretchType="RelativeToBandHeight"/>
-				</line>
-				<line direction="TopDown">
-					<reportElement
-						style="Report_Footer"
-						x="228"
-						y="35"
-						width="0"
-						height="25"
-						key="line-40"
-						stretchType="RelativeToBandHeight"/>
-					<graphicElement stretchType="RelativeToBandHeight"/>
-				</line>
-				<line direction="TopDown">
-					<reportElement
-						style="Report_Footer"
-						x="284"
-						y="35"
-						width="0"
-						height="25"
-						key="line-41"
-						stretchType="RelativeToBandHeight"/>
-					<graphicElement stretchType="RelativeToBandHeight"/>
-				</line>
-				<line direction="TopDown">
-					<reportElement
-						style="Report_Footer"
-						x="350"
-						y="35"
-						width="0"
-						height="25"
-						key="line-42"
-						stretchType="RelativeToBandHeight"/>
-					<graphicElement stretchType="RelativeToBandHeight"/>
-				</line>
-				<line direction="TopDown">
-					<reportElement
-						style="Report_Footer"
-						x="412"
-						y="35"
-						width="0"
-						height="25"
-						key="line-43"
-						stretchType="RelativeToBandHeight"/>
-					<graphicElement stretchType="RelativeToBandHeight"/>
-				</line>
-				<line direction="TopDown">
-					<reportElement
-						style="Report_Footer"
-						x="445"
-						y="35"
-						width="0"
-						height="25"
-						key="line-44"
-						stretchType="RelativeToBandHeight"/>
-					<graphicElement stretchType="RelativeToBandHeight"/>
-				</line>
-				<line direction="TopDown">
-					<reportElement
-						style="Report_Footer"
-						x="479"
-						y="35"
-						width="0"
-						height="25"
-						key="line-45"
-						stretchType="RelativeToBandHeight"/>
-					<graphicElement stretchType="RelativeToBandHeight"/>
-				</line>
-				<line direction="TopDown">
-					<reportElement
-						style="Report_Footer"
-						x="516"
-						y="35"
-						width="0"
-						height="25"
-						key="line-46"
-						stretchType="RelativeToBandHeight"/>
-					<graphicElement stretchType="RelativeToBandHeight"/>
-				</line>
-				<line direction="TopDown">
-					<reportElement
-						style="Report_Footer"
-						x="597"
-						y="35"
-						width="0"
-						height="25"
-						key="line-47"
-						stretchType="RelativeToBandHeight"/>
-					<graphicElement stretchType="RelativeToBandHeight"/>
-				</line>
-				<line direction="TopDown">
-					<reportElement
-						style="Report_Footer"
-						x="658"
-						y="35"
-						width="0"
-						height="25"
-						key="line-48"
-						stretchType="RelativeToBandHeight"/>
-					<graphicElement stretchType="RelativeToBandHeight"/>
-				</line>
-				<line direction="TopDown">
-					<reportElement
-						style="Report_Footer"
-						x="739"
-						y="35"
-						width="0"
-						height="25"
-						key="line-49"
-						stretchType="RelativeToBandHeight"/>
-					<graphicElement stretchType="RelativeToBandHeight"/>
-				</line>
-				<line direction="TopDown">
-					<reportElement
-						style="Report_Footer"
-						x="781"
-						y="35"
-						width="0"
-						height="25"
-						key="line-50"
-						stretchType="RelativeToBandHeight"/>
-					<graphicElement stretchType="RelativeToBandHeight"/>
-				</line>
-				<staticText>
-					<reportElement
-						style="Detail_Header"
-						x="1"
-						y="0"
-						width="41"
-						height="20"
-						key="staticText-45"/>
-					<box></box>
-					<textElement>
-						<font/>
-					</textElement>
-				<text><![CDATA[Status:]]></text>
-				</staticText>
-			</band>
-			</groupHeader>
-			<groupFooter>
-			<band height="30"  isSplitAllowed="true" >
-				<line direction="TopDown">
-					<reportElement
-						style="Report_Footer"
-						x="0"
-						y="0"
-						width="782"
-						height="0"
-						key="line-3"/>
-					<graphicElement stretchType="NoStretch"/>
-				</line>
-				<staticText>
-					<reportElement
-						style="Report_Footer"
-						x="626"
-						y="6"
-						width="75"
-						height="20"
-						key="staticText-21"/>
-					<box></box>
-					<textElement textAlignment="Right">
-						<font size="8"/>
-					</textElement>
-				<text><![CDATA[Sub Total (Status):]]></text>
-				</staticText>
-				<line direction="TopDown">
-					<reportElement
-						style="Report_Footer"
-						x="626"
-						y="27"
-						width="156"
-						height="0"
-						key="line-32"/>
-					<graphicElement stretchType="NoStretch"/>
-				</line>
-				<line direction="TopDown">
-					<reportElement
-						style="Report_Footer"
-						x="625"
-						y="5"
-						width="156"
-						height="0"
-						key="line-33"/>
-					<graphicElement stretchType="NoStretch"/>
-				</line>
-				<line direction="TopDown">
-					<reportElement
-						style="Report_Footer"
-						x="625"
-						y="5"
-						width="0"
-						height="23"
-						key="line-34"/>
-					<graphicElement stretchType="NoStretch"/>
-				</line>
-				<line direction="TopDown">
-					<reportElement
-						style="Report_Footer"
-						x="781"
-						y="5"
-						width="0"
-						height="23"
-						key="line-35"/>
-					<graphicElement stretchType="NoStretch"/>
-				</line>
-				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						style="Report_Footer"
-						x="702"
-						y="6"
-						width="78"
-						height="20"
-						key="textField-22"/>
-					<box rightPadding="2"></box>
+				<textField isBlankWhenNull="false">
+					<reportElement key="textField-22" style="Report_Footer" x="702" y="6" width="78" height="20"/>
+					<box rightPadding="2"/>
 					<textElement textAlignment="Right">
 						<font size="10"/>
 					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[($V{SUMSUBTOTALSTATUS}!=null)?$V{SUMSUBTOTALSTATUS}.toString():new String(" ")]]></textFieldExpression>
+					<textFieldExpression class="java.lang.String"><![CDATA[($V{SUMSUBTOTALSTATUS}!=null)?$V{SUMSUBTOTALSTATUS}.toString():new String(" ")]]></textFieldExpression>
 				</textField>
 			</band>
-			</groupFooter>
-		</group>
-		<background>
-			<band height="0"  isSplitAllowed="true" >
-			</band>
-		</background>
-		<title>
-			<band height="153"  isSplitAllowed="true" >
-				<staticText>
-					<reportElement
-						style="Report_Footer"
-						x="11"
-						y="73"
-						width="179"
-						height="18"
-						key="staticText-24"/>
-					<box></box>
-					<textElement textAlignment="Right">
-						<font/>
-					</textElement>
+		</groupFooter>
+	</group>
+	<background>
+		<band splitType="Stretch"/>
+	</background>
+	<title>
+		<band height="153" splitType="Stretch">
+			<staticText>
+				<reportElement key="staticText-24" style="Report_Footer" x="11" y="73" width="179" height="18"/>
+				<textElement textAlignment="Right"/>
 				<text><![CDATA[Organization:]]></text>
-				</staticText>
-				<staticText>
-					<reportElement
-						style="Report_Footer"
-						x="408"
-						y="73"
-						width="179"
-						height="18"
-						key="staticText-25"/>
-					<box></box>
-					<textElement textAlignment="Right">
-						<font/>
-					</textElement>
+			</staticText>
+			<staticText>
+				<reportElement key="staticText-25" style="Report_Footer" x="408" y="73" width="179" height="18"/>
+				<textElement textAlignment="Right"/>
 				<text><![CDATA[Include Sub-Organization:]]></text>
-				</staticText>
-				<staticText>
-					<reportElement
-						style="Report_Footer"
-						x="11"
-						y="93"
-						width="179"
-						height="18"
-						key="staticText-26"/>
-					<box></box>
-					<textElement textAlignment="Right">
-						<font/>
-					</textElement>
+			</staticText>
+			<staticText>
+				<reportElement key="staticText-26" style="Report_Footer" x="11" y="93" width="179" height="18"/>
+				<textElement textAlignment="Right"/>
 				<text><![CDATA[Due Date From:]]></text>
-				</staticText>
-				<staticText>
-					<reportElement
-						style="Report_Footer"
-						x="408"
-						y="93"
-						width="179"
-						height="18"
-						key="staticText-27"/>
-					<box></box>
-					<textElement textAlignment="Right">
-						<font/>
-					</textElement>
+			</staticText>
+			<staticText>
+				<reportElement key="staticText-27" style="Report_Footer" x="408" y="93" width="179" height="18"/>
+				<textElement textAlignment="Right"/>
 				<text><![CDATA[Due Date To:]]></text>
-				</staticText>
-				<staticText>
-					<reportElement
-						style="Report_Footer"
-						x="11"
-						y="113"
-						width="179"
-						height="18"
-						key="staticText-28"/>
-					<box></box>
-					<textElement textAlignment="Right">
-						<font/>
-					</textElement>
+			</staticText>
+			<staticText>
+				<reportElement key="staticText-28" style="Report_Footer" x="11" y="113" width="179" height="18"/>
+				<textElement textAlignment="Right"/>
 				<text><![CDATA[Amount From:]]></text>
-				</staticText>
-				<staticText>
-					<reportElement
-						style="Report_Footer"
-						x="408"
-						y="113"
-						width="179"
-						height="18"
-						key="staticText-29"/>
-					<box></box>
-					<textElement textAlignment="Right">
-						<font/>
-					</textElement>
+			</staticText>
+			<staticText>
+				<reportElement key="staticText-29" style="Report_Footer" x="408" y="113" width="179" height="18"/>
+				<textElement textAlignment="Right"/>
 				<text><![CDATA[Amount To:]]></text>
-				</staticText>
-				<staticText>
-					<reportElement
-						style="Report_Footer"
-						x="11"
-						y="133"
-						width="179"
-						height="18"
-						key="staticText-30"/>
-					<box></box>
-					<textElement textAlignment="Right">
-						<font/>
-					</textElement>
+			</staticText>
+			<staticText>
+				<reportElement key="staticText-30" style="Report_Footer" x="11" y="133" width="179" height="18"/>
+				<textElement textAlignment="Right"/>
 				<text><![CDATA[Document Date From:]]></text>
-				</staticText>
-				<staticText>
-					<reportElement
-						style="Report_Footer"
-						x="408"
-						y="133"
-						width="179"
-						height="18"
-						key="staticText-31"/>
-					<box></box>
-					<textElement textAlignment="Right">
-						<font/>
-					</textElement>
+			</staticText>
+			<staticText>
+				<reportElement key="staticText-31" style="Report_Footer" x="408" y="133" width="179" height="18"/>
+				<textElement textAlignment="Right"/>
 				<text><![CDATA[Document Date To:]]></text>
-				</staticText>
-				<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						style="Report_Footer"
-						x="196"
-						y="73"
-						width="179"
-						height="18"
-						key="textField-25"/>
-					<box></box>
-					<textElement>
-						<font/>
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[$P{ORG_SHOW}.toString()]]></textFieldExpression>
-				</textField>
-				<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						style="Report_Footer"
-						x="196"
-						y="93"
-						width="179"
-						height="18"
-						key="textField-26"/>
-					<box></box>
-					<textElement>
-						<font/>
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[$P{DUEDATEFROM_SHOW}.toString()]]></textFieldExpression>
-				</textField>
-				<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						style="Report_Footer"
-						x="196"
-						y="113"
-						width="179"
-						height="18"
-						key="textField-27"/>
-					<box></box>
-					<textElement>
-						<font/>
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[$P{AMTFROM_SHOW}.toString()]]></textFieldExpression>
-				</textField>
-				<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						style="Report_Footer"
-						x="196"
-						y="133"
-						width="179"
-						height="18"
-						key="textField-28"/>
-					<box></box>
-					<textElement>
-						<font/>
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[$P{DOCDATEFROM_SHOW}.toString()]]></textFieldExpression>
-				</textField>
-				<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						style="Report_Footer"
-						x="593"
-						y="73"
-						width="179"
-						height="18"
-						key="textField-36"/>
-					<box></box>
-					<textElement>
-						<font/>
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[$P{INCL_SUBORG_SHOW}.toString()]]></textFieldExpression>
-				</textField>
-				<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						style="Report_Footer"
-						x="593"
-						y="93"
-						width="179"
-						height="18"
-						key="textField-37"/>
-					<box></box>
-					<textElement>
-						<font/>
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[$P{DUEDATETO_SHOW}.toString()]]></textFieldExpression>
-				</textField>
-				<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						style="Report_Footer"
-						x="593"
-						y="113"
-						width="179"
-						height="18"
-						key="textField-38"/>
-					<box></box>
-					<textElement>
-						<font/>
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[$P{AMTTO_SHOW}.toString()]]></textFieldExpression>
-				</textField>
-				<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						style="Report_Footer"
-						x="593"
-						y="133"
-						width="179"
-						height="18"
-						key="textField-39"/>
-					<box></box>
-					<textElement>
-						<font/>
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[$P{DOCDATETO_SHOW}.toString()]]></textFieldExpression>
-				</textField>
-				<staticText>
-					<reportElement
-						style="Report_Footer"
-						x="11"
-						y="5"
-						width="634"
-						height="48"
-						key="staticText-46"/>
-					<box></box>
-					<textElement>
-						<font size="36"/>
-					</textElement>
+			</staticText>
+			<textField isBlankWhenNull="true">
+				<reportElement key="textField-25" style="Report_Footer" x="196" y="73" width="179" height="18"/>
+				<textElement/>
+				<textFieldExpression class="java.lang.String"><![CDATA[$P{ORG_SHOW}.toString()]]></textFieldExpression>
+			</textField>
+			<textField isBlankWhenNull="true">
+				<reportElement key="textField-26" style="Report_Footer" x="196" y="93" width="179" height="18"/>
+				<textElement/>
+				<textFieldExpression class="java.lang.String"><![CDATA[$P{DUEDATEFROM_SHOW}.toString()]]></textFieldExpression>
+			</textField>
+			<textField isBlankWhenNull="true">
+				<reportElement key="textField-27" style="Report_Footer" x="196" y="113" width="179" height="18"/>
+				<textElement/>
+				<textFieldExpression class="java.lang.String"><![CDATA[$P{AMTFROM_SHOW}.toString()]]></textFieldExpression>
+			</textField>
+			<textField isBlankWhenNull="true">
+				<reportElement key="textField-28" style="Report_Footer" x="196" y="133" width="179" height="18"/>
+				<textElement/>
+				<textFieldExpression class="java.lang.String"><![CDATA[$P{DOCDATEFROM_SHOW}.toString()]]></textFieldExpression>
+			</textField>
+			<textField isBlankWhenNull="true">
+				<reportElement key="textField-36" style="Report_Footer" x="593" y="73" width="179" height="18"/>
+				<textElement/>
+				<textFieldExpression class="java.lang.String"><![CDATA[$P{INCL_SUBORG_SHOW}.toString()]]></textFieldExpression>
+			</textField>
+			<textField isBlankWhenNull="true">
+				<reportElement key="textField-37" style="Report_Footer" x="593" y="93" width="179" height="18"/>
+				<textElement/>
+				<textFieldExpression class="java.lang.String"><![CDATA[$P{DUEDATETO_SHOW}.toString()]]></textFieldExpression>
+			</textField>
+			<textField isBlankWhenNull="true">
+				<reportElement key="textField-38" style="Report_Footer" x="593" y="113" width="179" height="18"/>
+				<textElement/>
+				<textFieldExpression class="java.lang.String"><![CDATA[$P{AMTTO_SHOW}.toString()]]></textFieldExpression>
+			</textField>
+			<textField isBlankWhenNull="true">
+				<reportElement key="textField-39" style="Report_Footer" x="593" y="133" width="179" height="18"/>
+				<textElement/>
+				<textFieldExpression class="java.lang.String"><![CDATA[$P{DOCDATETO_SHOW}.toString()]]></textFieldExpression>
+			</textField>
+			<staticText>
+				<reportElement key="staticText-46" style="Report_Footer" x="11" y="5" width="634" height="48"/>
+				<textElement>
+					<font size="36"/>
+				</textElement>
 				<text><![CDATA[PAYMENT REPORT]]></text>
-				</staticText>
-			</band>
-		</title>
-		<pageHeader>
-			<band height="0"  isSplitAllowed="true" >
-			</band>
-		</pageHeader>
-		<columnHeader>
-			<band height="0"  isSplitAllowed="true" >
-			</band>
-		</columnHeader>
-		<detail>
-			<band height="25"  isSplitAllowed="true" >
-				<frame>					<reportElement
-						style="Detail_Line"
-						x="0"
-						y="0"
-						width="782"
-						height="25"
-						key="frame-1"/>
-					<box></box>
-				</frame>				<line direction="TopDown">
-					<reportElement
-						style="Report_Footer"
-						x="0"
-						y="0"
-						width="0"
-						height="25"
-						key="line-1"
-						stretchType="RelativeToBandHeight"/>
-					<graphicElement stretchType="RelativeToBandHeight"/>
-				</line>
-				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						style="Report_Footer"
-						x="2"
-						y="0"
-						width="98"
-						height="25"
-						key="textField-2"/>
-					<box leftPadding="2"></box>
-					<textElement>
-						<font size="8"/>
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[$F{BPARTNER}]]></textFieldExpression>
-				</textField>
-				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						style="Report_Footer"
-						x="285"
-						y="0"
-						width="64"
-						height="25"
-						key="textField-4"/>
-					<box leftPadding="2"></box>
-					<textElement>
-						<font size="8"/>
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[($F{PAYMENT}==null ? " " : $F{PAYMENT})]]></textFieldExpression>
-				</textField>
-				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						style="Report_Footer"
-						x="102"
-						y="0"
-						width="69"
-						height="25"
-						key="textField-5"/>
-					<box leftPadding="2"></box>
-					<textElement>
-						<font size="8"/>
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[($F{SALES_PERSON}==null ? " " : $F{SALES_PERSON})]]></textFieldExpression>
-				</textField>
-				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						style="Report_Footer"
-						x="173"
-						y="0"
-						width="55"
-						height="25"
-						key="textField-6"/>
-					<box leftPadding="2"></box>
-					<textElement>
-						<font size="8"/>
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[($F{INVOICE_NUMBER}==null ? " " : $F{INVOICE_NUMBER}.toString())]]></textFieldExpression>
-				</textField>
-				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						style="Report_Footer"
-						x="229"
-						y="0"
-						width="54"
-						height="25"
-						key="textField-7"/>
-					<box leftPadding="2"></box>
-					<textElement>
-						<font size="8"/>
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[($F{INVOICE_DATE}== null ? " " : $F{INVOICE_DATE})]]></textFieldExpression>
-				</textField>
-				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						style="Report_Footer"
-						x="350"
-						y="0"
-						width="62"
-						height="25"
-						key="textField-8"/>
-					<box leftPadding="2"></box>
-					<textElement>
-						<font size="8"/>
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[($F{DUE_DATE}== null ? " " : $F{DUE_DATE})]]></textFieldExpression>
-				</textField>
-				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						style="Report_Footer"
-						x="412"
-						y="0"
-						width="33"
-						height="25"
-						key="textField-9"/>
-					<box></box>
-					<textElement textAlignment="Center">
-						<font size="8"/>
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[($F{PLANNED_DSO}== null ? " " : $F{PLANNED_DSO}.toString())]]></textFieldExpression>
-				</textField>
-				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						style="Report_Footer"
-						x="446"
-						y="0"
-						width="33"
-						height="25"
-						key="textField-10"/>
-					<box></box>
-					<textElement textAlignment="Center">
-						<font size="8"/>
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[($F{CURRENT_DSO}== null ? " " : $F{CURRENT_DSO}.toString())]]></textFieldExpression>
-				</textField>
-				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						style="Report_Footer"
-						x="480"
-						y="0"
-						width="36"
-						height="25"
-						key="textField-11"/>
-					<box></box>
-					<textElement textAlignment="Center">
-						<font size="8"/>
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[($F{OVERDUE}== null ? " " : $F{OVERDUE}.toString())]]></textFieldExpression>
-				</textField>
-				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						style="Report_Footer"
-						x="659"
-						y="0"
-						width="79"
-						height="25"
-						key="textField-13"/>
-					<box rightPadding="2"></box>
-					<textElement textAlignment="Right">
-						<font size="8"/>
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[($F{BASE_AMOUNT}== null ? " " : $F{BASE_AMOUNT}.toString())]]></textFieldExpression>
-				</textField>
-				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						style="Report_Footer"
-						x="740"
-						y="0"
-						width="40"
-						height="25"
-						key="textField-14"/>
-					<box></box>
-					<textElement textAlignment="Center">
-						<font size="8"/>
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[$F{BASE_CURRENCY}]]></textFieldExpression>
-				</textField>
-				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						style="Report_Footer"
-						x="517"
-						y="0"
-						width="79"
-						height="25"
-						key="textField-15"/>
-					<box rightPadding="2"></box>
-					<textElement textAlignment="Right">
-						<font size="8"/>
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[$F{TRANS_AMOUNT}.toString() + " "]]></textFieldExpression>
-				</textField>
-				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						style="Report_Footer"
-						x="598"
-						y="0"
-						width="60"
-						height="25"
-						key="textField-16"/>
-					<box></box>
-					<textElement textAlignment="Center">
-						<font size="8"/>
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[$F{TRANS_CURRENCY}]]></textFieldExpression>
-				</textField>
-				<line direction="TopDown">
-					<reportElement
-						style="Report_Footer"
-						x="101"
-						y="0"
-						width="0"
-						height="25"
-						key="line-5"
-						stretchType="RelativeToBandHeight"/>
-					<graphicElement stretchType="RelativeToBandHeight"/>
-				</line>
-				<line direction="TopDown">
-					<reportElement
-						style="Report_Footer"
-						x="172"
-						y="0"
-						width="0"
-						height="25"
-						key="line-7"
-						stretchType="RelativeToBandHeight"/>
-					<graphicElement stretchType="RelativeToBandHeight"/>
-				</line>
-				<line direction="TopDown">
-					<reportElement
-						style="Report_Footer"
-						x="284"
-						y="0"
-						width="0"
-						height="25"
-						key="line-8"
-						stretchType="RelativeToBandHeight"/>
-					<graphicElement stretchType="RelativeToBandHeight"/>
-				</line>
-				<line direction="TopDown">
-					<reportElement
-						style="Report_Footer"
-						x="228"
-						y="0"
-						width="0"
-						height="25"
-						key="line-9"
-						stretchType="RelativeToBandHeight"/>
-					<graphicElement stretchType="RelativeToBandHeight"/>
-				</line>
-				<line direction="TopDown">
-					<reportElement
-						style="Report_Footer"
-						x="350"
-						y="0"
-						width="0"
-						height="25"
-						key="line-10"
-						stretchType="RelativeToBandHeight"/>
-					<graphicElement stretchType="RelativeToBandHeight"/>
-				</line>
-				<line direction="TopDown">
-					<reportElement
-						style="Report_Footer"
-						x="445"
-						y="0"
-						width="0"
-						height="25"
-						key="line-11"
-						stretchType="RelativeToBandHeight"/>
-					<graphicElement stretchType="RelativeToBandHeight"/>
-				</line>
-				<line direction="TopDown">
-					<reportElement
-						style="Report_Footer"
-						x="479"
-						y="0"
-						width="0"
-						height="25"
-						key="line-12"
-						stretchType="RelativeToBandHeight"/>
-					<graphicElement stretchType="RelativeToBandHeight"/>
-				</line>
-				<line direction="TopDown">
-					<reportElement
-						style="Report_Footer"
-						x="412"
-						y="0"
-						width="0"
-						height="25"
-						key="line-13"
-						stretchType="RelativeToBandHeight"/>
-					<graphicElement stretchType="RelativeToBandHeight"/>
-				</line>
-				<line direction="TopDown">
-					<reportElement
-						style="Report_Footer"
-						x="516"
-						y="0"
-						width="0"
-						height="25"
-						key="line-15"
-						stretchType="RelativeToBandHeight"/>
-					<graphicElement stretchType="RelativeToBandHeight"/>
-				</line>
-				<line direction="TopDown">
-					<reportElement
-						style="Report_Footer"
-						x="597"
-						y="0"
-						width="0"
-						height="25"
-						key="line-17"
-						stretchType="RelativeToBandHeight"/>
-					<graphicElement stretchType="RelativeToBandHeight"/>
-				</line>
-				<line direction="TopDown">
-					<reportElement
-						style="Report_Footer"
-						x="658"
-						y="0"
-						width="0"
-						height="25"
-						key="line-18"
-						stretchType="RelativeToBandHeight"/>
-					<graphicElement stretchType="RelativeToBandHeight"/>
-				</line>
-				<line direction="TopDown">
-					<reportElement
-						style="Report_Footer"
-						x="739"
-						y="0"
-						width="0"
-						height="25"
-						key="line-19"
-						stretchType="RelativeToBandHeight"/>
-					<graphicElement stretchType="RelativeToBandHeight"/>
-				</line>
-				<line direction="TopDown">
-					<reportElement
-						style="Report_Footer"
-						x="781"
-						y="0"
-						width="0"
-						height="25"
-						key="line-25"
-						stretchType="RelativeToBandHeight"/>
-					<graphicElement stretchType="RelativeToBandHeight"/>
-				</line>
-			</band>
-		</detail>
-		<columnFooter>
-			<band height="0"  isSplitAllowed="true" >
-			</band>
-		</columnFooter>
-		<pageFooter>
-			<band height="0"  isSplitAllowed="true" >
-			</band>
-		</pageFooter>
-		<lastPageFooter>
-			<band height="40"  isSplitAllowed="true" >
-				<staticText>
-					<reportElement
-						style="Report_Footer"
-						x="3"
-						y="4"
-						width="693"
-						height="17"
-						key="staticText-51">
-							<printWhenExpression><![CDATA[$P{ONE_ASTERISK_SHOW}]]></printWhenExpression>
-						</reportElement>
-					<box></box>
-					<textElement>
-						<font size="8"/>
-					</textElement>
+			</staticText>
+		</band>
+	</title>
+	<pageHeader>
+		<band splitType="Stretch"/>
+	</pageHeader>
+	<columnHeader>
+		<band splitType="Stretch"/>
+	</columnHeader>
+	<detail>
+		<band height="25" splitType="Stretch">
+			<frame>
+				<reportElement key="frame-1" style="Detail_Line" x="0" y="0" width="782" height="25"/>
+			</frame>
+			<line>
+				<reportElement key="line-1" style="Report_Footer" stretchType="RelativeToBandHeight" x="0" y="0" width="1" height="25"/>
+			</line>
+			<textField isBlankWhenNull="false">
+				<reportElement key="textField-2" style="Report_Footer" x="2" y="0" width="98" height="25"/>
+				<box leftPadding="2"/>
+				<textElement>
+					<font size="8"/>
+				</textElement>
+				<textFieldExpression class="java.lang.String"><![CDATA[$F{BPARTNER}]]></textFieldExpression>
+			</textField>
+			<textField isBlankWhenNull="false">
+				<reportElement key="textField-4" style="Report_Footer" x="285" y="0" width="64" height="25"/>
+				<box leftPadding="2"/>
+				<textElement>
+					<font size="8"/>
+				</textElement>
+				<textFieldExpression class="java.lang.String"><![CDATA[($F{PAYMENT}==null ? " " : $F{PAYMENT})]]></textFieldExpression>
+			</textField>
+			<textField isBlankWhenNull="false">
+				<reportElement key="textField-5" style="Report_Footer" x="102" y="0" width="69" height="25"/>
+				<box leftPadding="2"/>
+				<textElement>
+					<font size="8"/>
+				</textElement>
+				<textFieldExpression class="java.lang.String"><![CDATA[($F{SALES_PERSON}==null ? " " : $F{SALES_PERSON})]]></textFieldExpression>
+			</textField>
+			<textField isBlankWhenNull="false">
+				<reportElement key="textField-6" style="Report_Footer" x="173" y="0" width="55" height="25"/>
+				<box leftPadding="2"/>
+				<textElement>
+					<font size="8"/>
+				</textElement>
+				<textFieldExpression class="java.lang.String"><![CDATA[($F{INVOICE_NUMBER}==null ? " " : $F{INVOICE_NUMBER}.toString())]]></textFieldExpression>
+			</textField>
+			<textField isBlankWhenNull="false">
+				<reportElement key="textField-7" style="Report_Footer" x="229" y="0" width="54" height="25"/>
+				<box leftPadding="2"/>
+				<textElement>
+					<font size="8"/>
+				</textElement>
+				<textFieldExpression class="java.lang.String"><![CDATA[($F{INVOICE_DATE}== null ? " " : $F{INVOICE_DATE})]]></textFieldExpression>
+			</textField>
+			<textField isBlankWhenNull="false">
+				<reportElement key="textField-8" style="Report_Footer" x="350" y="0" width="62" height="25"/>
+				<box leftPadding="2"/>
+				<textElement>
+					<font size="8"/>
+				</textElement>
+				<textFieldExpression class="java.lang.String"><![CDATA[($F{DUE_DATE}== null ? " " : $F{DUE_DATE})]]></textFieldExpression>
+			</textField>
+			<textField isBlankWhenNull="false">
+				<reportElement key="textField-9" style="Report_Footer" x="412" y="0" width="33" height="25"/>
+				<textElement textAlignment="Center">
+					<font size="8"/>
+				</textElement>
+				<textFieldExpression class="java.lang.String"><![CDATA[($F{PLANNED_DSO}== null ? " " : $F{PLANNED_DSO}.toString())]]></textFieldExpression>
+			</textField>
+			<textField isBlankWhenNull="false">
+				<reportElement key="textField-10" style="Report_Footer" x="446" y="0" width="33" height="25"/>
+				<textElement textAlignment="Center">
+					<font size="8"/>
+				</textElement>
+				<textFieldExpression class="java.lang.String"><![CDATA[($F{CURRENT_DSO}== null ? " " : $F{CURRENT_DSO}.toString())]]></textFieldExpression>
+			</textField>
+			<textField isBlankWhenNull="false">
+				<reportElement key="textField-11" style="Report_Footer" x="480" y="0" width="36" height="25"/>
+				<textElement textAlignment="Center">
+					<font size="8"/>
+				</textElement>
+				<textFieldExpression class="java.lang.String"><![CDATA[($F{OVERDUE}== null ? " " : $F{OVERDUE}.toString())]]></textFieldExpression>
+			</textField>
+			<textField isBlankWhenNull="false">
+				<reportElement key="textField-13" style="Report_Footer" x="659" y="0" width="79" height="25"/>
+				<box rightPadding="2"/>
+				<textElement textAlignment="Right">
+					<font size="8"/>
+				</textElement>
+				<textFieldExpression class="java.lang.String"><![CDATA[($F{BASE_AMOUNT}== null ? " " : $F{BASE_AMOUNT}.toString())]]></textFieldExpression>
+			</textField>
+			<textField isBlankWhenNull="false">
+				<reportElement key="textField-14" style="Report_Footer" x="740" y="0" width="40" height="25"/>
+				<textElement textAlignment="Center">
+					<font size="8"/>
+				</textElement>
+				<textFieldExpression class="java.lang.String"><![CDATA[$F{BASE_CURRENCY}]]></textFieldExpression>
+			</textField>
+			<textField isBlankWhenNull="false">
+				<reportElement key="textField-15" style="Report_Footer" x="517" y="0" width="79" height="25"/>
+				<box rightPadding="2"/>
+				<textElement textAlignment="Right">
+					<font size="8"/>
+				</textElement>
+				<textFieldExpression class="java.lang.String"><![CDATA[$F{TRANS_AMOUNT}.toString() + " "]]></textFieldExpression>
+			</textField>
+			<textField isBlankWhenNull="false">
+				<reportElement key="textField-16" style="Report_Footer" x="598" y="0" width="60" height="25"/>
+				<textElement textAlignment="Center">
+					<font size="8"/>
+				</textElement>
+				<textFieldExpression class="java.lang.String"><![CDATA[$F{TRANS_CURRENCY}]]></textFieldExpression>
+			</textField>
+			<line>
+				<reportElement key="line-5" style="Report_Footer" stretchType="RelativeToBandHeight" x="101" y="0" width="1" height="25"/>
+			</line>
+			<line>
+				<reportElement key="line-7" style="Report_Footer" stretchType="RelativeToBandHeight" x="172" y="0" width="1" height="25"/>
+			</line>
+			<line>
+				<reportElement key="line-8" style="Report_Footer" stretchType="RelativeToBandHeight" x="284" y="0" width="1" height="25"/>
+			</line>
+			<line>
+				<reportElement key="line-9" style="Report_Footer" stretchType="RelativeToBandHeight" x="228" y="0" width="1" height="25"/>
+			</line>
+			<line>
+				<reportElement key="line-10" style="Report_Footer" stretchType="RelativeToBandHeight" x="350" y="0" width="1" height="25"/>
+			</line>
+			<line>
+				<reportElement key="line-11" style="Report_Footer" stretchType="RelativeToBandHeight" x="445" y="0" width="1" height="25"/>
+			</line>
+			<line>
+				<reportElement key="line-12" style="Report_Footer" stretchType="RelativeToBandHeight" x="479" y="0" width="1" height="25"/>
+			</line>
+			<line>
+				<reportElement key="line-13" style="Report_Footer" stretchType="RelativeToBandHeight" x="412" y="0" width="1" height="25"/>
+			</line>
+			<line>
+				<reportElement key="line-15" style="Report_Footer" stretchType="RelativeToBandHeight" x="516" y="0" width="1" height="25"/>
+			</line>
+			<line>
+				<reportElement key="line-17" style="Report_Footer" stretchType="RelativeToBandHeight" x="597" y="0" width="1" height="25"/>
+			</line>
+			<line>
+				<reportElement key="line-18" style="Report_Footer" stretchType="RelativeToBandHeight" x="658" y="0" width="1" height="25"/>
+			</line>
+			<line>
+				<reportElement key="line-19" style="Report_Footer" stretchType="RelativeToBandHeight" x="739" y="0" width="1" height="25"/>
+			</line>
+			<line>
+				<reportElement key="line-25" style="Report_Footer" stretchType="RelativeToBandHeight" x="781" y="0" width="1" height="25"/>
+			</line>
+		</band>
+	</detail>
+	<columnFooter>
+		<band splitType="Stretch"/>
+	</columnFooter>
+	<pageFooter>
+		<band splitType="Stretch"/>
+	</pageFooter>
+	<lastPageFooter>
+		<band height="40" splitType="Stretch">
+			<staticText>
+				<reportElement key="staticText-51" style="Report_Footer" x="3" y="4" width="693" height="17">
+					<printWhenExpression><![CDATA[$P{ONE_ASTERISK_SHOW}]]></printWhenExpression>
+				</reportElement>
+				<textElement>
+					<font size="8"/>
+				</textElement>
 				<text><![CDATA[* Invoice paid using a credit payment]]></text>
-				</staticText>
-				<staticText>
-					<reportElement
-						style="Report_Footer"
-						x="3"
-						y="21"
-						width="693"
-						height="17"
-						key="staticText-52">
-							<printWhenExpression><![CDATA[$P{TWO_ASTERISK_SHOW}]]></printWhenExpression>
-						</reportElement>
-					<box></box>
-					<textElement>
-						<font size="8"/>
-					</textElement>
+			</staticText>
+			<staticText>
+				<reportElement key="staticText-52" style="Report_Footer" x="3" y="21" width="693" height="17">
+					<printWhenExpression><![CDATA[$P{TWO_ASTERISK_SHOW}]]></printWhenExpression>
+				</reportElement>
+				<textElement>
+					<font size="8"/>
+				</textElement>
 				<text><![CDATA[** Several invoices have been paid using the same credit payment]]></text>
-				</staticText>
-			</band>
-		</lastPageFooter>
-		<summary>
-			<band height="30"  isSplitAllowed="true" >
-				<staticText>
-					<reportElement
-						x="645"
-						y="4"
-						width="56"
-						height="20"
-						key="staticText-19"/>
-					<box></box>
-					<textElement textAlignment="Right" verticalAlignment="Middle">
-						<font size="8" isBold="false"/>
-					</textElement>
-				<text><![CDATA[Grand Total:]]></text>
-				</staticText>
-				<line direction="TopDown">
-					<reportElement
-						style="Report_Footer"
-						x="644"
-						y="3"
-						width="138"
-						height="1"
-						key="line-21"/>
-					<graphicElement stretchType="NoStretch"/>
-				</line>
-				<line direction="TopDown">
-					<reportElement
-						style="Report_Footer"
-						x="644"
-						y="3"
-						width="0"
-						height="22"
-						key="line-22"/>
-					<graphicElement stretchType="NoStretch"/>
-				</line>
-				<line direction="TopDown">
-					<reportElement
-						style="Report_Footer"
-						x="781"
-						y="3"
-						width="0"
-						height="22"
-						key="line-24"/>
-					<graphicElement stretchType="NoStretch"/>
-				</line>
-				<line direction="TopDown">
-					<reportElement
-						style="Report_Footer"
-						x="644"
-						y="24"
-						width="138"
-						height="1"
-						key="line-26"/>
-					<graphicElement stretchType="NoStretch"/>
-				</line>
-				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						style="Report_Footer"
-						x="702"
-						y="4"
-						width="78"
-						height="20"
-						key="textField-24"/>
-					<box rightPadding="2"></box>
-					<textElement textAlignment="Right">
-						<font size="10"/>
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[($V{SUMSUBTOTALGT}!=null)?$V{SUMSUBTOTALGT}.toString():new String(" ")]]></textFieldExpression>
-				</textField>
-			</band>
-		</summary>
+			</staticText>
+		</band>
+	</lastPageFooter>
 </jasperReport>