columnname: date
-
columnname: description
+ -
+ columnname: barcode
+ -
+ columnname: date_due
+ -
+ columnname: returndate
-
columnname: note
-
columnname: description
-
columnname: date
+ -
+ columnname: barcode
+ -
+ columnname: date_due
+ -
+ columnname: returndate
-
columnname: note
-
<tr>
<th class="title-string">Date</th>
<th>Description of charges</th>
+ <th>Barcode</th>
+ <th>Due date</th>
+ <th>Return date</th>
<th>Note</th>
<th>Amount</th>
<th>Outstanding</th>
[% END %]
</td>
+ <td>
+ [% IF ( accountline.itemnumber ) %]
+ <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% accountline.item.biblionumber | uri %]&itemnumber=[% accountline.itemnumber | uri %]#item[% accountline.itemnumber | uri %]">[% accountline.item.barcode | html %]</a>
+ [% END %]
+ </td>
+
+ <td>
+ [% IF ( accountline.issue_id ) %]
+ [% accountline.issue.date_due | $KohaDates as_due_date => 1 %]
+ [% END %]
+ </td>
+
+ <td>
+ [% IF ( accountline.issue_id ) %]
+ [% accountline.issue.returndate | $KohaDates with_hours => 1 %]
+ [% END %]
+ </td>
+
<td>
[% accountline.note | html_line_break %]
</td>
<tr>
<th class="title-string">Date</th>
<th>Description of charges</th>
+ <th>Barcode</th>
+ <th>Due date</th>
+ <th>Return date</th>
<th>Home library</th>
<th>Note</th>
<th>Amount</th>
[%- IF account.payment_type %], [% AuthorisedValues.GetByCode('PAYMENT_TYPE', account.payment_type) | html %][% END %]
[%- IF account.description %], [% account.description | html %][% END %]
[% IF ( account.itemnumber ) %]<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% account.item.biblionumber | uri %]&itemnumber=[% account.itemnumber | uri %]">[% account.item.biblio.title | html %]</a>[% END %]</td>
+ <td>[% IF ( account.itemnumber ) %]<a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% account.itemnumber | uri %]&biblionumber=[% account.item.biblionumber | uri %]#item[% account.itemnumber | uri %]">[% account.item.barcode | html %]</a>[% END %]</td>
+ <td>[% IF ( account.issue_id ) %][% account.issue.date_due | $KohaDates as_due_date => 1 %][% END %]</td>
+ <td>[% IF ( account.issue_id ) %][% account.issue.returndate | $KohaDates with_hours => 1 %][% END %]</td>
<td>[% IF account.itemnumber %][% Branches.GetName( account.item.homebranch ) | html %][% END %]</td>
<td>[% account.note | html_line_break %]</td>
[% IF account.amount <= 0 %]<td class="credit" style="text-align: right;">[% ELSE %]<td class="debit" style="text-align: right;">[% END %][% account.amount | $Price %]</td>
[% END %]
<tfoot>
<tr>
- <td colspan="5">Total due</td>
+ <td colspan="8">Total due</td>
[% IF ( totalcredit ) %]
<td class="credit" style="text-align: right;">[% total | $Price %]</td>
[% ELSE %]
<th class="NoSort">Actions</th>
<th>Description</th>
<th class="title-string">Date</th>
+ <th>Barcode</th>
+ <th>Due date</th>
+ <th>Return date</th>
<th class="NoSort">Payment note</th>
<th>Account type</th>
<th>Amount</th>
[% END %]
<input type="hidden" name="itemnumber[% line.accountlines_id | html %]" value="[% line.itemnumber | html %]" />
<input type="hidden" name="description[% line.accountlines_id | html %]" value="[% line.description | html %]" />
+ <input type="hidden" name="issue_id[% line.accountlines_id | html %]" value="[% line.issue_id | html %]" />
<input type="hidden" name="accounttype[% line.accountlines_id | html %]" value="[% line.accounttype | html %]" />
<input type="hidden" name="amount[% line.accountlines_id | html %]" value="[% line.amount | html %]" />
<input type="hidden" name="accountlines_id[% line.accountlines_id | html %]" value="[% line.accountlines_id | html %]" />
[% CASE %][% line.accounttype | html %]
[%- END -%]
[%- IF line.description %], [% line.description | html %][% END %]
- [% IF line.title %]([% line.title | html %])[% END %]
+ [% IF line.itemnumber %]([% line.item.biblio.title | html %])[% END %]
</td>
<td>
<span title="[% line.date | html %]">[% line.date | $KohaDates %]</span>
</td>
+ <td>
+ [% IF line.itemnumber %]
+ <a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% line.itemnumber | uri %]&biblionumber=[% line.item.biblionumber | uri %]#item[% line.itemnumber | uri %]">[% line.item.barcode | html %]</a>
+ [% END %]
+ </td>
+ <td>
+ [% IF line.issue_id %]
+ [% line.issue.date_due | $KohaDates as_due_date => 1 %]
+ [% END %]
+ </td>
+ <td>
+ [% IF line.issue_id %]
+ [% line.issue.returndate | $KohaDates with_hours => 1 %]
+ [% END %]
+ </td>
<td class="actions">
<a href="#" class="add-note" data-accountlines_id="[% line.accountlines_id | html %]"><i class="fa fa-plus"></i> Add note</a>
<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>
<tfoot>
[% IF outstanding_credits.total_outstanding < 0 %]
<tr>
- <td class="total" colspan="7">Outstanding credits could be applied: </td>
+ <td class="total" colspan="10">Outstanding credits could be applied: </td>
<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>
</tr>
[% END %]
[% IF ( account_grp.total ) %]
<tr>
- <td class="total" colspan="7" style="text-align: right;">Sub total:</td>
+ <td class="total" colspan="10" style="text-align: right;">Sub total:</td>
<td style="text-align: right;">[% account_grp.total | $Price %]</td>
</tr>
[% END %]
<tr>
- <td class="total" colspan="7">Total due:</td>
+ <td class="total" colspan="10">Total due:</td>
[% IF outstanding_credits.total_outstanding < 0 %]
<td style="text-align: right;">[% total + outstanding_credits.total_outstanding | $Price %]</td>
[% ELSE %]
<table>
[% IF ( LibraryName ) %]
<tr>
- <th colspan="5" class="centerednames">
- <h3>[% LibraryName | html %]</h3>
+ <th colspan="8" class="centerednames">
+ <h3>[% LibraryName | html %]</h3>
</th>
</tr>
[% END %]
<tr>
- <th colspan="5" class="centerednames">
- <h2><u>INVOICE</u></h2>
- </th>
+ <th colspan="8" class="centerednames">
+ <h2><u>INVOICE</u></h2>
+ </th>
</tr>
<tr>
- <th colspan="5" class="centerednames">
+ <th colspan="8" class="centerednames">
<h2>[% Branches.GetName( patron.branchcode ) | html %]</h2>
</th>
</tr>
<tr>
- <th colspan="5" >
+ <th colspan="8" >
Bill to: [% patron.firstname | html %] [% patron.surname | html %] <br />
Card number: [% patron.cardnumber | html %]<br />
</th>
<tr>
<th>Date</th>
<th>Description of charges</th>
+ <th>Barcode</th>
+ <th>Due date</th>
+ <th>Return date</th>
<th>Note</th>
<th style="text-align:right;">Amount</th>
<th style="text-align:right;">Amount outstanding</th>
[% PROCESS account_type_description account=account %]
[%- IF account.description %], [% account.description | html %][% END %]
</td>
+ <td>[% account.item.barcode | html %]</td>
+ <td>[% account.issue.date_due | $KohaDates as_due_date => 1 %]</td>
+ <td>[% account.issue.returndate | $KohaDates with_hours => 1 %]</td>
<td>[% account.note | html %]</td>
[% IF ( account.amountcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% account.amount | $Price %]</td>
[% IF ( account.amountoutstandingcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% account.amountoutstanding | $Price %]</td>
[% END %]
<tfoot>
<tr>
- <td colspan="4">Total outstanding dues as on date: </td>
+ <td colspan="7">Total outstanding dues as on date: </td>
[% IF ( totalcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% total | $Price %]</td>
</tr>
</tfoot>
my $total = $account_lines->total_outstanding;
my @accounts;
while ( my $account_line = $account_lines->next ) {
- $account_line = $account_line->unblessed;
- if ( $account_line->{itemnumber} ) {
- my $item = Koha::Items->find( $account_line->{itemnumber} );
- my $biblio = $item->biblio;
- $account_line->{biblionumber} = $biblio->biblionumber;
- $account_line->{title} = $biblio->title;
- }
push @accounts, $account_line;
}
borrower_add_additional_fields($patron);
$redirect .=
get_for_redirect( 'amountoutstanding', "amountoutstanding$line_no", 1 );
$redirect .= get_for_redirect( 'description', "description$line_no", 0 );
+ $redirect .= get_for_redirect( 'issue_id', "issue_id$line_no", 0 );
$redirect .= get_for_redirect( 'title', "title$line_no", 0 );
$redirect .= get_for_redirect( 'itemnumber', "itemnumber$line_no", 0 );
$redirect .= get_for_redirect( 'accountlines_id', "accountlines_id$line_no", 0 );
#get account details
my $total = $patron->account->balance;
-my $accountline = Koha::Account::Lines->find($accountlines_id)->unblessed;
+my $accountline_object = Koha::Account::Lines->find($accountlines_id);
+my $accountline = $accountline_object->unblessed;
+$accountline->{item} = $accountline_object->item || "" ;
+$accountline->{issue} = $accountline_object->issue || "";
my $totalcredit;
if ( $total <= 0 ) {