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 ?>
)
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 ?>
)
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