diff --git a/front/salix/components/user-configuration-popover/index.js b/front/salix/components/user-configuration-popover/index.js index 2ee77485dd..1f70b96412 100644 --- a/front/salix/components/user-configuration-popover/index.js +++ b/front/salix/components/user-configuration-popover/index.js @@ -23,7 +23,10 @@ class Controller { set localWarehouseFk(value) { window.localStorage.localWarehouseFk = value; - window.localStorage.defaultWarehouseFk = value; + if (!value && this.warehouseFk) + window.localStorage.defaultWarehouseFk = this.warehouseFk; + else + window.localStorage.defaultWarehouseFk = value; this.showOk(); } @@ -33,7 +36,10 @@ class Controller { set localCompanyFk(value) { window.localStorage.localCompanyFk = value; - window.localStorage.defaultCompanyFk = value; + if (!value && this.companyFk) + window.localStorage.defaultCompanyFk = this.companyFk; + else + window.localStorage.defaultCompanyFk = value; this.showOk(); }