@aptos-scp/scp-component-store-selling-features-domain-model 1.10.3 → 1.11.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/model/Constants.d.ts +1 -0
- package/lib/domain/model/Constants.js +1 -0
- package/lib/domain/model/fee/BaseFeeLineDecorator.d.ts +1 -0
- package/lib/domain/model/fee/BaseFeeLineDecorator.js +4 -0
- package/lib/domain/model/fee/FeeLine.d.ts +3 -0
- package/lib/domain/model/fee/FeeLine.js +13 -0
- package/lib/domain/model/fee/IFeeLine.d.ts +2 -0
- package/lib/domain/model/item/BaseItemLineDecorator.d.ts +1 -0
- package/lib/domain/model/item/BaseItemLineDecorator.js +4 -0
- package/lib/domain/model/item/IItemLine.d.ts +2 -0
- package/lib/domain/model/item/ItemLine.d.ts +3 -0
- package/lib/domain/model/item/ItemLine.js +14 -0
- package/package.json +1 -1
|
@@ -600,6 +600,7 @@ export declare enum CollectedDataKey {
|
|
|
600
600
|
OriginalEmployeeCustomer = "originalEmployeeCustomer",
|
|
601
601
|
OriginalPriceOverride = "originalPriceOverride",
|
|
602
602
|
OriginalComments = "originalComments",
|
|
603
|
+
TaxIndicatorOnReceipt = "taxIndicatorOnReceipt",
|
|
603
604
|
OriginalLoyaltyInformation = "originalLoyaltyInformation",
|
|
604
605
|
OriginalCompetitivePriceInformation = "originalCompetitivePriceInformation",
|
|
605
606
|
OriginalSupervisorOverrideInformation = "originalSupervisorOverrideInformation",
|
|
@@ -609,6 +609,7 @@ var CollectedDataKey;
|
|
|
609
609
|
CollectedDataKey["OriginalEmployeeCustomer"] = "originalEmployeeCustomer";
|
|
610
610
|
CollectedDataKey["OriginalPriceOverride"] = "originalPriceOverride";
|
|
611
611
|
CollectedDataKey["OriginalComments"] = "originalComments";
|
|
612
|
+
CollectedDataKey["TaxIndicatorOnReceipt"] = "taxIndicatorOnReceipt";
|
|
612
613
|
CollectedDataKey["OriginalLoyaltyInformation"] = "originalLoyaltyInformation";
|
|
613
614
|
CollectedDataKey["OriginalCompetitivePriceInformation"] = "originalCompetitivePriceInformation";
|
|
614
615
|
CollectedDataKey["OriginalSupervisorOverrideInformation"] = "originalSupervisorOverrideInformation";
|
|
@@ -14,6 +14,7 @@ export declare abstract class BaseFeeLineDecorator extends BaseLineDecorator<IFe
|
|
|
14
14
|
setTaxationSourceIndicator(calculationSource: SourceIndicator, dataSource: SourceIndicator): IFeeLine;
|
|
15
15
|
setTaxExemptInformation(taxExemptLine: TransactionTaxExemptLine, preTaxExemptDetails: IAppliedTax[]): IFeeLine;
|
|
16
16
|
setTaxOverrideInformation(taxOverrideLine: TaxOverrideLine, preTaxOverrideDetails: ITaxByTaxRule[]): IFeeLine;
|
|
17
|
+
setTaxIndicatorOnReceipt(taxIndicatorOnReceipt: string): IFeeLine;
|
|
17
18
|
get quantity(): Quantity;
|
|
18
19
|
get unitPrice(): Price;
|
|
19
20
|
get feeType(): FeeType;
|
|
@@ -35,6 +35,10 @@ class BaseFeeLineDecorator extends BaseLineDecorator_1.BaseLineDecorator {
|
|
|
35
35
|
const feeLine = this.decoratedTransactionLine.setTaxOverrideInformation(taxOverrideLine, preTaxOverrideDetails);
|
|
36
36
|
return this.updateDecoratedTransactionLine(feeLine);
|
|
37
37
|
}
|
|
38
|
+
setTaxIndicatorOnReceipt(taxIndicatorOnReceipt) {
|
|
39
|
+
let feeLine = this.decoratedTransactionLine.setTaxIndicatorOnReceipt(taxIndicatorOnReceipt);
|
|
40
|
+
return this.updateDecoratedTransactionLine(feeLine);
|
|
41
|
+
}
|
|
38
42
|
get quantity() {
|
|
39
43
|
return this.decoratedTransactionLine.quantity;
|
|
40
44
|
}
|
|
@@ -57,6 +57,7 @@ export declare class FeeLine extends BaseTransactionLine implements IFeeLine, IC
|
|
|
57
57
|
private _sublineIndexFromReturnCanonicalTransaction?;
|
|
58
58
|
private _lineNumberFromReturnTransaction?;
|
|
59
59
|
private _originalTaxOverride?;
|
|
60
|
+
private _taxIndicatorOnReceipt?;
|
|
60
61
|
static isPickupFulfilmentTransaction?: boolean;
|
|
61
62
|
/**
|
|
62
63
|
* The create method is called by the transaction line factory to create an instance and initialize it from the
|
|
@@ -79,6 +80,7 @@ export declare class FeeLine extends BaseTransactionLine implements IFeeLine, IC
|
|
|
79
80
|
get feesByFulfillmentGroup(): IFulfillmentGroupFee[];
|
|
80
81
|
get fulfillmentGroupIds(): string[];
|
|
81
82
|
get originalTaxOverride(): ITaxOverrideDetails;
|
|
83
|
+
get taxIndicatorOnReceipt(): string;
|
|
82
84
|
get feeType(): FeeType;
|
|
83
85
|
get feeId(): string;
|
|
84
86
|
get couldAffectPricing(): boolean;
|
|
@@ -155,6 +157,7 @@ export declare class FeeLine extends BaseTransactionLine implements IFeeLine, IC
|
|
|
155
157
|
setItemLineReference(itemLineReference: ISameTransactionLineReference): IFeeLine;
|
|
156
158
|
setPricingSourceIndicator(calculationSourceIndicator?: SourceIndicator, dataSourceIndicator?: SourceIndicator): IFeeLine;
|
|
157
159
|
setTaxationSourceIndicator(calculationSourceIndicator?: SourceIndicator, dataSourceIndicator?: SourceIndicator): IFeeLine;
|
|
160
|
+
setTaxIndicatorOnReceipt(taxIndicatorOnReceipt: string): FeeLine;
|
|
158
161
|
setTaxExemptInformation(taxExemptLine: ItemTaxExemptLine | TransactionTaxExemptLine, preTaxExemptDetails: IAppliedTax[]): IFeeLine;
|
|
159
162
|
setTaxOverrideInformation(taxOverrideLine: TaxOverrideLine, preTaxOverrideDetails: ITaxByTaxRule[]): IFeeLine;
|
|
160
163
|
setTransactionLineTaxes(transactionLineTaxes: ITransactionLineTaxes, extendedAmount?: Money): IFeeLine;
|
|
@@ -86,6 +86,9 @@ class FeeLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
|
86
86
|
get originalTaxOverride() {
|
|
87
87
|
return this._originalTaxOverride;
|
|
88
88
|
}
|
|
89
|
+
get taxIndicatorOnReceipt() {
|
|
90
|
+
return this._taxIndicatorOnReceipt;
|
|
91
|
+
}
|
|
89
92
|
get feeType() {
|
|
90
93
|
return this._feeType;
|
|
91
94
|
}
|
|
@@ -325,6 +328,11 @@ class FeeLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
|
325
328
|
}
|
|
326
329
|
return newLine;
|
|
327
330
|
}
|
|
331
|
+
setTaxIndicatorOnReceipt(taxIndicatorOnReceipt) {
|
|
332
|
+
const newLine = this.clone();
|
|
333
|
+
newLine._taxIndicatorOnReceipt = taxIndicatorOnReceipt;
|
|
334
|
+
return newLine;
|
|
335
|
+
}
|
|
328
336
|
setTaxExemptInformation(taxExemptLine, preTaxExemptDetails) {
|
|
329
337
|
var _a;
|
|
330
338
|
const newLine = this.clone();
|
|
@@ -424,6 +432,7 @@ class FeeLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
|
424
432
|
this._sublineIndexFromReturnCanonicalTransaction;
|
|
425
433
|
newTransactionFeeLine._lineNumberFromReturnTransaction = this._lineNumberFromReturnTransaction;
|
|
426
434
|
newTransactionFeeLine._originalTaxOverride = this._originalTaxOverride;
|
|
435
|
+
newTransactionFeeLine._taxIndicatorOnReceipt = this._taxIndicatorOnReceipt;
|
|
427
436
|
return newTransactionFeeLine;
|
|
428
437
|
}
|
|
429
438
|
newTransactionLine() {
|
|
@@ -484,6 +493,7 @@ class FeeLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
|
484
493
|
this._sublineIndexFromReturnCanonicalTransaction =
|
|
485
494
|
transactionLineJsonObj._sublineIndexFromReturnCanonicalTransaction;
|
|
486
495
|
this._originalTaxOverride = transactionLineJsonObj._originalTaxOverride;
|
|
496
|
+
this._taxIndicatorOnReceipt = transactionLineJsonObj._taxIndicatorOnReceipt;
|
|
487
497
|
this.loadTaxInformation(transactionLineJsonObj);
|
|
488
498
|
if (!this._fulfillmentGroupIds && transactionLineJsonObj._fulfillmentGroupIds) {
|
|
489
499
|
this._fulfillmentGroupIds = transactionLineJsonObj._fulfillmentGroupIds;
|
|
@@ -609,6 +619,9 @@ class FeeLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
|
609
619
|
this._preTaxOverrideDetails = originalTaxOverride.preTaxOverrideDetails;
|
|
610
620
|
}
|
|
611
621
|
}
|
|
622
|
+
if (collectedData.has(Constants_1.CollectedDataKey.TaxIndicatorOnReceipt)) {
|
|
623
|
+
this._taxIndicatorOnReceipt = collectedData.get(Constants_1.CollectedDataKey.TaxIndicatorOnReceipt);
|
|
624
|
+
}
|
|
612
625
|
if (collectedData.has(Constants_1.CollectedDataKey.SublineIndexFromReturnItem)) {
|
|
613
626
|
this._sublineIndexFromReturnCanonicalTransaction = collectedData.get(Constants_1.CollectedDataKey.SublineIndexFromReturnItem);
|
|
614
627
|
}
|
|
@@ -65,12 +65,14 @@ export interface IFeeLine extends ITransactionLine, IVoidableLine {
|
|
|
65
65
|
*/
|
|
66
66
|
readonly lineNumberFromReturnTransaction?: number;
|
|
67
67
|
readonly unitAmountBeforeOverride?: Money;
|
|
68
|
+
readonly taxIndicatorOnReceipt?: string;
|
|
68
69
|
setTransactionLineTaxes(transactionLineTaxes: ITransactionLineTaxes, extendedAmount?: Money): IFeeLine;
|
|
69
70
|
setSublines(sublines: IFeeSubline[]): IFeeLine;
|
|
70
71
|
setTaxExemptInformation(taxExemptLine: ItemTaxExemptLine | TransactionTaxExemptLine, preTaxExemptDetails: IAppliedTax[]): IFeeLine;
|
|
71
72
|
setTaxOverrideInformation(taxOverrideLine: TaxOverrideLine, preTaxOverrideDetails: ITaxByTaxRule[]): IFeeLine;
|
|
72
73
|
setTaxationSourceIndicator(calculationSourceIndicator?: SourceIndicator, dataSourceIndicator?: SourceIndicator): IFeeLine;
|
|
73
74
|
setPricingSourceIndicator(calculationSourceIndicator?: SourceIndicator, dataSourceIndicator?: SourceIndicator): IFeeLine;
|
|
75
|
+
setTaxIndicatorOnReceipt(taxIndicatorOnReceipt: string): IFeeLine;
|
|
74
76
|
}
|
|
75
77
|
/**
|
|
76
78
|
* @deprecated This will no longer be used in the future. Use the direct line instead. DSS-17031
|
|
@@ -143,6 +143,7 @@ export declare abstract class BaseItemLineDecorator extends BaseLineDecorator<II
|
|
|
143
143
|
setSupervisorOverrideLineReference(supervisorOverrideLineReference: ITransactionLineReferenceType): IItemLine;
|
|
144
144
|
setSecurityAuthorizationStatus(value: SecurityAuthorizationStatusType): IItemLine;
|
|
145
145
|
setExtendedRegularAmount(amount?: Money): IItemLine;
|
|
146
|
+
setTaxIndicatorOnReceipt(taxIndicatorOnReceipt: string): IItemLine;
|
|
146
147
|
protected constructor(lineSavings: Money, lineDecoratorType: string, decoratedTransactionLine: IItemLine, annotationDescription: string, annotationSourceType: string, annotationSourceLineNumber?: number);
|
|
147
148
|
protected clone(): BaseItemLineDecorator;
|
|
148
149
|
}
|
|
@@ -390,6 +390,10 @@ class BaseItemLineDecorator extends BaseLineDecorator_1.BaseLineDecorator {
|
|
|
390
390
|
let itemLine = this.decoratedTransactionLine.setExtendedRegularAmount(amount);
|
|
391
391
|
return this.updateDecoratedTransactionLine(itemLine);
|
|
392
392
|
}
|
|
393
|
+
setTaxIndicatorOnReceipt(taxIndicatorOnReceipt) {
|
|
394
|
+
let itemLine = this.decoratedTransactionLine.setTaxIndicatorOnReceipt(taxIndicatorOnReceipt);
|
|
395
|
+
return this.updateDecoratedTransactionLine(itemLine);
|
|
396
|
+
}
|
|
393
397
|
clone() {
|
|
394
398
|
const newBaseItemLineDecorator = super.clone();
|
|
395
399
|
newBaseItemLineDecorator._lineSavings = this._lineSavings;
|
|
@@ -178,6 +178,7 @@ export interface IItemLine extends ITransactionLine, IVoidableLine, IPriceProvid
|
|
|
178
178
|
* For items returned via returnWithTransaction, the comments from the original transaction.
|
|
179
179
|
*/
|
|
180
180
|
readonly originalComments?: string[];
|
|
181
|
+
readonly taxIndicatorOnReceipt?: string;
|
|
181
182
|
/**
|
|
182
183
|
* For items returned via returnWithTransaction, the price override from the original transaction.
|
|
183
184
|
*/
|
|
@@ -261,6 +262,7 @@ export interface IItemLine extends ITransactionLine, IVoidableLine, IPriceProvid
|
|
|
261
262
|
setPricingSourceIndicator(calculationSourceIndicator?: SourceIndicator, dataSourceIndicator?: SourceIndicator): IItemLine;
|
|
262
263
|
setTaxationSourceIndicator(calculationSourceIndicator?: SourceIndicator, dataSourceIndicator?: SourceIndicator): IItemLine;
|
|
263
264
|
setExtendedRegularAmount(amount?: Money): IItemLine;
|
|
265
|
+
setTaxIndicatorOnReceipt(taxIndicatorOnReceipt: string): IItemLine;
|
|
264
266
|
}
|
|
265
267
|
export interface ITransactionLineTaxes {
|
|
266
268
|
taxByAuthority: IAppliedTax[];
|
|
@@ -108,6 +108,7 @@ export declare class ItemLine extends BaseTransactionLine implements IItemLine,
|
|
|
108
108
|
private _originalRedemptionLoyaltyTransactionKeys?;
|
|
109
109
|
private _originalSaleLoyaltyTransactionKeys?;
|
|
110
110
|
private _originalDiscountReason?;
|
|
111
|
+
private _taxIndicatorOnReceipt?;
|
|
111
112
|
/**
|
|
112
113
|
* The create method is called by the transaction line factory to create an instance and initialize it from the
|
|
113
114
|
* data collected during the qualification process.
|
|
@@ -228,6 +229,7 @@ export declare class ItemLine extends BaseTransactionLine implements IItemLine,
|
|
|
228
229
|
get originalCompetitivePriceInformation(): IOriginalCompetitivePriceInformation;
|
|
229
230
|
get originalSupervisorOverrideInformation(): IOriginalSupervisorOverrideInformation[];
|
|
230
231
|
get originalComments(): string[];
|
|
232
|
+
get taxIndicatorOnReceipt(): string;
|
|
231
233
|
get originalTaxOverride(): ITaxOverrideDetails;
|
|
232
234
|
get originalAdjustments(): ISublinePricingAdjustmentWithSource[];
|
|
233
235
|
get eligibleForSubscription(): boolean;
|
|
@@ -266,6 +268,7 @@ export declare class ItemLine extends BaseTransactionLine implements IItemLine,
|
|
|
266
268
|
updateExtendedAmountIncludingTax(amount: Money): ITransactionLine;
|
|
267
269
|
updateUnitPrice(price: Price, unitPriceSourceIndicator?: UnitPriceSourceIndicator): ItemLine;
|
|
268
270
|
setPricingSourceIndicator(calculationSourceIndicator?: SourceIndicator, dataSourceIndicator?: SourceIndicator): ItemLine;
|
|
271
|
+
setTaxIndicatorOnReceipt(taxIndicatorOnReceipt: string): ItemLine;
|
|
269
272
|
setTaxationSourceIndicator(calculationSourceIndicator?: SourceIndicator, dataSourceIndicator?: SourceIndicator): ItemLine;
|
|
270
273
|
setTransactionLineTaxes(transactionLineTaxes: ITransactionLineTaxes, extendedAmount?: Money): IItemLine;
|
|
271
274
|
setSublines(sublines: IItemSubline[]): IItemLine;
|
|
@@ -158,6 +158,7 @@ class ItemLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
|
158
158
|
const originalExtendedPrice = collectedData.get(Constants_1.CollectedDataKey.OriginalExtendedAmount);
|
|
159
159
|
const originalPriceOverride = collectedData.get(Constants_1.CollectedDataKey.OriginalPriceOverride);
|
|
160
160
|
const originalComments = collectedData.get(Constants_1.CollectedDataKey.OriginalComments);
|
|
161
|
+
const taxIndicatorOnReceipt = collectedData.get(Constants_1.CollectedDataKey.TaxIndicatorOnReceipt);
|
|
161
162
|
const originalLoyaltyInformation = collectedData.get(Constants_1.CollectedDataKey.OriginalLoyaltyInformation);
|
|
162
163
|
const originalCompetitivePriceInformation = collectedData.get(Constants_1.CollectedDataKey.OriginalCompetitivePriceInformation);
|
|
163
164
|
const originalSupervisorOverrideInformation = collectedData.get(Constants_1.CollectedDataKey.OriginalSupervisorOverrideInformation);
|
|
@@ -186,6 +187,9 @@ class ItemLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
|
186
187
|
if (originalComments) {
|
|
187
188
|
itemLine._originalComments = originalComments;
|
|
188
189
|
}
|
|
190
|
+
if (taxIndicatorOnReceipt) {
|
|
191
|
+
itemLine._taxIndicatorOnReceipt = taxIndicatorOnReceipt;
|
|
192
|
+
}
|
|
189
193
|
if (((_d = originalLoyaltyInformation) === null || _d === void 0 ? void 0 : _d.length) > 0) {
|
|
190
194
|
itemLine._originalLoyaltyInformation = originalLoyaltyInformation;
|
|
191
195
|
}
|
|
@@ -581,6 +585,9 @@ class ItemLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
|
581
585
|
get originalComments() {
|
|
582
586
|
return this._originalComments;
|
|
583
587
|
}
|
|
588
|
+
get taxIndicatorOnReceipt() {
|
|
589
|
+
return this._taxIndicatorOnReceipt;
|
|
590
|
+
}
|
|
584
591
|
get originalTaxOverride() {
|
|
585
592
|
return this._originalTaxOverride;
|
|
586
593
|
}
|
|
@@ -719,6 +726,11 @@ class ItemLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
|
719
726
|
}
|
|
720
727
|
return newLine;
|
|
721
728
|
}
|
|
729
|
+
setTaxIndicatorOnReceipt(taxIndicatorOnReceipt) {
|
|
730
|
+
const newLine = this.clone();
|
|
731
|
+
newLine._taxIndicatorOnReceipt = taxIndicatorOnReceipt;
|
|
732
|
+
return newLine;
|
|
733
|
+
}
|
|
722
734
|
setTaxationSourceIndicator(calculationSourceIndicator, dataSourceIndicator) {
|
|
723
735
|
const newLine = this.clone();
|
|
724
736
|
if (calculationSourceIndicator) {
|
|
@@ -894,6 +906,7 @@ class ItemLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
|
894
906
|
newItemLine._originalCompetitivePriceInformation = this._originalCompetitivePriceInformation;
|
|
895
907
|
newItemLine._originalSupervisorOverrideInformation = this._originalSupervisorOverrideInformation;
|
|
896
908
|
newItemLine._originalComments = this._originalComments;
|
|
909
|
+
newItemLine._taxIndicatorOnReceipt = this._taxIndicatorOnReceipt;
|
|
897
910
|
newItemLine._originalTaxOverride = this._originalTaxOverride;
|
|
898
911
|
newItemLine._prepaidAmount = this._prepaidAmount;
|
|
899
912
|
newItemLine._prepaidTaxAmount = this._prepaidTaxAmount;
|
|
@@ -976,6 +989,7 @@ class ItemLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
|
976
989
|
this._originalSupervisorOverrideInformation =
|
|
977
990
|
transactionLineJsonObj._originalSupervisorOverrideInformation;
|
|
978
991
|
this._originalComments = transactionLineJsonObj._originalComments;
|
|
992
|
+
this._taxIndicatorOnReceipt = transactionLineJsonObj._taxIndicatorOnReceipt;
|
|
979
993
|
this._originalTaxOverride = transactionLineJsonObj._originalTaxOverride;
|
|
980
994
|
this._lineNumberFromReturnCanonicalTransaction =
|
|
981
995
|
transactionLineJsonObj._lineNumberFromReturnCanonicalTransaction;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aptos-scp/scp-component-store-selling-features-domain-model",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.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",
|