Class: Hbci::Segments::HISALv4

Inherits:
Hbci::Segment show all
Defined in:
lib/hbci/segments/hisal.rb

Instance Attribute Summary

Attributes inherited from Hbci::Segment

#defined_element_groups, #dialog, #element_groups, #message, #request_message

Instance Method Summary collapse

Methods inherited from Hbci::Segment

#build, #compile, element, element_group, element_groups_to_be_defined, fill, #initialize, #to_s

Constructor Details

This class inherits a constructor from Hbci::Segment

Instance Method Details

#booked_amountObject



30
31
32
33
34
35
36
# File 'lib/hbci/segments/hisal.rb', line 30

def booked_amount
  sign = case booked.credit_debit
         when 'C' then 1
         when 'D' then -1
         end
  sign * Monetize.parse(booked.btg_value, booked.btg_curr)
end