taxtank-core 0.28.74 → 0.28.77

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.
@@ -3749,7 +3749,7 @@
3749
3749
  });
3750
3750
  Object.defineProperty(TransactionBase.prototype, "gstAmount", {
3751
3751
  get: function () {
3752
- return this.amountWithGst - this.amount;
3752
+ return +(this.amountWithGst - this.amount).toFixed(2);
3753
3753
  },
3754
3754
  enumerable: false,
3755
3755
  configurable: true
@@ -4514,7 +4514,7 @@
4514
4514
  * assets purchased in the current financial year
4515
4515
  */
4516
4516
  Depreciation.prototype.isNew = function () {
4517
- return new FinancialYear(this.purchaseDate).year === new FinancialYear().year;
4517
+ return new FinancialYear(this.date).year === new FinancialYear().year;
4518
4518
  };
4519
4519
  return Depreciation;
4520
4520
  }(Depreciation$1));
@@ -5507,7 +5507,7 @@
5507
5507
  * GST payable to the ATO, or refundable from the ATO in case it's negative
5508
5508
  */
5509
5509
  get: function () {
5510
- return this.incomeGST - this.expenseGST + this.taxWithheldTotal + this.paygTaxInstalment - this.fuelTaxCredit;
5510
+ return this.incomeGST + this.expenseGST + this.taxWithheldTotal + this.paygTaxInstalment - this.fuelTaxCredit;
5511
5511
  },
5512
5512
  enumerable: false,
5513
5513
  configurable: true
@@ -8631,7 +8631,7 @@
8631
8631
  function DepreciationCollection() {
8632
8632
  return _super !== null && _super.apply(this, arguments) || this;
8633
8633
  }
8634
- DepreciationCollection.prototype.getSoleTransactions = function () {
8634
+ DepreciationCollection.prototype.getSoleDepreciations = function () {
8635
8635
  return this.filter(function (depreciation) { return depreciation.isSoleTank(); });
8636
8636
  };
8637
8637
  DepreciationCollection.prototype.getNew = function () {
@@ -19050,7 +19050,7 @@
19050
19050
  var _this = this;
19051
19051
  var _a;
19052
19052
  _this = _super.call(this, {
19053
- description: new forms.FormControl(item.description, forms.Validators.required),
19053
+ description: new forms.FormControl(item.description, [forms.Validators.required, forms.Validators.maxLength(SoleInvoiceItemForm.maxDescriptionLength)]),
19054
19054
  quantity: new forms.FormControl(item.quantity, forms.Validators.required),
19055
19055
  price: new forms.FormControl(item.price, forms.Validators.required),
19056
19056
  isGST: new forms.FormControl({ value: item.isGST || false, disabled: !((_a = item.chartAccounts) === null || _a === void 0 ? void 0 : _a.isGST) }),
@@ -19060,6 +19060,7 @@
19060
19060
  }
19061
19061
  return SoleInvoiceItemForm;
19062
19062
  }(AbstractForm));
19063
+ SoleInvoiceItemForm.maxDescriptionLength = 255;
19063
19064
 
19064
19065
  /**
19065
19066
  * Form is divided into two groups, since the creation of Sole invoice takes place in two steps:
@@ -19276,7 +19277,7 @@
19276
19277
  .subscribe(function (_a) {
19277
19278
  var _b = __read(_a, 2), dateFrom = _b[0], dateTo = _b[1];
19278
19279
  var filteredTransactions = transactions.filterByRange('date', dateFrom, dateTo);
19279
- var filteredDepreciations = depreciations.filterByRange('purchaseDate', dateFrom, dateTo);
19280
+ var filteredDepreciations = depreciations.filterByRange('date', dateFrom, dateTo);
19280
19281
  var incomeTransactions = filteredTransactions.getIncomeTransactions();
19281
19282
  var expenseTransactions = new TransactionBaseCollection(__spreadArray(__spreadArray([], __read(filteredTransactions.getExpenseTransactions().toArray())), __read(filteredDepreciations.toArray())));
19282
19283
  // all sole income claimed as 100%