law-common 8.9.0 → 9.0.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.
Files changed (40) hide show
  1. package/dist/src/api/index.d.ts +2 -0
  2. package/dist/src/api/index.js +2 -0
  3. package/dist/src/api/interface/bank.create.dto.interface.d.ts +2 -1
  4. package/dist/src/api/interface/bank.entity.response.d.ts +5 -0
  5. package/dist/src/api/interface/bank.update.dto.interface.d.ts +2 -1
  6. package/dist/src/api/interface/billing.create.dto.interface.d.ts +4 -9
  7. package/dist/src/api/interface/billing.entity.response.d.ts +9 -38
  8. package/dist/src/api/interface/billing.update.dto.interface.d.ts +4 -15
  9. package/dist/src/api/interface/intermediary.bank.entity.response.d.ts +3 -0
  10. package/dist/src/api/interface/intermediary.bank.entity.response.js +2 -0
  11. package/dist/src/api/interface/organization.entity.api.d.ts +3 -0
  12. package/dist/src/api/interface/organization.entity.api.js +2 -0
  13. package/dist/src/constants/index.d.ts +1 -0
  14. package/dist/src/constants/index.js +1 -0
  15. package/dist/src/constants/util.constants.d.ts +2 -0
  16. package/dist/src/constants/util.constants.js +37 -0
  17. package/dist/src/entities/enums/bank_entity_keys.enum.d.ts +2 -2
  18. package/dist/src/entities/enums/bank_entity_keys.enum.js +2 -2
  19. package/dist/src/entities/enums/billing.action.enum.d.ts +2 -1
  20. package/dist/src/entities/enums/billing.action.enum.js +6 -0
  21. package/dist/src/entities/enums/billing_invoice_type.enum.d.ts +4 -0
  22. package/dist/src/entities/enums/billing_invoice_type.enum.js +8 -0
  23. package/dist/src/entities/index.d.ts +14 -11
  24. package/dist/src/entities/index.js +14 -11
  25. package/dist/src/entities/interface/bank.entity.interface.d.ts +0 -7
  26. package/dist/src/entities/interface/billing.entity.interface.d.ts +13 -37
  27. package/dist/src/entities/interface/billing_timesheet.entity.interface.d.ts +49 -0
  28. package/dist/src/entities/interface/billing_timesheet.entity.interface.js +2 -0
  29. package/dist/src/entities/interface/entity.utils.interface.d.ts +44 -1
  30. package/dist/src/entities/interface/entity.utils.interface.js +7 -0
  31. package/dist/src/entities/interface/intermediary_bank.entity.interface.d.ts +21 -0
  32. package/dist/src/entities/interface/intermediary_bank.entity.interface.js +2 -0
  33. package/dist/src/entities/interface/organization.entity.interface.d.ts +5 -0
  34. package/dist/src/enums/currency.enum.d.ts +1 -0
  35. package/dist/src/enums/currency.enum.js +25 -3
  36. package/dist/src/utils/helper.fn.util.d.ts +29 -0
  37. package/dist/src/utils/helper.fn.util.js +73 -0
  38. package/dist/src/utils/models/date-code.model.util.d.ts +1 -0
  39. package/dist/src/utils/models/date-code.model.util.js +4 -0
  40. package/package.json +1 -1
@@ -73,3 +73,5 @@ export * from "./interface/work.from.home.create.dto.interface";
73
73
  export * from "./interface/work.from.home.update.interface";
74
74
  export * from "./interface/work_from_home_history.api";
75
75
  export * from "./interface/country.entity.response";
76
+ export * from "./interface/organization.entity.api";
77
+ export * from "./interface/intermediary.bank.entity.response";
@@ -89,3 +89,5 @@ __exportStar(require("./interface/work.from.home.create.dto.interface"), exports
89
89
  __exportStar(require("./interface/work.from.home.update.interface"), exports);
90
90
  __exportStar(require("./interface/work_from_home_history.api"), exports);
91
91
  __exportStar(require("./interface/country.entity.response"), exports);
92
+ __exportStar(require("./interface/organization.entity.api"), exports);
93
+ __exportStar(require("./interface/intermediary.bank.entity.response"), exports);
@@ -1,5 +1,6 @@
1
- import { BankStatusEnum, IBankEntity, IEntityCreateDto } from "../../entities";
1
+ import { BankStatusEnum, IBankEntity, IEntityCreateDto, IIntermediaryBankCreateDto } from "../../entities";
2
2
  export interface IBankCreateDto extends Omit<IEntityCreateDto<IBankEntity>, IBankExclude> {
3
3
  status?: BankStatusEnum;
4
+ intermediaryBankDetails?: IIntermediaryBankCreateDto[];
4
5
  }
5
6
  export type IBankExclude = "status";
@@ -1,6 +1,7 @@
1
1
  import { BankActionEnum, BankStatusEnum } from "../../entities";
2
2
  import { IBankApiEntity } from "./bank.entity.api";
3
3
  import { IBaseResponse } from "./base.response.interface";
4
+ import { IIntermediaryBankApiEntityArray } from "./intermediary.bank.entity.response";
4
5
  export type IBankApiEntityResponse = IBaseResponse<IBankApiEntity>;
5
6
  export type IBankApiEntityResponseArray = IBaseResponse<IBankApiEntity[]>;
6
7
  export type IBankFlowConfig = {
@@ -13,3 +14,7 @@ export type IBankFlowConfig = {
13
14
  };
14
15
  };
15
16
  };
17
+ export interface IBankEntityGet extends IBankApiEntity {
18
+ intermediaryBankDetails?: IIntermediaryBankApiEntityArray;
19
+ }
20
+ export type IBankEntityGetArray = IBankEntityGet[];
@@ -1,4 +1,5 @@
1
- import { IBankActionDataDto, IBankEntity, IEntityUpdateDto } from "../../entities";
1
+ import { IBankActionDataDto, IBankEntity, IEntityUpdateDto, IIntermediaryBankUpdateDto } from "../../entities";
2
2
  export interface IBankUpdateDto extends IEntityUpdateDto<IBankEntity> {
3
3
  actionData?: IBankActionDataDto;
4
+ intermediaryBankDetails?: IIntermediaryBankUpdateDto[];
4
5
  }
