Created
September 30, 2010 21:37
-
-
Save jeffrydegrande/605368 to your computer and use it in GitHub Desktop.
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
$(".grid input:checked").each(function(e){ | |
var isPending = $(this).parents("tr:first").hasClass("pending"); | |
var value = currencyToFloat( tr.children(".value").html() ); | |
if (isDebit(value)) { | |
adjustDebit(value); | |
} else if (isCredit(value)) { | |
adjustCredit(value); | |
} | |
}); | |
function adjustDebit(value) { | |
if (isPending) { | |
pendingDebits += value; | |
} else { | |
debits += value; | |
} | |
} | |
function adjustCredit(value) { | |
if (isPending) { | |
pendingCredits += value; | |
} else { | |
credits += value; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment