Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.3.0
-
Fix Version/s: Unscheduled
-
Component/s: Accounting Integration
-
Labels:
-
Versioning Impact:Patch (backwards-compatible bug fixes)
-
Documentation Required?:None
-
Funding Source:Needs Funding
Description
Schema changes (for both civicrm_event and civicrm_contribution_page)
- is_partial_payment, boolean (default = 0): controls if partial payments are allowed for this event
- initial_amount_label, varchar (255)
NOTE: this was implemented as 'text', I changed to varchar - min_initial_amount, decimal
- initial_amount_help_text, text
As per the attached image, add a new Checkbox widget to Configure Events >Fees tab, and to Configure Online Contribution Page, Amounts tab
- label = "Enable partial payment option?" (is_partial_payment) - unchecked by default
Add div with following fields. Div is hidden unless is_partial_payment is checked.
Initial Amount Label
Minimum Initial Amount ($0.00 or more).
Initial Amount Help
When Enable partial payment option? is checked, Initial Amount and Minimum Initial Amount are REQUIRED.
For Event > Fees, change the label background color new fields so they match other fields on the form.
On event registration (Register.php) and online contribution form (Main.php):
- Replace hard-coded "Record smaller initial amount" checkbox label with initial_payment_label, and fix layout so that checkbox aligns properly
- Display initial_amount_help below initial_amount field
Verify the min_initial_amount is validated against initial_amount value on form submit. If not, display error: "Your initial payment must be at least $min_initial_amount."
Verify that the amount actually paid is displayed on confirm and thank-you pages, and is displayed on receipt for both event reg and online contribution.
Also verify this flow for online contribution page with membership sign-up (quick config)
Verify DB state to expected results for a quick config partial payment:
- one line_item row
- one financial_item for the total amount owing, financial_account_id is the Income Account of the Financial Type associated with the event or online contribution page or the price set field or field value.
- two financial_trxn rows:
- one for amount actually paid (to_financial_account is "Asset Account of" the Financial Type associated with the payment processor used to make the payment)
- one for remaining amount owed (to_financial_account is "Accounts Receivable Account of" the associated Financial Type)