This commit is contained in:
2021-02-11 18:23:26 -07:00
8 changed files with 99 additions and 77 deletions

View File

@@ -2918,11 +2918,12 @@ Public Class ClsInventarios
#End Region #End Region
#Region " INVENTARIOS - VENTAS " #Region " INVENTARIOS - VENTAS "
Public Function EntregaAlmacenGet(CveVenta As Integer) As Boolean Public Function EntregaAlmacenGet(CveVenta As Integer, Optional CveAlmacen As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Inv_EntregaAlmacenGet") DataAdapter("PA_Inv_EntregaAlmacenGet")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta .Add("@CveVenta", SqlDbType.Int).Value = CveVenta
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
End With End With
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)

View File

@@ -83,18 +83,18 @@ Public Class ClsValidaCFDi
Return Me.EsValida Return Me.EsValida
End Function End Function
Private Sub VerificaCFDI() Private Sub VerificaCFDI()
Dim Importe As String = LImporte.ToString("F6").PadLeft(17, "0")
Dim MsgError As String = ""
Dim MsgError2 As String = ""
Try Try
Dim wsConsultaCFDI As New wsValidaCFDi2.ConsultaCFDIServiceClient Dim wsConsultaCFDI As New wsValidaCFDi2.ConsultaCFDIServiceClient
Dim oAcuse As New wsValidaCFDi2.Acuse Dim oAcuse As New wsValidaCFDi2.Acuse
'oAcuse = wsConsultaCFDI.Consulta("?re=BEN9501023I0&rr=SARM8209281F1&tt=440.000000&id=EC609EC1-5F63-4333-A2B8-2EDC10B68075") 'oAcuse = wsConsultaCFDI.Consulta("?re=BEN9501023I0&rr=SARM8209281F1&tt=440.000000&id=EC609EC1-5F63-4333-A2B8-2EDC10B68075")
'?re=BEN9501023I0&rr=SARM8209281F1&tt=440.000000&id=EC609EC1-5F63-4333-A2B8-2EDC10B68075 '?re=BEN9501023I0&rr=SARM8209281F1&tt=440.000000&id=EC609EC1-5F63-4333-A2B8-2EDC10B68075
Dim Importe As String = LImporte.ToString("F6").PadLeft(17, "0")
oAcuse = wsConsultaCFDI.Consulta(String.Format("?re={0}&rr={1}&tt={2}&id={3}", LRFCEmisor, LRFCReceptor, Importe, LFolioFiscal.ToUpper)) oAcuse = wsConsultaCFDI.Consulta(String.Format("?re={0}&rr={1}&tt={2}&id={3}", LRFCEmisor, LRFCReceptor, Importe, LFolioFiscal.ToUpper))
'oAcuse = wsConsultaCFDI.Consulta("?re=LESA6211234B2&rr=GCO890418M56&tt=0000001360.000000&id=0C8BAD9C-A8C6-4A48-8FF5-0687AC6F1581") 'oAcuse = wsConsultaCFDI.Consulta("?re=LESA6211234B2&rr=GCO890418M56&tt=0000001360.000000&id=0C8BAD9C-A8C6-4A48-8FF5-0687AC6F1581")
'Alert(oAcuse.Estado) 'Alert(oAcuse.Estado)
@@ -106,12 +106,19 @@ Public Class ClsValidaCFDi
End If End If
If oAcuse.ValidacionEFOS = "100" Then If oAcuse.ValidacionEFOS = "100" Then
EnListaEFOS = True EnListaEFOS = True
Else Else
EnListaEFOS = False EnListaEFOS = False
End If End If
Catch ex As Exception
'SI NO PUEDE ENCONTRAR EL ESTATUS UTILIZA EL SERVICIO PARA ESTATUS DE CANCELACION MsgError = "Op1. No se pudo validar la vigencia ante el SAT "
GuardaLog(ex.Message)
End Try
Try
'SI NO PUEDE ENCONTRAR EL ESTATUS UTILIZA EL SERVICIO PARA ESTATUS DE CANCELACION
If EsValida = 0 Then If EsValida = 0 Then
Dim Vigencia = Timbrado.VerificarVigenciaSAT(LFolioFiscal.ToUpper, LRFCEmisor, LRFCReceptor, Importe, True) Dim Vigencia = Timbrado.VerificarVigenciaSAT(LFolioFiscal.ToUpper, LRFCEmisor, LRFCReceptor, Importe, True)
@@ -132,18 +139,24 @@ Public Class ClsValidaCFDi
End If End If
Else Else
EsValida = 0 EsValida = 0
End If End If
Else Else
EsValida = 0 EsValida = 0
End If End If
End If End If
Catch ex As Exception
Catch ex As Exception MsgError2 = "Op2. No se pudo validar la vigencia ante el SAT "
OnError("Ocurrió un error al consultar la vigencia ante el SAT", ex) GuardaLog(ex.Message)
End Try End Try
'sino se pudo validar, que muestre el mensaje de error, pero solo un mensaje
If EsValida = 0 AndAlso (MsgError <> "" OrElse MsgError2 <> "") Then
If MsgError <> "" Then Alert(MsgError, TipoMensaje.MsgError) Else If MsgError2 <> "" Then Alert(MsgError2, TipoMensaje.MsgError)
End If
End Sub End Sub
Private Sub Verificar() Private Sub VerificaWeb()
Try Try
Dim URL As String = "https://verificacfdi.facturaelectronica.sat.gob.mx/" Dim URL As String = "https://verificacfdi.facturaelectronica.sat.gob.mx/"

