taxtank-core 0.28.39 → 0.28.42
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 +26 -14
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/db/Models/depreciation/depreciation.js +1 -1
- package/esm2015/lib/db/Models/transaction/transaction-base.js +8 -1
- package/esm2015/lib/db/Models/transaction/transaction.js +1 -1
- package/esm2015/lib/interfaces/asset-type.enum.js +8 -4
- package/esm2015/lib/models/chart-accounts/chart-accounts.js +7 -1
- package/esm2015/lib/models/depreciation/depreciation-receipt.js +2 -2
- package/esm2015/lib/models/document/document.js +2 -2
- package/esm2015/lib/models/property/property-document.js +2 -2
- package/esm2015/lib/models/service-subscription/service-subscription.js +2 -2
- package/esm2015/lib/models/sole/sole-invoice-item.js +1 -5
- package/esm2015/lib/models/sole/sole-invoice.js +4 -3
- package/esm2015/lib/models/transaction/transaction-receipt.js +2 -2
- package/fesm2015/taxtank-core.js +26 -14
- package/fesm2015/taxtank-core.js.map +1 -1
- package/lib/db/Models/depreciation/depreciation.d.ts +1 -0
- package/lib/db/Models/transaction/transaction-base.d.ts +8 -2
- package/lib/db/Models/transaction/transaction.d.ts +1 -0
- package/lib/interfaces/asset-type.enum.d.ts +8 -3
- package/lib/models/chart-accounts/chart-accounts.d.ts +6 -0
- package/lib/models/sole/sole-invoice-item.d.ts +0 -4
- package/package.json +1 -1
|
@@ -3046,7 +3046,7 @@
|
|
|
3046
3046
|
var min = propertyItem.price.product.minQty;
|
|
3047
3047
|
// if user has property subscription and number of properties doesn't exceed the maximum in the service product - return one more
|
|
3048
3048
|
if (this.hasItem(propertyItem)) {
|
|
3049
|
-
propertiesQty =
|
|
3049
|
+
propertiesQty = this.propertyQuantity < max ? this.propertyQuantity + 1 : max;
|
|
3050
3050
|
}
|
|
3051
3051
|
return Math.max(min, propertiesQty);
|
|
3052
3052
|
};
|
|
@@ -3570,6 +3570,12 @@
|
|
|
3570
3570
|
};
|
|
3571
3571
|
return ChartAccounts;
|
|
3572
3572
|
}(ChartAccounts$1));
|
|
3573
|
+
/**
|
|
3574
|
+
* Australian GST percent value (VAT)
|
|
3575
|
+
*/
|
|
3576
|
+
ChartAccounts.GSTRatio = 0.1;
|
|
3577
|
+
ChartAccounts.GSTCoefficient = 1.1;
|
|
3578
|
+
ChartAccounts.GSTPercent = 10;
|
|
3573
3579
|
__decorate([
|
|
3574
3580
|
classTransformer.Type(function () { return ChartAccountsHeading; })
|
|
3575
3581
|
], ChartAccounts.prototype, "heading", void 0);
|
|
@@ -3630,6 +3636,12 @@
|
|
|
3630
3636
|
}
|
|
3631
3637
|
return !!this.business;
|
|
3632
3638
|
};
|
|
3639
|
+
TransactionBase.prototype.getAmountWithGst = function () {
|
|
3640
|
+
return this.isGST ? +(this.amount * ChartAccounts.GSTCoefficient).toFixed(2) : this.amount;
|
|
3641
|
+
};
|
|
3642
|
+
TransactionBase.prototype.getGstAmount = function () {
|
|
3643
|
+
return +(this.getAmountWithGst() - this.amount).toFixed(2);
|
|
3644
|
+
};
|
|
3633
3645
|
return TransactionBase;
|
|
3634
3646
|
}(AbstractModel));
|
|
3635
3647
|
__decorate([
|
|
@@ -3694,15 +3706,19 @@
|
|
|
3694
3706
|
return TransactionReceipt;
|
|
3695
3707
|
}(AbstractModel));
|
|
3696
3708
|
|
|
3697
|
-
// @TODO this enum should come from backend
|
|
3698
3709
|
/**
|
|
3699
3710
|
* Enum with asset types
|
|
3700
3711
|
*/
|
|
3701
3712
|
exports.AssetTypeEnum = void 0;
|
|
3702
3713
|
(function (AssetTypeEnum) {
|
|
3703
|
-
AssetTypeEnum["
|
|
3704
|
-
AssetTypeEnum["
|
|
3714
|
+
AssetTypeEnum["TRANSACTION_RECEIPT"] = "transactionReceipt";
|
|
3715
|
+
AssetTypeEnum["PROPERTY"] = "property";
|
|
3716
|
+
AssetTypeEnum["DOCUMENT"] = "document";
|
|
3705
3717
|
AssetTypeEnum["MESSAGE"] = "message";
|
|
3718
|
+
AssetTypeEnum["USER_PHOTO"] = "userPhoto";
|
|
3719
|
+
AssetTypeEnum["PROPERTY_PHOTO"] = "propertyPhoto";
|
|
3720
|
+
AssetTypeEnum["DEPRECIATION_RECEIPT"] = "depreciationReceipt";
|
|
3721
|
+
AssetTypeEnum["FIRM_PHOTO"] = "firmPhoto";
|
|
3706
3722
|
})(exports.AssetTypeEnum || (exports.AssetTypeEnum = {}));
|
|
3707
3723
|
|
|
3708
3724
|
/**
|
|
@@ -3721,7 +3737,7 @@
|
|
|
3721
3737
|
__extends(TransactionReceipt, _super);
|
|
3722
3738
|
function TransactionReceipt() {
|
|
3723
3739
|
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
3724
|
-
_this.type = exports.AssetTypeEnum.
|
|
3740
|
+
_this.type = exports.AssetTypeEnum.TRANSACTION_RECEIPT;
|
|
3725
3741
|
_this.entityType = exports.AssetEntityTypeEnum.TRANSACTIONS;
|
|
3726
3742
|
return _this;
|
|
3727
3743
|
}
|
|
@@ -4651,10 +4667,6 @@
|
|
|
4651
4667
|
});
|
|
4652
4668
|
return SoleInvoiceItem;
|
|
4653
4669
|
}(SoleInvoiceItem$1));
|
|
4654
|
-
/**
|
|
4655
|
-
* GST percent value
|
|
4656
|
-
*/
|
|
4657
|
-
SoleInvoiceItem.GSTRatio = 0.1;
|
|
4658
4670
|
__decorate([
|
|
4659
4671
|
classTransformer.Type(function () { return SoleInvoice; })
|
|
4660
4672
|
], SoleInvoiceItem.prototype, "invoice", void 0);
|
|
@@ -4862,7 +4874,7 @@
|
|
|
4862
4874
|
*/
|
|
4863
4875
|
get: function () {
|
|
4864
4876
|
var gstPrice = this.itemsCollection.gstPrice;
|
|
4865
|
-
return +(gstPrice - (gstPrice / (1 +
|
|
4877
|
+
return +(gstPrice - (gstPrice / (1 + ChartAccounts.GSTRatio))).toFixed(2);
|
|
4866
4878
|
},
|
|
4867
4879
|
enumerable: false,
|
|
4868
4880
|
configurable: true
|
|
@@ -4872,7 +4884,7 @@
|
|
|
4872
4884
|
* When tax exclusive, GST amount should be added additionally to total price
|
|
4873
4885
|
*/
|
|
4874
4886
|
get: function () {
|
|
4875
|
-
return +(this.itemsCollection.gstPrice *
|
|
4887
|
+
return +(this.itemsCollection.gstPrice * ChartAccounts.GSTRatio).toFixed(2);
|
|
4876
4888
|
},
|
|
4877
4889
|
enumerable: false,
|
|
4878
4890
|
configurable: true
|
|
@@ -5492,7 +5504,7 @@
|
|
|
5492
5504
|
__extends(PropertyDocument, _super);
|
|
5493
5505
|
function PropertyDocument() {
|
|
5494
5506
|
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
5495
|
-
_this.type = exports.AssetTypeEnum.
|
|
5507
|
+
_this.type = exports.AssetTypeEnum.DOCUMENT;
|
|
5496
5508
|
_this.entityType = exports.AssetEntityTypeEnum.PROPERTIES;
|
|
5497
5509
|
return _this;
|
|
5498
5510
|
}
|
|
@@ -6491,7 +6503,7 @@
|
|
|
6491
6503
|
__extends(Document, _super);
|
|
6492
6504
|
function Document() {
|
|
6493
6505
|
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
6494
|
-
_this.type = exports.AssetTypeEnum.
|
|
6506
|
+
_this.type = exports.AssetTypeEnum.DOCUMENT;
|
|
6495
6507
|
_this.entityType = exports.AssetEntityTypeEnum.FOLDERS;
|
|
6496
6508
|
return _this;
|
|
6497
6509
|
}
|
|
@@ -10300,7 +10312,7 @@
|
|
|
10300
10312
|
__extends(DepreciationReceipt, _super);
|
|
10301
10313
|
function DepreciationReceipt() {
|
|
10302
10314
|
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
10303
|
-
_this.type = exports.AssetTypeEnum.
|
|
10315
|
+
_this.type = exports.AssetTypeEnum.DEPRECIATION_RECEIPT;
|
|
10304
10316
|
_this.entityType = exports.AssetEntityTypeEnum.DEPRECIATIONS;
|
|
10305
10317
|
return _this;
|
|
10306
10318
|
}
|