@react-pakistan/util-functions 1.22.60 → 1.22.61
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.
|
@@ -145,19 +145,6 @@ products, phone, lastName, firstName, email, country, city, address, prisma, })
|
|
|
145
145
|
});
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
|
-
products.map((product) => __awaiter(void 0, void 0, void 0, function* () {
|
|
149
|
-
yield prisma.quotesInvoicesOnStellarProducts.create({
|
|
150
|
-
data: {
|
|
151
|
-
quoteInvoiceId: quoteInvoice === null || quoteInvoice === void 0 ? void 0 : quoteInvoice.id,
|
|
152
|
-
productId: product.id,
|
|
153
|
-
productQuantity: product.productQuantity,
|
|
154
|
-
},
|
|
155
|
-
include: {
|
|
156
|
-
product: true,
|
|
157
|
-
quoteInvoice: true,
|
|
158
|
-
},
|
|
159
|
-
});
|
|
160
|
-
}));
|
|
161
148
|
if (mode === 'Edit') {
|
|
162
149
|
try {
|
|
163
150
|
const foundQuoteInvoice = yield prisma.quoteInvoice.findUnique({
|
|
@@ -213,6 +200,22 @@ products, phone, lastName, firstName, email, country, city, address, prisma, })
|
|
|
213
200
|
// console.log('err', err);
|
|
214
201
|
}
|
|
215
202
|
}
|
|
203
|
+
if (quoteInvoice) {
|
|
204
|
+
console.log('=>>>>>', quoteInvoice);
|
|
205
|
+
products.map((product) => __awaiter(void 0, void 0, void 0, function* () {
|
|
206
|
+
yield prisma.quotesInvoicesOnStellarProducts.create({
|
|
207
|
+
data: {
|
|
208
|
+
quoteInvoiceId: quoteInvoice === null || quoteInvoice === void 0 ? void 0 : quoteInvoice.id,
|
|
209
|
+
productId: product.id,
|
|
210
|
+
productQuantity: product.productQuantity,
|
|
211
|
+
},
|
|
212
|
+
include: {
|
|
213
|
+
product: true,
|
|
214
|
+
quoteInvoice: true,
|
|
215
|
+
},
|
|
216
|
+
});
|
|
217
|
+
}));
|
|
218
|
+
}
|
|
216
219
|
return quoteInvoice;
|
|
217
220
|
});
|
|
218
221
|
exports.postQuoteInvoice = postQuoteInvoice;
|