Advertisement
Guest User

Untitled

a guest
Feb 25th, 2020
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. validate :check_vds_amount
  2.  
  3. def check_vds_amount
  4. errors.add :vds_amount,
  5. 'needs to be less than or equal to VAT' if vds_amount > self.purchase.vat_payable
  6. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement