Files
ERP_Distribution/Distribution/PLAN.md
T
Kalana B. Thilakarathna 6d8b6b3e59 Add DeliveryTask, Payment, and Sale features
Implemented DeliveryTask, Payment, and Sale entities with full CRUD, business logic, and API endpoints. Updated Order/OrderItem for sale linkage and fulfillment tracking. Registered new DbSets and DI services. Revised documentation for delivery, sale, and payment workflows.
2026-08-24 21:34:57 +05:30

1.6 KiB

Phase Plan - Route and Store Management

Scope

Build the full vertical-slice stack for: Region, Route, Vehicle, Store, Warehouse, Order, OrderItem.

Item model is sourced from ERP Core - excluded from this phase.

Historical note: SaleRoute was marked TBD here. For now, rides stay single-route and route assignment remains simple until further clarification.


Project Structure (target)

Distribution/
|-- Models/
|   |-- Template.cs
|   |-- Region.cs
|   |-- Route.cs
|   |-- Vehicle.cs
|   |-- Store.cs
|   |-- Warehouse.cs
|   |-- SaleRoute.cs
|   |-- Order.cs
|   |-- OrderItem.cs
|   |-- DeliveryRun.cs
|   `-- Item.cs
|-- Data/
|   `-- AppDBContext.cs
|-- Infra/
|   |-- UoW/
|   |   |-- IUnitOfWork.cs
|   |   `-- EFUnitOfWork.cs
|   `-- Repositories/
|       |-- IGenericRepo.cs
|       `-- GenericRepo.cs
`-- Features/
    |-- Region/
    |-- Route/
    |-- Vehicle/
    |-- Store/
    |-- Warehouse/
    `-- Order/

Hard Rules

  • Only uow.CommitAsync() in services - never in repositories.
  • Use DateTime.Now - never DateTime.UtcNow.
  • Never build anything not explicitly requested.

Deferred

Item Reason
SaleRoute Re-evaluate after ride/route design is clarified
Item model Sourced from ERP Core
DeliveryRun Not in scope for this phase
Tests No test project yet

Note

This file is historical phase planning only. Current business definitions for ride, sale, order, and fulfillment are maintained in:

  • docs/03_ride_lifecycle.md
  • docs/04_loading_event.md
  • docs/05_delivery_ride.md
  • docs/06_sale_ride.md