|
Line 0
Link Here
|
|
|
1 |
[% USE raw %] |
| 2 |
[% USE Koha %] |
| 3 |
[% PROCESS 'i18n.inc' %] |
| 4 |
[% INCLUDE 'doc-head-open.inc' %] |
| 5 |
<title |
| 6 |
>[% FILTER collapse %] |
| 7 |
[% t("Close completed invoices") | html %] |
| 8 |
› [% t("Acquisitions") | html %] › [% t("Koha") | html %] |
| 9 |
[% END %]</title |
| 10 |
> |
| 11 |
[% INCLUDE 'doc-head-close.inc' %] |
| 12 |
</head> |
| 13 |
|
| 14 |
<body id="acq_close_completed_invoices" class="acq"> |
| 15 |
[% WRAPPER 'header.inc' %] |
| 16 |
[% INCLUDE 'acquisitions-search.inc' %] |
| 17 |
[% END %] |
| 18 |
|
| 19 |
[% WRAPPER 'sub-header.inc' %] |
| 20 |
[% WRAPPER breadcrumbs %] |
| 21 |
[% WRAPPER breadcrumb_item %] |
| 22 |
<a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> |
| 23 |
[% END %] |
| 24 |
[% WRAPPER breadcrumb_item bc_active= 1 %] |
| 25 |
<span>Close completed invoices</span> |
| 26 |
[% END %] |
| 27 |
[% END #/ WRAPPER breadcrumbs %] |
| 28 |
[% END #/ WRAPPER sub-header.inc %] |
| 29 |
|
| 30 |
<div class="main container-fluid"> |
| 31 |
<div class="row"> |
| 32 |
<div class="col-md-10 order-md-2 order-sm-2"> |
| 33 |
<main> |
| 34 |
[% INCLUDE 'messages.inc' %] |
| 35 |
|
| 36 |
<h1>Close completed invoices</h1> |
| 37 |
|
| 38 |
<p> This tool checks all open invoices and closes any where every item has been physically received (checked in at circulation). Items on cancelled order lines are excluded from the check. </p> |
| 39 |
|
| 40 |
[% IF ran %] |
| 41 |
[% SET closed_count = 0 %] |
| 42 |
[% FOREACH r IN results %][% IF r.closed %][% SET closed_count = closed_count + 1 %][% END %][% END %] |
| 43 |
|
| 44 |
[% IF closed_count %] |
| 45 |
<div class="dialog message"> [% closed_count | html %] invoice[% IF closed_count != 1 %]s[% END %] closed successfully. </div> |
| 46 |
[% ELSE %] |
| 47 |
<div class="dialog alert"> No invoices were closed. Either all open invoices still have outstanding items, or there are no open invoices with items. </div> |
| 48 |
[% END %] |
| 49 |
|
| 50 |
[% IF results.size %] |
| 51 |
<table class="table table-bordered table-striped"> |
| 52 |
<thead> |
| 53 |
<tr> |
| 54 |
<th>Invoice ID</th> |
| 55 |
<th>Invoice number</th> |
| 56 |
<th>Result</th> |
| 57 |
</tr> |
| 58 |
</thead> |
| 59 |
<tbody> |
| 60 |
[% FOREACH r IN results %] |
| 61 |
<tr> |
| 62 |
<td> |
| 63 |
<a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% r.invoiceid | uri %]"> [% r.invoiceid | html %] </a> |
| 64 |
</td> |
| 65 |
<td>[% r.invoicenumber | html %]</td> |
| 66 |
<td> |
| 67 |
[% IF r.closed %] |
| 68 |
<span class="text-success">Closed</span> |
| 69 |
[% ELSE %] |
| 70 |
<span class="text-muted">Still open (items outstanding)</span> |
| 71 |
[% END %] |
| 72 |
</td> |
| 73 |
</tr> |
| 74 |
[% END %] |
| 75 |
</tbody> |
| 76 |
</table> |
| 77 |
[% END %] |
| 78 |
|
| 79 |
<p><a href="/cgi-bin/koha/acqui/close-completed-invoices.pl" class="btn btn-default">Run again</a></p> |
| 80 |
[% ELSE %] |
| 81 |
<form method="post" action="/cgi-bin/koha/acqui/close-completed-invoices.pl"> |
| 82 |
[% INCLUDE 'csrf-token.inc' %] |
| 83 |
<input type="hidden" name="op" value="cud-run" /> |
| 84 |
<fieldset class="action"> |
| 85 |
<button type="submit" class="btn btn-primary"> |
| 86 |
<i class="fa fa-check-circle"></i> |
| 87 |
Close all completed invoices |
| 88 |
</button> |
| 89 |
<a href="/cgi-bin/koha/acqui/acqui-home.pl" class="cancel">Cancel</a> |
| 90 |
</fieldset> |
| 91 |
</form> |
| 92 |
[% END %] |
| 93 |
</main> |
| 94 |
</div> |
| 95 |
|
| 96 |
<div class="col-md-2 order-md-2 order-sm-1"> |
| 97 |
<aside> [% INCLUDE 'acquisitions-menu.inc' %] </aside> |
| 98 |
</div> |
| 99 |
</div> |
| 100 |
</div> |
| 101 |
|
| 102 |
[% INCLUDE 'intranet-bottom.inc' %] |