@react-pakistan/util-functions 1.23.52 → 1.23.54
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.
|
@@ -41,6 +41,6 @@ interface DeletePaymentArgs {
|
|
|
41
41
|
export declare const getPayments: ({ prisma, }: GetPaymentsArgs) => Promise<Array<PaymentBE>>;
|
|
42
42
|
export declare const getPaymentById: ({ id, prisma, }: GetPaymentByIdArgs) => Promise<PaymentBE>;
|
|
43
43
|
export declare const postPayments: ({ currentPage, include, orderBy, pageLimit, prisma, queryWhere, }: PostPaymentsArgs) => Promise<Array<PaymentBE>>;
|
|
44
|
-
export declare const postPayment: ({ amount, attachment,
|
|
44
|
+
export declare const postPayment: ({ amount, attachment, currency, date, description, id, mode, paymentType, prisma, quoteInvoiceId, ref, }: PostPaymentArgs) => Promise<Array<PaymentBE>>;
|
|
45
45
|
export declare const deletePayment: ({ id, prisma, }: DeletePaymentArgs) => Promise<PaymentBE>;
|
|
46
46
|
export {};
|
|
@@ -98,12 +98,14 @@ var postPayments = function (_a) { return __awaiter(void 0, [_a], void 0, functi
|
|
|
98
98
|
exports.postPayments = postPayments;
|
|
99
99
|
var postPayment = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
100
100
|
var invoice, allPaymentsForInvoice, balance, payment;
|
|
101
|
-
var amount = _b.amount, attachment = _b.attachment,
|
|
101
|
+
var amount = _b.amount, attachment = _b.attachment,
|
|
102
|
+
// createdAt,
|
|
103
|
+
currency = _b.currency, date = _b.date, description = _b.description, id = _b.id, mode = _b.mode, paymentType = _b.paymentType, prisma = _b.prisma, quoteInvoiceId = _b.quoteInvoiceId, ref = _b.ref;
|
|
102
104
|
return __generator(this, function (_c) {
|
|
103
105
|
switch (_c.label) {
|
|
104
106
|
case 0: return [4 /*yield*/, prisma.quoteInvoice.findUnique({
|
|
105
107
|
where: {
|
|
106
|
-
|
|
108
|
+
id: quoteInvoiceId,
|
|
107
109
|
},
|
|
108
110
|
})];
|
|
109
111
|
case 1:
|
|
@@ -130,7 +132,6 @@ var postPayment = function (_a) { return __awaiter(void 0, [_a], void 0, functio
|
|
|
130
132
|
update: {
|
|
131
133
|
amount: amount,
|
|
132
134
|
attachment: attachment,
|
|
133
|
-
currency: currency,
|
|
134
135
|
date: date,
|
|
135
136
|
description: description,
|
|
136
137
|
mode: mode,
|
|
@@ -142,7 +143,7 @@ var postPayment = function (_a) { return __awaiter(void 0, [_a], void 0, functio
|
|
|
142
143
|
amount: amount,
|
|
143
144
|
attachment: attachment,
|
|
144
145
|
balance: balance,
|
|
145
|
-
|
|
146
|
+
// createdAt,
|
|
146
147
|
currency: currency,
|
|
147
148
|
date: date,
|
|
148
149
|
description: description,
|