Arbitrans - myDATA Library

SendInvoices..::..SendInvoice Method

By this method, you can send an invoice to myDATA.

Namespace:  arbitrans_myDATA_framework
Assembly:  arbitrans_myDATA_framework (in arbitrans_myDATA_framework.dll)

Syntax


public string SendInvoice(
	string Issuer_VAT,
	string Issuer_Country,
	string Issuer_Name,
	string Issuer_Street,
	string Issuer_Number,
	string Issuer_PostalCode,
	string Issuer_City,
	string Issuer_Branch,
	string Counterpart_VAT,
	string Counterpart_Country,
	string Counterpart_Name,
	string Counterpart_Street,
	string Counterpart_Number,
	string Counterpart_PostalCode,
	string Counterpart_City,
	string Counterpart_Branch,
	string Header_Series,
	string Header_aa,
	string Header_issueDate,
	string Header_InvoiceType,
	string Header_VatPaymentSuspension,
	string Header_Currency,
	string Header_ExchangeRate,
	string Header_CorrelatedInvoices,
	string Header_SelfPricing,
	string Header_DispatchDate,
	string Header_DispatchTime,
	string Header_VehicleNumber,
	string Header_MovePurpose,
	ArrayList Details_Array,
	string Summary_TotalNetValue,
	string Summary_TotalVatAmount,
	string Summary_TotalWithHeldAmount,
	string Summary_TotalFeesAmount,
	string Summary_TotalStampDutyAmount,
	string Summary_TotalOtherTaxesAmount,
	string TotalDeductionsAmount,
	string Summary_TotalGrossValue,
	ArrayList paymentType,
	ArrayList Taxes,
	ArrayList Summary_IncomeClassification,
	ArrayList Summary_ExpensesClassification
)
Public Function SendInvoice ( _
	Issuer_VAT As String, _
	Issuer_Country As String, _
	Issuer_Name As String, _
	Issuer_Street As String, _
	Issuer_Number As String, _
	Issuer_PostalCode As String, _
	Issuer_City As String, _
	Issuer_Branch As String, _
	Counterpart_VAT As String, _
	Counterpart_Country As String, _
	Counterpart_Name As String, _
	Counterpart_Street As String, _
	Counterpart_Number As String, _
	Counterpart_PostalCode As String, _
	Counterpart_City As String, _
	Counterpart_Branch As String, _
	Header_Series As String, _
	Header_aa As String, _
	Header_issueDate As String, _
	Header_InvoiceType As String, _
	Header_VatPaymentSuspension As String, _
	Header_Currency As String, _
	Header_ExchangeRate As String, _
	Header_CorrelatedInvoices As String, _
	Header_SelfPricing As String, _
	Header_DispatchDate As String, _
	Header_DispatchTime As String, _
	Header_VehicleNumber As String, _
	Header_MovePurpose As String, _
	Details_Array As ArrayList, _
	Summary_TotalNetValue As String, _
	Summary_TotalVatAmount As String, _
	Summary_TotalWithHeldAmount As String, _
	Summary_TotalFeesAmount As String, _
	Summary_TotalStampDutyAmount As String, _
	Summary_TotalOtherTaxesAmount As String, _
	TotalDeductionsAmount As String, _
	Summary_TotalGrossValue As String, _
	paymentType As ArrayList, _
	Taxes As ArrayList, _
	Summary_IncomeClassification As ArrayList, _
	Summary_ExpensesClassification As ArrayList _
) As String

Parameters

