Tengiz Merabishvili
FINA Ltd | ORACLE Gold Partner
------------------------------------------------------------------------------
Mifos-developer mailing list
mifos-d...@lists.sourceforge.net
Unsubscribe or change settings at:
https://lists.sourceforge.net/lists/listinfo/mifos-developer
For Savings
select sa.account_no as "Account Number", concat (ev.enum_value, " ", IFNULL(paymentType.code_value,"")) as "Activity Details", st.amount as "Amount", user.username as "Teller", pd.receipt_number as "Receipt Number"
from m_savings_account sa join m_savings_account_transaction st on sa.id = st.savings_account_id and st.transaction_type_enum in (1,2)
left join m_payment_detail pd on st.payment_detail_id = pd.id
left join r_enum_value ev on st.transaction_type_enum = ev.enum_id and ev.enum_name = "savings_transaction_type_enum"
left join m_appuser user on st.appuser_id = user.id
left join m_code_value paymentType on pd.payment_type_cv_id=paymentType.id
where (st.transaction_date between '2014-10-30' and '2014-10-30')
order by 2 DESC,ev.enum_value;
For Loan
select ml.account_no as "Account Number", concat (ev.enum_value, " ", IFNULL(paymentType.code_value,"")) as "Activity Details", lt.amount as "Amount", user.username as "Teller", pd.receipt_number as "Receipt Number"
from m_loan ml join m_loan_transaction lt on ml.id = lt.loan_id and lt.transaction_type_enum in (1,2)
left join m_payment_detail pd on lt.payment_detail_id = pd.id
left join r_enum_value ev on lt.transaction_type_enum = ev.enum_id and ev.enum_name = "transaction_type_enum"
left join m_appuser user on lt.appuser_id = user.id
left join m_portfolio_command_source processing_result_enum on lt.appuser_id = user.id
left join m_code_value paymentType on pd.payment_type_cv_id=paymentType.id
where (lt.transaction_date ='2014-10-30')
order by 2 DESC,ev.enum_value;
How do i made this date be picked automatically i.e current date since this report is run on daily basis.
lt.transaction_date =${.............}
Secondly, isn't there a way to make this two sql queries as one since this is to be on on paper, please kindly integrate to make work easy.
Thanks
Regards
Gloria
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk