Cargo Registration: Customer Service Entry Point¶
The Cargo Registration doctype is the primary entry point for all customer transportation requests. This document captures customer cargo details and initiates the fleet management workflow.
Purpose and Scope¶
Cargo Registration serves multiple critical functions: - Customer Request Management: Central repository for all transportation requests - Cargo Specification: Detailed cargo characteristics and requirements
- Service Pricing: Rate definition and invoice generation - Workflow Initiation: Starting point for manifest and trip creation - Compliance Documentation: Required shipping and regulatory information
Document Structure¶
Header Information¶
Field | Type | Purpose | Required |
---|---|---|---|
Customer | Link | Customer requesting service | Yes |
Transport Type | Select | Cross Border / Internal | Yes |
Posting Date | Date | Registration date (auto-filled) | Yes |
Company | Link | Your company entity | Yes |
Cargo Details (Child Table)¶
Each row represents cargo requiring one vehicle:
Cargo Identification¶
- Cargo ID: Auto-generated unique identifier
- Container Size: Loose / 20 FT / 40 FT
- Container Number: Required for containerized cargo
- BL Number: Bill of Lading reference
- Seal Number: Container seal (for sealed containers)
Cargo Specifications¶
- Cargo Type: Link to Cargo Types master
- Net Weight (kg): Cargo weight in kilograms
- Number of Packages: Count of individual packages
- Cargo Route: Link to predefined Trip Routes
Location Information¶
- Cargo Location Country/City: Pickup location
- Cargo Destination Country/City: Delivery destination
- Expected Loading Date: Planned pickup date
- Expected Offloading Date: Planned delivery date
Service Charges¶
- Service Item: Transportation service from Item master
- Currency: Billing currency (USD/TZS)
- Rate: Price per unit/service
Assignment Tracking¶
- Manifest Number: Assigned manifest (auto-filled)
- Transporter Type: In House / Sub-Contractor (auto-filled)
- Assigned Truck/Driver: Vehicle assignment details
- Created Trip: Generated trip reference
- Sales Invoice: Generated invoice reference
Key Features and Functionality¶
1. Intelligent Cargo Planning¶
Best Practice: Each cargo detail row should represent one vehicle's capacity. - For multi-vehicle cargo, create separate rows per vehicle - System validates location relationships - Automatic weight conversion (kg to tonnes) - Date validation (loading before offloading)
2. Dynamic Location Filtering¶
JavaScript implementation automatically filters cities based on selected countries:
// Automatic city filtering based on country selection
cargo_location_city_filter(frm, cdt, cdn);
cargo_destination_city_filter(frm, cdt, cdn);
3. Invoice Generation Workflow¶
The Create Invoice button generates customer invoices: - Select specific cargo rows using checkboxes - System creates Sales Invoice with: - Vehicle details (when assigned) - Route information
- Service charges - Optional weight-based billing
Important: Create invoice before submitting Cargo Registration.
4. Manifest Assignment Integration¶
Each cargo row includes Assign Manifest button: - Opens dialog showing available manifests for the route - Displays truck and driver details - Options to assign to existing or create new manifest - Seamless integration with vehicle assignment
Business Process Flow¶
Step 1: Customer Request¶
- Customer contacts for transportation service
- Create new Cargo Registration
- Enter customer and transport type
Step 2: Cargo Documentation¶
- Add cargo details row for each vehicle needed
- Specify container/package details
- Define pickup and delivery locations
- Set expected dates
Step 3: Service Pricing¶
- Select appropriate service item
- Define currency and rate
- Consider weight-based billing options
Step 4: Invoice Generation¶
- Select cargo rows for billing
- Click Create Invoice
- Review generated Sales Invoice
- Send to customer for approval
Step 5: Vehicle Assignment¶
- Click Assign Manifest on cargo rows
- Choose existing manifest or create new
- System initiates vehicle assignment workflow
Validation Rules¶
Automatic Validations¶
- Date Logic: Loading date must be before offloading date
- Weight Conversion: Automatic kg to tonnes calculation
- Location Relationships: City must belong to selected country
- Service Items: Must be from "Services" item group
Business Rules¶
- Cannot modify cargo after manifest assignment
- Invoice creation locks cargo specifications
- Container number mandatory for containerized cargo
- Route selection drives available manifests
Integration Points¶
Upstream Dependencies¶
- Customer Master: Valid customer required
- Item Master: Service items for billing
- Trip Routes: Available transportation routes
- Cargo Types: Cargo classification
- Transport Locations: Pickup/delivery points
Downstream Processes¶
- Sales Invoice: Customer billing
- Manifest: Vehicle assignment
- Trips: Transportation execution
- Fuel Requests: Fuel planning
- Requested Payment: Expense management
JavaScript Functionality¶
Form Behavior¶
// Auto-fill posting date and make read-only
if (!frm.doc.posting_date) {
frm.set_value('posting_date', frappe.datetime.nowdate());
frm.set_df_property('posting_date', 'read_only', 1);
}
Invoice Creation¶
create_invoice: function(frm) {
let selected = frm.get_selected().cargo_details;
if (selected) {
let rows = frm.doc.cargo_details.filter(i =>
selected.includes(i.name) && !i.invoice);
// Generate invoice for selected rows
}
}
Manifest Assignment Dialog¶
- Dynamic table generation showing available manifests
- Single-selection checkbox behavior
- Integration with manifest creation/assignment APIs
Reporting and Analytics¶
Key Metrics¶
- Cargo registration volume by customer
- Average weight per vehicle type
- Route utilization patterns
- Service pricing analysis
- Time from registration to delivery
Standard Reports¶
- Cargo registration summary
- Customer service analysis
- Route demand planning
- Vehicle capacity utilization
Best Practices¶
Data Entry Guidelines¶
- Accurate Planning: One row per vehicle ensures proper resource allocation
- Complete Information: Fill all required fields for smooth processing
- Realistic Dates: Set achievable loading/offloading dates
- Proper Classification: Select correct cargo types for compliance
Workflow Optimization¶
- Batch Processing: Group similar cargo for efficient manifest creation
- Early Invoicing: Generate invoices promptly for cash flow
- Route Consolidation: Combine compatible cargo on same routes
- Regular Review: Monitor pending assignments and follow up
Quality Control¶
- Weight Verification: Confirm actual vs. declared weights
- Documentation: Ensure all required documents attached
- Customer Communication: Keep customers informed of status
- Compliance Check: Verify regulatory requirements met
The Cargo Registration doctype forms the foundation of your fleet management operations, ensuring accurate customer service delivery from initial request through final delivery.