Koha/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt
Kyle M Hall a8942c2884 Revert bug 13618 - "Prevent XSS in the Staff Client and the OPAC" due to performance issues
Revert "DBRev to make notes of the XSS patches and the new important dependency."

This reverts commit e140603a59.

Revert "Bug 13618: Specific for branches.opac_info"

This reverts commit 06e4a50f00.

Revert "Bug 13618: (follow-up) Specific for other prefs"

This reverts commit d6475a111f.

Revert "Bug 13618: Fix for debarredcomment and patron messages"

This reverts commit dd98c9df92.

Revert "Bug 13618: Do not display html tags in patron's notices"

This reverts commit a065b243fe.

Revert "Bug 13618: Do not display   and html tags in item fields content"

This reverts commit baeeaffbf8.

Revert "Bug 13618: Fix for system preference description"

This reverts commit a967a09261.

Revert "Bug 13618: Remove html filters for newly pushed code"

This reverts commit 0e98662b10.

Revert "Bug 13618: (follow-up) add missing lines for opac-shelves"

This reverts commit fc2fb605e5.

Revert "Bug 13618: (follow-up) Specific for ColumnsSettings"

This reverts commit bc308fdd9c.

Revert "Bug 13618: Fix for edit biblios and items"

This reverts commit 811c4e8402.

Revert "Bug 13618: followup to remove tabs"

This reverts commit ca8e8c397c.

Revert "Bug 13618: Fix last occurrences recently introduced to master"

This reverts commit bb417b256b.

Revert "Bug 13618: Fix for news"

This reverts commit ae5b98020a.

Revert "Bug 13618: Fix escape on sending baskets or shelves by email"

This reverts commit a7731ffe25.

Revert "Bug 13618: Specific for XSLTBloc"

This reverts commit 11fa38dc29.

Revert "Bug 13618: Specific for Salutation on editing a patron"

This reverts commit 36c07ad6d3.

Revert "Bug 13618: Specific for other prefs"

This reverts commit e6ea281a3b.

Revert "Bug 13618 - memberentrygen.tt errors Not a GLOB reference"

This reverts commit 7824874557.

Revert "Bug 13618: Specific for ColumnsSettings"

This reverts commit 1834da3da3.

Revert "Bug 13618: Specific for IntranetUser* and OPACUser* prefs"

This reverts commit 21ae62b253.

Revert "Bug 13618: Fix error 'Not a GLOB reference'"

This reverts commit 602bdbab4c.

Revert "Bug 13618: Specific for the ISBD view"

This reverts commit d254362435.

Revert "Bug 13618: Specific for pagination_bar"

This reverts commit 8837a8ae68.

Revert "Bug 13618: Specific places where we don't need to escape variables - intra"

This reverts commit 00eff140b3.

Revert "Bug 13618: Remove html filters at the intranet"

This reverts commit 7db851ff03.

Revert "Bug 13618: Specific places where we don't need to escape variables"

This reverts commit 49a3738b8d.

Revert "Bug 13618: Remove html filters at the OPAC"

This reverts commit cedaa0e23e.

Revert "Bug 13618: Use Template::Stash::AutoEscaping to use the html filter"

This reverts commit 01b38d3b13.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
2016-02-11 19:39:53 +00:00

250 lines
10 KiB
Text

