@mody-park-cha-raja/finance_common 4.30.0 → 4.30.1-beta.2

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/dist/index.d.mts CHANGED
@@ -77,6 +77,14 @@ declare enum TransactionType {
77
77
  EXPENSE = "Expense"
78
78
  }
79
79
 
80
+ declare enum VendorBillStatus {
81
+ OPEN = "OPEN",
82
+ PARTIALLY_PAID = "PARTIALLY_PAID",
83
+ PAID = "PAID",
84
+ CLOSED = "CLOSED",
85
+ CANCELLED = "CANCELLED"
86
+ }
87
+
80
88
  declare enum VendorType {
81
89
  SUPPLIER = "Supplier",
82
90
  SERVICE_PROVIDER = "Service Provider",
@@ -146,6 +154,7 @@ interface IExpenseEntity extends IAuditColumnEntity {
146
154
  incurredBy: number;
147
155
  vendorId: number;
148
156
  expenseHeadId: number;
157
+ vendorBillId?: number;
149
158
  billNumber?: string;
150
159
  remarks?: string;
151
160
  description?: string;
@@ -276,6 +285,23 @@ interface IVendorEntity extends IAuditColumnEntity {
276
285
  type: string;
277
286
  }
278
287
 
288
+ interface IVendorBillHistoryEntity extends IBaseHistoryEntity {
289
+ }
290
+
291
+ interface IVendorBillEntity extends IAuditColumnEntity {
292
+ id: number;
293
+ vendorId: number;
294
+ expenseHeadId: number;
295
+ description: string;
296
+ invoiceNumber: string;
297
+ totalAmount: number;
298
+ balancePayable: number;
299
+ discountAmount?: number;
300
+ discountRemarks?: string;
301
+ billStatus: VendorBillStatus;
302
+ status?: EntityStatus;
303
+ }
304
+
279
305
  declare class DonationHistoryModel extends BaseEntityModel implements IDonationHistoryEntity {
280
306
  id: number;
281
307
  entityId: number;
@@ -499,6 +525,34 @@ declare class VendorModel extends BaseEntityModel implements IVendorEntity {
499
525
  static populateFromEntity(entity: IVendorEntity): VendorModel;
500
526
  }
501
527
 
528
+ declare class VendorBillModel extends BaseEntityModel implements IVendorBillEntity {
529
+ id: number;
530
+ vendorId: number;
531
+ expenseHeadId: number;
532
+ description: string;
533
+ invoiceNumber: string;
534
+ totalAmount: number;
535
+ balancePayable: number;
536
+ discountAmount?: number;
537
+ discountRemarks?: string;
538
+ billStatus: VendorBillStatus;
539
+ status: EntityStatus;
540
+ createdOn: number;
541
+ updatedOn: number;
542
+ createdBy: number;
543
+ updatedBy: number;
544
+ createdByUser?: UserModel;
545
+ updatedByUser?: UserModel;
546
+ vendor?: VendorModel;
547
+ expenseHead?: ExpenseHeadModel;
548
+ expenses?: ExpenseModel[];
549
+ protected constructor();
550
+ static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList>>>;
551
+ static populateFromEntity(entity: IVendorBillEntity): VendorBillModel;
552
+ get totalAmountPaid(): number | undefined;
553
+ static getVendorBillNumber(vendor: VendorModel, count: number): string;
554
+ }
555
+
502
556
  declare class ExpenseModel extends BaseEntityModel implements IExpenseEntity {
503
557
  id: number;
504
558
  name: string;
@@ -510,6 +564,7 @@ declare class ExpenseModel extends BaseEntityModel implements IExpenseEntity {
510
564
  remarks?: string;
511
565
  description?: string;
512
566
  paymentType: PaymentType;
567
+ vendorBillId?: number;
513
568
  status: EntityStatus;
514
569
  createdOn: number;
515
570
  updatedOn: number;
@@ -520,6 +575,7 @@ declare class ExpenseModel extends BaseEntityModel implements IExpenseEntity {
520
575
  incurredByUser?: UserModel;
521
576
  vendor?: VendorModel;
522
577
  expenseHead?: ExpenseHeadModel;
578
+ vendorBill?: VendorBillModel;
523
579
  protected constructor();
524
580
  static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList>>>;
525
581
  static populateFromEntity(entity: IExpenseEntity): ExpenseModel;
@@ -678,6 +734,20 @@ declare class VendorHistoryModel extends BaseEntityModel implements IVendorHisto
678
734
  static populateFromEntity(entity: IVendorHistoryEntity): VendorHistoryModel;
679
735
  }
680
736
 
737
+ declare class VendorBillHistoryModel extends BaseEntityModel implements IVendorBillHistoryEntity {
738
+ id: number;
739
+ entityId: number;
740
+ data: string;
741
+ operation: EntityHistoryOperation;
742
+ createdOn: number;
743
+ updatedOn: number;
744
+ createdBy: number;
745
+ updatedBy: number;
746
+ protected constructor();
747
+ static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList.VENDOR_BILL_HISTORY>>>;
748
+ static populateFromEntity(entity: IVendorBillHistoryEntity): VendorBillHistoryModel;
749
+ }
750
+
681
751
  declare class ConfigurationModel extends BaseEntityModel implements IConfigurationEntity {
682
752
  id: number;
683
753
  key: string;
@@ -705,6 +775,8 @@ declare const entityListEntityModelMap: {
705
775
  expense_head_history: typeof ExpenseHeadHistoryModel.populateFromEntity;
706
776
  vendor: typeof VendorModel.populateFromEntity;
707
777
  vendor_history: typeof VendorHistoryModel.populateFromEntity;
778
+ vendor_bill: typeof VendorBillModel.populateFromEntity;
779
+ vendor_bill_history: typeof VendorBillHistoryModel.populateFromEntity;
708
780
  transaction: typeof TransactionModel.populateFromEntity;
709
781
  transaction_history: typeof TransactionHistoryModel.populateFromEntity;
710
782
  sponsor: typeof SponsorModel.populateFromEntity;
@@ -987,6 +1059,8 @@ declare enum EntityList {
987
1059
  EXPENSE_HEAD_HISTORY = "expense_head_history",
988
1060
  VENDOR = "vendor",
989
1061
  VENDOR_HISTORY = "vendor_history",
1062
+ VENDOR_BILL = "vendor_bill",
1063
+ VENDOR_BILL_HISTORY = "vendor_bill_history",
990
1064
  TRANSACTION = "transaction",
991
1065
  TRANSACTION_HISTORY = "transaction_history",
992
1066
  SPONSOR = "sponsor",
@@ -995,8 +1069,8 @@ declare enum EntityList {
995
1069
  FLAT_HISTORY = "flat_history",
996
1070
  CONFIGURATION = "configuration"
997
1071
  }
998
- type EntityType<T extends EntityList> = T extends EntityList.DONATION ? IDonationEntity : T extends EntityList.DONATION_HISTORY ? IDonationHistoryEntity : T extends EntityList.USER ? IUserEntity : T extends EntityList.USER_HISTORY ? IUserHistoryEntity : T extends EntityList.EXPENSE ? IExpenseEntity : T extends EntityList.EXPENSE_HISTORY ? IExpenseHistoryEntity : T extends EntityList.EXPENSE_HEAD ? IExpenseHeadEntity : T extends EntityList.EXPENSE_HEAD_HISTORY ? IExpenseHeadHistoryEntity : T extends EntityList.VENDOR ? IVendorEntity : T extends EntityList.VENDOR_HISTORY ? IVendorHistoryEntity : T extends EntityList.TRANSACTION ? ITransactionEntity : T extends EntityList.TRANSACTION_HISTORY ? ITransactionHistoryEntity : T extends EntityList.SPONSOR ? ISponsorEntity : T extends EntityList.SPONSOR_HISTORY ? ISponsorHistoryEntity : T extends EntityList.FLAT ? IFlatEntity : T extends EntityList.FLAT_HISTORY ? IFlatHistoryEntity : T extends EntityList.CONFIGURATION ? IConfigurationEntity : never;
999
- type EntityModelType<T extends EntityList> = T extends EntityList.DONATION ? DonationModel : T extends EntityList.DONATION_HISTORY ? DonationHistoryModel : T extends EntityList.USER ? UserModel : T extends EntityList.USER_HISTORY ? UserHistoryModel : T extends EntityList.EXPENSE ? ExpenseModel : T extends EntityList.EXPENSE_HISTORY ? ExpenseHistoryModel : T extends EntityList.EXPENSE_HEAD ? ExpenseHeadModel : T extends EntityList.EXPENSE_HEAD_HISTORY ? ExpenseHeadHistoryModel : T extends EntityList.VENDOR ? VendorModel : T extends EntityList.VENDOR_HISTORY ? VendorHistoryModel : T extends EntityList.TRANSACTION ? TransactionModel : T extends EntityList.TRANSACTION_HISTORY ? TransactionHistoryModel : T extends EntityList.SPONSOR ? SponsorModel : T extends EntityList.SPONSOR_HISTORY ? SponsorHistoryModel : T extends EntityList.FLAT ? FlatModel : T extends EntityList.FLAT_HISTORY ? FlatHistoryModel : T extends EntityList.CONFIGURATION ? ConfigurationModel : never;
1072
+ type EntityType<T extends EntityList> = T extends EntityList.DONATION ? IDonationEntity : T extends EntityList.DONATION_HISTORY ? IDonationHistoryEntity : T extends EntityList.USER ? IUserEntity : T extends EntityList.USER_HISTORY ? IUserHistoryEntity : T extends EntityList.EXPENSE ? IExpenseEntity : T extends EntityList.EXPENSE_HISTORY ? IExpenseHistoryEntity : T extends EntityList.EXPENSE_HEAD ? IExpenseHeadEntity : T extends EntityList.EXPENSE_HEAD_HISTORY ? IExpenseHeadHistoryEntity : T extends EntityList.VENDOR ? IVendorEntity : T extends EntityList.VENDOR_HISTORY ? IVendorHistoryEntity : T extends EntityList.VENDOR_BILL ? IVendorBillEntity : T extends EntityList.VENDOR_BILL_HISTORY ? IVendorBillHistoryEntity : T extends EntityList.TRANSACTION ? ITransactionEntity : T extends EntityList.TRANSACTION_HISTORY ? ITransactionHistoryEntity : T extends EntityList.SPONSOR ? ISponsorEntity : T extends EntityList.SPONSOR_HISTORY ? ISponsorHistoryEntity : T extends EntityList.FLAT ? IFlatEntity : T extends EntityList.FLAT_HISTORY ? IFlatHistoryEntity : T extends EntityList.CONFIGURATION ? IConfigurationEntity : never;
1073
+ type EntityModelType<T extends EntityList> = T extends EntityList.DONATION ? DonationModel : T extends EntityList.DONATION_HISTORY ? DonationHistoryModel : T extends EntityList.USER ? UserModel : T extends EntityList.USER_HISTORY ? UserHistoryModel : T extends EntityList.EXPENSE ? ExpenseModel : T extends EntityList.EXPENSE_HISTORY ? ExpenseHistoryModel : T extends EntityList.EXPENSE_HEAD ? ExpenseHeadModel : T extends EntityList.EXPENSE_HEAD_HISTORY ? ExpenseHeadHistoryModel : T extends EntityList.VENDOR ? VendorModel : T extends EntityList.VENDOR_HISTORY ? VendorHistoryModel : T extends EntityList.VENDOR_BILL ? VendorBillModel : T extends EntityList.VENDOR_BILL_HISTORY ? VendorBillHistoryModel : T extends EntityList.TRANSACTION ? TransactionModel : T extends EntityList.TRANSACTION_HISTORY ? TransactionHistoryModel : T extends EntityList.SPONSOR ? SponsorModel : T extends EntityList.SPONSOR_HISTORY ? SponsorHistoryModel : T extends EntityList.FLAT ? FlatModel : T extends EntityList.FLAT_HISTORY ? FlatHistoryModel : T extends EntityList.CONFIGURATION ? ConfigurationModel : never;
1000
1074
  type EntityListEntityModelMap = {
1001
1075
  [T in EntityList]: EntityModelType<T>[];
1002
1076
  };
@@ -1105,6 +1179,13 @@ interface IVendorUpdateDto extends IEntityUpdateDto<EntityType<EntityList.VENDOR
1105
1179
  interface IVendorSearchDto extends IEntityFilterData<EntityType<EntityList.VENDOR>> {
1106
1180
  }
1107
1181
 
1182
+ interface IVendorBillCreateDto extends Omit<IEntityCreateDto<EntityType<EntityList.VENDOR_BILL>>, 'invoiceNumber'> {
1183
+ }
1184
+ interface IVendorBillUpdateDto extends IEntityUpdateDto<EntityType<EntityList.VENDOR_BILL>> {
1185
+ }
1186
+ interface IVendorBillSearchDto extends IEntityFilterData<EntityType<EntityList.VENDOR_BILL>> {
1187
+ }
1188
+
1108
1189
  interface ITransactionCreateDto extends IEntityCreateDto<EntityType<EntityList.TRANSACTION>> {
1109
1190
  }
1110
1191
  interface ITransactionUpdateDto extends IEntityUpdateDto<EntityType<EntityList.TRANSACTION>> {
@@ -1147,4 +1228,4 @@ declare function isSpecialFlatLabel(label: string): boolean;
1147
1228
  declare function getFlatValidationErrors(input: Partial<IFlatEntity>): FlatValidationError[];
1148
1229
  declare function validateFlatOrThrow(input: Partial<IFlatEntity>): void;
1149
1230
 
1150
- export { ALL_WINGS_SELECTION, BadRequestException, BaseEntityModel, ConfigurationKey, ConfigurationModel, ConfigurationType, DateCodeUtils, DateUtil, DonationHistoryModel, DonationModel, EntityFilterDataHelper, EntityHistoryOperation, EntityList, type EntityListEntityModelMap, type EntityModelType, EntityStatus, type EntityType, ExpenseHeadHistoryModel, ExpenseHeadModel, ExpenseHistoryModel, ExpenseModel, FLATS_BY_WING, FLAT_DONATION_RELATION_CONFIG, FLAT_NUMBERS, FLAT_UNIT_NUMBER_PATTERN, FLAT_WING_PATTERN, type FlatCollectionEntry, type FlatCollectionStatus, type FlatDonationLike, FlatHistoryModel, type FlatIdDonationLike, FlatModel, type FlatOption, type FlatParseResult, type FlatValidationError, ForbiddenException, HttpException, type IAuditColumnEntity, type IBaseHistoryEntity, type ICashBookEntry, type IConfigurationCreateDto, type IConfigurationEntity, type IConfigurationSearchDto, type IConfigurationUpdateDto, type IDonationCreateDto, type IDonationEntity, type IDonationHistoryEntity, type IDonationSearchDto, type IDonationUpdateDto, type IDtoValidationError, type IEntityCreateDto, type IEntityFilterData, type IEntityFilterSearchData, type IEntityFilterSearchDataV2, type IEntityUpdateDto, type IExpenseCreateDto, type IExpenseEntity, type IExpenseHeadCreateDto, type IExpenseHeadEntity, type IExpenseHeadHistoryEntity, type IExpenseHeadSearchDto, type IExpenseHeadUpdateDto, type IExpenseHistoryEntity, type IExpenseSearchDto, type IExpenseUpdateDto, type IFlatCreateDto, type IFlatEntity, type IFlatHistoryEntity, type IFlatSearchDto, type IFlatUpdateDto, type IMappingPropertyEntry, type IModelRelationConfig, type ISearchV2Response, type ISponsorCreateDto, type ISponsorEntity, type ISponsorHistoryEntity, type ISponsorSearchDto, type ISponsorUpdateDto, type ITransactionCreateDto, type ITransactionEntity, type ITransactionHistoryEntity, type ITransactionSearchDto, type ITransactionUpdateDto, type IUserCreateDto, type IUserEntity, type IUserHistoryEntity, type IUserSearchDto, type IUserUpdateDto, type IVendorCreateDto, type IVendorEntity, type IVendorHistoryEntity, type IVendorSearchDto, type IVendorUpdateDto, NotFoundException, type Nullable, OrderByDirection, PAYMENT_OPTIONS, PaymentType, ReferenceIdPrefix, RelationType, SHOP_UNIT_NUMBER_PATTERN, SHOP_WING, SPECIAL_FLATS, SPECIAL_FLAT_LABELS, SponsorHistoryModel, SponsorModel, SponsorTier, TransactionEntityType, TransactionHistoryModel, TransactionModel, TransactionType, USER_RELATION_CONFIG, UnauthorizedException, type UserExpenseReport, type UserExpenseReportTotals, type UserExpenseRow, UserHistoryModel, UserModel, VendorHistoryModel, VendorModel, VendorType, WINGS, WING_ALPHABETS, type WingCollectionDonationByIdLike, type WingCollectionDonationLike, type WingCollectionReport, type WingCollectionRow, type WingCollectionTotals, type XlsxCellAddress, type XlsxMergeRange, type XlsxSerializationType, type XlsxSheetInput, type XlsxSheetOptions, buildUserExpenseReport, buildUserExpenseWorkbook, buildWingWiseCollectionReport, buildWingWiseCollectionReportByFlatId, buildWingWiseCollectionWorkbook, buildXlsxWorkbook, convertNumberToWords, definedValues, diffArrays, entityListEntityModelMap, epochToReadableDate, getFlatValidationErrors, getObjectDiffingKeys, getWingSelectionLabel, getWingSelectionSlug, groupBy, isSpecialFlatLabel, isValidFlatWing, roundToTwoDecimals, serializeXlsx, validateFlatOrThrow };
1231
+ export { ALL_WINGS_SELECTION, BadRequestException, BaseEntityModel, ConfigurationKey, ConfigurationModel, ConfigurationType, DateCodeUtils, DateUtil, DonationHistoryModel, DonationModel, EntityFilterDataHelper, EntityHistoryOperation, EntityList, type EntityListEntityModelMap, type EntityModelType, EntityStatus, type EntityType, ExpenseHeadHistoryModel, ExpenseHeadModel, ExpenseHistoryModel, ExpenseModel, FLATS_BY_WING, FLAT_DONATION_RELATION_CONFIG, FLAT_NUMBERS, FLAT_UNIT_NUMBER_PATTERN, FLAT_WING_PATTERN, type FlatCollectionEntry, type FlatCollectionStatus, type FlatDonationLike, FlatHistoryModel, type FlatIdDonationLike, FlatModel, type FlatOption, type FlatParseResult, type FlatValidationError, ForbiddenException, HttpException, type IAuditColumnEntity, type IBaseHistoryEntity, type ICashBookEntry, type IConfigurationCreateDto, type IConfigurationEntity, type IConfigurationSearchDto, type IConfigurationUpdateDto, type IDonationCreateDto, type IDonationEntity, type IDonationHistoryEntity, type IDonationSearchDto, type IDonationUpdateDto, type IDtoValidationError, type IEntityCreateDto, type IEntityFilterData, type IEntityFilterSearchData, type IEntityFilterSearchDataV2, type IEntityUpdateDto, type IExpenseCreateDto, type IExpenseEntity, type IExpenseHeadCreateDto, type IExpenseHeadEntity, type IExpenseHeadHistoryEntity, type IExpenseHeadSearchDto, type IExpenseHeadUpdateDto, type IExpenseHistoryEntity, type IExpenseSearchDto, type IExpenseUpdateDto, type IFlatCreateDto, type IFlatEntity, type IFlatHistoryEntity, type IFlatSearchDto, type IFlatUpdateDto, type IMappingPropertyEntry, type IModelRelationConfig, type ISearchV2Response, type ISponsorCreateDto, type ISponsorEntity, type ISponsorHistoryEntity, type ISponsorSearchDto, type ISponsorUpdateDto, type ITransactionCreateDto, type ITransactionEntity, type ITransactionHistoryEntity, type ITransactionSearchDto, type ITransactionUpdateDto, type IUserCreateDto, type IUserEntity, type IUserHistoryEntity, type IUserSearchDto, type IUserUpdateDto, type IVendorBillCreateDto, type IVendorBillEntity, type IVendorBillHistoryEntity, type IVendorBillSearchDto, type IVendorBillUpdateDto, type IVendorCreateDto, type IVendorEntity, type IVendorHistoryEntity, type IVendorSearchDto, type IVendorUpdateDto, NotFoundException, type Nullable, OrderByDirection, PAYMENT_OPTIONS, PaymentType, ReferenceIdPrefix, RelationType, SHOP_UNIT_NUMBER_PATTERN, SHOP_WING, SPECIAL_FLATS, SPECIAL_FLAT_LABELS, SponsorHistoryModel, SponsorModel, SponsorTier, TransactionEntityType, TransactionHistoryModel, TransactionModel, TransactionType, USER_RELATION_CONFIG, UnauthorizedException, type UserExpenseReport, type UserExpenseReportTotals, type UserExpenseRow, UserHistoryModel, UserModel, VendorBillHistoryModel, VendorBillModel, VendorBillStatus, VendorHistoryModel, VendorModel, VendorType, WINGS, WING_ALPHABETS, type WingCollectionDonationByIdLike, type WingCollectionDonationLike, type WingCollectionReport, type WingCollectionRow, type WingCollectionTotals, type XlsxCellAddress, type XlsxMergeRange, type XlsxSerializationType, type XlsxSheetInput, type XlsxSheetOptions, buildUserExpenseReport, buildUserExpenseWorkbook, buildWingWiseCollectionReport, buildWingWiseCollectionReportByFlatId, buildWingWiseCollectionWorkbook, buildXlsxWorkbook, convertNumberToWords, definedValues, diffArrays, entityListEntityModelMap, epochToReadableDate, getFlatValidationErrors, getObjectDiffingKeys, getWingSelectionLabel, getWingSelectionSlug, groupBy, isSpecialFlatLabel, isValidFlatWing, roundToTwoDecimals, serializeXlsx, validateFlatOrThrow };
package/dist/index.d.ts CHANGED
@@ -77,6 +77,14 @@ declare enum TransactionType {
77
77
  EXPENSE = "Expense"
78
78
  }
79
79
 
80
+ declare enum VendorBillStatus {
81
+ OPEN = "OPEN",
82
+ PARTIALLY_PAID = "PARTIALLY_PAID",
83
+ PAID = "PAID",
84
+ CLOSED = "CLOSED",
85
+ CANCELLED = "CANCELLED"
86
+ }
87
+
80
88
  declare enum VendorType {
81
89
  SUPPLIER = "Supplier",
82
90
  SERVICE_PROVIDER = "Service Provider",
@@ -146,6 +154,7 @@ interface IExpenseEntity extends IAuditColumnEntity {
146
154
  incurredBy: number;
147
155
  vendorId: number;
148
156
  expenseHeadId: number;
157
+ vendorBillId?: number;
149
158
  billNumber?: string;
150
159
  remarks?: string;
151
160
  description?: string;
@@ -276,6 +285,23 @@ interface IVendorEntity extends IAuditColumnEntity {
276
285
  type: string;
277
286
  }
278
287
 
288
+ interface IVendorBillHistoryEntity extends IBaseHistoryEntity {
289
+ }
290
+
291
+ interface IVendorBillEntity extends IAuditColumnEntity {
292
+ id: number;
293
+ vendorId: number;
294
+ expenseHeadId: number;
295
+ description: string;
296
+ invoiceNumber: string;
297
+ totalAmount: number;
298
+ balancePayable: number;
299
+ discountAmount?: number;
300
+ discountRemarks?: string;
301
+ billStatus: VendorBillStatus;
302
+ status?: EntityStatus;
303
+ }
304
+
279
305
  declare class DonationHistoryModel extends BaseEntityModel implements IDonationHistoryEntity {
280
306
  id: number;
281
307
  entityId: number;
@@ -499,6 +525,34 @@ declare class VendorModel extends BaseEntityModel implements IVendorEntity {
499
525
  static populateFromEntity(entity: IVendorEntity): VendorModel;
500
526
  }
501
527
 
528
+ declare class VendorBillModel extends BaseEntityModel implements IVendorBillEntity {
529
+ id: number;
530
+ vendorId: number;
531
+ expenseHeadId: number;
532
+ description: string;
533
+ invoiceNumber: string;
534
+ totalAmount: number;
535
+ balancePayable: number;
536
+ discountAmount?: number;
537
+ discountRemarks?: string;
538
+ billStatus: VendorBillStatus;
539
+ status: EntityStatus;
540
+ createdOn: number;
541
+ updatedOn: number;
542
+ createdBy: number;
543
+ updatedBy: number;
544
+ createdByUser?: UserModel;
545
+ updatedByUser?: UserModel;
546
+ vendor?: VendorModel;
547
+ expenseHead?: ExpenseHeadModel;
548
+ expenses?: ExpenseModel[];
549
+ protected constructor();
550
+ static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList>>>;
551
+ static populateFromEntity(entity: IVendorBillEntity): VendorBillModel;
552
+ get totalAmountPaid(): number | undefined;
553
+ static getVendorBillNumber(vendor: VendorModel, count: number): string;
554
+ }
555
+
502
556
  declare class ExpenseModel extends BaseEntityModel implements IExpenseEntity {
503
557
  id: number;
504
558
  name: string;
@@ -510,6 +564,7 @@ declare class ExpenseModel extends BaseEntityModel implements IExpenseEntity {
510
564
  remarks?: string;
511
565
  description?: string;
512
566
  paymentType: PaymentType;
567
+ vendorBillId?: number;
513
568
  status: EntityStatus;
514
569
  createdOn: number;
515
570
  updatedOn: number;
@@ -520,6 +575,7 @@ declare class ExpenseModel extends BaseEntityModel implements IExpenseEntity {
520
575
  incurredByUser?: UserModel;
521
576
  vendor?: VendorModel;
522
577
  expenseHead?: ExpenseHeadModel;
578
+ vendorBill?: VendorBillModel;
523
579
  protected constructor();
524
580
  static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList>>>;
525
581
  static populateFromEntity(entity: IExpenseEntity): ExpenseModel;
@@ -678,6 +734,20 @@ declare class VendorHistoryModel extends BaseEntityModel implements IVendorHisto
678
734
  static populateFromEntity(entity: IVendorHistoryEntity): VendorHistoryModel;
679
735
  }
680
736
 
737
+ declare class VendorBillHistoryModel extends BaseEntityModel implements IVendorBillHistoryEntity {
738
+ id: number;
739
+ entityId: number;
740
+ data: string;
741
+ operation: EntityHistoryOperation;
742
+ createdOn: number;
743
+ updatedOn: number;
744
+ createdBy: number;
745
+ updatedBy: number;
746
+ protected constructor();
747
+ static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList.VENDOR_BILL_HISTORY>>>;
748
+ static populateFromEntity(entity: IVendorBillHistoryEntity): VendorBillHistoryModel;
749
+ }
750
+
681
751
  declare class ConfigurationModel extends BaseEntityModel implements IConfigurationEntity {
682
752
  id: number;
683
753
  key: string;
@@ -705,6 +775,8 @@ declare const entityListEntityModelMap: {
705
775
  expense_head_history: typeof ExpenseHeadHistoryModel.populateFromEntity;
706
776
  vendor: typeof VendorModel.populateFromEntity;
707
777
  vendor_history: typeof VendorHistoryModel.populateFromEntity;
778
+ vendor_bill: typeof VendorBillModel.populateFromEntity;
779
+ vendor_bill_history: typeof VendorBillHistoryModel.populateFromEntity;
708
780
  transaction: typeof TransactionModel.populateFromEntity;
709
781
  transaction_history: typeof TransactionHistoryModel.populateFromEntity;
710
782
  sponsor: typeof SponsorModel.populateFromEntity;
@@ -987,6 +1059,8 @@ declare enum EntityList {
987
1059
  EXPENSE_HEAD_HISTORY = "expense_head_history",
988
1060
  VENDOR = "vendor",
989
1061
  VENDOR_HISTORY = "vendor_history",
1062
+ VENDOR_BILL = "vendor_bill",
1063
+ VENDOR_BILL_HISTORY = "vendor_bill_history",
990
1064
  TRANSACTION = "transaction",
991
1065
  TRANSACTION_HISTORY = "transaction_history",
992
1066
  SPONSOR = "sponsor",
@@ -995,8 +1069,8 @@ declare enum EntityList {
995
1069
  FLAT_HISTORY = "flat_history",
996
1070
  CONFIGURATION = "configuration"
997
1071
  }
998
- type EntityType<T extends EntityList> = T extends EntityList.DONATION ? IDonationEntity : T extends EntityList.DONATION_HISTORY ? IDonationHistoryEntity : T extends EntityList.USER ? IUserEntity : T extends EntityList.USER_HISTORY ? IUserHistoryEntity : T extends EntityList.EXPENSE ? IExpenseEntity : T extends EntityList.EXPENSE_HISTORY ? IExpenseHistoryEntity : T extends EntityList.EXPENSE_HEAD ? IExpenseHeadEntity : T extends EntityList.EXPENSE_HEAD_HISTORY ? IExpenseHeadHistoryEntity : T extends EntityList.VENDOR ? IVendorEntity : T extends EntityList.VENDOR_HISTORY ? IVendorHistoryEntity : T extends EntityList.TRANSACTION ? ITransactionEntity : T extends EntityList.TRANSACTION_HISTORY ? ITransactionHistoryEntity : T extends EntityList.SPONSOR ? ISponsorEntity : T extends EntityList.SPONSOR_HISTORY ? ISponsorHistoryEntity : T extends EntityList.FLAT ? IFlatEntity : T extends EntityList.FLAT_HISTORY ? IFlatHistoryEntity : T extends EntityList.CONFIGURATION ? IConfigurationEntity : never;
999
- type EntityModelType<T extends EntityList> = T extends EntityList.DONATION ? DonationModel : T extends EntityList.DONATION_HISTORY ? DonationHistoryModel : T extends EntityList.USER ? UserModel : T extends EntityList.USER_HISTORY ? UserHistoryModel : T extends EntityList.EXPENSE ? ExpenseModel : T extends EntityList.EXPENSE_HISTORY ? ExpenseHistoryModel : T extends EntityList.EXPENSE_HEAD ? ExpenseHeadModel : T extends EntityList.EXPENSE_HEAD_HISTORY ? ExpenseHeadHistoryModel : T extends EntityList.VENDOR ? VendorModel : T extends EntityList.VENDOR_HISTORY ? VendorHistoryModel : T extends EntityList.TRANSACTION ? TransactionModel : T extends EntityList.TRANSACTION_HISTORY ? TransactionHistoryModel : T extends EntityList.SPONSOR ? SponsorModel : T extends EntityList.SPONSOR_HISTORY ? SponsorHistoryModel : T extends EntityList.FLAT ? FlatModel : T extends EntityList.FLAT_HISTORY ? FlatHistoryModel : T extends EntityList.CONFIGURATION ? ConfigurationModel : never;
1072
+ type EntityType<T extends EntityList> = T extends EntityList.DONATION ? IDonationEntity : T extends EntityList.DONATION_HISTORY ? IDonationHistoryEntity : T extends EntityList.USER ? IUserEntity : T extends EntityList.USER_HISTORY ? IUserHistoryEntity : T extends EntityList.EXPENSE ? IExpenseEntity : T extends EntityList.EXPENSE_HISTORY ? IExpenseHistoryEntity : T extends EntityList.EXPENSE_HEAD ? IExpenseHeadEntity : T extends EntityList.EXPENSE_HEAD_HISTORY ? IExpenseHeadHistoryEntity : T extends EntityList.VENDOR ? IVendorEntity : T extends EntityList.VENDOR_HISTORY ? IVendorHistoryEntity : T extends EntityList.VENDOR_BILL ? IVendorBillEntity : T extends EntityList.VENDOR_BILL_HISTORY ? IVendorBillHistoryEntity : T extends EntityList.TRANSACTION ? ITransactionEntity : T extends EntityList.TRANSACTION_HISTORY ? ITransactionHistoryEntity : T extends EntityList.SPONSOR ? ISponsorEntity : T extends EntityList.SPONSOR_HISTORY ? ISponsorHistoryEntity : T extends EntityList.FLAT ? IFlatEntity : T extends EntityList.FLAT_HISTORY ? IFlatHistoryEntity : T extends EntityList.CONFIGURATION ? IConfigurationEntity : never;
1073
+ type EntityModelType<T extends EntityList> = T extends EntityList.DONATION ? DonationModel : T extends EntityList.DONATION_HISTORY ? DonationHistoryModel : T extends EntityList.USER ? UserModel : T extends EntityList.USER_HISTORY ? UserHistoryModel : T extends EntityList.EXPENSE ? ExpenseModel : T extends EntityList.EXPENSE_HISTORY ? ExpenseHistoryModel : T extends EntityList.EXPENSE_HEAD ? ExpenseHeadModel : T extends EntityList.EXPENSE_HEAD_HISTORY ? ExpenseHeadHistoryModel : T extends EntityList.VENDOR ? VendorModel : T extends EntityList.VENDOR_HISTORY ? VendorHistoryModel : T extends EntityList.VENDOR_BILL ? VendorBillModel : T extends EntityList.VENDOR_BILL_HISTORY ? VendorBillHistoryModel : T extends EntityList.TRANSACTION ? TransactionModel : T extends EntityList.TRANSACTION_HISTORY ? TransactionHistoryModel : T extends EntityList.SPONSOR ? SponsorModel : T extends EntityList.SPONSOR_HISTORY ? SponsorHistoryModel : T extends EntityList.FLAT ? FlatModel : T extends EntityList.FLAT_HISTORY ? FlatHistoryModel : T extends EntityList.CONFIGURATION ? ConfigurationModel : never;
1000
1074
  type EntityListEntityModelMap = {
1001
1075
  [T in EntityList]: EntityModelType<T>[];
1002
1076
  };
@@ -1105,6 +1179,13 @@ interface IVendorUpdateDto extends IEntityUpdateDto<EntityType<EntityList.VENDOR
1105
1179
  interface IVendorSearchDto extends IEntityFilterData<EntityType<EntityList.VENDOR>> {
1106
1180
  }
1107
1181
 
1182
+ interface IVendorBillCreateDto extends Omit<IEntityCreateDto<EntityType<EntityList.VENDOR_BILL>>, 'invoiceNumber'> {
1183
+ }
1184
+ interface IVendorBillUpdateDto extends IEntityUpdateDto<EntityType<EntityList.VENDOR_BILL>> {
1185
+ }
1186
+ interface IVendorBillSearchDto extends IEntityFilterData<EntityType<EntityList.VENDOR_BILL>> {
1187
+ }
1188
+
1108
1189
  interface ITransactionCreateDto extends IEntityCreateDto<EntityType<EntityList.TRANSACTION>> {
1109
1190
  }
1110
1191
  interface ITransactionUpdateDto extends IEntityUpdateDto<EntityType<EntityList.TRANSACTION>> {
@@ -1147,4 +1228,4 @@ declare function isSpecialFlatLabel(label: string): boolean;
1147
1228
  declare function getFlatValidationErrors(input: Partial<IFlatEntity>): FlatValidationError[];
1148
1229
  declare function validateFlatOrThrow(input: Partial<IFlatEntity>): void;
1149
1230
 
1150
- export { ALL_WINGS_SELECTION, BadRequestException, BaseEntityModel, ConfigurationKey, ConfigurationModel, ConfigurationType, DateCodeUtils, DateUtil, DonationHistoryModel, DonationModel, EntityFilterDataHelper, EntityHistoryOperation, EntityList, type EntityListEntityModelMap, type EntityModelType, EntityStatus, type EntityType, ExpenseHeadHistoryModel, ExpenseHeadModel, ExpenseHistoryModel, ExpenseModel, FLATS_BY_WING, FLAT_DONATION_RELATION_CONFIG, FLAT_NUMBERS, FLAT_UNIT_NUMBER_PATTERN, FLAT_WING_PATTERN, type FlatCollectionEntry, type FlatCollectionStatus, type FlatDonationLike, FlatHistoryModel, type FlatIdDonationLike, FlatModel, type FlatOption, type FlatParseResult, type FlatValidationError, ForbiddenException, HttpException, type IAuditColumnEntity, type IBaseHistoryEntity, type ICashBookEntry, type IConfigurationCreateDto, type IConfigurationEntity, type IConfigurationSearchDto, type IConfigurationUpdateDto, type IDonationCreateDto, type IDonationEntity, type IDonationHistoryEntity, type IDonationSearchDto, type IDonationUpdateDto, type IDtoValidationError, type IEntityCreateDto, type IEntityFilterData, type IEntityFilterSearchData, type IEntityFilterSearchDataV2, type IEntityUpdateDto, type IExpenseCreateDto, type IExpenseEntity, type IExpenseHeadCreateDto, type IExpenseHeadEntity, type IExpenseHeadHistoryEntity, type IExpenseHeadSearchDto, type IExpenseHeadUpdateDto, type IExpenseHistoryEntity, type IExpenseSearchDto, type IExpenseUpdateDto, type IFlatCreateDto, type IFlatEntity, type IFlatHistoryEntity, type IFlatSearchDto, type IFlatUpdateDto, type IMappingPropertyEntry, type IModelRelationConfig, type ISearchV2Response, type ISponsorCreateDto, type ISponsorEntity, type ISponsorHistoryEntity, type ISponsorSearchDto, type ISponsorUpdateDto, type ITransactionCreateDto, type ITransactionEntity, type ITransactionHistoryEntity, type ITransactionSearchDto, type ITransactionUpdateDto, type IUserCreateDto, type IUserEntity, type IUserHistoryEntity, type IUserSearchDto, type IUserUpdateDto, type IVendorCreateDto, type IVendorEntity, type IVendorHistoryEntity, type IVendorSearchDto, type IVendorUpdateDto, NotFoundException, type Nullable, OrderByDirection, PAYMENT_OPTIONS, PaymentType, ReferenceIdPrefix, RelationType, SHOP_UNIT_NUMBER_PATTERN, SHOP_WING, SPECIAL_FLATS, SPECIAL_FLAT_LABELS, SponsorHistoryModel, SponsorModel, SponsorTier, TransactionEntityType, TransactionHistoryModel, TransactionModel, TransactionType, USER_RELATION_CONFIG, UnauthorizedException, type UserExpenseReport, type UserExpenseReportTotals, type UserExpenseRow, UserHistoryModel, UserModel, VendorHistoryModel, VendorModel, VendorType, WINGS, WING_ALPHABETS, type WingCollectionDonationByIdLike, type WingCollectionDonationLike, type WingCollectionReport, type WingCollectionRow, type WingCollectionTotals, type XlsxCellAddress, type XlsxMergeRange, type XlsxSerializationType, type XlsxSheetInput, type XlsxSheetOptions, buildUserExpenseReport, buildUserExpenseWorkbook, buildWingWiseCollectionReport, buildWingWiseCollectionReportByFlatId, buildWingWiseCollectionWorkbook, buildXlsxWorkbook, convertNumberToWords, definedValues, diffArrays, entityListEntityModelMap, epochToReadableDate, getFlatValidationErrors, getObjectDiffingKeys, getWingSelectionLabel, getWingSelectionSlug, groupBy, isSpecialFlatLabel, isValidFlatWing, roundToTwoDecimals, serializeXlsx, validateFlatOrThrow };
1231
+ export { ALL_WINGS_SELECTION, BadRequestException, BaseEntityModel, ConfigurationKey, ConfigurationModel, ConfigurationType, DateCodeUtils, DateUtil, DonationHistoryModel, DonationModel, EntityFilterDataHelper, EntityHistoryOperation, EntityList, type EntityListEntityModelMap, type EntityModelType, EntityStatus, type EntityType, ExpenseHeadHistoryModel, ExpenseHeadModel, ExpenseHistoryModel, ExpenseModel, FLATS_BY_WING, FLAT_DONATION_RELATION_CONFIG, FLAT_NUMBERS, FLAT_UNIT_NUMBER_PATTERN, FLAT_WING_PATTERN, type FlatCollectionEntry, type FlatCollectionStatus, type FlatDonationLike, FlatHistoryModel, type FlatIdDonationLike, FlatModel, type FlatOption, type FlatParseResult, type FlatValidationError, ForbiddenException, HttpException, type IAuditColumnEntity, type IBaseHistoryEntity, type ICashBookEntry, type IConfigurationCreateDto, type IConfigurationEntity, type IConfigurationSearchDto, type IConfigurationUpdateDto, type IDonationCreateDto, type IDonationEntity, type IDonationHistoryEntity, type IDonationSearchDto, type IDonationUpdateDto, type IDtoValidationError, type IEntityCreateDto, type IEntityFilterData, type IEntityFilterSearchData, type IEntityFilterSearchDataV2, type IEntityUpdateDto, type IExpenseCreateDto, type IExpenseEntity, type IExpenseHeadCreateDto, type IExpenseHeadEntity, type IExpenseHeadHistoryEntity, type IExpenseHeadSearchDto, type IExpenseHeadUpdateDto, type IExpenseHistoryEntity, type IExpenseSearchDto, type IExpenseUpdateDto, type IFlatCreateDto, type IFlatEntity, type IFlatHistoryEntity, type IFlatSearchDto, type IFlatUpdateDto, type IMappingPropertyEntry, type IModelRelationConfig, type ISearchV2Response, type ISponsorCreateDto, type ISponsorEntity, type ISponsorHistoryEntity, type ISponsorSearchDto, type ISponsorUpdateDto, type ITransactionCreateDto, type ITransactionEntity, type ITransactionHistoryEntity, type ITransactionSearchDto, type ITransactionUpdateDto, type IUserCreateDto, type IUserEntity, type IUserHistoryEntity, type IUserSearchDto, type IUserUpdateDto, type IVendorBillCreateDto, type IVendorBillEntity, type IVendorBillHistoryEntity, type IVendorBillSearchDto, type IVendorBillUpdateDto, type IVendorCreateDto, type IVendorEntity, type IVendorHistoryEntity, type IVendorSearchDto, type IVendorUpdateDto, NotFoundException, type Nullable, OrderByDirection, PAYMENT_OPTIONS, PaymentType, ReferenceIdPrefix, RelationType, SHOP_UNIT_NUMBER_PATTERN, SHOP_WING, SPECIAL_FLATS, SPECIAL_FLAT_LABELS, SponsorHistoryModel, SponsorModel, SponsorTier, TransactionEntityType, TransactionHistoryModel, TransactionModel, TransactionType, USER_RELATION_CONFIG, UnauthorizedException, type UserExpenseReport, type UserExpenseReportTotals, type UserExpenseRow, UserHistoryModel, UserModel, VendorBillHistoryModel, VendorBillModel, VendorBillStatus, VendorHistoryModel, VendorModel, VendorType, WINGS, WING_ALPHABETS, type WingCollectionDonationByIdLike, type WingCollectionDonationLike, type WingCollectionReport, type WingCollectionRow, type WingCollectionTotals, type XlsxCellAddress, type XlsxMergeRange, type XlsxSerializationType, type XlsxSheetInput, type XlsxSheetOptions, buildUserExpenseReport, buildUserExpenseWorkbook, buildWingWiseCollectionReport, buildWingWiseCollectionReportByFlatId, buildWingWiseCollectionWorkbook, buildXlsxWorkbook, convertNumberToWords, definedValues, diffArrays, entityListEntityModelMap, epochToReadableDate, getFlatValidationErrors, getObjectDiffingKeys, getWingSelectionLabel, getWingSelectionSlug, groupBy, isSpecialFlatLabel, isValidFlatWing, roundToTwoDecimals, serializeXlsx, validateFlatOrThrow };
package/dist/index.js CHANGED
@@ -78,6 +78,9 @@ __export(index_exports, {
78
78
  UnauthorizedException: () => UnauthorizedException,
79
79
  UserHistoryModel: () => UserHistoryModel,
80
80
  UserModel: () => UserModel,
81
+ VendorBillHistoryModel: () => VendorBillHistoryModel,
82
+ VendorBillModel: () => VendorBillModel,
83
+ VendorBillStatus: () => VendorBillStatus,
81
84
  VendorHistoryModel: () => VendorHistoryModel,
82
85
  VendorModel: () => VendorModel,
83
86
  VendorType: () => VendorType,
@@ -520,6 +523,16 @@ var TransactionType = /* @__PURE__ */ ((TransactionType2) => {
520
523
  return TransactionType2;
521
524
  })(TransactionType || {});
522
525
 
526
+ // src/enums/vendor-bill-status.enum.ts
527
+ var VendorBillStatus = /* @__PURE__ */ ((VendorBillStatus2) => {
528
+ VendorBillStatus2["OPEN"] = "OPEN";
529
+ VendorBillStatus2["PARTIALLY_PAID"] = "PARTIALLY_PAID";
530
+ VendorBillStatus2["PAID"] = "PAID";
531
+ VendorBillStatus2["CLOSED"] = "CLOSED";
532
+ VendorBillStatus2["CANCELLED"] = "CANCELLED";
533
+ return VendorBillStatus2;
534
+ })(VendorBillStatus || {});
535
+
523
536
  // src/enums/vendor-type.enum.ts
524
537
  var VendorType = /* @__PURE__ */ ((VendorType2) => {
525
538
  VendorType2["SUPPLIER"] = "Supplier";
@@ -1286,6 +1299,14 @@ _ExpenseModel.relations = {
1286
1299
  ],
1287
1300
  searchProperty: "id",
1288
1301
  entity: "expense_head" /* EXPENSE_HEAD */
1302
+ },
1303
+ ["vendor_bill" /* VENDOR_BILL */]: {
1304
+ relationType: "ONE" /* ONE */,
1305
+ mappingProperties: [
1306
+ { sourceProperty: "vendorBillId", targetProperty: "vendorBill" }
1307
+ ],
1308
+ searchProperty: "id",
1309
+ entity: "vendor_bill" /* VENDOR_BILL */
1289
1310
  }
1290
1311
  };
1291
1312
  var ExpenseModel = _ExpenseModel;
@@ -1552,6 +1573,92 @@ _VendorModel.relations = {
1552
1573
  };
1553
1574
  var VendorModel = _VendorModel;
1554
1575
 
1576
+ // src/models/vendor-bill-history.entity.model.ts
1577
+ var _VendorBillHistoryModel = class _VendorBillHistoryModel extends BaseEntityModel {
1578
+ constructor() {
1579
+ super();
1580
+ this.id = 0;
1581
+ this.entityId = 0;
1582
+ this.data = "";
1583
+ this.operation = "CREATE" /* CREATE */;
1584
+ this.createdOn = 0;
1585
+ this.updatedOn = 0;
1586
+ this.createdBy = 0;
1587
+ this.updatedBy = 0;
1588
+ }
1589
+ static populateFromEntity(entity) {
1590
+ return Object.assign(new _VendorBillHistoryModel(), entity);
1591
+ }
1592
+ };
1593
+ _VendorBillHistoryModel.relations = {};
1594
+ var VendorBillHistoryModel = _VendorBillHistoryModel;
1595
+
1596
+ // src/models/vendor-bill.entity.model.ts
1597
+ var _VendorBillModel = class _VendorBillModel extends BaseEntityModel {
1598
+ constructor() {
1599
+ super();
1600
+ this.id = 0;
1601
+ this.vendorId = 0;
1602
+ this.expenseHeadId = 0;
1603
+ this.description = "";
1604
+ this.invoiceNumber = "";
1605
+ this.totalAmount = 0;
1606
+ this.balancePayable = 0;
1607
+ this.discountAmount = 0;
1608
+ this.billStatus = "OPEN" /* OPEN */;
1609
+ this.status = "Active" /* ACTIVE */;
1610
+ this.createdOn = 0;
1611
+ this.updatedOn = 0;
1612
+ this.createdBy = 0;
1613
+ this.updatedBy = 0;
1614
+ }
1615
+ static populateFromEntity(entity) {
1616
+ return Object.assign(new _VendorBillModel(), entity);
1617
+ }
1618
+ get totalAmountPaid() {
1619
+ return this.expenses?.reduce((total, expense) => total + expense.amount, 0);
1620
+ }
1621
+ static getVendorBillNumber(vendor, count) {
1622
+ const initials = (vendor?.name ?? "").split(/\s+/).filter(Boolean).slice(0, 2).map((word) => word.charAt(0).toUpperCase()).join("");
1623
+ const invoiceNumber = `${initials}-${count + 1}`;
1624
+ return invoiceNumber;
1625
+ }
1626
+ };
1627
+ _VendorBillModel.relations = {
1628
+ ["user" /* USER */]: {
1629
+ relationType: "ONE" /* ONE */,
1630
+ mappingProperties: [
1631
+ { sourceProperty: "createdBy", targetProperty: "createdByUser" },
1632
+ { sourceProperty: "updatedBy", targetProperty: "updatedByUser" }
1633
+ ],
1634
+ searchProperty: "id",
1635
+ entity: "user" /* USER */
1636
+ },
1637
+ ["vendor" /* VENDOR */]: {
1638
+ relationType: "ONE" /* ONE */,
1639
+ mappingProperties: [
1640
+ { sourceProperty: "vendorId", targetProperty: "vendor" }
1641
+ ],
1642
+ searchProperty: "id",
1643
+ entity: "vendor" /* VENDOR */
1644
+ },
1645
+ ["expense_head" /* EXPENSE_HEAD */]: {
1646
+ relationType: "ONE" /* ONE */,
1647
+ mappingProperties: [
1648
+ { sourceProperty: "expenseHeadId", targetProperty: "expenseHead" }
1649
+ ],
1650
+ searchProperty: "id",
1651
+ entity: "expense_head" /* EXPENSE_HEAD */
1652
+ },
1653
+ ["expense" /* EXPENSE */]: {
1654
+ relationType: "MANY" /* MANY */,
1655
+ mappingProperties: [{ sourceProperty: "id", targetProperty: "expenses" }],
1656
+ searchProperty: "vendorBillId",
1657
+ entity: "expense" /* EXPENSE */
1658
+ }
1659
+ };
1660
+ var VendorBillModel = _VendorBillModel;
1661
+
1555
1662
  // src/models/configuration.entity.model.ts
1556
1663
  var ConfigurationModel = class _ConfigurationModel extends BaseEntityModel {
1557
1664
  constructor() {
@@ -1589,6 +1696,8 @@ var EntityList = /* @__PURE__ */ ((EntityList2) => {
1589
1696
  EntityList2["EXPENSE_HEAD_HISTORY"] = "expense_head_history";
1590
1697
  EntityList2["VENDOR"] = "vendor";
1591
1698
  EntityList2["VENDOR_HISTORY"] = "vendor_history";
1699
+ EntityList2["VENDOR_BILL"] = "vendor_bill";
1700
+ EntityList2["VENDOR_BILL_HISTORY"] = "vendor_bill_history";
1592
1701
  EntityList2["TRANSACTION"] = "transaction";
1593
1702
  EntityList2["TRANSACTION_HISTORY"] = "transaction_history";
1594
1703
  EntityList2["SPONSOR"] = "sponsor";
@@ -1611,6 +1720,8 @@ var entityListEntityModelMap = {
1611
1720
  ["expense_head_history" /* EXPENSE_HEAD_HISTORY */]: ExpenseHeadHistoryModel.populateFromEntity,
1612
1721
  ["vendor" /* VENDOR */]: VendorModel.populateFromEntity,
1613
1722
  ["vendor_history" /* VENDOR_HISTORY */]: VendorHistoryModel.populateFromEntity,
1723
+ ["vendor_bill" /* VENDOR_BILL */]: VendorBillModel.populateFromEntity,
1724
+ ["vendor_bill_history" /* VENDOR_BILL_HISTORY */]: VendorBillHistoryModel.populateFromEntity,
1614
1725
  ["transaction" /* TRANSACTION */]: TransactionModel.populateFromEntity,
1615
1726
  ["transaction_history" /* TRANSACTION_HISTORY */]: TransactionHistoryModel.populateFromEntity,
1616
1727
  ["sponsor" /* SPONSOR */]: SponsorModel.populateFromEntity,
@@ -2361,6 +2472,9 @@ function validateFlatOrThrow(input) {
2361
2472
  UnauthorizedException,
2362
2473
  UserHistoryModel,
2363
2474
  UserModel,
2475
+ VendorBillHistoryModel,
2476
+ VendorBillModel,
2477
+ VendorBillStatus,
2364
2478
  VendorHistoryModel,
2365
2479
  VendorModel,
2366
2480
  VendorType,