(11, 'reopen_closed_invoices', 'Reopen closed invoices'),
(11, 'edit_invoices', 'Edit invoices'),
(11, 'delete_invoices', 'Delete invoices'),
+ (11, 'merge_invoices', 'Merge invoices'),
(11, 'delete_baskets', 'Delete baskets'),
(12, 'suggestions_manage', 'Manage purchase suggestions'),
(13, 'edit_news', 'Write news for the OPAC and staff interfaces'),
<table id="resultst">
<thead>
<tr>
- <th> </th>
+ [% IF CAN_user_acquisition_merge_invoices %]
+ <th> </th>
+ [% END %]
<th> </th>
<th>Invoice no.</th>
<th>Vendor</th>
<tbody>
[% FOREACH invoice IN invoices %]
<tr data-invoiceid="[% invoice.invoiceid | html %]" data-booksellerid="[% invoice.booksellerid | html %]" data-shipmentdate="[% invoice.shipmentdate | $KohaDates %]" data-billingdate="[% invoice.billingdate | $KohaDates %]" data-shipmentcost="[% invoice.shipmentcost | html %]" data-shipment_budgetid="[% invoice.shipmentcost_budgetid | html %]" data-closedate="[% invoice.closedate | $KohaDates %]">
- <td>[% invoice.is_linked_to_subscriptions | html %]</td>
+ [% IF CAN_user_acquisition_merge_invoices %]
+ <td>[% invoice.is_linked_to_subscriptions | html %]</td>
+ [% END %]
<td><input type="checkbox" class="select-invoice" value="[% invoice.invoiceid | html %]" /></td>
<td><a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% invoice.invoiceid | uri %]">[% invoice.invoicenumber | html %]</a></td>
<td><a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% invoice.booksellerid | uri %]">[% invoice.suppliername | html %]</a></td>
[% END %]
</tbody>
</table>
- <a class="submit" id="merge" href="#merge_invoices">Merge selected invoices</a>
- <div id="merge_invoices">
- <form id="merge_invoice_form" action="/cgi-bin/koha/acqui/invoice.pl" method="post">
- <fieldset class="rows">
- <ol>
- <li><h2>Merge invoices</h2></li>
- <li><table id="merge_table">
- <thead><tr><th>Invoice no.</th><th>Shipment date</th><th>Billing date</th><th>Shipment cost</th></tr></thead>
- <tbody>
- </tbody>
- </table></li>
- <li><label for="merge_invoicenumber" class="required">Invoice number:</label>
- <input type="text" size="10" id="merge_invoicenumber" name="invoicenumber" value="" class="required" required="required" />
- <span class="required">Required</span>
- </li>
- <li><label for="merge_shipmentdate">Shipment date:</label>
- <input type="text" size="10" id="merge_shipmentdate" name="shipmentdate" value="" class="datepicker" /></li>
+ [% IF CAN_user_acquisition_merge_invoices %]
+ <a class="submit" id="merge" href="#merge_invoices">Merge selected invoices</a>
+ <div id="merge_invoices">
+ <form id="merge_invoice_form" action="/cgi-bin/koha/acqui/invoice.pl" method="post">
+ <fieldset class="rows">
+ <ol>
+ <li><h2>Merge invoices</h2></li>
+ <li><table id="merge_table">
+ <thead><tr><th>Invoice no.</th><th>Shipment date</th><th>Billing date</th><th>Shipment cost</th></tr></thead>
+ <tbody>
+ </tbody>
+ </table></li>
+ <li><label for="merge_invoicenumber" class="required">Invoice number:</label>
+ <input type="text" size="10" id="merge_invoicenumber" name="invoicenumber" value="" class="required" required="required" />
+ <span class="required">Required</span>
+ </li>
+ <li><label for="merge_shipmentdate">Shipment date:</label>
+ <input type="text" size="10" id="merge_shipmentdate" name="shipmentdate" value="" class="datepicker" /></li>
- <li><label for="merge_billingdate">Billing date:</label>
- <input type="text" size="10" id="merge_billingdate" name="billingdate" value="" class="datepicker" /></li>
+ <li><label for="merge_billingdate">Billing date:</label>
+ <input type="text" size="10" id="merge_billingdate" name="billingdate" value="" class="datepicker" /></li>
- <li><label for="merge_shipmentcost">Shipment cost:</label>
- <input type="text" size="10" id="merge_shipmentcost" name="shipmentcost" value="" /></li>
- <li><label for="merge_shipment_budgetid">Fund:</label>
- <select id="merge_shipment_budgetid" name="shipment_budget_id">
- <option value="">No fund</option>
- [% FOREACH budget IN budgets_loop %]
- <option value="[% budget.budget_id | html %]">[% budget.budget_name | html %]
- </option>
- [% END %]
- </select></li>
+ <li><label for="merge_shipmentcost">Shipment cost:</label>
+ <input type="text" size="10" id="merge_shipmentcost" name="shipmentcost" value="" /></li>
+ <li><label for="merge_shipment_budgetid">Fund:</label>
+ <select id="merge_shipment_budgetid" name="shipment_budget_id">
+ <option value="">No fund</option>
+ [% FOREACH budget IN budgets_loop %]
+ <option value="[% budget.budget_id | html %]">[% budget.budget_name | html %]
+ </option>
+ [% END %]
+ </select></li>
- <li><span class="label">Status:</span> <span id="merge_status"></span></li>
- <li><input type="submit" value="Merge" /></li>
- </ol>
- <input type="hidden" name="op" value="mod" />
- <input type="hidden" id="merge_invoiceid" name="invoiceid" value="" />
- </fieldset>
- </form>
- </div>
+ <li><span class="label">Status:</span> <span id="merge_status"></span></li>
+ <li><input type="submit" value="Merge" /></li>
+ </ol>
+ <input type="hidden" name="op" value="mod" />
+ <input type="hidden" id="merge_invoiceid" name="invoiceid" value="" />
+ </fieldset>
+ </form>
+ </div>
+ [% END %]
[% ELSE %]
<p>Sorry, but there are no results for your search.</p>
<p>Search was: