Created
September 28, 2016 13:33
-
-
Save jayshields/860cf454a408740449209f6ec0c7f549 to your computer and use it in GitHub Desktop.
Active Collab invoice total bookmarklet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('[ng-repeat="invoices in grouped_invoices"]').each(function(){ | |
var total = 0; | |
$(this).find('.invoice_card_amount_number').each(function(){ | |
total += parseInt($(this).text().replace(',','').replace('.00','')); | |
}); | |
$(this).find('h2.lighter').text($(this).find('h2.lighter').text()+' (£'+total+')'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just create a new bookmark and set the page to:
javascript:$('[ng-repeat="invoices in grouped_invoices"]').each(function(){ var total = 0; $(this).find('.invoice_card_amount_number').each(function(){ total += parseInt($(this).text().replace(',','').replace('.00','')); }); $(this).find('h2.lighter').text($(this).find('h2.lighter').text()+' (£'+total+')'); });
Then click the bookmark whenever you're on the Invoices page in Active Collab, and it'll give you a sum total in the headers of the grouped invoices.