Jump to content
thirty bees forum

mass invoice download enhancement


Pedalman

Recommended Posts

I have a small change to my /js/admin.js that adds the function to mass download invoices. This is incredible helpful to me since I a have a tool running in the background of my OS that monitors my download folder for 'invoice.php'/'invoice.pdf' and send it directly to my printer and moves them then to another folder where my archive tool grabs them...

If you change the file with the given lines of code you will get an additionl button in back office order at the bottom where the 'Action' button sits.

 

 

  $('body.adminorders .bulk-actions ul').append('<li><a href="#" id="downloadBulkSingle"><i class="icon-download"></i> Bulk InVOICE download</a></li>');
  
  $('a#downloadBulkSingle').click(function(e){
	  e.preventDefault();
	  $('[name="orderBox[]"]:checked').each((i,e)=>
		$(e).parents('tr').find('a[href*="generateInvoicePDF"]').each((a,c) => c.click()));
  });

I inserted it into line 911.

2019-02-19 15_30_31-admin.js - Textvergleich - Beyond Compare.png

2019-02-19 15_32_58-Bestellungen.png

Edited by Pedalman
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...