ed7543287b
Having to write [% KOHA_VERSION %] for each url is bad because: - It's easily forgettable when adding new <script> or <link> - It prevents grep'ing for the full filename - It violates the DRY principle - If at some point we want to change the "force js and css reload" mechanism, it will be tedious This patch: - adds a Template::Toolkit plugin that generates <script> and <link> tags for JS and CSS files, and inserts automatically the Koha version in the filename - use the new plugin to remove all occurences of [% KOHA_VERSION %] - remove the code that was adding KOHA_VERSION as a template variable Test plan: 1. Apply patch 2. Go to several different pages in Koha (opac and intranet) while checking your browser's dev tools (there should be no 404 for JS and CSS files, and the Koha version should appear in filenames) and the server logs (there should be no "File not found") 3. `git grep KOHA_VERSION` should return nothing 4. prove t/db_dependent/Koha/Template/Plugin/Asset.t Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
86 lines
2.4 KiB
Text
86 lines
2.4 KiB
Text
[% USE Asset %]
|
|
[% USE Koha %]
|
|
[% USE Branches %]
|
|
[% USE KohaDates %]
|
|
[% SET footerjs = 1 %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Print receipt for [% patron.cardnumber %]</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
[% Asset.css("css/printreceiptinvoice.css") %]
|
|
</head>
|
|
|
|
<body id="printinvoice" class="pat">
|
|
|
|
<div id="receipt">
|
|
<!-- The table with the account items -->
|
|
<table>
|
|
[% IF ( LibraryName ) %]
|
|
<tr>
|
|
<th colspan="5" class="centerednames">
|
|
<h3>[% LibraryName %]</h3>
|
|
</th>
|
|
</tr>
|
|
[% END %]
|
|
<tr>
|
|
<th colspan="5" class="centerednames">
|
|
<h2><u>INVOICE</u></h2>
|
|
</th>
|
|
</tr>
|
|
<tr>
|
|
<th colspan="5" class="centerednames">
|
|
<h2>[% Branches.GetName( patron.branchcode ) %]</h2>
|
|
</th>
|
|
</tr>
|
|
<tr>
|
|
<th colspan="5" >
|
|
Bill to: [% patron.firstname %] [% patron.surname %] <br />
|
|
Card number: [% patron.cardnumber %]<br />
|
|
</th>
|
|
</tr>
|
|
<tr>
|
|
<th>Date</th>
|
|
<th>Description of charges</th>
|
|
<th>Note</th>
|
|
<th style="text-align:right;">Amount</th>
|
|
<th style="text-align:right;">Amount outstanding</th>
|
|
</tr>
|
|
|
|
[% FOREACH account IN accounts %]
|
|
<tr class="highlight">
|
|
<td>[% account.date | $KohaDates%]</td>
|
|
<td>
|
|
[% SWITCH account.accounttype %]
|
|
[% CASE 'Pay' %]Payment, thanks
|
|
[% CASE 'Pay00' %]Payment, thanks (cash via SIP2)
|
|
[% CASE 'Pay01' %]Payment, thanks (VISA via SIP2)
|
|
[% CASE 'Pay02' %]Payment, thanks (credit card via SIP2)
|
|
[% CASE 'N' %]New Card
|
|
[% CASE 'F' %]Fine
|
|
[% CASE 'A' %]Account management fee
|
|
[% CASE 'M' %]Sundry
|
|
[% CASE 'L' %]Lost Item
|
|
[% CASE 'W' %]Writeoff
|
|
[% CASE %][% account.accounttype %]
|
|
[%- END -%]
|
|
[%- IF account.description %], [% account.description %][% END %]
|
|
</td>
|
|
<td>[% account.note %]</td>
|
|
[% IF ( account.amountcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% account.amount %]</td>
|
|
[% IF ( account.amountoutstandingcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% account.amountoutstanding %]</td>
|
|
</tr>
|
|
|
|
[% END %]
|
|
<tfoot>
|
|
<tr>
|
|
<td colspan="4">Total outstanding dues as on date: </td>
|
|
[% IF ( totalcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% total %]</td>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
</div>
|
|
|
|
[% MACRO jsinclude BLOCK %]
|
|
[% INCLUDE 'slip-print.inc' #printThenClose %]
|
|
[% END %]
|
|
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|