export type CreateReceiptType = {
  companyId: string;
  items: ReceiptCreateItemsType[];
  isRecurring: boolean;
  recurringPeriod: number | undefined;
  maxRecurringCycles: number | undefined;
};

export type ReceiptCreateItemsType = {
  name: string;
  count: string | number;
  unitPrice: string | number;
  discount: string | number;
};

export type ReceiptItemType = {
  id: string;
  createdAt: string;
  updatedAt: string;
  name: string;
  count: string | number;
  unitPrice: string | number;
  discount: string | number;
  totalPrice: number;
  subscriptionPlan?: string | null;
  items: ReceiptItemType[];
  lateFee: number;
  company: {
    name: string;
  };
  dueDate: string;
  status: "PENDING" | "PAID" | "CANCELLED" | "EXPIRED" | "APPROVED";
  paidAt: string;
  isRecurring: boolean;
  recurringPeriod?: number;
  maxRecurringCycles?: number;
};

export type InvoiceUserItemType = {
  id: string;
  firstname: string;
  lastname: string;
  email: string;
  phone: string;
};

export type InvoiceStatus =
  | "PENDING"
  | "WAIT_PAYMENT"
  | "PAID"
  | "ARCHIVED"
  | "OVERDUE";
