taxtank-core 0.28.29 → 0.28.31
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 +592 -455
- 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 +5 -2
- package/esm2015/lib/models/service-subscription/service-subscription.js +14 -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 +450 -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 +5 -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
|
@@ -693,7 +693,10 @@ const ENDPOINTS = {
|
|
|
693
693
|
SOLE_BUSINESSES_GET: new Endpoint('GET', '\\/sole-businesses'),
|
|
694
694
|
SOLE_BUSINESSES_POST: new Endpoint('POST', '\\/sole-businesses'),
|
|
695
695
|
SOLE_BUSINESSES_PUT: new Endpoint('PUT', '\\/sole-businesses\\/\\d+'),
|
|
696
|
-
|
|
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'),
|
|
697
700
|
SOLE_CONTACTS_POST: new Endpoint('POST', '\\/sole-contacts'),
|
|
698
701
|
SOLE_CONTACTS_PUT: new Endpoint('PUT', '\\/sole-contacts\\/\\d+'),
|
|
699
702
|
BUSINESS_ACTIVITIES_GET: new Endpoint('GET', '\\/sole-business-activities'),
|
|
@@ -1365,6 +1368,10 @@ const DEFAULT_INDEX = 'other';
|
|
|
1365
1368
|
*/
|
|
1366
1369
|
class Collection {
|
|
1367
1370
|
constructor(items = []) {
|
|
1371
|
+
/**
|
|
1372
|
+
* index of current item, used to iterate over the collection
|
|
1373
|
+
*/
|
|
1374
|
+
this.index = 0;
|
|
1368
1375
|
this.items = items;
|
|
1369
1376
|
}
|
|
1370
1377
|
/**
|
|
@@ -1388,6 +1395,24 @@ class Collection {
|
|
|
1388
1395
|
get last() {
|
|
1389
1396
|
return last(this.items);
|
|
1390
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
|
+
}
|
|
1391
1416
|
getIds() {
|
|
1392
1417
|
return this.items.map((item) => item['id']);
|
|
1393
1418
|
}
|
|
@@ -1988,6 +2013,19 @@ class ServiceSubscription extends ServiceSubscription$1 {
|
|
|
1988
2013
|
hasItem(itemToCheck) {
|
|
1989
2014
|
return !!this.items.find((item) => item.price.id === itemToCheck.price.id);
|
|
1990
2015
|
}
|
|
2016
|
+
/**
|
|
2017
|
+
* Recommended number of properties to buy,
|
|
2018
|
+
* based on the property service product and the number of properties the user has
|
|
2019
|
+
*/
|
|
2020
|
+
getRecommendedPropertiesQty(propertyItem, propertiesQty) {
|
|
2021
|
+
const max = propertyItem.price.product.maxQty;
|
|
2022
|
+
const min = propertyItem.price.product.minQty;
|
|
2023
|
+
// if user has property subscription and number of properties doesn't exceed the maximum in the service product - return one more
|
|
2024
|
+
if (this.hasItem(propertyItem)) {
|
|
2025
|
+
propertiesQty = propertiesQty < max ? propertiesQty + 1 : max;
|
|
2026
|
+
}
|
|
2027
|
+
return Math.max(min, propertiesQty);
|
|
2028
|
+
}
|
|
1991
2029
|
}
|
|
1992
2030
|
__decorate([
|
|
1993
2031
|
Type(() => Date)
|
|
@@ -2017,11 +2055,30 @@ __decorate([
|
|
|
2017
2055
|
class SoleBusinessLoss$1 extends AbstractModel {
|
|
2018
2056
|
}
|
|
2019
2057
|
|
|
2058
|
+
class SoleBusinessLossOffsetRule$1 extends AbstractModel {
|
|
2059
|
+
}
|
|
2060
|
+
|
|
2061
|
+
class SoleBusinessLossOffsetRule extends SoleBusinessLossOffsetRule$1 {
|
|
2062
|
+
}
|
|
2063
|
+
__decorate([
|
|
2064
|
+
Type(() => SoleBusinessLossOffsetRule)
|
|
2065
|
+
], SoleBusinessLossOffsetRule.prototype, "parent", void 0);
|
|
2066
|
+
|
|
2020
2067
|
class SoleBusinessLoss extends SoleBusinessLoss$1 {
|
|
2068
|
+
constructor() {
|
|
2069
|
+
super(...arguments);
|
|
2070
|
+
this.openBalance = 0;
|
|
2071
|
+
}
|
|
2072
|
+
get hasOffset() {
|
|
2073
|
+
return !!this.offsetRule;
|
|
2074
|
+
}
|
|
2021
2075
|
}
|
|
2022
2076
|
__decorate([
|
|
2023
2077
|
Type(() => SoleBusiness)
|
|
2024
2078
|
], SoleBusinessLoss.prototype, "business", void 0);
|
|
2079
|
+
__decorate([
|
|
2080
|
+
Type(() => SoleBusinessLossOffsetRule)
|
|
2081
|
+
], SoleBusinessLoss.prototype, "offsetRule", void 0);
|
|
2025
2082
|
|
|
2026
2083
|
class SoleInvoice$1 extends AbstractModel {
|
|
2027
2084
|
}
|
|
@@ -5588,6 +5645,278 @@ class PropertyCategoryMovementCollection extends Collection {
|
|
|
5588
5645
|
}
|
|
5589
5646
|
}
|
|
5590
5647
|
|
|
5648
|
+
/**
|
|
5649
|
+
* Chart serie class: chart data item
|
|
5650
|
+
* @TODO consider rename to ChartSerieData
|
|
5651
|
+
*/
|
|
5652
|
+
class ChartSerie {
|
|
5653
|
+
}
|
|
5654
|
+
|
|
5655
|
+
/**
|
|
5656
|
+
* Chart data class
|
|
5657
|
+
* @TODO consider rename to ChartSerie
|
|
5658
|
+
*/
|
|
5659
|
+
class ChartData {
|
|
5660
|
+
}
|
|
5661
|
+
__decorate([
|
|
5662
|
+
Type(() => ChartSerie)
|
|
5663
|
+
], ChartData.prototype, "data", void 0);
|
|
5664
|
+
|
|
5665
|
+
const MONTHS = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec', 'Jan'];
|
|
5666
|
+
|
|
5667
|
+
/**
|
|
5668
|
+
* Collection of transactions
|
|
5669
|
+
*/
|
|
5670
|
+
class TransactionCollection extends ExportableCollection {
|
|
5671
|
+
/**
|
|
5672
|
+
* Get total amount of all transactions in the collection
|
|
5673
|
+
*/
|
|
5674
|
+
get amount() {
|
|
5675
|
+
return +this.items.reduce((sum, transaction) => sum + transaction.getNetAmount(), 0).toFixed(2);
|
|
5676
|
+
}
|
|
5677
|
+
/**
|
|
5678
|
+
* Difference between allocated amount and total amount
|
|
5679
|
+
*/
|
|
5680
|
+
getUnallocatedAmount(allocations) {
|
|
5681
|
+
return +(this.amount - allocations.getByTransactionsIds(this.getIds()).amount).toFixed(2);
|
|
5682
|
+
}
|
|
5683
|
+
/**
|
|
5684
|
+
* Get cash position
|
|
5685
|
+
* Cash Position = Income - Expenses
|
|
5686
|
+
* Cash position is equal to Total Amount because income is positive and expense is negative,
|
|
5687
|
+
*/
|
|
5688
|
+
get cashPosition() {
|
|
5689
|
+
return this.claimAmount;
|
|
5690
|
+
}
|
|
5691
|
+
/**
|
|
5692
|
+
* get date of the last transaction
|
|
5693
|
+
*/
|
|
5694
|
+
getLastTransactionDate() {
|
|
5695
|
+
return new Date(Math.max.apply(Math, this.items.map((transaction) => transaction.date)));
|
|
5696
|
+
}
|
|
5697
|
+
/**
|
|
5698
|
+
* Get summary of claim amounts
|
|
5699
|
+
*/
|
|
5700
|
+
get claimAmount() {
|
|
5701
|
+
return this.items.reduce((sum, transaction) => sum + transaction.claimAmount, 0);
|
|
5702
|
+
}
|
|
5703
|
+
get grossAmount() {
|
|
5704
|
+
return +this.items.reduce((sum, transaction) => sum + transaction.amount, 0).toFixed(2);
|
|
5705
|
+
}
|
|
5706
|
+
getByChartAccountsCategories(categories) {
|
|
5707
|
+
return new TransactionCollection(this.items.filter((transaction) => categories.includes(transaction.chartAccounts.category)));
|
|
5708
|
+
}
|
|
5709
|
+
/**
|
|
5710
|
+
* Get transactions by month
|
|
5711
|
+
* @param monthIndex by which desired month should be taken
|
|
5712
|
+
*/
|
|
5713
|
+
getByMonth(monthIndex) {
|
|
5714
|
+
return new TransactionCollection(this.items.filter((transaction) => transaction.date.getMonth() === monthIndex));
|
|
5715
|
+
}
|
|
5716
|
+
/**
|
|
5717
|
+
* Get collection of transactions metadata
|
|
5718
|
+
*/
|
|
5719
|
+
getTransactionsMetadata() {
|
|
5720
|
+
const metadataArray = [];
|
|
5721
|
+
this.items.forEach((transaction) => {
|
|
5722
|
+
metadataArray.push(...transaction.metadata);
|
|
5723
|
+
});
|
|
5724
|
+
return new Collection(metadataArray);
|
|
5725
|
+
}
|
|
5726
|
+
getIncomeTransactions() {
|
|
5727
|
+
return new TransactionCollection(this.items.filter((transaction) => transaction.isIncome()));
|
|
5728
|
+
}
|
|
5729
|
+
get claimIncome() {
|
|
5730
|
+
return this.getIncomeTransactions().claimAmount;
|
|
5731
|
+
}
|
|
5732
|
+
getExpenseTransactions() {
|
|
5733
|
+
return new TransactionCollection(this.items.filter((transaction) => transaction.isExpense() && !transaction.isInterest()));
|
|
5734
|
+
}
|
|
5735
|
+
get claimExpense() {
|
|
5736
|
+
return this.getExpenseTransactions().claimAmount;
|
|
5737
|
+
}
|
|
5738
|
+
getInterestTransactions() {
|
|
5739
|
+
return new TransactionCollection(this.items.filter((transaction) => transaction.isInterest()));
|
|
5740
|
+
}
|
|
5741
|
+
get claimInterest() {
|
|
5742
|
+
return this.getInterestTransactions().claimAmount;
|
|
5743
|
+
}
|
|
5744
|
+
/**
|
|
5745
|
+
* Get collection of transactions and properties filtered by properties ids
|
|
5746
|
+
* @param ids Ids of properties for filter
|
|
5747
|
+
*/
|
|
5748
|
+
getByPropertiesIds(ids) {
|
|
5749
|
+
return new TransactionCollection(this.items.filter((transaction) => {
|
|
5750
|
+
var _a;
|
|
5751
|
+
return ids.includes((_a = transaction.property) === null || _a === void 0 ? void 0 : _a.id);
|
|
5752
|
+
}));
|
|
5753
|
+
}
|
|
5754
|
+
/**
|
|
5755
|
+
* Get new collection filtered by income source id
|
|
5756
|
+
* @param id id of income source for filter
|
|
5757
|
+
*/
|
|
5758
|
+
getByIncomeSourceId(id) {
|
|
5759
|
+
return new TransactionCollection(this.items.filter((transaction) => { var _a; return ((_a = transaction.incomeSource) === null || _a === void 0 ? void 0 : _a.id) === id; }));
|
|
5760
|
+
}
|
|
5761
|
+
/**
|
|
5762
|
+
* Get new collection filtered by chart accounts category
|
|
5763
|
+
* @param category Chart accounts category value
|
|
5764
|
+
*/
|
|
5765
|
+
getByChartAccountsCategory(category) {
|
|
5766
|
+
return new TransactionCollection(this.items.filter((transaction) => transaction.chartAccounts.category === category));
|
|
5767
|
+
}
|
|
5768
|
+
/**
|
|
5769
|
+
* Get new collection of property transactions
|
|
5770
|
+
*/
|
|
5771
|
+
getPropertyTransactions() {
|
|
5772
|
+
return new TransactionCollection(this.items.filter((transaction) => transaction.isPropertyTank()));
|
|
5773
|
+
}
|
|
5774
|
+
getDebitTransactions() {
|
|
5775
|
+
return new TransactionCollection(this.items.filter((transaction) => transaction.isDebit()));
|
|
5776
|
+
}
|
|
5777
|
+
getCreditTransactions() {
|
|
5778
|
+
return new TransactionCollection(this.items.filter((transaction) => transaction.isCredit()));
|
|
5779
|
+
}
|
|
5780
|
+
getByAllocations(allocations) {
|
|
5781
|
+
return new TransactionCollection(this.items.filter((transaction) => allocations.hasTransaction(transaction)));
|
|
5782
|
+
}
|
|
5783
|
+
/**
|
|
5784
|
+
* Get transactions related to Vehicle category
|
|
5785
|
+
*/
|
|
5786
|
+
getVehicleTransactions() {
|
|
5787
|
+
return this.create(this.items.filter((transaction) => {
|
|
5788
|
+
return transaction.isVehicleTransaction();
|
|
5789
|
+
}));
|
|
5790
|
+
}
|
|
5791
|
+
/**
|
|
5792
|
+
* Get new transaction collection filtered by tank type
|
|
5793
|
+
*/
|
|
5794
|
+
getByTankType(tankType) {
|
|
5795
|
+
return this.create(this.items.filter((transaction) => {
|
|
5796
|
+
switch (tankType) {
|
|
5797
|
+
case TankTypeEnum.PROPERTY:
|
|
5798
|
+
return transaction.isPropertyTank();
|
|
5799
|
+
case TankTypeEnum.WORK:
|
|
5800
|
+
return transaction.isWorkTank();
|
|
5801
|
+
case TankTypeEnum.SOLE:
|
|
5802
|
+
return transaction.isSoleTank();
|
|
5803
|
+
// Transaction may be not related to any tank type (personal)
|
|
5804
|
+
default:
|
|
5805
|
+
return false;
|
|
5806
|
+
}
|
|
5807
|
+
}));
|
|
5808
|
+
}
|
|
5809
|
+
getExportHeader() {
|
|
5810
|
+
return ['Date', 'Description', 'Debit', 'Credit'];
|
|
5811
|
+
}
|
|
5812
|
+
getExportFooter() {
|
|
5813
|
+
return [
|
|
5814
|
+
plainToClass(ExportCell, { value: 'Total', type: ExportCellTypeEnum.STRING }),
|
|
5815
|
+
plainToClass(ExportCell, { value: '', type: ExportCellTypeEnum.STRING }),
|
|
5816
|
+
plainToClass(ExportCell, { value: this.sumBy('debit'), type: ExportCellTypeEnum.CURRENCY }),
|
|
5817
|
+
plainToClass(ExportCell, { value: this.sumBy('credit'), type: ExportCellTypeEnum.CURRENCY })
|
|
5818
|
+
];
|
|
5819
|
+
}
|
|
5820
|
+
getExportBody() {
|
|
5821
|
+
return this.items.map((transaction) => {
|
|
5822
|
+
return [
|
|
5823
|
+
plainToClass(ExportCell, { value: transaction.date, type: ExportCellTypeEnum.DATE }),
|
|
5824
|
+
plainToClass(ExportCell, { value: transaction.description, type: ExportCellTypeEnum.STRING }),
|
|
5825
|
+
plainToClass(ExportCell, { value: transaction.debit, type: ExportCellTypeEnum.CURRENCY }),
|
|
5826
|
+
plainToClass(ExportCell, { value: transaction.credit, type: ExportCellTypeEnum.CURRENCY })
|
|
5827
|
+
];
|
|
5828
|
+
});
|
|
5829
|
+
}
|
|
5830
|
+
/**
|
|
5831
|
+
* Get list of vehicle transactions filtered by vehicle claim
|
|
5832
|
+
*/
|
|
5833
|
+
getByVehicleClaim(vehicleClaim) {
|
|
5834
|
+
if (!vehicleClaim) {
|
|
5835
|
+
return this.create([]);
|
|
5836
|
+
}
|
|
5837
|
+
return vehicleClaim.isSoleTank()
|
|
5838
|
+
// sole tank may have multiple vehicle claims, so we need to filter by business.id
|
|
5839
|
+
? this.getVehicleTransactions().filterBy('business.id', vehicleClaim.business.id)
|
|
5840
|
+
// work tank may have only one vehicle claim, so we need to filter by tank type
|
|
5841
|
+
: this.getVehicleTransactions().filterBy('tankType', TankTypeEnum.WORK);
|
|
5842
|
+
}
|
|
5843
|
+
/**
|
|
5844
|
+
* Get list of vehicle transactions except KMS transactions
|
|
5845
|
+
*/
|
|
5846
|
+
getLogbookTransactions() {
|
|
5847
|
+
return this
|
|
5848
|
+
.getVehicleTransactions()
|
|
5849
|
+
.removeBy('chartAccounts.id', [ChartAccountsListEnum.KLMS_TRAVELLED_FOR_WORK, ChartAccountsListEnum.KLMS_TRAVELLED]);
|
|
5850
|
+
}
|
|
5851
|
+
/**
|
|
5852
|
+
* Build chart data with transactions cash position.
|
|
5853
|
+
* Cash position = Income - Expenses (include depreciations)
|
|
5854
|
+
* Chart data for each month from fin year start till current month
|
|
5855
|
+
*/
|
|
5856
|
+
getCashPositionChartData() {
|
|
5857
|
+
const chartData = [
|
|
5858
|
+
plainToClass(ChartData, { name: 'Income', data: [] }),
|
|
5859
|
+
plainToClass(ChartData, { name: 'Expense', data: [] })
|
|
5860
|
+
];
|
|
5861
|
+
new FinancialYear().getPastMonths().forEach((month) => {
|
|
5862
|
+
chartData[0].data.push({
|
|
5863
|
+
label: MONTHS[month],
|
|
5864
|
+
value: this.getIncomeTransactions().getByMonth(month).claimAmount
|
|
5865
|
+
});
|
|
5866
|
+
chartData[1].data.push({
|
|
5867
|
+
label: MONTHS[month],
|
|
5868
|
+
value: Math.abs(this.getExpenseTransactions().getByMonth(month).claimAmount)
|
|
5869
|
+
});
|
|
5870
|
+
});
|
|
5871
|
+
return chartData;
|
|
5872
|
+
}
|
|
5873
|
+
}
|
|
5874
|
+
|
|
5875
|
+
class TransactionAllocationCollection extends Collection {
|
|
5876
|
+
get amount() {
|
|
5877
|
+
return this.sumBy('amount');
|
|
5878
|
+
}
|
|
5879
|
+
getByTransactionsIds(ids) {
|
|
5880
|
+
return new TransactionAllocationCollection(this.items.filter((allocation) => ids.includes(allocation.transaction.id)));
|
|
5881
|
+
}
|
|
5882
|
+
getByBankTransactionsIds(ids) {
|
|
5883
|
+
return new TransactionAllocationCollection(this.items.filter((allocation) => ids.includes(allocation.bankTransaction.id)));
|
|
5884
|
+
}
|
|
5885
|
+
/**
|
|
5886
|
+
* Group allocations by bank account via bank transactions collection
|
|
5887
|
+
*/
|
|
5888
|
+
groupByBankAccount(bankTransactions) {
|
|
5889
|
+
// Group bank transactions by bank account id
|
|
5890
|
+
const bankTransactionsByBankAccount = new CollectionDictionary(bankTransactions, 'bankAccount.id');
|
|
5891
|
+
// Create empty dictionary of transaction allocations
|
|
5892
|
+
const allocationsByBankAccount = new CollectionDictionary(new TransactionAllocationCollection([]));
|
|
5893
|
+
// Fill allocations dictionary with bank transactions dictionary keys and allocations related with each bank transaction collection
|
|
5894
|
+
bankTransactionsByBankAccount.keys.forEach((key) => {
|
|
5895
|
+
allocationsByBankAccount.add(key, this.getByBankTransactionsIds(bankTransactionsByBankAccount.get(key).getIds()));
|
|
5896
|
+
});
|
|
5897
|
+
return allocationsByBankAccount;
|
|
5898
|
+
}
|
|
5899
|
+
/**
|
|
5900
|
+
* check if collection includes allocation of passed transaction
|
|
5901
|
+
*/
|
|
5902
|
+
hasTransaction(transaction) {
|
|
5903
|
+
return !!this.items.find((allocation) => allocation.transaction.id === transaction.id);
|
|
5904
|
+
}
|
|
5905
|
+
/**
|
|
5906
|
+
* Check if bank transaction is related with current allocations
|
|
5907
|
+
*/
|
|
5908
|
+
hasBankTransaction(bankTransaction) {
|
|
5909
|
+
return !!this.items.find((allocation) => allocation.bankTransaction.id === bankTransaction.id);
|
|
5910
|
+
}
|
|
5911
|
+
}
|
|
5912
|
+
|
|
5913
|
+
class TransactionBaseCollection extends Collection {
|
|
5914
|
+
getClaimAmountByBusiness(business) {
|
|
5915
|
+
return this.filterBy('business.id', business.id)
|
|
5916
|
+
.sumBy('claimAmount');
|
|
5917
|
+
}
|
|
5918
|
+
}
|
|
5919
|
+
|
|
5591
5920
|
// @TODO Alex move here all collections
|
|
5592
5921
|
|
|
5593
5922
|
class AccountSetupItemCollection extends Collection {
|
|
@@ -5802,329 +6131,102 @@ class ChatCollection extends Collection {
|
|
|
5802
6131
|
getSortedByNewest(messages) {
|
|
5803
6132
|
const chatsById = new Dictionary(this.toArray());
|
|
5804
6133
|
// get chats array sorted from newest to oldest
|
|
5805
|
-
const chats = uniqBy(new MessageCollection(messages)
|
|
5806
|
-
.filterBy('chat.id', this.getIds())
|
|
5807
|
-
.sortBy('createdAt', true)
|
|
5808
|
-
.toArray()
|
|
5809
|
-
.map((message) => chatsById.get(message.chat.id)), 'id');
|
|
5810
|
-
const emptyChats = differenceBy(this.toArray(), chats, 'id');
|
|
5811
|
-
return this.create([...chats, ...emptyChats]);
|
|
5812
|
-
}
|
|
5813
|
-
getActive() {
|
|
5814
|
-
return this.filterBy('status', ChatStatusEnum.ACTIVE);
|
|
5815
|
-
}
|
|
5816
|
-
}
|
|
5817
|
-
|
|
5818
|
-
class ClientCollection extends Collection {
|
|
5819
|
-
}
|
|
5820
|
-
|
|
5821
|
-
var FirmTypeEnum;
|
|
5822
|
-
(function (FirmTypeEnum) {
|
|
5823
|
-
FirmTypeEnum[FirmTypeEnum["ACCOUNTANT"] = 1] = "ACCOUNTANT";
|
|
5824
|
-
FirmTypeEnum[FirmTypeEnum["ADVISOR"] = 2] = "ADVISOR";
|
|
5825
|
-
})(FirmTypeEnum || (FirmTypeEnum = {}));
|
|
5826
|
-
|
|
5827
|
-
class EmployeeCollection extends Collection {
|
|
5828
|
-
get accountant() {
|
|
5829
|
-
var _a;
|
|
5830
|
-
return (_a = this.items.filter((user) => user.employeeDetails.firm.type === FirmTypeEnum.ACCOUNTANT)[0]) !== null && _a !== void 0 ? _a : null;
|
|
5831
|
-
}
|
|
5832
|
-
get advisors() {
|
|
5833
|
-
return this.items.filter((user) => user.employeeDetails.firm.type === FirmTypeEnum.ADVISOR);
|
|
5834
|
-
}
|
|
5835
|
-
}
|
|
5836
|
-
|
|
5837
|
-
/**
|
|
5838
|
-
* Collection of tax review
|
|
5839
|
-
*/
|
|
5840
|
-
class ClientMovementCollection extends Collection {
|
|
5841
|
-
get active() {
|
|
5842
|
-
return new ClientMovementCollection(this.items.filter((clientMovement) => !clientMovement.dateTo));
|
|
5843
|
-
}
|
|
5844
|
-
get employees() {
|
|
5845
|
-
return new EmployeeCollection(this.items.map((clientMovement) => clientMovement.employee));
|
|
5846
|
-
}
|
|
5847
|
-
get clients() {
|
|
5848
|
-
return new EmployeeCollection(this.items.map((clientMovement) => clientMovement.client));
|
|
5849
|
-
}
|
|
5850
|
-
get accountant() {
|
|
5851
|
-
var _a;
|
|
5852
|
-
return (_a = this.items.filter((clientMovement) => clientMovement.firm.type === FirmTypeEnum.ACCOUNTANT)[0]) !== null && _a !== void 0 ? _a : null;
|
|
5853
|
-
}
|
|
5854
|
-
get advisors() {
|
|
5855
|
-
return new ClientMovementCollection(this.items.filter((clientMovement) => clientMovement.firm.type === FirmTypeEnum.ADVISOR));
|
|
5856
|
-
}
|
|
5857
|
-
getByEmployeeId(id) {
|
|
5858
|
-
return new ClientMovementCollection(this.items.filter((clientMovement) => clientMovement.employee.id === id));
|
|
5859
|
-
}
|
|
5860
|
-
getByFirmType(firmType) {
|
|
5861
|
-
return new ClientMovementCollection(this.items.filter((clientMovement) => clientMovement.firm.type === firmType));
|
|
5862
|
-
}
|
|
5863
|
-
}
|
|
5864
|
-
|
|
5865
|
-
/**
|
|
5866
|
-
* Collection of employee clients tax summary information
|
|
5867
|
-
*/
|
|
5868
|
-
class ClientPortfolioReportCollection extends Collection {
|
|
5869
|
-
get marketValue() {
|
|
5870
|
-
return this.sumBy('marketValue');
|
|
5871
|
-
}
|
|
5872
|
-
get loanBalance() {
|
|
5873
|
-
return this.sumBy('loanBalance');
|
|
5874
|
-
}
|
|
5875
|
-
get equityPosition() {
|
|
5876
|
-
return this.sumBy('equityPosition');
|
|
5877
|
-
}
|
|
5878
|
-
/**
|
|
5879
|
-
* Get average market value if there are more than 1 item in the collection
|
|
5880
|
-
*/
|
|
5881
|
-
get averageMarketValue() {
|
|
5882
|
-
return this.items.length > 1 ? this.marketValue / this.items.length : null;
|
|
5883
|
-
}
|
|
5884
|
-
/**
|
|
5885
|
-
* Get average loan balance if there are more than 1 item in the collection
|
|
5886
|
-
*/
|
|
5887
|
-
get averageLoanBalance() {
|
|
5888
|
-
return this.items.length > 1 ? this.loanBalance / this.items.length : null;
|
|
5889
|
-
}
|
|
5890
|
-
/**
|
|
5891
|
-
* Get average equity position if there are more than 1 item in the collection
|
|
5892
|
-
*/
|
|
5893
|
-
get averageEquityPosition() {
|
|
5894
|
-
return this.items.length > 1 ? this.equityPosition / this.items.length : null;
|
|
5895
|
-
}
|
|
5896
|
-
/**
|
|
5897
|
-
* Return report by provided category name
|
|
5898
|
-
*/
|
|
5899
|
-
getByCategoryName(name) {
|
|
5900
|
-
return this.items.find((item) => item.category === name);
|
|
5901
|
-
}
|
|
5902
|
-
}
|
|
5903
|
-
|
|
5904
|
-
/**
|
|
5905
|
-
* Chart serie class: chart data item
|
|
5906
|
-
* @TODO consider rename to ChartSerieData
|
|
5907
|
-
*/
|
|
5908
|
-
class ChartSerie {
|
|
5909
|
-
}
|
|
5910
|
-
|
|
5911
|
-
/**
|
|
5912
|
-
* Chart data class
|
|
5913
|
-
* @TODO consider rename to ChartSerie
|
|
5914
|
-
*/
|
|
5915
|
-
class ChartData {
|
|
5916
|
-
}
|
|
5917
|
-
__decorate([
|
|
5918
|
-
Type(() => ChartSerie)
|
|
5919
|
-
], ChartData.prototype, "data", void 0);
|
|
5920
|
-
|
|
5921
|
-
const MONTHS = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec', 'Jan'];
|
|
5922
|
-
|
|
5923
|
-
/**
|
|
5924
|
-
* Collection of transactions
|
|
5925
|
-
*/
|
|
5926
|
-
class TransactionCollection extends ExportableCollection {
|
|
5927
|
-
/**
|
|
5928
|
-
* Get total amount of all transactions in the collection
|
|
5929
|
-
*/
|
|
5930
|
-
get amount() {
|
|
5931
|
-
return +this.items.reduce((sum, transaction) => sum + transaction.getNetAmount(), 0).toFixed(2);
|
|
5932
|
-
}
|
|
5933
|
-
/**
|
|
5934
|
-
* Difference between allocated amount and total amount
|
|
5935
|
-
*/
|
|
5936
|
-
getUnallocatedAmount(allocations) {
|
|
5937
|
-
return +(this.amount - allocations.getByTransactionsIds(this.getIds()).amount).toFixed(2);
|
|
5938
|
-
}
|
|
5939
|
-
/**
|
|
5940
|
-
* Get cash position
|
|
5941
|
-
* Cash Position = Income - Expenses
|
|
5942
|
-
* Cash position is equal to Total Amount because income is positive and expense is negative,
|
|
5943
|
-
*/
|
|
5944
|
-
get cashPosition() {
|
|
5945
|
-
return this.claimAmount;
|
|
5946
|
-
}
|
|
5947
|
-
/**
|
|
5948
|
-
* get date of the last transaction
|
|
5949
|
-
*/
|
|
5950
|
-
getLastTransactionDate() {
|
|
5951
|
-
return new Date(Math.max.apply(Math, this.items.map((transaction) => transaction.date)));
|
|
5952
|
-
}
|
|
5953
|
-
/**
|
|
5954
|
-
* Get summary of claim amounts
|
|
5955
|
-
*/
|
|
5956
|
-
get claimAmount() {
|
|
5957
|
-
return this.items.reduce((sum, transaction) => sum + transaction.claimAmount, 0);
|
|
5958
|
-
}
|
|
5959
|
-
get grossAmount() {
|
|
5960
|
-
return +this.items.reduce((sum, transaction) => sum + transaction.amount, 0).toFixed(2);
|
|
5961
|
-
}
|
|
5962
|
-
getByChartAccountsCategories(categories) {
|
|
5963
|
-
return new TransactionCollection(this.items.filter((transaction) => categories.includes(transaction.chartAccounts.category)));
|
|
5964
|
-
}
|
|
5965
|
-
/**
|
|
5966
|
-
* Get transactions by month
|
|
5967
|
-
* @param monthIndex by which desired month should be taken
|
|
5968
|
-
*/
|
|
5969
|
-
getByMonth(monthIndex) {
|
|
5970
|
-
return new TransactionCollection(this.items.filter((transaction) => transaction.date.getMonth() === monthIndex));
|
|
5971
|
-
}
|
|
5972
|
-
/**
|
|
5973
|
-
* Get collection of transactions metadata
|
|
5974
|
-
*/
|
|
5975
|
-
getTransactionsMetadata() {
|
|
5976
|
-
const metadataArray = [];
|
|
5977
|
-
this.items.forEach((transaction) => {
|
|
5978
|
-
metadataArray.push(...transaction.metadata);
|
|
5979
|
-
});
|
|
5980
|
-
return new Collection(metadataArray);
|
|
5981
|
-
}
|
|
5982
|
-
getIncomeTransactions() {
|
|
5983
|
-
return new TransactionCollection(this.items.filter((transaction) => transaction.isIncome()));
|
|
6134
|
+
const chats = uniqBy(new MessageCollection(messages)
|
|
6135
|
+
.filterBy('chat.id', this.getIds())
|
|
6136
|
+
.sortBy('createdAt', true)
|
|
6137
|
+
.toArray()
|
|
6138
|
+
.map((message) => chatsById.get(message.chat.id)), 'id');
|
|
6139
|
+
const emptyChats = differenceBy(this.toArray(), chats, 'id');
|
|
6140
|
+
return this.create([...chats, ...emptyChats]);
|
|
5984
6141
|
}
|
|
5985
|
-
|
|
5986
|
-
return this.
|
|
6142
|
+
getActive() {
|
|
6143
|
+
return this.filterBy('status', ChatStatusEnum.ACTIVE);
|
|
5987
6144
|
}
|
|
5988
|
-
|
|
5989
|
-
|
|
6145
|
+
}
|
|
6146
|
+
|
|
6147
|
+
class ClientCollection extends Collection {
|
|
6148
|
+
}
|
|
6149
|
+
|
|
6150
|
+
var FirmTypeEnum;
|
|
6151
|
+
(function (FirmTypeEnum) {
|
|
6152
|
+
FirmTypeEnum[FirmTypeEnum["ACCOUNTANT"] = 1] = "ACCOUNTANT";
|
|
6153
|
+
FirmTypeEnum[FirmTypeEnum["ADVISOR"] = 2] = "ADVISOR";
|
|
6154
|
+
})(FirmTypeEnum || (FirmTypeEnum = {}));
|
|
6155
|
+
|
|
6156
|
+
class EmployeeCollection extends Collection {
|
|
6157
|
+
get accountant() {
|
|
6158
|
+
var _a;
|
|
6159
|
+
return (_a = this.items.filter((user) => user.employeeDetails.firm.type === FirmTypeEnum.ACCOUNTANT)[0]) !== null && _a !== void 0 ? _a : null;
|
|
5990
6160
|
}
|
|
5991
|
-
get
|
|
5992
|
-
return this.
|
|
6161
|
+
get advisors() {
|
|
6162
|
+
return this.items.filter((user) => user.employeeDetails.firm.type === FirmTypeEnum.ADVISOR);
|
|
5993
6163
|
}
|
|
5994
|
-
|
|
5995
|
-
|
|
6164
|
+
}
|
|
6165
|
+
|
|
6166
|
+
/**
|
|
6167
|
+
* Collection of tax review
|
|
6168
|
+
*/
|
|
6169
|
+
class ClientMovementCollection extends Collection {
|
|
6170
|
+
get active() {
|
|
6171
|
+
return new ClientMovementCollection(this.items.filter((clientMovement) => !clientMovement.dateTo));
|
|
5996
6172
|
}
|
|
5997
|
-
get
|
|
5998
|
-
return this.
|
|
6173
|
+
get employees() {
|
|
6174
|
+
return new EmployeeCollection(this.items.map((clientMovement) => clientMovement.employee));
|
|
5999
6175
|
}
|
|
6000
|
-
|
|
6001
|
-
|
|
6002
|
-
* @param ids Ids of properties for filter
|
|
6003
|
-
*/
|
|
6004
|
-
getByPropertiesIds(ids) {
|
|
6005
|
-
return new TransactionCollection(this.items.filter((transaction) => {
|
|
6006
|
-
var _a;
|
|
6007
|
-
return ids.includes((_a = transaction.property) === null || _a === void 0 ? void 0 : _a.id);
|
|
6008
|
-
}));
|
|
6176
|
+
get clients() {
|
|
6177
|
+
return new EmployeeCollection(this.items.map((clientMovement) => clientMovement.client));
|
|
6009
6178
|
}
|
|
6010
|
-
|
|
6011
|
-
|
|
6012
|
-
|
|
6013
|
-
*/
|
|
6014
|
-
getByIncomeSourceId(id) {
|
|
6015
|
-
return new TransactionCollection(this.items.filter((transaction) => { var _a; return ((_a = transaction.incomeSource) === null || _a === void 0 ? void 0 : _a.id) === id; }));
|
|
6179
|
+
get accountant() {
|
|
6180
|
+
var _a;
|
|
6181
|
+
return (_a = this.items.filter((clientMovement) => clientMovement.firm.type === FirmTypeEnum.ACCOUNTANT)[0]) !== null && _a !== void 0 ? _a : null;
|
|
6016
6182
|
}
|
|
6017
|
-
|
|
6018
|
-
|
|
6019
|
-
* @param category Chart accounts category value
|
|
6020
|
-
*/
|
|
6021
|
-
getByChartAccountsCategory(category) {
|
|
6022
|
-
return new TransactionCollection(this.items.filter((transaction) => transaction.chartAccounts.category === category));
|
|
6183
|
+
get advisors() {
|
|
6184
|
+
return new ClientMovementCollection(this.items.filter((clientMovement) => clientMovement.firm.type === FirmTypeEnum.ADVISOR));
|
|
6023
6185
|
}
|
|
6024
|
-
|
|
6025
|
-
|
|
6026
|
-
*/
|
|
6027
|
-
getPropertyTransactions() {
|
|
6028
|
-
return new TransactionCollection(this.items.filter((transaction) => transaction.isPropertyTank()));
|
|
6186
|
+
getByEmployeeId(id) {
|
|
6187
|
+
return new ClientMovementCollection(this.items.filter((clientMovement) => clientMovement.employee.id === id));
|
|
6029
6188
|
}
|
|
6030
|
-
|
|
6031
|
-
return new
|
|
6189
|
+
getByFirmType(firmType) {
|
|
6190
|
+
return new ClientMovementCollection(this.items.filter((clientMovement) => clientMovement.firm.type === firmType));
|
|
6032
6191
|
}
|
|
6033
|
-
|
|
6034
|
-
|
|
6192
|
+
}
|
|
6193
|
+
|
|
6194
|
+
/**
|
|
6195
|
+
* Collection of employee clients tax summary information
|
|
6196
|
+
*/
|
|
6197
|
+
class ClientPortfolioReportCollection extends Collection {
|
|
6198
|
+
get marketValue() {
|
|
6199
|
+
return this.sumBy('marketValue');
|
|
6035
6200
|
}
|
|
6036
|
-
|
|
6037
|
-
return
|
|
6201
|
+
get loanBalance() {
|
|
6202
|
+
return this.sumBy('loanBalance');
|
|
6038
6203
|
}
|
|
6039
|
-
|
|
6040
|
-
|
|
6041
|
-
*/
|
|
6042
|
-
getVehicleTransactions() {
|
|
6043
|
-
return this.create(this.items.filter((transaction) => {
|
|
6044
|
-
return transaction.isVehicleTransaction();
|
|
6045
|
-
}));
|
|
6204
|
+
get equityPosition() {
|
|
6205
|
+
return this.sumBy('equityPosition');
|
|
6046
6206
|
}
|
|
6047
6207
|
/**
|
|
6048
|
-
* Get
|
|
6208
|
+
* Get average market value if there are more than 1 item in the collection
|
|
6049
6209
|
*/
|
|
6050
|
-
|
|
6051
|
-
return this.
|
|
6052
|
-
switch (tankType) {
|
|
6053
|
-
case TankTypeEnum.PROPERTY:
|
|
6054
|
-
return transaction.isPropertyTank();
|
|
6055
|
-
case TankTypeEnum.WORK:
|
|
6056
|
-
return transaction.isWorkTank();
|
|
6057
|
-
case TankTypeEnum.SOLE:
|
|
6058
|
-
return transaction.isSoleTank();
|
|
6059
|
-
// Transaction may be not related to any tank type (personal)
|
|
6060
|
-
default:
|
|
6061
|
-
return false;
|
|
6062
|
-
}
|
|
6063
|
-
}));
|
|
6064
|
-
}
|
|
6065
|
-
getExportHeader() {
|
|
6066
|
-
return ['Date', 'Description', 'Debit', 'Credit'];
|
|
6067
|
-
}
|
|
6068
|
-
getExportFooter() {
|
|
6069
|
-
return [
|
|
6070
|
-
plainToClass(ExportCell, { value: 'Total', type: ExportCellTypeEnum.STRING }),
|
|
6071
|
-
plainToClass(ExportCell, { value: '', type: ExportCellTypeEnum.STRING }),
|
|
6072
|
-
plainToClass(ExportCell, { value: this.sumBy('debit'), type: ExportCellTypeEnum.CURRENCY }),
|
|
6073
|
-
plainToClass(ExportCell, { value: this.sumBy('credit'), type: ExportCellTypeEnum.CURRENCY })
|
|
6074
|
-
];
|
|
6075
|
-
}
|
|
6076
|
-
getExportBody() {
|
|
6077
|
-
return this.items.map((transaction) => {
|
|
6078
|
-
return [
|
|
6079
|
-
plainToClass(ExportCell, { value: transaction.date, type: ExportCellTypeEnum.DATE }),
|
|
6080
|
-
plainToClass(ExportCell, { value: transaction.description, type: ExportCellTypeEnum.STRING }),
|
|
6081
|
-
plainToClass(ExportCell, { value: transaction.debit, type: ExportCellTypeEnum.CURRENCY }),
|
|
6082
|
-
plainToClass(ExportCell, { value: transaction.credit, type: ExportCellTypeEnum.CURRENCY })
|
|
6083
|
-
];
|
|
6084
|
-
});
|
|
6210
|
+
get averageMarketValue() {
|
|
6211
|
+
return this.items.length > 1 ? this.marketValue / this.items.length : null;
|
|
6085
6212
|
}
|
|
6086
6213
|
/**
|
|
6087
|
-
* Get
|
|
6214
|
+
* Get average loan balance if there are more than 1 item in the collection
|
|
6088
6215
|
*/
|
|
6089
|
-
|
|
6090
|
-
|
|
6091
|
-
return this.create([]);
|
|
6092
|
-
}
|
|
6093
|
-
return vehicleClaim.isSoleTank()
|
|
6094
|
-
// sole tank may have multiple vehicle claims, so we need to filter by business.id
|
|
6095
|
-
? this.getVehicleTransactions().filterBy('business.id', vehicleClaim.business.id)
|
|
6096
|
-
// work tank may have only one vehicle claim, so we need to filter by tank type
|
|
6097
|
-
: this.getVehicleTransactions().filterBy('tankType', TankTypeEnum.WORK);
|
|
6216
|
+
get averageLoanBalance() {
|
|
6217
|
+
return this.items.length > 1 ? this.loanBalance / this.items.length : null;
|
|
6098
6218
|
}
|
|
6099
6219
|
/**
|
|
6100
|
-
* Get
|
|
6220
|
+
* Get average equity position if there are more than 1 item in the collection
|
|
6101
6221
|
*/
|
|
6102
|
-
|
|
6103
|
-
return this
|
|
6104
|
-
.getVehicleTransactions()
|
|
6105
|
-
.removeBy('chartAccounts.id', [ChartAccountsListEnum.KLMS_TRAVELLED_FOR_WORK, ChartAccountsListEnum.KLMS_TRAVELLED]);
|
|
6222
|
+
get averageEquityPosition() {
|
|
6223
|
+
return this.items.length > 1 ? this.equityPosition / this.items.length : null;
|
|
6106
6224
|
}
|
|
6107
6225
|
/**
|
|
6108
|
-
*
|
|
6109
|
-
* Cash position = Income - Expenses (include depreciations)
|
|
6110
|
-
* Chart data for each month from fin year start till current month
|
|
6226
|
+
* Return report by provided category name
|
|
6111
6227
|
*/
|
|
6112
|
-
|
|
6113
|
-
|
|
6114
|
-
plainToClass(ChartData, { name: 'Income', data: [] }),
|
|
6115
|
-
plainToClass(ChartData, { name: 'Expense', data: [] })
|
|
6116
|
-
];
|
|
6117
|
-
new FinancialYear().getPastMonths().forEach((month) => {
|
|
6118
|
-
chartData[0].data.push({
|
|
6119
|
-
label: MONTHS[month],
|
|
6120
|
-
value: this.getIncomeTransactions().getByMonth(month).claimAmount
|
|
6121
|
-
});
|
|
6122
|
-
chartData[1].data.push({
|
|
6123
|
-
label: MONTHS[month],
|
|
6124
|
-
value: Math.abs(this.getExpenseTransactions().getByMonth(month).claimAmount)
|
|
6125
|
-
});
|
|
6126
|
-
});
|
|
6127
|
-
return chartData;
|
|
6228
|
+
getByCategoryName(name) {
|
|
6229
|
+
return this.items.find((item) => item.category === name);
|
|
6128
6230
|
}
|
|
6129
6231
|
}
|
|
6130
6232
|
|
|
@@ -6770,7 +6872,11 @@ const TAX_RETURN_CATEGORIES = {
|
|
|
6770
6872
|
TaxReturnCategoryListEnum.DEPRECIATION_EXPENSES,
|
|
6771
6873
|
TaxReturnCategoryListEnum.MOTOR_VEHICLE_EXPENSES,
|
|
6772
6874
|
TaxReturnCategoryListEnum.ALL_OTHER_EXPENSES
|
|
6773
|
-
]
|
|
6875
|
+
],
|
|
6876
|
+
// @TODO TT-2386 Nikita to move sole tax offsets in separated category
|
|
6877
|
+
taxOffsets: [
|
|
6878
|
+
TaxReturnCategoryListEnum.TAX_OFFSETS
|
|
6879
|
+
],
|
|
6774
6880
|
},
|
|
6775
6881
|
};
|
|
6776
6882
|
|
|
@@ -6827,44 +6933,6 @@ class TaxReviewCollection extends Collection {
|
|
|
6827
6933
|
}
|
|
6828
6934
|
}
|
|
6829
6935
|
|
|
6830
|
-
class TransactionAllocationCollection extends Collection {
|
|
6831
|
-
get amount() {
|
|
6832
|
-
return this.sumBy('amount');
|
|
6833
|
-
}
|
|
6834
|
-
getByTransactionsIds(ids) {
|
|
6835
|
-
return new TransactionAllocationCollection(this.items.filter((allocation) => ids.includes(allocation.transaction.id)));
|
|
6836
|
-
}
|
|
6837
|
-
getByBankTransactionsIds(ids) {
|
|
6838
|
-
return new TransactionAllocationCollection(this.items.filter((allocation) => ids.includes(allocation.bankTransaction.id)));
|
|
6839
|
-
}
|
|
6840
|
-
/**
|
|
6841
|
-
* Group allocations by bank account via bank transactions collection
|
|
6842
|
-
*/
|
|
6843
|
-
groupByBankAccount(bankTransactions) {
|
|
6844
|
-
// Group bank transactions by bank account id
|
|
6845
|
-
const bankTransactionsByBankAccount = new CollectionDictionary(bankTransactions, 'bankAccount.id');
|
|
6846
|
-
// Create empty dictionary of transaction allocations
|
|
6847
|
-
const allocationsByBankAccount = new CollectionDictionary(new TransactionAllocationCollection([]));
|
|
6848
|
-
// Fill allocations dictionary with bank transactions dictionary keys and allocations related with each bank transaction collection
|
|
6849
|
-
bankTransactionsByBankAccount.keys.forEach((key) => {
|
|
6850
|
-
allocationsByBankAccount.add(key, this.getByBankTransactionsIds(bankTransactionsByBankAccount.get(key).getIds()));
|
|
6851
|
-
});
|
|
6852
|
-
return allocationsByBankAccount;
|
|
6853
|
-
}
|
|
6854
|
-
/**
|
|
6855
|
-
* check if collection includes allocation of passed transaction
|
|
6856
|
-
*/
|
|
6857
|
-
hasTransaction(transaction) {
|
|
6858
|
-
return !!this.items.find((allocation) => allocation.transaction.id === transaction.id);
|
|
6859
|
-
}
|
|
6860
|
-
/**
|
|
6861
|
-
* Check if bank transaction is related with current allocations
|
|
6862
|
-
*/
|
|
6863
|
-
hasBankTransaction(bankTransaction) {
|
|
6864
|
-
return !!this.items.find((allocation) => allocation.bankTransaction.id === bankTransaction.id);
|
|
6865
|
-
}
|
|
6866
|
-
}
|
|
6867
|
-
|
|
6868
6936
|
/**
|
|
6869
6937
|
* Collection of user event settings
|
|
6870
6938
|
*/
|
|
@@ -9389,7 +9457,6 @@ class TaxSummary {
|
|
|
9389
9457
|
return income - Math.abs(expenses) + Math.abs(taxOffsets) + Math.abs(taxInstallments) + Math.abs(frankingCredits);
|
|
9390
9458
|
}
|
|
9391
9459
|
/**
|
|
9392
|
-
* @TODO Nicole update documentation + check calculations
|
|
9393
9460
|
* Sole Net Cash = gross income – expenses
|
|
9394
9461
|
* https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/217677990/Dashboard+Main
|
|
9395
9462
|
*/
|
|
@@ -9399,7 +9466,6 @@ class TaxSummary {
|
|
|
9399
9466
|
return income - Math.abs(expenses);
|
|
9400
9467
|
}
|
|
9401
9468
|
/**
|
|
9402
|
-
* @TODO Nicole update documentation + check calculations
|
|
9403
9469
|
* Sole Net Total = Gross income - expenses
|
|
9404
9470
|
* https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/217677990/Dashboard+Main
|
|
9405
9471
|
*/
|
|
@@ -9596,6 +9662,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
|
|
|
9596
9662
|
}]
|
|
9597
9663
|
}] });
|
|
9598
9664
|
|
|
9665
|
+
/**
|
|
9666
|
+
* @TODO vik replace with json when the final list is confirmed
|
|
9667
|
+
*/
|
|
9668
|
+
class SoleBusinessLossOffsetRuleService extends RestService {
|
|
9669
|
+
constructor() {
|
|
9670
|
+
super(...arguments);
|
|
9671
|
+
this.modelClass = SoleBusinessLossOffsetRule;
|
|
9672
|
+
this.url = 'sole-business-loss-offset-rules';
|
|
9673
|
+
this.isHydra = true;
|
|
9674
|
+
}
|
|
9675
|
+
}
|
|
9676
|
+
SoleBusinessLossOffsetRuleService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: SoleBusinessLossOffsetRuleService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
9677
|
+
SoleBusinessLossOffsetRuleService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: SoleBusinessLossOffsetRuleService, providedIn: 'root' });
|
|
9678
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: SoleBusinessLossOffsetRuleService, decorators: [{
|
|
9679
|
+
type: Injectable,
|
|
9680
|
+
args: [{
|
|
9681
|
+
providedIn: 'root'
|
|
9682
|
+
}]
|
|
9683
|
+
}] });
|
|
9684
|
+
|
|
9599
9685
|
class SoleContactService extends RestService {
|
|
9600
9686
|
constructor() {
|
|
9601
9687
|
super(...arguments);
|
|
@@ -14968,6 +15054,29 @@ class SoleBusinessAllocationsForm extends FormArray {
|
|
|
14968
15054
|
}
|
|
14969
15055
|
}
|
|
14970
15056
|
|
|
15057
|
+
class SoleBusinessLossForm extends AbstractForm {
|
|
15058
|
+
constructor(loss, balance) {
|
|
15059
|
+
var _a;
|
|
15060
|
+
super({
|
|
15061
|
+
openBalance: new FormControl(loss.openBalance, Validators.required),
|
|
15062
|
+
offsetRule: new FormControl((_a = loss.offsetRule) === null || _a === void 0 ? void 0 : _a.id),
|
|
15063
|
+
// sum of depreciations/transactions claim amount - openBalance
|
|
15064
|
+
balance: new FormControl({ value: balance, disabled: true }),
|
|
15065
|
+
}, loss);
|
|
15066
|
+
this.loss = loss;
|
|
15067
|
+
this.get('openBalance').valueChanges.subscribe((openBalance) => {
|
|
15068
|
+
this.get('balance').setValue(balance - openBalance);
|
|
15069
|
+
});
|
|
15070
|
+
}
|
|
15071
|
+
/**
|
|
15072
|
+
* radio buttons can't work with object
|
|
15073
|
+
* https://github.com/angular/components/issues/10495
|
|
15074
|
+
*/
|
|
15075
|
+
submit() {
|
|
15076
|
+
return super.submit({ offsetRule: this.get('offsetRule').value ? { id: this.get('offsetRule').value } : null });
|
|
15077
|
+
}
|
|
15078
|
+
}
|
|
15079
|
+
|
|
14971
15080
|
class SoleContactForm extends AbstractForm {
|
|
14972
15081
|
constructor(contact = plainToClass(SoleContact, {})) {
|
|
14973
15082
|
super({
|
|
@@ -16104,5 +16213,5 @@ VehicleLogbookForm.maxDescriptionLength = 60;
|
|
|
16104
16213
|
* Generated bundle index. Do not edit.
|
|
16105
16214
|
*/
|
|
16106
16215
|
|
|
16107
|
-
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 };
|
|
16216
|
+
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 };
|
|
16108
16217
|
//# sourceMappingURL=taxtank-core.js.map
|