Business Rules for Address Handling
Jump to navigation
Jump to search
Address Added / Changed
- If a Location got added: make sure that Location 0 is no longer mapped to the Partner
- Solution:
- This is done silently in Method TPPartnerAddressAggregate.MakeSureLocation0IsNotPresent.
- Solution:
- For FAMILY Partners: if a Location got added give option to apply to all family members
- Solution:
- Ask question when saving, showing address data of the affected address
- If user wants to add it to all family members, set field 'UserAnswer' to 'YES' in the corresponding record in Typed DataTable AddressAddedOrChangedPromotion
- Adding of addresses to Family Members is done in TPPartnerAddressAggregate.PerformLocationFamilyMemberPropagationChecks
- Solution:
- If a Location got added or changed: check if similar Location exists and give user the option to use the existing Location
- Solution :
- Ask question when saving
- If user wants to use existing Location, change the LocationKey of the Location to the LocationKey of the existing Location
- Functionality found in TPPartnerAddressAggregate.PerformLocationReUseChecks
- Solution :
- If a Location is changed: if this Location is used by other Partners let the user select those Partners whose Location should be changed as well
- Details: In case the user selects all Partners, the shared Location is simply updated. In case the user selects no Partners, a new Location is created and applied to the current partner only. In case the user selects some Partners, a new Location is created and applied to the current partner and all selected Partners.
- Solution:
- Bring up a selection dialog that shows all Partners with the same LocationKey when saving (data for that comes in the Typed DataTable ChangePromotionParameters, which is generated in function TPPartnerAddressAggregate.CheckLocationChange)
- The records that got selected by the user will be put into the in Typed DataTable AddressAddedOrChangedPromotion (PartnerKeys of the selected partner get concatenated and are put in the field 'UserAnswer').
- The changing of PartnerLocations / creation of new PartnerLocation for the Partner(s) is done in TPPartnerAddressAggregate.PerformLocationChangeChecks
- Bring up a selection dialog that shows all Partners with the same LocationKey when saving (data for that comes in the Typed DataTable ChangePromotionParameters, which is generated in function TPPartnerAddressAggregate.CheckLocationChange)
- Solution:
- Details: In case the user selects all Partners, the shared Location is simply updated. In case the user selects no Partners, a new Location is created and applied to the current partner only. In case the user selects some Partners, a new Location is created and applied to the current partner and all selected Partners.
- For FAMILY Partners: if certain PartnerLocation details are changed give option to apply this change to some Persons
- Details: Changed fields of the PartnerLocation record of the Family should get copied over to the PartnerLocation records of the selected Persons. The changes that were done should be displayed to the user (Field's Label [Name on Screen], old value, new value).
- Solution:
- Bring up a selection dialog that shows all Family members when saving (data for that comes in the Typed DataTable ChangePromotionParameters, which is generated in function TPPartnerAddressAggregate.CheckPartnerLocationChange)
- The records that got selected by the user will be put into the AddressAddedOrChangedPromotion table, one for each selected person (specified in p_partner_key_n).
- The changing of PartnerLocations for family members is done in TPPartnerAddressAggregate.PerformPartnerLocationChangeChecks
- Bring up a selection dialog that shows all Family members when saving (data for that comes in the Typed DataTable ChangePromotionParameters, which is generated in function TPPartnerAddressAggregate.CheckPartnerLocationChange)
- Solution:
- Details: Changed fields of the PartnerLocation record of the Family should get copied over to the PartnerLocation records of the selected Persons. The changes that were done should be displayed to the user (Field's Label [Name on Screen], old value, new value).
- For FAMILY Partners: if DateGoodUntil in PartnerLocation has changed silently apply this to all family members
- Solution:
- This is done in TPPartnerAddressAggregate.PromoteToFamilyMembersDateGoodUntilChange
- Solution: