@aptos-scp/scp-component-store-selling-features-domain-model 2.15.0 → 2.17.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.
- package/lib/domain/UIBusinessEventTypes.d.ts +1 -0
- package/lib/domain/UIBusinessEventTypes.js +1 -0
- package/lib/domain/model/Constants.d.ts +10 -1
- package/lib/domain/model/Constants.js +9 -0
- package/lib/domain/model/MerchandiseTransaction.d.ts +8 -0
- package/lib/domain/model/MerchandiseTransaction.js +13 -0
- package/lib/domain/model/TenderControlTransaction.d.ts +4 -1
- package/lib/domain/model/TenderControlTransaction.js +16 -1
- package/lib/domain/model/TillControlTransaction.d.ts +4 -1
- package/lib/domain/model/TillControlTransaction.js +15 -1
- package/lib/domain/model/configuration/IDiscountAttributesConfig .d.ts +1 -0
- package/lib/domain/model/discounts/RewardCardDiscountLine.d.ts +45 -0
- package/lib/domain/model/discounts/RewardCardDiscountLine.js +88 -0
- package/lib/domain/model/discounts/RewardCardDiscountLineTotalDecorator.d.ts +20 -0
- package/lib/domain/model/discounts/RewardCardDiscountLineTotalDecorator.js +48 -0
- package/lib/domain/model/discounts/VoidedRewardCardDiscountLineDecorator.d.ts +18 -0
- package/lib/domain/model/discounts/VoidedRewardCardDiscountLineDecorator.js +46 -0
- package/lib/domain/model/discounts/index.d.ts +3 -0
- package/lib/domain/model/discounts/index.js +3 -0
- package/lib/domain/model/discounts/lineTypes.d.ts +3 -0
- package/lib/domain/model/discounts/lineTypes.js +11 -1
- package/lib/domain/model/fiscalDevice/FiscalDeviceStatusLine.d.ts +3 -1
- package/lib/domain/model/fiscalDevice/FiscalDeviceStatusLine.js +10 -4
- package/lib/domain/model/item/ISerializedPriceCalculationResultsWithSource.d.ts +2 -1
- package/lib/domain/model/item/ItemLineRewardCardDiscountDecorator.d.ts +30 -0
- package/lib/domain/model/item/ItemLineRewardCardDiscountDecorator.js +123 -0
- package/lib/domain/model/item/index.d.ts +1 -0
- package/lib/domain/model/item/index.js +1 -0
- package/lib/domain/model/transaction/fiscal/FiscalTransactionLine.d.ts +3 -1
- package/lib/domain/model/transaction/fiscal/FiscalTransactionLine.js +10 -4
- package/package.json +7 -6
|
@@ -76,6 +76,7 @@ export declare const MANUAL_TRANSACTION_DISCOUNT_EVENT: string;
|
|
|
76
76
|
export declare const PERMANENT_MEMBERSHIP_DISCOUNT_EVENT: string;
|
|
77
77
|
export declare const ADD_EMPLOYEE_CUSTOMER_EVENT: string;
|
|
78
78
|
export declare const REWARD_CARD_DISCOUNT_EVENT: string;
|
|
79
|
+
export declare const RESET_REWARD_CARD_BALANCE_INQUIRY_EVENT: string;
|
|
79
80
|
export declare const APPLY_EMPLOYEE_CUSTOMER_DISCOUNT_EVENT = "ApplyEmployeeCustomerDiscount";
|
|
80
81
|
export declare const MODIFY_EMPLOYEE_MANUAL_DISCOUNT_EVENT: string;
|
|
81
82
|
export declare const MODIFY_ITEM_MANUAL_DISCOUNT_EVENT: string;
|
|
@@ -79,6 +79,7 @@ exports.MANUAL_TRANSACTION_DISCOUNT_EVENT = "ManualTransactionDiscount";
|
|
|
79
79
|
exports.PERMANENT_MEMBERSHIP_DISCOUNT_EVENT = "PermanentMembershipDiscount";
|
|
80
80
|
exports.ADD_EMPLOYEE_CUSTOMER_EVENT = "AddEmployeeCustomer";
|
|
81
81
|
exports.REWARD_CARD_DISCOUNT_EVENT = "RewardCardDiscount";
|
|
82
|
+
exports.RESET_REWARD_CARD_BALANCE_INQUIRY_EVENT = "ResetRewardCardBalanceInquiryDiscount";
|
|
82
83
|
exports.APPLY_EMPLOYEE_CUSTOMER_DISCOUNT_EVENT = "ApplyEmployeeCustomerDiscount";
|
|
83
84
|
exports.MODIFY_EMPLOYEE_MANUAL_DISCOUNT_EVENT = "ModifyEmployeeManualDiscount";
|
|
84
85
|
exports.MODIFY_ITEM_MANUAL_DISCOUNT_EVENT = "ModifyItemManualDiscount";
|
|
@@ -163,6 +163,7 @@ export declare enum UiInputKey {
|
|
|
163
163
|
FISCAL_ID = "fiscalId",
|
|
164
164
|
FOREIGN_TENDER_AMOUNT = "input_foreignTenderAmount",
|
|
165
165
|
FORFEIT_TENDER_CHANGE_CONFIRMATION = "input_forfeitTenderChange",
|
|
166
|
+
REWARD_CARD_CONFIG = "input_rewardCardConfig",
|
|
166
167
|
REDEEM_CARD_NUMBER = "input_redeemCardNumber",
|
|
167
168
|
REDEEMED_REDEMPTIONS = "input_redeemedRedemptions",
|
|
168
169
|
LOYALTY_PLANS = "input_loyaltyPlans",
|
|
@@ -453,7 +454,9 @@ export declare enum UiInputKey {
|
|
|
453
454
|
PAY_BY_LINK_CUSTOMER = "input_payByLinkCustomer",
|
|
454
455
|
FISCAL_RETRY = "input_fiscalRetry",
|
|
455
456
|
MAX_FISCAL_RETRY = "input_maxFiscalRetry",
|
|
456
|
-
CUSTOMER_INPUT_SCREENS = "input_customerInputScreens"
|
|
457
|
+
CUSTOMER_INPUT_SCREENS = "input_customerInputScreens",
|
|
458
|
+
FORCE_FISCAL_COMPLETION = "input_forceFiscalCompletion",
|
|
459
|
+
IS_FISCALISE_VOID = "input_isFiscaliseVoid"
|
|
457
460
|
}
|
|
458
461
|
export declare enum CollectedDataKey {
|
|
459
462
|
Abort = "abort",
|
|
@@ -565,6 +568,7 @@ export declare enum CollectedDataKey {
|
|
|
565
568
|
FiscalNumber = "fiscalNumber",
|
|
566
569
|
FiscalId = "fiscalId",
|
|
567
570
|
FiscalDeviceActivitySuccessful = "fiscalDeviceActivitySuccessful",
|
|
571
|
+
VoidedInProcessFlag = "voidedInProcessFlag",
|
|
568
572
|
FiscalDeviceInformation = "fiscalDeviceInformation",
|
|
569
573
|
FiscalTransactionInformation = "fiscalTransactionInformation",
|
|
570
574
|
FiscalVarianceInformation = "FiscalVarianceInformation",
|
|
@@ -621,6 +625,11 @@ export declare enum CollectedDataKey {
|
|
|
621
625
|
FormOfProofCode = "formOfProofCode",
|
|
622
626
|
CustomCompetitorName = "customCompetitorName",
|
|
623
627
|
CustomFormOfProof = "customFormOfProof",
|
|
628
|
+
DiscountLevel = "discountLevel",
|
|
629
|
+
RewardPrintedName = "rewardPrintedName",
|
|
630
|
+
RewardPrintedNumberLabel = "rewardPrintedNumberLabel",
|
|
631
|
+
AutoPopulateCardNumberFromCustomer = "autoPopulateCardNumberFromCustomer",
|
|
632
|
+
RewardCardName = "rewardCardName",
|
|
624
633
|
IsCompetitivePriceDiscount = "isCompetitivePriceDiscount",
|
|
625
634
|
NextTransactionNumber = "nextTransactionNumber",
|
|
626
635
|
Offline = "offline",
|
|
@@ -164,6 +164,7 @@ var UiInputKey;
|
|
|
164
164
|
UiInputKey["FISCAL_ID"] = "fiscalId";
|
|
165
165
|
UiInputKey["FOREIGN_TENDER_AMOUNT"] = "input_foreignTenderAmount";
|
|
166
166
|
UiInputKey["FORFEIT_TENDER_CHANGE_CONFIRMATION"] = "input_forfeitTenderChange";
|
|
167
|
+
UiInputKey["REWARD_CARD_CONFIG"] = "input_rewardCardConfig";
|
|
167
168
|
UiInputKey["REDEEM_CARD_NUMBER"] = "input_redeemCardNumber";
|
|
168
169
|
UiInputKey["REDEEMED_REDEMPTIONS"] = "input_redeemedRedemptions";
|
|
169
170
|
UiInputKey["LOYALTY_PLANS"] = "input_loyaltyPlans";
|
|
@@ -455,6 +456,8 @@ var UiInputKey;
|
|
|
455
456
|
UiInputKey["FISCAL_RETRY"] = "input_fiscalRetry";
|
|
456
457
|
UiInputKey["MAX_FISCAL_RETRY"] = "input_maxFiscalRetry";
|
|
457
458
|
UiInputKey["CUSTOMER_INPUT_SCREENS"] = "input_customerInputScreens";
|
|
459
|
+
UiInputKey["FORCE_FISCAL_COMPLETION"] = "input_forceFiscalCompletion";
|
|
460
|
+
UiInputKey["IS_FISCALISE_VOID"] = "input_isFiscaliseVoid";
|
|
458
461
|
})(UiInputKey = exports.UiInputKey || (exports.UiInputKey = {}));
|
|
459
462
|
//
|
|
460
463
|
// Keys for use in relaying data collectedData (qualification) and nonContextualData (action).
|
|
@@ -572,6 +575,7 @@ var CollectedDataKey;
|
|
|
572
575
|
CollectedDataKey["FiscalNumber"] = "fiscalNumber";
|
|
573
576
|
CollectedDataKey["FiscalId"] = "fiscalId";
|
|
574
577
|
CollectedDataKey["FiscalDeviceActivitySuccessful"] = "fiscalDeviceActivitySuccessful";
|
|
578
|
+
CollectedDataKey["VoidedInProcessFlag"] = "voidedInProcessFlag";
|
|
575
579
|
CollectedDataKey["FiscalDeviceInformation"] = "fiscalDeviceInformation";
|
|
576
580
|
CollectedDataKey["FiscalTransactionInformation"] = "fiscalTransactionInformation";
|
|
577
581
|
CollectedDataKey["FiscalVarianceInformation"] = "FiscalVarianceInformation";
|
|
@@ -628,6 +632,11 @@ var CollectedDataKey;
|
|
|
628
632
|
CollectedDataKey["FormOfProofCode"] = "formOfProofCode";
|
|
629
633
|
CollectedDataKey["CustomCompetitorName"] = "customCompetitorName";
|
|
630
634
|
CollectedDataKey["CustomFormOfProof"] = "customFormOfProof";
|
|
635
|
+
CollectedDataKey["DiscountLevel"] = "discountLevel";
|
|
636
|
+
CollectedDataKey["RewardPrintedName"] = "rewardPrintedName";
|
|
637
|
+
CollectedDataKey["RewardPrintedNumberLabel"] = "rewardPrintedNumberLabel";
|
|
638
|
+
CollectedDataKey["AutoPopulateCardNumberFromCustomer"] = "autoPopulateCardNumberFromCustomer";
|
|
639
|
+
CollectedDataKey["RewardCardName"] = "rewardCardName";
|
|
631
640
|
CollectedDataKey["IsCompetitivePriceDiscount"] = "isCompetitivePriceDiscount";
|
|
632
641
|
CollectedDataKey["NextTransactionNumber"] = "nextTransactionNumber";
|
|
633
642
|
CollectedDataKey["Offline"] = "offline";
|
|
@@ -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;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Money, Price } from "@aptos-scp/scp-component-business-core";
|
|
2
|
+
import { UiBusinessEvent } from "@aptos-scp/scp-component-store-selling-core";
|
|
3
|
+
import { DiscountEntryType, ITransactionLineReferenceType, ManualDiscountType } from "@aptos-scp/scp-types-commerce-transaction";
|
|
4
|
+
import { IAuthorizationResponse, TenderType } from "@aptos-scp/scp-types-commerce-devices";
|
|
5
|
+
import { BaseTransactionLine } from "../BaseTransactionLine";
|
|
6
|
+
import { ManualDiscountLevel } from "../configuration";
|
|
7
|
+
import { BaseManualDiscountLine } from "./BaseManualDiscountLine";
|
|
8
|
+
export declare class RewardCardDiscountLine extends BaseManualDiscountLine {
|
|
9
|
+
readonly _cardNumber: string;
|
|
10
|
+
readonly _discountLevel: ManualDiscountLevel;
|
|
11
|
+
readonly _rewardPrintedName: string;
|
|
12
|
+
readonly _rewardPrintedNumberLabel: string;
|
|
13
|
+
readonly _rewardCardName: string;
|
|
14
|
+
readonly _autoPopulateCardNumberFromCustomer: boolean;
|
|
15
|
+
readonly _pin: string;
|
|
16
|
+
/**
|
|
17
|
+
* The tenderId is the id of the tender associated with reward card authorization
|
|
18
|
+
*/
|
|
19
|
+
readonly _tenderId: string;
|
|
20
|
+
readonly _authResponse: IAuthorizationResponse;
|
|
21
|
+
readonly _tenderType: TenderType;
|
|
22
|
+
/**
|
|
23
|
+
* The create method is called by the transaction line factory to create an instance and initialize it from the
|
|
24
|
+
* data collected during the qualification process.
|
|
25
|
+
*
|
|
26
|
+
* @param {number} lineNumber The line number of this line in the transaction
|
|
27
|
+
* @param {string} lineType The type of line
|
|
28
|
+
* @param {UiBusinessEvent} uiBusinessEvent The UI business event that led to the creation of this line
|
|
29
|
+
* @param {Readonly<Map<string, any>>} collectedData The data collected during the qualification process
|
|
30
|
+
*
|
|
31
|
+
* @return {RewardCardDiscountLine}
|
|
32
|
+
*/
|
|
33
|
+
static create(lineNumber: number, lineType: string, uiBusinessEvent: UiBusinessEvent, collectedData: Readonly<Map<string, any>>): RewardCardDiscountLine;
|
|
34
|
+
static createFromJsonObject(transactionLineJsonObj: any): RewardCardDiscountLine;
|
|
35
|
+
get discountLevel(): ManualDiscountLevel;
|
|
36
|
+
get autoPopulateCardNumberFromCustomer(): boolean;
|
|
37
|
+
get cardNumber(): string;
|
|
38
|
+
get rewardPrintedName(): string;
|
|
39
|
+
get rewardCardName(): string;
|
|
40
|
+
get rewardPrintedNumberLabel(): string;
|
|
41
|
+
get tenderId(): string;
|
|
42
|
+
get pin(): string;
|
|
43
|
+
protected constructor(lineNumber: number, lineType: string, discountType: ManualDiscountType, discountLevel: ManualDiscountLevel, rewardPrintedName: string, rewardPrintedNumberLabel: string, rewardCardName: string, autoPopulateCardNumberFromCustomer: boolean, tenderId: string, pin: string, cardNumber: string, pricingRuleId?: string, amount?: Money, percent?: string, replacementUnitPrice?: Price, reasonCode?: string, reasonDesc?: string, reasonType?: string, couponCode?: string, supervisorOverrideLineReference?: ITransactionLineReferenceType, isEmployeeDiscount?: boolean, isFastDiscount?: boolean, competitivePrice?: Price, competitor?: string, formOfProof?: string, customCompetitorName?: string, customFormOfProof?: string, competitorCode?: string, formOfProofCode?: string, entryType?: DiscountEntryType);
|
|
44
|
+
protected newTransactionLine(): BaseTransactionLine;
|
|
45
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const BaseTransactionLine_1 = require("../BaseTransactionLine");
|
|
4
|
+
const Constants_1 = require("../Constants");
|
|
5
|
+
const BaseManualDiscountLine_1 = require("./BaseManualDiscountLine");
|
|
6
|
+
class RewardCardDiscountLine extends BaseManualDiscountLine_1.BaseManualDiscountLine {
|
|
7
|
+
// Since the constructor is only called from the create methods it is made protected to prevent use by others.
|
|
8
|
+
constructor(lineNumber, lineType, discountType, discountLevel, rewardPrintedName, rewardPrintedNumberLabel, rewardCardName, autoPopulateCardNumberFromCustomer, tenderId, pin, cardNumber, pricingRuleId, amount, percent, replacementUnitPrice, reasonCode, reasonDesc, reasonType, couponCode, supervisorOverrideLineReference, isEmployeeDiscount, isFastDiscount, competitivePrice, competitor, formOfProof, customCompetitorName, customFormOfProof, competitorCode, formOfProofCode, entryType) {
|
|
9
|
+
super(lineNumber, lineType, discountType, pricingRuleId, amount, percent, replacementUnitPrice, reasonCode, reasonDesc, reasonType, couponCode, supervisorOverrideLineReference, isEmployeeDiscount, isFastDiscount, false, competitivePrice, competitor, formOfProof, customCompetitorName, customFormOfProof, competitorCode, formOfProofCode, entryType);
|
|
10
|
+
this._discountLevel = discountLevel;
|
|
11
|
+
this._rewardPrintedName = rewardPrintedName;
|
|
12
|
+
this._rewardCardName = rewardCardName;
|
|
13
|
+
this._rewardPrintedNumberLabel = rewardPrintedNumberLabel;
|
|
14
|
+
this._tenderId = tenderId;
|
|
15
|
+
this._pin = pin;
|
|
16
|
+
this._cardNumber = cardNumber;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The create method is called by the transaction line factory to create an instance and initialize it from the
|
|
20
|
+
* data collected during the qualification process.
|
|
21
|
+
*
|
|
22
|
+
* @param {number} lineNumber The line number of this line in the transaction
|
|
23
|
+
* @param {string} lineType The type of line
|
|
24
|
+
* @param {UiBusinessEvent} uiBusinessEvent The UI business event that led to the creation of this line
|
|
25
|
+
* @param {Readonly<Map<string, any>>} collectedData The data collected during the qualification process
|
|
26
|
+
*
|
|
27
|
+
* @return {RewardCardDiscountLine}
|
|
28
|
+
*/
|
|
29
|
+
static create(lineNumber, lineType, uiBusinessEvent, collectedData) {
|
|
30
|
+
const discountLevel = collectedData.get(Constants_1.CollectedDataKey.DiscountLevel);
|
|
31
|
+
const rewardPrintedName = collectedData.get(Constants_1.CollectedDataKey.RewardPrintedName);
|
|
32
|
+
const rewardPrintedNumberLabel = collectedData.get(Constants_1.CollectedDataKey.RewardPrintedNumberLabel);
|
|
33
|
+
const autoPopulateCardNumberFromCustomer = collectedData.get(Constants_1.CollectedDataKey.AutoPopulateCardNumberFromCustomer);
|
|
34
|
+
const tenderId = collectedData.get(Constants_1.CollectedDataKey.TenderId);
|
|
35
|
+
const pin = collectedData.get(Constants_1.CollectedDataKey.GiftCardPin);
|
|
36
|
+
const cardNumber = collectedData.get(Constants_1.CollectedDataKey.CardNumber);
|
|
37
|
+
const rewardCardName = collectedData.get(Constants_1.CollectedDataKey.RewardCardName);
|
|
38
|
+
const discountType = BaseManualDiscountLine_1.BaseManualDiscountLine.discountTypeFromCollectedData(collectedData);
|
|
39
|
+
const discountLine = new RewardCardDiscountLine(lineNumber, lineType, discountType, discountLevel, rewardPrintedName, rewardPrintedNumberLabel, rewardCardName, autoPopulateCardNumberFromCustomer, tenderId, pin, cardNumber);
|
|
40
|
+
discountLine.loadFromCollectedData(collectedData);
|
|
41
|
+
return discountLine;
|
|
42
|
+
}
|
|
43
|
+
static createFromJsonObject(transactionLineJsonObj) {
|
|
44
|
+
const lineNumber = BaseTransactionLine_1.BaseTransactionLine.lineNumberFromJsonObject(transactionLineJsonObj);
|
|
45
|
+
const lineType = BaseTransactionLine_1.BaseTransactionLine.lineTypeFromJsonObject(transactionLineJsonObj);
|
|
46
|
+
const discountType = BaseManualDiscountLine_1.BaseManualDiscountLine.discountTypeFromJsonObject(transactionLineJsonObj);
|
|
47
|
+
const discountLevel = transactionLineJsonObj._discountLevel;
|
|
48
|
+
const rewardPrintedName = transactionLineJsonObj._rewardPrintedName;
|
|
49
|
+
const rewardCardName = transactionLineJsonObj._rewardCardName;
|
|
50
|
+
const rewardPrintedNumberLabel = transactionLineJsonObj._rewardPrintedNumberLabel;
|
|
51
|
+
const autoPopulateCardNumberFromCustomer = transactionLineJsonObj._autoPopulateCardNumberFromCustomer;
|
|
52
|
+
const tenderId = transactionLineJsonObj._tenderId;
|
|
53
|
+
const pin = transactionLineJsonObj._pin;
|
|
54
|
+
const cardNumber = transactionLineJsonObj._cardNumber;
|
|
55
|
+
const discountLine = new RewardCardDiscountLine(lineNumber, lineType, discountType, discountLevel, rewardPrintedName, rewardPrintedNumberLabel, rewardCardName, autoPopulateCardNumberFromCustomer, tenderId, pin, cardNumber);
|
|
56
|
+
discountLine.loadFromJsonObject(transactionLineJsonObj);
|
|
57
|
+
return discountLine;
|
|
58
|
+
}
|
|
59
|
+
get discountLevel() {
|
|
60
|
+
return this._discountLevel;
|
|
61
|
+
}
|
|
62
|
+
get autoPopulateCardNumberFromCustomer() {
|
|
63
|
+
return this._autoPopulateCardNumberFromCustomer;
|
|
64
|
+
}
|
|
65
|
+
get cardNumber() {
|
|
66
|
+
return this._cardNumber;
|
|
67
|
+
}
|
|
68
|
+
get rewardPrintedName() {
|
|
69
|
+
return this._rewardPrintedName;
|
|
70
|
+
}
|
|
71
|
+
get rewardCardName() {
|
|
72
|
+
return this._rewardCardName;
|
|
73
|
+
}
|
|
74
|
+
get rewardPrintedNumberLabel() {
|
|
75
|
+
return this._rewardPrintedNumberLabel;
|
|
76
|
+
}
|
|
77
|
+
get tenderId() {
|
|
78
|
+
return this._tenderId;
|
|
79
|
+
}
|
|
80
|
+
get pin() {
|
|
81
|
+
return this._pin;
|
|
82
|
+
}
|
|
83
|
+
newTransactionLine() {
|
|
84
|
+
return new RewardCardDiscountLine(this.lineNumber, this.lineType, this._discountType, this._discountLevel, this._rewardPrintedName, this._rewardPrintedNumberLabel, this._rewardCardName, this._autoPopulateCardNumberFromCustomer, this._tenderId, this._pin, this._cardNumber, this._pricingRuleId, this._amount, this._percent, this._replacementUnitPrice, this._reasonCode, this._reasonDescription, this._reasonListType, this._couponCode, this._supervisorOverrideLineReference, this._isEmployeeDiscount, this._isFastDiscount, this._competitivePrice, this._competitor, this._formOfProof, this._customCompetitorName, this._customFormOfProof, this._competitorCode, this._formOfProofCode, this._entryType);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
exports.RewardCardDiscountLine = RewardCardDiscountLine;
|
|
88
|
+
//# sourceMappingURL=RewardCardDiscountLine.js.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Money } from "@aptos-scp/scp-component-business-core";
|
|
2
|
+
import { ITransactionLineFactory } from "@aptos-scp/scp-component-store-selling-core";
|
|
3
|
+
import { IManualDiscountLine } from "./IManualDiscountLine";
|
|
4
|
+
import { ManualDiscountLevel } from "../configuration";
|
|
5
|
+
import { ManualDiscountLineTotalDecorator } from "./ManualDiscountLineTotalDecorator";
|
|
6
|
+
export declare const DECORATOR_TYPE_REWARD_CARD_DISCOUNT_TOTAL: string;
|
|
7
|
+
export declare const REWARD_CARD_TOTAL_DISCOUNT_ANNOTATION_SOURCE: string;
|
|
8
|
+
export declare class RewardCardDiscountLineTotalDecorator extends ManualDiscountLineTotalDecorator {
|
|
9
|
+
static createFromJsonObject(transactionLineJsonObj: any, transactionLineFactory: ITransactionLineFactory): RewardCardDiscountLineTotalDecorator;
|
|
10
|
+
constructor(decoratorLineType: string, decoratedTransactionLine: IManualDiscountLine, totalDiscount: Money, annotationSourceLineNumber?: number);
|
|
11
|
+
get discountLevel(): ManualDiscountLevel;
|
|
12
|
+
get rewardPrintedName(): string;
|
|
13
|
+
get rewardPrintedNumberLabel(): string;
|
|
14
|
+
get cardNumber(): string;
|
|
15
|
+
get rewardCardName(): string;
|
|
16
|
+
get tenderId(): string;
|
|
17
|
+
get pin(): string;
|
|
18
|
+
get autoPopulateCardNumberFromCustomer(): boolean;
|
|
19
|
+
protected newTransactionLine(): RewardCardDiscountLineTotalDecorator;
|
|
20
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const scp_component_business_core_1 = require("@aptos-scp/scp-component-business-core");
|
|
4
|
+
const ManualDiscountLineTotalDecorator_1 = require("./ManualDiscountLineTotalDecorator");
|
|
5
|
+
exports.DECORATOR_TYPE_REWARD_CARD_DISCOUNT_TOTAL = "DECORATOR_TYPE_REWARD_CARD_DISCOUNT_TOTAL";
|
|
6
|
+
exports.REWARD_CARD_TOTAL_DISCOUNT_ANNOTATION_SOURCE = "REWARD_CARD_TOTAL_DISCOUNT_ANNOTATION_SOURCE";
|
|
7
|
+
class RewardCardDiscountLineTotalDecorator extends ManualDiscountLineTotalDecorator_1.ManualDiscountLineTotalDecorator {
|
|
8
|
+
static createFromJsonObject(transactionLineJsonObj, transactionLineFactory) {
|
|
9
|
+
const decoratedTransactionLineJsonObj = this.getDecoratedTransactionLineJsonObjectFromJsonObject(transactionLineJsonObj);
|
|
10
|
+
const decoratedLine = transactionLineFactory.createTransactionLineFromJsonObj(decoratedTransactionLineJsonObj);
|
|
11
|
+
const totalDiscount = scp_component_business_core_1.Money.fromJSON(transactionLineJsonObj._totalDiscount);
|
|
12
|
+
const annotationSourceLineNumber = this.getAnnotationSourceLineNumberFromJsonObject(transactionLineJsonObj);
|
|
13
|
+
const decoratorType = this.getLineDecoratorTypeFromJsonObject(transactionLineJsonObj);
|
|
14
|
+
return new RewardCardDiscountLineTotalDecorator(decoratorType, decoratedLine, totalDiscount, annotationSourceLineNumber);
|
|
15
|
+
}
|
|
16
|
+
constructor(decoratorLineType, decoratedTransactionLine, totalDiscount, annotationSourceLineNumber) {
|
|
17
|
+
super(decoratorLineType, decoratedTransactionLine, undefined, exports.REWARD_CARD_TOTAL_DISCOUNT_ANNOTATION_SOURCE, totalDiscount, annotationSourceLineNumber);
|
|
18
|
+
}
|
|
19
|
+
get discountLevel() {
|
|
20
|
+
return this.decoratedTransactionLine.discountLevel;
|
|
21
|
+
}
|
|
22
|
+
get rewardPrintedName() {
|
|
23
|
+
return this.decoratedTransactionLine.rewardPrintedName;
|
|
24
|
+
}
|
|
25
|
+
get rewardPrintedNumberLabel() {
|
|
26
|
+
return this.decoratedTransactionLine.rewardPrintedNumberLabel;
|
|
27
|
+
}
|
|
28
|
+
get cardNumber() {
|
|
29
|
+
return this.decoratedTransactionLine.cardNumber;
|
|
30
|
+
}
|
|
31
|
+
get rewardCardName() {
|
|
32
|
+
return this.decoratedTransactionLine.rewardCardName;
|
|
33
|
+
}
|
|
34
|
+
get tenderId() {
|
|
35
|
+
return this.decoratedTransactionLine.tenderId;
|
|
36
|
+
}
|
|
37
|
+
get pin() {
|
|
38
|
+
return this.decoratedTransactionLine.pin;
|
|
39
|
+
}
|
|
40
|
+
get autoPopulateCardNumberFromCustomer() {
|
|
41
|
+
return this.decoratedTransactionLine.autoPopulateCardNumberFromCustomer;
|
|
42
|
+
}
|
|
43
|
+
newTransactionLine() {
|
|
44
|
+
return new RewardCardDiscountLineTotalDecorator(this.lineDecoratorType, this.decoratedTransactionLine, this.totalDiscount, this.annotationSourceLineNumber);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
exports.RewardCardDiscountLineTotalDecorator = RewardCardDiscountLineTotalDecorator;
|
|
48
|
+
//# sourceMappingURL=RewardCardDiscountLineTotalDecorator.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ITransactionLineFactory } from "@aptos-scp/scp-component-store-selling-core";
|
|
2
|
+
import { VoidSource } from "../Constants";
|
|
3
|
+
import { RewardCardDiscountLine } from "./RewardCardDiscountLine";
|
|
4
|
+
import { ManualDiscountLevel } from "../configuration";
|
|
5
|
+
import { VoidedDiscountLineDecorator } from "./VoidedDiscountLineDecorator";
|
|
6
|
+
export declare class VoidedRewardCardDiscountLineDecorator extends VoidedDiscountLineDecorator {
|
|
7
|
+
static createFromJsonObject(transactionLineJsonObj: any, transactionLineFactory: ITransactionLineFactory): VoidedRewardCardDiscountLineDecorator;
|
|
8
|
+
constructor(voidSource: VoidSource, discountLine: RewardCardDiscountLine, annotationSourceLineNumber: number);
|
|
9
|
+
get discountLevel(): ManualDiscountLevel;
|
|
10
|
+
get cardNumber(): string;
|
|
11
|
+
get rewardPrintedName(): string;
|
|
12
|
+
get rewardPrintedNumberLabel(): string;
|
|
13
|
+
get tenderId(): string;
|
|
14
|
+
get pin(): string;
|
|
15
|
+
get rewardCardName(): string;
|
|
16
|
+
get autoPopulateCardNumberFromCustomer(): boolean;
|
|
17
|
+
protected newTransactionLine(): VoidedRewardCardDiscountLineDecorator;
|
|
18
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const BaseLineDecorator_1 = require("../BaseLineDecorator");
|
|
4
|
+
const VoidedDiscountLineDecorator_1 = require("./VoidedDiscountLineDecorator");
|
|
5
|
+
class VoidedRewardCardDiscountLineDecorator extends VoidedDiscountLineDecorator_1.VoidedDiscountLineDecorator {
|
|
6
|
+
static createFromJsonObject(transactionLineJsonObj, transactionLineFactory) {
|
|
7
|
+
const decoratedTransactionLineJsonObj = BaseLineDecorator_1.BaseLineDecorator.getDecoratedTransactionLineJsonObjectFromJsonObject(transactionLineJsonObj);
|
|
8
|
+
const decoratedDiscountLine = transactionLineFactory.createTransactionLineFromJsonObj(decoratedTransactionLineJsonObj);
|
|
9
|
+
const annotationSourceLineNumber = BaseLineDecorator_1.BaseLineDecorator.getAnnotationSourceLineNumberFromJsonObject(transactionLineJsonObj);
|
|
10
|
+
const voidSource = transactionLineJsonObj._voidSource;
|
|
11
|
+
const voidedRewardCardDiscountLineDecorator = new VoidedRewardCardDiscountLineDecorator(voidSource, decoratedDiscountLine, annotationSourceLineNumber);
|
|
12
|
+
return voidedRewardCardDiscountLineDecorator;
|
|
13
|
+
}
|
|
14
|
+
constructor(voidSource, discountLine, annotationSourceLineNumber) {
|
|
15
|
+
super(voidSource, discountLine, annotationSourceLineNumber);
|
|
16
|
+
}
|
|
17
|
+
get discountLevel() {
|
|
18
|
+
return this.decoratedTransactionLine.discountLevel;
|
|
19
|
+
}
|
|
20
|
+
get cardNumber() {
|
|
21
|
+
return this.decoratedTransactionLine.cardNumber;
|
|
22
|
+
}
|
|
23
|
+
get rewardPrintedName() {
|
|
24
|
+
return this.decoratedTransactionLine.rewardPrintedName;
|
|
25
|
+
}
|
|
26
|
+
get rewardPrintedNumberLabel() {
|
|
27
|
+
return this.decoratedTransactionLine.rewardPrintedNumberLabel;
|
|
28
|
+
}
|
|
29
|
+
get tenderId() {
|
|
30
|
+
return this.decoratedTransactionLine.tenderId;
|
|
31
|
+
}
|
|
32
|
+
get pin() {
|
|
33
|
+
return this.decoratedTransactionLine.pin;
|
|
34
|
+
}
|
|
35
|
+
get rewardCardName() {
|
|
36
|
+
return this.decoratedTransactionLine.rewardCardName;
|
|
37
|
+
}
|
|
38
|
+
get autoPopulateCardNumberFromCustomer() {
|
|
39
|
+
return this.decoratedTransactionLine.autoPopulateCardNumberFromCustomer;
|
|
40
|
+
}
|
|
41
|
+
newTransactionLine() {
|
|
42
|
+
return new VoidedRewardCardDiscountLineDecorator(this.voidSource, this.decoratedTransactionLine, this.annotationSourceLineNumber);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.VoidedRewardCardDiscountLineDecorator = VoidedRewardCardDiscountLineDecorator;
|
|
46
|
+
//# sourceMappingURL=VoidedRewardCardDiscountLineDecorator.js.map
|
|
@@ -15,5 +15,8 @@ export * from "./ModifyManualDiscountLine";
|
|
|
15
15
|
export * from "./ManualDiscountLineModificationDecorator";
|
|
16
16
|
export * from "./BaseManualDiscountLineDecorator";
|
|
17
17
|
export * from "./ExpiredCouponOverrideLine";
|
|
18
|
+
export * from "./RewardCardDiscountLineTotalDecorator";
|
|
19
|
+
export * from "./RewardCardDiscountLine";
|
|
20
|
+
export * from "./VoidedRewardCardDiscountLineDecorator";
|
|
18
21
|
export * from "./PromotionCouponLine";
|
|
19
22
|
export * from "./employee/";
|
|
@@ -18,6 +18,9 @@ __export(require("./ModifyManualDiscountLine"));
|
|
|
18
18
|
__export(require("./ManualDiscountLineModificationDecorator"));
|
|
19
19
|
__export(require("./BaseManualDiscountLineDecorator"));
|
|
20
20
|
__export(require("./ExpiredCouponOverrideLine"));
|
|
21
|
+
__export(require("./RewardCardDiscountLineTotalDecorator"));
|
|
22
|
+
__export(require("./RewardCardDiscountLine"));
|
|
23
|
+
__export(require("./VoidedRewardCardDiscountLineDecorator"));
|
|
21
24
|
__export(require("./PromotionCouponLine"));
|
|
22
25
|
__export(require("./employee/"));
|
|
23
26
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { ITransactionLine } from "@aptos-scp/scp-component-store-selling-core";
|
|
2
2
|
import { IManualDiscountLine } from "./IManualDiscountLine";
|
|
3
3
|
import { LoyaltyDiscountLine } from "./LoyaltyDiscountLine";
|
|
4
|
+
import { RewardCardDiscountLine } from "./RewardCardDiscountLine";
|
|
4
5
|
import { ManualItemDiscountLine } from "./ManualItemDiscountLine";
|
|
5
6
|
import { ManualTransactionDiscountLine } from "./ManualTransactionDiscountLine";
|
|
6
7
|
export declare const ITEM_MANUAL_DISCOUNT_LINE_TYPE = "ItemManualDiscount";
|
|
7
8
|
export declare const TRANSACTION_MANUAL_DISCOUNT_LINE_TYPE = "TransactionManualDiscount";
|
|
8
9
|
export declare const LOYALTY_DISCOUNT_LINE_TYPE = "LoyaltyDiscount";
|
|
10
|
+
export declare const REWARD_CARD_DISCOUNT_LINE_TYPE = "RewardCardDiscount";
|
|
9
11
|
export declare function isManualItemDiscountLine(transactionLine: ITransactionLine): transactionLine is ManualItemDiscountLine;
|
|
10
12
|
export declare function isManualTransactionDiscountLine(transactionLine: ITransactionLine): transactionLine is ManualTransactionDiscountLine;
|
|
11
13
|
export declare function isLoyaltyDiscountLine(transactionLine: ITransactionLine): transactionLine is LoyaltyDiscountLine;
|
|
14
|
+
export declare function isRewardCardDiscountLine(transactionLine: ITransactionLine): transactionLine is RewardCardDiscountLine;
|
|
12
15
|
export declare function isManualDiscountLine(transactionLine: ITransactionLine): transactionLine is IManualDiscountLine;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const LoyaltyDiscountLine_1 = require("./LoyaltyDiscountLine");
|
|
4
|
+
const RewardCardDiscountLine_1 = require("./RewardCardDiscountLine");
|
|
4
5
|
const ManualItemDiscountLine_1 = require("./ManualItemDiscountLine");
|
|
5
6
|
const ManualTransactionDiscountLine_1 = require("./ManualTransactionDiscountLine");
|
|
6
7
|
exports.ITEM_MANUAL_DISCOUNT_LINE_TYPE = "ItemManualDiscount";
|
|
7
8
|
exports.TRANSACTION_MANUAL_DISCOUNT_LINE_TYPE = "TransactionManualDiscount";
|
|
8
9
|
exports.LOYALTY_DISCOUNT_LINE_TYPE = "LoyaltyDiscount";
|
|
10
|
+
exports.REWARD_CARD_DISCOUNT_LINE_TYPE = "RewardCardDiscount";
|
|
9
11
|
function isManualItemDiscountLine(transactionLine) {
|
|
10
12
|
return (transactionLine instanceof ManualItemDiscountLine_1.ManualItemDiscountLine ||
|
|
11
13
|
(transactionLine.lineType === exports.ITEM_MANUAL_DISCOUNT_LINE_TYPE &&
|
|
@@ -21,10 +23,18 @@ function isLoyaltyDiscountLine(transactionLine) {
|
|
|
21
23
|
return (transactionLine instanceof LoyaltyDiscountLine_1.LoyaltyDiscountLine || transactionLine.lineType === exports.LOYALTY_DISCOUNT_LINE_TYPE);
|
|
22
24
|
}
|
|
23
25
|
exports.isLoyaltyDiscountLine = isLoyaltyDiscountLine;
|
|
26
|
+
function isRewardCardDiscountLine(transactionLine) {
|
|
27
|
+
return (transactionLine instanceof RewardCardDiscountLine_1.RewardCardDiscountLine ||
|
|
28
|
+
transactionLine.lineType === exports.REWARD_CARD_DISCOUNT_LINE_TYPE);
|
|
29
|
+
}
|
|
30
|
+
exports.isRewardCardDiscountLine = isRewardCardDiscountLine;
|
|
24
31
|
function isManualDiscountLine(transactionLine) {
|
|
32
|
+
//RewardCardDiscount is NOT a manual discount type, since IManualDiscountLine
|
|
33
|
+
// has most of common discount properties, IRewardCardDiscountLine extends IManualDiscountLine
|
|
25
34
|
return (isManualItemDiscountLine(transactionLine) ||
|
|
26
35
|
isManualTransactionDiscountLine(transactionLine) ||
|
|
27
|
-
isLoyaltyDiscountLine(transactionLine)
|
|
36
|
+
isLoyaltyDiscountLine(transactionLine) ||
|
|
37
|
+
isRewardCardDiscountLine(transactionLine));
|
|
28
38
|
}
|
|
29
39
|
exports.isManualDiscountLine = isManualDiscountLine;
|
|
30
40
|
//# sourceMappingURL=lineTypes.js.map
|
|
@@ -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
|
|
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
|
|
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;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { IPricingMetadataPersistanceObject, ISerializedLinePricingAdjustment, ISerializedSubline, ISerializedSublinePricingAdjustment, ISublinePricingAdjustment, RewardIssue } from "@aptos-scp/scp-component-pricing";
|
|
2
2
|
import { ISerializedNonFinancialReward } from "@aptos-scp/scp-component-pricing/lib/interfaces/ILineNonFinancialReward";
|
|
3
3
|
import { ICompetitivePriceInformation, ILoyaltyInformation, ISupervisorOverrideInformation, PricingAdjustmentScope, SourceIndicator } from "@aptos-scp/scp-types-commerce-transaction";
|
|
4
|
-
import { PotentialPromotion } from "@aptos-scp/scp-types-pricing";
|
|
4
|
+
import { PotentialPromotion, RewardCard } from "@aptos-scp/scp-types-pricing";
|
|
5
5
|
export interface ISerializedPriceCalculationResultsWithSource {
|
|
6
6
|
readonly lineAdjustments: ISerializedLinePricingAdjustmentWithSource[];
|
|
7
7
|
readonly sublines?: ISerializedSublineWithSource[];
|
|
8
8
|
readonly issues: RewardIssue[];
|
|
9
9
|
readonly nonFinancialRewards?: ISerializedNonFinancialRewardWithSource[];
|
|
10
10
|
readonly potentialPromotions?: PotentialPromotion[];
|
|
11
|
+
readonly rewardCards?: RewardCard[];
|
|
11
12
|
metadata?: IPricingMetadataPersistanceObject;
|
|
12
13
|
}
|
|
13
14
|
export interface ISerializedLinePricingAdjustmentWithSource extends ISerializedLinePricingAdjustment {
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Money, Price } from "@aptos-scp/scp-component-business-core";
|
|
2
|
+
import { VerboseDiscountType } from "@aptos-scp/scp-component-pricing";
|
|
3
|
+
import { ITransactionLine, ITransactionLineFactory } from "@aptos-scp/scp-component-store-selling-core";
|
|
4
|
+
import { ISameTransactionLineReference } from "@aptos-scp/scp-types-commerce-transaction";
|
|
5
|
+
import { SelectedUnitPrice } from "../StoreItem";
|
|
6
|
+
import { IItemLine, IItemSubline } from "./IItemLine";
|
|
7
|
+
import { ItemLineBaseDiscountDecorator } from "./ItemLineBaseDiscountDecorator";
|
|
8
|
+
export declare const DECORATOR_TYPE_ITEM_LINE_REWARD_CARD_DISCOUNT = "ITEM_LINE_REWARD_CARD_DISCOUNT_DECORATOR";
|
|
9
|
+
export declare function isItemLineRewardCardDiscountDecorator(transactionLine: ITransactionLine): transactionLine is ItemLineRewardCardDiscountDecorator;
|
|
10
|
+
export declare class ItemLineRewardCardDiscountDecorator extends ItemLineBaseDiscountDecorator {
|
|
11
|
+
private _discountLineNumber?;
|
|
12
|
+
private _selectedUnitPrice?;
|
|
13
|
+
private _baseUnitPrice?;
|
|
14
|
+
private _baseExtendedAmount?;
|
|
15
|
+
private _baseLineSavings?;
|
|
16
|
+
private _rewardCardNumber?;
|
|
17
|
+
static createFromJsonObject(transactionLineJsonObj: any, transactionLineFactory: ITransactionLineFactory): ItemLineRewardCardDiscountDecorator;
|
|
18
|
+
constructor(decoratorType: string, replacementUnitPrice: Price, newExtendedAmount: Money, itemLine: IItemLine, lineSavings: Money, adjustmentAmount: Money, annotationDescription: string, annotationSourceType: string, discountAmount?: Money, percent?: string, discountName?: string, discountDescription?: string, discountType?: VerboseDiscountType, sublines?: IItemSubline[], replacementAmount?: Money, discountLineNumber?: ISameTransactionLineReference, ruleId?: string, extendedAmountBeforeAdjustment?: Money, selectedUnitPrice?: SelectedUnitPrice, presentation?: IItemLine, aggregationId?: string, rewardCardNumber?: string);
|
|
19
|
+
get discountLineNumber(): ISameTransactionLineReference;
|
|
20
|
+
get rewardCardNumber(): string;
|
|
21
|
+
get itemSelectedUnitPrice(): SelectedUnitPrice;
|
|
22
|
+
get originalUnitPrice(): Price;
|
|
23
|
+
get originalExtendedAmount(): Money;
|
|
24
|
+
get lineSavings(): Money;
|
|
25
|
+
get markeddownPriceLineSavings(): Money;
|
|
26
|
+
get unitPriceExcludingTransactionDiscounts(): Price;
|
|
27
|
+
get extendedAmountExcludingTransactionDiscounts(): Money;
|
|
28
|
+
protected clone(): ItemLineRewardCardDiscountDecorator;
|
|
29
|
+
protected newTransactionLine(): ItemLineRewardCardDiscountDecorator;
|
|
30
|
+
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const scp_component_business_core_1 = require("@aptos-scp/scp-component-business-core");
|
|
4
|
+
const StoreItem_1 = require("../StoreItem");
|
|
5
|
+
const BaseItemLineDecorator_1 = require("./BaseItemLineDecorator");
|
|
6
|
+
const ItemLine_1 = require("./ItemLine");
|
|
7
|
+
const ItemLineBaseDiscountDecorator_1 = require("./ItemLineBaseDiscountDecorator");
|
|
8
|
+
exports.DECORATOR_TYPE_ITEM_LINE_REWARD_CARD_DISCOUNT = "ITEM_LINE_REWARD_CARD_DISCOUNT_DECORATOR";
|
|
9
|
+
function isItemLineRewardCardDiscountDecorator(transactionLine) {
|
|
10
|
+
const decoratorType = transactionLine.lineDecoratorType;
|
|
11
|
+
return decoratorType === exports.DECORATOR_TYPE_ITEM_LINE_REWARD_CARD_DISCOUNT;
|
|
12
|
+
}
|
|
13
|
+
exports.isItemLineRewardCardDiscountDecorator = isItemLineRewardCardDiscountDecorator;
|
|
14
|
+
class ItemLineRewardCardDiscountDecorator extends ItemLineBaseDiscountDecorator_1.ItemLineBaseDiscountDecorator {
|
|
15
|
+
constructor(decoratorType, replacementUnitPrice, newExtendedAmount, itemLine, lineSavings, adjustmentAmount, annotationDescription, annotationSourceType, discountAmount, percent, discountName, discountDescription, discountType, sublines, replacementAmount, discountLineNumber, ruleId, extendedAmountBeforeAdjustment, selectedUnitPrice, presentation, aggregationId, rewardCardNumber) {
|
|
16
|
+
super(decoratorType, replacementUnitPrice, newExtendedAmount, itemLine, lineSavings, adjustmentAmount, annotationDescription, annotationSourceType, discountAmount, percent, discountName, discountDescription, discountType, sublines, replacementAmount, false, ruleId, extendedAmountBeforeAdjustment, false, presentation, aggregationId);
|
|
17
|
+
this._discountLineNumber = discountLineNumber;
|
|
18
|
+
this._selectedUnitPrice = selectedUnitPrice;
|
|
19
|
+
this._rewardCardNumber = rewardCardNumber;
|
|
20
|
+
if (selectedUnitPrice === StoreItem_1.SelectedUnitPrice.FullPrice && itemLine.itemFullPrice) {
|
|
21
|
+
this._baseUnitPrice = itemLine.itemFullPrice;
|
|
22
|
+
this._baseExtendedAmount = itemLine.itemFullPrice.calculateExtendedAmount(itemLine.quantity);
|
|
23
|
+
this._baseLineSavings = lineSavings;
|
|
24
|
+
}
|
|
25
|
+
else if (selectedUnitPrice === StoreItem_1.SelectedUnitPrice.PermanentPrice && itemLine.itemPermanentPrice) {
|
|
26
|
+
this._baseUnitPrice = itemLine.itemPermanentPrice;
|
|
27
|
+
this._baseExtendedAmount = itemLine.itemPermanentPrice.calculateExtendedAmount(itemLine.quantity);
|
|
28
|
+
this._baseLineSavings = lineSavings;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
static createFromJsonObject(transactionLineJsonObj, transactionLineFactory) {
|
|
32
|
+
const decoratedTransactionLineJsonObj = BaseItemLineDecorator_1.BaseItemLineDecorator.getDecoratedTransactionLineJsonObjectFromJsonObject(transactionLineJsonObj);
|
|
33
|
+
const decoratedItemLine = transactionLineFactory.createTransactionLineFromJsonObj(decoratedTransactionLineJsonObj);
|
|
34
|
+
let adjustmentAmount;
|
|
35
|
+
if (transactionLineJsonObj.adjustmentAmount) {
|
|
36
|
+
adjustmentAmount = scp_component_business_core_1.Money.fromIMoney(transactionLineJsonObj.adjustmentAmount);
|
|
37
|
+
}
|
|
38
|
+
const replacementUnitPrice = scp_component_business_core_1.Price.fromJSON(transactionLineJsonObj._replacementUnitPrice);
|
|
39
|
+
let replacementAmount;
|
|
40
|
+
if (transactionLineJsonObj._replacementAmount) {
|
|
41
|
+
replacementAmount = scp_component_business_core_1.Money.fromJSON(transactionLineJsonObj._replacementAmount);
|
|
42
|
+
}
|
|
43
|
+
const newExtendedAmount = new scp_component_business_core_1.Money(transactionLineJsonObj._newExtendedAmount);
|
|
44
|
+
const discountName = transactionLineJsonObj._discountName;
|
|
45
|
+
const discountDescription = transactionLineJsonObj._discountDescription;
|
|
46
|
+
const discountType = transactionLineJsonObj._discountType;
|
|
47
|
+
let discountAmount;
|
|
48
|
+
if (transactionLineJsonObj._discountAmount) {
|
|
49
|
+
discountAmount = scp_component_business_core_1.Money.fromJSON(transactionLineJsonObj._discountAmount);
|
|
50
|
+
}
|
|
51
|
+
const percent = transactionLineJsonObj._percent;
|
|
52
|
+
const discountLineNumber = transactionLineJsonObj._discountLineNumber;
|
|
53
|
+
const lineSavings = BaseItemLineDecorator_1.BaseItemLineDecorator.getLineSavingsFromJsonObject(transactionLineJsonObj);
|
|
54
|
+
const annotationDescription = BaseItemLineDecorator_1.BaseItemLineDecorator.getAnnotationDescriptionFromJsonObject(transactionLineJsonObj);
|
|
55
|
+
const annotationSourceType = BaseItemLineDecorator_1.BaseItemLineDecorator.getAnnotationSourceTypeFromJsonObject(transactionLineJsonObj);
|
|
56
|
+
const sublines = BaseItemLineDecorator_1.BaseItemLineDecorator.getSublinesFromJsonObject(transactionLineJsonObj);
|
|
57
|
+
const lineDecoratorType = BaseItemLineDecorator_1.BaseItemLineDecorator.getLineDecoratorTypeFromJsonObject(transactionLineJsonObj);
|
|
58
|
+
const ruleId = transactionLineJsonObj._ruleId;
|
|
59
|
+
const extendedAmountBeforeAdjustment = transactionLineJsonObj._extendedAmountBeforeAdjustment
|
|
60
|
+
? scp_component_business_core_1.Money.fromJSON(transactionLineJsonObj._extendedAmountBeforeAdjustment)
|
|
61
|
+
: undefined;
|
|
62
|
+
const selectedUnitPrice = transactionLineJsonObj._selectedUnitPrice;
|
|
63
|
+
const presentation = transactionLineJsonObj._presentation
|
|
64
|
+
? ItemLineRewardCardDiscountDecorator.createFromJsonObject(transactionLineJsonObj._presentation, transactionLineFactory)
|
|
65
|
+
: undefined;
|
|
66
|
+
const aggregationId = transactionLineJsonObj._aggregationId;
|
|
67
|
+
const rewardCardNumber = transactionLineJsonObj._rewardCardNumber;
|
|
68
|
+
const rewardCardDiscountsDecorator = new ItemLineRewardCardDiscountDecorator(lineDecoratorType, replacementUnitPrice, newExtendedAmount, decoratedItemLine, lineSavings, adjustmentAmount, annotationDescription, annotationSourceType, discountAmount, percent, discountName, discountDescription, discountType, sublines, replacementAmount, discountLineNumber, ruleId, extendedAmountBeforeAdjustment, selectedUnitPrice, presentation, aggregationId, rewardCardNumber);
|
|
69
|
+
return rewardCardDiscountsDecorator;
|
|
70
|
+
}
|
|
71
|
+
get discountLineNumber() {
|
|
72
|
+
return this._discountLineNumber;
|
|
73
|
+
}
|
|
74
|
+
get rewardCardNumber() {
|
|
75
|
+
return this._rewardCardNumber;
|
|
76
|
+
}
|
|
77
|
+
get itemSelectedUnitPrice() {
|
|
78
|
+
return this._selectedUnitPrice
|
|
79
|
+
? this._selectedUnitPrice
|
|
80
|
+
: this.decoratedTransactionLine.itemSelectedUnitPrice;
|
|
81
|
+
}
|
|
82
|
+
get originalUnitPrice() {
|
|
83
|
+
return this._baseUnitPrice ? this._baseUnitPrice : this.decoratedTransactionLine.originalUnitPrice;
|
|
84
|
+
}
|
|
85
|
+
get originalExtendedAmount() {
|
|
86
|
+
return this._baseExtendedAmount
|
|
87
|
+
? this._baseExtendedAmount
|
|
88
|
+
: this.decoratedTransactionLine.originalExtendedAmount;
|
|
89
|
+
}
|
|
90
|
+
get lineSavings() {
|
|
91
|
+
return this._baseLineSavings ? this._baseLineSavings : super.lineSavings;
|
|
92
|
+
}
|
|
93
|
+
get markeddownPriceLineSavings() {
|
|
94
|
+
return this._baseLineSavings ? undefined : this.decoratedTransactionLine.markeddownPriceLineSavings;
|
|
95
|
+
}
|
|
96
|
+
get unitPriceExcludingTransactionDiscounts() {
|
|
97
|
+
return this.lineDecoratorType === exports.DECORATOR_TYPE_ITEM_LINE_REWARD_CARD_DISCOUNT
|
|
98
|
+
? this.decoratedTransactionLine.unitPriceExcludingTransactionDiscounts
|
|
99
|
+
: this.unitPrice;
|
|
100
|
+
}
|
|
101
|
+
get extendedAmountExcludingTransactionDiscounts() {
|
|
102
|
+
return this.lineDecoratorType === exports.DECORATOR_TYPE_ITEM_LINE_REWARD_CARD_DISCOUNT &&
|
|
103
|
+
!ItemLine_1.isFulfillmentLine(this.decoratedTransactionLine) &&
|
|
104
|
+
!ItemLine_1.isCancelLine(this.decoratedTransactionLine)
|
|
105
|
+
? this.decoratedTransactionLine.extendedAmountExcludingTransactionDiscounts
|
|
106
|
+
: this.decoratedTransactionLine.extendedAmountExcludingTransactionDiscounts.minus(this.adjustmentAmount);
|
|
107
|
+
}
|
|
108
|
+
clone() {
|
|
109
|
+
const newItemLineRewardCardDiscountDecorator = super.clone();
|
|
110
|
+
newItemLineRewardCardDiscountDecorator._discountLineNumber = this._discountLineNumber;
|
|
111
|
+
newItemLineRewardCardDiscountDecorator._selectedUnitPrice = this._selectedUnitPrice;
|
|
112
|
+
newItemLineRewardCardDiscountDecorator._baseUnitPrice = this._baseUnitPrice;
|
|
113
|
+
newItemLineRewardCardDiscountDecorator._rewardCardNumber = this._rewardCardNumber;
|
|
114
|
+
newItemLineRewardCardDiscountDecorator._baseExtendedAmount = this._baseExtendedAmount;
|
|
115
|
+
newItemLineRewardCardDiscountDecorator._baseLineSavings = this._baseLineSavings;
|
|
116
|
+
return newItemLineRewardCardDiscountDecorator;
|
|
117
|
+
}
|
|
118
|
+
newTransactionLine() {
|
|
119
|
+
return new ItemLineRewardCardDiscountDecorator(this.lineDecoratorType, this.replacementUnitPrice, this.newExtendedAmount, this.decoratedTransactionLine, this.lineSavings, this.adjustmentAmount, this.annotationDescription, this.annotationSourceType, this.discountAmount, this.percent, this.discountName, this.discountDescription, this.discountType, this.sublines, this.replacementAmount, this.discountLineNumber, this.ruleId, this.extendedAmountBeforeAdjustment, this.itemSelectedUnitPrice, this.presentation, this.aggregationId, this.rewardCardNumber);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
exports.ItemLineRewardCardDiscountDecorator = ItemLineRewardCardDiscountDecorator;
|
|
123
|
+
//# sourceMappingURL=ItemLineRewardCardDiscountDecorator.js.map
|
|
@@ -35,4 +35,5 @@ export * from "./ItemLineNonFinancialRewardDecorator";
|
|
|
35
35
|
export * from "./IAllLinePricingAdjustments";
|
|
36
36
|
export * from "./ISerializedPriceCalculationResultsWithSource";
|
|
37
37
|
export * from "./ItemLineExtensibilityFormDataDecorator";
|
|
38
|
+
export * from "./ItemLineRewardCardDiscountDecorator";
|
|
38
39
|
export * from "./SupersededPriceChangeLineDecorator";
|
|
@@ -38,5 +38,6 @@ __export(require("./ItemLineTaxOverrideDecorator"));
|
|
|
38
38
|
__export(require("./ItemLineNonFinancialRewardDecorator"));
|
|
39
39
|
__export(require("./IAllLinePricingAdjustments"));
|
|
40
40
|
__export(require("./ItemLineExtensibilityFormDataDecorator"));
|
|
41
|
+
__export(require("./ItemLineRewardCardDiscountDecorator"));
|
|
41
42
|
__export(require("./SupersededPriceChangeLineDecorator"));
|
|
42
43
|
//# sourceMappingURL=index.js.map
|
|
@@ -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
|
-
|
|
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
|
|
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
|
|
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.
|
|
3
|
+
"version": "2.17.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",
|
|
@@ -54,7 +55,7 @@
|
|
|
54
55
|
"peerDependencies": {
|
|
55
56
|
"@aptos-scp/scp-component-business-core": "^1.12.7",
|
|
56
57
|
"@aptos-scp/scp-component-logging": "^2.1.16",
|
|
57
|
-
"@aptos-scp/scp-component-pricing": "^7.
|
|
58
|
+
"@aptos-scp/scp-component-pricing": "^7.66.4",
|
|
58
59
|
"@aptos-scp/scp-component-store-items": "^1.21.0",
|
|
59
60
|
"@aptos-scp/scp-component-store-selling-core": "^18.9.3",
|
|
60
61
|
"@aptos-scp/scp-component-taxation": "^5.28.0",
|
|
@@ -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.
|
|
66
|
+
"@aptos-scp/scp-types-commerce-transaction": "^1.82.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",
|
|
@@ -76,7 +77,7 @@
|
|
|
76
77
|
"@aptos-scp/scp-component-business-core": "^1.12.7",
|
|
77
78
|
"@aptos-scp/scp-component-commit-configs": "^4.1.3",
|
|
78
79
|
"@aptos-scp/scp-component-logging": "^2.1.16",
|
|
79
|
-
"@aptos-scp/scp-component-pricing": "^7.
|
|
80
|
+
"@aptos-scp/scp-component-pricing": "^7.66.4",
|
|
80
81
|
"@aptos-scp/scp-component-rn-circuit-breaker": "^1.0.15",
|
|
81
82
|
"@aptos-scp/scp-component-store-items": "^1.21.0",
|
|
82
83
|
"@aptos-scp/scp-component-store-selling-core": "^18.9.3",
|
|
@@ -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.
|
|
88
|
+
"@aptos-scp/scp-types-commerce-transaction": "^1.82.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",
|
|
@@ -94,7 +95,7 @@
|
|
|
94
95
|
"@aptos-scp/scp-types-inventory": "^2.0.0",
|
|
95
96
|
"@aptos-scp/scp-types-loyalty-memberships": "^2.3.0",
|
|
96
97
|
"@aptos-scp/scp-types-orders": "^4.11.0",
|
|
97
|
-
"@aptos-scp/scp-types-pricing": "^4.
|
|
98
|
+
"@aptos-scp/scp-types-pricing": "^4.30.0",
|
|
98
99
|
"@aptos-scp/scp-types-ss-transaction-history": "^1.6.0",
|
|
99
100
|
"@aptos-scp/scp-types-store-items": "^1.34.0",
|
|
100
101
|
"@aptos-scp/scp-types-terminal-settings": "^1.3.0",
|