@aptos-scp/scp-component-store-selling-features-domain-model 2.14.1 → 2.16.0

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.
@@ -453,7 +453,9 @@ export declare enum UiInputKey {
453
453
  PAY_BY_LINK_CUSTOMER = "input_payByLinkCustomer",
454
454
  FISCAL_RETRY = "input_fiscalRetry",
455
455
  MAX_FISCAL_RETRY = "input_maxFiscalRetry",
456
- CUSTOMER_INPUT_SCREENS = "input_customerInputScreens"
456
+ CUSTOMER_INPUT_SCREENS = "input_customerInputScreens",
457
+ FORCE_FISCAL_COMPLETION = "input_forceFiscalCompletion",
458
+ IS_FISCALISE_VOID = "input_isFiscaliseVoid"
457
459
  }
458
460
  export declare enum CollectedDataKey {
459
461
  Abort = "abort",
@@ -565,6 +567,7 @@ export declare enum CollectedDataKey {
565
567
  FiscalNumber = "fiscalNumber",
566
568
  FiscalId = "fiscalId",
567
569
  FiscalDeviceActivitySuccessful = "fiscalDeviceActivitySuccessful",
570
+ VoidedInProcessFlag = "voidedInProcessFlag",
568
571
  FiscalDeviceInformation = "fiscalDeviceInformation",
569
572
  FiscalTransactionInformation = "fiscalTransactionInformation",
570
573
  FiscalVarianceInformation = "FiscalVarianceInformation",
@@ -968,7 +971,8 @@ export declare enum CollectedDataKey {
968
971
  IsPermanentMembershipDiscount = "isPermanentMembershipDiscount",
969
972
  TerminalForceClosed = "TerminalForceClosed",
970
973
  TotalLineTax = "totalLineTax",
971
- CustomerInputScreens = "customerInputScreens"
974
+ CustomerInputScreens = "customerInputScreens",
975
+ CustomerInputMode = "customerInputMode"
972
976
  }
973
977
  export declare enum ItemLookupType {
974
978
  ProductInquiryDetail = "ProductInquiryDetail",
@@ -1066,6 +1070,9 @@ export declare enum AssignCustomerForReturnAction {
1066
1070
  Replace = "Replace",
1067
1071
  Skip = "Skip"
1068
1072
  }
1073
+ export declare enum CustomerInputMode {
1074
+ OptInConfirmation = "OptInConfirmation"
1075
+ }
1069
1076
  export declare const DELIVERY_CONTACT_UPDATED_EVENT: string;
1070
1077
  export declare const DELIVERY_ITEM_UPDATED_EVENT: string;
1071
1078
  export declare const PAYMENT_ACCOUNT_LOOKUP_EVENT: string;
@@ -455,6 +455,8 @@ var UiInputKey;
455
455
  UiInputKey["FISCAL_RETRY"] = "input_fiscalRetry";
456
456
  UiInputKey["MAX_FISCAL_RETRY"] = "input_maxFiscalRetry";
457
457
  UiInputKey["CUSTOMER_INPUT_SCREENS"] = "input_customerInputScreens";
458
+ UiInputKey["FORCE_FISCAL_COMPLETION"] = "input_forceFiscalCompletion";
459
+ UiInputKey["IS_FISCALISE_VOID"] = "input_isFiscaliseVoid";
458
460
  })(UiInputKey = exports.UiInputKey || (exports.UiInputKey = {}));
459
461
  //
460
462
  // Keys for use in relaying data collectedData (qualification) and nonContextualData (action).
@@ -572,6 +574,7 @@ var CollectedDataKey;
572
574
  CollectedDataKey["FiscalNumber"] = "fiscalNumber";
573
575
  CollectedDataKey["FiscalId"] = "fiscalId";
574
576
  CollectedDataKey["FiscalDeviceActivitySuccessful"] = "fiscalDeviceActivitySuccessful";
577
+ CollectedDataKey["VoidedInProcessFlag"] = "voidedInProcessFlag";
575
578
  CollectedDataKey["FiscalDeviceInformation"] = "fiscalDeviceInformation";
576
579
  CollectedDataKey["FiscalTransactionInformation"] = "fiscalTransactionInformation";
577
580
  CollectedDataKey["FiscalVarianceInformation"] = "FiscalVarianceInformation";
@@ -976,6 +979,7 @@ var CollectedDataKey;
976
979
  CollectedDataKey["TerminalForceClosed"] = "TerminalForceClosed";
977
980
  CollectedDataKey["TotalLineTax"] = "totalLineTax";
978
981
  CollectedDataKey["CustomerInputScreens"] = "customerInputScreens";
982
+ CollectedDataKey["CustomerInputMode"] = "customerInputMode";
979
983
  })(CollectedDataKey = exports.CollectedDataKey || (exports.CollectedDataKey = {}));
980
984
  var ItemLookupType;
981
985
  (function (ItemLookupType) {
@@ -1071,6 +1075,10 @@ var AssignCustomerForReturnAction;
1071
1075
  AssignCustomerForReturnAction["Replace"] = "Replace";
1072
1076
  AssignCustomerForReturnAction["Skip"] = "Skip";
1073
1077
  })(AssignCustomerForReturnAction = exports.AssignCustomerForReturnAction || (exports.AssignCustomerForReturnAction = {}));
