diff --git a/src/app/carnet/shipping/shipping.component.ts b/src/app/carnet/shipping/shipping.component.ts
index 4fdc336..d35fcea 100644
--- a/src/app/carnet/shipping/shipping.component.ts
+++ b/src/app/carnet/shipping/shipping.component.ts
@@ -143,7 +143,7 @@ export class ShippingComponent {
this.destroy$.complete();
}
- onSubmit(): void {
+ onSubmit(submitApp: boolean): void {
if (this.shippingForm.invalid) {
this.shippingForm.markAllAsTouched();
return;
@@ -157,12 +157,23 @@ export class ShippingComponent {
shippingData.contact = shippingData.shipTo === 'PREPARER' ? this.preparerContact ?? undefined : this.holderContact ?? undefined;
}
+ if (this.holder?.holderType.trim() === 'GOV') {
+ shippingData.formOfSecurity = this.govFormOfSecurities?.[0].value;
+ }
+
this.shippingService.saveShippingDetails(this.headerid, shippingData).pipe(finalize(() => {
this.changeInProgress = false;
})).subscribe({
next: () => {
this.notificationService.showSuccess('Shipping & payments information saved successfully');
this.completed.emit(true);
+
+ if (this.enableSubmitButton && this.headerid && submitApp) {
+ let currentApplicationDetails = { headerid: this.headerid, applicationName: this.applicationName }
+ this.storageService.set("currentapplication", currentApplicationDetails);
+
+ this.navigationService.navigate(["terms"])
+ }
},
error: (error) => {
let errorMessage = this.errorHandler.handleApiError(error, 'Failed to save shipping and payment information');
@@ -678,12 +689,7 @@ export class ShippingComponent {
}
submitApplication(): void {
- if (this.headerid) {
- let currentApplicationDetails = { headerid: this.headerid, applicationName: this.applicationName }
- this.storageService.set("currentapplication", currentApplicationDetails);
- }
-
- this.navigationService.navigate(["terms"])
+ this.onSubmit(true);
}
returnToHome(): void {
diff --git a/src/app/carnet/terms-conditions/terms-conditions.component.html b/src/app/carnet/terms-conditions/terms-conditions.component.html
index e18b6ba..0653a62 100644
--- a/src/app/carnet/terms-conditions/terms-conditions.component.html
+++ b/src/app/carnet/terms-conditions/terms-conditions.component.html
@@ -7,73 +7,10 @@
-
- 1. Definitions
- ATA Carnet: An international customs document that permits the tax-free and duty-free
- temporary export and import of goods for up to one year.
- Holder: The individual or entity in whose name the carnet is issued and who is
- responsible for complying with all terms.
- Goods: Merchandise, equipment, or products covered by the carnet.
-
- 2. Carnet Usage
- 2.1 The carnet may be used for:
+ Agreement language will go here
+ Fees and Charges
+ The following fees apply:
- - Commercial samples
- - Professional equipment
- - Goods for exhibitions and fairs
- - Goods for scientific, educational, or cultural purposes
-
-
- 2.2 The carnet cannot be used for:
-
- - Consumable or disposable items
- - Goods for processing or repair
- - Goods intended for sale or permanent export
- - Prohibited or restricted items under any applicable laws
-
-
- 3. Holder Responsibilities
- 3.1 The holder must:
-
- - Present the carnet to customs when crossing borders
- - Ensure all goods listed in the carnet are returned by the expiration date
- - Pay all applicable duties and taxes if goods are not re-exported
- - Notify the issuing association immediately of any lost or stolen carnets
-
-
- 4. Validity Period
- 4.1 The carnet is valid for one year from the date of issue.
- 4.2 Goods must be re-exported before the carnet expires.
- 4.3 Extensions may be granted in exceptional circumstances with approval from all relevant customs
- authorities.
-
- 5. Customs Procedures
- 5.1 The holder must present the carnet to customs:
-
- - When first exporting goods from the home country
- - When entering each foreign country
- - When re-exporting goods from each foreign country
- - When finally re-importing goods to the home country
-
-
- 6. Security Requirements
- 6.1 The issuing association may require security up to 40% of the total value of goods.
- 6.2 Security will be refunded when the carnet is fully discharged.
- 6.3 The security may be forfeited if terms are violated.
-
- 7. Liability and Insurance
- 7.1 The holder is solely responsible for:
-
- - All customs duties and taxes if goods are not re-exported
- - Any damage to goods while in transit
- - Compliance with all import/export regulations
-
- 7.2 We recommend obtaining comprehensive insurance coverage for all goods.
-
- 8. Fees and Charges
- 8.1 The following fees apply:
-
-
- Basic fee: {{estimatedFees.basicFee | currency}}
- Counterfoil Fee: {{estimatedFees.counterFoilFee | currency}}
@@ -85,15 +22,6 @@
- Cargo Premium: {{estimatedFees.cargoPremium | currency}}
- LDI Premium: {{estimatedFees.ldiPremium | currency}}
-
- 9. Dispute Resolution
- 9.1 Any disputes shall be resolved through arbitration in the jurisdiction of the issuing association.
-
- 9.2 The holder agrees to be bound by the arbitration decision.
-
- 10. Governing Law
- These terms shall be governed by the laws of the country where the carnet was issued.
-
I have read and agree to all terms and conditions above
diff --git a/src/app/core/models/holder/holder-filter.ts b/src/app/core/models/holder/holder-filter.ts
index 7397b2a..6648b7f 100644
--- a/src/app/core/models/holder/holder-filter.ts
+++ b/src/app/core/models/holder/holder-filter.ts
@@ -1,3 +1,4 @@
export interface HolderFilter {
holderName?: string;
+ holderId?: number;
}
diff --git a/src/app/core/services/carnet/carnet.service.ts b/src/app/core/services/carnet/carnet.service.ts
index 339e2b9..ab57530 100644
--- a/src/app/core/services/carnet/carnet.service.ts
+++ b/src/app/core/services/carnet/carnet.service.ts
@@ -54,6 +54,6 @@ export class CarnetService {
P_HEADERID: headerid
}
- return this.http.post(`${this.apiUrl}/${this.apiDb}//ProcessCarnet`, appData);
+ return this.http.patch(`${this.apiUrl}/${this.apiDb}//ProcessCarnet`, appData);
}
}
diff --git a/src/app/core/services/carnet/travel-plan.service.ts b/src/app/core/services/carnet/travel-plan.service.ts
index 13d42da..ac4b452 100644
--- a/src/app/core/services/carnet/travel-plan.service.ts
+++ b/src/app/core/services/carnet/travel-plan.service.ts
@@ -16,7 +16,7 @@ export class TravelPlanService {
private userService = inject(UserService);
getCountriesAndMessages(): Observable {
- return this.http.get(`${this.apiUrl}/${this.apiDb}/GetCountriesAndMessages`).pipe(
+ return this.http.get(`${this.apiUrl}/${this.apiDb}/GetCountriesAndMessages/${this.userService.getUserSpid()}`).pipe(
map((response) =>
response.map((item) => ({
name: item.COUNTRYNAME,
diff --git a/src/app/core/services/holder/holder.service.ts b/src/app/core/services/holder/holder.service.ts
index b724f0a..60e9694 100644
--- a/src/app/core/services/holder/holder.service.ts
+++ b/src/app/core/services/holder/holder.service.ts
@@ -17,7 +17,17 @@ export class HolderService {
private userService = inject(UserService);
getHolders(filter: HolderFilter): Observable {
- return this.http.get(`${this.apiUrl}/${this.apiDb}/SearchHolder/${this.userService.getUserSpid()}/${this.userService.getSafeUser()}?P_HOLDERNAME=${filter.holderName}`).pipe(
+
+ // add query parameters to the URL based on the filter
+ let queryParams = ``;
+ if (filter.holderName) {
+ queryParams += `P_HOLDERNAME=${filter.holderName}`;
+ }
+ if (filter.holderId) {
+ queryParams += `P_HOLDERID=${filter.holderId}`;
+ }
+
+ return this.http.get(`${this.apiUrl}/${this.apiDb}/SearchHolder/${this.userService.getUserSpid()}/${this.userService.getSafeUser()}?${queryParams}`).pipe(
map(response => this.mapToHolders(response))
)
}
diff --git a/src/app/core/services/home.service.ts b/src/app/core/services/home.service.ts
index 9c71dad..82e9161 100644
--- a/src/app/core/services/home.service.ts
+++ b/src/app/core/services/home.service.ts
@@ -41,4 +41,21 @@ export class HomeService {
headerId: item.HEADERID,
}));
}
+
+ deleteCarnet(headerid: number): Observable {
+ const data = {
+ P_USERID: this.userService.getUser(),
+ P_HEADERID: headerid
+ }
+ return this.http.delete(`${this.apiUrl}/${this.apiDb}/DeleteCarnet`, { body: data });
+ }
+
+ printGeneralList(headerid: number): Observable {
+ const data = {
+ P_SPID: this.userService.getUserSpid(),
+ P_HEADERID: headerid,
+ P_PRINTGL: 'Y'
+ }
+ return this.http.post(`${this.apiUrl}/${this.apiDb}/PrintCarnet`, data);
+ }
}
diff --git a/src/app/holder/search/search-holder.component.html b/src/app/holder/search/search-holder.component.html
index 3ffe5dd..79ac7da 100644
--- a/src/app/holder/search/search-holder.component.html
+++ b/src/app/holder/search/search-holder.component.html
@@ -1,6 +1,6 @@