declare type TBillDetails = {
  _id: string;
  billItem: string;
  vat: string;
  discount: string;
  quantity: string;
  site: string;
  siteName: string;
  organization: string;
  createdBy: string;
  billCategory: string;
  unitId: string[];
  price: string;
};

declare type TBillingUnits = {
  _id?: string; //Used for Reference only temporary
  billId?: string;
  unitId?: string;
  unit?: string; // Block / Level / Unit
  unitOwner?: string;
  email?: string; // prompt user of their invoice via email
  contactNumber?: string;
  category?: string;
  billCategory?: string; // ex. Water, Electricity, Maintenance, etc.
  billFrom?: string | Date; // startDate of Billing Period
  billTo?: string | Date; // endDate of Billing Period
  dueDate?: string | Date; // dueDate of this unit bill
  preDueDateAlert?: string; // Date when the bill was sent (ex. 5 days before the dueDate)
  startPaymentDate?: string | Date; // days set before the dueDate ( preDueDateAlert - dueDate)
  referenceNumber?: string; // ex. INV-IDNo.-Date-0001
  paymentStatus?: string;
  amountPaid?: string | number; // Paid for Amount
  balance?: string | number; // If paymentStatus is partial, then there is always a balance
  billStatus?: string; // Active or Inactive
  paidBy?: string; // Management or resident
  datePaid?: string | Date;
  transaction_id?: string; // this is coming from RDP transaction
  billDetails: TBillDetails;
  items?: Array;
  createdAt?: string | Date;
  updatedAt?: string | Date;
  unitBill?: TBillingUnits[]; // Reference Numbers of unit bills
  method?: string;
  billDetails?: Array;
};

declare type TGetAllTBillingUnits = {
  items: TBillingUnits[];
  pageRange: string;
  pages: number;
};

declare type TUnitBillings = {
  _id?: ObjectId;
  unit?: string; // unit name
  unitId?: string | ObjectId;
  referenceNumber?: string; // ex. INV-IDNo.-Date-0001
  unitBill?: string[]; // Reference Numbers of unit bills
  paymentStatus?: PStatus;
  amountPaid?: string | number; // Paid for Amount (total amount paid for all unit bills)
  site?: string | ObjectId;
  organization?: string | ObjectId;
  paidBy?: string | ObjectId; // Management or resident
  datePaid?: string | Date;
  createdBy?: string | ObjectId;
  createdAt?: string | Date;
  updatedAt?: string | Date;
  transaction_id?: string; // this is coming from RDP transaction
};

declare type TUnitBillingCart = {
  _id?: ObjectId;
  unitId?: string | ObjectId;
  referenceNumber?: string; // ex. INV-IDNo.-Date-0001
  unitBill?: string[]; // Reference Numbers of unit bills
  paymentStatus?: PStatus;
  amountPaid?: string | number; // Paid for Amount
  site?: string | ObjectId;
  organization?: string | ObjectId;
  paidBy?: string | ObjectId; // Management or resident
  datePaid?: string | Date;
  createdBy?: string | ObjectId;
  createdAt?: string | Date;
  updatedAt?: string | Date;
};

declare type TBillRecords = {
  _id?: ObjectId;
  billItem?: string;
  billCategory?: string;
  price?: number | string;
  dueDate?: date | string;
  referenceNumber?: string;
};
