From 35be01025e15869b48de880cea37e77d8f01c61e Mon Sep 17 00:00:00 2001 From: rakcsle Date: Tue, 26 Jul 2022 20:52:03 -0700 Subject: [PATCH] =?UTF-8?q?Mejoras=20solictudes=20Ingresos,=20OC=20Num=20R?= =?UTF-8?q?emisi=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/ClsNominas.vb | 4 +- App_Code/ClsOC.vb | 32 +- OC/OC.aspx | 58 ++-- OC/OC.aspx.vb | 113 ++++++- SAT/SolicitudesIngresoSat.aspx | 534 +++++++++++++++--------------- SAT/SolicitudesIngresoSat.aspx.cs | 54 ++- 6 files changed, 492 insertions(+), 303 deletions(-) diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb index ebb3bb10b..5a076dc1a 100644 --- a/App_Code/ClsNominas.vb +++ b/App_Code/ClsNominas.vb @@ -3232,12 +3232,14 @@ Public Class ClsNominas End Function #Region "CRUD_SolicitudesNominas" - Public Function SolicitudesGet(CveSolicitud As Integer, CveEmpresa As Integer, Optional CveTipoSolicitud As Integer = 1) As Boolean + Public Function SolicitudesGet(CveSolicitud As Integer, CveEmpresa As Integer, Optional CveTipoSolicitud As Integer = 1, Optional Estatus As Integer = -1, Optional Top As Integer = 100000) As Boolean Dim retorno As Boolean = False DataAdapter("PA_Gral_SAT_SolicitudesGet", CommandType.StoredProcedure) addParameters("@CveSolicitud", SqlDbType.Int, CveSolicitud) addParameters("@CveEmpresa", SqlDbType.Int, CveEmpresa) addParameters("@CveTipoSolicitud", SqlDbType.Int, CveTipoSolicitud) + addParameters("@Estatus", SqlDbType.Int, Estatus) + addParameters("@Top", SqlDbType.Int, Top) retorno = RunQuery("Ocurrió un error al obtener el SolicitudesNominas.") Return retorno End Function diff --git a/App_Code/ClsOC.vb b/App_Code/ClsOC.vb index 628310288..53feb942d 100644 --- a/App_Code/ClsOC.vb +++ b/App_Code/ClsOC.vb @@ -119,6 +119,7 @@ Public Class ClsOC Public Property UsoCFDI As String Public Property Promocion As String Public Property CveProveedorContacto As Integer + Public Property NumRemision As String Public ReadOnly Property DtResultados() As DataTable Get @@ -685,6 +686,7 @@ Public Class ClsOC _UsoCFDI = dr("UsoCFDI").ToString Promocion = IfNull(dr("Promocion"), "", dr("Promocion").ToString) CveProveedorContacto = If(Not IsDBNull(dr("CveProveedorContacto")), dr("CveProveedorContacto").ToString.ToEntero, -1) + NumRemision = dr("NumRemision").ToString Retorno = True ElseIf Data.Rows.Count > 0 Then @@ -704,7 +706,7 @@ Public Class ClsOC Optional CveCliente As Integer = -1, Optional CveVendedor As Integer = -1, Optional PrioridadObservacion As String = "", Optional PorcentajeIVA As Decimal = 0.16, Optional IVA As Decimal = 0, Optional RetIVA As Decimal = 0, Optional RetISR As Decimal = 0, Optional FechaExpiracion As Date = Nothing, Optional CveCotizacion As Integer = -1, Optional FolioAdicional As String = "", Optional EntregaDirecta As Integer = -1, Optional CveDireccionEnvio As Integer = -1, Optional Guia As String = "-1", Optional IEPS As Decimal = -1, - Optional CveIEAnticipo As Integer = -1, Optional ImporteAnticipo As Decimal = 0, Optional UsoCFDI As Integer = -1, Optional Promocion As String = "-1", Optional CveProveedorContacto As Integer = -1) As Boolean + Optional CveIEAnticipo As Integer = -1, Optional ImporteAnticipo As Decimal = 0, Optional UsoCFDI As Integer = -1, Optional Promocion As String = "-1", Optional CveProveedorContacto As Integer = -1, Optional NumRemision As String = "-1") As Boolean Dim Retorno As Boolean = False DataAdapter("PA_OC_OrdenesCompraAdd") @@ -747,6 +749,7 @@ Public Class ClsOC .Add("@UsoCFDI", SqlDbType.Int).Value = UsoCFDI .Add("@Promocion", SqlDbType.VarChar).Value = Promocion .Add("@CveProveedorContacto", SqlDbType.Int).Value = CveProveedorContacto + .Add("@NumRemision", SqlDbType.VarChar).Value = NumRemision .Add("@vCveOrdenCompra", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@vFolio", SqlDbType.Int).Direction = ParameterDirection.Output @@ -910,7 +913,7 @@ Public Class ClsOC pCveProveedor As Integer, pCveOrdenCompra As Integer, pCveUsuarioModifico As Integer, Optional CveCliente As Integer = -1, Optional CveVendedor As Integer = -1, Optional PrioridadObservacion As String = "", Optional IVA As Decimal = 0, Optional RetIVA As Decimal = 0, Optional RetISR As Decimal = 0, Optional IDPoliza As Integer = -1, Optional FechaExpiracion As Date = Nothing, Optional FolioAdicional As String = "", Optional EntregaDirecta As Integer = -1, Optional CveDireccionEnvio As Integer = -1, Optional Guia As String = "-1", Optional IEPS As Decimal = -1, Optional UsoCFDI As Integer = -1, Optional Promocion As String = "-1", - Optional pCveProveedorSucursal As Integer = -1, Optional CveProveedorContacto As Integer = -1, Optional PorcentajeIVA As Decimal = 0.16) As Boolean + Optional pCveProveedorSucursal As Integer = -1, Optional CveProveedorContacto As Integer = -1, Optional PorcentajeIVA As Decimal = 0.16, Optional NumRemision As String = "-1") As Boolean Dim Retorno As Boolean = False DataAdapter("PA_OC_OrdenesCompraUpdate") @@ -944,6 +947,7 @@ Public Class ClsOC .Add("@CveProveedorSucursal", SqlDbType.Int).Value = pCveProveedorSucursal .Add("@CveProveedorContacto", SqlDbType.Int).Value = CveProveedorContacto .Add("@PorcentajeIVA", SqlDbType.SmallMoney).Value = PorcentajeIVA + .Add("@NumRemision", SqlDbType.VarChar).Value = NumRemision End With Try @@ -2506,6 +2510,30 @@ Public Class ClsOC Return Retorno End Function + + Public Function GetVerificaNumRemision(CveProveedor As Integer, Tipo As String, NumRemision As String, CveEmpresa As Integer, CveOrdenCompraValida As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_OC_OCVerificaNumRemisionGet") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor + .Add("@Tipo", SqlDbType.VarChar).Value = Tipo + .Add("@NumRemision", SqlDbType.VarChar).Value = NumRemision + .Add("@CveOrdenCompraValida", SqlDbType.Int).Value = CveOrdenCompraValida + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al consultar las remiciones", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function + + #Region " IDisposable Support " ' IDisposable Protected Overridable Sub Dispose(ByVal disposing As Boolean) diff --git a/OC/OC.aspx b/OC/OC.aspx index b2e5651aa..fdf713b49 100644 --- a/OC/OC.aspx +++ b/OC/OC.aspx @@ -325,20 +325,34 @@ - - -
- -
+ + + +
+ + +
+ + 8% 16% 0% -
-
- - + + +
+ +
Número Remisión
+
+ +
+ +
+ + + <%--linea 7--%>
<%----%> @@ -2767,7 +2781,7 @@ - + @@ -3215,20 +3229,20 @@ function ValidateCant(variable) { - - var txt = $(variable); - var max = txt.data('cantidad'); - var value = parseInt(txt.val()); + + var txt = $(variable); + var max = txt.data('cantidad'); + var value = parseInt(txt.val()); if (value > max) { txt.val(max); - } + } if (value < 0) { txt.val(0); - } - - var importe = $('.txtimporte[data-cve="' + txt.data('cve') + '"]'); - importe.val(parseFloat(txt.val()) * parseFloat(txt.data('pu'))); - + } + + var importe = $('.txtimporte[data-cve="' + txt.data('cve') + '"]'); + importe.val(parseFloat(txt.val()) * parseFloat(txt.data('pu'))); + } @@ -3244,6 +3258,10 @@ } } + + function ValidaNumRemision() { + $('#BtnValidaNumRemision').click(); + } diff --git a/OC/OC.aspx.vb b/OC/OC.aspx.vb index 5097f2a22..83b727175 100644 --- a/OC/OC.aspx.vb +++ b/OC/OC.aspx.vb @@ -822,12 +822,16 @@ Partial Class OC If UsuarioActual.Empresa.Funcionalidad(590).ToString.ToEntero = 1 Then + DVCultivosCuadro.Visible = True DdlSubProyecto.AutoPostBack = True DdlCultivosCuadro.DataSource = GlobalDTCultivosCuadro(UsuarioActual.CveEmpresa).FiltraParametros($"CveSubProyecto = {DdlSubProyecto.SelectedValue} AND Estatus =1") DdlCultivosCuadro.DataBind() DdlCultivosCuadro.Items.Insert(0, New ListItem("Seleccione uno", "-1")) + DvNumRemision1.Visible = True + DvNumRemision2.Visible = True + End If 'SOLO SE MUESTRA CUANDO ES REGISTRO NUEVO @@ -1409,6 +1413,8 @@ Partial Class OC LblCodigo.Text = objOC.Codigo TxtFolioAdicional.Text = objOC.FolioAdicional + TxtNumRemision.Text = objOC.NumRemision + If Not IsNothing(objOC.Tipo) Then Select Case objOC.Tipo.ToUpper @@ -1750,6 +1756,10 @@ Partial Class OC UpAcciones.Update() End If + + + + uppEstatus.Update() UPPEmp.Update() @@ -2529,6 +2539,9 @@ Partial Class OC 'VALIDACIONES PARA GUARDAR If ValidaGuardar() Then Exit Sub + + + Dim MsgError As String = "Hubo un error al registrar" 'VARIABLES Dim CveProveedorSucursal As Integer = -1 @@ -2590,12 +2603,18 @@ Partial Class OC Dim CveOrdenCompraPadre As Integer = -1 If GeneraReq Then + + If Not ValidaNumRemision(TxtNumRemision.Text.Trim(), "REQ", CveProveedor, OC.IniciaTransacSQL) Then + TieneError = True + End If + + If Not TieneError Then ' AGREGAR REQUISICION If OC.AddOrdenCompra("REQ", -1, TxtDescrip.Text, TxtJustificacion.Text, DdlPrioridad.SelectedValue.ToEntero, TxtFecha.Text.ToDate, DdlMoneda.SelectedValue.ToEntero, CboE.SelectedValue.ToEntero, If(TxtFechaEstimadaEntrega.Text.Trim = "", "-1", TxtFechaEstimadaEntrega.Text.Trim), LugarEntrega, UsuarioActual.CveUsuario, CveEmpresaActual, GvD.Rows(0).FCHiddenField("HdnCvePresupuestoEgreso").Value.ToString.ToEntero, pCveProveedor:=CveProveedor, pCveProveedorSucursal:=CveProveedorSucursal, RequiereCotizacion:=ChkCotizacion.Checked, CveCliente:=Ddlcliente.txtValue.Value.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, PrioridadObservacion:=txtobsprioridad.Text, PorcentajeIVA:=Math.Round(DdlIVA.SelectedValue.ToDecimal - 1, 2), IVA:=IVA, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, CveCotizacion:=CveCotizacion, FolioAdicional:=TxtFolioAdicional.Text, EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1), Guia:=TxtGuia.Text.Trim, - IEPS:=TxtIEPS.Text.ToDecimal, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero, Promocion:=Promocion, CveProveedorContacto:=CveProveedorContacto) Then + IEPS:=TxtIEPS.Text.ToDecimal, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero, Promocion:=Promocion, CveProveedorContacto:=CveProveedorContacto, NumRemision:=TxtNumRemision.Text.Trim()) Then CveOrdenCompraPadre = OC.CveOrdenCompra If CveOrdenCompraPadre > 0 Then @@ -2622,15 +2641,21 @@ Partial Class OC End If End If + + If Not ValidaNumRemision(TxtNumRemision.Text.Trim(), If(TipoOS, "OS", TipoOC), CveProveedor, OC.IniciaTransacSQL) Then + TieneError = True + End If + If Not TieneError Then ' AGREGAR ORDEN DE COMPRA + If OC.AddOrdenCompra(If(TipoOS, "OS", TipoOC), -1, TxtDescrip.Text, TxtJustificacion.Text, DdlPrioridad.SelectedValue.ToEntero, TxtFecha.Text.ToDate, DdlMoneda.SelectedValue.ToEntero, CveEstatusNuevo, If(TxtFechaEstimadaEntrega.Text.Trim = "", "-1", TxtFechaEstimadaEntrega.Text.Trim), LugarEntrega, UsuarioActual.CveUsuario, CveEmpresaActual, GvD.Rows(0).FCHiddenField("HdnCvePresupuestoEgreso").Value.ToString.ToEntero, pCveProveedor:=CveProveedor, pCveProveedorSucursal:=CveProveedorSucursal, RequiereCotizacion:=ChkCotizacion.Checked, CveUsuarioAsignado:=DdlUsuariosAsignado.SelectedValue.ToEntero, CveCliente:=Ddlcliente.txtValue.Value.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, PrioridadObservacion:=txtobsprioridad.Text, PorcentajeIVA:=Math.Round(DdlIVA.SelectedValue.ToDecimal - 1, 2), IVA:=IVA, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, CveCotizacion:=CveCotizacion, FolioAdicional:=TxtFolioAdicional.Text, EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1), Guia:=TxtGuia.Text.Trim, IEPS:=TxtIEPS.Text.ToDecimal, CveIEAnticipo:=CveIEAnticipo, ImporteAnticipo:=ImporteAnticipos, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero, - Promocion:=Promocion, CveProveedorContacto:=CveProveedorContacto) Then + Promocion:=Promocion, CveProveedorContacto:=CveProveedorContacto, NumRemision:=TxtNumRemision.Text) Then CveOrdenCompra = OC.CveOrdenCompra CveEstatus = CboE.SelectedValue.ToEntero @@ -2790,11 +2815,17 @@ Partial Class OC Proveedor = DdlProveedores.SelectedText.ToString End If + + If Not ValidaNumRemision(TxtNumRemision.Text.Trim(), TipoOC, CveProveedor, OC.IniciaTransacSQL, CveOrdenCompra) Then + TieneError = True + End If + + If OC.UpdateOrdenCompra(-1, TxtDescrip.Text, TxtJustificacion.Text, DdlPrioridad.SelectedValue.ToEntero, ChkCotizacion.Checked, If(TxtFechaEstimadaEntrega.Text.Trim = "", "-1", TxtFechaEstimadaEntrega.Text.Trim), LugarEntrega, DdlMoneda.SelectedValue.ToEntero, CveProveedor, CveOrdenCompra, UsuarioActual.CveUsuario, Ddlcliente.txtValue.Value.ToEntero, DdlVendedor.SelectedValue.ToEntero, txtobsprioridad.Text, IVA:=IVA, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, FolioAdicional:=TxtFolioAdicional.Text, EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1), Guia:=TxtGuia.Text.Trim, IEPS:=TxtIEPS.Text.ToDecimal, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero, Promocion:=Promocion, pCveProveedorSucursal:=DdlProveedorSucursal.SelectedValue.ToEntero, CveProveedorContacto:=CveProveedorContacto, - PorcentajeIVA:=Math.Round(DdlIVA.SelectedValue.ToDecimal - 1, 2)) Then + PorcentajeIVA:=Math.Round(DdlIVA.SelectedValue.ToDecimal - 1, 2), NumRemision:=TxtNumRemision.Text) Then If CveProveedorOriginal <> CveProveedor Then If Not ObjConta.UpdateProveedorPoliza(CveOrdenCompra, CveProveedor, Proveedor) Then TieneError = True @@ -3263,11 +3294,17 @@ Partial Class OC RetIVA = TxtRetIVA.Text.ToDecimal RetISR = TxtRetISR.Text.ToDecimal - If objOrdenCompra.AddOrdenCompra("OC", -1, TxtDescrip.Text, TxtJustificacion.Text, DdlPrioridad.SelectedValue.ToEntero, TxtFecha.Text.ToDate, DdlMoneda.SelectedValue.ToEntero, CveEstatusInicialOC, TxtFechaEstimadaEntrega.Text, LugarEntrega, + If Not ValidaNumRemision(TxtNumRemision.Text.Trim(), "OC", CveProveedor, objOrdenCompra.IniciaTransacSQL) Then + HuboError = True + End If + + + + If (Not HuboError) AndAlso objOrdenCompra.AddOrdenCompra("OC", -1, TxtDescrip.Text, TxtJustificacion.Text, DdlPrioridad.SelectedValue.ToEntero, TxtFecha.Text.ToDate, DdlMoneda.SelectedValue.ToEntero, CveEstatusInicialOC, TxtFechaEstimadaEntrega.Text, LugarEntrega, CveUsuario, CveEmpresaActual, 0, pCveProveedor:=CveProveedor, CveCliente:=Ddlcliente.txtValue.Value.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, PrioridadObservacion:=txtobsprioridad.Text, PorcentajeIVA:=PorIVA, IVA:=IVACot, RetIVA:=RetIVA.ToString.ToDecimal, RetISR:=RetISR.ToString.ToDecimal, IDPoliza:=IdPoliza, CveCotizacion:=CveCotizacion, FolioAdicional:=TxtFolioAdicional.Text, EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1), IEPS:=TxtIEPS.Text.ToDecimal, - CveIEAnticipo:=CveIEAnticipo, ImporteAnticipo:=ImporteAnticipos, Promocion:=Promocion, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero) Then + CveIEAnticipo:=CveIEAnticipo, ImporteAnticipo:=ImporteAnticipos, Promocion:=Promocion, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero, NumRemision:=TxtNumRemision.Text.Trim) Then 'CREA POLIZA POR CADA PROVEEDOR @@ -3331,11 +3368,19 @@ Partial Class OC Else - If objOrdenCompra.AddOrdenCompra("OC", -1, TxtDescrip.Text, TxtJustificacion.Text, DdlPrioridad.SelectedValue.ToEntero, TxtFecha.Text.ToDate, DdlMoneda.SelectedValue.ToEntero, CveEstatusInicialOC, TxtFechaEstimadaEntrega.Text, LugarEntrega, + + + If Not ValidaNumRemision(TxtNumRemision.Text.Trim(), "OC", DdlProveedores.SelectedValue.ToEntero, objOrdenCompra.IniciaTransacSQL) Then + HuboError = True + End If + + + + If (Not HuboError) AndAlso objOrdenCompra.AddOrdenCompra("OC", -1, TxtDescrip.Text, TxtJustificacion.Text, DdlPrioridad.SelectedValue.ToEntero, TxtFecha.Text.ToDate, DdlMoneda.SelectedValue.ToEntero, CveEstatusInicialOC, TxtFechaEstimadaEntrega.Text, LugarEntrega, CveUsuario, CveEmpresaActual, 0, pCveProveedor:=DdlProveedores.SelectedValue.ToEntero, pCveProveedorSucursal:=DdlProveedorSucursal.SelectedValue.ToEntero, CveUsuarioAsignado:=DdlUsuariosAsignado.SelectedValue.ToEntero(), CveCliente:=Ddlcliente.txtValue.Value.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, PrioridadObservacion:=txtobsprioridad.Text, PorcentajeIVA:=Math.Round(DdlIVA.SelectedValue.ToDecimal - 1, 2), IVA:=IVA, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, IDPoliza:=IDPolizaPresupuestal, CveCotizacion:=CveCotizacion, FolioAdicional:=TxtFolioAdicional.Text, EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1), IEPS:=TxtIEPS.Text.ToDecimal, CveIEAnticipo:=CveIEAnticipo, ImporteAnticipo:=ImporteAnticipos, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero, - Promocion:=Promocion) Then + Promocion:=Promocion, NumRemision:=TxtNumRemision.Text.Trim) Then 'USA AC @@ -8677,4 +8722,58 @@ Partial Class OC Return Retorno End Function + + + + Private Function ValidaNumRemision(NumRemision As String, TipoOC As String, CveProveedor As Integer, Optional OcTranasaccion As System.Data.SqlClient.SqlTransaction = Nothing, Optional CveOrdenCompraValida As Integer = -1) As Boolean + Dim NumRemisionValida As Boolean = False + + + + If NumRemision.Trim.Length > 0 Then + If UsuarioActual.Empresa.Funcionalidad(590).ToString.ToEntero = 1 Then + + Dim ObjOC As ClsOC + + If OcTranasaccion IsNot Nothing Then + ObjOC = New ClsOC(OcTranasaccion) + Else + ObjOC = New ClsOC + End If + + + If ObjOC.GetVerificaNumRemision(CveProveedor, TipoOC, NumRemision, UsuarioActual.CveEmpresa, CveOrdenCompraValida) Then + + If ObjOC.DtResultados.Rows.Count > 0 Then + Alert($"La remision ya se encuentra asiganada a la { If(TipoOC = "OC", "Orden de compra", "Requisición")} {ObjOC.DtResultados.Rows(0)("Folio").ToString() }", TipoMensaje.MsgAdvertencia) + Else + NumRemisionValida = True + End If + + End If + + + + Else + NumRemisionValida = True + End If + Else + NumRemisionValida = True + End If + + + + + + Return NumRemisionValida + + End Function + + Protected Sub BtnValidaNumRemision_Click(sender As Object, e As EventArgs) + + ValidaNumRemision(TxtNumRemision.Text.Trim(), TipoOC, DdlProveedores.SelectedValue.ToEntero, Nothing, If(CveOrdenCompra > 0, CveOrdenCompra, -1)) + + End Sub + + End Class diff --git a/SAT/SolicitudesIngresoSat.aspx b/SAT/SolicitudesIngresoSat.aspx index f7319dad0..857960652 100644 --- a/SAT/SolicitudesIngresoSat.aspx +++ b/SAT/SolicitudesIngresoSat.aspx @@ -292,177 +292,193 @@ - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - -
-
- - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- +
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
- +
+ + +
+
+ + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ @@ -497,54 +513,54 @@ - +
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + +
@@ -566,55 +582,57 @@ -
+ + +
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/SAT/SolicitudesIngresoSat.aspx.cs b/SAT/SolicitudesIngresoSat.aspx.cs index 13f65f1b5..1a78ec64e 100644 --- a/SAT/SolicitudesIngresoSat.aspx.cs +++ b/SAT/SolicitudesIngresoSat.aspx.cs @@ -137,18 +137,34 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas { - GvResumen.DataSource = null; - GvDatos.DataSource = null; + //GvResumen.DataSource = null; + //GvDatos.DataSource = null; + + DvDatos1.Visible = false; + DvDatos2.Visible = false; + + DVResumen1.Visible = false; + DVResumen2.Visible = false; if (DdlReporte.SelectedValue.ToEntero() == 1) { - GvResumen.Visible = true; - GvDatos.Visible = false; + + DVResumen1.Visible = true; + DVResumen2.Visible = true; + + DvDatos1.Visible = false; + DvDatos2.Visible = false; + + } else { - GvResumen.Visible = false; - GvDatos.Visible = true; + + DVResumen1.Visible = false; + DVResumen2.Visible = false; + + DvDatos1.Visible = true; + DvDatos2.Visible = true; } @@ -168,6 +184,9 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas } } + + + GvResumen.DataBind(); GvDatos.DataBind(); @@ -183,21 +202,27 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas using (ClsNominas nom = new ClsNominas()) { - if (nom.SolicitudesGet(-1, UsuarioActual.CveEmpresa, CveTipoSolicitud: 3)) + if (nom.SolicitudesGet(-1, UsuarioActual.CveEmpresa, CveTipoSolicitud: 3, Estatus: 0,Top:50)) { - - GVSolicitudesPendientes.DataSource = nom.DtResultados.FiltraParametros("Estatus =0"); - GVSolicitudesPendientes.DataBind(); - - if (nom.DtResultados.FiltraParametros("Estatus =0").Rows.Count > 0) + GVSolicitudesPendientes.DataSource = nom.DtResultados; + if (nom.DtResultados.Rows.Count > 0) { LnkverificarSolicitudes.Visible = true; } + GVSolicitudesPendientes.DataBind(); + + + } - GVSolicitudesNominas.DataSource = nom.DtResultados.FiltraParametros("Estatus =1"); + if (nom.SolicitudesGet(-1, UsuarioActual.CveEmpresa, CveTipoSolicitud: 3, Estatus:1,Top:50)) + { + + GVSolicitudesNominas.DataSource = nom.DtResultados; GVSolicitudesNominas.DataBind(); } + + } UPModalViewSolicitudes.Update(); } @@ -469,8 +494,7 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas { e.Row.Font.Bold = true; e.Row.Cells[1].Text = e.Row.DataKey("CountRegistrosSIG"); - e.Row.Cells[2].Text = e.Row.DataKey("CountRegistrosSAT"); - e.Row.Cells[3].Text = e.Row.DataKey("CountRegistros"); + e.Row.Cells[2].Text = e.Row.DataKey("CountRegistrosSAT"); e.Row.Attributes.Add("class", "Totales"); }