law-common 11.3.13-beta.2 → 11.3.15-beta.0
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.
- package/README.md +1 -1
- package/dist/src/api/index.d.ts +0 -4
- package/dist/src/api/index.js +0 -4
- package/dist/src/entities/enums/configuration-key.enum.d.ts +4 -0
- package/dist/src/entities/enums/configuration-key.enum.js +7 -0
- package/dist/src/entities/enums/cron-jobs-name.enum.d.ts +3 -0
- package/dist/src/entities/enums/cron-jobs-name.enum.js +3 -0
- package/dist/src/entities/index.d.ts +0 -9
- package/dist/src/entities/index.js +0 -9
- package/dist/src/entities/interface/entity.utils.interface.d.ts +3 -9
- package/dist/src/entities/interface/entity.utils.interface.js +0 -2
- package/dist/src/entities/model/billing.entity.model.js +5 -5
- package/dist/src/entities/model/entity.model.interface.js +0 -4
- package/dist/src/entities/model/reimbursement-expense.entity.model.d.ts +5 -1
- package/dist/src/entities/model/reimbursement-expense.entity.model.js +18 -0
- package/dist/src/entities/model/tds_rate.entity.model.autocode.js +1 -225
- package/dist/src/entities/model/tds_rate.entity.model.d.ts +1 -7
- package/dist/src/entities/model/tds_rate.entity.model.js +0 -18
- package/dist/src/entities/model/timesheet.entity.model.d.ts +1 -0
- package/dist/src/entities/model/timesheet.entity.model.js +4 -0
- package/dist/src/entities/model/vendor_invoice.entity.model.d.ts +1 -8
- package/dist/src/entities/model/vendor_invoice.entity.model.js +0 -9
- package/dist/src/enums/error.key.enum.d.ts +1 -2
- package/dist/src/enums/error.key.enum.js +0 -1
- package/package.json +47 -50
- package/dist/src/api/interface/vendor_tds_challan.create.dto.interface.d.ts +0 -5
- package/dist/src/api/interface/vendor_tds_challan.create.dto.interface.js +0 -2
- package/dist/src/api/interface/vendor_tds_challan.update.dto.interface.d.ts +0 -17
- package/dist/src/api/interface/vendor_tds_challan.update.dto.interface.js +0 -17
- package/dist/src/api/interface/vendor_tds_liability.create.dto.interface.d.ts +0 -5
- package/dist/src/api/interface/vendor_tds_liability.create.dto.interface.js +0 -2
- package/dist/src/api/interface/vendor_tds_liability.update.dto.interface.d.ts +0 -22
- package/dist/src/api/interface/vendor_tds_liability.update.dto.interface.js +0 -14
- package/dist/src/entities/enums/vendor_tds_challan_status_enum.d.ts +0 -5
- package/dist/src/entities/enums/vendor_tds_challan_status_enum.js +0 -9
- package/dist/src/entities/enums/vendor_tds_liability_paid_status_enum.d.ts +0 -4
- package/dist/src/entities/enums/vendor_tds_liability_paid_status_enum.js +0 -8
- package/dist/src/entities/enums/vendor_tds_liability_status_enum.d.ts +0 -5
- package/dist/src/entities/enums/vendor_tds_liability_status_enum.js +0 -9
- package/dist/src/entities/flow-configs/vendor_tds_challan_flow.config.d.ts +0 -6
- package/dist/src/entities/flow-configs/vendor_tds_challan_flow.config.js +0 -70
- package/dist/src/entities/flow-configs/vendor_tds_liability_flow.config.d.ts +0 -13
- package/dist/src/entities/flow-configs/vendor_tds_liability_flow.config.js +0 -125
- package/dist/src/entities/interface/vendor_tds_challan.entity.interface.d.ts +0 -15
- package/dist/src/entities/interface/vendor_tds_challan.entity.interface.js +0 -2
- package/dist/src/entities/interface/vendor_tds_liability.entity.interface.d.ts +0 -15
- package/dist/src/entities/interface/vendor_tds_liability.entity.interface.js +0 -2
- package/dist/src/entities/model/vendor_tds_challan.entity.model.d.ts +0 -68
- package/dist/src/entities/model/vendor_tds_challan.entity.model.js +0 -251
- package/dist/src/entities/model/vendor_tds_liability.entity.model.d.ts +0 -66
- package/dist/src/entities/model/vendor_tds_liability.entity.model.js +0 -222
package/README.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
# law-common
|
|
1
|
+
# law-common
|
package/dist/src/api/index.d.ts
CHANGED
|
@@ -105,7 +105,3 @@ export * from "./interface/vendor_invoice_payment.create.dto.interface";
|
|
|
105
105
|
export * from "./interface/vendor_invoice_payment.update.dto.interface";
|
|
106
106
|
export * from "./interface/leave_approval.create.dto.interface";
|
|
107
107
|
export * from "./interface/leave_approval.update.dto.interface";
|
|
108
|
-
export * from "./interface/vendor_tds_liability.create.dto.interface";
|
|
109
|
-
export * from "./interface/vendor_tds_liability.update.dto.interface";
|
|
110
|
-
export * from "./interface/vendor_tds_challan.create.dto.interface";
|
|
111
|
-
export * from "./interface/vendor_tds_challan.update.dto.interface";
|
package/dist/src/api/index.js
CHANGED
|
@@ -125,7 +125,3 @@ __exportStar(require("./interface/vendor_invoice_payment.create.dto.interface"),
|
|
|
125
125
|
__exportStar(require("./interface/vendor_invoice_payment.update.dto.interface"), exports);
|
|
126
126
|
__exportStar(require("./interface/leave_approval.create.dto.interface"), exports);
|
|
127
127
|
__exportStar(require("./interface/leave_approval.update.dto.interface"), exports);
|
|
128
|
-
__exportStar(require("./interface/vendor_tds_liability.create.dto.interface"), exports);
|
|
129
|
-
__exportStar(require("./interface/vendor_tds_liability.update.dto.interface"), exports);
|
|
130
|
-
__exportStar(require("./interface/vendor_tds_challan.create.dto.interface"), exports);
|
|
131
|
-
__exportStar(require("./interface/vendor_tds_challan.update.dto.interface"), exports);
|
|
@@ -8,6 +8,10 @@ export declare enum ConfigurationKeyEnum {
|
|
|
8
8
|
ORGANIZATION_BILLING_OVERDUE_THRESHOLD = "organization_billing_overdue_threshold",
|
|
9
9
|
PROJECT_ENTITY_USAGE_NOTIFICATION_SENT_PERCENTAGE_RESET = "projectEntityUsageNotificationSentPercentageReset",
|
|
10
10
|
LEAVE_ESCALATION = "leaveEscalation",
|
|
11
|
+
BOARD_MEMBER_EMAIL = "boardMemberEmail",
|
|
12
|
+
WEEKLY_ESCALATED_LEAVE_REMINDER = "weeklyEscalatedLeaveReminder",
|
|
13
|
+
WEEKLY_ESCALATED_REIMBURSEMENT_REMINDER = "weeklyEscalatedReimbursementReminder",
|
|
14
|
+
TIMESHEET_WEEKLY_REMINDER = "timesheetWeeklyReminder",
|
|
11
15
|
TIMESHEET_AUTO_CLASSIFICATION = "timesheetAutoClassification",
|
|
12
16
|
TIMESHEET_CLASSIFICATION_NOTIFICATION = "timesheetClassificationNotification",
|
|
13
17
|
TIMESHEET_CLASSIFICATION_BUFFER_DAYS = "timesheetClassificationBufferDays",
|
|
@@ -14,6 +14,10 @@ var ConfigurationKeyEnum;
|
|
|
14
14
|
ConfigurationKeyEnum["ORGANIZATION_BILLING_OVERDUE_THRESHOLD"] = "organization_billing_overdue_threshold";
|
|
15
15
|
ConfigurationKeyEnum["PROJECT_ENTITY_USAGE_NOTIFICATION_SENT_PERCENTAGE_RESET"] = "projectEntityUsageNotificationSentPercentageReset";
|
|
16
16
|
ConfigurationKeyEnum["LEAVE_ESCALATION"] = "leaveEscalation";
|
|
17
|
+
ConfigurationKeyEnum["BOARD_MEMBER_EMAIL"] = "boardMemberEmail";
|
|
18
|
+
ConfigurationKeyEnum["WEEKLY_ESCALATED_LEAVE_REMINDER"] = "weeklyEscalatedLeaveReminder";
|
|
19
|
+
ConfigurationKeyEnum["WEEKLY_ESCALATED_REIMBURSEMENT_REMINDER"] = "weeklyEscalatedReimbursementReminder";
|
|
20
|
+
ConfigurationKeyEnum["TIMESHEET_WEEKLY_REMINDER"] = "timesheetWeeklyReminder";
|
|
17
21
|
ConfigurationKeyEnum["TIMESHEET_AUTO_CLASSIFICATION"] = "timesheetAutoClassification";
|
|
18
22
|
ConfigurationKeyEnum["TIMESHEET_CLASSIFICATION_NOTIFICATION"] = "timesheetClassificationNotification";
|
|
19
23
|
ConfigurationKeyEnum["TIMESHEET_CLASSIFICATION_BUFFER_DAYS"] = "timesheetClassificationBufferDays";
|
|
@@ -45,6 +49,9 @@ var ConfigurationKeyEnum;
|
|
|
45
49
|
[ConfigurationKeyEnum.PENDING_APPROVAL_TIMESHEET_REMINDER]: cron_jobs_name_enum_1.CronJobNames.PENDING_APPROVAL_TIMESHEET_REMINDER,
|
|
46
50
|
[ConfigurationKeyEnum.PROJECT_ENTITY_USAGE_NOTIFICATION_SENT_PERCENTAGE_RESET]: cron_jobs_name_enum_1.CronJobNames.PROJECT_ENTITY_USAGE_NOTIFICATION_SENT_PERCENTAGE_RESET,
|
|
47
51
|
[ConfigurationKeyEnum.LEAVE_ESCALATION]: cron_jobs_name_enum_1.CronJobNames.LEAVE_ESCALATION,
|
|
52
|
+
[ConfigurationKeyEnum.WEEKLY_ESCALATED_LEAVE_REMINDER]: cron_jobs_name_enum_1.CronJobNames.WEEKLY_ESCALATED_LEAVE_REMINDER,
|
|
53
|
+
[ConfigurationKeyEnum.WEEKLY_ESCALATED_REIMBURSEMENT_REMINDER]: cron_jobs_name_enum_1.CronJobNames.WEEKLY_ESCALATED_REIMBURSEMENT_REMINDER,
|
|
54
|
+
[ConfigurationKeyEnum.TIMESHEET_WEEKLY_REMINDER]: cron_jobs_name_enum_1.CronJobNames.TIMESHEET_WEEKLY_REMINDER,
|
|
48
55
|
[ConfigurationKeyEnum.TIMESHEET_AUTO_CLASSIFICATION]: cron_jobs_name_enum_1.CronJobNames.TIMESHEET_AUTO_CLASSIFICATION,
|
|
49
56
|
[ConfigurationKeyEnum.TIMESHEET_CLASSIFICATION_NOTIFICATION]: cron_jobs_name_enum_1.CronJobNames.TIMESHEET_CLASSIFICATION_NOTIFICATION,
|
|
50
57
|
};
|
|
@@ -2,6 +2,9 @@ export declare enum CronJobNames {
|
|
|
2
2
|
PENDING_APPROVAL_TIMESHEET_REMINDER = "pending_approval_timesheet_reminder",
|
|
3
3
|
PROJECT_ENTITY_USAGE_NOTIFICATION_SENT_PERCENTAGE_RESET = "project_entity_usage_notification_sent_percentage_reset",
|
|
4
4
|
LEAVE_ESCALATION = "leave_escalation",
|
|
5
|
+
WEEKLY_ESCALATED_LEAVE_REMINDER = "weekly_escalated_leave_reminder",
|
|
6
|
+
WEEKLY_ESCALATED_REIMBURSEMENT_REMINDER = "weekly_escalated_reimbursement_reminder",
|
|
7
|
+
TIMESHEET_WEEKLY_REMINDER = "timesheet_weekly_reminder",
|
|
5
8
|
TIMESHEET_AUTO_CLASSIFICATION = "timesheet_auto_classification",
|
|
6
9
|
TIMESHEET_CLASSIFICATION_NOTIFICATION = "timesheet_classification_notification"
|
|
7
10
|
}
|
|
@@ -6,6 +6,9 @@ var CronJobNames;
|
|
|
6
6
|
CronJobNames["PENDING_APPROVAL_TIMESHEET_REMINDER"] = "pending_approval_timesheet_reminder";
|
|
7
7
|
CronJobNames["PROJECT_ENTITY_USAGE_NOTIFICATION_SENT_PERCENTAGE_RESET"] = "project_entity_usage_notification_sent_percentage_reset";
|
|
8
8
|
CronJobNames["LEAVE_ESCALATION"] = "leave_escalation";
|
|
9
|
+
CronJobNames["WEEKLY_ESCALATED_LEAVE_REMINDER"] = "weekly_escalated_leave_reminder";
|
|
10
|
+
CronJobNames["WEEKLY_ESCALATED_REIMBURSEMENT_REMINDER"] = "weekly_escalated_reimbursement_reminder";
|
|
11
|
+
CronJobNames["TIMESHEET_WEEKLY_REMINDER"] = "timesheet_weekly_reminder";
|
|
9
12
|
CronJobNames["TIMESHEET_AUTO_CLASSIFICATION"] = "timesheet_auto_classification";
|
|
10
13
|
CronJobNames["TIMESHEET_CLASSIFICATION_NOTIFICATION"] = "timesheet_classification_notification";
|
|
11
14
|
})(CronJobNames || (exports.CronJobNames = CronJobNames = {}));
|
|
@@ -231,12 +231,3 @@ export * from "./enums/leave_approval_status_enum";
|
|
|
231
231
|
export * from "./flow-configs/leave_approval_flow.config";
|
|
232
232
|
export * from "./interface/leave_approval.entity.interface";
|
|
233
233
|
export * from "./model/leave_approval.entity.model";
|
|
234
|
-
export * from "./enums/vendor_tds_liability_paid_status_enum";
|
|
235
|
-
export * from "./enums/vendor_tds_liability_status_enum";
|
|
236
|
-
export * from "./interface/vendor_tds_liability.entity.interface";
|
|
237
|
-
export * from "./model/vendor_tds_liability.entity.model";
|
|
238
|
-
export * from "./flow-configs/vendor_tds_liability_flow.config";
|
|
239
|
-
export * from "./enums/vendor_tds_challan_status_enum";
|
|
240
|
-
export * from "./interface/vendor_tds_challan.entity.interface";
|
|
241
|
-
export * from "./model/vendor_tds_challan.entity.model";
|
|
242
|
-
export * from "./flow-configs/vendor_tds_challan_flow.config";
|
|
@@ -247,12 +247,3 @@ __exportStar(require("./enums/leave_approval_status_enum"), exports);
|
|
|
247
247
|
__exportStar(require("./flow-configs/leave_approval_flow.config"), exports);
|
|
248
248
|
__exportStar(require("./interface/leave_approval.entity.interface"), exports);
|
|
249
249
|
__exportStar(require("./model/leave_approval.entity.model"), exports);
|
|
250
|
-
__exportStar(require("./enums/vendor_tds_liability_paid_status_enum"), exports);
|
|
251
|
-
__exportStar(require("./enums/vendor_tds_liability_status_enum"), exports);
|
|
252
|
-
__exportStar(require("./interface/vendor_tds_liability.entity.interface"), exports);
|
|
253
|
-
__exportStar(require("./model/vendor_tds_liability.entity.model"), exports);
|
|
254
|
-
__exportStar(require("./flow-configs/vendor_tds_liability_flow.config"), exports);
|
|
255
|
-
__exportStar(require("./enums/vendor_tds_challan_status_enum"), exports);
|
|
256
|
-
__exportStar(require("./interface/vendor_tds_challan.entity.interface"), exports);
|
|
257
|
-
__exportStar(require("./model/vendor_tds_challan.entity.model"), exports);
|
|
258
|
-
__exportStar(require("./flow-configs/vendor_tds_challan_flow.config"), exports);
|
|
@@ -69,8 +69,6 @@ import { VendorInvoiceHistoryEntityModel } from "../model/vendor_invoice_history
|
|
|
69
69
|
import { VendorInvoiceItemEntityModel } from "../model/vendor_invoice_item.entity.model";
|
|
70
70
|
import { VendorInvoiceItemHistoryEntityModel } from "../model/vendor_invoice_item_history.entity.model";
|
|
71
71
|
import { VendorInvoicePaymentEntityModel } from "../model/vendor_invoice_payment.entity.model";
|
|
72
|
-
import { VendorTdsChallanEntityModel } from "../model/vendor_tds_challan.entity.model";
|
|
73
|
-
import { VendorTdsLiabilityEntityModel } from "../model/vendor_tds_liability.entity.model";
|
|
74
72
|
import { VoucherTypeEntityModel } from "../model/voucher_type.entity.model";
|
|
75
73
|
import { WebsiteLeadEntityModel } from "../model/website_lead.entity.model";
|
|
76
74
|
import { WebsiteNewsletterSubscriptionEntityModel } from "../model/website_newsletter_subscription.entity.model";
|
|
@@ -138,8 +136,6 @@ import { IVendorEntity } from "./vendor.entity.interface";
|
|
|
138
136
|
import { IVendorInvoiceEntity } from "./vendor_invoice.entity.interface";
|
|
139
137
|
import { IVendorInvoiceItemEntity } from "./vendor_invoice_item.entity.interface";
|
|
140
138
|
import { IVendorInvoicePaymentEntity } from "./vendor_invoice_payment.entity.interface";
|
|
141
|
-
import { IVendorTdsChallanEntity } from "./vendor_tds_challan.entity.interface";
|
|
142
|
-
import { IVendorTdsLiabilityEntity } from "./vendor_tds_liability.entity.interface";
|
|
143
139
|
import { IVendorInvoiceHistoryEntity } from "./vendot-invoice-history.entity.interface";
|
|
144
140
|
import { IVoucherTypeEntity } from "./voucher_type.entity.interface";
|
|
145
141
|
import { IWebsiteLeadEntity } from "./website_lead.entity.interface";
|
|
@@ -253,9 +249,7 @@ export declare enum EntityEnum {
|
|
|
253
249
|
CLIENT_QUOTE_RATE = "client_quote_rate",
|
|
254
250
|
ENTITY_HISTORY = "entity_history",
|
|
255
251
|
VENDOR_INVOICE_PAYMENT = "vendor_invoice_payment",
|
|
256
|
-
LEAVE_APPROVAL = "leave_approval"
|
|
257
|
-
VENDOR_TDS_LIABILITY = "vendor_tds_liability",
|
|
258
|
-
VENDOR_TDS_CHALLAN = "vendor_tds_challan"
|
|
252
|
+
LEAVE_APPROVAL = "leave_approval"
|
|
259
253
|
}
|
|
260
254
|
export type EntityRelations = {
|
|
261
255
|
[K in EntityEnum | VirtualEntityEnum]: K;
|
|
@@ -280,7 +274,7 @@ export type IBaseEntityApiResponse<T> = {
|
|
|
280
274
|
[key in EntityEnum | VirtualEntityEnum]?: AggregationFields<EnumToModel<key>>[];
|
|
281
275
|
};
|
|
282
276
|
};
|
|
283
|
-
export type EnumEntityType<T extends EntityEnum | VirtualEntityEnum> = (T extends EntityEnum.BILLING ? IBillingEntity : T extends EntityEnum.BILLING_HISTORY ? IBillingHistoryEntity : T extends EntityEnum.MOVING_TIMESHEET ? IMovingTimesheetEntity : T extends EntityEnum.BILLING_TIMESHEET ? IBillingTimesheetEntity : T extends EntityEnum.BILLING_REIMBURSEMENT_EXPENSE ? IBillingReimbursementExpenseEntity : T extends EntityEnum.BILLING_TIMESHEET_HISTORY ? IBillingTimesheetHistoryEntity : T extends EntityEnum.BILLING_REIMBURESMENT_EXPENSE_HISTORY ? IBillingReimbursementExpenseHistoryEntity : T extends EntityEnum.TIMESHEET ? ITimesheetEntity : T extends EntityEnum.USER ? IUserEntity : T extends EntityEnum.PROJECT ? IProjectEntity : T extends EntityEnum.CLIENT ? IClientEntity : T extends EntityEnum.LEAVE ? ILeaveEntity : T extends EntityEnum.BANK ? IBankEntity : T extends EntityEnum.BILLING_TRANSACTION ? IBillingTransactionEntity : T extends EntityEnum.BILLING_TRANSACTION_HISTORY ? IBillingTransactionHistoryEntity : T extends EntityEnum.CLIENT_AFFILIATE ? IClientAffiliateEntity : T extends EntityEnum.CONFIGURATION ? IConfigurationEntity : T extends EntityEnum.HOLIDAY ? IHolidayEntity : T extends EntityEnum.HOLIDAY_LIST ? IHolidayListEntity : T extends EntityEnum.COUNTRY ? ICountryEntity : T extends EntityEnum.EXPENSE_TYPE ? IExpenseTypeEntity : T extends EntityEnum.INDUSTRY ? IIndustryEntity : T extends EntityEnum.INTERMEDIARY_BANK ? IIntermediaryBankEntity : T extends EntityEnum.OFFICE_LOCATION ? IOfficeLocationEntity : T extends EntityEnum.PERMISSION ? IPermissionEntity : T extends EntityEnum.ROLE ? IRoleEntity : T extends EntityEnum.TASK ? ITaskEntity : T extends EntityEnum.DESIGNATION ? IDesignationEntity : T extends EntityEnum.RATE ? IRateEntity : T extends EntityEnum.REIMBURSEMENT ? IReimbursementEntity : T extends EntityEnum.REIMBURSEMENT_EXPENSE ? IReimbursementExpenseEntity : T extends EntityEnum.REIMBURSEMENT_HISTORY ? IReimbursementHistoryEntity : T extends EntityEnum.WORK_FROM_HOME ? IWorkFromHomeEntity : T extends EntityEnum.ORGANIZATION ? IOrganizationEntity : T extends EntityEnum.PROJECT_USER_MAPPING ? IProjectUserMappingEntity : T extends EntityEnum.CLIENT_USER_MAPPING ? IClientUserMappingEntity : T extends EntityEnum.CLIENT_INTRODUCING_MAPPING ? IClientIntroducingMappingEntity : T extends EntityEnum.TO_DO_LIST ? IToDoListEntity : T extends EntityEnum.CRON_JOBS ? ICronJobsEntity : T extends EntityEnum.ROLE_PERMISSION_MAPPING ? IRolePermissionMappingEntity : T extends EntityEnum.BANK_HISTORY ? IBankHistoryEntity : T extends VirtualEntityEnum.LEAVE_COUNT ? ILeaveCountVirtualEntity : T extends EntityEnum.LEAVE_HISTORY ? ILeaveHistoryEntity : T extends EntityEnum.WORK_FROM_HOME_HISTORY ? IWorkFromHomeHistoryEntity : T extends EntityEnum.TIMESHEET_HISTORY ? ITimesheetHistoryEntity : T extends EntityEnum.ADDRESS_BOOK ? IAddressBookEntity : T extends EntityEnum.STATE ? IStateEntity : T extends EntityEnum.GST_RATE ? IGstRateEntity : T extends EntityEnum.ORGANIZATION_TYPE ? IOrganizationTypeEntity : T extends EntityEnum.TDS_RATE ? ITdsRateEntity : T extends EntityEnum.ORGANIZATION_TYPE_TDS_RATE_MAPPING ? IOrganizationTypeTdsRateMappingEntity : T extends EntityEnum.VOUCHER_TYPE ? IVoucherTypeEntity : T extends EntityEnum.TDS_RATE_VOUCHER_TYPE_MAPPING ? ITdsRateVoucherTypeMappingEntity : T extends EntityEnum.EXPENSE_HEAD ? IExpenseHeadEntity : T extends EntityEnum.DOCUMENT_UPLOAD ? IDocumentUploadEntity : T extends EntityEnum.VENDOR ? IVendorEntity : T extends EntityEnum.VENDOR_INVOICE ? IVendorInvoiceEntity : T extends EntityEnum.VENDOR_INVOICE_HISTORY ? IVendorInvoiceHistoryEntity : T extends EntityEnum.VENDOR_INVOICE_HISTORY ? IVendorInvoiceHistoryEntity : T extends EntityEnum.VENDOR_INVOICE_ITEM ? IVendorInvoiceItemEntity : T extends EntityEnum.VENDOR_INVOICE_ITEM_HISTORY ? IVendorInvoiceItemHistoryEntity : T extends EntityEnum.VENDOR_HISTORY ? IVendorHistoryEntity : T extends EntityEnum.WEBSITE_LEAD ? IWebsiteLeadEntity : T extends EntityEnum.WEBSITE_NEWSLETTER_SUBSCRIPTION ? IWebsiteNewsletterSubscriptionEntity : T extends EntityEnum.CLIENT_QUOTE ? IClientQuoteEntity : T extends EntityEnum.CLIENT_QUOTE_RATE ? IClientQuoteRateEntity : T extends EntityEnum.BILLING_PROFILE ? IBillingProfileEntity : T extends EntityEnum.PROJECT_REVENUE_SPLIT_MAPPING ? IProjectRevenueSplitMappingEntity : T extends EntityEnum.VENDOR_INVOICE_ITEM_HISTORY ? IVendorInvoiceItemHistoryEntity : T extends EntityEnum.VENDOR_HISTORY ? IVendorHistoryEntity : T extends EntityEnum.WEBSITE_LEAD ? IWebsiteLeadEntity : T extends EntityEnum.WEBSITE_NEWSLETTER_SUBSCRIPTION ? IWebsiteNewsletterSubscriptionEntity : T extends EntityEnum.CLIENT_QUOTE ? IClientQuoteEntity : T extends EntityEnum.CLIENT_QUOTE_RATE ? IClientQuoteRateEntity : T extends EntityEnum.ENTITY_HISTORY ? IEntityHistoryEntity : T extends EntityEnum.LEAVE_APPROVAL ? ILeaveApprovalEntity : T extends EntityEnum.VENDOR_INVOICE_PAYMENT ? IVendorInvoicePaymentEntity :
|
|
277
|
+
export type EnumEntityType<T extends EntityEnum | VirtualEntityEnum> = (T extends EntityEnum.BILLING ? IBillingEntity : T extends EntityEnum.BILLING_HISTORY ? IBillingHistoryEntity : T extends EntityEnum.MOVING_TIMESHEET ? IMovingTimesheetEntity : T extends EntityEnum.BILLING_TIMESHEET ? IBillingTimesheetEntity : T extends EntityEnum.BILLING_REIMBURSEMENT_EXPENSE ? IBillingReimbursementExpenseEntity : T extends EntityEnum.BILLING_TIMESHEET_HISTORY ? IBillingTimesheetHistoryEntity : T extends EntityEnum.BILLING_REIMBURESMENT_EXPENSE_HISTORY ? IBillingReimbursementExpenseHistoryEntity : T extends EntityEnum.TIMESHEET ? ITimesheetEntity : T extends EntityEnum.USER ? IUserEntity : T extends EntityEnum.PROJECT ? IProjectEntity : T extends EntityEnum.CLIENT ? IClientEntity : T extends EntityEnum.LEAVE ? ILeaveEntity : T extends EntityEnum.BANK ? IBankEntity : T extends EntityEnum.BILLING_TRANSACTION ? IBillingTransactionEntity : T extends EntityEnum.BILLING_TRANSACTION_HISTORY ? IBillingTransactionHistoryEntity : T extends EntityEnum.CLIENT_AFFILIATE ? IClientAffiliateEntity : T extends EntityEnum.CONFIGURATION ? IConfigurationEntity : T extends EntityEnum.HOLIDAY ? IHolidayEntity : T extends EntityEnum.HOLIDAY_LIST ? IHolidayListEntity : T extends EntityEnum.COUNTRY ? ICountryEntity : T extends EntityEnum.EXPENSE_TYPE ? IExpenseTypeEntity : T extends EntityEnum.INDUSTRY ? IIndustryEntity : T extends EntityEnum.INTERMEDIARY_BANK ? IIntermediaryBankEntity : T extends EntityEnum.OFFICE_LOCATION ? IOfficeLocationEntity : T extends EntityEnum.PERMISSION ? IPermissionEntity : T extends EntityEnum.ROLE ? IRoleEntity : T extends EntityEnum.TASK ? ITaskEntity : T extends EntityEnum.DESIGNATION ? IDesignationEntity : T extends EntityEnum.RATE ? IRateEntity : T extends EntityEnum.REIMBURSEMENT ? IReimbursementEntity : T extends EntityEnum.REIMBURSEMENT_EXPENSE ? IReimbursementExpenseEntity : T extends EntityEnum.REIMBURSEMENT_HISTORY ? IReimbursementHistoryEntity : T extends EntityEnum.WORK_FROM_HOME ? IWorkFromHomeEntity : T extends EntityEnum.ORGANIZATION ? IOrganizationEntity : T extends EntityEnum.PROJECT_USER_MAPPING ? IProjectUserMappingEntity : T extends EntityEnum.CLIENT_USER_MAPPING ? IClientUserMappingEntity : T extends EntityEnum.CLIENT_INTRODUCING_MAPPING ? IClientIntroducingMappingEntity : T extends EntityEnum.TO_DO_LIST ? IToDoListEntity : T extends EntityEnum.CRON_JOBS ? ICronJobsEntity : T extends EntityEnum.ROLE_PERMISSION_MAPPING ? IRolePermissionMappingEntity : T extends EntityEnum.BANK_HISTORY ? IBankHistoryEntity : T extends VirtualEntityEnum.LEAVE_COUNT ? ILeaveCountVirtualEntity : T extends EntityEnum.LEAVE_HISTORY ? ILeaveHistoryEntity : T extends EntityEnum.WORK_FROM_HOME_HISTORY ? IWorkFromHomeHistoryEntity : T extends EntityEnum.TIMESHEET_HISTORY ? ITimesheetHistoryEntity : T extends EntityEnum.ADDRESS_BOOK ? IAddressBookEntity : T extends EntityEnum.STATE ? IStateEntity : T extends EntityEnum.GST_RATE ? IGstRateEntity : T extends EntityEnum.ORGANIZATION_TYPE ? IOrganizationTypeEntity : T extends EntityEnum.TDS_RATE ? ITdsRateEntity : T extends EntityEnum.ORGANIZATION_TYPE_TDS_RATE_MAPPING ? IOrganizationTypeTdsRateMappingEntity : T extends EntityEnum.VOUCHER_TYPE ? IVoucherTypeEntity : T extends EntityEnum.TDS_RATE_VOUCHER_TYPE_MAPPING ? ITdsRateVoucherTypeMappingEntity : T extends EntityEnum.EXPENSE_HEAD ? IExpenseHeadEntity : T extends EntityEnum.DOCUMENT_UPLOAD ? IDocumentUploadEntity : T extends EntityEnum.VENDOR ? IVendorEntity : T extends EntityEnum.VENDOR_INVOICE ? IVendorInvoiceEntity : T extends EntityEnum.VENDOR_INVOICE_HISTORY ? IVendorInvoiceHistoryEntity : T extends EntityEnum.VENDOR_INVOICE_HISTORY ? IVendorInvoiceHistoryEntity : T extends EntityEnum.VENDOR_INVOICE_ITEM ? IVendorInvoiceItemEntity : T extends EntityEnum.VENDOR_INVOICE_ITEM_HISTORY ? IVendorInvoiceItemHistoryEntity : T extends EntityEnum.VENDOR_HISTORY ? IVendorHistoryEntity : T extends EntityEnum.WEBSITE_LEAD ? IWebsiteLeadEntity : T extends EntityEnum.WEBSITE_NEWSLETTER_SUBSCRIPTION ? IWebsiteNewsletterSubscriptionEntity : T extends EntityEnum.CLIENT_QUOTE ? IClientQuoteEntity : T extends EntityEnum.CLIENT_QUOTE_RATE ? IClientQuoteRateEntity : T extends EntityEnum.BILLING_PROFILE ? IBillingProfileEntity : T extends EntityEnum.PROJECT_REVENUE_SPLIT_MAPPING ? IProjectRevenueSplitMappingEntity : T extends EntityEnum.VENDOR_INVOICE_ITEM_HISTORY ? IVendorInvoiceItemHistoryEntity : T extends EntityEnum.VENDOR_HISTORY ? IVendorHistoryEntity : T extends EntityEnum.WEBSITE_LEAD ? IWebsiteLeadEntity : T extends EntityEnum.WEBSITE_NEWSLETTER_SUBSCRIPTION ? IWebsiteNewsletterSubscriptionEntity : T extends EntityEnum.CLIENT_QUOTE ? IClientQuoteEntity : T extends EntityEnum.CLIENT_QUOTE_RATE ? IClientQuoteRateEntity : T extends EntityEnum.ENTITY_HISTORY ? IEntityHistoryEntity : T extends EntityEnum.LEAVE_APPROVAL ? ILeaveApprovalEntity : T extends EntityEnum.VENDOR_INVOICE_PAYMENT ? IVendorInvoicePaymentEntity : never) & {
|
|
284
278
|
id: number;
|
|
285
279
|
};
|
|
286
280
|
export type EntityRelationConfig<T extends EntityEnum | VirtualEntityEnum> = {
|
|
@@ -412,7 +406,7 @@ export declare enum VirtualEntityEnum {
|
|
|
412
406
|
}
|
|
413
407
|
export type IHistoryConstraintSearchResponse<T> = IBaseResponse<IHistoryEntitySearchByConstraintResponse<T>[]>;
|
|
414
408
|
export type IHistoryConstraintSearchServiceResponse<T> = IHistoryEntitySearchByConstraintResponse<T>[];
|
|
415
|
-
export type EnumToModel<T extends EntityEnum | VirtualEntityEnum> = T extends EntityEnum.BILLING ? BillingEntityModel : T extends EntityEnum.BILLING_HISTORY ? BillingHistoryEntityModel : T extends EntityEnum.CLIENT ? ClientEntityModel : T extends EntityEnum.INTERMEDIARY_BANK ? IntermediaryBankEntityModel : T extends EntityEnum.PROJECT ? ProjectEntityModel : T extends EntityEnum.PROJECT_USER_MAPPING ? ProjectUserMappingEntityModel : T extends EntityEnum.REIMBURSEMENT ? ReimbursementEntityModel : T extends EntityEnum.REIMBURSEMENT_EXPENSE ? ReimbursementExpenseEntityModel : T extends EntityEnum.BILLING_REIMBURSEMENT_EXPENSE ? BillingReimbursementExpneseEntityModel : T extends EntityEnum.BILLING_REIMBURESMENT_EXPENSE_HISTORY ? BillingReimbursementExpenseHistoryEntityModel : T extends EntityEnum.LEAVE ? LeaveEntityModel : T extends EntityEnum.WORK_FROM_HOME ? WorkFromHomeEntityModel : T extends EntityEnum.HOLIDAY ? HolidayEntityModel : T extends VirtualEntityEnum.LEAVE_COUNT ? LeaveCountVirtualEntityModel : T extends EntityEnum.CLIENT_AFFILIATE ? ClientAffiliateEntityModel : T extends EntityEnum.BANK ? BankEntityModel : T extends EntityEnum.CONFIGURATION ? ConfigurationEntityModel : T extends EntityEnum.TASK ? TaskEntityModel : T extends EntityEnum.BILLING_TIMESHEET ? BillingTimesheetEntityModel : T extends EntityEnum.BILLING_TIMESHEET_HISTORY ? BillingTimesheetHistoryEntityModel : T extends EntityEnum.TIMESHEET ? TimesheetEntityModel : T extends EntityEnum.MOVING_TIMESHEET ? MovingTimesheetEntityModel : T extends EntityEnum.TIMESHEET_HISTORY ? TimesheetHistoryEntityModel : T extends EntityEnum.COUNTRY ? CountryEntityModel : T extends EntityEnum.BILLING_TRANSACTION ? BillingTransactionEntityModel : T extends EntityEnum.BILLING_TRANSACTION_HISTORY ? BillingTransactionHistoryEntityModel : T extends EntityEnum.ADDRESS_BOOK ? AddressBookEntityModel : T extends EntityEnum.STATE ? StateEntityModel : T extends EntityEnum.GST_RATE ? GstRateEntityModel : T extends EntityEnum.ORGANIZATION_TYPE ? OrganizationTypeEntityModel : T extends EntityEnum.TDS_RATE ? TdsRateEntityModel : T extends EntityEnum.ORGANIZATION_TYPE_TDS_RATE_MAPPING ? OrganizationTypeTdsRateMappingEntityModel : T extends EntityEnum.VOUCHER_TYPE ? VoucherTypeEntityModel : T extends EntityEnum.TDS_RATE_VOUCHER_TYPE_MAPPING ? TdsRateVoucherTypeMappingEntityModel : T extends EntityEnum.ORGANIZATION ? OrganizationEntityModel : T extends EntityEnum.INDUSTRY ? IndustryEntityModel : T extends EntityEnum.EXPENSE_TYPE ? ExpenseTypeEntityModel : T extends EntityEnum.DESIGNATION ? DesignationEntityModel : T extends EntityEnum.RATE ? RateEntityModel : T extends EntityEnum.ROLE ? RoleEntityModel : T extends EntityEnum.ROLE_PERMISSION_MAPPING ? RolePermissionMappingEntityModel : T extends EntityEnum.PERMISSION ? PermissionEntityModel : T extends EntityEnum.EXPENSE_HEAD ? ExpenseHeadEntityModel : T extends EntityEnum.DOCUMENT_UPLOAD ? DocumentUploadEntityModel : T extends EntityEnum.VENDOR ? VendorEntityModel : T extends EntityEnum.VENDOR_INVOICE ? VendorInvoiceEntityModel : T extends EntityEnum.VENDOR_INVOICE_HISTORY ? VendorInvoiceHistoryEntityModel : T extends EntityEnum.OFFICE_LOCATION ? OfficeLocationEntityModel : T extends EntityEnum.VENDOR_INVOICE_ITEM ? VendorInvoiceItemEntityModel : T extends EntityEnum.VENDOR_INVOICE_ITEM_HISTORY ? VendorInvoiceItemHistoryEntityModel : T extends EntityEnum.VENDOR_HISTORY ? VendorHistoryEntityModel : T extends EntityEnum.WEBSITE_LEAD ? WebsiteLeadEntityModel : T extends EntityEnum.WEBSITE_NEWSLETTER_SUBSCRIPTION ? WebsiteNewsletterSubscriptionEntityModel : T extends EntityEnum.WORK_FROM_HOME_HISTORY ? WorkFromHomeHistoryEntityModel : T extends EntityEnum.LEAVE_HISTORY ? LeaveHistoryEntityModel : T extends EntityEnum.BANK_HISTORY ? BankHistoryEntityModel : T extends EntityEnum.REIMBURSEMENT_HISTORY ? ReimbursementHistoryEntityModel : T extends EntityEnum.CLIENT_USER_MAPPING ? ClientUserMappingEntityModel : T extends EntityEnum.CLIENT_INTRODUCING_MAPPING ? ClientIntroducingMappingEntityModel : T extends EntityEnum.HOLIDAY_LIST ? HolidayListEntityModel : T extends EntityEnum.CRON_JOBS ? CronJobsEntityModel : T extends EntityEnum.TO_DO_LIST ? ToDoListEntityModel : T extends EntityEnum.CLIENT_QUOTE ? ClientQuoteEntityModel : T extends EntityEnum.CLIENT_QUOTE_RATE ? ClientQuoteRateEntityModel : T extends EntityEnum.BILLING_PROFILE ? BillingProfileEntityModel : T extends EntityEnum.PROJECT_REVENUE_SPLIT_MAPPING ? ProjectRevenueSplitMappingEntityModel : T extends EntityEnum.WEBSITE_LEAD ? WebsiteLeadEntityModel : T extends EntityEnum.WEBSITE_NEWSLETTER_SUBSCRIPTION ? WebsiteNewsletterSubscriptionEntityModel : T extends EntityEnum.CLIENT_QUOTE ? ClientQuoteEntityModel : T extends EntityEnum.CLIENT_QUOTE_RATE ? ClientQuoteRateEntityModel : T extends EntityEnum.DESIGNATION ? DesignationEntityModel : T extends EntityEnum.RATE ? RateEntityModel : T extends EntityEnum.ENTITY_HISTORY ? EntityHistoryEntityModel : T extends EntityEnum.LEAVE_APPROVAL ? LeaveApprovalEntityModel : T extends EntityEnum.VENDOR_INVOICE_PAYMENT ? VendorInvoicePaymentEntityModel :
|
|
409
|
+
export type EnumToModel<T extends EntityEnum | VirtualEntityEnum> = T extends EntityEnum.BILLING ? BillingEntityModel : T extends EntityEnum.BILLING_HISTORY ? BillingHistoryEntityModel : T extends EntityEnum.CLIENT ? ClientEntityModel : T extends EntityEnum.INTERMEDIARY_BANK ? IntermediaryBankEntityModel : T extends EntityEnum.PROJECT ? ProjectEntityModel : T extends EntityEnum.PROJECT_USER_MAPPING ? ProjectUserMappingEntityModel : T extends EntityEnum.REIMBURSEMENT ? ReimbursementEntityModel : T extends EntityEnum.REIMBURSEMENT_EXPENSE ? ReimbursementExpenseEntityModel : T extends EntityEnum.BILLING_REIMBURSEMENT_EXPENSE ? BillingReimbursementExpneseEntityModel : T extends EntityEnum.BILLING_REIMBURESMENT_EXPENSE_HISTORY ? BillingReimbursementExpenseHistoryEntityModel : T extends EntityEnum.LEAVE ? LeaveEntityModel : T extends EntityEnum.WORK_FROM_HOME ? WorkFromHomeEntityModel : T extends EntityEnum.HOLIDAY ? HolidayEntityModel : T extends VirtualEntityEnum.LEAVE_COUNT ? LeaveCountVirtualEntityModel : T extends EntityEnum.CLIENT_AFFILIATE ? ClientAffiliateEntityModel : T extends EntityEnum.BANK ? BankEntityModel : T extends EntityEnum.CONFIGURATION ? ConfigurationEntityModel : T extends EntityEnum.TASK ? TaskEntityModel : T extends EntityEnum.BILLING_TIMESHEET ? BillingTimesheetEntityModel : T extends EntityEnum.BILLING_TIMESHEET_HISTORY ? BillingTimesheetHistoryEntityModel : T extends EntityEnum.TIMESHEET ? TimesheetEntityModel : T extends EntityEnum.MOVING_TIMESHEET ? MovingTimesheetEntityModel : T extends EntityEnum.TIMESHEET_HISTORY ? TimesheetHistoryEntityModel : T extends EntityEnum.COUNTRY ? CountryEntityModel : T extends EntityEnum.BILLING_TRANSACTION ? BillingTransactionEntityModel : T extends EntityEnum.BILLING_TRANSACTION_HISTORY ? BillingTransactionHistoryEntityModel : T extends EntityEnum.ADDRESS_BOOK ? AddressBookEntityModel : T extends EntityEnum.STATE ? StateEntityModel : T extends EntityEnum.GST_RATE ? GstRateEntityModel : T extends EntityEnum.ORGANIZATION_TYPE ? OrganizationTypeEntityModel : T extends EntityEnum.TDS_RATE ? TdsRateEntityModel : T extends EntityEnum.ORGANIZATION_TYPE_TDS_RATE_MAPPING ? OrganizationTypeTdsRateMappingEntityModel : T extends EntityEnum.VOUCHER_TYPE ? VoucherTypeEntityModel : T extends EntityEnum.TDS_RATE_VOUCHER_TYPE_MAPPING ? TdsRateVoucherTypeMappingEntityModel : T extends EntityEnum.ORGANIZATION ? OrganizationEntityModel : T extends EntityEnum.INDUSTRY ? IndustryEntityModel : T extends EntityEnum.EXPENSE_TYPE ? ExpenseTypeEntityModel : T extends EntityEnum.DESIGNATION ? DesignationEntityModel : T extends EntityEnum.RATE ? RateEntityModel : T extends EntityEnum.ROLE ? RoleEntityModel : T extends EntityEnum.ROLE_PERMISSION_MAPPING ? RolePermissionMappingEntityModel : T extends EntityEnum.PERMISSION ? PermissionEntityModel : T extends EntityEnum.EXPENSE_HEAD ? ExpenseHeadEntityModel : T extends EntityEnum.DOCUMENT_UPLOAD ? DocumentUploadEntityModel : T extends EntityEnum.VENDOR ? VendorEntityModel : T extends EntityEnum.VENDOR_INVOICE ? VendorInvoiceEntityModel : T extends EntityEnum.VENDOR_INVOICE_HISTORY ? VendorInvoiceHistoryEntityModel : T extends EntityEnum.OFFICE_LOCATION ? OfficeLocationEntityModel : T extends EntityEnum.VENDOR_INVOICE_ITEM ? VendorInvoiceItemEntityModel : T extends EntityEnum.VENDOR_INVOICE_ITEM_HISTORY ? VendorInvoiceItemHistoryEntityModel : T extends EntityEnum.VENDOR_HISTORY ? VendorHistoryEntityModel : T extends EntityEnum.WEBSITE_LEAD ? WebsiteLeadEntityModel : T extends EntityEnum.WEBSITE_NEWSLETTER_SUBSCRIPTION ? WebsiteNewsletterSubscriptionEntityModel : T extends EntityEnum.WORK_FROM_HOME_HISTORY ? WorkFromHomeHistoryEntityModel : T extends EntityEnum.LEAVE_HISTORY ? LeaveHistoryEntityModel : T extends EntityEnum.BANK_HISTORY ? BankHistoryEntityModel : T extends EntityEnum.REIMBURSEMENT_HISTORY ? ReimbursementHistoryEntityModel : T extends EntityEnum.CLIENT_USER_MAPPING ? ClientUserMappingEntityModel : T extends EntityEnum.CLIENT_INTRODUCING_MAPPING ? ClientIntroducingMappingEntityModel : T extends EntityEnum.HOLIDAY_LIST ? HolidayListEntityModel : T extends EntityEnum.CRON_JOBS ? CronJobsEntityModel : T extends EntityEnum.TO_DO_LIST ? ToDoListEntityModel : T extends EntityEnum.CLIENT_QUOTE ? ClientQuoteEntityModel : T extends EntityEnum.CLIENT_QUOTE_RATE ? ClientQuoteRateEntityModel : T extends EntityEnum.BILLING_PROFILE ? BillingProfileEntityModel : T extends EntityEnum.PROJECT_REVENUE_SPLIT_MAPPING ? ProjectRevenueSplitMappingEntityModel : T extends EntityEnum.WEBSITE_LEAD ? WebsiteLeadEntityModel : T extends EntityEnum.WEBSITE_NEWSLETTER_SUBSCRIPTION ? WebsiteNewsletterSubscriptionEntityModel : T extends EntityEnum.CLIENT_QUOTE ? ClientQuoteEntityModel : T extends EntityEnum.CLIENT_QUOTE_RATE ? ClientQuoteRateEntityModel : T extends EntityEnum.DESIGNATION ? DesignationEntityModel : T extends EntityEnum.RATE ? RateEntityModel : T extends EntityEnum.ENTITY_HISTORY ? EntityHistoryEntityModel : T extends EntityEnum.LEAVE_APPROVAL ? LeaveApprovalEntityModel : T extends EntityEnum.VENDOR_INVOICE_PAYMENT ? VendorInvoicePaymentEntityModel : UserEntityModel;
|
|
416
410
|
export type EntityMap = {
|
|
417
411
|
[key in EntityEnum | VirtualEntityEnum]: EnumToModel<key>[];
|
|
418
412
|
} & {
|
|
@@ -102,8 +102,6 @@ var EntityEnum;
|
|
|
102
102
|
EntityEnum["ENTITY_HISTORY"] = "entity_history";
|
|
103
103
|
EntityEnum["VENDOR_INVOICE_PAYMENT"] = "vendor_invoice_payment";
|
|
104
104
|
EntityEnum["LEAVE_APPROVAL"] = "leave_approval";
|
|
105
|
-
EntityEnum["VENDOR_TDS_LIABILITY"] = "vendor_tds_liability";
|
|
106
|
-
EntityEnum["VENDOR_TDS_CHALLAN"] = "vendor_tds_challan";
|
|
107
105
|
})(EntityEnum || (exports.EntityEnum = EntityEnum = {}));
|
|
108
106
|
var VirtualEntityEnum;
|
|
109
107
|
(function (VirtualEntityEnum) {
|
|
@@ -246,7 +246,7 @@ class BillingEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
|
246
246
|
}
|
|
247
247
|
getTotalAmountRecieved() {
|
|
248
248
|
var _a, _b, _c, _d;
|
|
249
|
-
const amountRecieved = (0, utils_1.sumNormalised)((_b = (_a = this.billingTransactions) === null || _a === void 0 ? void 0 : _a.filter((transaction) => [billing_transaction_enum_1.BillingTransactionType.TDS, billing_transaction_enum_1.BillingTransactionType.RECEIPT
|
|
249
|
+
const amountRecieved = (0, utils_1.sumNormalised)((_b = (_a = this.billingTransactions) === null || _a === void 0 ? void 0 : _a.filter((transaction) => [billing_transaction_enum_1.BillingTransactionType.TDS, billing_transaction_enum_1.BillingTransactionType.RECEIPT /* BillingTransactionType.ADJUST_AGAINST_CREDIT_NOTE */].includes(transaction.type) &&
|
|
250
250
|
transaction.status !== billing_transaction_status_enum_1.BillingTransactionStatusEnum.REJECTED)) !== null && _b !== void 0 ? _b : [], "amount") -
|
|
251
251
|
(0, utils_1.sumNormalised)((_d = (_c = this.billingTransactions) === null || _c === void 0 ? void 0 : _c.filter((transaction) => transaction.type === billing_transaction_enum_1.BillingTransactionType.REFUND && transaction.status !== billing_transaction_status_enum_1.BillingTransactionStatusEnum.REJECTED)) !== null && _d !== void 0 ? _d : [], "amount");
|
|
252
252
|
return amountRecieved;
|
|
@@ -268,12 +268,12 @@ class BillingEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
270
|
getApprovedBillingTransactionsTotalAmount() {
|
|
271
|
-
var _a, _b
|
|
272
|
-
return (0, utils_1.sumNormalised)((
|
|
271
|
+
var _a, _b;
|
|
272
|
+
return (0, utils_1.sumNormalised)((_b = (_a = this.billingTransactions) === null || _a === void 0 ? void 0 : _a.filter((entity) => ![
|
|
273
273
|
billing_transaction_status_enum_1.BillingTransactionStatusEnum.CREDITNOTE_APPROVAL_PENDING,
|
|
274
274
|
billing_transaction_status_enum_1.BillingTransactionStatusEnum.WRITEOFF_APPROVAL_PENDING,
|
|
275
|
-
|
|
276
|
-
].includes(entity.status)))
|
|
275
|
+
billing_transaction_status_enum_1.BillingTransactionStatusEnum.REJECTED,
|
|
276
|
+
].includes(entity.status))) !== null && _b !== void 0 ? _b : [], "amount");
|
|
277
277
|
}
|
|
278
278
|
getCurrentBillingBillingProfile(billingProfiles) {
|
|
279
279
|
const billingParticularsOfCurrentBilling = this.billingProfileParticulars;
|
|
@@ -76,8 +76,6 @@ const vendor_invoice_history_entity_model_1 = require("./vendor_invoice_history.
|
|
|
76
76
|
const vendor_invoice_item_entity_model_1 = require("./vendor_invoice_item.entity.model");
|
|
77
77
|
const vendor_invoice_item_history_entity_model_1 = require("./vendor_invoice_item_history.entity.model");
|
|
78
78
|
const vendor_invoice_payment_entity_model_1 = require("./vendor_invoice_payment.entity.model");
|
|
79
|
-
const vendor_tds_challan_entity_model_1 = require("./vendor_tds_challan.entity.model");
|
|
80
|
-
const vendor_tds_liability_entity_model_1 = require("./vendor_tds_liability.entity.model");
|
|
81
79
|
const voucher_type_entity_model_1 = require("./voucher_type.entity.model");
|
|
82
80
|
const website_lead_entity_model_1 = require("./website_lead.entity.model");
|
|
83
81
|
const website_newsletter_subscription_entity_model_1 = require("./website_newsletter_subscription.entity.model");
|
|
@@ -182,8 +180,6 @@ exports.entityEnumToEntityModel = {
|
|
|
182
180
|
[entity_utils_interface_1.EntityEnum.ENTITY_HISTORY]: entity_history_entity_model_1.EntityHistoryEntityModel.fromEntity,
|
|
183
181
|
[entity_utils_interface_1.EntityEnum.VENDOR_INVOICE_PAYMENT]: vendor_invoice_payment_entity_model_1.VendorInvoicePaymentEntityModel.fromEntity,
|
|
184
182
|
[entity_utils_interface_1.EntityEnum.LEAVE_APPROVAL]: leave_approval_entity_model_1.LeaveApprovalEntityModel.fromEntity,
|
|
185
|
-
[entity_utils_interface_1.EntityEnum.VENDOR_TDS_LIABILITY]: vendor_tds_liability_entity_model_1.VendorTdsLiabilityEntityModel.fromEntity,
|
|
186
|
-
[entity_utils_interface_1.EntityEnum.VENDOR_TDS_CHALLAN]: vendor_tds_challan_entity_model_1.VendorTdsChallanEntityModel.fromEntity,
|
|
187
183
|
};
|
|
188
184
|
function entityMapToModels(entityMap) {
|
|
189
185
|
for (const entityName in entityMap) {
|
|
@@ -3,7 +3,9 @@ import { EntityEnum } from "../interface/entity.utils.interface";
|
|
|
3
3
|
import { IReimbursementExpenseEntity } from "../interface/reimbursement_expense.entity.interface";
|
|
4
4
|
import { RelationConfigs } from "../interface/relation-config.interface";
|
|
5
5
|
import { BaseEntityModel } from "./base.entity.model";
|
|
6
|
+
import { ProjectEntityModel } from "./project.entity.model";
|
|
6
7
|
import { ReimbursementEntityModel } from "./reimbursement.entity.model";
|
|
8
|
+
import { UserEntityModel } from "./user.entity.model";
|
|
7
9
|
export declare class ReimbursementExpenseEntityModel extends BaseEntityModel<EntityEnum.REIMBURSEMENT_EXPENSE> implements IReimbursementExpenseEntity {
|
|
8
10
|
id: number;
|
|
9
11
|
reimbursementId: number;
|
|
@@ -19,7 +21,9 @@ export declare class ReimbursementExpenseEntityModel extends BaseEntityModel<Ent
|
|
|
19
21
|
createdOn: number;
|
|
20
22
|
updatedOn: number;
|
|
21
23
|
reimbursement?: ReimbursementEntityModel;
|
|
24
|
+
user?: UserEntityModel;
|
|
25
|
+
project?: ProjectEntityModel;
|
|
22
26
|
static fromEntity(apiEntity: IReimbursementExpenseEntity): ReimbursementExpenseEntityModel;
|
|
23
|
-
static relationConfigs: RelationConfigs<[EntityEnum.REIMBURSEMENT], EntityEnum.REIMBURSEMENT_EXPENSE>;
|
|
27
|
+
static relationConfigs: RelationConfigs<[EntityEnum.REIMBURSEMENT, EntityEnum.USER, EntityEnum.PROJECT], EntityEnum.REIMBURSEMENT_EXPENSE>;
|
|
24
28
|
getRelationConfigs(): any;
|
|
25
29
|
}
|
|
@@ -40,4 +40,22 @@ ReimbursementExpenseEntityModel.relationConfigs = [
|
|
|
40
40
|
key: "reimbursementId",
|
|
41
41
|
},
|
|
42
42
|
},
|
|
43
|
+
{
|
|
44
|
+
name: entity_utils_interface_1.EntityEnum.USER,
|
|
45
|
+
key: "user",
|
|
46
|
+
relation: relation_type_enum_1.RelationType.ONE,
|
|
47
|
+
mapKeyConfig: {
|
|
48
|
+
relationKey: "id",
|
|
49
|
+
key: "userId",
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: entity_utils_interface_1.EntityEnum.PROJECT,
|
|
54
|
+
key: "project",
|
|
55
|
+
relation: relation_type_enum_1.RelationType.ONE,
|
|
56
|
+
mapKeyConfig: {
|
|
57
|
+
relationKey: "id",
|
|
58
|
+
key: "projectId",
|
|
59
|
+
},
|
|
60
|
+
},
|
|
43
61
|
];
|
|
@@ -1,34 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// import { EntityEnum } from "../interface/entity.utils.interface";
|
|
3
3
|
// import { BaseEntityModel } from "./base.entity.model";
|
|
4
|
-
// import { RelationConfigs } from "../interface/relation-config.interface";
|
|
5
|
-
// import { RelationType } from "../enums/relation-type.enum";
|
|
6
|
-
// import { IUserEntity } from "../interface/user.entity.interface";
|
|
7
|
-
// import { AppBadRequestException } from "../../exceptions";
|
|
8
|
-
// import { ErrorKeyEnum } from "../../enums/error.key.enum";
|
|
9
|
-
// import { UserEntityModel } from "./user.entity.model";
|
|
10
|
-
// import { IRowActions } from "./interface/row-actions.interface";
|
|
11
|
-
// import { EntityActionFlowResolverV2 } from "../../utils";
|
|
12
|
-
// import { ITdsRateEntity } from "../interface/tds_rate.entity.interface";
|
|
13
|
-
// import { TdsRateStatusEnum } from "../enums/tds_rate_status_enum";
|
|
14
|
-
// import { OrganizationTypeTdsRateMappingEntityModel } from "./organization_type_tds_rate_mapping.entity.model";
|
|
15
|
-
// import { TdsRateVoucherTypeMappingEntityModel } from "./tds_rate_voucher_type_mapping.entity.model";
|
|
16
|
-
// import { OrganizationTypeEntityModel } from "./organization_type.entity.model";
|
|
17
|
-
// import { VoucherTypeEntityModel } from "./voucher_type.entity.model";
|
|
18
|
-
// import { VendorInvoiceItemEntityModel } from "./vendor_invoice_item.entity.model";
|
|
19
|
-
// import { VendorTdsLiabilityEntityModel } from "./vendor_tds_liability.entity.model";
|
|
20
|
-
// import { VendorTdsChallanEntityModel } from "./vendor_tds_challan.entity.model";
|
|
21
|
-
// import { VendorEntityModel } from "./vendor.entity.model";
|
|
22
|
-
// import { StateEntityModel } from "./state.entity.model";
|
|
23
|
-
// import { CountryEntityModel } from "./country.entity.model";
|
|
24
|
-
// import { VendorInvoiceEntityModel } from "./vendor_invoice.entity.model";
|
|
25
|
-
// import { OfficeLocationEntityModel } from "./office_location.entity.model";
|
|
26
|
-
// import { ExpenseHeadEntityModel } from "./expense_head.entity.model";
|
|
27
|
-
// import { GstRateEntityModel } from "./gst_rate.entity.model";
|
|
28
|
-
// import { VendorInvoicePaymentEntityModel } from "./vendor_invoice_payment.entity.model";
|
|
29
|
-
// import { BankEntityModel } from "./bank.entity.model";
|
|
30
|
-
// import { TdsRateActionEnum } from "../../api";
|
|
31
|
-
// import { ITdsRateFlowConfigContextData, tdsRateFlowConfig } from "../flow-configs/tds_rate_flow.config";
|
|
32
4
|
// export class TdsRateEntityModel extends BaseEntityModel<EntityEnum.TDS_RATE> implements ITdsRateEntity {
|
|
33
5
|
// id: number = 0;
|
|
34
6
|
// section: string = "";
|
|
@@ -43,20 +15,7 @@
|
|
|
43
15
|
// createdBy: number = 0;
|
|
44
16
|
// updatedBy: number = 0;
|
|
45
17
|
// organizationTypeTdsRateMappings?: OrganizationTypeTdsRateMappingEntityModel[];
|
|
46
|
-
//
|
|
47
|
-
// vendorInvoiceItems?: VendorInvoiceItemEntityModel[];
|
|
48
|
-
// vendorTdsLiabilitys?: VendorTdsLiabilityEntityModel[];
|
|
49
|
-
// vendorTdsChallans?: VendorTdsChallanEntityModel[];
|
|
50
|
-
// static relationConfigs: RelationConfigs<
|
|
51
|
-
// [
|
|
52
|
-
// EntityEnum.ORGANIZATION_TYPE_TDS_RATE_MAPPING,
|
|
53
|
-
// EntityEnum.TDS_RATE_VOUCHER_TYPE_MAPPING,
|
|
54
|
-
// EntityEnum.VENDOR_INVOICE_ITEM,
|
|
55
|
-
// EntityEnum.VENDOR_TDS_LIABILITY,
|
|
56
|
-
// EntityEnum.VENDOR_TDS_CHALLAN,
|
|
57
|
-
// ],
|
|
58
|
-
// EntityEnum.TDS_RATE
|
|
59
|
-
// > = [
|
|
18
|
+
// static relationConfigs: RelationConfigs<[EntityEnum.ORGANIZATION_TYPE_TDS_RATE_MAPPING], EnumEntityType<EntityEnum.TDS_RATE>> = [
|
|
60
19
|
// {
|
|
61
20
|
// name: EntityEnum.ORGANIZATION_TYPE_TDS_RATE_MAPPING,
|
|
62
21
|
// relation: RelationType.MANY,
|
|
@@ -66,42 +25,6 @@
|
|
|
66
25
|
// key: "id",
|
|
67
26
|
// },
|
|
68
27
|
// },
|
|
69
|
-
// {
|
|
70
|
-
// name: EntityEnum.TDS_RATE_VOUCHER_TYPE_MAPPING,
|
|
71
|
-
// relation: RelationType.MANY,
|
|
72
|
-
// key: "tdsRateVoucherTypeMappings",
|
|
73
|
-
// mapKeyConfig: {
|
|
74
|
-
// relationKey: "tdsRateId",
|
|
75
|
-
// key: "id",
|
|
76
|
-
// },
|
|
77
|
-
// },
|
|
78
|
-
// {
|
|
79
|
-
// name: EntityEnum.VENDOR_INVOICE_ITEM,
|
|
80
|
-
// relation: RelationType.MANY,
|
|
81
|
-
// key: "vendorInvoiceItems",
|
|
82
|
-
// mapKeyConfig: {
|
|
83
|
-
// relationKey: "tdsRateId",
|
|
84
|
-
// key: "id",
|
|
85
|
-
// },
|
|
86
|
-
// },
|
|
87
|
-
// {
|
|
88
|
-
// name: EntityEnum.VENDOR_TDS_LIABILITY,
|
|
89
|
-
// relation: RelationType.MANY,
|
|
90
|
-
// key: "vendorTdsLiabilitys",
|
|
91
|
-
// mapKeyConfig: {
|
|
92
|
-
// relationKey: "tdsRateId",
|
|
93
|
-
// key: "id",
|
|
94
|
-
// },
|
|
95
|
-
// },
|
|
96
|
-
// {
|
|
97
|
-
// name: EntityEnum.VENDOR_TDS_CHALLAN,
|
|
98
|
-
// relation: RelationType.MANY,
|
|
99
|
-
// key: "vendorTdsChallans",
|
|
100
|
-
// mapKeyConfig: {
|
|
101
|
-
// relationKey: "tdsRateId",
|
|
102
|
-
// key: "id",
|
|
103
|
-
// },
|
|
104
|
-
// },
|
|
105
28
|
// ];
|
|
106
29
|
// static fromEntity(entity: ITdsRateEntity): TdsRateEntityModel {
|
|
107
30
|
// const result = new TdsRateEntityModel(EntityEnum.TDS_RATE);
|
|
@@ -111,151 +34,4 @@
|
|
|
111
34
|
// getRelationConfigs(): any[] {
|
|
112
35
|
// return this.constructor.prototype.constructor.relationConfigs || [];
|
|
113
36
|
// }
|
|
114
|
-
// get organizationTypes(): OrganizationTypeEntityModel[] {
|
|
115
|
-
// if (this.organizationTypeTdsRateMappings) {
|
|
116
|
-
// return this.organizationTypeTdsRateMappings.filter((mapping) => mapping.organizationType).map((mapping) => mapping.organizationType!);
|
|
117
|
-
// }
|
|
118
|
-
// return [];
|
|
119
|
-
// }
|
|
120
|
-
// get voucherTypes(): VoucherTypeEntityModel[] {
|
|
121
|
-
// if (this.tdsRateVoucherTypeMappings) {
|
|
122
|
-
// return this.tdsRateVoucherTypeMappings.filter((mapping) => mapping.voucherType).map((mapping) => mapping.voucherType!);
|
|
123
|
-
// }
|
|
124
|
-
// return [];
|
|
125
|
-
// }
|
|
126
|
-
// get vendors(): VendorEntityModel[] | undefined {
|
|
127
|
-
// // many_to_many -> many_to_many verified
|
|
128
|
-
// // {'tds_rate->organization_type': 'many_to_many', 'organization_type->vendor': 'one_to_many'}
|
|
129
|
-
// // ['tds_rate', 'organization_type'] -> many_to_many
|
|
130
|
-
// // ['organization_type', 'vendor'] -> one_to_many
|
|
131
|
-
// return this.organizationTypes
|
|
132
|
-
// ?.flatMap((organizationType) => organizationType.vendors)
|
|
133
|
-
// .filter((vendor): vendor is VendorEntityModel => !!vendor)
|
|
134
|
-
// .reduce((accumulator: VendorEntityModel[], current) => {
|
|
135
|
-
// if (!accumulator.some((vendor) => vendor.id === current.id)) {
|
|
136
|
-
// accumulator.push(current);
|
|
137
|
-
// }
|
|
138
|
-
// return accumulator;
|
|
139
|
-
// }, []);
|
|
140
|
-
// }
|
|
141
|
-
// get states(): StateEntityModel[] | undefined {
|
|
142
|
-
// // many_to_many -> many_to_many verified
|
|
143
|
-
// // {'tds_rate->organization_type': 'many_to_many', 'organization_type->vendor': 'one_to_many', 'vendor->state': 'many_to_one'}
|
|
144
|
-
// // ['organization_type', 'vendor'] -> one_to_many
|
|
145
|
-
// // ['vendor', 'state'] -> many_to_one
|
|
146
|
-
// return this.vendors
|
|
147
|
-
// ?.flatMap((vendor) => vendor.state)
|
|
148
|
-
// .filter((state): state is StateEntityModel => !!state)
|
|
149
|
-
// .reduce((accumulator: StateEntityModel[], current) => {
|
|
150
|
-
// if (!accumulator.some((state) => state.id === current.id)) {
|
|
151
|
-
// accumulator.push(current);
|
|
152
|
-
// }
|
|
153
|
-
// return accumulator;
|
|
154
|
-
// }, []);
|
|
155
|
-
// }
|
|
156
|
-
// get countrys(): CountryEntityModel[] | undefined {
|
|
157
|
-
// // many_to_many -> many_to_many verified
|
|
158
|
-
// // {'tds_rate->organization_type': 'many_to_many', 'organization_type->vendor': 'one_to_many', 'vendor->country': 'many_to_one'}
|
|
159
|
-
// // ['organization_type', 'vendor'] -> one_to_many
|
|
160
|
-
// // ['vendor', 'country'] -> many_to_one
|
|
161
|
-
// return this.vendors
|
|
162
|
-
// ?.flatMap((vendor) => vendor.country)
|
|
163
|
-
// .filter((country): country is CountryEntityModel => !!country)
|
|
164
|
-
// .reduce((accumulator: CountryEntityModel[], current) => {
|
|
165
|
-
// if (!accumulator.some((country) => country.id === current.id)) {
|
|
166
|
-
// accumulator.push(current);
|
|
167
|
-
// }
|
|
168
|
-
// return accumulator;
|
|
169
|
-
// }, []);
|
|
170
|
-
// }
|
|
171
|
-
// get vendorInvoices(): VendorInvoiceEntityModel[] | undefined {
|
|
172
|
-
// // one_to_many -> many_to_many mismatch
|
|
173
|
-
// // {'tds_rate->organization_type': 'many_to_many', 'organization_type->vendor': 'one_to_many', 'vendor->vendor_invoice': 'one_to_many'}
|
|
174
|
-
// // ['organization_type', 'vendor'] -> one_to_many
|
|
175
|
-
// // ['vendor', 'vendor_invoice'] -> one_to_many
|
|
176
|
-
// return this.vendors
|
|
177
|
-
// ?.flatMap((vendor) => vendor.vendorInvoices)
|
|
178
|
-
// .filter((vendorInvoice): vendorInvoice is VendorInvoiceEntityModel => !!vendorInvoice)
|
|
179
|
-
// .reduce((accumulator: VendorInvoiceEntityModel[], current) => {
|
|
180
|
-
// if (!accumulator.some((vendorInvoice) => vendorInvoice.id === current.id)) {
|
|
181
|
-
// accumulator.push(current);
|
|
182
|
-
// }
|
|
183
|
-
// return accumulator;
|
|
184
|
-
// }, []);
|
|
185
|
-
// }
|
|
186
|
-
// get officeLocations(): OfficeLocationEntityModel[] | undefined {
|
|
187
|
-
// // many_to_many -> many_to_many verified
|
|
188
|
-
// // {'tds_rate->organization_type': 'many_to_many', 'organization_type->vendor': 'one_to_many', 'vendor->vendor_invoice': 'one_to_many', 'vendor_invoice->office_location': 'many_to_one'}
|
|
189
|
-
// // ['vendor', 'vendor_invoice'] -> one_to_many
|
|
190
|
-
// // ['vendor_invoice', 'office_location'] -> many_to_one
|
|
191
|
-
// return this.vendorInvoices
|
|
192
|
-
// ?.flatMap((vendorInvoice) => vendorInvoice.officeLocation)
|
|
193
|
-
// .filter((officeLocation): officeLocation is OfficeLocationEntityModel => !!officeLocation)
|
|
194
|
-
// .reduce((accumulator: OfficeLocationEntityModel[], current) => {
|
|
195
|
-
// if (!accumulator.some((officeLocation) => officeLocation.id === current.id)) {
|
|
196
|
-
// accumulator.push(current);
|
|
197
|
-
// }
|
|
198
|
-
// return accumulator;
|
|
199
|
-
// }, []);
|
|
200
|
-
// }
|
|
201
|
-
// get expenseHeads(): ExpenseHeadEntityModel[] | undefined {
|
|
202
|
-
// // many_to_many -> many_to_many verified
|
|
203
|
-
// // {'tds_rate->voucher_type': 'many_to_many', 'voucher_type->expense_head': 'one_to_many'}
|
|
204
|
-
// // ['tds_rate', 'voucher_type'] -> many_to_many
|
|
205
|
-
// // ['voucher_type', 'expense_head'] -> one_to_many
|
|
206
|
-
// return this.voucherTypes
|
|
207
|
-
// ?.flatMap((voucherType) => voucherType.expenseHeads)
|
|
208
|
-
// .filter((expenseHead): expenseHead is ExpenseHeadEntityModel => !!expenseHead)
|
|
209
|
-
// .reduce((accumulator: ExpenseHeadEntityModel[], current) => {
|
|
210
|
-
// if (!accumulator.some((expenseHead) => expenseHead.id === current.id)) {
|
|
211
|
-
// accumulator.push(current);
|
|
212
|
-
// }
|
|
213
|
-
// return accumulator;
|
|
214
|
-
// }, []);
|
|
215
|
-
// }
|
|
216
|
-
// get gstRates(): GstRateEntityModel[] | undefined {
|
|
217
|
-
// // many_to_many -> many_to_many verified
|
|
218
|
-
// // {'tds_rate->vendor_invoice_item': 'one_to_many', 'vendor_invoice_item->gst_rate': 'many_to_one'}
|
|
219
|
-
// // ['tds_rate', 'vendor_invoice_item'] -> one_to_many
|
|
220
|
-
// // ['vendor_invoice_item', 'gst_rate'] -> many_to_one
|
|
221
|
-
// return this.vendorInvoiceItems
|
|
222
|
-
// ?.flatMap((vendorInvoiceItem) => vendorInvoiceItem.gstRate)
|
|
223
|
-
// .filter((gstRate): gstRate is GstRateEntityModel => !!gstRate)
|
|
224
|
-
// .reduce((accumulator: GstRateEntityModel[], current) => {
|
|
225
|
-
// if (!accumulator.some((gstRate) => gstRate.id === current.id)) {
|
|
226
|
-
// accumulator.push(current);
|
|
227
|
-
// }
|
|
228
|
-
// return accumulator;
|
|
229
|
-
// }, []);
|
|
230
|
-
// }
|
|
231
|
-
// get vendorInvoicePayments(): VendorInvoicePaymentEntityModel[] | undefined {
|
|
232
|
-
// // one_to_many -> many_to_many mismatch
|
|
233
|
-
// // {'tds_rate->organization_type': 'many_to_many', 'organization_type->vendor': 'one_to_many', 'vendor->vendor_invoice': 'one_to_many', 'vendor_invoice->vendor_invoice_payment': 'one_to_many'}
|
|
234
|
-
// // ['vendor', 'vendor_invoice'] -> one_to_many
|
|
235
|
-
// // ['vendor_invoice', 'vendor_invoice_payment'] -> one_to_many
|
|
236
|
-
// return this.vendorInvoices
|
|
237
|
-
// ?.flatMap((vendorInvoice) => vendorInvoice.vendorInvoicePayments)
|
|
238
|
-
// .filter((vendorInvoicePayment): vendorInvoicePayment is VendorInvoicePaymentEntityModel => !!vendorInvoicePayment)
|
|
239
|
-
// .reduce((accumulator: VendorInvoicePaymentEntityModel[], current) => {
|
|
240
|
-
// if (!accumulator.some((vendorInvoicePayment) => vendorInvoicePayment.id === current.id)) {
|
|
241
|
-
// accumulator.push(current);
|
|
242
|
-
// }
|
|
243
|
-
// return accumulator;
|
|
244
|
-
// }, []);
|
|
245
|
-
// }
|
|
246
|
-
// get banks(): BankEntityModel[] | undefined {
|
|
247
|
-
// // many_to_many -> many_to_many verified
|
|
248
|
-
// // {'tds_rate->vendor_tds_challan': 'one_to_many', 'vendor_tds_challan->bank': 'many_to_one'}
|
|
249
|
-
// // ['tds_rate', 'vendor_tds_challan'] -> one_to_many
|
|
250
|
-
// // ['vendor_tds_challan', 'bank'] -> many_to_one
|
|
251
|
-
// return this.vendorTdsChallans
|
|
252
|
-
// ?.flatMap((vendorTdsChallan) => vendorTdsChallan.bank)
|
|
253
|
-
// .filter((bank): bank is BankEntityModel => !!bank)
|
|
254
|
-
// .reduce((accumulator: BankEntityModel[], current) => {
|
|
255
|
-
// if (!accumulator.some((bank) => bank.id === current.id)) {
|
|
256
|
-
// accumulator.push(current);
|
|
257
|
-
// }
|
|
258
|
-
// return accumulator;
|
|
259
|
-
// }, []);
|
|
260
|
-
// }
|
|
261
37
|
// }
|
|
@@ -15,8 +15,6 @@ import { VendorInvoiceEntityModel } from "./vendor_invoice.entity.model";
|
|
|
15
15
|
import { OfficeLocationEntityModel } from "./office_location.entity.model";
|
|
16
16
|
import { ExpenseHeadEntityModel } from "./expense_head.entity.model";
|
|
17
17
|
import { GstRateEntityModel } from "./gst_rate.entity.model";
|
|
18
|
-
import { VendorTdsLiabilityEntityModel } from "./vendor_tds_liability.entity.model";
|
|
19
|
-
import { VendorTdsChallanEntityModel } from "./vendor_tds_challan.entity.model";
|
|
20
18
|
export declare class TdsRateEntityModel extends BaseEntityModel<EntityEnum.TDS_RATE> implements ITdsRateEntity {
|
|
21
19
|
id: number;
|
|
22
20
|
section: string;
|
|
@@ -33,14 +31,10 @@ export declare class TdsRateEntityModel extends BaseEntityModel<EntityEnum.TDS_R
|
|
|
33
31
|
organizationTypeTdsRateMappings?: OrganizationTypeTdsRateMappingEntityModel[];
|
|
34
32
|
tdsRateVoucherTypeMappings?: TdsRateVoucherTypeMappingEntityModel[];
|
|
35
33
|
vendorInvoiceItems?: VendorInvoiceItemEntityModel[];
|
|
36
|
-
vendorTdsLiabilitys?: VendorTdsLiabilityEntityModel[];
|
|
37
|
-
vendorTdsChallans?: VendorTdsChallanEntityModel[];
|
|
38
34
|
static relationConfigs: RelationConfigs<[
|
|
39
35
|
EntityEnum.ORGANIZATION_TYPE_TDS_RATE_MAPPING,
|
|
40
36
|
EntityEnum.TDS_RATE_VOUCHER_TYPE_MAPPING,
|
|
41
|
-
EntityEnum.VENDOR_INVOICE_ITEM
|
|
42
|
-
EntityEnum.VENDOR_TDS_LIABILITY,
|
|
43
|
-
EntityEnum.VENDOR_TDS_CHALLAN
|
|
37
|
+
EntityEnum.VENDOR_INVOICE_ITEM
|
|
44
38
|
], EntityEnum.TDS_RATE>;
|
|
45
39
|
static fromEntity(entity: ITdsRateEntity): TdsRateEntityModel;
|
|
46
40
|
getRelationConfigs(): any[];
|
|
@@ -171,22 +171,4 @@ TdsRateEntityModel.relationConfigs = [
|
|
|
171
171
|
key: "id",
|
|
172
172
|
},
|
|
173
173
|
},
|
|
174
|
-
{
|
|
175
|
-
name: entity_utils_interface_1.EntityEnum.VENDOR_TDS_LIABILITY,
|
|
176
|
-
relation: relation_type_enum_1.RelationType.MANY,
|
|
177
|
-
key: "vendorTdsLiabilitys",
|
|
178
|
-
mapKeyConfig: {
|
|
179
|
-
relationKey: "tdsRateId",
|
|
180
|
-
key: "id",
|
|
181
|
-
},
|
|
182
|
-
},
|
|
183
|
-
{
|
|
184
|
-
name: entity_utils_interface_1.EntityEnum.VENDOR_TDS_CHALLAN,
|
|
185
|
-
relation: relation_type_enum_1.RelationType.MANY,
|
|
186
|
-
key: "vendorTdsChallans",
|
|
187
|
-
mapKeyConfig: {
|
|
188
|
-
relationKey: "tdsRateId",
|
|
189
|
-
key: "id",
|
|
190
|
-
},
|
|
191
|
-
},
|
|
192
174
|
];
|
|
@@ -43,6 +43,7 @@ export declare class TimesheetEntityModel extends BaseEntityModel<EntityEnum.TIM
|
|
|
43
43
|
getTimesheetAmount(projectCurrency: CurrencyEnum): number;
|
|
44
44
|
get formattedDate(): string;
|
|
45
45
|
get userName(): string | undefined;
|
|
46
|
+
get approvers(): UserEntityModel[];
|
|
46
47
|
get latestStatusFromHistory(): TimesheetStatusEnum | undefined;
|
|
47
48
|
getDateCodeDay(): number;
|
|
48
49
|
getClassificationDeadline(config: IClassificationWindowConfig): Date;
|
|
@@ -45,6 +45,10 @@ class TimesheetEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
|
45
45
|
var _a;
|
|
46
46
|
return (_a = this.user) === null || _a === void 0 ? void 0 : _a.name;
|
|
47
47
|
}
|
|
48
|
+
get approvers() {
|
|
49
|
+
var _a, _b, _c;
|
|
50
|
+
return (_c = (_b = (_a = this.project) === null || _a === void 0 ? void 0 : _a.partnersOwnerUsersOfProject) === null || _b === void 0 ? void 0 : _b.filter((u) => u.email)) !== null && _c !== void 0 ? _c : [];
|
|
51
|
+
}
|
|
48
52
|
get latestStatusFromHistory() {
|
|
49
53
|
var _a;
|
|
50
54
|
const sorted = [...(this.history || [])].sort((a, b) => b.id - a.id);
|