Adapter para el componente TBAI Más...
Estructuras de datos | |
class | MensajeErrorRespuesta |
Clase auxiliar para manipular el mensaje de respuesta del componente de TBAI | |
Métodos públicos | |||
CertificationAdapterTbai () | |||
Constructor Más... | |||
bool | GenerarXmlFirmado (List< ewDocVentaTPV > listaDatosAlbaranes, AsientosFacturasVentaGenerador datosFactura, Certification_XML_Parameters XML_generator_parameters) | ||
Adapted call for interfacing with Sage50 for generating XML Ticket Bai files. Más... | |||
bool | GenerarXmlAnulacionFirmado (HuellaDetalle huellaFacturaOriginal) | ||
Genera un XML firmado para la operación de anulación Más... | |||
bool | LaunchCertifyUnitTest () | ||
For Unit Testing Más... | |||
string | GetXMLFileNameForInvoiceOrTicket (string numDoc, DateTime fechaDoc) | ||
Devuelve el nombre del fichero de la factura o ticket certificada Más... | |||
string | GetXMLFileNameForAnnullment (string numDoc, DateTime fechaDoc) | ||
Devuelve el nombre de la de fichero para operación de anulación 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
| |||
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... | |||
bool | LaunchSendUnitTest_Alava () | ||
For Unit Testing Más... | |||
bool | LaunchSendUnitTest_Vizcaya () | ||
For Unit Testing Más... | |||
bool | LaunchSendUnitTest_Gipuzkoa () | ||
For Unit Testing Más... | |||
Campos de datos | |
const string | _mascaraParaTicketBAI = "0.00" |
Mask for formatting strings to TBAI xml document. It is fixed in the TBAI definition document and XML schema, so we ignore Sage50 internal masks. Más... | |
const string | _mascara8decimales = "0.00000000" |
Mask for 8 digits in decimal place formating 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
| |
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< DetalleTicketRectificativoDTO > | ObtenerDatosRectificadasMultiplesTickets (string ticket, string letra) |
IEnumerable< DetalleFacturaRectificativaDTO > | ObtenerDatosRectificadasMultiplesFacturas (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 => "TBAI" |
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... | |
Adapter para el componente TBAI
Definición en la línea 32 del archivo CertificationAdapterTbai.cs.
|
inline |
Constructor
Definición en la línea 87 del archivo CertificationAdapterTbai.cs.
|
inlineprotectedvirtual |
Part of the IDisposable pattern
disposing |
Definición en la línea 3788 del archivo CertificationAdapterTbai.cs.
|
inline |
Part of the IDisposable pattern
Definición en la línea 3804 del archivo CertificationAdapterTbai.cs.
|
inlineprotectedvirtual |
Libera el proceso asíncrono
Implementa sage.addons.factucert.Negocio.Clases.CertificationAdapter.
Definición en la línea 120 del archivo CertificationAdapterTbai.cs.
|
inline |
Public entry point for starting the send process of all pending TBai invoices/tickets
useAsyncWorker | Perform the upload process as a background task. On Release this should always be true, false only for debugging purposes |
Implementa sage.addons.factucert.Negocio.Interficies.ICertificationManager.
Definición en la línea 3824 del archivo CertificationAdapterTbai.cs.
|
inline |
Genera un XML firmado para la operación de anulación
huellaFacturaOriginal | Huella de la factura a anular |
Implementa sage.addons.factucert.Negocio.Interficies.ICertificationManager.
Definición en la línea 200 del archivo CertificationAdapterTbai.cs.
|
inline |
Adapted call for interfacing with Sage50 for generating XML Ticket Bai files.
listaDatosAlbaranes | List with delivery orders data included in the Invoice |
datosFactura | Invoice data |
XML_generator_parameters | Required extra info for the process, including certificate name for the Digital Signature in the Windows Storage, and previous Invoice data |
Implementa sage.addons.factucert.Negocio.Interficies.ICertificationManager.
Definición en la línea 139 del archivo CertificationAdapterTbai.cs.
|
inline |
Devuelve el nombre de la de fichero para operación de anulación
numDoc | Número de factura / ticket |
fechaDoc | Fecha de factura o de ticket |
Implementa sage.addons.factucert.Negocio.Interficies.ICertificationManager.
Definición en la línea 3743 del archivo CertificationAdapterTbai.cs.
|
inline |
Devuelve el nombre del fichero de la factura o ticket certificada
numDoc | Número de factura / ticket |
fechaDoc | Fecha de factura o de ticket |
Implementa sage.addons.factucert.Negocio.Interficies.ICertificationManager.
Definición en la línea 275 del archivo CertificationAdapterTbai.cs.
|
inline |
For checking if the Process is Running
Implementa sage.addons.factucert.Negocio.Interficies.ICertificationManager.
Definición en la línea 3878 del archivo CertificationAdapterTbai.cs.
|
inline |
For checking if the Process is Running, plus returning queue lenght and items completed values
queueLenght | Number of items added to the sending queue (including those already sent on this session) |
itemsCompleted | Number of items already sent |
Implementa sage.addons.factucert.Negocio.Interficies.ICertificationManager.
Definición en la línea 3889 del archivo CertificationAdapterTbai.cs.
|
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
queueLenght | Number of items added to the sending queue (including those already sent on this session) |
itemsCompleted | Number of items already sent |
listaFacturasSesionPendientes | List of Invoices created this same session but not yet sent |
Implementa sage.addons.factucert.Negocio.Interficies.ICertificationManager.
Definición en la línea 3903 del archivo CertificationAdapterTbai.cs.
|
inline |
For Unit Testing
Definición en la línea 248 del archivo CertificationAdapterTbai.cs.
|
inline |
For Unit Testing
Definición en la línea 4344 del archivo CertificationAdapterTbai.cs.
|
inline |
For Unit Testing
Definición en la línea 4360 del archivo CertificationAdapterTbai.cs.
|
inline |
For Unit Testing
Definición en la línea 4352 del archivo CertificationAdapterTbai.cs.
|
inline |
Sync method for stopping the Async TBai document sending thread.
Implementa sage.addons.factucert.Negocio.Interficies.ICertificationManager.
Definición en la línea 3857 del archivo CertificationAdapterTbai.cs.
|
inlineprotectedvirtual |
Metodo de validación de código de Sage50 para territorio
territorio50 |
Implementa sage.addons.factucert.Negocio.Clases.CertificationAdapter.
Definición en la línea 96 del archivo CertificationAdapterTbai.cs.
|
inlineprotectedvirtual |
Metodo de validación de código de Sage50 para territorio
territorio50 |
Implementa sage.addons.factucert.Negocio.Clases.CertificationAdapter.
Definición en la línea 109 del archivo CertificationAdapterTbai.cs.
const string sage.addons.factucert.Negocio.Clases.CertificationAdapterTbai._mascara8decimales = "0.00000000" |
Mask for 8 digits in decimal place formating
Definición en la línea 72 del archivo CertificationAdapterTbai.cs.
const string sage.addons.factucert.Negocio.Clases.CertificationAdapterTbai._mascaraParaTicketBAI = "0.00" |
Mask for formatting strings to TBAI xml document. It is fixed in the TBAI definition document and XML schema, so we ignore Sage50 internal masks.
Definición en la línea 67 del archivo CertificationAdapterTbai.cs.
|
protected |
Nombre del componente que encapsula este adapter
Definición en la línea 46 del archivo CertificationAdapterTbai.cs.