<?php
require_once 'db/config.php';
require_once 'includes/accounting_helper.php';

try {
    echo "Checking acc_accounts table...\n";
    $accounts = db()->query("SELECT * FROM acc_accounts LIMIT 5")->fetchAll();
    echo "Found " . count($accounts) . " accounts.\n";
    print_r($accounts);

    echo "\nTesting getAccountBalance('1100')...\n";
    $balance = getAccountBalance('1100');
    echo "Balance for 1100: " . $balance . "\n";

} catch (Exception $e) {
    echo "Error: " . $e->getMessage() . "\n";
}

