@react-pakistan/util-functions 1.22.74 → 1.22.76
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.
|
@@ -26,6 +26,7 @@ interface PostPaymentArgs {
|
|
|
26
26
|
ref: string;
|
|
27
27
|
quoteInvoiceId: string;
|
|
28
28
|
prisma: any;
|
|
29
|
+
createdAt: string;
|
|
29
30
|
}
|
|
30
31
|
interface DeletePaymentArgs {
|
|
31
32
|
prisma: any;
|
|
@@ -34,6 +35,6 @@ interface DeletePaymentArgs {
|
|
|
34
35
|
export declare const getPayments: ({ prisma, }: GetPaymentsArgs) => Promise<Array<PaymentBE>>;
|
|
35
36
|
export declare const getPaymentById: ({ id, prisma, }: GetPaymentByIdArgs) => Promise<PaymentBE>;
|
|
36
37
|
export declare const postPayments: ({ currentPage, pageLimit, prisma, queryWhere, }: PostPaymentsArgs) => Promise<Array<PaymentBE>>;
|
|
37
|
-
export declare const postPayment: ({ id, amount, attachment, currency, date, description, mode, paymentType, ref, quoteInvoiceId, prisma, }: PostPaymentArgs) => Promise<Array<PaymentBE>>;
|
|
38
|
+
export declare const postPayment: ({ id, amount, attachment, currency, date, description, mode, paymentType, ref, quoteInvoiceId, prisma, createdAt, }: PostPaymentArgs) => Promise<Array<PaymentBE>>;
|
|
38
39
|
export declare const deletePayment: ({ id, prisma, }: DeletePaymentArgs) => Promise<PaymentBE>;
|
|
39
40
|
export {};
|
|
@@ -38,6 +38,9 @@ const postPayments = (_c) => __awaiter(void 0, [_c], void 0, function* ({ curren
|
|
|
38
38
|
orderBy: {
|
|
39
39
|
createdAt: 'desc',
|
|
40
40
|
},
|
|
41
|
+
include: {
|
|
42
|
+
quoteInvoice: true,
|
|
43
|
+
},
|
|
41
44
|
where: queryWhere,
|
|
42
45
|
take: pageLimit,
|
|
43
46
|
skip: currentPage === 1 ? 0 : currentPage - 1 * pageLimit,
|
|
@@ -46,7 +49,7 @@ const postPayments = (_c) => __awaiter(void 0, [_c], void 0, function* ({ curren
|
|
|
46
49
|
return payments;
|
|
47
50
|
});
|
|
48
51
|
exports.postPayments = postPayments;
|
|
49
|
-
const postPayment = (_d) => __awaiter(void 0, [_d], void 0, function* ({ id, amount, attachment, currency, date, description, mode, paymentType, ref, quoteInvoiceId, prisma, }) {
|
|
52
|
+
const postPayment = (_d) => __awaiter(void 0, [_d], void 0, function* ({ id, amount, attachment, currency, date, description, mode, paymentType, ref, quoteInvoiceId, prisma, createdAt, }) {
|
|
50
53
|
const payment = yield prisma.payment.upsert({
|
|
51
54
|
where: {
|
|
52
55
|
id,
|
|
@@ -72,6 +75,7 @@ const postPayment = (_d) => __awaiter(void 0, [_d], void 0, function* ({ id, amo
|
|
|
72
75
|
paymentType,
|
|
73
76
|
quoteInvoiceId,
|
|
74
77
|
ref,
|
|
78
|
+
createdAt,
|
|
75
79
|
},
|
|
76
80
|
});
|
|
77
81
|
return payment;
|