@dascompany/product 3.4.1 → 3.4.2
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.
- package/dist/reader/CompanyDataReader.js +1 -0
- package/dist/reader/FileConnectionsReader.js +1 -1
- package/dist/reader/FilesReader.js +1 -1
- package/dist/reader/OrderProductsReader.js +3 -3
- package/dist/reader/OrderReader.js +1 -1
- package/dist/reader/OrderStatusReader.js +1 -1
- package/dist/reader/ProductReader.js +4 -4
- package/dist/types/CompanyDetailsI.d.ts +1 -1
- package/dist/types/FileI.d.ts +1 -1
- package/dist/types/PaymentMethodI.d.ts +1 -1
- package/dist/types/ProductI.d.ts +1 -1
- package/package.json +1 -1
|
@@ -4,6 +4,7 @@ import createQueryOptionsForId from "../utils/createQueryOptionsForId";
|
|
|
4
4
|
export default class CompanyDataReader {
|
|
5
5
|
static async get() {
|
|
6
6
|
const companyData = await DatabaseConnection.getInstance().companyData.select();
|
|
7
|
+
console.log('companyData', companyData);
|
|
7
8
|
if (companyData) {
|
|
8
9
|
const address = companyData?.address_id ? await AddressesReader.get(createQueryOptionsForId(companyData.address_id)) : null;
|
|
9
10
|
return {
|
|
@@ -17,7 +17,7 @@ export default class FileConnectionsReader {
|
|
|
17
17
|
fileId: fileConnections.file_id,
|
|
18
18
|
connectionType: fileConnections.connection_type,
|
|
19
19
|
connectionId: fileConnections.connection_id,
|
|
20
|
-
sequence: fileConnections.sequence
|
|
20
|
+
sequence: Number(fileConnections.sequence)
|
|
21
21
|
};
|
|
22
22
|
return correctFileConnection;
|
|
23
23
|
}
|
|
@@ -23,9 +23,9 @@ export default class OrderProductsReader {
|
|
|
23
23
|
productId: orderProduct.product_id,
|
|
24
24
|
sku: orderProduct.sku,
|
|
25
25
|
title: orderProduct.title,
|
|
26
|
-
netPrice: orderProduct.net_price,
|
|
27
|
-
grossPrice: PriceConverter.netToGrossPrice(orderProduct.net_price, orderProduct.vat),
|
|
28
|
-
vat: orderProduct.vat,
|
|
26
|
+
netPrice: Number(orderProduct.net_price),
|
|
27
|
+
grossPrice: PriceConverter.netToGrossPrice(Number(orderProduct.net_price), Number(orderProduct.vat)),
|
|
28
|
+
vat: Number(orderProduct.vat),
|
|
29
29
|
thumbnail,
|
|
30
30
|
};
|
|
31
31
|
return correctProduct;
|
|
@@ -39,7 +39,7 @@ export default class OrderReader {
|
|
|
39
39
|
const correctOrder = {
|
|
40
40
|
id: order.id,
|
|
41
41
|
email: order.email,
|
|
42
|
-
price: order.price,
|
|
42
|
+
price: Number(order.price),
|
|
43
43
|
createdAt: order.created_at,
|
|
44
44
|
clientId: order.client_id,
|
|
45
45
|
deliveryDetailsId: order.delivery_details_id,
|
|
@@ -45,17 +45,17 @@ export default class ProductReader {
|
|
|
45
45
|
url: product.url,
|
|
46
46
|
title: product.title,
|
|
47
47
|
description: product.description,
|
|
48
|
-
netPrice: product.net_price,
|
|
49
|
-
vat: product.vat,
|
|
48
|
+
netPrice: Number(product.net_price),
|
|
49
|
+
vat: Number(product.vat),
|
|
50
50
|
color: product.color,
|
|
51
|
-
quantity: product.quantity,
|
|
51
|
+
quantity: Number(product.quantity),
|
|
52
52
|
width: product.width,
|
|
53
53
|
height: product.height,
|
|
54
54
|
length: product.length,
|
|
55
55
|
createdAt: product.created_at,
|
|
56
56
|
deleted: product.deleted,
|
|
57
57
|
thumbnail: thumbnail ? thumbnail : null,
|
|
58
|
-
grossPrice: PriceConverter.netToGrossPrice(product.net_price, product.vat),
|
|
58
|
+
grossPrice: PriceConverter.netToGrossPrice(Number(product.net_price), Number(product.vat)),
|
|
59
59
|
jsonData: product.json_data
|
|
60
60
|
};
|
|
61
61
|
}
|
package/dist/types/FileI.d.ts
CHANGED
package/dist/types/ProductI.d.ts
CHANGED