PHPUnit 11.5.57 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.3.35
Configuration: C:\Users\USER\Dev\BitMed\phpunit.xml

...............................................................  63 / 719 (  8%)
............................................................... 126 / 719 ( 17%)
............................................................... 189 / 719 ( 26%)
............................................................... 252 / 719 ( 35%)
............................................................... 315 / 719 ( 43%)
............................................................... 378 / 719 ( 52%)
............................................................... 441 / 719 ( 61%)
.....................................................F......... 504 / 719 ( 70%)
...............S............................................... 567 / 719 ( 78%)
............................................................... 630 / 719 ( 87%)
............................................................... 693 / 719 ( 96%)
..........................                                      719 / 719 (100%)

Time: 24:48.685, Memory: 92.00 MB

There was 1 failure:

1) Tests\Feature\PaymentCollectionTest::test_the_till_screen_offers_the_settled_and_draft_invoices_nothing
Failed asserting that '<!DOCTYPE html>\n
<html lang="en">\n
<head>\n
    <meta charset="utf-8">\n
    <meta name="viewport" content="width=device-width, initial-scale=1">\n
    <meta name="robots" content="noindex, nofollow">\n
    \n
    <meta name="csrf-token" content="15lFiIasHyW5uhHfeIKV4UttLeSpnIvhl0s2vvRZ">\n
    <title>BITMED — BITMED</title>\n
    <script>\n
        // Resolve the theme before first paint so there is no flash of the\n
        // wrong palette. An explicit choice is remembered; otherwise the\n
        // operating-system preference is honoured.\n
        (function () {\n
            try {\n
                var saved = window.localStorage.getItem('bitmed-theme');\n
                if (saved !== 'light' && saved !== 'dark') {\n
                    saved = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\n
                }\n
                document.documentElement.setAttribute('data-theme', saved);\n
            } catch (error) {\n
                document.documentElement.setAttribute('data-theme', 'light');\n
            }\n
        })();\n
    </script>\n
    <link rel="preload" href="/assets/fonts/InterVariable.woff2" as="font" type="font/woff2" crossorigin>\n
    <link rel="stylesheet" href="/assets/css/bitmed.css">\n
</head>\n
<body>\n
<a class="skip-link" href="#main-content">Skip to main content</a>\n
\n
<div class="app" data-nav="closed" id="app-shell">\n
    <aside class="app__sidebar" aria-label="Primary navigation">\n
        <a class="app__brand" href="http://127.0.0.1:8000/dashboard">\n
            <span class="app__brand-mark" aria-hidden="true">B</span>\n
            <span class="app__brand-text">\n
                BITMED\n
                <span class="app__brand-sub">\n
                    Lagos Family Clinic\n
                </span>\n
            </span>\n
        </a>\n
