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

(-)a/Koha/Checkout.pm (+12 lines)
Lines 28-33 use Koha::Checkouts::ReturnClaims; Link Here
28
use Koha::Database;
28
use Koha::Database;
29
use Koha::DateUtils;
29
use Koha::DateUtils;
30
use Koha::Items;
30
use Koha::Items;
31
use Koha::Libraries;
31
32
32
use base qw(Koha::Object);
33
use base qw(Koha::Object);
33
34
Lines 161-166 sub claim_returned { Link Here
161
    };
162
    };
162
}
163
}
163
164
165
=head library
166
167
=cut
168
169
sub library {
170
    my ($self) = @_;
171
172
    my $library_rs = $self->_result->branch;
173
    return Koha::Library->_new_from_dbic( $library_rs );
174
}
175
164
=head2 Internal methods
176
=head2 Internal methods
165
177
166
=head3 _type
178
=head3 _type
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt (-3 / +7 lines)
Lines 46-51 Link Here
46
    <th class="NoSort">&nbsp;</th>
46
    <th class="NoSort">&nbsp;</th>
47
    <th class="NoSort">Actions</th>
47
    <th class="NoSort">Actions</th>
48
    <th>Account type</th>
48
    <th>Account type</th>
49
    <th class="checked-out-from">Checked out from</th>
49
    <th>Description</th>
50
    <th>Description</th>
50
    <th class="title-string">Date</th>
51
    <th class="title-string">Date</th>
51
    <th>Barcode</th>
52
    <th>Barcode</th>
Lines 83-88 Link Here
83
    <td>
84
    <td>
84
        [% PROCESS account_type_description account=line %]
85
        [% PROCESS account_type_description account=line %]
85
    </td>
86
    </td>
87
    <td class="checked-out-from">
88
        [% line.checkout.library.branchname %]
89
    </td>
86
    <td>
90
    <td>
87
        [%- IF line.description %][% line.description | html %][% END %]
91
        [%- IF line.description %][% line.description | html %][% END %]
88
        [% IF line.itemnumber %]([% line.item.biblio.title | html %])[% END %]
92
        [% IF line.itemnumber %]([% line.item.biblio.title | html %])[% END %]
Lines 117-132 Link Here
117
121
118
<tfoot>
122
<tfoot>
119
    <tr>
123
    <tr>
120
        <td class="total" colspan="10">Total due:</td>
124
        <td class="total" colspan="11">Total due:</td>
121
        <td style="text-align: right;">[% total | $Price %]</td>
125
        <td style="text-align: right;">[% total | $Price %]</td>
122
    </tr>
126
    </tr>
123
    [% IF outstanding_credits.total_outstanding < 0 %]
127
    [% IF outstanding_credits.total_outstanding < 0 %]
124
        <tr>
128
        <tr>
125
            <td class="total" colspan="10">Outstanding credits could be applied: </td>
129
            <td class="total" colspan="11">Outstanding credits could be applied: </td>
126
            <td class="credit" style="text-align: right;"><button type="submit" id="apply_credits" name="apply_credits" value="apply_credits" class="btn btn-default btn-sm">Apply <strong class="credit">[% outstanding_credits.total_outstanding | $Price %]</strong></button></td>
130
            <td class="credit" style="text-align: right;"><button type="submit" id="apply_credits" name="apply_credits" value="apply_credits" class="btn btn-default btn-sm">Apply <strong class="credit">[% outstanding_credits.total_outstanding | $Price %]</strong></button></td>
127
        </tr>
131
        </tr>
128
        <tr>
132
        <tr>
129
            <td class="total" colspan="10">Total due if credit applied:</td>
133
            <td class="total" colspan="11">Total due if credit applied:</td>
130
            <td style="text-align: right;">[% total + outstanding_credits.total_outstanding | $Price %]</td>
134
            <td style="text-align: right;">[% total + outstanding_credits.total_outstanding | $Price %]</td>
131
        </tr>
135
        </tr>
132
    [% END %]
136
    [% END %]
(-)a/members/pay.pl (+1 lines)
Lines 39-44 use C4::Stats; Link Here
39
use C4::Koha;
39
use C4::Koha;
40
use C4::Overdues;
40
use C4::Overdues;
41
use Koha::Patrons;
41
use Koha::Patrons;
42
use Koha::Checkouts;
42
43
43
use Koha::Patron::Categories;
44
use Koha::Patron::Categories;
44
use URI::Escape;
45
use URI::Escape;
(-)a/t/db_dependent/Koha/Checkouts.t (-2 / +5 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Test::More tests => 7;
22
use Test::More tests => 9;
23
23
24
use C4::Circulation;
24
use C4::Circulation;
25
use Koha::Checkouts;
25
use Koha::Checkouts;
Lines 50-55 my $new_checkout_2 = Koha::Checkout->new( Link Here
50
    }
50
    }
51
)->store;
51
)->store;
52
52
53
is( $new_checkout_1->library->id, $library->{branchcode}, 'Got correct library for checkout1' );
54
is( $new_checkout_2->library->id, $library->{branchcode}, 'Got correct library for checkout2' );
55
53
like( $new_checkout_1->issue_id, qr|^\d+$|, 'Adding a new checkout should have set the issue_id' );
56
like( $new_checkout_1->issue_id, qr|^\d+$|, 'Adding a new checkout should have set the issue_id' );
54
is( Koha::Checkouts->search->count, $nb_of_checkouts + 2, 'The 2 checkouts should have been added' );
57
is( Koha::Checkouts->search->count, $nb_of_checkouts + 2, 'The 2 checkouts should have been added' );
55
58
Lines 125-129 subtest 'patron' => sub { Link Here
125
$retrieved_checkout_1->delete;
128
$retrieved_checkout_1->delete;
126
is( Koha::Checkouts->search->count, $nb_of_checkouts + 1, 'Delete should have deleted the checkout' );
129
is( Koha::Checkouts->search->count, $nb_of_checkouts + 1, 'Delete should have deleted the checkout' );
127
130
131
128
$schema->storage->txn_rollback;
132
$schema->storage->txn_rollback;
129
133
130
- 

Return to bug 15985