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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt (-13 / +5 lines)
Lines 47-57 Link Here
47
          <th>Note</th>
47
          <th>Note</th>
48
          <th>Amount</th>
48
          <th>Amount</th>
49
          <th>Outstanding</th>
49
          <th>Outstanding</th>
50
          [% IF ( actions_col ) %]
50
          <th>Actions</th>
51
              <th>Actions</th>
52
          [% ELSE %]
53
              <th>&nbsp;</th>
54
          [% END %]
55
        </tr>
51
        </tr>
56
    </thead>
52
    </thead>
57
53
Lines 71-87 Link Here
71
      [% IF account.amountoutstanding <= 0 %]<td class="credit" style="text-align: right;">[% ELSE %]<td class="debit" style="text-align: right;">[% END %][% account.amountoutstanding | $Price %]</td>
67
      [% IF account.amountoutstanding <= 0 %]<td class="credit" style="text-align: right;">[% ELSE %]<td class="debit" style="text-align: right;">[% END %][% account.amountoutstanding | $Price %]</td>
72
      <td class="actions">
68
      <td class="actions">
73
        [% IF ( account.is_credit ) %]
69
        [% IF ( account.is_credit ) %]
74
          <a target="_blank" href="printfeercpt.pl?action=print&amp;accountlines_id=[% account.accountlines_id | html %]&amp;borrowernumber=[% account.borrowernumber | html %]" class="btn btn-default btn-xs"><i class="fa fa-print"></i> Print</a>
70
          <a target="_blank" href="printfeercpt.pl?action=print&amp;accountlines_id=[% account.accountlines_id | uri %]&amp;borrowernumber=[% account.borrowernumber | uri %]" class="btn btn-default btn-xs"><i class="fa fa-print"></i> Print</a>
75
        [% ELSE %]
71
        [% ELSE %]
76
          <a target="_blank" href="printinvoice.pl?action=print&amp;accountlines_id=[% account.accountlines_id | html %]&amp;borrowernumber=[% account.borrowernumber | html %]" class="btn btn-default btn-xs"><i class="fa fa-print"></i> Print</a>
72
          <a target="_blank" href="printinvoice.pl?action=print&amp;accountlines_id=[% account.accountlines_id | uri %]&amp;borrowernumber=[% account.borrowernumber | uri %]" class="btn btn-default btn-xs"><i class="fa fa-print"></i> Print</a>
77
        [% END %]
73
        [% END %]
78
        <a href="accountline-details.pl?accountlines_id=[% account.accountlines_id | uri %]" class="btn btn-default btn-xs"><i class="fa fa-list"></i> Details</a>
74
        <a href="accountline-details.pl?accountlines_id=[% account.accountlines_id | uri %]" class="btn btn-default btn-xs"><i class="fa fa-list"></i> Details</a>
79
        [% IF ( actions_col) %]
75
        [% IF account.is_credit %]
80
          [% IF account.is_credit %]
76
          <a href="boraccount.pl?action=void&amp;accountlines_id=[% account.accountlines_id | uri %]&amp;borrowernumber=[% account.borrowernumber | uri %]" class="btn btn-default btn-xs void"><i class="fa fa-ban"></i> Void</a>
81
              <a href="boraccount.pl?action=void&amp;accountlines_id=[% account.accountlines_id | uri %]&amp;borrowernumber=[% account.borrowernumber | uri %]" class="btn btn-default btn-xs void"><i class="fa fa-ban"></i> Void</a>
82
          [% ELSE %]
83
            &nbsp;
84
          [% END %]
85
        [% END %]
77
        [% END %]
86
      </td>
78
      </td>
87
    </tr>
79
    </tr>
(-)a/members/boraccount.pl (-6 lines)
Lines 79-88 if($total <= 0){ Link Here
79
        $totalcredit = 1;
79
        $totalcredit = 1;
80
}
80
}
81
81
82
my $actions_col = ( Koha::Account::Lines->search(
83
    { borrowernumber => $patron->borrowernumber },
84
    { where => { amount => { '<=', 0 } } } )->count > 0 ) ? 1 : 0;
85
86
if (C4::Context->preference('ExtendedPatronAttributes')) {
82
if (C4::Context->preference('ExtendedPatronAttributes')) {
87
    my $attributes = GetBorrowerAttributes($borrowernumber);
83
    my $attributes = GetBorrowerAttributes($borrowernumber);
88
    $template->param(
84
    $template->param(
Lines 96-102 $template->param( Link Here
96
    finesview           => 1,
92
    finesview           => 1,
97
    total               => sprintf("%.2f",$total),
93
    total               => sprintf("%.2f",$total),
98
    totalcredit         => $totalcredit,
94
    totalcredit         => $totalcredit,
99
    actions_col         => $actions_col,
100
    accounts            => \@accountlines,
95
    accounts            => \@accountlines,
101
);
96
);
102
97
103
- 

Return to bug 20629