Open Nils85 opened 3 years ago
The default value should be "ES" (for Spain) when a company location is unknown. But currently the column ProvinceID is empty in the Company table when this situation happens. And anyway there is no ProvinceID = ES in the table Province...
See:
Scraper::mergeCompanyData
DataAccess\Company::update
DataAccess\Company::fetchProvinceID
This is how I did it, the provinceID column remains empty. When displaying the company details in the UI, 'ES' is displayed if the provinceID is empty, otherwise, the provinceID value is displayed. Why I left it empty? If I add a 'ES' column in the Province table, I will need to add a corresponding column in the region table as well.
If I add a 'ES' column in the Province table, I will need to add a corresponding column in the region table as well.
Yes exactly, this solution makes more sense! It is simpler and like that we can translate the country name.
The question is, why didn't you do that? Instead of replacing the object property at the very end, in the view
...
Here is the proposed change to the location information tables, take note of the final records in each table. Check it @Nils85 , then tell me whether to proceed making the change. Updated Google Sheet
It is not needed to add a new line for Spain (code 53) in the table PostalCode
.
Made a commit that sorts out the second (2) concern that was raised by @levogirar and a fix for the first one (1), since 'ES' is displayed but not stored on the database due to foreign key checks.
Originally posted by @kakaye-mkubwa in https://github.com/wuwanahq/wuwana2/issues/144#issuecomment-787012198