taxtank-core 2.0.77 → 2.0.79

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.
@@ -4597,10 +4597,6 @@ __decorate([
4597
4597
  class ChartSerie {
4598
4598
  }
4599
4599
 
4600
- /**
4601
- * Chart data class
4602
- * @TODO consider rename to ChartSerie
4603
- */
4604
4600
  class ChartData {
4605
4601
  }
4606
4602
  __decorate([
@@ -8509,11 +8505,11 @@ const REPORTS = {
8509
8505
  routerLink: './net-assets',
8510
8506
  },
8511
8507
  // @TODO TT-4522
8512
- {
8513
- title: 'Variance Report',
8514
- description: 'Variance Report.',
8515
- routerLink: './budget-variance',
8516
- },
8508
+ // {
8509
+ // title: 'Variance Report',
8510
+ // description: 'Variance Report.',
8511
+ // routerLink: './budget-variance',
8512
+ // },
8517
8513
  ],
8518
8514
  [UserRolesEnum$1.WORK_TANK]: [
8519
8515
  {
@@ -9285,7 +9281,7 @@ class BestVehicleLogbookCollection extends VehicleLogbookCollection {
9285
9281
  if (!(logbooks instanceof VehicleLogbookCollection)) {
9286
9282
  logbooks = new VehicleLogbookCollection(logbooks);
9287
9283
  }
9288
- return this.periodDuration <= (logbooks.last.date.getTime() - logbooks.first.date.getTime());
9284
+ return this.periodDuration < (logbooks.last.date.getTime() - logbooks.first.date.getTime());
9289
9285
  }
9290
9286
  // get list of date ranges for each of passed logbook
9291
9287
  static getPeriods(logbooks) {
@@ -11052,6 +11048,15 @@ class AppEvent2 {
11052
11048
  * https://primefaces.github.io/primefaces/jsdocs/classes/node_modules__fullcalendar_common_main.EventApi.html#extendedProps
11053
11049
  */
11054
11050
  class CalendarEvent {
11051
+ constructor() {
11052
+ this.today = moment().startOf('day');
11053
+ }
11054
+ get isOverdue() {
11055
+ return moment(this.date).isBefore(this.today, 'day');
11056
+ }
11057
+ get isUpcoming() {
11058
+ return moment(this.date).isAfter(this.today, 'day');
11059
+ }
11055
11060
  }
11056
11061
 
11057
11062
  /**
@@ -11520,7 +11525,8 @@ var SharesightPortfolioMessages;
11520
11525
  * - Iteratively adds the appropriate duration (week/month) until the end date is reached.
11521
11526
  * - Returns all occurrence dates including the start date and the last valid recurrence.
11522
11527
  */
11523
- function recurringDates(startDate, endDate = new FinancialYear().endDate, frequency) {
11528
+ function recurringDates(frequency, startDate, endDate) {
11529
+ endDate = endDate ?? new FinancialYear().endDate;
11524
11530
  let duration;
11525
11531
  let amount;
11526
11532
  switch (frequency) {
@@ -11561,7 +11567,7 @@ class BudgetRule extends BudgetRule$1 {
11561
11567
  return [];
11562
11568
  }
11563
11569
  const paymentDates = this.frequency
11564
- ? recurringDates(this.startDate, this.endDate, this.frequency)
11570
+ ? recurringDates(this.frequency, this.startDate, this.endDate)
11565
11571
  : [this.startDate];
11566
11572
  return paymentDates.map((date) => plainToClass(MoneyCalendarEvent, {
11567
11573
  date: date,
@@ -11569,7 +11575,7 @@ class BudgetRule extends BudgetRule$1 {
11569
11575
  extendedProps: {
11570
11576
  id: this.id,
11571
11577
  class: BudgetRule.className,
11572
- amount: this.amount,
11578
+ amount: this.chartAccounts.isExpense() ? -this.amount : this.amount,
11573
11579
  isIncome: this.chartAccounts.isIncome(),
11574
11580
  isExpense: this.chartAccounts.isExpense(),
11575
11581
  isProperty: this.chartAccounts.isPropertyTank(),
@@ -11831,7 +11837,7 @@ class FinancialGoal extends ObservableModel {
11831
11837
  if (!this.inCalendar || this.isPropertyType()) {
11832
11838
  return [];
11833
11839
  }
11834
- const paymentDates = recurringDates(this.startDate, this.endDate, this.paymentFrequency);
11840
+ const paymentDates = recurringDates(this.paymentFrequency, this.startDate, this.endDate);
11835
11841
  return paymentDates.map(date => plainToClass(MoneyCalendarEvent, {
11836
11842
  title: this.name,
11837
11843
  date: date,