diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 94e9ad87b..6d6e92d19 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -7994,6 +7994,16 @@ Public Class ClsPaginas Next End If + 'TEMPORAL, DEBE CAMBIARSE A FUNCIONALIDAD + If Vta.CveEmpresa.Contiene(172, 173) Then + Dim ArchivoStimulsfot As New System.IO.FileInfo(RutaFormato.Replace(".rdlc", ".mrt")) + If ArchivoStimulsfot.Exists Then + UsarStimulsoft = True + + params.Add(New ReportParameter("RegimenFiscalEmpresa", String.Format("{0} - {1}", UsuarioActual.Empresa.CodigoRegimenFiscal, UsuarioActual.Empresa.RegimenFiscal))) + End If + End If + If Not UsarStimulsoft Then Dim Archivo As New System.IO.FileInfo(RutaFormato) If Archivo.Exists Then @@ -8038,6 +8048,30 @@ Public Class ClsPaginas Else RutaFormato = RutaFormato.Replace(".rdlc", ".mrt") retorno = StreamBytesStimulsoft("Facturas", RutaFormato, lrds, params, NombreArchivo:=NombreArchivo, Formato:="PDF") + + 'TEMPORAL, EMPRESAS EN LAS QUE SE UTILIZARA PRIMERO STIMULSOFT + If Vta.CveEmpresa.Contiene(172, 173) Then + Dim ArchivoPDF As New System.IO.FileInfo(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio)) + If Guardar Then + If Not ArchivoPDF.Exists Then + Try + DirectoryExistsCreate(String.Format("{0}PDF", UsuarioActual.Empresa.Ruta)) + DirectoryExistsCreate(String.Format("{0}PDF\{1}", UsuarioActual.Empresa.Ruta, Vta.TipoDocto)) + File.WriteAllBytes(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio), retorno) + Catch ex As Exception + Alert("Ocurrió un error al generar el PDF", TipoMensaje.MsgAdvertencia) + End Try + Else + Try + ArchivoPDF.Delete() + File.WriteAllBytes(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio), retorno) + Catch ex As Exception + Alert("Ocurrió un error al generar el PDF", TipoMensaje.MsgAdvertencia) + End Try + End If + End If + End If + End If Catch ex As Exception @@ -8089,7 +8123,7 @@ Public Class ClsPaginas For Each rds As ReportDataSource In DataSource Dim Nombre As String = rds.Name - If RutaReporte.Contains("Factura.mrt") Then + If RutaReporte.Contains("Factura.mrt") OrElse RutaReporte.Contains("Remision.mrt") OrElse RutaReporte.Contains("Cotizacion.mrt") OrElse RutaReporte.Contains("NotaDevolucion.mrt") Then Select Case rds.Name Case "DsOC" Nombre = "DtDetalle" diff --git a/App_Code/ClsSisEmpresas.vb b/App_Code/ClsSisEmpresas.vb index 179c07d60..c1b5f590c 100644 --- a/App_Code/ClsSisEmpresas.vb +++ b/App_Code/ClsSisEmpresas.vb @@ -341,6 +341,7 @@ Public Class ClsSisEmpresas _Empresa.CP = Data.Rows(0)("CP").ToString().ToEntero _Empresa.Regimen = Data.Rows(0)("Regimen").ToString _Empresa.CodigoRegimenFiscal = Data.Rows(0)("CodigoRegimenFiscal").ToString + _Empresa.RegimenFiscal = Data.Rows(0)("RegimenFiscal").ToString _Empresa.RFC = Data.Rows(0)("RFC").ToString _Empresa.CURP = Data.Rows(0)("CURP").ToString _Empresa.Telefono = Data.Rows(0)("Telefono").ToString diff --git a/App_Code/Empresa.vb b/App_Code/Empresa.vb index 1217f4dbc..c55637868 100644 --- a/App_Code/Empresa.vb +++ b/App_Code/Empresa.vb @@ -64,7 +64,8 @@ Public Class Empresa Public Property Importe As Decimal Public Property CveMetodoPago As Integer - Public Property CodigoRegimenFiscal As String + Public Property CodigoRegimenFiscal As String + Public Property RegimenFiscal As String Public Property EstatusFacturacion As Boolean Public Property Estatus As Boolean Public Property UsaContabilidad As Boolean diff --git a/App_Code/modExtensiones.vb b/App_Code/modExtensiones.vb index 681afe43a..ee58149a8 100644 --- a/App_Code/modExtensiones.vb +++ b/App_Code/modExtensiones.vb @@ -977,8 +977,8 @@ Namespace Extensiones Dim tmp As String = Mid(entero, 2, 6) - If entero.ToString.Length >= 7 And tmp = "000000" Then - If entero.ToString.Length = 7 And tmp = "000000" Then + If entero.ToString.Length >= 7 And tmp = "000000" Or Mid(entero, 3, 6) = "000000" Then + If entero.ToString.Length = 7 And tmp = "000000" Or Mid(entero, 3, 6) = "000000" Then palabras.Append("de ") End If Else diff --git a/Compras/CatProveedoresClasificaciones.aspx.vb b/Compras/CatProveedoresClasificaciones.aspx.vb index 038e00e54..623166051 100644 --- a/Compras/CatProveedoresClasificaciones.aspx.vb +++ b/Compras/CatProveedoresClasificaciones.aspx.vb @@ -90,8 +90,8 @@ Partial Class Compras_CatProveedoresClasificaciones End If End If - If ObjProveedorClasificacion.GetProveedorClasificacion(-1) Then - GlobalDTProveedorClasificacion(-1) = ObjProveedorClasificacion.DtResultados + If ObjProveedorClasificacion.GetProveedorClasificacion(UsuarioActual.CveEmpresa) Then + GlobalDTProveedorClasificacion(UsuarioActual.CveEmpresa) = ObjProveedorClasificacion.DtResultados End If RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAddClasificacion")) diff --git a/Contabilidad2/CatCuentas.aspx b/Contabilidad2/CatCuentas.aspx index 51bcc8812..58b1d4c79 100644 --- a/Contabilidad2/CatCuentas.aspx +++ b/Contabilidad2/CatCuentas.aspx @@ -115,7 +115,7 @@
Subcuenta de
-
diff --git a/Contabilidad2/CatCuentas.aspx.vb b/Contabilidad2/CatCuentas.aspx.vb index 6845bb71a..ac9f09bbf 100644 --- a/Contabilidad2/CatCuentas.aspx.vb +++ b/Contabilidad2/CatCuentas.aspx.vb @@ -331,7 +331,7 @@ Partial Class Contabilidad2_CatCuentas Dim ObjConta As New ClsContabilidad - If ObjConta.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then + If ObjConta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then DdlCuentaContable.DataSource = ObjConta.DtResultados End If