Module: Ksef::FA3::Builder::Corrections
- Included in:
- Ksef::FA3::Builder
- Defined in:
- lib/ksef/fa3/builder/corrections.rb
Overview
The DSL calls that make an invoice a correction, and the assembly behind them.
Split out of Ksef::FA3::Builder for length, and along the same seam the validator splits: a
correction is a self-contained subject with its own value objects (docs/REFERENCE.md
§8.4). Mixed into Ksef::FA3::Builder, so @correction and @corrected are its state.
Instance Method Summary collapse
-
#correction(**attributes) ⇒ Object
Makes this a correction.
-
#corrects(**attributes) ⇒ Object
Names one invoice this correction corrects.
Instance Method Details
#correction(**attributes) ⇒ Object
Makes this a correction. Optional next to #corrects, which is what a correction actually needs; call this for the reason, the effect date and the rest.
18 19 20 |
# File 'lib/ksef/fa3/builder/corrections.rb', line 18 def correction(**attributes) @correction = normalise(attributes, CORRECTION_KEYS, {}, "correction") end |
#corrects(**attributes) ⇒ Object
Names one invoice this correction corrects. Call once per corrected invoice; a collective correction under art. 106j ust. 3 names many.
27 28 29 |
# File 'lib/ksef/fa3/builder/corrections.rb', line 27 def corrects(**attributes) @corrected << CorrectedInvoice.new(**normalise(attributes, CORRECTED_KEYS, {}, "corrects")) end |