mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
[200~feat: add CustomsPaymentsCard and PaymentsTab components for handling customs payments and payment summaries
This commit is contained in:
@@ -769,6 +769,7 @@ export interface IContract extends BaseEntity {
|
||||
includesFirstMile?: boolean;
|
||||
includesLastMile?: boolean;
|
||||
includesCustoms: boolean;
|
||||
includesEthiopianCustomsOnly?: boolean;
|
||||
} | null;
|
||||
paymentCurrency: string;
|
||||
customsClearingEnabled: boolean;
|
||||
|
||||
@@ -828,17 +828,22 @@ export type ClearanceChargeType = "PORT_CHARGES" | "MISCELLANEOUS";
|
||||
|
||||
/**
|
||||
* DOC_UPLOADED: GL Djibouti uploaded the supporting document (port charges).
|
||||
* BILLED: GL Ethiopia set amount + currency. SENT: invoice issued to the
|
||||
* customer (ETB pays via gateway, other currencies via Finance's manual
|
||||
* settlement). PAID: the invoice settled.
|
||||
* BILLED: GL Ethiopia set amount + currency (draft, customer does not see it).
|
||||
* SENT: price proposed to the customer, awaiting their decision.
|
||||
* REJECTED: customer declined with a note; GL revises and re-sends.
|
||||
* ACCEPTED: customer agreed — invoice issued (ETB pays via gateway, other
|
||||
* currencies via Finance's manual settlement); GL can no longer edit.
|
||||
* PAID: the invoice settled.
|
||||
*/
|
||||
export type ClearanceChargeStatus =
|
||||
| "DOC_UPLOADED"
|
||||
| "BILLED"
|
||||
| "SENT"
|
||||
| "REJECTED"
|
||||
| "ACCEPTED"
|
||||
| "PAID";
|
||||
|
||||
/** One clearance charge level on a booking — at most one per type. */
|
||||
/** One clearance charge on a booking — one port charge, any number of miscellaneous. */
|
||||
export interface ClearanceCharge {
|
||||
id: string;
|
||||
bookingId: string;
|
||||
@@ -847,6 +852,11 @@ export interface ClearanceCharge {
|
||||
file: { id: string; name: string; url: string } | null;
|
||||
amount: number | null;
|
||||
currency: string | null;
|
||||
/** What the price is for, written by GL (required for miscellaneous). */
|
||||
description: string | null;
|
||||
/** Customer's reason when REJECTED; cleared when GL revises. */
|
||||
customerNote: string | null;
|
||||
customerDecidedAt: string | null;
|
||||
invoiceId: string | null;
|
||||
invoiceNumber: string | null;
|
||||
uploadedByName: string | null;
|
||||
@@ -856,6 +866,18 @@ export interface ClearanceCharge {
|
||||
paidAt: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* One booking's outstanding customer payments — invoices to pay, prices to
|
||||
* accept, slips to upload — for the "Pay" badge on list/home rows.
|
||||
*/
|
||||
export interface BookingPayableSummary {
|
||||
bookingId: string;
|
||||
/** Items waiting on the customer (payable + needing review). */
|
||||
count: number;
|
||||
/** Amounts actually payable now, per currency (items under review excluded). */
|
||||
totals: Array<{ currency: string; amount: number }>;
|
||||
}
|
||||
|
||||
/** A GL→customer request for additional clearance document(s). */
|
||||
export interface ClearanceDocRequest {
|
||||
id: string;
|
||||
@@ -1144,6 +1166,8 @@ export interface BookingReferenceService {
|
||||
includesFirstMile: boolean;
|
||||
includesLastMile: boolean;
|
||||
includesCustoms: boolean;
|
||||
/** Customs cleared on the Ethiopian side only (prices off the Ethiopian customs rate). */
|
||||
includesEthiopianCustomsOnly?: boolean;
|
||||
isActive: boolean;
|
||||
displayOrder: number;
|
||||
createdAt: string;
|
||||
|
||||
Reference in New Issue
Block a user