View File

@@ -221,7 +221,7 @@ public partial class CRM_CatEmpresasCRM : ClsPaginas
} }
else else
{ {
Alert(String.Format("El Giro de Empresa '{0}'", Giro), ModExtensiones.TipoMensaje.MsgAdvertencia); Alert(String.Format("El Giro de Empresa '{0}', No está especificado", Giro), ModExtensiones.TipoMensaje.MsgAdvertencia);
TieneError = true; TieneError = true;
break; break;
} }

View File

@@ -2884,7 +2884,7 @@ Partial Class Inventarios_EntregaAlmacen
Dim CveCliente As Integer = ObjVentas.DtResultados(0)("CveCliente").ToString().ToEntero() Dim CveCliente As Integer = ObjVentas.DtResultados(0)("CveCliente").ToString().ToEntero()
Dim ClienteNombre As String = ObjVentas.DtResultados(0)("ClienteNombre").ToString() Dim ClienteNombre As String = ObjVentas.DtResultados(0)("ClienteNombre").ToString()
Dim Serie As String = ObjVentas.DtResultados(0)("SerieFolio").ToString() Dim Serie As String = ObjVentas.DtResultados(0)("SerieFolio").ToString()
Dim TotalCosto As Decimal = DtCostos.SUMD("Total").RoundSQL() Dim TotalCosto As Decimal = DtCostos.SUMD("Total").RoundAD()
Dim TotalCostoAcumulado As Decimal = 0 Dim TotalCostoAcumulado As Decimal = 0
Dim cont As Integer = 1 Dim cont As Integer = 1
@@ -2898,13 +2898,13 @@ Partial Class Inventarios_EntregaAlmacen
ValorMultiplicador = -1 ValorMultiplicador = -1
End If End If
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inventario/RecepcionEntrega", 4, TotalCosto, TotalCosto, 1, Fecha, ClienteNombre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inventario/EntregaAlmacen", 4, TotalCosto, TotalCosto, 1, Fecha, ClienteNombre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
'Se agrega movimiento separado por la cuenta de ventas (ER) 'Se agrega movimiento separado por la cuenta de ventas (ER)
If CvePrePoliza > 0 Then If CvePrePoliza > 0 Then
For Each RowInv As DataRow In tmpCostos.Rows For Each RowInv As DataRow In tmpCostos.Rows
ValorInventario = DtCostos.SUMD("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").RoundSQL() ValorInventario = DtCostos.SUMD("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").RoundAD()
TotalCostoAcumulado += ValorInventario TotalCostoAcumulado += ValorInventario
'cuando es el último movimiento y hay diferencias en los importes 'cuando es el último movimiento y hay diferencias en los importes

View File

