taxtank-core 0.28.9 → 0.28.10
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 +44 -0
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/models/endpoint/endpoints.const.js +2 -1
- package/esm2015/lib/models/report/depreciation/index.js +4 -0
- package/esm2015/lib/models/report/index.js +6 -0
- package/esm2015/lib/models/report/property/index.js +4 -0
- package/esm2015/lib/models/report/sole/index.js +2 -0
- package/esm2015/lib/models/report/sole/sole-business/sole-business-loss-report.js +18 -0
- package/esm2015/lib/services/http/sole/index.js +2 -1
- package/esm2015/lib/services/http/sole/sole-business-loss/sole-business-loss.service.js +21 -0
- package/esm2015/public-api.js +2 -8
- package/fesm2015/taxtank-core.js +36 -1
- package/fesm2015/taxtank-core.js.map +1 -1
- package/lib/models/report/depreciation/index.d.ts +3 -0
- package/lib/models/report/index.d.ts +5 -0
- package/lib/models/report/property/index.d.ts +3 -0
- package/lib/models/report/sole/index.d.ts +1 -0
- package/lib/models/report/sole/sole-business/sole-business-loss-report.d.ts +25 -0
- package/lib/services/http/sole/index.d.ts +1 -0
- package/lib/services/http/sole/sole-business-loss/sole-business-loss.service.d.ts +11 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -7
|
@@ -1061,6 +1061,7 @@
|
|
|
1061
1061
|
SOLE_BUSINESSES_GET: new Endpoint('GET', '\\/sole-businesses'),
|
|
1062
1062
|
SOLE_BUSINESSES_POST: new Endpoint('POST', '\\/sole-businesses'),
|
|
1063
1063
|
SOLE_BUSINESSES_PUT: new Endpoint('PUT', '\\/sole-businesses\\/\\d+'),
|
|
1064
|
+
SOLE_BUSINESSES_LOSSES_GET: new Endpoint('GET', '\\/sole-business-losses'),
|
|
1064
1065
|
BUSINESS_ACTIVITIES_GET: new Endpoint('GET', '\\/sole-business-activities'),
|
|
1065
1066
|
SOLE_DEPRECIATION_METHODS_GET: new Endpoint('GET', '\\/sole-depreciation-methods'),
|
|
1066
1067
|
SOLE_DEPRECIATION_METHODS_PUT: new Endpoint('PUT', '\\/sole-depreciation-methods\\/\\d+'),
|
|
@@ -10981,6 +10982,26 @@
|
|
|
10981
10982
|
* 'My Tax' report related data (classes, enums, const, e.t.c)
|
|
10982
10983
|
*/
|
|
10983
10984
|
|
|
10985
|
+
/**
|
|
10986
|
+
* Class with business loss details
|
|
10987
|
+
* https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/4641357930/Rules+when+a+business+makes+a+loss+Tax+Summary
|
|
10988
|
+
*/
|
|
10989
|
+
var SoleBusinessLossReport = /** @class */ (function (_super) {
|
|
10990
|
+
__extends(SoleBusinessLossReport, _super);
|
|
10991
|
+
function SoleBusinessLossReport(loss, transactions, depreciations) {
|
|
10992
|
+
var _this = _super.call(this) || this;
|
|
10993
|
+
_this.openBalance = loss.openBalance;
|
|
10994
|
+
_this.netIncome = transactions.sumBy('claimAmount') + depreciations.sumBy('claimAmount');
|
|
10995
|
+
_this.taxableIncome = _this.calculateTaxableIncome();
|
|
10996
|
+
_this.closeBalance = Math.max(_this.taxableIncome, 0);
|
|
10997
|
+
return _this;
|
|
10998
|
+
}
|
|
10999
|
+
SoleBusinessLossReport.prototype.calculateTaxableIncome = function () {
|
|
11000
|
+
return this.netIncome - this.openBalance;
|
|
11001
|
+
};
|
|
11002
|
+
return SoleBusinessLossReport;
|
|
11003
|
+
}(AbstractModel));
|
|
11004
|
+
|
|
10984
11005
|
/**
|
|
10985
11006
|
* Constant with list of URLs
|
|
10986
11007
|
*/
|
|
@@ -11515,6 +11536,26 @@
|
|
|
11515
11536
|
}]
|
|
11516
11537
|
}] });
|
|
11517
11538
|
|
|
11539
|
+
var SoleBusinessLossService = /** @class */ (function (_super) {
|
|
11540
|
+
__extends(SoleBusinessLossService, _super);
|
|
11541
|
+
function SoleBusinessLossService() {
|
|
11542
|
+
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
11543
|
+
_this.modelClass = SoleBusinessLoss;
|
|
11544
|
+
_this.url = 'sole-business-losses';
|
|
11545
|
+
_this.isHydra = true;
|
|
11546
|
+
return _this;
|
|
11547
|
+
}
|
|
11548
|
+
return SoleBusinessLossService;
|
|
11549
|
+
}(RestService));
|
|
11550
|
+
SoleBusinessLossService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: SoleBusinessLossService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
11551
|
+
SoleBusinessLossService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: SoleBusinessLossService, providedIn: 'root' });
|
|
11552
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: SoleBusinessLossService, decorators: [{
|
|
11553
|
+
type: i0.Injectable,
|
|
11554
|
+
args: [{
|
|
11555
|
+
providedIn: 'root'
|
|
11556
|
+
}]
|
|
11557
|
+
}] });
|
|
11558
|
+
|
|
11518
11559
|
var SoleContactService = /** @class */ (function (_super) {
|
|
11519
11560
|
__extends(SoleContactService, _super);
|
|
11520
11561
|
function SoleContactService() {
|
|
@@ -18680,6 +18721,7 @@
|
|
|
18680
18721
|
exports.PropertyForecast = PropertyForecast;
|
|
18681
18722
|
exports.PropertyReportItem = PropertyReportItem;
|
|
18682
18723
|
exports.PropertyReportItemCollection = PropertyReportItemCollection;
|
|
18724
|
+
exports.PropertyReportItemDepreciation = PropertyReportItemDepreciation;
|
|
18683
18725
|
exports.PropertyReportItemDepreciationCollection = PropertyReportItemDepreciationCollection;
|
|
18684
18726
|
exports.PropertyReportItemTransaction = PropertyReportItemTransaction;
|
|
18685
18727
|
exports.PropertyReportItemTransactionCollection = PropertyReportItemTransactionCollection;
|
|
@@ -18724,6 +18766,8 @@
|
|
|
18724
18766
|
exports.SoleBusinessAllocationsForm = SoleBusinessAllocationsForm;
|
|
18725
18767
|
exports.SoleBusinessForm = SoleBusinessForm;
|
|
18726
18768
|
exports.SoleBusinessLoss = SoleBusinessLoss;
|
|
18769
|
+
exports.SoleBusinessLossReport = SoleBusinessLossReport;
|
|
18770
|
+
exports.SoleBusinessLossService = SoleBusinessLossService;
|
|
18727
18771
|
exports.SoleBusinessService = SoleBusinessService;
|
|
18728
18772
|
exports.SoleContact = SoleContact;
|
|
18729
18773
|
exports.SoleContactForm = SoleContactForm;
|