taxtank-core 0.28.18 → 0.28.19

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.
@@ -5721,6 +5721,20 @@
5721
5721
  enumerable: false,
5722
5722
  configurable: true
5723
5723
  });
5724
+ Object.defineProperty(BankAccount.prototype, "bsb", {
5725
+ get: function () {
5726
+ return this.accountNumber.split(' ')[0];
5727
+ },
5728
+ enumerable: false,
5729
+ configurable: true
5730
+ });
5731
+ Object.defineProperty(BankAccount.prototype, "number", {
5732
+ get: function () {
5733
+ return this.accountNumber.split(' ')[1];
5734
+ },
5735
+ enumerable: false,
5736
+ configurable: true
5737
+ });
5724
5738
  /**
5725
5739
  * Get current opening balance amount
5726
5740
  */
@@ -17476,7 +17490,7 @@
17476
17490
  * We take the first forecast because income sources available only for new business, so we have only one forecast
17477
17491
  */
17478
17492
  get: function () {
17479
- if (!this.business.id) {
17493
+ if (this.business.id) {
17480
17494
  return null;
17481
17495
  }
17482
17496
  return this.get('incomeSource').get('soleForecasts').at(0);
@@ -17489,7 +17503,7 @@
17489
17503
  * We take the first loss because losses available only for new business, so we have only one loss
17490
17504
  */
17491
17505
  get: function () {
17492
- if (!this.business.id) {
17506
+ if (this.business.id) {
17493
17507
  return null;
17494
17508
  }
17495
17509
  return this.get('losses').at(0);
@@ -17647,7 +17661,8 @@
17647
17661
  items: new forms.FormArray((invoice.items || [classTransformer.plainToClass(SoleInvoiceItem, {})]).map(function (item) { return new SoleInvoiceItemForm(item); })),
17648
17662
  payer: new forms.FormControl(invoice.payer, forms.Validators.required),
17649
17663
  taxType: new forms.FormControl(invoice.taxType, forms.Validators.required),
17650
- bankAccount: new forms.FormControl(invoice.bankAccount, forms.Validators.required)
17664
+ bankAccount: new forms.FormControl(invoice.bankAccount, forms.Validators.required),
17665
+ reference: new forms.FormControl(invoice.reference)
17651
17666
  }, invoice) || this;
17652
17667
  _this.soleDetailsGST = soleDetailsGST;
17653
17668
  // we need invoice template only for new invoices