author David Baz Fayos <>
Tue, 27 May 2008 15:26:10 +0000
changeset 1044 8691bbc94032
parent 727 23af88f55124
permissions -rw-r--r--
Removed old frame parameter of windowTableId
<?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 
 * 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">
  <SqlMethod name="select" type="preparedStatement" return="multiple">
 select,taxregline.documentno as DocNum,taxregline.created as RegDate , 
 inv.documentno as DocInv, 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.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
    <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 name="set" type="constant" return="multiple">