Filtro de pedidos en historial de ventas

This commit is contained in:
2020-10-28 13:54:45 -07:00
parent 2f586d5876
commit 5188eecdf0

View File

@@ -5547,8 +5547,15 @@ Partial Class Clientes
Protected Sub RblTipo_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RblTipo.SelectedIndexChanged
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 tmp As DataTable = Nothing
If RblTipo.SelectedValue.Contiene("Ped") Then
tmp = DTHistorialVentas.FiltraParametros($"TipoDocto IN('Ped','Pd2')")
Else
tmp = DTHistorialVentas.FiltraParametros($"TipoDocto = '{RblTipo.SelectedValue}'")
End If
If tmp IsNot Nothing AndAlso tmp.Rows.Count > 0 Then
Dim Totales As DataRow = tmp.NewRow
Totales("SubTotal") = tmp.SUM("SubTotal")
Totales("Total") = tmp.SUM("Total")