SendClassifications.Send (Dictionary<StringList<classifications>>, Boolean, Boolean) Method

With this method, you can send multiple Expenses or Income Classifications to myDATA at once.
Public Function Send( _ 
ByVal classif As Dictionary(Of String, List(Of classifications)), _ 
Optional ByVal GreekErrors As Boolean = False, _ 
Optional ByVal perInvoice As Boolean = False _ 
) As SortedDictionary(Of String, Object)
This language is not supported or no code example is available.
public SortedDictionary<string, object> Send( 
Dictionary<string, List<classifications>> classif
bool GreekErrors = False, 
bool perInvoice = False 
)
This language is not supported or no code example is available.

Parameters

classif
Dictionary<string, List<classifications>>

A dictionary of list of classifications

GreekErrors
bool

Determines if the error will be returned in Greek or not.

perInvoice
bool

Determines if the classification will be sent for the whole invoice, or line by line. 
true is for sending classifications whole invoice 
false for sending classifications line by line

Return Value

SortedDictionary<string, object>

Classification MARK or Validation Errors

Remarks
 
You can check if a classification is correct by using myDATATools.checkClassification
You can get a list of Valid Categories of an Invoice Type using myDATATools.getValidCategory
You can get a list of Valid Classification Types of an Invoice Type using myDATATools.getValidE3
 
You can export the Classification Data and send it to mydata@arbitrans.gr, so we can check your issue. Use the method ExportDataForValidation
This method exports your data in an encoded format, according to GDPR, ensuring maximum security for any sensitive or personal data.  
The following example, will return a dictonary like this: 

(invoiceMark1, classificationMark:400000000000001) 
(invoiceMark2, 104 - Requested Invoice was not found) 
]
Example
 
 // The following example shows how you can send expenses classifications for an invoice line.
 var cls = new SendClassifications("AADEUserID", "OcpApimSubscriptionKey", "ExecuteEntityVatNumber", "Arbitrans User", "Arbitrans Key", false);
 
 var classif = new Dictionary<string, List<SendClassifications.classifications>>(); // initialize a new dictionary for invoice classifications
 
 for (int i = 1; i <= 2; i++) // loop through your invoices
 {
     var clsList = new List<classifications>(); // Create a new List(Of classifications)
     classifications clsLine = cls.newClassification; // Create a new classification
     for (int j = 1; j <= 3; j++) // loop through invoice records
     {
         clsLine.lineNumber = j;
         clsLine.classificationType = ""; // The E3 Code
         clsLine.classificationCategory = "category2_95";
         clsLine.amount = 100;
         clsLine.VatCategory = "VAT_361";
 
         clsList.Add(clsLine); // add the ivnoice classification into the list
     }
     classif.Add("invoiceMark", clsList); // add the invoice classification list into the list. Replace the 'invoiceMark' with the mark of your invoice
 }
 
 // Sending Classifications. If everything's fine, you'll get back the Classification MARK.
 // Otherwise, you'll get back the errors so you can handle them properly.
 SortedDictionary<string, object> result = cls.Send(classif);
 					
This language is not supported or no code example is available.
 ' The following example shows how you can send expenses classifications for an invoice line.
 Dim cls As SendClassifications = New SendClassifications("AADEUserID", "OcpApimSubscriptionKey", "ExecuteEntityVatNumber", "Arbitrans User", "Arbitrans Key", False)
 
 Dim classif As New Dictionary(Of String, List(Of SendClassifications.classifications)) 'initialize a new dictionary for invoice classifications
 
 For i = 1 To 2 'loop through your invoices
     Dim clsList As New List(Of classifications) 'Create a new List(Of classifications)
     Dim clsLine As classifications = cls.newClassification 'Create a new classification
     For j = 1 To 3 'loop through invoice records
         clsLine.lineNumber = j
         clsLine.classificationType = "" 'The E3 Code
         clsLine.classificationCategory = "category2_95"
         clsLine.amount = 100
         clsLine.VatCategory = "VAT_361"
 
         clsList.Add(clsLine) 'add the ivnoice classification into the list
     Next
     classif.Add("invoiceMark", clsList) 'add the invoice classification list into the list. Replace the 'invoiceMark' with the mark of your invoice
 Next
 
 ' Sending Classifications. If everything's fine, you'll get back the Classification MARK.
 ' Otherwise, you'll get back the errors so you can handle them properly.
 Dim result As SortedDictionary(Of String, Object) = cls.Send(classif)
 					
This language is not supported or no code example is available.

.NET Framework

Supported in: 3.5 or newer

In this article

Definition