import { Area } from '@/types/api/master-data/area';
import { Supplier } from '@/types/api/master-data/supplier';
import { Warehouse } from '@/types/api/master-data/warehouse';

export interface DebtSupplier {
  supplier: Supplier;
  initial_balance: number;
  rows: DebtRow[];
  total: DebtTotal;
}

export interface DebtTotal {
  aging: number;
  total_price: number;
  payment_price: number;
  debt_price: number;
}

export interface DebtRow {
  pr_number: string;
  po_number: string;
  po_date: string;
  received_date: string;
  aging: number;
  area: Area;
  warehouse: Warehouse;
  due_date: string;
  due_status: string;
  total_price: number;
  payment_price: number;
  debt_price: number;
  status: string;
  travel_number: string;
  balance: number;
}

// Filter Param
export interface DebtSupplierFilter {
  start_date?: string;
  end_date?: string;
  supplier_ids?: string;
  filter_by?: string;
}
