diff --git a/AF/AF.aspx b/AF/AF.aspx index 39c56b4b3..c4357400e 100644 --- a/AF/AF.aspx +++ b/AF/AF.aspx @@ -1362,7 +1362,55 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2842,9 +2890,9 @@
Producto:
- - - + + <%-- + --%>
diff --git a/AF/AF.aspx.vb b/AF/AF.aspx.vb index 56796b4fa..ca666a371 100644 --- a/AF/AF.aspx.vb +++ b/AF/AF.aspx.vb @@ -280,8 +280,64 @@ Partial Class AF_AF End If CargaAFInv() + cargaOrdenesdeservicio() End If End Sub + Private Sub cargaOrdenesdeservicio() + Dim dt As New DataTable() + dt.Columns.Add("Folio", GetType(String)) + dt.Columns.Add("Fecha", GetType(Date)) + dt.Columns.Add("Obra", GetType(String)) + dt.Columns.Add("TipodeServicio", GetType(String)) + dt.Columns.Add("Servicio", GetType(String)) + dt.Columns.Add("Estatus", GetType(String)) + dt.Columns.Add("Duracion", GetType(String)) + dt.Columns.Add("Atendio", GetType(String)) + + Dim dr As DataRow = dt.NewRow() + dr("Folio") = "101" + dr("Fecha") = "2019/08/23" + dr("Obra") = "Ganaderos" + dr("TipodeServicio") = "Preventivo" + dr("Servicio") = "100 Hrs" + dr("Estatus") = "Terminada" + dr("Duracion") = "5 Hrs" + dr("Atendio") = "Juan perez" + dt.Rows.Add(dr) + dr = dt.NewRow() + dr("Folio") = "190" + dr("Fecha") = "2019/09/30" + dr("Obra") = "Ganaderos" + dr("TipodeServicio") = "Preventivo" + dr("Servicio") = "200 Hrs" + dr("Estatus") = "Terminada" + dr("Duracion") = "5 hrs" + dr("Atendio") = "Ernesto Lopez" + dt.Rows.Add(dr) + dr = dt.NewRow() + dr("Folio") = "501" + dr("Fecha") = "2019/11/30" + dr("Obra") = "Vildósola" + dr("TipodeServicio") = "Preventivo" + dr("Servicio") = "400 Hrs" + dr("Estatus") = "Terminada" + dr("Duracion") = "8 hrs" + dr("Atendio") = "Juan perez" + dt.Rows.Add(dr) + dr = dt.NewRow() + dr("Folio") = "505" + dr("Fecha") = "2019/12/14" + dr("Obra") = "Vildósola" + dr("TipodeServicio") = "Correctivo" + dr("Servicio") = "Rep. Mayor motor" + dr("Estatus") = "En proceso" + dr("Duracion") = "ND" + dr("Atendio") = "Juan perez" + dt.Rows.Add(dr) + + GVOrdenesdeServicio.DataSource = dt + GVOrdenesdeServicio.DataBind() + End Sub Private Sub CargaFechaGPS() TxtFechaIH.Text = $"01/{DateTime.Now.ToString("MM")}/{DateTime.Now.Year} 00:00" TxtFechaFH.Text = $"{DateTime.Now.ToString("dd/MM/yyyy")} 23:59" @@ -472,20 +528,20 @@ Partial Class AF_AF Private Sub CargaAFInv() If UsuarioActual.Empresa.UsaInventarios AndAlso CveActivoFijo <= 0 Then - HLAFInv.Visible = True + HLAFInv.Visible= True - Dim StrAlmacenes As String = "CveTipoAlmacen IN (1,2)" - DdlAFInvAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, CveEmpresaActual, -1).FiltraParametros(StrAlmacenes) + Dim StrAlmacenes As String = "CveTipoAlmacen IN (1,2,12)" + DdlAFInvAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, CveEmpresaActual, CveTipoAlmacen:=-1).FiltraParametros(StrAlmacenes) DdlAFInvAlmacen.Items.Insert(0, New ListItem(" Seleccione ", "-1")) DdlAFInvAlmacen.SelectedValue = "-1" DdlAFInvAlmacen.DataBind() - DdlAFInvAlmacen.SelectedValueExist(UsuarioActual.CveAlmacen) + DdlAFInvAlmacen.SelectedValueExist(UsuarioActual.CveAlmacen) + DdlAFInvPS.setEsWebService(True) - - DdlAFInvPS.DataSource = GlobalDTPS(UsuarioActual.CveEmpresa).FiltraParametros("CveTipoPS = 2", "PSCodigo") - DdlAFInvPS.Items.Insert(0, New ListItem(" Seleccione ", "-1")) - DdlAFInvPS.DataBind() - DdlAFInvPS.SelectedValue = "-1" + 'DdlAFInvPS.DataSource = GlobalDTPS(UsuarioActual.CveEmpresa).FiltraParametros("CveTipoPS = 2", "PSCodigo") + 'DdlAFInvPS.Items.Insert(0, New ListItem(" Seleccione ", "-1")) + 'DdlAFInvPS.DataBind() + 'DdlAFInvPS.SelectedValue = "-1" End If End Sub Private Sub CargaMarcas() @@ -2979,14 +3035,20 @@ Partial Class AF_AF Catch ex As Exception End Try - End Sub - - + End Sub + + #End Region - - + + #Region " AFInv " Protected Sub BtnAFInv_Click(sender As Object, e As EventArgs) + + If DdlAFInvPS.SelectedValue.ToEntero <= 0 Then + Alert("Seleccione un producto.") + Exit Sub + End If + AFInvSerie = "" AFInvCvePS = -1 AFInvCveAlmacen = -1 @@ -3017,7 +3079,7 @@ Partial Class AF_AF Exit Sub End If - TxtDescripcion.Text = DdlAFInvPS.SelectedItem.Text + TxtDescripcion.Text = DdlAFInvPS.SelectedText TxtValorCompra.Text = Costo.FormatoNumero TxtFechaCompra.Text = Now.ToShortDateString TxtNoSerie.Text = TxtAFInvSerie.Text.Trim @@ -3035,11 +3097,11 @@ Partial Class AF_AF DivAFInvAdvertencia.Visible = True UpDatos.Update() - End Sub - - + End Sub + + #End Region - + #Region "AF GRUPOS" Private Sub BtnAgregarGrupo_Click(sender As Object, e As EventArgs) Handles BtnAgregarGrupo.Click TxtGrupoAF.Text = "" diff --git a/App_Code/ClsGenerales.vb b/App_Code/ClsGenerales.vb index 30171da5f..80b8e3306 100644 --- a/App_Code/ClsGenerales.vb +++ b/App_Code/ClsGenerales.vb @@ -210,6 +210,52 @@ Public Class ClsGenerales End Try Return retorno End Function + + Public Function SAT_DescargaSolicitudeUUIDSGET(CveSolicitudSat As Int32) As Boolean + Dim retorno As Boolean = False + DataAdapter("[PA_Gral_DescargaSolicitudesUUIDSGET]", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveSolicitudSat", SqlDbType.Int).Value = CveSolicitudSat + End With + Try + SqlAdapter.Fill(Data) + retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener los registros de solicitudes CFDI SAT.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return retorno + End Function + + + Public Function SAT_DescargaSolicitudesAddNotificaciones(CveEmpresa As Int32, CveSolicitudSat As Int32) As Boolean + Dim retorno As Boolean = False + DataAdapter("[PA_Gral_SAT_DescargaSolicitudesAddNotificaciones]", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveSolicitudSat", SqlDbType.Int).Value = CveSolicitudSat + End With + Try + SqlAdapter.Fill(Data) + retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener los registros de solicitudes CFDI SAT.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return retorno + End Function + Public Function SAT_DescargaSolicitudesAddNotificacionesCOUNT(CveEmpresa As Int32) As Boolean + Dim retorno As Boolean = False + DataAdapter("[PA_Gral_SAT_DescargaSolicitudesAddNotificacionesCOUNT]", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + Try + SqlAdapter.Fill(Data) + retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener los registros de solicitudes CFDI SAT.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return retorno + End Function #Region " I N D I C A D O R E S Y G R A F I C A S" Public Function GetIndicadores(CveEmpresa As Integer) As DataSet 'Dim Retorno As Boolean = False diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 4dcf2318d..e4cb5ef17 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -2862,6 +2862,40 @@ Public Class ClsVentas Return OnError End Function + + Public Function GETVentasPendientesdeTimbrar(CveEmpresa As Integer) As Boolean + Dim OnError As Boolean = False + DataAdapter("PA_Vta_VentasPendientesdeTimbrar") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + + Try + SqlAdapter.Fill(Data) + OnError = True + Catch ex As Exception + Me.OnError("Ocurrió un error al obtener las facturas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return OnError + End Function + Public Function GETVentasPendientesdeCancelar(CveEmpresa As Integer) As Boolean + Dim OnError As Boolean = False + DataAdapter("PA_Vta_VentasPendientesdeCancelar") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + + Try + SqlAdapter.Fill(Data) + OnError = True + Catch ex As Exception + Me.OnError("Ocurrió un error al obtener las facturas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return OnError + End Function + Public Function GetFacturasCanceladasPendientes(FoliosFiscales As String, CveEmpresa As Integer) As Boolean Dim OnError As Boolean = False DataAdapter("PA_Vta_FacturasCanceladasPendientesGet") diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index 2157dedef..9e1941e5c 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -1344,7 +1344,7 @@ Namespace Modelos Public Sub GuardarVenta(ByRef factura As Modelos.Factura, ByRef ObjVentas As ClsVentas, ByRef ObjConta As ClsContabilidad, ByRef ObjInventario As ClsInventarios, ByRef ObjContr As ClsContratos, ByRef TmpDTDetalle As DataTable, CveNCaVincular As Integer, ByRef objContPaqi As ClsContPAQi, Optional ByRef ObjBancos As ClsBancos = Nothing, Optional ByRef ObjOS As ClsOS = Nothing, ByRef Optional ObjEventos As ClsOIEventos = Nothing, ByRef Optional ObjCGame As ClsCGame = Nothing, ByRef Optional ObjCliente As ClsClientes = Nothing, Optional EsNotaCredito As Boolean = False, Optional ObjAcum As ClsAcumuladores = Nothing) Dim Msgok As New StringBuilder - factura.CvePrePoliza = ObjConta.AddPrePolizas("Ventas/GuardarVentaM", factura.CvePlantillaPoliza, factura.TotalTC, factura.TotalTC, factura.CveMoneda, factura.Fecha, If(factura.CveEmpresaCRM > 0, factura.EmpresaCRM, factura.Cliente.Nombre), factura.CveUsuario, factura.CveEmpresa) + factura.CvePrePoliza = ObjConta.AddPrePolizas("Modelos/GuardarVentaM", factura.CvePlantillaPoliza, factura.TotalTC, factura.TotalTC, factura.CveMoneda, factura.Fecha, If(factura.CveEmpresaCRM > 0, factura.EmpresaCRM, factura.Cliente.Nombre), factura.CveUsuario, factura.CveEmpresa) If Not ObjVentas.AddVenta(factura.TipoDocto, factura.Folio, factura.CveCliente, factura.CveClienteSucursal, factura.SubTotalTC, factura.DescuentoTC, factura.AmortizacionTC, factura.IVATC, factura.RetIVATC, factura.RetISRTC, diff --git a/App_Code/WsSigfox.vb b/App_Code/WsSigfox.vb index 6259ddbee..767dcf9e4 100644 --- a/App_Code/WsSigfox.vb +++ b/App_Code/WsSigfox.vb @@ -19,11 +19,12 @@ Namespace Sigfox Public Function CrearTrama( params As DispositivoGPS) As Object Dim respuesta = New With {.Correcto = False, .Mensaje = "", .Datos = New JObject} + Dim datos As String = "" '"0104000000000000" Dim ObjGPS As New ClsGPS() Try - Dim Datos = GetSigfoxDataSuntechTool(params.data) - respuesta.Datos = Datos + 'Dim Datos = GetSigfoxDataSuntechTool(params.data) se calcula por Base de datos revisar el AddTrama + 'respuesta.Datos = Datos Dim DevID As String = params.device Dim Lat As Double = params.lat.ToDouble() @@ -32,22 +33,26 @@ Namespace Sigfox Dim Velocidad As Double = 0 Dim MessageType As Integer = 0 - If Datos IsNot Nothing Then - If Datos.Item("Tipo-01") IsNot Nothing Then - If Datos("Tipo-01")("Latitud") IsNot Nothing Then - Lat = Datos("Tipo-01")("Latitud").ToString().ToDouble() - End If - If Datos("Tipo-01")("Longitud") IsNot Nothing Then - Lng = Datos("Tipo-01")("Longitud").ToString().ToDouble() - End If - End If - End If + 'If Datos IsNot Nothing Then + ' If Datos.Item("Tipo-01") IsNot Nothing Then + ' If Datos("Tipo-01")("Latitud") IsNot Nothing Then + ' Lat = Datos("Tipo-01")("Latitud").ToString().ToDouble() + ' End If + ' If Datos("Tipo-01")("Longitud") IsNot Nothing Then + ' Lng = Datos("Tipo-01")("Longitud").ToString().ToDouble() + ' End If + ' End If + 'End If Dim Trama As String = String.Format("ST730;{0};{1};{2};{3};{4};{5};{6};{7};{8};{9};{10};{11};{12};{13}", params.data, DevID, Lat, Lng, Fecha, Velocidad, MessageType, params.avgSnr, params.duplicate, params.rssi, params.seqNumber, params.snr, params.station, params.time) If ObjGPS.AddTrama(DevID, Trama, Lat, Lng, Fecha, Velocidad, "ST730") Then + If ObjGPS.DtResultados.Rows.Count > 0 Then + datos = ObjGPS.DtResultados.Rows(0)("Comando").ToString() + 'CveDispositivo = ObjGPS.DtResultados.Rows(0)("CveDispositivo").ToString() + End If respuesta.Correcto = True respuesta.Mensaje = "La trama se agregó correctamente" Else @@ -61,10 +66,78 @@ Namespace Sigfox Finally ObjGPS.Dispose() End Try - Return respuesta + + Dim response As HttpResponseMessage + If datos.Length > 0 Then + Dim jsonString As String = $"{{""{params.device}"":{{""downlinkData"":""{datos}""}}}}" + response = Me.Request.CreateResponse(HttpStatusCode.OK) + response.Content = New StringContent(jsonString, Encoding.UTF8, "application/json") + Else + response = Request.CreateResponse(HttpStatusCode.NoContent, "") + End If + Return response End Function #Region "F U N C I O N E S" + + Public Function procesatrama(header As String, trama As String) As String + Dim retorno As String = "" + Dim strbyte As String = "" + Dim hexValue As String = "" + Dim index As Integer = 3 + Dim longitud As Integer = trama.Length + While longitud > index + strbyte = trama.Substring(index, 2) + index = index + 2 + Select Case strbyte + Case "01" 'GPS location + If longitud > (index + 12) Then + hexValue = trama.Substring(index, 6) 'latitud + index = index + 6 + hexValue = trama.Substring(index, 6) 'longitude + index = index + 6 + Else + index = index + 12 + End If + Case "02" 'High resolution GPS location + If longitud > (index + 16) Then + hexValue = trama.Substring(index, 8) 'latitud + index = index + 8 + hexValue = trama.Substring(index, 8) 'longitude + index = index + 8 + Else + index = index + 8 + End If + Case "03" 'Temperatura + hexValue = trama.Substring(index, 2) + index = index + 2 + Case "04" 'Battery voltage + hexValue = trama.Substring(index, 2) + index = index + 2 + Case "05" 'Battery level + hexValue = trama.Substring(index, 2) + index = index + 2 + Case "06" 'Wifi Mac address (6 bytes) + 1 byte for RSSI (positive dBm) + hexValue = trama.Substring(index, 14) + index = index + 14 + Case "07" 'Wifi Extended: 6 bytes for MAC address, 1 bytes for RSSI and 3 bytes for a NIC that as the same OUI as the 6 bytes MAC address + hexValue = trama.Substring(index, 20) + index = index + 20 + Case "08" 'Accelerometer (2 bytes per axis) + hexValue = trama.Substring(index, 12) + index = index + 12 + Case "09" 'Speed in km/h + hexValue = trama.Substring(index, 2) + index = index + 2 + Case "8x" 'Fence number + hexValue = trama.Substring(index, 2) + index = index + 2 + Case Else + index = index + 2 'se desconoce pero se avanza 1 bytes + End Select + End While + Return retorno + End Function ''' ''' Obtiene los valores de los datos usando la libreria de SigfoxParse.js ''' diff --git a/App_Code/modExtensiones.vb b/App_Code/modExtensiones.vb index ad51f25bc..c5fb9f873 100644 --- a/App_Code/modExtensiones.vb +++ b/App_Code/modExtensiones.vb @@ -463,10 +463,10 @@ Namespace Extensiones ''' Icono clase example fa fa-bell-o ''' 'danger','success','warning','info' ''' - Public Function ItemNotificaciones(Mensaje As String, Optional Fecha As String = "", Optional Ico As String = "fa fa-bell-o", Optional Tipo As String = "info", Optional Link As String = "javascript:;") As String + Public Function ItemNotificaciones(Mensaje As String, Optional Fecha As String = "", Optional Ico As String = "fa fa-bell-o", Optional Tipo As String = "info", Optional Link As String = "javascript:;", Optional tonewpage As Boolean = True) As String Dim Time As String = "" If Fecha <> "" Then Time = String.Format("{0}", Fecha) - Return String.Format("
  • {0}{3}
  • ", Time, Tipo, Ico, Mensaje, Link) + Return String.Format("
  • {0}{3}
  • ", Time, Tipo, Ico, Mensaje, Link, If(tonewpage, "target=""_blank""", "")) End Function ' 'Public Function addindicador(Obj As Object, color As String, icono As String, titulo As String, comentario As String, link As String) As String diff --git a/Ashx/SIGFacturacion.ashx b/Ashx/SIGFacturacion.ashx index c1e46ead0..06a0be6c8 100644 --- a/Ashx/SIGFacturacion.ashx +++ b/Ashx/SIGFacturacion.ashx @@ -2275,24 +2275,44 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState HttpContext.Current.Application("GlobalDTAlmacen") = value End Set End Property - Property GlobalDTAlmacenUsuarios(CveUsuario As Integer, CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = 1) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Str As New StringBuilder - Str.AppendFormat("CveUsuario = {0} AND CveEmpresa = {1} ", CveUsuario, CveEmpresa) - If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen) - - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAlmacenUsuarios"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - GlobalDTAlmacenUsuarios = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAlmacenUsuarios = DirectCast(HttpContext.Current.Application("GlobalDTAlmacenUsuarios"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAlmacenUsuarios") = value - End Set + Property GlobalDTAlmacenUsuarios(CveUsuario As Integer, CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = 1) As DataTable + Get + Dim AppNombre As String = String.Format("GlobalDTAlmacenUsuarios-{0}", CveEmpresa) + 'sino existe, recarga los datos + If HttpContext.Current.Application(AppNombre) Is Nothing Then + Dim ObjUsr As New ClsSisUsuarios + If ObjUsr.GetAlmacen(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjUsr.DtResultados + ObjUsr.Dispose() + End If + Dim Str As New StringBuilder + Str.AppendFormat("CveUsuario = {0} AND CveEmpresa = {1} ", CveUsuario, CveEmpresa) + If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen) + + Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) + GlobalDTAlmacenUsuarios = Dv.ToTable + Dv.Dispose() + End Get + Set(value As DataTable) + Dim AppNombre As String = String.Format("GlobalDTAlmacenUsuarios-{0}", CveEmpresa) + HttpContext.Current.Application(AppNombre) = value + End Set + 'Get + ' If CveEmpresa <> -1 Then + ' Dim Str As New StringBuilder + ' Str.AppendFormat("CveUsuario = {0} AND CveEmpresa = {1} ", CveUsuario, CveEmpresa) + ' If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen) + + ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAlmacenUsuarios"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) + ' GlobalDTAlmacenUsuarios = Dv.ToTable + ' Dv.Dispose() + ' Else + ' GlobalDTAlmacenUsuarios = DirectCast(HttpContext.Current.Application("GlobalDTAlmacenUsuarios"), DataTable) + ' End If + + 'End Get + 'Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTAlmacenUsuarios") = value + 'End Set End Property Property GlobalDTNom_Periodos() As DataTable Get diff --git a/Bancos/RegistroPagoIntermediario.aspx.vb b/Bancos/RegistroPagoIntermediario.aspx.vb index cd7f32ce5..17e4bc86e 100644 --- a/Bancos/RegistroPagoIntermediario.aspx.vb +++ b/Bancos/RegistroPagoIntermediario.aspx.vb @@ -246,7 +246,7 @@ Partial Class Bancos_PagosIntermediarios Else ObjIE.RollBack() Alert(String.Format("Ocurrió un error al registrar el movimiento."), TipoMensaje.MsgError) - GuardaLog(MsgError) + GuardaLog($"RegistroPagoIntermediario --> {MsgError}") End If ObjIE.Dispose() diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 03865ea0d..ffdea1526 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -7712,7 +7712,7 @@ Partial Class Compras_Compras ' ImporteAnticipo += Ant.Importe ' RESTO DEL IMPORTE POR SI QUEDA DIFERENCIA DE LA SUMA DE LOS ANTICIPOS Y EL PROVEEDOR TIENE QUE PAGAR 'movimiento de pago proveedor, --no se regisra porque no se registra el total de la compra como deuda del proveedor, solo lo que queda a deber 'si es l moviemiento es de amortizacion con descuento, no registra el pago, ya esta descontado - If TieneAnticiposXML = False AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoCompra, Ant.Importe, " ", CveConceptoPago, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=Ant.Importe) Then + If TieneAnticiposXML = False AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoCompra, Ant.Importe, " ", CveConceptoPago, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=Ant.Importe, CveCompraAmortizacion:=CveCompraNC) Then ErrorMovtosCxP = True End If PorcentajePago = (Ant.Importe) / TxtTotal.Text.ToDecimal @@ -10630,7 +10630,7 @@ Partial Class Compras_Compras e.Row.Cells(0).ToolTip = "Producto/Servicio NO Registrado" e.Row.Cells(0).ID = String.Format("tr{0}", e.Row.RowIndex) e.Row.Cells(0).ClientIDMode = ClientIDMode.Static - e.Row.Cells(0).Attributes.Add("onclick", String.Format("fnAltaPS('{0}','{1}',{2})", String.Format("tr{0}", e.Row.RowIndex), e.Row.DBCampo("PS").Replace("'", "").Replace(Chr(13), "").Replace(Chr(10), ""), e.Row.RowIndex)) + e.Row.Cells(0).Attributes.Add("onclick", String.Format("fnAltaPS('{0}','{1}',{2})", String.Format("tr{0}", e.Row.RowIndex), e.Row.DBCampo("PS").Replace("'", "'").Replace(Chr(13), "").Replace(Chr(10), ""), e.Row.RowIndex)) If e.Row.FCTextBox("TxtPrecioEdit") IsNot Nothing Then e.Row.FCTextBox("TxtPrecioEdit").Enabled = False If e.Row.FCTextBox("TxtCantidadEdit") IsNot Nothing Then e.Row.FCTextBox("TxtCantidadEdit").Enabled = False End If @@ -17979,7 +17979,7 @@ Partial Class Compras_Compras CvePS = DdlPSAlias2.SelectedValue.ToEntero tPS = DdlPSAlias2.SelectedText - If PS.AddPSAlias(TxtPSAlias.Text.Trim, CvePS) Then + If PS.AddPSAlias(System.Web.HttpUtility.HtmlDecode(TxtPSAlias.Text.Trim), CvePS) Then GlobalDTProductosServiciosAlias(-1) = PS.DtResultados TmpDT.Rows(HdnAliasInd.Value.ToEntero)("CvePS") = CvePS diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index adabb7677..1c4f06b5f 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -2335,16 +2335,16 @@ Partial Class PopUpVerFactura Dim ObjCompra As New ClsCompras() If ObjCompra.GetCompras(CveCompra, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) AndAlso ObjCompra.DtResultados.Rows.Count > 0 Then Dim dr As DataRow = ObjCompra.DtResultados.Rows(0) - Dim FechaCompra As Date = dr("Fecha").ToString.ToDate + Dim FechaCompra As Date = dr("FechaMovto").ToString.ToDate Dim FechaVencimiento As Date = dr("FechaVencimiento").ToString.ToDate params.Add(New ReportParameter("Fecha", FechaCompra.ToShortDateString)) params.Add(New ReportParameter("FechaVencimiento", FechaVencimiento.ToShortDateString)) params.Add(New ReportParameter("Plazo", DateDiff(DateInterval.Day, FechaCompra, FechaVencimiento).ToString)) - params.Add(New ReportParameter("Folio", Folio.ToString)) + 'params.Add(New ReportParameter("Folio", Folio.ToString)) params.Add(New ReportParameter("Serie", dr("Serie").ToString)) 'params.Add(New ReportParameter("NumeroOrden", dr("OCVinculada").ToString)) - 'params.Add(New ReportParameter("FacturaProveedor", dr("SerieFolio").ToString)) + params.Add(New ReportParameter("FacturaProveedor", dr("SerieFolio").ToString)) params.Add(New ReportParameter("NombreProveedor", dr("RazonSocial").ToString)) params.Add(New ReportParameter("DireccionProveedor", dr("Direccion").ToString)) params.Add(New ReportParameter("CiudadProveedor", " ")) diff --git a/Contratos/RepPedidosDevolucionesXContrato.aspx b/Contratos/RepPedidosDevolucionesXContrato.aspx index 39f3f78d6..834e5f7d5 100644 --- a/Contratos/RepPedidosDevolucionesXContrato.aspx +++ b/Contratos/RepPedidosDevolucionesXContrato.aspx @@ -140,7 +140,7 @@ - +
    @@ -180,7 +180,7 @@ - + diff --git a/GPS/FacturacionMasiva.aspx.vb b/GPS/FacturacionMasiva.aspx.vb index 8981e2c45..9a43ef120 100644 --- a/GPS/FacturacionMasiva.aspx.vb +++ b/GPS/FacturacionMasiva.aspx.vb @@ -611,7 +611,7 @@ Partial Class Contratos_FacturacionMasiva Dim CveSubProyecto = TmpDTDetalle.Rows(0)("CveSubProyecto").ToString.ToEntero - factura.CvePrePoliza = ObjConta.AddPrePolizas("Ventas/GuardarVenta", factura.CvePlantillaPoliza, factura.Total, factura.Total, factura.CveMoneda, factura.Fecha, factura.Cliente.Nombre, factura.CveUsuario, factura.CveEmpresa) + factura.CvePrePoliza = ObjConta.AddPrePolizas("FacMas/GuardarVenta", factura.CvePlantillaPoliza, factura.Total, factura.Total, factura.CveMoneda, factura.Fecha, factura.Cliente.Nombre, factura.CveUsuario, factura.CveEmpresa) If Not ObjVentas.AddVenta(factura.TipoDocto, factura.Folio, factura.CveCliente, factura.CveClienteSucursal, factura.SubTotalTC, factura.DescuentoTC, factura.AmortizacionTC, factura.IVATC, factura.RetIVATC, factura.RetISRTC, factura.TotalTC, factura.CveMoneda, factura.TipoCambio, factura.CveMetodoPago, factura.CondicionesPago, factura.FormaPago, factura.FechaPago, factura.Fecha, factura.MotivoDescuento, diff --git a/General/PopUpPaqueteriasGuias.aspx.cs b/General/PopUpPaqueteriasGuias.aspx.cs index 97e830f06..3c8e94472 100644 --- a/General/PopUpPaqueteriasGuias.aspx.cs +++ b/General/PopUpPaqueteriasGuias.aspx.cs @@ -787,11 +787,11 @@ public partial class General_PopUpPaqueteriasGuias : ClsPaginas strBody.Append("
    "); strBody.Append("

    "); strBody.Append(" Gracias por realizar pedido
    "); - strBody.Append(" Compuproveedores"); + //strBody.Append(" Compuproveedores"); strBody.Append("

    "); strBody.Append("

    "); strBody.Append(" Sigue disfrutando de nuestros productos y servicios
    "); - strBody.Append(" www.compuproveedores.com"); + //strBody.Append(" www.compuproveedores.com"); strBody.Append(""); strBody.Append("

    "); strBody.Append(" "); diff --git a/General/RepPaqueteriasGuias.aspx.cs b/General/RepPaqueteriasGuias.aspx.cs index 2633ccd25..af2e3a827 100644 --- a/General/RepPaqueteriasGuias.aspx.cs +++ b/General/RepPaqueteriasGuias.aspx.cs @@ -202,7 +202,7 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas } CargaDatos(); - + } } @@ -231,7 +231,7 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas DdlPaqueterias.DataBind(); DdlPaqueterias.Items.Insert(0, new ListItem("Todos ", "-1")); } - + DdlPaqueteriaEditar.DataSource = get_GlobalDTPaqueterias(UsuarioActual.CveEmpresa); DdlPaqueteriaEditar.DataBind(); @@ -254,7 +254,8 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas if (UsuarioActual.CveRol == 1339) { DdlEstatus.Items.Insert(0, new ListItem("En Proceso ", "2")); - }else + } + else { DdlEstatus.Items.Insert(0, new ListItem("Todos ", "-1")); DdlEstatus.Items.Insert(1, new ListItem("Pendiente ", "1")); @@ -272,7 +273,8 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas DdlEstatusEditar.Items.Insert(4, new ListItem("Confirmado por Cliente", "4")); DdlEstatusEditar.SelectedValue = "-1"; - if(UsuarioActual.Empresa.Funcionalidad(280) == "1"){ + if (UsuarioActual.Empresa.Funcionalidad(280) == "1") + { DivEstatusEntrega.Visible = true; } @@ -282,7 +284,7 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas { if (UsuarioActual.CveRol == 1339) { - DdlUsuarios.DataSource = get_GlobalDTUsuarios(CveEmpresa:UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveRol = {0}",UsuarioActual.CveRol)); + DdlUsuarios.DataSource = get_GlobalDTUsuarios(CveEmpresa: UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveRol = {0}", UsuarioActual.CveRol)); DdlUsuarios.DataBind(); } else @@ -336,7 +338,7 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas String FechaIngInicio = TxtFechaInicialIngreso.Text == "" ? "-1" : TxtFechaInicialIngreso.Text; String FechaIngFin = TxtFechaFinalIngreso.Text == "" ? "-1" : TxtFechaFinalIngreso.Text; - if (ObjGeneral.GetPaqueteriasGuias(CvePaqueteriaGuia, CvePaqueteriaGuiaTipo, CvePaqueteria, CveEstatus, CveSubProyecto, CveEmpresa, Guia, FechaInicio, FechaFin, + if (ObjGeneral.GetPaqueteriasGuias(CvePaqueteriaGuia, CvePaqueteriaGuiaTipo, CvePaqueteria, CveEstatus, CveSubProyecto, CveEmpresa, Guia, FechaInicio, FechaFin, FechaIngInicio, FechaIngFin, Filtro: Filtro, CveUsuarioEntrega: CveUsuarioEntrega, EsEntregaInterna: ChkLote.Checked)) { DTDatos = ObjGeneral.DtResultados; @@ -356,7 +358,7 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas int CvePaqueteriaGuiaTipo = DdlTipoEditar.SelectedValue.ToEntero(); int CveEstatus = DdlEstatusEditar.SelectedValue.ToEntero(); int CveSubProyecto = DdlSucursalesEditar.SelectedValue.ToEntero(); - + String Guia = (TxtGuia.Text != "") ? TxtGuia.Text : "-1"; String Rastreo = TxtRastreo.Text; String Fecha = TxtFecha.Text; @@ -372,7 +374,7 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas if (ObjGeneral.UpdatePaqueteriasGuias(CvePaqueteriaGuia, CvePaqueteriaGuiaTipo, CveSubProyecto, CvePaqueteria, CveEstatus, Fecha, Rastreo, Guia, NumCajas, Peso, Dimensiones, FechaEstimada, Observaciones, ImplicaCosto)) { - + if (Guia == "-1") { Alert(String.Format("La Guía se ha actualizado correctamente."), ModExtensiones.TipoMensaje.MsgInformacion); @@ -486,7 +488,7 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas TxtPeso.Text = String.Format("{0:N3}", GvRow.DataKey("Peso").ToDouble()); TxtDimensiones.Text = GvRow.DataKey("Dimensiones"); TxtObservaciones.Text = GvRow.DataKey("Observaciones"); - + ChkImplicaCosto.Checked = Boolean.Parse(GvRow.DataKey("ImplicaCosto")); Boolean mostrarDescarga = CrearArchivo(false); @@ -494,7 +496,8 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas if (mostrarDescarga) { DivDownloadGuia.Visible = true; - } else + } + else { DivDownloadGuia.Visible = false; } @@ -533,9 +536,9 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas { BtnEliminarGuia.Visible = false; } - + UPEditarGuia.Update(); - + this.RegistraScript("$('#DivEditarGuia').modal('show');"); } @@ -716,7 +719,7 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas int EstatusEntregado = 3; //Mandamos a actualizar solo el estatus - if (!ObjGral.UpdatePaqueteriasGuias(CvePaqueteriaGuia,-1, -1, -1, EstatusEntregado, "-1", "", "", -1, -1, "-1", "-1", "")) + if (!ObjGral.UpdatePaqueteriasGuias(CvePaqueteriaGuia, -1, -1, -1, EstatusEntregado, "-1", "", "", -1, -1, "-1", "-1", "")) { TieneError = true; } @@ -732,7 +735,8 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas if (MensajeEnviado) { Alert(String.Format("El Archivo ha sido guardado y el estatus de la Guía ha sido actualizado correctamente.

    Correo enviado exitosamente a {0}.", Destinatario)); - }else + } + else { Alert(String.Format("El Archivo ha sido guardado y el estatus de la Guía ha sido actualizado correctamente.

    Error al Notificar al Cliente a su correo: {0}.", Destinatario)); } @@ -777,7 +781,7 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas { String path = Path.Combine(UsuarioActual.Empresa.Ruta, "Documentos", "Guias", CvePaqueteriaGuia.ToString() + ".pdf"); System.IO.FileInfo file = new System.IO.FileInfo(path); - + string[] fileEntries = Directory.GetFiles(Path.Combine(UsuarioActual.Empresa.Ruta, "Documentos", "Guias")); foreach (string fileName in fileEntries) @@ -793,7 +797,8 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas if (descargar) { DescargarArchivo(file); - }else + } + else { if (!file.Exists) { @@ -813,11 +818,11 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas { Response.Clear(); - Response.AddHeader("Content-Disposition", "attachment; filename="+ String.Format("Guia {0} - {1}{2}",Paqueteria, Guia,File.Extension)); + Response.AddHeader("Content-Disposition", "attachment; filename=" + String.Format("Guia {0} - {1}{2}", Paqueteria, Guia, File.Extension)); Response.AddHeader("Content-Length", File.Length.ToString()); Response.ContentType = "application/octet-stream"; Response.WriteFile(File.FullName); - + Response.End(); } catch (Exception e) @@ -1006,7 +1011,7 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas SerieFolio = String.Format("{0}-{1}", DbRowVenta["Serie"].ToString(), DbRowVenta["Folio"].ToString().ToEntero()); NombreCliente = DbRowVenta["ClienteNombre"].ToString(); - + //Si se subio Archivo if (!SubirArchivo) { @@ -1037,7 +1042,7 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas private string getCorreoNotificacion(int CveCliente, int CveVendedor) { - DataRow DatosCliente = get_GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimero(string.Format("CveCliente = {0}",CveCliente)); + DataRow DatosCliente = get_GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimero(string.Format("CveCliente = {0}", CveCliente)); DataRow DatosVendedor = get_GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimero(string.Format("CveVendedor = {0}", CveVendedor)); if (DatosCliente != null && DatosVendedor != null) { @@ -1060,11 +1065,11 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas CveVenta = GvRow.DataKey("CveAgrupador").ToString().ToEntero(); Folio = GvRow.DataKey("Folio").ToString(); } - + protected void BtnReasignar_Click(object sender, EventArgs e) { ClsGenerales ObjGeneral = new ClsGenerales(); - if (ObjGeneral.AsignarEntregasPorRealizar(CvePaqueteriaGuiaReasignar, -1, CveMotivoRechazoPaqueteria:DdlMotivoRechazoGuia.SelectedValue.ToEntero())) + if (ObjGeneral.AsignarEntregasPorRealizar(CvePaqueteriaGuiaReasignar, -1, CveMotivoRechazoPaqueteria: DdlMotivoRechazoGuia.SelectedValue.ToEntero())) { Alert("La guía está lista para volver a ser asignada, disponible en el reporte Entregas Por Realizar"); } @@ -1072,7 +1077,7 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas CargaDatos(); UPDatos.Update(); CvePaqueteriaGuiaReasignar = -1; - EnviarCorreoNotificacionEntrega(3, Folio, "","","","","",-1,null); + EnviarCorreoNotificacionEntrega(3, Folio, "", "", "", "", "", -1, null); this.RegistraScript("$('#ModalMotivoReasignacion').modal('hide')", "hidemodal3"); } @@ -1080,7 +1085,7 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas { ClsVentas ObjVentas = new ClsVentas(); - if (ObjVentas.GetVenta(CveVenta,UsuarioActual.CveEmpresa)) + if (ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa)) { DataRow row = ObjVentas.DtResultados.Rows[0]; string ClienteNombre = row["ClienteNombre"].ToString(); @@ -1122,11 +1127,11 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas strBody.Append("
    "); strBody.Append("

    "); strBody.Append(" Agradecemos su preferencia.
    "); - strBody.Append(" Compuproveedores"); + //strBody.Append(" Compuproveedores"); strBody.Append("

    "); strBody.Append("

    "); strBody.Append(" Sigue disfrutando de nuestros productos y servicios
    "); - strBody.Append(" www.compuproveedores.com"); + //strBody.Append(" www.compuproveedores.com"); strBody.Append(""); strBody.Append("

    "); strBody.Append(" "); diff --git a/Inicio.aspx b/Inicio.aspx index bc2192868..d7c9313e4 100644 --- a/Inicio.aspx +++ b/Inicio.aspx @@ -800,7 +800,93 @@ + + + @@ -1278,7 +1279,7 @@ diff --git a/Inventarios/EntradasSalidas.aspx.vb b/Inventarios/EntradasSalidas.aspx.vb index 1fe80f77f..da17d5806 100644 --- a/Inventarios/EntradasSalidas.aspx.vb +++ b/Inventarios/EntradasSalidas.aspx.vb @@ -1960,6 +1960,8 @@ Partial Class Inventarios_EntradasSalidas If DdlConcepto.Items.FindByValue("1") Is Nothing Then DdlConcepto.Items.Insert(If(DdlConcepto.Items.Count >= 1, 1, 0), New ListItem(" Inventario Inicial ", "1")) End If + DdlConcepto.Items.Insert(If(DdlConcepto.Items.Count >= 1, 1, 0), New ListItem(" Salida por Ajuste ", "34")) + End If 'ACTIVO FIJO @@ -1977,7 +1979,7 @@ Partial Class Inventarios_EntradasSalidas If DdlConcepto.Items.FindByValue("2") Is Nothing Then DdlConcepto.Items.Insert(If(DdlConcepto.Items.Count >= 2, 2, DdlConcepto.Items.Count), New ListItem("Entrada Almacen ", "2")) End If - + DdlConcepto.Items.Insert(If(DdlConcepto.Items.Count >= 1, 1, 0), New ListItem(" Salida por Ajuste ", "34")) End If '[IPP]: PARCHE PARA JAM diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb index d2acbfd5f..8dff1f8c8 100644 --- a/Inventarios/EntregaAlmacen.aspx.vb +++ b/Inventarios/EntregaAlmacen.aspx.vb @@ -3256,11 +3256,11 @@ Partial Class Inventarios_EntregaAlmacen strBody.Append("
    ") strBody.Append("

    ") strBody.Append(" Gracias por su compra
    ") - strBody.Append(" Compuproveedores") + 'strBody.Append(" Compuproveedores") strBody.Append("

    ") strBody.Append("

    ") strBody.Append(" Sigue disfrutando de nuestros productos y servicios
    ") - strBody.Append(" www.compuproveedores.com") + 'strBody.Append(" www.compuproveedores.com") strBody.Append("") strBody.Append("

    ") strBody.Append(" ") diff --git a/Inventarios/EntregasPorRealizar.aspx.cs b/Inventarios/EntregasPorRealizar.aspx.cs index 4a24c6f5a..689c7d368 100644 --- a/Inventarios/EntregasPorRealizar.aspx.cs +++ b/Inventarios/EntregasPorRealizar.aspx.cs @@ -178,11 +178,11 @@ public partial class Inventarios_EntregasPorRealizar : ClsPaginas strBody.Append("
    "); strBody.Append("

    "); strBody.Append(" Gracias por realizar su pedido
    "); - strBody.Append(" Compuproveedores"); + //strBody.Append(" Compuproveedores"); strBody.Append("

    "); strBody.Append("

    "); strBody.Append(" Sigue disfrutando de nuestros productos y servicios
    "); - strBody.Append(" www.compuproveedores.com"); + //strBody.Append(" www.compuproveedores.com"); strBody.Append(""); strBody.Append("

    "); strBody.Append(" "); diff --git a/Inventarios/Remanufactura.aspx.vb b/Inventarios/Remanufactura.aspx.vb index d64eaa79a..52f88843e 100644 --- a/Inventarios/Remanufactura.aspx.vb +++ b/Inventarios/Remanufactura.aspx.vb @@ -674,7 +674,7 @@ Partial Class Inventarios_Remanufactura Dim CveSubProyecto = TmpDTDetalle.Rows(0)("CveSubProyecto").ToString.ToEntero - factura.CvePrePoliza = ObjConta.AddPrePolizas("Ventas/GuardarVenta", factura.CvePlantillaPoliza, factura.Total, factura.Total, factura.CveMoneda, factura.Fecha, factura.Cliente.Nombre, factura.CveUsuario, factura.CveEmpresa) + factura.CvePrePoliza = ObjConta.AddPrePolizas("Reman/GuardarVenta", factura.CvePlantillaPoliza, factura.Total, factura.Total, factura.CveMoneda, factura.Fecha, factura.Cliente.Nombre, factura.CveUsuario, factura.CveEmpresa) If Not ObjVentas.AddVenta(factura.TipoDocto, factura.Folio, factura.CveCliente, factura.CveClienteSucursal, factura.SubTotalTC, factura.DescuentoTC, factura.AmortizacionTC, factura.IVATC, factura.RetIVATC, factura.RetISRTC, factura.TotalTC, factura.CveMoneda, factura.TipoCambio, factura.CveMetodoPago, factura.CondicionesPago, factura.FormaPago, factura.FechaPago, factura.Fecha, factura.MotivoDescuento, diff --git a/Inventarios/RepMovimientos.aspx b/Inventarios/RepMovimientos.aspx index c620e5880..c4d79e109 100644 --- a/Inventarios/RepMovimientos.aspx +++ b/Inventarios/RepMovimientos.aspx @@ -177,11 +177,12 @@ - - - - - + + + + + +
    diff --git a/Nomina/Nomina2.aspx b/Nomina/Nomina2.aspx index 176fdd0eb..186d56933 100644 --- a/Nomina/Nomina2.aspx +++ b/Nomina/Nomina2.aspx @@ -4,6 +4,10 @@ Solicitudes CFDI SAT @@ -121,8 +126,8 @@ - + @@ -131,7 +136,7 @@ - + @@ -141,12 +146,12 @@ - + - + @@ -161,7 +166,7 @@ - + @@ -170,6 +175,61 @@ + --%> -
    +
    @@ -236,17 +296,17 @@ - +
    -
    -
    +
    +
    - -
    + +
    @@ -271,6 +331,7 @@
    diff --git a/Ventas/SolicitudesSAT.aspx.cs b/Ventas/SolicitudesSAT.aspx.cs index 287c0dd55..4206749c7 100644 --- a/Ventas/SolicitudesSAT.aspx.cs +++ b/Ventas/SolicitudesSAT.aspx.cs @@ -19,7 +19,16 @@ public partial class Ventas_SolicitudesSAT : ClsPaginas string rfIngFin = Request["fIngFin"] == null ? "" : Request["fIngFin"].ToString().Trim(); string rfSolInicio = Request["fSolInicio"] == null ? "" : Request["fSolInicio"].ToString().Trim(); string rfSolFin = Request["fSolFin"] == null ? "" : Request["fSolFin"].ToString().Trim(); - + + if (rfIngInicio == "") + { + rfIngInicio = string.Format("{0:01/MM/yyyy}",DateTime.Now); + } + if (rfIngFin == "") + { + rfIngFin = string.Format("{0:dd/MM/yyyy}",string.Format("{0:01/MM/yyyy}", DateTime.Now).ToDateTime().AddMonths(1).AddDays(-1)); + + } DateTime dValor = DateTime.Now; dValor = DateTime.Now; if (DateTime.TryParse(rfIngInicio, out dValor)) { rfIngInicio = string.Format("{0:dd/MM/yyyy}", dValor); } else { rfIngInicio = ""; } dValor = DateTime.Now; if (DateTime.TryParse(rfIngFin, out dValor)) { rfIngFin = string.Format("{0:dd/MM/yyyy}", dValor); } else { rfIngFin = ""; } @@ -29,7 +38,7 @@ public partial class Ventas_SolicitudesSAT : ClsPaginas DdlTipo.SelectedValueExist(rtipo); txtFechaI.Text = rfIngInicio; txtFechaF.Text = rfIngFin; - txtFechaISol.Text = rfSolInicio; + txtFechaISol.Text = rfSolInicio; txtFechaFSol.Text = rfSolFin; cargarDatos(); } @@ -59,10 +68,10 @@ public partial class Ventas_SolicitudesSAT : ClsPaginas protected void LnkVerificarSolicitudes_Click(object sender, EventArgs e) { - string direxe = string.Format("{0}{1}",AppDomain.CurrentDomain.BaseDirectory, "Utilerias\\ADSUtilerias.exe"); + string direxe = string.Format("{0}{1}", AppDomain.CurrentDomain.BaseDirectory, "Utilerias\\ADSUtilerias.exe"); - String json = string.Format("{{cveTareaProgramada:{0},cveEmpresa:{1},CveTareaProgramadaHistorial:{2},recursividad:{3},Resultado:{4},parametros:'Tipo=SP'}}", 1, UsuarioActual.CveEmpresa,-1, 0, 1);//Mod.ToLiteral(new System.Web.Script.Serialization.JavaScriptSerializer().Serialize(tarea)); - //this.Alert(string.Format("json:{0} : --mod TareaProgramada --Item {1}", DateTime.Now, json)); + String json = string.Format("{{cveTareaProgramada:{0},cveEmpresa:{1},CveTareaProgramadaHistorial:{2},recursividad:{3},Resultado:{4},parametros:'Tipo=SP'}}", 1, UsuarioActual.CveEmpresa, -1, 0, 1);//Mod.ToLiteral(new System.Web.Script.Serialization.JavaScriptSerializer().Serialize(tarea)); + //this.Alert(string.Format("json:{0} : --mod TareaProgramada --Item {1}", DateTime.Now, json)); try { string Mensajes = ""; @@ -97,7 +106,7 @@ public partial class Ventas_SolicitudesSAT : ClsPaginas string direxe = string.Format("{0}{1}", AppDomain.CurrentDomain.BaseDirectory, "Utilerias\\ADSUtilerias.exe"); - String json = string.Format("{{cveTareaProgramada:{0},cveEmpresa:{1},CveTareaProgramadaHistorial:{2},recursividad:{3},Resultado:{4},parametros:'Tipo={5}&fechai={6}&fechaf={7}'}}", 1, UsuarioActual.CveEmpresa, -1, 0, 1,DdlTipoAdd.SelectedValue, FechaI, FechaF);//Mod.ToLiteral(new System.Web.Script.Serialization.JavaScriptSerializer().Serialize(tarea)); + String json = string.Format("{{cveTareaProgramada:{0},cveEmpresa:{1},CveTareaProgramadaHistorial:{2},recursividad:{3},Resultado:{4},parametros:'Tipo={5}&fechai={6}&fechaf={7}'}}", 1, UsuarioActual.CveEmpresa, -1, 0, 1, DdlTipoAdd.SelectedValue, FechaI, FechaF);//Mod.ToLiteral(new System.Web.Script.Serialization.JavaScriptSerializer().Serialize(tarea)); //this.Alert(string.Format("json:{0} : --mod TareaProgramada --Item {1}", DateTime.Now, json)); try { @@ -125,4 +134,18 @@ public partial class Ventas_SolicitudesSAT : ClsPaginas cargarDatos(); Alert("La solicitud ha sido enviada"); } + + protected void LnknoCFDI_Click(object sender, EventArgs e) + { + GridViewRow gvrow = (GridViewRow)(((LinkButton)sender).NamingContainer); + int CveSolicitudSat = gvrow.DataKey("CveSolicitudSat").ToEntero(); + using (ClsGenerales objgeneral = new ClsGenerales()) + { + objgeneral.SAT_DescargaSolicitudeUUIDSGET(CveSolicitudSat); + GVFoliosSAT.DataSource = objgeneral.DtResultados; + } + GVFoliosSAT.DataBind(); + RegistraScript("$('#ModalFoliosSolicitud').modal();"); + UpFoliosSAT.Update(); + } } \ No newline at end of file diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index 3efab29bb..268ad368d 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -1300,11 +1300,11 @@
    -