@react-pakistan/util-functions 1.24.21 → 1.24.22
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.
|
@@ -21,6 +21,6 @@ interface DeleteQuoteInvoiceArgs {
|
|
|
21
21
|
export declare const getQuotesInvoices: ({ prisma, }: GetQuotesInvoicesArgs) => Promise<Array<QuoteInvoiceBE>>;
|
|
22
22
|
export declare const getQuoteInvoiceById: ({ prisma, id, }: GetQuoteInvoiceByIdArgs) => Promise<QuoteInvoiceBE>;
|
|
23
23
|
export declare const postQuotesInvoices: ({ currentPage, pageLimit, prisma, queryWhere, }: PostQuotesInvoicesArgs) => Promise<Array<QuoteInvoiceBE>>;
|
|
24
|
-
export declare const postQuoteInvoice: ({ address, category, city, companyId, country, currency, customerId, date, discount, discountUnit, email, expiryDate, firstName, id, invoiceStatus, lastName, mode, note, phone, prisma, products, quoteStatus, ref, services, subTotal,
|
|
24
|
+
export declare const postQuoteInvoice: ({ address, category, city, companyId, country, currency, customerId, date, discount, discountUnit, email, expiryDate, firstName, id, invoiceStatus, lastName, mode, note, phone, prisma, products, quoteStatus, ref, services, subTotal, taxRate, total, }: any) => Promise<QuoteInvoiceBE>;
|
|
25
25
|
export declare const deleteQuoteInvoice: ({ prisma, id, }: DeleteQuoteInvoiceArgs) => Promise<QuoteInvoiceBE>;
|
|
26
26
|
export {};
|
|
@@ -132,7 +132,7 @@ exports.postQuotesInvoices = postQuotesInvoices;
|
|
|
132
132
|
var postQuoteInvoice = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
133
133
|
var quoteInvoice, mappedServices, foundQuoteInvoice, filteredEditServices, filteredCreateServices, err_1;
|
|
134
134
|
var _c, _d;
|
|
135
|
-
var address = _b.address, category = _b.category, city = _b.city, companyId = _b.companyId, country = _b.country, currency = _b.currency, customerId = _b.customerId, date = _b.date, discount = _b.discount, discountUnit = _b.discountUnit, email = _b.email, expiryDate = _b.expiryDate, firstName = _b.firstName, id = _b.id, invoiceStatus = _b.invoiceStatus, lastName = _b.lastName, mode = _b.mode, note = _b.note, phone = _b.phone, prisma = _b.prisma, products = _b.products, quoteStatus = _b.quoteStatus, ref = _b.ref, services = _b.services, subTotal = _b.subTotal,
|
|
135
|
+
var address = _b.address, category = _b.category, city = _b.city, companyId = _b.companyId, country = _b.country, currency = _b.currency, customerId = _b.customerId, date = _b.date, discount = _b.discount, discountUnit = _b.discountUnit, email = _b.email, expiryDate = _b.expiryDate, firstName = _b.firstName, id = _b.id, invoiceStatus = _b.invoiceStatus, lastName = _b.lastName, mode = _b.mode, note = _b.note, phone = _b.phone, prisma = _b.prisma, products = _b.products, quoteStatus = _b.quoteStatus, ref = _b.ref, services = _b.services, subTotal = _b.subTotal, taxRate = _b.taxRate, total = _b.total;
|
|
136
136
|
return __generator(this, function (_e) {
|
|
137
137
|
switch (_e.label) {
|
|
138
138
|
case 0:
|
|
@@ -152,7 +152,7 @@ var postQuoteInvoice = function (_a) { return __awaiter(void 0, [_a], void 0, fu
|
|
|
152
152
|
companyId: companyId,
|
|
153
153
|
})), { currency: currency }), (customerId && {
|
|
154
154
|
customerId: customerId,
|
|
155
|
-
})), { date: date, discount: discount, discountUnit: discountUnit, expiryDate: expiryDate, invoiceStatus: invoiceStatus, note: note, quoteStatus: quoteStatus, ref: ref, subTotal: subTotal,
|
|
155
|
+
})), { date: date, discount: discount, discountUnit: discountUnit, expiryDate: expiryDate, invoiceStatus: invoiceStatus, note: note, quoteStatus: quoteStatus, ref: ref, subTotal: subTotal, taxRate: taxRate, total: total }), (mappedServices && {
|
|
156
156
|
services: {
|
|
157
157
|
createMany: {
|
|
158
158
|
data: mappedServices,
|
|
@@ -191,7 +191,7 @@ var postQuoteInvoice = function (_a) { return __awaiter(void 0, [_a], void 0, fu
|
|
|
191
191
|
companyId: companyId,
|
|
192
192
|
})), { currency: currency }), (customerId && {
|
|
193
193
|
customerId: customerId,
|
|
194
|
-
})), { date: date, discount: discount, discountUnit: discountUnit, expiryDate: expiryDate, invoiceStatus: invoiceStatus, note: note, quoteStatus: quoteStatus, ref: ref, subTotal: subTotal,
|
|
194
|
+
})), { date: date, discount: discount, discountUnit: discountUnit, expiryDate: expiryDate, invoiceStatus: invoiceStatus, note: note, quoteStatus: quoteStatus, ref: ref, subTotal: subTotal, taxRate: taxRate, total: total, customer: {
|
|
195
195
|
create: {
|
|
196
196
|
address: address,
|
|
197
197
|
city: city,
|
|
@@ -269,7 +269,7 @@ var postQuoteInvoice = function (_a) { return __awaiter(void 0, [_a], void 0, fu
|
|
|
269
269
|
where: {
|
|
270
270
|
id: id,
|
|
271
271
|
},
|
|
272
|
-
data: __assign(__assign({}, foundQuoteInvoice), { category: category, companyId: companyId, currency: currency, customerId: customerId, date: date, expiryDate: expiryDate, invoiceStatus: invoiceStatus, note: note, quoteStatus: quoteStatus, ref: ref, subTotal: subTotal,
|
|
272
|
+
data: __assign(__assign({}, foundQuoteInvoice), { category: category, companyId: companyId, currency: currency, customerId: customerId, date: date, expiryDate: expiryDate, invoiceStatus: invoiceStatus, note: note, quoteStatus: quoteStatus, ref: ref, subTotal: subTotal, taxRate: taxRate, total: total }),
|
|
273
273
|
})];
|
|
274
274
|
case 10:
|
|
275
275
|
quoteInvoice = _e.sent();
|