Project archive

Quest record / build complete

Finished Goods Delivery Management System

A secure, responsive Laravel application for managing finished goods deliveries, Excel workflows, shipment status, reporting, and access control.

4 inventory items
Laravel 13 Tailwind CSS 4 MySQL Excel Automation

Overview

The Finished Goods Delivery Management System is a production-oriented web application for managing delivery schedules, quantities, destinations, item types, shipment statuses, and operational reports.

The application provides a responsive dashboard, structured master data, bulk delivery operations, role-based access control, and Excel import/export workflows.

Problem

Finished goods delivery operations require accurate tracking of quantities, delivery deadlines, shipment destinations, item categories, and fulfillment status.

Manual spreadsheet workflows can introduce:

  • Duplicate delivery records
  • Inconsistent master data
  • Mixed quantity units
  • Incorrect quantity totals
  • Limited visibility into urgent shipments
  • Unclear user responsibilities
  • Incomplete shipment audit information

Administrators also need controlled access to imports, user management, permissions, master data, and operational reports.

Solution

I developed a centralized delivery management application that combines operational tracking, deadline monitoring, bulk actions, user permissions, and structured Excel processing.

The system separates the delivery workflow into the following statuses:

  • Pending: The order has not been processed.
  • Process: The order is being prepared.
  • Done: The order is completed but has not been shipped.
  • Shipped: The order has been shipped and its audit information is recorded.
  • Hold: The delivery is temporarily suspended.

Key Features

  • Responsive delivery dashboard with status summaries and urgency indicators
  • Seven-day delivery quantity chart
  • Delivery monitoring using REQ ETD and customer MAX ETD
  • Master data management for destination companies, items, and quantity units
  • Search and filtering by date, status, destination, item, unit, and keyword
  • Bulk editing and bulk deletion
  • Bulk status updates for Done and Shipped deliveries
  • Persistent row selection across paginated delivery results
  • Shipment audit records containing the responsible user and execution time
  • Excel and CSV import with validation and duplicate prevention
  • Filtered Excel export with professional workbook formatting
  • Excel totals separated by quantity unit
  • Downloadable import template with instructions and master data sheets
  • Administrator and operator role-based access control
  • User and permission management
  • Automatic six-month delivery data retention
  • Manual retention command with dry-run support
  • Responsive desktop and mobile interface

Technical Implementation

The backend was built with Laravel 13 and PHP 8.3+, using:

  • Eloquent models and relationships
  • Database migrations
  • Form and import validation
  • Route middleware
  • Scheduled Artisan commands
  • Database indexes
  • Query pagination
  • Authentication and authorization

The frontend uses:

  • Blade templates
  • Tailwind CSS 4
  • Alpine.js
  • Lucide Icons
  • ApexCharts
  • Vite

ApexCharts is loaded dynamically only when the dashboard chart is present. This prevents pages without charts from downloading the chart library unnecessarily.

Role-based access control is implemented with Spatie Laravel Permission. Administrators can manage delivery records, imports, master data, users, permissions, and reports. Operators receive restricted access to operational delivery features.

Excel processing is implemented with Maatwebsite Excel. The import workflow:

  1. Reads Excel or CSV data in chunks.
  2. Normalizes supported column names and statuses.
  3. Validates destination, item, and quantity unit master data.
  4. Validates REQ ETD and MAX ETD values.
  5. Groups matching operational rows.
  6. Calculates grouped quantities.
  7. Updates existing records or inserts new records.
  8. Reports invalid rows without importing them.

The export workflow includes:

  • Filtered delivery records
  • Frozen header rows
  • Excel filters
  • Controlled column widths
  • Formatted dates and quantities
  • Status-based colors
  • Shipment audit columns
  • Landscape print configuration
  • Separate totals for every quantity unit
  • A dedicated instruction sheet

The production environment uses MySQL or MariaDB, secure session cookies, optimized Laravel caches, compiled frontend assets, HTTPS, and protected environment configuration.

Challenges

Preventing Duplicate Excel Imports

Repeated imports could create duplicate deliveries or incorrectly increase quantities. This was addressed using validation, operational grouping, chunk processing, and upsert logic based on:

  • Delivery item
  • Destination company
  • REQ ETD
  • MAX ETD
  • Quantity unit

Maintaining Accurate Quantity Totals

Delivery quantities may use different units, such as PCS and PAIR. Combining these values would produce misleading totals.

Dashboard summaries and Excel exports therefore calculate quantities separately for each unit.

Separating Completed and Shipped Orders

A completed order is not always immediately shipped. The workflow separates Done from Shipped so warehouse operators can identify completed orders that are still waiting for delivery.

Shipment audit information is only recorded when the status becomes Shipped.

Production File Permissions

Laravel requires write access to its runtime directories. Incorrect ownership of compiled views and cache files caused HTTP 500 errors in the production environment.

The deployment workflow resolves this by running Composer and Artisan commands as the CloudPanel website user and assigning the correct ownership to:

  • storage
  • bootstrap/cache

Result

The project provides a centralized workflow for monitoring finished goods deliveries, identifying urgent deadlines, processing operational Excel data, controlling user access, and recording shipment activity.

It also supports monthly Excel archiving before delivery records are removed by the configurable six-month retention process.