taxtank-core 0.22.0 → 0.22.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/taxtank-core.umd.js +13 -11
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/forms/register/register-client.form.js +3 -6
- package/esm2015/lib/interceptors/financial-year-interceptor.js +3 -2
- package/esm2015/lib/models/tax-summary/tax-summary.js +5 -1
- package/esm2015/lib/services/http/user/user.service.js +7 -6
- package/fesm2015/taxtank-core.js +13 -11
- package/fesm2015/taxtank-core.js.map +1 -1
- package/lib/services/http/user/user.service.d.ts +1 -4
- package/package.json +1 -1
|
@@ -166,7 +166,8 @@
|
|
|
166
166
|
});
|
|
167
167
|
// clone request to add new parameters
|
|
168
168
|
var clonedReq = request.clone();
|
|
169
|
-
|
|
169
|
+
// @TODO query params should be passed using second param of get request and HttpParams object
|
|
170
|
+
if (!params.get('financialYear') && !request.urlWithParams.includes('?financialYear') && !request.urlWithParams.includes('&financialYear')) {
|
|
170
171
|
params = params.set('financialYear', localStorage.getItem('financialYear'));
|
|
171
172
|
clonedReq = request.clone({
|
|
172
173
|
params: params
|
|
@@ -10077,6 +10078,10 @@
|
|
|
10077
10078
|
});
|
|
10078
10079
|
Object.defineProperty(TaxSummary.prototype, "taxPercent", {
|
|
10079
10080
|
get: function () {
|
|
10081
|
+
// Check if netAmount is not 0 to avoid division by zero
|
|
10082
|
+
if (!this.summary.netAmount) {
|
|
10083
|
+
return 0;
|
|
10084
|
+
}
|
|
10080
10085
|
return this.summary.items.findByCategory(exports.TaxReturnCategoryListEnum.GROSS_TAX_PAYABLE).amount / this.summary.netAmount;
|
|
10081
10086
|
},
|
|
10082
10087
|
enumerable: false,
|
|
@@ -14667,11 +14672,11 @@
|
|
|
14667
14672
|
_this.cacheSubject.next(_this.cache);
|
|
14668
14673
|
}));
|
|
14669
14674
|
};
|
|
14670
|
-
|
|
14671
|
-
|
|
14672
|
-
|
|
14673
|
-
|
|
14674
|
-
|
|
14675
|
+
UserService.prototype.switchFinancialYear = function (year) {
|
|
14676
|
+
return this.http.get(this.environment.apiV2 + "/financial-year/switch", { params: new i1.HttpParams({ fromString: "financialYear=" + year }) }).pipe(operators.map(function () {
|
|
14677
|
+
localStorage.setItem('financialYear', year.toString());
|
|
14678
|
+
window.location.reload();
|
|
14679
|
+
}));
|
|
14675
14680
|
};
|
|
14676
14681
|
/**
|
|
14677
14682
|
* clear service cache
|
|
@@ -15637,11 +15642,8 @@
|
|
|
15637
15642
|
}
|
|
15638
15643
|
RegisterClientForm.prototype.submit = function (data) {
|
|
15639
15644
|
if (data === void 0) { data = {}; }
|
|
15640
|
-
|
|
15641
|
-
|
|
15642
|
-
if (!formValue) {
|
|
15643
|
-
return null;
|
|
15644
|
-
}
|
|
15645
|
+
var _a;
|
|
15646
|
+
return _super.prototype.submit.call(this, { password: (_a = this.get('password').submit()) === null || _a === void 0 ? void 0 : _a.password });
|
|
15645
15647
|
};
|
|
15646
15648
|
return RegisterClientForm;
|
|
15647
15649
|
}(AbstractForm));
|