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

(-)a/Koha/Checkout.pm (-3 / +11 lines)
Lines 19-27 package Koha::Checkout; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
22
use Koha::Libraries;
23
24
use Koha::Database;
25
23
26
use base qw(Koha::Object);
24
use base qw(Koha::Object);
27
25
Lines 35-40 Koha::Checkout - Koha Checkout object class Link Here
35
33
36
=cut
34
=cut
37
35
36
=head library
37
38
=cut
39
40
sub library {
41
    my ($self) = @_;
42
43
    return Koha::Libraries->find( $self->branchcode );
44
}
45
38
=head3 type
46
=head3 type
39
47
40
=cut
48
=cut
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt (-2 / +6 lines)
Lines 75-80 function enableCheckboxActions(){ Link Here
75
<tr>
75
<tr>
76
    <th>&nbsp;</th>
76
    <th>&nbsp;</th>
77
    <th>Fines &amp; charges</th>
77
    <th>Fines &amp; charges</th>
78
    <th class="checked-out-from">Checked out from</th>
78
    <th>Description</th>
79
    <th>Description</th>
79
    <th>Payment note</th>
80
    <th>Payment note</th>
80
    <th>Account type</th>
81
    <th>Account type</th>
Lines 86-92 function enableCheckboxActions(){ Link Here
86
</thead>
87
</thead>
87
<tfoot>
88
<tfoot>
88
<tr>
89
<tr>
89
    <td class="total" colspan="8">Total due:</td>
90
    <td class="total" colspan="9">Total due:</td>
90
    <td style="text-align: right;">[% total | format('%.2f') %]</td>
91
    <td style="text-align: right;">[% total | format('%.2f') %]</td>
91
</tr>
92
</tr>
92
</tfoot>
93
</tfoot>
Lines 115-120 function enableCheckboxActions(){ Link Here
115
    <input type="hidden" name="notify_level[% line.accountlines_id %]" value="[% line.notify_level %]" />
116
    <input type="hidden" name="notify_level[% line.accountlines_id %]" value="[% line.notify_level %]" />
116
    <input type="hidden" name="totals[% line.accountlines_id %]" value="[% line.totals %]" />
117
    <input type="hidden" name="totals[% line.accountlines_id %]" value="[% line.totals %]" />
117
    </td>
118
    </td>
119
    <td class="checked-out-from">
120
        [% line.checkout.library.branchname %]
121
    </td>
118
    <td>
122
    <td>
119
        [% SWITCH line.accounttype %]
123
        [% SWITCH line.accounttype %]
120
          [% CASE 'Pay' %]Payment, thanks
124
          [% CASE 'Pay' %]Payment, thanks
Lines 152-158 function enableCheckboxActions(){ Link Here
152
[% IF ( account_grp.total ) %]
156
[% IF ( account_grp.total ) %]
153
<tr>
157
<tr>
154
158
155
    <td class="total" colspan="8" style="text-align: right;">Sub total:</td>
159
    <td class="total" colspan="9" style="text-align: right;">Sub total:</td>
156
    <td style="text-align: right;">[% account_grp.total | format('%.2f') %]</td>
160
    <td style="text-align: right;">[% account_grp.total | format('%.2f') %]</td>
157
</tr>
161
</tr>
158
[% END %]
162
[% END %]
(-)a/members/pay.pl (+2 lines)
Lines 41-46 use C4::Koha; Link Here
41
use C4::Overdues;
41
use C4::Overdues;
42
use C4::Members::Attributes qw(GetBorrowerAttributes);
42
use C4::Members::Attributes qw(GetBorrowerAttributes);
43
use Koha::Patron::Images;
43
use Koha::Patron::Images;
44
use Koha::Checkouts;
44
45
45
use Koha::Patron::Categories;
46
use Koha::Patron::Categories;
46
use URI::Escape;
47
use URI::Escape;
Lines 127-132 sub add_accounts_to_template { Link Here
127
          GetBorNotifyAcctRecord( $borrowernumber, $notify_id );
128
          GetBorNotifyAcctRecord( $borrowernumber, $notify_id );
128
        if ( @{$accountlines} ) {
129
        if ( @{$accountlines} ) {
129
            my $totalnotify = AmountNotify( $notify_id, $borrowernumber );
130
            my $totalnotify = AmountNotify( $notify_id, $borrowernumber );
131
            map { $_->{checkout} = Koha::Checkouts->find($_->{issue_id} ) } @$accountlines;
130
            push @{$accounts},
132
            push @{$accounts},
131
              { accountlines => $accountlines,
133
              { accountlines => $accountlines,
132
                notify       => $notify_id,
134
                notify       => $notify_id,
(-)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 => 4;
22
use Test::More tests => 6;
23
23
24
use Koha::Checkout;
24
use Koha::Checkout;
25
use Koha::Checkouts;
25
use Koha::Checkouts;
Lines 49-54 my $new_checkout_2 = Koha::Checkout->new( Link Here
49
    }
49
    }
50
)->store;
50
)->store;
51
51
52
is( $new_checkout_1->library->branchcode, $library->{branchcode}, 'Got correct library for checkout1' );
53
is( $new_checkout_2->library->branchcode, $library->{branchcode}, 'Got correct library for checkout2' );
54
52
like( $new_checkout_1->issue_id, qr|^\d+$|, 'Adding a new checkout should have set the issue_id' );
55
like( $new_checkout_1->issue_id, qr|^\d+$|, 'Adding a new checkout should have set the issue_id' );
53
is( Koha::Checkouts->search->count, $nb_of_checkouts + 2, 'The 2 checkouts should have been added' );
56
is( Koha::Checkouts->search->count, $nb_of_checkouts + 2, 'The 2 checkouts should have been added' );
54
57
Lines 58-63 is( $retrieved_checkout_1->itemnumber, $new_checkout_1->itemnumber, 'Find a chec Link Here
58
$retrieved_checkout_1->delete;
61
$retrieved_checkout_1->delete;
59
is( Koha::Checkouts->search->count, $nb_of_checkouts + 1, 'Delete should have deleted the checkout' );
62
is( Koha::Checkouts->search->count, $nb_of_checkouts + 1, 'Delete should have deleted the checkout' );
60
63
64
61
$schema->storage->txn_rollback;
65
$schema->storage->txn_rollback;
62
66
63
1;
67
1;
64
- 

Return to bug 15985