Details
-
Type: New Feature
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.5
-
Fix Version/s: 4.5
-
Component/s: CiviContribute, CiviEvent
-
Labels:None
-
Epic Link:
Description
-------------
Summary
-------------
Back-office staff may:
- Record partial payment for an event registration.
- Both the contribution and the participant record will be assigned a status of Partially Paid until the balance owing is zero. This will allow staff to easily locate partially paid registrations.
---------------------
Implementation
----------------------
1. Define new participant status: 'Partially paid'
- Status is 'Counted', Class='Positive', Reserved=TRUE, Visibility=Admin, Active=TRUE
- Add to civicrm_data
- Insert in upgrades
2. Define new contribution status: 'Partially paid'
- Reserved=TRUE, Active=TRUE
- Add to civicrm_data
- Insert in upgrades
3. New Event Registration (modifications)
Currently (4.4) the Total Amount (Payment Info field set) defaults to total owing AND the user can change that to a smaller amount. However we don't do anything special in that case. We need to make the following changes to postProcessing to handle this condition.
Client Side form behaviors (jQuery)
------------------------------------------------
- If user enters a Total Amount less than the calculated total fee, set Participant Status to 'Partially paid' (user MAY override this and change it to something else later)
- When user clicks "Save", if the Total Amount entered is less than calculated fees AND the participant status != 'Partially paid', put up a jScript confirm dialog:
"Payment amount is less than the amount owed. Expected participant status is 'Partially paid'. Are you sure you want to set the participant status to $statusLabel? Click OK to continue, Cancel to change your entries."
Post Process changes
-------------------------------
- New contribution record is always inserted with the total OWING (calculated fees) as the total_amount. If total_amount = total owing, NO changes in the rest of the postProcess flow.
If the total_amount on the form is less than the amount owing:
- Contribution status is set to 'Partially paid'.
- Financial trxn record is created with total_amount = the amount actually being paid (total_amount from the form). Financial_trxn status is Completed. TO account = the applicable ASSET account (based in payment_instrument)
- A second financial_trxn record is created for the BALANCE owing. Rules for setting values for this transaction are the same as for a new Pending pay-later transaction:
- to_financial_account_id = account with "Accounts Receivable Account is" relationship to the financial type of the contribution
- from_financial_account_id = NULL
- status = Completed
- Line item records are created as usual.
- Financial item records are created for each line item as usual. Financial_item status = 'Partially paid'.
- Create civicrm_entity_financial_trxn records as per the base data flow: http://wiki.civicrm.org/confluence/display/CRM/CiviAccounts+4.3+Data+Flow#CiviAccounts4.3DataFlow-Offlinecompletedcontribution%28
Tests
-------
- Extend unit tests to cover participant create with partial payment
- Extend web-tests to cover the above workflow (participant registration with partial payment)