Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Active Collab bookmarklet to get a sum value of all the invoices in the Invoices Report

To get a sum value of all the invoices in the Invoices Report:

  1. Make a new bookmark and paste this code in the URL field (ie. bookmark this code as a page):

javascript:javascript:$('[ng-repeat="result in vm.filterResults"]').each(function(){ var total = 0; $(this).find('.col_balance_due').each(function(){ total += parseInt($(this).text().replace(',','').replace('.00','')); }); $(this).find('h2').text($(this).find('h2').text()+' ($'+total+')'); });

  1. Name it as you like (eg. AC-invoices-sum)

  2. Go to Active Collab and run the Invoice Report

  3. Click on the bookmark you created and you'll get the sum value of all the invoices

Credit: jayshields for the original script that gives you a sum total of the grouped invoices on the Invoices Page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.