Issuer_VAT
Type: String
Issuer Vat Number [mandatory]
Issuer_Country
Type: String
Issuer Country [mandatory]
Issuer_Name
Type: String
Issuer Name [mandatory]
Issuer_Street
Type: String
Issuer Street
Issuer_Number
Type: String
Issuer Street Number
Issuer_PostalCode
Type: String
Issuer Postal Code [mandatory when you send the address]
Issuer_City
Type: String
Issuer City [mandatory when you send the address]
Issuer_Branch
Type: String
Issuer Branch Number [mandatory]
Counterpart_VAT
Type: String
Counterpart Vat Number [mandatory]
Counterpart_Country
Type: String
Counterpart Country [mandatory]
Counterpart_Name
Type: String
Counterpart Name
Counterpart_Street
Type: String
Counterpart Street
Counterpart_Number
Type: String
Counterpart Street Number
Counterpart_PostalCode
Type: String
Counterpart Postal Code [mandatory when you send the address]
Counterpart_City
Type: String
Counterpart City [mandatory when you send the address]
Counterpart_Branch
Type: String
Counterpart Branch [mandatory]
Header_Series
Type: String
Series: Zero (0) if empty [mandatory]
Header_aa
Type: String
Invoice Number [mandatory]
Header_issueDate
Type: String
Issue Date: Format yyyy-MM-dd [mandatory]
Header_InvoiceType
Type: String
Invoice Type: 1.1, 1.2, 1.3, etc [mandatory]
Header_VatPaymentSuspension
Type: String
Vat Payment Suspension: true/false
Header_Currency
Type: String
ISO Currency Code: ex EUR [mandatory]
Header_ExchangeRate
Type: String
Exchange Rate: 1 if Currency is EUR. You can get the exchange rate of a currency using the ExchangeRates. [mandatory when you send Currency different than EUR]
Header_CorrelatedInvoices
Type: String
Correlated Invoices MARK [mandatory when you send invoice types which demands correlated invoices (example for InvoiceType 5.1)]
Header_SelfPricing
Type: String
Self Pricing: true/false
Header_DispatchDate
Type: String
Dispatch Date: Format yyyy-MM-dd
Header_DispatchTime
Type: String
Dispatch Time 24H Format: ex 19:27
Header_VehicleNumber
Type: String
Vehicle Number: ex XXX-0000
Header_MovePurpose
Type: String
Move Purpose
Details_Array
Type: ArrayList
Invoice Details. This arraylist contains all the invoice details as a continues list. Check further about its syntax. [mandatory]
Summary_TotalNetValue
Type: String
Total Net Value [mandatory]
Summary_TotalVatAmount
Type: String
Total Vat Amount [mandatory]
Summary_TotalWithHeldAmount
Type: String
Total Withheld Amount [mandatory]
Summary_TotalFeesAmount
Type: String
Total Fees Amount [mandatory]
Summary_TotalStampDutyAmount
Type: String
Total Stamp Duty Amount [mandatory]
Summary_TotalOtherTaxesAmount
Type: String
Total Other Taxes Amount [mandatory]
TotalDeductionsAmount
Type: String
Total Deductions Amount [mandatory]
Summary_TotalGrossValue
Type: String
Total Gross Value [mandatory]
paymentType
Type: ArrayList
Payment Details [mandatory even if the list is empty]
Taxes
Type: ArrayList
Taxes Details [mandatory even if the list is empty]
Summary_IncomeClassification
Type: ArrayList
Total Income Classification Array. You can check if a classification is correct using the myDATATools. [mandatory even if the list is empty]
Summary_ExpensesClassification
Type: ArrayList
Total Income Classification Array. You can check if a classification is correct using the myDATATools.[mandatory even if the list is empty]

Remarks


Retrieve the Invoices you sent

Check if the classification you send is Valid

Get All Valid Classification Type by Invoice Type

Get All Valid Classification Category by Invoice Type



Parameter Details_Array (arrayList)

All parameters of Details_Array (repeat for more than one lines).
Variables marked as mandatory must have a value. Everything else, can have an empty string as value.
  1. Quantity
  2. MeasurementUnit
  3. InvoiceDetailType
  4. NetValue. This value is mandatory.
  5. VatCategory. This value is mandatory.
  6. vatExceptionCategory
  7. dienergiaApplicationID. This value is mandatory for ships.
  8. dienergiaApplicationDate
  9. dienergiaDOY
  10. dienergiashipID. This value is mandatory for ships.
  11. discountOption
  12. withheldAmount
  13. withheldPercentCategory
  14. stampDutyPercentCategory
  15. feesAmount
  16. feesPercentCategory
  17. otherTaxesPercentCategory
  18. otherTaxesAmount
  19. deductionsAmount
  20. incomeClassificationType.
    If you don't know what's the correct Classification Type, you can get the valid classification types using the get_ValidE3(String, String, Int32).
  21. incomeClassificationCategory
    If you don't know what's the correct Classification Category, you can get the valid classification categories using the get_ValidCategory(String, Int32).
  22. incomeClassificationAmount
  23. incomeClassificationID
  24. expensesClassificationType
    If you don't know what's the correct Classification Type, you can get the valid classification types using the get_ValidE3(String, String, Int32).
  25. expensesClassificationCategory
    If you don't know what's the correct Classification Category, you can get the valid classification categories using the get_ValidCategory(String, Int32).
  26. expensesClassificationAmount
  27. expensesClassificationID
  28. vatAmount. This value is mandatory.
  29. stampDutyAmount
  30. expensesClassificationVATCategory
  31. recType


