@pisell/pisellos 3.0.62 → 3.0.63
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.
|
@@ -327,6 +327,7 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
327
327
|
tag: discount.tag || discount.type,
|
|
328
328
|
discount: {
|
|
329
329
|
discount_card_type: discount === null || discount === void 0 || (_discount$metadata = discount.metadata) === null || _discount$metadata === void 0 ? void 0 : _discount$metadata.discount_card_type,
|
|
330
|
+
fixed_amount: product.price,
|
|
330
331
|
resource_id: discount.id,
|
|
331
332
|
title: discount.format_title,
|
|
332
333
|
original_amount: product.origin_total,
|
|
@@ -480,6 +481,7 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
480
481
|
type: _selectedDiscount.tag === 'product_discount_card' ? 'discount_card' : _selectedDiscount.tag,
|
|
481
482
|
discount: {
|
|
482
483
|
discount_card_type: _selectedDiscount === null || _selectedDiscount === void 0 || (_selectedDiscount$met = _selectedDiscount.metadata) === null || _selectedDiscount$met === void 0 ? void 0 : _selectedDiscount$met.discount_card_type,
|
|
484
|
+
fixed_amount: new Decimal(productOriginTotal).minus(new Decimal(targetProductTotal)).toNumber(),
|
|
483
485
|
resource_id: _selectedDiscount.id,
|
|
484
486
|
title: _selectedDiscount.format_title,
|
|
485
487
|
original_amount: productOriginTotal,
|
|
@@ -210,6 +210,7 @@ var RulesModule = class extends import_BaseModule.BaseModule {
|
|
|
210
210
|
tag: discount.tag || discount.type,
|
|
211
211
|
discount: {
|
|
212
212
|
discount_card_type: (_d = discount == null ? void 0 : discount.metadata) == null ? void 0 : _d.discount_card_type,
|
|
213
|
+
fixed_amount: product.price,
|
|
213
214
|
resource_id: discount.id,
|
|
214
215
|
title: discount.format_title,
|
|
215
216
|
original_amount: product.origin_total,
|
|
@@ -331,6 +332,7 @@ var RulesModule = class extends import_BaseModule.BaseModule {
|
|
|
331
332
|
type: selectedDiscount2.tag === "product_discount_card" ? "discount_card" : selectedDiscount2.tag,
|
|
332
333
|
discount: {
|
|
333
334
|
discount_card_type: (_i = selectedDiscount2 == null ? void 0 : selectedDiscount2.metadata) == null ? void 0 : _i.discount_card_type,
|
|
335
|
+
fixed_amount: new import_decimal.default(productOriginTotal).minus(new import_decimal.default(targetProductTotal)).toNumber(),
|
|
334
336
|
resource_id: selectedDiscount2.id,
|
|
335
337
|
title: selectedDiscount2.format_title,
|
|
336
338
|
original_amount: productOriginTotal,
|