Guest User

Untitled

a guest
Jun 20th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. envelope_balance =
  2.  
  3. EnvelopeTransaction.where(
  4. :destination => [self]).sum(:amount) -
  5.  
  6. EnvelopeTransaction.where(
  7. :source_type => envelope,
  8. :source_id => [self]).sum(:amount)
Add Comment
Please, Sign In to add comment