change company currency if it does not have any transaction.

This commit is contained in:
asift798
2022-03-14 12:55:38 +05:30
parent e7301eb7a3
commit 0e31f85c18
2 changed files with 25 additions and 2 deletions

View File

@ -184,6 +184,20 @@ export const useCompanyStore = (useWindow = false) => {
setDefaultCurrency(data) {
this.defaultCurrency = data.currency
},
checkCompanyHasCurrencyTransactions() {
return new Promise((resolve, reject) => {
axios
.get(`/api/v1/company/has-transactions`)
.then((response) => {
resolve(response)
})
.catch((err) => {
handleError(err)
reject(err)
})
})
},
},
})()
}