=== is_payout_weekday() — both branches, via injectable timestamp === PASS: Monday is a payout weekday PASS: Tuesday is a payout weekday PASS: Friday is a payout weekday PASS: Saturday is NOT a payout weekday PASS: Sunday is NOT a payout weekday PASS: late-Friday-UTC timestamp is still a weekday in Accra (same offset, no DST) === is_event_funds_available() — 24h hold after event date === PASS: event that happened yesterday has unlocked funds (24h default hold already elapsed) PASS: event that hasn't happened yet has locked funds PASS: event dated today still has locked funds (24h hold hasn't elapsed from midnight yet) PASS: with hold set to 0h, funds for an event dated today are available immediately === get_event_balances() / get_subfund_balance() — ledger math === PASS: GHS raised across general + sub-fund sums to 1300.00 PASS: USD raised is tracked separately, never blended with GHS PASS: funds are unlocked for an event dated in the past PASS: with no withdrawal requests yet, all of GHS raised is available PASS: committed = pending + approved (200 + 150), rejected request excluded entirely PASS: available = raised - committed (1300 - 350 = 950) PASS: event dated in the future reports funds_unlocked = false PASS: available is forced to 0 while funds are locked, even though raised > committed PASS: raised is still reported correctly while locked (only availability is gated) PASS: general fund GHS balance is 1000 before any transfer PASS: sub-fund 'Honeymoon' GHS balance is 300 before any transfer PASS: sub-fund 'Honeymoon' USD balance is tracked separately from its GHS balance PASS: get_subfund_balance() agrees with by_subfund for the general fund PASS: get_subfund_balance() agrees with by_subfund for a named sub-fund PASS: get_subfund_balance() is currency-scoped — the same sub-fund has a separate USD balance
Fatal error: Uncaught PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'currency' in 'INSERT INTO' in /home/verix/public_html/fete.verix.africa/tests/unit_tests_phase6.php:138 Stack trace: #0 /home/verix/public_html/fete.verix.africa/tests/unit_tests_phase6.php(138): PDO->exec('INSERT INTO sub...') #1 {main} thrown in /home/verix/public_html/fete.verix.africa/tests/unit_tests_phase6.php on line 138