diff --git a/App_Code/ClsPuntoVenta.vb b/App_Code/ClsPuntoVenta.vb index d84033315..a9c7242e5 100644 --- a/App_Code/ClsPuntoVenta.vb +++ b/App_Code/ClsPuntoVenta.vb @@ -222,7 +222,7 @@ Public Class ClsPuntoVenta Return Retorno End Function - Public Function GetCortesDetalleVentas(CveCorte As Integer, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean + Public Function GetCortesDetalleVentas(CveCorte As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Opcion As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_CortesDetalleVentasGet") @@ -230,7 +230,8 @@ Public Class ClsPuntoVenta With SqlAdapter.SelectCommand.Parameters .Add("@CveCorte", SqlDbType.Int).Value = CveCorte .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto - .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@Opcion", SqlDbType.Int).Value = Opcion End With Try diff --git a/Bancos/RepCortes.aspx b/Bancos/RepCortes.aspx index 16ad5bcc7..911a9b276 100644 --- a/Bancos/RepCortes.aspx +++ b/Bancos/RepCortes.aspx @@ -233,13 +233,22 @@ - + + + + + + + + + + diff --git a/Bancos/RepCortes.aspx.vb b/Bancos/RepCortes.aspx.vb index fd52292fd..f42884560 100644 --- a/Bancos/RepCortes.aspx.vb +++ b/Bancos/RepCortes.aspx.vb @@ -167,7 +167,7 @@ Partial Class Bancos_RepCortes GvP.DataSource = Vn.DtResultados DtCortesVentasResumen = Vn.DtResultados End If - If Vent.GetCortesDetalleVentas(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then + If Vent.GetCortesDetalleVentas(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, 2) Then GvD.DataSource = Vent.DtResultados DtCortesVentas = Vent.DtResultados divDetalle.Visible = True diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index facb2a11a..92654c20c 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -1572,8 +1572,9 @@ Partial Class PopUpVerFactura If ObjVenta.GetCortesDetalleVentasResumen(CveCorte, CveSubProyecto, UsuarioActual.CveEmpresa) Then DtCortesVentasResumen = ObjVenta.DtResultados.Copy() End If - - If ObjPuntoVenta.GetCortesDetalleVentas(CveCorte, CveSubProyecto, UsuarioActual.CveEmpresa) Then + Dim OpcionDetallado As Integer = 1 + If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then OpcionDetallado = 2 + If ObjPuntoVenta.GetCortesDetalleVentas(CveCorte, CveSubProyecto, UsuarioActual.CveEmpresa, OpcionDetallado) Then DtCortesVentas = ObjPuntoVenta.DtResultados.Copy() If DtCortesVentas.Rows.Count > 0 Then Dim RowInfo As DataRow = DtCortesVentas.FiltroPrimero("CveVenta > 0")