Type 5.1 - Credit Invoice (Associated)

Back story of the Invoice:

Issuer: GREECE 
Counterpart: GREECE 
Type: 5.1 
Lines: 1 

General Instructions: For this invoice, it's mandatory to add the Correlated Invoice, and the classifications must be exactly the same as the correlated one.

var sni = new SendInvoices("AADEUserID", "OcpApimSubscriptionKey", "Arbitrans User", "Arbitrans Key", false);
 invoice invoice = sni.newInvoice;
  
 #region issuer and counterpart
   invoice.issuer.vatNumber = "555777001";
   invoice.issuer.country = "GR";
   
   invoice.counterpart.vatNumber = "555777002";
   invoice.counterpart.country = "GR";
 #endregion
  
 #region elements
   invoice.elements.series = "IZ";
   invoice.elements.aa = 1;
   invoice.elements.issueDate = DateTime.Now;
   invoice.elements.invoiceType = "5.1";
   invoice.elements.correlatedInvoices = "400000000000001";
 #endregion
  
 #region Lines
   invoiceLine ln = sni.newLine;
   ln.netValue = 200.0d;
   ln.VatCategory = 1;
   ln.VatAmount = 48.0d;
   ln.invoiceDetailType = 1;
   ln.classification.Type = ""; // This field refers to the E3 code
   ln.classification.Category = "category1_95";
   invoice.lines.Add(ln);
 #endregion
  
 #region payments
   paymentMethod tmpPay = sni.newPaymentMethod;
   tmpPay.type = 1;
   tmpPay.amount = 248.0d;
   invoice.payments.Add(tmpPay);
 #endregion
  
 string result = sni.SendInvoice(invoice);
 string qrURL = sni.getQRUrl; // get the QR URL
 Image qrImage = sni.getQRImage(500); // get an image of the QR					
This language is not supported or no code example is available.
Dim sni As New SendInvoices("AADEUserID", "OcpApimSubscriptionKey", "Arbitrans User", "Arbitrans Key", False)
 Dim invoice As invoice = sni.newInvoice
  
 #Region "issuer and counterpart"
         invoice.issuer.vatNumber = "555777001"
         invoice.issuer.country = "GR"
  
         invoice.counterpart.vatNumber = "555777002"
         invoice.counterpart.country = "GR"
 #End Region
  
 #Region "elements"
         invoice.elements.series = "IZ"
         invoice.elements.aa = 1
         invoice.elements.issueDate = Date.Now
         invoice.elements.invoiceType = "5.1"
         invoice.elements.correlatedInvoices = "400000000000001"
 #End Region
  
 #Region "Lines"
         Dim ln As invoiceLine = sni.newLine
         ln.netValue = 200.0
         ln.VatCategory = 1
         ln.VatAmount = 48.0
         ln.invoiceDetailType = 1
         ln.classification.Type = "" ' This field refers to the E3 code
         ln.classification.Category = "category1_95"
         invoice.lines.Add(ln)
 #End Region
  
 #Region "payments"
         Dim tmpPay As paymentMethod = sni.newPaymentMethod
         tmpPay.type = 1
         tmpPay.amount = 248.0
         invoice.payments.Add(tmpPay)
 #End Region
  
         Dim result As String = sni.SendInvoice(invoice)
         Dim qrURL As String = sni.getQRUrl ' get the QR URL
         Dim qrImage As Image = sni.getQRImage(500) ' get an image of the QR					
This language is not supported or no code example is available.

Remarks
 
Check if the classification you send is Valid using: myDATATools.checkClassification  
Get all Valid Classification Type by Invoice Type: Get All Valid Classification Type by Invoice Type 
Get all Valid Classification Category by Invoice Type: Get All Valid Classification Category by Invoice Type

In this article

Definition