From 30e43d53322d97e7ae97b65332b1ef3ab9550948 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Fri, 3 Jan 2025 09:46:02 -0700 Subject: [PATCH 1/7] OC Imprimir Req al generar --- Empresas/189/Formatos/Entradas.rdlc | 5 +++-- OC/OC.aspx.vb | 22 +++++++++++++++++++--- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/Empresas/189/Formatos/Entradas.rdlc b/Empresas/189/Formatos/Entradas.rdlc index 8252f7b10..6b57e96b6 100644 --- a/Empresas/189/Formatos/Entradas.rdlc +++ b/Empresas/189/Formatos/Entradas.rdlc @@ -1581,7 +1581,7 @@ =IIf( - Fields!Cargo.Value = 0, + Sum(Fields!Cargo.Value) = 0, "", Format(Sum(Fields!Cargo.Value), "###,###,###.00") ) @@ -1618,7 +1618,7 @@ =IIf( - Fields!Abono.Value = 0, + Sum(Fields!Abono.Value) = 0, "", Format(Sum(Fields!Abono.Value), "###,###,###.00") ) @@ -1643,6 +1643,7 @@ + true diff --git a/OC/OC.aspx.vb b/OC/OC.aspx.vb index aba42539d..ccc00524e 100644 --- a/OC/OC.aspx.vb +++ b/OC/OC.aspx.vb @@ -3148,7 +3148,10 @@ Partial Class OC_OC ViewState("LigaOCs") = If(CveEstatusNuevo <> CboE.SelectedValue.ToEntero, String.Format("{1}", CveOrdenCompra, SerieFolio), "") If CveOrdenCompra > 0 Then - Dim ImprimirOC As String = String.Format("Imprimir Orden de Compra ", Encripta(String.Format("OP=OC&CVEOC={0}", CveOrdenCompra))) + + Dim ImprimirOC As String = String.Format("Imprimir {1} ", Encripta(String.Format("OP=OC&CVEOC={0}", CveOrdenCompra)), If(TipoOC = "OC", "Orden de Compra", "Requisición")) + + Dim Msg As New StringBuilder 'Cuando Estatus = "Autorizada" @@ -3164,11 +3167,24 @@ Partial Class OC_OC End If If LigaOCs = "" Then - Msg.AppendFormat("La {0} No. {1}.
Ha sido guardada correctamente
{2}", TipoLargo, SerieFolio, If(TipoOC = "OC", ImprimirOC, "")) + If TipoOC.ToUpper = "REQ" Then + Msg.AppendFormat("La {0} No. {1}.
Ha sido guardada correctamente
{2}", TipoLargo, SerieFolio, ImprimirOC) + Else + Msg.AppendFormat("La {0} No. {1}.
Ha sido guardada correctamente
{2}", TipoLargo, SerieFolio, If(TipoOC = "OC", ImprimirOC, "")) + End If + Else - Msg.AppendFormat("La {0} No. {1}.
Ha sido guardada correctamente

Orden de Compra:{2}
{3}", TipoLargo, SerieFolio, LigaOCs, If(TipoOC = "OC", ImprimirOC, "")) + + If TipoOC.ToUpper = "REQ" Then + Msg.AppendFormat("La {0} No. {1}.
Ha sido guardada correctamente

Orden de Compra:{2}
{3}", TipoLargo, SerieFolio, LigaOCs, ImprimirOC) + Else + Msg.AppendFormat("La {0} No. {1}.
Ha sido guardada correctamente

Orden de Compra:{2}
{3}", TipoLargo, SerieFolio, LigaOCs, If(TipoOC = "OC", ImprimirOC, "")) + End If + End If + + 'IMPRIME LIGA A POLIZAS If IDPolizasGeneradas.Count > 0 Then Msg.Append("

Polizas generadas:") From 21068b59cdd7401f7412f81e97ae835fb42c09b2 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Fri, 3 Jan 2025 10:39:39 -0700 Subject: [PATCH 2/7] 189 Ajuste Formato Entrada --- Compras/PopUpVerFactura.aspx.vb | 6 ++- Empresas/189/Formatos/Entradas.rdlc | 59 +++++++++++++++++++++++++---- 2 files changed, 55 insertions(+), 10 deletions(-) diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 4ca329ed2..87b1c600a 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -3131,14 +3131,16 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("FechaFactura", If(CveCompra > 0, dr("Fecha").ToString.ToDate().ToString("dd/MM/yyyy"), ""))) params.Add(New ReportParameter("SerieFolio", If(CveCompra > 0, dr("SerieFolio").ToString, ""))) params.Add(New ReportParameter("Moneda", If(CveCompra > 0, dr("Moneda").ToString, ""))) - params.Add(New ReportParameter("Condicion", If(CveCompra > 0, (((dr("FechaVencimiento").ToString.ToDate - dr("Fecha").ToString.ToDate)).TotalDays).ToString, ""))) - params.Add(New ReportParameter("Saldo", If(CveCompra > 0, dr("Saldo").ToString.ToDouble.FormatoNumero(2), ""))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario)) params.Add(New ReportParameter("NombreEntrego", String.Format("REVISÓ ALMACÉN{0}{1}", vbCrLf, Recibio))) params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ ALMACÉN{0}{1}", vbCrLf, Recibio))) + + params.Add(New ReportParameter("FechaVencimiento", If(CveCompra > 0, dr("FechaVencimiento").ToString.ToDate().ToString("dd/MM/yyyy"), ""))) + params.Add(New ReportParameter("NombreCapturo", If(CveCompra > 0, dr("NombreCapturo").ToString, ""))) + Else params.Add(New ReportParameter("NombreRecibio", String.Format(Recibio))) params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo))) diff --git a/Empresas/189/Formatos/Entradas.rdlc b/Empresas/189/Formatos/Entradas.rdlc index 6b57e96b6..653b09464 100644 --- a/Empresas/189/Formatos/Entradas.rdlc +++ b/Empresas/189/Formatos/Entradas.rdlc @@ -1643,7 +1643,6 @@ - true @@ -1993,7 +1992,6 @@ Folio
@@ -2001,7 +1999,6 @@ :
@@ -2009,7 +2006,6 @@ =Parameters!Folio.Value @@ -2044,13 +2040,21 @@ - + Capturo: + + =Parameters!NombreCapturo.Value + + + +
+ + + + + =Parameters!FechaVencimiento.Value + + + + + @@ -2863,6 +2894,18 @@ true ReportParameter1 + + String + true + true + ReportParameter1 + + + String + true + true + ReportParameter1 + From 64348ce135a86128c3fd8821041cb8a3dd5f4bd2 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Fri, 3 Jan 2025 12:20:37 -0700 Subject: [PATCH 3/7] Resumen movmientos diarios Folio compra venta --- Inventarios/RepResumenMovimientosDiario.aspx | 10 ++++++++-- .../RepResumenMovimientosDiario.aspx.vb | 18 ++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/Inventarios/RepResumenMovimientosDiario.aspx b/Inventarios/RepResumenMovimientosDiario.aspx index b8caacc42..a2edaf9d2 100644 --- a/Inventarios/RepResumenMovimientosDiario.aspx +++ b/Inventarios/RepResumenMovimientosDiario.aspx @@ -175,14 +175,20 @@ - + + + <%-- + + + + --%> diff --git a/Inventarios/RepResumenMovimientosDiario.aspx.vb b/Inventarios/RepResumenMovimientosDiario.aspx.vb index 30e15ba61..a2eb4393f 100644 --- a/Inventarios/RepResumenMovimientosDiario.aspx.vb +++ b/Inventarios/RepResumenMovimientosDiario.aspx.vb @@ -72,4 +72,22 @@ Partial Class Inventarios_RepResumenMovimientosDiario Protected Sub LnkImprimir_Click(sender As Object, e As EventArgs) GenerarPDF("PDF") End Sub + + Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) + + If e.Row.RowType = DataControlRowType.DataRow Then + 'veVenta,CveCompra,FolioDocto + Dim CveVenta As Integer = e.Row.DataKey("CveVenta").ToEntero + Dim CveCompra As Integer = e.Row.DataKey("CveCompra").ToEntero + Dim FolioDocto As String = e.Row.DataKey("FolioDocto") + + If CveVenta > 0 Then + e.Row.Cells(5).Text = $"{FolioDocto}" + ElseIf CveCompra > 0 Then + e.Row.Cells(5).Text = $"{FolioDocto}" + End If + + End If + + End Sub End Class From 82bda79bfd72d403ddd24c926ceee05e2132b54b Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Fri, 3 Jan 2025 13:17:09 -0700 Subject: [PATCH 4/7] --Quitar todos en OC.aspx --- OC/OC.aspx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OC/OC.aspx b/OC/OC.aspx index fb4310c97..97f9e50b5 100644 --- a/OC/OC.aspx +++ b/OC/OC.aspx @@ -869,7 +869,7 @@ - + From 3b1b98bb0e35416d005f7dd4c08bb6b518ef367b Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Fri, 3 Jan 2025 14:47:55 -0700 Subject: [PATCH 5/7] --FIX validaciones al editar partida --- Ventas/Ventas.aspx.vb | 50 +++++++++++++++++++++++++++++-------------- 1 file changed, 34 insertions(+), 16 deletions(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 27a11d1a5..f9f5b79ba 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -9141,7 +9141,11 @@ Partial Class Ventas Dim DrProducto = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=CvePSNuevo).FiltroPrimero("") - If Not ValidaAgregarPS(Cantidad, CvePSNuevo, DdlUM.SelectedValue.ToEntero(), PU, DrProducto("CveTipoPS").ToString().ToEntero(), DdlCla.SelectedValue.ToEntero(), DdlSP.SelectedValue.ToEntero(), ObjDescuento, CantidadOriginal:=CantidadOriginal) Then + Dim CveUMPS As Integer = DrProducto("CveUnidadMedida").ToString().ToEntero() + + DdlUM.SelectedValueExist(CveUMPS) + + If Not ValidaAgregarPS(Cantidad, CvePSNuevo, DdlUM.SelectedValue.ToEntero(), PU, DrProducto("CveTipoPS").ToString().ToEntero(), DdlCla.SelectedValue.ToEntero(), DdlSubProyectoDatos.SelectedValue.ToEntero(), ObjDescuento, CantidadOriginal:=CantidadOriginal) Then Exit Sub End If @@ -9158,6 +9162,8 @@ Partial Class Ventas If TmpDT.Rows(e.RowIndex)("CvePS").ToString() <> GvPS.Rows(e.RowIndex).FCDropDownLost("DdlPS").SelectedValue Then 'eliminar y cargar el ps *** + Dim ConsecutivoActual As Integer = TmpDT.Rows(e.RowIndex)("Consec").ToString().ToEntero() + If DtPromociones IsNot Nothing AndAlso DtPromociones.Rows.Count > 0 Then ObjDescuento = CalcularDescuentos(GvPS.Rows(e.RowIndex).FCDropDownLost("DdlPS").SelectedValue.ToEntero(), Cantidad, PU) End If @@ -9196,7 +9202,7 @@ Partial Class Ventas GvPS.Rows(e.RowIndex).FCDropDownList("DdlProyecto").SelectedValue.ToEntero(), GvPS.Rows(e.RowIndex).FCDropDownList("DdlProyecto").SelectedItem.Text, GvPS.Rows(e.RowIndex).FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero(), GvPS.Rows(e.RowIndex).FCDropDownList("DdlSubProyecto").SelectedItem.Text, CuentaPredial:=CuentaPredial, CveVentaDetalle:=GvPS.Rows(e.RowIndex).DataKey("CveVentaDetalle").ToString().ToEntero(), SeActualiza:=True, CvePromocionDetalle:=ObjDescuento.CvePromocionDetalle, - ObjDescuento:=ObjDescuento, NumTurnos:=NumTurnos, CvePrecioLista:=CvePrecioLista, PrecioLista:=PrecioLista) + ObjDescuento:=ObjDescuento, NumTurnos:=NumTurnos, CvePrecioLista:=CvePrecioLista, PrecioLista:=PrecioLista, ConsecutivoManual:=ConsecutivoActual) ' TmpDT.Rows(e.RowIndex)("CveUM") = Ddl.SelectedValue ' TmpDT.Rows(e.RowIndex)("UM") = Ddl.SelectedItem.Text @@ -19921,7 +19927,7 @@ Partial Class Ventas ObjDescuento = ObjDescuentoGral End If - If ValidaAgregarPS(Cantidad, CvePS, DdlUnidadMedida.SelectedValue.ToEntero(), PU, HdnTipoPS.Value.ToEntero(), DdlClasificacion.SelectedValue.ToEntero(), DdlSubProyecto.SelectedValue.ToEntero(), ObjDescuento) Then + If ValidaAgregarPS(Cantidad, CvePS, DdlUnidadMedida.SelectedValue.ToEntero(), PU, HdnTipoPS.Value.ToEntero(), DdlClasificacion.SelectedValue.ToEntero(), DdlSubProyectoDatos.SelectedValue.ToEntero(), ObjDescuento) Then If UsuarioActual.Empresa.Funcionalidad(507) = DdlPS.SelectedValue Then CvePSAmortizacion = DdlPS.SelectedValue.ToEntero().ToEntero() @@ -20253,7 +20259,7 @@ Partial Class Ventas Optional RegeneraIEPS As Boolean = True, Optional CveVentaDetallePedido2 As Integer = 0, Optional SeActualiza As Boolean = False, Optional CvePromocionDetalle As Integer = -1, Optional EsCargo As Boolean = False, Optional ImporteProntoPago As Decimal = 0, Optional ByRef ObjDescuento As Modelos.VentaDescuentos = Nothing, Optional CvePrecioLista As Integer = -1, Optional PrecioLista As String = "", Optional CveActivoFijo As Integer = -1, Optional AFDepreciacion As Decimal = 0D, Optional AFValorInicial As Decimal = 0D, Optional NumTurnos As Decimal = 0D, Optional CantidadConversion As Decimal = 0, - Optional Costo As Decimal = 0, Optional PorcentajeIVAFijo As Decimal = -1) As Boolean + Optional Costo As Decimal = 0, Optional PorcentajeIVAFijo As Decimal = -1, Optional ConsecutivoManual As Integer = 0) As Boolean Dim Retorno As Boolean = False Try @@ -20296,16 +20302,22 @@ Partial Class Ventas Row("SubProyecto") = SubProyecto Row("Serie") = Serie Row("TiempoEntrega") = TiempoEntrega - If Modalidad = "U" Then - Row("Orden") = Index + + If ConsecutivoManual > 0 Then + Row("Orden") = ConsecutivoManual Else - Dim ConsecutivoActual As Integer = TmpDT.MAX("Consec").ToEntero() - If ConsecutivoActual < 0 Then - ConsecutivoActual = 0 + If Modalidad = "U" Then + Row("Orden") = Index + Else + Dim ConsecutivoActual As Integer = TmpDT.MAX("Consec").ToEntero() + If ConsecutivoActual < 0 Then + ConsecutivoActual = 0 + End If + Row("Orden") = ConsecutivoActual + 1 End If - Row("Orden") = ConsecutivoActual + 1 End If + Dim DrPS As DataRow = Nothing DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("") ' Estado = -1 @@ -20410,16 +20422,22 @@ Partial Class Ventas Row("ClaveSATUnidadAduana") = DrPS("ClaveSATUnidadAduana") Row("ClaveSATFraccionArancelariaDescripcion") = DrPS("ClaveSATFraccionArancelariaDescripcion") Row("ClaveSATUnidadAduanaDescripcion") = DrPS("ClaveSATUnidadAduanaDescripcion") - If Modalidad = "U" Then - Row("Consec") = Index + + If ConsecutivoManual > 0 Then + Row("Consec") = ConsecutivoManual Else - Dim ConsecutivoActual As Integer = TmpDT.MAX("Consec").ToEntero() - If ConsecutivoActual < 0 Then - ConsecutivoActual = 0 + If Modalidad = "U" Then + Row("Consec") = Index + Else + Dim ConsecutivoActual As Integer = TmpDT.MAX("Consec").ToEntero() + If ConsecutivoActual < 0 Then + ConsecutivoActual = 0 + End If + Row("Consec") = ConsecutivoActual + 1 End If - Row("Consec") = ConsecutivoActual + 1 End If + Row("PS") = DrPS("PS") Row("CodigoPS") = DrPS("PSCodigo").ToString() Row("CveTipoPS") = DrPS("CveTipoPS") From 7d855b79acc5e466008a7e1ce5817236389549bf Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Fri, 3 Jan 2025 14:56:22 -0700 Subject: [PATCH 6/7] --FIX incluye todos --- Ventas/Ventas.aspx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index 9d7cf563d..51652a2a7 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -1338,7 +1338,7 @@ - + <%----%> <%----%> From 278c3add7ecaee4fc552d9d9966d22d6d38124fd Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Fri, 3 Jan 2025 15:23:29 -0700 Subject: [PATCH 7/7] --FIX recarga de precios de lista. --FIX forma y metodo de pago en alta de cliente --- Ventas/Ventas.aspx.vb | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index f9f5b79ba..70099aba3 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -18591,6 +18591,25 @@ Partial Class Ventas Dim DdlPrecioListaEdit = GvRow.FCDropDownList("DdlPrecioListaEdit") + If UsuarioActual.CveEmpresa = 189 Then + If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Cot", "Ped") AndAlso GvRow.FCHtmlGenericControl("DivPrecioLista").Visible Then + Using ObjVta As New ClsVentas + If ObjVta.GetPreciosListaSPPermitidos(DdlSubProyectoDatos.SelectedValue.ToEntero(), CvePSParametro, UsuarioActual.CveEmpresa) Then + Dim Dt As DataTable = Nothing + If UsuarioActual.TienePermisoProceso(384) Then + Dt = ObjVta.DtResultados.Copy() + Else + Dt = ObjVta.DtResultados.FiltraParametros("Restringuida = 'False'") + End If + + GvRow.FCDropDownList("DdlPrecioListaEdit").DataSource = Dt + GvRow.FCDropDownList("DdlPrecioListaEdit").DataBind() + GvRow.FCDropDownList("DdlPrecioListaEdit").SelectedValueExist(GvRow.DataKey("CvePrecioLista")) + End If + End Using + End If + End If + Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSParametro).FiltroPrimero("") If DrPS IsNot Nothing Then 'SUGIERE PRECIO @@ -25423,6 +25442,16 @@ Partial Class Ventas Exit Sub End If + If DdlMetodoCliente.SelectedValue.ToEntero() <= 0 Then + Alert("El 'Método Pago' es requerido.", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + + If DdlFormaCliente.SelectedValue.ToEntero() <= 0 Then + Alert("El 'Forma Pago' es requerido.", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + If TxtRFCCliente.Text.Trim().ToUpper().Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlRegimenFiscalCliente.SelectedValue <> "11" Then Alert("El Regimen fiscal del cliente debe ser '616 - Sin obligaciones fiscales' cuando se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia) Exit Sub @@ -25467,7 +25496,7 @@ Partial Class Ventas If ObjCliente.AgregarClienteNoFrecuente(TxtNombreCliente.Text.Trim, TxtDireccionCliente.Text.Trim, TxtNumExtCliente.Text.Trim, TxtNumIntCliente.Text.Trim, TxtColoniaCliente.Text.Trim, TxtLocalidadCliente.Text.Trim, TxtCiudadCliente.Text.Trim, DdlEstadoSAT.SelectedValue.ToEntero, TxtRFCCliente.Text.Trim, TxtCPCliente.Text.Trim, TxtTelefonoCliente.Text.Trim, TxtCorreoCliente.Text.Trim, - DdlSubProyectoDatos.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "", -1, -1, CvePrecioLista:=CvePrecioLista, + DdlSubProyectoDatos.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "", DdlMetodoCliente.SelectedValue.ToEntero(), DdlFormaCliente.SelectedValue.ToEntero(), CvePrecioLista:=CvePrecioLista, RegimenSociedad:=TxtRegimenSociedad.Text, TipoPersona:=TipoPersona, CveRegimenFiscal:=CveRegimenFiscal, CveUsoCFDI:=CveUsoCFDI, CveClienteClasificacion:=DdlGiro.SelectedValue.ToEntero()) Then If ObjCliente.DtResultados.Rows.Count > 0 Then