diff --git a/Empresas/119/Formatos/RepClientesCxC.rpt b/Empresas/119/Formatos/RepClientesCxC.rpt index 246d65950..f8e06f121 100644 Binary files a/Empresas/119/Formatos/RepClientesCxC.rpt and b/Empresas/119/Formatos/RepClientesCxC.rpt differ diff --git a/Empresas/137/Formatos/RepClientesCxC.rpt b/Empresas/137/Formatos/RepClientesCxC.rpt index 132388990..e73183a2d 100644 Binary files a/Empresas/137/Formatos/RepClientesCxC.rpt and b/Empresas/137/Formatos/RepClientesCxC.rpt differ diff --git a/Empresas/72/Formatos/RepClientesCxC.rpt b/Empresas/72/Formatos/RepClientesCxC.rpt index 3328a6999..7138b6374 100644 Binary files a/Empresas/72/Formatos/RepClientesCxC.rpt and b/Empresas/72/Formatos/RepClientesCxC.rpt differ diff --git a/Empresas/80/Formatos/RepClientesCxC.rpt b/Empresas/80/Formatos/RepClientesCxC.rpt index dd01f9438..627ab3e5c 100644 Binary files a/Empresas/80/Formatos/RepClientesCxC.rpt and b/Empresas/80/Formatos/RepClientesCxC.rpt differ diff --git a/Empresas/Grales/Formatos/RepClientesCxC.rpt b/Empresas/Grales/Formatos/RepClientesCxC.rpt index f7308a548..85aa597c6 100644 Binary files a/Empresas/Grales/Formatos/RepClientesCxC.rpt and b/Empresas/Grales/Formatos/RepClientesCxC.rpt differ diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index b7b555bec..9166908c9 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -1678,7 +1678,7 @@ - + diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 5dd95dd44..62a203cb7 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -3643,14 +3643,14 @@ Partial Class Clientes Dim FechaVencimientoF As String = If(TxtFechaVFCxP.Text = "", "-1", TxtFechaVFCxP.Text).ToString Dim ObjMovtos As New ClsMovimientos() - If ObjMovtos.GetCxCDetalle(FI, FF, CveCliente, -1, -1, -1, -1, -1, "-1", "-1", DdlSucursalCliente.SelectedValue.ToEntero(), "S", -1, "-1", 1, UsuarioActual.CveEmpresa, -1, 1, TipoDocto:=TipoDocto, FechaCorte:=FechaCorte, FechaVI:=FechaVencimientoI, FechaVF:=FechaVencimientoF, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then - DtCxCFact = ObjMovtos.DtResultados '.FiltraParametros("Tipo = 'Act'").Copy ' If(DdlTipoCuentasCxC.SelectedValue = "-1", ObjMovtos.DtResultados.FiltraParametros("CveVentaAmortizacion IS NULL", "TipoDocto").Copy, ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Act' AND CveVentaAmortizacion IS NULL", "TipoDocto")) + If ObjMovtos.GetCxCClienteDetalle(CveCliente, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa, DdlSucursalCliente.SelectedValue.ToEntero) Then + DtCxCFact = If(DdlTipoCuentasCxC.SelectedValue = "-1", ObjMovtos.DtResultados.FiltraParametros("", "TipoDocto").Copy, ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Act'", "TipoDocto")) 'cargo los anticipos NC DtCxCFact.Columns.Add("SaldoAnticipo", GetType(Decimal)) Dim dtt As DataTable = Nothing If ObjMovtos.GetAnticiposNCIxCCliente(CveCliente, -1, -1) Then - dtt = ObjMovtos.DtResultados.FiltraParametros("Saldo > 0 AND SaldoVentaAnticipo = 0 AND ((Tipo = 'IxC' AND CveIE > 0) OR (Tipo = 'Ant' AND CveVenta > 0) )") ' que tenga saldo de anticipo y no de cliente + dtt = If(DdlTipoCuentasCxC.SelectedValue = "-1", ObjMovtos.DtResultados.FiltraParametros("SaldoVentaAnticipo = 0 AND ((Tipo = 'IxC' AND CveIE > 0) OR (Tipo = 'Ant' AND CveVenta > 0) OR (Tipo = 'NC' AND CveVenta > 0) OR (Tipo = 'Egs' AND CveVenta > 0) )"), ObjMovtos.DtResultados.FiltraParametros("Saldo > 0 AND SaldoVentaAnticipo = 0 AND ((Tipo = 'IxC' AND CveIE > 0) OR (Tipo = 'Ant' AND CveVenta > 0) OR (Tipo = 'NC' AND CveVenta > 0) OR (Tipo = 'Egs' AND CveVenta > 0) )")) ' que tenga saldo de anticipo y no de cliente If dtt IsNot Nothing AndAlso dtt.Rows.Count > 0 Then For Each drt As DataRow In dtt.Rows Dim drr As DataRow = DtCxCFact.NewRow @@ -3685,7 +3685,7 @@ Partial Class Clientes SaldoIngDolaresPesos = SaldoIngDolaresPesos + (Row("Saldo").ToString.ToDouble * Row("TipoCambio").ToString.ToDouble) End If - ElseIf (Row("TipoDocto").ToString = "Ant" And Row("Saldo").ToString.ToDouble = 0) Or Row("TipoDocto").ToString = "IxC" Or Row("TipoDocto").ToString = "Egs" Or Row("TipoDocto").ToString = "Dev" Then 'Anticipos, NC, IxC + ElseIf (Row("TipoDocto").ToString = "Ant" And Row("Saldo").ToString.ToDouble = 0) Or Row("TipoDocto").ToString = "IxC" Or Row("TipoDocto").ToString = "NC" Or Row("TipoDocto").ToString = "Dev" Then 'Anticipos, NC, IxC ContaAnt = ContaAnt + 1 If Row("CveMoneda").ToString.ToEntero = 1 Then If Row("TipoDocto").ToString = "Dev" Then