From aa15993c47487d58c487c0b3b2ed093fe968aa3a Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 4 Nov 2023 09:01:25 -0700 Subject: [PATCH] -- double a decimal --- Ashx/E48.ashx | 12 ++++++------ CGame/Empaque.aspx.cs | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Ashx/E48.ashx b/Ashx/E48.ashx index b4569400e..d56099cc6 100644 --- a/Ashx/E48.ashx +++ b/Ashx/E48.ashx @@ -54,7 +54,7 @@ Public Class E48 : Implements IHttpHandler, IRequiresSessionState If context.Request.InputStream IsNot Nothing Then Using reader As New StreamReader(context.Request.InputStream) - Dim json = reader.ReadToEnd + Dim json As String = reader.ReadToEnd If Not String.IsNullOrEmpty(json) Then JsonRequest = JObject.Parse(json) @@ -118,11 +118,11 @@ Public Class E48 : Implements IHttpHandler, IRequiresSessionState ''VALIDA EXISTENCIAS Dim Cont As Integer = 0 - Dim ListaPS = JArray.Parse(JsonRequest("productos").ToString()) + Dim ListaPS As JArray = JArray.Parse(JsonRequest("productos").ToString()) For Each JsonPS As JObject In ListaPS - Dim Cantidad As Double = JsonPS("cantidad").ToString.ToDouble() + Dim Cantidad As Decimal = JsonPS("cantidad").ToString.ToDecimal() Dim dtt As DataTable = GlobalDTPSSimplificado(Codigo:=JsonPS("codigo").ToString()) Dim CvePS As Integer = dtt.FiltroPrimeroValor("CvePS").ToEntero() Dim CveUM As Integer = dtt.FiltroPrimeroValor("CveUnidadMedida").ToEntero() @@ -219,7 +219,7 @@ Public Class E48 : Implements IHttpHandler, IRequiresSessionState If IDPoliza > 0 Then If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then - Dim DtMovtos = ObjInventario.DtResultados + Dim DtMovtos As DataTable = ObjInventario.DtResultados Importe = DtMovtos.SUMD("Total", "Estatus = ''") If Importe > 0 Then @@ -403,8 +403,8 @@ Public Class E48 : Implements IHttpHandler, IRequiresSessionState Dim ObjUsuarios As New ClsSisUsuarios If ObjUsuarios.GetUsuarios(CveUsuario) Then If ObjUsuarios.DtResultados.Rows.Count > 0 Then - Dim Usuario = ObjUsuarios.DtResultados.Rows(0)("Usuario").ToString() - Dim Contrasenia = ObjUsuarios.DtResultados.Rows(0)("Contraseña").ToString() + Dim Usuario As String = ObjUsuarios.DtResultados.Rows(0)("Usuario").ToString() + Dim Contrasenia As String = ObjUsuarios.DtResultados.Rows(0)("Contraseña").ToString() UsuarioActual = ObjUsuarios.ValidaUsuario(Usuario, Contrasenia, IMEI, CveEmpresa) UsuarioActual.CveEmpresa = CveEmpresa CreaObjetoEmpresa(UsuarioActual) diff --git a/CGame/Empaque.aspx.cs b/CGame/Empaque.aspx.cs index 2c989aba7..356cb590e 100644 --- a/CGame/Empaque.aspx.cs +++ b/CGame/Empaque.aspx.cs @@ -993,7 +993,7 @@ public partial class Empaque : ClsPaginas } else { - if (!ObjInv.AddMovimientoDetalle(CveMovimiento, Row.FCTextBox("TxtCantidad").Text.ToDouble(), Row.DataKey("CveUnidadMedida").ToString().ToEntero(), Row.DataKey("CvePS").ToString().ToEntero(), 0, -1)) + if (!ObjInv.AddMovimientoDetalle(CveMovimiento, Row.FCTextBox("TxtCantidad").Text.ToDecimal(), Row.DataKey("CveUnidadMedida").ToString().ToEntero(), Row.DataKey("CvePS").ToString().ToEntero(), 0, -1)) { Alert("Ocurrió un error al guardar los detalles del movimiento de almacén", TipoMensaje.MsgError); Error = true;