How to connect a contribution to its proper GL code in SQL?

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?

Parents Reply
  • And it depends whether or not you are looking for the GL reporting on the payment or GL reporting on the contribution.  E.g. a $500 contribution, when posted, will post a +$500 to the payment method GL and a -$500 to the contribution GL.  (Unless I flipped them.)

    For the contribution side of things, I wrote a view for our organization that links Funds and Appeals to make reporting easier since Funds are assigned to Campaigns with start and end dates.

Children
No Data