@@ -8,7 +8,7 @@ Croatia is a gem that contains various utilities for performing Croatia-specific
88 - [x] Validation
99 - [x] Parsing
1010 - [x] Generation
11- - [ ] Invoices
11+ - [ ] Invoices [ MISSING E-INVOICE SUPPORT ]
1212 - [x] Discounts
1313 - [x] Percentage
1414 - [x] Total
@@ -19,12 +19,12 @@ Croatia is a gem that contains various utilities for performing Croatia-specific
1919 - [x] Margins _ (Marza)_
2020- [x] Payment barcodes
2121 - [x] HUB3 standard 2D barcode generation
22- - [ ] Fiscalization v2.3 _ (Fiskalizacija)_
22+ - [ ] Fiscalization v2.3 _ (Fiskalizacija)_ [ NOT YET VERIFIED ]
2323 - [x] Issuer protection code generation _ (ZKI)_
2424 - [x] Reverse _ (storno)_
25- - [ ] Invoices _ (racuni)_
26- - [ ] Supporting documents _ (prateci dokumenti - otpremnice, radni nalozi, ponude, ugovori, ...)_
27- - [ ] Payment method change
25+ - [x ] Invoices _ (racuni)_
26+ - [x ] Supporting documents _ (prateci dokumenti - otpremnice, radni nalozi, ponude, ugovori, ...)_
27+ - [x ] Payment method change
2828 - [x] Verification QR code generation
2929- [ ] E-Invoice _ (e-Racun)_
3030
@@ -64,13 +64,17 @@ Croatia.configure do |config|
6464
6565 # Fiscalization defaults
6666 config.fiscalization = {
67- certificate : " path/to/your/certificate .p12" , # or File.read("path/to/your/certificate .p12")
68- password: ENV [" FISCALIZATION_CERTIFICATE_PASSWORD " ]
67+ credential : " path/to/your/credential .p12" , # or File.read("path/to/your/credential .p12")
68+ password: ENV [" FISCALIZATION_CREDENTIAL_PASSWORD " ]
6969 }
70- # You can also use a plain private key (.key) file instead of a full certificate (.p12)
71- # if you don't have a .p12 or don't want to store/manage a password.
70+ # You can also use separate private key and certificate files instead of a full credential (.p12)
7271 # config.fiscalization = {
73- # certificate: "path/to/your/private_key.key", # or ENV["FISCALIZATION_PRIVATE_KEY"],
72+ # credential: {
73+ # private_key: "path/to/your/private_key.key", # or ENV["FISCALIZATION_PRIVATE_KEY"]
74+ # certificate: "path/to/your/certificate.crt", # or ENV["FISCALIZATION_CERTIFICATE"]
75+ # ca_chain: ENV["FISCALIZATION_CA_CHAIN"] # optional, or "path/to/your/ca_cert.crt"
76+ # },
77+ # password: "credential_password" # only needed for encrypted private keys
7478 # }
7579end
7680```
@@ -255,10 +259,10 @@ barcode.to_png # => "\b..."
255259# Issuer protection code (ZKI) is generated automatically
256260invoice.issuer_protection_code # => "abcd1234efgh5678ijkl9012mnop3456"
257261
258- # Fiscalize an invoice using the certificate from the config
262+ # Fiscalize an invoice using the credential from the config
259263invoice.fiscalize!
260- # Fiscalize an invoice using a custom certificate and password
261- invoice.fiscalize!(certificate : " path/to/your/certificate .p12" , password: " your_password" )
264+ # Fiscalize an invoice using a custom credential and password
265+ invoice.fiscalize!(credential : " path/to/your/credential .p12" , password: " your_password" )
262266
263267# In case you want to "undo" a fiscalized invoice, you can reverse the invoice
264268invoice.reverse!
0 commit comments