Skip to content

Instantly share code, notes, and snippets.

@zachariahtimothy
Created December 8, 2015 22:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zachariahtimothy/0a57d8fd73ca933253e3 to your computer and use it in GitHub Desktop.
Save zachariahtimothy/0a57d8fd73ca933253e3 to your computer and use it in GitHub Desktop.
Console script to run to extract total hours from Estimate. This is helpful if you have multiple line items with multiple bill rates.
var total = 0;
$('.invbody-items').find('.quantity').each(function (i, item) {
var me = $(item).text().trim();
me = parseFloat(me, 10);
if (me) { total += me; }
});
console.log('Total Hours:', total);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment