| 
      
            Lines 128-134
          
      
      
        Link Here
      
     | 
  
        
          | 128 | 
                                              <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-solid fa-rotate"></i> Reopen selected invoices</a>  | 
          128 | 
                                              <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-solid fa-rotate"></i> Reopen selected invoices</a>  | 
        
        
          | 129 | 
                                          [% ELSE  %]  | 
          129 | 
                                          [% ELSE  %]  | 
        
        
          | 130 | 
                                              <a class="btn btn-default merge" id="merge_open" href="#merge_invoices" data-table="openedresultst"><i class="fa fa-compress"></i> Merge selected invoices</a>  | 
          130 | 
                                              <a class="btn btn-default merge" id="merge_open" href="#merge_invoices" data-table="openedresultst"><i class="fa fa-compress"></i> Merge selected invoices</a>  | 
        
          
            
              | 131 | 
                                                  <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>  | 
              131 | 
                                                  <a class="submit-form-link btn btn-default" id="close_sel" data-table="openedresultst" data-op="cud-close" data-action="invoice.pl" data-method="post" data-referer="/cgi-bin/koha/acqui/invoices.pl?op=do_search&invoicenumber=[% invoicenumber | html %]&supplier=[% booksellerid | html %]&shipmentdatefrom=[% shipmentdatefrom | $KohaDates %]&shipmentdateto=[% shipmentdateto | $KohaDates %]&billingdatefrom=[% billingdatefrom | $KohaDates %]&billingdateto=[% billingdateto | $KohaDates %]&isbneanissn=[% isbneanissn | html %]&title=[% title | html %]&author=[% author | html %]&publisher=[% publisher | html %]&publicationyear=[% publicationyear | html %]&branch=[% branch | html %]"><i class="fa fa-times-circle"></i> Close selected invoices</a>  | 
            
        
          | 132 | 
                                          [% END # /IF tab == 'closed' %]  | 
          132 | 
                                          [% END # /IF tab == 'closed' %]  | 
        
        
          | 133 | 
                                      [% END # /IF CAN_user_acquisition_merge_invoices %]  | 
          133 | 
                                      [% END # /IF CAN_user_acquisition_merge_invoices %]  | 
        
        
          | 134 | 
                                  [% END # /BLOCK invoices_table %]  | 
          134 | 
                                  [% END # /BLOCK invoices_table %]  | 
        
  
    | 
      
            Lines 462-477
          
      
      
        Link Here
      
     | 
  
        
          | 462 | 
                      });  | 
          462 | 
                      });  | 
        
        
          | 463 | 
           | 
          463 | 
           | 
        
        
          | 464 | 
                      $('#open_sel,#close_sel').click(function () { | 
          464 | 
                      $('#open_sel,#close_sel').click(function () { | 
        
            
              | 465 | 
                              var referer = $(this).attr("data-referer"); | 
               | 
               | 
            
            
              | 466 | 
                              var op = $(this).attr("data-op"); | 
            
        
          | 467 | 
                          var table = $(this).data('table'); | 
          465 | 
                          var table = $(this).data('table'); | 
        
          
            
              | 468 | 
                              var invoice_link = "invoice.pl?op="+op;  | 
              466 | 
                              var invoice_ids = "";  | 
            
        
          | 469 | 
                          if ($('#' + table + ' .select-invoice:checked').length) { | 
          467 | 
                          if ($('#' + table + ' .select-invoice:checked').length) { | 
        
        
          | 470 | 
                              $('#' + table + ' .select-invoice:checked').each(function () { | 
          468 | 
                              $('#' + table + ' .select-invoice:checked').each(function () { | 
        
        
          | 471 | 
                                      var row = $(this).parents('tr'); | 
          469 | 
                                      var row = $(this).parents('tr'); | 
        
          
            
              | 472 | 
                                          invoice_link = invoice_link + "&invoiceid="+$(row).attr('data-invoiceid'); | 
              470 | 
                                          invoice_ids = invoice_ids + ","+$(row).attr('data-invoiceid'); | 
            
        
          | 473 | 
                              });  | 
          471 | 
                              });  | 
        
          
            
              | 474 | 
                                  window.location.href =invoice_link +"&"+referer;  | 
              472 | 
                                  $(this).attr('data-invoiceid', invoice_ids); | 
            
        
          | 475 | 
                          } else { | 
          473 | 
                          } else { | 
        
        
          | 476 | 
                              alert ("Please select at least one invoice." ); | 
          474 | 
                              alert ("Please select at least one invoice." ); | 
        
        
          | 477 | 
                          }  | 
          475 | 
                          }  | 
        
            
              | 478 | 
              -   | 
               | 
               |