Referencia de la Clase sage.addons.factucert.Negocio.Clases.CertificationAdapterVerifactu

Adapter para el componenete de VERIFACTU Más...

Diagrama de herencias de sage.addons.factucert.Negocio.Clases.CertificationAdapterVerifactu
sage.addons.factucert.Negocio.Clases.CertificationAdapter sage.addons.factucert.Negocio.Interficies.ICertificationManager

Métodos públicos

 CertificationAdapterVerifactu ()
 Constructor Más...
 
bool GenerarXmlAnulacionFirmado (HuellaDetalle huellaFacturaOriginal)
 Genera un XML de anulación firmado Más...
 
bool GenerarXmlFirmado (List< ewDocVentaTPV > listaDatosAlbaranes, AsientosFacturasVentaGenerador datosFactura, Certification_XML_Parameters XML_generator_parameters)
 Genera un XML firmado con los documentos y parámetros recibidos Más...
 
string GetXMLFileNameForAnnullment (string numDoc, DateTime fechaDoc)
 Obtiene el nombre de fichero que le corresponde a una anulación Más...
 
string GetXMLFileNameForInvoiceOrTicket (string numDoc, DateTime fechaDoc)
 Obtiene el nombre de fichero que le corresponde a una factura o ticket Más...
 
void Dispose ()
 Part of the IDisposable pattern Más...
 
bool ExecuteMassiveSend (bool useAsyncWorker=true)
 Public entry point for starting the send process of all pending TBai invoices/tickets

Parámetros
useAsyncWorkerPerform the upload process as a background task. On Release this should always be true, false only for debugging purposes
Devuelve
A boolean indicating that the process was started successfully. A false means that other async process is already running in the background, and the current call will be ignored.
Más...
 
bool RequestMassiveSendAbortAndWait ()
 Sync method for stopping the Async TBai document sending thread. Más...
 
bool IsMassiveSendAsyncProcessRunning ()
 For checking if the Process is Running Más...
 
bool IsMassiveSendAsyncProcessRunning (out int queueLenght, out int itemsCompleted)
 For checking if the Process is Running, plus returning queue lenght and items completed values Más...
 
bool IsMassiveSendAsyncProcessRunning (out int queueLenght, out int itemsCompleted, out List< string > listaFacturasSesionPendientes)
 For checking if the Process is Running, plus returning queue lenght and items completed values, plus a list of Invoices generated this session and pending Más...
 

Campos de datos

const string _mascaraParaVerifactu = "0.00"
 Mask for formatting strings to VERIFACTU xml document. It is fixed in the VERIFACTU definition document and XML schema, so we ignore Sage50 internal masks. Más...
 

Métodos protegidos

override bool ValidarTerritorio (string territorio)
 Metodo de validación de código de Sage50 para territorio Más...
 
override bool ValidarTerritorio (int territorio50)
 Metodo de validación de código de Sage50 para territorio Más...
 
override void DisposeAsyncProcess ()
 Libera el proceso asíncrono Más...
 
virtual void Dispose (bool disposing)
 Part of the IDisposable pattern Más...
 
- Métodos protegidos heredados desde sage.addons.factucert.Negocio.Clases.CertificationAdapter
 CertificationAdapter (string mascaraCertificacion)
 
void LanzarEvento_Finalizacion (List< string > completados, List< string > correctos, List< string > fallidos, List< string > pendientes, List< string > rechazados, bool canceled=false)
 Lanza un evento con el resultado de la ejecución Más...
 
void LanzarEvento_ServicioNoDisponible (string mensaje, TipoMensaje severidad)
 Lanza un evento de notificación de servicio no disponible Más...
 
void LanzarEvento_Progreso (int totalElementos, int elementoActual)
 Calcula y lanza un evento de progreso Más...
 
void LanzarEvento_BeforeEnvioElemento (ref bool llOk)
 Lanza un evento de inicio de proceso de un nuevo elemento Más...
 
void WorkerEnvios_RunWorkerCompleted (object sender, RunWorkerCompletedEventArgs e)
 
