Initial commit of MAXLive_Rates_Create PHP script
Added import CSV private function and created process to validate column headers from the imported data
Added processes to query database for all data in preparation for creating locations, offloading customers, links, routes and rates. Created layout for all steps and copied code for each section from NCP rates script. Need to amend code.
Fixed copying of code layout as there where some extra braces that should have not been there.
Amended locations code to search deeper for locations not found and if still not found then create location.
Further amended location create processes for both point and city type locations. Also added a parent tree location builder using an intial parent location to build tree up until the country location. To test and confirm functionality of location check and create code.
Completed the location validate and create if does not exist process for both cities and points as well as zones. Moving onto checking links for location exist for the customer and if not create them.
Added more preparation of variables to query customer location and offloading customer links if the location or offloading customer exists and then store the links into the corresponding records data for use further into the script.
Completed two major processes: Location create link to customer and offloading customer create and link to customer if offloading customer does not exist. Moving onto Routes and rates process to complete script.
Completed route, rate and rate value check and create processes. Script to tested and debugged before putting into production.
Added try catch exception error handling for each process
Added bug fixes:
line 383 - array was not point correctly to string value. Fixed.
line 754 - bad index value for array. Fixed.
line 950 - using old script variable. Updated to correct variable to point to correct value.
Bug Fix:
Moved declaration of routeName variable used to select the MAX route name on the route and rate page.
Bug Fix:
line 939 - Using array instead of string when point to a mutlidimensional array tree value. Fixed.
line 822 - Using incorrect value for multidimensional array. Fixed.
Removed query for contribution model data from sql as I was using the wrong model table. Exact contrib value needs to be supplied in csv file.
added some print lines to debug problem areas. Specifically in the offloading customer create process and rates confirm created process.
Removed duplicated query to get variable for objectRegisty ID for udo_Customer.
Bug Fix:
Found mispelt variable. $_objectregistry_id => $objectregistry_id. Fixed.
Amended rate value add process to rather loop through each date range value including rate contribution values using existing rate value add code.
Bug Fix:
Fixed bad pointer to array variable.