parametro globaldt RFC, proveedores

This commit is contained in:
2021-12-09 14:13:12 -07:00
parent 61a2b5254a
commit 456b057d31
3 changed files with 79 additions and 10 deletions

View File

@@ -927,6 +927,32 @@ Public Class ClsPaginas
Application("GlobalDTFamilias") = value Application("GlobalDTFamilias") = value
End Set End Set
End Property End Property
Property GlobalDTChoferes(CveEmpresa As Integer, Optional CveChofer As Integer = -1) As DataTable
Get
Dim AppNombre As String = String.Format("GlobalDTChoferes-{0}", CveEmpresa)
'sino existe, recarga los datos
If Application(AppNombre) Is Nothing Then
Dim ObjAcar As New ClsAcarreos()
If ObjAcar.GetChofer(-1, CveEmpresa, 1, -1) Then
Application(AppNombre) = ObjAcar.DtResultados
End If
ObjAcar.Dispose()
End If
Dim Str As New StringBuilder
If CveChofer > 0 Then Str.AppendFormat("CveChofer = {0}", CveChofer)
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
GlobalDTChoferes = Dv.ToTable
Dv.Dispose()
End Get
Set(value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTChoferes-{0}", CveEmpresa)
Application(AppNombre) = value
End Set
End Property
Property GlobalDTClasificacionesPresupuestos(Optional CveEmpresa As Integer = -1) As DataTable Property GlobalDTClasificacionesPresupuestos(Optional CveEmpresa As Integer = -1) As DataTable
Get Get
If CveEmpresa <> -1 Then If CveEmpresa <> -1 Then
@@ -1563,6 +1589,31 @@ Public Class ClsPaginas
Application("GlobalDTInvMetodosInventario") = value Application("GlobalDTInvMetodosInventario") = value
End Set End Set
End Property End Property
Property GlobalDTInvCamiones(CveEmpresa As Integer, Optional CveCamion As Integer = -1) As DataTable
Get
Dim AppNombre As String = String.Format("GlobalDTInvCamiones-{0}", CveEmpresa)
'sino existe, recarga los datos
If Application(AppNombre) Is Nothing Then
Dim ObjInventarios As New ClsInventarios
If ObjInventarios.GetCamiones(-1, UsuarioActual.CveEmpresa) AndAlso ObjInventarios.DtResultados.Rows.Count > 0 Then
Application(AppNombre) = ObjInventarios.DtResultados
End If
ObjInventarios.Dispose()
End If
Dim Str As New StringBuilder
If CveCamion > 0 Then Str.AppendFormat("CveCamion = {0}", CveCamion)
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
GlobalDTInvCamiones = Dv.ToTable
Dv.Dispose()
End Get
Set(value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTInvCamiones-{0}", CveEmpresa)
Application(AppNombre) = value
End Set
End Property
Property GlobalDTAFCaracteristicasOpciones() As DataTable Property GlobalDTAFCaracteristicasOpciones() As DataTable
Get Get
GlobalDTAFCaracteristicasOpciones = DirectCast(Application("GlobalDTAFCaracteristicasOpciones"), DataTable) GlobalDTAFCaracteristicasOpciones = DirectCast(Application("GlobalDTAFCaracteristicasOpciones"), DataTable)
@@ -1850,7 +1901,7 @@ Public Class ClsPaginas
Application("GlobalDTClientesCorporativo") = value Application("GlobalDTClientesCorporativo") = value
End Set End Set
End Property End Property
Property GlobalDTCompProveedores(CveEmpresa As Integer, Optional CveProveedor As Integer = -1) As DataTable Property GlobalDTCompProveedores(CveEmpresa As Integer, Optional CveProveedor As Integer = -1, Optional RFC As String = "-1") As DataTable
Get Get
Dim AppNombre As String = String.Format("GlobalDTCompProveedores-{0}", CveEmpresa) Dim AppNombre As String = String.Format("GlobalDTCompProveedores-{0}", CveEmpresa)
'sino existe, recarga los datos 'sino existe, recarga los datos
@@ -1864,6 +1915,7 @@ Public Class ClsPaginas
Dim StrSQL As New StringBuilder Dim StrSQL As New StringBuilder
StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa) StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa)
If CveProveedor >= 0 Then StrSQL.AppendFormat(" AND CveProveedor = {0} ", CveProveedor) If CveProveedor >= 0 Then StrSQL.AppendFormat(" AND CveProveedor = {0} ", CveProveedor)
If RFC <> "-1" Then StrSQL.AppendFormat(" AND RFC = '{0}' ", RFC)
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows) Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
GlobalDTCompProveedores = Dv.ToTable GlobalDTCompProveedores = Dv.ToTable
@@ -6468,7 +6520,7 @@ Public Class ClsPaginas
params.Add(New CrystalParametro("INETipoComite", INETipoComite)) params.Add(New CrystalParametro("INETipoComite", INETipoComite))
params.Add(New CrystalParametro("INEIdContabilidad", INEIdContabilidad)) params.Add(New CrystalParametro("INEIdContabilidad", INEIdContabilidad))
params.Add(New CrystalParametro("Referencia", Vta.Cliente.ReferenciaFiscal)) params.Add(New CrystalParametro("Referencia", Vta.Cliente.ReferenciaFiscal))
params.Add(New CrystalParametro("ClienteContacto", Vta.AtnA)) params.Add(New CrystalParametro("ClienteContacto", Vta.AtencionA))
End If End If
'DIRECCION ENVIO 'DIRECCION ENVIO
@@ -7076,7 +7128,7 @@ Public Class ClsPaginas
params.Add(New ReportParameter("ClienteNoInt", If(Vta.ClienteSucursal.NoInt.Length > 0, Vta.ClienteSucursal.NoInt, ""))) params.Add(New ReportParameter("ClienteNoInt", If(Vta.ClienteSucursal.NoInt.Length > 0, Vta.ClienteSucursal.NoInt, "")))
params.Add(New ReportParameter("ClienteNoExt", If(Vta.ClienteSucursal.NoExt.Length > 0, Vta.ClienteSucursal.NoExt, ""))) params.Add(New ReportParameter("ClienteNoExt", If(Vta.ClienteSucursal.NoExt.Length > 0, Vta.ClienteSucursal.NoExt, "")))
params.Add(New ReportParameter("ClientePais", If(Vta.ClienteSucursal.Pais.Length > 0, Vta.ClienteSucursal.Pais, ""))) params.Add(New ReportParameter("ClientePais", If(Vta.ClienteSucursal.Pais.Length > 0, Vta.ClienteSucursal.Pais, "")))
params.Add(New ReportParameter("ClienteContacto", Vta.AtnA)) params.Add(New ReportParameter("ClienteContacto", Vta.AtencionA))
ElseIf Vta.CveCliente.ToEntero > 0 Then ElseIf Vta.CveCliente.ToEntero > 0 Then
params.Add(New ReportParameter("ClienteCalle", If(Vta.Cliente.Direccion.Length > 0, Vta.Cliente.Direccion, ""))) params.Add(New ReportParameter("ClienteCalle", If(Vta.Cliente.Direccion.Length > 0, Vta.Cliente.Direccion, "")))
params.Add(New ReportParameter("ClienteColonia", If(Vta.Cliente.Colonia.Length > 0, Vta.Cliente.Colonia, ""))) params.Add(New ReportParameter("ClienteColonia", If(Vta.Cliente.Colonia.Length > 0, Vta.Cliente.Colonia, "")))
@@ -7087,7 +7139,7 @@ Public Class ClsPaginas
params.Add(New ReportParameter("ClienteNoInt", If(Vta.Cliente.NoInt.Length > 0, Vta.Cliente.NoInt, ""))) params.Add(New ReportParameter("ClienteNoInt", If(Vta.Cliente.NoInt.Length > 0, Vta.Cliente.NoInt, "")))
params.Add(New ReportParameter("ClienteNoExt", If(Vta.Cliente.NoExt.Length > 0, Vta.Cliente.NoExt, ""))) params.Add(New ReportParameter("ClienteNoExt", If(Vta.Cliente.NoExt.Length > 0, Vta.Cliente.NoExt, "")))
params.Add(New ReportParameter("ClientePais", If(Vta.Cliente.Pais.Length > 0, Vta.Cliente.Pais, ""))) params.Add(New ReportParameter("ClientePais", If(Vta.Cliente.Pais.Length > 0, Vta.Cliente.Pais, "")))
params.Add(New ReportParameter("ClienteContacto", Vta.AtnA)) params.Add(New ReportParameter("ClienteContacto", Vta.AtencionA))
End If End If
'PARAMETROS SEGUN TIPO DOCUMENTO 'PARAMETROS SEGUN TIPO DOCUMENTO
@@ -7248,7 +7300,7 @@ Public Class ClsPaginas
params.Add(New ReportParameter("INETipoComite", INETipoComite)) params.Add(New ReportParameter("INETipoComite", INETipoComite))
params.Add(New ReportParameter("INEIdContabilidad", INEIdContabilidad.ToString)) params.Add(New ReportParameter("INEIdContabilidad", INEIdContabilidad.ToString))
params.Add(New ReportParameter("Referencia", Vta.Cliente.ReferenciaFiscal)) params.Add(New ReportParameter("Referencia", Vta.Cliente.ReferenciaFiscal))
params.Add(New ReportParameter("ClienteContacto", Vta.AtnA)) params.Add(New ReportParameter("ClienteContacto", Vta.AtencionA))
End If End If
RutaFormato = String.Format("{0}Formatos\{1}.rdlc", UsuarioActual.Empresa.Ruta, NombreArchivo) RutaFormato = String.Format("{0}Formatos\{1}.rdlc", UsuarioActual.Empresa.Ruta, NombreArchivo)

View File

@@ -60,7 +60,7 @@
<asp:ListItem Value="2">F y E</asp:ListItem> <asp:ListItem Value="2">F y E</asp:ListItem>
<asp:ListItem Value="3">Ingresos X Comprobar</asp:ListItem> <asp:ListItem Value="3">Ingresos X Comprobar</asp:ListItem>
<asp:ListItem Value="4">Deudores</asp:ListItem> <asp:ListItem Value="4">Deudores</asp:ListItem>
<asp:ListItem Value="5">Compras</asp:ListItem> <asp:ListItem Value="5" Enabled="false">Compras</asp:ListItem>
</asp:RadioButtonList> </asp:RadioButtonList>
</div> </div>
</div> </div>

View File

@@ -785,11 +785,25 @@ Partial Class Bancos_PopIEVentas
End If End If
If RFCCliente.ToUpper <> "XAXX010101000" Then If RFCCliente.ToUpper <> "XAXX010101000" Then
Dim ObjCompras As New ClsCompras Dim CveProveedor As Integer = GlobalDTCompProveedores(UsuarioActual.CveEmpresa, RFC:=RFCCliente.ToUpper).FiltroPrimeroValor("CveProveedor").ToEntero
If ObjCompras.GetCompras(-1, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa, ProveedorRFC:=RFCCliente) Then
RBLContado.Items(4).Enabled = True If CveProveedor > 0 Then
Dim Mov As New ClsMovimientos
If Mov.GetCxPProveedor(CveProveedor, MinFecha.ToShortDateString, MaxFecha.ToShortDateString, -1, -1, -1, -1, -1, 1, -1, -1, "-1", "-1", "-1") Then
If Mov.DtResultados.FiltraParametros("Saldo > 0", "Fecha,SerieFolio").Rows.Count > 0 Then
RBLContado.Items(4).Enabled = True
End If
End If
Mov.Dispose()
End If End If
ObjCompras.Dispose()
'Dim ObjCompras As New ClsCompras
'If ObjCompras.GetCompras(-1, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa, ProveedorRFC:=RFCCliente) Then
' RBLContado.Items(4).Enabled = True
'End If
'ObjCompras.Dispose()
End If End If
If Not Validada Then If Not Validada Then
@@ -926,6 +940,9 @@ Partial Class Bancos_PopIEVentas
End Sub End Sub
Protected Sub CargaCompras(Optional CveMoneda As Integer = 1) Protected Sub CargaCompras(Optional CveMoneda As Integer = 1)
If RFCCliente = "XAXX010101000" Then Exit Sub
Dim ObjCompras As New ClsCompras Dim ObjCompras As New ClsCompras
Dim ObjProveedor As New ClsCompProveedores Dim ObjProveedor As New ClsCompProveedores
Dim CveProveedor As Integer = -1 Dim CveProveedor As Integer = -1