law-common 10.45.3-beta.12 → 10.45.3-beta.14
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/src/api/interface/billing.create.dto.interface.d.ts +1 -1
- package/dist/src/entities/enums/billing.transaction.enum.d.ts +2 -1
- package/dist/src/entities/enums/billing.transaction.enum.js +1 -0
- package/dist/src/entities/interface/billing.entity.interface.d.ts +1 -0
- package/dist/src/entities/model/billing.entity.model.d.ts +1 -0
- package/dist/src/entities/model/billing.entity.model.js +1 -0
- package/dist/src/utils/helper.fn.util.js +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BillingImpactEnum, BillingReimbursementExpenseChangedStatusEnum, BillingStatusEnum, IBillingEntity, IBillingTimesheetEntity, IEntityCreateDto, IProjectEntity, ITimesheetEntity } from "../../entities";
|
|
2
|
-
export type IBillingCreateExclude = "paymentStatus" | "status" | "writeoffAmount" | "tdsAmount" | "totalAmountPaid" | "creditNoteAmount" | "invoicePdfUrl" | "startDate" | "endDate";
|
|
2
|
+
export type IBillingCreateExclude = "paymentStatus" | "status" | "writeoffAmount" | "tdsAmount" | "totalAmountPaid" | "creditNoteAmount" | "refundAmount" | "invoicePdfUrl" | "startDate" | "endDate";
|
|
3
3
|
export interface IBillingCreateDto extends Omit<IEntityCreateDto<IBillingEntity>, IBillingCreateExclude | "particulars"> {
|
|
4
4
|
timesheets?: IBillingTimesheetsDto;
|
|
5
5
|
status?: BillingStatusEnum;
|
|
@@ -2,7 +2,8 @@ export declare enum BillingTransactionType {
|
|
|
2
2
|
TDS = "TDS",
|
|
3
3
|
WRITE_OFF = "WRITE_OFF",
|
|
4
4
|
CREDIT_NOTE = "CREDIT_NOTE",
|
|
5
|
-
PAYMENT = "PAYMENT"
|
|
5
|
+
PAYMENT = "PAYMENT",
|
|
6
|
+
REFUND = "REFUND"
|
|
6
7
|
}
|
|
7
8
|
export declare namespace BillingTransactionType {
|
|
8
9
|
function getNames(): string[];
|
|
@@ -9,6 +9,7 @@ var BillingTransactionType;
|
|
|
9
9
|
BillingTransactionType["WRITE_OFF"] = "WRITE_OFF";
|
|
10
10
|
BillingTransactionType["CREDIT_NOTE"] = "CREDIT_NOTE";
|
|
11
11
|
BillingTransactionType["PAYMENT"] = "PAYMENT";
|
|
12
|
+
BillingTransactionType["REFUND"] = "REFUND";
|
|
12
13
|
})(BillingTransactionType || (exports.BillingTransactionType = BillingTransactionType = {}));
|
|
13
14
|
(function (BillingTransactionType) {
|
|
14
15
|
function getNames() {
|
|
@@ -20,6 +20,7 @@ export interface IBillingEntity extends IEntityAuditColumn {
|
|
|
20
20
|
totalAmountPaid: number;
|
|
21
21
|
tdsAmount: number;
|
|
22
22
|
creditNoteAmount: number;
|
|
23
|
+
refundAmount?: number;
|
|
23
24
|
invoiceEntityId: number;
|
|
24
25
|
invoiceEntityType: BillingInvoiceTypeEnum;
|
|
25
26
|
invoicePdfUrl?: string | null;
|
|
@@ -40,6 +40,7 @@ export declare class BillingEntityModel extends BaseEntityModel<EntityEnum.BILLI
|
|
|
40
40
|
totalAmountPaid: number;
|
|
41
41
|
tdsAmount: number;
|
|
42
42
|
creditNoteAmount: number;
|
|
43
|
+
refundAmount?: number;
|
|
43
44
|
invoiceEntityId: number;
|
|
44
45
|
invoiceEntityType: BillingInvoiceTypeEnum;
|
|
45
46
|
invoicePdfUrl?: string | null;
|
|
@@ -32,6 +32,7 @@ class BillingEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
|
32
32
|
this.totalAmountPaid = 0;
|
|
33
33
|
this.tdsAmount = 0;
|
|
34
34
|
this.creditNoteAmount = 0;
|
|
35
|
+
this.refundAmount = 0;
|
|
35
36
|
this.invoiceEntityId = 0;
|
|
36
37
|
this.invoiceEntityType = billing_invoice_type_enum_1.BillingInvoiceTypeEnum.CLIENT;
|
|
37
38
|
this.invoiceContactName = "";
|
|
@@ -45,10 +45,10 @@ exports.epochToDateTime = epochToDateTime;
|
|
|
45
45
|
exports.toEpochSeconds = toEpochSeconds;
|
|
46
46
|
exports.dateTimeToEpoch = dateTimeToEpoch;
|
|
47
47
|
const date_fns_1 = require("date-fns");
|
|
48
|
+
const lodash_1 = require("lodash");
|
|
48
49
|
const util_constants_1 = require("../constants/util.constants");
|
|
49
50
|
const error_key_enum_1 = require("../enums/error.key.enum");
|
|
50
51
|
const exceptions_1 = require("../exceptions");
|
|
51
|
-
const lodash_1 = require("lodash");
|
|
52
52
|
function groupByFunction(list, keyGetter) {
|
|
53
53
|
const map = new Map();
|
|
54
54
|
list.forEach((item) => {
|