1078
+ var CustomerInputMode;
1079
+ (function (CustomerInputMode) {
1080
+ CustomerInputMode["OptInConfirmation"] = "OptInConfirmation";
1081
+ })(CustomerInputMode = exports.CustomerInputMode || (exports.CustomerInputMode = {}));
1074
1082
  exports.DELIVERY_CONTACT_UPDATED_EVENT = "Delivery.ContactUpdated";
1075
1083
  exports.DELIVERY_ITEM_UPDATED_EVENT = "Delivery.ItemUpdated";
1076
1084
  exports.PAYMENT_ACCOUNT_LOOKUP_EVENT = "PaymentAccount.Lookup";
@@ -15,6 +15,7 @@ import { TaxCustomerLine } from "./customer/TaxCustomerLine";
15
15
  import { IFiscalTransactionNumberMaintainer } from "./IFiscalTransactionNumberMaintainer";
16
16
  import { IInvoiceOperation } from "./IInvoiceOperation";
17
17
  import { IPrepaidTenderToApply } from "./PrepaidTender";
18
+ import { FiscalError } from "@aptos-scp/scp-types-country-box";
18
19
  export declare const MERCHANDISE_TRANSACTION_TYPE = "MerchandiseTransaction";
19
20
  export declare const isMerchandiseTransaction: (transaction: ITransaction) => transaction is MerchandiseTransaction;
