---
title: "CreateVendorInvoice"
canonical: "https://docs.dk.is/space/DEV/10355854/CreateVendorInvoice"
format: markdown
---
This function is used to create a new invoice from the Vendor in the system

## Parameters

Used to call the function

1. obj - [TVendorInvoice](https://dkdocs.atlassian.net/wiki/spaces/DEV/pages/10355770)

## Returns

Returns the following

- [TVendorInvoice](https://dkdocs.atlassian.net/wiki/spaces/DEV/pages/10355770)

 

##### **Create Invoice Head**

```csharp
            IItemServiceservice service = new IItemServiceservice();
            service.BasicSecurityValue = new BasicSecurity() { Username = "ws.dev", Password = "Code2make" };
            var invoice = service.CreateVendorInvoice(new TVendorInvoice() {
                Amount = 1000,
                CurrencyCode = "ISK",
                InvoiceDate = DateTime.Now,
                InvoiceNumber = "SK-1234",
                Reference = "DK987",
                Vendor = "default",
                InvoiceType = TComboBox_DebCred._cbCredit
            });



```

## Related articles



> Macro (contentbylabel)

> Macro (details)
> 
> | **Related issues** |  |
> | --- | --- |