@@ -199,71 +199,74 @@ Partial Class LogIn
'Dim UsuarioAsignaciones As Usuario = Nothing 'Dim UsuarioAsignaciones As Usuario = Nothing
Dim isgps = Request.Url.Host.ToUpper().Contains("SIGNALSGPS".ToUpper()) Dim isgps = Request.Url.Host.ToUpper().Contains("SIGNALSGPS".ToUpper())
Usuario = ObjUsuario.ValidaUsuario(txtUsuario.Text, Encripta(TxtContraseña.Text.Trim), IMEI, CvePlataforma:=If(isgps, 3, 1)) Usuario = ObjUsuario.ValidaUsuario(txtUsuario.Text, Encripta(TxtContraseña.Text.Trim), IMEI, CvePlataforma:=If(isgps, 3, -1))
'UsuarioAsignaciones = ObjUsuario.ValidaUsuarioAsignacion(Usuario.CveUsuario, Usuario.CveEmpresa) 'UsuarioAsignaciones = ObjUsuario.ValidaUsuarioAsignacion(Usuario.CveUsuario, Usuario.CveEmpresa)
If Not isgps AndAlso Usuario IsNot Nothing AndAlso Usuario.CvePlataforma = 3 Then ' SI ES de la plataforma 3(GPS), no debe de entar por liga normal
Usuario = Nothing
End If
ADSSessionConfig.sessionUser = Usuario ADSSessionConfig.sessionUser = Usuario
ADSSessionConfig.sessionDpage = False ADSSessionConfig.sessionDpage = False
ObjUsuario.Dispose() ObjUsuario.Dispose()
If Usuario IsNot Nothing Then If Usuario IsNot Nothing Then
If Not Usuario.AutorizadoxIP OrElse (HddAdsCodex.Text.Length > 0 AndAlso Usuario.CodigoAutorizado = HddAdsCodex.Text) Then If Not Usuario.AutorizadoxIP OrElse (HddAdsCodex.Text.Length > 0 AndAlso Usuario.CodigoAutorizado = HddAdsCodex.Text) Then
CreaObjetoEmpresa(Usuario) CreaObjetoEmpresa(Usuario)
ADSSessionConfig.sessionUser.MultipleEmpresa = True ADSSessionConfig.sessionUser.MultipleEmpresa = True
Dim x As New ADSSessionObj(Usuario.CveUsuario, Usuario.CveEmpresa) Dim x As New ADSSessionObj(Usuario.CveUsuario, Usuario.CveEmpresa)
Dim _sessionid = Encripta(String.Format("{0}|{1}", Usuario.CveUsuario, x.SessionID)) Dim _sessionid = Encripta(String.Format("{0}|{1}", Usuario.CveUsuario, x.SessionID))
x = ADSSessionConfig.SessionManager(OpcionSession.agregarSession, x) x = ADSSessionConfig.SessionManager(OpcionSession.agregarSession, x)
If Usuario.CvePlataforma = 6 And Usuario.CveRol = 10 Then If Usuario.CvePlataforma = 6 And Usuario.CveRol = 10 Then
'PLATAFORMA PORTAL CLIENTE 'PLATAFORMA PORTAL CLIENTE
'FormsAuthentication.RedirectFromLoginPage(_sessionid, False) 'FormsAuthentication.RedirectFromLoginPage(_sessionid, False)
'Response.Redirect("/PortalCliente/PortalCliente.aspx", True) 'Response.Redirect("/PortalCliente/PortalCliente.aspx", True)
ReturnUrl = "/PortalCliente/PortalCliente.aspx" ReturnUrl = "/PortalCliente/PortalCliente.aspx"
ElseIf Usuario.CvePlataforma = 7 And Usuario.CveRol = 11 Then ElseIf Usuario.CvePlataforma = 7 And Usuario.CveRol = 11 Then
'PLATAFORMA PORTAL PROVEEDOR 'PLATAFORMA PORTAL PROVEEDOR
'FormsAuthentication.RedirectFromLoginPage(Encripta(Usuario.CveUsuario), False) 'FormsAuthentication.RedirectFromLoginPage(Encripta(Usuario.CveUsuario), False)
'Response.Redirect("/PortalProveedor/PortalProveedor.aspx", True) 'Response.Redirect("/PortalProveedor/PortalProveedor.aspx", True)
ReturnUrl = "/PortalProveedor/PortalProveedor.aspx" ReturnUrl = "/PortalProveedor/PortalProveedor.aspx"
ElseIf Usuario.CveRol = 1200 And Usuario.Acceso > 0 Then ElseIf Usuario.CveRol = 1200 And Usuario.Acceso > 0 Then
'PLATAFORMA GPS 'PLATAFORMA GPS
Usuario.CvePlataforma = 3 Usuario.CvePlataforma = 3
'FormsAuthentication.RedirectFromLoginPage(Encripta(Usuario.CveUsuario), False) 'FormsAuthentication.RedirectFromLoginPage(Encripta(Usuario.CveUsuario), False)
'Response.Redirect("/PortalGPS/InicioGPS.aspx", True) 'Response.Redirect("/PortalGPS/InicioGPS.aspx", True)
ReturnUrl = "/PortalGPS/InicioGPS.aspx" ReturnUrl = "/PortalGPS/InicioGPS.aspx"
Else Else
'PLATAFORMA SIG 'PLATAFORMA SIG
CType(Session("UsuarioSIG"), Usuario).CvePlataforma = 1 CType(Session("UsuarioSIG"), Usuario).CvePlataforma = 1
Dim dt As Data.DataTable = GlobalDTUsuarios(Usuario.CveUsuario) Dim dt As Data.DataTable = GlobalDTUsuarios(Usuario.CveUsuario)
If dt IsNot Nothing Then If dt IsNot Nothing Then
If dt.Rows.Count >= 1 Then If dt.Rows.Count >= 1 Then
If dt.Rows.Count > 1 Then If dt.Rows.Count > 1 Then
Usuario.MultipleEmpresa = True Usuario.MultipleEmpresa = True
End If
'FormsAuthentication.RedirectFromLoginPage(Encripta(Usuario.CveUsuario), False)
End If End If
'FormsAuthentication.RedirectFromLoginPage(Encripta(Usuario.CveUsuario), False)
End If End If
dt.Dispose()
End If End If
dt.Dispose()
Dim cookie = FormsAuthentication.GetAuthCookie(Usuario.CveUsuario, False)
Response.Cookies.Add(cookie)
RegistraScript(String.Format("opennewlocation('{0}','{1}')", ReturnUrl, ""))
'Response.Redirect(ReturnUrl, True)
Else
Alert("El usuario no esta autorizado en este equipo, favor de contactar al administrador de usuarios.", TipoMensaje.MsgAdvertencia)
End If End If
'If Usuario.Acceso > 0 Then
Dim cookie = FormsAuthentication.GetAuthCookie(Usuario.CveUsuario, False) 'Else
Response.Cookies.Add(cookie) ' Alert("Usuario con acceso limitado.", TipoMensaje.MsgAdvertencia)
RegistraScript(String.Format("opennewlocation('{0}','{1}')", ReturnUrl, "")) 'End If
'Response.Redirect(ReturnUrl, True)
Else Else
Alert("El usuario no esta autorizado en este equipo, favor de contactar al administrador de usuarios.", TipoMensaje.MsgAdvertencia) Alert("Usuario y/o Contraseña incorrectos.", TipoMensaje.MsgAdvertencia)
End If End If
'If Usuario.Acceso > 0 Then
'Else
' Alert("Usuario con acceso limitado.", TipoMensaje.MsgAdvertencia)
'End If
Else
Alert("Usuario y/o Contraseña incorrectos.", TipoMensaje.MsgAdvertencia)
End If End If
End If
End Sub End Sub
Private Sub CreaObjetoEmpresa(ByRef UsuarioActual As Usuario) Private Sub CreaObjetoEmpresa(ByRef UsuarioActual As Usuario)

