Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Critical
-
Resolution: Won't Fix
-
Affects Version/s: 4.3.3
-
Fix Version/s: 4.3.4
-
Component/s: Accounting Integration, CiviContribute
-
Labels:None
Description
1. Create a price set with one field of type "checkbox". Add three checkbox options, and link each one to a different fintype. (Critically, note that each checkbox has a different value – e.g. $10, $15, $30)
2. Use the "Create Contribution" (backend) form to record a contribution with the new priceset
- In filling out the contribution data, choose all three checkboxes.
- In filling out the payment data, use cash.
- Submit the contribution.
3. Prepare a batch with the new contribution.
4. Export the batch (CSV).
5. Review the batch data. There are three separate rows (one corresponding to each of the three checked boxes). However, the debits/credits don't match--the debit to the bank account in each of the three rows is the sum of all three credits to the various income accounts.
I ran this on the demo site and have attached the export. The checkboxes were 10, 25, and 32 euros, respectively.
Supplement:
With a different payment instrument this causes a crash:
1. Create a price set with one field of type "checkbox". Add three checkbox options, and link each one to a different fintype (Campaign Contribution, Member Dues, and Donation).
2. Use the "Create Contribution" (backend) form to record a contribution with the new priceset
3. In filling out the contribution data, choose all three checkboxes.
4. In filling out the payment data, use a credit card. (I think this was with the dummy payment processor, but maybe Andrew can correct it.)
5. Submit => Form crashes (yellow screen, DB error)
Pradeep, now that the payment instrument is used to determine the financial account for the financial_trxn, it should not be an issue for different line items to have different financial types. Can you review the code? The first issue sounded initially like it was an issue in the export code, but the supplement makes me wonder if the problem is how information is recorded. Very possibly there are two distinct bugs that were introduced when the design changed during QA.
Pradeep: Let's put in a config check to ensure that a payment processor has a financial type assigned to it with a relationship to an Asset account before we allow it to be used for a contribution page, event, or backoffice transaction (donation, membership, event). Also, check this when doing relevant updates, and also don't allow removal of this relationship from an FT if the FT is in use for a payment processor.