Validar cantidades al recibir usados

This commit is contained in:
2022-08-19 11:24:39 -07:00
parent daa1b59028
commit 7e255cc50e
2 changed files with 14 additions and 14 deletions

View File

@@ -278,19 +278,19 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
Return retorno Return retorno
End Function End Function
Private Function GetTokenAngular(context As HttpContext) As String Private Function GetTokenAngular(context As HttpContext) As String
Dim usuario As Usuario = UsuarioActual(context) 'Dim usuario As Usuario = UsuarioActual(context)
Dim tokenDescriptor = New Microsoft.IdentityModel.Tokens.SecurityTokenDescriptor With { 'Dim tokenDescriptor = New Microsoft.IdentityModel.Tokens.SecurityTokenDescriptor With {
.Subject = New System.Security.Claims.ClaimsIdentity(New System.Security.Claims.Claim() {New System.Security.Claims.Claim("CvePlataforma", usuario.CvePlataforma.ToString()), '.Subject = New System.Security.Claims.ClaimsIdentity(New System.Security.Claims.Claim() {New System.Security.Claims.Claim("CvePlataforma", usuario.CvePlataforma.ToString()),
New System.Security.Claims.Claim("CveUsuario", usuario.CveUsuario.ToString()), New System.Security.Claims.Claim("CveEmpresa", usuario.CveEmpresa.ToString()), 'New System.Security.Claims.Claim("CveUsuario", usuario.CveUsuario.ToString()), New System.Security.Claims.Claim("CveEmpresa", usuario.CveEmpresa.ToString()),
New System.Security.Claims.Claim("CveRol", usuario.CveRol.ToString()), New System.Security.Claims.Claim("Fecha", Date.Now.ToLongDateString())}), 'New System.Security.Claims.Claim("CveRol", usuario.CveRol.ToString()), New System.Security.Claims.Claim("Fecha", Date.Now.ToLongDateString())}),
.Expires = Date.UtcNow.AddHours(3), '.Expires = Date.UtcNow.AddHours(3),
.SigningCredentials = New Microsoft.IdentityModel.Tokens.SigningCredentials( '.SigningCredentials = New Microsoft.IdentityModel.Tokens.SigningCredentials(
New Microsoft.IdentityModel.Tokens.SymmetricSecurityKey(Encoding.ASCII.GetBytes("*_AsistenciaDesarrolloSistemas-SIGAPI_*17-06-2020")), 'New Microsoft.IdentityModel.Tokens.SymmetricSecurityKey(Encoding.ASCII.GetBytes("*_AsistenciaDesarrolloSistemas-SIGAPI_*17-06-2020")),
Microsoft.IdentityModel.Tokens.SecurityAlgorithms.HmacSha256Signature)} 'Microsoft.IdentityModel.Tokens.SecurityAlgorithms.HmacSha256Signature)}
Dim tokenHandler = New System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler() 'Dim tokenHandler = New System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler()
Dim newtoken = tokenHandler.CreateToken(tokenDescriptor) 'Dim newtoken = tokenHandler.CreateToken(tokenDescriptor)
Dim stokenn As String = tokenHandler.WriteToken(newtoken) 'Dim stokenn As String = tokenHandler.WriteToken(newtoken)
Return stokenn Return ""
End Function End Function
Private Function sendMailLPM(context As HttpContext) As String Private Function sendMailLPM(context As HttpContext) As String

View File

@@ -1082,7 +1082,7 @@ Partial Class Inventarios_RecepcionUsados
If Valido And AgregarUsado Then If Valido And AgregarUsado Then
If ObjFactura IsNot Nothing AndAlso Me.CveRemisionRecibida > 0 Then If ObjFactura IsNot Nothing AndAlso Me.CveRemisionRecibida > 0 Then
Dim RowDetalle As DataRow = ObjFactura.DtDetalle.FiltroPrimero($"CvePS={CvePS}") Dim RowDetalle As DataRow = ObjFactura.DtDetalle.FiltroPrimero($"CveVentaDetalle={CveVentaDetalle}")
If RowDetalle IsNot Nothing Then If RowDetalle IsNot Nothing Then