law-common 10.13.1-beta.2 → 10.13.1-beta.3
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.
|
@@ -24,6 +24,7 @@ export interface IBillingEntity extends IAuditColumnEntity {
|
|
|
24
24
|
invoicePdfUrl?: string | null;
|
|
25
25
|
invoiceContactName: string;
|
|
26
26
|
bankId: number;
|
|
27
|
+
conversionRate?: number;
|
|
27
28
|
}
|
|
28
29
|
export interface IBillingEntityFilterDto extends IEntityFilterData<IBillingEntity> {
|
|
29
30
|
}
|
|
@@ -98,8 +98,8 @@ class DateCodeModel {
|
|
|
98
98
|
}
|
|
99
99
|
const dateRange = startModel.getRange(endModel);
|
|
100
100
|
const excludeDayPredicates = (dateModel) => !dateModel.isDayPresent(excludeDays);
|
|
101
|
-
const excludeDatePredicates = (dateModel) => !excludeDateCodes.some(d => d.isSame(dateModel));
|
|
102
|
-
return dateRange.filter((dateModel => excludeDayPredicates(dateModel) && excludeDatePredicates(dateModel))
|
|
101
|
+
const excludeDatePredicates = (dateModel) => !excludeDateCodes.some((d) => d.isSame(dateModel));
|
|
102
|
+
return dateRange.filter((dateModel) => excludeDayPredicates(dateModel) && excludeDatePredicates(dateModel)).length;
|
|
103
103
|
}
|
|
104
104
|
static getByPredicates(models, includePredicates, excludePredicates) {
|
|
105
105
|
return models.filter((model) => includePredicates.every((predicate) => predicate(model)) &&
|
|
@@ -209,5 +209,10 @@ class DateCodeModel {
|
|
|
209
209
|
billDateIST.setHours(nowIST.getHours(), nowIST.getMinutes(), nowIST.getSeconds(), nowIST.getMilliseconds());
|
|
210
210
|
return billDateIST;
|
|
211
211
|
}
|
|
212
|
+
static getDaysInCurrentMonth() {
|
|
213
|
+
const today = new Date();
|
|
214
|
+
const lastDay = (0, date_fns_1.lastDayOfMonth)(today); // Gives last day of current month
|
|
215
|
+
return lastDay.getDate(); // Number of days in that month
|
|
216
|
+
}
|
|
212
217
|
}
|
|
213
218
|
exports.DateCodeModel = DateCodeModel;
|