Created
October 18, 2012 07:30
-
-
Save thom4parisot/3910293 to your computer and use it in GitHub Desktop.
Freshbooks Invoice Total Hours
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
$('.invbody-items:first tbody tr').map(function(){ | |
return parseInt($(this).find('td:eq(3)').text().trim(), 10); | |
}).get().reduce(function(left, right){ | |
return (left || 0) + (right || 0); | |
}); // total hours as a number |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment