SendInvoices.SendInvoice (invoice, Boolean, Boolean) Method
With this method, you can send an invoice to myDATA.
Public Function SendInvoice( _ |
Optional ByVal GreekErrors As Boolean = False , _ |
Optional ByVal SendUnsignedInvoices As Boolean = False _ |
This language is not supported or no code example is available.
bool GreekErrors = False, |
bool SendUnsignedInvoices = False |
This language is not supported or no code example is available.
Parameters
-
invoice
-
invoice
A collection of invoice data [mandatory]
-
GreekErrors
-
bool
Determines if the error will be returned in Greek or not.
-
SendUnsignedInvoices
-
bool
Determines whether the invoice is in issue. [Works only for Invoicing Providers]
Return Value
string
If the invoice is successfully sent, it returns UID and MARK; otherwise, it returns errors so that they can be handled properly.
invoice invoice = sni.newInvoice; |
#region issuer and counterpart - Fill in only the fields you need. |
invoice.issuer.vatNumber = "555777001" ; |
invoice.issuer.country = "GR" ; |
invoice.counterpart.vatNumber = "555777002" ; |
invoice.counterpart.country = "GR" ; |
#region elements - Fill in only the fields you need. |
invoice.elements.series = "IZ" ; |
invoice.elements.issueDate = DateTime.Now; |
invoice.elements.invoiceType = "1.1" ; |
#region Lines - Fill in only the fields you need. |
for ( int i = 1; i <= 2; i++) |
invoiceLine ln = sni.newLine; |
ln.lineComments = "line comment" ; |
ln.classification.Type = "E3_561_001" ; |
ln.classification.Category = "category1_1" ; |
paymentMethod tmpPay = sni.newPaymentMethod; |
invoice.payments.Add(tmpPay); |
string result = sni.SendInvoice(invoice); |
This language is not supported or no code example is available.
Dim invoice As invoice = sni.newInvoice |
#Region "issuer and counterpart - Fill in only the fields you need." |
invoice.issuer.vatNumber = "555777001" |
invoice.issuer.country = "GR" |
invoice.counterpart.vatNumber = "555777002" |
invoice.counterpart.country = "GR" |
#Region "elements - Fill in only the fields you need." |
invoice.elements.series = "IZ" |
invoice.elements.issueDate = Date .Now |
invoice.elements.invoiceType = "1.1" |
#Region "Lines - Fill in only the fields you need." |
Dim ln As invoiceLine = sni.newLine |
ln.lineComments = "line comment" |
ln.classification.Type = "E3_561_001" |
ln.classification.Category = "category1_1" |
Dim tmpPay As paymentMethod = sni.newPaymentMethod |
invoice.payments.Add(tmpPay) |
Dim result As String = sni.SendInvoice(invoice) |
This language is not supported or no code example is available.
.NET Framework
Supported in: 3.5 or newer