Skip to content
This repository was archived by the owner on Jul 31, 2025. It is now read-only.

Fix fee value in the Fiscalizer::Serializer::Invoice - #8

Open
viktorzimmermann wants to merge 1 commit into
infinum:masterfrom
viktorzimmermann:patch-1
Open

Fix fee value in the Fiscalizer::Serializer::Invoice#8
viktorzimmermann wants to merge 1 commit into
infinum:masterfrom
viktorzimmermann:patch-1

Conversation

@viktorzimmermann

Copy link
Copy Markdown

When fiscalising Invoice with Fee
Fiscalizer::Fee.new(name: 'Povratna naknada', value: 0.5)

Response from Porezna is:

Poruka nije u skladu s XML shemom : cvc-simple-type 1: element {http://www.apis-it.hr/fin/2012/types/f73}IznosN value '0.5' is not a valid instance of type {http://www.apis-it.hr/fin/2012/types/f73}IznosType

🙄

I noticed that there is already a methods value_str in the Fiscalizer::Fee so we can just use that in the serializer?

    def value_str
      format('%15.2f', value).strip
    end

When fiscalising Invoice with Fee
Fiscalizer::Fee.new(name: 'Povratna naknada', value: 0.5)

Response from Porezna is:
Poruka nije u skladu s XML shemom :  cvc-simple-type 1: element {http://www.apis-it.hr/fin/2012/types/f73}IznosN value '0.5' is not a valid instance of type {http://www.apis-it.hr/fin/2012/types/f73}IznosType
🙄

I noticed we have value_str in Fiscalizer:Fee so we can just use that in the serializer?
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant