taxtank-core 0.28.116 → 0.28.118

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.
@@ -7462,14 +7462,14 @@
7462
7462
  });
7463
7463
  Object.defineProperty(BankAccount.prototype, "bsb", {
7464
7464
  get: function () {
7465
- return this.accountNumber.split(' ')[0];
7465
+ return this.accountNumber.slice(0, 6);
7466
7466
  },
7467
7467
  enumerable: false,
7468
7468
  configurable: true
7469
7469
  });
7470
7470
  Object.defineProperty(BankAccount.prototype, "number", {
7471
7471
  get: function () {
7472
- return this.accountNumber.split(' ')[1];
7472
+ return this.accountNumber.trim().slice(6);
7473
7473
  },
7474
7474
  enumerable: false,
7475
7475
  configurable: true
@@ -21057,7 +21057,7 @@
21057
21057
  function TransactionForm(transaction, registeredForGst, allocations, controls) {
21058
21058
  if (controls === void 0) { controls = {}; }
21059
21059
  var _this = _super.call(this, transaction, registeredForGst, Object.assign(controls, { transactions: new forms.FormArray([]) })) || this;
21060
- _this.setValidators([currentFinYearValidator()]);
21060
+ _this.get('date').addValidators([currentFinYearValidator()]);
21061
21061
  // convert child transactions to controls
21062
21062
  transaction.transactions.map(function (transaction) {
21063
21063
  _this.addTransactionControl(transaction);
@@ -21066,8 +21066,8 @@
21066
21066
  if (transaction.property) {
21067
21067
  _this.get('date').addValidators(minDateValidator(transaction.property.myShare.fromDate, MessagesEnum.DATE_VALIDATION_ERROR));
21068
21068
  }
21069
- // property usually comes with fees, add empty control for new transactions
21070
- if (!transaction.id && transaction.property && !transaction.transactions.length) {
21069
+ // property income usually comes with fees, add empty control for new transactions
21070
+ if (!transaction.id && transaction.property && !transaction.transactions.length && transaction.isCredit()) {
21071
21071
  _this.addTransactionControl();
21072
21072
  }
21073
21073
  // forbid to edit amount for allocated transactions to prevent wrong allocations