View | Details | Raw Unified | Return to bug 22773
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt (-10 / +11 lines)
Lines 119-132 Link Here
119
            </tbody>
119
            </tbody>
120
          </table>
120
          </table>
121
          [% IF CAN_user_acquisition_merge_invoices %]
121
          [% IF CAN_user_acquisition_merge_invoices %]
122
              <a class="btn btn-default submit merge" id="merge" href="#merge_invoices"><i class="fa fa-compress"></i> Merge selected invoices</a>
123
              [% IF tab == 'closed' %]
122
              [% IF tab == 'closed' %]
124
                <a class="btn btn-default" id="open_sel" href="#reopen_selected" data-op="reopen" data-referer="referer=/cgi-bin/koha/acqui/invoices.pl%3Fop=do_search%26invoicenumber=[% invoicenumber | uri %]%26supplier=[% booksellerid | uri %]%26shipmentdatefrom=[% shipmentdatefrom | $KohaDates %]%26shipmentdateto=[% shipmentdateto | $KohaDates %]%26billingdatefrom=[% billingdatefrom | $KohaDates %]%26billingdateto=[% billingdateto | $KohaDates %]%26isbneanissn=[% isbneanissn | uri %]%26title=[% title | uri %]%26author=[% author | uri %]%26publisher=[% publisher | uri %]%26publicationyear=[% publicationyear | uri %]%26branch=[% branch | uri %]"><i class="fa fa-refresh"></i> Reopen selected invoices</a>
123
                <a class="btn btn-default merge" id="merge" href="#merge_invoices" data-table="closedresultst"><i class="fa fa-compress"></i> Merge selected invoices</a>
124
                <a class="btn btn-default" id="open_sel" href="#reopen_selected" data-table="closedresultst" data-op="reopen" data-referer="referer=/cgi-bin/koha/acqui/invoices.pl%3Fop=do_search%26invoicenumber=[% invoicenumber | uri %]%26supplier=[% booksellerid | uri %]%26shipmentdatefrom=[% shipmentdatefrom | $KohaDates %]%26shipmentdateto=[% shipmentdateto | $KohaDates %]%26billingdatefrom=[% billingdatefrom | $KohaDates %]%26billingdateto=[% billingdateto | $KohaDates %]%26isbneanissn=[% isbneanissn | uri %]%26title=[% title | uri %]%26author=[% author | uri %]%26publisher=[% publisher | uri %]%26publicationyear=[% publicationyear | uri %]%26branch=[% branch | uri %]"><i class="fa fa-refresh"></i> Reopen selected invoices</a>
125
              [% ELSE  %]
125
              [% ELSE  %]
126
                <a class="btn btn-default" id="close_sel" href="#close_selected" data-op="close" data-referer="referer=/cgi-bin/koha/acqui/invoices.pl%3Fop=do_search%26invoicenumber=[% invoicenumber | uri %]%26supplier=[% booksellerid | uri %]%26shipmentdatefrom=[% shipmentdatefrom | $KohaDates %]%26shipmentdateto=[% shipmentdateto | $KohaDates %]%26billingdatefrom=[% billingdatefrom | $KohaDates %]%26billingdateto=[% billingdateto | $KohaDates %]%26isbneanissn=[% isbneanissn | uri %]%26title=[% title | uri %]%26author=[% author | uri %]%26publisher=[% publisher | uri %]%26publicationyear=[% publicationyear | uri %]%26branch=[% branch | uri %]"><i class="fa fa-times-circle"></i> Close selected invoices</a>
126
                <a class="btn btn-default merge" id="merge" href="#merge_invoices" data-status="openedresultst"><i class="fa fa-compress"></i> Merge selected invoices</a>
