Module: Ksef::FA3::Builder::Advances
- Included in:
- Ksef::FA3::Builder
- Defined in:
- lib/ksef/fa3/builder/advances.rb
Overview
The DSL calls for the advance-payment family — the order a ZAL collects against and
the advance invoices a ROZ settles (docs/REFERENCE.md §8.5).
Mixed into Ksef::FA3::Builder, so @order, @order_lines and @advances are its state.
Instance Method Summary collapse
-
#order(**attributes) ⇒ Object
The order or contract an advance invoice collects against (
Zamowienie, art. 106f ust. 1 pkt 4). -
#order_line(**attributes) ⇒ Object
Appends one position of the order.
-
#settles(**attributes) ⇒ Object
Names one advance invoice this settlement invoice settles (
FakturaZaliczkowa).
Instance Method Details
#order(**attributes) ⇒ Object
The order or contract an advance invoice collects against (Zamowienie, art. 106f
ust. 1 pkt 4). Sets the order's own total; call #order_line for its positions.
16 17 18 |
# File 'lib/ksef/fa3/builder/advances.rb', line 16 def order(**attributes) @order = normalise(attributes, ORDER_KEYS, {}, "order") end |
#order_line(**attributes) ⇒ Object
Appends one position of the order. Nothing here is derived — see OrderLine.
24 25 26 |
# File 'lib/ksef/fa3/builder/advances.rb', line 24 def order_line(**attributes) @order_lines << OrderLine.new(**normalise(attributes, ORDER_LINE_KEYS, LINE_ALIASES, "order line")) end |
#settles(**attributes) ⇒ Object
Names one advance invoice this settlement invoice settles (FakturaZaliczkowa). Call
once per advance invoice; art. 106f ust. 3 allows up to a hundred.
33 34 35 |
# File 'lib/ksef/fa3/builder/advances.rb', line 33 def settles(**attributes) @advances << AdvanceInvoice.new(**normalise(attributes, ADVANCE_KEYS, {}, "settles")) end |