string GetTerritorioEnvio (bool usarValorComponente200)
 Get province code Más...
 
SoftwareFacturacionDTO ObtenerDatosSoftwareFacturacion ()
 Método auxiliar para obtener los datos del software de facturación. Recupera eventuales sobreescrituras desde COMUNES.VARIABLES Más...
 
string ConvertirTerritorioDe50AComponente (int territorio50)
 Get the different codes for the Province mapped from Sage50 Values to TBai Component values Más...
 
string GetSigPolicyId_Description (string territorio)
 
string GetSigPolicyId_Identifier (string territorio)
 
string GetSigPolicyHash_DigestValue (string territorio)
 
string GetEntorno ()
 Obtiene el entorno en el que se esta ejecutando (PRE o PRO) Más...
 
bool TerritorioSoportaEnvioOnline ()
 Check if the current Territory Suppors Online sending

Devuelve
True if online sending is allowed
Más...
 
string TratarImporte (AsientosFacturasVentaGenerador datosFactura, decimal importe, string mascara)
 
decimal ToMonedaEmpresa (AsientosFacturasVentaGenerador datosFactura, decimal importe)
 
decimal GetImporteRetencionFiscal (AsientosFacturasVentaGenerador datosFactura)
 Obtiene el importe de la retención fical a partir de los datos de factuara Más...
 
decimal GetImporteTotalFacturaTickets (ewDocVentaTPV datosTicket)
 
string NormalizarCaracteresNif (string nifCandidato)
 Suprime espacion y caráctetes especiales de un nif candidato. Más...
 
string GetSendURL (string territorio, bool anulacion, DateTime documentDate)
 For generating the URL for sending files depending on the Province Más...
 
string GetQrURL (string territorio)
 For generating the URL for the QR Code Más...
 
void CheckURLList ()
 For Setting up the URL List Más...
 
void GenerateTrace (string basicInfo, string extendedInfo="")
 Traces for debugging Más...
 
Enums.TipoRegistroCertif AjustarTipoRegistroParaAnulaciones (bool esAnulacion, Enums.TipoRegistroCertif tipo)
 
string IncorporarPaisAlNif (string codigoPais, string nifCliente)
 Método auxiliar para encapsular los casos especiales a la hora de incorporar el país al nif Más...
 
void GenerarClaveRegimenEspecialTrascendencia (DataRow toFactura, Certification_XML_Parameters XML_generator_parameters, int _nTerritorio, int lnComuni_c, string lcNif, bool llCritCaja, bool llIvaNoCero, out string ClaveRegimenEspecialOTrascendencia, out string ClaveRegimenEspecialOTrascendenciaAdicional1)
 Method for calculating the IVA/VAT regime of a given Invoice Más...
 
bool OperacionIVAEuropeo (int tnOperacion)
 Devuelve si es una operación del IVA Europeo Más...
 
bool ObtenerSiiIva303 (string numFactura, string claveComprobar, string codigoTipoIva="")
 Checker for particular IVA/VAT types within a given invoice Más...
 
eTipoOperacionEmitidasSII ObtenerTipoOperacionFactura (string numFactura, string tipoIVA)
 Aux method for calculating the IVA/VAT regime of a given Invoice Más...
 
IEnumerable< DetalleTicketRectificativoDTOObtenerDatosRectificadasMultiplesTickets (string ticket, string letra)
 
IEnumerable< DetalleFacturaRectificativaDTOObtenerDatosRectificadasMultiplesFacturas (string factura)
 
eTipoOperacionEmitidasSII ObtenerTipoOperacionTicket (ewDocVentaTPV datosTicket, string VATCode)
 Aux method for calculating the IVA/VAT regime of a given Ticket Más...
 
bool ObtenerSiiIva303Ticket (ewDocVentaTPV datosTicket, string claveComprobar)
 Checker for particular IVA/VAT types within a given ticket Más...
 
