Merge pull request #1900 from garyhgohoos/24684
authorGreg Pazo <gpazo@xtuple.com>
Fri, 3 Oct 2014 21:47:48 +0000 (17:47 -0400)
committerGreg Pazo <gpazo@xtuple.com>
Fri, 3 Oct 2014 21:47:48 +0000 (17:47 -0400)
Issue #24684:add filter for funds type

foundation-database/public/tables/metasql/cashReceipts-detail.mql

index 0464b98..b365f97 100644 (file)
@@ -221,6 +221,9 @@ WHERE ( (cashrcpt_distdate BETWEEN <? value("startDate") ?> AND <? value("endDat
   AND   (custgrpitem_custgrp_id=<? value("custgrp_id") ?>)
 <? elseif exists("custtype_pattern") ?>
   AND   (cust_custtype_id IN (SELECT custtype_id FROM custtype WHERE (custtype_code ~ <? value("custtype_pattern") ?>)))
+<? endif ?>
+<? if exists("fundstype") ?>
+  AND   (cashrcpt_fundstype=<? value("fundstype") ?>)
 <? endif ?>
       )
 
@@ -260,6 +263,9 @@ WHERE ( (cashrcpt_distdate BETWEEN <? value("startDate") ?> AND <? value("endDat
   AND   (custgrpitem_custgrp_id=<? value("custgrp_id") ?>)
 <? elseif exists("custtype_pattern") ?>
   AND   (cust_custtype_id IN (SELECT custtype_id FROM custtype WHERE (custtype_code ~ <? value("custtype_pattern") ?>)))
+<? endif ?>
+<? if exists("fundstype") ?>
+  AND   (cashrcpt_fundstype=<? value("fundstype") ?>)
 <? endif ?>
       )
 
@@ -291,6 +297,9 @@ WHERE ( (cashrcpt_distdate BETWEEN <? value("startDate") ?> AND <? value("endDat
   AND   (custgrpitem_custgrp_id=<? value("custgrp_id") ?>)
 <? elseif exists("custtype_pattern") ?>
   AND   (cust_custtype_id IN (SELECT custtype_id FROM custtype WHERE (custtype_code ~ <? value("custtype_pattern") ?>)))
+<? endif ?>
+<? if exists("fundstype") ?>
+  AND   (cashrcpt_fundstype=<? value("fundstype") ?>)
 <? endif ?>
       )
   ) AS data