127
                <a class="btn btn-default" id="close_sel" href="#close_selected" data-table="openedresultst" data-op="close" data-referer="referer=/cgi-bin/koha/acqui/invoices.pl%3Fop=do_search%26invoicenumber=[% invoicenumber | uri %]%26supplier=[% booksellerid | uri %]%26shipmentdatefrom=[% shipmentdatefrom | $KohaDates %]%26shipmentdateto=[% shipmentdateto | $KohaDates %]%26billingdatefrom=[% billingdatefrom | $KohaDates %]%26billingdateto=[% billingdateto | $KohaDates %]%26isbneanissn=[% isbneanissn | uri %]%26title=[% title | uri %]%26author=[% author | uri %]%26publisher=[% publisher | uri %]%26publicationyear=[% publicationyear | uri %]%26branch=[% branch | uri %]"><i class="fa fa-times-circle"></i> Close selected invoices</a>
127
              [% END %]
128
              [% END %]
128
129
          [% END %] <!-- invoices_table -->
129
          [% END %] <!-- invoices_table -->
130
        [% END %]
130
              <div id="invoicestabs" class="toptabs" style="clear:both;">
131
              <div id="invoicestabs" class="toptabs" style="clear:both;">
131
                  <ul class="ui-tabs-nav">
132
                  <ul class="ui-tabs-nav">
132
                      <li><a href="#opened">Open invoices ([% openedinvoices.size || 0 | html %])</a></li>
133
                      <li><a href="#opened">Open invoices ([% openedinvoices.size || 0 | html %])</a></li>
Lines 192-198 Link Here
192
                  </fieldset>
193
                  </fieldset>
193
                  </form>
194
                  </form>
194
              </div>
195
              </div>
195
          [% END %]
196
        [% ELSE %]
196
        [% ELSE %]
197
          <p>Sorry, but there are no results for your search.</p>
197
          <p>Sorry, but there are no results for your search.</p>
198
          <p>Search was:
198
          <p>Search was:
Lines 388-396 Link Here
388
            $('#open_sel,#close_sel').click(function () {
388
            $('#open_sel,#close_sel').click(function () {
389
                var referer = $(this).attr("data-referer");
389
                var referer = $(this).attr("data-referer");
390
                var op = $(this).attr("data-op");
390
                var op = $(this).attr("data-op");
391
                var table = $(this).data('table');
391
                var invoice_link = "invoice.pl?op="+op;
392
                var invoice_link = "invoice.pl?op="+op;
392
                if ($('.select-invoice:checked').length) {
393
                if ($('#' + table + ' .select-invoice:checked').length) {
393
                    $('.select-invoice:checked').each(function () {
394
                    $('#' + table + ' .select-invoice:checked').each(function () {
394
                            var row = $(this).parents('tr');
395
                            var row = $(this).parents('tr');
395
                            invoice_link = invoice_link + "&amp;invoiceid="+$(row).attr('data-invoiceid');
396
                            invoice_link = invoice_link + "&amp;invoiceid="+$(row).attr('data-invoiceid');
396
                    });
397
                    });
Lines 404-414 Link Here
404
                var booksellerid;
405
                var booksellerid;
405
                var mismatch;
406
                var mismatch;
406
                var invoices = [ ];
407
                var invoices = [ ];
407
                if ($('.select-invoice:checked').size() < 2) {
408
                var table = $(this).data('table');
409
                if ($('#' + table + ' .select-invoice:checked').size() < 2) {
408
                    alert(_("You must select at least two invoices to merge."));
410
                    alert(_("You must select at least two invoices to merge."));
409
                    return false;
411
                    return false;
410
                }
412
                }
411
                $('.select-invoice:checked').each(function () {
413
                $('#' + table + ' .select-invoice:checked').each(function () {
412
                    var row = $(this).parents('tr');
414
                    var row = $(this).parents('tr');
413
                    booksellerid = booksellerid || $(row).attr('data-booksellerid');
415
                    booksellerid = booksellerid || $(row).attr('data-booksellerid');
414
                    if (booksellerid !== $(row).attr('data-booksellerid')) {
416
                    if (booksellerid !== $(row).attr('data-booksellerid')) {
415
- 

Return to bug 22773