Project

General

Profile

Actions

ClientProject #2808

open

ClientProject #2305: [Module] Report

ClientProject #2306: Customer Reports

BE merge customer report to sales executive report

Added by Nazmul Hossain Shovon 8 months ago. Updated 8 months ago.

Status:
Pending
Priority:
High
Assignee:
-
Category:
-
Target version:
-
Start date:
08/06/2025
Due date:
% Done:

0%

Estimated time:
Spent time:

Description

Description
Customer Balance Sheet API

Refactored the customer balance sheet logic into smaller service functions for better maintainability.
Made startDate and endDate query parameters optional. If omitted, the API will return all transactions for the customer.
Only approved sales and payments are now included in the balance calculation and report.
Types for customer balance logic have been moved to a separate file.
Sales Executive Report

The executive sales report now only includes approved sales records.
How to Test
Customer Balance Sheet API

Endpoint : GET /api/reports/customer-balances/v1/balance-sheet
Required Query : customerId
Optional Queries : startDate, endDate (format: YYYY-MM-DD)
Example :
All transactions:
GET /api/reports/customer-balances/v1/balance-sheet?customerId=1
Filtered by date:
GET /api/reports/customer-balances/v1/balance-sheet?customerId=1&startDate=2025-08-01&endDate=2025-08-06
Expected :
Only approved sales and payments are included in the response.
If startDate/endDate are omitted, the full history is returned.

Sales Executive Report

Endpoint: (as previously used)
Expected:
Only approved sales are included in the report.
Test using Postman by sending requests with different combinations of customerId, startDate, and endDate to verify filtering and correctness.

Actions #1

Updated by Nazmul Hossain Shovon 8 months ago

  • Description updated (diff)
Actions

Also available in: Atom PDF