diff --git a/README.md b/README.md index 0efaadd..5cc34f6 100644 --- a/README.md +++ b/README.md @@ -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) } diff --git a/invoice.go b/invoice.go index a2b2f35..7786c18 100644 --- a/invoice.go +++ b/invoice.go @@ -15,6 +15,7 @@ type Invoice struct { Status string InvoiceType string ContactPerson string + TaxRate string Token string } @@ -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")