[% USE Koha %]
[% USE KohaDates %]
[% USE Price %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Acquisitions &rsaquo; Invoice</title>
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
[% INCLUDE 'doc-head-close.inc' %]
[% INCLUDE 'calendar.inc' %]
[% INCLUDE 'datatables.inc' %]
<script type="text/javascript">
//<![CDATA[
function updateColumnsVisibility(visible) {
if ( visible ) {
$("table .gste, .gsti").show();
} else {
[% IF ( invoiceincgst ) %]
$("table .gste").hide();
[% ELSE %]
$("table .gsti").hide();
[% END %]
}
}
$(document).ready(function() {
$("#orderst").dataTable($.extend(true, {}, dataTablesDefaults, {
bInfo: false,
bPaginate: false,
bFilter: false,
sDom: "t"
}));
[% IF ( (Koha.Preference('AcqEnableFiles')) && files ) %]
$("#invoice_files_table").dataTable($.extend(true, {}, dataTablesDefaults, {
"aoColumnDefs": [
{ "aTargets": [ "title-string" ], "sType": "title-string" }
],
bInfo: false,
bPaginate: false,
bFilter: false,
sDom: "t"
}));
[% END %]
$("#show_all_details").click(function(){
updateColumnsVisibility($(this+":checked").val());
});
$("#show_all_details").attr('checked', false);
updateColumnsVisibility(false);
});
//]]>
</script>
</head>
<body id="acq_invoice" class="acq">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'acquisitions-search.inc' %]
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo; <a href="/cgi-bin/koha/acqui/invoices.pl">Invoices</a> &rsaquo; <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% invoiceid %]">[% invoicenumber %]</a></div>
<div id="doc3" class="yui-t2">
<div id="bd">
<div id="yui-main">
<div class="yui-b">
[% IF ( modified ) %]
<div class="dialog message">
<p>Invoice has been modified</p>
</div>
[% END %]
<h1>Invoice: [% invoicenumber %]</h1>
<p>Vendor: <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% suppliername %]</a></p>
<form action="/cgi-bin/koha/acqui/invoice.pl" method="post">
<fieldset class="rows">
<ol>
<li><label for="shipmentdate">Shipment date:</label>
<input type="text" size="10" id="shipmentdate" name="shipmentdate" value="[% shipmentdate | $KohaDates %]" readonly="readonly" class="datepicker" /></li>
<li><label for="billingdate">Billing date:</label>
<input type="text" size="10" id="billingdate" name="billingdate" value="[% billingdate | $KohaDates %]" readonly="readonly" class="datepicker" /></li>
<li><label for="shipmentcost">Shipping cost:</label>
<input type="text" size="10" id="shipmentcost" name="shipmentcost" value="[% shipmentcost %]" /></li>
<li><label for="shipment_budget_id">Shipping fund:</label>
<select id="shipment_budget_id" name="shipment_budget_id">
<option value="">No fund</option>
[% FOREACH budget IN budgets_loop %]
[% IF ( budget.selected ) %]
<option selected="selected" value="[% budget.budget_id %]">
[% ELSE %]
<option value="[% budget.budget_id %]">
[% END %]
[% budget.budget_name %]
</option>
[% END %]
</select></li>
[% IF ( invoiceclosedate ) %]
<li><span class="label">Status:</span>
Closed on [% invoiceclosedate | $KohaDates %].</li>
<li><label for="reopen">Reopen: </label> <input type="checkbox" name="reopen" id="reopen" /></li>
[% ELSE %]
<li><span class="label">Status:</span>
Open.</li>
<li><label for="close">Close: </label> <input type="checkbox" name="close" id="close" />
</li>
[% END %]
</ol>
<input type="hidden" name="op" value="mod" />
<input type="hidden" name="invoiceid" value="[% invoiceid %]" />
</fieldset>
<fieldset class="action">
<input type="submit" value="Save" />
[% UNLESS orders_loop.size %]
<a href="invoice.pl?op=delete&invoiceid=[% invoiceid %]">Delete</a>
[% END %]
</fieldset>
</form>
<p>
<a href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% invoiceid %]">Go to receipt page</a>
[% IF Koha.Preference('AcqEnableFiles') %]| <a href="/cgi-bin/koha/acqui/invoice-files.pl?invoiceid=[% invoiceid %]">Manage invoice files</a>[% END %]
</p>
<h2>Invoice details</h2>
[% IF orders_loop.size %]
<label for="show_all_details">
<input type="checkbox" style="vertical-align: middle;" id="show_all_details" />
Show all details
</label>
<table id="orderst">
<thead>
<tr>
<th>Summary</th>
<th>Library</th>
<th class="gste">Actual cost tax exc.</th>
<th class="gsti">Actual cost tax inc.</th>
<th>Qty.</th>
<th class="gste">Total tax exc. ([% currency %])</th>
<th class="gsti">Total tax inc. ([% currency %])</th>
<th>GST %</th>
<th>GST</th>
<th>Fund</th>
</tr>
</thead>
<tbody>
[% FOREACH order IN orders_loop %]
<tr>
<td>
[% IF order.biblionumber %]
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% order.biblionumber %]">[% order.title %]</a>
[% IF ( order.author ) %]
<br /><em>by</em> [% order.author %]
[% END %]
[% ELSE %]
<em>Deleted bibliographic record, can't find title</em>
[% END %]
[% IF ( order.publishercode ) %]
<br/>[% order.publishercode %]
[% IF order.publicationyear > 0 %]
- [% order.publicationyear %]
[% ELSIF ( order.copyrightdate > 0) %]
- [% order.copyrightdate %]
[% END %]
[% END %]
</td>
<td><p>[% order.branchcode %]</p></td>
<td class="number gste">[% order.unitpricegste | $Price %]</td>
<td class="number gsti">[% order.unitpricegsti | $Price %]</td>
<td class="number">[% order.quantity %]</td>
<td class="number gste">[% order.totalgste | $Price %]</td>
<td class="number gsti">[% order.totalgsti | $Price %]</td>
<td class="number">[% order.gstrate * 100 | $Price %]</td>
<td class="number">[% order.gstvalue | $Price %]</td>
<td>[% order.budget_name %]</td>
</tr>
[% END %]
</tbody>
<tfoot>
[% FOR tf IN foot_loop %]
<tr>
<th colspan='2'>Total (GST [% tf.gstrate * 100 | $Price %] %)</th>
<th class="gste"/><th class="gsti"/>
<th>[% tf.quantity %]</th>
<th class="gste">[% tf.totalgste | $Price %]</th>
<th class="gsti">[% tf.totalgsti | $Price %]</th>
<th>&nbsp;</th>
<th>[% tf.gstvalue | $Price %]</th>
<th>&nbsp;</th>
</tr>
[% END %]
<tr>
<th colspan='2'>Total ([% currency %])</th>
<th class="gste"/><th class="gsti"/>
<th>[% total_quantity %]</th>
<th class="gste">[% total_gste | $Price %]</th>
<th class="gsti">[% total_gsti | $Price %]</th>
<th>&nbsp;</th>
<th>[% total_gstvalue | $Price %]</th>
<th>&nbsp;</th>
</tr>
<tr>
<th colspan="2">Total + Shipment cost ([% currency %])</th>
<th class="gste"></th>
<th class="gsti"></th>
<th>[% total_quantity %]</th>
<th class="gste">[% total_gste_shipment | $Price %]</th>
<th class="gsti">[% total_gsti_shipment | $Price %]</th>
<th>&nbsp;</th>
<th>[% total_gstvalue | $Price %]</th>
<th>&nbsp;</th>
</tr>
</tfoot>
</table>
[% ELSE %]
<div class="dialog message"><p>No orders yet</p></div>
[% END %]
[% IF ( (Koha.Preference('AcqEnableFiles')) && files ) %]
<br />
<h2>Files attached to invoice</h2>
<table id="invoice_files_table">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Uploaded</th>
</tr>
</thead>
<tbody>
[% FOREACH f IN files %]
<tr>
<td><a href="/cgi-bin/koha/acqui/invoice-files.pl?invoiceid=[% invoiceid %]&amp;op=download&amp;view=1&amp;file_id=[% f.file_id %]">[% f.file_name | html %]</a></td>
<td>[% f.file_type | html %]</td>
<td>[% f.file_description | html %]</td>
<td class="title-string">
<span title="[% f.date_uploaded %]">[% f.date_uploaded | $KohaDates %]</span>
</td>
</tr>
[% END %]
</tbody>
</table>
[% END %]
</div>
</div>
<div class="yui-b">
[% INCLUDE 'acquisitions-menu.inc' %]
</div>
</div>
[% INCLUDE 'intranet-bottom.inc' %]