Ocean West Posted February 26, 2016 Posted February 26, 2016 Basic database Customer --< Location ---< Invoices UID keys to foreign keys pretty typical... However the billing company is changing for many locations - it was a distributorship that is winding down and each location are going to be billed directly.. To preserve historical data. one thought would be to ad a multi predicate between locations and Invoices so that oldCustomer / location invoices remain linked and when the new customer UID is assigned to the location only new invoices are connected. other though was to add GetContainerAttribute ( List ( customer_UID ; location_id) ; "md5" ) to the location table and use that as the key between location & invoice. they both do the trick but I am probably making it much more convoluted then need be. OR the real solution would be to create a script to duplicate the location assign a new customer - and then setting status on the prior customer / location to closed. and of course script duplicate all the associated tables that are needed for future invoices. But then trying to consolidate reports by location / company will be fun.
Recommended Posts
This topic is 3204 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now