Import/Export Operations Dashboard

User: Admin (user1) | Date:

Total Export Orders (Today)

45

Total Export Order Amount (Today)

₹ 5,66,500

Total Discount (Today)

₹ 8,750

Total Import Amount (30 Days)

₹ 1,50,250

Monthly Export Trend (Sell Value)

Tracking the gross sales value over the last 6 months.

Inventory Status by Category

Current stock value distribution across key categories.

Implementation Requirement Summary

Technical User Story

As a Backend Developer, I need to implement the data fetching and aggregation logic for the Dashboard's Key Performance Indicators (KPIs) and charts, so that the operational overview reflects real-time and accurate financial/inventory metrics for administrative review.

Acceptance Criteria

  • The Total SO KPI must display the count of all Export Orders (SO) created with a status of 'Completed' on the current date.
  • The Total SO Amount KPI must display the sum of the final, net amounts (after discounts) of all 'Completed' Sales Orders on the current date.
  • The Total Discount KPI must display the sum of all discount values applied across all 'Completed' Sales Orders on the current date.
  • The Total PO Amount KPI must display the sum of the total amount of all Purchase Orders (PO) with a status of 'Received' or 'Completed' within the last 30 calendar days.
  • The Monthly Sales Trend Line Chart must aggregate the total net SO Amount for each of the last six months and render it on the X (Month) and Y (Amount) axes.
  • The Inventory Status by Category Doughnut Chart must calculate the total stock value (Current Stock * Cost Price) for all items in a category and display the top 5 categories by this value, showing the percentage distribution.

Validation Scenario

  • Scenario: Create a new SO for ₹10,000 today with a ₹500 discount and mark it as 'Completed'.
  • Expected Result: Total SO increases by 1; Total SO Amount increases by ₹9,500; Total Discount increases by ₹500.