View File

@@ -833,7 +833,7 @@
<asp:UpdatePanel ID="UpUniformesResguardo" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpUniformesResguardo" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvUniformesResguardo" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" DataKeyNames="CveAlmacen,CodigoPS,PU,CveUM,CveMovimiento,CveMovimientoDetalle,CvePS,AplicaSeccion,AplicaSerie,CveSeccionAlmacen,Cantidad" ToolTip="" <asp:GridView ID="GvUniformesResguardo" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" DataKeyNames="CveAlmacen,CodigoPS,PU,CveUM,CveMovimiento,CveMovimientoDetalle,CvePS,AplicaSeccion,AplicaSerie,CveSeccionAlmacen,Cantidad,Serie" ToolTip=""
CssClass="table table-hover table-advance Widthall" GridLines="None"> CssClass="table table-hover table-advance Widthall" GridLines="None">
<Columns> <Columns>
<asp:HyperLinkField DataNavigateUrlFields="CveMovimiento" Target="_blank" HeaderText="Folio" DataNavigateUrlFormatString="../Inventarios/EntradasSalidas.aspx?CveMovimiento={0}" DataTextField="Folio" /> <asp:HyperLinkField DataNavigateUrlFields="CveMovimiento" Target="_blank" HeaderText="Folio" DataNavigateUrlFormatString="../Inventarios/EntradasSalidas.aspx?CveMovimiento={0}" DataTextField="Folio" />
@@ -1302,7 +1302,7 @@
<asp:Label runat="server" AssociatedControlID="DDlTipoSalario" Text="Tipo Salario:"></asp:Label> <asp:Label runat="server" AssociatedControlID="DDlTipoSalario" Text="Tipo Salario:"></asp:Label>
</div> </div>
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlRegimenContratacion" Width="100%" runat="server" AppendDataBoundItems="true" DataTextField="RegimenContratacion" CssClass="form-control input-sm select2me" DataValueField="CveSATRegimenContratacion" ValidationGroup="GrpGuardar"> <asp:DropDownList ID="DdlRegimenContratacion" Width="100%" runat="server" AppendDataBoundItems="true" DataTextField="ClaveRegimenContratacion" CssClass="form-control input-sm select2me" DataValueField="CveSATRegimenContratacion" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
<asp:Label runat="server" AssociatedControlID="DdlRegimenContratacion" Text="Régimen Contratación:"></asp:Label> <asp:Label runat="server" AssociatedControlID="DdlRegimenContratacion" Text="Régimen Contratación:"></asp:Label>
@@ -1311,7 +1311,7 @@
</div> </div>
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlRiesgoPuesto" runat="server" Width="100%" AppendDataBoundItems="true" DataTextField="RiesgoPuesto" CssClass="form-control input-sm select2me" DataValueField="CveSATRiesgoPuesto" ValidationGroup="GrpGuardar"> <asp:DropDownList ID="DdlRiesgoPuesto" runat="server" Width="100%" AppendDataBoundItems="true" DataTextField="ClaveRiesgoPuesto" CssClass="form-control input-sm select2me" DataValueField="CveSATRiesgoPuesto" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
<asp:Label runat="server" AssociatedControlID="DdlRiesgoPuesto" Text="Riesgo Puesto:"></asp:Label> <asp:Label runat="server" AssociatedControlID="DdlRiesgoPuesto" Text="Riesgo Puesto:"></asp:Label>

