diff --git a/App_Code/ClsSisRoles.vb b/App_Code/ClsSisRoles.vb index 6cc5d759b..0df89d1ae 100644 --- a/App_Code/ClsSisRoles.vb +++ b/App_Code/ClsSisRoles.vb @@ -329,6 +329,26 @@ Public Class ClsSisRoles Return Retorno End Function + Public Function UpdateRolAdjunto(CveRol As Integer, Adjunto As String, CveEmpresa As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Sis_RolAdjuntoUpdate") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveRol", SqlDbType.Int).Value = CveRol + .Add("@Adjunto", SqlDbType.VarChar).Value = Adjunto + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al actualizar el adjunto del rol.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function + ' IDisposable Protected Overridable Sub Dispose(ByVal disposing As Boolean) If Not Me.disposedValue Then diff --git a/Ashx/SIGFacturacion.ashx b/Ashx/SIGFacturacion.ashx index 2bb590348..8a3112598 100644 --- a/Ashx/SIGFacturacion.ashx +++ b/Ashx/SIGFacturacion.ashx @@ -13,7 +13,7 @@ Imports Modelos Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState - Private Property CveEmpresaFacturar As Integer = 143 + Private Property CveEmpresaFacturar As Integer = 194 Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest context.Response.ContentType = "text/plain" @@ -906,7 +906,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState ' strLineaTMP = Chr(13) & Chr(10) & Day(NowADS()) & "/" & Month(NowADS()) & "/" & Year(NowADS()) & " " & Hour(NowADS()) & ":" & Minuto & ". " & Str & Chr(13) & Chr(10) strLineaTMP = String.Format("{0}{1}Log: {2}{3}:{4}", Chr(13), Chr(10), Str, ClsPaginas.NowADS().ToShortDateString, ClsPaginas.NowADS().ToShortTimeString) Try - ArchivoW = New StreamWriter(String.Format("{0}\LogFacturacion.txt", ModExtensiones.DirectorioBaseEmpresas), True, System.Text.Encoding.UTF8) + ArchivoW = New StreamWriter(String.Format("{0}\Log\LogFacturacion.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8) Catch ex As UnauthorizedAccessException 'Alert("No hay permisos para guardar en el Log.", Extensiones.TipoMensaje.MsgError) Exit Sub diff --git a/Inventarios/RecepcionAlmacen.aspx.vb b/Inventarios/RecepcionAlmacen.aspx.vb index e57a4b2d6..f55a1f55e 100644 --- a/Inventarios/RecepcionAlmacen.aspx.vb +++ b/Inventarios/RecepcionAlmacen.aspx.vb @@ -3,11 +3,9 @@ Option Explicit On Imports System.Data Imports System.IO -Imports System.Text Imports Extensiones Imports GemBox.Spreadsheet Imports Microsoft.Reporting.WebForms -Imports Org.BouncyCastle.Asn1.X509 Partial Class Inventarios_RecepcionAlmacen Inherits ClsPaginas @@ -2969,11 +2967,8 @@ Partial Class Inventarios_RecepcionAlmacen End If End If End If - End If - End If - Next If Not ErrorMovInv Then @@ -2981,7 +2976,6 @@ Partial Class Inventarios_RecepcionAlmacen ErrorMovInv = True End If End If - End If End If @@ -3614,11 +3608,8 @@ Partial Class Inventarios_RecepcionAlmacen MensajeError = "Error al contabilizar los conceptos contables" End If End If - End If - End If - Else ErrorMovInv = True MensajeError = "Error al obtener movimientos" @@ -3633,11 +3624,6 @@ Partial Class Inventarios_RecepcionAlmacen Dim ProveedorNombre As String = "" Dim SerieFolio As String = "" - 'Dim DrAlmO, DrAlmD As DataRow - 'Dim CveSucursalOrigen, CveSucursalDestino As Integer - 'Dim TipoAlmacenOrigen, TipoAlmacenDestino As Integer - 'Dim CveSubProyectoOrigen, CveSubProyectoDestino As Integer - If ObjCompras.GetCompras(CveCompraSurtir, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) Then 'Fecha = ObjCompras.DtResultados(0)("Fecha").ToString.ToDate Fecha = TxtFecha.Text.ToDate @@ -3654,7 +3640,6 @@ Partial Class Inventarios_RecepcionAlmacen Else ErrorMovInv = True End If - 'Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen= {CveAlmacenDevolucionProveedor}").ToEntero() 'AGREGAMOS PREPOLIZAS TRASPASO DIRECTO: @@ -3672,7 +3657,6 @@ Partial Class Inventarios_RecepcionAlmacen Else ErrorMovInv = True End If - End If 'AGREGA SALDOS A OC SURTIDAS @@ -3702,7 +3686,7 @@ Partial Class Inventarios_RecepcionAlmacen ErrorMovInv = True End Try - If Not ErrorMovInv Then + If Not ErrorMovInv AndAlso ArchivoBitacora <> "" Then RenombrarBitacoras() End If @@ -3725,8 +3709,7 @@ Partial Class Inventarios_RecepcionAlmacen Msg.AppendFormat("
La Orden de Compra se dividió en los siguientes productos:
{0}", MensajeOC) End If If UsuarioActual.CveEmpresa.Contiene(1, 119, 186) Then - Msg.AppendFormat("
Imprimir Etiqueta Individual ", Encripta(String.Format("OP=Etiqueta&CveMovimiento={0}&Modalidad={1}", CveMovimiento, "Cantidad"))) - 'Msg.AppendFormat("
Imprimir Etiqueta Por Caja ", Encripta(String.Format("OP=Etiqueta&CveMovimiento={0}&Modalidad={1}", CveMovimiento, "Caja"))) + Msg.AppendFormat("
Imprimir Etiqueta Individual ", Encripta(String.Format("OP=Etiqueta&CveMovimiento={0}&Modalidad={1}", CveMovimiento, "Cantidad"))) 'Msg.AppendFormat("
Imprimir Etiqueta Por Caja ", Encripta(String.Format("OP=Etiqueta&CveMovimiento={0}&Modalidad={1}", CveMovimiento, "Caja"))) End If 'SI GENERO UN TRASPASO AL ALMACEN DE DEVOLUCION @@ -3738,7 +3721,6 @@ Partial Class Inventarios_RecepcionAlmacen Msg.AppendFormat("
Imprimir Movimiento ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimiento))) End If - 'If CveMovtoSalidaDirecta > 0 Then ' Msg.AppendFormat("

Movimientos de control:
") ' link = String.Format("{1}", CveMovtoSalidaDirecta, FolioSalidaDirecta) @@ -3760,8 +3742,6 @@ Partial Class Inventarios_RecepcionAlmacen link = String.Format("{1}", MovtosSalidaDirecta(ind), FoliosSalidaDirecta(ind)) Msg.AppendFormat("
Movimiento de Salida Folio: {0}", link) Next - - End If 'APARTADO @@ -3784,7 +3764,6 @@ Partial Class Inventarios_RecepcionAlmacen 'CONTABILIDAD Msg.Append(MensajeContabilidad) - Alert(Msg.ToString, TipoMensaje.MsgInformacion) If ObjInventario.RecepcionAlmacenGet(CveCompraSurtir, -1, -1, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then @@ -3793,7 +3772,6 @@ Partial Class Inventarios_RecepcionAlmacen BtnGuardar.Visible = True End If Limpia() - Else ObjInventario.RollBack() If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack() @@ -3809,10 +3787,7 @@ Partial Class Inventarios_RecepcionAlmacen End Sub Private Sub RenombrarBitacoras() - - Dim fechaActual As String = DateTime.Now.ToString("yyyyMMddHHmmss") - Dim fib As New FileInfo(ArchivoBitacora) Dim fibd As New FileInfo(ArchivoBitacoraDetalle) @@ -4277,18 +4252,16 @@ Partial Class Inventarios_RecepcionAlmacen CveOCSurtir = CveOC LbProveedor.Text = ObjOC.DtResultados.Rows(0)("RazonSocial").ToString HLFolio.Text = ObjOC.DtResultados.Rows(0)("Folio").ToString - If UsuarioActual.TienePermisoProceso(201) Then - HLFolio.NavigateUrl = $"/OC/OC.aspx?OC={CveOCSurtir}" - End If + If UsuarioActual.TienePermisoProceso(201) Then HLFolio.NavigateUrl = $"/OC/OC.aspx?OC={CveOCSurtir}" LbDescripcionCompra.Text = ObjOC.DtResultados.Rows(0)("Descripcion").ToString - CveMoneda = ObjOC.DtResultados.Rows(0)("CveMoneda").ToString.ToEntero lbDescripcion.Text = ObjOC.DtResultados.Rows(0)("Descripcion").ToString TotalCompraOC = ObjOC.DtResultados.Rows(0)("SubTotal").ToString.ToDecimal - 'TipoCambio = ObjOC.DtResultados.Rows(0)("TipoCambio").ToString.ToDecimal TipoCambio = 0 TipoMovimiento = 1 + ArchivoBitacora = String.Format("{0}Temp\RecepcionOCDT_{1}_{2}.xml", UsuarioActual.Empresa.Ruta, UsuarioActual.CveUsuario, CveOCSurtir) + ArchivoBitacoraDetalle = String.Format("{0}Temp\RecepcionOCDTD_{1}_{2}.xml", UsuarioActual.Empresa.Ruta, UsuarioActual.CveUsuario, CveOCSurtir) If ObjInventario.RecepcionAlmacenOCGet(CveOC, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then DtDatosDetalle = Nothing diff --git a/OS/OrdenesServicios.aspx.vb b/OS/OrdenesServicios.aspx.vb index e105ebc35..d116062a3 100644 --- a/OS/OrdenesServicios.aspx.vb +++ b/OS/OrdenesServicios.aspx.vb @@ -5,14 +5,6 @@ Imports Extensiones Imports System.IO Imports System.Data Imports System.Data.SqlClient -Imports System.Diagnostics -Imports System.ServiceModel.Security -Imports RVCFDI.RVLTimbrado -Imports Microsoft.Owin.Security.Provider -Imports Telerik.Web.UI -Imports ADSNetLibrary.SIGAPI.Services.SAT.DescargaCFDI - - Partial Class OS_OrdenesServicios Inherits ClsPaginas @@ -3125,7 +3117,8 @@ Partial Class OS_OrdenesServicios Dim Lote As String = GVRow.DataKey("Lote") Dim CveUM As Integer = GVRow.DataKey("CveUM").ToEntero Dim FechaCaducidad As DateTime = GVRow.DataKey("FechaCaducidad").ToDate - If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadRegistro, CveUM, CvePS, 0, Lote:=Lote, Serie:=Serie, FechaCaducidad:=FechaCaducidad) Then + Dim CveVentaDetalle As Integer = GVRow.DataKey("CveVentaDetalle").ToEntero + If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadRegistro, CveUM, CvePS, 0, Lote:=Lote, Serie:=Serie, FechaCaducidad:=FechaCaducidad, CveVentaDetalle:=CveVentaDetalle) Then Alert("Error al agregar detalle de movimiento.", TipoMensaje.MsgAdvertencia) ProcesoOK = False Exit For @@ -3705,14 +3698,8 @@ Partial Class OS_OrdenesServicios Try Dim resp As Modelos.Factura.MCancelacionVentaMensaje = Nothing If ObjFacturaCancelacion IsNot Nothing AndAlso ObjFacturaCancelacion.CveVenta > 0 Then - - Dim SWatch As New Stopwatch - SWatch.Start() - Dim DevAlm As Boolean = True - ObjFacturaCancelacion.CveAlmacenDevolucion = CveAlmacenDevolucion - resp = ObjFacturaCancelacion.CancelarFactura(2, New List(Of Integer), CveMotivoCancelacion:=CveMotivoCancelacion, Motivo:="Cancelacion de Orden de servicio") If resp.HuboError Then diff --git a/SigAyuda.aspx b/SigAyuda.aspx index fcf0a1a56..4b4f934bf 100644 --- a/SigAyuda.aspx +++ b/SigAyuda.aspx @@ -6,13 +6,15 @@