@aptos-scp/scp-component-store-selling-features-domain-model 3.3.0 → 3.3.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/lib/domain/model/Constants.d.ts +2 -0
- package/lib/domain/model/Constants.js +2 -0
- package/lib/domain/model/MerchandiseTransaction.d.ts +4 -1
- package/lib/domain/model/MerchandiseTransaction.js +12 -2
- package/lib/domain/model/tender/valueCard/Interfaces.d.ts +2 -2
- package/lib/domain/model/tender/valueCard/Interfaces.js +2 -2
- package/package.json +1 -1
|
@@ -288,6 +288,7 @@ export declare enum UiInputKey {
|
|
|
288
288
|
SINGLE_USE_COUPON_NUMBER = "input_singleUseCouponNumber",
|
|
289
289
|
SKIP_PASSWORD_CHANGE = "input_skipPasswordChange",
|
|
290
290
|
SKIP_CONFIRM_CLOSE = "input_skipConfirmClose",
|
|
291
|
+
STORE_COUNTRY_DISPLAY_NAME = "storeCountryDisplayName",
|
|
291
292
|
STORE_ITEM = "input_item",
|
|
292
293
|
STORE_ITEM_KEY = "input_itemKey",
|
|
293
294
|
STORE_ITEM_KEY_TYPE = "input_itemKeyType",
|
|
@@ -940,6 +941,7 @@ export declare enum CollectedDataKey {
|
|
|
940
941
|
DeviceId = "deviceId",
|
|
941
942
|
RetailLocationId = "retailLocationId",
|
|
942
943
|
TenantId = "tenantId",
|
|
944
|
+
StoreCountryDisplayName = "storeCountryDisplayName",
|
|
943
945
|
StoreName = "storeName",
|
|
944
946
|
TransactionStartDateTime = "transactionStartDateTime",
|
|
945
947
|
TransactionEndDateTime = "transactionEndDateTime",
|
|
@@ -289,6 +289,7 @@ var UiInputKey;
|
|
|
289
289
|
UiInputKey["SINGLE_USE_COUPON_NUMBER"] = "input_singleUseCouponNumber";
|
|
290
290
|
UiInputKey["SKIP_PASSWORD_CHANGE"] = "input_skipPasswordChange";
|
|
291
291
|
UiInputKey["SKIP_CONFIRM_CLOSE"] = "input_skipConfirmClose";
|
|
292
|
+
UiInputKey["STORE_COUNTRY_DISPLAY_NAME"] = "storeCountryDisplayName";
|
|
292
293
|
UiInputKey["STORE_ITEM"] = "input_item";
|
|
293
294
|
UiInputKey["STORE_ITEM_KEY"] = "input_itemKey";
|
|
294
295
|
UiInputKey["STORE_ITEM_KEY_TYPE"] = "input_itemKeyType";
|
|
@@ -947,6 +948,7 @@ var CollectedDataKey;
|
|
|
947
948
|
CollectedDataKey["DeviceId"] = "deviceId";
|
|
948
949
|
CollectedDataKey["RetailLocationId"] = "retailLocationId";
|
|
949
950
|
CollectedDataKey["TenantId"] = "tenantId";
|
|
951
|
+
CollectedDataKey["StoreCountryDisplayName"] = "storeCountryDisplayName";
|
|
950
952
|
CollectedDataKey["StoreName"] = "storeName";
|
|
951
953
|
CollectedDataKey["TransactionStartDateTime"] = "transactionStartDateTime";
|
|
952
954
|
CollectedDataKey["TransactionEndDateTime"] = "transactionEndDateTime";
|
|
@@ -176,8 +176,9 @@ export declare class MerchandiseTransaction extends RetailTransaction implements
|
|
|
176
176
|
private _fiscalError?;
|
|
177
177
|
private _countryBoxFiscalError?;
|
|
178
178
|
private _hasFiscalizationCompleted?;
|
|
179
|
+
private _storeCountryNameForReceipt?;
|
|
179
180
|
static createFromJsonObj(transactionJsonObj: any, transactionLineFactory: ITransactionLineFactory, transactionReferenceFormatter: ITransactionReferenceFormatter): MerchandiseTransaction;
|
|
180
|
-
constructor(deviceIdentity: DeviceIdentity, businessDayDate: string, transactionNumber: number, accountingCurrency: string, transactionReferenceFormatter: ITransactionReferenceFormatter, governmentIssuedIds?: GovernmentBusinessId[], performingUser?: IUser, transactionId?: string, giftReceiptMode?: GiftReceiptMode, giftReceipt?: boolean, totalsBeforeVoid?: TotalsBeforeVoid, unusedCoupons?: Coupon[], employeeCustomer?: IEmployee, invoiceNumber?: string, invoiceSequenceNumber?: number, taxLotteryNumber?: string, order?: Order, invoiceSequenceNumberGenerator?: string, taxLotteryCustomerCode?: string, taxScanCodeData?: string, fiscalSignature?: IFiscalSignature, requiresVoid?: boolean, eInvoiceReference?: string, prepaidTendersToApply?: IPrepaidTenderToApply[], digestValue?: string, potentialPromotions?: PotentialPromotion[]);
|
|
181
|
+
constructor(deviceIdentity: DeviceIdentity, businessDayDate: string, transactionNumber: number, accountingCurrency: string, transactionReferenceFormatter: ITransactionReferenceFormatter, governmentIssuedIds?: GovernmentBusinessId[], performingUser?: IUser, transactionId?: string, giftReceiptMode?: GiftReceiptMode, giftReceipt?: boolean, totalsBeforeVoid?: TotalsBeforeVoid, unusedCoupons?: Coupon[], employeeCustomer?: IEmployee, invoiceNumber?: string, invoiceSequenceNumber?: number, taxLotteryNumber?: string, order?: Order, invoiceSequenceNumberGenerator?: string, taxLotteryCustomerCode?: string, taxScanCodeData?: string, fiscalSignature?: IFiscalSignature, requiresVoid?: boolean, eInvoiceReference?: string, prepaidTendersToApply?: IPrepaidTenderToApply[], digestValue?: string, potentialPromotions?: PotentialPromotion[], storeCountryNameForReceipt?: string);
|
|
181
182
|
clone(): ITransaction;
|
|
182
183
|
addLine(line: ITransactionLine): ITransaction;
|
|
183
184
|
createOrUpdateOrder(order: Order): ITransaction;
|
|
@@ -266,6 +267,7 @@ export declare class MerchandiseTransaction extends RetailTransaction implements
|
|
|
266
267
|
get fiscalError(): IFiscalError;
|
|
267
268
|
get countryBoxFiscalError(): ICountryBoxFiscalError;
|
|
268
269
|
get hasFiscalizationCompleted(): boolean;
|
|
270
|
+
get storeCountryNameForReceipt(): string | undefined;
|
|
269
271
|
get tradeType(): MerchandiseTransactionTradeType;
|
|
270
272
|
get taxLotteryNumber(): string;
|
|
271
273
|
get taxLotteryCustomerCode(): string;
|
|
@@ -313,6 +315,7 @@ export declare class MerchandiseTransaction extends RetailTransaction implements
|
|
|
313
315
|
setFiscalError(fiscalError: IFiscalError): ITransaction;
|
|
314
316
|
setCountryBoxFiscalError(countryBoxFiscalError: ICountryBoxFiscalError): ITransaction;
|
|
315
317
|
setHasFiscalizationCompleted(hasFiscalizationCompleted: boolean): ITransaction;
|
|
318
|
+
assignStoreCountryNameForReceipt(storeCountryNameForReceipt: string): ITransaction;
|
|
316
319
|
assignOrderReferenceSequenceNumber(orderReferenceSequenceNumber: number, orderReferenceSequenceNumberGenerator: string): ITransaction;
|
|
317
320
|
assignInvoiceFiscalTransactionNumber(invoiceTransactionNumber: number, invoiceFiscalTransactionNumber: string): ITransaction;
|
|
318
321
|
assignTaxlotteryNumber(taxLotteryNumber: string): ITransaction;
|
|
@@ -24,7 +24,7 @@ exports.isMerchandiseTransaction = (transaction) => {
|
|
|
24
24
|
Ensure that any new property needs to added here as well toJSON methods as well.
|
|
25
25
|
*/
|
|
26
26
|
class MerchandiseTransaction extends RetailTransaction_1.RetailTransaction {
|
|
27
|
-
constructor(deviceIdentity, businessDayDate, transactionNumber, accountingCurrency, transactionReferenceFormatter, governmentIssuedIds, performingUser, transactionId, giftReceiptMode, giftReceipt, totalsBeforeVoid, unusedCoupons, employeeCustomer, invoiceNumber, invoiceSequenceNumber, taxLotteryNumber, order, invoiceSequenceNumberGenerator, taxLotteryCustomerCode, taxScanCodeData, fiscalSignature, requiresVoid, eInvoiceReference, prepaidTendersToApply, digestValue, potentialPromotions) {
|
|
27
|
+
constructor(deviceIdentity, businessDayDate, transactionNumber, accountingCurrency, transactionReferenceFormatter, governmentIssuedIds, performingUser, transactionId, giftReceiptMode, giftReceipt, totalsBeforeVoid, unusedCoupons, employeeCustomer, invoiceNumber, invoiceSequenceNumber, taxLotteryNumber, order, invoiceSequenceNumberGenerator, taxLotteryCustomerCode, taxScanCodeData, fiscalSignature, requiresVoid, eInvoiceReference, prepaidTendersToApply, digestValue, potentialPromotions, storeCountryNameForReceipt) {
|
|
28
28
|
super(deviceIdentity, businessDayDate, transactionNumber, exports.MERCHANDISE_TRANSACTION_TYPE, performingUser, transactionId);
|
|
29
29
|
this._accountingCurrency = accountingCurrency;
|
|
30
30
|
this._transactionTotalDeliveryFee = new scp_component_business_core_1.Money(0, accountingCurrency);
|
|
@@ -88,6 +88,7 @@ class MerchandiseTransaction extends RetailTransaction_1.RetailTransaction {
|
|
|
88
88
|
this._fiscalError = undefined;
|
|
89
89
|
this._countryBoxFiscalError = undefined;
|
|
90
90
|
this._hasFiscalizationCompleted = false;
|
|
91
|
+
this._storeCountryNameForReceipt = storeCountryNameForReceipt;
|
|
91
92
|
this._tradeType = undefined;
|
|
92
93
|
this._denominationRounding = new scp_component_business_core_1.Money(0, accountingCurrency);
|
|
93
94
|
this._order = order;
|
|
@@ -208,6 +209,7 @@ class MerchandiseTransaction extends RetailTransaction_1.RetailTransaction {
|
|
|
208
209
|
transaction._fiscalError = this._fiscalError;
|
|
209
210
|
transaction._countryBoxFiscalError = this._countryBoxFiscalError;
|
|
210
211
|
transaction._hasFiscalizationCompleted = this._hasFiscalizationCompleted;
|
|
212
|
+
transaction._storeCountryNameForReceipt = this._storeCountryNameForReceipt;
|
|
211
213
|
transaction._tradeType = this._tradeType;
|
|
212
214
|
transaction._taxLotteryNumber = this._taxLotteryNumber;
|
|
213
215
|
transaction._denominationRounding = this._denominationRounding;
|
|
@@ -515,6 +517,9 @@ class MerchandiseTransaction extends RetailTransaction_1.RetailTransaction {
|
|
|
515
517
|
get hasFiscalizationCompleted() {
|
|
516
518
|
return this._hasFiscalizationCompleted;
|
|
517
519
|
}
|
|
520
|
+
get storeCountryNameForReceipt() {
|
|
521
|
+
return this._storeCountryNameForReceipt;
|
|
522
|
+
}
|
|
518
523
|
get tradeType() {
|
|
519
524
|
return this._tradeType;
|
|
520
525
|
}
|
|
@@ -745,6 +750,11 @@ class MerchandiseTransaction extends RetailTransaction_1.RetailTransaction {
|
|
|
745
750
|
newTransaction._hasFiscalizationCompleted = hasFiscalizationCompleted;
|
|
746
751
|
return newTransaction;
|
|
747
752
|
}
|
|
753
|
+
assignStoreCountryNameForReceipt(storeCountryNameForReceipt) {
|
|
754
|
+
const newTransaction = this.clone();
|
|
755
|
+
newTransaction._storeCountryNameForReceipt = storeCountryNameForReceipt.trim();
|
|
756
|
+
return newTransaction;
|
|
757
|
+
}
|
|
748
758
|
assignOrderReferenceSequenceNumber(orderReferenceSequenceNumber, orderReferenceSequenceNumberGenerator) {
|
|
749
759
|
const newTransaction = this.clone();
|
|
750
760
|
newTransaction._orderReferenceSequenceNumber = orderReferenceSequenceNumber;
|
|
@@ -1107,7 +1117,7 @@ class MerchandiseTransaction extends RetailTransaction_1.RetailTransaction {
|
|
|
1107
1117
|
};
|
|
1108
1118
|
}
|
|
1109
1119
|
newTransaction() {
|
|
1110
|
-
return new MerchandiseTransaction(this.deviceIdentity, this.businessDayDate, this.transactionNumber, this._accountingCurrency, this._transactionReferenceFormatter, this._governmentIssuedIds, this.performingUser, this.transactionId, undefined, undefined, undefined, undefined, this._employeeCustomer, this._invoiceNumber, this._invoiceSequenceNumber, this._taxLotteryNumber, this.order, this._invoiceSequenceNumberGenerator, this._taxLotteryCustomerCode, this.taxScanCodeData, this._fiscalSignature, this._requiresVoid, this._eInvoiceReference, this.prepaidTendersToApply, this._digestValue);
|
|
1120
|
+
return new MerchandiseTransaction(this.deviceIdentity, this.businessDayDate, this.transactionNumber, this._accountingCurrency, this._transactionReferenceFormatter, this._governmentIssuedIds, this.performingUser, this.transactionId, undefined, undefined, undefined, undefined, this._employeeCustomer, this._invoiceNumber, this._invoiceSequenceNumber, this._taxLotteryNumber, this.order, this._invoiceSequenceNumberGenerator, this._taxLotteryCustomerCode, this.taxScanCodeData, this._fiscalSignature, this._requiresVoid, this._eInvoiceReference, this.prepaidTendersToApply, this._digestValue, this._potentialPromotions, this._storeCountryNameForReceipt);
|
|
1111
1121
|
}
|
|
1112
1122
|
// eslint-disable-next-line complexity
|
|
1113
1123
|
loadFromJsonObject(transactionJsonObj, transactionLineFactory) {
|
|
@@ -48,10 +48,10 @@ export declare enum ValueCardAction {
|
|
|
48
48
|
Inquiry = "inquiry",
|
|
49
49
|
Redeem = "redeem",
|
|
50
50
|
AddValue = "addValue",
|
|
51
|
-
/** AO `valueCardServiceBehaviors.enabledActions` — add-value path during refund
|
|
51
|
+
/** AO `valueCardServiceBehaviors.enabledActions` — add-value path during refund. */
|
|
52
52
|
AddValueDuringRefund = "addValueDuringRefund",
|
|
53
53
|
Issue = "issue",
|
|
54
|
-
/** AO `valueCardServiceBehaviors.enabledActions` — issue path during refund
|
|
54
|
+
/** AO `valueCardServiceBehaviors.enabledActions` — issue path during refund. */
|
|
55
55
|
IssueDuringRefund = "issueDuringRefund",
|
|
56
56
|
VoidRedeem = "voidRedeem",
|
|
57
57
|
VoidIssue = "voidIssue",
|
|
@@ -17,10 +17,10 @@ var ValueCardAction;
|
|
|
17
17
|
ValueCardAction["Inquiry"] = "inquiry";
|
|
18
18
|
ValueCardAction["Redeem"] = "redeem";
|
|
19
19
|
ValueCardAction["AddValue"] = "addValue";
|
|
20
|
-
/** AO `valueCardServiceBehaviors.enabledActions` — add-value path during refund
|
|
20
|
+
/** AO `valueCardServiceBehaviors.enabledActions` — add-value path during refund. */
|
|
21
21
|
ValueCardAction["AddValueDuringRefund"] = "addValueDuringRefund";
|
|
22
22
|
ValueCardAction["Issue"] = "issue";
|
|
23
|
-
/** AO `valueCardServiceBehaviors.enabledActions` — issue path during refund
|
|
23
|
+
/** AO `valueCardServiceBehaviors.enabledActions` — issue path during refund. */
|
|
24
24
|
ValueCardAction["IssueDuringRefund"] = "issueDuringRefund";
|
|
25
25
|
ValueCardAction["VoidRedeem"] = "voidRedeem";
|
|
26
26
|
ValueCardAction["VoidIssue"] = "voidIssue";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aptos-scp/scp-component-store-selling-features-domain-model",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.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",
|