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

(-)a/Koha/REST/V1/Accountline.pm (-1 / +1 lines)
Lines 61-67 sub pay { Link Here
61
    }
61
    }
62
62
63
    my $body = $c->req->json;
63
    my $body = $c->req->json;
64
    my $amount = defined $body->{amount};
64
    my $amount = $body->{amount};
65
    my $note = $body->{note} || '';
65
    my $note = $body->{note} || '';
66
66
67
    if ($amount && !looks_like_number($amount)) {
67
    if ($amount && !looks_like_number($amount)) {
(-)a/api/v1/swagger/paths/accountlines.json (+5 lines)
Lines 3-8 Link Here
3
    "get": {
3
    "get": {
4
      "operationId": "listAccountlines",
4
      "operationId": "listAccountlines",
5
      "tags": ["accountlines"],
5
      "tags": ["accountlines"],
6
      "parameters": [
7
        {
8
          "$ref": "../parameters.json#/borrowernumberQueryParam"
9
        }
10
      ],
6
      "produces": [
11
      "produces": [
7
        "application/json"
12
        "application/json"
8
      ],
13
      ],
(-)a/t/db_dependent/api/v1/accountlines.t (-2 lines)
Lines 192-198 $t->request_ok($tx) Link Here
192
    ->status_is(404);
192
    ->status_is(404);
193
193
194
my $accountline_to_partiallypay = Koha::Account::Lines->search({'borrowernumber' => $borrowernumber, 'amount' => 80})->unblessed()->[0];
194
my $accountline_to_partiallypay = Koha::Account::Lines->search({'borrowernumber' => $borrowernumber, 'amount' => 80})->unblessed()->[0];
195
196
$tx = $t->ua->build_tx(POST => "/api/v1/accountlines/$accountline_to_partiallypay->{accountlines_id}/payment" => json => {amount => 'foo'});
195
$tx = $t->ua->build_tx(POST => "/api/v1/accountlines/$accountline_to_partiallypay->{accountlines_id}/payment" => json => {amount => 'foo'});
197
$tx->req->cookies({name => 'CGISESSID', value => $session->id});
196
$tx->req->cookies({name => 'CGISESSID', value => $session->id});
198
$tx->req->env({REMOTE_ADDR => '127.0.0.1'});
197
$tx->req->env({REMOTE_ADDR => '127.0.0.1'});
199
- 

Return to bug 15165