taxtank-core 0.21.7 → 0.21.8
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 +27 -5
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/db/Models/bank/bank-account.js +1 -1
- package/esm2015/lib/db/Models/depreciation/depreciation.js +1 -1
- package/esm2015/lib/db/Models/sole/sole-business-allocation.js +4 -0
- package/esm2015/lib/db/Models/sole/sole-business-loss.js +4 -0
- package/esm2015/lib/db/Models/sole/sole-business.js +4 -0
- package/esm2015/lib/db/Models/sole/sole-contact.js +4 -0
- package/esm2015/lib/db/Models/sole/sole-forecast.js +1 -1
- package/esm2015/lib/db/Models/sole/sole-invoice-item.js +4 -0
- package/esm2015/lib/db/Models/sole/sole-invoice-template.js +4 -0
- package/esm2015/lib/db/Models/sole/sole-invoice.js +4 -0
- package/esm2015/lib/db/Models/transaction/transaction.js +1 -1
- package/esm2015/lib/db/Models/vehicle/vehicle-claim.js +1 -1
- package/esm2015/lib/db/Models/vehicle/vehicle.js +1 -1
- package/esm2015/lib/models/bank/bank-account.js +14 -4
- package/esm2015/lib/models/logbook/vehicle-claim.js +6 -3
- package/esm2015/lib/services/event/sse.service.js +2 -1
- package/fesm2015/taxtank-core.js +19 -5
- package/fesm2015/taxtank-core.js.map +1 -1
- package/lib/db/Models/bank/bank-account.d.ts +2 -2
- package/lib/db/Models/depreciation/depreciation.d.ts +2 -0
- package/lib/db/Models/sole/sole-business-allocation.d.ts +9 -0
- package/lib/db/Models/sole/sole-business-loss.d.ts +9 -0
- package/lib/db/Models/sole/sole-business.d.ts +26 -0
- package/lib/db/Models/sole/sole-contact.d.ts +17 -0
- package/lib/db/Models/sole/sole-invoice-item.d.ts +12 -0
- package/lib/db/Models/sole/sole-invoice-template.d.ts +10 -0
- package/lib/db/Models/sole/sole-invoice.d.ts +18 -0
- package/lib/db/Models/transaction/transaction.d.ts +2 -0
- package/lib/db/Models/vehicle/vehicle-claim.d.ts +2 -2
- package/lib/db/Models/vehicle/vehicle.d.ts +0 -2
- package/lib/models/bank/bank-account.d.ts +2 -0
- package/lib/models/logbook/vehicle-claim.d.ts +1 -0
- package/lib/services/event/sse.service.d.ts +1 -0
- package/package.json +1 -1
|
@@ -3370,20 +3370,34 @@
|
|
|
3370
3370
|
* check if bank account related to work tank
|
|
3371
3371
|
*/
|
|
3372
3372
|
BankAccount.prototype.isWorkTank = function () {
|
|
3373
|
-
return this.
|
|
3373
|
+
return !this.isPropertyTank() && !this.isSoleTank();
|
|
3374
3374
|
};
|
|
3375
3375
|
/**
|
|
3376
3376
|
* check if bank account related to work tank
|
|
3377
3377
|
*/
|
|
3378
3378
|
BankAccount.prototype.isPropertyTank = function () {
|
|
3379
|
-
return this.
|
|
3379
|
+
return !!this.bankAccountProperties.length;
|
|
3380
3380
|
};
|
|
3381
3381
|
/**
|
|
3382
3382
|
* check if bank account related to sole tank
|
|
3383
3383
|
*/
|
|
3384
3384
|
BankAccount.prototype.isSoleTank = function () {
|
|
3385
|
-
return this.
|
|
3385
|
+
return !!this.businessAllocations.length;
|
|
3386
3386
|
};
|
|
3387
|
+
Object.defineProperty(BankAccount.prototype, "tankType", {
|
|
3388
|
+
get: function () {
|
|
3389
|
+
switch (true) {
|
|
3390
|
+
case this.isPropertyTank():
|
|
3391
|
+
return exports.TankTypeEnum.PROPERTY;
|
|
3392
|
+
case this.isSoleTank():
|
|
3393
|
+
return exports.TankTypeEnum.SOLE;
|
|
3394
|
+
default:
|
|
3395
|
+
return exports.TankTypeEnum.WORK;
|
|
3396
|
+
}
|
|
3397
|
+
},
|
|
3398
|
+
enumerable: false,
|
|
3399
|
+
configurable: true
|
|
3400
|
+
});
|
|
3387
3401
|
/**
|
|
3388
3402
|
* Get Bank account property by id
|
|
3389
3403
|
* @param id Id of property
|
|
@@ -8721,11 +8735,18 @@
|
|
|
8721
8735
|
return this.method === exports.VehicleClaimMethodEnum.KMS;
|
|
8722
8736
|
};
|
|
8723
8737
|
VehicleClaim.prototype.isWorkTank = function () {
|
|
8724
|
-
return this.
|
|
8738
|
+
return !this.business;
|
|
8725
8739
|
};
|
|
8726
8740
|
VehicleClaim.prototype.isSoleTank = function () {
|
|
8727
|
-
return this.
|
|
8741
|
+
return !!this.business;
|
|
8728
8742
|
};
|
|
8743
|
+
Object.defineProperty(VehicleClaim.prototype, "tankType", {
|
|
8744
|
+
get: function () {
|
|
8745
|
+
return this.isSoleTank() ? exports.TankTypeEnum.SOLE : exports.TankTypeEnum.WORK;
|
|
8746
|
+
},
|
|
8747
|
+
enumerable: false,
|
|
8748
|
+
configurable: true
|
|
8749
|
+
});
|
|
8729
8750
|
/**
|
|
8730
8751
|
* Claim amount for KLMs method. Exists only for KLMs method.
|
|
8731
8752
|
*/
|
|
@@ -11736,6 +11757,7 @@
|
|
|
11736
11757
|
|
|
11737
11758
|
/**
|
|
11738
11759
|
* server sent events service
|
|
11760
|
+
* https://symfony.com/doc/current/mercure.html
|
|
11739
11761
|
*/
|
|
11740
11762
|
var SseService = /** @class */ (function () {
|
|
11741
11763
|
function SseService(zone, jwtService, environment) {
|