string CalcularBaseIvaAplicandoEntregas (AsientosFacturasVentaGenerador.TipoIvaLinea iva, AsientosFacturasVentaGenerador datosFactura, EntregasEnFactura datosEntregas)
 
List< string > CalcularBasesExentasAplicandoEntregas (List< string > basesExentas, AsientosFacturasVentaGenerador datosFactura, EntregasEnFactura datosEntregas)
 Los datos de bases exentas son a libre asignación del usuario pero hay que aplicar de alguna forma una minoración en base a las entregas Más...
 
bool NifClienteEsEspecialOperaciones (string nifCliente)
 Nif especiales (empiezan por N o por W) Más...
 
decimal _DeTextoADecimal (string tcValorEnTexto)
 Función auxiliar para convertir strings en formato libre a decimal. Si no puede devuelve 0.0 Más...
 
DataRow GetRowCompletoTabla (string tableDatabase, string tableName, string whereClause)
 Helper for retrieving a whole Row of a database table Más...
 
List< string > GetAllSimpleValuesFromXML (string xmlContent, string tagName)
 Helper method for reading all tags from a XML string for a given field Más...
 
List< string > GetAllSimpleValuesFromJSON (string jsonContent, string tagName, string mascara)
 Helper method for reading all given tags from a JSON string Más...
 
bool EsSujeta (eTipoOperacionEmitidasSII tipoOpIva)
 
bool EsNoSujeta (eTipoOperacionEmitidasSII tipoOpIva)
 

Atributos protegidos

override string NombreComponente => "Verifactu"
 Nombre del componente que encapsula este adapter Más...
 
- Atributos protegidos heredados desde sage.addons.factucert.Negocio.Clases.CertificationAdapter
readonly string MonedaEmpresa = Convert.ToString(EW_GLOBAL._GetVariable("wc_moneda"))
 
readonly string _mascaraParaCertificacion = "0.00"
 Mask for formatting strings toxml document. It is fixed in the derived definition document and XML schema, so we ignore Sage50 internal masks. Más...
 
ew.docsven.ewDocVentaFRA loFactura = null
 Member for holding additional Invoice data Más...
 

Otros miembros heredados

- Métodos protegidos estáticos heredados desde sage.addons.factucert.Negocio.Clases.CertificationAdapter
static string ConvertirTerritorioDe200A50 (string territorio200)
 Get the different codes for the Province mapped from TBai Component values Values to Sage50 Más...
 
static void ReadTerminalData ()
 Reading data from the Terminal used for Invoicing Más...
 
static void ConfigureCertificate (bool useCertificateFile, string certificateName, SecureString certificatePassword=null)
 Configure the Certificate data for signing the file Más...
 
- Atributos protegidos estáticos heredados desde sage.addons.factucert.Negocio.Clases.CertificationAdapter
static ICertificationDA DataAccess = DependencyInjector.Instance.Retrieve<ICertificationDA>()
 Acceso a datos Más...
 
static BackgroundWorker _workerEnvios = null
 Background worker for async operations Más...
 
static int _workerQueueLenght = 0
 Background worker queue lenght Más...
 
static int _workerQueueCompleted = 0
 Background worker queued items completed count Más...
 
static bool AbortRequested = false
 Flag for a controlled termination of the Async sending process Más...
 
static bool _ActiveTraces = false
 
- Propiedades heredados desde sage.addons.factucert.Negocio.Clases.CertificationAdapter
abstract string NombreComponente [get]
 Nombre del componente que encapsulará el adapter derivado Más...
 
string ErrorMessage = "" [get, protected set]
 Public property for retrieving errors Más...
 
string GeneratedSignature = "" [get, protected set]
 Public property for retrieving the generated digital signature data Más...
 
string GeneratedXMLFile = "" [get, protected set]
 Public property for retrieving a generated XML signed file Más...
 
string GeneratedCode = "" [get, protected set]
 Public property for retrieving a generated Code Más...
 
string GeneratedQR = "" [get, protected set]
 Public property for retrieving a generated QR Code Más...
 