\n
        <nav class="app__nav">\n
                            <div class="app__nav-group">\n
                    <div class="app__nav-heading">\n
                                                    <svg class="app__nav-icon" aria-hidden="true"><use href="/assets/icons/sprite.svg#home"></use></svg>\n
                                                Overview\n
                    </div>\n
                                            <a class="app__nav-link"\n
                           href="http://127.0.0.1:8000/dashboard"\n
                           >\n
                                                            <svg class="app__nav-item-icon" aria-hidden="true"><use href="/assets/icons/sprite.svg#layout-dashboard"></use></svg>\n
                                                        <span>Dashboard</span>\n
                                                    </a>\n
                                    </div>\n
                            <div class="app__nav-group">\n
                    <div class="app__nav-heading">\n
                                                    <svg class="app__nav-icon" aria-hidden="true"><use href="/assets/icons/sprite.svg#heart-pulse"></use></svg>\n
                                                Care\n
                    </div>\n
                                            <a class="app__nav-link"\n
                           href="http://127.0.0.1:8000/appointments"\n
                           >\n
                                                            <svg class="app__nav-item-icon" aria-hidden="true"><use href="/assets/icons/sprite.svg#calendar"></use></svg>\n
                                                        <span>Appointments</span>\n
                                                    </a>\n
                                            <a class="app__nav-link"\n
                           href="http://127.0.0.1:8000/queue"\n
                           >\n
                                                            <svg class="app__nav-item-icon" aria-hidden="true"><use href="/assets/icons/sprite.svg#list-check"></use></svg>\n
                                                        <span>Queue</span>\n
                                                    </a>\n
                                            <a class="app__nav-link"\n
                           href="http://127.0.0.1:8000/calendar"\n
                           >\n
                                                            <svg class="app__nav-item-icon" aria-hidden="true"><use href="/assets/icons/sprite.svg#calendar-days"></use></svg>\n
                                                        <span>Calendar</span>\n
                                                    </a>\n
                                    </div>\n
                            <div class="app__nav-group">\n
                    <div class="app__nav-heading">\n
                                                    <svg class="app__nav-icon" aria-hidden="true"><use href="/assets/icons/sprite.svg#credit-card"></use></svg>\n
                                                Finance\n
                    </div>\n
                                            <a class="app__nav-link"\n
                           href="http://127.0.0.1:8000/service-tariffs"\n
                           >\n
                                                            <svg class="app__nav-item-icon" aria-hidden="true"><use href="/assets/icons/sprite.svg#file-text"></use></svg>\n
                                                        <span>Service catalogue</span>\n
                                                    </a>\n
                                            <a class="app__nav-link"\n
                           href="http://127.0.0.1:8000/product-items"\n
                           >\n
                                                            <svg class="app__nav-item-icon" aria-hidden="true"><use href="/assets/icons/sprite.svg#package"></use></svg>\n
                                                        <span>Product catalogue</span>\n
                                                    </a>\n
                                            <a class="app__nav-link"\n
                           href="http://127.0.0.1:8000/invoices"\n
                           >\n
                                                            <svg class="app__nav-item-icon" aria-hidden="true"><use href="/assets/icons/sprite.svg#file-invoice"></use></svg>\n
                                                        <span>Invoices</span>\n
                                                    </a>\n
                                            <a class="app__nav-link"\n
                           href="http://127.0.0.1:8000/payments/collect"\n
                            aria-current="page" >\n
                                                            <svg class="app__nav-item-icon" aria-hidden="true"><use href="/assets/icons/sprite.svg#banknote"></use></svg>\n
                                                        <span>Collect payment</span>\n
                                                    </a>\n
                                            <a class="app__nav-link"\n
                           href="http://127.0.0.1:8000/payment-points"\n
                           >\n
                                                            <svg class="app__nav-item-icon" aria-hidden="true"><use href="/assets/icons/sprite.svg#credit-card"></use></svg>\n
                                                        <span>Payment points</span>\n
                                                    </a>\n
                                            <a class="app__nav-link"\n
                           href="http://127.0.0.1:8000/wallets"\n
                           >\n
                                                            <svg class="app__nav-item-icon" aria-hidden="true"><use href="/assets/icons/sprite.svg#wallet"></use></svg>\n
                                                        <span>Wallets</span>\n
                                                    </a>\n
                                            <a class="app__nav-link"\n
                           href="http://127.0.0.1:8000/cards"\n
                           >\n
                                                            <svg class="app__nav-item-icon" aria-hidden="true"><use href="/assets/icons/sprite.svg#credit-card"></use></svg>\n
                                                        <span>Cards</span>\n
                                                    </a>\n
                                            <a class="app__nav-link"\n
                           href="http://127.0.0.1:8000/payment-adapters"\n
                           >\n
                                                            <svg class="app__nav-item-icon" aria-hidden="true"><use href="/assets/icons/sprite.svg#terminal"></use></svg>\n
                                                        <span>Payment adapters</span>\n
                                                    </a>\n
                                            <a class="app__nav-link"\n
                           href="http://127.0.0.1:8000/refunds"\n
                           >\n
                                                            <svg class="app__nav-item-icon" aria-hidden="true"><use href="/assets/icons/sprite.svg#rotate-ccw"></use></svg>\n
                                                        <span>Refunds</span>\n
                                                    </a>\n
                                    </div>\n
                            <div class="app__nav-group">\n
                    <div class="app__nav-heading">\n
                                                    <svg class="app__nav-icon" aria-hidden="true"><use href="/assets/icons/sprite.svg#help-circle"></use></svg>\n
                                                Assistance\n
                    </div>\n
                                            <a class="app__nav-link"\n
                           href="http://127.0.0.1:8000/ask"\n
                           >\n
                                                            <svg class="app__nav-item-icon" aria-hidden="true"><use href="/assets/icons/sprite.svg#bot"></use></svg>\n
                                                        <span>Ask BITMED AI</span>\n
                                                    </a>\n
                                    </div>\n
                    </nav>\n
\n
        <div class="app__sidebar-foot">\n
            <button class="theme-toggle" type="button" aria-pressed="false">\n
                <svg class="app__nav-item-icon" aria-hidden="true"><use href="/assets/icons/sprite.svg#moon"></use></svg>\n
                <span class="theme-toggle__label">Dark mode</span>\n
            </button>\n
        </div>\n
    </aside>\n
\n
    <div class="app__main">\n
        <header class="app__topbar">\n
            <button class="app__nav-toggle" type="button" aria-expanded="false" aria-controls="app-shell">\n
                <svg class="app__nav-item-icon" aria-hidden="true"><use href="/assets/icons/sprite.svg#menu"></use></svg>\n
                <span>Menu</span>\n
            </button>\n
\n
                            <div class="topbar-search topbar-search--disabled" role="search" aria-disabled="true"\n
                     title="Patient search requires the patients.view permission.">\n
                    <svg class="topbar-search__icon" aria-hidden="true"><use href="/assets/icons/sprite.svg#search"></use></svg>\n
                    <span class="topbar-search__placeholder">Search unavailable for your role</span>\n
                </div>\n
            \n
            <div class="app__topbar-spacer"></div>\n
\n
                            <div class="topbar-actions">\n
                                            <details class="menu add-menu">\n
                            <summary class="btn btn--dark">\n
                                <svg class="btn-icon" aria-hidden="true"><use href="/assets/icons/sprite.svg#plus"></use></svg>\n
                                <span>Add</span>\n
                            </summary>\n
                            <div class="menu__panel">\n
                                                                    <a class="menu__item" href="http://127.0.0.1:8000/invoices/create">\n
                                        <svg class="menu__icon" aria-hidden="true"><use href="/assets/icons/sprite.svg#file-invoice"></use></svg>\n
                                        <span>New invoice</span>\n
                                    </a>\n
                                                            </div>\n
                        </details>\n
                    \n
                    <button class="icon-btn" type="button" aria-disabled="true"\n
                            title="Direct messaging is not part of this build yet.">\n
                        <svg class="icon-btn__icon" aria-hidden="true"><use href="/assets/icons/sprite.svg#message"></use></svg>\n
                        <span class="visually-hidden">Messages — not available in this build</span>\n
                    </button>\n
\n
                    <button class="icon-btn" type="button" aria-disabled="true"\n
                            title="Notification centre is not part of this build yet.">\n
                        <svg class="icon-btn__icon" aria-hidden="true"><use href="/assets/icons/sprite.svg#bell"></use></svg>\n
                        <span class="visually-hidden">Notifications — not available in this build</span>\n
                    </button>\n
\n
                    <a class="icon-btn" href="http://127.0.0.1:8000/settings/two-step" title="Account settings">\n
                        <svg class="icon-btn__icon" aria-hidden="true"><use href="/assets/icons/sprite.svg#settings"></use></svg>\n
                        <span class="visually-hidden">Account settings</span>\n
                    </a>\n
