059107ca75
1/ Use the usual way for ordering dates in table 2/ Add a confirmation dialog box on deleting a file 3/ Add some UTs Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
246 lines
9.9 KiB
Text
246 lines
9.9 KiB
Text
[% USE Koha %]
|
|
[% USE KohaDates %]
|
|
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Koha › Acquisitions › 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>
|
|
[% INCLUDE 'header.inc' %]
|
|
[% INCLUDE 'acquisitions-search.inc' %]
|
|
|
|
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> › <a href="/cgi-bin/koha/acqui/invoices.pl">Invoices</a> › <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">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>Publisher</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><p><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% order.biblionumber %]">[% order.title %]</a>
|
|
[% IF ( order.author ) %]
|
|
<br /><em>by</em> [% order.author %]
|
|
[% END %]
|
|
</p></td>
|
|
<td>
|
|
[% IF ( order.publishercode ) %]
|
|
<p>[% order.publishercode %]
|
|
[% IF ( order.publicationyear ) %]
|
|
- [% order.publicationyear %]
|
|
[% END %]
|
|
</p>
|
|
[% END %]
|
|
</td>
|
|
<td><p>[% order.branchcode %]</p></td>
|
|
<td class="number gste">[% order.actualcostgste %]</td>
|
|
<td class="number gsti">[% order.actualcostgsti %]</td>
|
|
<td class="number">[% order.quantity %]</td>
|
|
<td class="number gste">[% order.totalgste %]</td>
|
|
<td class="number gsti">[% order.totalgsti %]</td>
|
|
<td class="number">[% order.gstgsti %]</td>
|
|
<td class="number">[% order.gstvalue %]</td>
|
|
<td>[% order.budget_name %]</td>
|
|
</tr>
|
|
[% END %]
|
|
</tbody>
|
|
<tfoot>
|
|
[% FOR tf IN foot_loop %]
|
|
<tr>
|
|
<th colspan='3'>Total (GST [% tf.gstgsti %] %)</th>
|
|
<th class="gste"/><th class="gsti"/>
|
|
<th>[% tf.quantity %]</th>
|
|
<th class="gste">[% tf.totalgste %]</th>
|
|
<th class="gsti">[% tf.totalgsti %]</th>
|
|
<th> </th>
|
|
<th>[% tf.gstvalue %]</th>
|
|
<th> </th>
|
|
</tr>
|
|
[% END %]
|
|
<tr>
|
|
<th colspan='3'>Total ([% currency %])</th>
|
|
<th class="gste"/><th class="gsti"/>
|
|
<th>[% total_quantity %]</th>
|
|
<th class="gste">[% total_gste %]</th>
|
|
<th class="gsti">[% total_gsti %]</th>
|
|
<th> </th>
|
|
<th>[% total_gstvalue %]</th>
|
|
<th> </th>
|
|
</tr>
|
|
<tr>
|
|
<th colspan="3">Total + Shipment cost ([% currency %])</th>
|
|
<th class="gste"></th>
|
|
<th class="gsti"></th>
|
|
<th>[% total_quantity %]</th>
|
|
<th class="gste">[% total_gste_shipment %]</th>
|
|
<th class="gsti">[% total_gsti_shipment %]</th>
|
|
<th> </th>
|
|
<th>[% total_gstvalue %]</th>
|
|
<th> </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 %]&op=download&view=1&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' %]
|