static bool UseCertificateFile = false [get, set]
 Use a physical file with certificate data Más...
 
static string CertificateName = "" [get, set]
 Either the filenme of a physical file with certificate data, or the Certificate name in the Windows Cert Storage Más...
 
static SecureString CertificatePassword = null [get, set]
 For physical files with certificate data, the password, for Stored Certificates, the thumbprint. Más...
 
static string TerminalCertificateName = null [get, set]
 Selected certificate name from Sage50 Terminal Más...
 
static string TerminalSerialNumber = null [get, set]
 Sage50 Terminal Serial Number Más...
 
static HashSet< string > FacturasCreadasEstaSesionSinEnviar [get]
 
- Propiedades heredados desde sage.addons.factucert.Negocio.Interficies.ICertificationManager
string ErrorMessage [get]
 Mensaje de error Más...
 
string GeneratedSignature [get]
 Firma generada Más...
 
string GeneratedCode [get]
 Código generado Más...
 
string GeneratedQR [get]
 QR generado Más...
 
string GeneratedXMLFile [get]
 Fichero generado Más...
 
- Eventos heredados desde sage.addons.factucert.Negocio.Clases.CertificationAdapter
sage.addons.factucert.Negocio.Interficies.MassiveSendAbort _MassiveSendAbort
 Evento que se produce antes de la ejecución de cada certificación Más...
 
sage.addons.factucert.Negocio.Interficies.MassiveSendEnded _MassiveSendEnded
 Evento que se produce al concluir la certificación Más...
 
sage.addons.factucert.Negocio.Interficies.MassiveSendRunWorkerCompleted _MassiveSendRunWorkerCompleted
 Evento delegado que se produce al abacar el proceso asincrono Más...
 
sage.addons.factucert.Negocio.Interficies.MassiveSendProgress _MassiveSendProgress
 Evento que se produce al incrementar el progreso del proceso Más...
 
sage.addons.factucert.Negocio.Interficies.CertifiedFileNotFound _CertifiedFileNotFound
 Evento que se produce al no encontrar un fichero certificado para enviar Más...
 
sage.addons.factucert.Negocio.Interficies.FileRejected _FileRejected
 Evento que se produce al recibir un rechazo Más...
 
sage.addons.factucert.Negocio.Interficies.ServiceUnavailable _ServiceUnavailable
 Evento que se produce cuando el servicio no esta disponible Más...
 
- Eventos heredados desde sage.addons.factucert.Negocio.Interficies.ICertificationManager
MassiveSendAbort _MassiveSendAbort
 Evento que se produce antes de la ejecución de cada certificación Más...
 
MassiveSendEnded _MassiveSendEnded
 Evento que se produce al concluir la certificación Más...
 
MassiveSendRunWorkerCompleted _MassiveSendRunWorkerCompleted
 Evento delegado que se produce al abacar el proceso asincrono Más...
 
MassiveSendProgress _MassiveSendProgress
 Evento que se produce al incrementar el progreso del proceso Más...
 
CertifiedFileNotFound _CertifiedFileNotFound
 Evento que se produce al no encontrar un fichero certificado para enviar Más...
 
FileRejected _FileRejected
 Evento que se produce al recibir un rechazo Más...
 
ServiceUnavailable _ServiceUnavailable
 Evento que se produce cuando el servicio no esta disponible Más...
 

Descripción detallada

Adapter para el componenete de VERIFACTU

Definición en la línea 28 del archivo CertificationAdapterVerifactu.cs.

Documentación del constructor y destructor

◆ CertificationAdapterVerifactu()

sage.addons.factucert.Negocio.Clases.CertificationAdapterVerifactu.CertificationAdapterVerifactu ( )
inline

Constructor

Definición en la línea 63 del archivo CertificationAdapterVerifactu.cs.

Documentación de las funciones miembro

◆ Dispose() [1/2]

virtual void sage.addons.factucert.Negocio.Clases.CertificationAdapterVerifactu.Dispose ( bool  disposing)
inlineprotectedvirtual

Part of the IDisposable pattern

