CiviCRM

Record billing name and address for each contribution record

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Fixed/Completed
  • Affects Version/s: 2.1
  • Fix Version/s: 2.2.0
  • Component/s: CiviContribute
  • Labels:
    None

Description

1. Insert a new address record linked to the contribution for every contribution where we collect billing info:
1.1 Add address_id to contribution
1.2 Create a function to insert the contribution's address record:
 - address.contact_id is NULL
  - is_billing = true
  - concatenate first, middle and last name from billing form block - with Ctrl+A separator between each field and write this to civicrm_address.name column (this will allow us to easily parse the name later if needed)

2. PostProcess rules for online contributions, online event registration, submit cc contribution, submit cc membership, submit cc event registration:
2.1 Make sure we never overwrite existing contact name from billing block (only write billing name values to contact table if first, middle, last are NULL).
2.2 Online contribution / event registration for Anonymous user:
  if dupematch and is_billing address record exists:
- over-write existing address record
- insert new address record for the contribution
else : create 2 address records, 1 is linked to contact and is_billing = true and 1 for the contribution record

2.3 Online contribution / event registration for Logged In user:
 - check for an address with is_billing = true, and setDefaults() in billing block if we find one
 - PostProcess
- update or insert contact's is_billing address record from form values, use default location_type if inserting new address
- insert new address record for contribution

3. View Contribution (civicrm/contact/view/contribution)
 - If there is an address record for the contribution, add a block ("Billing Name and Address") dislaying the billing name (civicrm_address.name) and formatted address data:

Dan D. Billmee
10 Main Street
New York, N.Y. 11092
United States

4. Upgrades
- alter table, add address_id to contribution table
- If location type = Billing (location_type_id = 5), then set civicrm_address.is_billing = 1

Note that we should delete address entries if contribution is deleted. Also don't create address entries for Pay Later and PayPal Standard / Google Checkout, since we don't have address block.

--- Original Post ----
The billing name should be recorded with the associated contribution and available for display/search.

Common situation arises where the credit card used for a purchase has a different name than the contact record. For example, a secretary using a company card to register another staff person for an event. When reconciling CiviCRM records with payment processing reports, it becomes difficult, as the CiviCRM registrant-contact may not be the credit card holder showing up on the payment processing report.

This behavior (recording billing name) should be active on both frontend and backend event registration forms.

Activity

Hide
Donald A. Lobo added a comment -

we should create a new column in contribution or financial trxn called billing_name and store this here. this then introduces the question of should we store the address. think about it and we can discuss next week
Show
Donald A. Lobo added a comment - we should create a new column in contribution or financial trxn called billing_name and store this here. this then introduces the question of should we store the address. think about it and we can discuss next week
Hide
Chris Mott added a comment -
I agree that dealing with billing and primary names and addresses better would be good.

As a side note, I found a useful way to circumvent most of this issue in 2.1. I added a profile with first name, last name, and primary address into the top of the form. Conveniently, the ordering of the data processing worked out very nicely in the back end:

1. billing name & billing address are send to the payment processor
2. billing address saved in contact's billing address location
3. billing name saved as contact's name
4. primary address from profile save to contact's primary address
5. name from profile saved (overwritting the billing name) as the contact's name.

This allow separation of home and billing names and addresses, with the one catch that billing name is not persistently saved. If the user is logged in, then if they revisit the form their primary name, rather than the name they had previously entered as the billing name will show up as default in the billing name field.

Note that the proposed solution above, to store billing name with a transaction wouldn't solve the issue of saving a persistent default billing name (you'd need billing name associated with the billing address for that). It wouldn't be mission critical to load forms with default billing name though, as retyping this is not as much burden as the address.

I'll attach a screenshot of what I've done. The form has extra length, but we've dealt with that with some jquery code in an 'Billing same as above'. Although this is profiel approach is replicable, providing an option like this as part of out-of-the box functionality would be useful in allowing people to easily bring the payment processor form up to industry standards.
Show
Chris Mott added a comment - I agree that dealing with billing and primary names and addresses better would be good. As a side note, I found a useful way to circumvent most of this issue in 2.1. I added a profile with first name, last name, and primary address into the top of the form. Conveniently, the ordering of the data processing worked out very nicely in the back end: 1. billing name & billing address are send to the payment processor 2. billing address saved in contact's billing address location 3. billing name saved as contact's name 4. primary address from profile save to contact's primary address 5. name from profile saved (overwritting the billing name) as the contact's name. This allow separation of home and billing names and addresses, with the one catch that billing name is not persistently saved. If the user is logged in, then if they revisit the form their primary name, rather than the name they had previously entered as the billing name will show up as default in the billing name field. Note that the proposed solution above, to store billing name with a transaction wouldn't solve the issue of saving a persistent default billing name (you'd need billing name associated with the billing address for that). It wouldn't be mission critical to load forms with default billing name though, as retyping this is not as much burden as the address. I'll attach a screenshot of what I've done. The form has extra length, but we've dealt with that with some jquery code in an 'Billing same as above'. Although this is profiel approach is replicable, providing an option like this as part of out-of-the box functionality would be useful in allowing people to easily bring the payment processor form up to industry standards.
Hide
Brian Shaughnessy added a comment -
That workaround doesn't help with backend processing. If an admin is running a credit card through the backend interface, entering the billing name overwrites the contact name for the record.
Show
Brian Shaughnessy added a comment - That workaround doesn't help with backend processing. If an admin is running a credit card through the backend interface, entering the billing name overwrites the contact name for the record.
Hide
David Greenberg added a comment -
NOTE: We'll offer a better solution for the reconciliation use case by including the billing name and address values in contribution exports in the 2.3 release:
http://issues.civicrm.org/jira/browse/CRM-3811
Show
David Greenberg added a comment - NOTE: We'll offer a better solution for the reconciliation use case by including the billing name and address values in contribution exports in the 2.3 release: http://issues.civicrm.org/jira/browse/CRM-3811
Hide
David Greenberg added a comment -
Tested w/ r17981 and all functionality works as spec'd except:

- Address display block needs to be added to the View Contribution page (item 3 above)
Show
David Greenberg added a comment - Tested w/ r17981 and all functionality works as spec'd except: - Address display block needs to be added to the View Contribution page (item 3 above)
Hide
Kurund Jalmi added a comment -
- fixed in rev 18289
Show
Kurund Jalmi added a comment - - fixed in rev 18289
Hide
Kurund Jalmi added a comment -
Batch move to verification
Show
Kurund Jalmi added a comment - Batch move to verification
Hide
Yashodha Chaku added a comment -
assigning for 3.0 QA
Show
Yashodha Chaku added a comment - assigning for 3.0 QA
Hide
Sushant Paste added a comment -
tested & verified in r23282.
Show
Sushant Paste added a comment - tested & verified in r23282.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: