Skip to content

Sales Quote (New Design)

Agilasoft Cloud Technologies edited this page Mar 16, 2026 · 1 revision

Sales Quote Unified Charges Design

Summary

Consolidate all Sales Quote charges into a single child tab with one table. Each row is identified by Service Type (Air, Sea, Transport, Customs, Warehousing). Remove the per-service tabs (Sea, Air, Transport, Customs, Warehousing) and their separate charge tables.

Enhancements:

  • Main Service Type + Connected Services: When the main service is e.g. Air, allow adding connected/auxiliary services (Declaration, Transport, Sea, Warehousing, etc.) as charge rows.
  • Charge Group: Classify each charge into groups such as Origin, Destination, Freight, Customs, Documentation, etc.

Main Service Type and Connected Services

Concept

  • Main Service Type: The primary service of the quote (e.g. Air Freight). Determined by the first checked service or a dedicated main_service_type field on the Sales Quote header.
  • Connected Services: Auxiliary services that support the main service. For example, an Air Freight quote can include:
    • Declaration (Customs) – customs clearance at origin/destination
    • Transport – trucking, pre-carriage, on-forwarding
    • Sea – feeder or multimodal legs
    • Warehousing – storage, handling, VAS

Behavior

  1. Header-level: Sales Quote has main_service_type (Select: Air, Sea, Transport, Customs, Warehousing) or derives it from is_air, is_sea, etc.
  2. Charge rows: Any service type can be added as a charge row, regardless of main service. When main is Air, users can add:
    • Air charges (main)
    • Customs/Declaration charges (connected)
    • Transport charges (connected)
    • Sea charges (connected, e.g. feeder)
    • Warehousing charges (connected)
  3. No restriction: The unified charges table does not restrict service_type by main service. All five service types are always available as options.
  4. Routing legs: Routing legs define the sequence (Sea → Air → Transport → Customs). Charge rows are not forced to match legs; the user assigns service_type per row. Optionally, a future routing_leg link could scope charges to a specific leg.

Example

Main Service Typical Connected Services
Air Declaration, Transport, Warehousing
Sea Declaration, Transport, Warehousing
Transport Declaration, Warehousing
Customs Transport, Warehousing
Warehousing Transport, Customs

Charge Group

Purpose

Charge Group classifies charges by where or how they apply in the shipment flow (Origin, Destination, Freight, Customs, etc.). This is distinct from:

  • Service Type: Which service domain (Air, Sea, Transport, Customs, Warehousing)
  • Charge Category: More granular type (e.g. Freight, Fuel Surcharge, Terminal Handling, Documentation)

Options (Proposed)

Charge Group Description / Examples
Origin Charges at origin: THC, documentation, export customs, pick-up
Destination Charges at destination: THC, import customs, delivery, release
Freight Main carriage: ocean freight, air freight, trucking
Customs Customs clearance, duties, brokerage
Documentation B/L, AWB, certificates, permits
Storage Warehouse, CFS, detention, demurrage
Insurance Cargo insurance, other coverage
Other Miscellaneous, surcharges, VAS

Field Definition

Field Type Label Options
charge_group Select Charge Group Origin\nDestination\nFreight\nCustoms\nDocumentation\nStorage\nInsurance\nOther
  • In list view: Yes, for quick filtering and grouping.
  • Default: Can be derived from Item (custom_charge_group) or left blank for user to set.
  • Depends on: None; available for all charge rows.

Relation to Charge Category

  • Charge Group: High-level grouping (Origin, Destination, Freight, Customs, etc.).
  • Charge Category: Finer classification (e.g. Freight, Fuel Surcharge, Terminal Handling, Port Charges, Customs Clearance, Documentation, Storage, Detention, Demurrage, Other).

Both can coexist: charge_group = Freight, charge_category = Fuel Surcharge.


Current State

Per-Service Tabs and Tables

Tab Child Table Parent Field
Sea Sales Quote Sea Freight sea_freight
Air Sales Quote Air Freight air_freight
Transport Sales Quote Transport transport
Customs Sales Quote Customs customs
Warehousing Sales Quote Warehouse warehousing
  • Each tab is shown conditionally via depends_on (e.g. doc.is_sea, doc.is_air).
  • Each child table has service-specific fields plus shared charge fields (item, rate, calculation method, revenue/cost, tariff, bill_to, pay_to).
  • One-off quotes use header-level charge parameters; Regular quotes use per-row parameters.

Target State

Single Charges Tab

  • One tab: "Charges" (or "Quote Charges")
  • One child table: Sales Quote Charge (new doctype)
  • Service Type field: Each row has service_type = Air | Sea | Transport | Customs | Warehousing
  • Charge Group field: Each row has charge_group = Origin | Destination | Freight | Customs | Documentation | Storage | Insurance | Other
  • No per-service tabs; all charges in one grid
  • Main service + any connected services can be added as rows

Sales Quote Layout (Proposed)

Details Tab
  - Quote Details, Status, Customer, Shipper, Consignee, etc.
  - main_service_type (Select) or is_sea, is_air, is_transport, is_customs, is_warehousing
  - Charge Parameters (One-off; collapsible per service type)

Routing Tab
  - billing_mode, routing_legs

Charges Tab
  - charges (Table: Sales Quote Charge)
    - service_type (Select: Air, Sea, Transport, Customs, Warehousing)
    - charge_group (Select: Origin, Destination, Freight, Customs, Documentation, Storage, Insurance, Other)
    - item_code, item_name, charge_type, charge_category, ...
    - [Service-specific params via depends_on on service_type]
    - Revenue / Cost sections

New Child DocType: Sales Quote Charge

Core Fields

Field Type Label Notes
service_type Select Service Type Required. Air, Sea, Transport, Customs, Warehousing
charge_group Select Charge Group Origin, Destination, Freight, Customs, Documentation, Storage, Insurance, Other
item_code Link Item Code Item; link_filters dynamic by service_type
item_name Data Item Name fetch_from item_code.item_name
charge_type Select Charge Type Revenue, Cost, Other (Margin, Disbursement for Customs)
charge_category Select Charge Category Freight, Fuel Surcharge, Terminal Handling, Customs Clearance, Documentation, Storage, etc.
quotation_type Data Quotation Type Hidden; from parent

Tariff and Billing

Field Type Label
tariff Link Tariff
revenue_tariff Link Revenue Tariff
cost_tariff Link Cost Tariff
use_tariff_in_revenue Check Use Tariff in Revenue
use_tariff_in_cost Check Use Tariff in Cost
bill_to Link Bill To (Customer)
pay_to Link Pay To (Supplier)

Revenue Section

Field Type Label
calculation_method Select Calculation Method
unit_rate Currency Unit Rate
unit_type Select Unit Type
currency Link Currency
quantity Float Quantity
minimum_quantity Float Minimum Quantity
minimum_charge Currency Minimum Charge
maximum_charge Currency Maximum Charge
base_amount Currency Base Amount
uom Link UOM
estimated_revenue Currency Estimated Revenue
revenue_calc_notes Small Text Revenue Calc Notes

Cost Section

Field Type Label
cost_calculation_method Select Cost Calculation Method
unit_cost Currency Unit Cost
cost_unit_type Select Cost Unit Type
cost_currency Link Cost Currency
cost_quantity Float Cost Quantity
cost_minimum_quantity Float Cost Minimum Qty
cost_minimum_charge Currency Cost Minimum Charge
cost_maximum_charge Currency Cost Maximum Charge
cost_base_amount Currency Cost Base Amount
cost_uom Link Cost UOM
estimated_cost Currency Estimated Cost
cost_calc_notes Small Text Cost Calc Notes

Service-Specific Parameters (depends_on service_type)

Sea (depends_on: doc.service_type == "Sea"): sea_house_type, load_type, direction, transport_mode, shipping_line, freight_agent_sea, weight, volume, chargeable, origin_port, destination_port, etc.

Air (depends_on: doc.service_type == "Air"): air_house_type, load_type, direction, airline, freight_agent, origin_port, destination_port.

Transport (depends_on: doc.service_type == "Transport"): transport_template, load_type, vehicle_type, container_type, location_type, location_from, location_to, pick_mode, drop_mode.

Customs (depends_on: doc.service_type == "Customs"): charge_category, customs_authority, declaration_type, customs_broker, transport_mode, port_of_loading, port_of_discharge.

Warehousing (depends_on: doc.service_type == "Warehousing"): charge_category, storage_charge, inbound_charge, outbound_charge, vas_charge, stocktake_charge, handling_unit_type, storage_type, billing_time_*, etc.


Downstream Impact

Charge Population

All charge population flows (Sea Booking, Air Booking, Transport Order, Declaration Order) must read from Sales Quote Charge filtered by service_type instead of separate tables. Charge Group is passed through where the target doctype supports it.

Affected Modules

  • pricing_center, sea_freight, air_freight, transport, customs, warehousing

Implementation Phases

  1. Phase 1: Create Sales Quote Charge with service_type, charge_group, and all fields. Add charges table to Sales Quote. Keep existing tabs during transition.
  2. Phase 2: Migrate data from old tables. Update charge population logic. Test conversion flows.
  3. Phase 3: Remove per-service tabs and old child doctypes. Reorganize One-off charge parameters.

Open Questions

  1. main_service_type: Add explicit header field, or derive from first checked is_*?
  2. Charge Group options: Confirm final list (Origin, Destination, Freight, Customs, Documentation, Storage, Insurance, Other) and whether to make it configurable.
  3. Routing leg linkage: Should charges be optionally linked to a routing leg for leg-specific pricing?

Getting Started

Setup and Settings

Sea Freight

Air Freight

Transport

Customs

Warehousing

Pricing Center

Job Management

Sustainability

Intercompany

Special Projects

Pages

Features

Reports

Glossary

Clone this wiki locally