@aptos-scp/scp-component-store-selling-features-domain-model 2.8.0 → 2.9.0-patch.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.
|
@@ -62,15 +62,16 @@ exports.getItemFilterByValue = getItemFilterByValue;
|
|
|
62
62
|
function getItemLookupKey(defaultLookupKey, omniChannelConfig, selectedStoreItem) {
|
|
63
63
|
var _a, _b, _c;
|
|
64
64
|
let itemLookupKey = defaultLookupKey;
|
|
65
|
-
if (
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
65
|
+
if (omniChannelConfig && omniChannelConfig.inventory && omniChannelConfig.inventory.itemKeyType) {
|
|
66
|
+
const configuredItemKey = (_b = (_a = selectedStoreItem) === null || _a === void 0 ? void 0 : _a.itemLookupKeys) === null || _b === void 0 ? void 0 : _b.find((itemKey) => {
|
|
67
|
+
return itemKey.type === omniChannelConfig.inventory.itemKeyType;
|
|
68
|
+
});
|
|
69
|
+
if (configuredItemKey) {
|
|
70
|
+
itemLookupKey = configuredItemKey;
|
|
70
71
|
}
|
|
71
72
|
}
|
|
72
73
|
if (!itemLookupKey) {
|
|
73
|
-
return (_c = selectedStoreItem) === null || _c === void 0 ? void 0 : _c.itemLookupKeys[0];
|
|
74
|
+
return defaultLookupKey || ((_c = selectedStoreItem) === null || _c === void 0 ? void 0 : _c.itemLookupKeys[0]);
|
|
74
75
|
}
|
|
75
76
|
return itemLookupKey;
|
|
76
77
|
}
|
|
@@ -161,6 +161,7 @@ export declare class MerchandiseTransaction extends RetailTransaction implements
|
|
|
161
161
|
private _prepaidTendersToApply?;
|
|
162
162
|
private _transactionSubTotalExcludingPreviouslyCollected;
|
|
163
163
|
private _transactionTotalSavingsExcludingPreviouslyCollected;
|
|
164
|
+
private _transactionSubTotalExcPrepaidAndExcTranDisc;
|
|
164
165
|
private _transactionTotalTaxExcludingPreviouslyCollected;
|
|
165
166
|
private _balanceDueExcludingPreviouslyCollected;
|
|
166
167
|
private _transactionTotalExcludingPreviouslyCollected;
|
|
@@ -196,6 +197,7 @@ export declare class MerchandiseTransaction extends RetailTransaction implements
|
|
|
196
197
|
get transactionTotalTransactionDiscounts(): Money;
|
|
197
198
|
get transactionTotalTendered(): Money;
|
|
198
199
|
get transactionTotalTenderedPreviouslyCollected(): Money;
|
|
200
|
+
get transactionSubTotalExcPrepaidAndExcTranDisc(): Money;
|
|
199
201
|
/**
|
|
200
202
|
* Transaction SubTotal excluding previously collected tendered amount and excluding tax
|
|
201
203
|
*/
|
|
@@ -95,6 +95,7 @@ class MerchandiseTransaction extends RetailTransaction_1.RetailTransaction {
|
|
|
95
95
|
this._digestValue = digestValue;
|
|
96
96
|
this._prepaidTendersToApply = prepaidTendersToApply;
|
|
97
97
|
this._transactionSubTotalExcludingPreviouslyCollected = new scp_component_business_core_1.Money(0, accountingCurrency);
|
|
98
|
+
this._transactionSubTotalExcPrepaidAndExcTranDisc = new scp_component_business_core_1.Money(0, accountingCurrency);
|
|
98
99
|
this._transactionTotalSavingsExcludingPreviouslyCollected = new scp_component_business_core_1.Money(0, accountingCurrency);
|
|
99
100
|
this._transactionTotalTaxExcludingPreviouslyCollected = new scp_component_business_core_1.Money(0, accountingCurrency);
|
|
100
101
|
this._balanceDueExcludingPreviouslyCollected = new scp_component_business_core_1.Money(0, accountingCurrency);
|
|
@@ -224,6 +225,8 @@ class MerchandiseTransaction extends RetailTransaction_1.RetailTransaction {
|
|
|
224
225
|
transaction._prepaidTendersToApply = this._prepaidTendersToApply;
|
|
225
226
|
transaction._transactionSubTotalExcludingPreviouslyCollected =
|
|
226
227
|
this._transactionSubTotalExcludingPreviouslyCollected;
|
|
228
|
+
transaction._transactionSubTotalExcPrepaidAndExcTranDisc =
|
|
229
|
+
this._transactionSubTotalExcPrepaidAndExcTranDisc;
|
|
227
230
|
transaction._transactionTotalSavingsExcludingPreviouslyCollected =
|
|
228
231
|
this._transactionTotalSavingsExcludingPreviouslyCollected;
|
|
229
232
|
transaction._transactionTotalTaxExcludingPreviouslyCollected =
|
|
@@ -345,6 +348,9 @@ class MerchandiseTransaction extends RetailTransaction_1.RetailTransaction {
|
|
|
345
348
|
get transactionTotalTenderedPreviouslyCollected() {
|
|
346
349
|
return this._transactionTotalTenderedPreviouslyCollected;
|
|
347
350
|
}
|
|
351
|
+
get transactionSubTotalExcPrepaidAndExcTranDisc() {
|
|
352
|
+
return this._transactionSubTotalExcPrepaidAndExcTranDisc;
|
|
353
|
+
}
|
|
348
354
|
/**
|
|
349
355
|
* Transaction SubTotal excluding previously collected tendered amount and excluding tax
|
|
350
356
|
*/
|
|
@@ -852,6 +858,10 @@ class MerchandiseTransaction extends RetailTransaction_1.RetailTransaction {
|
|
|
852
858
|
"transaction.totalTenderedExcludingPreviouslyCollected",
|
|
853
859
|
this.transactionTotalTenderedExcludingPreviouslyCollected,
|
|
854
860
|
],
|
|
861
|
+
[
|
|
862
|
+
"transaction.transactionSubTotalExcPrepaidAndExcTranDisc",
|
|
863
|
+
this._transactionSubTotalExcPrepaidAndExcTranDisc,
|
|
864
|
+
],
|
|
855
865
|
["transaction.totalPreviouslyCollectedTenders", this.transactionTotalPreviouslyCollectedTenders],
|
|
856
866
|
["transaction.totalTenderedOnOrderCreate", this.transactionTotalTenderedOnOrderCreate],
|
|
857
867
|
["transaction.totalChangeTendered", this.transactionTotalChangeTendered],
|
|
@@ -1044,6 +1054,7 @@ class MerchandiseTransaction extends RetailTransaction_1.RetailTransaction {
|
|
|
1044
1054
|
_digestValue: this._digestValue,
|
|
1045
1055
|
_prepaidTendersToApply: this.prepaidTendersToApply,
|
|
1046
1056
|
_transactionSubTotalExcludingPreviouslyCollected: this.transactionSubTotalExcludingPreviouslyCollected,
|
|
1057
|
+
_transactionSubTotalExcPrepaidAndExcTranDisc: this.transactionSubTotalExcPrepaidAndExcTranDisc,
|
|
1047
1058
|
_transactionTotalSavingsExcludingPreviouslyCollected: this.transactionTotalSavingsExcludingPreviouslyCollected,
|
|
1048
1059
|
_transactionTotalTaxExcludingPreviouslyCollected: this.transactionTotalTaxExcludingPreviouslyCollected,
|
|
1049
1060
|
_balanceDueExcludingPreviouslyCollected: this.transactionBalanceDueExcludingPreviouslyCollected,
|
|
@@ -1199,6 +1210,9 @@ class MerchandiseTransaction extends RetailTransaction_1.RetailTransaction {
|
|
|
1199
1210
|
this._transactionSubTotalExcludingPreviouslyCollected =
|
|
1200
1211
|
transactionJsonObj._transactionSubTotalExcludingPreviouslyCollected &&
|
|
1201
1212
|
new scp_component_business_core_1.Money(transactionJsonObj._transactionSubTotalExcludingPreviouslyCollected);
|
|
1213
|
+
this._transactionSubTotalExcPrepaidAndExcTranDisc =
|
|
1214
|
+
transactionJsonObj._transactionSubTotalExcPrepaidAndExcTranDisc &&
|
|
1215
|
+
new scp_component_business_core_1.Money(transactionJsonObj._transactionSubTotalExcPrepaidAndExcTranDisc);
|
|
1202
1216
|
this._transactionTotalSavingsExcludingPreviouslyCollected =
|
|
1203
1217
|
transactionJsonObj._transactionTotalSavingsExcludingPreviouslyCollected &&
|
|
1204
1218
|
new scp_component_business_core_1.Money(transactionJsonObj._transactionTotalSavingsExcludingPreviouslyCollected);
|
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.
|
|
3
|
+
"version": "2.9.0-patch.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",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
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
|
-
"@aptos-scp/scp-types-commerce-devices": "^6.
|
|
86
|
+
"@aptos-scp/scp-types-commerce-devices": "^6.3.0",
|
|
87
87
|
"@aptos-scp/scp-types-commerce-transaction": "^1.79.0",
|
|
88
88
|
"@aptos-scp/scp-types-core": "^1.0.5",
|
|
89
89
|
"@aptos-scp/scp-types-core-config": "^2.2.1",
|