SendInvoices.SendInvoice (invoice, Boolean, Boolean) Method

With this method, you can send an invoice to myDATA.
Public Function SendInvoice( _ 
ByVal invoice As invoice, _ 
Optional ByVal GreekErrors As Boolean = False, _ 
Optional ByVal SendUnsignedInvoices As Boolean = False _ 
) As String
This language is not supported or no code example is available.
public string SendInvoice( 
invoice invoice
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.

Example
 
 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";
 #endregion
 
 #region elements - Fill in only the fields you need.
 	invoice.elements.series = "IZ";
 	invoice.elements.aa = 1;
 	invoice.elements.issueDate = DateTime.Now;
 	invoice.elements.invoiceType = "1.1";
 #endregion
 
 #region Lines - Fill in only the fields you need.
 		for (int i = 1; i <= 2; i++)
 		{
 		    invoiceLine ln = sni.newLine;
 		    ln.netValue = 200.0d;
 		    ln.VatCategory = 1;
 		    ln.VatAmount = 48.0d;
 		    ln.lineComments = "line comment";
 		    ln.classification.Type = "E3_561_001";
 		    ln.classification.Category = "category1_1";
 		
 		    invoice.lines.Add(ln);
 		}
 #endregion
 
 #region payments
 		paymentMethod tmpPay = sni.newPaymentMethod;
 		tmpPay.type = 1;
 		tmpPay.amount = 496.0d;
 		invoice.payments.Add(tmpPay);
 #endregion
 
 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"
 #End Region
 
 #Region "elements - Fill in only the fields you need."
         invoice.elements.series = "IZ"
         invoice.elements.aa = 1
         invoice.elements.issueDate = Date.Now
         invoice.elements.invoiceType = "1.1"
 #End Region
 
 #Region "Lines - Fill in only the fields you need."
         For i = 1 To 2
             Dim ln As invoiceLine = sni.newLine
             ln.netValue = 200.0
             ln.VatCategory = 1
             ln.VatAmount = 48.0
             ln.lineComments = "line comment"
             ln.classification.Type = "E3_561_001"
             ln.classification.Category = "category1_1"
 
             invoice.lines.Add(ln)
         Next
 #End Region
 
 #Region "payments"
         Dim tmpPay As paymentMethod = sni.newPaymentMethod
         tmpPay.type = 1
         tmpPay.amount = 496.0
         invoice.payments.Add(tmpPay)
 #End Region
 
         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

In this article

Definition