Generation of Notes With and Without Reference to an Electronic Document - Direct Integration Manual Index

De tfhkacolwiki
Ir a la navegación Ir a la búsqueda

For the generation of credit and debit notes, 3 scenarios are described as established by the DIAN in the Technical Annex of Electronic Sales Invoice – Version 1.8:

Credit and debit notes that affect previously validated invoices

For the issuance of credit and debit notes, two sets of referenced documents must be sent, the first indicating the Internal code = '4' which corresponds to the reasons for which the NC/ND is generated (' DiscrepancyResponse) and a second arrangement, indicating the internal code = '5 in which the data of the invoice affected by the NC/ND is reflected ('BillingReference) .

Example:

 <a:documentosReferenciados>
      <a:DocumentoReferenciado>
	<a:codigoEstatusDocumento>2</a:codigoEstatusDocumento>
	<a:codigoInterno>4</a:codigoInterno>			
	<a:descripción>
	   <b:string>Anulación de factura electrónica</b:string>
	</a:descripcion>
	<a:fecha>2019-10-07</a:fecha>
	<a:numeroDocumento>F4PM3</a:numeroDocumento>
	</a:DocumentoReferenciado>
	<a:DocumentoReferenciado>
	<codigoInterno>5</codigoInterno>		
	<cufeDocReferenciado>85ea749b18ee5bd251b87442935650e30b4e0e4cd662bef1KqmCLKgxPpH6u5LiKrJvTb6FEyfVuoCcV0baab6b59cdc8b3</cufeDocReferenciado>
	<fecha>2019-10-07</fecha>
	<numeroDocumento>F4PM3</numeroDocumento>
	</a:DocumentoReferenciado>
      </a:documentosReferenciados>

@IMPORTANT: The cufeDocRereferenced field must contain a total of 96 characters and the value of the field FacturaGeneral.tipoOperacion must be 20 (for NC) and 30 (for ND).

Credit and debit notes that do not affect invoices

For this scenario, the field FacturaGeneral.tipoOperacion must be correctly indicated in the XML, which according to the Technical Annex of Electronic Sales Invoice – Version 1.8 must correspond to:

  • Code 22 for Credit Notes.
  • Code 32 for Debit Notes.

According to what is described in the Technical Annex version 1.8

Notas.tipoOperacion

@IMPORTANT: The Referenced Documents class must be sent in NULL.