@react-pakistan/util-functions 1.22.59 → 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.
|
@@ -97,19 +97,6 @@ products, phone, lastName, firstName, email, country, city, address, prisma, })
|
|
|
97
97
|
products: true,
|
|
98
98
|
},
|
|
99
99
|
});
|
|
100
|
-
products.map((product) => __awaiter(void 0, void 0, void 0, function* () {
|
|
101
|
-
yield prisma.quotesInvoicesOnStellarProducts.create({
|
|
102
|
-
data: {
|
|
103
|
-
quoteInvoiceId: quoteInvoice === null || quoteInvoice === void 0 ? void 0 : quoteInvoice.id,
|
|
104
|
-
productId: product.id,
|
|
105
|
-
productQuantity: product.productQuantity,
|
|
106
|
-
},
|
|
107
|
-
include: {
|
|
108
|
-
product: true,
|
|
109
|
-
quoteInvoice: true,
|
|
110
|
-
},
|
|
111
|
-
});
|
|
112
|
-
}));
|
|
113
100
|
// await prisma.quotesInvoicesOnStellarProducts.create({
|
|
114
101
|
// data: {
|
|
115
102
|
// quoteInvoiceId: quoteInvoice.id,
|
|
@@ -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;
|