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

(-)a/admin/columns_settings.yml (+12 lines)
Lines 358-363 modules: Link Here
358
        -
358
        -
359
          columnname: description
359
          columnname: description
360
        -
360
        -
361
          columnname: barcode
362
        -
363
          columnname: date_due
364
        -
365
          columnname: returndate
366
        -
361
          columnname: note
367
          columnname: note
362
        -
368
        -
363
          columnname: amount
369
          columnname: amount
Lines 387-392 modules: Link Here
387
        -
393
        -
388
          columnname: date
394
          columnname: date
389
        -
395
        -
396
          columnname: barcode
397
        -
398
          columnname: date_due
399
        -
400
          columnname: returndate
401
        -
390
          columnname: note
402
          columnname: note
391
        -
403
        -
392
          columnname: account_type
404
          columnname: account_type
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/accountline-details.tt (+21 lines)
Lines 42-47 Link Here
42
                        <tr>
42
                        <tr>
43
                            <th class="title-string">Date</th>
43
                            <th class="title-string">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>Amount</th>
49
                            <th>Amount</th>
47
                            <th>Outstanding</th>
50
                            <th>Outstanding</th>
Lines 70-75 Link Here
70
                            </td>
73
                            </td>
71
74
72
                            <td>
75
                            <td>
76
                                [% IF ( accountline.itemnumber ) %]
77
                                    <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% accountline.item.biblionumber | uri %]&amp;itemnumber=[% accountline.itemnumber | uri %]#item[% accountline.itemnumber | uri %]">[% accountline.item.barcode | html %]</a>
78
                                [% END %]
79
                            </td>
80
81
                            <td>
82
                                [% IF ( accountline.issue_id ) %]
83
                                    [% accountline.issue.date_due | $KohaDates as_due_date => 1 %]
84
                                [% END %]
85
                            </td>
86
87
                            <td>
88
                                [% IF ( accountline.issue_id ) %]
89
                                    [% accountline.issue.returndate | $KohaDates with_hours => 1 %]
90
                                [% END %]
91
                            </td>
92
93
                            <td>
73
                                [% accountline.note | html_line_break %]
94
                                [% accountline.note | html_line_break %]
74
                            </td>
95
                            </td>
75
96
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt (-1 / +7 lines)
Lines 46-51 Link Here
46
      <tr>
46
      <tr>
47
          <th class="title-string">Date</th>
47
          <th class="title-string">Date</th>
48
          <th>Description of charges</th>
48
          <th>Description of charges</th>
49
          <th>Barcode</th>
50
          <th>Due date</th>
51
          <th>Return date</th>
49
          <th>Home library</th>
52
          <th>Home library</th>
50
          <th>Note</th>
53
          <th>Note</th>
51
          <th>Amount</th>
54
          <th>Amount</th>
Lines 64-69 Link Here
64
        [%- IF account.payment_type %], [% AuthorisedValues.GetByCode('PAYMENT_TYPE', account.payment_type) | html %][% END %]
67
        [%- IF account.payment_type %], [% AuthorisedValues.GetByCode('PAYMENT_TYPE', account.payment_type) | html %][% END %]
65
        [%- IF account.description %], [% account.description | html %][% END %]
68
        [%- IF account.description %], [% account.description | html %][% END %]
66
        &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>
69
        &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
      <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>
71
      <td>[% IF ( account.issue_id ) %][% account.issue.date_due | $KohaDates as_due_date => 1 %][% END %]</td>
72
      <td>[% IF ( account.issue_id ) %][% account.issue.returndate | $KohaDates with_hours => 1 %][% END %]</td>
67
      <td>[% IF account.itemnumber %][% Branches.GetName( account.item.homebranch ) | html %][% END %]</td>
73
      <td>[% IF account.itemnumber %][% Branches.GetName( account.item.homebranch ) | html %][% END %]</td>
68
      <td>[% account.note | html_line_break %]</td>
74
      <td>[% account.note | html_line_break %]</td>
69
      [% IF account.amount <= 0 %]<td class="credit" style="text-align: right;">[% ELSE %]<td class="debit" style="text-align: right;">[% END %][% account.amount | $Price %]</td>
75
      [% IF account.amount <= 0 %]<td class="credit" style="text-align: right;">[% ELSE %]<td class="debit" style="text-align: right;">[% END %][% account.amount | $Price %]</td>
Lines 84-90 Link Here
84
  [% END %]
90
  [% END %]
85
<tfoot>
91
<tfoot>
86
  <tr>
92
  <tr>
87
    <td colspan="5">Total due</td>
93
    <td colspan="8">Total due</td>
88
    [% IF ( totalcredit ) %]
94
    [% IF ( totalcredit ) %]
89
        <td class="credit" style="text-align: right;">[% total | $Price %]</td>
95
        <td class="credit" style="text-align: right;">[% total | $Price %]</td>
90
    [% ELSE %]
96
    [% ELSE %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt (-4 / +23 lines)
Lines 47-52 Link Here
47
    <th class="NoSort">Actions</th>
47
    <th class="NoSort">Actions</th>
48
    <th>Description</th>
48
    <th>Description</th>
49
    <th class="title-string">Date</th>
49
    <th class="title-string">Date</th>
50
    <th>Barcode</th>
51
    <th>Due date</th>
52
    <th>Return date</th>
50
    <th class="NoSort">Payment note</th>
53
    <th class="NoSort">Payment note</th>
51
    <th>Account type</th>
54
    <th>Account type</th>
52
    <th>Amount</th>
55
    <th>Amount</th>
Lines 71-76 Link Here
71
    [% END %]
74
    [% END %]
72
    <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 %]" />
73
    <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="issue_id[% line.accountlines_id | html %]" value="[% line.issue_id | html %]" />
74
    <input type="hidden" name="accounttype[% line.accountlines_id | html %]" value="[% line.accounttype | html %]" />
78
    <input type="hidden" name="accounttype[% line.accountlines_id | html %]" value="[% line.accounttype | html %]" />
75
    <input type="hidden" name="amount[% line.accountlines_id | html %]" value="[% line.amount | html %]" />
79
    <input type="hidden" name="amount[% line.accountlines_id | html %]" value="[% line.amount | html %]" />
76
    <input type="hidden" name="accountlines_id[% line.accountlines_id | html %]" value="[% line.accountlines_id | html %]" />
80
    <input type="hidden" name="accountlines_id[% line.accountlines_id | html %]" value="[% line.accountlines_id | html %]" />
Lines 102-112 Link Here
102
          [% CASE %][% line.accounttype | html %]
106
          [% CASE %][% line.accounttype | html %]
103
        [%- END -%]
107
        [%- END -%]
104
        [%- IF line.description %], [% line.description | html %][% END %]
108
        [%- IF line.description %], [% line.description | html %][% END %]
105
        [% IF line.title %]([% line.title | html %])[% END %]
109
        [% IF line.itemnumber %]([% line.item.biblio.title | html %])[% END %]
106
    </td>
110
    </td>
107
    <td>
111
    <td>
108
        <span title="[% line.date | html %]">[% line.date | $KohaDates %]</span>
112
        <span title="[% line.date | html %]">[% line.date | $KohaDates %]</span>
109
    </td>
113
    </td>
114
    <td>
115
        [% IF line.itemnumber %]
116
            <a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% line.itemnumber | uri %]&amp;biblionumber=[% line.item.biblionumber | uri %]#item[% line.itemnumber | uri %]">[% line.item.barcode | html %]</a>
117
        [% END %]
118
    </td>
119
    <td>
120
        [% IF line.issue_id %]
121
            [% line.issue.date_due | $KohaDates as_due_date => 1 %]
122
        [% END %]
123
    </td>
124
    <td>
125
        [% IF line.issue_id %]
126
            [% line.issue.returndate | $KohaDates with_hours => 1 %]
127
        [% END %]
128
    </td>
110
    <td class="actions">
129
    <td class="actions">
111
        <a href="#" class="add-note" data-accountlines_id="[% line.accountlines_id | html %]"><i class="fa fa-plus"></i> Add note</a>
130
        <a href="#" class="add-note" data-accountlines_id="[% line.accountlines_id | html %]"><i class="fa fa-plus"></i> Add note</a>
112
        <span class="payment_note" id="payment_note_[% line.accountlines_id | html %]" style="display:none"><input type="text" size="10" name="payment_note_[% line.accountlines_id | html %]" value="" /> <a href="#" class="cancel-note"><i class="fa fa-remove"></i></a></span>
131
        <span class="payment_note" id="payment_note_[% line.accountlines_id | html %]" style="display:none"><input type="text" size="10" name="payment_note_[% line.accountlines_id | html %]" value="" /> <a href="#" class="cancel-note"><i class="fa fa-remove"></i></a></span>
