Created
          February 27, 2014 23:01 
        
      - 
      
- 
        Save nyarly/9261519 to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or 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
    
  
  
    
  | module Accounting | |
| module Handling | |
| def revenue_account(name) | |
| Plutus::Revenue.find_or_create_by(:name => name) | |
| end | |
| def asset_account(name) | |
| Plutus::Assets.find_or_create_by(:name => name) | |
| end | |
| def received_sponsorships_account | |
| revenue_account("Received Sponsorships") | |
| end | |
| def assignable_sponsorship_budget | |
| asset_account("Assignable Sponsorship Budget") | |
| end | |
| def operating_budget_name | |
| "Operating Budget" | |
| end | |
| def operating_budget | |
| asset_account(operating_budget_name) | |
| end | |
| def reserved_meal_fund(restaurant) | |
| asset_account(restaurant.role.reserved_meal_funds_name) | |
| end | |
| end | |
| end | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment