@atomsolution/sdk-merchant 1.6.0 → 1.6.1
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/batch-product-creation.cjs +6 -6
- package/dist/batch-product-creation.cjs.map +1 -1
- package/dist/batch-product-creation.esm.js +6 -6
- package/dist/batch-product-creation.esm.js.map +1 -1
- package/dist/batch-product-creation.js +6 -6
- package/dist/batch-product-creation.js.map +1 -1
- package/package.json +1 -1
|
@@ -29280,18 +29280,18 @@ const CreateProductConfirmModal = ({
|
|
|
29280
29280
|
const handleCreateProducts = () => __async(exports, null, function* () {
|
|
29281
29281
|
setLoading(true);
|
|
29282
29282
|
const formattedProducts = checkedProducts.map((product) => {
|
|
29283
|
-
var _a;
|
|
29284
|
-
return {
|
|
29283
|
+
var _a, _b;
|
|
29284
|
+
return __spreadValues({
|
|
29285
29285
|
code: product.code,
|
|
29286
29286
|
name: product.name,
|
|
29287
|
-
price: (_a = product.priceBeforeTax) != null ? _a : 0,
|
|
29287
|
+
price: taxDeductionMethod === "direct" ? product.priceAfterTax : (_a = product.priceBeforeTax) != null ? _a : 0,
|
|
29288
29288
|
img: product.img || "",
|
|
29289
29289
|
unit: product.unit,
|
|
29290
29290
|
cost: 0,
|
|
29291
|
-
tax: taxDeductionMethod
|
|
29291
|
+
tax: taxDeductionMethod === "direct" ? 0 : product.tax,
|
|
29292
29292
|
status: 0,
|
|
29293
29293
|
category_names: product.category
|
|
29294
|
-
};
|
|
29294
|
+
}, taxDeductionMethod === "credit" ? { price_after_vat: (_b = product.priceAfterTax) != null ? _b : 0 } : {});
|
|
29295
29295
|
});
|
|
29296
29296
|
try {
|
|
29297
29297
|
const response = yield createProductsService.createProducts(
|
|
@@ -57800,7 +57800,7 @@ const ProductPreviewTable = ({
|
|
|
57800
57800
|
width: "200px",
|
|
57801
57801
|
minWidth: "200px",
|
|
57802
57802
|
render: ({ tax }) => {
|
|
57803
|
-
if (tax
|
|
57803
|
+
if (tax === "" || tax === null || tax === void 0) {
|
|
57804
57804
|
return "";
|
|
57805
57805
|
}
|
|
57806
57806
|
const taxNumber = Number(tax);
|