Skip to content

Commit

Permalink
Fix missing tax ID issue
Browse files Browse the repository at this point in the history
  • Loading branch information
samlown committed Feb 7, 2024
1 parent 28bac52 commit 1560a33
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions bill/invoice.go
Original file line number Diff line number Diff line change
Expand Up @@ -504,9 +504,18 @@ func (inv *Invoice) determineTaxIdentity() (*tax.Identity, error) {
if inv.Customer == nil {
return nil, fmt.Errorf("missing customer for %s", tax.TagCustomerRates.String())
}
if inv.Customer.TaxID == nil {
return nil, fmt.Errorf("missing customer tax ID for %s", tax.TagCustomerRates.String())
}
return inv.Customer.TaxID, nil
}
}
if inv.Supplier == nil {
return nil, errors.New("missing supplier")
}
if inv.Supplier.TaxID == nil {
return nil, errors.New("missing supplier tax ID")
}
return inv.Supplier.TaxID, nil
}

Expand Down
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
type Version string

// VERSION is the current version of the GOBL library.
const VERSION Version = "v0.67.1"
const VERSION Version = "v0.67.2"

// Semver parses and returns semver
func (v Version) Semver() *semver.Version {
Expand Down

0 comments on commit 1560a33

Please sign in to comment.