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

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
@@ -293,7 +293,7 @@ interface IVendorBillEntity extends IAuditColumnEntity {
293
293
  vendorId: number;
294
294
  expenseHeadId: number;
295
295
  description: string;
296
- invoiceNumber: string;
296
+ invoiceNumber?: string;
297
297
  totalAmount: number;
298
298
  balancePayable: number;
299
299
  discountAmount?: number;
@@ -530,7 +530,7 @@ declare class VendorBillModel extends BaseEntityModel implements IVendorBillEnti
530
530
  vendorId: number;
531
531
  expenseHeadId: number;
532
532
  description: string;
533
- invoiceNumber: string;
533
+ invoiceNumber?: string;
534
534
  totalAmount: number;
535
535
  balancePayable: number;
536
536
  discountAmount?: number;
@@ -550,7 +550,6 @@ declare class VendorBillModel extends BaseEntityModel implements IVendorBillEnti
550
550
  static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList>>>;
551
551
  static populateFromEntity(entity: IVendorBillEntity): VendorBillModel;
552
552
  get totalAmountPaid(): number | undefined;
553
- static getVendorBillNumber(vendor: VendorModel, count: number): string;
554
553
  }
555
554
 
556
555
  declare class ExpenseModel extends BaseEntityModel implements IExpenseEntity {
package/dist/index.d.ts CHANGED
@@ -293,7 +293,7 @@ interface IVendorBillEntity extends IAuditColumnEntity {
293
293
  vendorId: number;
294
294
  expenseHeadId: number;
295
295
  description: string;
296
- invoiceNumber: string;
296
+ invoiceNumber?: string;
297
297
  totalAmount: number;
298
298
  balancePayable: number;
299
299
  discountAmount?: number;
@@ -530,7 +530,7 @@ declare class VendorBillModel extends BaseEntityModel implements IVendorBillEnti
530
530
  vendorId: number;
531
531
  expenseHeadId: number;
532
532
  description: string;
533
- invoiceNumber: string;
533
+ invoiceNumber?: string;
534
534
  totalAmount: number;
535
535
  balancePayable: number;
536
536
  discountAmount?: number;
@@ -550,7 +550,6 @@ declare class VendorBillModel extends BaseEntityModel implements IVendorBillEnti
550
550
  static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList>>>;
551
551
  static populateFromEntity(entity: IVendorBillEntity): VendorBillModel;
552
552
  get totalAmountPaid(): number | undefined;
553
- static getVendorBillNumber(vendor: VendorModel, count: number): string;
554
553
  }
555
554
 
556
555
  declare class ExpenseModel extends BaseEntityModel implements IExpenseEntity {
package/dist/index.js CHANGED
@@ -1601,7 +1601,6 @@ var _VendorBillModel = class _VendorBillModel extends BaseEntityModel {
1601
1601
  this.vendorId = 0;
1602
1602
  this.expenseHeadId = 0;
1603
1603
  this.description = "";
1604
- this.invoiceNumber = "";
1605
1604
  this.totalAmount = 0;
1606
1605
  this.balancePayable = 0;
1607
1606
  this.discountAmount = 0;
@@ -1618,11 +1617,6 @@ var _VendorBillModel = class _VendorBillModel extends BaseEntityModel {
1618
1617
  get totalAmountPaid() {
1619
1618
  return this.expenses?.reduce((total, expense) => total + expense.amount, 0);
1620
1619
  }
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
1620
  };
1627
1621
  _VendorBillModel.relations = {
1628
1622
  ["user" /* USER */]: {