Lines 121-138 Link Here
121
<tfoot>
140
<tfoot>
122
    [% IF outstanding_credits.total_outstanding < 0 %]
141
    [% IF outstanding_credits.total_outstanding < 0 %]
123
        <tr>
142
        <tr>
124
            <td class="total" colspan="7">Outstanding credits could be applied: </td>
143
            <td class="total" colspan="10">Outstanding credits could be applied: </td>
125
            <td class="credit" style="text-align: right;"><button type="submit" id="apply_credits" name="apply_credits" value="apply_credits" class="btn btn-default btn-sm">Apply <strong class="credit">[% outstanding_credits.total_outstanding | $Price %]</strong></button></td>
144
            <td class="credit" style="text-align: right;"><button type="submit" id="apply_credits" name="apply_credits" value="apply_credits" class="btn btn-default btn-sm">Apply <strong class="credit">[% outstanding_credits.total_outstanding | $Price %]</strong></button></td>
126
        </tr>
145
        </tr>
127
    [% END %]
146
    [% END %]
128
    [% IF ( account_grp.total ) %]
147
    [% IF ( account_grp.total ) %]
129
        <tr>
148
        <tr>
130
            <td class="total" colspan="7" style="text-align: right;">Sub total:</td>
149
            <td class="total" colspan="10" style="text-align: right;">Sub total:</td>
131
            <td style="text-align: right;">[% account_grp.total | $Price %]</td>
150
            <td style="text-align: right;">[% account_grp.total | $Price %]</td>
132
        </tr>
151
        </tr>
133
    [% END %]
152
    [% END %]
134
    <tr>
153
    <tr>
135
        <td class="total" colspan="7">Total due:</td>
154
        <td class="total" colspan="10">Total due:</td>
136
        [% IF outstanding_credits.total_outstanding < 0 %]
155
        [% IF outstanding_credits.total_outstanding < 0 %]
137
            <td style="text-align: right;">[% total + outstanding_credits.total_outstanding | $Price %]</td>
156
            <td style="text-align: right;">[% total + outstanding_credits.total_outstanding | $Price %]</td>
138
        [% ELSE %]
