Duplicate Billing location checkbox for a contact is allowed during inline address editing
Overview
In the case that someone has 2 addresses registered, they can flag both of them as billing location via the inline address editing checkbox which I believe is wrong. This behaviour does not replicate when you edit the contact.
I am assuming that this is not an intended behaviour.
Reproduction steps
- On the CiviCRM demo site go to the default
demo@example.com
contact. - Do an inline edit and add an address. Check the checkbox "Billing location for this contact".
- Add a 2nd address via inline editing and check again the checkbox "Billing location for this contact" on the 2nd address.
- Review both addresses, both got the "Billing location for this contact".
- Try to edit the contact using the edit button, check both checkboxes and save the form. Only one address gets the checkbox "Billing location for this contact".
Expected behaviour
There should be a validation while saving the inline address form to check if the checkbox is already being used in another address ID and if yes, it should not store the checkbox (or unset it).