View | Details | Raw Unified | Return to bug 34277
Collapse All | Expand All

(-)a/Koha/REST/V1/Patrons/Account.pm (-18 / +1 lines)
Lines 50-74 sub get { Link Here
50
    }
50
    }
51
51
52
    return try {
52
    return try {
53
        my $account = $patron->account;
54
55
        # get outstanding debits and credits
56
        my $debits  = $account->outstanding_debits;
57
        my $credits = $account->outstanding_credits;
58
59
        return $c->render(
53
        return $c->render(
60
            status  => 200,
54
            status  => 200,
61
            openapi => {
55
            openapi => $patron->balance_details,
62
                balance            => $account->balance,
63
                outstanding_debits => {
64
                    total => $debits->total_outstanding,
65
                    lines => $debits->to_api
66
                },
67
                outstanding_credits => {
68
                    total => $credits->total_outstanding,
69
                    lines => $credits->to_api
70
                }
71
            }
72
        );
56
        );
73
    }
57
    }
74
    catch {
58
    catch {
75
- 

Return to bug 34277