View File

@@ -5183,6 +5183,10 @@ Partial Class RH_Personal
If row.DataKey("AplicaSerie").ToString = "True" Then If row.DataKey("AplicaSerie").ToString = "True" Then
divSerie.Visible = True divSerie.Visible = True
TxtLiberarSerie.Text = row.DataKey("Serie")
TxtLiberarSerie.Enabled = False
TxtCantidadResguardo.Enabled = False
TxtCantidadResguardo.Text = "1"
End If End If

View File

@@ -22,7 +22,8 @@ Partial Class PopUpSeleccionarEmpresa
If Dt IsNot Nothing Then If Dt IsNot Nothing Then
If Dt.Rows.Count > 0 Then If Dt.Rows.Count > 0 Then
Dim NumRegistros As Integer = 0 Dim NumRegistros As Integer = 0
GvEmpresas.DataSource = Dt.FiltraParametros("(CvePlataforma = 1 OR (CvePlataforma = 3 AND CveCliente IS NULL)) AND CvePlataformaUsuario NOT IN (6,7)", "Empresa") GvEmpresas.DataSource = Dt.FiltraParametros("(CvePlataforma = 1 OR (CvePlataforma = 3 AND CveCliente IS NULL)) AND CvePlataformaUsuario NOT IN (6,7)", "Empresa", {"CveEmpresa", "Empresa", "CveUsuario", "Contraseña", "Usuario"})
'GvEmpresas.DataSource = Dt.FiltraParametros("(CvePlataforma = 1 OR (CvePlataforma = 3 AND CveCliente IS NULL)) AND CvePlataformaUsuario NOT IN (6,7)", "Empresa")
NumRegistros += DirectCast(GvEmpresas.DataSource, System.Data.DataTable).Rows.Count NumRegistros += DirectCast(GvEmpresas.DataSource, System.Data.DataTable).Rows.Count
GvPortalRastreo.DataSource = Dt.FiltraParametros("CvePlataforma = 3 AND CveCliente IS NOT NULL", "Empresa") GvPortalRastreo.DataSource = Dt.FiltraParametros("CvePlataforma = 3 AND CveCliente IS NOT NULL", "Empresa")