Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def percent_total(amount)
- if self.school.is_mbs
- if mbs_total_sales == 0
- 0
- else
- (amount/mbs_total_sales.to_f) * 100
- end
- else
- if total_sales == 0
- 0
- else
- (amount/total_sales.to_f) * 100
- end
- end
- end
Add Comment
Please, Sign In to add comment