From 8a9db7a6c5356508ee05242cb9aa83075c41e0d8 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 16 Jul 2020 17:46:34 -0700 Subject: [PATCH 01/13] -- ajuste en recomendar la seccion --- Inventarios/AjustesSeccionAlmacen.aspx.vb | 13 ++++++++++--- Inventarios/Apartados.aspx | 4 ++-- Inventarios/Apartados.aspx.vb | 8 ++++++-- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/Inventarios/AjustesSeccionAlmacen.aspx.vb b/Inventarios/AjustesSeccionAlmacen.aspx.vb index 478c321f9..6eec3379f 100644 --- a/Inventarios/AjustesSeccionAlmacen.aspx.vb +++ b/Inventarios/AjustesSeccionAlmacen.aspx.vb @@ -76,6 +76,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen Dim CveMovimientoDetalleEntrada As Integer = 0 Dim Cont As Integer = 0 + Dim Lista As New Hashtable For Each gvr As GridViewRow In GvD.Rows 'que este seleccionado y que tenga diferente seccion @@ -84,7 +85,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen If gvr.DataKey("CveSeccionAlmacen").ToEntero > 0 Then ObjPS.UpdateAplicaSeccionAlmacen(gvr.DataKey("CvePS").ToEntero, UsuarioActual.CveEmpresa, True) End If - + Lista.Add(gvr.DataKey("CvePS").ToEntero, gvr.FCDropDownList("DDlS").SelectedValue.ToEntero) 'guardo que dato le corresponde If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, gvr.DataKey("Existencia").ToDecimal, gvr.DataKey("CveUM").ToEntero, gvr.DataKey("CvePS").ToEntero, 0, -1, CveSeccionAlmacen:=gvr.DataKey("CveSeccionAlmacen").ToEntero, Serie:=gvr.DataKey("Serie"), Lote:=gvr.DataKey("Lote"), FechaCaducidad:=gvr.DataKey("FechaCaducidad").ToDate) Then ErrorMovInv = True TextoError = "Ocurrió un error al guardar los movimientos de salida" @@ -108,15 +109,20 @@ Partial Class Inventarios_AjustesSeccionAlmacen Dim Cantidad As Decimal = Row("Cantidad").ToString().ToDecimal() Dim PU As Decimal = Row("PUOriginal").ToString().ToDecimal() Dim CveUM As Integer = Row("CveUM").ToString().ToEntero() - Dim CveSeccionAlmacen As Integer = GvD.Rows(ind).FCDropDownList("DDlS").SelectedValue.ToEntero ' IfNull(Row("CveSeccionAlmacen"), "-1").ToString().ToEntero() + Dim CveSeccionAlmacen As Integer = Lista(Row("CvePS").ToString().ToEntero()) 'GvD.Rows(ind).FCDropDownList("DDlS").SelectedValue.ToEntero ' IfNull(Row("CveSeccionAlmacen"), "-1").ToString().ToEntero() Dim CostoIndirecto As Decimal = Row("CostoIndirecto").ToString().ToDecimal() Dim Serie As String = Row("Serie").ToString() Dim Lote As String = Row("Lote").ToString() Dim FechaCaducidad As Date = IfNull(Row("FechaCaducidad"), MinFecha).ToString.ToDate + + 'actualizamos el PS, para que tenga el aplica seccion ObjPS.UpdateAplicaSeccionAlmacen(Row("CvePS").ToString().ToEntero(), UsuarioActual.CveEmpresa, True) + If Not ObjInventario.AddProductosServiciosAlmacenSeccion(CvePS, CveAlmacen, CveSeccionAlmacen) Then + ErrorMovInv = True + End If If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Cantidad, CveUM, CvePS, PU, -1, CostoIndirecto:=CostoIndirecto, CveSeccionAlmacen:=CveSeccionAlmacen, Lote:=Lote, Serie:=Serie, FechaCaducidad:=FechaCaducidad, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then ErrorMovInv = True @@ -132,11 +138,12 @@ Partial Class Inventarios_AjustesSeccionAlmacen End If End If - + Lista = Nothing End If If Not ErrorMovInv Then ObjInventario.Commit() + GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, -1, -1) = Nothing CargaDatos() Alert("El Movimiento quede registrado correctamente", TipoMensaje.MsgInformacion) Else diff --git a/Inventarios/Apartados.aspx b/Inventarios/Apartados.aspx index 36a17a7c0..27be34de9 100644 --- a/Inventarios/Apartados.aspx +++ b/Inventarios/Apartados.aspx @@ -403,7 +403,7 @@
- + @@ -418,7 +418,7 @@ - + diff --git a/Inventarios/Apartados.aspx.vb b/Inventarios/Apartados.aspx.vb index f48ad283d..21708ab8a 100644 --- a/Inventarios/Apartados.aspx.vb +++ b/Inventarios/Apartados.aspx.vb @@ -805,10 +805,14 @@ Partial Class Inventarios_Apartados If e.Row.RowType = DataControlRowType.DataRow Then e.Row.FCTextBox("TxtCantidad").Attributes.Add("onblur", String.Format("ValidaCantidad(this,{0})", e.Row.DBCampo("Cantidad"))) If CBool(e.Row.DBCampo("AplicaSeccion")) AndAlso DdlAlmacenDestinoDesapartado.SelectedValue.ToEntero > 0 Then + Dim dtt As DataTable = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacenDestinoDesapartado.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero) e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = True - e.Row.FCDropDownList("DdlSeccionAlmacen").DataSource = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacenDestinoDesapartado.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero) + e.Row.FCDropDownList("DdlSeccionAlmacen").DataSource = dtt e.Row.FCDropDownList("DdlSeccionAlmacen").DataBind() - e.Row.FCDropDownList("DdlSeccionAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1")) + If dtt.Rows.Count = 0 Then + e.Row.FCDropDownList("DdlSeccionAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1")) + End If + dtt.Dispose() End If End If From 860febad73c7111bf7ecd04a9486dab7ac9d6dbd Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Fri, 17 Jul 2020 16:55:27 -0700 Subject: [PATCH 02/13] =?UTF-8?q?Talamus=20Correci=C3=B3n=20Columnas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TareasProgramadas/Tareas119.ashx | 51 +++++++++++++++++++++++++++----- 1 file changed, 44 insertions(+), 7 deletions(-) diff --git a/TareasProgramadas/Tareas119.ashx b/TareasProgramadas/Tareas119.ashx index afd3762fe..3801b68c5 100644 --- a/TareasProgramadas/Tareas119.ashx +++ b/TareasProgramadas/Tareas119.ashx @@ -63,8 +63,36 @@ public class TareasJam : IHttpHandler string RutaClientes = $@"{ HttpContext.Current.Server.MapPath("~") }Temp\Clientes{DateTime.Now.ToString("yyyyMMdd")}.xlsx"; string RutaAlmacenes = $@"{ HttpContext.Current.Server.MapPath("~") }Temp\Almacenes{DateTime.Now.ToString("yyyyMMdd")}.xlsx"; + try + { + if (File.Exists(RutaProductos)) + { + File.Delete(RutaProductos); + } - //"ftp://us2.hostedftp.com/", "agrojam", "A12345678"; + if (File.Exists(RutaVentas)) + { + File.Delete(RutaVentas); + } + + if (File.Exists(RutaClientes)) + { + File.Delete(RutaClientes); + } + + if (File.Exists(RutaAlmacenes)) + { + File.Delete(RutaAlmacenes); + } + + } + catch (Exception ex) { + SBLog.AppendLine("Error al eliminar archivos"); + } + + + + ////"ftp://us2.hostedftp.com/", "agrojam", "A12345678"; //string FTPServer = "ftp://127.0.0.1/"; //string TFPUsr = "Toor"; //string FTPPass = "agj-3500"; @@ -148,18 +176,27 @@ public class TareasJam : IHttpHandler DTClientes.Columns[11].ColumnName = "phone.areaCode"; DTClientes.Columns[12].ColumnName = "phone.number"; - DTClientes.Columns.RemoveAt(12); - DTClientes.Columns.RemoveAt(11); - DTClientes.Columns.RemoveAt(10); - DTClientes.Columns.RemoveAt(8); - DTClientes.Columns.RemoveAt(7); + //DTClientes.Columns.RemoveAt(12); + //DTClientes.Columns.RemoveAt(11); + //DTClientes.Columns.RemoveAt(10); + //DTClientes.Columns.RemoveAt(8); + //DTClientes.Columns.RemoveAt(7); DTClientes.AcceptChanges(); DTVentas.Columns.RemoveAt(7); - DTVentas.Columns.RemoveAt(6); + //DTVentas.Columns.RemoveAt(6); + + DTVentas.Columns[3].ColumnName = "Sale Date"; + DTVentas.Columns[6].ColumnName = "Transaction ID"; DTVentas.AcceptChanges(); + + DTAlmacenes.Columns[2].ColumnName = "Description"; + DTAlmacenes.Columns[3].ColumnName = "Stock Date"; + DTAlmacenes.AcceptChanges(); + + DataTable dtCloned = DTVentas.Clone(); dtCloned.Columns[3].DataType = typeof(string); From bb324aa0f21ea911aca5adad6127ee52e0381e00 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 17 Jul 2020 17:51:19 -0700 Subject: [PATCH 03/13] -- ajustes secciones --- Inventarios/AjustesSeccionAlmacen.aspx.vb | 18 +++++++++++++----- Inventarios/EntregaAlmacen.aspx.vb | 7 ++++--- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/Inventarios/AjustesSeccionAlmacen.aspx.vb b/Inventarios/AjustesSeccionAlmacen.aspx.vb index 6eec3379f..7dc1c3c02 100644 --- a/Inventarios/AjustesSeccionAlmacen.aspx.vb +++ b/Inventarios/AjustesSeccionAlmacen.aspx.vb @@ -115,8 +115,6 @@ Partial Class Inventarios_AjustesSeccionAlmacen Dim Lote As String = Row("Lote").ToString() Dim FechaCaducidad As Date = IfNull(Row("FechaCaducidad"), MinFecha).ToString.ToDate - - 'actualizamos el PS, para que tenga el aplica seccion ObjPS.UpdateAplicaSeccionAlmacen(Row("CvePS").ToString().ToEntero(), UsuarioActual.CveEmpresa, True) @@ -325,11 +323,11 @@ Partial Class Inventarios_AjustesSeccionAlmacen CveSeccionAlmacen = DrSeccion("CveSeccion").ToString().ToEntero() End If - Dim Serie As String = RowExcel("Serie").ToString() + Dim Serie As String = RowExcel("Serie").ToString().Trim Dim Lote As String = RowExcel("Lote").ToString() Dim FechaCaducidad As Date = IfNull(RowExcel("FechaCaducidad"), MinFecha).ToString.ToDate - Dim RowExistencia As DataRow = DtExistenciasSecciones.FiltroPrimero($"CvePS={CvePS}") + Dim RowExistencia As DataRow = DtExistenciasSecciones.FiltroPrimero($"CvePS={CvePS} and ISNULL(Serie,'') = '{Serie}'") If RowExistencia IsNot Nothing AndAlso CveSeccionAlmacen > 0 Then Dim CveSeccionAlmacenSalida As Integer = RowExistencia("CveSeccionAlmacen").ToString().ToEntero() @@ -339,6 +337,13 @@ Partial Class Inventarios_AjustesSeccionAlmacen Dim FechaCaducidadSalida As Date = IfNull(RowExistencia("FechaCaducidad"), MinFecha).ToString.ToDate Dim PUSalida As Decimal = RowExistencia("PU").ToString() + 'condicion para ajustar la seccion y permita hacer los cambios en el trigger + If CveSeccionAlmacenSalida > 0 Then + ErrorMovInv = Not ObjPS.UpdateAplicaSeccionAlmacen(CvePS, UsuarioActual.CveEmpresa, True) + Else + ErrorMovInv = Not ObjPS.UpdateAplicaSeccionAlmacen(CvePS, UsuarioActual.CveEmpresa, False) + End If + 'GENERA LA SALIDA DE LOS PRODUCTOS QUE VIENEN EN EL EXCEL If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadSalida, CveUM, CvePS, PUSalida, CveSeccionAlmacen:=CveSeccionAlmacenSalida, Serie:=SerieSalida, Lote:=LoteSalida, FechaCaducidad:=FechaCaducidadSalida, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then ErrorMovInv = True @@ -362,6 +367,9 @@ Partial Class Inventarios_AjustesSeccionAlmacen 'ACTUALIZAMOS EL PS, PARA QUE TENGA EL APLICA SECCION ErrorMovInv = Not ObjPS.UpdateAplicaSeccionAlmacen(CvePS, UsuarioActual.CveEmpresa, True) + If Not ObjInventario.AddProductosServiciosAlmacenSeccion(CvePS, CveAlmacen, CveSeccionAlmacen) Then + ErrorMovInv = True + End If If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, CantidadEntrada, CveUMEntrada, CvePSEntrada, PUEntrada, -1, CostoIndirecto:=CostoIndirecto, CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then ErrorMovInv = True @@ -377,7 +385,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen End If If RowExistencia Is Nothing Then - ExistenciasNoEncontradas.AppendFormat("{0},", SeccionAlmacen) + ExistenciasNoEncontradas.AppendFormat("{0} - S:{1}
", Codigo, Serie) ErrorMovInv = True End If diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb index 8dff1f8c8..7ef8db2d1 100644 --- a/Inventarios/EntregaAlmacen.aspx.vb +++ b/Inventarios/EntregaAlmacen.aspx.vb @@ -2,6 +2,7 @@ Option Explicit On Imports System.Data +Imports System.Data.Entity.Core.Common.CommandTrees Imports System.IO Imports Extensiones @@ -655,7 +656,7 @@ Partial Class Inventarios_EntregaAlmacen Select Case ObjInventario.DtResultados.Rows(0)("TipoDocto").ToString Case "Ing", "Ped" Filtro = "CveConcepto IN (3,40)" - Case "Dev" + Case "Dev", "dPe" 'cuand es devolucionventa=1, es cancelación de la devolución If EsDevolucionVenta = 1 Then Filtro = "CveConcepto = 18" Else Filtro = "CveConcepto IN (3,40)" Case Else @@ -2180,7 +2181,7 @@ Partial Class Inventarios_EntregaAlmacen If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then For Each Dr As DataRow In ObjInventario.DtResultados.Rows - If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaApartado, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then + If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaApartado, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccionAlmacen").ToString.ToEntero, -1)) Then ErrorMovInv = True TextoError.AppendFormat("Ocurrió un error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar.") Exit For @@ -2339,7 +2340,7 @@ Partial Class Inventarios_EntregaAlmacen End If For Each Dr As DataRow In ObjInventario.DtResultados.Rows - If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1), EsInterno:=EsInterno) Then + If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccionAlmacen").ToString.ToEntero, -1), EsInterno:=EsInterno) Then ErrorMovInv = True TextoError.AppendFormat("Ocurrió un error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar.") Exit For From b1f337764d29e22fdc4f380c1c174f4a1e581e63 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 17 Jul 2020 17:51:30 -0700 Subject: [PATCH 04/13] - correccion de titulos --- Compras/CatTipoGasto.aspx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Compras/CatTipoGasto.aspx b/Compras/CatTipoGasto.aspx index f930bc624..c1f4a738e 100644 --- a/Compras/CatTipoGasto.aspx +++ b/Compras/CatTipoGasto.aspx @@ -8,7 +8,7 @@ - Catálogo de Tipo Gastos de Rechazo de Paquetes + Catálogo de Tipo Gasto @@ -23,11 +23,11 @@ - + - - + + From ac200c81ce947ec22d861be117335ef8ebfee373 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 17 Jul 2020 17:51:48 -0700 Subject: [PATCH 05/13] - consideracion de importes negativos, que se coloreen --- Contabilidad/RepIVA.aspx.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Contabilidad/RepIVA.aspx.cs b/Contabilidad/RepIVA.aspx.cs index f694ee2bc..7c6df76ed 100644 --- a/Contabilidad/RepIVA.aspx.cs +++ b/Contabilidad/RepIVA.aspx.cs @@ -134,15 +134,19 @@ public partial class Contabilidad_RepIVA : ClsPaginas { Decimal SubTotal = (e.Row.DBCampo("SubTotal16").ToDecimal() > 0 ? e.Row.DBCampo("SubTotal16").ToDecimal() : (e.Row.DBCampo("SubTotal8").ToDecimal() > 0 ? e.Row.DBCampo("SubTotal8").ToDecimal() : (Decimal)0.0)); - Decimal dif = Math.Round(SubTotal * e.Row.DBCampo("PorcentajeIVA").ToDecimal(), 2) - Math.Round(e.Row.DBCampo("IVA").ToDecimal(), 2); + Decimal dif = Math.Round(SubTotal * e.Row.DBCampo("PorcentajeIVA").ToDecimal(), 2) - Math.Round(e.Row.DBCampo("IVA").ToDecimal() + Math.Round(e.Row.DBCampo("IVANoDeducible").ToDecimal()), 2); if (dif > 1) { - e.Row.ForeColor = System.Drawing.Color.Red; - e.Row.Cells[0].Text = e.Row.Cells[0].Text + "Err"; + e.Row.ForeColor = System.Drawing.Color.Red; + e.Row.Cells[0].Text = e.Row.Cells[0].Text + "Err"; - e.Row.ToolTip = "Dif:" + dif.ToString() + "- Sub:" + e.Row.DBCampo("SubTotal") + " - IVA:" + e.Row.DBCampo("IVA"); + e.Row.ToolTip = "Dif:" + dif.ToString() + "- Sub:" + SubTotal + " - IVA:" + e.Row.DBCampo("IVA"); } } + if (e.Row.DBCampo("IVA").ToDecimal() < 0 || e.Row.DBCampo("IEPS").ToDecimal() < 0 || e.Row.DBCampo("SubTotal16").ToDecimal() < 0 || e.Row.DBCampo("SubTotal8").ToDecimal() < 0 || e.Row.DBCampo("valorActosImp0").ToDecimal() < 0) + { + e.Row.ForeColor = System.Drawing.Color.Red; + } } } From 59611c12e7e6aa26ec52ed23c1bafea016a290a1 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Fri, 17 Jul 2020 20:17:44 -0700 Subject: [PATCH 06/13] Aplicar impuestos lcoales en nota de credito si la factura tiene. --- Ventas/Ventas.aspx.vb | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index ac3635c77..fd76c078e 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -22426,13 +22426,30 @@ Partial Class Ventas DdlTipoComprobante.SelectedValue = "Egs" Dim AplicaImpuestosLocales As Boolean = False - Dim ObjCliente As New ClsClientes - If ObjCliente.GetClienteImpuestosLocales(CveCliente) Then - 'se cargan impuestos locales - Dim DtClienteImpuesto As DataTable = ObjCliente.DtResultados.FiltraParametros("Seleccionado = 1", "Orden") - AplicaImpuestosLocales = (DtClienteImpuesto IsNot Nothing AndAlso DtClienteImpuesto.Rows.Count > 0) + 'Dim ObjCliente As New ClsClientes + 'If ObjCliente.GetClienteImpuestosLocales(CveCliente) Then + ' 'se cargan impuestos locales + ' Dim DtClienteImpuesto As DataTable = ObjCliente.DtResultados.FiltraParametros("Seleccionado = 1", "Orden") + ' AplicaImpuestosLocales = (DtClienteImpuesto IsNot Nothing AndAlso DtClienteImpuesto.Rows.Count > 0) + 'End If + 'ObjCliente.Dispose() + + 'CARGA IMPUESTOS LOCALES + Dim ObjVentas As New ClsVentas() + If ObjVentas.GetVentaImpuestosLocales(CveVenta) Then + If ObjVentas.DtResultados.Rows.Count > 0 Then + AplicaImpuestosLocales = True + + TrOtros.Visible = True + TmpDTImpuestos = ObjVentas.DtResultados + GvImpuestosLocales2.DataSource = ObjVentas.DtResultados + GvImpuestosLocales2.DataBind() + + GvImpuestosLocales2.Enabled = False + GvImpuestosLocales2.Visible = True + End If End If - ObjCliente.Dispose() + ObjVentas.Dispose() AplicarNC(DdlNCPS.SelectedValue.ToEntero(), EsNCAmortizacion:=ChkAplicaNCAnticipo.Checked, AplicaImpuestosLocales:=AplicaImpuestosLocales, AplicaNuevoDocumento:=AplicaNuevoDocumento) From 2b35950c0e91d54a86a67c9a02708b0006b8c638 Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Sat, 18 Jul 2020 13:49:51 -0700 Subject: [PATCH 07/13] Entradas salidas --- App_Code/ClsPaginas.vb | 8 +++++++- Inventarios/EntradasSalidas.aspx | 17 ++++++++++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 826659d4d..31e46852b 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -1460,7 +1460,13 @@ Public Class ClsPaginas If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then Dim ObjBancos As New ClsBancos If ObjBancos.GetBancosCuentasUsuarios(-1) Then - Application(AppNombre) = ObjBancos.DtResultados + + If CveEmpresa > 0 Then + Application(AppNombre) = ObjBancos.DtResultados.FiltraParametros($"CveEmpresa = { CveEmpresa }") + Else + Application(AppNombre) = ObjBancos.DtResultados + End If + Else Application(AppNombre) = Nothing End If diff --git a/Inventarios/EntradasSalidas.aspx b/Inventarios/EntradasSalidas.aspx index 6114ccac7..317886ea8 100644 --- a/Inventarios/EntradasSalidas.aspx +++ b/Inventarios/EntradasSalidas.aspx @@ -1049,7 +1049,9 @@
- <%----%> + + +
@@ -1062,6 +1064,19 @@ + + + + + + + + + + + + + From a9cf1de47015fbed5245e0d8c79b230e8622d9e8 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 18 Jul 2020 18:44:15 -0700 Subject: [PATCH 08/13] -- ajustes de serie/lote/caducidad --- Inventarios/InventarioFisicoDetalle.aspx | 18 ++-- Inventarios/InventarioFisicoDetalle.aspx.vb | 95 ++++++++++++++------- Inventarios/RepAnomalias.aspx | 4 +- Inventarios/RepAnomalias.aspx.vb | 2 +- 4 files changed, 78 insertions(+), 41 deletions(-) diff --git a/Inventarios/InventarioFisicoDetalle.aspx b/Inventarios/InventarioFisicoDetalle.aspx index c702804ee..48a1e6086 100644 --- a/Inventarios/InventarioFisicoDetalle.aspx +++ b/Inventarios/InventarioFisicoDetalle.aspx @@ -240,23 +240,23 @@ - -
- -
- -
-
+
+ + +
+ + +
@@ -325,7 +325,7 @@ - + @@ -349,7 +349,7 @@ - + diff --git a/Inventarios/InventarioFisicoDetalle.aspx.vb b/Inventarios/InventarioFisicoDetalle.aspx.vb index 208728062..3bfb676f9 100644 --- a/Inventarios/InventarioFisicoDetalle.aspx.vb +++ b/Inventarios/InventarioFisicoDetalle.aspx.vb @@ -88,10 +88,8 @@ Partial Class Inventarios_InventarioFisicoDetalle #Region " CARGA DATOS " Private Sub CargaDatos(CveInventarioFisico As Integer, CveEmpresa As Integer, Optional CveUsuario As Integer = -1) - Dim ObjInventario As New ClsInventarios - DdlSeccionAlmacen.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1) - DdlSeccionAlmacen.DataBind() - DdlSeccionAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1")) + Dim ObjInventario As New ClsInventarios + If ObjInventario.GetInventarioFisico(CveInventarioFisico, CveEmpresa, -1, -1) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then Dim CveEstatus = ObjInventario.DtResultados.FiltroPrimeroValor("CveEstatus") Select Case CveEstatus @@ -230,9 +228,9 @@ Partial Class Inventarios_InventarioFisicoDetalle Dim Inventario As New ClsInventarios If Inventario.GetInventarioFisicoDetalle(CveInventarioFisico, ddlUsuario.SelectedValue.ToString.ToEntero) Then If Inventario.DtResultados.Rows.Count > 0 Then - GvIFD.Columns(4).Visible = Inventario.DtResultados.MAX("CveSeccionAlmacen") > 0 + GvIFD.Columns(4).Visible = Inventario.DtResultados.MAX("CveSeccionAlmacen", "CveSeccionAlmacen IS NOT NULL").ToEntero > 0 GvIFD.Columns(6).Visible = Inventario.DtResultados.MAX("Lote") <> "" - GvIFD.Columns(7).Visible = Inventario.DtResultados.MAX("FechaCaducidad").ToDate > MinFecha + GvIFD.Columns(7).Visible = Inventario.DtResultados.MAX("FechaCaducidad", "FechaCaducidad IS NOT NULL").ToDate > MinFecha GvIFD.DataSource = Inventario.DtResultados '.AsEnumerable.OrderByDescending(Function(k) k!CveInventarioFisicoDetalle).Take(500).CopyToDataTable Else GvIFD.DataSource = Nothing @@ -259,48 +257,83 @@ Partial Class Inventarios_InventarioFisicoDetalle Dim CveUnidadMedida As Integer Dim Codigo As String = If(TxtCodigo.Text.Trim <> "", TxtCodigo.Text.Trim, "-1").Replace("'", "''") ' scanner cambian los guiones por apostrofes Dim CodigoBarras As String = If(TxtCodigoBarras.Text.Trim <> "", TxtCodigoBarras.Text.Trim, "-1").Replace("'", "''") ' scanner cambian los guiones por apostrofes - Dim SeccionAlmacen As String = If(DdlSeccionAlmacen.SelectedValue.ToEntero > -1, DdlSeccionAlmacen.SelectedItem.Text, "") - Dim CveSeccionAlmacen As Integer = If(DdlSeccionAlmacen.SelectedValue.ToEntero > 0, DdlSeccionAlmacen.SelectedValue.ToEntero, -1) - Dim SerieLote As String = TxtCodigoSerie.Text.Trim + Dim Serie As String = TxtCodigoSerie.Text.Trim Dim Lote As String = If(TxtLote.Text.Length > 0, TxtLote.Text, "-1") - Dim FechaCaducidad As String = If(TxtFechaCaducidad.Text.Length > 0, TxtFechaCaducidad.Text, MinFecha.ToString) - Dim CveMetodoInv As Integer = -1 + Dim FechaCaducidad As String=MinFecha.ToString + Dim CveSeccionAlmacen As Integer = -1 + Dim Cantidad = TxtCantidadProducto.Text.ToDouble Dim dr As DataRow - dr = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero($"CodigoBarras = '{CodigoBarras}' OR Codigo = '{Codigo}' ") - - If dr IsNot Nothing Then - CveMetodoInv = dr("Inv_CveMetodoInventario").ToString.ToEntero + 'dr = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero($"CodigoBarras = '{CodigoBarras}' OR Codigo = '{Codigo}' ") + dr = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltroPrimero($"CodigoBarras = '{CodigoBarras}' OR Codigo = '{Codigo}'") + + + + If dr IsNot Nothing Then + CveProducto = dr("CvePS").ToString.ToEntero - CveUnidadMedida = dr("CveUnidadMedida").ToString.ToEntero + CveUnidadMedida = dr("CveUnidadMedida").ToString.ToEntero + 'Dim AplicaSeccion As Boolean = dr("AplicaSeccion") = "1" + Dim AplicaCaducidad As Boolean = dr("AplicaCaducidad") = "1" + Dim AplicaLote As Boolean = dr("AplicaLote") = "1" + Dim AplicaSerie As Boolean = dr("AplicaSerie") = "1" + + 'divSeccionAlmacen.Visible = AplicaSeccion + divLote.Visible = AplicaLote + divFechaCaducidad.Visible = AplicaCaducidad + divSerie.Visible = AplicaSerie + UPAgregarPro.Update() - If CveMetodoInv = 5 And SerieLote = "" Then + If AplicaSerie And Serie = "" Then RFVSerie.Enabled = True RFVSerie.Visible = True RFVSerie.SetFocusOnError = True RFVSerie.Validate() RFVSerie.ValidationGroup = " " Exit Sub + End If + If AplicaLote And Lote = "" Then + RFVLote.Enabled = True + RFVLote.Visible = True + RFVLote.SetFocusOnError = True + RFVLote.Validate() + RFVLote.ValidationGroup = " " + Exit Sub End If + If AplicaCaducidad Then + If TxtFechaCaducidad.Text.Trim = "" Then + RFVCaducidad.Enabled = True + RFVCaducidad.Visible = True + RFVCaducidad.SetFocusOnError = True + RFVCaducidad.Validate() + RFVCaducidad.ValidationGroup = " " + Exit Sub + End If + FechaCaducidad = If(TxtFechaCaducidad.Text.Length > 0, TxtFechaCaducidad.Text, MinFecha.ToString) + End If RFVSerie.ValidationGroup = "GrpIngresar" RFVSerie.Enabled = False - - 'VALIDA QUE LA SERIE NO SEA IGUAL AL CODIGO O CODIGOBARRAS - If SerieLote <> "" And (SerieLote.ToUpper = dr("Codigo").ToString.ToUpper Or SerieLote.ToUpper = dr("CodigoBarras").ToString.ToUpper) Then - Alert($"La serie indicada {SerieLote} coincide con el codigo o codigo de barras del producto. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia) + RFVLote.ValidationGroup = "GrpIngresar" + RFVLote.Enabled = False + RFVCaducidad.ValidationGroup = "GrpIngresar" + RFVCaducidad.Enabled = False + + 'VALIDA QUE LA SERIE NO SEA IGUAL AL CODIGO O CODIGOBARRAS + If Serie <> "" And (Serie.ToUpper = dr("Codigo").ToString.ToUpper Or Serie.ToUpper = dr("CodigoBarras").ToString.ToUpper) Then + Alert($"La serie indicada {Serie} coincide con el codigo o codigo de barras del producto. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia) Exit Sub End If Dim Consulto As Boolean = False Using Inventarios As New ClsInventarios - If Inventarios.AddInventarioFisicoDetalle(CveInventarioFisico, CveProducto, CveUnidadMedida, If(CveMetodoInv = 5, 1, Cantidad), SerieLote, UsuarioActual.CveUsuario, - CveSeccionAlmacen:=CveSeccionAlmacen, Lote:=Lote, FechaCaducidad:=FechaCaducidad.ToDate) Then + If Inventarios.AddInventarioFisicoDetalle(CveInventarioFisico, CveProducto, CveUnidadMedida, If(AplicaSerie, 1, Cantidad), Serie, UsuarioActual.CveUsuario, + CveSeccionAlmacen:=-1, Lote:=Lote, FechaCaducidad:=FechaCaducidad.ToDate) Then GvIFDUltimoRegistrado.Columns(4).Visible = CveSeccionAlmacen > 0 - GvIFDUltimoRegistrado.Columns(5).Visible = SerieLote <> "-1" + GvIFDUltimoRegistrado.Columns(5).Visible = Serie <> "-1" GvIFDUltimoRegistrado.Columns(6).Visible = Lote <> "-1" GvIFDUltimoRegistrado.Columns(7).Visible = FechaCaducidad <> "01/01/1900" @@ -310,7 +343,7 @@ Partial Class Inventarios_InventarioFisicoDetalle GvIFDUltimoRegistrado.Rows(0).Cells(1).Text = dr("CodigoBarras").ToString GvIFDUltimoRegistrado.Rows(0).Cells(2).Text = dr("Codigo").ToString GvIFDUltimoRegistrado.Rows(0).Cells(3).Text = dr("PS").ToString - GvIFDUltimoRegistrado.Rows(0).Cells(4).Text = SeccionAlmacen + GvIFDUltimoRegistrado.Rows(0).Cells(4).Text = "" GvIFDUltimoRegistrado.Rows(0).Cells(5).Text = TxtCodigoSerie.Text.Trim GvIFDUltimoRegistrado.Rows(0).Cells(6).Text = Lote GvIFDUltimoRegistrado.Rows(0).Cells(7).Text = FechaCaducidad @@ -332,9 +365,11 @@ Partial Class Inventarios_InventarioFisicoDetalle TxtCodigoSerie.Text = "" TxtCodigo.Text = "" TxtCantidadProducto.Text = "1" - DdlSeccionAlmacen.SelectedValue = "-1" TxtLote.Text = "" TxtFechaCaducidad.Text = "" + divLote.Visible = False + divFechaCaducidad.Visible = False + divSerie.Visible = False RegistraScript("playsonidito('beep-07.wav')") Else TxtCodigoSerie.Text = "" @@ -346,8 +381,10 @@ Partial Class Inventarios_InventarioFisicoDetalle Else TxtCodigoBarras.Text = "" TxtCodigoSerie.Text = "" - TxtCodigo.Text = "" - DdlSeccionAlmacen.SelectedValue = "-1" + TxtCodigo.Text = "" + divLote.Visible = False + divFechaCaducidad.Visible = False + divSerie.Visible = False TxtLote.Text = "" TxtFechaCaducidad.Text = "" Alert("No se encontró el producto, favor de escribirlo correctamente.", TipoMensaje.MsgError) @@ -530,7 +567,7 @@ Partial Class Inventarios_InventarioFisicoDetalle Dim AplicaLote As Boolean = Producto("AplicaLote") = "1" Dim AplicaSerie As Boolean = Producto("AplicaSerie") = "1" - divSeccionAlmacen.Visible = AplicaSeccion + 'divSeccionAlmacen.Visible = AplicaSeccion divLote.Visible = AplicaLote divFechaCaducidad.Visible = AplicaCaducidad divSerie.Visible = AplicaSerie diff --git a/Inventarios/RepAnomalias.aspx b/Inventarios/RepAnomalias.aspx index 8d3185711..3751b969e 100644 --- a/Inventarios/RepAnomalias.aspx +++ b/Inventarios/RepAnomalias.aspx @@ -200,7 +200,7 @@ - + @@ -234,7 +234,7 @@ - + diff --git a/Inventarios/RepAnomalias.aspx.vb b/Inventarios/RepAnomalias.aspx.vb index a239ccbab..a71900ab2 100644 --- a/Inventarios/RepAnomalias.aspx.vb +++ b/Inventarios/RepAnomalias.aspx.vb @@ -275,7 +275,7 @@ Partial Class Inventarios_RepAnomalias Private Sub BanderaSerieLoteCad(Gv As GridView, resultado As DataTable) Gv.Columns(4).Visible = resultado.MAX("Serie") <> "" Gv.Columns(5).Visible = resultado.MAX("Lote") <> "" - Gv.Columns(6).Visible = resultado.MAX("FechaCaducidad") <> "" + Gv.Columns(6).Visible = resultado.MAX("FechaCaducidad").ToDate > MinFecha End Sub End Class From c69ef11e8b07546b26d0b66ff0ca585d5fb1e380 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 18 Jul 2020 18:45:18 -0700 Subject: [PATCH 09/13] cargas de subproyectos --- App_Code/ClsPaginas.vb | 10 +++++----- Ventas/Ventas.aspx.vb | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 826659d4d..8f6a1371d 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -8073,7 +8073,7 @@ Public Class ClsPaginas End Sub #End Region - Public Sub CargarCentrosDeCosto(DdlProyecto As DropDownList, DdlSubProyecto As DropDownList, LthProyectoP As Label, LblSubProyecto As Label) + Public Sub CargarCentrosDeCosto(DdlProyecto As DropDownList, DdlSubProyecto As DropDownList, LthProyectoP As Label, LblSubProyecto As Label, Optional AplicaTodos As String = "Todos") Select Case UsuarioActual.Empresa.Tipo_CentroCosto Case 1 If DdlProyecto IsNot Nothing Then DdlProyecto.Visible = False @@ -8096,15 +8096,15 @@ Public Class ClsPaginas End Select If DdlProyecto IsNot Nothing Then - DdlProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1).FiltraParametros("", "", {"CveProyecto", "Proyecto"}), GlobalDTProyectos(UsuarioActual.CveEmpresa, -1).FiltraParametros("", "", {"CveProyecto", "Proyecto"})) + DdlProyecto.DataSource = If(Not UsuarioActual.TienePermisoProceso(110), GlobalDTProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1).FiltraParametros("", "", {"CveProyecto", "Proyecto"}), GlobalDTProyectos(UsuarioActual.CveEmpresa, -1).FiltraParametros("", "", {"CveProyecto", "Proyecto"})) DdlProyecto.DataBind() - DdlProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) + If AplicaTodos <> "" Then DdlProyecto.Items.Insert(0, New ListItem(AplicaTodos, "-1")) End If If DdlSubProyecto IsNot Nothing Then - DdlSubProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1)) + DdlSubProyecto.DataSource = If(Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1)) DdlSubProyecto.DataBind() - DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) + If AplicaTodos <> "" Then DdlSubProyecto.Items.Insert(0, New ListItem(AplicaTodos, "-1")) End If End Sub End Class diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index bfca81a44..c2c4b072e 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -2451,8 +2451,8 @@ Partial Class Ventas CargaFletes() - CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyectoHeader, LblSubProyecto) - CargarCentrosDeCosto(DdlProyectoPyME, DdlSubProyectoPyME, LblProyectoPyME, LblSubProyectoPyME) + CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyectoHeader, LblSubProyecto, AplicaTodos:="") + CargarCentrosDeCosto(DdlProyectoPyME, DdlSubProyectoPyME, LblProyectoPyME, LblSubProyectoPyME, AplicaTodos:="") BrSubProyecto.Visible = DdlProyecto.Visible divProyectoPyME.Visible = DdlProyecto.Visible @@ -14418,8 +14418,8 @@ Partial Class Ventas DdlSubProyecto.Items.Clear() DdlSubProyecto.DataSource = DTSucursal - DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) - DdlSubProyecto.SelectedValue = "-1" + 'DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) + 'DdlSubProyecto.SelectedValue = "-1" DdlSubProyecto.DataBind() DdlSubProyecto.SelectedValueExist(DdlSubProyectoDatos.SelectedValue) CambiaSucursal() From 1bf14135c2c22c294cff6239f9663fc8e6af31c1 Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Mon, 20 Jul 2020 11:54:24 -0700 Subject: [PATCH 10/13] =?UTF-8?q?RepAnexoCatalogo,=20RepBalanzeComprobacio?= =?UTF-8?q?n,=20RepmovimientosAuxiliares=20=20=20validaci=C3=B3n=20formato?= =?UTF-8?q?s=20de=20fecha=20y=20cuenta=20requerida.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Contabilidad2/RepAnexoCatalogo.aspx | 20 +++++++++++++++++-- Contabilidad2/RepBalanzaComprobacion.aspx | 18 ++++++++++++++--- .../RepMovimientosAuxiliaresCatalogo.aspx | 14 ++++++++----- 3 files changed, 42 insertions(+), 10 deletions(-) diff --git a/Contabilidad2/RepAnexoCatalogo.aspx b/Contabilidad2/RepAnexoCatalogo.aspx index 25b3cdce0..492905e64 100644 --- a/Contabilidad2/RepAnexoCatalogo.aspx +++ b/Contabilidad2/RepAnexoCatalogo.aspx @@ -31,7 +31,7 @@
- + "><%--class="expand"--%>
@@ -40,6 +40,7 @@
  • F. I.
  • +
    @@ -47,7 +48,12 @@ + + + +
    +
  • F. F.
  • @@ -58,15 +64,25 @@ + + + + +
