@react-pakistan/util-functions 1.24.21 → 1.24.23

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, taxValue, total, }: any) => Promise<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, 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, taxValue = _b.taxValue, total = _b.total;
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, taxValue: taxValue, total: total }), (mappedServices && {
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,
@@ -167,14 +167,14 @@ var postQuoteInvoice = function (_a) { return __awaiter(void 0, [_a], void 0, fu
167
167
  case 1:
168
168
  quoteInvoice = _e.sent();
169
169
  return [4 /*yield*/, ((_c = products === null || products === void 0 ? void 0 : products.filter(function (product) { return product.productId; })) === null || _c === void 0 ? void 0 : _c.forEach(function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
170
- var _id = _b.id, productQuantity = _b.productQuantity;
170
+ var _id = _b.id, quantity = _b.quantity;
171
171
  return __generator(this, function (_c) {
172
172
  switch (_c.label) {
173
173
  case 0: return [4 /*yield*/, prisma.quotesInvoicesOnStellarProducts.create({
174
174
  data: {
175
175
  quoteInvoiceId: quoteInvoice === null || quoteInvoice === void 0 ? void 0 : quoteInvoice.id,
176
176
  productId: _id,
177
- productQuantity: productQuantity,
177
+ quantity: quantity,
178
178
  },
179
179
  })];
180
180
  case 1:
@@ -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, taxValue: taxValue, total: total, customer: {
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, taxValue: taxValue, total: total }),
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();
@@ -210,7 +210,7 @@ export interface QuoteInvoiceBE {
210
210
  ref: string;
211
211
  services: Array<ServiceBE>;
212
212
  subTotal: string;
213
- taxValue: string;
213
+ taxRate: string;
214
214
  total: string;
215
215
  updatedAt: string;
216
216
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-pakistan/util-functions",
3
- "version": "1.24.21",
3
+ "version": "1.24.23",
4
4
  "description": "A library of all util functions",
5
5
  "main": "index.js",
6
6
  "scripts": {