integración de cambios en producción que no estaban en git

This commit is contained in:
Antonio Gonzalez
2020-05-10 08:57:57 -07:00
parent 293b637246
commit 39735c5478

View File

@@ -18,7 +18,7 @@ Partial Class Clientes
Private Opcion As Integer
<PersistenceModeAttribute(PersistenceMode.InnerProperty)>
Public ReadOnly Property RowStyle As TableItemStyle
Protected ReadOnly Property CveCliente As Integer
Private ReadOnly Property CveCliente As Integer
Get
Return ViewState("CveCliente").ToString.ToEntero
End Get
@@ -849,6 +849,7 @@ Partial Class Clientes
'PERMISOS PAGINA
If CveCliente > 0 Then
LtlTareaNueva.Text = String.Format("<a class=""caption-subject bold font-green"" onclick=""OpenModalNewTareaUserControl(1,-1,{{CveCliente:{0}}});""> <i class=""fa fa-plus""'></i> Tarea</a>", CveCliente)
BtnEliminar.Visible = PermiteEliminar()
BtnGuardar.Visible = PermiteEditar()
Else
@@ -1700,9 +1701,9 @@ Partial Class Clientes
Return Retorno
End Function
Private Sub CargaHistorial(Optional SelectTop As Integer = 21, Optional CveClienteSucursal As Integer = -1, Optional TipoDocto As String = "-1")
Private Sub CargaHistorial(Optional SelectTop As Integer = 21, Optional CveClienteSucursal As Integer = -1)
Dim ObjClientes As New ClsClientes()
If ObjClientes.GetHistorialVentas(CveCliente, SelectTop, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero, TipoDocto:=TipoDocto) Then
If ObjClientes.GetHistorialVentas(CveCliente, SelectTop, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero) Then
If ObjClientes.DtResultados.Rows.Count > 0 Then
'Carga Generales
LtlCantidad.Text = ObjClientes.DtResultados.Rows(0)("CountTotal").ToString.FormatoNumero(0)
@@ -1896,12 +1897,13 @@ Partial Class Clientes
Protected Sub BtnVerMasVentas_Click(sender As Object, e As EventArgs)
If BtnVerMasVentas.Text = "Ver Más" Then
CargaHistorial(-1, TipoDocto:=RblTipo.SelectedValue)
CargaHistorial(-1)
BtnVerMasVentas.Text = "Ver Menos"
Else
CargaHistorial(21, TipoDocto:=RblTipo.SelectedValue)
CargaHistorial(21)
BtnVerMasVentas.Text = "Ver Más"
End If
RblTipo_SelectedIndexChanged(RblTipo, EventArgs.Empty)
End Sub
Protected Sub BtnVerMasAnticipos_Click(sender As Object, e As EventArgs)
@@ -5439,7 +5441,26 @@ Partial Class Clientes
#Region "M E T O D O S "
Protected Sub RblTipo_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RblTipo.SelectedIndexChanged
CargaHistorial(TipoDocto:=RblTipo.SelectedValue)
If DTHistorialVentas IsNot Nothing AndAlso RblTipo.SelectedValue <> "-1" Then
Dim tmp As DataTable = DTHistorialVentas.FiltraParametros($"TipoDocto = '{RblTipo.SelectedValue}'")
If tmp.Rows.Count > 0 Then
Dim Totales As DataRow = tmp.NewRow
Totales("SubTotal") = tmp.SUM("SubTotal")
Totales("Total") = tmp.SUM("Total")
Totales("Descuento") = tmp.SUM("Descuento")
Totales("Amortizacion") = tmp.SUM("Amortizacion")
Totales("MAX_Total") = tmp.MAX("MAX_Total")
Totales("AVG_Total") = tmp.AVG("AVG_Total")
Totales("MIN_Total") = tmp.MIN("MIN_Total")
Totales("CountTotal") = tmp.COUNT("CountTotal")
tmp.Rows.InsertAt(Totales, 0)
End If
GVHistorial.DataSource = tmp
ElseIf DTHistorialVentas IsNot Nothing AndAlso RblTipo.SelectedValue = "-1" Then
GVHistorial.DataSource = DTHistorialVentas
End If
GVHistorial.DataBind()
End Sub
Private Sub DdlSucursalCliente_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlSucursalCliente.SelectedIndexChanged
CargaCotizaciones(CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero) 'listo