modules/org.openbravo.client.querylist/src-db/database/sourcedata/OBCQL_WIDGET_QUERY.xml
changeset 10349 91555b05f01d
parent 9973 c82872d3f44c
child 10354 0ee185c69279
--- a/modules/org.openbravo.client.querylist/src-db/database/sourcedata/OBCQL_WIDGET_QUERY.xml	Thu Feb 03 09:21:58 2011 +0100
+++ b/modules/org.openbravo.client.querylist/src-db/database/sourcedata/OBCQL_WIDGET_QUERY.xml	Thu Feb 03 09:31:31 2011 +0100
@@ -9,8 +9,9 @@
 <!--1EF87E8E961A4E5BA3B41E1AB772B47C-->  <HQL><![CDATA[select inv.id as invoiceId, inv.documentNo as documentNo,
        inv.businessPartner.id as businessPartnerId, inv.businessPartner.name as businessPartnerName,
        inv.invoiceDate as invoiceDate, inv.grandTotalAmount as grandTotalAmount,
-       inv.paymentTerms.name as paymentTerms, inv.outstandingAmount as outstandingAmount,
-       inv.daysTillDue as daysTillDue, inv.dueAmount as dueAmount
+       inv.currency.iSOCode as currency, inv.paymentTerms.name as paymentTerms,
+       inv.outstandingAmount as outstandingAmount, inv.daysTillDue as daysTillDue,
+       inv.dueAmount as dueAmount, inv.organization.name as organizationName
 from Invoice as inv
 where inv.businessPartner.name like :businessPartnerName
       and inv.documentNo like :documentNo
@@ -18,6 +19,8 @@
       and inv.paymentComplete = false
       and inv.salesTransaction = true
       and inv.client.id = :client
+      and inv.organization.id in (:organizationList)
+      and inv.organization.name like :organizationName
       and @optional_filters@
 order by inv.invoiceDate]]></HQL>
 <!--1EF87E8E961A4E5BA3B41E1AB772B47C--></OBCQL_WIDGET_QUERY>
@@ -31,8 +34,9 @@
 <!--58BCB96595FA45678CC1423402238309-->  <HQL><![CDATA[select inv.id as invoiceId, inv.documentNo as documentNo,
        inv.businessPartner.id as businessPartnerId, inv.businessPartner.name as businessPartnerName,
        inv.invoiceDate as invoiceDate, inv.grandTotalAmount as grandTotalAmount,
-       inv.paymentTerms.name as paymentTerms, inv.outstandingAmount as outstandingAmount,
-       inv.daysTillDue as daysTillDue, inv.dueAmount as dueAmount
+       inv.currency.iSOCode as currency, inv.paymentTerms.name as paymentTerms,
+       inv.outstandingAmount as outstandingAmount, inv.daysTillDue as daysTillDue,
+       inv.dueAmount as dueAmount, inv.organization.name as organizationName
 from Invoice as inv
 where inv.businessPartner.name like :businessPartnerName
       and inv.documentNo like :documentNo
@@ -40,6 +44,8 @@
       and inv.paymentComplete = false
       and inv.salesTransaction = false
       and inv.client.id = :client
+      and inv.organization.id in (:organizationList)
+      and inv.organization.name like :organizationName
       and @optional_filters@
 order by inv.invoiceDate]]></HQL>
 <!--58BCB96595FA45678CC1423402238309--></OBCQL_WIDGET_QUERY>
@@ -52,7 +58,8 @@
 <!--E5A0DC8536134185AC8B1897F15DB816-->  <OBKMO_WIDGET_CLASS_ID><![CDATA[2662490B7D3B4F80AF308C88F6DB68C0]]></OBKMO_WIDGET_CLASS_ID>
 <!--E5A0DC8536134185AC8B1897F15DB816-->  <HQL><![CDATA[select p.id as finpaymentId, p.documentNo as documentNo,
        p.businessPartner.id as businessPartnerId, p.businessPartner.name as businessPartnerName,
-       p.paymentDate as paymentDate, p.amount as amount
+       p.paymentDate as paymentDate, p.amount as amount,
+       p.currency.iSOCode as currency, p.organization.name as organizationName
 from FIN_Payment as p
 where p.businessPartner.name like :businessPartnerName
       and p.documentNo like :documentNo
@@ -60,6 +67,8 @@
       and p.processed = true
       and p.receipt = true
       and p.status = 'RPAE'
+      and p.organization.id in (:organizationList)
+      and p.organization.name like :organizationName
       and @optional_filters@
 order by p.paymentDate]]></HQL>
 <!--E5A0DC8536134185AC8B1897F15DB816--></OBCQL_WIDGET_QUERY>
@@ -105,7 +114,8 @@
 <!--F94AEB4680AD4AD48255071903000A43-->  <OBKMO_WIDGET_CLASS_ID><![CDATA[F8E4F382BCFB441CADBB4AC693C41C93]]></OBKMO_WIDGET_CLASS_ID>
 <!--F94AEB4680AD4AD48255071903000A43-->  <HQL><![CDATA[select p.id as finpaymentId, p.documentNo as documentNo,
        p.businessPartner.id as businessPartnerId, p.businessPartner.name as businessPartnerName,
-       p.paymentDate as paymentDate, p.amount as amount
+       p.paymentDate as paymentDate, p.amount as amount,
+       p.currency.iSOCode as currency, p.organization.name as organizationName
 from FIN_Payment as p
 where p.businessPartner.name like :businessPartnerName
       and p.documentNo like :documentNo
@@ -113,6 +123,8 @@
       and p.processed = true
       and p.receipt = false
       and p.status = 'RPAE'
+      and p.organization.id in (:organizationList)
+      and p.organization.name like :organizationName
       and @optional_filters@
 order by p.paymentDate]]></HQL>
 <!--F94AEB4680AD4AD48255071903000A43--></OBCQL_WIDGET_QUERY>