@aptos-scp/scp-component-store-selling-features-domain-model 1.16.0 → 1.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/domain/model/Constants.d.ts +8 -0
- package/lib/domain/model/Constants.js +8 -0
- package/lib/domain/model/fee/FeeLine.js +4 -3
- package/lib/domain/model/item/ItemLine.js +3 -1
- package/lib/domain/model/taxExempt/BaseTaxExemptLine.d.ts +8 -6
- package/lib/domain/model/taxExempt/BaseTaxExemptLine.js +15 -9
- package/lib/domain/model/taxExempt/BaseTaxExemptLineDecorator.d.ts +3 -1
- package/lib/domain/model/taxExempt/BaseTaxExemptLineDecorator.js +10 -2
- package/lib/domain/model/taxExempt/ITaxExemptLine.d.ts +3 -3
- package/lib/domain/model/taxExempt/ItemTaxExemptLine.d.ts +2 -2
- package/lib/domain/model/taxExempt/ItemTaxExemptLine.js +7 -7
- package/lib/domain/model/taxExempt/ItemTaxExemptLineModificationDecorator.d.ts +4 -3
- package/lib/domain/model/taxExempt/ItemTaxExemptLineModificationDecorator.js +10 -7
- package/lib/domain/model/taxExempt/ModifyItemTaxExemptLine.d.ts +2 -2
- package/lib/domain/model/taxExempt/ModifyItemTaxExemptLine.js +7 -7
- package/lib/domain/model/taxExempt/ModifyTransactionTaxExemptLine.d.ts +2 -2
- package/lib/domain/model/taxExempt/ModifyTransactionTaxExemptLine.js +7 -7
- package/lib/domain/model/taxExempt/TransactionTaxExemptLine.d.ts +2 -2
- package/lib/domain/model/taxExempt/TransactionTaxExemptLine.js +7 -7
- package/lib/domain/model/taxExempt/TransactionTaxExemptLineModificationDecorator.d.ts +4 -3
- package/lib/domain/model/taxExempt/TransactionTaxExemptLineModificationDecorator.js +10 -7
- package/package.json +3 -3
|
@@ -273,7 +273,11 @@ export declare enum UiInputKey {
|
|
|
273
273
|
SUSPEND_TRANSACTION_RESUME_TOKEN = "input_suspendResumeToken",
|
|
274
274
|
SUBSCRIPTION_PAYMENT_TENDER_LINE = "input_subscriptionInputTenderLine",
|
|
275
275
|
TAX_CUSTOMER = "input_taxCustomer",
|
|
276
|
+
/**
|
|
277
|
+
* @deprecated TAX_EXEMPT_CERTIFICATE_ID will be removed in future releases, use TAX_EXEMPT_CERTIFICATE instead
|
|
278
|
+
*/
|
|
276
279
|
TAX_EXEMPT_CERTIFICATE_ID = "input_taxExemptCertificateId",
|
|
280
|
+
TAX_EXEMPT_CERTIFICATE = "input_taxExemptCertificate",
|
|
277
281
|
TAX_EXEMPT_LINE_NUMBER = "input_taxExemptLineNumber",
|
|
278
282
|
TAX_EXEMPT_TYPE = "input_taxExemptType",
|
|
279
283
|
TAX_EXEMPT_CERTIFICATES = "input_tax_exempt_certificates",
|
|
@@ -447,7 +451,11 @@ export declare enum CollectedDataKey {
|
|
|
447
451
|
CashDrawerStatus = "CashDrawerStatus",
|
|
448
452
|
CashDrawerStatusChangeSuccess = "cashDrawerStatusChangeSuccess",
|
|
449
453
|
CashDrawerRequestType = "cashDrawerRequestType",
|
|
454
|
+
/**
|
|
455
|
+
* @deprecated CertificateId will be removed in future releases, use Certificate instead
|
|
456
|
+
*/
|
|
450
457
|
CertificateId = "CertificateId",
|
|
458
|
+
Certificate = "Certificate",
|
|
451
459
|
CustomFeeType = "CustomFeeType",
|
|
452
460
|
Comment = "comment",
|
|
453
461
|
Contact = "contact",
|
|
@@ -276,7 +276,11 @@ var UiInputKey;
|
|
|
276
276
|
UiInputKey["SUSPEND_TRANSACTION_RESUME_TOKEN"] = "input_suspendResumeToken";
|
|
277
277
|
UiInputKey["SUBSCRIPTION_PAYMENT_TENDER_LINE"] = "input_subscriptionInputTenderLine";
|
|
278
278
|
UiInputKey["TAX_CUSTOMER"] = "input_taxCustomer";
|
|
279
|
+
/**
|
|
280
|
+
* @deprecated TAX_EXEMPT_CERTIFICATE_ID will be removed in future releases, use TAX_EXEMPT_CERTIFICATE instead
|
|
281
|
+
*/
|
|
279
282
|
UiInputKey["TAX_EXEMPT_CERTIFICATE_ID"] = "input_taxExemptCertificateId";
|
|
283
|
+
UiInputKey["TAX_EXEMPT_CERTIFICATE"] = "input_taxExemptCertificate";
|
|
280
284
|
UiInputKey["TAX_EXEMPT_LINE_NUMBER"] = "input_taxExemptLineNumber";
|
|
281
285
|
UiInputKey["TAX_EXEMPT_TYPE"] = "input_taxExemptType";
|
|
282
286
|
UiInputKey["TAX_EXEMPT_CERTIFICATES"] = "input_tax_exempt_certificates";
|
|
@@ -456,7 +460,11 @@ var CollectedDataKey;
|
|
|
456
460
|
CollectedDataKey["CashDrawerStatus"] = "CashDrawerStatus";
|
|
457
461
|
CollectedDataKey["CashDrawerStatusChangeSuccess"] = "cashDrawerStatusChangeSuccess";
|
|
458
462
|
CollectedDataKey["CashDrawerRequestType"] = "cashDrawerRequestType";
|
|
463
|
+
/**
|
|
464
|
+
* @deprecated CertificateId will be removed in future releases, use Certificate instead
|
|
465
|
+
*/
|
|
459
466
|
CollectedDataKey["CertificateId"] = "CertificateId";
|
|
467
|
+
CollectedDataKey["Certificate"] = "Certificate";
|
|
460
468
|
CollectedDataKey["CustomFeeType"] = "CustomFeeType";
|
|
461
469
|
CollectedDataKey["Comment"] = "comment";
|
|
462
470
|
CollectedDataKey["Contact"] = "contact";
|
|
@@ -336,7 +336,7 @@ class FeeLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
|
336
336
|
return newLine;
|
|
337
337
|
}
|
|
338
338
|
setTaxExemptInformation(taxExemptLine, preTaxExemptDetails) {
|
|
339
|
-
var _a;
|
|
339
|
+
var _a, _b;
|
|
340
340
|
const newLine = this.clone();
|
|
341
341
|
if (taxExemptLine) {
|
|
342
342
|
newLine._taxExempt = {
|
|
@@ -345,7 +345,8 @@ class FeeLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
|
345
345
|
reasonCode: taxExemptLine.reasonCode,
|
|
346
346
|
reasonDescription: taxExemptLine.reasonDescription,
|
|
347
347
|
reasonListType: taxExemptLine.reasonListType,
|
|
348
|
-
certificateId: taxExemptLine.certificateId,
|
|
348
|
+
certificateId: (_a = taxExemptLine.certificate) === null || _a === void 0 ? void 0 : _a.certificateId,
|
|
349
|
+
certificate: taxExemptLine.certificate,
|
|
349
350
|
};
|
|
350
351
|
newLine._taxExemptDisplayName = taxExemptLine.displayName;
|
|
351
352
|
}
|
|
@@ -353,7 +354,7 @@ class FeeLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
|
353
354
|
newLine._taxExempt = undefined;
|
|
354
355
|
newLine._taxExemptDisplayName = undefined;
|
|
355
356
|
}
|
|
356
|
-
newLine._preTaxExemptDetails = ((
|
|
357
|
+
newLine._preTaxExemptDetails = ((_b = preTaxExemptDetails) === null || _b === void 0 ? void 0 : _b.length) > 0 ? preTaxExemptDetails : undefined;
|
|
357
358
|
return newLine;
|
|
358
359
|
}
|
|
359
360
|
setTaxOverrideInformation(taxOverrideLine, preTaxOverrideDetails) {
|
|
@@ -753,6 +753,7 @@ class ItemLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
|
753
753
|
return newLine;
|
|
754
754
|
}
|
|
755
755
|
setTaxExemptInformation(taxExemptLine, preTaxExemptDetails) {
|
|
756
|
+
var _a;
|
|
756
757
|
const newLine = this.clone();
|
|
757
758
|
if (taxExemptLine) {
|
|
758
759
|
newLine._taxExempt = {
|
|
@@ -761,7 +762,8 @@ class ItemLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
|
761
762
|
reasonCode: taxExemptLine.reasonCode,
|
|
762
763
|
reasonDescription: taxExemptLine.reasonDescription,
|
|
763
764
|
reasonListType: taxExemptLine.reasonListType,
|
|
764
|
-
certificateId: taxExemptLine.certificateId,
|
|
765
|
+
certificateId: (_a = taxExemptLine.certificate) === null || _a === void 0 ? void 0 : _a.certificateId,
|
|
766
|
+
certificate: taxExemptLine.certificate,
|
|
765
767
|
presetRateExemption: taxExemptLine.presetRateExemption,
|
|
766
768
|
presetExemptionCategory: taxExemptLine.presetRateExemption
|
|
767
769
|
? taxExemptLine.presetExemptionCategory
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { ITaxAuthorityForExemption, ITransactionLineReferenceType, TaxExemptType } from "@aptos-scp/scp-types-commerce-transaction";
|
|
1
|
+
import { ITaxAuthorityForExemption, ITaxExemptCertificate, ITransactionLineReferenceType, TaxExemptType } from "@aptos-scp/scp-types-commerce-transaction";
|
|
2
2
|
import { BaseTransactionLine } from "../BaseTransactionLine";
|
|
3
3
|
import { VoidSource } from "../Constants";
|
|
4
4
|
import { ITaxExemptLine } from "./ITaxExemptLine";
|
|
5
5
|
export declare abstract class BaseTaxExemptLine extends BaseTransactionLine implements ITaxExemptLine {
|
|
6
6
|
protected _taxExemptType: TaxExemptType;
|
|
7
|
-
protected
|
|
7
|
+
protected _certificate: ITaxExemptCertificate;
|
|
8
8
|
protected _reasonCode: string;
|
|
9
9
|
protected _reasonDescription: string;
|
|
10
|
-
protected
|
|
10
|
+
protected _originalCertificate: ITaxExemptCertificate;
|
|
11
11
|
protected _originalReasonCode: string;
|
|
12
12
|
protected _originalReasonDescription: string;
|
|
13
13
|
protected _reasonListType: string;
|
|
@@ -23,9 +23,11 @@ export declare abstract class BaseTaxExemptLine extends BaseTransactionLine impl
|
|
|
23
23
|
protected _certificateAttachmentLineReference?: ITransactionLineReferenceType;
|
|
24
24
|
get taxExemptType(): TaxExemptType;
|
|
25
25
|
get certificateId(): string;
|
|
26
|
+
get certificate(): ITaxExemptCertificate;
|
|
26
27
|
get reasonCode(): string;
|
|
27
28
|
get reasonDescription(): string;
|
|
28
29
|
get originalCertificateId(): string;
|
|
30
|
+
get originalCertificate(): ITaxExemptCertificate;
|
|
29
31
|
get originalReasonCode(): string;
|
|
30
32
|
get originalReasonDescription(): string;
|
|
31
33
|
get reasonListType(): string;
|
|
@@ -46,9 +48,9 @@ export declare abstract class BaseTaxExemptLine extends BaseTransactionLine impl
|
|
|
46
48
|
get presetExemptionRate(): string;
|
|
47
49
|
static taxExemptTypeFromJsonObject(transactionLineJsonObj: any): TaxExemptType;
|
|
48
50
|
static taxExemptTypeFromCollectedData(collectedData: Readonly<Map<string, any>>): TaxExemptType;
|
|
49
|
-
static
|
|
50
|
-
static
|
|
51
|
-
protected constructor(lineNumber: number, lineType: string, taxExemptType: TaxExemptType,
|
|
51
|
+
static certificateFromJsonObject(transactionLineJsonObj: any): ITaxExemptCertificate;
|
|
52
|
+
static certificateFromCollectedData(collectedData: Readonly<Map<string, any>>): ITaxExemptCertificate;
|
|
53
|
+
protected constructor(lineNumber: number, lineType: string, taxExemptType: TaxExemptType, certificate: ITaxExemptCertificate, reasonCode?: string, reasonDescription?: string, reasonType?: string, supervisorOverrideLineReference?: ITransactionLineReferenceType, displayName?: string, exemptedTaxAuthorities?: ITaxAuthorityForExemption[], exemptedItemLineReferences?: ITransactionLineReferenceType[], presetRateExemption?: boolean, presetExemptionCategory?: string, presetExemptionRate?: string, originalCertificate?: ITaxExemptCertificate, originalReasonCode?: string, originalReasonDescription?: string, originalDisplayName?: string, originalExemptedTaxAuthorities?: ITaxAuthorityForExemption[], certificateAttachmentLineReference?: ITransactionLineReferenceType);
|
|
52
54
|
protected loadFromJsonObject(transactionLineJsonObj: any): void;
|
|
53
55
|
protected loadFromCollectedData(collectedData: Readonly<Map<string, any>>): void;
|
|
54
56
|
private loadOriginalInfo;
|
|
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const BaseTransactionLine_1 = require("../BaseTransactionLine");
|
|
4
4
|
const Constants_1 = require("../Constants");
|
|
5
5
|
class BaseTaxExemptLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
6
|
-
constructor(lineNumber, lineType, taxExemptType,
|
|
6
|
+
constructor(lineNumber, lineType, taxExemptType, certificate, reasonCode, reasonDescription, reasonType, supervisorOverrideLineReference, displayName, exemptedTaxAuthorities, exemptedItemLineReferences, presetRateExemption, presetExemptionCategory, presetExemptionRate, originalCertificate, originalReasonCode, originalReasonDescription, originalDisplayName, originalExemptedTaxAuthorities, certificateAttachmentLineReference) {
|
|
7
7
|
super(lineNumber, lineType);
|
|
8
8
|
this._taxExemptType = taxExemptType;
|
|
9
|
-
this.
|
|
9
|
+
this._certificate = certificate;
|
|
10
10
|
this._reasonCode = reasonCode;
|
|
11
11
|
this._reasonDescription = reasonDescription;
|
|
12
12
|
this._reasonListType = reasonType;
|
|
@@ -17,7 +17,7 @@ class BaseTaxExemptLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
|
17
17
|
this._presetRateExemption = presetRateExemption;
|
|
18
18
|
this._presetExemptionCategory = presetExemptionCategory;
|
|
19
19
|
this._presetExemptionRate = presetExemptionRate;
|
|
20
|
-
this.
|
|
20
|
+
this._originalCertificate = originalCertificate;
|
|
21
21
|
this._originalReasonCode = originalReasonCode;
|
|
22
22
|
this._originalReasonDescription = originalReasonDescription;
|
|
23
23
|
this._originalDisplayName = originalDisplayName;
|
|
@@ -28,7 +28,10 @@ class BaseTaxExemptLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
|
28
28
|
return this._taxExemptType;
|
|
29
29
|
}
|
|
30
30
|
get certificateId() {
|
|
31
|
-
return this.
|
|
31
|
+
return this._certificate.certificateId;
|
|
32
|
+
}
|
|
33
|
+
get certificate() {
|
|
34
|
+
return this._certificate;
|
|
32
35
|
}
|
|
33
36
|
get reasonCode() {
|
|
34
37
|
return this._reasonCode;
|
|
@@ -37,7 +40,10 @@ class BaseTaxExemptLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
|
37
40
|
return this._reasonDescription;
|
|
38
41
|
}
|
|
39
42
|
get originalCertificateId() {
|
|
40
|
-
return this.
|
|
43
|
+
return this._originalCertificate.certificateId;
|
|
44
|
+
}
|
|
45
|
+
get originalCertificate() {
|
|
46
|
+
return this._originalCertificate;
|
|
41
47
|
}
|
|
42
48
|
get originalReasonCode() {
|
|
43
49
|
return this._originalReasonCode;
|
|
@@ -99,11 +105,11 @@ class BaseTaxExemptLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
|
99
105
|
static taxExemptTypeFromCollectedData(collectedData) {
|
|
100
106
|
return collectedData.get(Constants_1.CollectedDataKey.TaxExemptType);
|
|
101
107
|
}
|
|
102
|
-
static
|
|
103
|
-
return transactionLineJsonObj.
|
|
108
|
+
static certificateFromJsonObject(transactionLineJsonObj) {
|
|
109
|
+
return transactionLineJsonObj._certificate;
|
|
104
110
|
}
|
|
105
|
-
static
|
|
106
|
-
return collectedData.get(Constants_1.CollectedDataKey.
|
|
111
|
+
static certificateFromCollectedData(collectedData) {
|
|
112
|
+
return collectedData.get(Constants_1.CollectedDataKey.Certificate);
|
|
107
113
|
}
|
|
108
114
|
loadFromJsonObject(transactionLineJsonObj) {
|
|
109
115
|
super.loadFromJsonObject(transactionLineJsonObj);
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { ITaxAuthorityForExemption, ITransactionLineReferenceType, TaxExemptType } from "@aptos-scp/scp-types-commerce-transaction";
|
|
1
|
+
import { ITaxAuthorityForExemption, ITaxExemptCertificate, ITransactionLineReferenceType, TaxExemptType } from "@aptos-scp/scp-types-commerce-transaction";
|
|
2
2
|
import { BaseLineDecorator } from "../../model/BaseLineDecorator";
|
|
3
3
|
import { ITaxExemptLine } from "./ITaxExemptLine";
|
|
4
4
|
export declare abstract class BaseTaxExemptLineDecorator extends BaseLineDecorator<ITaxExemptLine> implements ITaxExemptLine {
|
|
5
5
|
get taxExemptType(): TaxExemptType;
|
|
6
6
|
get certificateId(): string;
|
|
7
|
+
get certificate(): ITaxExemptCertificate;
|
|
7
8
|
get couldAffectPricing(): boolean;
|
|
8
9
|
get reasonCode(): string;
|
|
9
10
|
get reasonDescription(): string;
|
|
@@ -11,6 +12,7 @@ export declare abstract class BaseTaxExemptLineDecorator extends BaseLineDecorat
|
|
|
11
12
|
get originalReasonCode(): string;
|
|
12
13
|
get originalReasonDescription(): string;
|
|
13
14
|
get originalCertificateId(): string;
|
|
15
|
+
get originalCertificate(): ITaxExemptCertificate;
|
|
14
16
|
get preventsTransactionVoid(): boolean;
|
|
15
17
|
get allowVoid(): boolean;
|
|
16
18
|
get supervisorOverrideLineReference(): ITransactionLineReferenceType;
|
|
@@ -6,7 +6,11 @@ class BaseTaxExemptLineDecorator extends BaseLineDecorator_1.BaseLineDecorator {
|
|
|
6
6
|
return this.decoratedTransactionLine.taxExemptType;
|
|
7
7
|
}
|
|
8
8
|
get certificateId() {
|
|
9
|
-
|
|
9
|
+
var _a;
|
|
10
|
+
return (_a = this.decoratedTransactionLine.certificate) === null || _a === void 0 ? void 0 : _a.certificateId;
|
|
11
|
+
}
|
|
12
|
+
get certificate() {
|
|
13
|
+
return this.decoratedTransactionLine.certificate;
|
|
10
14
|
}
|
|
11
15
|
get couldAffectPricing() {
|
|
12
16
|
return this.decoratedTransactionLine.couldAffectPricing;
|
|
@@ -27,7 +31,11 @@ class BaseTaxExemptLineDecorator extends BaseLineDecorator_1.BaseLineDecorator {
|
|
|
27
31
|
return this.decoratedTransactionLine.originalReasonDescription;
|
|
28
32
|
}
|
|
29
33
|
get originalCertificateId() {
|
|
30
|
-
|
|
34
|
+
var _a;
|
|
35
|
+
return (_a = this.decoratedTransactionLine.originalCertificate) === null || _a === void 0 ? void 0 : _a.certificateId;
|
|
36
|
+
}
|
|
37
|
+
get originalCertificate() {
|
|
38
|
+
return this.decoratedTransactionLine.originalCertificate;
|
|
31
39
|
}
|
|
32
40
|
get preventsTransactionVoid() {
|
|
33
41
|
return this.decoratedTransactionLine.preventsTransactionVoid;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ITransactionLine } from "@aptos-scp/scp-component-store-selling-core";
|
|
2
|
-
import { ITaxAuthorityForExemption, ITransactionLineReferenceType, TaxExemptType } from "@aptos-scp/scp-types-commerce-transaction";
|
|
2
|
+
import { ITaxAuthorityForExemption, ITaxExemptCertificate, ITransactionLineReferenceType, TaxExemptType } from "@aptos-scp/scp-types-commerce-transaction";
|
|
3
3
|
import { IVoidableLine } from "../VoidInterfaces";
|
|
4
4
|
export interface ITaxExemptLine extends ITransactionLine, IVoidableLine {
|
|
5
5
|
readonly taxExemptType: TaxExemptType;
|
|
6
|
-
readonly
|
|
6
|
+
readonly certificate: ITaxExemptCertificate;
|
|
7
7
|
readonly reasonCode: string;
|
|
8
8
|
readonly reasonDescription: string;
|
|
9
9
|
readonly reasonListType: string;
|
|
10
|
-
readonly
|
|
10
|
+
readonly originalCertificate?: ITaxExemptCertificate;
|
|
11
11
|
readonly originalReasonCode?: string;
|
|
12
12
|
readonly originalReasonDescription?: string;
|
|
13
13
|
readonly supervisorOverrideLineReference: ITransactionLineReferenceType;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ITransactionLine, UiBusinessEvent } from "@aptos-scp/scp-component-store-selling-core";
|
|
2
|
-
import { ITaxAuthorityForExemption, ITransactionLineReferenceType, TaxExemptType } from "@aptos-scp/scp-types-commerce-transaction";
|
|
2
|
+
import { ITaxAuthorityForExemption, ITaxExemptCertificate, ITransactionLineReferenceType, TaxExemptType } from "@aptos-scp/scp-types-commerce-transaction";
|
|
3
3
|
import { BaseTransactionLine } from "../BaseTransactionLine";
|
|
4
4
|
import { BaseTaxExemptLine } from "./BaseTaxExemptLine";
|
|
5
5
|
export declare const ITEM_TAX_EXEMPT_LINE_TYPE = "ItemTaxExempt";
|
|
@@ -17,7 +17,7 @@ export declare class ItemTaxExemptLine extends BaseTaxExemptLine {
|
|
|
17
17
|
*/
|
|
18
18
|
static create(lineNumber: number, lineType: string, uiBusinessEvent: UiBusinessEvent, collectedData: Readonly<Map<string, any>>): ItemTaxExemptLine;
|
|
19
19
|
static createFromJsonObject(transactionLineJsonObj: any): ItemTaxExemptLine;
|
|
20
|
-
protected constructor(lineNumber: number, lineType: string, taxExemptType: TaxExemptType,
|
|
20
|
+
protected constructor(lineNumber: number, lineType: string, taxExemptType: TaxExemptType, certificate: ITaxExemptCertificate, reasonCode?: string, reasonDescription?: string, reasonType?: string, supervisorOverrideLineReference?: ITransactionLineReferenceType, displayName?: string, exemptedTaxAuthorities?: ITaxAuthorityForExemption[], exemptedItemLineReferences?: ITransactionLineReferenceType[], presetRateExemption?: boolean, presetExemptionCategory?: string, presetExemptionRate?: string, certificateAttachmentLineReference?: ITransactionLineReferenceType);
|
|
21
21
|
protected newTransactionLine(): BaseTransactionLine;
|
|
22
22
|
}
|
|
23
23
|
export declare function isItemTaxExemptLine(transactionLine: ITransactionLine): transactionLine is ItemTaxExemptLine;
|
|
@@ -17,8 +17,8 @@ class ItemTaxExemptLine extends BaseTaxExemptLine_1.BaseTaxExemptLine {
|
|
|
17
17
|
*/
|
|
18
18
|
static create(lineNumber, lineType, uiBusinessEvent, collectedData) {
|
|
19
19
|
const taxExemptType = BaseTaxExemptLine_1.BaseTaxExemptLine.taxExemptTypeFromCollectedData(collectedData);
|
|
20
|
-
const
|
|
21
|
-
const taxExemptLine = new ItemTaxExemptLine(lineNumber, lineType, taxExemptType,
|
|
20
|
+
const certificate = BaseTaxExemptLine_1.BaseTaxExemptLine.certificateFromCollectedData(collectedData);
|
|
21
|
+
const taxExemptLine = new ItemTaxExemptLine(lineNumber, lineType, taxExemptType, certificate);
|
|
22
22
|
taxExemptLine.loadFromCollectedData(collectedData);
|
|
23
23
|
return taxExemptLine;
|
|
24
24
|
}
|
|
@@ -26,16 +26,16 @@ class ItemTaxExemptLine extends BaseTaxExemptLine_1.BaseTaxExemptLine {
|
|
|
26
26
|
const lineNumber = BaseTransactionLine_1.BaseTransactionLine.lineNumberFromJsonObject(transactionLineJsonObj);
|
|
27
27
|
const lineType = BaseTransactionLine_1.BaseTransactionLine.lineTypeFromJsonObject(transactionLineJsonObj);
|
|
28
28
|
const taxExemptType = BaseTaxExemptLine_1.BaseTaxExemptLine.taxExemptTypeFromJsonObject(transactionLineJsonObj);
|
|
29
|
-
const
|
|
30
|
-
const taxExemptLine = new ItemTaxExemptLine(lineNumber, lineType, taxExemptType,
|
|
29
|
+
const certificate = BaseTaxExemptLine_1.BaseTaxExemptLine.certificateFromJsonObject(transactionLineJsonObj);
|
|
30
|
+
const taxExemptLine = new ItemTaxExemptLine(lineNumber, lineType, taxExemptType, certificate);
|
|
31
31
|
taxExemptLine.loadFromJsonObject(transactionLineJsonObj);
|
|
32
32
|
return taxExemptLine;
|
|
33
33
|
}
|
|
34
|
-
constructor(lineNumber, lineType, taxExemptType,
|
|
35
|
-
super(lineNumber, lineType, taxExemptType,
|
|
34
|
+
constructor(lineNumber, lineType, taxExemptType, certificate, reasonCode, reasonDescription, reasonType, supervisorOverrideLineReference, displayName, exemptedTaxAuthorities, exemptedItemLineReferences, presetRateExemption, presetExemptionCategory, presetExemptionRate, certificateAttachmentLineReference) {
|
|
35
|
+
super(lineNumber, lineType, taxExemptType, certificate, reasonCode, reasonDescription, reasonType, supervisorOverrideLineReference, displayName, exemptedTaxAuthorities, exemptedItemLineReferences, presetRateExemption, presetExemptionCategory, presetExemptionRate, certificate, reasonCode, reasonDescription, displayName, exemptedTaxAuthorities, certificateAttachmentLineReference);
|
|
36
36
|
}
|
|
37
37
|
newTransactionLine() {
|
|
38
|
-
return new ItemTaxExemptLine(this.lineNumber, this.lineType, this._taxExemptType, this.
|
|
38
|
+
return new ItemTaxExemptLine(this.lineNumber, this.lineType, this._taxExemptType, this._certificate, this._reasonCode, this._reasonDescription, this._reasonListType, this._supervisorOverrideLineReference, this._displayName, this._exemptedTaxAuthorities, this._exemptedItemLineReferences, this._presetRateExemption, this._presetExemptionCategory, this._presetExemptionRate, this._certificateAttachmentLineReference);
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
exports.ItemTaxExemptLine = ItemTaxExemptLine;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ITransactionLine, ITransactionLineFactory } from "@aptos-scp/scp-component-store-selling-core";
|
|
2
|
-
import { ITaxAuthorityForExemption, ITransactionLineReferenceType, TaxExemptType } from "@aptos-scp/scp-types-commerce-transaction";
|
|
2
|
+
import { ITaxAuthorityForExemption, ITaxExemptCertificate, ITransactionLineReferenceType, TaxExemptType } from "@aptos-scp/scp-types-commerce-transaction";
|
|
3
3
|
import { BaseTaxExemptLineDecorator } from "./BaseTaxExemptLineDecorator";
|
|
4
4
|
import { ItemTaxExemptLine } from "./ItemTaxExemptLine";
|
|
5
5
|
export declare const DECORATOR_TYPE_ITEM_TAX_EXEMPT_CHANGE: string;
|
|
6
6
|
export declare function isItemTaxExemptLineModificationDecorator(transactionLine: ITransactionLine): transactionLine is ItemTaxExemptLineModificationDecorator;
|
|
7
7
|
export declare class ItemTaxExemptLineModificationDecorator extends BaseTaxExemptLineDecorator {
|
|
8
8
|
private _newTaxExemptType;
|
|
9
|
-
private
|
|
9
|
+
private _newCertificate;
|
|
10
10
|
private _newReasonCode;
|
|
11
11
|
private _newReasonDescription;
|
|
12
12
|
private _newReasonListType;
|
|
@@ -17,9 +17,10 @@ export declare class ItemTaxExemptLineModificationDecorator extends BaseTaxExemp
|
|
|
17
17
|
private _newPresetExemptionRate?;
|
|
18
18
|
private _newCertificateAttachmentLineReference?;
|
|
19
19
|
static createFromJsonObject(transactionLineJsonObj: any, transactionLineFactory: ITransactionLineFactory): ItemTaxExemptLineModificationDecorator;
|
|
20
|
-
constructor(itemTaxExemptLine: ItemTaxExemptLine, annotationSourceLineNumber: number, newTaxExemptType: TaxExemptType,
|
|
20
|
+
constructor(itemTaxExemptLine: ItemTaxExemptLine, annotationSourceLineNumber: number, newTaxExemptType: TaxExemptType, newCertificate: ITaxExemptCertificate, newReasonCode?: string, newReasonDescription?: string, newReasonListType?: string, newDisplayName?: string, newExemptedTaxAuthorities?: ITaxAuthorityForExemption[], newPresetRateExemption?: boolean, newPresetExemptionCategory?: string, newPresetExemptionRate?: string, newCertificateAttachmentLineReference?: ITransactionLineReferenceType);
|
|
21
21
|
get taxExemptType(): TaxExemptType;
|
|
22
22
|
get certificateId(): string;
|
|
23
|
+
get certificate(): ITaxExemptCertificate;
|
|
23
24
|
get reasonCode(): string;
|
|
24
25
|
get certificateAttachmentLineReference(): ITransactionLineReferenceType;
|
|
25
26
|
get reasonDescription(): string;
|
|
@@ -9,10 +9,10 @@ function isItemTaxExemptLineModificationDecorator(transactionLine) {
|
|
|
9
9
|
}
|
|
10
10
|
exports.isItemTaxExemptLineModificationDecorator = isItemTaxExemptLineModificationDecorator;
|
|
11
11
|
class ItemTaxExemptLineModificationDecorator extends BaseTaxExemptLineDecorator_1.BaseTaxExemptLineDecorator {
|
|
12
|
-
constructor(itemTaxExemptLine, annotationSourceLineNumber, newTaxExemptType,
|
|
12
|
+
constructor(itemTaxExemptLine, annotationSourceLineNumber, newTaxExemptType, newCertificate, newReasonCode, newReasonDescription, newReasonListType, newDisplayName, newExemptedTaxAuthorities, newPresetRateExemption, newPresetExemptionCategory, newPresetExemptionRate, newCertificateAttachmentLineReference) {
|
|
13
13
|
super(exports.DECORATOR_TYPE_ITEM_TAX_EXEMPT_CHANGE, itemTaxExemptLine, undefined, ITEM_TAX_EXEMPT_ANNOTATION_SOURCE_TYPE, annotationSourceLineNumber);
|
|
14
14
|
this._newTaxExemptType = newTaxExemptType;
|
|
15
|
-
this.
|
|
15
|
+
this._newCertificate = newCertificate;
|
|
16
16
|
this._newReasonCode = newReasonCode;
|
|
17
17
|
this._newReasonDescription = newReasonDescription;
|
|
18
18
|
this._newReasonListType = newReasonListType;
|
|
@@ -27,7 +27,7 @@ class ItemTaxExemptLineModificationDecorator extends BaseTaxExemptLineDecorator_
|
|
|
27
27
|
const decoratedTransactionLineJsonObj = BaseTaxExemptLineDecorator_1.BaseTaxExemptLineDecorator.getDecoratedTransactionLineJsonObjectFromJsonObject(transactionLineJsonObj);
|
|
28
28
|
const decoratedItemTaxExemptLine = transactionLineFactory.createTransactionLineFromJsonObj(decoratedTransactionLineJsonObj);
|
|
29
29
|
const newTaxExemptType = transactionLineJsonObj._newTaxExemptType;
|
|
30
|
-
const
|
|
30
|
+
const newCertificate = transactionLineJsonObj._newCertificate;
|
|
31
31
|
const newReasonCode = transactionLineJsonObj._newReasonCode;
|
|
32
32
|
const newReasonDescription = transactionLineJsonObj._newReasonDescription;
|
|
33
33
|
const newReasonListType = transactionLineJsonObj._newReasonListType;
|
|
@@ -38,14 +38,17 @@ class ItemTaxExemptLineModificationDecorator extends BaseTaxExemptLineDecorator_
|
|
|
38
38
|
const newPresetExemptionRate = transactionLineJsonObj._newPresetExemptionRate;
|
|
39
39
|
const newCertificateAttachmentLineReference = transactionLineJsonObj._newCertificateAttachmentLineReference;
|
|
40
40
|
const annotationSourceLineNumber = BaseTaxExemptLineDecorator_1.BaseTaxExemptLineDecorator.getAnnotationSourceLineNumberFromJsonObject(transactionLineJsonObj);
|
|
41
|
-
const itemTaxExemptLineModificationDecorator = new ItemTaxExemptLineModificationDecorator(decoratedItemTaxExemptLine, annotationSourceLineNumber, newTaxExemptType,
|
|
41
|
+
const itemTaxExemptLineModificationDecorator = new ItemTaxExemptLineModificationDecorator(decoratedItemTaxExemptLine, annotationSourceLineNumber, newTaxExemptType, newCertificate, newReasonCode, newReasonDescription, newReasonListType, newDisplayName, newExemptedTaxAuthorities, newPresetRateExemption, newPresetExemptionCategory, newPresetExemptionRate, newCertificateAttachmentLineReference);
|
|
42
42
|
return itemTaxExemptLineModificationDecorator;
|
|
43
43
|
}
|
|
44
44
|
get taxExemptType() {
|
|
45
45
|
return this._newTaxExemptType || this.decoratedTransactionLine.taxExemptType;
|
|
46
46
|
}
|
|
47
47
|
get certificateId() {
|
|
48
|
-
return this.
|
|
48
|
+
return this._newCertificate.certificateId;
|
|
49
|
+
}
|
|
50
|
+
get certificate() {
|
|
51
|
+
return this._newCertificate;
|
|
49
52
|
}
|
|
50
53
|
get reasonCode() {
|
|
51
54
|
return this._newReasonCode || this.decoratedTransactionLine.reasonCode;
|
|
@@ -78,7 +81,7 @@ class ItemTaxExemptLineModificationDecorator extends BaseTaxExemptLineDecorator_
|
|
|
78
81
|
clone() {
|
|
79
82
|
const newItemTaxExemptLineModificationDecorator = super.clone();
|
|
80
83
|
newItemTaxExemptLineModificationDecorator._newTaxExemptType = this._newTaxExemptType;
|
|
81
|
-
newItemTaxExemptLineModificationDecorator.
|
|
84
|
+
newItemTaxExemptLineModificationDecorator._newCertificate = this._newCertificate;
|
|
82
85
|
newItemTaxExemptLineModificationDecorator._newReasonCode = this._newReasonCode;
|
|
83
86
|
newItemTaxExemptLineModificationDecorator._newReasonDescription = this._newReasonDescription;
|
|
84
87
|
newItemTaxExemptLineModificationDecorator._newReasonListType = this._newReasonListType;
|
|
@@ -92,7 +95,7 @@ class ItemTaxExemptLineModificationDecorator extends BaseTaxExemptLineDecorator_
|
|
|
92
95
|
return newItemTaxExemptLineModificationDecorator;
|
|
93
96
|
}
|
|
94
97
|
newTransactionLine() {
|
|
95
|
-
return new ItemTaxExemptLineModificationDecorator(this.decoratedTransactionLine, this.annotationSourceLineNumber, this._newTaxExemptType, this.
|
|
98
|
+
return new ItemTaxExemptLineModificationDecorator(this.decoratedTransactionLine, this.annotationSourceLineNumber, this._newTaxExemptType, this._newCertificate, this._newReasonCode, this._newReasonDescription, this._newReasonListType, this._newDisplayName, this._newExemptedTaxAuthorities, this._newPresetRateExemption, this._newPresetExemptionCategory, this._newPresetExemptionRate, this._newCertificateAttachmentLineReference);
|
|
96
99
|
}
|
|
97
100
|
}
|
|
98
101
|
exports.ItemTaxExemptLineModificationDecorator = ItemTaxExemptLineModificationDecorator;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ITransactionLine, UiBusinessEvent } from "@aptos-scp/scp-component-store-selling-core";
|
|
2
|
-
import { ISameTransactionLineReference, ITaxAuthorityForExemption, ITransactionLineReferenceType, TaxExemptType } from "@aptos-scp/scp-types-commerce-transaction";
|
|
2
|
+
import { ISameTransactionLineReference, ITaxAuthorityForExemption, ITaxExemptCertificate, ITransactionLineReferenceType, TaxExemptType } from "@aptos-scp/scp-types-commerce-transaction";
|
|
3
3
|
import { BaseTransactionLine } from "../BaseTransactionLine";
|
|
4
4
|
import { BaseTaxExemptLine } from "./BaseTaxExemptLine";
|
|
5
5
|
export declare const MODIFY_ITEM_TAX_EXEMPT_LINE_TYPE = "ModifyItemTaxExempt";
|
|
@@ -22,7 +22,7 @@ export declare class ModifyItemTaxExemptLine extends BaseTaxExemptLine {
|
|
|
22
22
|
static create(lineNumber: number, lineType: string, uiBusinessEvent: UiBusinessEvent, collectedData: Readonly<Map<string, any>>): ModifyItemTaxExemptLine;
|
|
23
23
|
static createFromJsonObject(transactionLineJsonObj: any): ModifyItemTaxExemptLine;
|
|
24
24
|
get modifiedLineNumber(): ISameTransactionLineReference;
|
|
25
|
-
protected constructor(lineNumber: number, lineType: string, modifiedLineNumber: ISameTransactionLineReference, taxExemptType: TaxExemptType,
|
|
25
|
+
protected constructor(lineNumber: number, lineType: string, modifiedLineNumber: ISameTransactionLineReference, taxExemptType: TaxExemptType, certificate: ITaxExemptCertificate, reasonCode?: string, reasonDescription?: string, reasonType?: string, supervisorOverrideLineReference?: ITransactionLineReferenceType, displayName?: string, exemptedTaxAuthorities?: ITaxAuthorityForExemption[], exemptedItemLineReferences?: ITransactionLineReferenceType[], presetRateExemption?: boolean, presetExemptionCategory?: string, presetExemptionRate?: string, certificateAttachmentLineReference?: ITransactionLineReferenceType);
|
|
26
26
|
protected newTransactionLine(): BaseTransactionLine;
|
|
27
27
|
}
|
|
28
28
|
export declare function isModifyItemTaxExemptLine(transactionLine: ITransactionLine): transactionLine is ModifyItemTaxExemptLine;
|
|
@@ -10,8 +10,8 @@ exports.MODIFY_ITEM_TAX_EXEMPT_LINE_TYPE = "ModifyItemTaxExempt";
|
|
|
10
10
|
* The ModifyTransactionTaxExemptLine Captures the action by the user to modify a transaction tax exempt line
|
|
11
11
|
*/
|
|
12
12
|
class ModifyItemTaxExemptLine extends BaseTaxExemptLine_1.BaseTaxExemptLine {
|
|
13
|
-
constructor(lineNumber, lineType, modifiedLineNumber, taxExemptType,
|
|
14
|
-
super(lineNumber, lineType, taxExemptType,
|
|
13
|
+
constructor(lineNumber, lineType, modifiedLineNumber, taxExemptType, certificate, reasonCode, reasonDescription, reasonType, supervisorOverrideLineReference, displayName, exemptedTaxAuthorities, exemptedItemLineReferences, presetRateExemption, presetExemptionCategory, presetExemptionRate, certificateAttachmentLineReference) {
|
|
14
|
+
super(lineNumber, lineType, taxExemptType, certificate, reasonCode, reasonDescription, reasonType, supervisorOverrideLineReference, displayName, exemptedTaxAuthorities, exemptedItemLineReferences, presetRateExemption, presetExemptionCategory, presetExemptionRate, undefined, undefined, undefined, undefined, undefined, certificateAttachmentLineReference);
|
|
15
15
|
this._modifiedLineNumber = modifiedLineNumber;
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
@@ -31,8 +31,8 @@ class ModifyItemTaxExemptLine extends BaseTaxExemptLine_1.BaseTaxExemptLine {
|
|
|
31
31
|
}
|
|
32
32
|
const modifiedLineNumber = collectedData.get(Constants_1.CollectedDataKey.LineNumberReference);
|
|
33
33
|
const taxExemptType = BaseTaxExemptLine_1.BaseTaxExemptLine.taxExemptTypeFromCollectedData(collectedData);
|
|
34
|
-
const
|
|
35
|
-
const modifyTaxExemptLine = new ModifyItemTaxExemptLine(lineNumber, lineType, modifiedLineNumber, taxExemptType,
|
|
34
|
+
const certificate = BaseTaxExemptLine_1.BaseTaxExemptLine.certificateFromCollectedData(collectedData);
|
|
35
|
+
const modifyTaxExemptLine = new ModifyItemTaxExemptLine(lineNumber, lineType, modifiedLineNumber, taxExemptType, certificate);
|
|
36
36
|
modifyTaxExemptLine.loadFromCollectedData(collectedData);
|
|
37
37
|
return modifyTaxExemptLine;
|
|
38
38
|
}
|
|
@@ -40,9 +40,9 @@ class ModifyItemTaxExemptLine extends BaseTaxExemptLine_1.BaseTaxExemptLine {
|
|
|
40
40
|
const lineNumber = BaseTransactionLine_1.BaseTransactionLine.lineNumberFromJsonObject(transactionLineJsonObj);
|
|
41
41
|
const lineType = BaseTransactionLine_1.BaseTransactionLine.lineTypeFromJsonObject(transactionLineJsonObj);
|
|
42
42
|
const taxExemptType = BaseTaxExemptLine_1.BaseTaxExemptLine.taxExemptTypeFromJsonObject(transactionLineJsonObj);
|
|
43
|
-
const
|
|
43
|
+
const certificate = BaseTaxExemptLine_1.BaseTaxExemptLine.certificateFromJsonObject(transactionLineJsonObj);
|
|
44
44
|
const modifiedLineNumber = transactionLineJsonObj._modifiedLineNumber;
|
|
45
|
-
const modifyTaxExemptLine = new ModifyItemTaxExemptLine(lineNumber, lineType, modifiedLineNumber, taxExemptType,
|
|
45
|
+
const modifyTaxExemptLine = new ModifyItemTaxExemptLine(lineNumber, lineType, modifiedLineNumber, taxExemptType, certificate);
|
|
46
46
|
modifyTaxExemptLine.loadFromJsonObject(transactionLineJsonObj);
|
|
47
47
|
return modifyTaxExemptLine;
|
|
48
48
|
}
|
|
@@ -50,7 +50,7 @@ class ModifyItemTaxExemptLine extends BaseTaxExemptLine_1.BaseTaxExemptLine {
|
|
|
50
50
|
return this._modifiedLineNumber;
|
|
51
51
|
}
|
|
52
52
|
newTransactionLine() {
|
|
53
|
-
return new ModifyItemTaxExemptLine(this.lineNumber, this.lineType, this._modifiedLineNumber, this._taxExemptType, this.
|
|
53
|
+
return new ModifyItemTaxExemptLine(this.lineNumber, this.lineType, this._modifiedLineNumber, this._taxExemptType, this._certificate, this._reasonCode, this._reasonDescription, this._reasonListType, this._supervisorOverrideLineReference, this._displayName, this._exemptedTaxAuthorities, this._exemptedItemLineReferences, this._presetRateExemption, this._presetExemptionCategory, this._presetExemptionRate, this._certificateAttachmentLineReference);
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
exports.ModifyItemTaxExemptLine = ModifyItemTaxExemptLine;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ITransactionLine, UiBusinessEvent } from "@aptos-scp/scp-component-store-selling-core";
|
|
2
|
-
import { ISameTransactionLineReference, ITaxAuthorityForExemption, ITransactionLineReferenceType, TaxExemptType } from "@aptos-scp/scp-types-commerce-transaction";
|
|
2
|
+
import { ISameTransactionLineReference, ITaxAuthorityForExemption, ITaxExemptCertificate, ITransactionLineReferenceType, TaxExemptType } from "@aptos-scp/scp-types-commerce-transaction";
|
|
3
3
|
import { BaseTransactionLine } from "../BaseTransactionLine";
|
|
4
4
|
import { BaseTaxExemptLine } from "./BaseTaxExemptLine";
|
|
5
5
|
export declare const MODIFY_TRANSACTION_TAX_EXEMPT_LINE_TYPE = "ModifyTransactionTaxExempt";
|
|
@@ -22,7 +22,7 @@ export declare class ModifyTransactionTaxExemptLine extends BaseTaxExemptLine {
|
|
|
22
22
|
static create(lineNumber: number, lineType: string, uiBusinessEvent: UiBusinessEvent, collectedData: Readonly<Map<string, any>>): ModifyTransactionTaxExemptLine;
|
|
23
23
|
static createFromJsonObject(transactionLineJsonObj: any): ModifyTransactionTaxExemptLine;
|
|
24
24
|
get modifiedLineNumber(): ISameTransactionLineReference;
|
|
25
|
-
protected constructor(lineNumber: number, lineType: string, modifiedLineNumber: ISameTransactionLineReference, taxExemptType: TaxExemptType,
|
|
25
|
+
protected constructor(lineNumber: number, lineType: string, modifiedLineNumber: ISameTransactionLineReference, taxExemptType: TaxExemptType, certificate: ITaxExemptCertificate, reasonCode?: string, reasonDescription?: string, reasonType?: string, supervisorOverrideLineReference?: ITransactionLineReferenceType, displayName?: string, exemptedTaxAuthorities?: ITaxAuthorityForExemption[], presetRateExemption?: boolean, presetExemptionCategory?: string, presetExemptionRate?: string, certificateAttachmentLineReference?: ITransactionLineReferenceType);
|
|
26
26
|
protected newTransactionLine(): BaseTransactionLine;
|
|
27
27
|
}
|
|
28
28
|
export declare function isModifyTransactionTaxExemptLine(transactionLine: ITransactionLine): transactionLine is ModifyTransactionTaxExemptLine;
|
|
@@ -10,8 +10,8 @@ exports.MODIFY_TRANSACTION_TAX_EXEMPT_LINE_TYPE = "ModifyTransactionTaxExempt";
|
|
|
10
10
|
* The ModifyTransactionTaxExemptLine Captures the action by the user to modify a transaction tax exempt line
|
|
11
11
|
*/
|
|
12
12
|
class ModifyTransactionTaxExemptLine extends BaseTaxExemptLine_1.BaseTaxExemptLine {
|
|
13
|
-
constructor(lineNumber, lineType, modifiedLineNumber, taxExemptType,
|
|
14
|
-
super(lineNumber, lineType, taxExemptType,
|
|
13
|
+
constructor(lineNumber, lineType, modifiedLineNumber, taxExemptType, certificate, reasonCode, reasonDescription, reasonType, supervisorOverrideLineReference, displayName, exemptedTaxAuthorities, presetRateExemption, presetExemptionCategory, presetExemptionRate, certificateAttachmentLineReference) {
|
|
14
|
+
super(lineNumber, lineType, taxExemptType, certificate, reasonCode, reasonDescription, reasonType, supervisorOverrideLineReference, displayName, exemptedTaxAuthorities, undefined, presetRateExemption, presetExemptionCategory, presetExemptionRate, undefined, undefined, undefined, undefined, undefined, certificateAttachmentLineReference);
|
|
15
15
|
this._modifiedLineNumber = modifiedLineNumber;
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
@@ -31,8 +31,8 @@ class ModifyTransactionTaxExemptLine extends BaseTaxExemptLine_1.BaseTaxExemptLi
|
|
|
31
31
|
}
|
|
32
32
|
const modifiedLineNumber = collectedData.get(Constants_1.CollectedDataKey.LineNumberReference);
|
|
33
33
|
const taxExemptType = BaseTaxExemptLine_1.BaseTaxExemptLine.taxExemptTypeFromCollectedData(collectedData);
|
|
34
|
-
const
|
|
35
|
-
const modifyTransactionTaxExemptLine = new ModifyTransactionTaxExemptLine(lineNumber, lineType, modifiedLineNumber, taxExemptType,
|
|
34
|
+
const certificate = BaseTaxExemptLine_1.BaseTaxExemptLine.certificateFromCollectedData(collectedData);
|
|
35
|
+
const modifyTransactionTaxExemptLine = new ModifyTransactionTaxExemptLine(lineNumber, lineType, modifiedLineNumber, taxExemptType, certificate);
|
|
36
36
|
modifyTransactionTaxExemptLine.loadFromCollectedData(collectedData);
|
|
37
37
|
return modifyTransactionTaxExemptLine;
|
|
38
38
|
}
|
|
@@ -40,9 +40,9 @@ class ModifyTransactionTaxExemptLine extends BaseTaxExemptLine_1.BaseTaxExemptLi
|
|
|
40
40
|
const lineNumber = BaseTransactionLine_1.BaseTransactionLine.lineNumberFromJsonObject(transactionLineJsonObj);
|
|
41
41
|
const lineType = BaseTransactionLine_1.BaseTransactionLine.lineTypeFromJsonObject(transactionLineJsonObj);
|
|
42
42
|
const taxExemptType = BaseTaxExemptLine_1.BaseTaxExemptLine.taxExemptTypeFromJsonObject(transactionLineJsonObj);
|
|
43
|
-
const
|
|
43
|
+
const certificate = BaseTaxExemptLine_1.BaseTaxExemptLine.certificateFromJsonObject(transactionLineJsonObj);
|
|
44
44
|
const modifiedLineNumber = transactionLineJsonObj._modifiedLineNumber;
|
|
45
|
-
const modifyTransactionTaxExemptLine = new ModifyTransactionTaxExemptLine(lineNumber, lineType, modifiedLineNumber, taxExemptType,
|
|
45
|
+
const modifyTransactionTaxExemptLine = new ModifyTransactionTaxExemptLine(lineNumber, lineType, modifiedLineNumber, taxExemptType, certificate);
|
|
46
46
|
modifyTransactionTaxExemptLine.loadFromJsonObject(transactionLineJsonObj);
|
|
47
47
|
return modifyTransactionTaxExemptLine;
|
|
48
48
|
}
|
|
@@ -50,7 +50,7 @@ class ModifyTransactionTaxExemptLine extends BaseTaxExemptLine_1.BaseTaxExemptLi
|
|
|
50
50
|
return this._modifiedLineNumber;
|
|
51
51
|
}
|
|
52
52
|
newTransactionLine() {
|
|
53
|
-
return new ModifyTransactionTaxExemptLine(this.lineNumber, this.lineType, this._modifiedLineNumber, this._taxExemptType, this.
|
|
53
|
+
return new ModifyTransactionTaxExemptLine(this.lineNumber, this.lineType, this._modifiedLineNumber, this._taxExemptType, this._certificate, this._reasonCode, this._reasonDescription, this._reasonListType, this._supervisorOverrideLineReference, this._displayName, this._exemptedTaxAuthorities, this._presetRateExemption, this._presetExemptionCategory, this._presetExemptionRate, this._certificateAttachmentLineReference);
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
exports.ModifyTransactionTaxExemptLine = ModifyTransactionTaxExemptLine;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ITransactionLine, UiBusinessEvent } from "@aptos-scp/scp-component-store-selling-core";
|
|
2
|
-
import { ITaxAuthorityForExemption, ITransactionLineReferenceType, TaxExemptType } from "@aptos-scp/scp-types-commerce-transaction";
|
|
2
|
+
import { ITaxAuthorityForExemption, ITaxExemptCertificate, ITransactionLineReferenceType, TaxExemptType } from "@aptos-scp/scp-types-commerce-transaction";
|
|
3
3
|
import { BaseTransactionLine } from "../BaseTransactionLine";
|
|
4
4
|
import { BaseTaxExemptLine } from "./BaseTaxExemptLine";
|
|
5
5
|
export declare const TRANSACTION_TAX_EXEMPT_LINE_TYPE = "TransactionTaxExempt";
|
|
@@ -17,7 +17,7 @@ export declare class TransactionTaxExemptLine extends BaseTaxExemptLine {
|
|
|
17
17
|
*/
|
|
18
18
|
static create(lineNumber: number, lineType: string, uiBusinessEvent: UiBusinessEvent, collectedData: Readonly<Map<string, any>>): TransactionTaxExemptLine;
|
|
19
19
|
static createFromJsonObject(transactionLineJsonObj: any): TransactionTaxExemptLine;
|
|
20
|
-
protected constructor(lineNumber: number, lineType: string, taxExemptType: TaxExemptType,
|
|
20
|
+
protected constructor(lineNumber: number, lineType: string, taxExemptType: TaxExemptType, certificate: ITaxExemptCertificate, reasonCode?: string, reasonDescription?: string, reasonType?: string, supervisorOverrideLineReference?: ITransactionLineReferenceType, displayName?: string, exemptedTaxAuthorities?: ITaxAuthorityForExemption[], presetRateExemption?: boolean, presetExemptionCategory?: string, presetExemptionRate?: string, certificateAttachmentLineReference?: ITransactionLineReferenceType);
|
|
21
21
|
protected newTransactionLine(): BaseTransactionLine;
|
|
22
22
|
}
|
|
23
23
|
export declare function isTransactionTaxExemptLine(transactionLine: ITransactionLine): transactionLine is TransactionTaxExemptLine;
|
|
@@ -17,8 +17,8 @@ class TransactionTaxExemptLine extends BaseTaxExemptLine_1.BaseTaxExemptLine {
|
|
|
17
17
|
*/
|
|
18
18
|
static create(lineNumber, lineType, uiBusinessEvent, collectedData) {
|
|
19
19
|
const taxExemptType = BaseTaxExemptLine_1.BaseTaxExemptLine.taxExemptTypeFromCollectedData(collectedData);
|
|
20
|
-
const
|
|
21
|
-
const transactionTaxExemptLine = new TransactionTaxExemptLine(lineNumber, lineType, taxExemptType,
|
|
20
|
+
const certificate = BaseTaxExemptLine_1.BaseTaxExemptLine.certificateFromCollectedData(collectedData);
|
|
21
|
+
const transactionTaxExemptLine = new TransactionTaxExemptLine(lineNumber, lineType, taxExemptType, certificate);
|
|
22
22
|
transactionTaxExemptLine.loadFromCollectedData(collectedData);
|
|
23
23
|
return transactionTaxExemptLine;
|
|
24
24
|
}
|
|
@@ -26,16 +26,16 @@ class TransactionTaxExemptLine extends BaseTaxExemptLine_1.BaseTaxExemptLine {
|
|
|
26
26
|
const lineNumber = BaseTransactionLine_1.BaseTransactionLine.lineNumberFromJsonObject(transactionLineJsonObj);
|
|
27
27
|
const lineType = BaseTransactionLine_1.BaseTransactionLine.lineTypeFromJsonObject(transactionLineJsonObj);
|
|
28
28
|
const taxExemptType = BaseTaxExemptLine_1.BaseTaxExemptLine.taxExemptTypeFromJsonObject(transactionLineJsonObj);
|
|
29
|
-
const
|
|
30
|
-
const taxExemptLine = new TransactionTaxExemptLine(lineNumber, lineType, taxExemptType,
|
|
29
|
+
const certificate = BaseTaxExemptLine_1.BaseTaxExemptLine.certificateFromJsonObject(transactionLineJsonObj);
|
|
30
|
+
const taxExemptLine = new TransactionTaxExemptLine(lineNumber, lineType, taxExemptType, certificate);
|
|
31
31
|
taxExemptLine.loadFromJsonObject(transactionLineJsonObj);
|
|
32
32
|
return taxExemptLine;
|
|
33
33
|
}
|
|
34
|
-
constructor(lineNumber, lineType, taxExemptType,
|
|
35
|
-
super(lineNumber, lineType, taxExemptType,
|
|
34
|
+
constructor(lineNumber, lineType, taxExemptType, certificate, reasonCode, reasonDescription, reasonType, supervisorOverrideLineReference, displayName, exemptedTaxAuthorities, presetRateExemption, presetExemptionCategory, presetExemptionRate, certificateAttachmentLineReference) {
|
|
35
|
+
super(lineNumber, lineType, taxExemptType, certificate, reasonCode, reasonDescription, reasonType, supervisorOverrideLineReference, displayName, exemptedTaxAuthorities, undefined, presetRateExemption, presetExemptionCategory, presetExemptionRate, certificate, reasonCode, reasonDescription, displayName, exemptedTaxAuthorities, certificateAttachmentLineReference);
|
|
36
36
|
}
|
|
37
37
|
newTransactionLine() {
|
|
38
|
-
return new TransactionTaxExemptLine(this.lineNumber, this.lineType, this._taxExemptType, this.
|
|
38
|
+
return new TransactionTaxExemptLine(this.lineNumber, this.lineType, this._taxExemptType, this._certificate, this._reasonCode, this._reasonDescription, this._reasonListType, this._supervisorOverrideLineReference, this._displayName, this._exemptedTaxAuthorities, this._presetRateExemption, this._presetExemptionCategory, this._presetExemptionRate, this._certificateAttachmentLineReference);
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
exports.TransactionTaxExemptLine = TransactionTaxExemptLine;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ITransactionLine, ITransactionLineFactory } from "@aptos-scp/scp-component-store-selling-core";
|
|
2
|
-
import { ITaxAuthorityForExemption, ITransactionLineReferenceType, TaxExemptType } from "@aptos-scp/scp-types-commerce-transaction";
|
|
2
|
+
import { ITaxAuthorityForExemption, ITaxExemptCertificate, ITransactionLineReferenceType, TaxExemptType } from "@aptos-scp/scp-types-commerce-transaction";
|
|
3
3
|
import { BaseTaxExemptLineDecorator } from "./BaseTaxExemptLineDecorator";
|
|
4
4
|
import { TransactionTaxExemptLine } from "./TransactionTaxExemptLine";
|
|
5
5
|
export declare const DECORATOR_TYPE_TRANSACTION_TAX_EXEMPT_CHANGE: string;
|
|
6
6
|
export declare function isTransactionTaxExemptLineModificationDecorator(transactionLine: ITransactionLine): transactionLine is TransactionTaxExemptLineModificationDecorator;
|
|
7
7
|
export declare class TransactionTaxExemptLineModificationDecorator extends BaseTaxExemptLineDecorator {
|
|
8
8
|
private _newTaxExemptType;
|
|
9
|
-
private
|
|
9
|
+
private _newCertificate;
|
|
10
10
|
private _newReasonCode;
|
|
11
11
|
private _newReasonDescription;
|
|
12
12
|
private _newReasonListType;
|
|
@@ -17,9 +17,10 @@ export declare class TransactionTaxExemptLineModificationDecorator extends BaseT
|
|
|
17
17
|
private _newPresetExemptionRate?;
|
|
18
18
|
private _newCertificateAttachmentLineReference?;
|
|
19
19
|
static createFromJsonObject(transactionLineJsonObj: any, transactionLineFactory: ITransactionLineFactory): TransactionTaxExemptLineModificationDecorator;
|
|
20
|
-
constructor(transactionTaxExemptLine: TransactionTaxExemptLine, annotationSourceLineNumber: number, newTaxExemptType: TaxExemptType,
|
|
20
|
+
constructor(transactionTaxExemptLine: TransactionTaxExemptLine, annotationSourceLineNumber: number, newTaxExemptType: TaxExemptType, newCertificate: ITaxExemptCertificate, newReasonCode?: string, newReasonDescription?: string, newReasonListType?: string, newDisplayName?: string, newExemptedTaxAuthorities?: ITaxAuthorityForExemption[], newPresetRateExemption?: boolean, newPresetExemptionCategory?: string, newPresetExemptionRate?: string, newCertificateAttachmentLineReference?: ITransactionLineReferenceType);
|
|
21
21
|
get taxExemptType(): TaxExemptType;
|
|
22
22
|
get certificateId(): string;
|
|
23
|
+
get certificate(): ITaxExemptCertificate;
|
|
23
24
|
get reasonCode(): string;
|
|
24
25
|
get certificateAttachmentLineReference(): ITransactionLineReferenceType;
|
|
25
26
|
get reasonDescription(): string;
|
|
@@ -9,10 +9,10 @@ function isTransactionTaxExemptLineModificationDecorator(transactionLine) {
|
|
|
9
9
|
}
|
|
10
10
|
exports.isTransactionTaxExemptLineModificationDecorator = isTransactionTaxExemptLineModificationDecorator;
|
|
11
11
|
class TransactionTaxExemptLineModificationDecorator extends BaseTaxExemptLineDecorator_1.BaseTaxExemptLineDecorator {
|
|
12
|
-
constructor(transactionTaxExemptLine, annotationSourceLineNumber, newTaxExemptType,
|
|
12
|
+
constructor(transactionTaxExemptLine, annotationSourceLineNumber, newTaxExemptType, newCertificate, newReasonCode, newReasonDescription, newReasonListType, newDisplayName, newExemptedTaxAuthorities, newPresetRateExemption, newPresetExemptionCategory, newPresetExemptionRate, newCertificateAttachmentLineReference) {
|
|
13
13
|
super(exports.DECORATOR_TYPE_TRANSACTION_TAX_EXEMPT_CHANGE, transactionTaxExemptLine, undefined, TRANSACTION_TAX_EXEMPT_ANNOTATION_SOURCE_TYPE, annotationSourceLineNumber);
|
|
14
14
|
this._newTaxExemptType = newTaxExemptType;
|
|
15
|
-
this.
|
|
15
|
+
this._newCertificate = newCertificate;
|
|
16
16
|
this._newReasonCode = newReasonCode;
|
|
17
17
|
this._newReasonDescription = newReasonDescription;
|
|
18
18
|
this._newReasonListType = newReasonListType;
|
|
@@ -27,7 +27,7 @@ class TransactionTaxExemptLineModificationDecorator extends BaseTaxExemptLineDec
|
|
|
27
27
|
const decoratedTransactionLineJsonObj = BaseTaxExemptLineDecorator_1.BaseTaxExemptLineDecorator.getDecoratedTransactionLineJsonObjectFromJsonObject(transactionLineJsonObj);
|
|
28
28
|
const decoratedTransactionTaxExemptLine = transactionLineFactory.createTransactionLineFromJsonObj(decoratedTransactionLineJsonObj);
|
|
29
29
|
const newTaxExemptType = transactionLineJsonObj._newTaxExemptType;
|
|
30
|
-
const
|
|
30
|
+
const newCertificate = transactionLineJsonObj._newCertificate;
|
|
31
31
|
const newReasonCode = transactionLineJsonObj._newReasonCode;
|
|
32
32
|
const newReasonDescription = transactionLineJsonObj._newReasonDescription;
|
|
33
33
|
const newReasonListType = transactionLineJsonObj._newReasonListType;
|
|
@@ -38,14 +38,17 @@ class TransactionTaxExemptLineModificationDecorator extends BaseTaxExemptLineDec
|
|
|
38
38
|
const newPresetExemptionRate = transactionLineJsonObj._newPresetExemptionRate;
|
|
39
39
|
const newCertificateAttachmentLineReference = transactionLineJsonObj._newCertificateAttachmentLineReference;
|
|
40
40
|
const annotationSourceLineNumber = BaseTaxExemptLineDecorator_1.BaseTaxExemptLineDecorator.getAnnotationSourceLineNumberFromJsonObject(transactionLineJsonObj);
|
|
41
|
-
const transactionTaxExemptLineModificationDecorator = new TransactionTaxExemptLineModificationDecorator(decoratedTransactionTaxExemptLine, annotationSourceLineNumber, newTaxExemptType,
|
|
41
|
+
const transactionTaxExemptLineModificationDecorator = new TransactionTaxExemptLineModificationDecorator(decoratedTransactionTaxExemptLine, annotationSourceLineNumber, newTaxExemptType, newCertificate, newReasonCode, newReasonDescription, newReasonListType, newDisplayName, newExemptedTaxAuthorities, newPresetRateExemption, newPresetExemptionCategory, newPresetExemptionRate, newCertificateAttachmentLineReference);
|
|
42
42
|
return transactionTaxExemptLineModificationDecorator;
|
|
43
43
|
}
|
|
44
44
|
get taxExemptType() {
|
|
45
45
|
return this._newTaxExemptType || this.decoratedTransactionLine.taxExemptType;
|
|
46
46
|
}
|
|
47
47
|
get certificateId() {
|
|
48
|
-
return this.
|
|
48
|
+
return this._newCertificate.certificateId;
|
|
49
|
+
}
|
|
50
|
+
get certificate() {
|
|
51
|
+
return this._newCertificate;
|
|
49
52
|
}
|
|
50
53
|
get reasonCode() {
|
|
51
54
|
return this._newReasonCode || this.decoratedTransactionLine.reasonCode;
|
|
@@ -78,7 +81,7 @@ class TransactionTaxExemptLineModificationDecorator extends BaseTaxExemptLineDec
|
|
|
78
81
|
clone() {
|
|
79
82
|
const newTransactionTaxExemptLineModificationDecorator = super.clone();
|
|
80
83
|
newTransactionTaxExemptLineModificationDecorator._newTaxExemptType = this._newTaxExemptType;
|
|
81
|
-
newTransactionTaxExemptLineModificationDecorator.
|
|
84
|
+
newTransactionTaxExemptLineModificationDecorator._newCertificate = this._newCertificate;
|
|
82
85
|
newTransactionTaxExemptLineModificationDecorator._newReasonCode = this._newReasonCode;
|
|
83
86
|
newTransactionTaxExemptLineModificationDecorator._newReasonDescription = this._newReasonDescription;
|
|
84
87
|
newTransactionTaxExemptLineModificationDecorator._newReasonListType = this._newReasonListType;
|
|
@@ -94,7 +97,7 @@ class TransactionTaxExemptLineModificationDecorator extends BaseTaxExemptLineDec
|
|
|
94
97
|
return newTransactionTaxExemptLineModificationDecorator;
|
|
95
98
|
}
|
|
96
99
|
newTransactionLine() {
|
|
97
|
-
return new TransactionTaxExemptLineModificationDecorator(this.decoratedTransactionLine, this.annotationSourceLineNumber, this._newTaxExemptType, this.
|
|
100
|
+
return new TransactionTaxExemptLineModificationDecorator(this.decoratedTransactionLine, this.annotationSourceLineNumber, this._newTaxExemptType, this._newCertificate, this._newReasonCode, this._newReasonDescription, this._newReasonListType, this._newDisplayName, this._newExemptedTaxAuthorities, this._newPresetRateExemption, this._newPresetExemptionCategory, this._newPresetExemptionRate, this._newCertificateAttachmentLineReference);
|
|
98
101
|
}
|
|
99
102
|
}
|
|
100
103
|
exports.TransactionTaxExemptLineModificationDecorator = TransactionTaxExemptLineModificationDecorator;
|
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.17.1",
|
|
4
4
|
"description": "This component library provides the common components to handle the coordination of processing the business events from the UI.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"@aptos-scp/scp-types-client-registration": "^1.4.0",
|
|
63
63
|
"@aptos-scp/scp-types-core-config": "^2.2.1",
|
|
64
64
|
"@aptos-scp/scp-types-commerce-devices": "^3.3.0",
|
|
65
|
-
"@aptos-scp/scp-types-commerce-transaction": "^1.
|
|
65
|
+
"@aptos-scp/scp-types-commerce-transaction": "^1.63.0",
|
|
66
66
|
"@aptos-scp/scp-types-customer": "^3.7.0",
|
|
67
67
|
"@aptos-scp/scp-types-einvoice": "^1.17.0",
|
|
68
68
|
"@aptos-scp/scp-types-inventory": "^2.0.0",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"@aptos-scp/scp-component-user": "^1.4.0",
|
|
85
85
|
"@aptos-scp/scp-types-client-registration": "^1.4.0",
|
|
86
86
|
"@aptos-scp/scp-types-commerce-devices": "^3.3.0",
|
|
87
|
-
"@aptos-scp/scp-types-commerce-transaction": "^1.
|
|
87
|
+
"@aptos-scp/scp-types-commerce-transaction": "^1.63.0",
|
|
88
88
|
"@aptos-scp/scp-types-core": "^1.0.5",
|
|
89
89
|
"@aptos-scp/scp-types-core-config": "^2.2.1",
|
|
90
90
|
"@aptos-scp/scp-types-currency-conversion": "^1.2.0",
|