TRUNCATE TABLE
  public.journal_lines,
  public.journal_entries,
  public.invoice_items,
  public.invoice_approvals,
  public.invoice_emails,
  public.invoice_reminders,
  public.payment_allocations,
  public.payments,
  public.invoices,
  public.bill_items,
  public.bill_payments,
  public.bills,
  public.expenses,
  public.expense_claim_approvals,
  public.expense_claims,
  public.booking_costs,
  public.booking_approvals,
  public.bookings,
  public.transfers,
  public.reconciliation_items,
  public.bank_reconciliations,
  public.bank_transactions,
  public.owner_investments,
  public.owner_withdrawals,
  public.profit_distribution_items,
  public.profit_distributions,
  public.payroll_items,
  public.payroll_runs,
  public.staff_advances,
  public.attendance,
  public.leave_requests,
  public.sms_logs,
  public.audit_logs
CASCADE;

UPDATE public.number_sequences
SET next_value = 1
WHERE key IN ('journal','invoice','payment','booking','booking_cost','expense','expense_claim','bill','billpay','transfer','advance','payroll');