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

(-)a/admin/columns_settings.yml (+6 lines)
Lines 264-269 modules: Link Here
264
        -
264
        -
265
          columnname: description
265
          columnname: description
266
        -
266
        -
267
          columnname: barcode
268
        -
269
          columnname: date_due
270
        -
271
          columnname: returndate
272
        -
267
          columnname: note
273
          columnname: note
268
        -
274
        -
269
          columnname: amount
275
          columnname: amount
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/accountline-details.tt (-1 / +12 lines)
Lines 29-34 Link Here
29
                        <tr>
29
                        <tr>
30
                            <th class="title-string">Date</th>
30
                            <th class="title-string">Date</th>
31
                            <th>Description of charges</th>
31
                            <th>Description of charges</th>
32
                            <th>Barcode</th>
33
                            <th>Due date</th>
34
                            <th>Return date</th>
32
                            <th>Note</th>
35
                            <th>Note</th>
33
                            <th>Amount</th>
36
                            <th>Amount</th>
34
                            <th>Outstanding</th>
37
                            <th>Outstanding</th>
Lines 55-61 Link Here
55
                                    <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% biblio.biblionumber | uri %]&amp;itemnumber=[% accountline.itemnumber | uri %]">[% biblio.title | html %]</a>
58
                                    <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% biblio.biblionumber | uri %]&amp;itemnumber=[% accountline.itemnumber | uri %]">[% biblio.title | html %]</a>
56
                                [% END %]
59
                                [% END %]
57
                            </td>
60
                            </td>
58
61
                            <td>
62
                                [% IF ( accountline.itemnumber ) %]<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% biblio.biblionumber | uri %]&amp;itemnumber=[% accountline.itemnumber | uri %]#item[% accountline.itemnumber | uri %]">[% accountline.item.barcode | html %]</a>[% END %]
63
                            </td>
64
                            <td>
65
                                [% IF ( accountline.issue_id ) %][% issue.date_due | $KohaDates with_hours => 1 | html %][% END %]
66
                            </td>
67
                            <td>
68
                                [% IF ( accountline.issue_id ) %][% issue.returndate | $KohaDates with_hours => 1 | html %][% END %]
69
                            </td>
59
                            <td>
70
                            <td>
60
                                [% accountline.note | html_line_break %]
71
                                [% accountline.note | html_line_break %]
61
                            </td>
72
                            </td>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt (-1 / +7 lines)
Lines 43-48 Link Here
43
      <tr>
43
      <tr>
44
          <th class="title-string">Date</th>
44
          <th class="title-string">Date</th>
45
          <th>Description of charges</th>
45
          <th>Description of charges</th>
46
          <th>Barcode</th>
47
          <th>Due date</th>
48
          <th>Return date</th>
46
          <th>Home library</th>
49
          <th>Home library</th>
47
          <th>Note</th>
50
          <th>Note</th>
48
          <th>Amount</th>
51
          <th>Amount</th>
Lines 65-70 Link Here
65
        [%- IF account.payment_type %], [% AuthorisedValues.GetByCode('PAYMENT_TYPE', account.payment_type) | html %][% END %]
68
        [%- IF account.payment_type %], [% AuthorisedValues.GetByCode('PAYMENT_TYPE', account.payment_type) | html %][% END %]
66
        [%- IF account.description %], [% account.description | html %][% END %]
69
        [%- IF account.description %], [% account.description | html %][% END %]
67
        &nbsp;[% IF ( account.itemnumber ) %]<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% account.item.biblionumber | uri %]&amp;itemnumber=[% account.itemnumber | uri %]">[% account.item.biblio.title | html %]</a>[% END %]</td>
70
        &nbsp;[% IF ( account.itemnumber ) %]<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% account.item.biblionumber | uri %]&amp;itemnumber=[% account.itemnumber | uri %]">[% account.item.biblio.title | html %]</a>[% END %]</td>
71
      <td>[% IF ( account.itemnumber ) %]<a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% account.itemnumber | uri %]&amp;biblionumber=[% account.item.biblionumber | uri %]#item[% account.itemnumber | uri %]">[% account.item.barcode | html %]</a>[% END %]</td>
72
      <td>[% IF ( account.issue_id ) %][% account.issue.date_due | $KohaDates with_hours => 1 | html %][% END %]</td>
73
      <td>[% IF ( account.issue_id ) %][% account.issue.returndate | $KohaDates with_hours => 1 | html %][% END %]</td>
68
      <td>[% IF account.itemnumber %][% Branches.GetName( account.item.homebranch ) | html %][% END %]</td>
74
      <td>[% IF account.itemnumber %][% Branches.GetName( account.item.homebranch ) | html %][% END %]</td>
69
      <td>[% account.note | html_line_break %]</td>
75
      <td>[% account.note | html_line_break %]</td>
70
      [% IF ( account.amountcredit ) %]<td class="credit" style="text-align: right;">[% ELSE %]<td class="debit" style="text-align: right;">[% END %][% account.amount | $Price %]</td>
76
      [% IF ( account.amountcredit ) %]<td class="credit" style="text-align: right;">[% ELSE %]<td class="debit" style="text-align: right;">[% END %][% account.amount | $Price %]</td>
Lines 94-100 Link Here
94
  [% END %]
100
  [% END %]
95
<tfoot>
101
<tfoot>
96
  <tr>
102
  <tr>
97
    <td colspan="5">Total due</td>
103
    <td colspan="8">Total due</td>
98
    [% IF ( totalcredit ) %]
104
    [% IF ( totalcredit ) %]
99
        <td class="credit" style="text-align: right;">[% total | $Price %]</td>
105
        <td class="credit" style="text-align: right;">[% total | $Price %]</td>
100
    [% ELSE %]
106
    [% ELSE %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt (-1 / +11 lines)
Lines 1-6 Link Here
1
[% USE raw %]
1
[% USE raw %]
2
[% USE Asset %]
2
[% USE Asset %]
3
[% USE Koha %]
3
[% USE Koha %]
4
[% USE KohaDates %]
4
[% USE AuthorisedValues %]
5
[% USE AuthorisedValues %]
5
[% USE Branches %]
6
[% USE Branches %]
6
[% USE Price %]
7
[% USE Price %]
Lines 43-48 Link Here
43
    <th>&nbsp;</th>
44
    <th>&nbsp;</th>
44
    <th>Fines &amp; charges</th>
45
    <th>Fines &amp; charges</th>
45
    <th>Description</th>
46
    <th>Description</th>
47
    <th>Barcode</th>
48
    <th>Due date</th>
49
    <th>Return date</th>
46
    <th>Payment note</th>
50
    <th>Payment note</th>
47
    <th>Account type</th>
51
    <th>Account type</th>
48
    <th>Amount</th>
52
    <th>Amount</th>
Lines 51-57 Link Here
51
</thead>
55
</thead>
52
<tfoot>
56
<tfoot>
53
<tr>
57
<tr>
54
    <td class="total" colspan="6">Total due:</td>
58
    <td class="total" colspan="9">Total due:</td>
55
    <td style="text-align: right;">[% total | $Price %]</td>
59
    <td style="text-align: right;">[% total | $Price %]</td>
56
</tr>
60
</tr>
57
</tfoot>
61
</tfoot>
Lines 70-75 Link Here
70
    [% END %]
74
    [% END %]
71
    <input type="hidden" name="itemnumber[% line.accountlines_id | html %]" value="[% line.itemnumber | html %]" />
75
    <input type="hidden" name="itemnumber[% line.accountlines_id | html %]" value="[% line.itemnumber | html %]" />
72
    <input type="hidden" name="description[% line.accountlines_id | html %]" value="[% line.description | html %]" />
76
    <input type="hidden" name="description[% line.accountlines_id | html %]" value="[% line.description | html %]" />
77
    <input type="hidden" name="barcode[% line.accountlines_id | html %]" value="[% line.barcode | html %]" />
78
    <input type="hidden" name="date_due[% line.accountlines_id | html %]" value="[% line.issue.date_due | html %]" />
79
    <input type="hidden" name="returndate[% line.accountlines_id | html %]" value="[% line.issue.returndate | html %]" />
73
    <input type="hidden" name="accounttype[% line.accountlines_id | html %]" value="[% line.accounttype | html %]" />
80
    <input type="hidden" name="accounttype[% line.accountlines_id | html %]" value="[% line.accounttype | html %]" />
74
    <input type="hidden" name="amount[% line.accountlines_id | html %]" value="[% line.amount | html %]" />
81
    <input type="hidden" name="amount[% line.accountlines_id | html %]" value="[% line.amount | html %]" />
75
    <input type="hidden" name="accountlines_id[% line.accountlines_id | html %]" value="[% line.accountlines_id | html %]" />
82
    <input type="hidden" name="accountlines_id[% line.accountlines_id | html %]" value="[% line.accountlines_id | html %]" />
Lines 103-108 Link Here
103
        [%- IF line.description %], [% line.description | html %][% END %]
110
        [%- IF line.description %], [% line.description | html %][% END %]
104
        [% IF line.title %]([% line.title | html %])[% END %]
111
        [% IF line.title %]([% line.title | html %])[% END %]
105
    </td>
112
    </td>
113
    <td>[% IF line.itemnumber %]<a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% line.itemnumber | uri %]&amp;biblionumber=[% line.biblionumber | uri %]#item[% line.itemnumber | uri %]">[% line.barcode | html %]</a>[% END %]</td>
