6 [% USE AuthorisedValues %]
8 [% INCLUDE 'doc-head-open.inc' %]
9 <title>Koha › Acquisitions › Invoice</title>
10 [% Asset.css("css/datatables.css") %]
11 [% INCLUDE 'doc-head-close.inc' %]
14 <body id="acq_invoice" class="acq">
15 [% INCLUDE 'header.inc' %]
16 [% INCLUDE 'acquisitions-search.inc' %]
18 <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>
20 <div class="main container-fluid">
22 <div class="col-sm-10 col-sm-push-2">
26 <div class="dialog message">
27 <p>Invoice has been modified</p>
30 <h1>Invoice: [% invoicenumber %]</h1>
32 <p>Vendor: <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% suppliername %]</a></p>
33 <form action="/cgi-bin/koha/acqui/invoice.pl" method="post" class="validated">
34 <fieldset class="rows">
37 <label for="shipmentdate" class="required">Invoice number:</label>
38 <input type="text" id="invoicenumber" name="invoicenumber" value="[% invoicenumber %]" class="required" required="required"/>
39 <span class="required">Required</span>
42 <li><label for="shipmentdate">Shipment date:</label>
43 <input type="text" size="10" id="shipmentdate" name="shipmentdate" value="[% shipmentdate | $KohaDates %]" class="datepicker" /></li>
45 <li><label for="billingdate">Billing date:</label>
46 <input type="text" size="10" id="billingdate" name="billingdate" value="[% billingdate | $KohaDates %]" class="datepicker" /></li>
48 <li><label for="shipmentcost">Shipping cost:</label>
49 <input type="text" size="10" id="shipmentcost" name="shipmentcost" value="[% shipmentcost %]" /></li>
50 <li><label for="shipment_budget_id">Shipping fund:</label>
51 <select id="shipment_budget_id" name="shipment_budget_id">
52 <option value="">No fund</option>
53 [% FOREACH budget IN budgets_loop %]
54 [% IF ( budget.selected ) %]
55 <option selected="selected" value="[% budget.budget_id %]">
57 <option value="[% budget.budget_id %]">
59 [% budget.budget_name %]
64 [% IF ( invoiceclosedate ) %]
65 <li><span class="label">Status:</span>
66 Closed on [% invoiceclosedate | $KohaDates %].</li>
68 <li><label for="reopen">Reopen: </label> <input type="checkbox" name="reopen" id="reopen" /></li>
70 <li><span class="label">Status:</span>
73 <li><label for="close">Close: </label> <input type="checkbox" name="close" id="close" />
77 <input type="hidden" name="op" value="mod" />
78 <input type="hidden" name="invoiceid" value="[% invoiceid %]" />
80 <fieldset class="action">
81 <input type="submit" value="Save" />
82 [% UNLESS orders_loop.size %]
83 <a href="invoice.pl?op=delete&invoiceid=[% invoiceid %]" id="delete">Delete</a>
87 <form action="/cgi-bin/koha/acqui/invoice.pl" method="post" class="validated">
88 <input type="hidden" name="invoiceid" value="[% invoiceid %]" />
89 <table id="invoice_adj_table">
96 <th>Encumber while invoice open</th>
99 [% IF (adjustments.count > 0) %]
100 <tr><td colspan="7">Current adjustments</td></tr>
102 [% FOREACH adjustment IN adjustments %]
103 [% total_adj = total_adj + adjustment.adjustment %]
105 <td><input type="hidden" name="adjustment_id" value="[% adjustment.adjustment_id %]" />[% adjustment.adjustment_id %]</td>
106 <td><input type="text" name="adjustment" id="adjustment_[% adjustment.adjustment_id %]" value="[% adjustment.adjustment | $Price %]" /></td>
108 [% reasons = AuthorisedValues.Get("ADJ_REASON") %]
110 <select id="reason_[% adjustment.adjustment_id %]" name="reason">
111 <option value="">No reason</option>
112 [% FOREACH reason IN reasons %]
113 [% IF ( adjustment.reason == reason.authorised_value ) %]
114 <option selected="selected" value="[% reason.authorised_value %]">
116 <option value="[% reason.authorised_value %]">
123 <p title="Define values in authorised value category ADJ_REASON to enable">None</p>
124 <input type="hidden" name="reason" id="reason_[% adjustment.adjustment_id %]" value="" />
127 <td><input type="text" name="note" id="note_new" value="[% adjustment.note %]"/></td>
129 <select id="budget_id_[% adjustment.adjustment_id %]" name="budget_id">
130 <option value="">No fund</option>
131 [% FOREACH budget IN budgets_loop %]
132 [% IF ( budget.budget_id == adjustment.budget_id ) %]
133 <option selected="selected" value="[% budget.budget_id %]">
135 <option value="[% budget.budget_id %]">
137 [% budget.budget_name %]
142 [% IF adjustment.encumber_open %]
144 <input type="checkbox" name="encumber_open" id="encumber_[% adjustment.adjustment_id %]" value="[% adjustment.adjustment_id %]" checked/>
148 <input type="checkbox" name="encumber_open" id="encumber_[% adjustment.adjustment_id %]" value="[% adjustment.adjustment_id %]" />
152 <a class="btn btn-default btn-xs" href="/cgi-bin/koha/acqui/invoice.pl?op=del_adj&adjustment_id=[% adjustment.adjustment_id %]&invoiceid=[% invoiceid %]"><i class="fa fa-trash"></i> Delete</a>
157 <tr><td colspan="7">Add an adjustment</td></tr>
158 <td><input type="hidden" name="adjustment_id" value="new" />New</td>
159 <td><input type="text" name="adjustment" id="adjustment_new]" /></td>
161 [% reasons = AuthorisedValues.Get("ADJ_REASON") %]
163 <select id="reason_[% adjustment.adjustment_id %]" name="reason">
164 <option value="">No reason</option>
165 [% FOREACH reason IN reasons %]
166 <option value="[% reason.authorised_value %]">
172 <p title="Define values in authorised value category ADJ_REASON to enable">None</p>
175 <td><input type="text" name="note" id="note_new" value=""/></td>
177 <select id="budget_id_[% adjustment.adjustment_id %]" name="budget_id">
178 <option selected="selected" value="">No fund</option>
179 [% FOREACH budget IN budgets_loop %]
180 <option value="[% budget.budget_id %]">
181 [% budget.budget_name %]
186 <td><input type="checkbox" name="encumber_open" id="encumber_new" value="new" /></td>
187 <td><input type="hidden" name="delete" value=""></td>
190 <input type="hidden" name="op" value="mod_adj" />
191 <input type="submit" value="Update adjustments" />
194 <a href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% invoiceid %]">Go to receipt page</a>
195 [% IF Koha.Preference('AcqEnableFiles') %]| <a href="/cgi-bin/koha/acqui/invoice-files.pl?invoiceid=[% invoiceid %]">Manage invoice files</a>[% END %]
197 <h2>Invoice details</h2>
198 [% IF orders_loop.size %]
199 <label for="show_all_details">
200 <input type="checkbox" style="vertical-align: middle;" id="show_all_details" />
206 <th class="anti-the">Summary</th>
208 <th class="tax_excluded">Actual cost tax exc.</th>
209 <th class="tax_included">Actual cost tax inc.</th>
211 <th class="tax_excluded">Total tax exc. ([% currency.symbol %])</th>
212 <th class="tax_included">Total tax inc. ([% currency.symbol %])</th>
219 [% FOREACH order IN orders_loop %]
222 [% IF order.biblionumber %]
223 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% order.biblionumber %]">[% order.title |html %]</a>
224 [% IF ( order.author ) %]
225 <br /><em>by</em> [% order.author %]
228 <em>Deleted bibliographic record, can't find title</em>
230 [% IF ( order.isbn ) %] – [% order.isbn %][% END %]
231 [% IF ( order.publishercode ) %]
232 <br/>[% order.publishercode %]
233 [% IF order.publicationyear %], [% order.publicationyear %]
234 [% ELSIF ( order.copyrightdate ) %][% order.copyrightdate %][% END %]
237 <td><p>[% order.branchcode %]</p></td>
238 <td class="number tax_excluded">[% order.unitprice_tax_excluded | $Price %]</td>
239 <td class="number tax_included">[% order.unitprice_tax_included | $Price %]</td>
240 <td class="number">[% order.quantity %]</td>
241 <td class="number tax_excluded">[% order.total_tax_excluded | $Price %]</td>
242 <td class="number tax_included">[% order.total_tax_included | $Price %]</td>
243 <td class="number">[% order.tax_rate * 100 %]</td>
244 <td class="number">[% order.tax_value | $Price %]</td>
245 <td>[% order.budget_name %]</td>
250 [% FOR tf IN foot_loop %]
252 <th colspan="2">Total (GST [% tf.tax_rate * 100 %] %)</th>
253 <th class="tax_excluded"></th>
254 <th class="tax_included"></th>
255 <th>[% tf.quantity %]</th>
256 <th class="tax_excluded">[% tf.total_tax_excluded | $Price %]</th>
257 <th class="tax_included">[% tf.total_tax_included | $Price %]</th>
259 <th>[% tf.tax_value | $Price %]</th>
264 <th colspan="2">Total ([% currency.symbol %])</th>
265 <th class="tax_excluded"></th>
266 <th class="tax_included"></th>
267 <th>[% total_quantity %]</th>
268 <th class="tax_excluded">[% total_tax_excluded | $Price %]</th>
269 <th class="tax_included">[% total_tax_included | $Price %]</th>
271 <th>[% total_tax_value | $Price %]</th>
275 <th colspan="2">Total + Adjustments + Shipment cost ([% currency.symbol %])</th>
276 <th class="tax_excluded"></th>
277 <th class="tax_included"></th>
278 <th>[% total_quantity %]</th>
279 <th class="tax_excluded">[% total_tax_excluded_shipment + total_adj | $Price %]</th>
280 <th class="tax_included">[% total_tax_included_shipment | $Price %]</th>
282 <th>[% total_tax_value | $Price %]</th>
288 <div class="dialog message"><p>No orders yet</p>
289 [% IF adjustments && adjustments.count > 0 || shipmentcost && shipmentcost > 0 %]
290 <p>Adjustments plus shipping:[% total_adj + shipmentcost | $Price %]</p>
294 [% IF ( (Koha.Preference('AcqEnableFiles')) && files ) %]
296 <h2>Files attached to invoice</h2>
297 <table id="invoice_files_table">
307 [% FOREACH f IN files %]
309 <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>
310 <td>[% f.file_type | html %]</td>
311 <td>[% f.file_description | html %]</td>
312 <td class="title-string">
313 <span title="[% f.date_uploaded %]">[% f.date_uploaded | $KohaDates %]</span>
321 </div> <!-- /.col-sm-10.col-sm-push-2 -->
324 <div class="col-sm-2 col-sm-pull-10">
325 [% INCLUDE 'acquisitions-menu.inc' %]
328 </div> <!-- /.row -->
330 [% MACRO jsinclude BLOCK %]
331 [% Asset.js("js/acquisitions-menu.js") %]
332 [% INCLUDE 'calendar.inc' %]
333 [% INCLUDE 'datatables.inc' %]
335 function updateColumnsVisibility(visible) {
337 $("table .tax_excluded, .tax_included").show();
339 [% IF ( invoiceincgst ) %]
340 $("table .tax_excluded").hide();
342 $("table .tax_included").hide();
347 $(document).ready(function() {
348 $("#delete").click(function(){
349 return confirmDelete(_("Are you sure you want to delete this invoice?"));
351 $("#orderst").dataTable($.extend(true, {}, dataTablesDefaults, {
357 { "sType": "anti-the", "aTargets": [ "anti-the" ] }
360 [% IF ( (Koha.Preference('AcqEnableFiles')) && files ) %]
361 $("#invoice_files_table").dataTable($.extend(true, {}, dataTablesDefaults, {
363 { "aTargets": [ "title-string" ], "sType": "title-string" }
371 $("#show_all_details").click(function(){
372 updateColumnsVisibility( $(this).is(":checked") );
375 $("#show_all_details").prop('checked', false);
376 updateColumnsVisibility(false);
381 [% INCLUDE 'intranet-bottom.inc' %]