export type RegularSaleCandidateLot = {
  lot_id: string;
  lot_code: string;
  grade: string;
  unit_code: string;
  warehouse: string;
  location: string | null;
  available_qty: number;
  unit_cost: number;
  mal_unit_price: number | null;
  agent_name: string | null;
  agent_share_percent: number | null;
};

export type RegularSaleListItem = {
  id: string;
  sale_no: string;
  sale_date: string;
  buyer: {
    id: string;
    code: string;
    name: string;
  };
  buyer_currency_code: string;
  company_currency_code: string;
  exchange_rate: number | null;
  status: string;
  item_count: number;
  total_nominal_buyer: number;
  total_nominal_company: number;
  total_agent_commission: number;
};

export type RegularSaleDetail = {
  id: string;
  sale_no: string;
  sale_date: string;
  close_date: string | null;
  buyer: {
    id: string;
    code: string;
    name: string;
  };
  courier: {
    id: string;
    code: string;
    name: string;
  } | null;
  buyer_currency_code: string;
  company_currency_code: string;
  exchange_rate: number | null;
  shipping_cost_buyer: number;
  shipping_cost_company: number;
  shipping_receipt_file_url: string | null;
  total_nominal_buyer: number;
  total_nominal_company: number;
  total_agent_commission: number;
  status: string;
  notes: string | null;
  created_at: string;
  lines: Array<{
    id: string;
    lot_id: string;
    lot_code: string;
    grade: string;
    unit_code: string;
    warehouse: string;
    location: string | null;
    available_qty_snapshot: number;
    current_available_qty: number;
    mal_unit_price_snapshot: number | null;
    unit_cost: number;
    agent_name: string | null;
    agent_share_percent: number | null;
    qty_planned: number;
    selling_price_planned: number;
    qty_actual_sold: number | null;
    qty_returned: number | null;
    qty_shrinkage: number | null;
    selling_price_actual: number | null;
    notes: string | null;
  }>;
};
