diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb
index 7ff070146..b8a1e8186 100644
--- a/App_Code/ClsPaginas.vb
+++ b/App_Code/ClsPaginas.vb
@@ -927,6 +927,32 @@ Public Class ClsPaginas
Application("GlobalDTFamilias") = value
End Set
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
Get
If CveEmpresa <> -1 Then
@@ -1563,6 +1589,31 @@ Public Class ClsPaginas
Application("GlobalDTInvMetodosInventario") = value
End Set
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
Get
GlobalDTAFCaracteristicasOpciones = DirectCast(Application("GlobalDTAFCaracteristicasOpciones"), DataTable)
@@ -1850,7 +1901,7 @@ Public Class ClsPaginas
Application("GlobalDTClientesCorporativo") = value
End Set
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
Dim AppNombre As String = String.Format("GlobalDTCompProveedores-{0}", CveEmpresa)
'sino existe, recarga los datos
@@ -1864,6 +1915,7 @@ Public Class ClsPaginas
Dim StrSQL As New StringBuilder
StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa)
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)
GlobalDTCompProveedores = Dv.ToTable
@@ -6468,7 +6520,7 @@ Public Class ClsPaginas
params.Add(New CrystalParametro("INETipoComite", INETipoComite))
params.Add(New CrystalParametro("INEIdContabilidad", INEIdContabilidad))
params.Add(New CrystalParametro("Referencia", Vta.Cliente.ReferenciaFiscal))
- params.Add(New CrystalParametro("ClienteContacto", Vta.AtnA))
+ params.Add(New CrystalParametro("ClienteContacto", Vta.AtencionA))
End If
'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("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("ClienteContacto", Vta.AtnA))
+ params.Add(New ReportParameter("ClienteContacto", Vta.AtencionA))
ElseIf Vta.CveCliente.ToEntero > 0 Then
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, "")))
@@ -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("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("ClienteContacto", Vta.AtnA))
+ params.Add(New ReportParameter("ClienteContacto", Vta.AtencionA))
End If
'PARAMETROS SEGUN TIPO DOCUMENTO
@@ -7248,7 +7300,7 @@ Public Class ClsPaginas
params.Add(New ReportParameter("INETipoComite", INETipoComite))
params.Add(New ReportParameter("INEIdContabilidad", INEIdContabilidad.ToString))
params.Add(New ReportParameter("Referencia", Vta.Cliente.ReferenciaFiscal))
- params.Add(New ReportParameter("ClienteContacto", Vta.AtnA))
+ params.Add(New ReportParameter("ClienteContacto", Vta.AtencionA))
End If
RutaFormato = String.Format("{0}Formatos\{1}.rdlc", UsuarioActual.Empresa.Ruta, NombreArchivo)
diff --git a/Bancos/PopIEVentas.aspx b/Bancos/PopIEVentas.aspx
index d3cfbc3b7..f42d31759 100644
--- a/Bancos/PopIEVentas.aspx
+++ b/Bancos/PopIEVentas.aspx
@@ -60,7 +60,7 @@
F y E
Ingresos X Comprobar
Deudores
- Compras
+ Compras
diff --git a/Bancos/PopIEVentas.aspx.vb b/Bancos/PopIEVentas.aspx.vb
index 87c387537..0467778a7 100644
--- a/Bancos/PopIEVentas.aspx.vb
+++ b/Bancos/PopIEVentas.aspx.vb
@@ -785,11 +785,25 @@ Partial Class Bancos_PopIEVentas
End If
If RFCCliente.ToUpper <> "XAXX010101000" Then
- Dim ObjCompras As New ClsCompras
- If ObjCompras.GetCompras(-1, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa, ProveedorRFC:=RFCCliente) Then
- RBLContado.Items(4).Enabled = True
+ Dim CveProveedor As Integer = GlobalDTCompProveedores(UsuarioActual.CveEmpresa, RFC:=RFCCliente.ToUpper).FiltroPrimeroValor("CveProveedor").ToEntero
+
+ 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
- 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
If Not Validada Then
@@ -926,6 +940,9 @@ Partial Class Bancos_PopIEVentas
End Sub
Protected Sub CargaCompras(Optional CveMoneda As Integer = 1)
+
+ If RFCCliente = "XAXX010101000" Then Exit Sub
+
Dim ObjCompras As New ClsCompras
Dim ObjProveedor As New ClsCompProveedores
Dim CveProveedor As Integer = -1