All notable changes to GOBL will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning. See also the GOBL versions documentation site for more details.
tax.Regime
: added new "Identity Keys" definition.- IT:
it-sdi-format
extension added with the two main document formats in Italy:FPA12
andFPR12
(default for B2B/C if none assigned).
tax.Identity
: deprecated thetype
field, and directly removed theuuid
andmeta
fields which no longer make sense here.tax.Regime
: standardised naming around key definitions to always include_keys
as suffix.- IT: moved fiscal code (codice fiscale) from the
org.Party
Tax ID to the Identities array with the specific keyit-fiscal-code
. This implies that invoices can now be issued with both a VAT code (partita IVA) and a fiscal code (codice fiscale). - IT: data will be normalized automatically to move the fiscal code from the tax ID to the identities array.
- IT: removed explicit support for Tax ID type field.
- ES: moved Tax ID
type
usage to theidentities
array. - CO: moved Tax ID type definitions to
identities
array.
- GR: Invoice and address validations
- GR: Payment means key definitions
- GB: removed requirement for suppliers to have a tax ID code (country is still required!)
num.Amount
-RescaleDown
method, that helps reduce accuracy from a number if higher.num.Amount
-RescaleRange
method, ensures that the exponent is within a specific range.- Greece tax regime
tax.Combo
- regime specific calculations now supported.
org.Registration
: addedother
field.
- Field descriptions of
org.Website
- PT:
at-app-id
stamp for the application ID used to register a document.
num.AmountFromFloat64
method helps avoid rounding issues when using floats.- PT:
at-hash
stamp to store the AT's hash of an invoice
- MX: Fuel account balance totals calculated maintaining item price precision.
- ISO 3166-1 alpha-3 codes (and a function to access them) added to the country definitions (
l10n.CountryDef
) - MX:
mx.TaxIdentityCodeGeneric
constant added with the generic RFC for final consumers
- MX: customer extensions no longer required for foreign customers
- CH: fixing tax ID checksum validation that ends in
0
.
- Default values added to correction options schema based on values from previous invoice.
- In
pay.Online
, renamedname
property tolabel
, andaddr
toURL
. Also addedkey
property. Auto-migration included.
bill.Invoice
: fixed issue with invalid currency codes that don't have a definition, will always resort to Tax Regime's currency.
Fixing important bugs with some tax regimes and tax identity code validation, along with a new 'series' property for correction options.
series
property added to bill Correction Options to allow a series for a credit note to be added.label
property added toorg.Party
.
- Invoice Discounts and Charges will no longer update the
base
property according to the document's sum. - Exempt rate in
tax.Combo
no longer required when percent is empty. - When correcting an invoice, if no new series is provided, the previous document's series will be maintained.
- Precision handling of calculated invoice discounts and charges.
- Multiple tax regime were not validating the presence of supplier identity code.
Finally, invoice multi-currency support! It's been a very long time coming, but we've finalized the details on how to handle currency conversion in invoices and potentially other documents.
- Invoice Line Item alternative pricing added to be able to define custom prices in different currencies:
line.AltPrices
- Automatic conversion of invoice line item prices into invoice currency based on exchange rates defined in invoice if no alternative prices provided.
- If an invoice has a currency that is different from that of the tax regime, a validation rule ensures that an exchange rate is defined.
currency.Amount
- new model that combines a currency with an amount.- BE: added Belgium regime.
- BREAKING: refactor of
currency.ExchangeRate
to clearly definefrom
andto
currencies (this was never supported, so we're not expecting anything to actually break). - Removed all regime specific currency validation, this is now performed by the invoice and depends on the available exchange rates.
- MX: invoice line totals validated to be zero or more, instead of positive.
- Removing code requirement from Tax ID validation in all regimes so that when issuing a document to another country, the customers tax ID code will be validated if present, but will not be required. Any local rules for the issuing country for foreign IDs will continue to be applied.
- MX: allow line taxes to be empty.
- Bill Invoice Tax objects now support tax extensions.
- MX Stamps for signatures from CFDI and SAT.
- MX: extension for Place of Issue code:
mx-cfdi-issue-place
that replaces previous post code option in the supplier. Automatic normalization added. head
package now hasGetStamp
method to find a stamp by its provider from an array.num.Percentage
hasBase()
method to access base amount.- MX: FuelAccountBalance complement now supports
percent
as an alternative torate
. - ES: added extra TicketBAI exemption reasons
- Envelope
Replicate()
and supporting methods to be able to clone/replicate an envelope or document without any potentially conflicting data.
reverse-charge
tag will no longer have impact on tax calculations, each tax combo per line should define if taxes are exempt or not.- Renaming
mx.StampProviderSATUUID
constant to justmx.StampSATUUID
. - MX: FuelAccountBalance complement renamed tax
code
tocat
(Category) with explicit usage of regular tax codes to be more aligned with other usage of tax categories.
- UUID
IsNotZero
will not raise error for empty UUIDs.
UUID Unmarshal fix.
- UUID: parsing empty strings from JSON no longer causes error.
Refining UUID library and moving to using version 7 as the default in GOBL.
- Additional UUID validation rules:
Valid
,IsV6
,Isv7
,HasTimestamp
, andTimeless
.
- Using Version 7 UUIDs as default in GOBL. This version enables ordering by UUID and uses random extra data instead of a node ID.
- Parsing empty UUIDs now returns an empty UUID instead of an error.
Refactoring UUID support.
IMPORTANT: When running Calculate()
, a uuid will now be assigned automatically to the document embedded in an Envelope if not already set. This is important to ensure that links between documents can always be maintained, no matter the source.
- Schema Object:
Calculate()
will now inject UUIDs. - Schema Object:
UUID()
method will provide the UUID of the underlying document. schema.Identifiable
interface to be able to read and set UUIDs on documents.uuid.Identify
that makes it easier to embed UUIDs into documents with helper methods.
- UUID: refactored to use underlying string type instead of external package. This makes it easier to manage empty values, and avoids usage of pointers.
- Removed all pointers to UUIDs and many cases replaced with
uuid.Identify
embedded structure.
- none
Refactoring region handling for Portugal VAT and now supporting -
in cbc.Code
.
- Regimes: Extensions can now be used to match tax rates.
- Tax: Extensions helper methods:
Merge
andContains
.
cbc.Code
: Now supports-
symbol alongside.
as a separator. Mixed feelings on this as we wanted to avoid normalization complications, but it became clear with the PT changes that a bit more flexibility here is useful. (Side note: the original intent ofcbc.Code
was to avoid dashes in tax IDs, but these are now normalized automatically.)- PT: moving from tax tags
azores
andmadeira
topt-region
extension provided in taxes combo for each line. - PT: auto-migrate invoice supplier tax ID zone to appropriate line tax combo extension.
- none
New number formatting support! Expect some possible breaking SDK changes with the num
packages. No significant schema changes.
- This CHANGELOG.md file (finally!)
- Swiss (CH) tax regime.
- Austrian (AT) tax regime.
num
package now provides advanced number formatting.currency
provides "definitions" loaded from JSON with support for formatting.- Polish (PL) correction and preceding validation.
- Polish (PL) header stamps for QR code.
num
package refactored so thatnum.Percentage
is independent fromnum.Amount
.
- Minor fixes around tax regime definitions.
- invopop/yaml upgraded.
- Last version before CHANGELOG.md.