Parameter paymentType (arrayList)

All parameters of paymentType (repeat for more than one payments).
Variables marked as mandatory must have a value. Everything else, can have an empty string as value.
  1. Payment Type. This value is mandatory.
  2. Amount. This value is mandatory.
  3. Details


Parameter taxes (arrayList)

All parameters of taxes (repeat for more than one taxes).
Variables marked as mandatory must have a value. Everything else, can have an empty string as value.
  1. Tax Type. This value is mandatory.
  2. Tax Category
  3. Amount of tax application
  4. Tax Amount. This value is mandatory.
  5. Line Number


Parameters IncomeArray and ExpensesArray (arrayList)

All parameters of IncomeArray (repeat for more than one taxes).
Variables marked as mandatory must have a value. Everything else, can have an empty string as value.
  1. ClassificationType. This value is mandatory. [get_ValidE3(String, String, Int32)]
  2. ClassificationCategory. This value is mandatory. [get_ValidCategory(String, Int32)]
  3. Classification Amount. This value is mandatory.
  4. Line Number

Examples


An example to send invoice in C#. Scroll to see an example in VB.NET.

C#
ArrayList Details = new ArrayList(); // one line example
Details.Clear();
Details.Add("1.000"); // Quantity'
Details.Add(""); // MeasurementUnit'
Details.Add("2"); // InvoiceDetailType'
Details.Add("500.00"); // NetValue'
Details.Add("1"); // VatCategory'
Details.Add(""); // vatExceptionCategory'
Details.Add(""); // dienergiaApplicationID'
Details.Add(""); // dienergiaApplicationDate'
Details.Add(""); // dienergiaDOY'
Details.Add(""); // dienergiashipID'
Details.Add(""); // discountOption'
Details.Add(""); // withheldAmount'
Details.Add(""); // withheldPercentCategory'
Details.Add(""); // stampDutyPercentCategory'
Details.Add(""); // feesAmount'
Details.Add(""); // feesPercentCategory'
Details.Add(""); // otherTaxesPercentCategory'
Details.Add(""); // otherTaxesAmount'
Details.Add(""); // deductionsAmount'
Details.Add("E3_561_001"); // incomeClassificationType'
Details.Add("category1_1"); // incomeClassificationCategory'
Details.Add("500.00"); // incomeClassificationAmount'
Details.Add("1"); // incomeClassificationID'
Details.Add(""); // expensesClassificationType'
Details.Add(""); // expensesClassificationCategory'
Details.Add(""); // expensesClassificationAmount'
Details.Add(""); // expensesClassificationID'
Details.Add("120.00"); // vatAmount'
Details.Add(""); // stampDutyAmount'
Details.Add(""); // expensesClassificationVATCategory'
Details.Add(""); // recType'

ArrayList Taxes = new ArrayList();
Taxes.Clear();
Taxes.Add("1"); // Tax Type
Taxes.Add(""); // Tax Category
Taxes.Add(""); // Amount of tax application
Taxes.Add("3.00"); // Tax Amount
Taxes.Add(""); // Line Number

ArrayList IncomeArray = new ArrayList(); // When we send Expenses Invoices, the IncomeArray is mandatory but empty.
IncomeArray.Clear();
IncomeArray.Add("E3_561_001"); // ClassificationType
IncomeArray.Add("category1_1"); // ClassificationCategory
IncomeArray.Add("500.00"); // ClassificationAmount
IncomeArray.Add("0"); // Line Number

ArrayList ExpensesArray = new ArrayList(); // When we send Income Invoices, the ExpensesArray is mandatory but empty.
ExpensesArray.Clear();