114
    <td>[% IF line.issue_id %][% line.issue.date_due | $KohaDates with_hours => 1 | html %][% END %]</td>
115
    <td>[% IF line.issue_id %][% line.issue.returndate | $KohaDates with_hours => 1 | html %][% END %]</td>
106
    <td><input type="text" name="payment_note_[% line.accountlines_id | html %]" /></td>
116
    <td><input type="text" name="payment_note_[% line.accountlines_id | html %]" /></td>
107
    <td>[% line.accounttype | html %]</td>
117
    <td>[% line.accounttype | html %]</td>
108
    <td class="debit" style="text-align: right;">[% line.amount | $Price %]</td>
118
    <td class="debit" style="text-align: right;">[% line.amount | $Price %]</td>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tt (-5 / +11 lines)
Lines 18-40 Link Here
18
<table>
18
<table>
19
[% IF ( LibraryName ) %]
19
[% IF ( LibraryName ) %]
20
  <tr>
20
  <tr>
21
    <th colspan="5" class="centerednames">
21
    <th colspan="8" class="centerednames">
22
		<h3>[% LibraryName | html %]</h3>
22
		<h3>[% LibraryName | html %]</h3>
23
	</th>
23
	</th>
24
  </tr>
24
  </tr>
25
[% END %]
25
[% END %]
26
  <tr>
26
  <tr>
27
    <th colspan="5" class="centerednames">
27
    <th colspan="8" class="centerednames">
28
		<h2><u>INVOICE</u></h2>
28
		<h2><u>INVOICE</u></h2>
29
	</th>
29
	</th>
30
  </tr>
30
  </tr>
31
  <tr>
31
  <tr>
32
    <th colspan="5" class="centerednames">
32
    <th colspan="8" class="centerednames">
33
        <h2>[% Branches.GetName( patron.branchcode ) | html %]</h2>
33
        <h2>[% Branches.GetName( patron.branchcode ) | html %]</h2>
34
	</th>
34
	</th>
35
  </tr>
35
  </tr>
36
  <tr>
36
  <tr>
37
    <th colspan="5" >
37
    <th colspan="8" >
38
        Bill to: [% patron.firstname | html %] [% patron.surname | html %] <br />
38
        Bill to: [% patron.firstname | html %] [% patron.surname | html %] <br />
39
        Card number: [% patron.cardnumber | html %]<br />
39
        Card number: [% patron.cardnumber | html %]<br />
40
	</th>
40
	</th>
