Skip to content

Instantly share code, notes, and snippets.

@noelworden
Last active June 16, 2020 02:19
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 noelworden/455e145ede4be099684aac9ee7f26295 to your computer and use it in GitHub Desktop.
Save noelworden/455e145ede4be099684aac9ee7f26295 to your computer and use it in GitHub Desktop.
rev_minus_cost = round(sub(total_merch_rev, total_group_costs), 2)
net_rev = round(net_revenue_shared, 2)
if rev_minus_cost == net_rev do
changeset
else
add_error(
changeset,
:net_revenue_shared,
"must be total_merch_rev minus total_group costs"
)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment