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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt (-7 / +3 lines)
Lines 66-76 $(document).ready(function() { Link Here
66
          <th>Note</th>
66
          <th>Note</th>
67
          <th>Amount</th>
67
          <th>Amount</th>
68
          <th>Outstanding</th>
68
          <th>Outstanding</th>
69
          [% IF ( reverse_col ) %]
69
          <th>Actions</th>
70
              <th>Actions</th>
71
          [% ELSE %]
72
              <th>&nbsp;</th>
73
          [% END %]
74
        </tr>
70
        </tr>
75
    </thead>
71
    </thead>
76
72
Lines 123-129 $(document).ready(function() { Link Here
123
          [% END %]
119
          [% END %]
124
        [% END %]
120
        [% END %]
125
        [% # If user can reverse, we need the dropdown %]
121
        [% # If user can reverse, we need the dropdown %]
126
        [% IF ( reverse_col && account.payment ) %]
122
        [% IF ( account.payment ) %]
127
          <a class="btn btn-mini dropdown-toggle" id="subactions[% account.accountlines_id %]" role="button" data-toggle="dropdown" href="#"><i class="caret"></i></a>
123
          <a class="btn btn-mini dropdown-toggle" id="subactions[% account.accountlines_id %]" role="button" data-toggle="dropdown" href="#"><i class="caret"></i></a>
128
          <ul class="dropdown-menu" role="menu" arialabelledby="subactions[% account.accountlines_id %]">
124
          <ul class="dropdown-menu" role="menu" arialabelledby="subactions[% account.accountlines_id %]">
129
        [% END %]
125
        [% END %]
Lines 134-140 $(document).ready(function() { Link Here
134
            [% END %]
130
            [% END %]
135
            <li><a target="_blank" href="printinvoice.pl?action=print&amp;accountlines_id=[% account.accountlines_id %]&amp;borrowernumber=[% account.borrowernumber %]"><i class="fa fa-print"></i> Print</a></li>
131
            <li><a target="_blank" href="printinvoice.pl?action=print&amp;accountlines_id=[% account.accountlines_id %]&amp;borrowernumber=[% account.borrowernumber %]"><i class="fa fa-print"></i> Print</a></li>
136
        [% END %]
132
        [% END %]
137
        [% IF ( reverse_col && account.payment ) %]
133
        [% IF ( account.payment ) %]
138
            <li><a href="boraccount.pl?action=reverse&amp;accountlines_id=[% account.accountlines_id %]&amp;borrowernumber=[% account.borrowernumber %]"><i class="fa fa-undo"></i> Reverse</a></li>
134
            <li><a href="boraccount.pl?action=reverse&amp;accountlines_id=[% account.accountlines_id %]&amp;borrowernumber=[% account.borrowernumber %]"><i class="fa fa-undo"></i> Reverse</a></li>
139
        [% END %]
135
        [% END %]
140
      </td>
136
      </td>
(-)a/members/boraccount.pl (-4 lines)
Lines 73-79 if($total <= 0){ Link Here
73
        $totalcredit = 1;
73
        $totalcredit = 1;
74
}
74
}
75
75
76
my $reverse_col = 0; # Flag whether we need to show the reverse column
77
foreach my $accountline ( @{$accts}) {
76
foreach my $accountline ( @{$accts}) {
78
    $accountline->{amount} += 0.00;
77
    $accountline->{amount} += 0.00;
79
    if ($accountline->{amount} <= 0 ) {
78
    if ($accountline->{amount} <= 0 ) {
Lines 88-94 foreach my $accountline ( @{$accts}) { Link Here
88
    $accountline->{amountoutstanding} = sprintf '%.2f', $accountline->{amountoutstanding};
87
    $accountline->{amountoutstanding} = sprintf '%.2f', $accountline->{amountoutstanding};
89
    if ($accountline->{accounttype} =~ /^Pay/) {
88
    if ($accountline->{accounttype} =~ /^Pay/) {
90
        $accountline->{payment} = 1;
89
        $accountline->{payment} = 1;
91
        $reverse_col = 1;
92
    }
90
    }
93
}
91
}
94
92
Lines 113-119 $template->param( Link Here
113
    total               => sprintf("%.2f",$total),
111
    total               => sprintf("%.2f",$total),
114
    totalcredit         => $totalcredit,
112
    totalcredit         => $totalcredit,
115
    is_child            => ($data->{'category_type'} eq 'C'),
113
    is_child            => ($data->{'category_type'} eq 'C'),
116
    reverse_col         => $reverse_col,
117
    accounts            => $accts,
114
    accounts            => $accts,
118
    activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
115
    activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
119
    RoutingSerials => C4::Context->preference('RoutingSerials'),
116
    RoutingSerials => C4::Context->preference('RoutingSerials'),
120
- 

Return to bug 17734