tplus-components-touch 3.39.7 → 3.39.8

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.
@@ -463,17 +463,18 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
463
463
  } else {
464
464
  item.badge = { text: '', position: '', className: '' };
465
465
  }
466
- if (!item.IsPresent) {
467
- discountRetailTotalAount += item.RetailPrice * item.Quantity;
468
- }
469
466
  if (item.PromotionDetails && item.PromotionDetails.length > 0) {
470
467
  count++;
471
468
  }
472
469
  item.InventoryName = item.Inventory.Name;
473
470
  item.Discount = (0, _utils.getRoundValue)(item.RetailPrice - item.TaxPrice, pricePrecision);
474
- discountPrototypeTotalAmount += item.DetailDiscountAmount;
471
+ if (!item.IsPresent) {
472
+ discountPrototypeTotalAmount += item.DetailDiscountAmount;
473
+ item.TotalDiscount = item.DetailDiscountAmount;
474
+ } else {
475
+ item.TotalDiscount = 0;
476
+ }
475
477
  //item.TotalDiscount = getFixedNumber(item.Discount * item.Quantity);
476
- item.TotalDiscount = item.DetailDiscountAmount;
477
478
  item.nAmount = (0, _utils.getFixedNumber)(item.TaxAmount);
478
479
  item.UnitName = item.Unit.Name;
479
480
  item.nQuantity = (0, _utils.getRoundValue)(item.Quantity, quantityPrecision);
@@ -484,7 +485,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
484
485
  dataSource: dataSource,
485
486
  discountTotalAmount: (0, _utils.getFixedNumber)(_this2.props.amount),
486
487
  discountPrototypeTotalAmount: (0, _utils.getFixedNumber)(discountPrototypeTotalAmount),
487
- discountRetailTotalAount: (0, _utils.getFixedNumber)(_this2.props.amount + discountPrototypeTotalAmount)
488
+ discountRetailTotalAount: (0, _utils.getFixedNumber)(_this2.props.amount + parseFloat(discountPrototypeTotalAmount))
488
489
  });
489
490
  return count;
490
491
  };