Closed abodehq closed 2 months ago
Hi, @abodehq.
The TaxOriginAddressType setting was added to the plugin back in nopCommerce version 4.00 (plugin version 2.03), I don't see a way to reproduce the problem other than removing the setting from the database before updating the plugin.
@skoshelev
this is when u have it already install in then try to upgrade the version !
nopCommerce version:
Steps to reproduce the problem:
when we upgrade from 4.70.1 to 4.70.4
we received an error on migration file on Nop.Plugin.Tax.Avalara plugin [NopMigration("2021-09-06 00:00:00", "Tax.Avalara 2.50. Add certificates feature", MigrationProcessType.Update)]
the error show that it cant insert setting for TaxOriginAddressType as value 0
the suggested solution is just to add a new checkup as below:
if (!_settingService.SettingExists(_avalaraTaxSettings, settings => settings.TaxOriginAddressType)) _avalaraTaxSettings.TaxOriginAddressType = Domain.TaxOriginAddressType.DefaultTaxAddress;