Last active
June 16, 2020 02:19
-
-
Save noelworden/455e145ede4be099684aac9ee7f26295 to your computer and use it in GitHub Desktop.
This file contains 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
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