Merge CBT 24/06/08
authorEduardo Argal <eduardo.argal@openbravo.com>
Tue, 24 Jun 2008 17:33:07 +0000
changeset 1349 ffd9daaff911
parent 1348 258f47fdeb41
child 1350 068e0fd242b4
Merge CBT 24/06/08
.classpath
.settings/org.eclipse.jst.common.project.facet.core.prefs
.settings/org.eclipse.wst.common.project.facet.core.xml
WebContent/META-INF/MANIFEST.MF
src-db/database/lib/dbsourcemanager.jar
src-db/database/model/functions/C_SETTLEMENT_POST.xml
src-db/database/model/functions/C_TAXPAYMENT_POST.xml
src-db/database/model/tables/AD_WINDOW.xml
src-db/database/model/tables/C_TAX.xml
src-db/database/model/views/C_DEBT_PAYMENT_V.xml
src-db/database/sourcedata/AD_ALERTRULE.xml
src-db/database/sourcedata/AD_ALERTRULE_TRL.xml
src-db/database/sourcedata/AD_AUXILIARINPUT.xml
src-db/database/sourcedata/AD_CALLOUT.xml
src-db/database/sourcedata/AD_CLIENT.xml
src-db/database/sourcedata/AD_CLIENTINFO.xml
src-db/database/sourcedata/AD_COLUMN.xml
src-db/database/sourcedata/AD_DATATYPE.xml
src-db/database/sourcedata/AD_DEVELOPER.xml
src-db/database/sourcedata/AD_DIMENSION.xml
src-db/database/sourcedata/AD_ELEMENT.xml
src-db/database/sourcedata/AD_ELEMENT_TRL.xml
src-db/database/sourcedata/AD_FIELD.xml
src-db/database/sourcedata/AD_FIELDGROUP.xml
src-db/database/sourcedata/AD_FIELDGROUP_TRL.xml
src-db/database/sourcedata/AD_FIELD_TRL.xml
src-db/database/sourcedata/AD_FORM.xml
src-db/database/sourcedata/AD_FORM_TRL.xml
src-db/database/sourcedata/AD_IMAGE.xml
src-db/database/sourcedata/AD_IMPFORMAT.xml
src-db/database/sourcedata/AD_IMPFORMAT_ROW.xml
src-db/database/sourcedata/AD_LANGUAGE.xml
src-db/database/sourcedata/AD_MENU.xml
src-db/database/sourcedata/AD_MENU_TRL.xml
src-db/database/sourcedata/AD_MESSAGE.xml
src-db/database/sourcedata/AD_MESSAGE_TRL.xml
src-db/database/sourcedata/AD_MODEL_OBJECT.xml
src-db/database/sourcedata/AD_MODEL_OBJECT_MAPPING.xml
src-db/database/sourcedata/AD_MONTH.xml
src-db/database/sourcedata/AD_ORG.xml
src-db/database/sourcedata/AD_ORGINFO.xml
src-db/database/sourcedata/AD_PREFERENCE.xml
src-db/database/sourcedata/AD_PROCESS.xml
src-db/database/sourcedata/AD_PROCESS_PARA.xml
src-db/database/sourcedata/AD_PROCESS_PARA_TRL.xml
src-db/database/sourcedata/AD_PROCESS_TRL.xml
src-db/database/sourcedata/AD_REFERENCE.xml
src-db/database/sourcedata/AD_REFERENCE_TRL.xml
src-db/database/sourcedata/AD_REF_LIST.xml
src-db/database/sourcedata/AD_REF_LIST_TRL.xml
src-db/database/sourcedata/AD_REF_SEARCH.xml
src-db/database/sourcedata/AD_REF_SEARCH_COLUMN.xml
src-db/database/sourcedata/AD_REF_TABLE.xml
src-db/database/sourcedata/AD_ROLE.xml
src-db/database/sourcedata/AD_ROLE_ORGACCESS.xml
src-db/database/sourcedata/AD_TAB.xml
src-db/database/sourcedata/AD_TABLE.xml
src-db/database/sourcedata/AD_TAB_TRL.xml
src-db/database/sourcedata/AD_TASK.xml
src-db/database/sourcedata/AD_TASK_TRL.xml
src-db/database/sourcedata/AD_TEXTINTERFACES_TRL.xml
src-db/database/sourcedata/AD_TREE.xml
src-db/database/sourcedata/AD_TREENODE.xml
src-db/database/sourcedata/AD_TREENODEBP.xml
src-db/database/sourcedata/AD_TREENODEPR.xml
src-db/database/sourcedata/AD_USER.xml
src-db/database/sourcedata/AD_USER_ROLES.xml
src-db/database/sourcedata/AD_VAL_RULE.xml
src-db/database/sourcedata/AD_WF_NODE.xml
src-db/database/sourcedata/AD_WF_NODENEXT.xml
src-db/database/sourcedata/AD_WF_NODE_TRL.xml
src-db/database/sourcedata/AD_WINDOW_TRL.xml
src-db/database/sourcedata/AD_WORKFLOW.xml
src-db/database/sourcedata/AD_WORKFLOW_TRL.xml
src-db/database/sourcedata/M_ATTRIBUTESET.xml
src-db/database/sourcedata/M_ATTRIBUTESETINSTANCE.xml
src/org/openbravo/erpCommon/ad_actionButton/CreateVatRegisters.java
src/org/openbravo/erpCommon/ad_reports/ReportPaymentFilter.html
src/org/openbravo/erpCommon/ad_reports/ReportPaymentFilter.xml
src/org/openbravo/erpCommon/ad_reports/ReportRegisterByVatJR.jrxml
src/org/openbravo/erpCommon/ad_reports/ReportRegisterByVatJR_data.xsql
src/org/openbravo/erpCommon/ad_reports/ReportRegisterFilter.html
src/org/openbravo/erpCommon/ad_reports/ReportRegisterFilter.xml
src/org/openbravo/erpCommon/ad_reports/ReportRegisterLineJR.jrxml
src/org/openbravo/erpCommon/ad_reports/ReportRegisterLineJR_data.xsql
src/org/openbravo/erpCommon/ad_reports/ReportTaxPaymentJR.java
src/org/openbravo/erpCommon/ad_reports/ReportVatRegisterJR.java
src/org/openbravo/erpReports/ReportPaymentFilter.html
src/org/openbravo/erpReports/ReportPaymentFilter.xml
src/org/openbravo/erpReports/ReportRegisterByVatJR.jrxml
src/org/openbravo/erpReports/ReportRegisterByVatJR_data.xsql
src/org/openbravo/erpReports/ReportRegisterFilter.html
src/org/openbravo/erpReports/ReportRegisterFilter.xml
src/org/openbravo/erpReports/ReportRegisterLineJR.jrxml
src/org/openbravo/erpReports/ReportRegisterLineJR_data.xsql
src/org/openbravo/erpReports/ReportTaxPaymentJR.java
src/org/openbravo/erpReports/ReportVatRegisterJR.java
src/org/openbravo/erpReports/RptC_Invoice_TaxLines.jasper
src/org/openbravo/erpReports/TaxPayment_data.xsql
src/org/openbravo/erpReports/TaxRegisterTypeLines_data.xsql
src/org/openbravo/erpReports/TaxRegisterType_data.xsql
src/org/openbravo/erpReports/TaxRegister_data.xsql
web/images/CompanyLogo_big.png
--- a/.classpath	Tue Jun 24 16:23:57 2008 +0000
+++ b/.classpath	Tue Jun 24 17:33:07 2008 +0000
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry exported="true" kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v5.5"/>
 	<classpathentry exported="true" kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
 	<classpathentry combineaccessrules="false" exported="true" kind="src" path="/OpenbravoTrl"/>
 	<classpathentry combineaccessrules="false" exported="true" kind="src" path="/OpenbravoWAD"/>
@@ -8,6 +7,7 @@
 	<classpathentry including="**/*.java" kind="src" path="srcAD"/>
 	<classpathentry including="**/*.java" kind="src" path="build/javasqlc/srcAD"/>
 	<classpathentry including="**/*.java" kind="src" path="build/javasqlc/src"/>
+	<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v6.0"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
 	<classpathentry kind="output" path="build/classes"/>
 </classpath>
--- a/.settings/org.eclipse.jst.common.project.facet.core.prefs	Tue Jun 24 16:23:57 2008 +0000
+++ b/.settings/org.eclipse.jst.common.project.facet.core.prefs	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-#Mon Oct 01 12:31:55 CEST 2007
-classpath.helper/org.eclipse.jdt.launching.JRE_CONTAINER\:\:org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType\:\:java-1.5.0-sun-1.5.0.12/owners=jst.java\:5.0
-classpath.helper/org.eclipse.jst.server.core.container\:\:org.eclipse.jst.server.tomcat.runtimeTarget\:\:Apache\ Tomcat\ v5.5/owners=jst.web\:2.4
+#Thu May 29 14:22:36 CEST 2008
+classpath.helper/org.eclipse.jdt.launching.JRE_CONTAINER/owners=jst.java\:5.0
+classpath.helper/org.eclipse.jst.server.core.container\:\:org.eclipse.jst.server.tomcat.runtimeTarget\:\:Apache\ Tomcat\ v6.0/owners=\#system\#;jst.web\:2.4
 eclipse.preferences.version=1
--- a/.settings/org.eclipse.wst.common.project.facet.core.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/.settings/org.eclipse.wst.common.project.facet.core.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <faceted-project>
-  <runtime name="Apache Tomcat v5.5"/>
+  <runtime name="Apache Tomcat v6.0"/>
   <fixed facet="jst.web"/>
   <fixed facet="jst.java"/>
   <installed facet="jst.java" version="5.0"/>
--- a/WebContent/META-INF/MANIFEST.MF	Tue Jun 24 16:23:57 2008 +0000
+++ b/WebContent/META-INF/MANIFEST.MF	Tue Jun 24 17:33:07 2008 +0000
@@ -1,2 +1,2 @@
 Manifest-Version: 1.0
-Class-Path:
\ No newline at end of file
+
Binary file src-db/database/lib/dbsourcemanager.jar has changed
--- a/src-db/database/model/functions/C_SETTLEMENT_POST.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/model/functions/C_SETTLEMENT_POST.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -60,6 +60,11 @@
     v_CanceledNotChargeAmt NUMBER:=0;
     v_GeneratedAmt NUMBER:=0;
     v_ChargedAmt NUMBER:=0;
+    -- For WithHolding 
+    v_CanceledNotChargeAmt_WH NUMBER:=0;
+    v_GeneratedAmt_WH NUMBER:=0;
+    v_ChargedAmt_WH NUMBER:=0;
+    --
     v_ForcedOrg NUMBER;
     v_ManualAmt NUMBER:=0;
     FINISH_PROCESS BOOLEAN:=false;
@@ -297,22 +302,25 @@
     IF(NOT FINISH_PROCESS) THEN
       v_ResultStr:='CheckingAmounts';
       --Calculating the non-paid amount to cancel
-      SELECT COALESCE(SUM(C_Currency_Round(  C_Currency_Convert((Amount-WriteOffAmt), C_Currency_ID, v_Currency, v_Date, NULL, v_AD_Client_ID, v_AD_Org_ID), v_Currency, NULL)), 0)
-      INTO v_CanceledNotChargeAmt
+      SELECT COALESCE(SUM(C_Currency_Round(  C_Currency_Convert((Amount-WriteOffAmt), C_Currency_ID, v_Currency, v_Date, NULL, v_AD_Client_ID, v_AD_Org_ID), v_Currency, NULL)), 0),
+      COALESCE(SUM(C_Currency_Round(  C_Currency_Convert((coalesce(WithHoldingAmount,0)), C_Currency_ID, v_Currency, v_Date, NULL, v_AD_Client_ID, v_AD_Org_ID), v_Currency, NULL)), 0)
+      INTO v_CanceledNotChargeAmt,v_CanceledNotChargeAmt_WH
       FROM C_Debt_Payment_V
       WHERE C_Settlement_Cancel_ID=v_Record_ID
         AND isActive='Y'
         AND isPaid='N';
       --Calculating the generated amount
-      SELECT COALESCE(SUM(C_Currency_Round(  C_Currency_Convert(Amount, C_Currency_ID, v_Currency, v_Date, NULL, v_AD_Client_ID, v_AD_Org_ID), v_Currency, NULL)), 0)
-      INTO v_GeneratedAmt
+      SELECT COALESCE(SUM(C_Currency_Round(  C_Currency_Convert(Amount, C_Currency_ID, v_Currency, v_Date, NULL, v_AD_Client_ID, v_AD_Org_ID), v_Currency, NULL)), 0),
+      COALESCE(SUM(C_Currency_Round(  C_Currency_Convert(coalesce(WithHoldingAmount,0), C_Currency_ID, v_Currency, v_Date, NULL, v_AD_Client_ID, v_AD_Org_ID), v_Currency, NULL)), 0) 
+      INTO v_GeneratedAmt,v_GeneratedAmt_WH
       FROM C_Debt_Payment_V
       WHERE C_Settlement_Generate_ID=v_Record_ID
         AND isActive='Y'
         AND isManual='N';
       --Calculating the applied amount
-      SELECT COALESCE(SUM(C_Currency_Round(  C_Currency_Convert((Amount - WriteOffAmt), C_Currency_ID, v_Currency, v_Date, NULL, v_AD_Client_ID, v_AD_Org_ID), v_Currency, NULL)), 0)
-      INTO v_ChargedAmt
+      SELECT COALESCE(SUM(C_Currency_Round(  C_Currency_Convert((Amount - WriteOffAmt), C_Currency_ID, v_Currency, v_Date, NULL, v_AD_Client_ID, v_AD_Org_ID), v_Currency, NULL)), 0),
+      COALESCE(SUM(C_Currency_Round(  C_Currency_Convert((coalesce(WithHoldingAmount,0) ), C_Currency_ID, v_Currency, v_Date, NULL, v_AD_Client_ID, v_AD_Org_ID), v_Currency, NULL)), 0)
+      INTO v_ChargedAmt,v_ChargedAmt_WH
       FROM C_Debt_Payment_V
       WHERE(C_Settlement_Cancel_ID=v_Record_ID
         OR C_Settlement_Generate_ID=v_Record_ID)
@@ -329,6 +337,9 @@
       IF(v_CanceledNotChargeAmt<>v_GeneratedAmt) THEN
         RAISE_APPLICATION_ERROR(-20000, '@SettlementNotMatch@') ;
       END IF;
+      IF(v_CanceledNotChargeAmt_WH<>v_GeneratedAmt_WH) THEN
+        RAISE_APPLICATION_ERROR(-20000, '@SettlementWH_NotMatch@') ;
+      END IF;
     END IF;--FINISH_PROCESS
     IF(NOT FINISH_PROCESS) THEN
       v_ResultStr:='UpdatingAmounts';
--- a/src-db/database/model/functions/C_TAXPAYMENT_POST.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/model/functions/C_TAXPAYMENT_POST.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -46,6 +46,7 @@
 v_paymentdebitamt NUMBER;
 v_isreceipt VARCHAR2(1);
 v_ispayment VARCHAR2(1);
+v_posted VARCHAR2(1);
 
 v_taxamtfromreglines NUMBER;
 
@@ -86,6 +87,9 @@
 v_period_id NUMBER;
 
 v_name NVARCHAR2(255);
+v_TRTcountY  NUMBER;
+v_TRTcountN  NUMBER;
+v_DBA_ErrorLog_ID NUMBER;
 
 
 
@@ -123,7 +127,7 @@
         from c_taxpayment
         where c_taxpayment_id=v_record_id;
 
-      select gl_category_id
+      select max(gl_category_id)
       into v_gl_category_id
       from gl_category where name='Standard';
 
@@ -150,6 +154,10 @@
       where tp.C_TAXPAYMENT_ID = v_record_id;
 
       update gl_journal set docaction='RE' where gl_journal_id=v_gl_journalid;
+      select posted into v_posted from gl_journal where gl_journal_id=v_gl_journalid;
+      if v_posted = 'Y' then
+       RAISE_APPLICATION_ERROR(-20000, '@GLJournalDocumentPosted@') ;
+       end if;
       GL_JOURNAL_POST(null, v_gl_journalid);
         update c_taxpayment set gl_journal_id=null where c_taxpayment.C_TAXPAYMENT_ID = v_record_id;
         delete from gl_journalline where gl_journal_id=v_gl_journalid;
@@ -242,7 +250,19 @@
       v_totalcredit := v_totalcredit+v_debit;
 
       end loop;
-
+      
+      select count(*) 
+      into v_TRTcountY
+      from c_taxregister_type tt where tt.issotrx='Y';
+      
+      select count(*) 
+      into v_TRTcountN
+      from c_taxregister_type tt where tt.issotrx='N';
+      
+      if v_TRTcountY=0 or v_TRTcountN=0 then
+      RAISE_APPLICATION_ERROR(-20100, '@TwoRegisterTypesNeeded@');
+      end if;
+      
       select case when tt.issotrx='Y' then max(glitem_debit_acct) else max(glitem_credit_acct) end, max(tt.c_glitem_id)
       into v_glitem_acct, v_glitem_id
       from c_taxregister_type tt
@@ -389,7 +409,18 @@
     DBMS_OUTPUT.PUT_LINE('--<<C_TaxPayment_Post finished>> ' || v_message);
     END IF;
 
-     RETURN;
+    EXCEPTION
+WHEN OTHERS THEN
+  v_ResultStr:= '@ERROR=' || SQLERRM;
+  DBMS_OUTPUT.PUT_LINE(v_ResultStr) ;
+  IF(p_PInstance_ID IS NOT NULL) THEN
+    ROLLBACK;
+    AD_UPDATE_PINSTANCE(p_PInstance_ID, NULL, 'N', 0, v_ResultStr) ;
+  ELSE
+    ROLLBACK;
+    RAISE;
+  END IF;
+  RETURN;
 END C_TAXPAYMENT_POST
 ]]></body>
     </function>
--- a/src-db/database/model/tables/AD_WINDOW.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/model/tables/AD_WINDOW.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,85 +1,85 @@
-<?xml version="1.0"?>
-  <database name="TABLE AD_WINDOW">
-    <table name="AD_WINDOW" primaryKey="AD_WINDOW_KEY">
-      <column name="AD_WINDOW_ID" primaryKey="true" required="true" type="DECIMAL" size="10,0" autoIncrement="false">
-        <default/>
-        <onCreateDefault/>
-      </column>
-      <column name="AD_CLIENT_ID" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false">
-        <default/>
-        <onCreateDefault/>
-      </column>
-      <column name="AD_ORG_ID" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false">
-        <default/>
-        <onCreateDefault/>
-      </column>
-      <column name="ISACTIVE" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
-        <default><![CDATA[Y]]></default>
-        <onCreateDefault/>
-      </column>
-      <column name="CREATED" primaryKey="false" required="true" type="TIMESTAMP" size="7" autoIncrement="false">
-        <default><![CDATA[SYSDATE]]></default>
-        <onCreateDefault/>
-      </column>
-      <column name="CREATEDBY" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false">
-        <default/>
-        <onCreateDefault/>
-      </column>
-      <column name="UPDATED" primaryKey="false" required="true" type="TIMESTAMP" size="7" autoIncrement="false">
-        <default><![CDATA[SYSDATE]]></default>
-        <onCreateDefault/>
-      </column>
-      <column name="UPDATEDBY" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false">
-        <default/>
-        <onCreateDefault/>
-      </column>
-      <column name="NAME" primaryKey="false" required="true" type="NVARCHAR" size="60" autoIncrement="false">
-        <default/>
-        <onCreateDefault/>
-      </column>
-      <column name="DESCRIPTION" primaryKey="false" required="false" type="NVARCHAR" size="255" autoIncrement="false">
-        <default/>
-        <onCreateDefault/>
-      </column>
-      <column name="HELP" primaryKey="false" required="false" type="NVARCHAR" size="2000" autoIncrement="false">
-        <default/>
-        <onCreateDefault/>
-      </column>
-      <column name="WINDOWTYPE" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false">
-        <default/>
-        <onCreateDefault/>
-      </column>
-      <column name="ISSOTRX" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
-        <default><![CDATA[Y]]></default>
-        <onCreateDefault/>
-      </column>
-      <column name="PROCESSING" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false">
-        <default/>
-        <onCreateDefault/>
-      </column>
-      <column name="AD_IMAGE_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false">
-        <default/>
-        <onCreateDefault/>
-      </column>
-      <column name="ISDEFAULT" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false">
-        <default><![CDATA[N]]></default>
-        <onCreateDefault/>
-      </column>
-      <foreign-key foreignTable="AD_IMAGE" name="ADIMAGE_ADWINDOW">
-        <reference local="AD_IMAGE_ID" foreign="AD_IMAGE_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_CLIENT" name="WINDOWCLIENT">
-        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="WINDOWORG">
-        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
-      </foreign-key>
-      <unique name="AD_WINDOW_NAME">
-        <unique-column name="AD_CLIENT_ID"/>
-        <unique-column name="NAME"/>
-      </unique>
-      <check name="AD_WINDOW_NAME_CHECK"><![CDATA[INSTR(NAME, TO_CHAR('_')) = 0]]></check>
-      <check name="ADWINDOW_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="ADWINDOW_ISSOTRX_CHECK"><![CDATA[ISSOTRX IN ('Y', 'N')]]></check>
-    </table>
-  </database>
+<?xml version="1.0"?>
+  <database name="TABLE AD_WINDOW">
+    <table name="AD_WINDOW" primaryKey="AD_WINDOW_KEY">
+      <column name="AD_WINDOW_ID" primaryKey="true" required="true" type="DECIMAL" size="10,0" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="AD_CLIENT_ID" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="AD_ORG_ID" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="ISACTIVE" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
+        <default><![CDATA[Y]]></default>
+        <onCreateDefault/>
+      </column>
+      <column name="CREATED" primaryKey="false" required="true" type="TIMESTAMP" size="7" autoIncrement="false">
+        <default><![CDATA[SYSDATE]]></default>
+        <onCreateDefault/>
+      </column>
+      <column name="CREATEDBY" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="UPDATED" primaryKey="false" required="true" type="TIMESTAMP" size="7" autoIncrement="false">
+        <default><![CDATA[SYSDATE]]></default>
+        <onCreateDefault/>
+      </column>
+      <column name="UPDATEDBY" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="NAME" primaryKey="false" required="true" type="NVARCHAR" size="60" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="DESCRIPTION" primaryKey="false" required="false" type="NVARCHAR" size="255" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="HELP" primaryKey="false" required="false" type="NVARCHAR" size="2000" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="WINDOWTYPE" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="ISSOTRX" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
+        <default><![CDATA[Y]]></default>
+        <onCreateDefault/>
+      </column>
+      <column name="PROCESSING" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="AD_IMAGE_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="ISDEFAULT" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false">
+        <default><![CDATA[N]]></default>
+        <onCreateDefault/>
+      </column>
+      <foreign-key foreignTable="AD_IMAGE" name="ADIMAGE_ADWINDOW">
+        <reference local="AD_IMAGE_ID" foreign="AD_IMAGE_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_CLIENT" name="WINDOWCLIENT">
+        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_ORG" name="WINDOWORG">
+        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
+      </foreign-key>
+      <unique name="AD_WINDOW_NAME">
+        <unique-column name="AD_CLIENT_ID"/>
+        <unique-column name="NAME"/>
+      </unique>
+      <check name="AD_WINDOW_NAME_CHECK"><![CDATA[INSTR(NAME, TO_CHAR('_')) = 0]]></check>
+      <check name="ADWINDOW_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="ADWINDOW_ISSOTRX_CHECK"><![CDATA[ISSOTRX IN ('Y', 'N')]]></check>
+    </table>
+  </database>
--- a/src-db/database/model/tables/C_TAX.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/model/tables/C_TAX.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -110,7 +110,7 @@
         <onCreateDefault/>
       </column>
       <column name="ISNOTAXABLE" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false">
-        <default/>
+        <default><![CDATA[N]]></default>
         <onCreateDefault/>
       </column>
       <column name="DEDUCPERCENT" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false">
--- a/src-db/database/model/views/C_DEBT_PAYMENT_V.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/model/views/C_DEBT_PAYMENT_V.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,6 +1,7 @@
 <?xml version="1.0"?>
   <database name="VIEW C_DEBT_PAYMENT_V">
     <view name="C_DEBT_PAYMENT_V"><![CDATA[SELECT c_debt_payment.c_debt_payment_id, c_debt_payment.ad_client_id, c_debt_payment.ad_org_id, c_debt_payment.isactive, c_debt_payment.created, c_debt_payment.createdby, c_debt_payment.updated, c_debt_payment.updatedby, c_debt_payment.isreceipt, c_debt_payment.c_settlement_cancel_id, c_debt_payment.c_settlement_generate_id, c_debt_payment.description, c_debt_payment.c_invoice_id, c_debt_payment.c_bpartner_id, c_debt_payment.c_currency_id, c_debt_payment.c_cashline_id, c_debt_payment.c_bankaccount_id, c_debt_payment.c_cashbook_id, c_debt_payment.paymentrule, c_debt_payment.ispaid, c_debt_payment.dateplanned, c_debt_payment.ismanual, c_debt_payment.isvalid, c_debt_payment.c_bankstatementline_id, c_debt_payment.changesettlementcancel, c_debt_payment.cancel_processed, c_debt_payment.generate_processed, 
+c_debt_payment.C_WITHHOLDING_ID,c_debt_payment.WITHHOLDINGAMOUNT,
         CASE c_debt_payment.isreceipt
             WHEN 'Y' THEN c_debt_payment.amount
             ELSE c_debt_payment.amount * (-1)
--- a/src-db/database/sourcedata/AD_ALERTRULE.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_ALERTRULE.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_ALERTRULE_TRL.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_ALERTRULE_TRL.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_AUXILIARINPUT.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_AUXILIARINPUT.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_CALLOUT.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_CALLOUT.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_CLIENT.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_CLIENT.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_CLIENTINFO.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_CLIENTINFO.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_COLUMN.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_COLUMN.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -363990,7 +363990,7 @@
 <!--801035 UPDATEDBY-->
 <!--801035-->              <UPDATEDBY><![CDATA[100]]></UPDATEDBY>
 <!--801035 NAME-->
-<!--801035-->              <NAME><![CDATA[Last Day Cut-off]]></NAME>
+<!--801035-->              <NAME><![CDATA[FixMonthCutoff]]></NAME>
 <!--801035 DESCRIPTION-->
 <!--801035-->              <DESCRIPTION><![CDATA[Last day to include for next due date]]></DESCRIPTION>
 <!--801035 HELP-->
--- a/src-db/database/sourcedata/AD_DATATYPE.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_DATATYPE.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_DEVELOPER.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_DEVELOPER.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_DIMENSION.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_DIMENSION.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_ELEMENT.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_ELEMENT.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
@@ -11293,7 +11293,7 @@
 <!--891 UPDATEDBY-->
 <!--891-->              <UPDATEDBY><![CDATA[100]]></UPDATEDBY>
 <!--891 COLUMNNAME-->
-<!--891-->              <COLUMNNAME><![CDATA[FixMonthCutoff]]></COLUMNNAME>
+<!--891-->              <COLUMNNAME><![CDATA[Last Day Cut-off]]></COLUMNNAME>
 <!--891 NAME-->
 <!--891-->              <NAME><![CDATA[Last Day Cut-off]]></NAME>
 <!--891 PRINTNAME-->
--- a/src-db/database/sourcedata/AD_ELEMENT_TRL.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_ELEMENT_TRL.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_FIELD.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_FIELD.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
@@ -380035,7 +380035,7 @@
 <!--1005400217 UPDATEDBY-->
 <!--1005400217-->              <UPDATEDBY><![CDATA[100]]></UPDATEDBY>
 <!--1005400217 NAME-->
-<!--1005400217-->              <NAME><![CDATA[TestHeartbeat]]></NAME>
+<!--1005400217-->              <NAME><![CDATA[Test Heartbeat]]></NAME>
 <!--1005400217 DESCRIPTION-->
 <!--1005400217-->              <DESCRIPTION><![CDATA[Test the Heartbeat Configuration]]></DESCRIPTION>
 <!--1005400217 ISCENTRALLYMAINTAINED-->
--- a/src-db/database/sourcedata/AD_FIELDGROUP.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_FIELDGROUP.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_FIELDGROUP_TRL.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_FIELDGROUP_TRL.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_FIELD_TRL.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_FIELD_TRL.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_FORM.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_FORM.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_FORM_TRL.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_FORM_TRL.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_IMAGE.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_IMAGE.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_IMPFORMAT.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_IMPFORMAT.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_IMPFORMAT_ROW.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_IMPFORMAT_ROW.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_LANGUAGE.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_LANGUAGE.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_MENU.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_MENU.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_MENU_TRL.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_MENU_TRL.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_MESSAGE.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_MESSAGE.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -138043,6 +138043,31 @@
 <!--1002100001-->              <MSGTYPE><![CDATA[E]]></MSGTYPE>
 <!--1002100001**************--></AD_MESSAGE>
 
+<!--1002100003**************--><AD_MESSAGE>
+<!--1002100003 AD_MESSAGE_ID-->
+<!--1002100003-->              <AD_MESSAGE_ID><![CDATA[1002100003]]></AD_MESSAGE_ID>
+<!--1002100003 AD_CLIENT_ID-->
+<!--1002100003-->              <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--1002100003 AD_ORG_ID-->
+<!--1002100003-->              <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--1002100003 ISACTIVE-->
+<!--1002100003-->              <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--1002100003 CREATED-->
+<!--1002100003-->              <CREATED><![CDATA[2008-06-19 14:39:41.0]]></CREATED>
+<!--1002100003 CREATEDBY-->
+<!--1002100003-->              <CREATEDBY><![CDATA[100]]></CREATEDBY>
+<!--1002100003 UPDATED-->
+<!--1002100003-->              <UPDATED><![CDATA[2008-06-19 16:17:53.0]]></UPDATED>
+<!--1002100003 UPDATEDBY-->
+<!--1002100003-->              <UPDATEDBY><![CDATA[100]]></UPDATEDBY>
+<!--1002100003 VALUE-->
+<!--1002100003-->              <VALUE><![CDATA[TwoRegisterTypesNeeded]]></VALUE>
+<!--1002100003 MSGTEXT-->
+<!--1002100003-->              <MSGTEXT><![CDATA[At least two lines are needed in Tax Register Type (one has to be a sale transaction and the other one not)]]></MSGTEXT>
+<!--1002100003 MSGTYPE-->
+<!--1002100003-->              <MSGTYPE><![CDATA[E]]></MSGTYPE>
+<!--1002100003**************--></AD_MESSAGE>
+
 <!--1003900000**************--><AD_MESSAGE>
 <!--1003900000 AD_MESSAGE_ID-->
 <!--1003900000-->              <AD_MESSAGE_ID><![CDATA[1003900000]]></AD_MESSAGE_ID>
--- a/src-db/database/sourcedata/AD_MESSAGE_TRL.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_MESSAGE_TRL.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_MODEL_OBJECT.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_MODEL_OBJECT.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -35107,7 +35107,7 @@
 <!--1002100040 ACTION-->
 <!--1002100040-->              <ACTION><![CDATA[P]]></ACTION>
 <!--1002100040 CLASSNAME-->
-<!--1002100040-->              <CLASSNAME><![CDATA[org.openbravo.erpCommon.ad_actionButton.CreateVatRegistersData]]></CLASSNAME>
+<!--1002100040-->              <CLASSNAME><![CDATA[org.openbravo.erpCommon.ad_actionButton.CreateVatRegisters]]></CLASSNAME>
 <!--1002100040 ISDEFAULT-->
 <!--1002100040-->              <ISDEFAULT><![CDATA[Y]]></ISDEFAULT>
 <!--1002100040 AD_PROCESS_ID-->
@@ -35128,13 +35128,13 @@
 <!--1002100041 CREATEDBY-->
 <!--1002100041-->              <CREATEDBY><![CDATA[100]]></CREATEDBY>
 <!--1002100041 UPDATED-->
-<!--1002100041-->              <UPDATED><![CDATA[2008-02-18 18:20:31.0]]></UPDATED>
+<!--1002100041-->              <UPDATED><![CDATA[2008-06-20 19:14:29.0]]></UPDATED>
 <!--1002100041 UPDATEDBY-->
 <!--1002100041-->              <UPDATEDBY><![CDATA[100]]></UPDATEDBY>
 <!--1002100041 ACTION-->
 <!--1002100041-->              <ACTION><![CDATA[P]]></ACTION>
 <!--1002100041 CLASSNAME-->
-<!--1002100041-->              <CLASSNAME><![CDATA[org.openbravo.erpCommon.ad_reports.ReportVatRegisterJR]]></CLASSNAME>
+<!--1002100041-->              <CLASSNAME><![CDATA[org.openbravo.erpReports.ReportVatRegisterJR]]></CLASSNAME>
 <!--1002100041 ISDEFAULT-->
 <!--1002100041-->              <ISDEFAULT><![CDATA[Y]]></ISDEFAULT>
 <!--1002100041 AD_PROCESS_ID-->
@@ -35155,13 +35155,13 @@
 <!--1002100042 CREATEDBY-->
 <!--1002100042-->              <CREATEDBY><![CDATA[100]]></CREATEDBY>
 <!--1002100042 UPDATED-->
-<!--1002100042-->              <UPDATED><![CDATA[2008-02-25 17:23:38.0]]></UPDATED>
+<!--1002100042-->              <UPDATED><![CDATA[2008-06-20 19:13:52.0]]></UPDATED>
 <!--1002100042 UPDATEDBY-->
 <!--1002100042-->              <UPDATEDBY><![CDATA[100]]></UPDATEDBY>
 <!--1002100042 ACTION-->
 <!--1002100042-->              <ACTION><![CDATA[P]]></ACTION>
 <!--1002100042 CLASSNAME-->
-<!--1002100042-->              <CLASSNAME><![CDATA[org.openbravo.erpCommon.ad_reports.ReportTaxPaymentJR]]></CLASSNAME>
+<!--1002100042-->              <CLASSNAME><![CDATA[org.openbravo.erpReports.ReportTaxPaymentJR]]></CLASSNAME>
 <!--1002100042 ISDEFAULT-->
 <!--1002100042-->              <ISDEFAULT><![CDATA[Y]]></ISDEFAULT>
 <!--1002100042 AD_PROCESS_ID-->
--- a/src-db/database/sourcedata/AD_MODEL_OBJECT_MAPPING.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_MODEL_OBJECT_MAPPING.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
@@ -60175,7 +60175,7 @@
 <!--1002100080 AD_MODEL_OBJECT_ID-->
 <!--1002100080-->              <AD_MODEL_OBJECT_ID><![CDATA[1002100040]]></AD_MODEL_OBJECT_ID>
 <!--1002100080 MAPPINGNAME-->
-<!--1002100080-->              <MAPPINGNAME><![CDATA[/ad_actionButton/CreateVatRegistersData.html]]></MAPPINGNAME>
+<!--1002100080-->              <MAPPINGNAME><![CDATA[/ad_actionButton/CreateVatRegisters.html]]></MAPPINGNAME>
 <!--1002100080 ISDEFAULT-->
 <!--1002100080-->              <ISDEFAULT><![CDATA[Y]]></ISDEFAULT>
 <!--1002100080**************--></AD_MODEL_OBJECT_MAPPING>
--- a/src-db/database/sourcedata/AD_MONTH.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_MONTH.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_ORG.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_ORG.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_ORGINFO.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_ORGINFO.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_PREFERENCE.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_PREFERENCE.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_PROCESS.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_PROCESS.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_PROCESS_PARA.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_PROCESS_PARA.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_PROCESS_PARA_TRL.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_PROCESS_PARA_TRL.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_PROCESS_TRL.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_PROCESS_TRL.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_REFERENCE.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_REFERENCE.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_REFERENCE_TRL.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_REFERENCE_TRL.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_REF_LIST.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_REF_LIST.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_REF_LIST_TRL.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_REF_LIST_TRL.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_REF_SEARCH.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_REF_SEARCH.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_REF_SEARCH_COLUMN.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_REF_SEARCH_COLUMN.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_REF_TABLE.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_REF_TABLE.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_ROLE.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_ROLE.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_ROLE_ORGACCESS.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_ROLE_ORGACCESS.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_TAB.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_TAB.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_TABLE.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_TABLE.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_TAB_TRL.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_TAB_TRL.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_TASK.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_TASK.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_TASK_TRL.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_TASK_TRL.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_TEXTINTERFACES_TRL.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_TEXTINTERFACES_TRL.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_TREE.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_TREE.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_TREENODE.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_TREENODE.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_TREENODEBP.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_TREENODEBP.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_TREENODEPR.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_TREENODEPR.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_USER.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_USER.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_USER_ROLES.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_USER_ROLES.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_VAL_RULE.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_VAL_RULE.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_WF_NODE.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_WF_NODE.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_WF_NODENEXT.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_WF_NODENEXT.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_WF_NODE_TRL.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_WF_NODE_TRL.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_WINDOW_TRL.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_WINDOW_TRL.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_WORKFLOW.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_WORKFLOW.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/AD_WORKFLOW_TRL.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/AD_WORKFLOW_TRL.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/M_ATTRIBUTESET.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/M_ATTRIBUTESET.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src-db/database/sourcedata/M_ATTRIBUTESETINSTANCE.xml	Tue Jun 24 16:23:57 2008 +0000
+++ b/src-db/database/sourcedata/M_ATTRIBUTESETINSTANCE.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <data>
 <!--
 ************************
--- a/src/org/openbravo/erpCommon/ad_actionButton/CreateVatRegisters.java	Tue Jun 24 16:23:57 2008 +0000
+++ b/src/org/openbravo/erpCommon/ad_actionButton/CreateVatRegisters.java	Tue Jun 24 17:33:07 2008 +0000
@@ -12,6 +12,7 @@
 import org.openbravo.base.secureApp.HttpSecureAppServlet;
 import org.openbravo.base.secureApp.VariablesSecureApp;
 import org.openbravo.erpCommon.ad_forms.DocInvoice;
+import org.openbravo.erpCommon.utility.OBError;
 import org.openbravo.erpCommon.utility.SequenceIdData;
 import org.openbravo.erpCommon.utility.Utility;
 import org.openbravo.utils.FormatUtilities;
@@ -53,10 +54,10 @@
 			String strProcessed = vars.getStringParameter("inpProcessed");
 			String strGeneratePayment = vars.getStringParameter("inpGeneratePayment");
 			String strProcessing = vars.getStringParameter("inpProcessing");
-			String message=CreateRegisters(vars, strTaxpaymentID, strDatefrom, strDateto, strProcessed, strGeneratePayment, strProcessing);
+			OBError myMessage=CreateRegisters(vars, strTaxpaymentID, strDatefrom, strDateto, strProcessed, strGeneratePayment, strProcessing);
 			//try this
 			
-			  String strWindowId = vars.getStringParameter("inpWindowId");
+	//		  String strWindowId = vars.getStringParameter("inpWindowId");
 		      String strTabId = vars.getStringParameter("inpTabId");
 			ActionButtonDefaultData[] tab = ActionButtonDefaultData.windowName(this, strTabId);
 		      String strWindowPath="", strTabName="";
@@ -64,7 +65,12 @@
 		        strTabName = FormatUtilities.replace(tab[0].name);
 		        strWindowPath = "../" + FormatUtilities.replace(tab[0].description) + "/" + strTabName + "_Relation.html";
 		      } else strWindowPath = strDefaultServlet;
-		      if (!message.equals("")) vars.setSessionValue(strWindowId + "|" + strTabName + ".message", message);
+		      //if (!message.equals("")) vars.setSessionValue(strWindowId + "|" + strTabName + ".message", message);
+		 
+		     
+		      vars.setMessage(strTabId, myMessage);
+		     
+		      
 		      printPageClosePopUp(response, vars, strWindowPath);
 		    } else pageErrorPopUp(response);
 			//advisePopUp(response,"INFO","Create VAT Register",message);
@@ -82,7 +88,7 @@
 		 * 
 		 * //alp OBError myMessage = processButton(vars, strTaxpaymentID,
 		 * strDatefrom, strDateto, strGeneratepayment, strProcessed,
-		 * strProcessing); //alp vars.setMessage("CreateVatRegisters",
+		 * strProcessing); //alp vars.setMessage("PrintVatRegisters",
 		 * myMessage); //vars.setSessionValue("ExpenseSOrder|message",
 		 * messageResult);
 		 * 
@@ -92,9 +98,10 @@
 		 */
 	
 
-	public String CreateRegisters(VariablesSecureApp vars, String  strTaxpaymentID, String strDatefrom, String strDateto, String strProcessed, String strGeneratePayment, String strProcessing) throws IOException,
+	public OBError CreateRegisters(VariablesSecureApp vars, String  strTaxpaymentID, String strDatefrom, String strDateto, String strProcessed, String strGeneratePayment, String strProcessing) throws IOException,
 			ServletException {
-		// Connection conn = getTransactionConnection();		
+		// Connection conn = getTransactionConnection();	
+		OBError myMessage = null;
 		TaxPayment[] taxpayment = TaxPayment.select(this, strTaxpaymentID);
 		String strUser = vars.getUser();
 				log4j.info("strTaxpaymentID: " + strTaxpaymentID + "strDatefrom: " + strDatefrom + "strDateto: " + strDateto  + "strProcessed: " + strProcessed + "strGeneratePayment: " + strGeneratePayment);
@@ -103,8 +110,10 @@
 		if (strProcessed.equalsIgnoreCase("N")) {
 			//check for already used periods)
 			Double CrossPeriodCount = new Double(TaxPayment.selectCrossPeriodCount(this, strDatefrom, strDateto));
-			if (CrossPeriodCount.intValue() > 0)
-				return "Period Error";
+			if (CrossPeriodCount.intValue() > 0){
+				myMessage = Utility.translateError(this, vars, vars.getLanguage(), Utility.messageBD(this, "PeriodsDontMatch", vars.getLanguage()));
+            return myMessage;
+            }
 			
 			TaxPayment.deleteRegisterLinesChild(this, strTaxpaymentID);
 			TaxPayment.deleteRegisterChild(this, strTaxpaymentID);
@@ -169,7 +178,9 @@
 						//if (!(((myinvoice.istaxexempt.equals("Y") )
 						//	^ (myinvoice.istaxundeductable.equals("Y"))
 						//	^ (myinvoice.isnovat.equals("Y"))))) {
-						return "InvoiceTax Error: istaxexempt, istaxundeductable or isnovat could have wrong values,  C_InvoiceTax_ID="+myinvoice.cInvoicetaxId;
+						//return "InvoiceTax Error: istaxexempt, istaxundeduc or isnovat could have wrong values,  C_InvoiceTax_ID="+myinvoice.cInvoicetaxId;
+						myMessage = Utility.translateError(this, vars, vars.getLanguage(), Utility.messageBD(this, "TaxCriteriaNotFound", vars.getLanguage()));
+				        return myMessage;	
 					}
 					if (myinvoice.docbasetype.equals(DocInvoice.DOCTYPE_APCredit) || myinvoice.docbasetype.equals(DocInvoice.DOCTYPE_ARCredit)){
 						strTaxBaseAmt = new Double(new Double(strTaxBaseAmt) * new Double(-1)).toString();
@@ -216,15 +227,28 @@
 			//			.updateProcessed(this, "Y", strUser, strTaxpaymentID);
 			//}
 				log4j.info("5strTaxpaymentID: " + strTaxpaymentID + "strDatefrom: " + strDatefrom + "strDateto: " + strDateto  + "strProcessed: " + strProcessed + "strGeneratePayment: " + strGeneratePayment);
-
+		try{		
       if (new Double(TaxPayment.calculateVatPayment(this, strTaxpaymentID)).compareTo(new Double(0))>0) {
 				TaxPayment.updateGeneratePayment(this, "Y", strUser, strTaxpaymentID);
 			}else TaxPayment.updateGeneratePayment(this, "N", strUser, strTaxpaymentID);
-			return "Completed Operation";
+		}catch (NumberFormatException e){
+			myMessage = Utility.translateError(this, vars, vars.getLanguage(), Utility.messageBD(this, "NoDataSelected", vars.getLanguage()));
+            return myMessage;
+		}
+			if (myMessage==null) {
+			      myMessage = new OBError();
+			      myMessage.setType("Success");
+			      myMessage.setTitle("");
+			      myMessage.setMessage(Utility.messageBD(this, "Success", vars.getLanguage()));
+			    }
+			    return myMessage;
+			
+			
 		}
 	 
 	   else
-		    return "Error: the payment already exists";
+		   myMessage = Utility.translateError(this, vars, vars.getLanguage(), Utility.messageBD(this, "ProcessRunError", vars.getLanguage()));
+        return myMessage;
 	
 		// Select all active Register Type Lines of Tax Register
 		// for (TaxRegisterType taxRegisterType : taxregistertypes) {
--- a/src/org/openbravo/erpCommon/ad_reports/ReportPaymentFilter.html	Tue Jun 24 16:23:57 2008 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,322 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD Xhtml 1.0 Transitional//EN" "http://www.w3.org/tr/xhtml1/Dtd/xhtml1-transitional.dtd">
-<!--
- *************************************************************************
- * The contents of this file are subject to the Openbravo  Public  License
- * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
- * Version 1.1  with a permitted attribution clause; you may not  use this
- * file except in compliance with the License. You  may  obtain  a copy of
- * the License at http://www.openbravo.com/legal/license.html
- * Software distributed under the License  is  distributed  on  an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- * License for the specific  language  governing  rights  and  limitations
- * under the License.
- * The Original Code is Openbravo ERP.
- * The Initial Developer of the Original Code is Openbravo SL
- * All portions are Copyright (C) 2001-2006 Openbravo SL
- * All Rights Reserved.
- * Contributor(s):  ______________________________________.
- ************************************************************************
--->
-<html xmlns="http://www.w3.org/1999/xhtml">
-  <head>
-    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<TITLE>Tax Payment</TITLE>
-  <link rel="SHORTCUT ICON" href="../../../../../web/images/favicon.ico" type="image/x-icon" />
-    <link rel="stylesheet" type="text/css" href="../../../../../web/skins/Default/Main/Main_Manual.css" id="paramCSS" />
-    <script language="JavaScript" type="text/javascript" id="paramDirection">
-      var baseDirection = "../../../../../web/";
-      </script>
-      <script language="JavaScript" src="../../../../../web/js/messages.js" type="text/javascript">
-      </script>
-      <script language="JavaScript" src="../utility/MessagesJS.js" type="text/javascript"></script>
-      <script language="JavaScript" type="text/javascript" id="paramLanguage">
-        var LNG_POR_DEFECTO = "en_US";
-      </script>
-      <script language="JavaScript" src="../../../../../web/js/utils.js" type="text/javascript"></script>
-      <script language="JavaScript" src="../../../../../web/js/searchs.js" type="text/javascript"></script>
-      <script language="JavaScript" src="../../../../../web/js/ajax.js" type="text/javascript"></script>
-      <script language="JavaScript" src="../../../../../web/js/default/MessageBox.js" type="text/javascript"></script>
-      <script language="JavaScript" src="../../../../../web/js/messages.js" type="text/javascript"></script>
-      <script language="JavaScript" src="../utility/MessagesJS.js" type="text/javascript"></script>
-      <script language="JavaScript" src="../../../../../web/js/jscalendar/calendar.js" type="text/javascript"></script>
-      <script language="JavaScript" src="../../../../../web/js/jscalendar/lang/calendar-es.js" type="text/javascript" id="fieldCalendar"></script>
-      <script language="JavaScript" src="../../../../../web/js/default/DateTextBox.js" type="text/javascript"></script>
-      <script language="JavaScript" src="../../../../../web/js/dojoConfig.js" type="text/javascript"></script>
-      <script language="JavaScript" src="../../../../../web/js/dojo/dojo.js" type="text/javascript"></script>
-      <script language="JavaScript" type="text/javascript" id="keyMap"></script>
-      <script type="text/javascript">
-        dojo.hostenv.writeIncludes(); //makes debugging in Venkman possible
-      </script>
-<SCRIPT language="JavaScript" type="text/javascript">
-function onloadFunctions() {
-}
-
-function depurar() {
-  var frm=document.frmMain;
-  if (frm.inpDateFrom.value==null || frm.inpDateFrom.value=="") {
-      setWindowElementFocus(frm.inpDateFrom);
-      mensaje(7);
-      return false;
-    }
-  if (frm.inpDateTo.value==null || frm.inpDateTo.value=="") {
-      setWindowElementFocus(frm.inpDateTo);
-      mensaje(7);
-      return false;
-    }
-  return true;
-}
-</SCRIPT>
-</HEAD>
-    <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="resizeArea();updateMenuIcon('buttonMenu');focoPrimerControl();" onresize="resizeArea();">
-<FORM method="POST" action="ReportPaymentFilter.html" name="frmMain" id="form">
-  <INPUT type="hidden" name="Command"></INPUT>
-  <INPUT type="hidden" name="inpAuxd" value="" id="functionSumAux1"></INPUT>
-  <table height="100%" border="0" cellpadding="0" cellspacing="0" id="main">
-    <tr>
-      <td valign="top" id="tdleftTabs"></td>
-      <td valign="top">
-        <TABLE width="100%" border="0" cellspacing="0" cellpadding="0" class="Main_ContentPane_Left">
-          <TR><TD class="Main_NavBar_bg_left" id="tdleftSeparator"></TD></TR>
-          <TR><TD class="Main_ToolBar_bg_left" valign="top"></TD></TR>
-          <TR><TD class="Main_Client_bg_left"></TD></TR>
-          <TR><TD class="Main_Bottom_bg_left"></TD></TR>
-        </TABLE>
-      </td>
-      <td valign="top">
-        <div class="Main_ContentPane_NavBar" id="tdtopButtons"></div>
-        <div class="Main_ContentPane_ToolBar" id="paramToolBar"></div>
-        <TABLE width="100%" border="0" cellspacing="0" cellpadding="0" class="Main_ContentPane_TabPane" id="tdtopTabs">
-          <TR id="paramParentTabContainer"></TR>
-          <TR id="paramMainTabContainer"></TR>
-          <TR id="paramChildTabContainer"></TR>
-        </TABLE>
-        <DIV class="Main_ContentPane_Client" style="overflow: auto; display: none;" id="client">
-                <table class="dojoTabContainer" border="0" cellpadding="0" cellspacing="0" width="100%" summary="">
-                  <tr>
-                    <td>
-                      <table class="dojoTabPaneWrapper" border="0" cellpadding="0" cellspacing="0" width="100%" summary="">
-                        <tr>
-                          <td>
-                            <!-- MessageBox -->
-
-                            <table cellpadding="0" cellspacing="0" id="messageBoxID" class="MessageBoxyy">
-                              <TBODY>
-                              <tr class="MessageBox_TopMargin">
-                                <td class="MessageBox_LeftMargin"></td>
-                                <td></td>
-                                <td class="MessageBox_RightMargin"></td>
-                              </tr>
-                              <tr>
-                                <td class="MessageBox_LeftMargin"></td>
-                                <td>
-
-                                  <table cellpadding="0" cellspacing="0" style="width: 100%;">
-                                    <TBODY>
-                                    <tr>
-                                      <td>
-                                        <div class="MessageBox_TopLeft"></div>
-                                        <div class="MessageBox_Left"></div>
-                                      </td>
-                                      <td class="MessageBox_bg">
-
-                                        <table class="MessageBox_Top">
-                                        <TBODY>
-                                          <tr>
-                                            <td>
-                                              <span>
-                                              <table cellpadding="0" cellspacing="0" class="MessageBox_Body_ContentCell">
-                                                <TBODY>
-                                                <tr>
-                                                  <td class="MessageBox_Icon_ContentCell">
-                                                    <div class="MessageBox_Icon"></div>
-                                                  </td>
-                                                  <td style="vertical-align: top;" id="messageBoxIDContent">
-                                                    <span>
-                                                      <div class="MessageBox_TextTitle" id="messageBoxIDTitle">
-                                                        xxInfo: AccessTableWithNoView
-                                                      </div>
-                                                      <div class="MessageBox_TextDescription" id="messageBoxIDMessage">
-                                                        xxThe current information is empty.
-                                                      </div>
-                                                      <div class="MessageBox_TextSeparator"></div>
-                                                    </span>
-                                                  </td>
-                                                </tr>
-                                                </TBODY>
-                                              </table>
-                                              </span>
-                                            </td>
-                                          </tr>
-                                          </TBODY>
-                                        </table>
-
-                                      </td>
-                                      <td class="MessageBox_RightTrans">
-                                        <div class="MessageBox_TopRight"></div>
-                                        <div class="MessageBox_Right"></div>
-                                      </td>
-                                    </tr>
-                                    <tr>
-                                      <td rowspan="2" class="MessageBox_BottomLeft">
-                                      </td>
-                                      <td class="MessageBox_BottomTrans MessageBox_bg">
-                                      </td>
-                                      <td rowspan="2" class="MessageBox_BottomRight">
-                                      </td>
-                                    </tr>
-                                    <tr>
-                                      <td class="MessageBox_Bottom">
-                                      </td>
-                                    </tr>
-                                    </TBODY>
-                                  </table>
-
-                                </td>
-                                <td class="MessageBox_RightMargin"></td>
-                              </tr>
-                              <tr class="MessageBox_BottomMargin">
-                                <td class="MessageBox_LeftMargin"></td>
-                                <td></td>
-                                <td class="MessageBox_RightMargin"></td>
-                              </tr>
-                              </TBODY>
-                            </table>
-                            <!-- USER CONTROLS -->
-              <TABLE class="Main_Client_TableEdition">
-                <tr>
-                  <td class="TableEdition_OneCell_width"></td>
-                  <td class="TableEdition_OneCell_width"></td>
-                  <td class="TableEdition_OneCell_width"></td>
-                  <td class="TableEdition_OneCell_width"></td>
-                  <td class="TableEdition_OneCell_width"></td>
-                  <td class="TableEdition_OneCell_width"></td>
-                </tr>
-                <TR>
-                <td colspan="6">
-                  <table class="FieldGroup" cellspacing="0" cellpadding="0" border="0">
-                  <tbody>
-                    <tr class="FieldGroup_TopMargin"/>
-                    <tr>
-                      <td class="FieldGroupTitle_Left"><img class="FieldGroupTitle_Left_bg" border="0" src="../../../../../web/images/blank.gif"/></td>
-                      <TD class="FieldGroupTitle">Primary Filters</TD>
-                      <td class="FieldGroupTitle_Right"><img class="FieldGroupTitle_Right_bg" border="0" src="../../../../../web/images/blank.gif"/></td>
-                      <td class="FieldGroupContent"/>
-                    </tr>
-                    <tr class="FieldGroup_BottomMargin"/>
-                  </tbody>
-                  </table>
-                </td>
-                </TR>
-                <TR>
-                  <TD class="TitleCell"><SPAN class="LabelText">From Date</SPAN></TD>
-                  <TD class="TextBox_btn_ContentCell">
-                    <TABLE border="0" cellspacing="0" cellpadding="0" summary=""  style="padding-top: 0px;">
-                      <TR>
-                        <TD class="TextBox_ContentCell">
-						  <INPUT type="text" id="paramDateFrom" class="dojoValidateValid readonly TextBox_TwoCells_width" required="false" value="" maxlength="19" name="inpDateFrom" onkeyup="auto_complete_date(this);" onchange="validateDateTextBox(this.id);logChanges(this);return true;" displayformat="DD-MM-YYYY %H:%M:%S" saveformat="DD-MM-YYYY %H:%M:%S" disabled="true"></INPUT>
-                        </TD>
-                      </TR>
-                    </TABLE>
-                 </TD>
-                  <TD class="TitleCell"></TD>
-                  <TD class="TitleCell"> <SPAN class="LabelText">To Date</SPAN></TD>
-                  <TD class="TextBox_btn_ContentCell">
-                    <TABLE border="0" cellspacing="0" cellpadding="0" summary=""  style="padding-top: 0px;">
-                      <TR>
-                        <TD class="TextBox_ContentCell">
-						  <INPUT type="text" id="paramDateTo" class="dojoValidateValid readonly TextBox_TwoCells_width" required="false" value="" maxlength="19" name="inpDateTo" onkeyup="auto_complete_date(this);" onchange="validateDateTextBox(this.id);logChanges(this);return true;" displayformat="DD-MM-YYYY %H:%M:%S" saveformat="DD-MM-YYYY %H:%M:%S" readonly="true"></INPUT>
-                        </TD>
-                      </TR>
-                    </TABLE>
-                  </TD>
-                  <TD class="ContentCell"> </TD>
-
-                </TR>
-                  <TD class="TitleCell"> <SPAN class="LabelText">Type Report</SPAN></TD>
-                  <TD class="Combo_ContentCell" colspan="2"> <SELECT  type="hidden" name="inpTypeVatReport" id="inpTypeVatReport" required="true" class="Combo Combo_TwoCells_width">
-                      <OPTION value=""> <DIV id="reportTypeVatReport"></DIV></OPTION>
-                    </SELECT>
-                  </TD>
-                  <TD class="ContentCell"></TD>
-                  <TD class="TitleCell"></TD>
-                  <TD class="ContentCell"></TD>
-                </TR>
-                  <TR>
-                    <td colspan="6">
-                      <table class="FieldGroup" cellspacing="0" cellpadding="0" border="0">
-                      <tbody>
-                        <tr class="FieldGroup_TopMargin"/>
-                        <tr>
-                          <td class="FieldGroupTitle_Left"><img class="FieldGroupTitle_Left_bg" border="0" src="../../../../../web/images/blank.gif"/></td>
-                          <td class="FieldGroupTitle">View Results</td>
-                          <td class="FieldGroupTitle_Right"><img class="FieldGroupTitle_Right_bg" border="0" src="../../../../../web/images/blank.gif"/></td>
-                          <td class="FieldGroupContent"/>
-                        </tr>
-                        <tr class="FieldGroup_BottomMargin"/>
-                      </tbody>
-                      </table>
-                    </td>
-                  </TR>
-
-                  <tr>
-                    <TD class="TitleCell"></TD>
-                    <TD class="Button_CenterAlign_ContentCell">
-                      <div>
-                        <a class="ButtonLink" href="#" onfocus="this.className='ButtonLink_hover'; window.status='View Results in a New Window'; return true;" onblur="this.className='ButtonLink'; window.status=''; return true;" onkeypress="this.className='ButtonLink_active'; return true;" onkeyup="this.className='ButtonLink_hover'; return true;" onclick="openServletNewWindow('EDIT_HTML', true, 'ReportPaymentFilter.html', 'ReportTaxPaymentJR', null, false, '700', '1000', true);return false;">
-                        <table class="Button" onmouseout="this.className='Button';window.status='';return true;" onmouseover="this.className='Button_hover';window.status='HTML_Report';return true;" onmousedown="this.className='Button_active';return true;" onmouseup="this.className='Button';return true;">
-                          <tr>
-                            <td class="Button_left"><img class="Button_Icon Button_Icon_html" alt="View Results in a New Window" title="View Results in a New Window" src="../../../../../web/images/blank.gif" border=0/></td>
-                            <td class="Button_text">HTML Format</td>
-                            <td class="Button_right"></td>
-                          </tr>
-                        </table>
-                        </a>
-                      </div>
-                    </TD>
-                    <TD class="ContentCell"></INPUT>
-                    </TD>
-                    <TD class="TitleCell"></TD>
-                    <TD class="Button_CenterAlign_ContentCell">
-                      <div>
-                        <a class="ButtonLink" href="#" onfocus="this.className='ButtonLink_hover'; window.status='Export Results to PDF Format'; return true;" onblur="this.className='ButtonLink'; window.status=''; return true;" onkeypress="this.className='ButtonLink_active'; return true;" onkeyup="this.className='ButtonLink_hover'; return true;" onclick="openServletNewWindow('EDIT_PDF', true, 'ReportPaymentFilter.html', 'ReportTaxPaymentJR', null, false, '700', '1000', true);return false;">
-                        <table class="Button" onmouseout="this.className='Button';window.status='';return true;" onmouseover="this.className='Button_hover';window.status='PDF_Report';return true;" onmousedown="this.className='Button_active';return true;" onmouseup="this.className='Button';return true;">
-                          <tr>
-                            <td class="Button_left"><img class="Button_Icon Button_Icon_pdf" alt="Export Results to PDF Format" title="Export Results to PDF Format" src="../../../../../web/images/blank.gif" border=0/></td>
-                            <td class="Button_text">PDF Format</td>
-                            <td class="Button_right"></td>
-                          </tr>
-                        </table>
-                        </a>
-                      </div>
-                    </TD>
-                    <TD class="ContentCell"></TD>
-                  </TR>
- 		 </TABLE>
-
-                      <!-- USER CONTROLS -->
-                </TD>
-              </TR>
-              </TABLE>
-              </TD>
-            </TR>
-          </TABLE>
-        </div>
-        <TABLE width="100%" border="0" cellspacing="0" cellpadding="0" class="Menu_ContentPane_Bottom" id="tdbottomSeparator">
-          <TR>
-            <TD class="Main_Bottom_bg"><IMG src="../../../../../web/images/blank.gif" border="0"></TD>
-          </TR>
-        </TABLE></td>
-      <td valign="top">
-        <TABLE width="100%" border="0" cellspacing="0" cellpadding="0" class="Main_ContentPane_Right" id="tdrightSeparator">
-          <TR><TD class="Main_NavBar_bg_right"></TD></TR>
-          <TR><TD class="Main_ToolBar_bg_right" valign="top"></TD></TR>
-          <TR><TD class="Main_Client_bg_right"></TD></TR>
-          <TR><TD class="Main_Bottom_bg_right"></TD></TR>
-        </TABLE>
-      </td>
-    </tr>
-  </table>
-</form>
-</body>
-</html>
--- a/src/org/openbravo/erpCommon/ad_reports/ReportPaymentFilter.xml	Tue Jun 24 16:23:57 2008 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-*************************************************************************
-* The contents of this file are subject to the Openbravo  Public  License
-* Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
-* Version 1.1  with a permitted attribution clause; you may not  use this
-* file except in compliance with the License. You  may  obtain  a copy of
-* the License at http://www.openbravo.com/legal/license.html 
-* Software distributed under the License  is  distributed  on  an "AS IS"
-* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
-* License for the specific  language  governing  rights  and  limitations
-* under the License. 
-* The Original Code is Openbravo ERP. 
-* The Initial Developer of the Original Code is Openbravo SL 
-* All portions are Copyright (C) 2001-2006 Openbravo SL 
-* All Rights Reserved. 
-* Contributor(s):  ______________________________________.
-************************************************************************
--->
-<REPORT>
-  <template file="ReportPaymentFilter.html"/>
-  <PARAMETER id="paramToolBar" name="toolbar" default=""/>
-  <PARAMETER id="paramMessage" name="paramMessage" attribute="onload" replace="xx();"/>
-  <PARAMETER id="fieldCalendar" name="calendar" attribute="src" replace="es" default="en"/>
-  <PARAMETER id="paramDirection" name="direction" default=""/>
-  <PARAMETER id="paramLanguage" name="paramLanguage" default=""/>
-  <PARAMETER id="paramDateFrom" name="dateFrom" attribute="value"/>
-	<PARAMETER id="paramDateFrom" name="dateFromdisplayFormat" attribute="displayformat" replace="xx"/>
-	<PARAMETER id="paramDateFrom" name="dateFromsaveFormat" attribute="saveformat" replace="yy"/>
-  <PARAMETER id="paramDateTo" name="dateTo" attribute="value"/>
-	<PARAMETER id="paramDateTo" name="dateTodisplayFormat" attribute="displayformat" replace="xx"/>
-	<PARAMETER id="paramDateTo" name="dateTosaveFormat" attribute="saveformat" replace="yy"/>
-  <!-- 
-  <PARAMETER id="paramC_BANKACCOUNT_ID" name="cBankAccount" default=""/>
-  <SUBREPORT id="reportC_ACCOUNTNUMBER" name="reportC_ACCOUNTNUMBER" report="org/openbravo/erpCommon/reference/List">
-    <ARGUMENT name="parameterListSelected" withId="paramC_BANKACCOUNT_ID"/>
-  </SUBREPORT>
-  -->
- <PARAMETER id="paramTypeVatReport" name="TypeVatReport" default=""/>
-  <SUBREPORT id="reportTypeVatReport" name="reportTypeVatReport" report="org/openbravo/erpCommon/reference/List">
-    <ARGUMENT name="parameterListSelected" withId="paramTypeVatReport"/>
-  </SUBREPORT>
-  <PARAMETER id="paramSumAmount" name="sumAmount"/>
-  <PARAMETER id="param0" name="Param0" default="0"/>
-  <PARAMETER id="paramCSS" name="theme" attribute="href" replace="Default"/>
-  <PARAMETER id="tdleftTabs" name="leftTabs" default=""/>
-  <PARAMETER id="paramParentTabContainer" name="parentTabContainer" default=" "/>
-  <PARAMETER id="paramMainTabContainer" name="mainTabContainer" default=" "/>
-  <PARAMETER id="paramChildTabContainer" name="childTabContainer" default=" "/>
-  <PARAMETER id="tdtopButtons" name="navigationBar" default=""/>
-  <PARAMETER id="keyMap" name="keyMap" default=""/>
-  <PARAMETER id="messageBoxID" name="messageType" attribute="class" replace="yy" default="HIDDEN"/>
-  <PARAMETER id="messageBoxIDTitle" name="messageTitle" default=""/>
-  <PARAMETER id="messageBoxIDMessage" name="messageMessage" default=""/>
-
-</REPORT>
--- a/src/org/openbravo/erpCommon/ad_reports/ReportRegisterByVatJR.jrxml	Tue Jun 24 16:23:57 2008 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,921 +0,0 @@
-<?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="ReportRegisterByVatJR"
-		 columnCount="1"
-		 printOrder="Vertical"
-		 orientation="Portrait"
-		 pageWidth="842"
-		 pageHeight="1190"
-		 columnWidth="782"
-		 columnSpacing="0"
-		 leftMargin="30"
-		 rightMargin="30"
-		 topMargin="20"
-		 bottomMargin="20"
-		 whenNoDataType="NoPages"
-		 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.*" />
-
-	<parameter name="invoicedateDA" isForPrompting="true" class="java.lang.String">
-		<parameterDescription><![CDATA[Invoice Date From :]]></parameterDescription>
-		<defaultValueExpression ><![CDATA[""]]></defaultValueExpression>
-	</parameter>
-	<parameter name="invoicedateA" isForPrompting="true" class="java.lang.String">
-		<parameterDescription><![CDATA[Invoice Date To :]]></parameterDescription>
-		<defaultValueExpression ><![CDATA[""]]></defaultValueExpression>
-	</parameter>
-	<queryString><![CDATA[select taxreg.name, (tax.name||'-'||tax.rate || '%' ) as Aliquota,
- coalesce(taxregline.taxbaseamt,0) as Imponibile, coalesce(taxregline.novatamt,0) as NonImponibile, coalesce(taxregline.exemptamt,0) as Esente , 
- coalesce(taxregline.taxundamt,0) as IvaIndeducibile, coalesce(taxregline.taxamt,0) as Iva, coalesce(taxregline.totalamt,0) as Totale,
- coalesce(taxreg.lastregaccumamt,0) as TotalePrecedente,
-case 
- when taxregtyp.issotrx ='S' then 'Vendite'
- else 'Acquisti'
- end 
- as IsSale
- from c_taxregister taxreg, c_taxregisterline taxregline , c_taxregister_type taxregtyp, c_tax tax
- where
-     taxreg.c_taxregister_id = taxregline.c_taxregister_id
- and taxreg.c_taxregister_type_id = taxregtyp.c_taxregister_type_id 
- and taxregline.c_tax_id = tax.c_tax_id
- and 1=1
- and ( taxregline.invoicedate >= to_date($P{invoicedateDA},'DD/MM/YYYY')  ) 
- and ( taxregline.invoicedate <= to_date($P{invoicedateA},'DD/MM/YYYY')  ) 
- order by  taxreg.name,(tax.name||'-'||tax.rate || '%' )]]></queryString>
-
-	<field name="NAME" class="java.lang.String"/>
-	<field name="ALIQUOTA" class="java.lang.String"/>
-	<field name="IMPONIBILE" class="java.math.BigDecimal"/>
-	<field name="NONIMPONIBILE" class="java.math.BigDecimal"/>
-	<field name="ESENTE" class="java.math.BigDecimal"/>
-	<field name="IVAINDEDUCIBILE" class="java.math.BigDecimal"/>
-	<field name="IVA" class="java.math.BigDecimal"/>
-	<field name="TOTALE" class="java.math.BigDecimal"/>
-	<field name="TOTALEPRECEDENTE" class="java.math.BigDecimal"/>
-	<field name="ISSALE" class="java.lang.String"/>
-
-	<variable name="SumImponibile" class="java.math.BigDecimal" resetType="Group" resetGroup="NAME" calculation="Sum">
-		<variableExpression><![CDATA[$F{IMPONIBILE}]]></variableExpression>
-	</variable>
-	<variable name="SumNonImponibile" class="java.math.BigDecimal" resetType="Group" resetGroup="NAME" calculation="Sum">
-		<variableExpression><![CDATA[$F{NONIMPONIBILE}]]></variableExpression>
-	</variable>
-	<variable name="SumEsente" class="java.math.BigDecimal" resetType="Group" resetGroup="NAME" calculation="Sum">
-		<variableExpression><![CDATA[$F{ESENTE}]]></variableExpression>
-	</variable>
-	<variable name="SumIvaIndeducibile" class="java.math.BigDecimal" resetType="Group" resetGroup="NAME" calculation="Sum">
-		<variableExpression><![CDATA[$F{IVAINDEDUCIBILE}]]></variableExpression>
-	</variable>
-	<variable name="SumIva" class="java.math.BigDecimal" resetType="Group" resetGroup="NAME" calculation="Sum">
-		<variableExpression><![CDATA[$F{IVA}]]></variableExpression>
-	</variable>
-	<variable name="SumTotale" class="java.math.BigDecimal" resetType="Group" resetGroup="NAME" calculation="Sum">
-		<variableExpression><![CDATA[$F{TOTALE}]]></variableExpression>
-	</variable>
-	<variable name="SumTotalePrec" class="java.math.BigDecimal" resetType="Group" resetGroup="NAME" calculation="First">
-		<variableExpression><![CDATA[$F{TOTALEPRECEDENTE}]]></variableExpression>
-	</variable>
-	<variable name="TotIva" class="java.math.BigDecimal" resetType="Report" calculation="Sum">
-		<variableExpression><![CDATA[( $F{ISSALE}.equals( "Acquisti" )  ? $F{IVA}.negate() : $F{IVA} )]]></variableExpression>
-	</variable>
-	<variable name="TotCredPrec" class="java.math.BigDecimal" resetType="Report" incrementType="Group" incrementGroup="NAME" calculation="Sum">
-		<variableExpression><![CDATA[( $F{ISSALE}.equals( "Acquisti" )  ? $F{TOTALEPRECEDENTE} : $F{TOTALEPRECEDENTE}.negate() )]]></variableExpression>
-		<initialValueExpression><![CDATA[new BigDecimal(0)]]></initialValueExpression>
-	</variable>
-	<variable name="TotIvaDaPagare" class="java.math.BigDecimal" resetType="Report" calculation="Nothing">
-		<variableExpression><![CDATA[$V{TotIva}.add(  ( $V{TotCredPrec}.doubleValue()<0 ? new BigDecimal(0) :  $V{TotCredPrec}.negate() ))]]></variableExpression>
-	</variable>
-
-		<group  name="NAME" >
-			<groupExpression><![CDATA[$F{NAME}]]></groupExpression>
-			<groupHeader>
-			<band height="25"  isSplitAllowed="true" >
-				<rectangle radius="0" >
-					<reportElement
-						x="0"
-						y="0"
-						width="782"
-						height="25"
-						forecolor="#8080FF"
-						backcolor="#00CCFF"
-						key="rectangle"/>
-					<graphicElement stretchType="NoStretch"/>
-				</rectangle>
-				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						x="0"
-						y="2"
-						width="329"
-						height="23"
-						forecolor="#000000"
-						key="textField"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement>
-						<font size="18"/>
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[$F{NAME}]]></textFieldExpression>
-				</textField>
-				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						x="538"
-						y="0"
-						width="86"
-						height="25"
-						forecolor="#000000"
-						key="textField"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement textAlignment="Right" verticalAlignment="Middle">
-						<font size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" isStrikeThrough="false" />
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[$F{ISSALE}]]></textFieldExpression>
-				</textField>
-				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						x="329"
-						y="0"
-						width="86"
-						height="25"
-						key="textField">
-							<printWhenExpression><![CDATA[new Boolean(false)]]></printWhenExpression>
-						</reportElement>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement textAlignment="Right" verticalAlignment="Middle">
-						<font size="12"/>
-					</textElement>
-				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$F{TOTALEPRECEDENTE}]]></textFieldExpression>
-				</textField>
-			</band>
-			</groupHeader>
-			<groupFooter>
-			<band height="30"  isSplitAllowed="true" >
-				<line direction="BottomUp">
-					<reportElement
-						x="1"
-						y="0"
-						width="781"
-						height="0"
-						forecolor="#000000"
-						backcolor="#FFFFFF"
-						key="line"/>
-					<graphicElement stretchType="NoStretch"/>
-				</line>
-				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						x="86"
-						y="0"
-						width="86"
-						height="18"
-						key="textField"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement textAlignment="Right">
-						<font/>
-					</textElement>
-				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$V{SumImponibile}]]></textFieldExpression>
-				</textField>
-				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						x="172"
-						y="0"
-						width="86"
-						height="18"
-						key="textField"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement textAlignment="Right">
-						<font/>
-					</textElement>
-				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$V{SumNonImponibile}]]></textFieldExpression>
-				</textField>
-				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						x="258"
-						y="0"
-						width="86"
-						height="18"
-						key="textField-1"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement textAlignment="Right">
-						<font/>
-					</textElement>
-				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$V{SumEsente}]]></textFieldExpression>
-				</textField>
-				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						x="344"
-						y="0"
-						width="86"
-						height="18"
-						key="textField-2"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement textAlignment="Right">
-						<font/>
-					</textElement>
-				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$V{SumIvaIndeducibile}]]></textFieldExpression>
-				</textField>
-				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						x="430"
-						y="0"
-						width="86"
-						height="18"
-						key="textField-3"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement textAlignment="Right">
-						<font/>
-					</textElement>
-				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$V{SumIva}]]></textFieldExpression>
-				</textField>
-				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						x="516"
-						y="0"
-						width="86"
-						height="18"
-						key="textField-4"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement textAlignment="Right">
-						<font/>
-					</textElement>
-				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$V{SumTotale}]]></textFieldExpression>
-				</textField>
-				<staticText>
-					<reportElement
-						x="0"
-						y="0"
-						width="86"
-						height="18"
-						key="staticText-1"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement>
-						<font pdfFontName="Helvetica-Bold" isBold="true"/>
-					</textElement>
-				<text><![CDATA[Totali :]]></text>
-				</staticText>
-				<textField isStretchWithOverflow="false" pattern="##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						x="649"
-						y="0"
-						width="100"
-						height="18"
-						key="textField">
-							<printWhenExpression><![CDATA[new Boolean(false)]]></printWhenExpression>
-						</reportElement>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement>
-						<font/>
-					</textElement>
-				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$V{TotCredPrec}]]></textFieldExpression>
-				</textField>
-			</band>
-			</groupFooter>
-		</group>
-		<background>
-			<band height="0"  isSplitAllowed="true" >
-			</band>
-		</background>
-		<title>
-			<band height="50"  isSplitAllowed="true" >
-				<staticText>
-					<reportElement
-						x="158"
-						y="5"
-						width="242"
-						height="40"
-						key="staticText"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement>
-						<font size="30"/>
-					</textElement>
-				<text><![CDATA[Liquidazione Iva]]></text>
-				</staticText>
-				<line direction="TopDown">
-					<reportElement
-						x="0"
-						y="48"
-						width="781"
-						height="0"
-						forecolor="#000000"
-						backcolor="#FFFFFF"
-						key="line"/>
-					<graphicElement stretchType="NoStretch"/>
-				</line>
-				<line direction="TopDown">
-					<reportElement
-						x="0"
-						y="3"
-						width="781"
-						height="0"
-						forecolor="#000000"
-						backcolor="#FFFFFF"
-						key="line"/>
-					<graphicElement stretchType="NoStretch"/>
-				</line>
-				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						x="400"
-						y="0"
-						width="382"
-						height="50"
-						key="textField-6"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement verticalAlignment="Middle">
-						<font isBold="true"/>
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA["Periodo da:   " +" "+ $P{invoicedateDA}+" "+"   a   "+" "+$P{invoicedateA}]]></textFieldExpression>
-				</textField>
-			</band>
-		</title>
-		<pageHeader>
-			<band height="9"  isSplitAllowed="true" >
-			</band>
-		</pageHeader>
-		<columnHeader>
-			<band height="18"  isSplitAllowed="true" >
-				<rectangle>
-					<reportElement
-						mode="Opaque"
-						x="0"
-						y="0"
-						width="782"
-						height="17"
-						forecolor="#000000"
-						backcolor="#999999"
-						key="rectangle"/>
-					<graphicElement stretchType="NoStretch" pen="None"/>
-				</rectangle>
-				<line direction="BottomUp">
-					<reportElement
-						x="0"
-						y="0"
-						width="782"
-						height="0"
-						forecolor="#000000"
-						backcolor="#999999"
-						key="line"/>
-					<graphicElement stretchType="NoStretch"/>
-				</line>
-				<line direction="BottomUp">
-					<reportElement
-						x="0"
-						y="15"
-						width="782"
-						height="0"
-						forecolor="#000000"
-						backcolor="#FFFFFF"
-						key="line"/>
-					<graphicElement stretchType="NoStretch"/>
-				</line>
-				<staticText>
-					<reportElement
-						x="0"
-						y="0"
-						width="86"
-						height="17"
-						forecolor="#000000"
-						backcolor="#999999"
-						key="staticText"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement>
-						<font size="12"/>
-					</textElement>
-				<text><![CDATA[Aliquota]]></text>
-				</staticText>
-				<staticText>
-					<reportElement
-						x="86"
-						y="0"
-						width="86"
-						height="17"
-						forecolor="#000000"
-						key="staticText"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement textAlignment="Right">
-						<font size="12"/>
-					</textElement>
-				<text><![CDATA[Imponibile]]></text>
-				</staticText>
-				<staticText>
-					<reportElement
-						x="172"
-						y="0"
-						width="86"
-						height="17"
-						forecolor="#000000"
-						key="staticText"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement textAlignment="Right">
-						<font size="12"/>
-					</textElement>
-				<text><![CDATA[Non Imp.]]></text>
-				</staticText>
-				<staticText>
-					<reportElement
-						x="258"
-						y="0"
-						width="86"
-						height="17"
-						forecolor="#000000"
-						key="staticText"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement textAlignment="Right">
-						<font size="12"/>
-					</textElement>
-				<text><![CDATA[Esente]]></text>
-				</staticText>
-				<staticText>
-					<reportElement
-						x="344"
-						y="0"
-						width="86"
-						height="17"
-						forecolor="#000000"
-						key="staticText"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement textAlignment="Right">
-						<font size="12"/>
-					</textElement>
-				<text><![CDATA[Iva Inded.]]></text>
-				</staticText>
-				<staticText>
-					<reportElement
-						x="430"
-						y="0"
-						width="86"
-						height="17"
-						forecolor="#000000"
-						key="staticText"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement textAlignment="Right">
-						<font size="12"/>
-					</textElement>
-				<text><![CDATA[Iva]]></text>
-				</staticText>
-				<staticText>
-					<reportElement
-						x="516"
-						y="0"
-						width="86"
-						height="17"
-						forecolor="#000000"
-						key="staticText"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement textAlignment="Right">
-						<font size="12"/>
-					</textElement>
-				<text><![CDATA[Totale]]></text>
-				</staticText>
-			</band>
-		</columnHeader>
-		<detail>
-			<band height="17"  isSplitAllowed="true" >
-				<line direction="TopDown">
-					<reportElement
-						x="0"
-						y="16"
-						width="782"
-						height="0"
-						forecolor="#808080"
-						backcolor="#FFFFFF"
-						key="line"/>
-					<graphicElement stretchType="NoStretch"/>
-				</line>
-				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						x="0"
-						y="0"
-						width="86"
-						height="17"
-						forecolor="#000000"
-						key="textField"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement>
-						<font size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" isStrikeThrough="false" />
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[$F{ALIQUOTA}]]></textFieldExpression>
-				</textField>
-				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						x="86"
-						y="0"
-						width="86"
-						height="17"
-						forecolor="#000000"
-						key="textField"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement textAlignment="Right">
-						<font size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" isStrikeThrough="false" />
-					</textElement>
-				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$F{IMPONIBILE}]]></textFieldExpression>
-				</textField>
-				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						x="172"
-						y="0"
-						width="86"
-						height="17"
-						forecolor="#000000"
-						key="textField"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement textAlignment="Right">
-						<font size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" isStrikeThrough="false" />
-					</textElement>
-				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$F{NONIMPONIBILE}]]></textFieldExpression>
-				</textField>
-				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						x="258"
-						y="0"
-						width="86"
-						height="17"
-						forecolor="#000000"
-						key="textField"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement textAlignment="Right">
-						<font size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" isStrikeThrough="false" />
-					</textElement>
-				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$F{ESENTE}]]></textFieldExpression>
-				</textField>
-				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						x="344"
-						y="0"
-						width="86"
-						height="17"
-						forecolor="#000000"
-						key="textField"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement textAlignment="Right">
-						<font size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" isStrikeThrough="false" />
-					</textElement>
-				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$F{IVAINDEDUCIBILE}]]></textFieldExpression>
-				</textField>
-				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						x="430"
-						y="0"
-						width="86"
-						height="17"
-						forecolor="#000000"
-						key="textField"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement textAlignment="Right">
-						<font size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" isStrikeThrough="false" />
-					</textElement>
-				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$F{IVA}]]></textFieldExpression>
-				</textField>
-				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						x="516"
-						y="0"
-						width="86"
-						height="17"
-						forecolor="#000000"
-						key="textField"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement textAlignment="Right">
-						<font size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" isStrikeThrough="false" />
-					</textElement>
-				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$F{TOTALE}]]></textFieldExpression>
-				</textField>
-			</band>
-		</detail>
-		<columnFooter>
-			<band height="0"  isSplitAllowed="true" >
-			</band>
-		</columnFooter>
-		<pageFooter>
-			<band height="27"  isSplitAllowed="true" >
-				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						x="573"
-						y="4"
-						width="170"
-						height="19"
-						forecolor="#000000"
-						key="textField"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement textAlignment="Right">
-						<font/>
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA["Page " + $V{PAGE_NUMBER} + " of "]]></textFieldExpression>
-				</textField>
-				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Report" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						mode="Transparent"
-						x="746"
-						y="4"
-						width="36"
-						height="19"
-						forecolor="#000000"
-						backcolor="#FFFFFF"
-						key="textField"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement>
-						<font size="10" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" isStrikeThrough="false" />
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA["" + $V{PAGE_NUMBER}]]></textFieldExpression>
-				</textField>
-				<line direction="TopDown">
-					<reportElement
-						x="0"
-						y="3"
-						width="782"
-						height="0"
-						forecolor="#000000"
-						backcolor="#FFFFFF"
-						key="line"/>
-					<graphicElement stretchType="NoStretch"/>
-				</line>
-				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						x="1"
-						y="6"
-						width="209"
-						height="19"
-						forecolor="#000000"
-						key="textField"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement>
-						<font/>
-					</textElement>
-				<textFieldExpression   class="java.util.Date"><![CDATA[new Date()]]></textFieldExpression>
-				</textField>
-			</band>
-		</pageFooter>
-		<summary>
-			<band height="195"  isSplitAllowed="true" >
-				<crosstab >
-					<reportElement
-						x="0"
-						y="4"
-						width="321"
-						height="55"
-						key="crosstab-1"/>
-					<crosstabHeaderCell>						<cellContents mode="Transparent">
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-						</cellContents>
-					</crosstabHeaderCell>					<rowGroup name="ALIQUOTA" width="126" totalPosition="End">
-						<bucket>
-							<bucketExpression class="java.lang.String"><![CDATA[$F{ALIQUOTA}]]></bucketExpression>
-						</bucket>
-						<crosstabRowHeader>
-						<cellContents mode="Transparent">
-					<box topBorder="None" topBorderColor="#000000" leftBorder="1Point" leftBorderColor="#000000" rightBorder="1Point" rightBorderColor="#000000" bottomBorder="1Point" bottomBorderColor="#000000"/>
-				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						x="0"
-						y="0"
-						width="75"
-						height="30"
-						key="textField"/>
-					<box topBorder="1Point" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement textAlignment="Center" verticalAlignment="Middle">
-						<font pdfFontName="Helvetica-Bold" isBold="true"/>
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[$V{ALIQUOTA}]]></textFieldExpression>
-				</textField>
-				<staticText>
-					<reportElement
-						x="76"
-						y="15"
-						width="50"
-						height="15"
-						key="staticText-2"/>
-					<box topBorder="1Point" topBorderColor="#000000" leftBorder="1Point" leftBorderColor="#000000" rightBorder="1Point" rightBorderColor="#000000" bottomBorder="1Point" bottomBorderColor="#000000"/>
-					<textElement>
-						<font/>
-					</textElement>
-				<text><![CDATA[Iva Inded.]]></text>
-				</staticText>
-				<staticText>
-					<reportElement
-						x="76"
-						y="0"
-						width="50"
-						height="15"
-						key="staticText-2"/>
-					<box topBorder="1Point" topBorderColor="#000000" leftBorder="1Point" leftBorderColor="#000000" rightBorder="1Point" rightBorderColor="#000000" bottomBorder="1Point" bottomBorderColor="#000000"/>
-					<textElement>
-						<font/>
-					</textElement>
-				<text><![CDATA[Iva]]></text>
-				</staticText>
-						</cellContents>
-						</crosstabRowHeader>
-						<crosstabTotalRowHeader>
-						<cellContents mode="Transparent">
-					<box topBorder="None" topBorderColor="#000000" leftBorder="1Point" leftBorderColor="#000000" rightBorder="1Point" rightBorderColor="#000000" bottomBorder="1Point" bottomBorderColor="#000000"/>
-				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						x="0"
-						y="0"
-						width="75"
-						height="30"
-						key="textField"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement textAlignment="Center" verticalAlignment="Middle">
-						<font pdfFontName="Helvetica-Bold" isBold="true"/>
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA["Totale Iva"]]></textFieldExpression>
-				</textField>
-				<staticText>
-					<reportElement
-						x="76"
-						y="0"
-						width="50"
-						height="15"
-						key="staticText-2"/>
-					<box topBorder="1Point" topBorderColor="#000000" leftBorder="1Point" leftBorderColor="#000000" rightBorder="1Point" rightBorderColor="#000000" bottomBorder="1Point" bottomBorderColor="#000000"/>
-					<textElement>
-						<font/>
-					</textElement>
-				<text><![CDATA[Iva]]></text>
-				</staticText>
-				<staticText>
-					<reportElement
-						x="76"
-						y="16"
-						width="50"
-						height="15"
-						key="staticText-2"/>
-					<box topBorder="1Point" topBorderColor="#000000" leftBorder="1Point" leftBorderColor="#000000" rightBorder="1Point" rightBorderColor="#000000" bottomBorder="1Point" bottomBorderColor="#000000"/>
-					<textElement>
-						<font/>
-					</textElement>
-				<text><![CDATA[Iva Inded.]]></text>
-				</staticText>
-						</cellContents>
-						</crosstabTotalRowHeader>
-					</rowGroup>
-					<columnGroup name="ISSALE" height="25" headerPosition="Center">
-						<bucket>
-							<bucketExpression class="java.lang.String"><![CDATA[$F{ISSALE}]]></bucketExpression>
-						</bucket>
-						<crosstabColumnHeader>
-						<cellContents mode="Transparent">
-					<box topBorder="1Point" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="1Point" rightBorderColor="#000000" bottomBorder="1Point" bottomBorderColor="#000000"/>
-				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						x="0"
-						y="0"
-						width="50"
-						height="25"
-						key="textField"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="1Point" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement textAlignment="Center" verticalAlignment="Middle">
-						<font pdfFontName="Helvetica-Bold" isBold="true"/>
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[$V{ISSALE}]]></textFieldExpression>
-				</textField>
-						</cellContents>
-						</crosstabColumnHeader>
-						<crosstabTotalColumnHeader>
-						<cellContents mode="Transparent">
-					<box topBorder="1Point" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="1Point" rightBorderColor="#000000" bottomBorder="1Point" bottomBorderColor="#000000"/>
-						</cellContents>
-						</crosstabTotalColumnHeader>
-					</columnGroup>
-
-					<measure name="IVA_Sum" class="java.math.BigDecimal" calculation="Sum">
-						<measureExpression><![CDATA[$F{IVA}]]></measureExpression>
-					</measure>
-					<measure name="IvaInd_Sum" class="java.math.BigDecimal" calculation="Sum">
-						<measureExpression><![CDATA[$F{IVAINDEDUCIBILE}]]></measureExpression>
-					</measure>
-					<crosstabCell width="50" height="30">
-						<cellContents mode="Transparent">
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="1Point" rightBorderColor="#000000" bottomBorder="1Point" bottomBorderColor="#000000"/>
-				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						x="0"
-						y="0"
-						width="50"
-						height="15"
-						key="textField"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement textAlignment="Right" verticalAlignment="Middle">
-						<font/>
-					</textElement>
-				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$V{IVA_Sum}]]></textFieldExpression>
-				</textField>
-				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						x="0"
-						y="15"
-						width="50"
-						height="15"
-						key="textField"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement textAlignment="Right">
-						<font/>
-					</textElement>
-				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$V{IvaInd_Sum}]]></textFieldExpression>
-				</textField>
-						</cellContents>
-					</crosstabCell>
-					<crosstabCell width="50" height="30" columnTotalGroup="ISSALE">
-						<cellContents mode="Transparent">
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="1Point" rightBorderColor="#000000" bottomBorder="1Point" bottomBorderColor="#000000"/>
-						</cellContents>
-					</crosstabCell>
-					<crosstabCell width="50" height="31" rowTotalGroup="ALIQUOTA">
-						<cellContents mode="Transparent">
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="1Point" rightBorderColor="#000000" bottomBorder="1Point" bottomBorderColor="#000000"/>
-				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						x="0"
-						y="0"
-						width="50"
-						height="15"
-						key="textField"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement textAlignment="Right" verticalAlignment="Middle">
-						<font pdfFontName="Helvetica-Bold" isBold="true"/>
-					</textElement>
-				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$V{IVA_Sum}]]></textFieldExpression>
-				</textField>
-				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						x="0"
-						y="15"
-						width="50"
-						height="15"
-						key="textField-7"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement textAlignment="Right">
-						<font pdfFontName="Helvetica-Bold" isBold="true"/>
-					</textElement>
-				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$V{IvaInd_Sum}]]></textFieldExpression>
-				</textField>
-						</cellContents>
-					</crosstabCell>
-					<crosstabCell width="50" height="31" rowTotalGroup="ALIQUOTA" columnTotalGroup="ISSALE">
-						<cellContents mode="Transparent">
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="1Point" rightBorderColor="#000000" bottomBorder="1Point" bottomBorderColor="#000000"/>
-						</cellContents>
-					</crosstabCell>
-					<whenNoDataCell>						<cellContents mode="Transparent">
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="1Point" rightBorderColor="#000000" bottomBorder="1Point" bottomBorderColor="#000000"/>
-						</cellContents>
-					</whenNoDataCell>					</crosstab>
-				<staticText>
-					<reportElement
-						x="321"
-						y="22"
-						width="122"
-						height="20"
-						key="staticText-3"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement verticalAlignment="Middle">
-						<font pdfFontName="Helvetica-Bold" size="12" isBold="true"/>
-					</textElement>
-				<text><![CDATA[Totale IVA da pagare]]></text>
-				</staticText>
-				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						x="443"
-						y="22"
-						width="100"
-						height="20"
-						key="textField"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement textAlignment="Right" verticalAlignment="Middle">
-						<font/>
-					</textElement>
-				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$V{TotIvaDaPagare}]]></textFieldExpression>
-				</textField>
-				<staticText>
-					<reportElement
-						x="321"
-						y="2"
-						width="122"
-						height="20"
-						key="staticText-4"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement verticalAlignment="Middle">
-						<font pdfFontName="Helvetica-Bold" size="12" isBold="true"/>
-					</textElement>
-				<text><![CDATA[Totale credito prec.]]></text>
-				</staticText>
-				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						x="443"
-						y="2"
-						width="100"
-						height="20"
-						key="textField"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement textAlignment="Right">
-						<font/>
-					</textElement>
-				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[( $V{TotCredPrec}.doubleValue()<0 ? new BigDecimal(0) :  $V{TotCredPrec} )]]></textFieldExpression>
-				</textField>
-			</band>
-		</summary>
-</jasperReport>
--- a/src/org/openbravo/erpCommon/ad_reports/ReportRegisterByVatJR_data.xsql	Tue Jun 24 16:23:57 2008 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
- *************************************************************************
- * The contents of this file are subject to the Openbravo  Public  License
- * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
- * Version 1.1  with a permitted attribution clause; you may not  use this
- * file except in compliance with the License. You  may  obtain  a copy of
- * the License at http://www.openbravo.com/legal/license.html 
- * Software distributed under the License  is  distributed  on  an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- * License for the specific  language  governing  rights  and  limitations
- * under the License. 
- * The Original Code is Openbravo ERP. 
- * The Initial Developer of the Original Code is Openbravo SL 
- * All portions are Copyright (C) 2001-2006 Openbravo SL 
- * All Rights Reserved. 
- * Contributor(s):  ______________________________________.
- ************************************************************************
--->
-
-
-
-<!-- See ReportBankJR_data.xsql for example -->
-
-<SqlClass name="ReportRegisterByVatJRData" package="org.openbravo.erpCommon.ad_reports">
-  <SqlClassComment></SqlClassComment>
-  <SqlMethod name="select" type="preparedStatement" return="multiple">
-    <SqlMethodComment></SqlMethodComment>
-    <Sql>
-    <![CDATA[
- select taxreg.name, 
-	(tax.name||'-'||tax.rate || '%' ) as Aliquota,
- 	coalesce(taxregline.taxbaseamt,0) as Imponibile, 
- 	coalesce(taxregline.novatamt,0) as NonImponibile, 
- 	coalesce(taxregline.exemptamt,0) as Esente , 
- 	coalesce(taxregline.taxundamt,0) as IvaIndeducibile, 
- 	coalesce(taxregline.taxamt,0) as Iva, 
- 	coalesce(taxregline.totalamt,0) as Totale,
- 	coalesce(taxreg.lastregaccumamt,0) as TotalePrecedente,
-	case 
- 	when taxregtyp.issotrx ='Y' then 'Vendita'
- 	else 'Acquisti'
- 	end 
- 	as IsSale
- from c_taxregister taxreg, 
- c_taxregisterline taxregline , 
- c_taxregister_type taxregtyp, 
- c_tax tax
- where
-     taxreg.c_taxregister_id = taxregline.c_taxregister_id
- and taxreg.c_taxregister_type_id = taxregtyp.c_taxregister_type_id 
- and taxregline.c_tax_id = tax.c_tax_id
- and 1=1
- order by  taxreg.name,(tax.name||'-'||tax.rate || '%' )
-     ]]></Sql>
-    <Parameter name="parDateFrom" optional="true" after="and 1=1"><![CDATA[ and taxregline.invoicedate >= to_date(?,'DD/MM/YYYY') ]]></Parameter>
-    <Parameter name="parDateTo" optional="true" after="and 1=1"><![CDATA[ and taxregline.invoicedate <= to_date(?,'DD/MM/YYYY')]]></Parameter>
-  </SqlMethod>
-
-  <SqlMethod name="set" type="constant" return="multiple">
-      <SqlMethodComment></SqlMethodComment>
-      <Sql></Sql>
-  </SqlMethod>
-  
-</SqlClass>
--- a/src/org/openbravo/erpCommon/ad_reports/ReportRegisterFilter.html	Tue Jun 24 16:23:57 2008 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,322 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD Xhtml 1.0 Transitional//EN" "http://www.w3.org/tr/xhtml1/Dtd/xhtml1-transitional.dtd">
-<!--
- *************************************************************************
- * The contents of this file are subject to the Openbravo  Public  License
- * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
- * Version 1.1  with a permitted attribution clause; you may not  use this
- * file except in compliance with the License. You  may  obtain  a copy of
- * the License at http://www.openbravo.com/legal/license.html
- * Software distributed under the License  is  distributed  on  an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- * License for the specific  language  governing  rights  and  limitations
- * under the License.
- * The Original Code is Openbravo ERP.
- * The Initial Developer of the Original Code is Openbravo SL
- * All portions are Copyright (C) 2001-2006 Openbravo SL
- * All Rights Reserved.
- * Contributor(s):  ______________________________________.
- ************************************************************************
--->
-<html xmlns="http://www.w3.org/1999/xhtml">
-  <head>
-    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<TITLE>VAT Registers</TITLE>
-  <link rel="SHORTCUT ICON" href="../../../../../web/images/favicon.ico" type="image/x-icon" />
-    <link rel="stylesheet" type="text/css" href="../../../../../web/skins/Default/Main/Main_Manual.css" id="paramCSS" />
-    <script language="JavaScript" type="text/javascript" id="paramDirection">
-      var baseDirection = "../../../../../web/";
-      </script>
-      <script language="JavaScript" src="../../../../../web/js/messages.js" type="text/javascript">
-      </script>
-      <script language="JavaScript" src="../utility/MessagesJS.js" type="text/javascript"></script>
-      <script language="JavaScript" type="text/javascript" id="paramLanguage">
-        var LNG_POR_DEFECTO = "en_US";
-      </script>
-      <script language="JavaScript" src="../../../../../web/js/utils.js" type="text/javascript"></script>
-      <script language="JavaScript" src="../../../../../web/js/searchs.js" type="text/javascript"></script>
-      <script language="JavaScript" src="../../../../../web/js/ajax.js" type="text/javascript"></script>
-      <script language="JavaScript" src="../../../../../web/js/default/MessageBox.js" type="text/javascript"></script>
-      <script language="JavaScript" src="../../../../../web/js/messages.js" type="text/javascript"></script>
-      <script language="JavaScript" src="../utility/MessagesJS.js" type="text/javascript"></script>
-      <script language="JavaScript" src="../../../../../web/js/jscalendar/calendar.js" type="text/javascript"></script>
-      <script language="JavaScript" src="../../../../../web/js/jscalendar/lang/calendar-es.js" type="text/javascript" id="fieldCalendar"></script>
-      <script language="JavaScript" src="../../../../../web/js/default/DateTextBox.js" type="text/javascript"></script>
-      <script language="JavaScript" src="../../../../../web/js/dojoConfig.js" type="text/javascript"></script>
-      <script language="JavaScript" src="../../../../../web/js/dojo/dojo.js" type="text/javascript"></script>
-      <script language="JavaScript" type="text/javascript" id="keyMap"></script>
-      <script type="text/javascript">
-        dojo.hostenv.writeIncludes(); //makes debugging in Venkman possible
-      </script>
-<SCRIPT language="JavaScript" type="text/javascript">
-function onloadFunctions() {
-}
-
-function depurar() {
-  var frm=document.frmMain;
-  if (frm.inpDateFrom.value==null || frm.inpDateFrom.value=="") {
-      setWindowElementFocus(frm.inpDateFrom);
-      mensaje(7);
-      return false;
-    }
-  if (frm.inpDateTo.value==null || frm.inpDateTo.value=="") {
-      setWindowElementFocus(frm.inpDateTo);
-      mensaje(7);
-      return false;
-    }
-  return true;
-}
-</SCRIPT>
-</HEAD>
-    <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="resizeArea();updateMenuIcon('buttonMenu');focoPrimerControl();" onresize="resizeArea();">
-<FORM method="POST" action="ReportRegisterFilter.html" name="frmMain" id="form">
-  <INPUT type="hidden" name="Command"></INPUT>
-  <INPUT type="hidden" name="inpAuxd" value="" id="functionSumAux1"></INPUT>
-  <table height="100%" border="0" cellpadding="0" cellspacing="0" id="main">
-    <tr>
-      <td valign="top" id="tdleftTabs"></td>
-      <td valign="top">
-        <TABLE width="100%" border="0" cellspacing="0" cellpadding="0" class="Main_ContentPane_Left">
-          <TR><TD class="Main_NavBar_bg_left" id="tdleftSeparator"></TD></TR>
-          <TR><TD class="Main_ToolBar_bg_left" valign="top"></TD></TR>
-          <TR><TD class="Main_Client_bg_left"></TD></TR>
-          <TR><TD class="Main_Bottom_bg_left"></TD></TR>
-        </TABLE>
-      </td>
-      <td valign="top">
-        <div class="Main_ContentPane_NavBar" id="tdtopButtons"></div>
-        <div class="Main_ContentPane_ToolBar" id="paramToolBar"></div>
-        <TABLE width="100%" border="0" cellspacing="0" cellpadding="0" class="Main_ContentPane_TabPane" id="tdtopTabs">
-          <TR id="paramParentTabContainer"></TR>
-          <TR id="paramMainTabContainer"></TR>
-          <TR id="paramChildTabContainer"></TR>
-        </TABLE>
-        <DIV class="Main_ContentPane_Client" style="overflow: auto; display: none;" id="client">
-                <table class="dojoTabContainer" border="0" cellpadding="0" cellspacing="0" width="100%" summary="">
-                  <tr>
-                    <td>
-                      <table class="dojoTabPaneWrapper" border="0" cellpadding="0" cellspacing="0" width="100%" summary="">
-                        <tr>
-                          <td>
-                            <!-- MessageBox -->
-
-                            <table cellpadding="0" cellspacing="0" id="messageBoxID" class="MessageBoxyy">
-                              <TBODY>
-                              <tr class="MessageBox_TopMargin">
-                                <td class="MessageBox_LeftMargin"></td>
-                                <td></td>
-                                <td class="MessageBox_RightMargin"></td>
-                              </tr>
-                              <tr>
-                                <td class="MessageBox_LeftMargin"></td>
-                                <td>
-
-                                  <table cellpadding="0" cellspacing="0" style="width: 100%;">
-                                    <TBODY>
-                                    <tr>
-                                      <td>
-                                        <div class="MessageBox_TopLeft"></div>
-                                        <div class="MessageBox_Left"></div>
-                                      </td>
-                                      <td class="MessageBox_bg">
-
-                                        <table class="MessageBox_Top">
-                                        <TBODY>
-                                          <tr>
-                                            <td>
-                                              <span>
-                                              <table cellpadding="0" cellspacing="0" class="MessageBox_Body_ContentCell">
-                                                <TBODY>
-                                                <tr>
-                                                  <td class="MessageBox_Icon_ContentCell">
-                                                    <div class="MessageBox_Icon"></div>
-                                                  </td>
-                                                  <td style="vertical-align: top;" id="messageBoxIDContent">
-                                                    <span>
-                                                      <div class="MessageBox_TextTitle" id="messageBoxIDTitle">
-                                                        xxInfo: AccessTableWithNoView
-                                                      </div>
-                                                      <div class="MessageBox_TextDescription" id="messageBoxIDMessage">
-                                                        xxThe current information is empty.
-                                                      </div>
-                                                      <div class="MessageBox_TextSeparator"></div>
-                                                    </span>
-                                                  </td>
-                                                </tr>
-                                                </TBODY>
-                                              </table>
-                                              </span>
-                                            </td>
-                                          </tr>
-                                          </TBODY>
-                                        </table>
-
-                                      </td>
-                                      <td class="MessageBox_RightTrans">
-                                        <div class="MessageBox_TopRight"></div>
-                                        <div class="MessageBox_Right"></div>
-                                      </td>
-                                    </tr>
-                                    <tr>
-                                      <td rowspan="2" class="MessageBox_BottomLeft">
-                                      </td>
-                                      <td class="MessageBox_BottomTrans MessageBox_bg">
-                                      </td>
-                                      <td rowspan="2" class="MessageBox_BottomRight">
-                                      </td>
-                                    </tr>
-                                    <tr>
-                                      <td class="MessageBox_Bottom">
-                                      </td>
-                                    </tr>
-                                    </TBODY>
-                                  </table>
-
-                                </td>
-                                <td class="MessageBox_RightMargin"></td>
-                              </tr>
-                              <tr class="MessageBox_BottomMargin">
-                                <td class="MessageBox_LeftMargin"></td>
-                                <td></td>
-                                <td class="MessageBox_RightMargin"></td>
-                              </tr>
-                              </TBODY>
-                            </table>
-                            <!-- USER CONTROLS -->
-              <TABLE class="Main_Client_TableEdition">
-                <tr>
-                  <td class="TableEdition_OneCell_width"></td>
-                  <td class="TableEdition_OneCell_width"></td>
-                  <td class="TableEdition_OneCell_width"></td>
-                  <td class="TableEdition_OneCell_width"></td>
-                  <td class="TableEdition_OneCell_width"></td>
-                  <td class="TableEdition_OneCell_width"></td>
-                </tr>
-                <TR>
-                <td colspan="6">
-                  <table class="FieldGroup" cellspacing="0" cellpadding="0" border="0">
-                  <tbody>
-                    <tr class="FieldGroup_TopMargin"/>
-                    <tr>
-                      <td class="FieldGroupTitle_Left"><img class="FieldGroupTitle_Left_bg" border="0" src="../../../../../web/images/blank.gif"/></td>
-                      <TD class="FieldGroupTitle">Primary Filters</TD>
-                      <td class="FieldGroupTitle_Right"><img class="FieldGroupTitle_Right_bg" border="0" src="../../../../../web/images/blank.gif"/></td>
-                      <td class="FieldGroupContent"/>
-                    </tr>
-                    <tr class="FieldGroup_BottomMargin"/>
-                  </tbody>
-                  </table>
-                </td>
-                </TR>
-                <TR>
-                  <TD class="TitleCell"><SPAN class="LabelText">From Date</SPAN></TD>
-                  <TD class="TextBox_btn_ContentCell">
-                    <TABLE border="0" cellspacing="0" cellpadding="0" summary=""  style="padding-top: 0px;">
-                      <TR>
-                        <TD class="TextBox_ContentCell">
-						  <INPUT type="text" id="paramDateFrom" class="dojoValidateValid readonly TextBox_TwoCells_width" required="false" value="" maxlength="19" name="inpDateFrom" onkeyup="auto_complete_date(this);" onchange="validateDateTextBox(this.id);logChanges(this);return true;" displayformat="DD-MM-YYYY %H:%M:%S" saveformat="DD-MM-YYYY %H:%M:%S" disabled="true"></INPUT>
-                        </TD>
-                      </TR>
-                    </TABLE>
-                 </TD>
-                  <TD class="TitleCell"></TD>
-                  <TD class="TitleCell"> <SPAN class="LabelText">To Date</SPAN></TD>
-                  <TD class="TextBox_btn_ContentCell">
-                    <TABLE border="0" cellspacing="0" cellpadding="0" summary=""  style="padding-top: 0px;">
-                      <TR>
-                        <TD class="TextBox_ContentCell">
-						  <INPUT type="text" id="paramDateTo" class="dojoValidateValid readonly TextBox_TwoCells_width" required="false" value="" maxlength="19" name="inpDateTo" onkeyup="auto_complete_date(this);" onchange="validateDateTextBox(this.id);logChanges(this);return true;" displayformat="DD-MM-YYYY %H:%M:%S" saveformat="DD-MM-YYYY %H:%M:%S" readonly="true"></INPUT>
-                        </TD>
-                      </TR>
-                    </TABLE>
-                  </TD>
-                  <TD class="ContentCell"> </TD>
-
-                </TR>
-                  <TD class="TitleCell"> <SPAN class="LabelText">Type Vat Report</SPAN></TD>
-                  <TD class="Combo_ContentCell" colspan="2"> <SELECT  name="inpTypeVatReport" id="inpTypeVatReport" required="true" class="Combo Combo_TwoCells_width">
-                      <OPTION value=""> <DIV id="reportTypeVatReport"></DIV></OPTION>
-                    </SELECT>
-                  </TD>
-                  <TD class="ContentCell"></TD>
-                  <TD class="TitleCell"></TD>
-                  <TD class="ContentCell"></TD>
-                </TR>
-                  <TR>
-                    <td colspan="6">
-                      <table class="FieldGroup" cellspacing="0" cellpadding="0" border="0">
-                      <tbody>
-                        <tr class="FieldGroup_TopMargin"/>
-                        <tr>
-                          <td class="FieldGroupTitle_Left"><img class="FieldGroupTitle_Left_bg" border="0" src="../../../../../web/images/blank.gif"/></td>
-                          <td class="FieldGroupTitle">View Results</td>
-                          <td class="FieldGroupTitle_Right"><img class="FieldGroupTitle_Right_bg" border="0" src="../../../../../web/images/blank.gif"/></td>
-                          <td class="FieldGroupContent"/>
-                        </tr>
-                        <tr class="FieldGroup_BottomMargin"/>
-                      </tbody>
-                      </table>
-                    </td>
-                  </TR>
-
-                  <tr>
-                    <TD class="TitleCell"></TD>
-                    <TD class="Button_CenterAlign_ContentCell">
-                      <div>
-                        <a class="ButtonLink" href="#" onfocus="this.className='ButtonLink_hover'; window.status='View Results in a New Window'; return true;" onblur="this.className='ButtonLink'; window.status=''; return true;" onkeypress="this.className='ButtonLink_active'; return true;" onkeyup="this.className='ButtonLink_hover'; return true;" onclick="openServletNewWindow('EDIT_HTML', true, 'ReportRegisterFilter.html', 'ReportVatRegisterJR', null, false, '700', '1000', true);return false;">
-                        <table class="Button" onmouseout="this.className='Button';window.status='';return true;" onmouseover="this.className='Button_hover';window.status='HTML_Report';return true;" onmousedown="this.className='Button_active';return true;" onmouseup="this.className='Button';return true;">
-                          <tr>
-                            <td class="Button_left"><img class="Button_Icon Button_Icon_html" alt="View Results in a New Window" title="View Results in a New Window" src="../../../../../web/images/blank.gif" border=0/></td>
-                            <td class="Button_text">HTML Format</td>
-                            <td class="Button_right"></td>
-                          </tr>
-                        </table>
-                        </a>
-                      </div>
-                    </TD>
-                    <TD class="ContentCell"></INPUT>
-                    </TD>
-                    <TD class="TitleCell"></TD>
-                    <TD class="Button_CenterAlign_ContentCell">
-                      <div>
-                        <a class="ButtonLink" href="#" onfocus="this.className='ButtonLink_hover'; window.status='Export Results to PDF Format'; return true;" onblur="this.className='ButtonLink'; window.status=''; return true;" onkeypress="this.className='ButtonLink_active'; return true;" onkeyup="this.className='ButtonLink_hover'; return true;" onclick="openServletNewWindow('EDIT_PDF', true, 'ReportRegisterFilter.html', 'ReportVatRegisterJR', null, false, '700', '1000', true);return false;">
-                        <table class="Button" onmouseout="this.className='Button';window.status='';return true;" onmouseover="this.className='Button_hover';window.status='PDF_Report';return true;" onmousedown="this.className='Button_active';return true;" onmouseup="this.className='Button';return true;">
-                          <tr>
-                            <td class="Button_left"><img class="Button_Icon Button_Icon_pdf" alt="Export Results to PDF Format" title="Export Results to PDF Format" src="../../../../../web/images/blank.gif" border=0/></td>
-                            <td class="Button_text">PDF Format</td>
-                            <td class="Button_right"></td>
-                          </tr>
-                        </table>
-                        </a>
-                      </div>
-                    </TD>
-                    <TD class="ContentCell"></TD>
-                  </TR>
- 		 </TABLE>
-
-                      <!-- USER CONTROLS -->
-                </TD>
-              </TR>
-              </TABLE>
-              </TD>
-            </TR>
-          </TABLE>
-        </div>
-        <TABLE width="100%" border="0" cellspacing="0" cellpadding="0" class="Menu_ContentPane_Bottom" id="tdbottomSeparator">
-          <TR>
-            <TD class="Main_Bottom_bg"><IMG src="../../../../../web/images/blank.gif" border="0"></TD>
-          </TR>
-        </TABLE></td>
-      <td valign="top">
-        <TABLE width="100%" border="0" cellspacing="0" cellpadding="0" class="Main_ContentPane_Right" id="tdrightSeparator">
-          <TR><TD class="Main_NavBar_bg_right"></TD></TR>
-          <TR><TD class="Main_ToolBar_bg_right" valign="top"></TD></TR>
-          <TR><TD class="Main_Client_bg_right"></TD></TR>
-          <TR><TD class="Main_Bottom_bg_right"></TD></TR>
-        </TABLE>
-      </td>
-    </tr>
-  </table>
-</form>
-</body>
-</html>
--- a/src/org/openbravo/erpCommon/ad_reports/ReportRegisterFilter.xml	Tue Jun 24 16:23:57 2008 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-*************************************************************************
-* The contents of this file are subject to the Openbravo  Public  License
-* Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
-* Version 1.1  with a permitted attribution clause; you may not  use this
-* file except in compliance with the License. You  may  obtain  a copy of
-* the License at http://www.openbravo.com/legal/license.html 
-* Software distributed under the License  is  distributed  on  an "AS IS"
-* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
-* License for the specific  language  governing  rights  and  limitations
-* under the License. 
-* The Original Code is Openbravo ERP. 
-* The Initial Developer of the Original Code is Openbravo SL 
-* All portions are Copyright (C) 2001-2006 Openbravo SL 
-* All Rights Reserved. 
-* Contributor(s):  ______________________________________.
-************************************************************************
--->
-<REPORT>
-  <template file="ReportRegisterFilter.html"/>
-  <PARAMETER id="paramToolBar" name="toolbar" default=""/>
-  <PARAMETER id="paramMessage" name="paramMessage" attribute="onload" replace="xx();"/>
-  <PARAMETER id="fieldCalendar" name="calendar" attribute="src" replace="es" default="en"/>
-  <PARAMETER id="paramDirection" name="direction" default=""/>
-  <PARAMETER id="paramLanguage" name="paramLanguage" default=""/>
-  <PARAMETER id="paramDateFrom" name="dateFrom" attribute="value"/>
-	<PARAMETER id="paramDateFrom" name="dateFromdisplayFormat" attribute="displayformat" replace="xx"/>
-	<PARAMETER id="paramDateFrom" name="dateFromsaveFormat" attribute="saveformat" replace="yy"/>
-  <PARAMETER id="paramDateTo" name="dateTo" attribute="value"/>
-	<PARAMETER id="paramDateTo" name="dateTodisplayFormat" attribute="displayformat" replace="xx"/>
-	<PARAMETER id="paramDateTo" name="dateTosaveFormat" attribute="saveformat" replace="yy"/>
-  <!-- 
-  <PARAMETER id="paramC_BANKACCOUNT_ID" name="cBankAccount" default=""/>
-  <SUBREPORT id="reportC_ACCOUNTNUMBER" name="reportC_ACCOUNTNUMBER" report="org/openbravo/erpCommon/reference/List">
-    <ARGUMENT name="parameterListSelected" withId="paramC_BANKACCOUNT_ID"/>
-  </SUBREPORT>
-  -->
- <PARAMETER id="paramTypeVatReport" name="TypeVatReport" default=""/>
-  <SUBREPORT id="reportTypeVatReport" name="reportTypeVatReport" report="org/openbravo/erpCommon/reference/List">
-    <ARGUMENT name="parameterListSelected" withId="paramTypeVatReport"/>
-  </SUBREPORT>
-  <PARAMETER id="paramSumAmount" name="sumAmount"/>
-  <PARAMETER id="param0" name="Param0" default="0"/>
-  <PARAMETER id="paramCSS" name="theme" attribute="href" replace="Default"/>
-  <PARAMETER id="tdleftTabs" name="leftTabs" default=""/>
-  <PARAMETER id="paramParentTabContainer" name="parentTabContainer" default=" "/>
-  <PARAMETER id="paramMainTabContainer" name="mainTabContainer" default=" "/>
-  <PARAMETER id="paramChildTabContainer" name="childTabContainer" default=" "/>
-  <PARAMETER id="tdtopButtons" name="navigationBar" default=""/>
-  <PARAMETER id="keyMap" name="keyMap" default=""/>
-  <PARAMETER id="messageBoxID" name="messageType" attribute="class" replace="yy" default="HIDDEN"/>
-  <PARAMETER id="messageBoxIDTitle" name="messageTitle" default=""/>
-  <PARAMETER id="messageBoxIDMessage" name="messageMessage" default=""/>
-
-</REPORT>
--- a/src/org/openbravo/erpCommon/ad_reports/ReportRegisterLineJR.jrxml	Tue Jun 24 16:23:57 2008 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,498 +0,0 @@
-<?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="ReportRegisterLineJR"
-		 columnCount="1"
-		 printOrder="Vertical"
-		 orientation="Landscape"
-		 pageWidth="992"
-		 pageHeight="595"
-		 columnWidth="932"
-		 columnSpacing="0"
-		 leftMargin="30"
-		 rightMargin="30"
-		 topMargin="20"
-		 bottomMargin="20"
-		 whenNoDataType="NoPages"
-		 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.*" />
-
-	<parameter name="invoicedateDA" isForPrompting="true" class="java.lang.String">
-		<parameterDescription><![CDATA[Invoice Date From :]]></parameterDescription>
-		<defaultValueExpression ><![CDATA[""]]></defaultValueExpression>
-	</parameter>
-	<parameter name="invoicedateA" isForPrompting="true" class="java.lang.String">
-		<parameterDescription><![CDATA[Invoice Date To :]]></parameterDescription>
-		<defaultValueExpression ><![CDATA[""]]></defaultValueExpression>
-	</parameter>
-	<parameter name="StartPageNo" isForPrompting="false" class="java.lang.Integer">
-		<parameterDescription><![CDATA[Start Page No]]></parameterDescription>
-		<defaultValueExpression ><![CDATA[new Integer(0)]]></defaultValueExpression>
-	</parameter>
-	<queryString><![CDATA[select taxreg.name,taxregline.documentno as DocNum,taxregline.created as RegDate , inv.documentno as DocInv, bp.name as RagSoc,
- coalesce(taxregline.totalamt,0) as TotAmt, coalesce(taxregline.taxbaseamt,0) as TaxBaseAmt, coalesce(taxregline.exemptamt,0) as ExemptAmt , coalesce(taxregline.taxundamt,0) as TaxUndAmt,
- coalesce(taxregline.taxamt,0) as TaxAmt , (tax.name||'-'||tax.rate || '%') as aliquota
- from c_taxregister taxreg , c_taxregisterline taxregline , c_invoicetax invtax, c_invoice inv ,c_bpartner bp, c_tax tax
- where taxreg.c_taxregister_id = taxregline.c_taxregister_id 
- and taxregline.c_invoicetax_id = invtax.c_invoicetax_id
- and inv.c_invoice_id = invtax.c_invoice_id
- and inv.c_bpartner_id = bp.c_bpartner_id
- and taxregline.c_tax_id = tax.c_tax_id
- and 1=1
- and ( taxregline.invoicedate >= to_date($P{invoicedateDA},'DD/MM/YYYY')  ) 
- and ( taxregline.invoicedate <= to_date($P{invoicedateA},'DD/MM/YYYY')  )
- order by taxreg.name]]></queryString>
-
-	<field name="NAME" class="java.lang.String"/>
-	<field name="DOCNUM" class="java.math.BigDecimal"/>
-	<field name="REGDATE" class="java.util.Date"/>
-	<field name="DOCINV" class="java.lang.String"/>
-	<field name="RAGSOC" class="java.lang.String"/>
-	<field name="TOTAMT" class="java.math.BigDecimal"/>
-	<field name="TAXBASEAMT" class="java.math.BigDecimal"/>
-	<field name="EXEMPTAMT" class="java.math.BigDecimal"/>
-	<field name="TAXUNDAMT" class="java.math.BigDecimal"/>
-	<field name="TAXAMT" class="java.math.BigDecimal"/>
-	<field name="ALIQUOTA" class="java.lang.String"/>
-
-
-		<group  name="RegName" >
-			<groupExpression><![CDATA[$F{NAME}]]></groupExpression>
-			<groupHeader>
-			<band height="19"  isSplitAllowed="true" >
-			</band>
-			</groupHeader>
-			<groupFooter>
-			<band height="24"  isSplitAllowed="true" >
-			</band>
-			</groupFooter>
-		</group>
-		<background>
-			<band height="0"  isSplitAllowed="true" >
-			</band>
-		</background>
-		<title>
-			<band height="50"  isSplitAllowed="true" >
-				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						x="0"
-						y="3"
-						width="365"
-						height="45"
-						key="textField"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement verticalAlignment="Middle">
-						<font pdfFontName="Helvetica-Bold" size="12" isBold="true"/>
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[$F{NAME}]]></textFieldExpression>
-				</textField>
-				<line direction="TopDown">
-					<reportElement
-						x="0"
-						y="48"
-						width="932"
-						height="0"
-						forecolor="#000000"
-						backcolor="#FFFFFF"
-						key="line"/>
-					<graphicElement stretchType="NoStretch"/>
-				</line>
-				<line direction="TopDown">
-					<reportElement
-						x="0"
-						y="3"
-						width="932"
-						height="0"
-						forecolor="#000000"
-						backcolor="#FFFFFF"
-						key="line"/>
-					<graphicElement stretchType="NoStretch"/>
-				</line>
-				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						x="365"
-						y="0"
-						width="567"
-						height="50"
-						key="textField-1"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement verticalAlignment="Middle">
-						<font isBold="true"/>
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA["Periodo da :    " + $P{invoicedateDA}+"   a    "+$P{invoicedateA}]]></textFieldExpression>
-				</textField>
-			</band>
-		</title>
-		<pageHeader>
-			<band height="0"  isSplitAllowed="true" >
-			</band>
-		</pageHeader>
-		<columnHeader>
-			<band height="23"  isSplitAllowed="true" >
-				<rectangle>
-					<reportElement
-						mode="Opaque"
-						x="0"
-						y="0"
-						width="782"
-						height="23"
-						forecolor="#000000"
-						key="rectangle"/>
-					<graphicElement stretchType="NoStretch" pen="None"/>
-				</rectangle>
-				<staticText>
-					<reportElement
-						mode="Transparent"
-						x="0"
-						y="0"
-						width="86"
-						height="23"
-						forecolor="#000000"
-						key="staticText"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement>
-						<font size="12" isBold="true"/>
-					</textElement>
-				<text><![CDATA[Doc No]]></text>
-				</staticText>
-				<staticText>
-					<reportElement
-						x="86"
-						y="0"
-						width="86"
-						height="23"
-						forecolor="#000000"
-						key="staticText"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement>
-						<font size="12" isBold="true"/>
-					</textElement>
-				<text><![CDATA[Register Date]]></text>
-				</staticText>
-				<staticText>
-					<reportElement
-						x="172"
-						y="0"
-						width="86"
-						height="23"
-						forecolor="#000000"
-						key="staticText"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement>
-						<font size="12" isBold="true"/>
-					</textElement>
-				<text><![CDATA[Invoice Doc No]]></text>
-				</staticText>
-				<staticText>
-					<reportElement
-						x="258"
-						y="0"
-						width="86"
-						height="23"
-						forecolor="#000000"
-						key="staticText"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement>
-						<font pdfFontName="Helvetica-Bold" size="12" isBold="true"/>
-					</textElement>
-				<text><![CDATA[B. Partner]]></text>
-				</staticText>
-				<staticText>
-					<reportElement
-						x="344"
-						y="0"
-						width="86"
-						height="23"
-						forecolor="#000000"
-						key="staticText"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement>
-						<font pdfFontName="Helvetica-Bold" size="12" isBold="true"/>
-					</textElement>
-				<text><![CDATA[Tot. Amount]]></text>
-				</staticText>
-				<staticText>
-					<reportElement
-						x="430"
-						y="0"
-						width="86"
-						height="23"
-						forecolor="#000000"
-						key="staticText"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement>
-						<font size="12" isBold="true"/>
-					</textElement>
-				<text><![CDATA[Base Amount]]></text>
-				</staticText>
-				<staticText>
-					<reportElement
-						x="516"
-						y="0"
-						width="86"
-						height="23"
-						forecolor="#000000"
-						key="staticText"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement>
-						<font size="12" isBold="true"/>
-					</textElement>
-				<text><![CDATA[Exempt Amount]]></text>
-				</staticText>
-				<staticText>
-					<reportElement
-						x="602"
-						y="0"
-						width="86"
-						height="23"
-						forecolor="#000000"
-						key="staticText"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement>
-						<font size="12" isBold="true"/>
-					</textElement>
-				<text><![CDATA[Tax Und. Amount]]></text>
-				</staticText>
-				<staticText>
-					<reportElement
-						x="688"
-						y="0"
-						width="86"
-						height="23"
-						forecolor="#000000"
-						key="staticText"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement>
-						<font size="12" isBold="true"/>
-					</textElement>
-				<text><![CDATA[Tax Amount]]></text>
-				</staticText>
-				<staticText>
-					<reportElement
-						x="774"
-						y="0"
-						width="158"
-						height="23"
-						forecolor="#000000"
-						key="staticText-1"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement textAlignment="Center">
-						<font size="12" isBold="true"/>
-					</textElement>
-				<text><![CDATA[Tax Name]]></text>
-				</staticText>
-			</band>
-		</columnHeader>
-		<detail>
-			<band height="17"  isSplitAllowed="true" >
-				<line direction="TopDown">
-					<reportElement
-						x="0"
-						y="16"
-						width="932"
-						height="0"
-						forecolor="#808080"
-						backcolor="#FFFFFF"
-						key="line"/>
-					<graphicElement stretchType="NoStretch"/>
-				</line>
-				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						x="0"
-						y="0"
-						width="86"
-						height="17"
-						forecolor="#000000"
-						key="textField"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement>
-						<font size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" isStrikeThrough="false" />
-					</textElement>
-				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$F{DOCNUM}]]></textFieldExpression>
-				</textField>
-				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						x="86"
-						y="0"
-						width="86"
-						height="17"
-						forecolor="#000000"
-						key="textField"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement>
-						<font size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" isStrikeThrough="false" />
-					</textElement>
-				<textFieldExpression   class="java.util.Date"><![CDATA[$F{REGDATE}]]></textFieldExpression>
-				</textField>
-				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						x="172"
-						y="0"
-						width="86"
-						height="17"
-						forecolor="#000000"
-						key="textField"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement>
-						<font size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" isStrikeThrough="false" />
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[$F{DOCINV}]]></textFieldExpression>
-				</textField>
-				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						x="258"
-						y="0"
-						width="86"
-						height="17"
-						forecolor="#000000"
-						key="textField"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement>
-						<font size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" isStrikeThrough="false" />
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[$F{RAGSOC}]]></textFieldExpression>
-				</textField>
-				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						x="344"
-						y="0"
-						width="86"
-						height="17"
-						forecolor="#000000"
-						key="textField"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement textAlignment="Left">
-						<font size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" isStrikeThrough="false" />
-					</textElement>
-				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$F{TOTAMT}]]></textFieldExpression>
-				</textField>
-				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						x="430"
-						y="0"
-						width="86"
-						height="17"
-						forecolor="#000000"
-						key="textField"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement textAlignment="Left">
-						<font size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" isStrikeThrough="false" />
-					</textElement>
-				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$F{TAXBASEAMT}]]></textFieldExpression>
-				</textField>
-				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						x="516"
-						y="0"
-						width="86"
-						height="17"
-						forecolor="#000000"
-						key="textField"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement textAlignment="Left">
-						<font size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" isStrikeThrough="false" />
-					</textElement>
-				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$F{EXEMPTAMT}]]></textFieldExpression>
-				</textField>
-				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						x="602"
-						y="0"
-						width="86"
-						height="17"
-						forecolor="#000000"
-						key="textField"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement textAlignment="Left">
-						<font size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" isStrikeThrough="false" />
-					</textElement>
-				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$F{TAXUNDAMT}]]></textFieldExpression>
-				</textField>
-				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						x="688"
-						y="0"
-						width="86"
-						height="17"
-						forecolor="#000000"
-						key="textField"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement textAlignment="Left">
-						<font size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" isStrikeThrough="false" />
-					</textElement>
-				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$F{TAXAMT}]]></textFieldExpression>
-				</textField>
-				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						x="774"
-						y="0"
-						width="158"
-						height="17"
-						forecolor="#000000"
-						key="textField-2"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement textAlignment="Center">
-						<font size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" isStrikeThrough="false" />
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[$F{ALIQUOTA}]]></textFieldExpression>
-				</textField>
-			</band>
-		</detail>
-		<columnFooter>
-			<band height="0"  isSplitAllowed="true" >
-			</band>
-		</columnFooter>
-		<pageFooter>
-			<band height="27"  isSplitAllowed="true" >
-				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						x="719"
-						y="4"
-						width="170"
-						height="19"
-						forecolor="#000000"
-						key="textField"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement textAlignment="Right">
-						<font/>
-					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA["Page   " +(new Integer($V{PAGE_NUMBER}.intValue()+ $P{StartPageNo}.intValue()))]]></textFieldExpression>
-				</textField>
-				<line direction="TopDown">
-					<reportElement
-						x="0"
-						y="3"
-						width="932"
-						height="0"
-						forecolor="#000000"
-						backcolor="#FFFFFF"
-						key="line"/>
-					<graphicElement stretchType="NoStretch"/>
-				</line>
-				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
-					<reportElement
-						x="1"
-						y="6"
-						width="209"
-						height="19"
-						forecolor="#000000"
-						key="textField"/>
-					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
-					<textElement>
-						<font/>
-					</textElement>
-				<textFieldExpression   class="java.util.Date"><![CDATA[new Date()]]></textFieldExpression>
-				</textField>
-			</band>
-		</pageFooter>
-		<summary>
-			<band height="0"  isSplitAllowed="true" >
-			</band>
-		</summary>
-</jasperReport>
--- a/src/org/openbravo/erpCommon/ad_reports/ReportRegisterLineJR_data.xsql	Tue Jun 24 16:23:57 2008 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
- *************************************************************************
- * The contents of this file are subject to the Openbravo  Public  License
- * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
- * Version 1.1  with a permitted attribution clause; you may not  use this
- * file except in compliance with the License. You  may  obtain  a copy of
- * the License at http://www.openbravo.com/legal/license.html 
- * Software distributed under the License  is  distributed  on  an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- * License for the specific  language  governing  rights  and  limitations
- * under the License. 
- * The Original Code is Openbravo ERP. 
- * The Initial Developer of the Original Code is Openbravo SL 
- * All portions are Copyright (C) 2001-2006 Openbravo SL 
- * All Rights Reserved. 
- * Contributor(s):  ______________________________________.
- ************************************************************************
--->
-
-
-
-<!-- See ReportBankJR_data.xsql for example -->
-
-<SqlClass name="ReportRegisterLineJRData" package="org.openbravo.erpCommon.ad_reports">
-  <SqlClassComment></SqlClassComment>
-  <SqlMethod name="select" type="preparedStatement" return="multiple">
-    <SqlMethodComment></SqlMethodComment>
-    <Sql>
-    <![CDATA[
- select taxreg.name,taxregline.documentno as DocNum,taxregline.created as RegDate , 
- inv.documentno as DocInv, bp.name as RagSoc,
- coalesce(taxregline.totalamt,0) as TotAmt, coalesce(taxregline.taxbaseamt,0) as TaxBaseAmt, coalesce(taxregline.exemptamt,0) as ExemptAmt , 
- coalesce(taxregline.taxundamt,0) as TaxUndAmt, coalesce(taxregline.taxamt,0) as TaxAmt , (tax.name||'-'||tax.rate || '%') as aliquota
- from c_taxregister taxreg , c_taxregisterline taxregline , c_invoicetax invtax, c_invoice inv ,c_bpartner bp, c_tax tax
- where taxreg.c_taxregister_id = taxregline.c_taxregister_id 
- and taxregline.c_invoicetax_id = invtax.c_invoicetax_id
- and inv.c_invoice_id = invtax.c_invoice_id
- and inv.c_bpartner_id = bp.c_bpartner_id
- and taxregline.c_tax_id = tax.c_tax_id
- and 1=1
- order by taxreg.name
-     ]]></Sql>
-    <Parameter name="parDateFrom" optional="true" after="and 1=1"><![CDATA[ and taxregline.invoicedate >= to_date(?,'DD/MM/YYYY') ]]></Parameter>
-    <Parameter name="parDateTo" optional="true" after="and 1=1"><![CDATA[ and taxregline.invoicedate <= to_date(?,'DD/MM/YYYY')]]></Parameter> 
-    <Parameter name="parTaxPaymId" optional="true" after="and 1=1"><![CDATA[ and taxreg.c_taxpayment_id in ( ? )  ]]></Parameter>
-    <Parameter name="parTaxRegisId" optional="true" after="and 1=1"><![CDATA[ and taxreg.c_taxregister_id in ( ? )  ]]></Parameter>
-  </SqlMethod>
-
-  <SqlMethod name="set" type="constant" return="multiple">
-      <SqlMethodComment></SqlMethodComment>
-      <Sql></Sql>
-  </SqlMethod>
-  
-</SqlClass>
--- a/src/org/openbravo/erpCommon/ad_reports/ReportTaxPaymentJR.java	Tue Jun 24 16:23:57 2008 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,208 +0,0 @@
-/*
- *************************************************************************
- * The contents of this file are subject to the Openbravo  Public  License
- * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
- * Version 1.1  with a permitted attribution clause; you may not  use this
- * file except in compliance with the License. You  may  obtain  a copy of
- * the License at http://www.openbravo.com/legal/license.html 
- * Software distributed under the License  is  distributed  on  an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- * License for the specific  language  governing  rights  and  limitations
- * under the License. 
- * The Original Code is Openbravo ERP. 
- * The Initial Developer of the Original Code is Openbravo SL 
- * All portions are Copyright (C) 2001-2006 Openbravo SL 
- * All Rights Reserved. 
- * Contributor(s):  ______________________________________.
- ************************************************************************
- */
-package org.openbravo.erpCommon.ad_reports;
-
-import org.apache.log4j.Logger;
-import org.openbravo.data.FieldProvider;
-import org.openbravo.erpCommon.utility.*;
-import org.openbravo.erpCommon.businessUtility.WindowTabs;
-import org.openbravo.base.secureApp.HttpSecureAppServlet;
-import org.openbravo.base.secureApp.VariablesSecureApp;
-import org.openbravo.xmlEngine.XmlDocument;
-import java.io.*;
-
-import javax.servlet.*;
-import javax.servlet.http.*;
-
-import java.util.HashMap;
-import org.openbravo.erpCommon.ad_actionButton.TaxPayment;
-import org.openbravo.erpCommon.ad_combos.AccountNumberComboData;
-import org.openbravo.erpCommon.utility.DateTimeData;
-
-public class ReportTaxPaymentJR extends HttpSecureAppServlet {
-	private static final long serialVersionUID = 1L;
-
-	public void doPost(HttpServletRequest request, HttpServletResponse response)
-			throws IOException, ServletException {
-		VariablesSecureApp vars = new VariablesSecureApp(request);
-		
-		if (vars.commandIn("DEFAULT")) {
-			String strTaxPayId = vars.getSessionValue("JR_ReportTaxPayment.inpcTaxpaymentId");
-			String strTaxPayId_Clear=strTaxPayId.replace("(", "").replace(")", "").replace("'", "");
-			TaxPayment[] taxpaym = TaxPayment.select(this, strTaxPayId_Clear );
-			String strDateFrom = taxpaym[0].datefrom;
-			String strDateTo = taxpaym[0].dateto;
-			printPageDataSheet(response, vars, strDateFrom, strDateTo);
-		} else if (vars.commandIn("EDIT_HTML","EDIT_PDF")) {
-			//String strTaxPayId = vars.getRequestGlobalVariable("inpcTaxpaymentId","ReportVatRegisterJR|C_TaxpaymentId");
-			String strTaxPayId = vars.getSessionValue("JR_ReportTaxPayment.inpcTaxpaymentId");
-			String strTaxPayId_Clear=strTaxPayId.replace("(", "").replace(")", "").replace("'", "");
-			TaxPayment[] taxpaym = TaxPayment.select(this, strTaxPayId_Clear );
-			String strDateFrom = taxpaym[0].datefrom;
-			String strDateTo = taxpaym[0].dateto;
-			String strcTypeVatReport = vars.getRequestGlobalVariable("inpTypeVatReport", "JR_ReportTaxPayment|TypeVatReport");
-
-			if (strcTypeVatReport.equals("01")) {
-				// ReportTransactions
-				printReportJRRegisterByVat(response, vars, strDateFrom,strDateTo, strcTypeVatReport);
-			} else {
-				// Standard Report
-				bdError(response, "TypeReportCantBeNull", vars.getLanguage());
-				 return; 
-			}
-			
-		} else
-			pageError(response);
-	}
-
-	void printPageDataSheet(HttpServletResponse response,
-			VariablesSecureApp vars, String strDateFrom, String strDateTo)
-			throws IOException, ServletException {
-		if (log4j.isDebugEnabled())
-			log4j.debug("Output: dataSheet");
-		response.setContentType("text/html; charset=UTF-8");
-		PrintWriter out = response.getWriter();
-		//String strMessage = "";
-
-		XmlDocument xmlDocument = null;
-		xmlDocument = xmlEngine.readXmlTemplate(
-				"org/openbravo/erpCommon/ad_reports/ReportPaymentFilter")
-				.createXmlDocument();
-
-		ToolBar toolbar = new ToolBar(this, vars.getLanguage(),
-				"ReportRegisterFilter", false, "", "", "", false, "ad_reports",
-				strReplaceWith, false, true);
-		toolbar.prepareSimpleToolBarTemplate();
-		xmlDocument.setParameter("toolbar", toolbar.toString());
-
-		try {
-			KeyMap key = new KeyMap(this, vars, "ReportRegisterPayment.html");
-			xmlDocument.setParameter("keyMap", key.getReportKeyMaps());
-		} catch (Exception ex) {
-			throw new ServletException(ex);
-		}
-		try {
-			WindowTabs tabs = new WindowTabs(this, vars,"org.openbravo.erpCommon.ad_reports.TaxPayment");//ReportVatRegisterJR
-			xmlDocument.setParameter("parentTabContainer", tabs.parentTabs());
-			xmlDocument.setParameter("mainTabContainer", tabs.mainTabs());
-			xmlDocument.setParameter("childTabContainer", tabs.childTabs());
-			xmlDocument.setParameter("theme", vars.getTheme());
-			NavigationBar nav = new NavigationBar(this, vars.getLanguage(),
-					"ReportPaymentFilter.html", classInfo.id, classInfo.type,
-					strReplaceWith, tabs.breadcrumb());
-			xmlDocument.setParameter("navigationBar", nav.toString());
-			LeftTabsBar lBar = new LeftTabsBar(this, vars.getLanguage(),
-					"ReportPaymentFilter.html", strReplaceWith);
-			xmlDocument.setParameter("leftTabs", lBar.manualTemplate());
-		} catch (Exception ex) {
-			throw new ServletException(ex);
-		}
-		{
-			OBError myMessage = vars.getMessage("ReportPaymentFilter");
-			vars.removeMessage("ReportPaymentFilter");
-			if (myMessage != null) {
-				xmlDocument.setParameter("messageType", myMessage.getType());
-				xmlDocument.setParameter("messageTitle", myMessage.getTitle());
-				xmlDocument.setParameter("messageMessage", myMessage
-						.getMessage());
-			}
-		}
-		xmlDocument
-				.setParameter("calendar", vars.getLanguage().substring(0, 2));
-		xmlDocument.setParameter("direction", "var baseDirection = \""
-				+ strReplaceWith + "/\";\n");
-		xmlDocument.setParameter("paramLanguage", "LNG_POR_DEFECTO=\""
-				+ vars.getLanguage() + "\";");
-
-
-		xmlDocument.setParameter("dateFrom", strDateFrom);
-		xmlDocument.setParameter("dateFromdisplayFormat", vars
-				.getSessionValue("#AD_SqlDateFormat"));
-		xmlDocument.setParameter("dateFromsaveFormat", vars
-				.getSessionValue("#AD_SqlDateFormat"));
-		xmlDocument.setParameter("dateTo", strDateTo);
-		xmlDocument.setParameter("dateTodisplayFormat", vars
-				.getSessionValue("#AD_SqlDateFormat"));
-		xmlDocument.setParameter("dateTosaveFormat", vars
-				.getSessionValue("#AD_SqlDateFormat"));
-		//xmlDocument.setParameter("paramMessage", (strMessage.equals("") ? ""
-		//		: "alert('" + strMessage + "');"));
-
-		TypeReportPayment[] aTypeVatReport = TypeReportPayment.set();
-		xmlDocument.setData("reportTypeVatReport", "liststructure",
-				aTypeVatReport);
-		xmlDocument.setParameter("TypeVatReport", "01");
-		out.println(xmlDocument.print());
-		out.close();
-	}
-
-	void printReportJRRegisterByVat(HttpServletResponse response,
-			VariablesSecureApp vars, String strDateFrom, String strDateTo,
-			String strTypeReport) throws IOException, ServletException {
-	    if (log4j.isDebugEnabled()) log4j.debug("Output: print html");
-	    
-	    ReportRegisterByVatJRData[] data = null;
-		data = ReportRegisterByVatJRData.select(this, strDateFrom,
-				DateTimeData.nDaysAfter(this, strDateTo, "1"));
-	  
-	    String strOutput = vars.commandIn("EDIT_HTML")?"html":"pdf";
-	    String strReportName = "@basedesign@/org/openbravo/erpCommon/ad_reports/ReportRegisterByVatJR.jrxml";
-	    
-	    HashMap<String, Object> parameters = new HashMap<String, Object>();
-	    parameters.put("REPORT_TITLE", classInfo.name);
-	    parameters.put("REPORT_SUBTITLE", "From " + strDateFrom + " to "+ strDateTo);
-		parameters.put("invoicedateDA", strDateFrom);
-		parameters.put("invoicedateA", strDateTo);
-	    renderJR(vars, response, strReportName, strOutput, parameters, data, null );
-	}
-
-	public String getServletInfo() {
-		return "Servlet ReportVatRegisterJR.";
-	} // end of getServletInfo() method
-
-}
-
-class TypeReportPayment implements FieldProvider {
-	static Logger log4j = Logger.getLogger(AccountNumberComboData.class);
-	//private String InitRecordNumber = "0";
-	public String id;
-	public String name;
-
-	public String getField(String fieldName) {
-		if (fieldName.equalsIgnoreCase("ID"))
-			return id;
-		else if (fieldName.equalsIgnoreCase("NAME"))
-			return name;
-		else {
-			log4j.debug("Field does not exist: " + fieldName);
-			return null;
-		}
-	}
-
-	public static TypeReportPayment[] set() throws ServletException {
-		TypeReportPayment objectTypeReport[] = new TypeReportPayment[1];
-		// first
-		objectTypeReport[0] = new TypeReportPayment();
-		objectTypeReport[0].id = "01";
-		objectTypeReport[0].name = "Report Tax Payment By VAT";
-
-		return objectTypeReport;
-	}
-
-}
\ No newline at end of file
--- a/src/org/openbravo/erpCommon/ad_reports/ReportVatRegisterJR.java	Tue Jun 24 16:23:57 2008 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,243 +0,0 @@
-/*
- *************************************************************************
- * The contents of this file are subject to the Openbravo  Public  License
- * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
- * Version 1.1  with a permitted attribution clause; you may not  use this
- * file except in compliance with the License. You  may  obtain  a copy of
- * the License at http://www.openbravo.com/legal/license.html 
- * Software distributed under the License  is  distributed  on  an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- * License for the specific  language  governing  rights  and  limitations
- * under the License. 
- * The Original Code is Openbravo ERP. 
- * The Initial Developer of the Original Code is Openbravo SL 
- * All portions are Copyright (C) 2001-2006 Openbravo SL 
- * All Rights Reserved. 
- * Contributor(s):  ______________________________________.
- ************************************************************************
- */
-package org.openbravo.erpCommon.ad_reports;
-
-import net.sf.jasperreports.engine.JasperPrint;
-
-import org.apache.log4j.Logger;
-import org.openbravo.data.FieldProvider;
-import org.openbravo.erpCommon.utility.*;
-import org.openbravo.erpCommon.businessUtility.WindowTabs;
-import org.openbravo.base.secureApp.HttpSecureAppServlet;
-import org.openbravo.base.secureApp.VariablesSecureApp;
-import org.openbravo.xmlEngine.XmlDocument;
-import java.io.*;
-
-import javax.servlet.*;
-import javax.servlet.http.*;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-
-import org.openbravo.erpCommon.ad_actionButton.TaxPayment;
-import org.openbravo.erpCommon.ad_actionButton.TaxRegister;
-import org.openbravo.erpCommon.ad_combos.AccountNumberComboData;
-
-public class ReportVatRegisterJR extends HttpSecureAppServlet {
-	private static final long serialVersionUID = 1L;
-
-	public void doPost(HttpServletRequest request, HttpServletResponse response)
-			throws IOException, ServletException {
-		VariablesSecureApp vars = new VariablesSecureApp(request);
-		
-		if (vars.commandIn("DEFAULT")) {
-			String strTaxRegId = vars.getSessionValue("JR_ReportVATRegister.inpcTaxregisterId");
-			String strTaxRegId_Clear=strTaxRegId.replace("(", "").replace(")", "").replace("'", "");
-			TaxRegister[] taxreg = TaxRegister.select(this, strTaxRegId_Clear);
-			String strTaxPayId=taxreg[0].cTaxpaymentId;
-			
-			TaxPayment[] taxpaym = TaxPayment.select(this, strTaxPayId );
-			String strDateFrom = taxpaym[0].datefrom;
-			String strDateTo = taxpaym[0].dateto;
-			printPageDataSheet(response, vars, strDateFrom, strDateTo);
-		} else if (vars.commandIn("EDIT_HTML","EDIT_PDF")) {
-			String strTaxRegId = vars.getSessionValue("JR_ReportVATRegister.inpcTaxregisterId");
-			String strTaxRegId_Clear=strTaxRegId.replace("(", "").replace(")", "").replace("'", "");
-			TaxRegister[] taxreg = TaxRegister.select(this, strTaxRegId_Clear);
-			String strTaxPayId=taxreg[0].cTaxpaymentId;
-			
-			TaxPayment[] taxpaym = TaxPayment.select(this, strTaxPayId );
-			String strDateFrom = taxpaym[0].datefrom;
-			String strDateTo = taxpaym[0].dateto;
-
-			String strcTypeVatReport = vars.getRequestGlobalVariable("inpTypeVatReport", "ReportVatRegisterJR|TypeVatReport");
-
-			if (strcTypeVatReport.equals("01")) {
-				// ReportTransactions
-				printReportJRRegisterLine(response, vars,strDateFrom,strDateTo,strTaxPayId, strTaxRegId_Clear, strcTypeVatReport);
-			} else {
-				// Standard Report
-				bdError(response, "TypeReportCantBeNull", vars.getLanguage());
-				 return; 
-			}
-
-		} else
-			pageError(response);
-	}
-
-	void printPageDataSheet(HttpServletResponse response,
-			VariablesSecureApp vars, String strDateFrom, String strDateTo)
-			throws IOException, ServletException {
-		if (log4j.isDebugEnabled())
-			log4j.debug("Output: dataSheet");
-		response.setContentType("text/html; charset=UTF-8");
-		PrintWriter out = response.getWriter();
-		//String strMessage = "";
-
-		XmlDocument xmlDocument = null;
-		xmlDocument = xmlEngine.readXmlTemplate(
-				"org/openbravo/erpCommon/ad_reports/ReportRegisterFilter")
-				.createXmlDocument();
-
-		ToolBar toolbar = new ToolBar(this, vars.getLanguage(),
-				"ReportRegisterFilter", false, "", "", "", false, "ad_reports",
-				strReplaceWith, false, true);
-		toolbar.prepareSimpleToolBarTemplate();
-		xmlDocument.setParameter("toolbar", toolbar.toString());
-
-		try {
-			KeyMap key = new KeyMap(this, vars, "ReportRegisterFilter.html");
-			xmlDocument.setParameter("keyMap", key.getReportKeyMaps());
-		} catch (Exception ex) {
-			throw new ServletException(ex);
-		}
-		try {
-			WindowTabs tabs = new WindowTabs(this, vars,"org.openbravo.erpCommon.ad_reports.TaxPayment");//ReportVatRegisterJR
-			xmlDocument.setParameter("parentTabContainer", tabs.parentTabs());
-			xmlDocument.setParameter("mainTabContainer", tabs.mainTabs());
-			xmlDocument.setParameter("childTabContainer", tabs.childTabs());
-			xmlDocument.setParameter("theme", vars.getTheme());
-			NavigationBar nav = new NavigationBar(this, vars.getLanguage(),
-					"ReportRegisterFilter.html", classInfo.id, classInfo.type,
-					strReplaceWith, tabs.breadcrumb());
-			xmlDocument.setParameter("navigationBar", nav.toString());
-			LeftTabsBar lBar = new LeftTabsBar(this, vars.getLanguage(),
-					"ReportRegisterFilter.html", strReplaceWith);
-			xmlDocument.setParameter("leftTabs", lBar.manualTemplate());
-		} catch (Exception ex) {
-			throw new ServletException(ex);
-		}
-		{
-			OBError myMessage = vars.getMessage("ReportRegisterFilter");
-			vars.removeMessage("ReportRegisterFilter");
-			if (myMessage != null) {
-				xmlDocument.setParameter("messageType", myMessage.getType());
-				xmlDocument.setParameter("messageTitle", myMessage.getTitle());
-				xmlDocument.setParameter("messageMessage", myMessage
-						.getMessage());
-			}
-		}
-		xmlDocument
-				.setParameter("calendar", vars.getLanguage().substring(0, 2));
-		xmlDocument.setParameter("direction", "var baseDirection = \""
-				+ strReplaceWith + "/\";\n");
-		xmlDocument.setParameter("paramLanguage", "LNG_POR_DEFECTO=\""
-				+ vars.getLanguage() + "\";");
-
-
-		xmlDocument.setParameter("dateFrom", strDateFrom);
-		xmlDocument.setParameter("dateFromdisplayFormat", vars
-				.getSessionValue("#AD_SqlDateFormat"));
-		xmlDocument.setParameter("dateFromsaveFormat", vars
-				.getSessionValue("#AD_SqlDateFormat"));
-		xmlDocument.setParameter("dateTo", strDateTo);
-		xmlDocument.setParameter("dateTodisplayFormat", vars
-				.getSessionValue("#AD_SqlDateFormat"));
-		xmlDocument.setParameter("dateTosaveFormat", vars
-				.getSessionValue("#AD_SqlDateFormat"));
-		//xmlDocument.setParameter("paramMessage", (strMessage.equals("") ? ""
-		//		: "alert('" + strMessage + "');"));
-
-		TypeReportRegister[] aTypeVatReport = TypeReportRegister.set();
-		xmlDocument.setData("reportTypeVatReport", "liststructure",
-				aTypeVatReport);
-		xmlDocument.setParameter("TypeVatReport", "01");
-		out.println(xmlDocument.print());
-		out.close();
-	}
-
-	void printReportJRRegisterLine(HttpServletResponse response,
-			VariablesSecureApp vars, String strDateFrom, String strDateTo,String TaxPayId, String TaxRegId,
-			String strTypeReport) throws IOException, ServletException {
-	    if (log4j.isDebugEnabled()) log4j.debug("Output: print html");
-	    
-	    ReportRegisterLineJRData[] data = null;
-		data = ReportRegisterLineJRData.select(this, null , null, TaxPayId,TaxRegId);
-	  
-	    String strOutput = vars.commandIn("EDIT_HTML")?"html":"pdf";
-	    String strReportName = "@basedesign@/org/openbravo/erpCommon/ad_reports/ReportRegisterLineJR.jrxml";
-	    String StartPageNo=TaxRegister.selectPageNoPrior(this, TaxRegId);
-	    Integer IntStartPageNo=new Integer( StartPageNo);
-	    HashMap<String, Object> parameters = new HashMap<String, Object>();
-	    parameters.put("REPORT_TITLE", classInfo.name);
-	    parameters.put("REPORT_SUBTITLE", "From " + strDateFrom + " to "+ strDateTo);
-		parameters.put("invoicedateDA", strDateFrom);
-		parameters.put("invoicedateA", strDateTo);
-		parameters.put("StartPageNo", IntStartPageNo.intValue() );
-		
-		HashMap<Object, Object> outparameters = new HashMap<Object, Object>();
-	    renderJR(vars, response, strReportName, strOutput, parameters, data, outparameters );
-	    //Read pageno
-	    Collection<Object> coll = outparameters.values();
-	    Object object;
-	    JasperPrint jr1= new JasperPrint();
-	    String scl="";
-	    for (Iterator<Object> iterator = coll.iterator(); iterator.hasNext();) {
-			object = (Object) iterator.next();
-			scl=object.getClass().toString();
-			if (scl.contains("JasperPrint") ) {
-				jr1 = (JasperPrint)object;
-			}
-		};
-		
-		Integer pag1 = new Integer( jr1.getPages().size()+ IntStartPageNo.intValue());
-		TaxRegister[] taxregister= TaxRegister.select(this, TaxRegId);
-		if ( (taxregister[0].pageno.equals(new String("0"))) || (taxregister[0].pageno==null)){
-		TaxRegister.updatePageNo(this, pag1.toString(), TaxRegId);
-		}
-		//JasperPrint object1 = new JasperPrint();
-	    //JasperPrint x = (JasperPrint) outparameters.get(object1);
-	    //int pag = x.getPages().size();
-	}
-
-	public String getServletInfo() {
-		return "Servlet ReportVatRegisterJR.";
-	} // end of getServletInfo() method
-
-}
-
-class TypeReportRegister implements FieldProvider {
-	static Logger log4j = Logger.getLogger(AccountNumberComboData.class);
-	//private String InitRecordNumber = "0";
-	public String id;
-	public String name;
-
-	public String getField(String fieldName) {
-		if (fieldName.equalsIgnoreCase("ID"))
-			return id;
-		else if (fieldName.equalsIgnoreCase("NAME"))
-			return name;
-		else {
-			log4j.debug("Field does not exist: " + fieldName);
-			return null;
-		}
-	}
-
-	public static TypeReportRegister[] set() throws ServletException {
-		TypeReportRegister objectTypeReport[] = new TypeReportRegister[1];
-		// first
-		objectTypeReport[0] = new TypeReportRegister();
-		objectTypeReport[0].id = "01";
-		objectTypeReport[0].name = "Report Tax Register";
-
-		return objectTypeReport;
-	}
-
-}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/erpReports/ReportPaymentFilter.html	Tue Jun 24 17:33:07 2008 +0000
@@ -0,0 +1,322 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD Xhtml 1.0 Transitional//EN" "http://www.w3.org/tr/xhtml1/Dtd/xhtml1-transitional.dtd">
+<!--
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SL
+ * All portions are Copyright (C) 2001-2006 Openbravo SL
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<TITLE>Tax Payment</TITLE>
+  <link rel="SHORTCUT ICON" href="../../../../../web/images/favicon.ico" type="image/x-icon" />
+    <link rel="stylesheet" type="text/css" href="../../../../../web/skins/Default/Main/Main_Manual.css" id="paramCSS" />
+    <script language="JavaScript" type="text/javascript" id="paramDirection">
+      var baseDirection = "../../../../../web/";
+      </script>
+      <script language="JavaScript" src="../../../../../web/js/messages.js" type="text/javascript">
+      </script>
+      <script language="JavaScript" src="../utility/MessagesJS.js" type="text/javascript"></script>
+      <script language="JavaScript" type="text/javascript" id="paramLanguage">
+        var LNG_POR_DEFECTO = "en_US";
+      </script>
+      <script language="JavaScript" src="../../../../../web/js/utils.js" type="text/javascript"></script>
+      <script language="JavaScript" src="../../../../../web/js/searchs.js" type="text/javascript"></script>
+      <script language="JavaScript" src="../../../../../web/js/ajax.js" type="text/javascript"></script>
+      <script language="JavaScript" src="../../../../../web/js/default/MessageBox.js" type="text/javascript"></script>
+      <script language="JavaScript" src="../../../../../web/js/messages.js" type="text/javascript"></script>
+      <script language="JavaScript" src="../utility/MessagesJS.js" type="text/javascript"></script>
+      <script language="JavaScript" src="../../../../../web/js/jscalendar/calendar.js" type="text/javascript"></script>
+      <script language="JavaScript" src="../../../../../web/js/jscalendar/lang/calendar-es.js" type="text/javascript" id="fieldCalendar"></script>
+      <script language="JavaScript" src="../../../../../web/js/default/DateTextBox.js" type="text/javascript"></script>
+      <script language="JavaScript" src="../../../../../web/js/dojoConfig.js" type="text/javascript"></script>
+      <script language="JavaScript" src="../../../../../web/js/dojo/dojo.js" type="text/javascript"></script>
+      <script language="JavaScript" type="text/javascript" id="keyMap"></script>
+      <script type="text/javascript">
+        dojo.hostenv.writeIncludes(); //makes debugging in Venkman possible
+      </script>
+<SCRIPT language="JavaScript" type="text/javascript">
+function onloadFunctions() {
+}
+
+function depurar() {
+  var frm=document.frmMain;
+  if (frm.inpDateFrom.value==null || frm.inpDateFrom.value=="") {
+      setWindowElementFocus(frm.inpDateFrom);
+      mensaje(7);
+      return false;
+    }
+  if (frm.inpDateTo.value==null || frm.inpDateTo.value=="") {
+      setWindowElementFocus(frm.inpDateTo);
+      mensaje(7);
+      return false;
+    }
+  return true;
+}
+</SCRIPT>
+</HEAD>
+    <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="resizeArea();updateMenuIcon('buttonMenu');focoPrimerControl();" onresize="resizeArea();">
+<FORM method="POST" action="ReportPaymentFilter.html" name="frmMain" id="form">
+  <INPUT type="hidden" name="Command"></INPUT>
+  <INPUT type="hidden" name="inpAuxd" value="" id="functionSumAux1"></INPUT>
+  <table height="100%" border="0" cellpadding="0" cellspacing="0" id="main">
+    <tr>
+      <td valign="top" id="tdleftTabs"></td>
+      <td valign="top">
+        <TABLE width="100%" border="0" cellspacing="0" cellpadding="0" class="Main_ContentPane_Left">
+          <TR><TD class="Main_NavBar_bg_left" id="tdleftSeparator"></TD></TR>
+          <TR><TD class="Main_ToolBar_bg_left" valign="top"></TD></TR>
+          <TR><TD class="Main_Client_bg_left"></TD></TR>
+          <TR><TD class="Main_Bottom_bg_left"></TD></TR>
+        </TABLE>
+      </td>
+      <td valign="top">
+        <div class="Main_ContentPane_NavBar" id="tdtopButtons"></div>
+        <div class="Main_ContentPane_ToolBar" id="paramToolBar"></div>
+        <TABLE width="100%" border="0" cellspacing="0" cellpadding="0" class="Main_ContentPane_TabPane" id="tdtopTabs">
+          <TR id="paramParentTabContainer"></TR>
+          <TR id="paramMainTabContainer"></TR>
+          <TR id="paramChildTabContainer"></TR>
+        </TABLE>
+        <DIV class="Main_ContentPane_Client" style="overflow: auto; display: none;" id="client">
+                <table class="dojoTabContainer" border="0" cellpadding="0" cellspacing="0" width="100%" summary="">
+                  <tr>
+                    <td>
+                      <table class="dojoTabPaneWrapper" border="0" cellpadding="0" cellspacing="0" width="100%" summary="">
+                        <tr>
+                          <td>
+                            <!-- MessageBox -->
+
+                            <table cellpadding="0" cellspacing="0" id="messageBoxID" class="MessageBoxyy">
+                              <TBODY>
+                              <tr class="MessageBox_TopMargin">
+                                <td class="MessageBox_LeftMargin"></td>
+                                <td></td>
+                                <td class="MessageBox_RightMargin"></td>
+                              </tr>
+                              <tr>
+                                <td class="MessageBox_LeftMargin"></td>
+                                <td>
+
+                                  <table cellpadding="0" cellspacing="0" style="width: 100%;">
+                                    <TBODY>
+                                    <tr>
+                                      <td>
+                                        <div class="MessageBox_TopLeft"></div>
+                                        <div class="MessageBox_Left"></div>
+                                      </td>
+                                      <td class="MessageBox_bg">
+
+                                        <table class="MessageBox_Top">
+                                        <TBODY>
+                                          <tr>
+                                            <td>
+                                              <span>
+                                              <table cellpadding="0" cellspacing="0" class="MessageBox_Body_ContentCell">
+                                                <TBODY>
+                                                <tr>
+                                                  <td class="MessageBox_Icon_ContentCell">
+                                                    <div class="MessageBox_Icon"></div>
+                                                  </td>
+                                                  <td style="vertical-align: top;" id="messageBoxIDContent">
+                                                    <span>
+                                                      <div class="MessageBox_TextTitle" id="messageBoxIDTitle">
+                                                        xxInfo: AccessTableWithNoView
+                                                      </div>
+                                                      <div class="MessageBox_TextDescription" id="messageBoxIDMessage">
+                                                        xxThe current information is empty.
+                                                      </div>
+                                                      <div class="MessageBox_TextSeparator"></div>
+                                                    </span>
+                                                  </td>
+                                                </tr>
+                                                </TBODY>
+                                              </table>
+                                              </span>
+                                            </td>
+                                          </tr>
+                                          </TBODY>
+                                        </table>
+
+                                      </td>
+                                      <td class="MessageBox_RightTrans">
+                                        <div class="MessageBox_TopRight"></div>
+                                        <div class="MessageBox_Right"></div>
+                                      </td>
+                                    </tr>
+                                    <tr>
+                                      <td rowspan="2" class="MessageBox_BottomLeft">
+                                      </td>
+                                      <td class="MessageBox_BottomTrans MessageBox_bg">
+                                      </td>
+                                      <td rowspan="2" class="MessageBox_BottomRight">
+                                      </td>
+                                    </tr>
+                                    <tr>
+                                      <td class="MessageBox_Bottom">
+                                      </td>
+                                    </tr>
+                                    </TBODY>
+                                  </table>
+
+                                </td>
+                                <td class="MessageBox_RightMargin"></td>
+                              </tr>
+                              <tr class="MessageBox_BottomMargin">
+                                <td class="MessageBox_LeftMargin"></td>
+                                <td></td>
+                                <td class="MessageBox_RightMargin"></td>
+                              </tr>
+                              </TBODY>
+                            </table>
+                            <!-- USER CONTROLS -->
+              <TABLE class="Main_Client_TableEdition">
+                <tr>
+                  <td class="TableEdition_OneCell_width"></td>
+                  <td class="TableEdition_OneCell_width"></td>
+                  <td class="TableEdition_OneCell_width"></td>
+                  <td class="TableEdition_OneCell_width"></td>
+                  <td class="TableEdition_OneCell_width"></td>
+                  <td class="TableEdition_OneCell_width"></td>
+                </tr>
+                <TR>
+                <td colspan="6">
+                  <table class="FieldGroup" cellspacing="0" cellpadding="0" border="0">
+                  <tbody>
+                    <tr class="FieldGroup_TopMargin"/>
+                    <tr>
+                      <td class="FieldGroupTitle_Left"><img class="FieldGroupTitle_Left_bg" border="0" src="../../../../../web/images/blank.gif"/></td>
+                      <TD class="FieldGroupTitle">Primary Filters</TD>
+                      <td class="FieldGroupTitle_Right"><img class="FieldGroupTitle_Right_bg" border="0" src="../../../../../web/images/blank.gif"/></td>
+                      <td class="FieldGroupContent"/>
+                    </tr>
+                    <tr class="FieldGroup_BottomMargin"/>
+                  </tbody>
+                  </table>
+                </td>
+                </TR>
+                <TR>
+                  <TD class="TitleCell"><SPAN class="LabelText">From Date</SPAN></TD>
+                  <TD class="TextBox_btn_ContentCell">
+                    <TABLE border="0" cellspacing="0" cellpadding="0" summary=""  style="padding-top: 0px;">
+                      <TR>
+                        <TD class="TextBox_ContentCell">
+						  <INPUT type="text" id="paramDateFrom" class="dojoValidateValid readonly TextBox_TwoCells_width" required="false" value="" maxlength="19" name="inpDateFrom" onkeyup="auto_complete_date(this);" onchange="validateDateTextBox(this.id);logChanges(this);return true;" displayformat="DD-MM-YYYY %H:%M:%S" saveformat="DD-MM-YYYY %H:%M:%S" disabled="true"></INPUT>
+                        </TD>
+                      </TR>
+                    </TABLE>
+                 </TD>
+                  <TD class="TitleCell"></TD>
+                  <TD class="TitleCell"> <SPAN class="LabelText">To Date</SPAN></TD>
+                  <TD class="TextBox_btn_ContentCell">
+                    <TABLE border="0" cellspacing="0" cellpadding="0" summary=""  style="padding-top: 0px;">
+                      <TR>
+                        <TD class="TextBox_ContentCell">
+						  <INPUT type="text" id="paramDateTo" class="dojoValidateValid readonly TextBox_TwoCells_width" required="false" value="" maxlength="19" name="inpDateTo" onkeyup="auto_complete_date(this);" onchange="validateDateTextBox(this.id);logChanges(this);return true;" displayformat="DD-MM-YYYY %H:%M:%S" saveformat="DD-MM-YYYY %H:%M:%S" readonly="true"></INPUT>
+                        </TD>
+                      </TR>
+                    </TABLE>
+                  </TD>
+                  <TD class="ContentCell"> </TD>
+
+                </TR>
+                  <TD class="TitleCell"> <SPAN class="LabelText">Type Report</SPAN></TD>
+                  <TD class="Combo_ContentCell" colspan="2"> <SELECT  type="hidden" name="inpTypeVatReport" id="inpTypeVatReport" required="true" class="Combo Combo_TwoCells_width">
+                      <OPTION value=""> <DIV id="reportTypeVatReport"></DIV></OPTION>
+                    </SELECT>
+                  </TD>
+                  <TD class="ContentCell"></TD>
+                  <TD class="TitleCell"></TD>
+                  <TD class="ContentCell"></TD>
+                </TR>
+                  <TR>
+                    <td colspan="6">
+                      <table class="FieldGroup" cellspacing="0" cellpadding="0" border="0">
+                      <tbody>
+                        <tr class="FieldGroup_TopMargin"/>
+                        <tr>
+                          <td class="FieldGroupTitle_Left"><img class="FieldGroupTitle_Left_bg" border="0" src="../../../../../web/images/blank.gif"/></td>
+                          <td class="FieldGroupTitle">View Results</td>
+                          <td class="FieldGroupTitle_Right"><img class="FieldGroupTitle_Right_bg" border="0" src="../../../../../web/images/blank.gif"/></td>
+                          <td class="FieldGroupContent"/>
+                        </tr>
+                        <tr class="FieldGroup_BottomMargin"/>
+                      </tbody>
+                      </table>
+                    </td>
+                  </TR>
+
+                  <tr>
+                    <TD class="TitleCell"></TD>
+                    <TD class="Button_CenterAlign_ContentCell">
+                      <div>
+                        <a class="ButtonLink" href="#" onfocus="this.className='ButtonLink_hover'; window.status='View Results in a New Window'; return true;" onblur="this.className='ButtonLink'; window.status=''; return true;" onkeypress="this.className='ButtonLink_active'; return true;" onkeyup="this.className='ButtonLink_hover'; return true;" onclick="openServletNewWindow('EDIT_HTML', true, 'ReportPaymentFilter.html', 'ReportTaxPaymentJR', null, false, '700', '1000', true, null, null, false);return false;">
+                        <table class="Button" onmouseout="this.className='Button';window.status='';return true;" onmouseover="this.className='Button_hover';window.status='HTML_Report';return true;" onmousedown="this.className='Button_active';return true;" onmouseup="this.className='Button';return true;">
+                          <tr>
+                            <td class="Button_left"><img class="Button_Icon Button_Icon_html" alt="View Results in a New Window" title="View Results in a New Window" src="../../../../../web/images/blank.gif" border=0/></td>
+                            <td class="Button_text">HTML Format</td>
+                            <td class="Button_right"></td>
+                          </tr>
+                        </table>
+                        </a>
+                      </div>
+                    </TD>
+                    <TD class="ContentCell"></INPUT>
+                    </TD>
+                    <TD class="TitleCell"></TD>
+                    <TD class="Button_CenterAlign_ContentCell">
+                      <div>
+                        <a class="ButtonLink" href="#" onfocus="this.className='ButtonLink_hover'; window.status='Export Results to PDF Format'; return true;" onblur="this.className='ButtonLink'; window.status=''; return true;" onkeypress="this.className='ButtonLink_active'; return true;" onkeyup="this.className='ButtonLink_hover'; return true;" onclick="openServletNewWindow('EDIT_PDF', true, 'ReportPaymentFilter.html', 'ReportTaxPaymentJR', null, false, '700', '1000', true);return false;">
+                        <table class="Button" onmouseout="this.className='Button';window.status='';return true;" onmouseover="this.className='Button_hover';window.status='PDF_Report';return true;" onmousedown="this.className='Button_active';return true;" onmouseup="this.className='Button';return true;">
+                          <tr>
+                            <td class="Button_left"><img class="Button_Icon Button_Icon_pdf" alt="Export Results to PDF Format" title="Export Results to PDF Format" src="../../../../../web/images/blank.gif" border=0/></td>
+                            <td class="Button_text">PDF Format</td>
+                            <td class="Button_right"></td>
+                          </tr>
+                        </table>
+                        </a>
+                      </div>
+                    </TD>
+                    <TD class="ContentCell"></TD>
+                  </TR>
+ 		 </TABLE>
+
+                      <!-- USER CONTROLS -->
+                </TD>
+              </TR>
+              </TABLE>
+              </TD>
+            </TR>
+          </TABLE>
+        </div>
+        <TABLE width="100%" border="0" cellspacing="0" cellpadding="0" class="Menu_ContentPane_Bottom" id="tdbottomSeparator">
+          <TR>
+            <TD class="Main_Bottom_bg"><IMG src="../../../../../web/images/blank.gif" border="0"></TD>
+          </TR>
+        </TABLE></td>
+      <td valign="top">
+        <TABLE width="100%" border="0" cellspacing="0" cellpadding="0" class="Main_ContentPane_Right" id="tdrightSeparator">
+          <TR><TD class="Main_NavBar_bg_right"></TD></TR>
+          <TR><TD class="Main_ToolBar_bg_right" valign="top"></TD></TR>
+          <TR><TD class="Main_Client_bg_right"></TD></TR>
+          <TR><TD class="Main_Bottom_bg_right"></TD></TR>
+        </TABLE>
+      </td>
+    </tr>
+  </table>
+</form>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/erpReports/ReportPaymentFilter.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+*************************************************************************
+* The contents of this file are subject to the Openbravo  Public  License
+* Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
+* Version 1.1  with a permitted attribution clause; you may not  use this
+* file except in compliance with the License. You  may  obtain  a copy of
+* the License at http://www.openbravo.com/legal/license.html 
+* Software distributed under the License  is  distributed  on  an "AS IS"
+* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+* License for the specific  language  governing  rights  and  limitations
+* under the License. 
+* The Original Code is Openbravo ERP. 
+* The Initial Developer of the Original Code is Openbravo SL 
+* All portions are Copyright (C) 2001-2006 Openbravo SL 
+* All Rights Reserved. 
+* Contributor(s):  ______________________________________.
+************************************************************************
+-->
+<REPORT>
+  <template file="ReportPaymentFilter.html"/>
+  <PARAMETER id="paramToolBar" name="toolbar" default=""/>
+  <PARAMETER id="paramMessage" name="paramMessage" attribute="onload" replace="xx();"/>
+  <PARAMETER id="fieldCalendar" name="calendar" attribute="src" replace="es" default="en"/>
+  <PARAMETER id="paramDirection" name="direction" default=""/>
+  <PARAMETER id="paramLanguage" name="paramLanguage" default=""/>
+  <PARAMETER id="paramDateFrom" name="dateFrom" attribute="value"/>
+	<PARAMETER id="paramDateFrom" name="dateFromdisplayFormat" attribute="displayformat" replace="xx"/>
+	<PARAMETER id="paramDateFrom" name="dateFromsaveFormat" attribute="saveformat" replace="yy"/>
+  <PARAMETER id="paramDateTo" name="dateTo" attribute="value"/>
+	<PARAMETER id="paramDateTo" name="dateTodisplayFormat" attribute="displayformat" replace="xx"/>
+	<PARAMETER id="paramDateTo" name="dateTosaveFormat" attribute="saveformat" replace="yy"/>
+  <!-- 
+  <PARAMETER id="paramC_BANKACCOUNT_ID" name="cBankAccount" default=""/>
+  <SUBREPORT id="reportC_ACCOUNTNUMBER" name="reportC_ACCOUNTNUMBER" report="org/openbravo/erpCommon/reference/List">
+    <ARGUMENT name="parameterListSelected" withId="paramC_BANKACCOUNT_ID"/>
+  </SUBREPORT>
+  -->
+ <PARAMETER id="paramTypeVatReport" name="TypeVatReport" default=""/>
+  <SUBREPORT id="reportTypeVatReport" name="reportTypeVatReport" report="org/openbravo/erpCommon/reference/List">
+    <ARGUMENT name="parameterListSelected" withId="paramTypeVatReport"/>
+  </SUBREPORT>
+  <PARAMETER id="paramSumAmount" name="sumAmount"/>
+  <PARAMETER id="param0" name="Param0" default="0"/>
+  <PARAMETER id="paramCSS" name="theme" attribute="href" replace="Default"/>
+  <PARAMETER id="tdleftTabs" name="leftTabs" default=""/>
+  <PARAMETER id="paramParentTabContainer" name="parentTabContainer" default=" "/>
+  <PARAMETER id="paramMainTabContainer" name="mainTabContainer" default=" "/>
+  <PARAMETER id="paramChildTabContainer" name="childTabContainer" default=" "/>
+  <PARAMETER id="tdtopButtons" name="navigationBar" default=""/>
+  <PARAMETER id="keyMap" name="keyMap" default=""/>
+  <PARAMETER id="messageBoxID" name="messageType" attribute="class" replace="yy" default="HIDDEN"/>
+  <PARAMETER id="messageBoxIDTitle" name="messageTitle" default=""/>
+  <PARAMETER id="messageBoxIDMessage" name="messageMessage" default=""/>
+
+</REPORT>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/erpReports/ReportRegisterByVatJR.jrxml	Tue Jun 24 17:33:07 2008 +0000
@@ -0,0 +1,921 @@
+<?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="ReportRegisterByVatJR"
+		 columnCount="1"
+		 printOrder="Vertical"
+		 orientation="Portrait"
+		 pageWidth="842"
+		 pageHeight="1190"
+		 columnWidth="782"
+		 columnSpacing="0"
+		 leftMargin="30"
+		 rightMargin="30"
+		 topMargin="20"
+		 bottomMargin="20"
+		 whenNoDataType="NoPages"
+		 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.*" />
+
+	<parameter name="invoicedateDA" isForPrompting="true" class="java.lang.String">
+		<parameterDescription><![CDATA[Invoice Date From :]]></parameterDescription>
+		<defaultValueExpression ><![CDATA[""]]></defaultValueExpression>
+	</parameter>
+	<parameter name="invoicedateA" isForPrompting="true" class="java.lang.String">
+		<parameterDescription><![CDATA[Invoice Date To :]]></parameterDescription>
+		<defaultValueExpression ><![CDATA[""]]></defaultValueExpression>
+	</parameter>
+	<queryString><![CDATA[select taxreg.name, (tax.name||'-'||tax.rate || '%' ) as Aliquota,
+ coalesce(taxregline.taxbaseamt,0) as Imponibile, coalesce(taxregline.novatamt,0) as NonImponibile, coalesce(taxregline.exemptamt,0) as Esente , 
+ coalesce(taxregline.taxundamt,0) as IvaIndeducibile, coalesce(taxregline.taxamt,0) as Iva, coalesce(taxregline.totalamt,0) as Totale,
+ coalesce(taxreg.lastregaccumamt,0) as TotalePrecedente,
+case 
+ when taxregtyp.issotrx ='S' then 'Vendite'
+ else 'Acquisti'
+ end 
+ as IsSale
+ from c_taxregister taxreg, c_taxregisterline taxregline , c_taxregister_type taxregtyp, c_tax tax
+ where
+     taxreg.c_taxregister_id = taxregline.c_taxregister_id
+ and taxreg.c_taxregister_type_id = taxregtyp.c_taxregister_type_id 
+ and taxregline.c_tax_id = tax.c_tax_id
+ and 1=1
+ and ( taxregline.invoicedate >= to_date($P{invoicedateDA},'DD/MM/YYYY')  ) 
+ and ( taxregline.invoicedate <= to_date($P{invoicedateA},'DD/MM/YYYY')  ) 
+ order by  taxreg.name,(tax.name||'-'||tax.rate || '%' )]]></queryString>
+
+	<field name="NAME" class="java.lang.String"/>
+	<field name="ALIQUOTA" class="java.lang.String"/>
+	<field name="IMPONIBILE" class="java.math.BigDecimal"/>
+	<field name="NONIMPONIBILE" class="java.math.BigDecimal"/>
+	<field name="ESENTE" class="java.math.BigDecimal"/>
+	<field name="IVAINDEDUCIBILE" class="java.math.BigDecimal"/>
+	<field name="IVA" class="java.math.BigDecimal"/>
+	<field name="TOTALE" class="java.math.BigDecimal"/>
+	<field name="TOTALEPRECEDENTE" class="java.math.BigDecimal"/>
+	<field name="ISSALE" class="java.lang.String"/>
+
+	<variable name="SumImponibile" class="java.math.BigDecimal" resetType="Group" resetGroup="NAME" calculation="Sum">
+		<variableExpression><![CDATA[$F{IMPONIBILE}]]></variableExpression>
+	</variable>
+	<variable name="SumNonImponibile" class="java.math.BigDecimal" resetType="Group" resetGroup="NAME" calculation="Sum">
+		<variableExpression><![CDATA[$F{NONIMPONIBILE}]]></variableExpression>
+	</variable>
+	<variable name="SumEsente" class="java.math.BigDecimal" resetType="Group" resetGroup="NAME" calculation="Sum">
+		<variableExpression><![CDATA[$F{ESENTE}]]></variableExpression>
+	</variable>
+	<variable name="SumIvaIndeducibile" class="java.math.BigDecimal" resetType="Group" resetGroup="NAME" calculation="Sum">
+		<variableExpression><![CDATA[$F{IVAINDEDUCIBILE}]]></variableExpression>
+	</variable>
+	<variable name="SumIva" class="java.math.BigDecimal" resetType="Group" resetGroup="NAME" calculation="Sum">
+		<variableExpression><![CDATA[$F{IVA}]]></variableExpression>
+	</variable>
+	<variable name="SumTotale" class="java.math.BigDecimal" resetType="Group" resetGroup="NAME" calculation="Sum">
+		<variableExpression><![CDATA[$F{TOTALE}]]></variableExpression>
+	</variable>
+	<variable name="SumTotalePrec" class="java.math.BigDecimal" resetType="Group" resetGroup="NAME" calculation="First">
+		<variableExpression><![CDATA[$F{TOTALEPRECEDENTE}]]></variableExpression>
+	</variable>
+	<variable name="TotIva" class="java.math.BigDecimal" resetType="Report" calculation="Sum">
+		<variableExpression><![CDATA[( $F{ISSALE}.equals( "Acquisti" )  ? $F{IVA}.negate() : $F{IVA} )]]></variableExpression>
+	</variable>
+	<variable name="TotCredPrec" class="java.math.BigDecimal" resetType="Report" incrementType="Group" incrementGroup="NAME" calculation="Sum">
+		<variableExpression><![CDATA[( $F{ISSALE}.equals( "Acquisti" )  ? $F{TOTALEPRECEDENTE} : $F{TOTALEPRECEDENTE}.negate() )]]></variableExpression>
+		<initialValueExpression><![CDATA[new BigDecimal(0)]]></initialValueExpression>
+	</variable>
+	<variable name="TotIvaDaPagare" class="java.math.BigDecimal" resetType="Report" calculation="Nothing">
+		<variableExpression><![CDATA[$V{TotIva}.add(  ( $V{TotCredPrec}.doubleValue()<0 ? new BigDecimal(0) :  $V{TotCredPrec}.negate() ))]]></variableExpression>
+	</variable>
+
+		<group  name="NAME" >
+			<groupExpression><![CDATA[$F{NAME}]]></groupExpression>
+			<groupHeader>
+			<band height="25"  isSplitAllowed="true" >
+				<rectangle radius="0" >
+					<reportElement
+						x="0"
+						y="0"
+						width="782"
+						height="25"
+						forecolor="#8080FF"
+						backcolor="#00CCFF"
+						key="rectangle"/>
+					<graphicElement stretchType="NoStretch"/>
+				</rectangle>
+				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+					<reportElement
+						x="0"
+						y="2"
+						width="329"
+						height="23"
+						forecolor="#000000"
+						key="textField"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement>
+						<font size="18"/>
+					</textElement>
+				<textFieldExpression   class="java.lang.String"><![CDATA[$F{NAME}]]></textFieldExpression>
+				</textField>
+				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+					<reportElement
+						x="538"
+						y="0"
+						width="86"
+						height="25"
+						forecolor="#000000"
+						key="textField"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement textAlignment="Right" verticalAlignment="Middle">
+						<font size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" isStrikeThrough="false" />
+					</textElement>
+				<textFieldExpression   class="java.lang.String"><![CDATA[$F{ISSALE}]]></textFieldExpression>
+				</textField>
+				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+					<reportElement
+						x="329"
+						y="0"
+						width="86"
+						height="25"
+						key="textField">
+							<printWhenExpression><![CDATA[new Boolean(false)]]></printWhenExpression>
+						</reportElement>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement textAlignment="Right" verticalAlignment="Middle">
+						<font size="12"/>
+					</textElement>
+				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$F{TOTALEPRECEDENTE}]]></textFieldExpression>
+				</textField>
+			</band>
+			</groupHeader>
+			<groupFooter>
+			<band height="30"  isSplitAllowed="true" >
+				<line direction="BottomUp">
+					<reportElement
+						x="1"
+						y="0"
+						width="781"
+						height="0"
+						forecolor="#000000"
+						backcolor="#FFFFFF"
+						key="line"/>
+					<graphicElement stretchType="NoStretch"/>
+				</line>
+				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+					<reportElement
+						x="86"
+						y="0"
+						width="86"
+						height="18"
+						key="textField"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement textAlignment="Right">
+						<font/>
+					</textElement>
+				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$V{SumImponibile}]]></textFieldExpression>
+				</textField>
+				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+					<reportElement
+						x="172"
+						y="0"
+						width="86"
+						height="18"
+						key="textField"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement textAlignment="Right">
+						<font/>
+					</textElement>
+				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$V{SumNonImponibile}]]></textFieldExpression>
+				</textField>
+				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+					<reportElement
+						x="258"
+						y="0"
+						width="86"
+						height="18"
+						key="textField-1"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement textAlignment="Right">
+						<font/>
+					</textElement>
+				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$V{SumEsente}]]></textFieldExpression>
+				</textField>
+				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+					<reportElement
+						x="344"
+						y="0"
+						width="86"
+						height="18"
+						key="textField-2"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement textAlignment="Right">
+						<font/>
+					</textElement>
+				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$V{SumIvaIndeducibile}]]></textFieldExpression>
+				</textField>
+				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+					<reportElement
+						x="430"
+						y="0"
+						width="86"
+						height="18"
+						key="textField-3"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement textAlignment="Right">
+						<font/>
+					</textElement>
+				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$V{SumIva}]]></textFieldExpression>
+				</textField>
+				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+					<reportElement
+						x="516"
+						y="0"
+						width="86"
+						height="18"
+						key="textField-4"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement textAlignment="Right">
+						<font/>
+					</textElement>
+				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$V{SumTotale}]]></textFieldExpression>
+				</textField>
+				<staticText>
+					<reportElement
+						x="0"
+						y="0"
+						width="86"
+						height="18"
+						key="staticText-1"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement>
+						<font pdfFontName="Helvetica-Bold" isBold="true"/>
+					</textElement>
+				<text><![CDATA[Totali :]]></text>
+				</staticText>
+				<textField isStretchWithOverflow="false" pattern="##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+					<reportElement
+						x="649"
+						y="0"
+						width="100"
+						height="18"
+						key="textField">
+							<printWhenExpression><![CDATA[new Boolean(false)]]></printWhenExpression>
+						</reportElement>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement>
+						<font/>
+					</textElement>
+				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$V{TotCredPrec}]]></textFieldExpression>
+				</textField>
+			</band>
+			</groupFooter>
+		</group>
+		<background>
+			<band height="0"  isSplitAllowed="true" >
+			</band>
+		</background>
+		<title>
+			<band height="50"  isSplitAllowed="true" >
+				<staticText>
+					<reportElement
+						x="158"
+						y="5"
+						width="242"
+						height="40"
+						key="staticText"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement>
+						<font size="30"/>
+					</textElement>
+				<text><![CDATA[Liquidazione Iva]]></text>
+				</staticText>
+				<line direction="TopDown">
+					<reportElement
+						x="0"
+						y="48"
+						width="781"
+						height="0"
+						forecolor="#000000"
+						backcolor="#FFFFFF"
+						key="line"/>
+					<graphicElement stretchType="NoStretch"/>
+				</line>
+				<line direction="TopDown">
+					<reportElement
+						x="0"
+						y="3"
+						width="781"
+						height="0"
+						forecolor="#000000"
+						backcolor="#FFFFFF"
+						key="line"/>
+					<graphicElement stretchType="NoStretch"/>
+				</line>
+				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+					<reportElement
+						x="400"
+						y="0"
+						width="382"
+						height="50"
+						key="textField-6"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement verticalAlignment="Middle">
+						<font isBold="true"/>
+					</textElement>
+				<textFieldExpression   class="java.lang.String"><![CDATA["Periodo da:   " +" "+ $P{invoicedateDA}+" "+"   a   "+" "+$P{invoicedateA}]]></textFieldExpression>
+				</textField>
+			</band>
+		</title>
+		<pageHeader>
+			<band height="9"  isSplitAllowed="true" >
+			</band>
+		</pageHeader>
+		<columnHeader>
+			<band height="18"  isSplitAllowed="true" >
+				<rectangle>
+					<reportElement
+						mode="Opaque"
+						x="0"
+						y="0"
+						width="782"
+						height="17"
+						forecolor="#000000"
+						backcolor="#999999"
+						key="rectangle"/>
+					<graphicElement stretchType="NoStretch" pen="None"/>
+				</rectangle>
+				<line direction="BottomUp">
+					<reportElement
+						x="0"
+						y="0"
+						width="782"
+						height="0"
+						forecolor="#000000"
+						backcolor="#999999"
+						key="line"/>
+					<graphicElement stretchType="NoStretch"/>
+				</line>
+				<line direction="BottomUp">
+					<reportElement
+						x="0"
+						y="15"
+						width="782"
+						height="0"
+						forecolor="#000000"
+						backcolor="#FFFFFF"
+						key="line"/>
+					<graphicElement stretchType="NoStretch"/>
+				</line>
+				<staticText>
+					<reportElement
+						x="0"
+						y="0"
+						width="86"
+						height="17"
+						forecolor="#000000"
+						backcolor="#999999"
+						key="staticText"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement>
+						<font size="12"/>
+					</textElement>
+				<text><![CDATA[Aliquota]]></text>
+				</staticText>
+				<staticText>
+					<reportElement
+						x="86"
+						y="0"
+						width="86"
+						height="17"
+						forecolor="#000000"
+						key="staticText"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement textAlignment="Right">
+						<font size="12"/>
+					</textElement>
+				<text><![CDATA[Imponibile]]></text>
+				</staticText>
+				<staticText>
+					<reportElement
+						x="172"
+						y="0"
+						width="86"
+						height="17"
+						forecolor="#000000"
+						key="staticText"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement textAlignment="Right">
+						<font size="12"/>
+					</textElement>
+				<text><![CDATA[Non Imp.]]></text>
+				</staticText>
+				<staticText>
+					<reportElement
+						x="258"
+						y="0"
+						width="86"
+						height="17"
+						forecolor="#000000"
+						key="staticText"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement textAlignment="Right">
+						<font size="12"/>
+					</textElement>
+				<text><![CDATA[Esente]]></text>
+				</staticText>
+				<staticText>
+					<reportElement
+						x="344"
+						y="0"
+						width="86"
+						height="17"
+						forecolor="#000000"
+						key="staticText"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement textAlignment="Right">
+						<font size="12"/>
+					</textElement>
+				<text><![CDATA[Iva Inded.]]></text>
+				</staticText>
+				<staticText>
+					<reportElement
+						x="430"
+						y="0"
+						width="86"
+						height="17"
+						forecolor="#000000"
+						key="staticText"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement textAlignment="Right">
+						<font size="12"/>
+					</textElement>
+				<text><![CDATA[Iva]]></text>
+				</staticText>
+				<staticText>
+					<reportElement
+						x="516"
+						y="0"
+						width="86"
+						height="17"
+						forecolor="#000000"
+						key="staticText"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement textAlignment="Right">
+						<font size="12"/>
+					</textElement>
+				<text><![CDATA[Totale]]></text>
+				</staticText>
+			</band>
+		</columnHeader>
+		<detail>
+			<band height="17"  isSplitAllowed="true" >
+				<line direction="TopDown">
+					<reportElement
+						x="0"
+						y="16"
+						width="782"
+						height="0"
+						forecolor="#808080"
+						backcolor="#FFFFFF"
+						key="line"/>
+					<graphicElement stretchType="NoStretch"/>
+				</line>
+				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+					<reportElement
+						x="0"
+						y="0"
+						width="86"
+						height="17"
+						forecolor="#000000"
+						key="textField"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement>
+						<font size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" isStrikeThrough="false" />
+					</textElement>
+				<textFieldExpression   class="java.lang.String"><![CDATA[$F{ALIQUOTA}]]></textFieldExpression>
+				</textField>
+				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+					<reportElement
+						x="86"
+						y="0"
+						width="86"
+						height="17"
+						forecolor="#000000"
+						key="textField"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement textAlignment="Right">
+						<font size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" isStrikeThrough="false" />
+					</textElement>
+				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$F{IMPONIBILE}]]></textFieldExpression>
+				</textField>
+				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+					<reportElement
+						x="172"
+						y="0"
+						width="86"
+						height="17"
+						forecolor="#000000"
+						key="textField"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement textAlignment="Right">
+						<font size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" isStrikeThrough="false" />
+					</textElement>
+				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$F{NONIMPONIBILE}]]></textFieldExpression>
+				</textField>
+				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+					<reportElement
+						x="258"
+						y="0"
+						width="86"
+						height="17"
+						forecolor="#000000"
+						key="textField"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement textAlignment="Right">
+						<font size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" isStrikeThrough="false" />
+					</textElement>
+				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$F{ESENTE}]]></textFieldExpression>
+				</textField>
+				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+					<reportElement
+						x="344"
+						y="0"
+						width="86"
+						height="17"
+						forecolor="#000000"
+						key="textField"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement textAlignment="Right">
+						<font size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" isStrikeThrough="false" />
+					</textElement>
+				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$F{IVAINDEDUCIBILE}]]></textFieldExpression>
+				</textField>
+				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+					<reportElement
+						x="430"
+						y="0"
+						width="86"
+						height="17"
+						forecolor="#000000"
+						key="textField"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement textAlignment="Right">
+						<font size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" isStrikeThrough="false" />
+					</textElement>
+				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$F{IVA}]]></textFieldExpression>
+				</textField>
+				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+					<reportElement
+						x="516"
+						y="0"
+						width="86"
+						height="17"
+						forecolor="#000000"
+						key="textField"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement textAlignment="Right">
+						<font size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" isStrikeThrough="false" />
+					</textElement>
+				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$F{TOTALE}]]></textFieldExpression>
+				</textField>
+			</band>
+		</detail>
+		<columnFooter>
+			<band height="0"  isSplitAllowed="true" >
+			</band>
+		</columnFooter>
+		<pageFooter>
+			<band height="27"  isSplitAllowed="true" >
+				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+					<reportElement
+						x="573"
+						y="4"
+						width="170"
+						height="19"
+						forecolor="#000000"
+						key="textField"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement textAlignment="Right">
+						<font/>
+					</textElement>
+				<textFieldExpression   class="java.lang.String"><![CDATA["Page " + $V{PAGE_NUMBER} + " of "]]></textFieldExpression>
+				</textField>
+				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Report" hyperlinkType="None"  hyperlinkTarget="Self" >
+					<reportElement
+						mode="Transparent"
+						x="746"
+						y="4"
+						width="36"
+						height="19"
+						forecolor="#000000"
+						backcolor="#FFFFFF"
+						key="textField"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement>
+						<font size="10" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" isStrikeThrough="false" />
+					</textElement>
+				<textFieldExpression   class="java.lang.String"><![CDATA["" + $V{PAGE_NUMBER}]]></textFieldExpression>
+				</textField>
+				<line direction="TopDown">
+					<reportElement
+						x="0"
+						y="3"
+						width="782"
+						height="0"
+						forecolor="#000000"
+						backcolor="#FFFFFF"
+						key="line"/>
+					<graphicElement stretchType="NoStretch"/>
+				</line>
+				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+					<reportElement
+						x="1"
+						y="6"
+						width="209"
+						height="19"
+						forecolor="#000000"
+						key="textField"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement>
+						<font/>
+					</textElement>
+				<textFieldExpression   class="java.util.Date"><![CDATA[new Date()]]></textFieldExpression>
+				</textField>
+			</band>
+		</pageFooter>
+		<summary>
+			<band height="195"  isSplitAllowed="true" >
+				<crosstab >
+					<reportElement
+						x="0"
+						y="4"
+						width="321"
+						height="55"
+						key="crosstab-1"/>
+					<crosstabHeaderCell>						<cellContents mode="Transparent">
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+						</cellContents>
+					</crosstabHeaderCell>					<rowGroup name="ALIQUOTA" width="126" totalPosition="End">
+						<bucket>
+							<bucketExpression class="java.lang.String"><![CDATA[$F{ALIQUOTA}]]></bucketExpression>
+						</bucket>
+						<crosstabRowHeader>
+						<cellContents mode="Transparent">
+					<box topBorder="None" topBorderColor="#000000" leftBorder="1Point" leftBorderColor="#000000" rightBorder="1Point" rightBorderColor="#000000" bottomBorder="1Point" bottomBorderColor="#000000"/>
+				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+					<reportElement
+						x="0"
+						y="0"
+						width="75"
+						height="30"
+						key="textField"/>
+					<box topBorder="1Point" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement textAlignment="Center" verticalAlignment="Middle">
+						<font pdfFontName="Helvetica-Bold" isBold="true"/>
+					</textElement>
+				<textFieldExpression   class="java.lang.String"><![CDATA[$V{ALIQUOTA}]]></textFieldExpression>
+				</textField>
+				<staticText>
+					<reportElement
+						x="76"
+						y="15"
+						width="50"
+						height="15"
+						key="staticText-2"/>
+					<box topBorder="1Point" topBorderColor="#000000" leftBorder="1Point" leftBorderColor="#000000" rightBorder="1Point" rightBorderColor="#000000" bottomBorder="1Point" bottomBorderColor="#000000"/>
+					<textElement>
+						<font/>
+					</textElement>
+				<text><![CDATA[Iva Inded.]]></text>
+				</staticText>
+				<staticText>
+					<reportElement
+						x="76"
+						y="0"
+						width="50"
+						height="15"
+						key="staticText-2"/>
+					<box topBorder="1Point" topBorderColor="#000000" leftBorder="1Point" leftBorderColor="#000000" rightBorder="1Point" rightBorderColor="#000000" bottomBorder="1Point" bottomBorderColor="#000000"/>
+					<textElement>
+						<font/>
+					</textElement>
+				<text><![CDATA[Iva]]></text>
+				</staticText>
+						</cellContents>
+						</crosstabRowHeader>
+						<crosstabTotalRowHeader>
+						<cellContents mode="Transparent">
+					<box topBorder="None" topBorderColor="#000000" leftBorder="1Point" leftBorderColor="#000000" rightBorder="1Point" rightBorderColor="#000000" bottomBorder="1Point" bottomBorderColor="#000000"/>
+				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+					<reportElement
+						x="0"
+						y="0"
+						width="75"
+						height="30"
+						key="textField"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement textAlignment="Center" verticalAlignment="Middle">
+						<font pdfFontName="Helvetica-Bold" isBold="true"/>
+					</textElement>
+				<textFieldExpression   class="java.lang.String"><![CDATA["Totale Iva"]]></textFieldExpression>
+				</textField>
+				<staticText>
+					<reportElement
+						x="76"
+						y="0"
+						width="50"
+						height="15"
+						key="staticText-2"/>
+					<box topBorder="1Point" topBorderColor="#000000" leftBorder="1Point" leftBorderColor="#000000" rightBorder="1Point" rightBorderColor="#000000" bottomBorder="1Point" bottomBorderColor="#000000"/>
+					<textElement>
+						<font/>
+					</textElement>
+				<text><![CDATA[Iva]]></text>
+				</staticText>
+				<staticText>
+					<reportElement
+						x="76"
+						y="16"
+						width="50"
+						height="15"
+						key="staticText-2"/>
+					<box topBorder="1Point" topBorderColor="#000000" leftBorder="1Point" leftBorderColor="#000000" rightBorder="1Point" rightBorderColor="#000000" bottomBorder="1Point" bottomBorderColor="#000000"/>
+					<textElement>
+						<font/>
+					</textElement>
+				<text><![CDATA[Iva Inded.]]></text>
+				</staticText>
+						</cellContents>
+						</crosstabTotalRowHeader>
+					</rowGroup>
+					<columnGroup name="ISSALE" height="25" headerPosition="Center">
+						<bucket>
+							<bucketExpression class="java.lang.String"><![CDATA[$F{ISSALE}]]></bucketExpression>
+						</bucket>
+						<crosstabColumnHeader>
+						<cellContents mode="Transparent">
+					<box topBorder="1Point" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="1Point" rightBorderColor="#000000" bottomBorder="1Point" bottomBorderColor="#000000"/>
+				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+					<reportElement
+						x="0"
+						y="0"
+						width="50"
+						height="25"
+						key="textField"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="1Point" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement textAlignment="Center" verticalAlignment="Middle">
+						<font pdfFontName="Helvetica-Bold" isBold="true"/>
+					</textElement>
+				<textFieldExpression   class="java.lang.String"><![CDATA[$V{ISSALE}]]></textFieldExpression>
+				</textField>
+						</cellContents>
+						</crosstabColumnHeader>
+						<crosstabTotalColumnHeader>
+						<cellContents mode="Transparent">
+					<box topBorder="1Point" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="1Point" rightBorderColor="#000000" bottomBorder="1Point" bottomBorderColor="#000000"/>
+						</cellContents>
+						</crosstabTotalColumnHeader>
+					</columnGroup>
+
+					<measure name="IVA_Sum" class="java.math.BigDecimal" calculation="Sum">
+						<measureExpression><![CDATA[$F{IVA}]]></measureExpression>
+					</measure>
+					<measure name="IvaInd_Sum" class="java.math.BigDecimal" calculation="Sum">
+						<measureExpression><![CDATA[$F{IVAINDEDUCIBILE}]]></measureExpression>
+					</measure>
+					<crosstabCell width="50" height="30">
+						<cellContents mode="Transparent">
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="1Point" rightBorderColor="#000000" bottomBorder="1Point" bottomBorderColor="#000000"/>
+				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+					<reportElement
+						x="0"
+						y="0"
+						width="50"
+						height="15"
+						key="textField"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement textAlignment="Right" verticalAlignment="Middle">
+						<font/>
+					</textElement>
+				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$V{IVA_Sum}]]></textFieldExpression>
+				</textField>
+				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+					<reportElement
+						x="0"
+						y="15"
+						width="50"
+						height="15"
+						key="textField"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement textAlignment="Right">
+						<font/>
+					</textElement>
+				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$V{IvaInd_Sum}]]></textFieldExpression>
+				</textField>
+						</cellContents>
+					</crosstabCell>
+					<crosstabCell width="50" height="30" columnTotalGroup="ISSALE">
+						<cellContents mode="Transparent">
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="1Point" rightBorderColor="#000000" bottomBorder="1Point" bottomBorderColor="#000000"/>
+						</cellContents>
+					</crosstabCell>
+					<crosstabCell width="50" height="31" rowTotalGroup="ALIQUOTA">
+						<cellContents mode="Transparent">
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="1Point" rightBorderColor="#000000" bottomBorder="1Point" bottomBorderColor="#000000"/>
+				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+					<reportElement
+						x="0"
+						y="0"
+						width="50"
+						height="15"
+						key="textField"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement textAlignment="Right" verticalAlignment="Middle">
+						<font pdfFontName="Helvetica-Bold" isBold="true"/>
+					</textElement>
+				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$V{IVA_Sum}]]></textFieldExpression>
+				</textField>
+				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+					<reportElement
+						x="0"
+						y="15"
+						width="50"
+						height="15"
+						key="textField-7"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement textAlignment="Right">
+						<font pdfFontName="Helvetica-Bold" isBold="true"/>
+					</textElement>
+				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$V{IvaInd_Sum}]]></textFieldExpression>
+				</textField>
+						</cellContents>
+					</crosstabCell>
+					<crosstabCell width="50" height="31" rowTotalGroup="ALIQUOTA" columnTotalGroup="ISSALE">
+						<cellContents mode="Transparent">
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="1Point" rightBorderColor="#000000" bottomBorder="1Point" bottomBorderColor="#000000"/>
+						</cellContents>
+					</crosstabCell>
+					<whenNoDataCell>						<cellContents mode="Transparent">
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="1Point" rightBorderColor="#000000" bottomBorder="1Point" bottomBorderColor="#000000"/>
+						</cellContents>
+					</whenNoDataCell>					</crosstab>
+				<staticText>
+					<reportElement
+						x="321"
+						y="22"
+						width="122"
+						height="20"
+						key="staticText-3"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement verticalAlignment="Middle">
+						<font pdfFontName="Helvetica-Bold" size="12" isBold="true"/>
+					</textElement>
+				<text><![CDATA[Totale IVA da pagare]]></text>
+				</staticText>
+				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+					<reportElement
+						x="443"
+						y="22"
+						width="100"
+						height="20"
+						key="textField"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement textAlignment="Right" verticalAlignment="Middle">
+						<font/>
+					</textElement>
+				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$V{TotIvaDaPagare}]]></textFieldExpression>
+				</textField>
+				<staticText>
+					<reportElement
+						x="321"
+						y="2"
+						width="122"
+						height="20"
+						key="staticText-4"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement verticalAlignment="Middle">
+						<font pdfFontName="Helvetica-Bold" size="12" isBold="true"/>
+					</textElement>
+				<text><![CDATA[Totale credito prec.]]></text>
+				</staticText>
+				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+					<reportElement
+						x="443"
+						y="2"
+						width="100"
+						height="20"
+						key="textField"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement textAlignment="Right">
+						<font/>
+					</textElement>
+				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[( $V{TotCredPrec}.doubleValue()<0 ? new BigDecimal(0) :  $V{TotCredPrec} )]]></textFieldExpression>
+				</textField>
+			</band>
+		</summary>
+</jasperReport>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/erpReports/ReportRegisterByVatJR_data.xsql	Tue Jun 24 17:33:07 2008 +0000
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html 
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License. 
+ * The Original Code is Openbravo ERP. 
+ * The Initial Developer of the Original Code is Openbravo SL 
+ * All portions are Copyright (C) 2001-2006 Openbravo SL 
+ * All Rights Reserved. 
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+-->
+
+
+
+<!-- See ReportBankJR_data.xsql for example -->
+
+<SqlClass name="ReportRegisterByVatJRData" package="org.openbravo.erpReports">
+  <SqlClassComment></SqlClassComment>
+  <SqlMethod name="select" type="preparedStatement" return="multiple">
+    <SqlMethodComment></SqlMethodComment>
+    <Sql>
+    <![CDATA[
+ select taxreg.name, 
+	(tax.name||'-'||tax.rate || '%' ) as Aliquota,
+ 	coalesce(taxregline.taxbaseamt,0) as Imponibile, 
+ 	coalesce(taxregline.novatamt,0) as NonImponibile, 
+ 	coalesce(taxregline.exemptamt,0) as Esente , 
+ 	coalesce(taxregline.taxundamt,0) as IvaIndeducibile, 
+ 	coalesce(taxregline.taxamt,0) as Iva, 
+ 	coalesce(taxregline.totalamt,0) as Totale,
+ 	coalesce(taxreg.lastregaccumamt,0) as TotalePrecedente,
+	case 
+ 	when taxregtyp.issotrx ='Y' then 'Vendita'
+ 	else 'Acquisti'
+ 	end 
+ 	as IsSale
+ from c_taxregister taxreg, 
+ c_taxregisterline taxregline , 
+ c_taxregister_type taxregtyp, 
+ c_tax tax
+ where
+     taxreg.c_taxregister_id = taxregline.c_taxregister_id
+ and taxreg.c_taxregister_type_id = taxregtyp.c_taxregister_type_id 
+ and taxregline.c_tax_id = tax.c_tax_id
+ and 1=1
+ order by  taxreg.name,(tax.name||'-'||tax.rate || '%' )
+     ]]></Sql>
+    <Parameter name="parDateFrom" optional="true" after="and 1=1"><![CDATA[ and taxregline.invoicedate >= to_date(?,'DD/MM/YYYY') ]]></Parameter>
+    <Parameter name="parDateTo" optional="true" after="and 1=1"><![CDATA[ and taxregline.invoicedate <= to_date(?,'DD/MM/YYYY')]]></Parameter>
+  </SqlMethod>
+
+  <SqlMethod name="set" type="constant" return="multiple">
+      <SqlMethodComment></SqlMethodComment>
+      <Sql></Sql>
+  </SqlMethod>
+  
+</SqlClass>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/erpReports/ReportRegisterFilter.html	Tue Jun 24 17:33:07 2008 +0000
@@ -0,0 +1,322 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD Xhtml 1.0 Transitional//EN" "http://www.w3.org/tr/xhtml1/Dtd/xhtml1-transitional.dtd">
+<!--
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SL
+ * All portions are Copyright (C) 2001-2006 Openbravo SL
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<TITLE>VAT Registers</TITLE>
+  <link rel="SHORTCUT ICON" href="../../../../../web/images/favicon.ico" type="image/x-icon" />
+    <link rel="stylesheet" type="text/css" href="../../../../../web/skins/Default/Main/Main_Manual.css" id="paramCSS" />
+    <script language="JavaScript" type="text/javascript" id="paramDirection">
+      var baseDirection = "../../../../../web/";
+      </script>
+      <script language="JavaScript" src="../../../../../web/js/messages.js" type="text/javascript">
+      </script>
+      <script language="JavaScript" src="../utility/MessagesJS.js" type="text/javascript"></script>
+      <script language="JavaScript" type="text/javascript" id="paramLanguage">
+        var LNG_POR_DEFECTO = "en_US";
+      </script>
+      <script language="JavaScript" src="../../../../../web/js/utils.js" type="text/javascript"></script>
+      <script language="JavaScript" src="../../../../../web/js/searchs.js" type="text/javascript"></script>
+      <script language="JavaScript" src="../../../../../web/js/ajax.js" type="text/javascript"></script>
+      <script language="JavaScript" src="../../../../../web/js/default/MessageBox.js" type="text/javascript"></script>
+      <script language="JavaScript" src="../../../../../web/js/messages.js" type="text/javascript"></script>
+      <script language="JavaScript" src="../utility/MessagesJS.js" type="text/javascript"></script>
+      <script language="JavaScript" src="../../../../../web/js/jscalendar/calendar.js" type="text/javascript"></script>
+      <script language="JavaScript" src="../../../../../web/js/jscalendar/lang/calendar-es.js" type="text/javascript" id="fieldCalendar"></script>
+      <script language="JavaScript" src="../../../../../web/js/default/DateTextBox.js" type="text/javascript"></script>
+      <script language="JavaScript" src="../../../../../web/js/dojoConfig.js" type="text/javascript"></script>
+      <script language="JavaScript" src="../../../../../web/js/dojo/dojo.js" type="text/javascript"></script>
+      <script language="JavaScript" type="text/javascript" id="keyMap"></script>
+      <script type="text/javascript">
+        dojo.hostenv.writeIncludes(); //makes debugging in Venkman possible
+      </script>
+<SCRIPT language="JavaScript" type="text/javascript">
+function onloadFunctions() {
+}
+
+function depurar() {
+  var frm=document.frmMain;
+  if (frm.inpDateFrom.value==null || frm.inpDateFrom.value=="") {
+      setWindowElementFocus(frm.inpDateFrom);
+      mensaje(7);
+      return false;
+    }
+  if (frm.inpDateTo.value==null || frm.inpDateTo.value=="") {
+      setWindowElementFocus(frm.inpDateTo);
+      mensaje(7);
+      return false;
+    }
+  return true;
+}
+</SCRIPT>
+</HEAD>
+    <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="resizeArea();updateMenuIcon('buttonMenu');focoPrimerControl();" onresize="resizeArea();">
+<FORM method="POST" action="ReportRegisterFilter.html" name="frmMain" id="form">
+  <INPUT type="hidden" name="Command"></INPUT>
+  <INPUT type="hidden" name="inpAuxd" value="" id="functionSumAux1"></INPUT>
+  <table height="100%" border="0" cellpadding="0" cellspacing="0" id="main">
+    <tr>
+      <td valign="top" id="tdleftTabs"></td>
+      <td valign="top">
+        <TABLE width="100%" border="0" cellspacing="0" cellpadding="0" class="Main_ContentPane_Left">
+          <TR><TD class="Main_NavBar_bg_left" id="tdleftSeparator"></TD></TR>
+          <TR><TD class="Main_ToolBar_bg_left" valign="top"></TD></TR>
+          <TR><TD class="Main_Client_bg_left"></TD></TR>
+          <TR><TD class="Main_Bottom_bg_left"></TD></TR>
+        </TABLE>
+      </td>
+      <td valign="top">
+        <div class="Main_ContentPane_NavBar" id="tdtopButtons"></div>
+        <div class="Main_ContentPane_ToolBar" id="paramToolBar"></div>
+        <TABLE width="100%" border="0" cellspacing="0" cellpadding="0" class="Main_ContentPane_TabPane" id="tdtopTabs">
+          <TR id="paramParentTabContainer"></TR>
+          <TR id="paramMainTabContainer"></TR>
+          <TR id="paramChildTabContainer"></TR>
+        </TABLE>
+        <DIV class="Main_ContentPane_Client" style="overflow: auto; display: none;" id="client">
+                <table class="dojoTabContainer" border="0" cellpadding="0" cellspacing="0" width="100%" summary="">
+                  <tr>
+                    <td>
+                      <table class="dojoTabPaneWrapper" border="0" cellpadding="0" cellspacing="0" width="100%" summary="">
+                        <tr>
+                          <td>
+                            <!-- MessageBox -->
+
+                            <table cellpadding="0" cellspacing="0" id="messageBoxID" class="MessageBoxyy">
+                              <TBODY>
+                              <tr class="MessageBox_TopMargin">
+                                <td class="MessageBox_LeftMargin"></td>
+                                <td></td>
+                                <td class="MessageBox_RightMargin"></td>
+                              </tr>
+                              <tr>
+                                <td class="MessageBox_LeftMargin"></td>
+                                <td>
+
+                                  <table cellpadding="0" cellspacing="0" style="width: 100%;">
+                                    <TBODY>
+                                    <tr>
+                                      <td>
+                                        <div class="MessageBox_TopLeft"></div>
+                                        <div class="MessageBox_Left"></div>
+                                      </td>
+                                      <td class="MessageBox_bg">
+
+                                        <table class="MessageBox_Top">
+                                        <TBODY>
+                                          <tr>
+                                            <td>
+                                              <span>
+                                              <table cellpadding="0" cellspacing="0" class="MessageBox_Body_ContentCell">
+                                                <TBODY>
+                                                <tr>
+                                                  <td class="MessageBox_Icon_ContentCell">
+                                                    <div class="MessageBox_Icon"></div>
+                                                  </td>
+                                                  <td style="vertical-align: top;" id="messageBoxIDContent">
+                                                    <span>
+                                                      <div class="MessageBox_TextTitle" id="messageBoxIDTitle">
+                                                        xxInfo: AccessTableWithNoView
+                                                      </div>
+                                                      <div class="MessageBox_TextDescription" id="messageBoxIDMessage">
+                                                        xxThe current information is empty.
+                                                      </div>
+                                                      <div class="MessageBox_TextSeparator"></div>
+                                                    </span>
+                                                  </td>
+                                                </tr>
+                                                </TBODY>
+                                              </table>
+                                              </span>
+                                            </td>
+                                          </tr>
+                                          </TBODY>
+                                        </table>
+
+                                      </td>
+                                      <td class="MessageBox_RightTrans">
+                                        <div class="MessageBox_TopRight"></div>
+                                        <div class="MessageBox_Right"></div>
+                                      </td>
+                                    </tr>
+                                    <tr>
+                                      <td rowspan="2" class="MessageBox_BottomLeft">
+                                      </td>
+                                      <td class="MessageBox_BottomTrans MessageBox_bg">
+                                      </td>
+                                      <td rowspan="2" class="MessageBox_BottomRight">
+                                      </td>
+                                    </tr>
+                                    <tr>
+                                      <td class="MessageBox_Bottom">
+                                      </td>
+                                    </tr>
+                                    </TBODY>
+                                  </table>
+
+                                </td>
+                                <td class="MessageBox_RightMargin"></td>
+                              </tr>
+                              <tr class="MessageBox_BottomMargin">
+                                <td class="MessageBox_LeftMargin"></td>
+                                <td></td>
+                                <td class="MessageBox_RightMargin"></td>
+                              </tr>
+                              </TBODY>
+                            </table>
+                            <!-- USER CONTROLS -->
+              <TABLE class="Main_Client_TableEdition">
+                <tr>
+                  <td class="TableEdition_OneCell_width"></td>
+                  <td class="TableEdition_OneCell_width"></td>
+                  <td class="TableEdition_OneCell_width"></td>
+                  <td class="TableEdition_OneCell_width"></td>
+                  <td class="TableEdition_OneCell_width"></td>
+                  <td class="TableEdition_OneCell_width"></td>
+                </tr>
+                <TR>
+                <td colspan="6">
+                  <table class="FieldGroup" cellspacing="0" cellpadding="0" border="0">
+                  <tbody>
+                    <tr class="FieldGroup_TopMargin"/>
+                    <tr>
+                      <td class="FieldGroupTitle_Left"><img class="FieldGroupTitle_Left_bg" border="0" src="../../../../../web/images/blank.gif"/></td>
+                      <TD class="FieldGroupTitle">Primary Filters</TD>
+                      <td class="FieldGroupTitle_Right"><img class="FieldGroupTitle_Right_bg" border="0" src="../../../../../web/images/blank.gif"/></td>
+                      <td class="FieldGroupContent"/>
+                    </tr>
+                    <tr class="FieldGroup_BottomMargin"/>
+                  </tbody>
+                  </table>
+                </td>
+                </TR>
+                <TR>
+                  <TD class="TitleCell"><SPAN class="LabelText">From Date</SPAN></TD>
+                  <TD class="TextBox_btn_ContentCell">
+                    <TABLE border="0" cellspacing="0" cellpadding="0" summary=""  style="padding-top: 0px;">
+                      <TR>
+                        <TD class="TextBox_ContentCell">
+						  <INPUT type="text" id="paramDateFrom" class="dojoValidateValid readonly TextBox_TwoCells_width" required="false" value="" maxlength="19" name="inpDateFrom" onkeyup="auto_complete_date(this);" onchange="validateDateTextBox(this.id);logChanges(this);return true;" displayformat="DD-MM-YYYY %H:%M:%S" saveformat="DD-MM-YYYY %H:%M:%S" disabled="true"></INPUT>
+                        </TD>
+                      </TR>
+                    </TABLE>
+                 </TD>
+                  <TD class="TitleCell"></TD>
+                  <TD class="TitleCell"> <SPAN class="LabelText">To Date</SPAN></TD>
+                  <TD class="TextBox_btn_ContentCell">
+                    <TABLE border="0" cellspacing="0" cellpadding="0" summary=""  style="padding-top: 0px;">
+                      <TR>
+                        <TD class="TextBox_ContentCell">
+						  <INPUT type="text" id="paramDateTo" class="dojoValidateValid readonly TextBox_TwoCells_width" required="false" value="" maxlength="19" name="inpDateTo" onkeyup="auto_complete_date(this);" onchange="validateDateTextBox(this.id);logChanges(this);return true;" displayformat="DD-MM-YYYY %H:%M:%S" saveformat="DD-MM-YYYY %H:%M:%S" readonly="true"></INPUT>
+                        </TD>
+                      </TR>
+                    </TABLE>
+                  </TD>
+                  <TD class="ContentCell"> </TD>
+
+                </TR>
+                  <TD class="TitleCell"> <SPAN class="LabelText">Type Vat Report</SPAN></TD>
+                  <TD class="Combo_ContentCell" colspan="2"> <SELECT  name="inpTypeVatReport" id="inpTypeVatReport" required="true" class="Combo Combo_TwoCells_width">
+                      <OPTION value=""> <DIV id="reportTypeVatReport"></DIV></OPTION>
+                    </SELECT>
+                  </TD>
+                  <TD class="ContentCell"></TD>
+                  <TD class="TitleCell"></TD>
+                  <TD class="ContentCell"></TD>
+                </TR>
+                  <TR>
+                    <td colspan="6">
+                      <table class="FieldGroup" cellspacing="0" cellpadding="0" border="0">
+                      <tbody>
+                        <tr class="FieldGroup_TopMargin"/>
+                        <tr>
+                          <td class="FieldGroupTitle_Left"><img class="FieldGroupTitle_Left_bg" border="0" src="../../../../../web/images/blank.gif"/></td>
+                          <td class="FieldGroupTitle">View Results</td>
+                          <td class="FieldGroupTitle_Right"><img class="FieldGroupTitle_Right_bg" border="0" src="../../../../../web/images/blank.gif"/></td>
+                          <td class="FieldGroupContent"/>
+                        </tr>
+                        <tr class="FieldGroup_BottomMargin"/>
+                      </tbody>
+                      </table>
+                    </td>
+                  </TR>
+
+                  <tr>
+                    <TD class="TitleCell"></TD>
+                    <TD class="Button_CenterAlign_ContentCell">
+                      <div>
+                        <a class="ButtonLink" href="#" onfocus="this.className='ButtonLink_hover'; window.status='View Results in a New Window'; return true;" onblur="this.className='ButtonLink'; window.status=''; return true;" onkeypress="this.className='ButtonLink_active'; return true;" onkeyup="this.className='ButtonLink_hover'; return true;" onclick="openServletNewWindow('EDIT_HTML', true, 'ReportRegisterFilter.html', 'ReportVatRegisterJR', null, false, '700', '1000', true, null, null, false);return false;">
+                        <table class="Button" onmouseout="this.className='Button';window.status='';return true;" onmouseover="this.className='Button_hover';window.status='HTML_Report';return true;" onmousedown="this.className='Button_active';return true;" onmouseup="this.className='Button';return true;">
+                          <tr>
+                            <td class="Button_left"><img class="Button_Icon Button_Icon_html" alt="View Results in a New Window" title="View Results in a New Window" src="../../../../../web/images/blank.gif" border=0/></td>
+                            <td class="Button_text">HTML Format</td>
+                            <td class="Button_right"></td>
+                          </tr>
+                        </table>
+                        </a>
+                      </div>
+                    </TD>
+                    <TD class="ContentCell"></INPUT>
+                    </TD>
+                    <TD class="TitleCell"></TD>
+                    <TD class="Button_CenterAlign_ContentCell">
+                      <div>
+                        <a class="ButtonLink" href="#" onfocus="this.className='ButtonLink_hover'; window.status='Export Results to PDF Format'; return true;" onblur="this.className='ButtonLink'; window.status=''; return true;" onkeypress="this.className='ButtonLink_active'; return true;" onkeyup="this.className='ButtonLink_hover'; return true;" onclick="openServletNewWindow('EDIT_PDF', true, 'ReportRegisterFilter.html', 'ReportVatRegisterJR', null, false, '700', '1000', true, null, null, false);return false;">
+                        <table class="Button" onmouseout="this.className='Button';window.status='';return true;" onmouseover="this.className='Button_hover';window.status='PDF_Report';return true;" onmousedown="this.className='Button_active';return true;" onmouseup="this.className='Button';return true;">
+                          <tr>
+                            <td class="Button_left"><img class="Button_Icon Button_Icon_pdf" alt="Export Results to PDF Format" title="Export Results to PDF Format" src="../../../../../web/images/blank.gif" border=0/></td>
+                            <td class="Button_text">PDF Format</td>
+                            <td class="Button_right"></td>
+                          </tr>
+                        </table>
+                        </a>
+                      </div>
+                    </TD>
+                    <TD class="ContentCell"></TD>
+                  </TR>
+ 		 </TABLE>
+
+                      <!-- USER CONTROLS -->
+                </TD>
+              </TR>
+              </TABLE>
+              </TD>
+            </TR>
+          </TABLE>
+        </div>
+        <TABLE width="100%" border="0" cellspacing="0" cellpadding="0" class="Menu_ContentPane_Bottom" id="tdbottomSeparator">
+          <TR>
+            <TD class="Main_Bottom_bg"><IMG src="../../../../../web/images/blank.gif" border="0"></TD>
+          </TR>
+        </TABLE></td>
+      <td valign="top">
+        <TABLE width="100%" border="0" cellspacing="0" cellpadding="0" class="Main_ContentPane_Right" id="tdrightSeparator">
+          <TR><TD class="Main_NavBar_bg_right"></TD></TR>
+          <TR><TD class="Main_ToolBar_bg_right" valign="top"></TD></TR>
+          <TR><TD class="Main_Client_bg_right"></TD></TR>
+          <TR><TD class="Main_Bottom_bg_right"></TD></TR>
+        </TABLE>
+      </td>
+    </tr>
+  </table>
+</form>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/erpReports/ReportRegisterFilter.xml	Tue Jun 24 17:33:07 2008 +0000
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+*************************************************************************
+* The contents of this file are subject to the Openbravo  Public  License
+* Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
+* Version 1.1  with a permitted attribution clause; you may not  use this
+* file except in compliance with the License. You  may  obtain  a copy of
+* the License at http://www.openbravo.com/legal/license.html 
+* Software distributed under the License  is  distributed  on  an "AS IS"
+* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+* License for the specific  language  governing  rights  and  limitations
+* under the License. 
+* The Original Code is Openbravo ERP. 
+* The Initial Developer of the Original Code is Openbravo SL 
+* All portions are Copyright (C) 2001-2006 Openbravo SL 
+* All Rights Reserved. 
+* Contributor(s):  ______________________________________.
+************************************************************************
+-->
+<REPORT>
+  <template file="ReportRegisterFilter.html"/>
+  <PARAMETER id="paramToolBar" name="toolbar" default=""/>
+  <PARAMETER id="paramMessage" name="paramMessage" attribute="onload" replace="xx();"/>
+  <PARAMETER id="fieldCalendar" name="calendar" attribute="src" replace="es" default="en"/>
+  <PARAMETER id="paramDirection" name="direction" default=""/>
+  <PARAMETER id="paramLanguage" name="paramLanguage" default=""/>
+  <PARAMETER id="paramDateFrom" name="dateFrom" attribute="value"/>
+	<PARAMETER id="paramDateFrom" name="dateFromdisplayFormat" attribute="displayformat" replace="xx"/>
+	<PARAMETER id="paramDateFrom" name="dateFromsaveFormat" attribute="saveformat" replace="yy"/>
+  <PARAMETER id="paramDateTo" name="dateTo" attribute="value"/>
+	<PARAMETER id="paramDateTo" name="dateTodisplayFormat" attribute="displayformat" replace="xx"/>
+	<PARAMETER id="paramDateTo" name="dateTosaveFormat" attribute="saveformat" replace="yy"/>
+  <!-- 
+  <PARAMETER id="paramC_BANKACCOUNT_ID" name="cBankAccount" default=""/>
+  <SUBREPORT id="reportC_ACCOUNTNUMBER" name="reportC_ACCOUNTNUMBER" report="org/openbravo/erpCommon/reference/List">
+    <ARGUMENT name="parameterListSelected" withId="paramC_BANKACCOUNT_ID"/>
+  </SUBREPORT>
+  -->
+ <PARAMETER id="paramTypeVatReport" name="TypeVatReport" default=""/>
+  <SUBREPORT id="reportTypeVatReport" name="reportTypeVatReport" report="org/openbravo/erpCommon/reference/List">
+    <ARGUMENT name="parameterListSelected" withId="paramTypeVatReport"/>
+  </SUBREPORT>
+  <PARAMETER id="paramSumAmount" name="sumAmount"/>
+  <PARAMETER id="param0" name="Param0" default="0"/>
+  <PARAMETER id="paramCSS" name="theme" attribute="href" replace="Default"/>
+  <PARAMETER id="tdleftTabs" name="leftTabs" default=""/>
+  <PARAMETER id="paramParentTabContainer" name="parentTabContainer" default=" "/>
+  <PARAMETER id="paramMainTabContainer" name="mainTabContainer" default=" "/>
+  <PARAMETER id="paramChildTabContainer" name="childTabContainer" default=" "/>
+  <PARAMETER id="tdtopButtons" name="navigationBar" default=""/>
+  <PARAMETER id="keyMap" name="keyMap" default=""/>
+  <PARAMETER id="messageBoxID" name="messageType" attribute="class" replace="yy" default="HIDDEN"/>
+  <PARAMETER id="messageBoxIDTitle" name="messageTitle" default=""/>
+  <PARAMETER id="messageBoxIDMessage" name="messageMessage" default=""/>
+
+</REPORT>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/erpReports/ReportRegisterLineJR.jrxml	Tue Jun 24 17:33:07 2008 +0000
@@ -0,0 +1,498 @@
+<?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="ReportRegisterLineJR"
+		 columnCount="1"
+		 printOrder="Vertical"
+		 orientation="Landscape"
+		 pageWidth="992"
+		 pageHeight="595"
+		 columnWidth="932"
+		 columnSpacing="0"
+		 leftMargin="30"
+		 rightMargin="30"
+		 topMargin="20"
+		 bottomMargin="20"
+		 whenNoDataType="NoPages"
+		 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.*" />
+
+	<parameter name="invoicedateDA" isForPrompting="true" class="java.lang.String">
+		<parameterDescription><![CDATA[Invoice Date From :]]></parameterDescription>
+		<defaultValueExpression ><![CDATA[""]]></defaultValueExpression>
+	</parameter>
+	<parameter name="invoicedateA" isForPrompting="true" class="java.lang.String">
+		<parameterDescription><![CDATA[Invoice Date To :]]></parameterDescription>
+		<defaultValueExpression ><![CDATA[""]]></defaultValueExpression>
+	</parameter>
+	<parameter name="StartPageNo" isForPrompting="false" class="java.lang.Integer">
+		<parameterDescription><![CDATA[Start Page No]]></parameterDescription>
+		<defaultValueExpression ><![CDATA[new Integer(0)]]></defaultValueExpression>
+	</parameter>
+	<queryString><![CDATA[select taxreg.name,taxregline.documentno as DocNum,taxregline.created as RegDate , inv.documentno as DocInv, bp.name as RagSoc,
+ coalesce(taxregline.totalamt,0) as TotAmt, coalesce(taxregline.taxbaseamt,0) as TaxBaseAmt, coalesce(taxregline.exemptamt,0) as ExemptAmt , coalesce(taxregline.taxundamt,0) as TaxUndAmt,
+ coalesce(taxregline.taxamt,0) as TaxAmt , (tax.name||'-'||tax.rate || '%') as aliquota
+ from c_taxregister taxreg , c_taxregisterline taxregline , c_invoicetax invtax, c_invoice inv ,c_bpartner bp, c_tax tax
+ where taxreg.c_taxregister_id = taxregline.c_taxregister_id 
+ and taxregline.c_invoicetax_id = invtax.c_invoicetax_id
+ and inv.c_invoice_id = invtax.c_invoice_id
+ and inv.c_bpartner_id = bp.c_bpartner_id
+ and taxregline.c_tax_id = tax.c_tax_id
+ and 1=1
+ and ( taxregline.invoicedate >= to_date($P{invoicedateDA},'DD/MM/YYYY')  ) 
+ and ( taxregline.invoicedate <= to_date($P{invoicedateA},'DD/MM/YYYY')  )
+ order by taxreg.name]]></queryString>
+
+	<field name="NAME" class="java.lang.String"/>
+	<field name="DOCNUM" class="java.math.BigDecimal"/>
+	<field name="REGDATE" class="java.util.Date"/>
+	<field name="DOCINV" class="java.lang.String"/>
+	<field name="RAGSOC" class="java.lang.String"/>
+	<field name="TOTAMT" class="java.math.BigDecimal"/>
+	<field name="TAXBASEAMT" class="java.math.BigDecimal"/>
+	<field name="EXEMPTAMT" class="java.math.BigDecimal"/>
+	<field name="TAXUNDAMT" class="java.math.BigDecimal"/>
+	<field name="TAXAMT" class="java.math.BigDecimal"/>
+	<field name="ALIQUOTA" class="java.lang.String"/>
+
+
+		<group  name="RegName" >
+			<groupExpression><![CDATA[$F{NAME}]]></groupExpression>
+			<groupHeader>
+			<band height="19"  isSplitAllowed="true" >
+			</band>
+			</groupHeader>
+			<groupFooter>
+			<band height="24"  isSplitAllowed="true" >
+			</band>
+			</groupFooter>
+		</group>
+		<background>
+			<band height="0"  isSplitAllowed="true" >
+			</band>
+		</background>
+		<title>
+			<band height="50"  isSplitAllowed="true" >
+				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+					<reportElement
+						x="0"
+						y="3"
+						width="365"
+						height="45"
+						key="textField"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement verticalAlignment="Middle">
+						<font pdfFontName="Helvetica-Bold" size="12" isBold="true"/>
+					</textElement>
+				<textFieldExpression   class="java.lang.String"><![CDATA[$F{NAME}]]></textFieldExpression>
+				</textField>
+				<line direction="TopDown">
+					<reportElement
+						x="0"
+						y="48"
+						width="932"
+						height="0"
+						forecolor="#000000"
+						backcolor="#FFFFFF"
+						key="line"/>
+					<graphicElement stretchType="NoStretch"/>
+				</line>
+				<line direction="TopDown">
+					<reportElement
+						x="0"
+						y="3"
+						width="932"
+						height="0"
+						forecolor="#000000"
+						backcolor="#FFFFFF"
+						key="line"/>
+					<graphicElement stretchType="NoStretch"/>
+				</line>
+				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+					<reportElement
+						x="365"
+						y="0"
+						width="567"
+						height="50"
+						key="textField-1"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement verticalAlignment="Middle">
+						<font isBold="true"/>
+					</textElement>
+				<textFieldExpression   class="java.lang.String"><![CDATA["Periodo da :    " + $P{invoicedateDA}+"   a    "+$P{invoicedateA}]]></textFieldExpression>
+				</textField>
+			</band>
+		</title>
+		<pageHeader>
+			<band height="0"  isSplitAllowed="true" >
+			</band>
+		</pageHeader>
+		<columnHeader>
+			<band height="23"  isSplitAllowed="true" >
+				<rectangle>
+					<reportElement
+						mode="Opaque"
+						x="0"
+						y="0"
+						width="782"
+						height="23"
+						forecolor="#000000"
+						key="rectangle"/>
+					<graphicElement stretchType="NoStretch" pen="None"/>
+				</rectangle>
+				<staticText>
+					<reportElement
+						mode="Transparent"
+						x="0"
+						y="0"
+						width="86"
+						height="23"
+						forecolor="#000000"
+						key="staticText"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement>
+						<font size="12" isBold="true"/>
+					</textElement>
+				<text><![CDATA[Doc No]]></text>
+				</staticText>
+				<staticText>
+					<reportElement
+						x="86"
+						y="0"
+						width="86"
+						height="23"
+						forecolor="#000000"
+						key="staticText"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement>
+						<font size="12" isBold="true"/>
+					</textElement>
+				<text><![CDATA[Register Date]]></text>
+				</staticText>
+				<staticText>
+					<reportElement
+						x="172"
+						y="0"
+						width="86"
+						height="23"
+						forecolor="#000000"
+						key="staticText"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement>
+						<font size="12" isBold="true"/>
+					</textElement>
+				<text><![CDATA[Invoice Doc No]]></text>
+				</staticText>
+				<staticText>
+					<reportElement
+						x="258"
+						y="0"
+						width="86"
+						height="23"
+						forecolor="#000000"
+						key="staticText"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement>
+						<font pdfFontName="Helvetica-Bold" size="12" isBold="true"/>
+					</textElement>
+				<text><![CDATA[B. Partner]]></text>
+				</staticText>
+				<staticText>
+					<reportElement
+						x="344"
+						y="0"
+						width="86"
+						height="23"
+						forecolor="#000000"
+						key="staticText"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement>
+						<font pdfFontName="Helvetica-Bold" size="12" isBold="true"/>
+					</textElement>
+				<text><![CDATA[Tot. Amount]]></text>
+				</staticText>
+				<staticText>
+					<reportElement
+						x="430"
+						y="0"
+						width="86"
+						height="23"
+						forecolor="#000000"
+						key="staticText"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement>
+						<font size="12" isBold="true"/>
+					</textElement>
+				<text><![CDATA[Base Amount]]></text>
+				</staticText>
+				<staticText>
+					<reportElement
+						x="516"
+						y="0"
+						width="86"
+						height="23"
+						forecolor="#000000"
+						key="staticText"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement>
+						<font size="12" isBold="true"/>
+					</textElement>
+				<text><![CDATA[Exempt Amount]]></text>
+				</staticText>
+				<staticText>
+					<reportElement
+						x="602"
+						y="0"
+						width="86"
+						height="23"
+						forecolor="#000000"
+						key="staticText"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement>
+						<font size="12" isBold="true"/>
+					</textElement>
+				<text><![CDATA[Tax Und. Amount]]></text>
+				</staticText>
+				<staticText>
+					<reportElement
+						x="688"
+						y="0"
+						width="86"
+						height="23"
+						forecolor="#000000"
+						key="staticText"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement>
+						<font size="12" isBold="true"/>
+					</textElement>
+				<text><![CDATA[Tax Amount]]></text>
+				</staticText>
+				<staticText>
+					<reportElement
+						x="774"
+						y="0"
+						width="158"
+						height="23"
+						forecolor="#000000"
+						key="staticText-1"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement textAlignment="Center">
+						<font size="12" isBold="true"/>
+					</textElement>
+				<text><![CDATA[Tax Name]]></text>
+				</staticText>
+			</band>
+		</columnHeader>
+		<detail>
+			<band height="17"  isSplitAllowed="true" >
+				<line direction="TopDown">
+					<reportElement
+						x="0"
+						y="16"
+						width="932"
+						height="0"
+						forecolor="#808080"
+						backcolor="#FFFFFF"
+						key="line"/>
+					<graphicElement stretchType="NoStretch"/>
+				</line>
+				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+					<reportElement
+						x="0"
+						y="0"
+						width="86"
+						height="17"
+						forecolor="#000000"
+						key="textField"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement>
+						<font size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" isStrikeThrough="false" />
+					</textElement>
+				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$F{DOCNUM}]]></textFieldExpression>
+				</textField>
+				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+					<reportElement
+						x="86"
+						y="0"
+						width="86"
+						height="17"
+						forecolor="#000000"
+						key="textField"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement>
+						<font size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" isStrikeThrough="false" />
+					</textElement>
+				<textFieldExpression   class="java.util.Date"><![CDATA[$F{REGDATE}]]></textFieldExpression>
+				</textField>
+				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+					<reportElement
+						x="172"
+						y="0"
+						width="86"
+						height="17"
+						forecolor="#000000"
+						key="textField"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement>
+						<font size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" isStrikeThrough="false" />
+					</textElement>
+				<textFieldExpression   class="java.lang.String"><![CDATA[$F{DOCINV}]]></textFieldExpression>
+				</textField>
+				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+					<reportElement
+						x="258"
+						y="0"
+						width="86"
+						height="17"
+						forecolor="#000000"
+						key="textField"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement>
+						<font size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" isStrikeThrough="false" />
+					</textElement>
+				<textFieldExpression   class="java.lang.String"><![CDATA[$F{RAGSOC}]]></textFieldExpression>
+				</textField>
+				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+					<reportElement
+						x="344"
+						y="0"
+						width="86"
+						height="17"
+						forecolor="#000000"
+						key="textField"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement textAlignment="Left">
+						<font size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" isStrikeThrough="false" />
+					</textElement>
+				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$F{TOTAMT}]]></textFieldExpression>
+				</textField>
+				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+					<reportElement
+						x="430"
+						y="0"
+						width="86"
+						height="17"
+						forecolor="#000000"
+						key="textField"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement textAlignment="Left">
+						<font size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" isStrikeThrough="false" />
+					</textElement>
+				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$F{TAXBASEAMT}]]></textFieldExpression>
+				</textField>
+				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+					<reportElement
+						x="516"
+						y="0"
+						width="86"
+						height="17"
+						forecolor="#000000"
+						key="textField"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement textAlignment="Left">
+						<font size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" isStrikeThrough="false" />
+					</textElement>
+				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$F{EXEMPTAMT}]]></textFieldExpression>
+				</textField>
+				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+					<reportElement
+						x="602"
+						y="0"
+						width="86"
+						height="17"
+						forecolor="#000000"
+						key="textField"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement textAlignment="Left">
+						<font size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" isStrikeThrough="false" />
+					</textElement>
+				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$F{TAXUNDAMT}]]></textFieldExpression>
+				</textField>
+				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+					<reportElement
+						x="688"
+						y="0"
+						width="86"
+						height="17"
+						forecolor="#000000"
+						key="textField"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement textAlignment="Left">
+						<font size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" isStrikeThrough="false" />
+					</textElement>
+				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$F{TAXAMT}]]></textFieldExpression>
+				</textField>
+				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+					<reportElement
+						x="774"
+						y="0"
+						width="158"
+						height="17"
+						forecolor="#000000"
+						key="textField-2"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement textAlignment="Center">
+						<font size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" isStrikeThrough="false" />
+					</textElement>
+				<textFieldExpression   class="java.lang.String"><![CDATA[$F{ALIQUOTA}]]></textFieldExpression>
+				</textField>
+			</band>
+		</detail>
+		<columnFooter>
+			<band height="0"  isSplitAllowed="true" >
+			</band>
+		</columnFooter>
+		<pageFooter>
+			<band height="27"  isSplitAllowed="true" >
+				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+					<reportElement
+						x="719"
+						y="4"
+						width="170"
+						height="19"
+						forecolor="#000000"
+						key="textField"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement textAlignment="Right">
+						<font/>
+					</textElement>
+				<textFieldExpression   class="java.lang.String"><![CDATA["Page   " +(new Integer($V{PAGE_NUMBER}.intValue()+ $P{StartPageNo}.intValue()))]]></textFieldExpression>
+				</textField>
+				<line direction="TopDown">
+					<reportElement
+						x="0"
+						y="3"
+						width="932"
+						height="0"
+						forecolor="#000000"
+						backcolor="#FFFFFF"
+						key="line"/>
+					<graphicElement stretchType="NoStretch"/>
+				</line>
+				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+					<reportElement
+						x="1"
+						y="6"
+						width="209"
+						height="19"
+						forecolor="#000000"
+						key="textField"/>
+					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
+					<textElement>
+						<font/>
+					</textElement>
+				<textFieldExpression   class="java.util.Date"><![CDATA[new Date()]]></textFieldExpression>
+				</textField>
+			</band>
+		</pageFooter>
+		<summary>
+			<band height="0"  isSplitAllowed="true" >
+			</band>
+		</summary>
+</jasperReport>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/erpReports/ReportRegisterLineJR_data.xsql	Tue Jun 24 17:33:07 2008 +0000
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html 
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License. 
+ * The Original Code is Openbravo ERP. 
+ * The Initial Developer of the Original Code is Openbravo SL 
+ * All portions are Copyright (C) 2001-2006 Openbravo SL 
+ * All Rights Reserved. 
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+-->
+
+
+
+<!-- See ReportBankJR_data.xsql for example -->
+
+<SqlClass name="ReportRegisterLineJRData" package="org.openbravo.erpReports">
+  <SqlClassComment></SqlClassComment>
+  <SqlMethod name="select" type="preparedStatement" return="multiple">
+    <SqlMethodComment></SqlMethodComment>
+    <Sql>
+    <![CDATA[
+ select taxreg.name,taxregline.documentno as DocNum,taxregline.created as RegDate , 
+ inv.documentno as DocInv, bp.name as RagSoc,
+ coalesce(taxregline.totalamt,0) as TotAmt, coalesce(taxregline.taxbaseamt,0) as TaxBaseAmt, coalesce(taxregline.exemptamt,0) as ExemptAmt , 
+ coalesce(taxregline.taxundamt,0) as TaxUndAmt, coalesce(taxregline.taxamt,0) as TaxAmt , (tax.name||'-'||tax.rate || '%') as aliquota
+ from c_taxregister taxreg , c_taxregisterline taxregline , c_invoicetax invtax, c_invoice inv ,c_bpartner bp, c_tax tax
+ where taxreg.c_taxregister_id = taxregline.c_taxregister_id 
+ and taxregline.c_invoicetax_id = invtax.c_invoicetax_id
+ and inv.c_invoice_id = invtax.c_invoice_id
+ and inv.c_bpartner_id = bp.c_bpartner_id
+ and taxregline.c_tax_id = tax.c_tax_id
+ and 1=1
+ order by taxreg.name
+     ]]></Sql>
+    <Parameter name="parDateFrom" optional="true" after="and 1=1"><![CDATA[ and taxregline.invoicedate >= to_date(?,'DD/MM/YYYY') ]]></Parameter>
+    <Parameter name="parDateTo" optional="true" after="and 1=1"><![CDATA[ and taxregline.invoicedate <= to_date(?,'DD/MM/YYYY')]]></Parameter> 
+    <Parameter name="parTaxPaymId" optional="true" after="and 1=1"><![CDATA[ and taxreg.c_taxpayment_id in ( ? )  ]]></Parameter>
+    <Parameter name="parTaxRegisId" optional="true" after="and 1=1"><![CDATA[ and taxreg.c_taxregister_id in ( ? )  ]]></Parameter>
+  </SqlMethod>
+
+  <SqlMethod name="set" type="constant" return="multiple">
+      <SqlMethodComment></SqlMethodComment>
+      <Sql></Sql>
+  </SqlMethod>
+  
+</SqlClass>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/erpReports/ReportTaxPaymentJR.java	Tue Jun 24 17:33:07 2008 +0000
@@ -0,0 +1,188 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html 
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License. 
+ * The Original Code is Openbravo ERP. 
+ * The Initial Developer of the Original Code is Openbravo SL 
+ * All portions are Copyright (C) 2001-2006 Openbravo SL 
+ * All Rights Reserved. 
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+package org.openbravo.erpReports;
+
+import org.apache.log4j.Logger;
+import org.openbravo.data.FieldProvider;
+import org.openbravo.erpCommon.utility.*;
+import org.openbravo.erpCommon.businessUtility.WindowTabs;
+import org.openbravo.base.secureApp.HttpSecureAppServlet;
+import org.openbravo.base.secureApp.VariablesSecureApp;
+import org.openbravo.xmlEngine.XmlDocument;
+import java.io.*;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+
+import java.util.HashMap;
+import org.openbravo.erpCommon.ad_combos.AccountNumberComboData;
+import org.openbravo.erpCommon.utility.DateTimeData;
+
+public class ReportTaxPaymentJR extends HttpSecureAppServlet {
+	private static final long serialVersionUID = 1L;
+
+	public void doPost(HttpServletRequest request, HttpServletResponse response)
+			throws IOException, ServletException {
+		VariablesSecureApp vars = new VariablesSecureApp(request);
+		
+		if (vars.commandIn("DEFAULT")) {
+			String strTaxPayId = vars.getSessionValue("JR_ReportTaxPayment.inpcTaxpaymentId");
+			String strTaxPayId_Clear=strTaxPayId.replace("(", "").replace(")", "").replace("'", "");
+			TaxPaymentData[] taxpaym = TaxPaymentData.select(this, strTaxPayId_Clear );
+			String strDateFrom = taxpaym[0].datefrom;
+			String strDateTo = taxpaym[0].dateto;
+			printPageDataSheet(response, vars, strDateFrom, strDateTo);
+		} else if (vars.commandIn("EDIT_HTML","EDIT_PDF")) {
+			//String strTaxPayId = vars.getRequestGlobalVariable("inpcTaxpaymentId","ReportVatRegisterJR|C_TaxpaymentId");
+			String strTaxPayId = vars.getSessionValue("JR_ReportTaxPayment.inpcTaxpaymentId");
+			String strTaxPayId_Clear=strTaxPayId.replace("(", "").replace(")", "").replace("'", "");
+			TaxPaymentData[] taxpaym = TaxPaymentData.select(this, strTaxPayId_Clear );
+			String strDateFrom = taxpaym[0].datefrom;
+			String strDateTo = taxpaym[0].dateto;
+			String strcTypeVatReport = vars.getRequestGlobalVariable("inpTypeVatReport", "JR_ReportTaxPayment|TypeVatReport");
+
+			if (strcTypeVatReport.equals("01")) {
+				// ReportTransactions
+				printReportJRRegisterByVat(response, vars, strDateFrom,strDateTo, strcTypeVatReport);
+			} else {
+				// Standard Report
+				bdError(response, "TypeReportCantBeNull", vars.getLanguage());
+				 return; 
+			}
+			
+		} else
+			pageError(response);
+	}
+
+	void printPageDataSheet(HttpServletResponse response,
+			VariablesSecureApp vars, String strDateFrom, String strDateTo)
+			throws IOException, ServletException {
+		if (log4j.isDebugEnabled())
+			log4j.debug("Output: dataSheet");
+		response.setContentType("text/html; charset=UTF-8");
+		PrintWriter out = response.getWriter();
+		//String strMessage = "";
+
+		XmlDocument xmlDocument = null;
+		xmlDocument = xmlEngine.readXmlTemplate("org/openbravo/erpReports/ReportPaymentFilter").createXmlDocument();
+
+		ToolBar toolbar = new ToolBar(this, vars.getLanguage(),"ReportRegisterFilter", false, "", "", "", false, "ad_reports",strReplaceWith, false, true);
+		toolbar.prepareSimpleToolBarTemplate();
+		xmlDocument.setParameter("toolbar", toolbar.toString());
+
+		try {
+			KeyMap key = new KeyMap(this, vars, "ReportRegisterPayment.html");
+			xmlDocument.setParameter("keyMap", key.getReportKeyMaps());
+		} catch (Exception ex) {
+			throw new ServletException(ex);
+		}
+		try {
+			WindowTabs tabs = new WindowTabs(this, vars,"org.openbravo.erpReports.TaxPayment");//ReportVatRegisterJR
+			xmlDocument.setParameter("parentTabContainer", tabs.parentTabs());
+			xmlDocument.setParameter("mainTabContainer", tabs.mainTabs());
+			xmlDocument.setParameter("childTabContainer", tabs.childTabs());
+			xmlDocument.setParameter("theme", vars.getTheme());
+			NavigationBar nav = new NavigationBar(this, vars.getLanguage(),"ReportPaymentFilter.html", classInfo.id, classInfo.type,strReplaceWith, tabs.breadcrumb());
+			xmlDocument.setParameter("navigationBar", nav.toString());
+			LeftTabsBar lBar = new LeftTabsBar(this, vars.getLanguage(),"ReportPaymentFilter.html", strReplaceWith);
+			xmlDocument.setParameter("leftTabs", lBar.manualTemplate());
+		} catch (Exception ex) {
+			throw new ServletException(ex);
+		}
+		{
+			OBError myMessage = vars.getMessage("ReportPaymentFilter");
+			vars.removeMessage("ReportPaymentFilter");
+			if (myMessage != null) {
+				xmlDocument.setParameter("messageType", myMessage.getType());
+				xmlDocument.setParameter("messageTitle", myMessage.getTitle());
+				xmlDocument.setParameter("messageMessage", myMessage.getMessage());
+			}
+		}
+		xmlDocument.setParameter("calendar", vars.getLanguage().substring(0, 2));
+		xmlDocument.setParameter("direction", "var baseDirection = \"" + strReplaceWith + "/\";\n");
+		xmlDocument.setParameter("paramLanguage", "LNG_POR_DEFECTO=\"" + vars.getLanguage() + "\";");
+
+
+		xmlDocument.setParameter("dateFrom", strDateFrom);
+		xmlDocument.setParameter("dateFromdisplayFormat", vars.getSessionValue("#AD_SqlDateFormat"));
+		xmlDocument.setParameter("dateFromsaveFormat", vars.getSessionValue("#AD_SqlDateFormat"));
+		xmlDocument.setParameter("dateTo", strDateTo);
+		xmlDocument.setParameter("dateTodisplayFormat", vars.getSessionValue("#AD_SqlDateFormat"));
+		xmlDocument.setParameter("dateTosaveFormat", vars.getSessionValue("#AD_SqlDateFormat"));
+		//xmlDocument.setParameter("paramMessage", (strMessage.equals("") ? ""
+		//		: "alert('" + strMessage + "');"));
+
+		TypeReportPayment[] aTypeVatReport = TypeReportPayment.set();
+		xmlDocument.setData("reportTypeVatReport", "liststructure",	aTypeVatReport);
+		xmlDocument.setParameter("TypeVatReport", "01");
+		out.println(xmlDocument.print());
+		out.close();
+	}
+
+	void printReportJRRegisterByVat(HttpServletResponse response, VariablesSecureApp vars, String strDateFrom, String strDateTo, String strTypeReport) throws IOException, ServletException {
+	    if (log4j.isDebugEnabled()) log4j.debug("Output: print html");
+	    
+	    ReportRegisterByVatJRData[] data = null;
+		data = ReportRegisterByVatJRData.select(this, strDateFrom, DateTimeData.nDaysAfter(this, strDateTo, "1"));
+	  
+	    String strOutput = vars.commandIn("EDIT_HTML")?"html":"pdf";
+	    String strReportName = "@basedesign@/org/openbravo/erpReports/ReportRegisterByVatJR.jrxml";
+	    
+	    HashMap<String, Object> parameters = new HashMap<String, Object>();
+	    parameters.put("REPORT_TITLE", classInfo.name);
+	    parameters.put("REPORT_SUBTITLE", "From " + strDateFrom + " to "+ strDateTo);
+	    parameters.put("invoicedateDA", strDateFrom);
+		  parameters.put("invoicedateA", strDateTo);
+	    renderJR(vars, response, strReportName, strOutput, parameters, data, null );
+	}
+
+	public String getServletInfo() {
+		return "Servlet ReportVatRegisterJR.";
+	} // end of getServletInfo() method
+
+}
+
+class TypeReportPayment implements FieldProvider {
+	static Logger log4j = Logger.getLogger(AccountNumberComboData.class);
+	//private String InitRecordNumber = "0";
+	public String id;
+	public String name;
+
+	public String getField(String fieldName) {
+		if (fieldName.equalsIgnoreCase("ID"))
+			return id;
+		else if (fieldName.equalsIgnoreCase("NAME"))
+			return name;
+		else {
+			log4j.debug("Field does not exist: " + fieldName);
+			return null;
+		}
+	}
+
+	public static TypeReportPayment[] set() throws ServletException {
+		TypeReportPayment objectTypeReport[] = new TypeReportPayment[1];
+		// first
+		objectTypeReport[0] = new TypeReportPayment();
+		objectTypeReport[0].id = "01";
+		objectTypeReport[0].name = "Report Tax Payment By VAT";
+
+		return objectTypeReport;
+	}
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/erpReports/ReportVatRegisterJR.java	Tue Jun 24 17:33:07 2008 +0000
@@ -0,0 +1,217 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html 
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License. 
+ * The Original Code is Openbravo ERP. 
+ * The Initial Developer of the Original Code is Openbravo SL 
+ * All portions are Copyright (C) 2001-2006 Openbravo SL 
+ * All Rights Reserved. 
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+package org.openbravo.erpReports;
+
+import net.sf.jasperreports.engine.JasperPrint;
+
+import org.apache.log4j.Logger;
+import org.openbravo.data.FieldProvider;
+import org.openbravo.erpCommon.utility.*;
+import org.openbravo.erpCommon.businessUtility.WindowTabs;
+import org.openbravo.base.secureApp.HttpSecureAppServlet;
+import org.openbravo.base.secureApp.VariablesSecureApp;
+import org.openbravo.xmlEngine.XmlDocument;
+import java.io.*;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import org.openbravo.erpCommon.ad_combos.AccountNumberComboData;
+
+public class ReportVatRegisterJR extends HttpSecureAppServlet {
+	private static final long serialVersionUID = 1L;
+
+	public void doPost(HttpServletRequest request, HttpServletResponse response)
+			throws IOException, ServletException {
+		VariablesSecureApp vars = new VariablesSecureApp(request);
+		
+		if (vars.commandIn("DEFAULT")) {
+			String strTaxRegId = vars.getSessionValue("JR_ReportVATRegister.inpcTaxregisterId");
+			String strTaxRegId_Clear=strTaxRegId.replace("(", "").replace(")", "").replace("'", "");
+			TaxRegisterData[] taxreg = TaxRegisterData.select(this, strTaxRegId_Clear);
+			String strTaxPayId=taxreg[0].cTaxpaymentId;
+			
+			TaxPaymentData[] taxpaym = TaxPaymentData.select(this, strTaxPayId );
+			String strDateFrom = taxpaym[0].datefrom;
+			String strDateTo = taxpaym[0].dateto;
+			printPageDataSheet(response, vars, strDateFrom, strDateTo);
+		} else if (vars.commandIn("EDIT_HTML","EDIT_PDF")) {
+			String strTaxRegId = vars.getSessionValue("JR_ReportVATRegister.inpcTaxregisterId");
+			String strTaxRegId_Clear=strTaxRegId.replace("(", "").replace(")", "").replace("'", "");
+			TaxRegisterData[] taxreg = TaxRegisterData.select(this, strTaxRegId_Clear);
+			String strTaxPayId=taxreg[0].cTaxpaymentId;
+			
+			TaxPaymentData[] taxpaym = TaxPaymentData.select(this, strTaxPayId );
+			String strDateFrom = taxpaym[0].datefrom;
+			String strDateTo = taxpaym[0].dateto;
+
+			String strcTypeVatReport = vars.getRequestGlobalVariable("inpTypeVatReport", "ReportVatRegisterJR|TypeVatReport");
+
+			if (strcTypeVatReport.equals("01")) {
+				// ReportTransactions
+				printReportJRRegisterLine(response, vars,strDateFrom,strDateTo,strTaxPayId, strTaxRegId_Clear, strcTypeVatReport);
+			} else {
+				// Standard Report
+				bdError(response, "TypeReportCantBeNull", vars.getLanguage());
+				 return; 
+			}
+
+		} else
+			pageError(response);
+	}
+
+	void printPageDataSheet(HttpServletResponse response,VariablesSecureApp vars, String strDateFrom, String strDateTo)	throws IOException, ServletException {
+		if (log4j.isDebugEnabled())	log4j.debug("Output: dataSheet");
+		response.setContentType("text/html; charset=UTF-8");
+		PrintWriter out = response.getWriter();
+		//String strMessage = "";
+
+		XmlDocument xmlDocument = null;
+		xmlDocument = xmlEngine.readXmlTemplate("org/openbravo/erpReports/ReportRegisterFilter").createXmlDocument();
+
+		ToolBar toolbar = new ToolBar(this, vars.getLanguage(),"ReportRegisterFilter", false, "", "", "", false, "ad_reports",strReplaceWith, false, true);
+		toolbar.prepareSimpleToolBarTemplate();
+		xmlDocument.setParameter("toolbar", toolbar.toString());
+
+		try {
+			KeyMap key = new KeyMap(this, vars, "ReportRegisterFilter.html");
+			xmlDocument.setParameter("keyMap", key.getReportKeyMaps());
+		} catch (Exception ex) {
+			throw new ServletException(ex);
+		}
+		try {
+			WindowTabs tabs = new WindowTabs(this, vars,"org.openbravo.erpReports.TaxPayment");
+			xmlDocument.setParameter("parentTabContainer", tabs.parentTabs());
+			xmlDocument.setParameter("mainTabContainer", tabs.mainTabs());
+			xmlDocument.setParameter("childTabContainer", tabs.childTabs());
+			xmlDocument.setParameter("theme", vars.getTheme());
+			NavigationBar nav = new NavigationBar(this, vars.getLanguage(),"ReportRegisterFilter.html", classInfo.id, classInfo.type,strReplaceWith, tabs.breadcrumb());
+			xmlDocument.setParameter("navigationBar", nav.toString());
+			LeftTabsBar lBar = new LeftTabsBar(this, vars.getLanguage(),"ReportRegisterFilter.html", strReplaceWith);
+			xmlDocument.setParameter("leftTabs", lBar.manualTemplate());
+		} catch (Exception ex) {
+			throw new ServletException(ex);
+		}
+		{
+			OBError myMessage = vars.getMessage("ReportRegisterFilter");
+			vars.removeMessage("ReportRegisterFilter");
+			if (myMessage != null) {
+				xmlDocument.setParameter("messageType", myMessage.getType());
+				xmlDocument.setParameter("messageTitle", myMessage.getTitle());
+				xmlDocument.setParameter("messageMessage", myMessage.getMessage());
+			}
+		}
+		xmlDocument.setParameter("calendar", vars.getLanguage().substring(0, 2));
+		xmlDocument.setParameter("direction", "var baseDirection = \"" + strReplaceWith + "/\";\n");
+		xmlDocument.setParameter("paramLanguage", "LNG_POR_DEFECTO=\"" + vars.getLanguage() + "\";");
+
+
+		xmlDocument.setParameter("dateFrom", strDateFrom);
+		xmlDocument.setParameter("dateFromdisplayFormat", vars.getSessionValue("#AD_SqlDateFormat"));
+		xmlDocument.setParameter("dateFromsaveFormat", vars.getSessionValue("#AD_SqlDateFormat"));
+		xmlDocument.setParameter("dateTo", strDateTo);
+		xmlDocument.setParameter("dateTodisplayFormat", vars.getSessionValue("#AD_SqlDateFormat"));
+		xmlDocument.setParameter("dateTosaveFormat", vars.getSessionValue("#AD_SqlDateFormat"));
+
+		TypeReportRegister[] aTypeVatReport = TypeReportRegister.set();
+		xmlDocument.setData("reportTypeVatReport", "liststructure",	aTypeVatReport);
+		xmlDocument.setParameter("TypeVatReport", "01");
+		out.println(xmlDocument.print());
+		out.close();
+	}
+
+	void printReportJRRegisterLine(HttpServletResponse response,VariablesSecureApp vars, String strDateFrom, String strDateTo,String TaxPayId, String TaxRegId,	String strTypeReport) throws IOException, ServletException {
+	    if (log4j.isDebugEnabled()) log4j.debug("Output: print html");
+	    
+	    ReportRegisterLineJRData[] data = null;
+	    data = ReportRegisterLineJRData.select(this, "" , "", TaxPayId,TaxRegId);
+	  
+	    String strOutput = vars.commandIn("EDIT_HTML")?"html":"pdf";
+	    String strReportName = "@basedesign@/org/openbravo/erpReports/ReportRegisterLineJR.jrxml";
+	    String StartPageNo=TaxRegisterData.selectPageNoPrior(this, TaxRegId);
+	    Integer IntStartPageNo=new Integer(StartPageNo);
+	    HashMap<String, Object> parameters = new HashMap<String, Object>();
+	    parameters.put("REPORT_TITLE", classInfo.name);
+	    parameters.put("REPORT_SUBTITLE", "From " + strDateFrom + " to "+ strDateTo);
+	    parameters.put("invoicedateDA", strDateFrom);
+	    parameters.put("invoicedateA", strDateTo);
+	    parameters.put("StartPageNo", IntStartPageNo.intValue() );
+		
+	    HashMap<Object, Object> outparameters = new HashMap<Object, Object>();
+	    renderJR(vars, response, strReportName, strOutput, parameters, data, outparameters);
+	    //Read pageno
+	    Collection<Object> coll = outparameters.values();
+	    Object object;
+	    JasperPrint jr1= new JasperPrint();
+	    String scl="";
+	    for (Iterator<Object> iterator = coll.iterator(); iterator.hasNext();) {
+			object = (Object) iterator.next();
+			scl=object.getClass().toString();
+			if (scl.contains("JasperPrint") ) {
+				jr1 = (JasperPrint)object;
+			}
+		};
+		
+		Integer pag1 = new Integer( jr1.getPages().size()+ IntStartPageNo.intValue());
+		TaxRegisterData[] taxregister= TaxRegisterData.select(this, TaxRegId);
+		if ( (taxregister[0].pageno.equals(new String("0"))) || (taxregister[0].pageno==null)){
+		TaxRegisterData.updatePageNo(this, pag1.toString(), TaxRegId);
+		}
+		//JasperPrint object1 = new JasperPrint();
+	    //JasperPrint x = (JasperPrint) outparameters.get(object1);
+	    //int pag = x.getPages().size();
+	}
+
+	public String getServletInfo() {
+		return "Servlet ReportVatRegisterJR.";
+	} // end of getServletInfo() method
+
+}
+
+class TypeReportRegister implements FieldProvider {
+	static Logger log4j = Logger.getLogger(AccountNumberComboData.class);
+	//private String InitRecordNumber = "0";
+	public String id;
+	public String name;
+
+	public String getField(String fieldName) {
+		if (fieldName.equalsIgnoreCase("ID"))
+			return id;
+		else if (fieldName.equalsIgnoreCase("NAME"))
+			return name;
+		else {
+			log4j.debug("Field does not exist: " + fieldName);
+			return null;
+		}
+	}
+
+	public static TypeReportRegister[] set() throws ServletException {
+		TypeReportRegister objectTypeReport[] = new TypeReportRegister[1];
+		// first
+		objectTypeReport[0] = new TypeReportRegister();
+		objectTypeReport[0].id = "01";
+		objectTypeReport[0].name = "Report Tax Register";
+
+		return objectTypeReport;
+	}
+
+}
\ No newline at end of file
Binary file src/org/openbravo/erpReports/RptC_Invoice_TaxLines.jasper has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/erpReports/TaxPayment_data.xsql	Tue Jun 24 17:33:07 2008 +0000
@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html 
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License. 
+ * The Original Code is Openbravo ERP. 
+ * The Initial Developer of the Original Code is Openbravo SL 
+ * All portions are Copyright (C) 2001-2006 Openbravo SL 
+ * All Rights Reserved. 
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+-->
+
+
+
+<SqlClass name="TaxPaymentData" package="org.openbravo.erpReports">
+
+  <SqlMethod name="select" type="preparedStatement" return="multiple">
+  <SqlMethodComment>Tax Payment for a period</SqlMethodComment>
+  <Sql>
+  <![CDATA[
+        SELECT AD_Client_ID, AD_Org_ID, C_TaxPayment_ID, Name, DateFrom, DateTo, GeneratePayment, Processing, Processed, C_Settlement_ID,GL_Journal_ID
+		FROM C_TAXPAYMENT
+		WHERE 1=1
+      ]]>
+  </Sql>
+  <Parameter name="parTaxPaymId" optional="false" after=" 1=1"><![CDATA[ and c_taxpayment_id in ( ? )  ]]></Parameter> 
+  </SqlMethod>
+
+  <SqlMethod name="updateProcessed" type="preparedStatement" return="rowcount">
+  <SqlMethodComment>delete All Tax Register Lines Child</SqlMethodComment>
+  <Sql>
+  <![CDATA[
+  		UPDATE C_TAXPAYMENT 
+  		SET Processed = ? , UPDATED=now() , UPDATEDBY = TO_NUMBER( ? ) 
+  		WHERE C_TaxPayment_ID = ?
+      ]]>
+  </Sql>
+  <Parameter name="processed" default='N'/>
+  <Parameter name="updateby"/>
+  <Parameter name="taxpayment_id"/>
+  </SqlMethod>
+
+<SqlMethod name="updateGeneratePayment" type="preparedStatement" return="rowcount">
+  <SqlMethodComment>delete All Tax Register Lines Child</SqlMethodComment>
+  <Sql>
+  <![CDATA[
+  		UPDATE C_TAXPAYMENT 
+  		SET GeneratePayment = ? , UPDATED=now() , UPDATEDBY = TO_NUMBER( ? ) 
+  		WHERE C_TaxPayment_ID = ?
+      ]]>
+  </Sql>
+  <Parameter name="GeneratePayment" default='N'/>
+  <Parameter name="updateby"/>
+  <Parameter name="taxpayment_id"/>
+  </SqlMethod>
+
+
+  <SqlMethod name="deleteRegisterChild" type="preparedStatement" return="rowcount">
+  <SqlMethodComment>delete All Tax Register Lines Child</SqlMethodComment>
+  <Sql>
+  <![CDATA[
+  		DELETE FROM C_TAXREGISTER
+  		WHERE C_TaxPayment_ID = ?
+      ]]>
+  </Sql>
+  <Parameter name="taxpayment_id"/>
+  </SqlMethod>
+  
+  <SqlMethod name="deleteRegisterLinesChild" type="preparedStatement" return="rowcount">
+  <SqlMethodComment>delete All Tax Register Lines Child</SqlMethodComment>
+  <Sql>
+  <![CDATA[
+  		DELETE FROM C_TAXREGISTERLINE 
+  		WHERE C_TaxRegister_ID in 
+  			( SELECT C_TaxRegister_ID 
+  				FROM C_TAXREGISTER 
+  				WHERE C_TaxPayment_ID = ? ) 
+      ]]>
+  </Sql>
+  <Parameter name="taxpayment_id"/>
+  </SqlMethod>
+  
+  <SqlMethod name="selectCrossPeriodCount" type="preparedStatement" return="string">
+  <SqlMethodComment>delete All Tax Register Lines Child</SqlMethodComment>
+  <Sql>
+  <![CDATA[
+     select count(*) from c_taxpayment where processed='Y' 
+     and 
+     ((DateFrom <= to_date(?,'dd/mm/yyyy') and DateTo >=to_date(?,'dd/mm/yyyy')
+     or DateFrom <= to_date(?,'dd/mm/yyyy') and DateTo >=to_date(?,'dd/mm/yyyy'))
+     or 
+     (DateFrom >= to_date(?,'dd/mm/yyyy') and DateTo <=to_date(?,'dd/mm/yyyy')
+     ))
+      ]]>
+  </Sql>
+  <Parameter name="DateFrom"/>
+  <Parameter name="DateFrom"/>
+  <Parameter name="DateTo"/>
+  <Parameter name="DateTo"/>
+  <Parameter name="DateFrom"/>
+  <Parameter name="DateTo"/>
+  </SqlMethod>
+ 
+  <SqlMethod name="calculatePrevvatcredit" type="preparedStatement" return="String">
+  <SqlMethodComment>Update Tax Register Totals</SqlMethodComment>
+  <Sql>
+  <![CDATA[
+  	   select sum(case when  c_taxregister.C_TAXREGISTER_TYPE_ID in 
+        (select C_TAXREGISTER_TYPE_ID from c_taxregister_type where c_taxregister_type.ISSOTRX='Y')
+        then coalesce(-lastregaccumamt,0)
+        else coalesce(lastregaccumamt,0) end ) as prevvatcredit
+        from c_taxregister where c_taxregister.C_TAXPAYMENT_ID=TO_NUMBER(?)
+      	
+      ]]>
+  </Sql>
+  <Parameter name="taxpayment_id"/>
+  
+  </SqlMethod>
+  
+  <SqlMethod name="calculateVatPayment" type="preparedStatement" return="String">
+  <SqlMethodComment>Update Tax Register Totals</SqlMethodComment>
+  <Sql>
+  <![CDATA[
+  	   select sum(case when  c_taxregister.C_TAXREGISTER_TYPE_ID in 
+        (select C_TAXREGISTER_TYPE_ID from c_taxregister_type where c_taxregister_type.ISSOTRX='Y')
+        then coalesce(taxtotalamt,0) - coalesce(lastregaccumamt,0)
+        else coalesce(lastregaccumamt,0) - coalesce(taxtotalamt,0) end ) as VatPayment
+        from c_taxregister where c_taxregister.C_TAXPAYMENT_ID=TO_NUMBER(?)
+      	
+      ]]>
+  </Sql>
+  <Parameter name="taxpayment_id"/>
+  
+  </SqlMethod>
+ 
+ 
+</SqlClass>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/erpReports/TaxRegisterTypeLines_data.xsql	Tue Jun 24 17:33:07 2008 +0000
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html 
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License. 
+ * The Original Code is Openbravo ERP. 
+ * The Initial Developer of the Original Code is Openbravo SL 
+ * All portions are Copyright (C) 2001-2006 Openbravo SL 
+ * All Rights Reserved. 
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+-->
+
+
+
+<SqlClass name="TaxRegisterTypeLinesData" package="org.openbravo.erpReports">
+
+ <SqlMethod name="select" type="preparedStatement" return="multiple">
+  <SqlMethodComment>All Tax Register Type Lines of one Tax Register Type </SqlMethodComment>
+  <Sql>
+  <![CDATA[
+        SELECT AD_Client_ID, AD_Org_ID, C_TaxRegister_Type_ID, RegisterName, Ad_Sequence_ID, C_GLitem_ID, IsSoTrx
+			FROM C_TAXREGISTER_TYPE
+			WHERE ISACTIVE='Y' 
+			And C_TaxRegister_Type_ID = ? 
+      ]]>
+  </Sql>
+  <Parameter name="taxregister_type_id"/>
+  </SqlMethod>
+  
+</SqlClass>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/erpReports/TaxRegisterType_data.xsql	Tue Jun 24 17:33:07 2008 +0000
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html 
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License. 
+ * The Original Code is Openbravo ERP. 
+ * The Initial Developer of the Original Code is Openbravo SL 
+ * All portions are Copyright (C) 2001-2006 Openbravo SL 
+ * All Rights Reserved. 
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+-->
+
+
+
+<SqlClass name="TaxRegisterTypeData" package="org.openbravo.erpReports">
+
+  <SqlMethod name="select" type="preparedStatement" return="multiple">
+  <SqlMethodComment>All Active Tax Register Type  </SqlMethodComment>
+  <Sql>
+  <![CDATA[
+        SELECT AD_Client_ID, AD_Org_ID, C_TaxRegister_Type_ID, RegisterName, Ad_Sequence_ID, C_GLitem_ID, IsSoTrx
+			FROM C_TAXREGISTER_TYPE
+			WHERE ISACTIVE='Y'
+      ]]>
+  </Sql>
+  </SqlMethod>
+ 
+  
+</SqlClass>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/erpReports/TaxRegister_data.xsql	Tue Jun 24 17:33:07 2008 +0000
@@ -0,0 +1,215 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html 
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License. 
+ * The Original Code is Openbravo ERP. 
+ * The Initial Developer of the Original Code is Openbravo SL 
+ * All portions are Copyright (C) 2001-2006 Openbravo SL 
+ * All Rights Reserved. 
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+-->
+
+
+
+<SqlClass name="TaxRegisterData" package="org.openbravo.erpReports">
+
+  <SqlMethod name="select" type="preparedStatement" return="multiple">
+  <SqlMethodComment>Active Tax Register </SqlMethodComment>
+  <Sql>
+  <![CDATA[
+        SELECT AD_Client_ID, AD_Org_ID, C_TaxRegister_ID,  C_TaxPayment_ID, LastRegAccumAmt , TaxTotalAmt , C_TaxRegister_Type_ID, Name ,PageNo  
+			FROM C_TAXREGISTER
+			WHERE ISACTIVE='Y'
+			And C_TaxRegister_ID = ?
+      ]]>
+  </Sql>
+  <Parameter name="taxregister_id"/>
+  </SqlMethod>
+ 
+  <SqlMethod name="selectChild" type="preparedStatement" return="multiple">
+  <SqlMethodComment>Active Tax Register </SqlMethodComment>
+  <Sql>
+  <![CDATA[
+        SELECT AD_Client_ID, AD_Org_ID, C_TaxRegister_ID,  C_TaxPayment_ID, LastRegAccumAmt , TaxTotalAmt , C_TaxRegister_Type_ID, Name ,PageNo  
+			FROM C_TAXREGISTER
+			WHERE ISACTIVE='Y'
+			And C_TaxPayment_ID = ?
+      ]]>
+  </Sql>
+  <Parameter name="taxpayment_id"/>
+  </SqlMethod>
+  
+  <SqlMethod name="insert" type="preparedStatement" return="rowcount">
+  <SqlMethodComment>Active Tax Register </SqlMethodComment>
+  <Sql>
+  <![CDATA[
+  		INSERT INTO C_TAXREGISTER 
+  		(AD_Client_ID, AD_Org_ID, C_TaxRegister_ID, C_TaxPayment_ID, C_TaxRegister_Type_ID,PageNo,NAME,ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY)
+  		VALUES 
+  		(TO_NUMBER(?),TO_NUMBER(?),TO_NUMBER(?),TO_NUMBER(?),TO_NUMBER(?),TO_NUMBER(?), ? ,'Y', now(), TO_NUMBER(?), now(), TO_NUMBER(?))
+ 		
+      ]]>
+  </Sql>
+  <Parameter name="client_id"/>
+  <Parameter name="org_id"/>
+  <Parameter name="taxregister_id"/>
+  <Parameter name="taxpayment_id"/>
+  <Parameter name="taxregister_type_id"/>
+  <Parameter name="pageno" default='0'/>
+  <Parameter name="name" />
+  <Parameter name="createdby"/>
+  <Parameter name="updateby"/>
+  </SqlMethod>
+  
+  <SqlMethod name="insertLines" type="preparedStatement" return="rowcount">
+  <SqlMethodComment>Insert Tax Register Lines</SqlMethodComment>
+  <Sql>
+  <![CDATA[
+  		INSERT INTO C_TAXREGISTERLINE 
+  		(AD_Client_ID, AD_Org_ID, C_TaxRegisterLine_ID, C_TaxRegister_ID, C_InvoiceTax_ID, DocumentNO,C_Tax_ID,
+  		TAXBASEAMT,TAXAMT,TAXUNDAMT,EXEMPTAMT,NOVATAMT,TOTALAMT,INVOICEDATE, NAME,ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY)
+  		VALUES 
+  		(TO_NUMBER(?),TO_NUMBER(?),TO_NUMBER(?),TO_NUMBER(?),TO_NUMBER(?),TO_NUMBER(?),TO_NUMBER(?),TO_NUMBER(?),
+  		TO_NUMBER(?),TO_NUMBER(?),TO_NUMBER(?),TO_NUMBER(?),TO_NUMBER(?),TO_DATE( ? ,'DD/MM/YYYY') , ?,'Y', now(), TO_NUMBER(?), now(), TO_NUMBER(?))
+ 		
+      ]]>
+  </Sql>
+  <Parameter name="client_id"/>
+  <Parameter name="org_id"/>
+  <Parameter name="taxregisterline_id"/>
+  <Parameter name="taxregister_id"/>
+  <Parameter name="invoicetax_id"/>,
+  <Parameter name="documentno" default='0'/>
+  <Parameter name="tax_id"/>
+  
+  <Parameter name="taxbaseamt" default='0'/>
+  <Parameter name="taxamt" default='0'/>
+  <Parameter name="taxundamt" default='0'/>
+  <Parameter name="exemptamt" default='0'/>
+  <Parameter name="novatamt" default='0'/>
+  <Parameter name="totalamt" default='0'/>
+  <Parameter name="invoicedate" />
+  <Parameter name="name" />
+  <Parameter name="createdby"/>
+  <Parameter name="updateby"/>
+
+  </SqlMethod>
+  
+  <SqlMethod name="updateTaxTotalAmt" type="preparedStatement" return="rowcount">
+  <SqlMethodComment>Update Tax Register Totals</SqlMethodComment>
+  <Sql>
+  <![CDATA[
+  		UPDATE C_TAXREGISTER 
+  		SET TAXTOTALAMT =
+  		coalesce((SELECT SUM(TAXAMT) FROM C_TAXREGISTERLINE WHERE C_TAXREGISTER_ID=TO_NUMBER(?)),0)
+  	    WHERE C_TAXREGISTER_ID=TO_NUMBER(?) 		
+      ]]>
+  </Sql>
+  <Parameter name="taxregister_id"/>
+  <Parameter name="taxregister_id"/>
+  </SqlMethod>
+
+<SqlMethod name="updateLastRegAccumAmt" type="preparedStatement" return="rowcount">
+  <SqlMethodComment>Update Tax Register Totals</SqlMethodComment>
+  <Sql>
+  <![CDATA[
+  	   UPDATE C_TAXREGISTER 
+  	   SET LASTREGACCUMAMT =
+  	   (SELECT TAXTOTALAMT FROM C_TAXREGISTER WHERE C_TAXREGISTER_ID=
+  	   (SELECT MAX(C_TAXREGISTER_ID) FROM C_TAXREGISTER, C_TAXPAYMENT
+  	   WHERE C_TAXREGISTER_ID <> TO_NUMBER(?)
+  	   AND C_TAXREGISTER_TYPE_ID = TO_NUMBER(?)
+  	   AND C_TAXREGISTER.C_TAXPAYMENT_ID=C_TAXPAYMENT.C_TAXPAYMENT_ID
+  	   AND C_TAXPAYMENT.DATETO = TO_DATE( ? ,'DD/MM/YYYY')-1
+  	   AND C_TAXPAYMENT.PROCESSED='Y')) 
+  	   WHERE C_TAXREGISTER_ID=TO_NUMBER(?)		
+      ]]>
+  </Sql>
+  <Parameter name="taxregister_id"/>
+  <Parameter name="taxregistertype_id"/>
+  <Parameter name="datefrom"/>
+  <Parameter name="taxregister_id"/>
+  
+  </SqlMethod>
+  
+  <SqlMethod name="updateRegAccumAmt" type="preparedStatement" return="rowcount">
+  <SqlMethodComment>Update Tax Register Totals</SqlMethodComment>
+  <Sql>
+  <![CDATA[
+  	   UPDATE C_TAXREGISTER 
+  	   SET LASTREGACCUMAMT =  
+  	   COALESCE( 
+  	   (SELECT TAXTOTALAMT FROM C_TAXREGISTER WHERE C_TAXREGISTER_ID=
+  	   (SELECT MAX(C_TAXREGISTER_ID) FROM C_TAXREGISTER, C_TAXPAYMENT
+  	   WHERE C_TAXREGISTER_ID <> TO_NUMBER(?)
+  	   AND C_TAXREGISTER_TYPE_ID = TO_NUMBER(?)
+  	   AND C_TAXREGISTER.C_TAXPAYMENT_ID=C_TAXPAYMENT.C_TAXPAYMENT_ID
+  	   AND C_TAXPAYMENT.DATETO = TO_DATE( ? ,'DD/MM/YYYY')-1
+  	   AND C_TAXPAYMENT.PROCESSED='Y'
+  	   AND C_TAXPAYMENT.GENERATEPAYMENT='N'))
+  	   ,0)
+  	   +
+  	   COALESCE( 
+  	   (SELECT LASTREGACCUMAMT FROM C_TAXREGISTER WHERE C_TAXREGISTER_ID=
+  	   (SELECT MAX(C_TAXREGISTER_ID) FROM C_TAXREGISTER, C_TAXPAYMENT
+  	   WHERE C_TAXREGISTER_ID <> TO_NUMBER(?)
+  	   AND C_TAXREGISTER_TYPE_ID = TO_NUMBER(?)
+  	   AND C_TAXREGISTER.C_TAXPAYMENT_ID=C_TAXPAYMENT.C_TAXPAYMENT_ID
+  	   AND C_TAXPAYMENT.DATETO = TO_DATE( ? ,'DD/MM/YYYY')-1
+  	   AND C_TAXPAYMENT.PROCESSED='Y'
+  	   AND C_TAXPAYMENT.GENERATEPAYMENT='N'))
+  	   ,0)
+  	   WHERE C_TAXREGISTER_ID=TO_NUMBER(?)		
+      ]]>
+  </Sql>
+  <Parameter name="taxregister_id"/>
+  <Parameter name="taxregistertype_id"/>
+  <Parameter name="datefrom"/>
+  <Parameter name="taxregister_id"/>
+  <Parameter name="taxregistertype_id"/>
+  <Parameter name="datefrom"/>
+  <Parameter name="taxregister_id"/>
+  
+  </SqlMethod>
+  
+  <SqlMethod name="selectPageNoPrior" type="preparedStatement" return="string">
+  <SqlMethodComment>select PageNo Prior Period</SqlMethodComment>
+  <Sql>
+  <![CDATA[
+  select coalesce(max(taxreg.pageno),0) 
+  from c_taxregister taxreg,c_taxpayment taxpay 
+  where 
+  	  taxpay.c_taxpayment_id = taxreg.c_taxpayment_id
+  and to_char(taxpay.datefrom,'YYYY') = to_char(now(),'YYYY')
+  and ( taxpay.processed = 'Y' or taxpay.c_taxpayment_id=
+  (select c_taxpayment_id from c_taxregister where c_taxregister_id = ? ) )
+  and 1=1	
+      ]]>
+  </Sql>
+  <Parameter name="parTaxRegId"/>
+  <Parameter name="parTaxRegId" optional="false" after="and 1=1"><![CDATA[ and taxreg.c_taxregister_id <> ?  ]]></Parameter>
+  </SqlMethod>
+  
+  <SqlMethod name="updatePageNo" type="preparedStatement" return="rowcount">
+  <SqlMethodComment>Update Page No</SqlMethodComment>
+  <Sql>
+  <![CDATA[
+  		update c_taxregister
+  		set pageno= ? 
+  		where c_taxregister_id = ?  
+      ]]>
+  </Sql>
+  <Parameter name="pageno"/>
+  <Parameter name="taxregister_id"/>
+  </SqlMethod>
+
+</SqlClass>
Binary file web/images/CompanyLogo_big.png has changed