Class: Dorsale::ExpenseGun::ExpenseLine
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Dorsale::ExpenseGun::ExpenseLine
- Defined in:
- app/models/dorsale/expense_gun/expense_line.rb
Instance Method Summary collapse
- #employee_payback ⇒ Object
-
#initialize ⇒ ExpenseLine
constructor
A new instance of ExpenseLine.
- #total_vat_deductible ⇒ Object
Constructor Details
#initialize ⇒ ExpenseLine
Returns a new instance of ExpenseLine.
7 8 9 10 |
# File 'app/models/dorsale/expense_gun/expense_line.rb', line 7 def initialize(*) super self.company_part = 100 if company_part.nil? end |
Instance Method Details
#employee_payback ⇒ Object
20 21 22 |
# File 'app/models/dorsale/expense_gun/expense_line.rb', line 20 def employee_payback (total_all_taxes * company_part / 100) end |
#total_vat_deductible ⇒ Object
24 25 26 |
# File 'app/models/dorsale/expense_gun/expense_line.rb', line 24 def total_vat_deductible category.vat_deductible == true ? (vat * company_part / 100) : 0.0 end |