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

(-)a/Koha/REST/V1/Patrons/Account.pm (-2 / +5 lines)
Lines 105-110 sub add_credit { Link Here
105
        my $payment_type = $body->{payment_type};
105
        my $payment_type = $body->{payment_type};
106
        my $description  = $body->{description};
106
        my $description  = $body->{description};
107
        my $note         = $body->{note};
107
        my $note         = $body->{note};
108
        my $library_id   = $body->{library_id};
108
109
109
        my $credit = $account->add_credit(
110
        my $credit = $account->add_credit(
110
            {   amount       => $amount,
111
            {   amount       => $amount,
Lines 112-118 sub add_credit { Link Here
112
                payment_type => $payment_type,
113
                payment_type => $payment_type,
113
                description  => $description,
114
                description  => $description,
114
                note         => $note,
115
                note         => $note,
115
                user_id      => $user->id
116
                user_id      => $user->id,
117
                library_id   => $library_id
116
            }
118
            }
117
        );
119
        );
118
        $credit->discard_changes;
120
        $credit->discard_changes;
Lines 228-233 our $to_api_mapping = { Link Here
228
    accounttype       => 'account_type',
230
    accounttype       => 'account_type',
229
    amountoutstanding => 'amount_outstanding',
231
    amountoutstanding => 'amount_outstanding',
230
    borrowernumber    => 'patron_id',
232
    borrowernumber    => 'patron_id',
233
    branchcode        => 'library_id',
231
    issue_id          => 'checkout_id',
234
    issue_id          => 'checkout_id',
232
    itemnumber        => 'item_id',
235
    itemnumber        => 'item_id',
233
    manager_id        => 'user_id',
236
    manager_id        => 'user_id',
Lines 245-250 our $to_model_mapping = { Link Here
245
    checkout_id        => 'issue_id',
248
    checkout_id        => 'issue_id',
246
    internal_note      => 'note',
249
    internal_note      => 'note',
247
    item_id            => 'itemnumber',
250
    item_id            => 'itemnumber',
251
    library_id         => 'branchcode',
248
    patron_id          => 'borrowernumber',
252
    patron_id          => 'borrowernumber',
249
    user_id            => 'manager_id'
253
    user_id            => 'manager_id'
250
};
254
};
251
- 

Return to bug 21786