@react-pakistan/util-functions 1.24.19 → 1.24.20

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.
@@ -148,7 +148,11 @@ var postQuoteInvoice = function (_a) { return __awaiter(void 0, [_a], void 0, fu
148
148
  }
149
149
  if (!(customerId || companyId)) return [3 /*break*/, 3];
150
150
  return [4 /*yield*/, prisma.quoteInvoice.create({
151
- data: __assign({ category: category, companyId: companyId, currency: currency, customerId: customerId, date: date, discount: discount, discountUnit: discountUnit, expiryDate: expiryDate, invoiceStatus: invoiceStatus, note: note, quoteStatus: quoteStatus, ref: ref, subTotal: subTotal, taxValue: taxValue, total: total }, (mappedServices && {
151
+ data: __assign(__assign(__assign(__assign(__assign({ category: category }, (companyId && {
152
+ companyId: companyId,
153
+ })), { currency: currency }), (customerId && {
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 && {
152
156
  services: {
153
157
  createMany: {
154
158
  data: mappedServices,
@@ -183,23 +187,11 @@ var postQuoteInvoice = function (_a) { return __awaiter(void 0, [_a], void 0, fu
183
187
  _e.sent();
184
188
  return [3 /*break*/, 5];
185
189
  case 3: return [4 /*yield*/, prisma.quoteInvoice.create({
186
- data: {
187
- category: category,
190
+ data: __assign(__assign(__assign(__assign({ category: category }, (companyId && {
188
191
  companyId: companyId,
189
- currency: currency,
192
+ })), { currency: currency }), (customerId && {
190
193
  customerId: customerId,
191
- date: date,
192
- discount: discount,
193
- discountUnit: discountUnit,
194
- expiryDate: expiryDate,
195
- invoiceStatus: invoiceStatus,
196
- note: note,
197
- quoteStatus: quoteStatus,
198
- ref: ref,
199
- subTotal: subTotal,
200
- taxValue: taxValue,
201
- total: total,
202
- customer: {
194
+ })), { date: date, discount: discount, discountUnit: discountUnit, expiryDate: expiryDate, invoiceStatus: invoiceStatus, note: note, quoteStatus: quoteStatus, ref: ref, subTotal: subTotal, taxValue: taxValue, total: total, customer: {
203
195
  create: {
204
196
  address: address,
205
197
  city: city,
@@ -209,13 +201,11 @@ var postQuoteInvoice = function (_a) { return __awaiter(void 0, [_a], void 0, fu
209
201
  lastName: lastName,
210
202
  phone: phone,
211
203
  },
212
- },
213
- services: {
204
+ }, services: {
214
205
  createMany: {
215
206
  data: mappedServices,
216
207
  },
217
- },
218
- },
208
+ } }),
219
209
  })];
220
210
  case 4:
221
211
  quoteInvoice = _e.sent();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-pakistan/util-functions",
3
- "version": "1.24.19",
3
+ "version": "1.24.20",
4
4
  "description": "A library of all util functions",
5
5
  "main": "index.js",
6
6
  "scripts": {