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

(-)a/Koha/Account/Offset.pm (-1 / +9 lines)
Lines 20-26 use Modern::Perl; Link Here
20
use Carp;
20
use Carp;
21
21
22
use Koha::Database;
22
use Koha::Database;
23
use Koha::Account::Line;
23
use Koha::Account::Lines;
24
24
25
use base qw(Koha::Object);
25
use base qw(Koha::Object);
26
26
Lines 38-43 Account offsets are used to track the changes in account lines Link Here
38
38
39
=head3 debit
39
=head3 debit
40
40
41
my $debit = $account_offset->debit;
42
43
Returns the related accountline that increased the amount owed by the patron.
44
41
=cut
45
=cut
42
46
43
sub debit {
47
sub debit {
Lines 49-54 sub debit { Link Here
49
53
50
=head3 credit
54
=head3 credit
51
55
56
my $credit = $account_offset->credit;
57
58
Returns the related accountline that decreased the amount owed by the patron.
59
52
=cut
60
=cut
53
61
54
sub credit {
62
sub credit {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/accountline-details.tt (-1 / +1 lines)
Lines 94-100 Link Here
94
                        </thead>
94
                        </thead>
95
95
96
                        <tbody>
96
                        <tbody>
97
                            [% FOREACH ao IN account_offsets.sort('created_on') %]
97
                            [% FOREACH ao IN account_offsets %]
98
                                [% IF type == 'credit' %]
98
                                [% IF type == 'credit' %]
99
                                    [% SET offset_accountline = ao.debit %]
99
                                    [% SET offset_accountline = ao.debit %]
100
                                [% ELSIF type == 'debit' %]
100
                                [% ELSIF type == 'debit' %]
(-)a/members/accountline-details.pl (-4 / +6 lines)
Lines 35-41 my ( $template, $loggedinuser, $cookie ) = get_template_and_user( Link Here
35
        type            => "intranet",
35
        type            => "intranet",
36
        authnotrequired => 0,
36
        authnotrequired => 0,
37
        flagsrequired   => {
37
        flagsrequired   => {
38
            borrowers     => 1,
38
            borrowers     => 'edit_borrowers',
39
            updatecharges => 'remaining_permissions'
39
            updatecharges => 'remaining_permissions'
40
        },
40
        },
41
    }
41
    }
Lines 49-60 if ($accountline) { Link Here
49
    my $type = $accountline->amount < 0 ? 'credit' : 'debit';
49
    my $type = $accountline->amount < 0 ? 'credit' : 'debit';
50
    my $column = $type eq 'credit' ? 'credit_id' : 'debit_id';
50
    my $column = $type eq 'credit' ? 'credit_id' : 'debit_id';
51
51
52
    my @account_offsets = Koha::Account::Offsets->search( { $column => $accountlines_id } );
52
    my $account_offsets = Koha::Account::Offsets->search(
53
        { $column  => $accountlines_id },
54
        { order_by => 'created_on' },
55
    );
53
56
54
    $template->param(
57
    $template->param(
55
        type            => $type,
58
        type            => $type,
56
        accountline     => $accountline,
59
        accountline     => $accountline,
57
        account_offsets => \@account_offsets,
60
        account_offsets => $account_offsets,
58
61
59
        finesview => 1,
62
        finesview => 1,
60
    );
63
    );
61
- 

Return to bug 2696