Parámetros
disposing

Definición en la línea 350 del archivo CertificationAdapterVerifactu.cs.

◆ Dispose() [2/2]

void sage.addons.factucert.Negocio.Clases.CertificationAdapterVerifactu.Dispose ( )
inline

Part of the IDisposable pattern

Definición en la línea 366 del archivo CertificationAdapterVerifactu.cs.

◆ DisposeAsyncProcess()

override void sage.addons.factucert.Negocio.Clases.CertificationAdapterVerifactu.DisposeAsyncProcess ( )
inlineprotectedvirtual

Libera el proceso asíncrono

Implementa sage.addons.factucert.Negocio.Clases.CertificationAdapter.

Definición en la línea 239 del archivo CertificationAdapterVerifactu.cs.

◆ ExecuteMassiveSend()

bool sage.addons.factucert.Negocio.Clases.CertificationAdapterVerifactu.ExecuteMassiveSend ( bool  useAsyncWorker = true)
inline

Public entry point for starting the send process of all pending TBai invoices/tickets

Parámetros
useAsyncWorkerPerform the upload process as a background task. On Release this should always be true, false only for debugging purposes
Devuelve
A boolean indicating that the process was started successfully. A false means that other async process is already running in the background, and the current call will be ignored.

Implementa sage.addons.factucert.Negocio.Interficies.ICertificationManager.

Definición en la línea 386 del archivo CertificationAdapterVerifactu.cs.

◆ GenerarXmlAnulacionFirmado()

bool sage.addons.factucert.Negocio.Clases.CertificationAdapterVerifactu.GenerarXmlAnulacionFirmado ( HuellaDetalle  huellaFacturaOriginal)
inline

Genera un XML de anulación firmado

Parámetros
huellaFacturaOriginalHuella del documento a anular
Devuelve

Implementa sage.addons.factucert.Negocio.Interficies.ICertificationManager.

Definición en la línea 67 del archivo CertificationAdapterVerifactu.cs.

◆ GenerarXmlFirmado()

bool sage.addons.factucert.Negocio.Clases.CertificationAdapterVerifactu.GenerarXmlFirmado ( List< ewDocVentaTPV listaDatosAlbaranes,
AsientosFacturasVentaGenerador  datosFactura,
Certification_XML_Parameters  XML_generator_parameters 
)
inline

Genera un XML firmado con los documentos y parámetros recibidos

Parámetros
listaDatosAlbaranes
datosFactura
XML_generator_parameters
Devuelve

Implementa sage.addons.factucert.Negocio.Interficies.ICertificationManager.

Definición en la línea 111 del archivo CertificationAdapterVerifactu.cs.

◆ GetXMLFileNameForAnnullment()

string sage.addons.factucert.Negocio.Clases.CertificationAdapterVerifactu.GetXMLFileNameForAnnullment ( string  numDoc,
DateTime  fechaDoc 
)
inline

Obtiene el nombre de fichero que le corresponde a una anulación

Parámetros
numDoc
fechaDoc
Devuelve

Implementa sage.addons.factucert.Negocio.Interficies.ICertificationManager.

Definición en la línea 166 del archivo CertificationAdapterVerifactu.cs.

◆ GetXMLFileNameForInvoiceOrTicket()

string sage.addons.factucert.Negocio.Clases.CertificationAdapterVerifactu.GetXMLFileNameForInvoiceOrTicket ( string  numDoc,
DateTime  fechaDoc 
)
inline

Obtiene el nombre de fichero que le corresponde a una factura o ticket

Parámetros
numDoc
fechaDoc
Devuelve

Implementa sage.addons.factucert.Negocio.Interficies.ICertificationManager.

Definición en la línea 171 del archivo CertificationAdapterVerifactu.cs.

◆ IsMassiveSendAsyncProcessRunning() [1/3]

bool sage.addons.factucert.Negocio.Clases.CertificationAdapterVerifactu.IsMassiveSendAsyncProcessRunning ( )
inline

For checking if the Process is Running

