Skip to content

Instantly share code, notes, and snippets.

@nbouscal
Created June 9, 2015 15:00
Show Gist options
  • Save nbouscal/ae736fd51e8fe71df0f8 to your computer and use it in GitHub Desktop.
Save nbouscal/ae736fd51e8fe71df0f8 to your computer and use it in GitHub Desktop.
org proportion of expense
proportionOfExpense = do
split <- getSupportedOrgSplit
centralExpense <- forOrg central getOrgSubtotalExpense
let shareOfCentral = split * centralExpense
totalExpense <- getSupportedOrgTotalExpense
let proportion = shareOfCentral / totalExpense
return proportion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment