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 162-167 sub claim_returned { Link Here
162
    };
163
    };
163
}
164
}
164
165
166
=head library
167
168
=cut
169
170
sub library {
171
    my ($self) = @_;
172
173
    my $library_rs = $self->_result->branch;
174
    return Koha::Library->_new_from_dbic( $library_rs );
175
}
176
165
=head2 Internal methods
177
=head2 Internal methods
166
178
167
=head3 _type
179
=head3 _type
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt (-3 / +7 lines)
Lines 47-52 Link Here
47
    <th class="NoSort">&nbsp;</th>
47
    <th class="NoSort">&nbsp;</th>
48
    <th class="NoSort">Actions</th>
48
    <th class="NoSort">Actions</th>
49
    <th>Account type</th>
49
    <th>Account type</th>
50
    <th class="checked-out-from">Checked out from</th>
50
    <th>Description</th>
51
    <th>Description</th>
51
    <th class="title-string">Date</th>
52
    <th class="title-string">Date</th>
52
    <th>Barcode</th>
53
    <th>Barcode</th>
Lines 84-89 Link Here
84
    <td>
85
    <td>
85
        [% PROCESS account_type_description account=line %]
86
        [% PROCESS account_type_description account=line %]
86
    </td>
87
    </td>
88
    <td class="checked-out-from">
89
        [% line.checkout.library.branchname %]
90
    </td>
87
    <td>
91
    <td>
88
        [%- IF line.description %][% line.description | html %][% END %]
92
        [%- IF line.description %][% line.description | html %][% END %]
89
        [% IF line.itemnumber %]([% line.item.biblio.title | html %])[% END %]
93
        [% IF line.itemnumber %]([% line.item.biblio.title | html %])[% END %]
Lines 118-133 Link Here
118
122
119
<tfoot>
123
<tfoot>
120
    <tr>
124
    <tr>
121
        <td class="total" colspan="10">Total due:</td>
125
        <td class="total" colspan="11">Total due:</td>
122
        <td style="text-align: right;">[% total | $Price %]</td>
126
        <td style="text-align: right;">[% total | $Price %]</td>
123
    </tr>
127
    </tr>
124
    [% IF outstanding_credits.total_outstanding < 0 %]
128
    [% IF outstanding_credits.total_outstanding < 0 %]
125
        <tr>
129
        <tr>
126
            <td class="total" colspan="10">Outstanding credits could be applied: </td>
130
            <td class="total" colspan="11">Outstanding credits could be applied: </td>
127
            <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>
131
            <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>
128
        </tr>
132
        </tr>
129
        <tr>
133
        <tr>
130
            <td class="total" colspan="10">Total due if credit applied:</td>
134
            <td class="total" colspan="11">Total due if credit applied:</td>
131
            <td style="text-align: right;">[% total + outstanding_credits.total_outstanding | $Price %]</td>
135
            <td style="text-align: right;">[% total + outstanding_credits.total_outstanding | $Price %]</td>
132
        </tr>
136
        </tr>
133
    [% END %]
137
    [% END %]
(-)a/members/pay.pl (+1 lines)
Lines 40-45 use C4::Koha; Link Here
40
use C4::Overdues;
40
use C4::Overdues;
41
use Koha::Patrons;
41
use Koha::Patrons;
42
use Koha::Items;
42
use Koha::Items;
43
use Koha::Checkouts;
43
44
44
use Koha::Patron::Categories;
45
use Koha::Patron::Categories;
45
use URI::Escape;
46
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