Skip to content

Commit

Permalink
Merge pull request #428 from invopop/swiss-u-2300
Browse files Browse the repository at this point in the history
Deleting supplier validation
  • Loading branch information
Menendez6 authored Nov 19, 2024
2 parents 99d792e + 1ac0530 commit 3ac63ad
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 34 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p

### Fixes

- `ch`: Deleted Supplier validation (not needed for under 2300 CHF/year)
- `bill`: `Invoice` `GetExtensions` method now works correctly if missing totals [Issue #424](https://github.com/invopop/gobl/issues/424).

## [v0.205.0] - 2024-11-12
Expand Down
2 changes: 0 additions & 2 deletions regimes/ch/ch.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ func New() *tax.RegimeDef {
// Validate checks the document type and determines if it can be validated.
func Validate(doc any) error {
switch obj := doc.(type) {
case *bill.Invoice:
return validateInvoice(obj)
case *tax.Identity:
return validateTaxIdentity(obj)
}
Expand Down
31 changes: 0 additions & 31 deletions regimes/ch/invoices.go

This file was deleted.

2 changes: 1 addition & 1 deletion regimes/ch/invoices_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,5 @@ func TestInvoiceValidation(t *testing.T) {
inv = validInvoice()
inv.Supplier.TaxID.Code = ""
require.NoError(t, inv.Calculate())
assert.ErrorContains(t, inv.Validate(), "supplier: (tax_id: (code: cannot be blank.).)")
assert.NoError(t, inv.Validate())
}

0 comments on commit 3ac63ad

Please sign in to comment.