@react-pakistan/util-functions 1.24.20 → 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, 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,
@@ -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
  }
@@ -5,7 +5,7 @@ var uuid_1 = require("uuid");
5
5
  var constants_1 = require("../constants");
6
6
  var generateRef = function (_a) {
7
7
  var _b = _a.refLength, refLength = _b === void 0 ? 5 : _b;
8
- var ref = (0, uuid_1.v4)().slice(0, refLength);
8
+ var ref = (0, uuid_1.v4)().toUpperCase().slice(0, refLength);
9
9
  var currentYear = new Date().getFullYear().toString().slice(-2);
10
10
  return "".concat(ref).concat(constants_1.VALUE_DELIMITER.SLASH).concat(currentYear);
11
11
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-pakistan/util-functions",
3
- "version": "1.24.20",
3
+ "version": "1.24.22",
4
4
  "description": "A library of all util functions",
5
5
  "main": "index.js",
6
6
  "scripts": {