Skip to content

Commit

Permalink
Added taxRate
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas Kwiedor committed Nov 23, 2020
1 parent f6fe84b commit f2c8fa7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ You can currently only create invoices and items in the invoices. For this purpo
Here you will find an example how to create a new invoice in sevDesk.

```go
invoice, err := sevdesk.NewInvoice(sevdesk.Invoice{"", "clientID", "21.11.2020", "100", "RE", "contactID", "token"})
invoice, err := sevdesk.NewInvoice(sevdesk.Invoice{"", "clientID", "21.11.2020", "100", "RE", "contactID", "16" "token"})
if err != nil {
fmt.Println("Error: ", err)
}
Expand Down
3 changes: 2 additions & 1 deletion invoice.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ type Invoice struct {
Status string
InvoiceType string
ContactPerson string
TaxRate string
Token string
}

Expand Down Expand Up @@ -122,7 +123,7 @@ func NewInvoice(config Invoice) (InvoiceReturn, error) {
body.Set("contactPerson[id]", config.ContactPerson)
body.Set("contactPerson[objectName]", "SevUser")
body.Set("taxType", "default")
body.Set("taxRate", "0")
body.Set("taxRate", config.TaxRate)
body.Set("taxText", "0")
body.Set("showNet", "false")

Expand Down

0 comments on commit f2c8fa7

Please sign in to comment.