Lines 42-47 Link Here
42
  <tr>
42
  <tr>
43
	<th>Date</th>
43
	<th>Date</th>
44
    <th>Description of charges</th>
44
    <th>Description of charges</th>
45
    <th>Barcode</th>
46
    <th>Due date</th>
47
    <th>Return date</th>
45
    <th>Note</th>
48
    <th>Note</th>
46
    <th style="text-align:right;">Amount</th>
49
    <th style="text-align:right;">Amount</th>
47
    <th style="text-align:right;">Amount outstanding</th>
50
    <th style="text-align:right;">Amount outstanding</th>
Lines 54-59 Link Here
54
        [% INCLUDE 'accounttype.inc' account => account %]
57
        [% INCLUDE 'accounttype.inc' account => account %]
55
        [%- IF account.description %], [% account.description | html %][% END %]
58
        [%- IF account.description %], [% account.description | html %][% END %]
56
      </td>
59
      </td>
60
      <td>[% account.barcode | html %]</td>
61
      <td>[% account.issue.date_due | $KohaDates with_hours => 1 | html %]</td>
62
      <td>[% account.issue.returndate | $KohaDates with_hours => 1 | html %]</td>
57
      <td>[% account.note | html %]</td>
63
      <td>[% account.note | html %]</td>
58
      [% IF ( account.amountcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% account.amount | $Price %]</td>
64
      [% IF ( account.amountcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% account.amount | $Price %]</td>
59
      [% IF ( account.amountoutstandingcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% account.amountoutstanding | $Price %]</td>
65
      [% IF ( account.amountoutstandingcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% account.amountoutstanding | $Price %]</td>
Lines 62-68 Link Here
62
  [% END %]
68
  [% END %]
63
<tfoot>
69
<tfoot>
64
  <tr>
70
  <tr>
65
    <td colspan="4">Total outstanding dues as on date: </td>
71
    <td colspan="7">Total outstanding dues as on date: </td>
66
    [% IF ( totalcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% total | $Price %]</td>
72
    [% IF ( totalcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% total | $Price %]</td>
67
  </tr>
73
  </tr>
68
  </tfoot>
74
  </tfoot>
(-)a/members/accountline-details.pl (-1 / +11 lines)
Lines 24-29 use C4::Auth; Link Here
24
use C4::Output;
24
use C4::Output;
25
use C4::Context;
25
use C4::Context;
26
use Koha::Patrons;
26
use Koha::Patrons;
27
use Koha::Checkouts;
28
use Koha::Old::Checkouts;
27
use Koha::Account::Lines;
29
use Koha::Account::Lines;
28
30
29
my $input = new CGI;
31
my $input = new CGI;
Lines 63-69 if ($accountline) { Link Here
63
    );
65
    );
64
66
65
    my $patron = Koha::Patrons->find( $accountline->borrowernumber );
67
    my $patron = Koha::Patrons->find( $accountline->borrowernumber );
66
    $template->param( patron => $patron );
68
    my $issues;
69
    if ( $accountline->issue_id ) {
70
        $issues = Koha::Checkouts->find($accountline->issue_id );
71
        $issues = Koha::Old::Checkouts->find($accountline->issue_id ) unless $issues;
72
    }
73
    $template->param(
74
        patron => $patron,
75
        issue   => $issues,
76
    );
67
}
77
}
68
78
69
output_html_with_http_headers $input, $cookie, $template->output;
79
output_html_with_http_headers $input, $cookie, $template->output;
(-)a/members/boraccount.pl (+6 lines)
Lines 109-114 while ( my $line = $accts->next ) { Link Here
109
        # Because we will not have access to the object from the template
109
        # Because we will not have access to the object from the template
110
        $accountline->{item} = $line->item;
110
        $accountline->{item} = $line->item;
111
    }
111
    }
112
113
    if ( $accountline->{issue_id} ) {
114
        my $issues = Koha::Checkouts->find($accountline->{issue_id} );
115
        $issues = Koha::Old::Checkouts->find($accountline->{issue_id} ) unless $issues;
116
        $accountline->{issue}        = $issues;
117
    }
112
    push @accountlines, $accountline;
118
    push @accountlines, $accountline;
113
}
119
}
114
120
(-)a/members/pay.pl (+10 lines)
Lines 148-154 sub add_accounts_to_template { Link Here
148
            my $biblio = $item->biblio;
148
            my $biblio = $item->biblio;
149
            $account_line->{biblionumber} = $biblio->biblionumber;
149
            $account_line->{biblionumber} = $biblio->biblionumber;
150
            $account_line->{title}        = $biblio->title;
150
            $account_line->{title}        = $biblio->title;
151
            $account_line->{barcode}        = $item->barcode;
151
        }
152
        }
153
        if ( $account_line->{issue_id} ) {
154
            my $issues = Koha::Checkouts->find($account_line->{issue_id} );
155
            $issues = Koha::Old::Checkouts->find($account_line->{issue_id} ) unless $issues;
156
            $account_line->{issue}        = $issues;
157
        }
158
152
        push @accounts, $account_line;
159
        push @accounts, $account_line;
153
    }
160
    }
154
    borrower_add_additional_fields($patron);
161
    borrower_add_additional_fields($patron);
Lines 192-197 sub redirect_to_paycollect { Link Here
192
      get_for_redirect( 'amountoutstanding', "amountoutstanding$line_no", 1 );
199
      get_for_redirect( 'amountoutstanding', "amountoutstanding$line_no", 1 );
193
    $redirect .= get_for_redirect( 'description', "description$line_no", 0 );
200
    $redirect .= get_for_redirect( 'description', "description$line_no", 0 );
194
    $redirect .= get_for_redirect( 'title', "title$line_no", 0 );
201
    $redirect .= get_for_redirect( 'title', "title$line_no", 0 );
202
    $redirect .= get_for_redirect( 'barcode', "barcode$line_no", 0 );
203
    $redirect .= get_for_redirect( 'date_due', "date_due$line_no", 0 );
204
    $redirect .= get_for_redirect( 'returndate', "returndate$line_no", 0 );
195
    $redirect .= get_for_redirect( 'itemnumber',   "itemnumber$line_no",   0 );
205
    $redirect .= get_for_redirect( 'itemnumber',   "itemnumber$line_no",   0 );
196
    $redirect .= get_for_redirect( 'accountlines_id', "accountlines_id$line_no", 0 );
206
    $redirect .= get_for_redirect( 'accountlines_id', "accountlines_id$line_no", 0 );
197
    $redirect .= q{&} . 'payment_note' . q{=} . uri_escape_utf8( scalar $input->param("payment_note_$line_no") );
207
    $redirect .= q{&} . 'payment_note' . q{=} . uri_escape_utf8( scalar $input->param("payment_note_$line_no") );
(-)a/members/printinvoice.pl (-1 / +11 lines)
Lines 57-62 output_and_exit_if_error( $input, $cookie, $template, { module => 'members', log Link Here
57
my $total = $patron->account->balance;
57
my $total = $patron->account->balance;
58
my $accountline = Koha::Account::Lines->find($accountlines_id)->unblessed;
58
my $accountline = Koha::Account::Lines->find($accountlines_id)->unblessed;
59
59
60
if ( $accountline->{itemnumber} ) {
61
    my $item = Koha::Items->find( $accountline->{itemnumber} );
62
    $accountline->{barcode}        = $item->barcode;
63
}
64
65
if ( $accountline->{issue_id} ) {
66
    my $issues = Koha::Checkouts->find($accountline->{issue_id} );
67
    $issues = Koha::Old::Checkouts->find($accountline->{issue_id} ) unless $issues;
68
    $accountline->{issue}        = $issues;
69
}
70
60
my $totalcredit;
71
my $totalcredit;
61
if ( $total <= 0 ) {
72
if ( $total <= 0 ) {
62
    $totalcredit = 1;
73
    $totalcredit = 1;
63
- 

Return to bug 19489