20
21
  export interface CustomFeeTotal {
@@ -76,6 +77,10 @@ export interface IFiscalError {
76
77
  fiscalErrorCode?: FiscalResponseCode;
77
78
  fiscalErrorDescription?: string;
78
79
  }
80
+ export interface ICountryBoxFiscalError extends FiscalError {
81
+ hasStartTransaction?: boolean;
82
+ responseCode?: string;
83
+ }
79
84
  export declare class MerchandiseTransaction extends RetailTransaction implements IInvoiceOperation, IFiscalTransactionNumberMaintainer {
80
85
  private _accountingCurrency;
81
86
  private _transactionSubTotal;
@@ -167,6 +172,7 @@ export declare class MerchandiseTransaction extends RetailTransaction implements
167
172
  private _transactionTotalExcludingPreviouslyCollected;
168
173
  private _transactionSubTotalExcludingPreviouslyCollectedExcludingTax;
169
174
  private _fiscalError?;
175
+ private _countryBoxFiscalError?;
170
176
  private _hasFiscalizationCompleted?;
171
177
  static createFromJsonObj(transactionJsonObj: any, transactionLineFactory: ITransactionLineFactory, transactionReferenceFormatter: ITransactionReferenceFormatter): MerchandiseTransaction;
172
178
  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[]);
@@ -256,6 +262,7 @@ export declare class MerchandiseTransaction extends RetailTransaction implements
256
262
  get transactionTaxExemptAmount(): Money;
257
263
  get transactionTaxAdjustmentAmount(): Money;
258
264
  get fiscalError(): IFiscalError;
265
+ get countryBoxFiscalError(): ICountryBoxFiscalError;
259
266
  get hasFiscalizationCompleted(): boolean;
260
267
  get tradeType(): MerchandiseTransactionTradeType;
261
268
  get taxLotteryNumber(): string;
@@ -302,6 +309,7 @@ export declare class MerchandiseTransaction extends RetailTransaction implements
302
309
  assignFiscalTypeCode(fiscalTypeCode: string): ITransaction;
303
310
  assignFiscalTransactionSequenceNumber(fiscalTransactionSequenceNumber: number, fiscalTransactionSequenceNumberGenerator: string): ITransaction;
304
311
  setFiscalError(fiscalError: IFiscalError): ITransaction;
312
+ setCountryBoxFiscalError(countryBoxFiscalError: ICountryBoxFiscalError): ITransaction;
305
313
  setHasFiscalizationCompleted(hasFiscalizationCompleted: boolean): ITransaction;
306
314
  assignOrderReferenceSequenceNumber(orderReferenceSequenceNumber: number, orderReferenceSequenceNumberGenerator: string): ITransaction;
307
315
  assignInvoiceFiscalTransactionNumber(invoiceTransactionNumber: number, invoiceFiscalTransactionNumber: string): ITransaction;
@@ -84,6 +84,7 @@ class MerchandiseTransaction extends RetailTransaction_1.RetailTransaction {
84
84
  this._transactionTaxExemptAmount = undefined;
85
85
  this._transactionTaxAdjustmentAmount = undefined;
86
86
  this._fiscalError = undefined;
87
+ this._countryBoxFiscalError = undefined;
87
88
  this._hasFiscalizationCompleted = false;
88
89
  this._tradeType = undefined;
89
90
  this._denominationRounding = new scp_component_business_core_1.Money(0, accountingCurrency);
@@ -201,6 +202,7 @@ class MerchandiseTransaction extends RetailTransaction_1.RetailTransaction {
201
202
  transaction._transactionTaxExemptAmount = this._transactionTaxExemptAmount;
202
203
  transaction._transactionTaxAdjustmentAmount = this._transactionTaxAdjustmentAmount;
203
204
  transaction._fiscalError = this._fiscalError;
205
+ transaction._countryBoxFiscalError = this._countryBoxFiscalError;
204
206
  transaction._hasFiscalizationCompleted = this._hasFiscalizationCompleted;
205
207
  transaction._tradeType = this._tradeType;
206
208
  transaction._taxLotteryNumber = this._taxLotteryNumber;
@@ -503,6 +505,9 @@ class MerchandiseTransaction extends RetailTransaction_1.RetailTransaction {
503
505
  get fiscalError() {
504
506
  return this._fiscalError;
505
507
  }
508
+ get countryBoxFiscalError() {
509
+ return this._countryBoxFiscalError;
510
+ }
506
511
  get hasFiscalizationCompleted() {
507
512
  return this._hasFiscalizationCompleted;
508
513
  }
@@ -726,6 +731,11 @@ class MerchandiseTransaction extends RetailTransaction_1.RetailTransaction {
726
731
  newTransaction._fiscalError = fiscalError;
727
732
  return newTransaction;
728
733
  }
734
+ setCountryBoxFiscalError(countryBoxFiscalError) {
735
+ const newTransaction = this.clone();
736
+ newTransaction._countryBoxFiscalError = countryBoxFiscalError;
737
+ return newTransaction;
738
+ }
729
739
  setHasFiscalizationCompleted(hasFiscalizationCompleted) {
730
740
  const newTransaction = this.clone();
731
741
  newTransaction._hasFiscalizationCompleted = hasFiscalizationCompleted;
@@ -911,6 +921,7 @@ class MerchandiseTransaction extends RetailTransaction_1.RetailTransaction {
911
921
  ["transaction.taxExemptAmount", this._transactionTaxExemptAmount],
912
922
  ["transaction.transactionTaxAdjustmentAmount", this._transactionTaxAdjustmentAmount],
913
923
  ["transaction.fiscalError", this._fiscalError],
924
+ ["transaction.countryBoxFiscalError", this._countryBoxFiscalError],
914
925
  ["transaction.hasFiscalizationCompleted", this._hasFiscalizationCompleted],
915
926
  ["transaction.tradeType", this._tradeType],
916
927
  ["transaction.signatureCollected", this.signatureCollected],
@@ -1039,6 +1050,7 @@ class MerchandiseTransaction extends RetailTransaction_1.RetailTransaction {
1039
1050
  _transactionTaxExemptAmount: this._transactionTaxExemptAmount,
1040
1051
  _transactionTaxAdjustmentAmount: this._transactionTaxAdjustmentAmount,
1041
1052
  _fiscalError: this._fiscalError,
1053
+ _countryBoxFiscalError: this._countryBoxFiscalError,
1042
1054
  _hasFiscalizationCompleted: this._hasFiscalizationCompleted,
1043
1055
  _transactionSubTotalAfterTaxAdjustment: this._transactionSubTotalAfterTaxAdjustment,
1044
1056
  _transactionTotalFeeAfterTaxAdjustment: this._transactionTotalFeeAfterTaxAdjustment,
@@ -1193,6 +1205,7 @@ class MerchandiseTransaction extends RetailTransaction_1.RetailTransaction {
1193
1205
  ? new scp_component_business_core_1.Money(transactionJsonObj._transactionTaxAdjustmentAmount)
1194
1206
  : undefined;
1195
1207
  this._fiscalError = transactionJsonObj._fiscalError;
1208
+ this._countryBoxFiscalError = transactionJsonObj._countryBoxFiscalError;
1196
1209
  this._hasFiscalizationCompleted = transactionJsonObj._hasFiscalizationCompleted;
1197
1210
  this._tradeType = findMerchandiseTransactionTradeType(transactionJsonObj._tradeType);
1198
1211
  this._taxLotteryNumber = transactionJsonObj._taxLotteryNumber;
@@ -3,7 +3,7 @@ import { DeviceIdentity, ITransaction, ITransactionLine, ITransactionLineFactory
3
3
  import { IFiscalSignature } from "@aptos-scp/scp-types-commerce-transaction";
4
4
  import { ITransactionReferenceFormatter } from "../service";
5
5
  import { RetailTransaction } from "./RetailTransaction";
6
- import { IFiscalError } from "./MerchandiseTransaction";
6
+ import { ICountryBoxFiscalError, IFiscalError } from "./MerchandiseTransaction";
7
7
  export declare const TENDER_CONTROL_TRANSACTION_TYPE = "TenderControlTransaction";
8
8
  export declare class TenderControlTransaction extends RetailTransaction {
9
9
  private _accountingCurrency;
@@ -12,12 +12,14 @@ export declare class TenderControlTransaction extends RetailTransaction {
12
12
  private _fiscalTransactionNumber;
13
13
  private _fiscalSignature;
14
14
  private _fiscalError?;
15
+ private _countryBoxFiscalError?;
15
16
  static createFromJsonObj(transactionJsonObj: any, transactionLineFactory: ITransactionLineFactory, transactionReferenceFormatter: ITransactionReferenceFormatter): TenderControlTransaction;
16
17
  constructor(deviceIdentity: DeviceIdentity, businessDayDate: string, transactionNumber: number, user?: IUser, transactionId?: string, accountingCurrency?: string, transactionReferenceFormatter?: ITransactionReferenceFormatter, fiscalTransactionNumber?: string, fiscalSignature?: IFiscalSignature);
17
18
  clone(): ITransaction;
18
19
  assignFiscalSignature(signatureData: IFiscalSignature): ITransaction;
19
20
  assignFiscalTransactionNumber(fiscalTransactionNumber: string): ITransaction;
20
21
  setFiscalError(fiscalError: IFiscalError): ITransaction;
22
+ setCountryBoxFiscalError(countryBoxFiscalError: ICountryBoxFiscalError): ITransaction;
21
23
  get accountingCurrency(): string;
22
24
  get referenceNumber(): string;
23
25
  get isTenderExchangeTransaction(): boolean;
@@ -29,6 +31,7 @@ export declare class TenderControlTransaction extends RetailTransaction {
29
31
  get fiscalTransactionNumber(): string;
30
32
  get fiscalSignature(): IFiscalSignature;
31
33
  get fiscalError(): IFiscalError;
34
+ get countryBoxFiscalError(): ICountryBoxFiscalError;
32
35
  get transactionChangeDue(): Money | undefined;
33
36
  findLineByLineNumber(lineNumber: number): ITransactionLine;
34
37
  toJSON(): object;
@@ -18,6 +18,7 @@ class TenderControlTransaction extends RetailTransaction_1.RetailTransaction {
18
18
  this._fiscalTransactionNumber = fiscalTransactionNumber;
19
19
  this._fiscalSignature = fiscalSignature;
20
20
  this._fiscalError = undefined;
21
+ this._countryBoxFiscalError = undefined;
21
22
  }
22
23
  static createFromJsonObj(transactionJsonObj, transactionLineFactory, transactionReferenceFormatter) {
23
24
  const transactionId = RetailTransaction_1.RetailTransaction.getTransactionIdFromJsonObject(transactionJsonObj);
@@ -40,6 +41,7 @@ class TenderControlTransaction extends RetailTransaction_1.RetailTransaction {
40
41
  transaction._fiscalTransactionNumber = this._fiscalTransactionNumber;
41
42
  transaction._fiscalSignature = this._fiscalSignature;
42
43
  transaction._fiscalError = this._fiscalError;
44
+ transaction._countryBoxFiscalError = this._countryBoxFiscalError;
43
45
  }
44
46
  else {
45
47
  throw new scp_component_store_selling_core_1.PosError("Cannot clone TenderControlTransaction, because new " + "instance is not a TenderControlTransaction.", config_1.SSF_TRANSACTION_ERROR_CODE);
@@ -61,6 +63,11 @@ class TenderControlTransaction extends RetailTransaction_1.RetailTransaction {
61
63
  newTransaction._fiscalError = fiscalError;
62
64
  return newTransaction;
63
65
  }
66
+ setCountryBoxFiscalError(countryBoxFiscalError) {
67
+ const newTransaction = this.clone();
68
+ newTransaction._countryBoxFiscalError = countryBoxFiscalError;
69
+ return newTransaction;
70
+ }
64
71
  get accountingCurrency() {
65
72
  return this._accountingCurrency;
66
73
  }
@@ -100,6 +107,7 @@ class TenderControlTransaction extends RetailTransaction_1.RetailTransaction {
100
107
  ["transaction.isAccountPaymentTransaction", this.isAccountPaymentTransaction],
101
108
  ["transaction.hasAccountLookupLines", this.hasAccountLookupLines],
102
109
  ["transaction.fiscalError", this._fiscalError],
110
+ ["transaction.countryBoxFiscalError", this._countryBoxFiscalError],
103
111
  ]);
104
112
  }
105
113
  get fiscalTransactionNumber() {
@@ -111,6 +119,9 @@ class TenderControlTransaction extends RetailTransaction_1.RetailTransaction {
111
119
  get fiscalError() {
112
120
  return this._fiscalError;
113
121
  }
122
+ get countryBoxFiscalError() {
123
+ return this._countryBoxFiscalError;
124
+ }
114
125
  get transactionChangeDue() {
115
126
  var _a, _b;
116
127
  let changeDue;
@@ -168,13 +179,14 @@ class TenderControlTransaction extends RetailTransaction_1.RetailTransaction {
168
179
  _fiscalTransactionNumber: this.fiscalTransactionNumber,
169
180
  _fiscalSignature: this.fiscalSignature,
170
181
  _fiscalError: this._fiscalError,
182
+ _countryBoxFiscalError: this._countryBoxFiscalError,
171
183
  };
172
184
  }
173
185
  newTransaction() {
174
186
  return new TenderControlTransaction(this.deviceIdentity, this.businessDayDate, this.transactionNumber, this.performingUser, this.transactionId, this.accountingCurrency, this._transactionReferenceFormatter, this.fiscalTransactionNumber, this.fiscalSignature);
175
187
  }
176
188
  loadFromJsonObject(transactionJsonObj, transactionLineFactory) {
177
- var _a, _b, _c;
189
+ var _a, _b, _c, _d;
178
190
  super.loadFromJsonObject(transactionJsonObj, transactionLineFactory);
179
191
  this._referenceNumber = transactionJsonObj._referenceNumber;
180
192
  if ((_a = transactionJsonObj) === null || _a === void 0 ? void 0 : _a._fiscalTransactionNumber) {
@@ -186,6 +198,9 @@ class TenderControlTransaction extends RetailTransaction_1.RetailTransaction {
186
198
  if ((_c = transactionJsonObj) === null || _c === void 0 ? void 0 : _c._fiscalError) {
187
199
  this._fiscalError = transactionJsonObj._fiscalError;
188
200
  }
201
+ if ((_d = transactionJsonObj) === null || _d === void 0 ? void 0 : _d._countryBoxFiscalError) {
202
+ this._countryBoxFiscalError = transactionJsonObj._countryBoxFiscalError;
203
+ }
189
204
  }
190
205
  generateTransactionReferenceNumber(transaction) {
191
206
  this._referenceNumber = this._transactionReferenceFormatter.generateTransactionReference(transaction);
@@ -1,12 +1,13 @@
1
1
  import { DeviceIdentity, ITransaction, ITransactionLine, ITransactionLineFactory, IUser } from "@aptos-scp/scp-component-store-selling-core";
2
2
  import { RetailTransaction } from "./RetailTransaction";
3
3
  import { IFiscalSignature } from "@aptos-scp/scp-types-commerce-transaction";
4
- import { IFiscalError } from "./MerchandiseTransaction";
4
+ import { ICountryBoxFiscalError, IFiscalError } from "./MerchandiseTransaction";
5
5
  export declare const TILL_CONTROL_TRANSACTION_TYPE = "TillControlTransaction";
6
6
  export declare class TillControlTransaction extends RetailTransaction {
7
7
  private _fiscalSignature;
8
8
  private _fiscalTransactionNumber;
9
9
  private _fiscalError?;
10
+ private _countryBoxFiscalError?;
10
11
  static createFromJsonObj(transactionJsonObj: any, transactionLineFactory: ITransactionLineFactory): TillControlTransaction;
11
12
  constructor(deviceIdentity: DeviceIdentity, businessDayDate: string, transactionNumber: number, user?: IUser, transactionId?: string, fiscalSignature?: IFiscalSignature, fiscalTransactionNumber?: string);
12
13
  clone(): ITransaction;
@@ -16,7 +17,9 @@ export declare class TillControlTransaction extends RetailTransaction {
16
17
  assignFiscalSignature(signatureData: IFiscalSignature): ITransaction;
17
18
  assignFiscalTransactionNumber(fiscalTransactionNumber: string): ITransaction;
18
19
  setFiscalError(fiscalError: IFiscalError): ITransaction;
20
+ setCountryBoxFiscalError(countryBoxFiscalError: ICountryBoxFiscalError): ITransaction;
19
21
  get fiscalError(): IFiscalError;
22
+ get countryBoxFiscalError(): ICountryBoxFiscalError;
20
23
  findLineByLineNumber(lineNumber: number): ITransactionLine;
21
24
  protected newTransaction(): RetailTransaction;
22
25
  protected loadFromJsonObject(transactionJsonObj: any, transactionLineFactory: ITransactionLineFactory): void;
@@ -10,6 +10,7 @@ class TillControlTransaction extends RetailTransaction_1.RetailTransaction {
10
10
  this._fiscalSignature = fiscalSignature;
11
11
  this._fiscalTransactionNumber = fiscalTransactionNumber;
12
12
  this._fiscalError = undefined;
13
+ this._countryBoxFiscalError = undefined;
13
14
  }
14
15
  static createFromJsonObj(transactionJsonObj, transactionLineFactory) {
15
16
  const transactionId = RetailTransaction_1.RetailTransaction.getTransactionIdFromJsonObject(transactionJsonObj);
@@ -28,6 +29,7 @@ class TillControlTransaction extends RetailTransaction_1.RetailTransaction {
28
29
  transaction._fiscalSignature = this._fiscalSignature;
29
30
  transaction._fiscalTransactionNumber = this._fiscalTransactionNumber;
30
31
  transaction._fiscalError = this._fiscalError;
32
+ transaction._countryBoxFiscalError = this._countryBoxFiscalError;
31
33
  }
32
34
  else {
33
35
  throw new scp_component_store_selling_core_1.PosError("Cannot clone TillControlTransaction, because new " + "instance is not a TillControlTransaction.", config_1.SSF_TRANSACTION_ERROR_CODE);
@@ -44,6 +46,7 @@ class TillControlTransaction extends RetailTransaction_1.RetailTransaction {
44
46
  return new Map([
45
47
  ...super.transactionStateValues.entries(),
46
48
  ["transaction.fiscalError", this._fiscalError],
49
+ ["transaction.countryBoxFiscalError", this._countryBoxFiscalError],
47
50
  ]);
48
51
  }
49
52
  assignFiscalSignature(signatureData) {
@@ -61,9 +64,17 @@ class TillControlTransaction extends RetailTransaction_1.RetailTransaction {
61
64
  newTransaction._fiscalError = fiscalError;
62
65
  return newTransaction;
63
66
  }
67
+ setCountryBoxFiscalError(countryBoxFiscalError) {
68
+ const newTransaction = this.clone();
69
+ newTransaction._countryBoxFiscalError = countryBoxFiscalError;
70
+ return newTransaction;
71
+ }
64
72
  get fiscalError() {
65
73
  return this._fiscalError;
66
74
  }
75
+ get countryBoxFiscalError() {
76
+ return this._countryBoxFiscalError;
77
+ }
67
78
  findLineByLineNumber(lineNumber) {
68
79
  if (lineNumber && super.lines.length > 0) {
69
80
  return super.findLineByLineNumber(lineNumber);
@@ -74,7 +85,7 @@ class TillControlTransaction extends RetailTransaction_1.RetailTransaction {
74
85
  return new TillControlTransaction(this.deviceIdentity, this.businessDayDate, this.transactionNumber, this.performingUser, this.transactionId, this._fiscalSignature, this._fiscalTransactionNumber);
75
86
  }
76
87
  loadFromJsonObject(transactionJsonObj, transactionLineFactory) {
77
- var _a, _b, _c;
88
+ var _a, _b, _c, _d;
78
89
  super.loadFromJsonObject(transactionJsonObj, transactionLineFactory);
79
90
  if ((_a = transactionJsonObj) === null || _a === void 0 ? void 0 : _a._fiscalSignature) {
80
91
  this._fiscalSignature = transactionJsonObj._fiscalSignature;
@@ -85,6 +96,9 @@ class TillControlTransaction extends RetailTransaction_1.RetailTransaction {
85
96
  if ((_c = transactionJsonObj) === null || _c === void 0 ? void 0 : _c._fiscalError) {
86
97
  this._fiscalError = transactionJsonObj._fiscalError;
87
98
  }
99
+ if ((_d = transactionJsonObj) === null || _d === void 0 ? void 0 : _d._countryBoxFiscalError) {
100
+ this._countryBoxFiscalError = transactionJsonObj._countryBoxFiscalError;
101
+ }
88
102
  }
89
103
  }
90
104
  exports.TillControlTransaction = TillControlTransaction;
@@ -11,6 +11,7 @@ export declare class FiscalDeviceStatusLine extends BaseTransactionLine {
11
11
  private _fiscalDeviceInformation?;
12
12
  private _fiscalTransactionInformation?;
13
13
  private _fiscalVarianceInformation?;
14
+ private _voidedInProcessFlag?;
14
15
  /**
15
16
  * The create method is called by the transaction line factory to create an instance and initialize it from the
16
17
  * data collected during the qualification process.
@@ -28,10 +29,11 @@ export declare class FiscalDeviceStatusLine extends BaseTransactionLine {
28
29
  get transactionLineReference(): ITransactionLineReferenceType;
29
30
  get peripheralDeviceId(): string;
30
31
  get fiscalDeviceActivityResult(): IDeviceActivityResult;
32
+ get voidedInProcessFlag(): boolean;
31
33
  get fiscalDeviceInformation(): IFiscalDeviceInformation;
32
34
  get fiscalTransactionInformation(): IFiscalTransactionInformation;
33
35
  get fiscalVarianceInformation(): IFiscalTransactionInformation;
34
- protected constructor(lineNumber: number, lineType: string, peripheralDeviceId: string, fiscalDeviceActivityResult: IDeviceActivityResult, transactionLineReference?: ITransactionLineReferenceType, fiscalDeviceInformation?: IFiscalDeviceInformation, fiscalTransactionInformation?: IFiscalTransactionInformation, fiscalVarianceInformation?: IFiscalTransactionInformation);
36
+ protected constructor(lineNumber: number, lineType: string, peripheralDeviceId: string, fiscalDeviceActivityResult: IDeviceActivityResult, transactionLineReference?: ITransactionLineReferenceType, fiscalDeviceInformation?: IFiscalDeviceInformation, fiscalTransactionInformation?: IFiscalTransactionInformation, fiscalVarianceInformation?: IFiscalTransactionInformation, voidedInProcessFlag?: boolean);
35
37
  protected newTransactionLine(): BaseTransactionLine;
36
38
  }
37
39
  export declare function isFiscalDeviceStatusLine(transactionLine: ITransactionLine): transactionLine is FiscalDeviceStatusLine;
@@ -5,7 +5,7 @@ const Constants_1 = require("../Constants");
5
5
  exports.FISCAL_DEVICE_STATUS_LINE_TYPE = "FiscalDeviceStatus";
6
6
  class FiscalDeviceStatusLine extends BaseTransactionLine_1.BaseTransactionLine {
7
7
  // Since the constructor is only called from the create methods it is made protected to prevent use by others.
8
- constructor(lineNumber, lineType, peripheralDeviceId, fiscalDeviceActivityResult, transactionLineReference, fiscalDeviceInformation, fiscalTransactionInformation, fiscalVarianceInformation) {
8
+ constructor(lineNumber, lineType, peripheralDeviceId, fiscalDeviceActivityResult, transactionLineReference, fiscalDeviceInformation, fiscalTransactionInformation, fiscalVarianceInformation, voidedInProcessFlag) {
9
9
  super(lineNumber, lineType);
10
10
  this._peripheralDeviceId = peripheralDeviceId;
11
11
  this._fiscalDeviceActivityResult = fiscalDeviceActivityResult;
@@ -13,6 +13,7 @@ class FiscalDeviceStatusLine extends BaseTransactionLine_1.BaseTransactionLine {
13
13
  this._fiscalDeviceInformation = fiscalDeviceInformation;
14
14
  this._fiscalTransactionInformation = fiscalTransactionInformation;
15
15
  this._fiscalVarianceInformation = fiscalVarianceInformation;
16
+ this._voidedInProcessFlag = voidedInProcessFlag;
16
17
  }
17
18
  /**
18
19
  * The create method is called by the transaction line factory to create an instance and initialize it from the
@@ -42,7 +43,8 @@ class FiscalDeviceStatusLine extends BaseTransactionLine_1.BaseTransactionLine {
42
43
  const fiscalDeviceInformation = collectedData.get(Constants_1.CollectedDataKey.FiscalDeviceInformation);
43
44
  const fiscalTransactionInformation = collectedData.get(Constants_1.CollectedDataKey.FiscalTransactionInformation);
44
45
  const fiscalVarianceInformation = collectedData.get(Constants_1.CollectedDataKey.FiscalVarianceInformation);
45
- const fiscalDeviceStatusLine = new FiscalDeviceStatusLine(lineNumber, lineType, peripheralDeviceId, fiscalDeviceActivityResult, transactionLineReference, fiscalDeviceInformation, fiscalTransactionInformation, fiscalVarianceInformation);
46
+ const voidedInProcessFlag = collectedData.get(Constants_1.CollectedDataKey.VoidedInProcessFlag);
47
+ const fiscalDeviceStatusLine = new FiscalDeviceStatusLine(lineNumber, lineType, peripheralDeviceId, fiscalDeviceActivityResult, transactionLineReference, fiscalDeviceInformation, fiscalTransactionInformation, fiscalVarianceInformation, voidedInProcessFlag);
46
48
  return fiscalDeviceStatusLine;
47
49
  }
48
50
  static createFromJsonObject(transactionLineJsonObj) {
@@ -54,7 +56,8 @@ class FiscalDeviceStatusLine extends BaseTransactionLine_1.BaseTransactionLine {
54
56
  const fiscalDeviceInformation = transactionLineJsonObj._fiscalDeviceInformation;
55
57
  const fiscalTransactionInformation = transactionLineJsonObj._fiscalTransactionInformation;
56
58
  const fiscalVarianceInformation = transactionLineJsonObj._fiscalVarianceInformation;
57
- const fiscalDeviceStatusLine = new FiscalDeviceStatusLine(lineNumber, lineType, peripheralDeviceId, fiscalDeviceActivityResult, transactionLineReference, fiscalDeviceInformation, fiscalTransactionInformation, fiscalVarianceInformation);
59
+ const voidedInProcessFlag = transactionLineJsonObj._voidedInProcessFlag;
60
+ const fiscalDeviceStatusLine = new FiscalDeviceStatusLine(lineNumber, lineType, peripheralDeviceId, fiscalDeviceActivityResult, transactionLineReference, fiscalDeviceInformation, fiscalTransactionInformation, fiscalVarianceInformation, voidedInProcessFlag);
58
61
  fiscalDeviceStatusLine.loadFromJsonObject(transactionLineJsonObj);
59
62
  return fiscalDeviceStatusLine;
60
63
  }
@@ -70,6 +73,9 @@ class FiscalDeviceStatusLine extends BaseTransactionLine_1.BaseTransactionLine {
70
73
  get fiscalDeviceActivityResult() {
71
74
  return this._fiscalDeviceActivityResult;
72
75
  }
76
+ get voidedInProcessFlag() {
77
+ return this._voidedInProcessFlag;
78
+ }
73
79
  get fiscalDeviceInformation() {
74
80
  return this._fiscalDeviceInformation;
75
81
  }
@@ -80,7 +86,7 @@ class FiscalDeviceStatusLine extends BaseTransactionLine_1.BaseTransactionLine {
80
86
  return this._fiscalVarianceInformation;
81
87
  }
82
88
  newTransactionLine() {
83
- return new FiscalDeviceStatusLine(this.lineNumber, this.lineType, this._peripheralDeviceId, this._fiscalDeviceActivityResult, this._transactionLineReference, this._fiscalDeviceInformation, this._fiscalTransactionInformation, this._fiscalVarianceInformation);
89
+ return new FiscalDeviceStatusLine(this.lineNumber, this.lineType, this._peripheralDeviceId, this._fiscalDeviceActivityResult, this._transactionLineReference, this._fiscalDeviceInformation, this._fiscalTransactionInformation, this._fiscalVarianceInformation, this._voidedInProcessFlag);
84
90
  }
85
91
  }
86
92
  exports.FiscalDeviceStatusLine = FiscalDeviceStatusLine;
@@ -4,6 +4,7 @@ export declare const START_FISCAL_TRANSACTION_LINE_TYPE: string;
4
4
  export declare const FINISH_FISCAL_TRANSACTION_LINE_TYPE: string;
5
5
  export declare class FiscalTransactionLine extends BaseTransactionLine {
6
6
  private _peripheralDeviceId;
7
+ private _voidedInProcessFlag?;
7
8
  /**
8
9
  * The create method is called by the transaction line factory to create an instance and initialize it from the
9
10
  * data collected during the qualification process.
@@ -19,7 +20,8 @@ export declare class FiscalTransactionLine extends BaseTransactionLine {
19
20
  static createFromJsonObject(transactionLineJsonObj: any): FiscalTransactionLine;
20
21
  get couldAffectPricing(): boolean;
21
22
  get peripheralDeviceId(): string;
22
- protected constructor(lineNumber: number, lineType: string, peripheralDeviceId: string);
23
+ get voidedInProcessFlag(): boolean;
24
+ protected constructor(lineNumber: number, lineType: string, peripheralDeviceId: string, voidedInProcessFlag?: boolean);
23
25
  protected newTransactionLine(): BaseTransactionLine;
24
26
  }
25
27
  export declare function isFiscalTransactionLine(transactionLine: ITransactionLine): transactionLine is FiscalTransactionLine;
@@ -6,9 +6,10 @@ exports.START_FISCAL_TRANSACTION_LINE_TYPE = "StartFiscalTransaction";
6
6
  exports.FINISH_FISCAL_TRANSACTION_LINE_TYPE = "FinishFiscalTransaction";
7
7
  class FiscalTransactionLine extends BaseTransactionLine_1.BaseTransactionLine {
8
8
  // Since the constructor is only called from the create methods it is made protected to prevent use by others.
9
- constructor(lineNumber, lineType, peripheralDeviceId) {
9
+ constructor(lineNumber, lineType, peripheralDeviceId, voidedInProcessFlag) {
10
10
  super(lineNumber, lineType);
11
11
  this._peripheralDeviceId = peripheralDeviceId;
12
+ this._voidedInProcessFlag = voidedInProcessFlag;
12
13
  }
13
14
  /**
14
15
  * The create method is called by the transaction line factory to create an instance and initialize it from the
@@ -23,14 +24,16 @@ class FiscalTransactionLine extends BaseTransactionLine_1.BaseTransactionLine {
23
24
  */
24
25
  static create(lineNumber, lineType, uiBusinessEvent, collectedData) {
25
26
  const peripheralDeviceId = collectedData.get(Constants_1.CollectedDataKey.PeripheralDeviceId);
26
- const fiscalTransactionLine = new FiscalTransactionLine(lineNumber, lineType, peripheralDeviceId);
27
+ const voidedInProcessFlag = collectedData.get(Constants_1.CollectedDataKey.VoidedInProcessFlag);
28
+ const fiscalTransactionLine = new FiscalTransactionLine(lineNumber, lineType, peripheralDeviceId, voidedInProcessFlag);
27
29
  return fiscalTransactionLine;
28
30
  }
29
31
  static createFromJsonObject(transactionLineJsonObj) {
30
32
  const lineNumber = BaseTransactionLine_1.BaseTransactionLine.lineNumberFromJsonObject(transactionLineJsonObj);
31
33
  const lineType = BaseTransactionLine_1.BaseTransactionLine.lineTypeFromJsonObject(transactionLineJsonObj);
32
34
  const peripheralDeviceId = transactionLineJsonObj._peripheralDeviceId;
33
- const fiscalTransactionLine = new FiscalTransactionLine(lineNumber, lineType, peripheralDeviceId);
35
+ const voidedInProcessFlag = transactionLineJsonObj._voidedInProcessFlag;
36
+ const fiscalTransactionLine = new FiscalTransactionLine(lineNumber, lineType, peripheralDeviceId, voidedInProcessFlag);
34
37
  fiscalTransactionLine.loadFromJsonObject(transactionLineJsonObj);
35
38
  return fiscalTransactionLine;
36
39
  }
@@ -40,8 +43,11 @@ class FiscalTransactionLine extends BaseTransactionLine_1.BaseTransactionLine {
40
43
  get peripheralDeviceId() {
41
44
  return this._peripheralDeviceId;
42
45
  }
46
+ get voidedInProcessFlag() {
47
+ return this._voidedInProcessFlag;
48
+ }
43
49
  newTransactionLine() {
44
- return new FiscalTransactionLine(this.lineNumber, this.lineType, this._peripheralDeviceId);
50
+ return new FiscalTransactionLine(this.lineNumber, this.lineType, this._peripheralDeviceId, this._voidedInProcessFlag);
45
51
  }
46
52
  }
47
53
  exports.FiscalTransactionLine = FiscalTransactionLine;
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.14.1",
3
+ "version": "2.16.0",
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",
@@ -39,6 +39,7 @@
39
39
  "prettier:format": "prettier --write ."
40
40
  },
41
41
  "dependencies": {
42
+ "@aptos-scp/scp-types-country-box": "^1.3.0",
42
43
  "big.js": "^6.1.1",
43
44
  "crc-32": "^1.2.0",
44
45
  "fast-json-patch": "^3.0.0-1",
@@ -62,7 +63,7 @@
62
63
  "@aptos-scp/scp-types-client-registration": "^1.4.0",
63
64
  "@aptos-scp/scp-types-core-config": "^2.2.1",
64
65
  "@aptos-scp/scp-types-commerce-devices": "^6.0.0",
65
- "@aptos-scp/scp-types-commerce-transaction": "^1.77.0",
66
+ "@aptos-scp/scp-types-commerce-transaction": "^1.80.0",
66
67
  "@aptos-scp/scp-types-customer": "^3.7.0",
67
68
  "@aptos-scp/scp-types-einvoice": "^1.17.0",
68
69
  "@aptos-scp/scp-types-inventory": "^2.0.0",
@@ -84,7 +85,7 @@
84
85
  "@aptos-scp/scp-component-user": "^1.4.0",
85
86
  "@aptos-scp/scp-types-client-registration": "^1.4.0",
86
87
  "@aptos-scp/scp-types-commerce-devices": "^6.3.0",
87
- "@aptos-scp/scp-types-commerce-transaction": "^1.79.0",
88
+ "@aptos-scp/scp-types-commerce-transaction": "^1.80.0",
88
89
  "@aptos-scp/scp-types-core": "^1.0.5",
89
90
  "@aptos-scp/scp-types-core-config": "^2.2.1",
90
91
  "@aptos-scp/scp-types-currency-conversion": "^1.2.0",