import { BaseCustomer } from '@/types/api/master-data/customer';
import { BaseMetadata } from '@/types/api/api-general';

export type CustomerPaymentRow = {
  transaction_type: string;
  transaction_id: number;
  trans_date: string;
  delivery_date: string | null;
  reference: string;
  vehicle_numbers: string[];
  qty: number;
  weight: number;
  average_weight: number;
  unit_price: number;
  final_price: number;
  total_price: number;
  payment_amount: number;
  accounts_receivable: number;
  aging_day: number | null;
  status: string;
  pickup_info: string[];
  sales_person: string;
};

export type CustomerPaymentSummary = {
  total_qty: number;
  total_weight: number;
  total_final_amount: number;
  total_grand_amount: number;
  total_payment: number;
  total_accounts_receivable: number;
};

export type CustomerPaymentReport = BaseMetadata & {
  customer: BaseCustomer;
  initial_balance: number;
  rows: CustomerPaymentRow[];
  summary: CustomerPaymentSummary;
};