-
  • Cuentas: +
  • Cuenta:
  • + + + + +
  • diff --git a/Contabilidad2/RepBalanzaComprobacion.aspx b/Contabilidad2/RepBalanzaComprobacion.aspx index c860c8b3d..41b29877a 100644 --- a/Contabilidad2/RepBalanzaComprobacion.aspx +++ b/Contabilidad2/RepBalanzaComprobacion.aspx @@ -23,7 +23,7 @@
    - +
    @@ -36,6 +36,10 @@ + + + +
    @@ -46,17 +50,25 @@ + + + +
    - +
    - + + + + +
    diff --git a/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx b/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx index b650f8c53..036079ba9 100644 --- a/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx +++ b/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx @@ -35,7 +35,7 @@
    - +
    @@ -50,8 +50,8 @@ - - + +
    @@ -65,8 +65,8 @@ - - + +
    @@ -82,6 +82,10 @@ + + + + From 4dbd71a5e071ddf9d5b7c280a37d84c7e52f063d Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Mon, 20 Jul 2020 18:45:06 -0700 Subject: [PATCH 11/13] Mensaje folio duplicado ClsBancos --- App_Code/ClsBancos.vb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/App_Code/ClsBancos.vb b/App_Code/ClsBancos.vb index 49c81b77f..b4ce6e00d 100644 --- a/App_Code/ClsBancos.vb +++ b/App_Code/ClsBancos.vb @@ -1453,9 +1453,11 @@ Public Class ClsBancos _Folio = SqlAdapter.SelectCommand.Parameters("@FolioRegistro").Value.ToString Catch Ex1 As SqlException - If Ex1.Message.Contains("Número: 2627;") Or Ex1.Message.Contains("Número: 2601;") Then + If Ex1.Message.Contains("Número: 2627;") Then Me.OnError("Ocurrió un error al Guardar el Movimiento.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + ElseIf Ex1.Message.Contains("Número: 2601;") Then Alert("Ya existe un movimiento bancario con el mismo Folio: " & Folio & ".", TipoMensaje.MsgAdvertencia) + Me.OnError("Ocurrió un error al Guardar el Movimiento. Ya existe un movimiento bancario con el mismo Folio: " & Folio & ".", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) Else Me.OnError("Ocurrió un error al Guardar el Movimiento.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End If From befd26c7732063693dcf37c50f9671b2fcbc9a78 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 21 Jul 2020 10:14:33 -0700 Subject: [PATCH 12/13] -ajustes de seccion --- Inventarios/AjustesSeccionAlmacen.aspx | 3 ++- Inventarios/AjustesSeccionAlmacen.aspx.vb | 5 ++++- Inventarios/Apartados.aspx | 2 +- Inventarios/EntradasSalidas.aspx | 2 +- Inventarios/EntradasSalidas.aspx.vb | 2 +- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Inventarios/AjustesSeccionAlmacen.aspx b/Inventarios/AjustesSeccionAlmacen.aspx index dde09a6a1..4fc1c050d 100644 --- a/Inventarios/AjustesSeccionAlmacen.aspx +++ b/Inventarios/AjustesSeccionAlmacen.aspx @@ -56,7 +56,8 @@ - + + diff --git a/Inventarios/AjustesSeccionAlmacen.aspx.vb b/Inventarios/AjustesSeccionAlmacen.aspx.vb index 7dc1c3c02..726db4464 100644 --- a/Inventarios/AjustesSeccionAlmacen.aspx.vb +++ b/Inventarios/AjustesSeccionAlmacen.aspx.vb @@ -84,8 +84,11 @@ Partial Class Inventarios_AjustesSeccionAlmacen If gvr.DataKey("CveSeccionAlmacen").ToEntero > 0 Then ObjPS.UpdateAplicaSeccionAlmacen(gvr.DataKey("CvePS").ToEntero, UsuarioActual.CveEmpresa, True) + Else + ObjPS.UpdateAplicaSeccionAlmacen(gvr.DataKey("CvePS").ToEntero, UsuarioActual.CveEmpresa, False) End If - Lista.Add(gvr.DataKey("CvePS").ToEntero, gvr.FCDropDownList("DDlS").SelectedValue.ToEntero) 'guardo que dato le corresponde + If Not Lista.ContainsKey(gvr.DataKey("CvePS").ToEntero) Then Lista.Add(gvr.DataKey("CvePS").ToEntero, gvr.FCDropDownList("DDlS").SelectedValue.ToEntero) 'guardo que dato le corresponde + If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, gvr.DataKey("Existencia").ToDecimal, gvr.DataKey("CveUM").ToEntero, gvr.DataKey("CvePS").ToEntero, 0, -1, CveSeccionAlmacen:=gvr.DataKey("CveSeccionAlmacen").ToEntero, Serie:=gvr.DataKey("Serie"), Lote:=gvr.DataKey("Lote"), FechaCaducidad:=gvr.DataKey("FechaCaducidad").ToDate) Then ErrorMovInv = True TextoError = "Ocurrió un error al guardar los movimientos de salida" diff --git a/Inventarios/Apartados.aspx b/Inventarios/Apartados.aspx index 27be34de9..b146d2360 100644 --- a/Inventarios/Apartados.aspx +++ b/Inventarios/Apartados.aspx @@ -227,7 +227,7 @@ - + diff --git a/Inventarios/EntradasSalidas.aspx b/Inventarios/EntradasSalidas.aspx index 317886ea8..c1fabff01 100644 --- a/Inventarios/EntradasSalidas.aspx +++ b/Inventarios/EntradasSalidas.aspx @@ -1439,7 +1439,7 @@
    - +