Class: Economic::CashBookEntryProxy
- Inherits:
-
EntityProxy
- Object
- EntityProxy
- Economic::CashBookEntryProxy
- Defined in:
- lib/economic/proxies/cash_book_entry_proxy.rb
Instance Attribute Summary
Attributes inherited from EntityProxy
Instance Method Summary collapse
- #all ⇒ Object
-
#create_creditor_invoice(handles) ⇒ Object
Creates a creditor invoice and returns the cash book entry.
-
#create_creditor_payment(handles) ⇒ Object
Creates a creditor payment and returns the cash book entry.
-
#create_debtor_payment(handles) ⇒ Object
Creates a debtor payment and returns the cash book entry.
-
#create_finance_voucher(handles) ⇒ Object
Creates a finance voucher and returns the cash book entry.
- #set_due_date(id, date) ⇒ Object
Methods inherited from EntityProxy
#append, #build, entity_class, #entity_class, entity_class_name, #entity_class_name, #find, #get_data, #initialize, #session
Constructor Details
This class inherits a constructor from Economic::EntityProxy
Instance Method Details
#all ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/economic/proxies/cash_book_entry_proxy.rb', line 5 def all entity_hash = session.request( Endpoint.new.soap_action_name(CashBook, :get_entries), "cashBookHandle" => owner.handle.to_hash ) if entity_hash != {} [entity_hash.values.first].flatten.each do |id_hash| find(id_hash) end end self end |
#create_creditor_invoice(handles) ⇒ Object
Creates a creditor invoice and returns the cash book entry. Example:
cash_book.entries.create_creditor_invoice(
:creditor_handle => { :number => 1 },
:contra_account_handle => { :number => 1510 }
)
55 56 57 |
# File 'lib/economic/proxies/cash_book_entry_proxy.rb', line 55 def create_creditor_invoice(handles) create_cash_book_entry_for_handles(handles, "CreateCreditorInvoice") end |
#create_creditor_payment(handles) ⇒ Object
Creates a creditor payment and returns the cash book entry. Example:
cash_book.entries.create_creditor_payment(
:creditor_handle => { :number => 1 },
:contra_account_handle => { :number => 1510 }
)
45 46 47 |
# File 'lib/economic/proxies/cash_book_entry_proxy.rb', line 45 def create_creditor_payment(handles) create_cash_book_entry_for_handles(handles, "CreateCreditorPayment") end |
#create_debtor_payment(handles) ⇒ Object
Creates a debtor payment and returns the cash book entry. Example:
cash_book.entries.create_debtor_payment(
:debtor_handle => { :number => 1 },
:contra_account_handle => { :number => 1510 }
)
35 36 37 |
# File 'lib/economic/proxies/cash_book_entry_proxy.rb', line 35 def create_debtor_payment(handles) create_cash_book_entry_for_handles(handles, "CreateDebtorPayment") end |
#create_finance_voucher(handles) ⇒ Object
Creates a finance voucher and returns the cash book entry. Example:
cash_book.entries.create_finance_voucher(
:account_handle => { :number => 1010 },
:contra_account_handle => { :number => 1011 }
)
25 26 27 |
# File 'lib/economic/proxies/cash_book_entry_proxy.rb', line 25 def create_finance_voucher(handles) create_cash_book_entry_for_handles(handles, "CreateFinanceVoucher") end |
#set_due_date(id, date) ⇒ Object
59 60 61 62 63 64 |
# File 'lib/economic/proxies/cash_book_entry_proxy.rb', line 59 def set_due_date(id, date) request("SetDueDate", "cashBookEntryHandle" => { "Id1" => owner.handle[:number], "Id2" => id }, :value => date) end |