@aptos-scp/scp-component-store-selling-features-domain-model 2.0.0 → 2.1.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.
@@ -256,9 +256,11 @@ class TenderType {
256
256
  var _a, _b;
257
257
  let withOfflineTransactionTotal = new scp_component_business_core_1.Money(0, accountingCurrency);
258
258
  const withOfflineTransactionItemAmount = TenderType.getItemAmountsWithOfflineTransaction((_a = displayInfo) === null || _a === void 0 ? void 0 : _a.itemDisplayLines, accountingCurrency);
259
- withOfflineTransactionTotal = withOfflineTransactionTotal.plus(withOfflineTransactionItemAmount);
260
- const withOfflineTransactionTenderedAmount = TenderType.getTenderedAmountsWithOfflineTransaction((_b = displayInfo) === null || _b === void 0 ? void 0 : _b.tenderDisplayLines, accountingCurrency, configurationManager);
261
- withOfflineTransactionTotal = withOfflineTransactionTotal.minus(withOfflineTransactionTenderedAmount);
259
+ if (withOfflineTransactionItemAmount.isPositive()) {
260
+ withOfflineTransactionTotal = withOfflineTransactionTotal.plus(withOfflineTransactionItemAmount);
261
+ const withOfflineTransactionTenderedAmount = TenderType.getTenderedAmountsWithOfflineTransaction((_b = displayInfo) === null || _b === void 0 ? void 0 : _b.tenderDisplayLines, accountingCurrency, configurationManager);
262
+ withOfflineTransactionTotal = withOfflineTransactionTotal.minus(withOfflineTransactionTenderedAmount);
263
+ }
262
264
  // shipping and item fee are not returned on offline returns
263
265
  return withOfflineTransactionTotal;
264
266
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aptos-scp/scp-component-store-selling-features-domain-model",
3
- "version": "2.0.0",
3
+ "version": "2.1.1",
4
4
  "description": "This component library provides the common components to handle the coordination of processing the business events from the UI.",
5
5
  "private": false,
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -57,7 +57,7 @@
57
57
  "@aptos-scp/scp-component-pricing": "^7.62.0",
58
58
  "@aptos-scp/scp-component-store-items": "^1.20.0",
59
59
  "@aptos-scp/scp-component-store-selling-core": "^18.9.3",
60
- "@aptos-scp/scp-component-taxation": "^5.27.3",
60
+ "@aptos-scp/scp-component-taxation": "^5.28.0",
61
61
  "@aptos-scp/scp-component-user": "^1.4.0",
62
62
  "@aptos-scp/scp-types-client-registration": "^1.4.0",
63
63
  "@aptos-scp/scp-types-core-config": "^2.2.1",
@@ -80,7 +80,7 @@
80
80
  "@aptos-scp/scp-component-rn-circuit-breaker": "^1.0.15",
81
81
  "@aptos-scp/scp-component-store-items": "^1.20.0",
82
82
  "@aptos-scp/scp-component-store-selling-core": "^18.9.3",
83
- "@aptos-scp/scp-component-taxation": "^5.27.3",
83
+ "@aptos-scp/scp-component-taxation": "^5.28.0",
84
84
  "@aptos-scp/scp-component-user": "^1.4.0",
85
85
  "@aptos-scp/scp-types-client-registration": "^1.4.0",
86
86
  "@aptos-scp/scp-types-commerce-devices": "^6.0.0",