taxtank-core 1.0.28 → 1.0.30

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.
@@ -9912,7 +9912,7 @@ class BankAccount extends BankAccount$1 {
9912
9912
  return FinancialYear.isCurrent() ? this.currentBalance : this.getOpeningBalance(FinancialYear.year + 1);
9913
9913
  }
9914
9914
  /**
9915
- * Get current opening balance amount
9915
+ * Get the current opening balance amount
9916
9916
  */
9917
9917
  getOpeningBalance(year = FinancialYear.year) {
9918
9918
  return this.getBalanceByYear(year)?.openingBalance || 0;
@@ -9932,7 +9932,7 @@ class BankAccount extends BankAccount$1 {
9932
9932
  this.type === BankAccountTypeEnum.SAVINGS;
9933
9933
  }
9934
9934
  /**
9935
- * check if bank account type is Loan
9935
+ * check if a bank account type is Loan
9936
9936
  */
9937
9937
  isLoan() {
9938
9938
  return this.loan && TYPE_LOAN.includes(this.type);
@@ -9944,19 +9944,19 @@ class BankAccount extends BankAccount$1 {
9944
9944
  return this.type === BankAccountTypeEnum.CREDIT_CARD;
9945
9945
  }
9946
9946
  /**
9947
- * check if bank account related to work tank
9947
+ * check if a bank account related to work tank
9948
9948
  */
9949
9949
  isWorkTank() {
9950
9950
  return !this.isPropertyTank() && !this.isSoleTank();
9951
9951
  }
9952
9952
  /**
9953
- * check if bank account related to work tank
9953
+ * check if a bank account related to work tank
9954
9954
  */
9955
9955
  isPropertyTank() {
9956
9956
  return !!this.bankAccountProperties.length;
9957
9957
  }
9958
9958
  /**
9959
- * check if bank account related to sole tank
9959
+ * check if a bank account related to sole tank
9960
9960
  */
9961
9961
  isSoleTank() {
9962
9962
  return !!this.businessAllocations.length;
@@ -9969,7 +9969,7 @@ class BankAccount extends BankAccount$1 {
9969
9969
  return this.bankAccountProperties.find((bankAccountProperty) => bankAccountProperty.property.id === id);
9970
9970
  }
9971
9971
  /**
9972
- * check if bank account is related with passed property by id
9972
+ * check if a bank account is related with passed property by id
9973
9973
  * @param propertyId Property id for checking
9974
9974
  */
9975
9975
  hasProperty(propertyId) {
@@ -10020,8 +10020,8 @@ class BankAccount extends BankAccount$1 {
10020
10020
  */
10021
10021
  isLoanPaid(taxTankBalance) {
10022
10022
  const shouldPayoutLoanAccount = this.isActive() && this.isLoan() && taxTankBalance === 0;
10023
- // we don't check current balance for basiq accounts, because basiq doesn't provide us last transactions (can't do for closed accounts),
10024
- // that's why balance won't be 0 (updated by basiq)
10023
+ // we don't check the current balance for basiq accounts, because basiq doesn't provide us last transactions (can't do for closed accounts),
10024
+ // that's why the balance won't be 0 (updated by basiq)
10025
10025
  if (shouldPayoutLoanAccount && this.isManual()) {
10026
10026
  return this.currentBalance === 0;
10027
10027
  }
@@ -22702,10 +22702,8 @@ class BasReportForm extends AbstractForm {
22702
22702
  // prefill income/expense data based on transactions/depreciations filtered by specified date
22703
22703
  combineLatest([this.get('dateFrom').valueChanges, this.get('dateTo').valueChanges])
22704
22704
  .subscribe(([dateFrom, dateTo]) => {
22705
- const from = clone(dateFrom).setHours(0, 0, 0);
22706
- const to = clone(dateTo).setHours(23, 59, 59);
22707
- const filteredTransactions = transactions.filterByRange('date', from, to);
22708
- const filteredDepreciations = depreciations.filterByRange('date', from, to);
22705
+ const filteredTransactions = transactions.filterByRange('date', dateFrom, dateTo);
22706
+ const filteredDepreciations = depreciations.filterByRange('date', dateFrom, dateTo);
22709
22707
  const incomeTransactions = filteredTransactions.getIncomeTransactions();
22710
22708
  const expenseTransactions = new TransactionCollection(filteredTransactions.getExpenseTransactions().toArray(), filteredDepreciations.toArray());
22711
22709
  // all sole income claimed as 100%