From 53783c4f605010bb304366080a80863ff2fdd173 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Tue, 28 Jan 2020 09:13:49 -0700 Subject: [PATCH] Agregar total en concepto 29 --- Compras/ReembolsosComprobaciones.aspx.vb | 8 ++-- Inventarios/RecepcionUsados.aspx.vb | 52 ++++++++++++------------ 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/Compras/ReembolsosComprobaciones.aspx.vb b/Compras/ReembolsosComprobaciones.aspx.vb index bde535395..a630bed96 100644 --- a/Compras/ReembolsosComprobaciones.aspx.vb +++ b/Compras/ReembolsosComprobaciones.aspx.vb @@ -496,8 +496,8 @@ Partial Class Compras_ReembolsosComprobaciones End If Else Dim Importe28 As Decimal = TxtImporte.Text.ToDecimal - If chkajusteoi.checked Then - Importe28 = txttotal.text.todecimal + If ChkAjusteOI.Checked Then + Importe28 = TxtTotal.Text.ToDecimal End If 'AGREGO PREPOLIZA FyE If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaIERegistrado, False, Importe28, TxtObservaciones.Text, 28, TxtObservaciones.Text, TxtFechaDocumento.Text.ToDate, IdCtaPersonal, -1, CvePersonal:=CvePersonal, CveIE:=CveIERegistrado, ImporteME:=If(tipoCambio = 1, 0, TxtImporte.Text.ToDecimal), ImporteMX:=Importe28 * tipoCambio, Contabilizable:=If(CveCajaChica > 0 Or CvePersonal > 0, Not UsaSimplificacionCajaChica, True)) Then @@ -505,7 +505,7 @@ Partial Class Compras_ReembolsosComprobaciones End If End If - Else + Else CvePrePolizaIERegistrado = ObjMov.AddPrePolizas("Compras/Comprobaciones", 9, TxtImporte.Text.ToDecimal, TxtImporte.Text.ToDecimal, CveMoneda, TxtFechaPrePoliza.Text.ToDate, If(TxtObservaciones.Text.Trim = "", concepto, TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) 'SI ES CAJA CHICA REGISTRO IE CAJA CHICA @@ -524,7 +524,7 @@ Partial Class Compras_ReembolsosComprobaciones End If Else 'AGREGO PREPOLIZA FyE - If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaIERegistrado, True, TxtImporte.Text.ToDecimal, TxtObservaciones.Text, 29, TxtObservaciones.Text, TxtFechaDocumento.Text.ToDate, IdCtaPersonal, -1, CvePersonal:=CvePersonal, CveIE:=CveIERegistrado, ImporteME:=If(tipoCambio = 1, 0, TxtImporte.Text.ToDecimal), ImporteMX:=TxtImporte.Text.ToDecimal * tipoCambio) Then + If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaIERegistrado, True, TxtImporteVinculado.Text.ToDecimal, TxtObservaciones.Text, 29, TxtObservaciones.Text, TxtFechaDocumento.Text.ToDate, IdCtaPersonal, -1, CvePersonal:=CvePersonal, CveIE:=CveIERegistrado, ImporteME:=If(tipoCambio = 1, 0, TxtImporte.Text.ToDecimal), ImporteMX:=TxtImporte.Text.ToDecimal * tipoCambio) Then MsgError = "Error al registrar detalle de concepto bancario" End If End If diff --git a/Inventarios/RecepcionUsados.aspx.vb b/Inventarios/RecepcionUsados.aspx.vb index 68c89a4b4..b4c6dedeb 100644 --- a/Inventarios/RecepcionUsados.aspx.vb +++ b/Inventarios/RecepcionUsados.aspx.vb @@ -1111,13 +1111,13 @@ Partial Class Inventarios_RecepcionUsados ImporteConcepto = Dr("PU").ToString.ToDouble * GlobalTipoCambio(TxtFecha.Text.ToDate) Else ImporteConcepto = Dr("PU").ToString.ToDouble - End If + End If - If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, ImporteConcepto, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, Dr("Observaciones").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then - Mensaje = "Error al guardar los movimientos" - ErrorMovInv = True - Exit For - End If + If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, ImporteConcepto, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, Dr("Observaciones").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then + Mensaje = "Error al guardar los movimientos" + ErrorMovInv = True + Exit For + End If If CveVenta > 0 AndAlso Not ObjVentas.UpdateVentaUsadoRecibido(CveVenta, Dr("CvePS").ToString.ToEntero, True) Then Mensaje = "Error al actualizar el recibo de los usados" @@ -1139,34 +1139,34 @@ Partial Class Inventarios_RecepcionUsados End If Next - If Not ErrorMovInv Then + If Not ErrorMovInv Then - Msg.AppendFormat("
El Movimiento se registro con el Folio: {0}", ObjInventario.Folio) - Msg.AppendFormat("

Imprimir Movimiento ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimiento))) + Msg.AppendFormat("
El Movimiento se registro con el Folio: {0}", ObjInventario.Folio) + Msg.AppendFormat("

Imprimir Movimiento ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimiento))) - If IDPoliza > 0 Then Msg = Msg.AppendFormat("

Ver Póliza", IDPoliza) + If IDPoliza > 0 Then Msg = Msg.AppendFormat("

Ver Póliza", IDPoliza) - ObjInventario.Commit() ' aplica los movimientos insertados + ObjInventario.Commit() ' aplica los movimientos insertados - 'Limpia Valores cuando inserta de campos especiales - If UsuarioActual.CveEmpresa = 66 Then - DdlSubProyecto.SelectedValueExist("-1") - End If - - EnvioCorreo() - - CargaPendientesRecibir() - UPDatos.Update() - - Else - ObjInventario.RollBack() 'deshace lo insertado - CveMovimiento = 0 - Alert("ocurrió un Error al registrar los movimientos", TipoMensaje.MsgError) + 'Limpia Valores cuando inserta de campos especiales + If UsuarioActual.CveEmpresa = 66 Then + DdlSubProyecto.SelectedValueExist("-1") End If + EnvioCorreo() + + CargaPendientesRecibir() + UPDatos.Update() + + Else + ObjInventario.RollBack() 'deshace lo insertado + CveMovimiento = 0 + Alert("ocurrió un Error al registrar los movimientos", TipoMensaje.MsgError) End If + End If + End If Catch ex As Exception ObjInventario.RollBack() 'deshace lo insertado CveMovimiento = 0 @@ -2643,7 +2643,7 @@ Partial Class Inventarios_RecepcionUsados Protected Sub CargaTipoDefecto() DdlTipoDefecto.DataSource = GlobalDTAcumTiposDefecto.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}") DdlTipoDefecto.Items.Insert(0, New ListItem("Seleccione", "-1")) - DdlTipoDefecto.DataBind + DdlTipoDefecto.DataBind() End Sub Private Sub CalculaPorcentajeAjuste() Try