@@ -1,13 +1,8 @@
1
- import { BillingImpactEnum } from "../../entities";
2
- export interface IBillingCreateDto {
3
- startDate: string;
4
- endDate: string;
5
- projectId: number;
6
- totalAmount: number;
7
- totalMinutes: number;
8
- invoiceNumber?: number;
9
- writeOffAmount?: number;
1
+ import { BillingImpactEnum, BillingStatusEnum, IBillingEntity, IEntityCreateDto } from "../../entities";
2
+ export type IBillingCreateExclude = "paymentStatus" | "status" | "writeoffAmount" | "tdsAmount" | "totalAmountPaid" | "creditNoteAmount" | "invoicePdfUrl";
3
+ export interface IBillingCreateDto extends Omit<IEntityCreateDto<IBillingEntity>, IBillingCreateExclude> {
10
4
  timesheets: IBillingTimesheetsDto;
5
+ status?: BillingStatusEnum;
11
6
  }
12
7
  export interface IBillingTimesheetUnchagedDto {
13
8
  id: number;
@@ -1,53 +1,24 @@
1
- import { BillingActionsEnum, BillingStatusEnum, IAuditColumnEntity, IBillingEntity, IBillingTimesheetDetail, PaymentStatusEnum } from "../../entities";
1
+ import { BillingActionsEnum, BillingStatusEnum, IBillingEntity } from "../../entities";
2
2
  import { IBillingApiEntity } from "./billing.entity.api";
3
3
  import { IBillingTimesheetApiEntity } from "./billing.timesheet.entity.api";
4
4
  import { IUpdateBillingDto } from "./billing.update.dto.interface";
5
5
  import { IProjectApiEntity } from "./project.entity.response";
6
6
  import { IUserApiEntity } from "./user.entity.api";
7
- export interface IBillingEntityResponse extends IAuditColumnEntity {
8
- id: number;
9
- startDate: string;
10
- endDate: string;
11
- projectId: number;
12
- totalMinutes: number;
13
- totalAmount: number;
14
- invoiceNumber?: number;
15
- paymentStatus: PaymentStatusEnum;
16
- billingTimesheets: IBillingTimesheetDetail[];
17
- status?: BillingStatusEnum;
18
- writeoffAmount?: number;
19
- }
20
- export type IBillingEntityGet = {
7
+ export type IBillingEntityResponse = {
21
8
  billing: IBillingApiEntity;
22
9
  billingTimesheets: IBillingTimesheetApiEntity[];
23
10
  };
24
- export interface IBillingEntitySearchResponse {
25
- billings: IBillingEntityGet[];
11
+ export interface IUserEntityRelation {
26
12
  users?: IUserApiEntity[];
13
+ }
14
+ export interface IProjectEntityRelation {
27
15
  projects?: IProjectApiEntity[];
28
16
  }
29
- export interface IBillingEntitySearchResponseInclude extends IBillingEntitySearchResponse {
17
+ export interface IBillingRelatedEntities extends IUserEntityRelation, IProjectEntityRelation {
18
+ }
19
+ export interface IBillingEntitySearchResponse extends IBillingRelatedEntities {
20
+ billings: IBillingEntityResponse[];
30
21
  }
31
- export type IBillingEntityUpdateGet = {
32
- id: number;
33
- startDate: string;
34
- endDate: string;
35
- projectId: number;
36
- totalAmount: number;
37
- totalMinutes: number;
38
- paymentStatus: PaymentStatusEnum;
39
- status: BillingStatusEnum;
40
- invoiceNumber?: number;
41
- writeoffAmount: number;
42
- totalAmountPaid: number;
43
- tdsAmount: number;
44
- creditNoteAmount: number;
45
- createdOn: string;
46
- updatedOn: string;
47
- createdBy: number;
48
- updatedBy: number;
49
- timesheets: IBillingTimesheetApiEntity[];
50
- };
51
22
  export type IBillingFlowConfig = {
52
23
  [key in BillingStatusEnum]?: {
53
24
  actions: {
@@ -1,21 +1,10 @@
1
- import { BillingImpactEnum, BillingActionsEnum, BillingTimesheetStatusEnum, IBillingEntity, IBillingTimesheetEntity, IEntityUpdateDto } from "../../entities";
1
+ import { BillingActionsEnum, IBillingEntity, IBillingEntityCreateDtoValidationData, IBillingTimesheetUpdateDto, IEntityUpdateDto } from "../../entities";
2
2
  export interface IBillingUpdateDto extends IEntityUpdateDto<IBillingEntity> {
3
3
  }
4
- export interface IBillingTimesheetUpdateDto extends IEntityUpdateDto<IBillingTimesheetEntity> {
5
- id?: number;
6
- task?: string;
7
- description?: string;
8
- dateCode?: string;
9
- totalDuration?: number;
10
- totalAmount?: number;
11
- impact?: BillingImpactEnum;
12
- amendmentPurpose?: string;
13
- }
14
- export interface IBillingTimesheetDeleteDto extends Partial<IBillingTimesheetEntity> {
15
- id: number;
16
- changedStatus: BillingTimesheetStatusEnum;
17
- }
18
4
  export interface IUpdateBillingDto extends IBillingUpdateDto {
19
5
  action?: BillingActionsEnum;
20
6
  timesheets?: IBillingTimesheetUpdateDto[];
21
7
  }
8
+ export interface IBillingUpdateDtoValidationData extends IBillingEntityCreateDtoValidationData {
9
+ billingEntity: IBillingEntity;
10
+ }
@@ -0,0 +1,3 @@
1
+ import { IApiEntity, IIntermediaryBankEntity } from "../../entities";
2
+ export type IIntermediaryBankApiEntity = IApiEntity<IIntermediaryBankEntity>;
3
+ export type IIntermediaryBankApiEntityArray = IIntermediaryBankApiEntity[];
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ import { IApiEntity, IOrganizationEntity } from "../../entities";
2
+ export type IOrganizationApiEntity = IApiEntity<IOrganizationEntity>;
3
+ export type IOrganizationApiEntityArray = IOrganizationApiEntity[];
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +1,3 @@
1
1
  export * from "./constants";
2
2
  export * from "./entity_constants";
3
+ export * from "./util.constants";
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./constants"), exports);
18
18
  __exportStar(require("./entity_constants"), exports);
19
+ __exportStar(require("./util.constants"), exports);
@@ -0,0 +1,2 @@
1
+ export declare const onesValues: string[];
2
+ export declare const tensValues: string[];
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.tensValues = exports.onesValues = void 0;
4
+ exports.onesValues = [
5
+ "",
6
+ "One",
7
+ "Two",
8
+ "Three",
9
+ "Four",
10
+ "Five",
11
+ "Six",
12
+ "Seven",
13
+ "Eight",
14
+ "Nine",
15
+ "Ten",
16
+ "Eleven",
17
+ "Twelve",
18
+ "Thirteen",
19
+ "Fourteen",
20
+ "Fifteen",
21
+ "Sixteen",
22
+ "Seventeen",
23
+ "Eighteen",
24
+ "Nineteen",
25
+ ];
26
+ exports.tensValues = [
27
+ "",
28
+ "",
29
+ "Twenty",
30
+ "Thirty",
31
+ "Forty",
32
+ "Fifty",
33
+ "Sixty",
34
+ "Seventy",
35
+ "Eighty",
36
+ "Ninety",
37
+ ];
@@ -5,11 +5,11 @@ export declare enum BankEntityKeysEnum {
5
5
  name = "name",
6
6
  accountNo = "accountNo",
7
7
  branchAddress = "branchAddress",
8
- micrCode = "micrCode",
9
8
  ifscCode = "ifscCode",
10
9
  emailForPaymentInfoCsv = "emailForPaymentInfoCsv",
11
10
  status = "status",
12
- remark = "remark"
11
+ remark = "remark",
12
+ swiftAddress = "swiftAddress"
13
13
  }
14
14
  export declare namespace BankEntityKeysEnum {
15
15
  const keyLabelMap: Record<BankEntityKeysEnum, string>;
@@ -11,11 +11,11 @@ var BankEntityKeysEnum;
11
11
  BankEntityKeysEnum["name"] = "name";
12
12
  BankEntityKeysEnum["accountNo"] = "accountNo";
13
13
  BankEntityKeysEnum["branchAddress"] = "branchAddress";
14
- BankEntityKeysEnum["micrCode"] = "micrCode";
15
14
  BankEntityKeysEnum["ifscCode"] = "ifscCode";
16
15
  BankEntityKeysEnum["emailForPaymentInfoCsv"] = "emailForPaymentInfoCsv";
17
16
  BankEntityKeysEnum["status"] = "status";
18
17
  BankEntityKeysEnum["remark"] = "remark";
18
+ BankEntityKeysEnum["swiftAddress"] = "swiftAddress";
19
19
  })(BankEntityKeysEnum || (exports.BankEntityKeysEnum = BankEntityKeysEnum = {}));
20
20
  (function (BankEntityKeysEnum) {
21
21
  BankEntityKeysEnum.keyLabelMap = {
@@ -25,11 +25,11 @@ var BankEntityKeysEnum;
25
25
  [BankEntityKeysEnum.name]: "Bank Name",
26
26
  [BankEntityKeysEnum.accountNo]: "Account Number",
27
27
  [BankEntityKeysEnum.branchAddress]: "Branch Address",
28
- [BankEntityKeysEnum.micrCode]: "MICR Code",
29
28
  [BankEntityKeysEnum.ifscCode]: "IFSC Code",
30
29
  [BankEntityKeysEnum.emailForPaymentInfoCsv]: "Email for Payment Info CSV",
31
30
  [BankEntityKeysEnum.status]: "Status",
32
31
  [BankEntityKeysEnum.remark]: "Remark",
32
+ [BankEntityKeysEnum.swiftAddress]: "Swift Address",
33
33
  };
34
34
  function getLabel(key) {
35
35
  if (!Object.values(BankEntityKeysEnum).includes(key)) {
@@ -11,7 +11,8 @@ export declare enum BillingActionsEnum {
11
11
  UPDATE_PAYMENT = "updatePayment",
12
12
  CREDIT_NOTE = "creditNote",
13
13
  WRITE_OFF = "writeOff",
14
- TDS = "tds"
14
+ TDS = "tds",
15
+ PDF_VIEW = "pdfView"
15
16
  }
16
17
  export declare namespace BillingActionsEnum {
17
18
  function getLabel(action: BillingActionsEnum): string;
@@ -18,6 +18,9 @@ var BillingActionsEnum;
18
18
  BillingActionsEnum["CREDIT_NOTE"] = "creditNote";
19
19
  BillingActionsEnum["WRITE_OFF"] = "writeOff";
20
20
  BillingActionsEnum["TDS"] = "tds";
21
+ BillingActionsEnum["PDF_VIEW"] = "pdfView";
22
+ // PDF_GENERATE = "pdfGenerate",
23
+ // PDF_DELETE = "pdfDelete",
21
24
  })(BillingActionsEnum || (exports.BillingActionsEnum = BillingActionsEnum = {}));
22
25
  (function (BillingActionsEnum) {
23
26
  const actionLabelMap = {
@@ -34,6 +37,9 @@ var BillingActionsEnum;
34
37
  [BillingActionsEnum.CREDIT_NOTE]: "Credit Note",
35
38
  [BillingActionsEnum.WRITE_OFF]: "Write Off",
36
39
  [BillingActionsEnum.TDS]: "TDS",
40
+ // [BillingActionsEnum.PDF_DELETE]: "Pdf Delete",
41
+ // [BillingActionsEnum.PDF_GENERATE]: "Pdf Generate",
42
+ [BillingActionsEnum.PDF_VIEW]: "Pdf View",
37
43
  };
38
44
  function getLabel(action) {
39
45
  if (!Object.values(BillingActionsEnum).includes(action)) {
@@ -0,0 +1,4 @@
1
+ export declare enum BillingInvoiceTypeEnum {
2
+ CLIENT = "client",
3
+ CLIENT_AFFILIATE = "client_affiliate"
4
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BillingInvoiceTypeEnum = void 0;
4
+ var BillingInvoiceTypeEnum;
5
+ (function (BillingInvoiceTypeEnum) {
6
+ BillingInvoiceTypeEnum["CLIENT"] = "client";
7
+ BillingInvoiceTypeEnum["CLIENT_AFFILIATE"] = "client_affiliate";
8
+ })(BillingInvoiceTypeEnum || (exports.BillingInvoiceTypeEnum = BillingInvoiceTypeEnum = {}));
@@ -4,9 +4,9 @@ export * from "./enums/organization.entity.enum";
4
4
  export * from "./func/convert-to-common-entity.func";
5
5
  export * from "./interface/audit-column.entity.interface";
6
6
  export * from "./interface/entity.utils.interface";
7
+ export * from "./interface/organization.entity.interface";
7
8
  export * from "./interface/task.entity.interface";
8
9
  export * from "./interface/user.entity.interface";
9
- export * from "./interface/organization.entity.interface";
10
10
  export * from "./interface/designation.entity.interface";
11
11
  export * from "./interface/industry.entity.interface";
12
12
  export * from "./interface/configuration.entity.interface";
@@ -14,51 +14,54 @@ export * from "./interface/rate.entity.interface";
14
14
  export * from "./interface/client.entity.interface";
15
15
  export * from "./interface/project.entity.interface";
16
16
  export * from "./interface/timesheet.entity.interface";
17
- export * from "./interface/reimbursement.entity.interface";
18
17
  export * from "./enums/reimbursement.entity.enum";
19
- export * from "./interface/expense_type.entity.interface";
18
+ export * from "./interface/reimbursement.entity.interface";
20
19
  export * from "./enums/expense_type.entity.enum";
20
+ export * from "./interface/expense_type.entity.interface";
21
21
  export * from "./enums/billing.impact.enum";
22
- export * from "./interface/billing.entity.interface";
23
22
  export * from "./enums/payment_status.enum";
24
- export * from "./enums/billing.timesheet.change.status.enum";
23
+ export * from "./interface/billing.entity.interface";
25
24
  export * from "./enums/billing.status.enum";
25
+ export * from "./enums/billing.timesheet.change.status.enum";
26
26
  export * from "./interface/office.location.entity";
27
27
  export * from "./interface/bank.entity.interface";
28
28
  export * from "./enums/billing.payment.type.enum";
29
29
  export * from "./interface/billing_payment.entity.interface";
30
30
  export * from "./interface/client_affiliate_entity.interface";
31
- export * from "./interface/role.entity.interface";
32
31
  export * from "./interface/permission.entity.interface";
32
+ export * from "./interface/role.entity.interface";
33
33
  export * from "./interface/role.permission.mapping.entity.interface";
34
- export * from "./interface/billing_transaction.entity.interface";
35
34
  export * from "./enums/billing.transaction.enum";
35
+ export * from "./interface/billing_transaction.entity.interface";
36
36
  export * from "./interface/timesheet_history.entity.interface";
37
37
  export * from "./enums/history_operation.enum";
38
38
  export * from "./interface/billing_history.entity.interface";
39
39
  export * from "./interface/billing_timesheet_history.entity.interface";
40
40
  export * from "./enums/history_operation.enum";
41
- export * from "./enums/timesheet.status.enum";
42
41
  export * from "./enums/timesheet.action.enum";
42
+ export * from "./enums/timesheet.status.enum";
43
43
  export * from "./enums/billing.action.enum";
44
44
  export * from "./enums/configuration.type.enum";
45
45
  export * from "./enums/project_user_status.enum";
46
- export * from "./interface/reimbursement_history.entity.interface";
47
46
  export * from "./interface/reimbursement_expense.entity.interface";
47
+ export * from "./interface/reimbursement_history.entity.interface";
48
48
  export * from "./enums/entity_search_constraint_type.enum";
49
49
  export * from "./enums/timesheet_entity_keys.enum";
50
50
  export * from "./enums/bank_action.enum";
51
+ export * from "./enums/bank_entity_keys.enum";
51
52
  export * from "./enums/bank_status.enum";
52
53
  export * from "./interface/bank_history.entity.interface";
53
- export * from "./enums/bank_entity_keys.enum";
54
54
  export * from "./enums/leave.action.enum";
55
55
  export * from "./enums/leave.status.enum";
56
+ export * from "./enums/leave_entity_keys.enum";
56
57
  export * from "./interface/leave.entity.interface";
57
58
  export * from "./interface/leave_history.entity.interface";
58
- export * from "./enums/leave_entity_keys.enum";
59
59
  export * from "./enums/work.from.home.action.enum";
60
60
  export * from "./enums/work.from.home.status.enum";
61
61
  export * from "./enums/work_from_entity_keys.enum";
62
62
  export * from "./interface/work_from_home.entity.interface";
63
63
  export * from "./interface/work_from_home_history.entity.interface";
64
64
  export * from "./interface/country.entity.interface";
65
+ export * from "./enums/billing_invoice_type.enum";
66
+ export * from "./interface/billing_timesheet.entity.interface";
67
+ export * from "./interface/intermediary_bank.entity.interface";
@@ -21,9 +21,9 @@ __exportStar(require("./enums/organization.entity.enum"), exports);
21
21
  __exportStar(require("./func/convert-to-common-entity.func"), exports);
22
22
  __exportStar(require("./interface/audit-column.entity.interface"), exports);
23
23
  __exportStar(require("./interface/entity.utils.interface"), exports);
24
+ __exportStar(require("./interface/organization.entity.interface"), exports);
24
25
  __exportStar(require("./interface/task.entity.interface"), exports);
25
26
  __exportStar(require("./interface/user.entity.interface"), exports);
26
- __exportStar(require("./interface/organization.entity.interface"), exports);
27
27
  __exportStar(require("./interface/designation.entity.interface"), exports);
28
28
  __exportStar(require("./interface/industry.entity.interface"), exports);
29
29
  __exportStar(require("./interface/configuration.entity.interface"), exports);
@@ -31,51 +31,54 @@ __exportStar(require("./interface/rate.entity.interface"), exports);
31
31
  __exportStar(require("./interface/client.entity.interface"), exports);
32
32
  __exportStar(require("./interface/project.entity.interface"), exports);
33
33
  __exportStar(require("./interface/timesheet.entity.interface"), exports);
34
- __exportStar(require("./interface/reimbursement.entity.interface"), exports);
35
34
  __exportStar(require("./enums/reimbursement.entity.enum"), exports);
36
- __exportStar(require("./interface/expense_type.entity.interface"), exports);
35
+ __exportStar(require("./interface/reimbursement.entity.interface"), exports);
37
36
  __exportStar(require("./enums/expense_type.entity.enum"), exports);
37
+ __exportStar(require("./interface/expense_type.entity.interface"), exports);
38
38
  __exportStar(require("./enums/billing.impact.enum"), exports);
39
- __exportStar(require("./interface/billing.entity.interface"), exports);
40
39
  __exportStar(require("./enums/payment_status.enum"), exports);
41
- __exportStar(require("./enums/billing.timesheet.change.status.enum"), exports);
40
+ __exportStar(require("./interface/billing.entity.interface"), exports);
42
41
  __exportStar(require("./enums/billing.status.enum"), exports);
42
+ __exportStar(require("./enums/billing.timesheet.change.status.enum"), exports);
43
43
  __exportStar(require("./interface/office.location.entity"), exports);
44
44
  __exportStar(require("./interface/bank.entity.interface"), exports);
45
45
  __exportStar(require("./enums/billing.payment.type.enum"), exports);
46
46
  __exportStar(require("./interface/billing_payment.entity.interface"), exports);
47
47
  __exportStar(require("./interface/client_affiliate_entity.interface"), exports);
48
- __exportStar(require("./interface/role.entity.interface"), exports);
49
48
  __exportStar(require("./interface/permission.entity.interface"), exports);
49
+ __exportStar(require("./interface/role.entity.interface"), exports);
50
50
  __exportStar(require("./interface/role.permission.mapping.entity.interface"), exports);
51
- __exportStar(require("./interface/billing_transaction.entity.interface"), exports);
52
51
  __exportStar(require("./enums/billing.transaction.enum"), exports);
52
+ __exportStar(require("./interface/billing_transaction.entity.interface"), exports);
53
53
  __exportStar(require("./interface/timesheet_history.entity.interface"), exports);
54
54
  __exportStar(require("./enums/history_operation.enum"), exports);
55
55
  __exportStar(require("./interface/billing_history.entity.interface"), exports);
56
56
  __exportStar(require("./interface/billing_timesheet_history.entity.interface"), exports);
57
57
  __exportStar(require("./enums/history_operation.enum"), exports);
58
- __exportStar(require("./enums/timesheet.status.enum"), exports);
59
58
  __exportStar(require("./enums/timesheet.action.enum"), exports);
59
+ __exportStar(require("./enums/timesheet.status.enum"), exports);
60
60
  __exportStar(require("./enums/billing.action.enum"), exports);
61
61
  __exportStar(require("./enums/configuration.type.enum"), exports);
62
62
  __exportStar(require("./enums/project_user_status.enum"), exports);
63
- __exportStar(require("./interface/reimbursement_history.entity.interface"), exports);
64
63
  __exportStar(require("./interface/reimbursement_expense.entity.interface"), exports);
64
+ __exportStar(require("./interface/reimbursement_history.entity.interface"), exports);
65
65
  __exportStar(require("./enums/entity_search_constraint_type.enum"), exports);
66
66
  __exportStar(require("./enums/timesheet_entity_keys.enum"), exports);
67
67
  __exportStar(require("./enums/bank_action.enum"), exports);
68
+ __exportStar(require("./enums/bank_entity_keys.enum"), exports);
68
69
  __exportStar(require("./enums/bank_status.enum"), exports);
69
70
  __exportStar(require("./interface/bank_history.entity.interface"), exports);
70
- __exportStar(require("./enums/bank_entity_keys.enum"), exports);
71
71
  __exportStar(require("./enums/leave.action.enum"), exports);
72
72
  __exportStar(require("./enums/leave.status.enum"), exports);
73
+ __exportStar(require("./enums/leave_entity_keys.enum"), exports);
73
74
  __exportStar(require("./interface/leave.entity.interface"), exports);
74
75
  __exportStar(require("./interface/leave_history.entity.interface"), exports);
75
- __exportStar(require("./enums/leave_entity_keys.enum"), exports);
76
76
  __exportStar(require("./enums/work.from.home.action.enum"), exports);
77
77
  __exportStar(require("./enums/work.from.home.status.enum"), exports);
78
78
  __exportStar(require("./enums/work_from_entity_keys.enum"), exports);
79
79
  __exportStar(require("./interface/work_from_home.entity.interface"), exports);
80
80
  __exportStar(require("./interface/work_from_home_history.entity.interface"), exports);
81
81
  __exportStar(require("./interface/country.entity.interface"), exports);
82
+ __exportStar(require("./enums/billing_invoice_type.enum"), exports);
83
+ __exportStar(require("./interface/billing_timesheet.entity.interface"), exports);
84
+ __exportStar(require("./interface/intermediary_bank.entity.interface"), exports);
@@ -9,18 +9,11 @@ export interface IBankEntity extends IAuditColumnEntity {
9
9
  name: string;
10
10
  accountNo: string;
11
11
  branchAddress: string;
12
- micrCode: string;
13
12
  ifscCode: string;
14
13
  emailForPaymentInfoCsv: string;
15
14
  status: BankStatusEnum;
16
15
  remark?: string;
17
16
  swiftAddress?: string;
18
- eefcBankAccountNo?: string;
19
- intermediaryBankDetails?: string;
20
- intermediaryBankAccountNo?: string;
21
- intermediaryBankAddress?: string;
22
- intermediarySwiftAddress?: string;
23
- ibanNo?: string;
24
17
  }
25
18
  export interface IBankEntityUpdateDtoValidationData {
26
19
  bankEntity: IBankEntity;
@@ -1,9 +1,10 @@
1
- import { BillingImpactEnum } from "../enums/billing.impact.enum";
2
1
  import { BillingStatusEnum } from "../enums/billing.status.enum";
3
- import { BillingTimesheetStatusEnum } from "../enums/billing.timesheet.change.status.enum";
2
+ import { BillingInvoiceTypeEnum } from "../enums/billing_invoice_type.enum";
4
3
  import { PaymentStatusEnum } from "../enums/payment_status.enum";
5
4
  import { IAuditColumnEntity } from "./audit-column.entity.interface";
6
- import { EntityEnum, IEntityCreateDto, IEntityFilterData } from "./entity.utils.interface";
5
+ import { EntityEnum, IEntityFilterData } from "./entity.utils.interface";
6
+ import { IProjectEntity } from "./project.entity.interface";
7
+ import { ITimesheetEntity } from "./timesheet.entity.interface";
7
8
  export interface IBillingEntity extends IAuditColumnEntity {
8
9
  id: number;
9
10
  startDate: string;
@@ -11,49 +12,24 @@ export interface IBillingEntity extends IAuditColumnEntity {
11
12
  projectId: number;
12
13
  totalAmount: number;
13
14
  totalMinutes: number;
14
- invoiceNumber?: number;
15
+ invoiceNumber: string;
15
16
  paymentStatus: PaymentStatusEnum;
16
17
  status: BillingStatusEnum;
17
18
  writeoffAmount: number;
18
19
  totalAmountPaid: number;
19
20
  tdsAmount: number;
20
21
  creditNoteAmount: number;
21
- }
22
- export interface IBillingTimesheetEntity extends IAuditColumnEntity {
23
- id: number;
24
- billingId: number;
25
- dateCode: string;
26
- timesheetId: number;
27
- userId: number;
28
- projectId: number;
29
- task: string;
30
- description?: string;
31
- totalDuration: number;
32
- totalAmount: number;
33
- impact: BillingImpactEnum;
34
- amendmentPurpose?: string;
35
- changedStatus: BillingTimesheetStatusEnum;
36
- }
37
- export interface IBillingTimesheetEntityCreateDto extends IEntityCreateDto<IBillingTimesheetEntity> {
38
- }
39
- export interface IBillingTimesheetDetail extends IAuditColumnEntity {
40
- timesheetId: number;
41
- totalAmount: number;
42
- changedStatus: BillingTimesheetStatusEnum;
43
- impact: BillingImpactEnum;
44
- amendmentPurpose?: string;
45
- userId: number;
46
- projectId: number;
47
- task: string;
48
- description?: string;
49
- totalDuration: number;
50
- dateCode: string;
51
- }
52
- export interface IBillingTimesheetDetailsArray extends Array<IBillingTimesheetDetail> {
22
+ invoiceEntityId: number;
23
+ invoiceEntityType: BillingInvoiceTypeEnum;
24
+ invoicePdfUrl?: string | null;
25
+ invoiceContactName: string;
26
+ bankId: number;
53
27
  }
54
28
  export interface IBillingEntityFilterDto extends IEntityFilterData<IBillingEntity> {
55
29
  }
56
- export interface IBillingTimesheetEntityFilterDto extends IEntityFilterData<IBillingTimesheetEntity> {
30
+ export interface IBillingEntityCreateDtoValidationData {
31
+ projectEntity: IProjectEntity;
32
+ timesheetEntities: ITimesheetEntity[];
57
33
  }
58
34
  export declare const billingRelations: EntityEnum[];
59
35
  export declare const billingEntities: EntityEnum[];
@@ -0,0 +1,49 @@
1
+ import { BillingImpactEnum } from "../enums/billing.impact.enum";
2
+ import { BillingTimesheetStatusEnum } from "../enums/billing.timesheet.change.status.enum";
3
+ import { IAuditColumnEntity } from "./audit-column.entity.interface";
4
+ import { IEntityCreateDto, IEntityFilterData, IEntityUpdateDto } from "./entity.utils.interface";
5
+ import { ITimesheetEntity } from "./timesheet.entity.interface";
6
+ export interface IBillingTimesheetEntity extends IAuditColumnEntity {
7
+ id: number;
8
+ billingId: number;
9
+ dateCode: string;
10
+ timesheetId: number;
11
+ userId: number;
12
+ projectId: number;
13
+ task: string;
14
+ description?: string;
15
+ totalDuration: number;
16
+ totalAmount: number;
17
+ impact: BillingImpactEnum;
18
+ amendmentPurpose?: string;
19
+ changedStatus: BillingTimesheetStatusEnum;
20
+ }
21
+ export interface IBillingTimesheetEntityCreateDto extends IEntityCreateDto<IBillingTimesheetEntity> {
22
+ }
23
+ export interface IBillingTimesheetDetail extends IAuditColumnEntity {
24
+ timesheetId: number;
25
+ billingId: number;
26
+ totalAmount: number;
27
+ changedStatus: BillingTimesheetStatusEnum;
28
+ impact: BillingImpactEnum;
29
+ amendmentPurpose?: string;
30
+ userId: number;
31
+ projectId: number;
32
+ task: string;
33
+ description?: string;
34
+ totalDuration: number;
35
+ dateCode: string;
36
+ }
37
+ export interface IBillingTimesheetDetailsArray extends Array<IBillingTimesheetDetail> {
38
+ }
39
+ export interface IBillingTimesheetEntityFilterDto extends IEntityFilterData<IBillingTimesheetEntity> {
40
+ }
41
+ export interface IBillingTimesheetEntityCreateDtoValidationResult {
42
+ timesheets: ITimesheetEntity[];
43
+ }
44
+ export interface IBillingTimesheetUpdateDto extends IEntityUpdateDto<IBillingTimesheetEntity> {
45
+ }
46
+ export interface IBillingTimesheetDeleteDto extends Partial<IBillingTimesheetEntity> {
47
+ id: number;
48
+ changedStatus: BillingTimesheetStatusEnum;
49
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -3,6 +3,12 @@ import { Modify } from "../../misc/interface/modify.interface";
3
3
  import { EntitySearchConstraintTypeEnum } from "../enums/entity_search_constraint_type.enum";
4
4
  import { HistoryOperationEnum } from "../enums/history_operation.enum";
5
5
  import { IAuditColumnEntity } from "./audit-column.entity.interface";
6
+ import { IBillingEntity } from "./billing.entity.interface";
7
+ import { IBillingTimesheetEntity } from "./billing_timesheet.entity.interface";
8
+ import { IClientEntity } from "./client.entity.interface";
9
+ import { IProjectEntity } from "./project.entity.interface";
10
+ import { ITimesheetEntity } from "./timesheet.entity.interface";
11
+ import { IUserEntity } from "./user.entity.interface";
6
12
  export type IApiEntity<T extends {
7
13
  createdOn: Date;
8
14
  updatedOn: Date;
@@ -14,15 +20,52 @@ export type IEntityCreateDto<T> = Omit<T, "id" | keyof IAuditColumnEntity>;
14
20
  export type IEntityUpdateDto<T> = Omit<Partial<T>, "id" | keyof IAuditColumnEntity>;
15
21
  export declare enum EntityEnum {
16
22
  BILLING = "billing",
23
+ BILLING_TIMESHEET = "billing_timesheet",
24
+ TIMESHEET = "timesheet",
17
25
  USER = "user",
18
26
  PROJECT = "project",
19
27
  CLIENT = "client",
20
28
  TASK = "task",
21
29
  DESIGNATION = "designation",
22
- RATE = "rate"
30
+ RATE = "rate",
31
+ REIMBURSEMENT = "reimbursement",
32
+ REIMBURSEMENT_EXPENSE = "reimbursement_expense",
33
+ WORK_FROM_HOME = "work_from_home",
34
+ LEAVE = "leave",
35
+ ORGANIZATION = "organization"
23
36
  }
24
37
  export type ISearchIncludeEntity = {
25
38
  name: EntityEnum;
39
+ mappingProperties?: string[];
40
+ searchProperty?: string;
41
+ relations?: ISearchIncludeEntity[];
42
+ entities?: ISearchIncludeEntity[];
43
+ };
44
+ export type IEntityServiceResponse = {
45
+ [EntityEnum.BILLING]?: IBaseEntityServiceResponse<IBillingEntity>;
46
+ [EntityEnum.BILLING_TIMESHEET]?: IBaseEntityServiceResponse<IBillingTimesheetEntity>;
47
+ [EntityEnum.TIMESHEET]?: IBaseEntityServiceResponse<ITimesheetEntity>;
48
+ [EntityEnum.USER]?: IBaseEntityServiceResponse<IUserEntity>;
49
+ [EntityEnum.PROJECT]?: IBaseEntityServiceResponse<IProjectEntity>;
50
+ };
51
+ export type IBaseEntityServiceResponse<T> = {
52
+ baseEntities: T[];
53
+ relatedEntities?: IEntityServiceResponse;
54
+ };
55
+ export type IBaseEntityApiResponse<T extends {
56
+ createdOn: Date;
57
+ updatedOn: Date;
58
+ }> = {
59
+ baseEntities: IApiEntity<T>[];
60
+ relatedEntities?: {
61
+ [K in EntityEnum]?: K extends EntityEnum.BILLING ? IBaseEntityApiResponse<IBillingEntity> : K extends EntityEnum.BILLING_TIMESHEET ? IBaseEntityApiResponse<IBillingTimesheetEntity> : K extends EntityEnum.TIMESHEET ? IBaseEntityApiResponse<ITimesheetEntity> : K extends EntityEnum.USER ? IBaseEntityApiResponse<IUserEntity> : K extends EntityEnum.PROJECT ? IBaseEntityApiResponse<IProjectEntity> : K extends EntityEnum.CLIENT ? IBaseEntityApiResponse<IClientEntity> : never;
62
+ };
63
+ };
64
+ export type EntityRelationConfig<T> = {
65
+ [K in EntityEnum]?: {
66
+ mappingProperties: (keyof T)[];
67
+ searchProperty: K extends EntityEnum.USER ? keyof IUserEntity : K extends EntityEnum.PROJECT ? keyof IProjectEntity : K extends EntityEnum.BILLING_TIMESHEET ? keyof IBillingTimesheetEntity : never;
68
+ };
26
69
  };
27
70
  export type IEntityApiResponse<T extends {
28
71
  createdOn: Date;
@@ -4,10 +4,17 @@ exports.EntityEnum = void 0;
4
4
  var EntityEnum;
5
5
  (function (EntityEnum) {
6
6
  EntityEnum["BILLING"] = "billing";
7
+ EntityEnum["BILLING_TIMESHEET"] = "billing_timesheet";
8
+ EntityEnum["TIMESHEET"] = "timesheet";
7
9
  EntityEnum["USER"] = "user";
8
10
  EntityEnum["PROJECT"] = "project";
9
11
  EntityEnum["CLIENT"] = "client";
10
12
  EntityEnum["TASK"] = "task";
11
13
  EntityEnum["DESIGNATION"] = "designation";
12
14
  EntityEnum["RATE"] = "rate";
15
+ EntityEnum["REIMBURSEMENT"] = "reimbursement";
16
+ EntityEnum["REIMBURSEMENT_EXPENSE"] = "reimbursement_expense";
17
+ EntityEnum["WORK_FROM_HOME"] = "work_from_home";
18
+ EntityEnum["LEAVE"] = "leave";
19
+ EntityEnum["ORGANIZATION"] = "organization";
13
20
  })(EntityEnum || (exports.EntityEnum = EntityEnum = {}));
@@ -0,0 +1,21 @@
1
+ import { CurrencyEnum } from "../../enums";
2
+ import { IAuditColumnEntity } from "./audit-column.entity.interface";
3
+ import { IEntityCreateDto, IEntityFilterData, IEntityUpdateDto } from "./entity.utils.interface";
4
+ export interface IIntermediaryBankEntity extends IAuditColumnEntity {
5
+ id: number;
6
+ name: string;
7
+ bankId: number;
8
+ accountNo: string;
9
+ currency: CurrencyEnum;
10
+ swiftCode: string;
11
+ address: string;
12
+ }
13
+ export type IIntermediaryBankCreateDtoExclude = "bankId";
14
+ export interface IIntermediaryBankCreateDto extends Omit<IEntityCreateDto<IIntermediaryBankEntity>, IIntermediaryBankCreateDtoExclude> {
15
+ bankId?: number;
16
+ }
17
+ export interface IIntermediaryBankUpdateDto extends IEntityUpdateDto<IIntermediaryBankEntity> {
18
+ id?: number;
19
+ }
20
+ export interface IIntermediaryBankFilterDto extends IEntityFilterData<IIntermediaryBankEntity> {
21
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +1,6 @@
1
1
  import { OrganizationStatusEnum } from "../enums/organization.entity.enum";
2
2
  import { IAuditColumnEntity } from "./audit-column.entity.interface";
3
+ import { IEntityFilterData } from "./entity.utils.interface";
3
4
  export interface IOrganizationEntity extends IAuditColumnEntity {
4
5
  id: string;
5
6
  name: string;
@@ -8,4 +9,8 @@ export interface IOrganizationEntity extends IAuditColumnEntity {
8
9
  description: string;
9
10
  address: string;
10
11
  status: OrganizationStatusEnum;
12
+ panNo: string;
13
+ panDocumentUrl?: string | null;
14
+ }
15
+ export interface IOrganizationEntityFilterDto extends IEntityFilterData<IOrganizationEntity> {
11
16
  }
@@ -7,4 +7,5 @@ export declare enum CurrencyEnum {
7
7
  export declare namespace CurrencyEnum {
8
8
  function parse(value: string): CurrencyEnum;
9
9
  function getNames(): string[];
10
+ function getFullCurrencyName(currency: CurrencyEnum | string): string;
10
11
  }
@@ -23,15 +23,37 @@ var CurrencyEnum;
23
23
  return CurrencyEnum.GBP;
24
24
  default:
25
25
  throw new exceptions_1.AppBadRequestException({
26
- message: [`Invalid currency: '${value}'. Valid values are: ${CurrencyEnum.getNames().join(", ")}`],
26
+ message: [
27
+ `Invalid currency: '${value}'. Valid values are: ${CurrencyEnum.getNames().join(", ")}`,
28
+ ],
27
29
  key: error_key_enum_1.ErrorKeyEnum.CURRENCY,
28
30
  });
29
31
  }
30
32
  }
31
33
  CurrencyEnum.parse = parse;
32
34
  function getNames() {
33
- return Object.values(CurrencyEnum).filter(value => typeof value === 'string');
34
- ;
35
+ return Object.values(CurrencyEnum).filter((value) => typeof value === "string");
35
36
  }
36
37
  CurrencyEnum.getNames = getNames;
38
+ // Internal map
39
+ const CurrencyNameMap = {
40
+ USD: "United States Dollar",
41
+ INR: "Indian Rupees",
42
+ GBP: "British Sterling Pound",
43
+ EUR: "Euro",
44
+ };
45
+ // Public function to get full currency name
46
+ function getFullCurrencyName(currency) {
47
+ const name = CurrencyNameMap[currency];
48
+ if (!name) {
49
+ throw new exceptions_1.AppBadRequestException({
50
+ message: [
51
+ `Invalid currency for full name: '${currency}'. Valid values are: ${CurrencyEnum.getNames().join(", ")}`,
52
+ ],
53
+ key: error_key_enum_1.ErrorKeyEnum.CURRENCY,
54
+ });
55
+ }
56
+ return name;
57
+ }
58
+ CurrencyEnum.getFullCurrencyName = getFullCurrencyName;
37
59
  })(CurrencyEnum || (exports.CurrencyEnum = CurrencyEnum = {}));
@@ -137,3 +137,32 @@ export declare function getPropertyFilterByPermissionFn<T>(permissionFilterConfi
137
137
  * console.log(user); // Output: { name: 'Alice', age: 30 }
138
138
  */
139
139
  export declare function setResponseValue<K extends keyof T, T>(obj: T, key: K, value: T[K]): void;
140
+ /**
141
+ * Converts a numeric string into words following the Indian numbering system.
142
+ *
143
+ * @param {string} numStr - The number in string format. Can contain commas (e.g., "1,23,456").
144
+ *
145
+ * @returns {string} The number expressed in words using the Indian format (e.g., Crores, Lakhs).
146
+ *
147
+ * @example
148
+ * const ones = ["", "One", "Two", "Three", ..., "Nineteen"];
149
+ * const tens = ["", "", "Twenty", "Thirty", ..., "Ninety"];
150
+ *
151
+ * numberToWordsIndian("1,23,456", ones, tens);
152
+ * // Output: "One Lakh Twenty Three Thousand Four Hundred Fifty Six"
153
+ */
154
+ export declare function numberToWordsIndian(numStr: string): string;
155
+ /**
156
+ * Converts a total number of minutes into a formatted "HH:MM" string.
157
+ *
158
+ * @param {number} totalMinutes - The total number of minutes to convert.
159
+ *
160
+ * @returns {string} A string representing the equivalent time in "HH:MM" format,
161
+ * with hours and minutes padded to two digits.
162
+ *
163
+ * @example
164
+ * minutesToHoursMinutes(75); // Output: "01:15"
165
+ * minutesToHoursMinutes(5); // Output: "00:05"
166
+ * minutesToHoursMinutes(135);// Output: "02:15"
167
+ */
168
+ export declare function minutesToHoursMinutes(totalMinutes: number): string;
@@ -27,6 +27,9 @@ exports.getFilterByPermission = getFilterByPermission;
27
27
  exports.getFilterByPermissionFn = getFilterByPermissionFn;
28
28
  exports.getPropertyFilterByPermissionFn = getPropertyFilterByPermissionFn;
29
29
  exports.setResponseValue = setResponseValue;
30
+ exports.numberToWordsIndian = numberToWordsIndian;
31
+ exports.minutesToHoursMinutes = minutesToHoursMinutes;
32
+ const util_constants_1 = require("../constants/util.constants");
30
33
  function groupByFunction(list, keyGetter) {
31
34
  const map = new Map();
32
35
  list.forEach((item) => {
@@ -281,3 +284,73 @@ function getPropertyFilterByPermissionFn(permissionFilterConfig_1, propertyNames
281
284
  function setResponseValue(obj, key, value) {
282
285
  obj[key] = value;
283
286
  }
287
+ /**
288
+ * Converts a numeric string into words following the Indian numbering system.
289
+ *
290
+ * @param {string} numStr - The number in string format. Can contain commas (e.g., "1,23,456").
291
+ *
292
+ * @returns {string} The number expressed in words using the Indian format (e.g., Crores, Lakhs).
293
+ *
294
+ * @example
295
+ * const ones = ["", "One", "Two", "Three", ..., "Nineteen"];
296
+ * const tens = ["", "", "Twenty", "Thirty", ..., "Ninety"];
297
+ *
298
+ * numberToWordsIndian("1,23,456", ones, tens);
299
+ * // Output: "One Lakh Twenty Three Thousand Four Hundred Fifty Six"
300
+ */
301
+ function numberToWordsIndian(numStr) {
302
+ const ones = util_constants_1.onesValues;
303
+ const tens = util_constants_1.tensValues;
304
+ function twoDigits(n) {
305
+ if (n < 20)
306
+ return ones[n];
307
+ return tens[Math.floor(n / 10)] + (n % 10 !== 0 ? " " + ones[n % 10] : "");
308
+ }
309
+ function threeDigits(n) {
310
+ if (n < 100)
311
+ return twoDigits(n);
312
+ return (ones[Math.floor(n / 100)] +
313
+ " Hundred" +
314
+ (n % 100 !== 0 ? " " + twoDigits(n % 100) : ""));
315
+ }
316
+ // Remove commas and convert to number
317
+ const num = parseInt(numStr.replace(/,/g, ""), 10);
318
+ if (isNaN(num))
319
+ return "Invalid number";
320
+ if (num === 0)
321
+ return "Zero";
322
+ const crore = Math.floor(num / 10000000);
323
+ const lakh = Math.floor((num % 10000000) / 100000);
324
+ const thousand = Math.floor((num % 100000) / 1000);
325
+ const hundred = num % 1000;
326
+ let words = "";
327
+ if (crore)
328
+ words += threeDigits(crore) + " Crore ";
329
+ if (lakh)
330
+ words += threeDigits(lakh) + " Lakh ";
331
+ if (thousand)
332
+ words += threeDigits(thousand) + " Thousand ";
333
+ if (hundred)
334
+ words += threeDigits(hundred);
335
+ return words.trim();
336
+ }
337
+ /**
338
+ * Converts a total number of minutes into a formatted "HH:MM" string.
339
+ *
340
+ * @param {number} totalMinutes - The total number of minutes to convert.
341
+ *
342
+ * @returns {string} A string representing the equivalent time in "HH:MM" format,
343
+ * with hours and minutes padded to two digits.
344
+ *
345
+ * @example
346
+ * minutesToHoursMinutes(75); // Output: "01:15"
347
+ * minutesToHoursMinutes(5); // Output: "00:05"
348
+ * minutesToHoursMinutes(135);// Output: "02:15"
349
+ */
350
+ function minutesToHoursMinutes(totalMinutes) {
351
+ const hours = Math.floor(totalMinutes / 60);
352
+ const minutes = totalMinutes % 60;
353
+ const hoursStr = hours.toString().padStart(2, "0");
354
+ const minutesStr = minutes.toString().padStart(2, "0");
355
+ return `${hoursStr}:${minutesStr}`;
356
+ }
@@ -8,5 +8,6 @@ export declare class DateCodeModel {
8
8
  static fromDate(date: Date): string;
9
9
  getFormattedDate(): string;
10
10
  getFormattedDateWithMonthName(): string;
11
+ static formatDateCode(dateCode: string): string;
11
12
  isWithinOffset(offsetInDays: number): boolean;
12
13
  }
@@ -52,6 +52,10 @@ class DateCodeModel {
52
52
  getFormattedDateWithMonthName() {
53
53
  return (0, date_fns_1.format)(this.getDate(), "dd-MMM-yyyy");
54
54
  }
55
+ static formatDateCode(dateCode) {
56
+ const parsedDate = (0, date_fns_1.parse)(dateCode, "yyyyMMdd", new Date());
57
+ return (0, date_fns_1.format)(parsedDate, "MMMM d, yyyy");
58
+ }
55
59
  isWithinOffset(offsetInDays) {
56
60
  const todaysDateModel = new DateCodeModel(DateCodeModel.fromDate(new Date()));
57
61
  const onTimeDateModel = todaysDateModel.getByOffset(offsetInDays);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "law-common",
3
- "version": "8.9.0",
3
+ "version": "9.0.0",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "files": [