Class: Comptaline::AccountingEntry::Invoice
- Defined in:
- lib/comptaline/accounting_entry/invoice.rb
Instance Attribute Summary collapse
-
#account_assignment ⇒ Object
Returns the value of attribute account_assignment.
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#amount_with_vat ⇒ Object
Returns the value of attribute amount_with_vat.
-
#communication ⇒ Object
Returns the value of attribute communication.
-
#currency_code ⇒ Object
Returns the value of attribute currency_code.
-
#customer ⇒ Object
Returns the value of attribute customer.
-
#date ⇒ Object
Returns the value of attribute date.
-
#due_date ⇒ Object
Returns the value of attribute due_date.
-
#invoice_number ⇒ Object
Returns the value of attribute invoice_number.
-
#is_credit_note ⇒ Object
Returns the value of attribute is_credit_note.
-
#match_id ⇒ Object
Returns the value of attribute match_id.
-
#structured_communication ⇒ Object
Returns the value of attribute structured_communication.
-
#vat_amount ⇒ Object
Returns the value of attribute vat_amount.
-
#vat_code ⇒ Object
Returns the value of attribute vat_code.
Instance Method Summary collapse
-
#initialize(type = {}) ⇒ Invoice
constructor
A new instance of Invoice.
- #to_a ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(type = {}) ⇒ Invoice
Returns a new instance of Invoice.
7 8 9 |
# File 'lib/comptaline/accounting_entry/invoice.rb', line 7 def initialize(type = {}) @is_credit_note = type[:is_credit_note] == true end |
Instance Attribute Details
#account_assignment ⇒ Object
Returns the value of attribute account_assignment.
4 5 6 |
# File 'lib/comptaline/accounting_entry/invoice.rb', line 4 def account_assignment @account_assignment end |
#amount ⇒ Object
Returns the value of attribute amount.
4 5 6 |
# File 'lib/comptaline/accounting_entry/invoice.rb', line 4 def amount @amount end |
#amount_with_vat ⇒ Object
Returns the value of attribute amount_with_vat.
4 5 6 |
# File 'lib/comptaline/accounting_entry/invoice.rb', line 4 def amount_with_vat @amount_with_vat end |
#communication ⇒ Object
Returns the value of attribute communication.
4 5 6 |
# File 'lib/comptaline/accounting_entry/invoice.rb', line 4 def communication @communication end |
#currency_code ⇒ Object
Returns the value of attribute currency_code.
4 5 6 |
# File 'lib/comptaline/accounting_entry/invoice.rb', line 4 def currency_code @currency_code end |
#customer ⇒ Object
Returns the value of attribute customer.
4 5 6 |
# File 'lib/comptaline/accounting_entry/invoice.rb', line 4 def customer @customer end |
#date ⇒ Object
Returns the value of attribute date.
4 5 6 |
# File 'lib/comptaline/accounting_entry/invoice.rb', line 4 def date @date end |
#due_date ⇒ Object
Returns the value of attribute due_date.
4 5 6 |
# File 'lib/comptaline/accounting_entry/invoice.rb', line 4 def due_date @due_date end |
#invoice_number ⇒ Object
Returns the value of attribute invoice_number.
4 5 6 |
# File 'lib/comptaline/accounting_entry/invoice.rb', line 4 def invoice_number @invoice_number end |
#is_credit_note ⇒ Object
Returns the value of attribute is_credit_note.
4 5 6 |
# File 'lib/comptaline/accounting_entry/invoice.rb', line 4 def is_credit_note @is_credit_note end |
#match_id ⇒ Object
Returns the value of attribute match_id.
4 5 6 |
# File 'lib/comptaline/accounting_entry/invoice.rb', line 4 def match_id @match_id end |
#structured_communication ⇒ Object
Returns the value of attribute structured_communication.
4 5 6 |
# File 'lib/comptaline/accounting_entry/invoice.rb', line 4 def structured_communication @structured_communication end |
#vat_amount ⇒ Object
Returns the value of attribute vat_amount.
4 5 6 |
# File 'lib/comptaline/accounting_entry/invoice.rb', line 4 def vat_amount @vat_amount end |
#vat_code ⇒ Object
Returns the value of attribute vat_code.
4 5 6 |
# File 'lib/comptaline/accounting_entry/invoice.rb', line 4 def vat_code @vat_code end |
Instance Method Details
#to_a ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/comptaline/accounting_entry/invoice.rb', line 11 def to_a [ action, @customer.id, journal, period, invoice_number, format_date(@date), format_date(@due_date), @communication, @structured_communication, account_assignment, vat_code, @amount, @vat_amount, @amount_with_vat, @currency_code, @match_id, credit_note_flag ] end |