157
        [% ELSE %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tt (-8 / +14 lines)
Lines 21-43 Link Here
21
<table>
21
<table>
22
[% IF ( LibraryName ) %]
22
[% IF ( LibraryName ) %]
23
  <tr>
23
  <tr>
24
    <th colspan="5" class="centerednames">
24
    <th colspan="8" class="centerednames">
25
		<h3>[% LibraryName | html %]</h3>
25
        <h3>[% LibraryName | html %]</h3>
26
	</th>
26
	</th>
27
  </tr>
27
  </tr>
28
[% END %]
28
[% END %]
29
  <tr>
29
  <tr>
30
    <th colspan="5" class="centerednames">
30
    <th colspan="8" class="centerednames">
31
		<h2><u>INVOICE</u></h2>
31
        <h2><u>INVOICE</u></h2>
32
	</th>
32
    </th>
33
  </tr>
33
  </tr>
34
  <tr>
34
  <tr>
35
    <th colspan="5" class="centerednames">
35
    <th colspan="8" class="centerednames">
36
        <h2>[% Branches.GetName( patron.branchcode ) | html %]</h2>
36
        <h2>[% Branches.GetName( patron.branchcode ) | html %]</h2>
37
	</th>
37
	</th>
38
  </tr>
38
  </tr>
39
  <tr>
39
  <tr>
40
    <th colspan="5" >
40
    <th colspan="8" >
41
        Bill to: [% patron.firstname | html %] [% patron.surname | html %] <br />
41
        Bill to: [% patron.firstname | html %] [% patron.surname | html %] <br />
42
        Card number: [% patron.cardnumber | html %]<br />
42
        Card number: [% patron.cardnumber | html %]<br />
43
	</th>
43
	</th>
Lines 45-50 Link Here
45
  <tr>
45
  <tr>
46
	<th>Date</th>
46
	<th>Date</th>
47
    <th>Description of charges</th>
47
    <th>Description of charges</th>
48
    <th>Barcode</th>
49
    <th>Due date</th>
50
    <th>Return date</th>
48
    <th>Note</th>
51
    <th>Note</th>
49
    <th style="text-align:right;">Amount</th>
52
    <th style="text-align:right;">Amount</th>
50
    <th style="text-align:right;">Amount outstanding</th>
53
    <th style="text-align:right;">Amount outstanding</th>
Lines 57-62 Link Here
57
        [% PROCESS account_type_description account=account %]
60
        [% PROCESS account_type_description account=account %]
58
        [%- IF account.description %], [% account.description | html %][% END %]
61
        [%- IF account.description %], [% account.description | html %][% END %]
59
      </td>
62
      </td>
63
      <td>[% account.item.barcode | html %]</td>
64
      <td>[% account.issue.date_due | $KohaDates as_due_date => 1 %]</td>
65
      <td>[% account.issue.returndate | $KohaDates with_hours => 1 %]</td>
60
      <td>[% account.note | html %]</td>
66
      <td>[% account.note | html %]</td>
61
      [% IF ( account.amountcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% account.amount | $Price %]</td>
67
      [% IF ( account.amountcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% account.amount | $Price %]</td>
62
      [% IF ( account.amountoutstandingcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% account.amountoutstanding | $Price %]</td>
68
      [% IF ( account.amountoutstandingcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% account.amountoutstanding | $Price %]</td>
Lines 65-71 Link Here
65
  [% END %]
71
  [% END %]
66
<tfoot>
72
<tfoot>
67
  <tr>
73
  <tr>
68
    <td colspan="4">Total outstanding dues as on date: </td>
74
    <td colspan="7">Total outstanding dues as on date: </td>
69
    [% IF ( totalcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% total | $Price %]</td>
75
    [% IF ( totalcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% total | $Price %]</td>
70
  </tr>
76
  </tr>
71
  </tfoot>
77
  </tfoot>
(-)a/members/pay.pl (-7 / +1 lines)
Lines 147-159 sub add_accounts_to_template { Link Here
147
    my $total = $account_lines->total_outstanding;
147
    my $total = $account_lines->total_outstanding;
148
    my @accounts;
148
    my @accounts;
149
    while ( my $account_line = $account_lines->next ) {
149
    while ( my $account_line = $account_lines->next ) {
150
        $account_line = $account_line->unblessed;
151
        if ( $account_line->{itemnumber} ) {
152
            my $item = Koha::Items->find( $account_line->{itemnumber} );
153
            my $biblio = $item->biblio;
154
            $account_line->{biblionumber} = $biblio->biblionumber;
155
            $account_line->{title}        = $biblio->title;
156
        }
157
        push @accounts, $account_line;
150
        push @accounts, $account_line;
158
    }
151
    }
159
    borrower_add_additional_fields($patron);
152
    borrower_add_additional_fields($patron);
Lines 198-203 sub redirect_to_paycollect { Link Here
198
    $redirect .=
191
    $redirect .=
199
      get_for_redirect( 'amountoutstanding', "amountoutstanding$line_no", 1 );
192
      get_for_redirect( 'amountoutstanding', "amountoutstanding$line_no", 1 );
200
    $redirect .= get_for_redirect( 'description', "description$line_no", 0 );
193
    $redirect .= get_for_redirect( 'description', "description$line_no", 0 );
194
    $redirect .= get_for_redirect( 'issue_id', "issue_id$line_no", 0 );
201
    $redirect .= get_for_redirect( 'title', "title$line_no", 0 );
195
    $redirect .= get_for_redirect( 'title', "title$line_no", 0 );
202
    $redirect .= get_for_redirect( 'itemnumber',   "itemnumber$line_no",   0 );
196
    $redirect .= get_for_redirect( 'itemnumber',   "itemnumber$line_no",   0 );
203
    $redirect .= get_for_redirect( 'accountlines_id', "accountlines_id$line_no", 0 );
197
    $redirect .= get_for_redirect( 'accountlines_id', "accountlines_id$line_no", 0 );
(-)a/members/printinvoice.pl (-2 / +4 lines)
Lines 55-61 output_and_exit_if_error( $input, $cookie, $template, { module => 'members', log Link Here
55
55
56
#get account details
56
#get account details
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_object = Koha::Account::Lines->find($accountlines_id);
59
my $accountline = $accountline_object->unblessed;
60
$accountline->{item} = $accountline_object->item || "" ;
61
$accountline->{issue} = $accountline_object->issue || "";
59
62
60
my $totalcredit;
63
my $totalcredit;
61
if ( $total <= 0 ) {
64
if ( $total <= 0 ) {
62
- 

Return to bug 19489