#!/usr/bin/env python
"""
Quick script to verify the data migrations were successful.
"""
import os
import sys
import django

# Setup Django
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'xygbfpsg.settings')
django.setup()

from accounting.models import Account, FiscalPeriod

# Verify accounts
system_accounts = Account.objects.filter(is_system_account=True)
print(f"✓ System Accounts created: {system_accounts.count()}/16")

# List all accounts
print("\nSystem Accounts:")
for account in system_accounts.order_by('code'):
    print(f"  {account.code} - {account.name} ({account.account_type})")

# Verify fiscal period
fiscal_periods = FiscalPeriod.objects.all()
print(f"\n✓ Fiscal Periods created: {fiscal_periods.count()}")

for period in fiscal_periods:
    print(f"  {period.name} ({period.start_date} to {period.end_date}) - Status: {period.status}")

print("\n✓ Data migrations verified successfully!")
