From 1717d8ce0c6c25d42f2386998aaf9ad0b56ef09e Mon Sep 17 00:00:00 2001 From: rakcsle Date: Thu, 30 Jan 2025 10:14:13 -0700 Subject: [PATCH 01/10] =?UTF-8?q?3=20Contratos=20VYA=20impresion=20de=20PD?= =?UTF-8?q?F=20solo=20sale=20un=20regitro=20y=20XLS=20marca=20error,=202?= =?UTF-8?q?=20En=20Inicio=20Vtas=20sin=20enviar=20correo,=20poner=20un=20e?= =?UTF-8?q?nv=C3=ADar=20masivo=20check=20all=20y=20boton=20en=20viar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Empresas/Grales/Formatos/RepContratos.rdlc | 2060 ++++++++++---------- Inicio.aspx | 19 + Transportes/RepContratos.aspx.vb | 30 +- 3 files changed, 1034 insertions(+), 1075 deletions(-) diff --git a/Empresas/Grales/Formatos/RepContratos.rdlc b/Empresas/Grales/Formatos/RepContratos.rdlc index b35a2dd77..25b0b19e0 100644 --- a/Empresas/Grales/Formatos/RepContratos.rdlc +++ b/Empresas/Grales/Formatos/RepContratos.rdlc @@ -1,1073 +1,5 @@  - - - - - - - - - - - true - true - - - - - No. Contrato - - - - - - - Textbox28 - - - - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - 5.31002cm - - - 4.89749cm - - - 2.07667cm - - - 4.48106cm - - - 2.84395cm - - - 2.05021cm - - - 2.23542cm - - - 1.63279cm - - - - - 0.6cm - - - - - true - true - - - - - =Fields!DescripcionContrato.Value - - - - - - - DescripcionContrato - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =IIF(Fields!NombreComercial.Value = "", Fields!RazonSocial.Value, Fields!NombreComercial.Value) - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Monto.Value - - - - - - - Monto - - - 2pt - 2pt - 2pt - 2pt - es-MX - - - - - - - - true - true - - - - - =Fields!Vendedor.Value - - - - - - - Textbox6 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!SubProyectoContrato.Value - - - - - - - Textbox18 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!FechaInicial.Value - - - - - - - FechaInicial - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!FechaFinal.Value - - - - - - - FechaFinal - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!ContratoAvance.Value - - - - - - - ContratoAvance - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - 0.6cm - - - true - true - - - - - Descripción - - - - - - - Textbox40 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - true - true - - - - - Cliente - - - - - - - Textbox49 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - true - true - - - - - Monto Adjudicado - - - - - - - Textbox17 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - true - true - - - - - Vendedor - - - - - - - Textbox3 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - true - true - - - - - SubProyecto - - - - - - - Textbox16 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - true - true - - - - - Fecha Inicio - - - - - - - Textbox5 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - true - true - - - - - Fecha Fin - - - - - - - Textbox12 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - true - true - - - - - Avance - - - - - - - Textbox14 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - 2.04475cm - - - true - true - - - - - =Fields!NumeroContrato.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - DataSet1 - 0.06614cm - 1.2cm - 27.57236cm - - - - - - 0.58702in - - - - - - - Textbox1 - 0.46743cm - 7.62386cm - 0.6cm - 12.60299cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - REPORTE DE CONTRATOS - - - - - - - - - - - - - - - - Textbox2 - 1.10271cm - 8.88842cm - 0.52945cm - 9.98771cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - External - =Parameters!LogoPath.Value - FitProportional - 0.06614cm - 2.18834cm - 2.33715cm - 2 - - - - - - true - true - - - - - =Parameters!AgrupadoPor.Value - HTML - - - - - - - - - - - - - - - - Textbox2 - 2.22362cm - 0.06614cm - 0.52945cm - 27.57236cm - 3 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - 0.84667cm - true - true - - - true - true - - - - - ="Página " & Globals.PageNumber & " de " & Globals.TotalPages - - - - - - - Textbox3 - 0.16582cm - 25.57263cm - 0.68085cm - 2.06587cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Usuario: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!UsuarioImprimio.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Impresión: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!FechaImpresion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 21cm - 29.7cm - 1cm - 1cm - 0.5cm - 0.5cm - 0.13cm - + + + + + + Textbox3 + + + LightGrey + + + + + + + + true + true + + + + + Fecha Salida + + + + + + + Textbox6 + + + LightGrey + + + + + + + + true + true + + + + + Viaje + + + + + + + Textbox13 + + + LightGrey + + + + + + + + true + true + + + + + Cliente + + + + + + + Textbox17 + + + LightGrey + + + + + + + + true + true + + + + + Lugar de Salida + + + + + + + Textbox19 + + + LightGrey + + + + + + + + true + true + + + + + F. Regreso + + + + + + + Textbox21 + + + LightGrey + + + + + + + + true + true + + + + + Rem/Invoice + + + + + + + Textbox5 + + + LightGrey + + + + + + + + true + true + + + + + F. Ingreso + + + + + + + Textbox23 + + + LightGrey + + + + + + + + true + true + + + + + Estatus + + + + + + + Textbox25 + + + LightGrey + + + + + + + + 0.46771cm + + + + + true + true + + + + + =Fields!NumeroContrato.Value + + + + + + + + + + + + + true + true + + + + + =Fields!FechaInicial.Value + + + + + + + FechaInicial + + + + + + + + + + true + true + + + + + =Fields!DescripcionContrato.Value + + + + + + + + + + + + + true + true + + + + + =Fields!NombreComercial.Value + + + + + + + + + + + + + true + true + + + + + =Fields!Ubicacion.Value + + + + + + + + + + + + + true + true + + + + + =Fields!FechaFinal.Value + + + + + + + FechaFinal + + + + + + + + + + true + true + + + + + =Fields!RemisionSerieFolio.Value + + + + + + + + + + + + + true + true + + + + + =Fields!FechaIng.Value + + + + + + + FechaIng + + + + + + + + + + true + true + + + + + =Fields!ContratoEstatus.Value + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + After + + + + + + + true + true + DataSet1 + 0.17639cm + 0.06614cm + 0.96188cm + 28.12798cm + + + + + + 0.53494in + + + + + + + Textbox1 + 0.46743cm + 7.62386cm + 0.6cm + 12.60299cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + REPORTE DE CONTRATOS + + + + + + + + + + + + + + + + Textbox2 + 1.10271cm + 8.88842cm + 0.52945cm + 9.98771cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + External + =Parameters!LogoPath.Value + FitProportional + 0.06614cm + 2.18834cm + 2.33715cm + 2 + + + + + + true + true + + + + + =Parameters!AgrupadoPor.Value + HTML + + + + + + + + + + + + + + + + Textbox2 + 2.22362cm + 0.06614cm + 0.52945cm + 27.57236cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + 0.84667cm + true + true + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox3 + 0.16582cm + 25.57263cm + 0.68085cm + 2.06587cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Usuario: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!FechaImpresion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 21cm + 29.7cm + 0.5cm + 0.5cm + 0.5cm + 0.5cm + 0.13cm + - =Parameters!FechaImpresion.Value + =Format(Now, "dd/MM/yyyy HH:mm:ss") - Textbox31 - 0.17639cm - 8.8256cm + 0.03528cm + 7.58219cm 0.41981cm 6.02198cm - true @@ -1819,6 +1818,37 @@ Left + + + + Condiciones de Pago: + + + + =Parameters!PlazoPago.Value + + + + días. + + + + + From 4fcbc0b6c3112282d49c6efc375685c20baf3bab Mon Sep 17 00:00:00 2001 From: rakcsle Date: Thu, 30 Jan 2025 11:59:35 -0700 Subject: [PATCH 05/10] 6 Rep Remisiones ajustes --- App_Code/ClsPaginas.vb | 4 ++++ Empresas/189/Formatos/OC.rdlc | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 7b51ad4dd..b29275701 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -8019,6 +8019,10 @@ Public Class ClsPaginas params.Add(New ReportParameter("Comprador", ObjOC.UsuarioAsignado)) End If + If UsuarioActual.CveEmpresa.Contiene(189) Then + params.Add(New ReportParameter("DiasCreditoOC", dtOC(0)("DiasCreditoOC").ToString)) + End If + If UsuarioActual.CveEmpresa.Contiene(13, 83) Then 'Dim ObjCuentasBancos As New ClsGenerales() 'If ObjCuentasBancos.GetCuentasDepositos(CveProveedor:=ObjOC.CveProveedor) Then diff --git a/Empresas/189/Formatos/OC.rdlc b/Empresas/189/Formatos/OC.rdlc index 17d77e4e4..ff2f78372 100644 --- a/Empresas/189/Formatos/OC.rdlc +++ b/Empresas/189/Formatos/OC.rdlc @@ -1829,7 +1829,7 @@ - =Parameters!PlazoPago.Value + =Parameters!DiasCreditoOC.Value @@ -418,7 +425,7 @@
-
+
@@ -426,7 +433,25 @@
-
+
+ + +
+
+ OC +
+
+ +
+ +
+ +
+
+ + +
+
" style="display: inline-block; margin-right: -20px; width: 150px;" /> " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> diff --git a/Inventarios/Kardex.aspx.vb b/Inventarios/Kardex.aspx.vb index dba056008..ecdac6154 100644 --- a/Inventarios/Kardex.aspx.vb +++ b/Inventarios/Kardex.aspx.vb @@ -301,7 +301,7 @@ Partial Class Inventarios_Kardex If NumeroParte.Trim.Length > 0 Then If UsuarioActual.TienePermisoPagina(13) Then - LblNumeroParte.Text = $" Producto: {Codigo} -{NumeroParte} - {PS}" + LblNumeroParte.Text = $" Producto: {Codigo} - {NumeroParte} - {PS}" Else LblNumeroParte.Text = $" Producto: {NumeroParte}" End If @@ -333,10 +333,12 @@ Partial Class Inventarios_Kardex If ObjOC.PendientesCompra(ddlProducto2.SelectedValue.ToEntero, tCveSubProyectos, UsuarioActual.CveEmpresa) Then GvOC.DataSource = ObjOC.DtResultados.Copy.FiltraParametros("", "Fecha Desc") LnkIndicador_OC.Text = ObjOC.DtResultados.Copy.SUM("CantidadPendienteVincular").ToString() + LnkIndicador_OC2.Text = ObjOC.DtResultados.Copy.SUM("CantidadPendienteVincular").ToString() End If ObjOC.Dispose() GvOC.DataBind() UpModalOC.Update() + UpOCS.Update() End Sub Private Function CargarKardex(CvePS As Integer) As DataTable @@ -408,6 +410,8 @@ Partial Class Inventarios_Kardex If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then CargarOCPendientesCompra() DivIndicadorOC.Visible = True + DivIndicadorOC2.Visible = True + UpOCS.Update() End If UpIndicadores.Update() diff --git a/Ventas/RepRemisiones.aspx b/Ventas/RepRemisiones.aspx index df62c4fe9..12bd915ec 100644 --- a/Ventas/RepRemisiones.aspx +++ b/Ventas/RepRemisiones.aspx @@ -216,13 +216,13 @@
- - + @@ -230,6 +230,7 @@ + diff --git a/Ventas/RepRemisiones.aspx.vb b/Ventas/RepRemisiones.aspx.vb index 9b4f3a457..a25f9bfaf 100644 --- a/Ventas/RepRemisiones.aspx.vb +++ b/Ventas/RepRemisiones.aspx.vb @@ -67,7 +67,12 @@ Partial Class RepRemisiones #End Region Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load - If Not Page.IsPostBack Then + If Not Page.IsPostBack Then + + If UsuarioActual.CveEmpresa.Contiene(189) Then + GvDatos.Columns(9).Visible = True + End If + CargaSucursales() CargaCliente() CargaContrato() @@ -89,18 +94,19 @@ Partial Class RepRemisiones Sucursales = IIf(DdlSubProyectos.GetSelectedValuesM = "", "-1", DdlSubProyectos.GetSelectedValuesM).ToString Dim Vendedores As String = IIf(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM).ToString + Dim PrimerProducto As Boolean = If(UsuarioActual.CveEmpresa.Contiene(189), True, False) Dim ObjVentas As New ClsVentas - If ObjVentas.GetRepRemisionesSinFacturar(FechaI, FechaF, FechaV, Sucursales, CveCliente, CveContrato, Vendedores, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, ConsultaInventario:=chkInv.Checked) Then + If ObjVentas.GetRepRemisionesSinFacturar(FechaI, FechaF, FechaV, Sucursales, CveCliente, CveContrato, Vendedores, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, ConsultaInventario:=chkInv.Checked, PrimerProducto:=PrimerProducto) Then DtVentas = ObjVentas.DtResultados.Copy() GvDatos.DataSource = DtVentas End If If DtVentas IsNot Nothing Then - GvDatos.Columns(11).Visible = DtVentas.SUMD("Descuento") > 0 + GvDatos.Columns(12).Visible = DtVentas.SUMD("Descuento") > 0 End If - GvDatos.Columns(14).Visible = chkInv.Checked 'solo se visualiza si está selccionada + GvDatos.Columns(15).Visible = chkInv.Checked 'solo se visualiza si está selccionada ObjVentas.Dispose() GvDatos.DataBind() @@ -124,7 +130,10 @@ Partial Class RepRemisiones e.Row.Cells(2).ForeColor = Drawing.Color.Red End If + e.Row.Cells(1).Text = $"{e.Row.DataKey("Fecha").ToDate().ToString("dd/MM/yyyy HH:mm:ss")}" + End If + e.Row.FCLiteral("LtlTotal").Text = " 0, e.Row.DBCampo("CveCliente").ToString(), DdlClientes.SelectedValue) & "&CveContrato=" & CveContrato & "&CveSubProyecto=" & Sucursales & "&CveMoneda=" & e.Row.DBCampo("CveMoneda") & """>" & e.Row.FCLiteral("LtlTotal").Text & "" End If From abeea658a4a04655ae38dd2897ad35f9d2d2696b Mon Sep 17 00:00:00 2001 From: rakcsle Date: Fri, 31 Jan 2025 15:11:34 -0700 Subject: [PATCH 07/10] 8 -COMO CANCELAR DE MUCHAS PROMOCIONES _siguiente semana (Acciones inactivar), Proveedores abonar RNC remision generada ya existe --- App_Code/ClsVentas.vb | 21 ++++++++++++ Bancos/ProveedoresAbonar.aspx.vb | 20 +++++++++--- Ventas/CatPromociones.aspx | 53 ++++++++++++++++++++++++++++-- Ventas/CatPromociones.aspx.vb | 55 +++++++++++++++++++++++++++++++- 4 files changed, 141 insertions(+), 8 deletions(-) diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index c89366233..a1502f8a6 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -2611,6 +2611,27 @@ Public Class ClsVentas Return Retorno End Function + Public Function UpdatePromocionEstatus(CvePromocion As Integer, Estatus As Boolean, CveUsuario As Integer, CveEmpresa As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Vta_PromocionEstatusUpdate") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CvePromocion", SqlDbType.Float).Value = CvePromocion + .Add("@Estatus", SqlDbType.Bit).Value = Estatus + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al actualizar el estatus la Promoción.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function + Public Function RemovePromociones(CvePromocion As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_PromocionesRemove") diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb index c647ba164..2c5693387 100644 --- a/Bancos/ProveedoresAbonar.aspx.vb +++ b/Bancos/ProveedoresAbonar.aspx.vb @@ -858,6 +858,7 @@ Partial Class Bancos_ProveedoresAbonar Pago.CveMonedaPago = CveMoneda 'inserto las compras que voy a pagar + Dim nRow As Integer = 1 For Each gvr As GridViewRow In GvCxP.Rows If gvr.FCCheckBox("Chk").Checked Then @@ -963,7 +964,7 @@ Partial Class Bancos_ProveedoresAbonar If serieFolioArray.Length = 2 Then SerieRNC = serieFolioArray(0) FolioRNC = serieFolioArray(1) - SerieFolioRNC = $"{FolioRNC}-D-{SerieRNC = serieFolioArray(0)}" + SerieFolioRNC = $"D-{SerieRNC}-{ FolioRNC}" Else FolioRNC = serieFolioArray(0) @@ -992,9 +993,19 @@ Partial Class Bancos_ProveedoresAbonar End If + Dim ExisteRNC As Boolean = False + If ObjComp.GetCompras(-1, $"D-{SerieRNC}", FolioRNC, CveProveedor, -1, UsuarioActual.CveEmpresa) Then + Dim dtRNC As DataTable = ObjComp.DtResultados.FiltraParametros(" TipoDocto ='RNC' ") + If dtRNC.Rows.Count > 0 Then + ExisteRNC = True + SerieFolioRNC = $"D{nRow}-{SerieRNC}-{ FolioRNC}" + End If + + End If + Dim CveCompraRNC As Integer = GeneraRNC(Descuento, ObjComp.IniciaTransacSQL, gvr.DataKey("CveCompra").ToEntero, CompraActual, ObjMov, CvePrePoliza, CveProveedor, HplProveedor.Text, TxtFechaDocumento.Text.ToDate, $"Remisión Nota de Crédito pago {gvr.DataKey("SerieFolio").ToString}", gvr.DataKey("CveMoneda").ToEntero, TxtTC.Text.ToDecimal, SerieRNC, FolioRNC, PorcentajeIVA:=PorcentajeIVA, - CveSubProyecto:=gvr.DataKey("CveSubProyecto").ToEntero) + CveSubProyecto:=gvr.DataKey("CveSubProyecto").ToEntero, nRow:=nRow, ExisteRNC:=ExisteRNC) If CveCompraRNC > 0 Then @@ -1012,6 +1023,7 @@ Partial Class Bancos_ProveedoresAbonar End If + nRow = nRow + 1 Next Dim UsaComplementariaBancos As Boolean = Not UsuarioActual.CveEmpresa.Contiene(7, 11, 122, 145, 13, 83) @@ -1956,7 +1968,7 @@ Partial Class Bancos_ProveedoresAbonar Public Function GeneraRNC(ImporteRNC As Decimal, ByRef sqltransaccion As SqlTransaction, CveCompraAmortizada As Integer, ByRef CompraActual As Compra, ByRef ObjConta As ClsContabilidad, CvePrePoliza As Integer, CveProveedor As Integer, NombreProveedor As String, Fecha As Date, Descripcion As String, CveMoneda As Integer, TipoCambio As Decimal, Serie As String, Folio As String, Optional EsDRMN As Boolean = False, - Optional TmpListadoPS As DataTable = Nothing, Optional PorcentajeIVA As Decimal = 0, Optional CveSubProyecto As Integer = -1) As Integer + Optional TmpListadoPS As DataTable = Nothing, Optional PorcentajeIVA As Decimal = 0, Optional CveSubProyecto As Integer = -1, Optional nRow As Integer = -1, Optional ExisteRNC As Boolean = False) As Integer Dim CveCompraRNC As Integer = -1 Dim respuesta As Boolean = True 'Dim PorcentajeIVA As Decimal = TmpDT.MAX("IVAPorcentaje").ToDecimal @@ -1990,7 +2002,7 @@ Partial Class Bancos_ProveedoresAbonar .Fecha = Fecha, .CveMoneda = CveMoneda, .TipoCambio = If(CveMoneda = 1, 1, TipoCambio), - .Serie = $"D-{Serie}", + .Serie = If(ExisteRNC, $"D{nRow}-{Serie}", $"D-{Serie}"), .Folio = Folio, .CveCompraAmortizacion = CveCompraAmortizada, .CveCompraRelacionada = CveCompraAmortizada diff --git a/Ventas/CatPromociones.aspx b/Ventas/CatPromociones.aspx index e19fcc227..dbc391dc6 100644 --- a/Ventas/CatPromociones.aspx +++ b/Ventas/CatPromociones.aspx @@ -8,6 +8,9 @@
  • Nueva Promoción
  • +
  • + Inactivar +
  • @@ -90,16 +93,47 @@
    - " style="display: inline-block; margin-right: -20px; width: 150px;" /> - " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> + +
    + +
    + +
    + + + + Inactivar + + +
    +
    + " style="display: inline-block; margin-right: -20px; width: 150px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> + +
    + +
    + + - + + + + + + + + + @@ -128,5 +162,18 @@ + diff --git a/Ventas/CatPromociones.aspx.vb b/Ventas/CatPromociones.aspx.vb index a18864c75..ce3ffbc43 100644 --- a/Ventas/CatPromociones.aspx.vb +++ b/Ventas/CatPromociones.aspx.vb @@ -22,18 +22,25 @@ Partial Class Ventas_CatPromociones Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If Not Page.IsPostBack Then + + If UsuarioActual.TienePermisoProceso(386) Then + LnkAccInactivar.Visible = True + End If + InicializaControles() + OcultarMostrarInactivar(True) CargaDatos() End If End Sub + Private Sub InicializaControles() CargarCentrosDeCosto(Nothing, Nothing, Nothing, LblSubProyecto) - GvDatos.Columns(6).HeaderText = LblSubProyecto.Text + GvDatos.Columns(7).HeaderText = LblSubProyecto.Text DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa) DdlSubProyecto.DataBind() @@ -95,4 +102,50 @@ Partial Class Ventas_CatPromociones CargaDatos() End Sub + + Protected Sub LnkAccInactivar_Click(sender As Object, e As EventArgs) + OcultarMostrarInactivar(True) + End Sub + + Private Sub OcultarMostrarInactivar(Mostrar As Boolean) + + GvDatos.Columns(0).Visible = Mostrar + LnkInactivar.Visible = Mostrar + UpInactivar.Update() + UpDatos.Update() + End Sub + Protected Sub LnkInactivar_Click(sender As Object, e As EventArgs) + Dim ObjVentas As New ClsVentas + ObjVentas.IniciaTransacSQL() + Dim ErrorProceo As Boolean = False + + Dim ContInactivadas As Integer = 0 + For Each GvRow As GridViewRow In GvDatos.Rows + Dim Chk As CheckBox = GvRow.FCCheckBox("chk") + Dim CvePromocion As Integer = GvRow.DataKey("CvePromocion").ToEntero + + If Chk.Checked Then + If ObjVentas.UpdatePromocionEstatus(CvePromocion, False, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then + ContInactivadas = ContInactivadas + 1 + Else + ErrorProceo = True + Exit Sub + End If + End If + + Next + + If ErrorProceo Then + ObjVentas.RollBack() + Else + ObjVentas.Commit() + Alert($"Se inactivaron {ContInactivadas} promociones.") + OcultarMostrarInactivar(False) + End If + + + + ObjVentas.Dispose() + End Sub + End Class \ No newline at end of file From 09d09eb6db276a83be2a452af83b3d49a4aaef14 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Fri, 31 Jan 2025 16:33:03 -0700 Subject: [PATCH 08/10] =?UTF-8?q?3=20Aplicaci=C3=B3n=20de=20anticipo=20=20?= =?UTF-8?q?sobre=20una=20factura=20ya=20registrada,=20que=20genere=20NC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/Ventas.aspx.vb | 266 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 242 insertions(+), 24 deletions(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index a2e9b6c87..fe6236592 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -5703,6 +5703,7 @@ Partial Class Ventas VentaActual.PorcentajeIVA = DbRowVenta("PorcentajeIVA").ToString.ToDecimal VentaActual.UsuarioActual = UsuarioActual VentaActual.CveSubProyecto = DbRowVenta("CveSubProyecto").ToString.ToEntero + VentaActual.CveUsoCFDI = DbRowVenta("CveUsoCFDI").ToString.ToEntero HdnAmortizacion.Value = LblAmort.Text.ToDouble.ToString() HdnSubTotalDescuestos.Value = (TxtSubTotal.Text.Replace(",", "").ToDouble - LblDescuentos.Text.Replace(",", "").ToDouble - LblAmortizacion.Text.Trim.Replace(",", "").ToDouble - TxtRetISR.Text.Replace(",", "").ToDouble).FormatoNumero(2) @@ -17525,6 +17526,123 @@ Partial Class Ventas End If End If End Sub + + Private Function GenerarNC(ImporteTotal As Decimal, CveVendedor As Integer, ByRef Venta As Venta, GvRowAnticipo As GridViewRow, ByRef ObjVentas As ClsVentas) As Modelos.Factura.MMensajeFactura + Dim Retorno As Modelos.Factura.MMensajeFactura = Nothing + Dim SbAlert As New StringBuilder() + + Try + Dim ObjNC = Modelos.Factura.CrearVentaNueva(UsuarioActual, Venta.CveSubProyecto, Venta.CveCliente, Venta.CveMoneda, "Egs") + ObjNC.CveMoneda = Venta.CveMoneda + If ObjNC.CveMoneda = 2 Then + ObjNC.TipoCambio = GlobalTipoCambio(Now).ToString().ToDecimal() + Else + ObjNC.TipoCambio = 1 + End If + + Dim Total As Decimal = ImporteTotal + Dim subTotal As Decimal = (Total / (1D + Venta.PorcentajeIVA)) + 'Dim IVA = (subTotal * Factura.PorcentajeIVA).RoundSQL(2) + Dim PU As Decimal = subTotal + Dim Cantidad As Decimal = 1D + Dim Descuento As Decimal = 0 + Dim Obs = "" + + Dim CvePSAnticipo As Integer = 1 + Dim DatarowPS = GlobalDTPS(UsuarioActual.CveEmpresa, SATClavePS:="84111506").FiltroPrimero("CodigoPS LIKE '%ANTICIPO%' OR CodigoPS LIKE '%anticipo%' OR CodigoPS LIKE '%Anticipo%'") + If DatarowPS IsNot Nothing Then + CvePSAnticipo = DatarowPS("CvePS").ToString().ToEntero() + End If + + ObjNC.AgregarPS(CvePSAnticipo, Cantidad, PU, Descuento, Obs, CveSubProyecto:=Venta.CveSubProyecto, PorcentajeIVA:=Venta.PorcentajeIVA) + ObjNC.CalculaTotales() + + Dim DtVentasNC = New DataTable + DtVentasNC.Columns.Add("CveVenta", GetType(Integer)) + DtVentasNC.Columns.Add("Importe", GetType(Decimal)) + DtVentasNC.Columns.Add("FolioFiscal", GetType(String)) + DtVentasNC.Columns.Add(New DataColumn With {.ColumnName = "TC", .DataType = GetType(Decimal), .DefaultValue = 1}) + DtVentasNC.Columns.Add(New DataColumn With {.ColumnName = "TCCambioValuacion", .DataType = GetType(Decimal), .DefaultValue = 1}) + DtVentasNC.Columns.Add(New DataColumn With {.ColumnName = "CveEstatusFactura", .DataType = GetType(Integer), .DefaultValue = -1}) + DtVentasNC.Columns.Add(New DataColumn With {.ColumnName = "Folio", .DataType = GetType(String), .DefaultValue = ""}) + + DtVentasNC.Rows.Add(Venta.CveVenta, Total, "") + + ObjNC.DtVentasNC = DtVentasNC + + Dim DtVentasRelacionadas As New DataTable() + DtVentasRelacionadas.Columns.Add("CveVenta", GetType(Integer)) + DtVentasRelacionadas.Rows.Add(Venta.CveVenta) + + ObjNC.DtVentasRelacionadas = DtVentasRelacionadas + + Dim DtAnticipos As New DataTable() + DtAnticipos.Columns.Add("CveVenta", GetType(Integer)) + DtAnticipos.Columns.Add("Importe", GetType(Decimal)) + DtAnticipos.Columns.Add("CveConceptoContable", GetType(Integer)) + DtAnticipos.Columns.Add("CveIE", GetType(Integer)) + DtAnticipos.Columns.Add("FolioFiscal", GetType(String)) + DtAnticipos.Columns.Add("Descuentos", GetType(Decimal)) + DtAnticipos.Columns.Add("TotalAnticipo", GetType(Decimal)) + DtAnticipos.Columns.Add("SubTotalAnticipo", GetType(Decimal)) + DtAnticipos.Columns.Add("CveMoneda", GetType(Decimal)) + DtAnticipos.Columns.Add("Fecha", GetType(DateTime)) + DtAnticipos.Columns.Add("TipoCambioPago", GetType(Decimal)) + DtAnticipos.Columns.Add("Folio", GetType(String)) + DtAnticipos.Columns.Add("Tipo", GetType(String)) + + If GvRowAnticipo IsNot Nothing Then + Dim CveVenta = GvRowAnticipo.DataKey("CveVenta").ToEntero() + Dim Importe = GvRowAnticipo.FCTextBox(String.Format("TxtAnticipo{0}", GvRowAnticipo.RowIndex)).Text.ToDecimal() + Dim CveConceptoContable = GvRowAnticipo.DataKey("CveConceptoContable").ToEntero() + Dim CveIE = GvRowAnticipo.DataKey("CveIE").ToEntero() + + Dim FolioFiscal = GvRowAnticipo.DataKey("FolioFiscal") + Dim Descuentos As Decimal = GvRowAnticipo.DataKey("Descuentos").ToDecimal() + Dim TotalAnticipo As Decimal = GvRowAnticipo.DataKey("TotalAnticipo").ToDecimal() + Dim SubTotalAnticipo As Decimal = GvRowAnticipo.DataKey("SubTotalAnticipo").ToDecimal() + Dim CveMoneda As Integer = GvRowAnticipo.DataKey("CveMoneda").ToEntero() + Dim Fecha As DateTime = GvRowAnticipo.DataKey("Fecha").ToDateTime() + Dim TipoCambioPago As Decimal = GvRowAnticipo.DataKey("TipoCambioPago").ToDecimal() + Dim Folio = GvRowAnticipo.DataKey("Folio") + Dim Tipo = GvRowAnticipo.DataKey("Tipo") + + + DtAnticipos.Rows.Add(CveVenta, Importe, CveConceptoContable, CveIE, FolioFiscal, Descuentos, TotalAnticipo, SubTotalAnticipo, CveMoneda, Fecha, TipoCambioPago, Folio, Tipo) + End If + + ObjNC.EsNCAmortizacion = True + ObjNC.CveTipoAmortizacionAnticipo = 2 + ObjNC.DtAnticiposAplicados = DtAnticipos + + ObjNC.CveFormaPago = 21 'Aplicación de anticipos + ObjNC.CveMetodoPago = 1 + ObjNC.CveUsoCFDI = Venta.CveUsoCFDI + ObjNC.CveVendedor = CveVendedor + ObjNC.CveTipoRelacion = 7 + + ObjNC.PreparaTimbre() + AjustarTimbreNC(ObjNC) + + Retorno = ObjNC.EmitirFactura(False, Transac:=ObjVentas.IniciaTransacSQL(), Modulo:="Cobranza/GuardarVenta", MostrarURL:=True) + Retorno.Factura = ObjNC + + If Retorno IsNot Nothing AndAlso Retorno.CveVenta > 0 Then + For Each msg In Retorno.Mensajes + SbAlert.AppendFormat("{0}
    ", msg) + Next + + SbAlert.AppendFormat("
    ", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", Retorno.CveVenta))) + Else + SbAlert.Append("Ocurrió un error al generar la nota de crédito") + End If + Catch ex As Exception + SbAlert.Append("Ocurrió un error al generar el documento") + GuardaLog(ex.ToString()) + End Try + Return Retorno + End Function + Protected Sub BtnAceptarAnticipos_Click(sender As Object, e As System.EventArgs) Handles BtnAceptarAnticipos.Click AplicaAnticipos() End Sub @@ -17554,6 +17672,8 @@ Partial Class Ventas Dim CveIEAnticipo As Integer Dim CvePlantillaPoliza As Integer = 10 + Dim ListaNC As New List(Of Modelos.Factura.MMensajeFactura) + Try CvePrePoliza = ObjConta.AddPrePolizas("Ventas/Anticipos", CvePlantillaPoliza, TxtTotal.Text.ToDecimal, TxtTotal.Text.ToDecimal, DdlMoneda.SelectedValue.ToEntero(), TxtFechaAnticipoCliente.Text.ToDate, String.Format("{0} {1} {2}-{3}", If(EsAnticipo2017Jam, "Aplicación Anticipo 2017", ""), NombreCliente, Serie, TxtFolio.Text), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) @@ -17616,27 +17736,46 @@ Partial Class Ventas Select Case gvr.DataKey("CveConceptoContable").ToString() Case "3", "295" - importeMovimiento = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal - ((gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal / gvr.DataKey("TotalAnticipo").ToDecimal) * gvr.DataKey("IVAAnticipo").ToDecimal) - importeMN = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal + If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso DdlMoneda.SelectedValue.ToEntero() = 1 Then + Dim ImporteNC As Decimal = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal - If importeMovimiento <> 0 Then + Dim RespNC = GenerarNC(ImporteNC, DdlVendedor.SelectedValue.ToEntero(), Me.VentaActual, gvr, ObjVenta) - Dim Pago As New VentaPago - Pago.ImportePagoVenta = importeMN - Pago.ImportePago = importeMovimiento - Pago.CveIE = CveIEAnticipo - Pago.CveMonedaPago = gvr.DataKey("CveMoneda").ToEntero() - Pago.TipoPago = "A" - Pago.Fecha = TxtFechaAnticipoCliente.Text.ToDate 'TCPago = gvr.DataKey("TipoCambio").todecimal - Pago.CveVentaAmortizacion = gvr.DataKey("CveVenta").ToEntero() - Pago.TCPago = gvr.DataKey("TipoCambio").ToDecimal - Pago.AplicaTraslado = gvr.DataKey("RegresarImpuesto") = "1" - Pago.Referencia = gvr.DataKey("Folio") - Pago.AplicaConceptoImpuestoPendiente = (Not gvr.DataKey("RegresarImpuesto") = "1") AndAlso (VentaActual.IVA > 0 OrElse VentaActual.IEPS > 0) + If RespNC IsNot Nothing Then + If RespNC.TieneError Then + ErrorConta = True + Exit For + Else + ListaNC.Add(RespNC) + End If + Else + ErrorConta = True + End If - ErrorConta = AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjConta) + Else + importeMovimiento = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal - ((gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal / gvr.DataKey("TotalAnticipo").ToDecimal) * gvr.DataKey("IVAAnticipo").ToDecimal) + importeMN = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal + + If importeMovimiento <> 0 Then + + Dim Pago As New VentaPago + Pago.ImportePagoVenta = importeMN + Pago.ImportePago = importeMovimiento + Pago.CveIE = CveIEAnticipo + Pago.CveMonedaPago = gvr.DataKey("CveMoneda").ToEntero() + Pago.TipoPago = "A" + Pago.Fecha = TxtFechaAnticipoCliente.Text.ToDate 'TCPago = gvr.DataKey("TipoCambio").todecimal + Pago.CveVentaAmortizacion = gvr.DataKey("CveVenta").ToEntero() + Pago.TCPago = gvr.DataKey("TipoCambio").ToDecimal + Pago.AplicaTraslado = gvr.DataKey("RegresarImpuesto") = "1" + Pago.Referencia = gvr.DataKey("Folio") + Pago.AplicaConceptoImpuestoPendiente = (Not gvr.DataKey("RegresarImpuesto") = "1") AndAlso (VentaActual.IVA > 0 OrElse VentaActual.IEPS > 0) + + ErrorConta = AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjConta) + + End If End If Case "12" @@ -17743,26 +17882,64 @@ Partial Class Ventas If ErrorConta Then Alert("Ocurrió un error al amortizar el documento. Por favor verifique y vuelva a intentar.", TipoMensaje.MsgError) ObjConta.RollBack() + + ObjConta.Dispose() + ObjVenta.Dispose() + ObjIE.Dispose() + ObjCliente.Dispose() + Else Dim Msg As New StringBuilder - Msg.Append("Se ha amortizado correctamente") + Msg.Append("Se ha amortizado correctamente.
    ") 'AJUSTA POLIZA If ObjConta.ContaFolio > 0 Then Msg.AppendFormat("

    Ver Póliza", CvePrePoliza) End If - ObjConta.Commit() + + ObjConta.Dispose() + ObjVenta.Dispose() + ObjIE.Dispose() + ObjCliente.Dispose() + + Dim MsgTimbrado As String = "" + + Try + If ListaNC.Count > 0 Then + For Each respNC In ListaNC + Msg.AppendFormat(" La nota de crédito {1} se genero correctamente.
    ", respNC.CveVenta, respNC.SerieFolio) + + Dim SeTimbroNC As Boolean = False + MsgTimbrado = TimbrarNC(respNC.Factura, SeTimbroNC) + + If Not String.IsNullOrEmpty(MsgTimbrado) Then + Dim StrEr As String = $"
    Comprobante no emitido :
    {MsgTimbrado}
    Por favor inténtelo de nuevo a través del botón 'Emitir' en ventas.
    " + MsgTimbrado = StrEr + End If + + If SeTimbroNC Then + Dim xml = String.Format("", Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", respNC.CveVenta, "XML", respNC.SerieFolio, respNC.Factura.TipoDocto))) + Msg.AppendFormat("{0}", xml) + End If + + Dim pdfNC = String.Format("", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1", respNC.CveVenta))) + Msg.AppendFormat("{0}", pdfNC) + + If Not String.IsNullOrEmpty(MsgTimbrado) Then + Msg.AppendFormat("{0}", MsgTimbrado) + End If + Next + End If + Catch ex As Exception + GuardaLogAD(ex.ToString()) + Msg.AppendFormat("
    {0}
    ", MsgTimbrado) + End Try BtnAceptarAnticipos.Enabled = False Alert(Msg.ToString(), TipoMensaje.MsgInformacion, JSBtnAceptar:="BtnRefrescarPagina();", ShowCloseButton:=False) End If - ObjConta.Dispose() - ObjVenta.Dispose() - ObjIE.Dispose() - ObjCliente.Dispose() - Else 'cuando no se ha registrado la venta @@ -17970,6 +18147,47 @@ Partial Class Ventas End Sub + + Private Sub AjustarTimbreNC(ByRef ObjNC As Modelos.Factura) + If LblSeTimbro.Text = "Si" Then + ObjNC.Timbre.CFDIRelacionados.UUID.Clear() + ObjNC.Timbre.CFDIRelacionados.UUID.Add(LblFolioFiscal.Text.Trim()) + ObjNC.Timbre.CFDIRelacionados.TipoRelacion = "07" + ObjNC.Timbre.CFDIRelacionados.TipoRelacionTexto = "07-CFDI por aplicación de anticipo" + End If + + ObjNC.Timbre.Comprobante.MetodoPago = GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", $"CveMetodoPago = {ObjNC.CveMetodoPago}") ' Obj.ClaveMetodoPagoSAT + ObjNC.Timbre.Comprobante.FormadePago = GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", $"CveFormaPago = {ObjNC.CveFormaPago}") 'Obj.ClaveFormaPagoSAT + ObjNC.Timbre.Receptor.UsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("UsoCFDI", $"CveUsoCFDI = {ObjNC.CveUsoCFDI}") + End Sub + + Private Function TimbrarNC(ByRef ObjNC As Modelos.Factura, ByRef SeTimbroNC As Boolean) As String + Dim MsgErrorTimbrado As String = "" + 'Dim SeTimbro As Boolean = False + 'Dim TimbroNC As Boolean = False + + Dim ObjTimbrado As New Timbrado + Try + If ObjNC.Timbre IsNot Nothing Then + Dim ObjTimbradoNC As New Timbrado + SeTimbroNC = ObjTimbradoNC.TimbrarFactura(UsuarioActual, ObjNC) + + If Not SeTimbroNC Then + MsgErrorTimbrado = $"{MsgErrorTimbrado} {ObjTimbradoNC.MensajeErrorCFDI}" + End If + ObjTimbradoNC = Nothing + End If + + Catch ex As Exception + OnError("Ocurrió un error al generar el timbrado", ex) + End Try + + If Not String.IsNullOrEmpty(MsgErrorTimbrado) Then + GuardaLogAD(MsgErrorTimbrado, Archivo:="LogTimbrado") + End If + + Return MsgErrorTimbrado + End Function Private Function AgregarPrePolizasXTrasladar(ObjConta As ClsContabilidad, CvePrePoliza As Integer, PorcentajeAmortizacion As Decimal, TipoCambio As Decimal, ByRef CuentasContablesInvalidas As StringBuilder, ByRef CveCuentaContabilizacion As Integer, Importe13 As Decimal, Importe8 As Decimal, Importe9 As Decimal) As Boolean Dim ImporteMovimiento As Decimal Dim ImporteMX As Decimal @@ -18793,7 +19011,7 @@ Partial Class Ventas Dim ActualizarPrecios As Boolean = False If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then - ActualizarPrecios = true + ActualizarPrecios = True End If If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then From 7512b09dc5aa6a7e82b68fc9278cb60210ed1350 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Fri, 31 Jan 2025 16:58:02 -0700 Subject: [PATCH 09/10] --FIX --- Ventas/Ventas.aspx.vb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index fe6236592..ff9740c04 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -17911,7 +17911,12 @@ Partial Class Ventas Msg.AppendFormat(" La nota de crédito {1} se genero correctamente.
    ", respNC.CveVenta, respNC.SerieFolio) Dim SeTimbroNC As Boolean = False - MsgTimbrado = TimbrarNC(respNC.Factura, SeTimbroNC) + + If LblSeTimbro.Text = "Si" Then + MsgTimbrado = TimbrarNC(respNC.Factura, SeTimbroNC) + Else + MsgTimbrado = "No se pudo timbrar porque la factura de ingreso no ha sido timbrada previamente" + End If If Not String.IsNullOrEmpty(MsgTimbrado) Then Dim StrEr As String = $"
    Comprobante no emitido :
    {MsgTimbrado}
    Por favor inténtelo de nuevo a través del botón 'Emitir' en ventas.
    " From f2e01602ad427b8bcc983bc8ce80b2aaa397971e Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Fri, 31 Jan 2025 18:21:05 -0700 Subject: [PATCH 10/10] --fix bdh solicitud de anticipo --- Ventas/Ventas.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index ff9740c04..6412f6354 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -8329,7 +8329,7 @@ Partial Class Ventas End If 'SOLO HABILITAR PARA GENERAR NOTAS DE CREDITO - If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso Not PermiteCredito AndAlso Not LnkSolicitarCredito.Visible Then + If UsuarioActual.Empresa.Funcionalidad(595) = "2" AndAlso Not LnkSolicitarCredito.Visible Then LnkSolicitarCredito.Visible = True If DdlSolCreditoTipoDocto.Items.FindByValue("Ing") IsNot Nothing Then