-
Notifications
You must be signed in to change notification settings - Fork 448
SPIKE Move Donations from FamilyID to PersonID
Robert Spencer edited this page Jun 13, 2024
·
8 revisions
Donations are currently tracked by the giving family. This causes difficulty with IRS reporting of donations made by members living in the same household, but filing taxes separately.
- All pledges (past and future) are assigned to an account. Accounts may be owned by families or persons.
- Tax reports are updated to reflect accounts
- A Family Giving report is created to show all donations from accounts owned by members of the family.
- PledgeEditor is deprecated in favor of double-entry splits from a donor account to a designated fund account.
- FamilyView is updated to display total giving from all accounts owned by all members of the family.
- PersonView is updated to display the person's giving (borrow logic from existing FamilyView)
- Split-Fund donations remain intact (i.e. a single payment can be split between multiple donation funds)
- All donation database interactions are handled via the ORM. All Legacy SQL Concatenated strings are removed.
- Permissions are respected
- Only members with bFinance, or self are able to see donations.
autopayment_aut
deposit_dep
donationfund_fun
egive_egv
family_fam
person_per
pledge_plg
eGive.php
SelectDelete.php
ZeroGivers.php
VotingMembers.php
TaxReport.php
ReminderReport.php
PledgeSummary.php
FamilyPledgeSummary.php
AdvancedDeposit.php
PledgeEditor.php
PledgeDetails.php
PledgeDelete.php
Functions.php
FamilyView.php
FinancialService.php
FinancialReports.php
- Family
- Person
- Pledge
- Deposit
- DonationFund
-
pledge_plg
uses "groupkey" to "group" split pledges across different funds. This key includes the family id. Will need a migration script to update these group keys.- GroupKey is a string concatenation of
$methodSpecificID.'|'.$uniqueNum.'|'.$famID.'|'.$fundIDs.'|'.$date;
as defined in https://github.com/ChurchCRM/CRM/blob/master/src/Include/Functions.php#L1873
- GroupKey is a string concatenation of
- This database migration will be complex, and possibly beyond what's reasonable within MySQL. A PHP-based upgrade script will probably be necessary. Tracking in #2983
- The double entry framework will create an "assets" account that will only grow since the users are not creating "expense" journal entries. As journal entries from donor accounts to donation funds accrue without related expenses, the donation fund accounts will not be accurate if/when expense tracking is created. This will require a journal entry to "zero-out" or "balance" the relevant donation fund accounts.
Four new tables will be necessary for this adjustment, and to pave the way for a future complete double-entry accounting platform.
This schema change is inspired by the GNUCash schema implementation and relationship graph
- Accounts may be:
- Donor accounts (INCOME)
- Donation Funds (ASSET)
- This table links accounts to the account owner(s).
- An account may be owned by one or more person, a group, or a family.
- Transactions "link together" individual splits (or payments)
- This table will clean-up the ugly "group key" issue we have now.
- All transactions must have two or more splits with credits and debits being equal.
- Each split represents either a credit or a debit from an account
- Create new tables defined above
- Create new account for each family
- Create account owner link to that family.
- If system has "bEnableNonDeductible" enabled, create secondary account for the family for non-deductible contributions. Link ownership
- Iterate through each pledge
- Lookup family account (and optionally non-deductible account)
- Lookup the donation fund account
- Create a transaction to which all splits are linked.
- Create a split debiting the family account for the tax-deductible value
- Create a split crediting the donation fund account for the tax-deductible value
- Create a split debiting the family account for the NON tax-deductible value
- Create a split crediting the donation fund account for the NON tax-deductible value