\n
                                        <details class="menu user-menu">\n
                        <summary class="user-chip">\n
                            <span class="user-avatar" aria-hidden="true">KO</span>\n
                            <span class="user-chip__meta">\n
                                <strong>Kelechi Obi</strong>\n
                                <span>Cashier / accountant</span>\n
                            </span>\n
                            <svg class="user-chip__caret" aria-hidden="true"><use href="/assets/icons/sprite.svg#chevron-down"></use></svg>\n
                        </summary>\n
                        <div class="menu__panel menu__panel--right">\n
                            <div class="menu__header">\n
                                <strong>Kelechi Obi</strong>\n
                                <span>cashier@lagosfamilyclinic.bitmed.test</span>\n
                                <span class="menu__role">Cashier / accountant</span>\n
                            </div>\n
                            <a class="menu__item" href="http://127.0.0.1:8000/settings/two-step">\n
                                <svg class="menu__icon" aria-hidden="true"><use href="/assets/icons/sprite.svg#shield"></use></svg>\n
                                <span>Two-step verification</span>\n
                            </a>\n
                            <a class="menu__item" href="http://127.0.0.1:8000/dashboard">\n
                                <svg class="menu__icon" aria-hidden="true"><use href="/assets/icons/sprite.svg#home"></use></svg>\n
                                <span>Dashboard</span>\n
                            </a>\n
                            <form method="POST" action="http://127.0.0.1:8000/logout">\n
                                <input type="hidden" name="_token" value="15lFiIasHyW5uhHfeIKV4UttLeSpnIvhl0s2vvRZ" autocomplete="off">                                <button class="menu__item menu__item--button" type="submit">\n
                                    <svg class="menu__icon" aria-hidden="true"><use href="/assets/icons/sprite.svg#log-out"></use></svg>\n
                                    <span>Sign out</span>\n
                                </button>\n
                            </form>\n
                        </div>\n
                    </details>\n
                </div>\n
                    </header>\n
\n
        <main class="app__content" id="main-content">\n
            \n
            \n
            <div class="container mt-4">\n
    <div class="page-head" style="margin-bottom: 1rem;">\n
        <div>\n
            <h1>Collect payment</h1>\n
            <p class="lede">Enter an invoice number, a patient number or a ten-digit account number. The invoices that payer still owes are listed below and any of them can be settled at once.</p>\n
        </div>\n
        <div class="page-head__actions">\n
            <a href="http://127.0.0.1:8000/payment-points" class="btn btn--ghost">Payment points</a>\n
        </div>\n
    </div>\n
\n
            \n
    <div class="grid grid--main">\n
        <div class="stack">\n
            <section class="card">\n
                <div class="card__head"><h2>1 — Find the payer</h2></div>\n
                <div class="card__body">\n
                    <form method="GET" action="http://127.0.0.1:8000/payments/collect" class="stack stack--sm">\n
                        <div class="field">\n
                            <label for="payment_point_id">Payment point <span class="text-danger">*</span></label>\n
                            <select name="payment_point_id" id="payment_point_id" required>\n
                                                                    <option value="1" selected>\n
                                        Main Cashier (CASHIER-LAG)\n
                                    </option>\n
                                                                    <option value="2" >\n
                                        Pharmacy Counter (PHARMACY-LAG)\n
                                    </option>\n
                                                            </select>\n
                            <p class="field__hint">The point decides which transaction kinds this collection is allowed to take.</p>\n
                        </div>\n
\n
                        <div class="field">\n
                            <label for="identifier">Invoice, patient or account number <span class="text-danger">*</span></label>\n
                            <input\n
                                type="search"\n
                                name="identifier"\n
                                id="identifier"\n
                                value="LAG-OWE-0001"\n
                                maxlength="191"\n
                                autocomplete="off"\n
                                autofocus\n
                                placeholder="e.g. LAG-DEMO-0001, P000002 or 1000000001"\n
                                aria-describedby="identifier-hint"\n
                            >\n
                            <p class="field__hint" id="identifier-hint">\n
                                An invoice number is matched first, then a ten-digit account number, then a patient number.\n
                            </p>\n
                        </div>\n
\n
                        <div class="row row--end">\n
                            <button class="btn btn--primary" type="submit">Find</button>\n
                        </div>\n
                    </form>\n
                </div>\n
            </section>\n
\n
                            <section class="card">\n
                    <div class="card__head">\n
                        <h2>2 — Invoices to collect</h2>\n
                    </div>\n
                    <div class="card__body">\n
                        <dl class="meta" style="margin-bottom: 1rem;">\n
                            <dt>Payer</dt>\n
                            <dd>Bello Aisha</dd>\n
                                                            <dt>Patient number</dt>\n
                                <dd class="tnum">P000001</dd>\n
                                                        <dt>Account number</dt>\n
                            <dd class="tnum">1000000002</dd>\n
                            <dt>Account balance</dt>\n
                            <dd class="tnum">40,000.00 NGN</dd>\n
                            <dt>Found by</dt>\n
                            <dd>invoice number</dd>\n
                            <dt>Outstanding</dt>\n
                            <dd class="tnum"><strong>23,500.00 NGN</strong> across 2 invoices</dd>\n
                        </dl>\n
\n
                        <form method="POST" action="http://127.0.0.1:8000/payments/collect" id="collect-form" class="stack stack--sm">\n
                            <input type="hidden" name="_token" value="15lFiIasHyW5uhHfeIKV4UttLeSpnIvhl0s2vvRZ" autocomplete="off">                            <input type="hidden" name="payment_point_id" value="1">\n
                            <input type="hidden" name="identifier" value="LAG-OWE-0001">\n
\n
                            <div style="overflow: auto;">\n
                                <table class="table">\n
                                    <caption class="sr-only">Outstanding invoices for this payer, with the amount to collect on each</caption>\n
                                    <thead>\n
                                        <tr>\n
                                            <th scope="col"><span class="sr-only">Collect</span></th>\n
                                            <th scope="col">Invoice</th>\n
                                            <th scope="col">Issued</th>\n
                                            <th scope="col" class="num">Amount</th>\n
                                            <th scope="col" class="num">Paid</th>\n
                                            <th scope="col" class="num">Outstanding</th>\n
                                            <th scope="col" class="num">Collect now</th>\n
                                        </tr>\n
                                    </thead>\n
                                    <tbody>\n
                                                                                    <tr>\n
                                                <td>\n
                                                    <label class="checkbox" for="pick-7">\n
                                                        <input\n
                                                            type="checkbox"\n
                                                            id="pick-7"\n
                                                            class="pick"\n
                                                            value="7"\n
                                                            data-balance="8500.00"\n
                                                            checked\n
                                                        >\n
                                                        <span class="sr-only">Collect invoice LAG-OWE-0001</span>\n
                                                    </label>\n
                                                </td>\n
                                                <td>\n
                                                    <a href="http://127.0.0.1:8000/invoices/LAG-OWE-0001" style="white-space: nowrap;">LAG-OWE-0001</a>\n
                                                    <div>\n
                                                        <span class="badge badge--warning">\n
                                                            <span class="badge__dot" aria-hidden="true"></span>\n
                                                            Issued\n
                                                        </span>\n
                                                    </div>\n
                                                </td>\n
                                                <td>04/10/2026</td>\n
                                                <td class="num">8,500.00</td>\n
                                                <td class="num">0.00</td>\n
                                                <td class="num">8,500.00</td>\n
                                                <td class="num">\n
                                                    <input\n
                                                        type="number"\n
                                                        name="lines[0][amount]"\n
                                                        class="amount"\n
                                                        step="0.01"\n
                                                        min="0.01"\n
                                                        max="8500.00"\n
                                                        value="8500.00"\n
                                                        inputmode="decimal"\n
                                                        aria-label="Amount to collect on invoice LAG-OWE-0001"\n
                                                    >\n
                                                    <input type="hidden" name="lines[0][invoice_id]" value="7">\n
                                                </td>\n
                                            </tr>\n
                                                                                    <tr>\n
                                                <td>\n
                                                    <label class="checkbox" for="pick-8">\n
                                                        <input\n
                                                            type="checkbox"\n
                                                            id="pick-8"\n
                                                            class="pick"\n
                                                            value="8"\n
                                                            data-balance="15000.00"\n
                                                            checked\n
                                                        >\n
                                                        <span class="sr-only">Collect invoice LAG-OWE-0002</span>\n
                                                    </label>\n
                                                </td>\n
                                                <td>\n
                                                    <a href="http://127.0.0.1:8000/invoices/LAG-OWE-0002" style="white-space: nowrap;">LAG-OWE-0002</a>\n
                                                    <div>\n
                                                        <span class="badge badge--warning">\n
                                                            <span class="badge__dot" aria-hidden="true"></span>\n
                                                            Part paid\n
                                                        </span>\n
                                                    </div>\n
                                                </td>\n
                                                <td>08/10/2026</td>\n
                                                <td class="num">24,000.00</td>\n
                                                <td class="num">9,000.00</td>\n
                                                <td class="num">15,000.00</td>\n
                                                <td class="num">\n
                                                    <input\n
                                                        type="number"\n
                                                        name="lines[1][amount]"\n
                                                        class="amount"\n
                                                        step="0.01"\n
                                                        min="0.01"\n
                                                        max="15000.00"\n
                                                        value="15000.00"\n
                                                        inputmode="decimal"\n
                                                        aria-label="Amount to collect on invoice LAG-OWE-0002"\n
                                                    >\n
                                                    <input type="hidden" name="lines[1][invoice_id]" value="8">\n
                                                </td>\n
                                            </tr>\n
                                                                            </tbody>\n
                                    <tfoot>\n
                                        <tr>\n
                                            <th scope="row" colspan="6" class="num">Total to collect</th>\n
                                            <td class="num"><strong id="total" aria-live="polite">0.00</strong> NGN</td>\n
                                        </tr>\n
                                    </tfoot>\n
                                </table>\n
                            </div>\n
\n
                            <div class="row row--between">\n
                                <button type="button" class="btn btn--outline" id="pay-all">Pay all outstanding in full</button>\n
                                <p class="hint" id="selection-count" aria-live="polite"></p>\n
                            </div>\n
\n
                            <div class="form-grid">\n
                                <div class="field">\n
                                    <label for="method">How was it paid? <span class="text-danger">*</span></label>\n
                                    <select name="method" id="method" required>\n
                                                                                    <option value="cash">\n
                                                Cash\n
                                            </option>\n
                                                                                    <option value="card">\n
                                                Card (debits the payer account)\n
                                            </option>\n
                                                                                    <option value="tap_to_pay">\n
                                                Tap-to-pay (debits the payer account)\n
                                            </option>\n
                                                                                    <option value="wallet">\n
                                                From the payer account balance\n
                                            </option>\n
                                                                            </select>\n
                                </div>\n
\n
                                <div class="field" id="card-field" hidden>\n
                                    <label for="card_id">Card presented</label>\n
                                    <select name="card_id" id="card_id">\n
                                        <option value="">— select the card —</option>\n
                                                                                    <option value="1">****-****-****-4B6D (Virtual)</option>\n
                                                                            </select>\n
                                    <p class="field__hint">The card must be one this payer holds; the money leaves their account.</p>\n
                                </div>\n
                            </div>\n
\n
                            <div class="row row--end">\n
                                <button class="btn btn--primary" type="submit">Collect</button>\n
                            </div>\n
