taxtank-core 0.28.28 → 0.28.30
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 +587 -456
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/collections/collection.js +23 -1
- package/esm2015/lib/collections/index.js +2 -1
- package/esm2015/lib/collections/tax-summary/tax-return-categories.const.js +6 -2
- package/esm2015/lib/collections/transaction/index.js +4 -0
- package/esm2015/lib/collections/transaction/transaction-base.collection.js +8 -0
- package/esm2015/lib/db/Models/sole/sole-business-loss-offset-rule.js +4 -0
- package/esm2015/lib/db/Models/sole/sole-business-loss.js +1 -1
- package/esm2015/lib/forms/sole/index.js +2 -1
- package/esm2015/lib/forms/sole/sole-business-loss.form.js +25 -0
- package/esm2015/lib/models/endpoint/endpoints.const.js +6 -2
- package/esm2015/lib/models/service-subscription/service-subscription.js +7 -1
- package/esm2015/lib/models/sole/index.js +2 -1
- package/esm2015/lib/models/sole/sole-business-loss-offset-rule.js +9 -0
- package/esm2015/lib/models/sole/sole-business-loss.js +12 -1
- package/esm2015/lib/models/tax-summary/tax-summary.js +1 -3
- package/esm2015/lib/services/http/sole/index.js +2 -1
- package/esm2015/lib/services/http/sole/sole-business-loss/sole-business-loss-rules/sole-business-loss-offset-rule.service.js +24 -0
- package/esm2015/public-api.js +1 -3
- package/fesm2015/taxtank-core.js +444 -341
- package/fesm2015/taxtank-core.js.map +1 -1
- package/lib/collections/collection.d.ts +7 -0
- package/lib/collections/index.d.ts +1 -0
- package/lib/collections/transaction/index.d.ts +3 -0
- package/lib/collections/transaction/transaction-base.collection.d.ts +6 -0
- package/lib/db/Models/sole/sole-business-loss-offset-rule.d.ts +7 -0
- package/lib/db/Models/sole/sole-business-loss.d.ts +2 -0
- package/lib/forms/sole/index.d.ts +1 -0
- package/lib/forms/sole/sole-business-loss.form.d.ts +11 -0
- package/lib/models/service-subscription/service-subscription.d.ts +4 -0
- package/lib/models/sole/index.d.ts +1 -0
- package/lib/models/sole/sole-business-loss-offset-rule.d.ts +4 -0
- package/lib/models/sole/sole-business-loss.d.ts +4 -0
- package/lib/models/tax-summary/tax-summary.d.ts +0 -2
- package/lib/services/http/sole/index.d.ts +1 -0
- package/lib/services/http/sole/sole-business-loss/sole-business-loss-rules/sole-business-loss-offset-rule.service.d.ts +13 -0
- package/package.json +1 -1
- package/public-api.d.ts +0 -2
package/fesm2015/taxtank-core.js
CHANGED
|
@@ -677,6 +677,7 @@ const ENDPOINTS = {
|
|
|
677
677
|
PROPERTIES_DOCUMENTS_PUT: new Endpoint('PUT', '\\/properties\\/documents\\/\\d+'),
|
|
678
678
|
PROPERTIES_DOCUMENTS_DELETE: new Endpoint('DELETE', '\\/properties\\/documents\\/\\d+'),
|
|
679
679
|
PROPERTIES_PHOTO_POST: new Endpoint('POST', '\\/properties\\/\\d+\\/photo\.\*'),
|
|
680
|
+
PROPERTIES_SALES_GET: new Endpoint('GET', '\\/properties\\/sales'),
|
|
680
681
|
PROPERTIES_SUGGESTIONS_GET: new Endpoint('GET', '/property\\/\\w+\\/v2\\/.*$'),
|
|
681
682
|
PROPERTIES_VALUATIONS_DOCUMENTS_POST: new Endpoint('POST', '\\/properties\\/\\d+\\/valuations\\/\\d+\\/documents'),
|
|
682
683
|
PRORATION_COST_POST: new Endpoint('POST', '\\/subscriptions\\/proration-cost'),
|
|
@@ -692,7 +693,10 @@ const ENDPOINTS = {
|
|
|
692
693
|
SOLE_BUSINESSES_GET: new Endpoint('GET', '\\/sole-businesses'),
|
|
693
694
|
SOLE_BUSINESSES_POST: new Endpoint('POST', '\\/sole-businesses'),
|
|
694
695
|
SOLE_BUSINESSES_PUT: new Endpoint('PUT', '\\/sole-businesses\\/\\d+'),
|
|
695
|
-
|
|
696
|
+
SOLE_BUSINESS_LOSSES_GET: new Endpoint('GET', '\\/sole-business-losses'),
|
|
697
|
+
SOLE_BUSINESS_LOSSES_POST: new Endpoint('POST', '\\/sole-business-losses'),
|
|
698
|
+
SOLE_BUSINESS_LOSSES_PUT: new Endpoint('PUT', '\\/sole-business-losses\\/\\d+'),
|
|
699
|
+
SOLE_BUSINESS_LOSS_OFFSET_RULES_GET: new Endpoint('GET', '\\/sole-business-loss-offset-rules'),
|
|
696
700
|
SOLE_CONTACTS_POST: new Endpoint('POST', '\\/sole-contacts'),
|
|
697
701
|
SOLE_CONTACTS_PUT: new Endpoint('PUT', '\\/sole-contacts\\/\\d+'),
|
|
698
702
|
BUSINESS_ACTIVITIES_GET: new Endpoint('GET', '\\/sole-business-activities'),
|
|
@@ -1364,6 +1368,10 @@ const DEFAULT_INDEX = 'other';
|
|
|
1364
1368
|
*/
|
|
1365
1369
|
class Collection {
|
|
1366
1370
|
constructor(items = []) {
|
|
1371
|
+
/**
|
|
1372
|
+
* index of current item, used to iterate over the collection
|
|
1373
|
+
*/
|
|
1374
|
+
this.index = 0;
|
|
1367
1375
|
this.items = items;
|
|
1368
1376
|
}
|
|
1369
1377
|
/**
|
|
@@ -1387,6 +1395,24 @@ class Collection {
|
|
|
1387
1395
|
get last() {
|
|
1388
1396
|
return last(this.items);
|
|
1389
1397
|
}
|
|
1398
|
+
reset() {
|
|
1399
|
+
this.index = 0;
|
|
1400
|
+
return this.items[this.index];
|
|
1401
|
+
}
|
|
1402
|
+
next() {
|
|
1403
|
+
if (this.index < this.length) {
|
|
1404
|
+
this.index++;
|
|
1405
|
+
return this.items[this.index];
|
|
1406
|
+
}
|
|
1407
|
+
return null;
|
|
1408
|
+
}
|
|
1409
|
+
back() {
|
|
1410
|
+
if (this.index > 0) {
|
|
1411
|
+
this.index--;
|
|
1412
|
+
return this.items[this.index];
|
|
1413
|
+
}
|
|
1414
|
+
return null;
|
|
1415
|
+
}
|
|
1390
1416
|
getIds() {
|
|
1391
1417
|
return this.items.map((item) => item['id']);
|
|
1392
1418
|
}
|
|
@@ -1981,6 +2007,12 @@ class ServiceSubscription extends ServiceSubscription$1 {
|
|
|
1981
2007
|
isPastDue() {
|
|
1982
2008
|
return this.status === ServiceSubscriptionStatusEnum.PAST_DUE;
|
|
1983
2009
|
}
|
|
2010
|
+
/**
|
|
2011
|
+
* Check if current subscription has provided subscription item
|
|
2012
|
+
*/
|
|
2013
|
+
hasItem(itemToCheck) {
|
|
2014
|
+
return !!this.items.find((item) => item.price.id === itemToCheck.price.id);
|
|
2015
|
+
}
|
|
1984
2016
|
}
|
|
1985
2017
|
__decorate([
|
|
1986
2018
|
Type(() => Date)
|
|
@@ -2010,11 +2042,30 @@ __decorate([
|
|
|
2010
2042
|
class SoleBusinessLoss$1 extends AbstractModel {
|
|
2011
2043
|
}
|
|
2012
2044
|
|
|
2045
|
+
class SoleBusinessLossOffsetRule$1 extends AbstractModel {
|
|
2046
|
+
}
|
|
2047
|
+
|
|
2048
|
+
class SoleBusinessLossOffsetRule extends SoleBusinessLossOffsetRule$1 {
|
|
2049
|
+
}
|
|
2050
|
+
__decorate([
|
|
2051
|
+
Type(() => SoleBusinessLossOffsetRule)
|
|
2052
|
+
], SoleBusinessLossOffsetRule.prototype, "parent", void 0);
|
|
2053
|
+
|
|
2013
2054
|
class SoleBusinessLoss extends SoleBusinessLoss$1 {
|
|
2055
|
+
constructor() {
|
|
2056
|
+
super(...arguments);
|
|
2057
|
+
this.openBalance = 0;
|
|
2058
|
+
}
|
|
2059
|
+
get hasOffset() {
|
|
2060
|
+
return !!this.offsetRule;
|
|
2061
|
+
}
|
|
2014
2062
|
}
|
|
2015
2063
|
__decorate([
|
|
2016
2064
|
Type(() => SoleBusiness)
|
|
2017
2065
|
], SoleBusinessLoss.prototype, "business", void 0);
|
|
2066
|
+
__decorate([
|
|
2067
|
+
Type(() => SoleBusinessLossOffsetRule)
|
|
2068
|
+
], SoleBusinessLoss.prototype, "offsetRule", void 0);
|
|
2018
2069
|
|
|
2019
2070
|
class SoleInvoice$1 extends AbstractModel {
|
|
2020
2071
|
}
|
|
@@ -5581,6 +5632,278 @@ class PropertyCategoryMovementCollection extends Collection {
|
|
|
5581
5632
|
}
|
|
5582
5633
|
}
|
|
5583
5634
|
|
|
5635
|
+
/**
|
|
5636
|
+
* Chart serie class: chart data item
|
|
5637
|
+
* @TODO consider rename to ChartSerieData
|
|
5638
|
+
*/
|
|
5639
|
+
class ChartSerie {
|
|
5640
|
+
}
|
|
5641
|
+
|
|
5642
|
+
/**
|
|
5643
|
+
* Chart data class
|
|
5644
|
+
* @TODO consider rename to ChartSerie
|
|
5645
|
+
*/
|
|
5646
|
+
class ChartData {
|
|
5647
|
+
}
|
|
5648
|
+
__decorate([
|
|
5649
|
+
Type(() => ChartSerie)
|
|
5650
|
+
], ChartData.prototype, "data", void 0);
|
|
5651
|
+
|
|
5652
|
+
const MONTHS = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec', 'Jan'];
|
|
5653
|
+
|
|
5654
|
+
/**
|
|
5655
|
+
* Collection of transactions
|
|
5656
|
+
*/
|
|
5657
|
+
class TransactionCollection extends ExportableCollection {
|
|
5658
|
+
/**
|
|
5659
|
+
* Get total amount of all transactions in the collection
|
|
5660
|
+
*/
|
|
5661
|
+
get amount() {
|
|
5662
|
+
return +this.items.reduce((sum, transaction) => sum + transaction.getNetAmount(), 0).toFixed(2);
|
|
5663
|
+
}
|
|
5664
|
+
/**
|
|
5665
|
+
* Difference between allocated amount and total amount
|
|
5666
|
+
*/
|
|
5667
|
+
getUnallocatedAmount(allocations) {
|
|
5668
|
+
return +(this.amount - allocations.getByTransactionsIds(this.getIds()).amount).toFixed(2);
|
|
5669
|
+
}
|
|
5670
|
+
/**
|
|
5671
|
+
* Get cash position
|
|
5672
|
+
* Cash Position = Income - Expenses
|
|
5673
|
+
* Cash position is equal to Total Amount because income is positive and expense is negative,
|
|
5674
|
+
*/
|
|
5675
|
+
get cashPosition() {
|
|
5676
|
+
return this.claimAmount;
|
|
5677
|
+
}
|
|
5678
|
+
/**
|
|
5679
|
+
* get date of the last transaction
|
|
5680
|
+
*/
|
|
5681
|
+
getLastTransactionDate() {
|
|
5682
|
+
return new Date(Math.max.apply(Math, this.items.map((transaction) => transaction.date)));
|
|
5683
|
+
}
|
|
5684
|
+
/**
|
|
5685
|
+
* Get summary of claim amounts
|
|
5686
|
+
*/
|
|
5687
|
+
get claimAmount() {
|
|
5688
|
+
return this.items.reduce((sum, transaction) => sum + transaction.claimAmount, 0);
|
|
5689
|
+
}
|
|
5690
|
+
get grossAmount() {
|
|
5691
|
+
return +this.items.reduce((sum, transaction) => sum + transaction.amount, 0).toFixed(2);
|
|
5692
|
+
}
|
|
5693
|
+
getByChartAccountsCategories(categories) {
|
|
5694
|
+
return new TransactionCollection(this.items.filter((transaction) => categories.includes(transaction.chartAccounts.category)));
|
|
5695
|
+
}
|
|
5696
|
+
/**
|
|
5697
|
+
* Get transactions by month
|
|
5698
|
+
* @param monthIndex by which desired month should be taken
|
|
5699
|
+
*/
|
|
5700
|
+
getByMonth(monthIndex) {
|
|
5701
|
+
return new TransactionCollection(this.items.filter((transaction) => transaction.date.getMonth() === monthIndex));
|
|
5702
|
+
}
|
|
5703
|
+
/**
|
|
5704
|
+
* Get collection of transactions metadata
|
|
5705
|
+
*/
|
|
5706
|
+
getTransactionsMetadata() {
|
|
5707
|
+
const metadataArray = [];
|
|
5708
|
+
this.items.forEach((transaction) => {
|
|
5709
|
+
metadataArray.push(...transaction.metadata);
|
|
5710
|
+
});
|
|
5711
|
+
return new Collection(metadataArray);
|
|
5712
|
+
}
|
|
5713
|
+
getIncomeTransactions() {
|
|
5714
|
+
return new TransactionCollection(this.items.filter((transaction) => transaction.isIncome()));
|
|
5715
|
+
}
|
|
5716
|
+
get claimIncome() {
|
|
5717
|
+
return this.getIncomeTransactions().claimAmount;
|
|
5718
|
+
}
|
|
5719
|
+
getExpenseTransactions() {
|
|
5720
|
+
return new TransactionCollection(this.items.filter((transaction) => transaction.isExpense() && !transaction.isInterest()));
|
|
5721
|
+
}
|
|
5722
|
+
get claimExpense() {
|
|
5723
|
+
return this.getExpenseTransactions().claimAmount;
|
|
5724
|
+
}
|
|
5725
|
+
getInterestTransactions() {
|
|
5726
|
+
return new TransactionCollection(this.items.filter((transaction) => transaction.isInterest()));
|
|
5727
|
+
}
|
|
5728
|
+
get claimInterest() {
|
|
5729
|
+
return this.getInterestTransactions().claimAmount;
|
|
5730
|
+
}
|
|
5731
|
+
/**
|
|
5732
|
+
* Get collection of transactions and properties filtered by properties ids
|
|
5733
|
+
* @param ids Ids of properties for filter
|
|
5734
|
+
*/
|
|
5735
|
+
getByPropertiesIds(ids) {
|
|
5736
|
+
return new TransactionCollection(this.items.filter((transaction) => {
|
|
5737
|
+
var _a;
|
|
5738
|
+
return ids.includes((_a = transaction.property) === null || _a === void 0 ? void 0 : _a.id);
|
|
5739
|
+
}));
|
|
5740
|
+
}
|
|
5741
|
+
/**
|
|
5742
|
+
* Get new collection filtered by income source id
|
|
5743
|
+
* @param id id of income source for filter
|
|
5744
|
+
*/
|
|
5745
|
+
getByIncomeSourceId(id) {
|
|
5746
|
+
return new TransactionCollection(this.items.filter((transaction) => { var _a; return ((_a = transaction.incomeSource) === null || _a === void 0 ? void 0 : _a.id) === id; }));
|
|
5747
|
+
}
|
|
5748
|
+
/**
|
|
5749
|
+
* Get new collection filtered by chart accounts category
|
|
5750
|
+
* @param category Chart accounts category value
|
|
5751
|
+
*/
|
|
5752
|
+
getByChartAccountsCategory(category) {
|
|
5753
|
+
return new TransactionCollection(this.items.filter((transaction) => transaction.chartAccounts.category === category));
|
|
5754
|
+
}
|
|
5755
|
+
/**
|
|
5756
|
+
* Get new collection of property transactions
|
|
5757
|
+
*/
|
|
5758
|
+
getPropertyTransactions() {
|
|
5759
|
+
return new TransactionCollection(this.items.filter((transaction) => transaction.isPropertyTank()));
|
|
5760
|
+
}
|
|
5761
|
+
getDebitTransactions() {
|
|
5762
|
+
return new TransactionCollection(this.items.filter((transaction) => transaction.isDebit()));
|
|
5763
|
+
}
|
|
5764
|
+
getCreditTransactions() {
|
|
5765
|
+
return new TransactionCollection(this.items.filter((transaction) => transaction.isCredit()));
|
|
5766
|
+
}
|
|
5767
|
+
getByAllocations(allocations) {
|
|
5768
|
+
return new TransactionCollection(this.items.filter((transaction) => allocations.hasTransaction(transaction)));
|
|
5769
|
+
}
|
|
5770
|
+
/**
|
|
5771
|
+
* Get transactions related to Vehicle category
|
|
5772
|
+
*/
|
|
5773
|
+
getVehicleTransactions() {
|
|
5774
|
+
return this.create(this.items.filter((transaction) => {
|
|
5775
|
+
return transaction.isVehicleTransaction();
|
|
5776
|
+
}));
|
|
5777
|
+
}
|
|
5778
|
+
/**
|
|
5779
|
+
* Get new transaction collection filtered by tank type
|
|
5780
|
+
*/
|
|
5781
|
+
getByTankType(tankType) {
|
|
5782
|
+
return this.create(this.items.filter((transaction) => {
|
|
5783
|
+
switch (tankType) {
|
|
5784
|
+
case TankTypeEnum.PROPERTY:
|
|
5785
|
+
return transaction.isPropertyTank();
|
|
5786
|
+
case TankTypeEnum.WORK:
|
|
5787
|
+
return transaction.isWorkTank();
|
|
5788
|
+
case TankTypeEnum.SOLE:
|
|
5789
|
+
return transaction.isSoleTank();
|
|
5790
|
+
// Transaction may be not related to any tank type (personal)
|
|
5791
|
+
default:
|
|
5792
|
+
return false;
|
|
5793
|
+
}
|
|
5794
|
+
}));
|
|
5795
|
+
}
|
|
5796
|
+
getExportHeader() {
|
|
5797
|
+
return ['Date', 'Description', 'Debit', 'Credit'];
|
|
5798
|
+
}
|
|
5799
|
+
getExportFooter() {
|
|
5800
|
+
return [
|
|
5801
|
+
plainToClass(ExportCell, { value: 'Total', type: ExportCellTypeEnum.STRING }),
|
|
5802
|
+
plainToClass(ExportCell, { value: '', type: ExportCellTypeEnum.STRING }),
|
|
5803
|
+
plainToClass(ExportCell, { value: this.sumBy('debit'), type: ExportCellTypeEnum.CURRENCY }),
|
|
5804
|
+
plainToClass(ExportCell, { value: this.sumBy('credit'), type: ExportCellTypeEnum.CURRENCY })
|
|
5805
|
+
];
|
|
5806
|
+
}
|
|
5807
|
+
getExportBody() {
|
|
5808
|
+
return this.items.map((transaction) => {
|
|
5809
|
+
return [
|
|
5810
|
+
plainToClass(ExportCell, { value: transaction.date, type: ExportCellTypeEnum.DATE }),
|
|
5811
|
+
plainToClass(ExportCell, { value: transaction.description, type: ExportCellTypeEnum.STRING }),
|
|
5812
|
+
plainToClass(ExportCell, { value: transaction.debit, type: ExportCellTypeEnum.CURRENCY }),
|
|
5813
|
+
plainToClass(ExportCell, { value: transaction.credit, type: ExportCellTypeEnum.CURRENCY })
|
|
5814
|
+
];
|
|
5815
|
+
});
|
|
5816
|
+
}
|
|
5817
|
+
/**
|
|
5818
|
+
* Get list of vehicle transactions filtered by vehicle claim
|
|
5819
|
+
*/
|
|
5820
|
+
getByVehicleClaim(vehicleClaim) {
|
|
5821
|
+
if (!vehicleClaim) {
|
|
5822
|
+
return this.create([]);
|
|
5823
|
+
}
|
|
5824
|
+
return vehicleClaim.isSoleTank()
|
|
5825
|
+
// sole tank may have multiple vehicle claims, so we need to filter by business.id
|
|
5826
|
+
? this.getVehicleTransactions().filterBy('business.id', vehicleClaim.business.id)
|
|
5827
|
+
// work tank may have only one vehicle claim, so we need to filter by tank type
|
|
5828
|
+
: this.getVehicleTransactions().filterBy('tankType', TankTypeEnum.WORK);
|
|
5829
|
+
}
|
|
5830
|
+
/**
|
|
5831
|
+
* Get list of vehicle transactions except KMS transactions
|
|
5832
|
+
*/
|
|
5833
|
+
getLogbookTransactions() {
|
|
5834
|
+
return this
|
|
5835
|
+
.getVehicleTransactions()
|
|
5836
|
+
.removeBy('chartAccounts.id', [ChartAccountsListEnum.KLMS_TRAVELLED_FOR_WORK, ChartAccountsListEnum.KLMS_TRAVELLED]);
|
|
5837
|
+
}
|
|
5838
|
+
/**
|
|
5839
|
+
* Build chart data with transactions cash position.
|
|
5840
|
+
* Cash position = Income - Expenses (include depreciations)
|
|
5841
|
+
* Chart data for each month from fin year start till current month
|
|
5842
|
+
*/
|
|
5843
|
+
getCashPositionChartData() {
|
|
5844
|
+
const chartData = [
|
|
5845
|
+
plainToClass(ChartData, { name: 'Income', data: [] }),
|
|
5846
|
+
plainToClass(ChartData, { name: 'Expense', data: [] })
|
|
5847
|
+
];
|
|
5848
|
+
new FinancialYear().getPastMonths().forEach((month) => {
|
|
5849
|
+
chartData[0].data.push({
|
|
5850
|
+
label: MONTHS[month],
|
|
5851
|
+
value: this.getIncomeTransactions().getByMonth(month).claimAmount
|
|
5852
|
+
});
|
|
5853
|
+
chartData[1].data.push({
|
|
5854
|
+
label: MONTHS[month],
|
|
5855
|
+
value: Math.abs(this.getExpenseTransactions().getByMonth(month).claimAmount)
|
|
5856
|
+
});
|
|
5857
|
+
});
|
|
5858
|
+
return chartData;
|
|
5859
|
+
}
|
|
5860
|
+
}
|
|
5861
|
+
|
|
5862
|
+
class TransactionAllocationCollection extends Collection {
|
|
5863
|
+
get amount() {
|
|
5864
|
+
return this.sumBy('amount');
|
|
5865
|
+
}
|
|
5866
|
+
getByTransactionsIds(ids) {
|
|
5867
|
+
return new TransactionAllocationCollection(this.items.filter((allocation) => ids.includes(allocation.transaction.id)));
|
|
5868
|
+
}
|
|
5869
|
+
getByBankTransactionsIds(ids) {
|
|
5870
|
+
return new TransactionAllocationCollection(this.items.filter((allocation) => ids.includes(allocation.bankTransaction.id)));
|
|
5871
|
+
}
|
|
5872
|
+
/**
|
|
5873
|
+
* Group allocations by bank account via bank transactions collection
|
|
5874
|
+
*/
|
|
5875
|
+
groupByBankAccount(bankTransactions) {
|
|
5876
|
+
// Group bank transactions by bank account id
|
|
5877
|
+
const bankTransactionsByBankAccount = new CollectionDictionary(bankTransactions, 'bankAccount.id');
|
|
5878
|
+
// Create empty dictionary of transaction allocations
|
|
5879
|
+
const allocationsByBankAccount = new CollectionDictionary(new TransactionAllocationCollection([]));
|
|
5880
|
+
// Fill allocations dictionary with bank transactions dictionary keys and allocations related with each bank transaction collection
|
|
5881
|
+
bankTransactionsByBankAccount.keys.forEach((key) => {
|
|
5882
|
+
allocationsByBankAccount.add(key, this.getByBankTransactionsIds(bankTransactionsByBankAccount.get(key).getIds()));
|
|
5883
|
+
});
|
|
5884
|
+
return allocationsByBankAccount;
|
|
5885
|
+
}
|
|
5886
|
+
/**
|
|
5887
|
+
* check if collection includes allocation of passed transaction
|
|
5888
|
+
*/
|
|
5889
|
+
hasTransaction(transaction) {
|
|
5890
|
+
return !!this.items.find((allocation) => allocation.transaction.id === transaction.id);
|
|
5891
|
+
}
|
|
5892
|
+
/**
|
|
5893
|
+
* Check if bank transaction is related with current allocations
|
|
5894
|
+
*/
|
|
5895
|
+
hasBankTransaction(bankTransaction) {
|
|
5896
|
+
return !!this.items.find((allocation) => allocation.bankTransaction.id === bankTransaction.id);
|
|
5897
|
+
}
|
|
5898
|
+
}
|
|
5899
|
+
|
|
5900
|
+
class TransactionBaseCollection extends Collection {
|
|
5901
|
+
getClaimAmountByBusiness(business) {
|
|
5902
|
+
return this.filterBy('business.id', business.id)
|
|
5903
|
+
.sumBy('claimAmount');
|
|
5904
|
+
}
|
|
5905
|
+
}
|
|
5906
|
+
|
|
5584
5907
|
// @TODO Alex move here all collections
|
|
5585
5908
|
|
|
5586
5909
|
class AccountSetupItemCollection extends Collection {
|
|
@@ -5795,329 +6118,102 @@ class ChatCollection extends Collection {
|
|
|
5795
6118
|
getSortedByNewest(messages) {
|
|
5796
6119
|
const chatsById = new Dictionary(this.toArray());
|
|
5797
6120
|
// get chats array sorted from newest to oldest
|
|
5798
|
-
const chats = uniqBy(new MessageCollection(messages)
|
|
5799
|
-
.filterBy('chat.id', this.getIds())
|
|
5800
|
-
.sortBy('createdAt', true)
|
|
5801
|
-
.toArray()
|
|
5802
|
-
.map((message) => chatsById.get(message.chat.id)), 'id');
|
|
5803
|
-
const emptyChats = differenceBy(this.toArray(), chats, 'id');
|
|
5804
|
-
return this.create([...chats, ...emptyChats]);
|
|
5805
|
-
}
|
|
5806
|
-
getActive() {
|
|
5807
|
-
return this.filterBy('status', ChatStatusEnum.ACTIVE);
|
|
5808
|
-
}
|
|
5809
|
-
}
|
|
5810
|
-
|
|
5811
|
-
class ClientCollection extends Collection {
|
|
5812
|
-
}
|
|
5813
|
-
|
|
5814
|
-
var FirmTypeEnum;
|
|
5815
|
-
(function (FirmTypeEnum) {
|
|
5816
|
-
FirmTypeEnum[FirmTypeEnum["ACCOUNTANT"] = 1] = "ACCOUNTANT";
|
|
5817
|
-
FirmTypeEnum[FirmTypeEnum["ADVISOR"] = 2] = "ADVISOR";
|
|
5818
|
-
})(FirmTypeEnum || (FirmTypeEnum = {}));
|
|
5819
|
-
|
|
5820
|
-
class EmployeeCollection extends Collection {
|
|
5821
|
-
get accountant() {
|
|
5822
|
-
var _a;
|
|
5823
|
-
return (_a = this.items.filter((user) => user.employeeDetails.firm.type === FirmTypeEnum.ACCOUNTANT)[0]) !== null && _a !== void 0 ? _a : null;
|
|
5824
|
-
}
|
|
5825
|
-
get advisors() {
|
|
5826
|
-
return this.items.filter((user) => user.employeeDetails.firm.type === FirmTypeEnum.ADVISOR);
|
|
5827
|
-
}
|
|
5828
|
-
}
|
|
5829
|
-
|
|
5830
|
-
/**
|
|
5831
|
-
* Collection of tax review
|
|
5832
|
-
*/
|
|
5833
|
-
class ClientMovementCollection extends Collection {
|
|
5834
|
-
get active() {
|
|
5835
|
-
return new ClientMovementCollection(this.items.filter((clientMovement) => !clientMovement.dateTo));
|
|
5836
|
-
}
|
|
5837
|
-
get employees() {
|
|
5838
|
-
return new EmployeeCollection(this.items.map((clientMovement) => clientMovement.employee));
|
|
5839
|
-
}
|
|
5840
|
-
get clients() {
|
|
5841
|
-
return new EmployeeCollection(this.items.map((clientMovement) => clientMovement.client));
|
|
5842
|
-
}
|
|
5843
|
-
get accountant() {
|
|
5844
|
-
var _a;
|
|
5845
|
-
return (_a = this.items.filter((clientMovement) => clientMovement.firm.type === FirmTypeEnum.ACCOUNTANT)[0]) !== null && _a !== void 0 ? _a : null;
|
|
5846
|
-
}
|
|
5847
|
-
get advisors() {
|
|
5848
|
-
return new ClientMovementCollection(this.items.filter((clientMovement) => clientMovement.firm.type === FirmTypeEnum.ADVISOR));
|
|
5849
|
-
}
|
|
5850
|
-
getByEmployeeId(id) {
|
|
5851
|
-
return new ClientMovementCollection(this.items.filter((clientMovement) => clientMovement.employee.id === id));
|
|
5852
|
-
}
|
|
5853
|
-
getByFirmType(firmType) {
|
|
5854
|
-
return new ClientMovementCollection(this.items.filter((clientMovement) => clientMovement.firm.type === firmType));
|
|
5855
|
-
}
|
|
5856
|
-
}
|
|
5857
|
-
|
|
5858
|
-
/**
|
|
5859
|
-
* Collection of employee clients tax summary information
|
|
5860
|
-
*/
|
|
5861
|
-
class ClientPortfolioReportCollection extends Collection {
|
|
5862
|
-
get marketValue() {
|
|
5863
|
-
return this.sumBy('marketValue');
|
|
5864
|
-
}
|
|
5865
|
-
get loanBalance() {
|
|
5866
|
-
return this.sumBy('loanBalance');
|
|
5867
|
-
}
|
|
5868
|
-
get equityPosition() {
|
|
5869
|
-
return this.sumBy('equityPosition');
|
|
5870
|
-
}
|
|
5871
|
-
/**
|
|
5872
|
-
* Get average market value if there are more than 1 item in the collection
|
|
5873
|
-
*/
|
|
5874
|
-
get averageMarketValue() {
|
|
5875
|
-
return this.items.length > 1 ? this.marketValue / this.items.length : null;
|
|
5876
|
-
}
|
|
5877
|
-
/**
|
|
5878
|
-
* Get average loan balance if there are more than 1 item in the collection
|
|
5879
|
-
*/
|
|
5880
|
-
get averageLoanBalance() {
|
|
5881
|
-
return this.items.length > 1 ? this.loanBalance / this.items.length : null;
|
|
5882
|
-
}
|
|
5883
|
-
/**
|
|
5884
|
-
* Get average equity position if there are more than 1 item in the collection
|
|
5885
|
-
*/
|
|
5886
|
-
get averageEquityPosition() {
|
|
5887
|
-
return this.items.length > 1 ? this.equityPosition / this.items.length : null;
|
|
5888
|
-
}
|
|
5889
|
-
/**
|
|
5890
|
-
* Return report by provided category name
|
|
5891
|
-
*/
|
|
5892
|
-
getByCategoryName(name) {
|
|
5893
|
-
return this.items.find((item) => item.category === name);
|
|
5894
|
-
}
|
|
5895
|
-
}
|
|
5896
|
-
|
|
5897
|
-
/**
|
|
5898
|
-
* Chart serie class: chart data item
|
|
5899
|
-
* @TODO consider rename to ChartSerieData
|
|
5900
|
-
*/
|
|
5901
|
-
class ChartSerie {
|
|
5902
|
-
}
|
|
5903
|
-
|
|
5904
|
-
/**
|
|
5905
|
-
* Chart data class
|
|
5906
|
-
* @TODO consider rename to ChartSerie
|
|
5907
|
-
*/
|
|
5908
|
-
class ChartData {
|
|
5909
|
-
}
|
|
5910
|
-
__decorate([
|
|
5911
|
-
Type(() => ChartSerie)
|
|
5912
|
-
], ChartData.prototype, "data", void 0);
|
|
5913
|
-
|
|
5914
|
-
const MONTHS = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec', 'Jan'];
|
|
5915
|
-
|
|
5916
|
-
/**
|
|
5917
|
-
* Collection of transactions
|
|
5918
|
-
*/
|
|
5919
|
-
class TransactionCollection extends ExportableCollection {
|
|
5920
|
-
/**
|
|
5921
|
-
* Get total amount of all transactions in the collection
|
|
5922
|
-
*/
|
|
5923
|
-
get amount() {
|
|
5924
|
-
return +this.items.reduce((sum, transaction) => sum + transaction.getNetAmount(), 0).toFixed(2);
|
|
5925
|
-
}
|
|
5926
|
-
/**
|
|
5927
|
-
* Difference between allocated amount and total amount
|
|
5928
|
-
*/
|
|
5929
|
-
getUnallocatedAmount(allocations) {
|
|
5930
|
-
return +(this.amount - allocations.getByTransactionsIds(this.getIds()).amount).toFixed(2);
|
|
5931
|
-
}
|
|
5932
|
-
/**
|
|
5933
|
-
* Get cash position
|
|
5934
|
-
* Cash Position = Income - Expenses
|
|
5935
|
-
* Cash position is equal to Total Amount because income is positive and expense is negative,
|
|
5936
|
-
*/
|
|
5937
|
-
get cashPosition() {
|
|
5938
|
-
return this.claimAmount;
|
|
5939
|
-
}
|
|
5940
|
-
/**
|
|
5941
|
-
* get date of the last transaction
|
|
5942
|
-
*/
|
|
5943
|
-
getLastTransactionDate() {
|
|
5944
|
-
return new Date(Math.max.apply(Math, this.items.map((transaction) => transaction.date)));
|
|
5945
|
-
}
|
|
5946
|
-
/**
|
|
5947
|
-
* Get summary of claim amounts
|
|
5948
|
-
*/
|
|
5949
|
-
get claimAmount() {
|
|
5950
|
-
return this.items.reduce((sum, transaction) => sum + transaction.claimAmount, 0);
|
|
5951
|
-
}
|
|
5952
|
-
get grossAmount() {
|
|
5953
|
-
return +this.items.reduce((sum, transaction) => sum + transaction.amount, 0).toFixed(2);
|
|
5954
|
-
}
|
|
5955
|
-
getByChartAccountsCategories(categories) {
|
|
5956
|
-
return new TransactionCollection(this.items.filter((transaction) => categories.includes(transaction.chartAccounts.category)));
|
|
5957
|
-
}
|
|
5958
|
-
/**
|
|
5959
|
-
* Get transactions by month
|
|
5960
|
-
* @param monthIndex by which desired month should be taken
|
|
5961
|
-
*/
|
|
5962
|
-
getByMonth(monthIndex) {
|
|
5963
|
-
return new TransactionCollection(this.items.filter((transaction) => transaction.date.getMonth() === monthIndex));
|
|
5964
|
-
}
|
|
5965
|
-
/**
|
|
5966
|
-
* Get collection of transactions metadata
|
|
5967
|
-
*/
|
|
5968
|
-
getTransactionsMetadata() {
|
|
5969
|
-
const metadataArray = [];
|
|
5970
|
-
this.items.forEach((transaction) => {
|
|
5971
|
-
metadataArray.push(...transaction.metadata);
|
|
5972
|
-
});
|
|
5973
|
-
return new Collection(metadataArray);
|
|
5974
|
-
}
|
|
5975
|
-
getIncomeTransactions() {
|
|
5976
|
-
return new TransactionCollection(this.items.filter((transaction) => transaction.isIncome()));
|
|
6121
|
+
const chats = uniqBy(new MessageCollection(messages)
|
|
6122
|
+
.filterBy('chat.id', this.getIds())
|
|
6123
|
+
.sortBy('createdAt', true)
|
|
6124
|
+
.toArray()
|
|
6125
|
+
.map((message) => chatsById.get(message.chat.id)), 'id');
|
|
6126
|
+
const emptyChats = differenceBy(this.toArray(), chats, 'id');
|
|
6127
|
+
return this.create([...chats, ...emptyChats]);
|
|
5977
6128
|
}
|
|
5978
|
-
|
|
5979
|
-
return this.
|
|
6129
|
+
getActive() {
|
|
6130
|
+
return this.filterBy('status', ChatStatusEnum.ACTIVE);
|
|
5980
6131
|
}
|
|
5981
|
-
|
|
5982
|
-
|
|
6132
|
+
}
|
|
6133
|
+
|
|
6134
|
+
class ClientCollection extends Collection {
|
|
6135
|
+
}
|
|
6136
|
+
|
|
6137
|
+
var FirmTypeEnum;
|
|
6138
|
+
(function (FirmTypeEnum) {
|
|
6139
|
+
FirmTypeEnum[FirmTypeEnum["ACCOUNTANT"] = 1] = "ACCOUNTANT";
|
|
6140
|
+
FirmTypeEnum[FirmTypeEnum["ADVISOR"] = 2] = "ADVISOR";
|
|
6141
|
+
})(FirmTypeEnum || (FirmTypeEnum = {}));
|
|
6142
|
+
|
|
6143
|
+
class EmployeeCollection extends Collection {
|
|
6144
|
+
get accountant() {
|
|
6145
|
+
var _a;
|
|
6146
|
+
return (_a = this.items.filter((user) => user.employeeDetails.firm.type === FirmTypeEnum.ACCOUNTANT)[0]) !== null && _a !== void 0 ? _a : null;
|
|
5983
6147
|
}
|
|
5984
|
-
get
|
|
5985
|
-
return this.
|
|
6148
|
+
get advisors() {
|
|
6149
|
+
return this.items.filter((user) => user.employeeDetails.firm.type === FirmTypeEnum.ADVISOR);
|
|
5986
6150
|
}
|
|
5987
|
-
|
|
5988
|
-
|
|
6151
|
+
}
|
|
6152
|
+
|
|
6153
|
+
/**
|
|
6154
|
+
* Collection of tax review
|
|
6155
|
+
*/
|
|
6156
|
+
class ClientMovementCollection extends Collection {
|
|
6157
|
+
get active() {
|
|
6158
|
+
return new ClientMovementCollection(this.items.filter((clientMovement) => !clientMovement.dateTo));
|
|
5989
6159
|
}
|
|
5990
|
-
get
|
|
5991
|
-
return this.
|
|
6160
|
+
get employees() {
|
|
6161
|
+
return new EmployeeCollection(this.items.map((clientMovement) => clientMovement.employee));
|
|
5992
6162
|
}
|
|
5993
|
-
|
|
5994
|
-
|
|
5995
|
-
* @param ids Ids of properties for filter
|
|
5996
|
-
*/
|
|
5997
|
-
getByPropertiesIds(ids) {
|
|
5998
|
-
return new TransactionCollection(this.items.filter((transaction) => {
|
|
5999
|
-
var _a;
|
|
6000
|
-
return ids.includes((_a = transaction.property) === null || _a === void 0 ? void 0 : _a.id);
|
|
6001
|
-
}));
|
|
6163
|
+
get clients() {
|
|
6164
|
+
return new EmployeeCollection(this.items.map((clientMovement) => clientMovement.client));
|
|
6002
6165
|
}
|
|
6003
|
-
|
|
6004
|
-
|
|
6005
|
-
|
|
6006
|
-
*/
|
|
6007
|
-
getByIncomeSourceId(id) {
|
|
6008
|
-
return new TransactionCollection(this.items.filter((transaction) => { var _a; return ((_a = transaction.incomeSource) === null || _a === void 0 ? void 0 : _a.id) === id; }));
|
|
6166
|
+
get accountant() {
|
|
6167
|
+
var _a;
|
|
6168
|
+
return (_a = this.items.filter((clientMovement) => clientMovement.firm.type === FirmTypeEnum.ACCOUNTANT)[0]) !== null && _a !== void 0 ? _a : null;
|
|
6009
6169
|
}
|
|
6010
|
-
|
|
6011
|
-
|
|
6012
|
-
* @param category Chart accounts category value
|
|
6013
|
-
*/
|
|
6014
|
-
getByChartAccountsCategory(category) {
|
|
6015
|
-
return new TransactionCollection(this.items.filter((transaction) => transaction.chartAccounts.category === category));
|
|
6170
|
+
get advisors() {
|
|
6171
|
+
return new ClientMovementCollection(this.items.filter((clientMovement) => clientMovement.firm.type === FirmTypeEnum.ADVISOR));
|
|
6016
6172
|
}
|
|
6017
|
-
|
|
6018
|
-
|
|
6019
|
-
*/
|
|
6020
|
-
getPropertyTransactions() {
|
|
6021
|
-
return new TransactionCollection(this.items.filter((transaction) => transaction.isPropertyTank()));
|
|
6173
|
+
getByEmployeeId(id) {
|
|
6174
|
+
return new ClientMovementCollection(this.items.filter((clientMovement) => clientMovement.employee.id === id));
|
|
6022
6175
|
}
|
|
6023
|
-
|
|
6024
|
-
return new
|
|
6176
|
+
getByFirmType(firmType) {
|
|
6177
|
+
return new ClientMovementCollection(this.items.filter((clientMovement) => clientMovement.firm.type === firmType));
|
|
6025
6178
|
}
|
|
6026
|
-
|
|
6027
|
-
|
|
6179
|
+
}
|
|
6180
|
+
|
|
6181
|
+
/**
|
|
6182
|
+
* Collection of employee clients tax summary information
|
|
6183
|
+
*/
|
|
6184
|
+
class ClientPortfolioReportCollection extends Collection {
|
|
6185
|
+
get marketValue() {
|
|
6186
|
+
return this.sumBy('marketValue');
|
|
6028
6187
|
}
|
|
6029
|
-
|
|
6030
|
-
return
|
|
6188
|
+
get loanBalance() {
|
|
6189
|
+
return this.sumBy('loanBalance');
|
|
6031
6190
|
}
|
|
6032
|
-
|
|
6033
|
-
|
|
6034
|
-
*/
|
|
6035
|
-
getVehicleTransactions() {
|
|
6036
|
-
return this.create(this.items.filter((transaction) => {
|
|
6037
|
-
return transaction.isVehicleTransaction();
|
|
6038
|
-
}));
|
|
6191
|
+
get equityPosition() {
|
|
6192
|
+
return this.sumBy('equityPosition');
|
|
6039
6193
|
}
|
|
6040
6194
|
/**
|
|
6041
|
-
* Get
|
|
6195
|
+
* Get average market value if there are more than 1 item in the collection
|
|
6042
6196
|
*/
|
|
6043
|
-
|
|
6044
|
-
return this.
|
|
6045
|
-
switch (tankType) {
|
|
6046
|
-
case TankTypeEnum.PROPERTY:
|
|
6047
|
-
return transaction.isPropertyTank();
|
|
6048
|
-
case TankTypeEnum.WORK:
|
|
6049
|
-
return transaction.isWorkTank();
|
|
6050
|
-
case TankTypeEnum.SOLE:
|
|
6051
|
-
return transaction.isSoleTank();
|
|
6052
|
-
// Transaction may be not related to any tank type (personal)
|
|
6053
|
-
default:
|
|
6054
|
-
return false;
|
|
6055
|
-
}
|
|
6056
|
-
}));
|
|
6057
|
-
}
|
|
6058
|
-
getExportHeader() {
|
|
6059
|
-
return ['Date', 'Description', 'Debit', 'Credit'];
|
|
6060
|
-
}
|
|
6061
|
-
getExportFooter() {
|
|
6062
|
-
return [
|
|
6063
|
-
plainToClass(ExportCell, { value: 'Total', type: ExportCellTypeEnum.STRING }),
|
|
6064
|
-
plainToClass(ExportCell, { value: '', type: ExportCellTypeEnum.STRING }),
|
|
6065
|
-
plainToClass(ExportCell, { value: this.sumBy('debit'), type: ExportCellTypeEnum.CURRENCY }),
|
|
6066
|
-
plainToClass(ExportCell, { value: this.sumBy('credit'), type: ExportCellTypeEnum.CURRENCY })
|
|
6067
|
-
];
|
|
6068
|
-
}
|
|
6069
|
-
getExportBody() {
|
|
6070
|
-
return this.items.map((transaction) => {
|
|
6071
|
-
return [
|
|
6072
|
-
plainToClass(ExportCell, { value: transaction.date, type: ExportCellTypeEnum.DATE }),
|
|
6073
|
-
plainToClass(ExportCell, { value: transaction.description, type: ExportCellTypeEnum.STRING }),
|
|
6074
|
-
plainToClass(ExportCell, { value: transaction.debit, type: ExportCellTypeEnum.CURRENCY }),
|
|
6075
|
-
plainToClass(ExportCell, { value: transaction.credit, type: ExportCellTypeEnum.CURRENCY })
|
|
6076
|
-
];
|
|
6077
|
-
});
|
|
6197
|
+
get averageMarketValue() {
|
|
6198
|
+
return this.items.length > 1 ? this.marketValue / this.items.length : null;
|
|
6078
6199
|
}
|
|
6079
6200
|
/**
|
|
6080
|
-
* Get
|
|
6201
|
+
* Get average loan balance if there are more than 1 item in the collection
|
|
6081
6202
|
*/
|
|
6082
|
-
|
|
6083
|
-
|
|
6084
|
-
return this.create([]);
|
|
6085
|
-
}
|
|
6086
|
-
return vehicleClaim.isSoleTank()
|
|
6087
|
-
// sole tank may have multiple vehicle claims, so we need to filter by business.id
|
|
6088
|
-
? this.getVehicleTransactions().filterBy('business.id', vehicleClaim.business.id)
|
|
6089
|
-
// work tank may have only one vehicle claim, so we need to filter by tank type
|
|
6090
|
-
: this.getVehicleTransactions().filterBy('tankType', TankTypeEnum.WORK);
|
|
6203
|
+
get averageLoanBalance() {
|
|
6204
|
+
return this.items.length > 1 ? this.loanBalance / this.items.length : null;
|
|
6091
6205
|
}
|
|
6092
6206
|
/**
|
|
6093
|
-
* Get
|
|
6207
|
+
* Get average equity position if there are more than 1 item in the collection
|
|
6094
6208
|
*/
|
|
6095
|
-
|
|
6096
|
-
return this
|
|
6097
|
-
.getVehicleTransactions()
|
|
6098
|
-
.removeBy('chartAccounts.id', [ChartAccountsListEnum.KLMS_TRAVELLED_FOR_WORK, ChartAccountsListEnum.KLMS_TRAVELLED]);
|
|
6209
|
+
get averageEquityPosition() {
|
|
6210
|
+
return this.items.length > 1 ? this.equityPosition / this.items.length : null;
|
|
6099
6211
|
}
|
|
6100
6212
|
/**
|
|
6101
|
-
*
|
|
6102
|
-
* Cash position = Income - Expenses (include depreciations)
|
|
6103
|
-
* Chart data for each month from fin year start till current month
|
|
6213
|
+
* Return report by provided category name
|
|
6104
6214
|
*/
|
|
6105
|
-
|
|
6106
|
-
|
|
6107
|
-
plainToClass(ChartData, { name: 'Income', data: [] }),
|
|
6108
|
-
plainToClass(ChartData, { name: 'Expense', data: [] })
|
|
6109
|
-
];
|
|
6110
|
-
new FinancialYear().getPastMonths().forEach((month) => {
|
|
6111
|
-
chartData[0].data.push({
|
|
6112
|
-
label: MONTHS[month],
|
|
6113
|
-
value: this.getIncomeTransactions().getByMonth(month).claimAmount
|
|
6114
|
-
});
|
|
6115
|
-
chartData[1].data.push({
|
|
6116
|
-
label: MONTHS[month],
|
|
6117
|
-
value: Math.abs(this.getExpenseTransactions().getByMonth(month).claimAmount)
|
|
6118
|
-
});
|
|
6119
|
-
});
|
|
6120
|
-
return chartData;
|
|
6215
|
+
getByCategoryName(name) {
|
|
6216
|
+
return this.items.find((item) => item.category === name);
|
|
6121
6217
|
}
|
|
6122
6218
|
}
|
|
6123
6219
|
|
|
@@ -6763,7 +6859,11 @@ const TAX_RETURN_CATEGORIES = {
|
|
|
6763
6859
|
TaxReturnCategoryListEnum.DEPRECIATION_EXPENSES,
|
|
6764
6860
|
TaxReturnCategoryListEnum.MOTOR_VEHICLE_EXPENSES,
|
|
6765
6861
|
TaxReturnCategoryListEnum.ALL_OTHER_EXPENSES
|
|
6766
|
-
]
|
|
6862
|
+
],
|
|
6863
|
+
// @TODO TT-2386 Nikita to move sole tax offsets in separated category
|
|
6864
|
+
taxOffsets: [
|
|
6865
|
+
TaxReturnCategoryListEnum.TAX_OFFSETS
|
|
6866
|
+
],
|
|
6767
6867
|
},
|
|
6768
6868
|
};
|
|
6769
6869
|
|
|
@@ -6820,44 +6920,6 @@ class TaxReviewCollection extends Collection {
|
|
|
6820
6920
|
}
|
|
6821
6921
|
}
|
|
6822
6922
|
|
|
6823
|
-
class TransactionAllocationCollection extends Collection {
|
|
6824
|
-
get amount() {
|
|
6825
|
-
return this.sumBy('amount');
|
|
6826
|
-
}
|
|
6827
|
-
getByTransactionsIds(ids) {
|
|
6828
|
-
return new TransactionAllocationCollection(this.items.filter((allocation) => ids.includes(allocation.transaction.id)));
|
|
6829
|
-
}
|
|
6830
|
-
getByBankTransactionsIds(ids) {
|
|
6831
|
-
return new TransactionAllocationCollection(this.items.filter((allocation) => ids.includes(allocation.bankTransaction.id)));
|
|
6832
|
-
}
|
|
6833
|
-
/**
|
|
6834
|
-
* Group allocations by bank account via bank transactions collection
|
|
6835
|
-
*/
|
|
6836
|
-
groupByBankAccount(bankTransactions) {
|
|
6837
|
-
// Group bank transactions by bank account id
|
|
6838
|
-
const bankTransactionsByBankAccount = new CollectionDictionary(bankTransactions, 'bankAccount.id');
|
|
6839
|
-
// Create empty dictionary of transaction allocations
|
|
6840
|
-
const allocationsByBankAccount = new CollectionDictionary(new TransactionAllocationCollection([]));
|
|
6841
|
-
// Fill allocations dictionary with bank transactions dictionary keys and allocations related with each bank transaction collection
|
|
6842
|
-
bankTransactionsByBankAccount.keys.forEach((key) => {
|
|
6843
|
-
allocationsByBankAccount.add(key, this.getByBankTransactionsIds(bankTransactionsByBankAccount.get(key).getIds()));
|
|
6844
|
-
});
|
|
6845
|
-
return allocationsByBankAccount;
|
|
6846
|
-
}
|
|
6847
|
-
/**
|
|
6848
|
-
* check if collection includes allocation of passed transaction
|
|
6849
|
-
*/
|
|
6850
|
-
hasTransaction(transaction) {
|
|
6851
|
-
return !!this.items.find((allocation) => allocation.transaction.id === transaction.id);
|
|
6852
|
-
}
|
|
6853
|
-
/**
|
|
6854
|
-
* Check if bank transaction is related with current allocations
|
|
6855
|
-
*/
|
|
6856
|
-
hasBankTransaction(bankTransaction) {
|
|
6857
|
-
return !!this.items.find((allocation) => allocation.bankTransaction.id === bankTransaction.id);
|
|
6858
|
-
}
|
|
6859
|
-
}
|
|
6860
|
-
|
|
6861
6923
|
/**
|
|
6862
6924
|
* Collection of user event settings
|
|
6863
6925
|
*/
|
|
@@ -9382,7 +9444,6 @@ class TaxSummary {
|
|
|
9382
9444
|
return income - Math.abs(expenses) + Math.abs(taxOffsets) + Math.abs(taxInstallments) + Math.abs(frankingCredits);
|
|
9383
9445
|
}
|
|
9384
9446
|
/**
|
|
9385
|
-
* @TODO Nicole update documentation + check calculations
|
|
9386
9447
|
* Sole Net Cash = gross income – expenses
|
|
9387
9448
|
* https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/217677990/Dashboard+Main
|
|
9388
9449
|
*/
|
|
@@ -9392,7 +9453,6 @@ class TaxSummary {
|
|
|
9392
9453
|
return income - Math.abs(expenses);
|
|
9393
9454
|
}
|
|
9394
9455
|
/**
|
|
9395
|
-
* @TODO Nicole update documentation + check calculations
|
|
9396
9456
|
* Sole Net Total = Gross income - expenses
|
|
9397
9457
|
* https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/217677990/Dashboard+Main
|
|
9398
9458
|
*/
|
|
@@ -9589,6 +9649,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
|
|
|
9589
9649
|
}]
|
|
9590
9650
|
}] });
|
|
9591
9651
|
|
|
9652
|
+
/**
|
|
9653
|
+
* @TODO vik replace with json when the final list is confirmed
|
|
9654
|
+
*/
|
|
9655
|
+
class SoleBusinessLossOffsetRuleService extends RestService {
|
|
9656
|
+
constructor() {
|
|
9657
|
+
super(...arguments);
|
|
9658
|
+
this.modelClass = SoleBusinessLossOffsetRule;
|
|
9659
|
+
this.url = 'sole-business-loss-offset-rules';
|
|
9660
|
+
this.isHydra = true;
|
|
9661
|
+
}
|
|
9662
|
+
}
|
|
9663
|
+
SoleBusinessLossOffsetRuleService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: SoleBusinessLossOffsetRuleService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
9664
|
+
SoleBusinessLossOffsetRuleService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: SoleBusinessLossOffsetRuleService, providedIn: 'root' });
|
|
9665
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: SoleBusinessLossOffsetRuleService, decorators: [{
|
|
9666
|
+
type: Injectable,
|
|
9667
|
+
args: [{
|
|
9668
|
+
providedIn: 'root'
|
|
9669
|
+
}]
|
|
9670
|
+
}] });
|
|
9671
|
+
|
|
9592
9672
|
class SoleContactService extends RestService {
|
|
9593
9673
|
constructor() {
|
|
9594
9674
|
super(...arguments);
|
|
@@ -14961,6 +15041,29 @@ class SoleBusinessAllocationsForm extends FormArray {
|
|
|
14961
15041
|
}
|
|
14962
15042
|
}
|
|
14963
15043
|
|
|
15044
|
+
class SoleBusinessLossForm extends AbstractForm {
|
|
15045
|
+
constructor(loss, balance) {
|
|
15046
|
+
var _a;
|
|
15047
|
+
super({
|
|
15048
|
+
openBalance: new FormControl(loss.openBalance, Validators.required),
|
|
15049
|
+
offsetRule: new FormControl((_a = loss.offsetRule) === null || _a === void 0 ? void 0 : _a.id),
|
|
15050
|
+
// sum of depreciations/transactions claim amount - openBalance
|
|
15051
|
+
balance: new FormControl({ value: balance, disabled: true }),
|
|
15052
|
+
}, loss);
|
|
15053
|
+
this.loss = loss;
|
|
15054
|
+
this.get('openBalance').valueChanges.subscribe((openBalance) => {
|
|
15055
|
+
this.get('balance').setValue(balance - openBalance);
|
|
15056
|
+
});
|
|
15057
|
+
}
|
|
15058
|
+
/**
|
|
15059
|
+
* radio buttons can't work with object
|
|
15060
|
+
* https://github.com/angular/components/issues/10495
|
|
15061
|
+
*/
|
|
15062
|
+
submit() {
|
|
15063
|
+
return super.submit({ offsetRule: this.get('offsetRule').value ? { id: this.get('offsetRule').value } : null });
|
|
15064
|
+
}
|
|
15065
|
+
}
|
|
15066
|
+
|
|
14964
15067
|
class SoleContactForm extends AbstractForm {
|
|
14965
15068
|
constructor(contact = plainToClass(SoleContact, {})) {
|
|
14966
15069
|
super({
|
|
@@ -16097,5 +16200,5 @@ VehicleLogbookForm.maxDescriptionLength = 60;
|
|
|
16097
16200
|
* Generated bundle index. Do not edit.
|
|
16098
16201
|
*/
|
|
16099
16202
|
|
|
16100
|
-
export { AbstractForm, AbstractModel, AccountSetupItem, AccountSetupItemCollection, AccountSetupService, Address, AddressService, AddressTypeEnum, AlphabetColorsEnum, AppEvent, AppEventTypeEnum, AssetEntityTypeEnum, AssetTypeEnum, AssetsService, AuthService, BANK_ACCOUNT_TYPES, Badge, BadgeColorEnum, Bank, BankAccount, BankAccountAddManualForm, BankAccountAllocationForm, BankAccountCalculationService, BankAccountChartData, BankAccountCollection, BankAccountImportForm, BankAccountPropertiesForm, BankAccountProperty, BankAccountService, BankAccountStatusEnum, BankAccountTypeEnum, BankAccountsImportForm, BankConnection, BankConnectionService, BankConnectionStatusEnum, BankLoginData, BankLoginForm, BankService, BankTransaction, BankTransactionCalculationService, BankTransactionChartData, BankTransactionCollection, BankTransactionService, BankTransactionSummaryFieldsEnum, BankTransactionTypeEnum, BasiqConfig, BasiqJob, BasiqService, BasiqToken, BorrowingExpense, BorrowingExpenseLoan, BorrowingExpenseService, CAPITAL_COSTS_ITEMS, CHART_ACCOUNTS_CATEGORIES, CalculationFormItem, CalculationFormTypeEnum, CgtExemptionAndRolloverCodeEnum, ChartAccounts, ChartAccountsCategoryECollection, ChartAccountsCategoryEnum, ChartAccountsCollection, ChartAccountsDepreciation, ChartAccountsDepreciationService, ChartAccountsEtpEnum, ChartAccountsHeading, ChartAccountsHeadingListEnum, ChartAccountsHeadingTaxDeductibleEnum, ChartAccountsHeadingTaxableEnum, ChartAccountsHeadingVehicleListEnum, ChartAccountsListEnum, ChartAccountsMetadata, ChartAccountsMetadataListEnum, ChartAccountsMetadataTypeEnum, ChartAccountsService, ChartAccountsTaxLabelsEnum, ChartAccountsTypeEnum, ChartAccountsValue, ChartData, ChartSerie, Chat, ChatCollection, ChatService, ChatStatusEnum, ChatViewTypeEnum, ClientCollection, ClientDetails, ClientDetailsMedicareExemptionEnum, ClientDetailsWorkDepreciationCalculationEnum, ClientDetailsWorkingHolidayMakerEnum, ClientIncomeTypes, ClientIncomeTypesForm, ClientIncomeTypesService, ClientInvite, ClientInviteCollection, ClientInviteService, ClientInviteStatusEnum, ClientInviteTypeEnum, ClientMovement, ClientMovementCollection, ClientMovementService, ClientPortfolioChartData, ClientPortfolioReport, ClientPortfolioReportCollection, ClientPortfolioReportService, Collection, CollectionDictionary, CorelogicService, CorelogicSuggestion, Country, DEDUCTION_CATEGORIES, DEPRECIATION_GROUPS, DOCUMENT_FILE_TYPES, DeductionClothingTypeEnum, DeductionSelfEducationTypeEnum, Depreciation, DepreciationCalculationEnum, DepreciationCalculationPercentEnum, DepreciationCapitalProject, DepreciationCapitalProjectService, DepreciationCollection, DepreciationForecast, DepreciationForecastCollection, DepreciationGroup, DepreciationGroupEnum, DepreciationGroupItem, DepreciationLvpAssetTypeEnum, DepreciationLvpReportItem, DepreciationLvpReportItemCollection, DepreciationReceipt, DepreciationReceiptService, DepreciationReportItem, DepreciationReportItemCollection, DepreciationService, DepreciationTypeEnum, DepreciationWriteOffAmountEnum, Dictionary, Document, DocumentApiUrlPrefixEnum, DocumentFolder, DocumentFolderService, DocumentService, DocumentTypeEnum, ENDPOINTS, EmployeeCollection, EmployeeDetails, EmployeeInvite, EmployeeInviteService, EmployeeService, Endpoint, EquityPositionChartService, EventDispatcherService, ExportDataTable, ExportFormatEnum, ExportFormatterService, ExportableCollection, FacebookService, FinancialYear, Firm, FirmService, FirmTypeEnum, HeaderTitleService, IconsFileEnum, IncomeAmountTypeEnum, IncomePosition, IncomeSource, IncomeSourceChartData, IncomeSourceCollection, IncomeSourceForecast, IncomeSourceForecastService, IncomeSourceForecastTrustTypeEnum, IncomeSourceService, IncomeSourceType, IncomeSourceTypeEnum, IncomeSourceTypeListOtherEnum, IncomeSourceTypeListSoleEnum, IncomeSourceTypeListWorkEnum, InterceptorsModule, IntercomService, InviteStatusEnum, JwtService, KompassifyService, Loan, LoanBankTypeEnum, LoanCollection, LoanForm, LoanFrequencyEnum, LoanInterestTypeEnum, LoanMaxNumberOfPaymentsEnum, LoanPayment, LoanPaymentCollection, LoanPayout, LoanPayoutTypeEnum, LoanRepaymentFrequencyEnum, LoanRepaymentTypeEnum, LoanService, LoanTypeEnum, LoanVehicleTypeEnum, LogbookBestPeriodService, LogbookPeriod, LoginForm, MODULE_URL_LIST, MONTHS, Message, MessageCollection, MessageDocument, MessageDocumentCollection, MessageDocumentService, MessageService, MonthNameShortEnum, MonthNumberEnum, MyAccountHistory, MyAccountHistoryInitiatedByEnum, MyAccountHistoryStatusEnum, MyAccountHistoryTypeEnum, MyTaxBusinessOrLosses, MyTaxBusinessOrLossesForm, MyTaxCgt, MyTaxCgtForm, MyTaxDeductions, MyTaxDeductionsForm, MyTaxDividends, MyTaxDividendsForm, MyTaxEmployeeShareSchemes, MyTaxEmployeeShareSchemesForm, MyTaxEstimate, MyTaxIncomeStatements, MyTaxIncomeStatementsForm, MyTaxIncomeTests, MyTaxIncomeTestsForm, MyTaxInterest, MyTaxInterestForm, MyTaxLosses, MyTaxLossesForm, MyTaxMedicareForm, MyTaxOffsets, MyTaxOffsetsForm, MyTaxOtherIncome, MyTaxOtherIncomeForm, MyTaxPartnershipsAndTrusts, MyTaxPartnershipsAndTrustsForm, MyTaxRent, MyTaxRentForm, Notification, Occupation, OccupationService, PASSWORD_REGEXPS, PasswordForm, PdfFromDataTableService, PdfFromDomElementService, PdfFromHtmlTableService, PdfOrientationEnum, PdfSettings, Phone, PhoneTypeEnum, PreloaderService, Property, PropertyCalculationService, PropertyCategory, PropertyCategoryListEnum, PropertyCategoryMovement, PropertyCategoryMovementCollection, PropertyCategoryMovementService, PropertyCategoryService, PropertyCollection, PropertyDepreciationCalculationEnum, PropertyDocument, PropertyDocumentService, PropertyEquityChartData, PropertyEquityChartItem, PropertyForecast, PropertyReportItem, PropertyReportItemCollection, PropertyReportItemDepreciation, PropertyReportItemDepreciationCollection, PropertyReportItemTransaction, PropertyReportItemTransactionCollection, PropertySale, PropertySaleCollection, PropertySaleCostBase, PropertySaleCostBaseForm, PropertySaleCostSaleForm, PropertySaleExemptionsForm, PropertySaleService, PropertySaleTaxExemptionMetadata, PropertySaleTaxExemptionMetadataCollection, PropertyService, PropertyShare, PropertyShareAccessEnum, PropertyShareService, PropertyShareStatusEnum, PropertySubscription, PropertyTransactionReportService, PropertyValuation, RegisterClientForm, RegisterFirmForm, RegistrationInvite, RegistrationInviteStatusEnum, ReportItem, ReportItemCollection, ReportItemDetails, ResetPasswordForm, RewardfulService, SUBSCRIPTION_DESCRIPTION, SUBSCRIPTION_TITLE, SalaryForecast, SalaryForecastFrequencyEnum, SalaryForecastService, ServiceNotificationService, ServiceNotificationStatusEnum, ServiceNotificationTypeEnum, ServicePayment, ServicePaymentStatusEnum, ServicePrice, ServicePriceRecurringIntervalEnum, ServicePriceService, ServicePriceTypeEnum, ServiceProduct, ServiceProductIdEnum, ServiceProductStatusEnum, ServiceSubscription, ServiceSubscriptionCollection, ServiceSubscriptionItem, ServiceSubscriptionStatusEnum, ShareFilterOptionsEnum, SoleBusiness, SoleBusinessActivity, SoleBusinessActivityService, SoleBusinessAllocation, SoleBusinessAllocationsForm, SoleBusinessForm, SoleBusinessLoss, SoleBusinessLossReport, SoleBusinessLossService, SoleBusinessService, SoleContact, SoleContactForm, SoleContactService, SoleDepreciationMethod, SoleDepreciationMethodEnum, SoleDepreciationMethodForm, SoleDepreciationMethodService, SoleDetails, SoleDetailsForm, SoleDetailsService, SoleForecast, SoleForecastService, SoleInvoice, SoleInvoiceCollection, SoleInvoiceForm, SoleInvoiceItem, SoleInvoiceItemForm, SoleInvoiceService, SoleInvoiceStatusesEnum, SoleInvoiceTaxTypeEnum, SoleInvoiceTemplate, SoleInvoiceTemplateForm, SoleInvoiceTemplateService, SoleInvoiceTemplateTaxTypeEnum, SpareDocumentSpareTypeEnum, SseService, SubscriptionService, SubscriptionTypeEnum, TAX_RETURN_CATEGORIES, TYPE_LOAN, TankTypeEnum, TaxCalculationMedicareExemptionEnum, TaxCalculationTypeEnum, TaxExemption, TaxExemptionEnum, TaxExemptionMetadata, TaxExemptionMetadataEnum, TaxExemptionService, TaxReturnCategoryListEnum, TaxReturnCategorySectionEnum, TaxReview, TaxReviewCollection, TaxReviewHistoryService, TaxReviewService, TaxReviewStatusEnum, TaxSummary, TaxSummaryListEnum, TaxSummarySection, TaxSummarySectionEnum, TaxSummaryService, TaxSummaryTaxSummaryEnum, TaxSummaryTypeEnum, TicketFeedbackEnum, TicketStatusEnum, TicketTypesEnum, Toast, ToastService, ToastTypeEnum, Transaction, TransactionAllocation, TransactionAllocationCollection, TransactionAllocationService, TransactionBase, TransactionCalculationService, TransactionCategoryEnum, TransactionCollection, TransactionMetadata, TransactionOperationEnum, TransactionReceipt, TransactionService, TransactionSourceEnum, TransactionTypeEnum, TtCoreModule, TutorialVideoService, USER_ROLES, USER_WORK_POSITION, User, UserEventSetting, UserEventSettingCollection, UserEventSettingFieldEnum, UserEventSettingService, UserEventStatusEnum, UserEventType, UserEventTypeCategory, UserEventTypeClientTypeEnum, UserEventTypeEmployeeTypeEnum, UserEventTypeFrequencyEnum, UserEventTypeService, UserEventTypeUserTypeEnum, UserInviteForm, UserMedicareExemptionEnum, UserRolesEnum, UserService, UserStatusEnum, UserSwitcherService, UserTitleEnum, UserToRegister, UserWorkDepreciationCalculationEnum, UserWorkingHolidayMakerEnum, UsersInviteService, Vehicle, VehicleClaim, VehicleClaimCollection, VehicleClaimDetails, VehicleClaimDetailsForm, VehicleClaimDetailsMethodEnum, VehicleClaimDetailsService, VehicleClaimForm, VehicleClaimService, VehicleExpense, VehicleExpenseCollection, VehicleForm, VehicleLogbook, VehicleLogbookCollection, VehicleLogbookForm, VehicleLogbookPurposeEnum, VehicleLogbookService, VehicleService, XlsxService, atLeastOneCheckedValidator, atoLinks, autocompleteValidator, cloneDeep, compare, compareMatOptions, conditionalValidator, createDate, displayMatOptions, enumToList, fieldsSumValidator, getDocIcon, minDateValidator, passwordMatchValidator, passwordValidator, replace, roundTo, sort, sortDeep, taxReviewFilterPredicate };
|
|
16203
|
+
export { AbstractForm, AbstractModel, AccountSetupItem, AccountSetupItemCollection, AccountSetupService, Address, AddressService, AddressTypeEnum, AlphabetColorsEnum, AppEvent, AppEventTypeEnum, AssetEntityTypeEnum, AssetTypeEnum, AssetsService, AuthService, BANK_ACCOUNT_TYPES, Badge, BadgeColorEnum, Bank, BankAccount, BankAccountAddManualForm, BankAccountAllocationForm, BankAccountCalculationService, BankAccountChartData, BankAccountCollection, BankAccountImportForm, BankAccountPropertiesForm, BankAccountProperty, BankAccountService, BankAccountStatusEnum, BankAccountTypeEnum, BankAccountsImportForm, BankConnection, BankConnectionService, BankConnectionStatusEnum, BankLoginData, BankLoginForm, BankService, BankTransaction, BankTransactionCalculationService, BankTransactionChartData, BankTransactionCollection, BankTransactionService, BankTransactionSummaryFieldsEnum, BankTransactionTypeEnum, BasiqConfig, BasiqJob, BasiqService, BasiqToken, BorrowingExpense, BorrowingExpenseLoan, BorrowingExpenseService, CAPITAL_COSTS_ITEMS, CHART_ACCOUNTS_CATEGORIES, CalculationFormItem, CalculationFormTypeEnum, CgtExemptionAndRolloverCodeEnum, ChartAccounts, ChartAccountsCategoryECollection, ChartAccountsCategoryEnum, ChartAccountsCollection, ChartAccountsDepreciation, ChartAccountsDepreciationService, ChartAccountsEtpEnum, ChartAccountsHeading, ChartAccountsHeadingListEnum, ChartAccountsHeadingTaxDeductibleEnum, ChartAccountsHeadingTaxableEnum, ChartAccountsHeadingVehicleListEnum, ChartAccountsListEnum, ChartAccountsMetadata, ChartAccountsMetadataListEnum, ChartAccountsMetadataTypeEnum, ChartAccountsService, ChartAccountsTaxLabelsEnum, ChartAccountsTypeEnum, ChartAccountsValue, ChartData, ChartSerie, Chat, ChatCollection, ChatService, ChatStatusEnum, ChatViewTypeEnum, ClientCollection, ClientDetails, ClientDetailsMedicareExemptionEnum, ClientDetailsWorkDepreciationCalculationEnum, ClientDetailsWorkingHolidayMakerEnum, ClientIncomeTypes, ClientIncomeTypesForm, ClientIncomeTypesService, ClientInvite, ClientInviteCollection, ClientInviteService, ClientInviteStatusEnum, ClientInviteTypeEnum, ClientMovement, ClientMovementCollection, ClientMovementService, ClientPortfolioChartData, ClientPortfolioReport, ClientPortfolioReportCollection, ClientPortfolioReportService, Collection, CollectionDictionary, CorelogicService, CorelogicSuggestion, Country, DEDUCTION_CATEGORIES, DEPRECIATION_GROUPS, DOCUMENT_FILE_TYPES, DeductionClothingTypeEnum, DeductionSelfEducationTypeEnum, Depreciation, DepreciationCalculationEnum, DepreciationCalculationPercentEnum, DepreciationCapitalProject, DepreciationCapitalProjectService, DepreciationCollection, DepreciationForecast, DepreciationForecastCollection, DepreciationGroup, DepreciationGroupEnum, DepreciationGroupItem, DepreciationLvpAssetTypeEnum, DepreciationLvpReportItem, DepreciationLvpReportItemCollection, DepreciationReceipt, DepreciationReceiptService, DepreciationReportItem, DepreciationReportItemCollection, DepreciationService, DepreciationTypeEnum, DepreciationWriteOffAmountEnum, Dictionary, Document, DocumentApiUrlPrefixEnum, DocumentFolder, DocumentFolderService, DocumentService, DocumentTypeEnum, ENDPOINTS, EmployeeCollection, EmployeeDetails, EmployeeInvite, EmployeeInviteService, EmployeeService, Endpoint, EquityPositionChartService, EventDispatcherService, ExportDataTable, ExportFormatEnum, ExportFormatterService, ExportableCollection, FacebookService, FinancialYear, Firm, FirmService, FirmTypeEnum, HeaderTitleService, IconsFileEnum, IncomeAmountTypeEnum, IncomePosition, IncomeSource, IncomeSourceChartData, IncomeSourceCollection, IncomeSourceForecast, IncomeSourceForecastService, IncomeSourceForecastTrustTypeEnum, IncomeSourceService, IncomeSourceType, IncomeSourceTypeEnum, IncomeSourceTypeListOtherEnum, IncomeSourceTypeListSoleEnum, IncomeSourceTypeListWorkEnum, InterceptorsModule, IntercomService, InviteStatusEnum, JwtService, KompassifyService, Loan, LoanBankTypeEnum, LoanCollection, LoanForm, LoanFrequencyEnum, LoanInterestTypeEnum, LoanMaxNumberOfPaymentsEnum, LoanPayment, LoanPaymentCollection, LoanPayout, LoanPayoutTypeEnum, LoanRepaymentFrequencyEnum, LoanRepaymentTypeEnum, LoanService, LoanTypeEnum, LoanVehicleTypeEnum, LogbookBestPeriodService, LogbookPeriod, LoginForm, MODULE_URL_LIST, MONTHS, Message, MessageCollection, MessageDocument, MessageDocumentCollection, MessageDocumentService, MessageService, MonthNameShortEnum, MonthNumberEnum, MyAccountHistory, MyAccountHistoryInitiatedByEnum, MyAccountHistoryStatusEnum, MyAccountHistoryTypeEnum, MyTaxBusinessOrLosses, MyTaxBusinessOrLossesForm, MyTaxCgt, MyTaxCgtForm, MyTaxDeductions, MyTaxDeductionsForm, MyTaxDividends, MyTaxDividendsForm, MyTaxEmployeeShareSchemes, MyTaxEmployeeShareSchemesForm, MyTaxEstimate, MyTaxIncomeStatements, MyTaxIncomeStatementsForm, MyTaxIncomeTests, MyTaxIncomeTestsForm, MyTaxInterest, MyTaxInterestForm, MyTaxLosses, MyTaxLossesForm, MyTaxMedicareForm, MyTaxOffsets, MyTaxOffsetsForm, MyTaxOtherIncome, MyTaxOtherIncomeForm, MyTaxPartnershipsAndTrusts, MyTaxPartnershipsAndTrustsForm, MyTaxRent, MyTaxRentForm, Notification, Occupation, OccupationService, PASSWORD_REGEXPS, PasswordForm, PdfFromDataTableService, PdfFromDomElementService, PdfFromHtmlTableService, PdfOrientationEnum, PdfSettings, Phone, PhoneTypeEnum, PreloaderService, Property, PropertyCalculationService, PropertyCategory, PropertyCategoryListEnum, PropertyCategoryMovement, PropertyCategoryMovementCollection, PropertyCategoryMovementService, PropertyCategoryService, PropertyCollection, PropertyDepreciationCalculationEnum, PropertyDocument, PropertyDocumentService, PropertyEquityChartData, PropertyEquityChartItem, PropertyForecast, PropertyReportItem, PropertyReportItemCollection, PropertyReportItemDepreciation, PropertyReportItemDepreciationCollection, PropertyReportItemTransaction, PropertyReportItemTransactionCollection, PropertySale, PropertySaleCollection, PropertySaleCostBase, PropertySaleCostBaseForm, PropertySaleCostSaleForm, PropertySaleExemptionsForm, PropertySaleService, PropertySaleTaxExemptionMetadata, PropertySaleTaxExemptionMetadataCollection, PropertyService, PropertyShare, PropertyShareAccessEnum, PropertyShareService, PropertyShareStatusEnum, PropertySubscription, PropertyTransactionReportService, PropertyValuation, RegisterClientForm, RegisterFirmForm, RegistrationInvite, RegistrationInviteStatusEnum, ReportItem, ReportItemCollection, ReportItemDetails, ResetPasswordForm, RewardfulService, SUBSCRIPTION_DESCRIPTION, SUBSCRIPTION_TITLE, SalaryForecast, SalaryForecastFrequencyEnum, SalaryForecastService, ServiceNotificationService, ServiceNotificationStatusEnum, ServiceNotificationTypeEnum, ServicePayment, ServicePaymentStatusEnum, ServicePrice, ServicePriceRecurringIntervalEnum, ServicePriceService, ServicePriceTypeEnum, ServiceProduct, ServiceProductIdEnum, ServiceProductStatusEnum, ServiceSubscription, ServiceSubscriptionCollection, ServiceSubscriptionItem, ServiceSubscriptionStatusEnum, ShareFilterOptionsEnum, SoleBusiness, SoleBusinessActivity, SoleBusinessActivityService, SoleBusinessAllocation, SoleBusinessAllocationsForm, SoleBusinessForm, SoleBusinessLoss, SoleBusinessLossForm, SoleBusinessLossOffsetRule, SoleBusinessLossOffsetRuleService, SoleBusinessLossReport, SoleBusinessLossService, SoleBusinessService, SoleContact, SoleContactForm, SoleContactService, SoleDepreciationMethod, SoleDepreciationMethodEnum, SoleDepreciationMethodForm, SoleDepreciationMethodService, SoleDetails, SoleDetailsForm, SoleDetailsService, SoleForecast, SoleForecastService, SoleInvoice, SoleInvoiceCollection, SoleInvoiceForm, SoleInvoiceItem, SoleInvoiceItemForm, SoleInvoiceService, SoleInvoiceStatusesEnum, SoleInvoiceTaxTypeEnum, SoleInvoiceTemplate, SoleInvoiceTemplateForm, SoleInvoiceTemplateService, SoleInvoiceTemplateTaxTypeEnum, SpareDocumentSpareTypeEnum, SseService, SubscriptionService, SubscriptionTypeEnum, TAX_RETURN_CATEGORIES, TYPE_LOAN, TankTypeEnum, TaxCalculationMedicareExemptionEnum, TaxCalculationTypeEnum, TaxExemption, TaxExemptionEnum, TaxExemptionMetadata, TaxExemptionMetadataEnum, TaxExemptionService, TaxReturnCategoryListEnum, TaxReturnCategorySectionEnum, TaxReview, TaxReviewCollection, TaxReviewHistoryService, TaxReviewService, TaxReviewStatusEnum, TaxSummary, TaxSummaryListEnum, TaxSummarySection, TaxSummarySectionEnum, TaxSummaryService, TaxSummaryTaxSummaryEnum, TaxSummaryTypeEnum, TicketFeedbackEnum, TicketStatusEnum, TicketTypesEnum, Toast, ToastService, ToastTypeEnum, Transaction, TransactionAllocation, TransactionAllocationCollection, TransactionAllocationService, TransactionBase, TransactionBaseCollection, TransactionCalculationService, TransactionCategoryEnum, TransactionCollection, TransactionMetadata, TransactionOperationEnum, TransactionReceipt, TransactionService, TransactionSourceEnum, TransactionTypeEnum, TtCoreModule, TutorialVideoService, USER_ROLES, USER_WORK_POSITION, User, UserEventSetting, UserEventSettingCollection, UserEventSettingFieldEnum, UserEventSettingService, UserEventStatusEnum, UserEventType, UserEventTypeCategory, UserEventTypeClientTypeEnum, UserEventTypeEmployeeTypeEnum, UserEventTypeFrequencyEnum, UserEventTypeService, UserEventTypeUserTypeEnum, UserInviteForm, UserMedicareExemptionEnum, UserRolesEnum, UserService, UserStatusEnum, UserSwitcherService, UserTitleEnum, UserToRegister, UserWorkDepreciationCalculationEnum, UserWorkingHolidayMakerEnum, UsersInviteService, Vehicle, VehicleClaim, VehicleClaimCollection, VehicleClaimDetails, VehicleClaimDetailsForm, VehicleClaimDetailsMethodEnum, VehicleClaimDetailsService, VehicleClaimForm, VehicleClaimService, VehicleExpense, VehicleExpenseCollection, VehicleForm, VehicleLogbook, VehicleLogbookCollection, VehicleLogbookForm, VehicleLogbookPurposeEnum, VehicleLogbookService, VehicleService, XlsxService, atLeastOneCheckedValidator, atoLinks, autocompleteValidator, cloneDeep, compare, compareMatOptions, conditionalValidator, createDate, displayMatOptions, enumToList, fieldsSumValidator, getDocIcon, minDateValidator, passwordMatchValidator, passwordValidator, replace, roundTo, sort, sortDeep, taxReviewFilterPredicate };
|
|
16101
16204
|
//# sourceMappingURL=taxtank-core.js.map
|