From acf451c328b27350e888e16178683c4a6e923b9e Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 7 Nov 2020 10:58:23 -0700 Subject: [PATCH 1/4] -- cuenta no procede, es cvecuentabancaria --- App_Code/ClsContabilidad.vb | 1 - 1 file changed, 1 deletion(-) diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index ddcd598c7..ed8ddbc71 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -5551,7 +5551,6 @@ Public Class ClsContabilidad .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@TipoCambio", SqlDbType.Int).Value = TipoCambio .Add("@TCEspecifico", SqlDbType.Float).Value = TCEspecifico - .Add("@Cuenta", SqlDbType.NVarChar).Value = Cuenta End With Try SqlAdapter.Fill(Data) From b1f41ac4f24d1233da51d255fc438c3ae0b296ab Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 7 Nov 2020 10:58:51 -0700 Subject: [PATCH 2/4] mensaje de alerta al cargar proyectados --- Inventarios/KardexAlmacenHorizontal.aspx.vb | 24 +++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/Inventarios/KardexAlmacenHorizontal.aspx.vb b/Inventarios/KardexAlmacenHorizontal.aspx.vb index f53140e8f..31f4b7296 100644 --- a/Inventarios/KardexAlmacenHorizontal.aspx.vb +++ b/Inventarios/KardexAlmacenHorizontal.aspx.vb @@ -393,6 +393,7 @@ Partial Class Inventarios_KardexAlmacen Private Sub AgregarProyeccion(dt As DataTable) Dim TieneError As Boolean = False + Dim StrCodigo As New StringBuilder Dim ObjInventarios As New ClsInventarios ObjInventarios.IniciaTransacSQL() @@ -400,25 +401,36 @@ Partial Class Inventarios_KardexAlmacen Dim DtProductosEmpresas As DataTable = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa) For Each dtRow As DataRow In dt.Rows Dim Codigo As String = dtRow("Código").ToString - Dim CvePS As Integer = DtProductosEmpresas.FiltroPrimeroValor("CvePS", String.Format("Codigo = '{0}'", Codigo)) - Dim Cantidad As Decimal = dtRow("Cantidad").ToString.ToDecimal - If Not ObjInventarios.AddMovimientosProyectados(CvePS, Cantidad, RblProyeccionOpcion.SelectedValue.ToEntero()) Then - TieneError = True - Exit For + + If Codigo <> "" Then + Dim CvePS As Integer = DtProductosEmpresas.FiltroPrimeroValor("CvePS", String.Format("Codigo = '{0}'", Codigo)).ToEntero + Dim Cantidad As Decimal = dtRow("Cantidad").ToString.ToDecimal + If CvePS <= 0 Then + TieneError = True + StrCodigo.AppendFormat(" {0}
", Codigo) + Exit For + ElseIf Not ObjInventarios.AddMovimientosProyectados(CvePS, Cantidad, RblProyeccionOpcion.SelectedValue.ToEntero()) Then + TieneError = True + StrCodigo.Append("Ocurrio un error al registrar") + Exit For + End If End If + Next Else TieneError = True End If If TieneError Then + Alert("Ocurrio un error al registrar el Código no encontrado: " & StrCodigo.ToString, TipoMensaje.MsgError) ObjInventarios.RollBack() Else ObjInventarios.Commit() + Alert("Se ha agregado la proyección de productos correctamente") End If ObjInventarios.Dispose() RegistraScript(String.Format("$('#{0}').modal('hide');", "DivProyeccion")) - Alert("Se ha agregado la proyección de productos correctamente") + End Sub Private Function ReadExcelFile(ByVal flatFilePath As String, ByVal firstRowHasHeaders As Boolean) As DataTable From 621c06201e14c41a761df86706992ba60d77a370 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 7 Nov 2020 10:59:14 -0700 Subject: [PATCH 3/4] registro contable para traspasos --- Inventarios/EntregaAlmacen.aspx.vb | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb index 3856176b0..e21187015 100644 --- a/Inventarios/EntregaAlmacen.aspx.vb +++ b/Inventarios/EntregaAlmacen.aspx.vb @@ -2466,25 +2466,34 @@ Partial Class Inventarios_EntregaAlmacen CveMovimientoEntrada = ObjInventario.AddMovimiento(CveAlmacenTraspasoDestino, 9, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveMovimientoRelacionado:=CveMovimiento, CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero(), Modulo:="RE/G8") FolioEntrada = ObjInventario.Folio + Dim ImporteAlmacen As Decimal = 0 If CveMovimientoEntrada <= 0 Then TextoError.AppendFormat("No se pudo generar el movimiento de entrada correctamente") ErrorMovInv = True Else - If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then + If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then + ImporteAlmacen = ObjInventario.DtResultados.SUMD("Total") + For Each Dr As DataRow In ObjInventario.DtResultados.Rows If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString().ToDouble, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), Dr("PU").ToString().ToDecimal, CveAF:=Dr("CveAF").ToString().ToEntero(), CveSeccionAlmacen:=-3, Serie:=Dr("Serie").ToString(), Lote:=Dr("Lote").ToString(), FechaCaducidad:=Dr("FechaCaducidad").ToString().ToDate, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), EsInterno:=EsInterno, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString().ToEntero()) Then ErrorMovInv = True TextoError.AppendFormat("Ocurrió un error al guardar los movimientos de entrada") Exit For End If - Next + Next + Else ErrorMovInv = True TextoError.AppendFormat("Ocurrió un error al guardar los movimientos de entrada") End If End If + 'se registra + If ContabilizaMovimientoAlmacen(ObjConta, TxtFecha.Text.ToDate, HLFolio.Text, "EntregaAlmacen", CveMovimiento, CveMovimientoEntrada, ImporteAlmacen, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, True) <= 0 Then + ErrorMovInv = True + End If + Else 'REGISTRO LA PREPOLIZA DE COSTO VS ALMACEN - SALIDA ALMACEN ErrorMovInv = Not GenerarPrePoliza(ObjInventario, ObjVentas, ObjConta, CveMovimiento, TextoError) End If From 515baa9582c73bb6b3284127fb149298bda4a8f2 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 7 Nov 2020 10:59:35 -0700 Subject: [PATCH 4/4] -- modulo en l mov de almacen --- Inventarios/Consignaciones.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Inventarios/Consignaciones.aspx.vb b/Inventarios/Consignaciones.aspx.vb index e6886a8f2..a98290c76 100644 --- a/Inventarios/Consignaciones.aspx.vb +++ b/Inventarios/Consignaciones.aspx.vb @@ -849,7 +849,7 @@ Partial Class Inventarios_Consignaciones 'AGREGAMOS MOVIMIENTO If MovtoNew Then Folio = ObjInventario.GetFolioSiguiente(ConceptoDevolucion, UsuarioActual.CveEmpresa) - CveMovimiento = ObjInventario.AddMovimiento(CveAlmacen, ConceptoDevolucion, DdlMoneda.SelectedValue.ToEntero, Fecha, Folio, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveConsignacion:=CveConsignacion, Observaciones:=TxtObservacionesDevolucion.Text.Trim) + CveMovimiento = ObjInventario.AddMovimiento(CveAlmacen, ConceptoDevolucion, DdlMoneda.SelectedValue.ToEntero, Fecha, Folio, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveConsignacion:=CveConsignacion, Observaciones:=TxtObservacionesDevolucion.Text.Trim, Modulo:="Consig") End If If CveMovimiento > 0 Then