\n
                            <p class="hint">Sandbox — this records a demo collection against the clinic ledger. No real payment is taken and no real account is debited.</p>\n
                        </form>\n
                    </div>\n
                </section>\n
                    </div>\n
\n
        <aside class="stack">\n
            \n
            <section class="card">\n
                <div class="card__head"><h2>Recent collections</h2></div>\n
                <div class="card__body" style="overflow: auto;">\n
                                            <table class="table table--compact">\n
                            <caption class="sr-only">Recent collections at this clinic</caption>\n
                            <thead>\n
                                <tr>\n
                                    <th scope="col">When</th>\n
                                    <th scope="col">Invoice</th>\n
                                    <th scope="col" class="num">Amount</th>\n
                                    <th scope="col">Method</th>\n
                                </tr>\n
                            </thead>\n
                            <tbody>\n
                                                                    <tr>\n
                                        <td>15/10 09:15</td>\n
                                        <td>LAG-OWE-1002</td>\n
                                        <td class="num">2,000.00</td>\n
                                        <td>cash</td>\n
                                    </tr>\n
                                                                    <tr>\n
                                        <td>12/10 09:15</td>\n
                                        <td>LAG-OWE-0003</td>\n
                                        <td class="num">5,200.00</td>\n
                                        <td>cash</td>\n
                                    </tr>\n
                                                                    <tr>\n
                                        <td>09/10 09:15</td>\n
                                        <td>LAG-OWE-0002</td>\n
                                        <td class="num">9,000.00</td>\n
                                        <td>cash</td>\n
                                    </tr>\n
                                                            </tbody>\n
                        </table>\n
                                    </div>\n
            </section>\n
        </aside>\n
    </div>\n
</div>\n
\n
        </main>\n
\n
        <footer class="app__footer">\n
            Synthetic demonstration data only. No real patient records, and no real\n
            payments or notifications are generated by this build.\n
        </footer>\n
    </div>\n
</div>\n
\n
<script>\n
    (function () {\n
        var shell = document.getElementById('app-shell');\n
        var toggle = document.querySelector('.app__nav-toggle');\n
        if (shell && toggle) {\n
            toggle.addEventListener('click', function () {\n
                var open = shell.getAttribute('data-nav') === 'open';\n
                shell.setAttribute('data-nav', open ? 'closed' : 'open');\n
                toggle.setAttribute('aria-expanded', open ? 'false' : 'true');\n
            });\n
        }\n
\n
        // Only one top-bar menu is open at a time.\n
        var menus = Array.prototype.slice.call(document.querySelectorAll('details.menu'));\n
        menus.forEach(function (menu) {\n
            menu.addEventListener('toggle', function () {\n
                if (!menu.open) return;\n
                menus.forEach(function (other) {\n
                    if (other !== menu) other.open = false;\n
                });\n
            });\n
        });\n
\n
        document.addEventListener('click', function (event) {\n
            menus.forEach(function (menu) {\n
                if (menu.open && !menu.contains(event.target)) menu.open = false;\n
            });\n
        });\n
\n
        document.addEventListener('keydown', function (event) {\n
            if (event.key !== 'Escape') return;\n
            if (shell && toggle) {\n
                shell.setAttribute('data-nav', 'closed');\n
                toggle.setAttribute('aria-expanded', 'false');\n
            }\n
            menus.forEach(function (menu) { menu.open = false; });\n
        });\n
\n
        var themeButton = document.querySelector('.theme-toggle');\n
\n
        function syncThemeButton() {\n
            if (!themeButton) return;\n
            var dark = document.documentElement.getAttribute('data-theme') === 'dark';\n
            themeButton.setAttribute('aria-pressed', dark ? 'true' : 'false');\n
            var label = themeButton.querySelector('.theme-toggle__label');\n
            if (label) label.textContent = dark ? 'Light mode' : 'Dark mode';\n
        }\n
\n
        if (themeButton) {\n
            syncThemeButton();\n
            themeButton.addEventListener('click', function () {\n
                var dark = document.documentElement.getAttribute('data-theme') === 'dark';\n
                var next = dark ? 'light' : 'dark';\n
                document.documentElement.setAttribute('data-theme', next);\n
                try {\n
                    window.localStorage.setItem('bitmed-theme', next);\n
                } catch (error) {\n
                    /* Storage may be unavailable; the choice simply does not persist. */\n
                }\n
                syncThemeButton();\n
            });\n
        }\n
    })();\n
