I am building a custom report using SQL to better report on the finances around our contributions. Is there an easy identifier between T_CONTRIBUTION and gl_account_no other than using the T_FUND and then using a CASE statement to select the correct GL Code from there based on other factors?
Hi Robert,
I may be wrong (someone feel free to correct me!) but I believe the Fund associated with the Contribution is the only link for GLs.
Martin
Martin Keen (Past Member) said:I believe the Fund associated with the Contribution is the only link for GLs.
Yes. Can't we get to the exact GL via T_TRANSACTION -> Fund + pmt method?
So essentially, the payment method would be the deciding factor as to what GL the contribution should be assigned? Excuse me as I only know the SQL part of this, but not the accounting side, so wasn't sure how those 5 codes get assigned.
Robert Brannen said:So essentially, the payment method would be the deciding factor as to what GL the contribution should be assigned?
Sorry, I was incorrect above (never try to post from memory :-) Taking a look at T_TRANSACTION again I see it appears that Fund + trn_type is what I was thinking of. Several of the lowest ID, "required" transaction types in TR_TRANSACTION_TYPE correspond directly to the various Fund GLs.