export type ReceiptListItem = {
  id: string;
  receipt_no: string;
  purchase: {
    id: string;
    purchase_no: string;
  };
  receipt_date: string;
  status: string;
  line_count: number;
  lot_count: number;
};

export type ReceiptDetail = {
  id: string;
  receipt_no: string;
  purchase: {
    id: string;
    purchase_no: string;
  };
  receipt_date: string;
  status: string;
  notes: string | null;
  lines: Array<{
    id: string;
    purchase_line_id: string;
    grade: { id: string; name: string } | null;
    qty_received: number;
    qty_accepted: number;
    qty_rejected: number;
    unit: { id: string; code: string };
    unit_cost: number;
    warehouse: { id: string; name: string };
    location: { id: string; name: string } | null;
    notes: string | null;
  }>;
  generated_lots: Array<{
    id: string;
    lot_code: string;
    status: string;
  }>;
};