</script>\n
<script>\n
(function () {\n
    var form = document.getElementById('collect-form');\n
    if (!form) { return; }\n
\n
    var rows = Array.prototype.slice.call(form.querySelectorAll('tbody tr'));\n
    var total = document.getElementById('total');\n
    var counter = document.getElementById('selection-count');\n
    var payAll = document.getElementById('pay-all');\n
\n
    function pairFor(row) {\n
        return {\n
            pick: row.querySelector('.pick'),\n
            amount: row.querySelector('.amount')\n
        };\n
    }\n
\n
    function money(value) {\n
        // Grouped like every other figure on the page, which the raw value\n
        // from the input does not do.\n
        return (Math.round(value * 100) / 100)\n
            .toFixed(2)\n
            .replace(/\B(?=(\d{3})+(?!\d))/g, ',');\n
    }\n
\n
    function recalculate() {\n
        var sum = 0;\n
        var picked = 0;\n
\n
        rows.forEach(function (row) {\n
            var pair = pairFor(row);\n
            var on = pair.pick.checked;\n
            pair.amount.disabled = !on;\n
\n
            if (!on) { return; }\n
\n
            picked += 1;\n
            sum += parseFloat(pair.amount.value || '0') || 0;\n
        });\n
\n
        total.textContent = money(sum);\n
        counter.textContent = picked === 1\n
            ? '1 invoice selected.'\n
            : picked + ' invoices selected.';\n
    }\n
\n
    rows.forEach(function (row) {\n
        var pair = pairFor(row);\n
\n
        pair.pick.addEventListener('change', function () {\n
            if (pair.pick.checked && !pair.amount.value) {\n
                pair.amount.value = pair.pick.getAttribute('data-balance');\n
            }\n
            recalculate();\n
        });\n
\n
        pair.amount.addEventListener('input', function () {\n
            if (!pair.pick.checked) {\n
                pair.pick.checked = true;\n
            }\n
            recalculate();\n
        });\n
    });\n
\n
    if (payAll) {\n
        payAll.addEventListener('click', function () {\n
            rows.forEach(function (row) {\n
                var pair = pairFor(row);\n
                pair.pick.checked = true;\n
                pair.amount.value = pair.pick.getAttribute('data-balance');\n
            });\n
            recalculate();\n
        });\n
    }\n
\n
    var method = document.getElementById('method');\n
    var cardField = document.getElementById('card-field');\n
\n
    if (method && cardField) {\n
        var toggleCard = function () {\n
            var needsCard = method.value === 'card' || method.value === 'tap_to_pay';\n
            cardField.hidden = !needsCard;\n
            var select = document.getElementById('card_id');\n
            if (select) { select.required = needsCard; }\n
        };\n
        method.addEventListener('change', toggleCard);\n
        toggleCard();\n
    }\n
\n
    recalculate();\n
})();\n
</script>\n
</body>\n
</html>\n
' [UTF-8](length: 38956) does not contain "LAG-OWE-0003" [ASCII](length: 12).

C:\Users\USER\Dev\BitMed\vendor\laravel\framework\src\Illuminate\Testing\TestResponseAssert.php:45
C:\Users\USER\Dev\BitMed\vendor\laravel\framework\src\Illuminate\Testing\TestResponse.php:806
C:\Users\USER\Dev\BitMed\tests\Feature\PaymentCollectionTest.php:556

FAILURES!
Tests: 719, Assertions: 3037, Failures: 1, Skipped: 1.
