taxtank-core 0.8.4 → 0.8.5
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 +46 -43
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/collections/collection.js +5 -2
- package/esm2015/lib/collections/tax-summary/report-item.collection.js +141 -0
- package/esm2015/lib/models/tax-summary/report-item-details.js +9 -0
- package/esm2015/lib/models/tax-summary/report-item.js +15 -0
- package/esm2015/lib/models/tax-summary/tax-summary-section.js +5 -5
- package/esm2015/public-api.js +4 -4
- package/fesm2015/taxtank-core.js +12 -9
- package/fesm2015/taxtank-core.js.map +1 -1
- package/lib/collections/collection.d.ts +4 -1
- package/lib/collections/{tax-return-category-item.collection.d.ts → tax-summary/report-item.collection.d.ts} +5 -5
- package/lib/models/tax-summary/{tax-return-category-item-details.d.ts → report-item-details.d.ts} +2 -2
- package/lib/models/tax-summary/{tax-return-category-item.d.ts → report-item.d.ts} +4 -4
- package/lib/models/tax-summary/tax-summary-section.d.ts +2 -2
- package/package.json +1 -1
- package/public-api.d.ts +3 -3
- package/esm2015/lib/collections/tax-return-category-item.collection.js +0 -141
- package/esm2015/lib/models/tax-summary/tax-return-category-item-details.js +0 -9
- package/esm2015/lib/models/tax-summary/tax-return-category-item.js +0 -15
|
@@ -1261,7 +1261,10 @@
|
|
|
1261
1261
|
Collection.prototype.getIds = function () {
|
|
1262
1262
|
return this.items.map(function (item) { return item['id']; });
|
|
1263
1263
|
};
|
|
1264
|
-
|
|
1264
|
+
/**
|
|
1265
|
+
* @TODO vik rename
|
|
1266
|
+
*/
|
|
1267
|
+
Collection.prototype.getOneBy = function (path, value) {
|
|
1265
1268
|
return this.items.find(function (item) { return get__default["default"](item, path) === value; });
|
|
1266
1269
|
};
|
|
1267
1270
|
Collection.prototype.getBy = function (path, value) {
|
|
@@ -2536,12 +2539,12 @@
|
|
|
2536
2539
|
/**
|
|
2537
2540
|
* collection for tax return category items
|
|
2538
2541
|
*/
|
|
2539
|
-
var
|
|
2540
|
-
__extends(
|
|
2541
|
-
function
|
|
2542
|
+
var ReportItemCollection = /** @class */ (function (_super) {
|
|
2543
|
+
__extends(ReportItemCollection, _super);
|
|
2544
|
+
function ReportItemCollection() {
|
|
2542
2545
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
2543
2546
|
}
|
|
2544
|
-
Object.defineProperty(
|
|
2547
|
+
Object.defineProperty(ReportItemCollection.prototype, "salary", {
|
|
2545
2548
|
/**
|
|
2546
2549
|
* Work income
|
|
2547
2550
|
*/
|
|
@@ -2552,7 +2555,7 @@
|
|
|
2552
2555
|
enumerable: false,
|
|
2553
2556
|
configurable: true
|
|
2554
2557
|
});
|
|
2555
|
-
Object.defineProperty(
|
|
2558
|
+
Object.defineProperty(ReportItemCollection.prototype, "workExpenses", {
|
|
2556
2559
|
/**
|
|
2557
2560
|
* Work expenses
|
|
2558
2561
|
*/
|
|
@@ -2563,7 +2566,7 @@
|
|
|
2563
2566
|
enumerable: false,
|
|
2564
2567
|
configurable: true
|
|
2565
2568
|
});
|
|
2566
|
-
Object.defineProperty(
|
|
2569
|
+
Object.defineProperty(ReportItemCollection.prototype, "rentalIncome", {
|
|
2567
2570
|
/**
|
|
2568
2571
|
* Property income
|
|
2569
2572
|
*/
|
|
@@ -2574,7 +2577,7 @@
|
|
|
2574
2577
|
enumerable: false,
|
|
2575
2578
|
configurable: true
|
|
2576
2579
|
});
|
|
2577
|
-
Object.defineProperty(
|
|
2580
|
+
Object.defineProperty(ReportItemCollection.prototype, "rentalDeductions", {
|
|
2578
2581
|
/**
|
|
2579
2582
|
* Property rental deductions
|
|
2580
2583
|
*/
|
|
@@ -2585,7 +2588,7 @@
|
|
|
2585
2588
|
enumerable: false,
|
|
2586
2589
|
configurable: true
|
|
2587
2590
|
});
|
|
2588
|
-
Object.defineProperty(
|
|
2591
|
+
Object.defineProperty(ReportItemCollection.prototype, "propertyExpenses", {
|
|
2589
2592
|
/**
|
|
2590
2593
|
* Property expenses
|
|
2591
2594
|
*/
|
|
@@ -2595,7 +2598,7 @@
|
|
|
2595
2598
|
enumerable: false,
|
|
2596
2599
|
configurable: true
|
|
2597
2600
|
});
|
|
2598
|
-
Object.defineProperty(
|
|
2601
|
+
Object.defineProperty(ReportItemCollection.prototype, "interestDeductions", {
|
|
2599
2602
|
/**
|
|
2600
2603
|
* Property interest
|
|
2601
2604
|
*/
|
|
@@ -2606,7 +2609,7 @@
|
|
|
2606
2609
|
enumerable: false,
|
|
2607
2610
|
configurable: true
|
|
2608
2611
|
});
|
|
2609
|
-
Object.defineProperty(
|
|
2612
|
+
Object.defineProperty(ReportItemCollection.prototype, "capitalWorks", {
|
|
2610
2613
|
/**
|
|
2611
2614
|
* Property capital works depreciations
|
|
2612
2615
|
*/
|
|
@@ -2617,7 +2620,7 @@
|
|
|
2617
2620
|
enumerable: false,
|
|
2618
2621
|
configurable: true
|
|
2619
2622
|
});
|
|
2620
|
-
Object.defineProperty(
|
|
2623
|
+
Object.defineProperty(ReportItemCollection.prototype, "plantEquipment", {
|
|
2621
2624
|
/**
|
|
2622
2625
|
* Property plant & equipment depreciations
|
|
2623
2626
|
*/
|
|
@@ -2628,7 +2631,7 @@
|
|
|
2628
2631
|
enumerable: false,
|
|
2629
2632
|
configurable: true
|
|
2630
2633
|
});
|
|
2631
|
-
Object.defineProperty(
|
|
2634
|
+
Object.defineProperty(ReportItemCollection.prototype, "propertyDepreciations", {
|
|
2632
2635
|
/**
|
|
2633
2636
|
* Total property depreciaions
|
|
2634
2637
|
*/
|
|
@@ -2638,7 +2641,7 @@
|
|
|
2638
2641
|
enumerable: false,
|
|
2639
2642
|
configurable: true
|
|
2640
2643
|
});
|
|
2641
|
-
Object.defineProperty(
|
|
2644
|
+
Object.defineProperty(ReportItemCollection.prototype, "partnershipsAndTrusts", {
|
|
2642
2645
|
get: function () {
|
|
2643
2646
|
var _a;
|
|
2644
2647
|
return ((_a = this.getByCategory(exports.TaxReturnCategoryListEnum.PARTNERSHIPS_TRUSTS)) === null || _a === void 0 ? void 0 : _a.amount) || 0;
|
|
@@ -2646,7 +2649,7 @@
|
|
|
2646
2649
|
enumerable: false,
|
|
2647
2650
|
configurable: true
|
|
2648
2651
|
});
|
|
2649
|
-
Object.defineProperty(
|
|
2652
|
+
Object.defineProperty(ReportItemCollection.prototype, "pciAndSbeIncome", {
|
|
2650
2653
|
get: function () {
|
|
2651
2654
|
var _a;
|
|
2652
2655
|
return ((_a = this.getByCategory(exports.TaxReturnCategoryListEnum.PCI_SBE_INCOME)) === null || _a === void 0 ? void 0 : _a.amount) || 0;
|
|
@@ -2654,7 +2657,7 @@
|
|
|
2654
2657
|
enumerable: false,
|
|
2655
2658
|
configurable: true
|
|
2656
2659
|
});
|
|
2657
|
-
Object.defineProperty(
|
|
2660
|
+
Object.defineProperty(ReportItemCollection.prototype, "capitalGains", {
|
|
2658
2661
|
get: function () {
|
|
2659
2662
|
var _a;
|
|
2660
2663
|
return ((_a = this.getByCategory(exports.TaxReturnCategoryListEnum.CAPITAL_GAINS)) === null || _a === void 0 ? void 0 : _a.amount) || 0;
|
|
@@ -2662,7 +2665,7 @@
|
|
|
2662
2665
|
enumerable: false,
|
|
2663
2666
|
configurable: true
|
|
2664
2667
|
});
|
|
2665
|
-
Object.defineProperty(
|
|
2668
|
+
Object.defineProperty(ReportItemCollection.prototype, "foreignSourceIncome", {
|
|
2666
2669
|
get: function () {
|
|
2667
2670
|
var _a;
|
|
2668
2671
|
return ((_a = this.getByCategory(exports.TaxReturnCategoryListEnum.FOREIGN_SOURCE_INCOME)) === null || _a === void 0 ? void 0 : _a.amount) || 0;
|
|
@@ -2670,7 +2673,7 @@
|
|
|
2670
2673
|
enumerable: false,
|
|
2671
2674
|
configurable: true
|
|
2672
2675
|
});
|
|
2673
|
-
Object.defineProperty(
|
|
2676
|
+
Object.defineProperty(ReportItemCollection.prototype, "otherIncome", {
|
|
2674
2677
|
/**
|
|
2675
2678
|
* Other income
|
|
2676
2679
|
*/
|
|
@@ -2685,7 +2688,7 @@
|
|
|
2685
2688
|
enumerable: false,
|
|
2686
2689
|
configurable: true
|
|
2687
2690
|
});
|
|
2688
|
-
Object.defineProperty(
|
|
2691
|
+
Object.defineProperty(ReportItemCollection.prototype, "otherDeductions", {
|
|
2689
2692
|
/**
|
|
2690
2693
|
* Other expenses
|
|
2691
2694
|
*/
|
|
@@ -2696,7 +2699,7 @@
|
|
|
2696
2699
|
enumerable: false,
|
|
2697
2700
|
configurable: true
|
|
2698
2701
|
});
|
|
2699
|
-
Object.defineProperty(
|
|
2702
|
+
Object.defineProperty(ReportItemCollection.prototype, "taxInstalments", {
|
|
2700
2703
|
get: function () {
|
|
2701
2704
|
var _a;
|
|
2702
2705
|
return ((_a = this.getTaxCreditsCollection().getByCategory(exports.TaxReturnCategoryListEnum.TAX_INSTALMENTS)) === null || _a === void 0 ? void 0 : _a.amount) || 0;
|
|
@@ -2704,7 +2707,7 @@
|
|
|
2704
2707
|
enumerable: false,
|
|
2705
2708
|
configurable: true
|
|
2706
2709
|
});
|
|
2707
|
-
Object.defineProperty(
|
|
2710
|
+
Object.defineProperty(ReportItemCollection.prototype, "frankingCredits", {
|
|
2708
2711
|
get: function () {
|
|
2709
2712
|
var _a;
|
|
2710
2713
|
return ((_a = this.getTaxCreditsCollection().getByCategory(exports.TaxReturnCategoryListEnum.FRANKING_CREDITS)) === null || _a === void 0 ? void 0 : _a.amount) || 0;
|
|
@@ -2712,7 +2715,7 @@
|
|
|
2712
2715
|
enumerable: false,
|
|
2713
2716
|
configurable: true
|
|
2714
2717
|
});
|
|
2715
|
-
Object.defineProperty(
|
|
2718
|
+
Object.defineProperty(ReportItemCollection.prototype, "taxOffsets", {
|
|
2716
2719
|
get: function () {
|
|
2717
2720
|
var _a;
|
|
2718
2721
|
return ((_a = this.getByCategory(exports.TaxReturnCategoryListEnum.TAX_OFFSETS)) === null || _a === void 0 ? void 0 : _a.amount) || 0;
|
|
@@ -2720,7 +2723,7 @@
|
|
|
2720
2723
|
enumerable: false,
|
|
2721
2724
|
configurable: true
|
|
2722
2725
|
});
|
|
2723
|
-
Object.defineProperty(
|
|
2726
|
+
Object.defineProperty(ReportItemCollection.prototype, "borrowingExpenses", {
|
|
2724
2727
|
get: function () {
|
|
2725
2728
|
var _a;
|
|
2726
2729
|
return ((_a = this.getByCategory(exports.TaxReturnCategoryListEnum.BORROWING_EXPENSES)) === null || _a === void 0 ? void 0 : _a.amount) || 0;
|
|
@@ -2728,7 +2731,7 @@
|
|
|
2728
2731
|
enumerable: false,
|
|
2729
2732
|
configurable: true
|
|
2730
2733
|
});
|
|
2731
|
-
Object.defineProperty(
|
|
2734
|
+
Object.defineProperty(ReportItemCollection.prototype, "grossTaxPayable", {
|
|
2732
2735
|
get: function () {
|
|
2733
2736
|
var _a;
|
|
2734
2737
|
return ((_a = this.getByCategory(exports.TaxReturnCategoryListEnum.GROSS_TAX_PAYABLE)) === null || _a === void 0 ? void 0 : _a.amount) || 0;
|
|
@@ -2739,22 +2742,22 @@
|
|
|
2739
2742
|
/**
|
|
2740
2743
|
* taxWithheld by section (work or other)
|
|
2741
2744
|
*/
|
|
2742
|
-
|
|
2745
|
+
ReportItemCollection.prototype.getTaxWithheld = function (section) {
|
|
2743
2746
|
if (section === void 0) { section = exports.TaxReturnCategorySectionEnum.WORK_TANK; }
|
|
2744
2747
|
var _a;
|
|
2745
2748
|
return ((_a = this.getTaxCreditsCollection().getByCategory(exports.TaxReturnCategoryListEnum.TAX_WITHHELD)) === null || _a === void 0 ? void 0 : _a.details.filter(function (details) { return details.section === section; }).reduce(function (sum, details) { return sum + details.amount; }, 0)) || 0;
|
|
2746
2749
|
};
|
|
2747
|
-
|
|
2750
|
+
ReportItemCollection.prototype.getTaxCreditsCollection = function () {
|
|
2748
2751
|
var _a;
|
|
2749
|
-
return new
|
|
2752
|
+
return new ReportItemCollection(((_a = this.getByCategory(exports.TaxReturnCategoryListEnum.TAX_CREDITS)) === null || _a === void 0 ? void 0 : _a.items) || []);
|
|
2750
2753
|
};
|
|
2751
|
-
|
|
2754
|
+
ReportItemCollection.prototype.getTotalAmountByIncomeSourceName = function (name) {
|
|
2752
2755
|
return this.items.reduce((function (sum, item) { return sum + item.getAmountByIncomeSourceName(name); }), 0);
|
|
2753
2756
|
};
|
|
2754
|
-
|
|
2757
|
+
ReportItemCollection.prototype.getByCategory = function (category) {
|
|
2755
2758
|
return this.items.find(function (item) { return item.taxReturnCategory.id === category; });
|
|
2756
2759
|
};
|
|
2757
|
-
return
|
|
2760
|
+
return ReportItemCollection;
|
|
2758
2761
|
}(Collection));
|
|
2759
2762
|
|
|
2760
2763
|
/**
|
|
@@ -7793,30 +7796,30 @@
|
|
|
7793
7796
|
* Used in tax summary reports to show amounts relating to a tax return category entity and details of what this
|
|
7794
7797
|
* amount is comprised of. Example here shows an amount of $951.96 and also details of what this amount is comprised of:
|
|
7795
7798
|
*/
|
|
7796
|
-
var
|
|
7797
|
-
function
|
|
7799
|
+
var ReportItem = /** @class */ (function () {
|
|
7800
|
+
function ReportItem() {
|
|
7798
7801
|
}
|
|
7799
7802
|
/**
|
|
7800
7803
|
* Get amount for one income source
|
|
7801
7804
|
* @param name Name of income source for filter
|
|
7802
7805
|
*/
|
|
7803
|
-
|
|
7806
|
+
ReportItem.prototype.getAmountByIncomeSourceName = function (name) {
|
|
7804
7807
|
var _a;
|
|
7805
7808
|
return ((_a = this.details.find(function (detail) { return detail.name === name; })) === null || _a === void 0 ? void 0 : _a.amount) || 0;
|
|
7806
7809
|
};
|
|
7807
|
-
return
|
|
7810
|
+
return ReportItem;
|
|
7808
7811
|
}());
|
|
7809
7812
|
|
|
7810
7813
|
/**
|
|
7811
7814
|
* Used in tax summary reports to show specific details relating to an amount in the report.
|
|
7812
|
-
* See structure in
|
|
7815
|
+
* See structure in ReportItem class.
|
|
7813
7816
|
* Example an amount of $550 for property income could be comprised of 2 different property amounts of $300 and $250.
|
|
7814
7817
|
* This is useful in providing drill-down information for the tax summary report.
|
|
7815
7818
|
*/
|
|
7816
|
-
var
|
|
7817
|
-
function
|
|
7819
|
+
var ReportItemDetails = /** @class */ (function () {
|
|
7820
|
+
function ReportItemDetails() {
|
|
7818
7821
|
}
|
|
7819
|
-
return
|
|
7822
|
+
return ReportItemDetails;
|
|
7820
7823
|
}());
|
|
7821
7824
|
|
|
7822
7825
|
/**
|
|
@@ -7829,10 +7832,10 @@
|
|
|
7829
7832
|
return TaxSummarySection;
|
|
7830
7833
|
}());
|
|
7831
7834
|
__decorate([
|
|
7832
|
-
classTransformer.Type(function () { return
|
|
7835
|
+
classTransformer.Type(function () { return ReportItem; }),
|
|
7833
7836
|
classTransformer.Transform(function (_a) {
|
|
7834
7837
|
var value = _a.value;
|
|
7835
|
-
return new
|
|
7838
|
+
return new ReportItemCollection(value);
|
|
7836
7839
|
})
|
|
7837
7840
|
], TaxSummarySection.prototype, "items", void 0);
|
|
7838
7841
|
__decorate([
|
|
@@ -13105,6 +13108,9 @@
|
|
|
13105
13108
|
exports.RegisterClientForm = RegisterClientForm;
|
|
13106
13109
|
exports.RegisterFirmForm = RegisterFirmForm;
|
|
13107
13110
|
exports.RegistrationInvite = RegistrationInvite;
|
|
13111
|
+
exports.ReportItem = ReportItem;
|
|
13112
|
+
exports.ReportItemCollection = ReportItemCollection;
|
|
13113
|
+
exports.ReportItemDetails = ReportItemDetails;
|
|
13108
13114
|
exports.ResetPasswordForm = ResetPasswordForm;
|
|
13109
13115
|
exports.SUBSCRIPTION_DESCRIPTION = SUBSCRIPTION_DESCRIPTION;
|
|
13110
13116
|
exports.SUBSCRIPTION_TITLE = SUBSCRIPTION_TITLE;
|
|
@@ -13125,9 +13131,6 @@
|
|
|
13125
13131
|
exports.TaxExemption = TaxExemption;
|
|
13126
13132
|
exports.TaxExemptionMetadata = TaxExemptionMetadata;
|
|
13127
13133
|
exports.TaxExemptionService = TaxExemptionService;
|
|
13128
|
-
exports.TaxReturnCategoryItem = TaxReturnCategoryItem;
|
|
13129
|
-
exports.TaxReturnCategoryItemCollection = TaxReturnCategoryItemCollection;
|
|
13130
|
-
exports.TaxReturnCategoryItemDetails = TaxReturnCategoryItemDetails;
|
|
13131
13134
|
exports.TaxReview = TaxReview;
|
|
13132
13135
|
exports.TaxReviewCollection = TaxReviewCollection;
|
|
13133
13136
|
exports.TaxReviewHistoryService = TaxReviewHistoryService;
|