getReceiptPerformance method

Future<Map<String, dynamic>> getReceiptPerformance({
  1. DateTime? startDate,
  2. DateTime? endDate,
  3. String? supplierId,
})

Get receipt performance metrics

Implementation

Future<Map<String, dynamic>> getReceiptPerformance({
  DateTime? startDate,
  DateTime? endDate,
  String? supplierId,
}) async {
  final queryParams = <String, dynamic>{};
  if (startDate != null) queryParams['startDate'] = startDate.toIso8601String();
  if (endDate != null) queryParams['endDate'] = endDate.toIso8601String();
  if (supplierId != null) queryParams['supplierId'] = supplierId;

  final response = await _apiClient.get<Map<String, dynamic>>(
    '/api/v1/purchase/analytics/receipt-performance',
    queryParameters: queryParams,
  );

  return response;
}