From e41e182ef8b8edcac4e840bd0f366ad1f306c190 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 28 Feb 2025 09:47:44 -0700 Subject: [PATCH] =?UTF-8?q?--=20E189,=20que=20genere=20folio=20al=20inicia?= =?UTF-8?q?l=20la=20p=C3=A1gina?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/Promociones.aspx.vb | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/Ventas/Promociones.aspx.vb b/Ventas/Promociones.aspx.vb index 92791155f..16c5f2b0a 100644 --- a/Ventas/Promociones.aspx.vb +++ b/Ventas/Promociones.aspx.vb @@ -329,6 +329,7 @@ Partial Class Ventas_Promociones TxtPromocion.Enabled = False TxtPromocion.ReadOnly = True + CargaFolio() End If @@ -1577,20 +1578,27 @@ Partial Class Ventas_Promociones Protected Sub DdlSubProyecto_SelectedIndexChanged(sender As Object, e As EventArgs) - If Me.CvePromocion <= 0 Then - Dim ObjFolios As New ClsGralFolios() - If ObjFolios.GetFolios("PRM", UsuarioActual.CveEmpresa, DdlSubProyecto.SelectedValue.ToEntero()) Then - Dim DT As DataTable = ObjFolios.DtResultados - If DT.Rows.Count > 0 Then - TxtPromocion.Text = String.Format("{0}-{1}", DT.Rows(0)("Serie"), DT.Rows(0)("FActual")) - Else - TxtPromocion.Text = "" - End If - DT.Dispose() - End If - ObjFolios.Dispose() + CargaFolio() + End Sub - UpGenerales.Update() + Private Sub CargaFolio() + If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then + If Me.CvePromocion <= 0 Then + Dim ObjFolios As New ClsGralFolios() + If ObjFolios.GetFolios("PRM", UsuarioActual.CveEmpresa, DdlSubProyecto.SelectedValue.ToEntero()) Then + Dim DT As DataTable = ObjFolios.DtResultados + If DT.Rows.Count > 0 Then + TxtPromocion.Text = String.Format("{0}-{1}", DT.Rows(0)("Serie"), DT.Rows(0)("FActual")) + Else + TxtPromocion.Text = "" + End If + DT.Dispose() + End If + ObjFolios.Dispose() + + UpGenerales.Update() + End If End If + End Sub End Class \ No newline at end of file