Devuelve
A boolean value: true if the async thread is active, false otherwise

Implementa sage.addons.factucert.Negocio.Interficies.ICertificationManager.

Definición en la línea 440 del archivo CertificationAdapterVerifactu.cs.

◆ IsMassiveSendAsyncProcessRunning() [2/3]

bool sage.addons.factucert.Negocio.Clases.CertificationAdapterVerifactu.IsMassiveSendAsyncProcessRunning ( out int  queueLenght,
out int  itemsCompleted 
)
inline

For checking if the Process is Running, plus returning queue lenght and items completed values

Parámetros
queueLenghtNumber of items added to the sending queue (including those already sent on this session)
itemsCompletedNumber of items already sent
Devuelve
A boolean value: true if the async thread is active, false otherwise

Implementa sage.addons.factucert.Negocio.Interficies.ICertificationManager.

Definición en la línea 451 del archivo CertificationAdapterVerifactu.cs.

◆ IsMassiveSendAsyncProcessRunning() [3/3]

bool sage.addons.factucert.Negocio.Clases.CertificationAdapterVerifactu.IsMassiveSendAsyncProcessRunning ( out int  queueLenght,
out int  itemsCompleted,
out List< string >  listaFacturasSesionPendientes 
)
inline

For checking if the Process is Running, plus returning queue lenght and items completed values, plus a list of Invoices generated this session and pending

Parámetros
queueLenghtNumber of items added to the sending queue (including those already sent on this session)
itemsCompletedNumber of items already sent
listaFacturasSesionPendientesList of Invoices created this same session but not yet sent
Devuelve
A boolean value: true if the async thread is active, false otherwise

Implementa sage.addons.factucert.Negocio.Interficies.ICertificationManager.

Definición en la línea 465 del archivo CertificationAdapterVerifactu.cs.

◆ RequestMassiveSendAbortAndWait()

bool sage.addons.factucert.Negocio.Clases.CertificationAdapterVerifactu.RequestMassiveSendAbortAndWait ( )
inline

Sync method for stopping the Async TBai document sending thread.

Devuelve
False if no async thread is found, true once the thread has been aborted

Implementa sage.addons.factucert.Negocio.Interficies.ICertificationManager.

Definición en la línea 419 del archivo CertificationAdapterVerifactu.cs.

◆ ValidarTerritorio() [1/2]

override bool sage.addons.factucert.Negocio.Clases.CertificationAdapterVerifactu.ValidarTerritorio ( string  territorio)
inlineprotectedvirtual

Metodo de validación de código de Sage50 para territorio

Parámetros
territorio50
Devuelve

Implementa sage.addons.factucert.Negocio.Clases.CertificationAdapter.

Definición en la línea 215 del archivo CertificationAdapterVerifactu.cs.

◆ ValidarTerritorio() [2/2]

override bool sage.addons.factucert.Negocio.Clases.CertificationAdapterVerifactu.ValidarTerritorio ( int  territorio50)
inlineprotectedvirtual

Metodo de validación de código de Sage50 para territorio

Parámetros
territorio50
Devuelve

Implementa sage.addons.factucert.Negocio.Clases.CertificationAdapter.

Definición en la línea 228 del archivo CertificationAdapterVerifactu.cs.

Documentación de los campos

◆ _mascaraParaVerifactu

const string sage.addons.factucert.Negocio.Clases.CertificationAdapterVerifactu._mascaraParaVerifactu = "0.00"

Mask for formatting strings to VERIFACTU xml document. It is fixed in the VERIFACTU definition document and XML schema, so we ignore Sage50 internal masks.

Definición en la línea 33 del archivo CertificationAdapterVerifactu.cs.

◆ NombreComponente

override string sage.addons.factucert.Negocio.Clases.CertificationAdapterVerifactu.NombreComponente => "Verifactu"
protected

Nombre del componente que encapsula este adapter

Definición en la línea 39 del archivo CertificationAdapterVerifactu.cs.


La documentación para esta clase fue generada a partir del siguiente fichero: