From 75e8c54f41c76660c98e164b4bfafe95e45227d1 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Wed, 15 May 2024 13:31:59 -0700 Subject: [PATCH 1/6] --FIX. valores duplicados de lote y caducidad --- Inventarios/EntregaAlmacen.aspx.vb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb index a50d87edf..fceee23e9 100644 --- a/Inventarios/EntregaAlmacen.aspx.vb +++ b/Inventarios/EntregaAlmacen.aspx.vb @@ -1287,6 +1287,8 @@ Partial Class Inventarios_EntregaAlmacen End Sub Private Sub CargarCaducidadProducto(CvePS As Integer, ByRef DdlLoteFechaCaducidad As DropDownList, ValorAsignado As String) + DdlLoteFechaCaducidad.Items.Clear() + DdlLoteFechaCaducidad.Items.Add(New ListItem("-", "|")) Dim almacenes As String = DdlAlmacen.SelectedValue If almacenes = "" Then @@ -1294,13 +1296,10 @@ Partial Class Inventarios_EntregaAlmacen End If Dim ObjInventarios As New ClsInventarios - If ObjInventarios.GetExistenciasCaducidad(CvePS, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, almacenes) Then - - For Each dr As DataRow In ObjInventarios.DtResultados.Rows + For Each dr As DataRow In ObjInventarios.DtResultados.FiltraParametros("", DistinctColumns:={"Lote", "FechaCaducidad"}).Rows DdlLoteFechaCaducidad.Items.Add(New ListItem($"Lote: {dr("Lote").ToString} - Cad: {dr("FechaCaducidad").ToString.ToDate.ToString("dd/MM/yyyy")}", $"{dr("Lote").ToString}|{dr("FechaCaducidad").ToString.ToDate.ToString("dd/MM/yyyy")}")) Next - End If ObjInventarios.Dispose() From 98b6ff8dbeeb669bd897f9a847c5af921a2c0998 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Wed, 15 May 2024 13:42:46 -0700 Subject: [PATCH 2/6] EMD - solicitar anticipo de OC, error, y permite duplicar la solicitud --- OC/OC.aspx.vb | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/OC/OC.aspx.vb b/OC/OC.aspx.vb index 4b2a682fc..6ead6e885 100644 --- a/OC/OC.aspx.vb +++ b/OC/OC.aspx.vb @@ -5443,7 +5443,7 @@ Partial Class OC_OC If Not TieneError Then RegistraScript("$('#ModalSolicitarAnticipo').modal('hide');", "ModalSolicitarAnticipoHide") ObjOC.Commit() - EnviaCorreoSolicitudAnticipo(ObjOI.CveEvento) + EnviaCorreoSolicitudAnticipo(ObjOI.CveEvento, TxtSAImporte.Text.ToDecimal, DdlSAUsuario.SelectedValue.ToEntero) 'LIMPIA BtnSolicitudAnticipo.Visible = False DdlSAUsuario.SelectedValue = "-1" @@ -5465,20 +5465,20 @@ Partial Class OC_OC End Sub - Private Sub EnviaCorreoSolicitudAnticipo(CveEvento As Integer, Optional ImporteAnticipo As Decimal = 0) + Private Sub EnviaCorreoSolicitudAnticipo(CveEvento As Integer, ImporteAnticipo As Decimal, CveUsuaioCorreo As Integer) Dim Param As New List(Of String) - Dim DtPara As DataTable = GlobalDTUsuarios(DdlSAUsuario.SelectedValue.ToString.ToEntero, CveEmpresaActual) + Dim DtPara As DataTable = GlobalDTUsuarios(CveUsuaioCorreo, CveEmpresaActual) - If DdlMetodoPago.SelectedValue.ToEntero = 0 Then + 'If DdlMetodoPago.SelectedValue.ToEntero = 0 Then - DtPara = GlobalDTUsuarios(DdlSAUsuarioContado.SelectedValue.ToString.ToEntero, CveEmpresaActual) + ' DtPara = GlobalDTUsuarios(DdlSAUsuarioContado.SelectedValue.ToString.ToEntero, CveEmpresaActual) - If DtPara Is Nothing Then - DtPara = GlobalDTUsuarios(DdlSAUsuario.SelectedValue.ToString.ToEntero, CveEmpresaActual) - End If + ' If DtPara Is Nothing Then + ' DtPara = GlobalDTUsuarios(DdlSAUsuario.SelectedValue.ToString.ToEntero, CveEmpresaActual) + ' End If - End If + 'End If Try If DtPara IsNot Nothing AndAlso DtPara.Rows.Count > 0 Then @@ -5486,20 +5486,19 @@ Partial Class OC_OC Param.Add(DtPara.Rows(0)("Correo").ToString()) 'Para Param.Add("Solicitud de anticipo de Orden de Compra") 'Asunto - - If ImporteAnticipo = 0 Then - ImporteAnticipo = TxtSAImporte.Text.ToDecimal - End If - + 'If ImporteAnticipo = 0 Then + ' ImporteAnticipo = TxtSAImporte.Text.ToDecimal + 'End If Param.Add(GeneraCorreoAnticipo(lblFolio.Text, DtPara.Rows(0)("Nombre").ToString(), String.Format("http://sig.adssistemas.mx/OI/EventoDetalle.aspx?CveTipoEvento=1&CveEvento={0}", CveEvento), ImporteAnticipo.ToString, DdlProveedores.SelectedText)) Param.Add(String.Format("{0}PDF\OC-{1}.pdf", UsuarioActual.Empresa.Ruta, CveOrdenCompra)) Dim Hilo As New Threading.Thread(AddressOf MandaCorreoAnticipo) Hilo.Start(Param) - + Else + Alert("Correo de solcitud de anticipo no enviado", TipoMensaje.MsgAdvertencia) End If Catch ex As Exception - + Alert("Correo de solcitud de anticipo no enviado", TipoMensaje.MsgAdvertencia) End Try End Sub @@ -9012,7 +9011,7 @@ Partial Class OC_OC End If If Not TieneError Then - EnviaCorreoSolicitudAnticipo(ObjOI.CveEvento, TxtSAImporteContado.Text.ToDecimal) + EnviaCorreoSolicitudAnticipo(ObjOI.CveEvento, TxtSAImporteContado.Text.ToDecimal, DdlSAUsuarioContado.SelectedValue.ToString.ToEntero) 'LIMPIA DdlSAUsuarioContado.SelectedValue = "-1" TxtSAImporteContado.Text = "" From ee5eac9ebf71d5b3fff429f56aaa0ae7e6769434 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Wed, 15 May 2024 19:27:28 -0700 Subject: [PATCH 3/6] --FIX. bloquear a contado si tiene vencimientros, funcionalidad 702 con valor "2" --- Ventas/Ventas.aspx.vb | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 274ae7575..b3ccd8f77 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -7561,6 +7561,11 @@ Partial Class Ventas 'CARGAR CREDITO DISPONIBLE AL GENERAR UNA FACTURA End If + ''SI NO PERMITE CREDITO, SUGIERE CONTADO + 'If (UsuarioActual.Empresa.Funcionalidad(702).Contiene("1")) AndAlso Not PermiteCredito AndAlso (DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem") AndAlso (CveVenta <= 0 OrElse EsCreaApartirDe)) Then + ' RBLPago.SelectedValue = "2" + 'End If + If ((DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "Cot", "PA") AndAlso CveVenta <= 0) OrElse (DdlTipoComprobante.SelectedValue.Contiene("Cot") AndAlso CveVenta > 0)) AndAlso RBLPago.SelectedValue = "1" AndAlso PermiteCredito Then 'FUNCIONALIDAD 702 - NO VERIFICAR LIMITE DE CRÉDITO Y CANDADOS DE VENTA If Not UsuarioActual.Empresa.Funcionalidad(702) = "1" Then @@ -8007,10 +8012,13 @@ Partial Class Ventas If Opcion = 2 Then Alert(OpcionMsg, TipoMensaje.MsgAdvertencia) - BtnEmitirImprimir.Visible = False - BtnsFacturar.Visible = False - BtnGenerarRemision.Visible = False - TieneBloqueoPorCreditoVencimiento = 1 + RBLPago.SelectedValue = "2" + RBLPago.Items(0).Enabled = False + RBLPago_SelectedIndexChanged(Nothing, Nothing) + 'BtnEmitirImprimir.Visible = False + 'BtnsFacturar.Visible = False + 'BtnGenerarRemision.Visible = False + 'TieneBloqueoPorCreditoVencimiento = 1 End If End If End If From 2565cc23e72dc4e3d5897cd80f8d900db3bdabd5 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Wed, 15 May 2024 19:30:10 -0700 Subject: [PATCH 4/6] --SMS. solo sugerir datos de venta en dev. --- Inventarios/EntregaAlmacen.aspx.vb | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb index fceee23e9..5bd2c8111 100644 --- a/Inventarios/EntregaAlmacen.aspx.vb +++ b/Inventarios/EntregaAlmacen.aspx.vb @@ -1250,10 +1250,12 @@ Partial Class Inventarios_EntregaAlmacen If Boolean.Parse(e.Row.DataKey("AplicaLote")) Or Boolean.Parse(e.Row.DataKey("AplicaCaducidad")) Then Dim ValorAsignado As String = "" + Dim DtDatosDevolucion As DataTable = Nothing If GvDatos.Columns(8).Visible AndAlso EsDevolucionVenta = 1 Then ValorAsignado = $"{e.Row.DBCampo("Lote").ToString}|{e.Row.DBCampo("FechaCaducidad").ToDate.ToString("dd/MM/yyyy")}" + DtDatosDevolucion = DtDatos.Copy() End If - CargarCaducidadProducto(e.Row.DataKey("CvePS").ToEntero, e.Row.FCDropDownList("DdlCaducidadProducto"), ValorAsignado) + CargarCaducidadProducto(e.Row.DataKey("CvePS").ToEntero, e.Row.FCDropDownList("DdlCaducidadProducto"), ValorAsignado, DtDatosDevolucion) End If @@ -1286,7 +1288,7 @@ Partial Class Inventarios_EntregaAlmacen End Sub - Private Sub CargarCaducidadProducto(CvePS As Integer, ByRef DdlLoteFechaCaducidad As DropDownList, ValorAsignado As String) + Private Sub CargarCaducidadProducto(CvePS As Integer, ByRef DdlLoteFechaCaducidad As DropDownList, ValorAsignado As String, DtDatosDevolucion As DataTable) DdlLoteFechaCaducidad.Items.Clear() DdlLoteFechaCaducidad.Items.Add(New ListItem("-", "|")) @@ -1295,13 +1297,20 @@ Partial Class Inventarios_EntregaAlmacen almacenes = "-1" End If - Dim ObjInventarios As New ClsInventarios - If ObjInventarios.GetExistenciasCaducidad(CvePS, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, almacenes) Then - For Each dr As DataRow In ObjInventarios.DtResultados.FiltraParametros("", DistinctColumns:={"Lote", "FechaCaducidad"}).Rows + If DtDatosDevolucion IsNot Nothing Then + For Each dr As DataRow In DtDatosDevolucion.FiltraParametros($"CvePS = {CvePS}", DistinctColumns:={"Lote", "FechaCaducidad"}).Rows DdlLoteFechaCaducidad.Items.Add(New ListItem($"Lote: {dr("Lote").ToString} - Cad: {dr("FechaCaducidad").ToString.ToDate.ToString("dd/MM/yyyy")}", $"{dr("Lote").ToString}|{dr("FechaCaducidad").ToString.ToDate.ToString("dd/MM/yyyy")}")) Next + Else + Dim ObjInventarios As New ClsInventarios + If ObjInventarios.GetExistenciasCaducidad(CvePS, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, almacenes) Then + For Each dr As DataRow In ObjInventarios.DtResultados.FiltraParametros("", DistinctColumns:={"Lote", "FechaCaducidad"}).Rows + DdlLoteFechaCaducidad.Items.Add(New ListItem($"Lote: {dr("Lote").ToString} - Cad: {dr("FechaCaducidad").ToString.ToDate.ToString("dd/MM/yyyy")}", $"{dr("Lote").ToString}|{dr("FechaCaducidad").ToString.ToDate.ToString("dd/MM/yyyy")}")) + Next + End If + ObjInventarios.Dispose() End If - ObjInventarios.Dispose() + If Not String.IsNullOrEmpty(ValorAsignado) Then DdlLoteFechaCaducidad.SelectedValueExist(ValorAsignado) From 2b6e0233d7348a9a240006f4cd27b875a55e134b Mon Sep 17 00:00:00 2001 From: rakcsle Date: Thu, 16 May 2024 18:01:31 -0700 Subject: [PATCH 5/6] =?UTF-8?q?SMS=20-=20Entrega=20almac=C3=A9n.=20con=20l?= =?UTF-8?q?otes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Compras/PopUpVerFactura.aspx.vb | 2 +- Empresas/Grales/Formatos/Polizas.rdlc | 296 ++++++++++++++++++++++- Inventarios/EntregaAlmacen.aspx.vb | 23 +- Inventarios/RepExistenciasCostos.aspx | 6 +- Inventarios/RepExistenciasCostos.aspx.vb | 188 ++------------ OC/OC.aspx.vb | 4 +- 6 files changed, 331 insertions(+), 188 deletions(-) diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 61dc24738..4ba4d6a1c 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -6394,7 +6394,7 @@ Partial Class PopUpVerFactura Else params.Add(New ReportParameter("Fecha", Fecha.ToShortDateString)) End If - If UsuarioActual.CveEmpresa.Contiene(119, 141) Then + If UsuarioActual.CveEmpresa.Contiene(119, 141, 193, 195, 197, 189) Then params.Add(New ReportParameter("UsuarioRegistro", GlobalDTUsuarios(drp("CveUsuario").ToString.ToEntero).FiltroPrimeroValor("Nombre"))) End If If UsuarioActual.CveEmpresa.Contiene(140, 141) Then diff --git a/Empresas/Grales/Formatos/Polizas.rdlc b/Empresas/Grales/Formatos/Polizas.rdlc index 42e9d4893..e77be5ab6 100644 --- a/Empresas/Grales/Formatos/Polizas.rdlc +++ b/Empresas/Grales/Formatos/Polizas.rdlc @@ -1488,6 +1488,295 @@ + + 2.44729cm + + + + + true + true + + + + + Usuario Registró: + + + + + + + + + =Fields!NombreUsuario.Value + + + + + + + UsuarioRegistro1 + + =IIF(IsNothing(Parameters!UsuarioRegistro.Value) OR LEN(CStr(Parameters!UsuarioRegistro.Value)) = 0, True, False) + + + + Bottom + 1pt + 1pt + 1pt + 1pt + + + 3 + + + + + + + + true + true + + + + + + + + + + + 1pt + 1pt + 1pt + 1pt + + + + + + + + true + true + + + + + + + + + + + 1pt + 1pt + 1pt + 1pt + + + + + + + + true + true + + + + + + + + + + + 1pt + 1pt + 1pt + 1pt + + + + + + + + true + true + + + + + + + + + + + + Textbox18 + + =IIF(IsNothing(Parameters!UsuarioRegistro.Value) OR LEN(CStr(Parameters!UsuarioRegistro.Value)) = 0, True, False) + + + + + Black + + 1pt + + 1pt + 1pt + 1pt + 1pt + + + + + + + + true + true + + + + + + + + + + + + Textbox19 + + =IIF(IsNothing(Parameters!UsuarioRegistro.Value) OR LEN(CStr(Parameters!UsuarioRegistro.Value)) = 0, True, False) + + + + + + + 1pt + 1pt + 1pt + 1pt + + + + + + + + true + true + + + + + + + + + + + + Textbox20 + + =IIF(IsNothing(Parameters!UsuarioRegistro.Value) OR LEN(CStr(Parameters!UsuarioRegistro.Value)) = 0, True, False) + + + + + + + 1pt + 1pt + 1pt + 1pt + + + + + + @@ -1548,6 +1837,9 @@ Before + + Before + @@ -1559,7 +1851,7 @@ true 0.05076cm - 3.18542cm + 5.63271cm 19.38789cm - 3.59805cm + 5.68347cm