Class: SAFT::V2::HTML::Customer

Inherits:
Object
  • Object
show all
Defined in:
lib/saft/v2/html.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(customer) ⇒ Customer

Returns a new instance of Customer.



571
572
573
# File 'lib/saft/v2/html.rb', line 571

def initialize(customer)
  @customer = customer
end

Instance Attribute Details

#customerObject (readonly)

Returns the value of attribute customer.



569
570
571
# File 'lib/saft/v2/html.rb', line 569

def customer
  @customer
end

Instance Method Details

#nameObject



583
584
585
# File 'lib/saft/v2/html.rb', line 583

def name
  customer.name
end

#titleObject



575
576
577
578
579
580
581
# File 'lib/saft/v2/html.rb', line 575

def title
  "    \#{customer.name} \#{customer.registration_number}\n    opening balance \#{HTML.format_big_decimal(customer.opening_debit_balance || -customer.opening_credit_balance)}\n    closing balance \#{HTML.format_big_decimal(customer.closing_debit_balance || -customer.closing_credit_balance)}\n  TEXT\nend\n"