ProvIlyda.SendInvoice Method
Provider returns a dictionary(Of String, String) having any results (success or errors).
Public Function SendInvoice( _
ByVal inv As invoice, _
ByVal ilydaData As ilydaData _
) As Dictionary(Of String, String)
This language is not supported or no code example is available.
Parameters
- inv
- invoice
The myDATA invoice, type of invoice
- ilydaData
- ilydaData
The provider data, type of ilydaData
Return Value
Dictionary<string, string>A dictionary(Of String, String) containing provider's answer.
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. 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 #region Ilyda Data var ily = default(ilydaData); ily.extraDetails.issuerName = "George M."; ily.extraDetails.issuerAddress = "New Street 111"; ily.extraDetails.issuerPostalCode = "12345"; ily.extraDetails.issuerCity = "Thessaloniki"; ily.extraDetails.issuerEmail = "issuer@myemail.com"; ily.extraDetails.issuerPhone = "00302101111111"; ily.extraDetails.issuerJob = "Retail Services"; ily.extraDetails.issuerTaxOffice = "A' Athinon"; ily.extraDetails.issuerGemh = "11111111111111111"; ily.extraDetails.counterpartName = "Papadopoulos G."; ily.extraDetails.counterpartAddress = "New street 57"; ily.extraDetails.counterpartPostalCode = "12345"; ily.extraDetails.counterpartCity = "Athens"; ily.extraDetails.counterpartEmail = "counterpart@myemail.gr"; ily.extraDetails.counterpartPhone = "00302101111111"; ily.extraDetails.counterpartCode = "1000001"; ily.extraDetails.counterpartJob = "Online Services and Software"; ily.extraDetails.counterpartTaxOffice = "A' Athinon"; ily.extraDetails.invoiceNotes = ""; ily.extraDetails.paymentTerms = "POS Payment"; ily.extraDetails.paymentTerminalID = "1234567890"; ily.extraDetails.contractReference = "24SSSS111111111"; ily.extraDetails.projectReference = "3|1234567"; var pLines = new List<provLine>(); var pline = new provLine(); pline.discountPercentage = 0.0d; pline.discountAmount = 0.0d; pline.itemName = "TEST PRODUCT"; pline.itemCode = "123"; pline.countryOfOrigin = "US"; pline.peppolTaxCategory = "S"; pline.peppolMeasurementUnit = "XUN"; pline.itemMeasurmentUnit = "BOX"; var pItems = new List<peppolItemClass>(); var pItem = default(peppolItemClass); pItem.itemID = "03100000-2"; pItem.itemClass = "STI"; pItems.Add(pItem); pline.itemClass = pItems; pLines.Add(pline); ily.invoiceLines = pLines; #endregion var il = new ProvIlyda("ilydaUser", "ilydaPassword", "arbUser", "arbKey", false); Dictionary<string, string> fResult = il.SendInvoice(invoice, ily);
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." 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) #End Region #Region "payments" Dim tmpPay As paymentMethod = sni.newPaymentMethod tmpPay.type = 1 tmpPay.amount = 496.0 invoice.payments.Add(tmpPay) #End Region #Region "Ilyda Data" Dim ily As ilydaData ily.extraDetails.issuerName = "George M." ily.extraDetails.issuerAddress = "New Street 111" ily.extraDetails.issuerPostalCode = "12345" ily.extraDetails.issuerCity = "Thessaloniki" ily.extraDetails.issuerEmail = "issuer@myemail.com" ily.extraDetails.issuerPhone = "00302101111111" ily.extraDetails.issuerJob = "Retail Services" ily.extraDetails.issuerTaxOffice = "A' Athinon" ily.extraDetails.issuerGemh = "11111111111111111" ily.extraDetails.counterpartName = "Papadopoulos G." ily.extraDetails.counterpartAddress = "New street 57" ily.extraDetails.counterpartPostalCode = "12345" ily.extraDetails.counterpartCity = "Athens" ily.extraDetails.counterpartEmail = "counterpart@myemail.gr" ily.extraDetails.counterpartPhone = "00302101111111" ily.extraDetails.counterpartCode = "1000001" ily.extraDetails.counterpartJob = "Online Services and Software" ily.extraDetails.counterpartTaxOffice = "A' Athinon" ily.extraDetails.invoiceNotes = "" ily.extraDetails.paymentTerms = "POS Payment" ily.extraDetails.paymentTerminalID = "1234567890" ily.extraDetails.contractReference = "24SSSS111111111" ily.extraDetails.projectReference = "3|1234567" Dim pLines As New List(Of provLine) Dim pline As New provLine pline.discountPercentage = 0.0 pline.discountAmount = 0.0 pline.itemName = "TEST PRODUCT" pline.itemCode = "123" pline.countryOfOrigin = "US" pline.peppolTaxCategory = "S" pline.peppolMeasurementUnit = "XUN" pline.itemMeasurmentUnit = "BOX" Dim pItems As New List(Of peppolItemClass) Dim pItem As peppolItemClass pItem.itemID = "03100000-2" pItem.itemClass = "STI" pItems.Add(pItem) pline.itemClass = pItems pLines.Add(pline) ily.invoiceLines = pLines #End Region Dim il As ProvIlyda = New ProvIlyda("ilydaUser", "ilydaPassword", "arbUser", "arbKey", False) Dim fResult As Dictionary(Of String, String) = il.SendInvoice(invoice, ily)
This language is not supported or no code example is available.