This commit is contained in:
2022-10-14 16:28:35 -07:00
7 changed files with 44 additions and 8 deletions

View File

@@ -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"

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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"))

View File

@@ -115,7 +115,7 @@
<div class="catcuentas left">Subcuenta de</div>
<div class="catcuentas right">
<asp:TextBox ID="Tsubcuenta" runat="server" Enabled="False" Width="140px" ClientIDMode="Static"></asp:TextBox>
<asp:DropDownList ID="DdlCuentaContable" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="false" DataTextField="CtaCodigo" style="max-width:160px"
<asp:DropDownList ID="DdlCuentaContable" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" style="max-width:160px"
DataValueField="Id" Width="160px" Visible="false">
</asp:DropDownList>
<br />

View File

@@ -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