diff --git a/App_Code/ClsOS.vb b/App_Code/ClsOS.vb index 723c9861d..d6af2b03d 100644 --- a/App_Code/ClsOS.vb +++ b/App_Code/ClsOS.vb @@ -517,7 +517,8 @@ Public Class ClsOS Public Function GetRepOrdenesServicioMedicasRep(FechaI As Date, FechaF As Date, CveCliente As Integer, CveVendedor As Integer, CveEstatusOrdenServicio As Integer, CveUsuarioAtendio As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, - Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional CveEspecialidad As Integer = -1, Optional CveClienteSucursal As Integer = -1, Optional CveUsuario As Integer = -1) As Boolean + Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional CveEspecialidad As Integer = -1, Optional CveClienteSucursal As Integer = -1, Optional CveUsuario As Integer = -1, + Optional CveTipoVenta As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_OS_OrdenesServiciosMedicasRepGet") @@ -537,7 +538,7 @@ Public Class ClsOS .Add("@CveEspecialidad", SqlDbType.Int).Value = CveEspecialidad .Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario - + .Add("@CveTipoVenta", SqlDbType.Int).Value = CveTipoVenta End With Try diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index c57311bfb..01c926212 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -5426,12 +5426,12 @@ Public Class ClsPaginas bytes = bytes Response.Buffer = True Response.Clear() + Response.ClearHeaders() If Formato = "PDF" Then Response.ContentType = "application/pdf" Else Response.ContentType = mimeType End If - Response.ClearHeaders() Dim fileExtension As String = "" If Not String.IsNullOrEmpty(Extension) Then fileExtension = Extension @@ -10650,6 +10650,7 @@ Public Class ClsPaginas PaginaDict.Add("/Ventas/RepCostoPromedioVenta.aspx".ToUpper(), 532) PaginaDict.Add("/Ventas/RepVentasNetasResumen.aspx".ToUpper(), 533) PaginaDict.Add("/Ventas/RepTopVentas.aspx".ToUpper(), -1) + PaginaDict.Add("/Ventas/RepPedidosSTF.aspx".ToUpper(), 344) PaginaDict.Add("/Ventas/RepSolicitudesCancelacion.aspx".ToUpper(), -1) PaginaDict.Add("/Ventas/RepCanceladasPendientes.aspx".ToUpper(), -1) PaginaDict.Add("/Ventas/RepCancelacionesPorAtender.aspx".ToUpper(), 750) diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index e4219e313..23f442f65 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -1734,6 +1734,26 @@ Public Class ClsVentas Return Retorno End Function + + Public Function GetRepPedidosSTF(CveSubProyecto As Integer, CveVendedor As Integer, CveEmpresa As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Vta_PedidosSTFRep") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener los datos del reporte.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function Public Function GetRepTopCompras(GPO As Integer, CveEmpresa As Integer, TipoCambio As Integer, TipoCambioEspecifico As Decimal, CveUsuarioConsulta As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Comp_GetTopRepPS") diff --git a/Bancos/DepositosCaja.aspx b/Bancos/DepositosCaja.aspx index b24b9059c..1b258fe1f 100644 --- a/Bancos/DepositosCaja.aspx +++ b/Bancos/DepositosCaja.aspx @@ -330,7 +330,7 @@
-
+
diff --git a/Bancos/DepositosCaja.aspx.vb b/Bancos/DepositosCaja.aspx.vb index 9fafa1375..f5244df41 100644 --- a/Bancos/DepositosCaja.aspx.vb +++ b/Bancos/DepositosCaja.aspx.vb @@ -194,8 +194,8 @@ Partial Class Bancos_DepositosCaja TotalImporte = TotalImporte + Comision 'Comision = -(Comision) ' se inverte el valor, va cargada 'Descuento = -(Descuento) ' se inverte el valor, va cargada - If DdlSubProyectoDeposito.SelectedValue.ToEntero = -1 Or DdlClasificacion.SelectedValue.ToEntero = -1 Then - Alert("Debes Seleccionar un Subproyecto y una Clasificación", TipoMensaje.MsgAdvertencia) + If DdlSubProyectoDeposito.SelectedValue.ToEntero = -1 Then + Alert("Debes Seleccionar un Subproyecto ", TipoMensaje.MsgAdvertencia) Exit Sub End If End If @@ -344,7 +344,7 @@ Partial Class Bancos_DepositosCaja CveSubProyectoComision = DdlSubProyectoDeposito.SelectedValue.ToEntero CveClasificacionComision = DdlClasificacion.SelectedValue.ToEntero If Comision <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Comision, Comision * TipoCambio, 78, DdlClasificacion.SelectedItem.Text, DdlClasificacion.SelectedItem.Text, CveClasificacion:=CveClasificacionComision, CveSubProyecto:=CveSubProyectoComision) Then + If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Comision, Comision * TipoCambio, 78, "Depósito Bancario", "Depósito Bancario", CveClasificacion:=CveClasificacionComision, CveSubProyecto:=CveSubProyectoComision) Then OcurrioError = True End If End If diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index d945f314e..6b13d5b35 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -17096,7 +17096,7 @@ Partial Class Compras_Compras Dim Total As Decimal = (TxtCantidad.Text.ToDecimal * TxtPrecio.Text.ToDecimal) - TxtDescuentoModal.Text.ToDecimal - 'If UsuarioActual.Empresa.Funcionalidad(532) = "1" Then + 'If UsuarioActual.Empresa.Funcionalidad(532).Contiene( "1","2") Then ' Dim ObjCon As New ClsContratos ' Dim CvePresupuesto As Integer = 0 ' Dim Autorizado As Double = 0 @@ -20760,7 +20760,7 @@ Partial Class Compras_Compras Dim respuesta As Boolean = False - If UsuarioActual.Empresa.Funcionalidad(532) = "1" Then + If UsuarioActual.Empresa.Funcionalidad(532).Contiene("1", "2") Then If Opcion = 1 Or OCVinculada Or DdlTipoComprobante.SelectedValue <> "Fac" Then Return True diff --git a/Contabilidad/RegPrePoliza.aspx b/Contabilidad/RegPrePoliza.aspx index 82c77e45a..49a629720 100644 --- a/Contabilidad/RegPrePoliza.aspx +++ b/Contabilidad/RegPrePoliza.aspx @@ -717,6 +717,7 @@ +
diff --git a/Contabilidad/RegPrePoliza.aspx.vb b/Contabilidad/RegPrePoliza.aspx.vb index 9d910f0eb..9ac8ad949 100644 --- a/Contabilidad/RegPrePoliza.aspx.vb +++ b/Contabilidad/RegPrePoliza.aspx.vb @@ -468,7 +468,7 @@ Partial Class ContabilidadC_RegPrePoliza End If ObjContabilidad.GetContabilizacionDiarioDetalle(CvePrePoliza, UsuarioActual.CveEmpresa) - DtMovimientos = ObjContabilidad.DtResultados.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}") + DtMovimientos = ObjContabilidad.DtResultados If dr("Modulo").ToString.Contiene("Banc/FluctuaA", "Banc/FluctuaC", "Banc/FluctuaV", "Banc/FluctuaFilial", "Banc/FluctuaAD") Then BtnEliminar.Enabled = False @@ -573,7 +573,7 @@ Partial Class ContabilidadC_RegPrePoliza Dim CveConceptoContable As Integer = e.Row.DataKey("CveConceptoContable").ToEntero - If CveConceptoContable.Contiene(1, 2, 12, 91, 13, 38, 207, 203, 39, 61, 62, 63, 4, 278, 291, 292, 293, 294, 272, 150, 251, 301) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Ventas/Ventas.aspx?CveVenta={0}", e.Row.DataKey("CveVenta")) + If CveConceptoContable.Contiene(1, 2, 12, 91, 13, 38, 207, 203, 39, 61, 62, 63, 4, 278, 291, 292, 293, 294, 272, 150, 251, 301, 3, 11) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Ventas/Ventas.aspx?CveVenta={0}", e.Row.DataKey("CveVenta")) If CveConceptoContable.Contiene(5, 6, 17, 18, 14, 19, 25, 26, 60, 205, 225, 234, 235, 240, 305, 306, 307, 308, 309, 310, 311, 312, 201, 206, 323, 324, 341, 342, 343, 344, 304, 272, 259, 287, 288, 370, 371, 372, 373) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Compras/Compras.aspx?CveCompra={0}", e.Row.DataKey("CveCompra")) If CveConceptoContable.Contiene(68) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}", e.Row.DBCampo("CveMovimientoAlmacen")) If CveConceptoContable.Contiene(30, 204, 66, 92, 202, 10, 21, 48, 56, 338, 339, 340, 345, 346, 347) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Bancos/IE.aspx?CveIE={0}", e.Row.DBCampo("CveIE")) @@ -1309,7 +1309,7 @@ Partial Class ContabilidadC_RegPrePoliza TxtME.Text = GvPrePoliza.Rows(IndiceGrid).DataKey("ImporteME").ToDecimal.FormatoNumero DdlPorcentajeIVAE.SelectedValueExist(PorcentajeImpuesto) - + HdnCveCompra.Value = CveCompra.ToString DdlProveedoresE.SelectedValueExist(CveProveedor) DdlProveedoresE_SelectedIndexChanged(DdlProveedoresE, e) DdlComprasE.SelectedValueExist(CveCompra) @@ -1551,13 +1551,13 @@ Partial Class ContabilidadC_RegPrePoliza DdlProveedoresE.DataBind() DdlProveedoresE.Items.Insert(0, New ListItem(" - ", "-1")) End Sub - Private Sub CargaComprasE(CveProveedor As Integer) + Private Sub CargaComprasE(CveProveedor As Integer, Optional tCveCompra As Integer = -1) If DdlConceptosContablesE.SelectedValue.ToEntero.Contiene(5, 17, 305, 308, 310, 311, 312) Then Dim ObjCompras As New ClsCompras DdlComprasE.ClearSelection() - If ObjCompras.GetCompras(-1, "-1", "-1", CveProveedor, -1, UsuarioActual.CveEmpresa) Then - DdlComprasE.DataSource = ObjCompras.DtResultados.FiltraParametros("Saldo > 0") + If ObjCompras.GetCompras(tCveCompra, "-1", "-1", CveProveedor, -1, UsuarioActual.CveEmpresa) Then + DdlComprasE.DataSource = ObjCompras.DtResultados.FiltraParametros($"Saldo > 0 OR CveCompra = {tCveCompra}") DdlComprasE.DataBind() DdlComprasE.Items.Insert(0, New ListItem(" - ", "-1")) Else @@ -1618,7 +1618,7 @@ Partial Class ContabilidadC_RegPrePoliza DdlClasificacionesE.Items.Insert(0, New ListItem(" - ", "-1")) End Sub Private Sub DdlProveedoresE_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProveedoresE.SelectedIndexChanged - CargaComprasE(DdlProveedoresE.SelectedValue.ToEntero) + CargaComprasE(DdlProveedoresE.SelectedValue.ToEntero, HdnCveCompra.Value.ToEntero) End Sub Private Sub DdlClientesE_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlClientesE.selectedindexchange diff --git a/Contabilidad/RegPrePolizaS.aspx b/Contabilidad/RegPrePolizaS.aspx index f07c5a356..b10065036 100644 --- a/Contabilidad/RegPrePolizaS.aspx +++ b/Contabilidad/RegPrePolizaS.aspx @@ -717,6 +717,7 @@ + diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb index 06d12c20c..b3d2be37d 100644 --- a/Contabilidad/RegPrePolizaS.aspx.vb +++ b/Contabilidad/RegPrePolizaS.aspx.vb @@ -1309,7 +1309,7 @@ Partial Class ContabilidadC_RegPrePolizaS TxtME.Text = GvPrePoliza.Rows(IndiceGrid).DataKey("ImporteME").ToDecimal.FormatoNumero DdlPorcentajeIVAE.SelectedValueExist(PorcentajeImpuesto) - + HdnCveCompra.Value = CveCompra.ToString DdlProveedoresE.SelectedValueExist(CveProveedor) DdlProveedoresE_SelectedIndexChanged(DdlProveedoresE, e) DdlComprasE.SelectedValueExist(CveCompra) @@ -1551,13 +1551,13 @@ Partial Class ContabilidadC_RegPrePolizaS DdlProveedoresE.DataBind() DdlProveedoresE.Items.Insert(0, New ListItem(" - ", "-1")) End Sub - Private Sub CargaComprasE(CveProveedor As Integer) + Private Sub CargaComprasE(CveProveedor As Integer, Optional tCveCompra As Integer = -1) If DdlConceptosContablesE.SelectedValue.ToEntero.Contiene(5, 17, 305, 308, 310, 311, 312) Then Dim ObjCompras As New ClsCompras DdlComprasE.ClearSelection() - If ObjCompras.GetCompras(-1, "-1", "-1", CveProveedor, -1, UsuarioActual.CveEmpresa) Then - DdlComprasE.DataSource = ObjCompras.DtResultados.FiltraParametros("Saldo > 0") + If ObjCompras.GetCompras(tCveCompra, "-1", "-1", CveProveedor, -1, UsuarioActual.CveEmpresa) Then + DdlComprasE.DataSource = ObjCompras.DtResultados.FiltraParametros($"Saldo > 0 OR CveCompra = {tCveCompra}") DdlComprasE.DataBind() DdlComprasE.Items.Insert(0, New ListItem(" - ", "-1")) Else @@ -1618,7 +1618,7 @@ Partial Class ContabilidadC_RegPrePolizaS DdlClasificacionesE.Items.Insert(0, New ListItem(" - ", "-1")) End Sub Private Sub DdlProveedoresE_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProveedoresE.SelectedIndexChanged - CargaComprasE(DdlProveedoresE.SelectedValue.ToEntero) + CargaComprasE(DdlProveedoresE.SelectedValue.ToEntero, HdnCveCompra.Value.ToEntero) End Sub Private Sub DdlClientesE_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlClientesE.selectedindexchange diff --git a/Contratos/RepPresupuestos.aspx.vb b/Contratos/RepPresupuestos.aspx.vb index 7995872cd..88b7becb7 100644 --- a/Contratos/RepPresupuestos.aspx.vb +++ b/Contratos/RepPresupuestos.aspx.vb @@ -602,11 +602,21 @@ Partial Class Contratos_RepPresupuestos params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("AgrupadoPor", $"{FechaIn}{FechaFn}{Agrupador}{Proyecto}{SubProyecto}{Clasificacion}{TipoGasto}")) - params.Add(New ReportParameter("Autorizado", LtlAutorizado.Text.FormatoNumero())) - params.Add(New ReportParameter("Ejercido", LtlEjercido.Text.FormatoNumero())) + params.Add(New ReportParameter("Autorizado", LtlAutorizado.Text.FormatoNumero())) + params.Add(New ReportParameter("PorEjercer", LtlPorEjercer.Text.FormatoNumero())) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) + If UsuarioActual.Empresa.Funcionalidad(532) = "2" Then + Dim DrPresupuesto = DtPresupuestos.FiltroPrimero("Tipo = 0 AND CveAgrupador IS NULL") + Dim Comprometido = DrPresupuesto("Comprometido").ToString.ToDecimal + params.Add(New ReportParameter("Ejercido", Comprometido.ToString.FormatoNumero())) + Else + params.Add(New ReportParameter("Ejercido", LtlEjercido.Text.FormatoNumero())) + End If + + + params.Add(New ReportParameter("PresupuestoRestrictivo", UsuarioActual.Empresa.Funcionalidad(532))) diff --git a/CxC/RepCxC.aspx b/CxC/RepCxC.aspx index 0a1eda4a2..0f85fe6d6 100644 --- a/CxC/RepCxC.aspx +++ b/CxC/RepCxC.aspx @@ -756,7 +756,7 @@ - + diff --git a/CxC/RepCxCDetalle.aspx b/CxC/RepCxCDetalle.aspx index 9766d26fa..edd5d9a5a 100644 --- a/CxC/RepCxCDetalle.aspx +++ b/CxC/RepCxCDetalle.aspx @@ -537,6 +537,8 @@ + + @@ -675,7 +677,8 @@ - + + @@ -684,8 +687,9 @@ - - + + + diff --git a/CxC/RepCxCDetalle.aspx.vb b/CxC/RepCxCDetalle.aspx.vb index 1b4eb4a43..83473516c 100644 --- a/CxC/RepCxCDetalle.aspx.vb +++ b/CxC/RepCxCDetalle.aspx.vb @@ -627,13 +627,15 @@ Partial Class RepCxCDetalle ActivaColumna(44, ChkFechaEjecucion.Checked) ActivaColumna(45, ChkMostrarLineaAdicional.Checked) ActivaColumna(46, ChkMostrarDescripcionVenta.Checked) - ActivaColumna(47, ChkContrato.Checked) - ActivaColumna(48, ChkSubTotalPend.Checked) - ActivaColumna(49, ChkIVAPend.Checked) - ActivaColumna(50, ChkIEPSPend.Checked) - ActivaColumna(51, ChkEnQuebranto.Checked) - ActivaColumna(52, ChkEnDemanda.Checked) - ActivaColumna(53, ChkRegistroFirmas.Checked) + ActivaColumna(47, ChkMetodoPago.Checked) + ActivaColumna(48, ChkFormaPago.Checked) + ActivaColumna(49, ChkContrato.Checked) + ActivaColumna(50, ChkSubTotalPend.Checked) + ActivaColumna(51, ChkIVAPend.Checked) + ActivaColumna(52, ChkIEPSPend.Checked) + ActivaColumna(53, ChkEnQuebranto.Checked) + ActivaColumna(54, ChkEnDemanda.Checked) + ActivaColumna(55, ChkRegistroFirmas.Checked) If SePersonalizo = 1 Then ImgExcelPersonalizado.Visible = True @@ -641,18 +643,15 @@ Partial Class RepCxCDetalle ImgExcelPersonalizado.Visible = False End If - CargaDatos() RegistraScript("$('#DivPersonalizar').modal('hide');") End Sub Private Sub ActivaColumna(Indice As Integer, Activo As Boolean) - If Activo Then - GvDatos.Columns(Indice).Visible = True + If GvDatos.Columns(Indice).Visible <> Activo Then + GvDatos.Columns(Indice).Visible = Activo SePersonalizo = 1 - 'Else - ' SePersonalizo = 0 End If End Sub diff --git a/Empresas/Grales/Formatos/RepPresupuestoAnual.rdlc b/Empresas/Grales/Formatos/RepPresupuestoAnual.rdlc index 446a7587f..210c0ed97 100644 --- a/Empresas/Grales/Formatos/RepPresupuestoAnual.rdlc +++ b/Empresas/Grales/Formatos/RepPresupuestoAnual.rdlc @@ -25,6 +25,10 @@ Autorizado System.Double + + Comprometido + System.Double + Ejercido System.Double @@ -245,7 +249,7 @@ - = IIF( Parameters!PresupuestoRestrictivo.Value = "2", IIF(CDec(Fields!Autorizado.Value)=0,"-",Fields!Autorizado.Value),IIF(CDec(Fields!Ejercido.Value)=0,"-",Fields!Ejercido.Value)) + = IIF( Parameters!PresupuestoRestrictivo.Value = "2", iif(CDec(Fields!Comprometido.Value)=0,"-",Fields!Comprometido.Value), iif(CDec(Fields!Ejercido.Value)=0,"-",Fields!Ejercido.Value)) + + + Reporte + + +<%--
  • + Generar PDF +
  • +
  • + Generar Excel +
  • --%> +
  • + Ver Dlls en pesos +
  • +<%-- + +
  • + Ver Grafica +
  • +
    +
    --%> +
    + + + + + +
    + <%-- --%> +
    +
    +
    +
    + + + +
    +
    +
    + + +
    +
    +
    + Proyecto: +
    + +
    + SubProyecto: +
    + + <%-- + + --%> +
    + + +
    + + <%-- + + --%> +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + diff --git a/Ventas/RepPedidosSTF.aspx.vb b/Ventas/RepPedidosSTF.aspx.vb new file mode 100644 index 000000000..0cc39de45 --- /dev/null +++ b/Ventas/RepPedidosSTF.aspx.vb @@ -0,0 +1,50 @@ +Option Explicit On +Option Strict On + +Imports Extensiones +Partial Class Ventas_RepPedidosSTF + Inherits ClsPaginas + + Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load + If Not IsPostBack Then + CargaCombos() + End If + End Sub + + Private Sub CargaCombos() + + CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto) + + 'Vendedor + DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa, VendedorTipo:=-1).FiltraParametros("VendedorTipo in (1,4)") 'vendedores y vendedores de piso + DdlVendedor.DataBind() + DdlVendedor.Items.Insert(0, New ListItem("Todos", "-1")) + DdlVendedor.Items.Insert(1, New ListItem("Sin Vendedor", "-2")) + End Sub + + Protected Sub CargaDatos() + + Dim ObjVentas As New ClsVentas + If ObjVentas.GetRepPedidosSTF(DdlSubProyecto.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then + GvDatos.DataSource = ObjVentas.DtResultados + End If + ObjVentas.Dispose() + GvDatos.DataBind() + End Sub + Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound + If e.Row.RowType = DataControlRowType.DataRow Then + Select Case e.Row.DBCampo("TipoFila") + Case "1" + e.Row.CssClass = "Totales" + Case "2" + e.Row.CssClass = "SubTotales" + Case "3" + e.Row.CssClass = "Texto" + End Select + End If + End Sub + Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) + CargaDatos() + UPDatos.Update() + End Sub +End Class diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 621243a93..80b3bd523 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -9330,6 +9330,7 @@ Partial Class Ventas e.Row.CssClass = "SubTotales" End If Else + e.Row.FCLiteral("LtlPS").Text = String.Format(" {4}", e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveAlmacen"), e.Row.DBCampo("Fecha").ToDate.AddDays(-7).ToShortDateString, e.Row.DBCampo("Fecha").ToDate.AddDays(7).ToShortDateString, e.Row.DBCampo("PS")) e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Left e.Row.FCCheckBox("cbInv").Visible = True @@ -24500,6 +24501,11 @@ Partial Class Ventas If Not DtTemporal.Columns.Contains("Serie") Then DtTemporal.Columns.Add("Serie", Type.GetType("System.String")) End If + If Not DtTemporal.Columns.Contains("CveAlmacen") Then DtTemporal.Columns.Add("CveAlmacen", GetType(Integer)) + If Not DtTemporal.Columns.Contains("Fecha") Then + Dim colNew As DataColumn = New DataColumn("Fecha", GetType(Date)) With {.DefaultValue = NowADS()} + DtTemporal.Columns.Add(colNew) + End If GvInv.Columns(4).Visible = DtTemporal.MAX("Serie", "Serie <> ''") <> "" Or CveVenta <= 0 GvInv.Columns(5).Visible = DtTemporal.MAX("Lote", "Lote <> ''") <> "" @@ -37637,16 +37643,7 @@ Partial Class Ventas Private Sub CargaDdlClientesSucursal() - Dim objcliente As New ClsClientes - - If objcliente.GetClienteSucursales(-1, UsuarioActual.CveEmpresa) Then - DdlClienteSucursal.DataSource = objcliente.DtResultados - Else - DdlClienteSucursal.DataSource = Nothing - End If - - objcliente.Dispose() - + DdlClienteSucursal.DataSource = GlobalDTClientesSucursales(UsuarioActual.CveEmpresa) DdlClienteSucursal.DataBind() DdlClienteSucursal.Items.Insert(0, New ListItem("Seleccione uno", "-1"))