Class: PaypalTransaction::Single
- Inherits:
-
PaypalTransaction
- Object
- ActiveRecord::Base
- PaypalTransaction
- PaypalTransaction::Single
- Defined in:
- lib/bookkeeper/paypal_transaction/single.rb
Instance Method Summary collapse
Instance Method Details
#to_postings ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/bookkeeper/paypal_transaction/single.rb', line 3 def to_postings gross = self.notification.amount.cents.to_f / 100 fee = self.notification.fee.to_f postings = [] postings << account.debit(gross - fee) postings << Account.paypal_fees_account.debit(fee) if(fee > 0) postings end |