// Send Invoice to myDATA. If the invoice is sent to myDATA successfully, you'll get an answer containing the MARK and UID of the invoice.
// Otherwise, you'll get back the errors so you can handle them properly.
string result = sni.SendInvoice("555777003", "GR", "ΕΤΑΙΡΕΙΑ 1", "ΝΕΑ ΟΔΟΣ", "57", "12345", "ΑΘΗΝΑ", "0", "555777001", "GR", "ΕΤΑΙΡΕΙΑ 2",
                                "ΝΕΑ ΟΔΟΣ", "58", "12345", "ΑΘΗΝΑ", "0", "Α", "157", "2021-09-15", "1.1", "false", "EUR", "1.00", "", "false",
                                "", "", "", "", Details, "500.00", "120.00", "0.00", "0.00", "0.00", "0.00", "0.00", "620.00", payment, taxes,
                                IncomeArray, ExpensesArray);

An example to send invoice in VB.NET.

VB.NET
Dim Details As ArrayList = New ArrayList()
Details.Clear()
Details.Add("1.000") 'Quantity'
Details.Add("") 'MeasurementUnit'
Details.Add("2") 'InvoiceDetailType'
Details.Add("500.00") 'NetValue'
Details.Add("1") 'VatCategory'
Details.Add("") 'vatExceptionCategory'
Details.Add("") 'dienergiaApplicationID'
Details.Add("") 'dienergiaApplicationDate'
Details.Add("") 'dienergiaDOY'
Details.Add("") 'dienergiashipID'
Details.Add("") 'discountOption'
Details.Add("") 'withheldAmount'
Details.Add("") 'withheldPercentCategory'
Details.Add("") 'stampDutyPercentCategory'
Details.Add("") 'feesAmount'
Details.Add("") 'feesPercentCategory'
Details.Add("") 'otherTaxesPercentCategory'
Details.Add("") 'otherTaxesAmount'
Details.Add("") 'deductionsAmount'
Details.Add("E3_561_001") 'incomeClassificationType'
Details.Add("category1_1") 'incomeClassificationCategory'
Details.Add("500.00") 'incomeClassificationAmount'
Details.Add("1") 'incomeClassificationID'
Details.Add("") 'expensesClassificationType'
Details.Add("") 'expensesClassificationCategory'
Details.Add("") 'expensesClassificationAmount'
Details.Add("") 'expensesClassificationID'
Details.Add("120.00") 'vatAmount'
Details.Add("") 'stampDutyAmount'
Details.Add("") 'expensesClassificationVATCategory'
Details.Add("") 'recType'

Dim Taxes As ArrayList = New ArrayList()
Taxes.Clear()
Taxes.Add("1") ' Tax Type
Taxes.Add("") ' Tax Category
Taxes.Add("") ' Amount of tax application
Taxes.Add("3.00") ' Tax Amount
Taxes.Add("") ' Line Number

Dim IncomeArray As ArrayList = New ArrayList() ' When we send Expenses Invoices, the IncomeArray is mandatory but empty.
IncomeArray.Clear()
IncomeArray.Add("E3_561_001") ' ClassificationType
IncomeArray.Add("category1_1") ' ClassificationCategory
IncomeArray.Add("500.00") ' ClassificationAmount
IncomeArray.Add("0") ' Line Number

Dim ExpensesArray As ArrayList = New ArrayList() ' When we send Income Invoices, the ExpensesArray is mandatory but empty.
ExpensesArray.Clear()

' Send Invoice to myDATA. If the invoice is sent to myDATA successfully, you'll get an answer containing the MARK and UID of the invoice.
' Otherwise, you'll get back the errors so you can handle them properly.
Dim result As String = sni.SendInvoice("555777003", "GR", "ΕΤΑΙΡΕΙΑ 1", "ΝΕΑ ΟΔΟΣ", "57", "12345", "ΑΘΗΝΑ", "0", "555777001", "GR", "ΕΤΑΙΡΕΙΑ 2",
                                       "ΝΕΑ ΟΔΟΣ", "58", "12345", "ΑΘΗΝΑ", "0", "Α", "157", "2021-09-15", "1.1", "false", "EUR", "1.00", "", "false",
                                       "", "", "", "", Details, "500.00", "120.00", "0.00", "0.00", "0.00", "0.00", "0.00", "620.00", payment, taxes,
                                       IncomeArray, ExpensesArray)