finalize gl flow for import

This commit is contained in:
Marshal
2026-07-02 18:15:16 +00:00
parent dd47068a4b
commit 8d056c5014
17 changed files with 1084 additions and 11 deletions

View File

@@ -23,6 +23,27 @@ export const CLEARANCE_WORKFLOW_FILE_CATALOG: ClearanceWorkflowFileCatalogEntry[
{ code: "ex8", label: "EX8 Declaration", uploadedBy: "gl_et", category: "declaration", tradeDirection: "EXPORT" },
{ code: "duty_tax_notice", label: "Duty / Tax Notice", uploadedBy: "gl_et", category: "duty" },
{ code: "duty_tax_receipt", label: "Duty / Tax Payment Slip", uploadedBy: "customer", category: "duty" },
{
code: "duty_tax_notice_2",
label: "Additional Duty / Tax Notice",
uploadedBy: "gl_et",
category: "duty",
tradeDirection: "IMPORT",
},
{
code: "duty_tax_receipt_2",
label: "Additional Duty / Tax Payment Slip",
uploadedBy: "customer",
category: "duty",
tradeDirection: "IMPORT",
},
{
code: "import_release",
label: "Import Release",
uploadedBy: "gl_et",
category: "declaration",
tradeDirection: "IMPORT",
},
{ code: "transit_permitted", label: "Transit Permit", uploadedBy: "gl_et", category: "transit", tradeDirection: "IMPORT" },
{
code: "export_transport_document",

View File

@@ -282,6 +282,22 @@ export interface ClearanceFinalInvoiceSummary {
confirmedAt: string | null;
}
/**
* Post-arrival second duty/tax round (import): GL ET advises an additional
* amount with a notice; the customer attaches another payment slip. Optional —
* GL ET may mark it skipped when no further duty applies.
*/
export interface ClearanceSecondDuty {
advised: boolean;
skipped: boolean;
amount: number | null;
currency: string | null;
declarationSerial?: string | null;
noticeFile: { id: string; name: string; url: string } | null;
slipFile: { id: string; name: string; url: string } | null;
paid: boolean;
}
/** A customs booking riding a train schedule, as shown on the GL DJ schedules tab. */
export interface DjClearanceScheduleBooking {
bookingId: string;
@@ -359,6 +375,12 @@ export interface ContractClearanceView {
offloaded?: boolean;
/** GL Djibouti post-offload final invoice (export). */
finalInvoice?: ClearanceFinalInvoiceSummary | null;
/** Customs risk level assigned by GL ET (import; visible to the customer). */
riskLevel?: string | null;
riskAssignedAt?: string | null;
/** Post-arrival additional duty/tax round (import). */
secondDuty?: ClearanceSecondDuty | null;
importReleaseGranted?: boolean;
}
export type ClearanceActorRole = "CUSTOMER" | "GL_ET" | "GL_DJ" | "OPERATIONS";
@@ -456,6 +478,8 @@ export const IMPORT_MILESTONES = [
"OFFLOADED",
"T1_CLOSED",
"RISK_ASSIGNED",
"SECOND_DUTY_ADVISED",
"SECOND_DUTY_PAID",
"IMPORT_RELEASE_GRANTED",
"IMPORT_PROCESS_COMPLETED",
"STORAGE_INVOICE_RAISED",

View File

@@ -566,6 +566,12 @@ export interface ClearanceView {
offloaded?: boolean;
/** GL Djibouti post-offload final invoice (export). */
finalInvoice?: import("./contracts").ClearanceFinalInvoiceSummary | null;
/** Customs risk level assigned by GL ET (import; visible to the customer). */
riskLevel?: string | null;
riskAssignedAt?: string | null;
/** Post-arrival additional duty/tax round (import). */
secondDuty?: import("./contracts").ClearanceSecondDuty | null;
importReleaseGranted?: boolean;
}
/** Company an invoice is billed to (minimal projection). */