taxtank-core 1.0.20 → 1.0.22

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.
@@ -1620,8 +1620,8 @@ class FinancialYear {
1620
1620
  return +localStorage.getItem('financialYear');
1621
1621
  }
1622
1622
  constructor(date) {
1623
- this.yearStartDate = '-07-01T00:00:00Z';
1624
- this.yearEndDate = '-06-30T23:59:59Z';
1623
+ this.yearStartDate = '-07-01 00:00:00';
1624
+ this.yearEndDate = '-06-30 23:59:59';
1625
1625
  if (date) {
1626
1626
  this.year = date instanceof Date ? FinancialYear.toFinYear(date) : date;
1627
1627
  }
@@ -6518,11 +6518,13 @@ class Transaction extends Transaction$1 {
6518
6518
  setParent(transaction) {
6519
6519
  this.description = this.chartAccounts.name;
6520
6520
  this.date = transaction.date;
6521
- this.claimPercent = transaction.claimPercent;
6522
6521
  this.property = transaction.property;
6523
6522
  this.loan = transaction.loan;
6524
6523
  this.incomeSource = transaction.incomeSource;
6525
6524
  this.business = transaction.business;
6525
+ if (this.claimPercent > 0) {
6526
+ this.claimPercent = transaction.claimPercent;
6527
+ }
6526
6528
  }
6527
6529
  isEditable() {
6528
6530
  return !ChartAccounts.systemList.includes(this.chartAccounts.id);
@@ -16492,6 +16494,7 @@ class UserService extends RestService$1 {
16492
16494
  localStorage.setItem('userId', this.getCacheFirst().id.toString());
16493
16495
  localStorage.setItem('financialYear', this.getCacheFirst().financialYear.toString());
16494
16496
  localStorage.setItem('roles', JSON.stringify(this.getCacheFirst().roles));
16497
+ localStorage.setItem('timezone', JSON.stringify(this.getCacheFirst().clientDetails.timezone));
16495
16498
  return users;
16496
16499
  }));
16497
16500
  }
@@ -22658,9 +22661,10 @@ class BasReportForm extends AbstractForm {
22658
22661
  // prefill income/expense data based on transactions/depreciations filtered by specified date
22659
22662
  combineLatest([this.get('dateFrom').valueChanges, this.get('dateTo').valueChanges])
22660
22663
  .subscribe(([dateFrom, dateTo]) => {
22661
- // const from = clone(dateFrom).setHours(0,0,0,0);
22662
- const filteredTransactions = transactions.filterByRange('date', dateFrom, dateTo);
22663
- const filteredDepreciations = depreciations.filterByRange('date', dateFrom, dateTo);
22664
+ const from = clone(dateFrom).setHours(0, 0, 0);
22665
+ const to = clone(dateTo).setHours(23, 59, 59);
22666
+ const filteredTransactions = transactions.filterByRange('date', from, to);
22667
+ const filteredDepreciations = depreciations.filterByRange('date', from, to);
22664
22668
  const incomeTransactions = filteredTransactions.getIncomeTransactions();
22665
22669
  const expenseTransactions = new TransactionCollection(filteredTransactions.getExpenseTransactions().toArray(), filteredDepreciations.toArray());
22666
22670
  // all sole income claimed as 100%