Class: Sie::Document::VoucherSeries

Inherits:
Object
  • Object
show all
Defined in:
lib/sie/document/voucher_series.rb

Constant Summary collapse

DEBTOR_INVOICE =
"KF"
DEBTOR_PAYMENT =
"KI"
SUPPLIER_INVOICE =
"LF"
SUPPLIER_PAYMENT =
"KB"
OTHER =
"LV"

Class Method Summary collapse

Class Method Details

.for(creditor, type) ⇒ Object



9
10
11
12
13
14
15
16
17
18
# File 'lib/sie/document/voucher_series.rb', line 9

def self.for(creditor, type)
  case type
  when :invoice
    creditor ? SUPPLIER_INVOICE : DEBTOR_INVOICE
  when :payment
    creditor ? SUPPLIER_PAYMENT : DEBTOR_PAYMENT
  else
    OTHER
  end
end