From a1b2c1271a1f2a22c4ee3fe6fd137df51894500e Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Thu, 13 Feb 2020 13:37:41 -0700 Subject: [PATCH] =?UTF-8?q?agregando=202=20nuevos=20campos=20a=20los=20fol?= =?UTF-8?q?ios=20garantias=20y=20nueva=20validaci=C3=B3n=20en=20punto=20de?= =?UTF-8?q?=20venta?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Acumuladores/CatFoliosGarantia.aspx | 72 ++++++++++++++++++++++++-- Acumuladores/CatFoliosGarantia.aspx.vb | 25 +++++---- App_Code/ClsAcumuladores.vb | 11 ++-- Empresas/141/Formatos/Factura.rdlc | 4 +- Ventas/PV.aspx.vb | 9 +++- 5 files changed, 100 insertions(+), 21 deletions(-) diff --git a/Acumuladores/CatFoliosGarantia.aspx b/Acumuladores/CatFoliosGarantia.aspx index a6b8a70b9..3d1962323 100644 --- a/Acumuladores/CatFoliosGarantia.aspx +++ b/Acumuladores/CatFoliosGarantia.aspx @@ -67,6 +67,42 @@ + + + +
+
+
+ +
+
+
+ +
+ <%-- --%> + + + general + optima + motobateria + +
+ +
+ + + + + +
+
+
+
+
+
+
+
+
@@ -77,12 +113,12 @@ -
+
- + + +   + + + + +   + +   @@ -201,9 +246,9 @@
- +
- +
@@ -216,10 +261,27 @@
  +
+
+   + + general + optima + motobateria + + +
+
+
+ + + + +
<%--
diff --git a/Acumuladores/CatFoliosGarantia.aspx.vb b/Acumuladores/CatFoliosGarantia.aspx.vb index ef5209ca0..795b00dfc 100644 --- a/Acumuladores/CatFoliosGarantia.aspx.vb +++ b/Acumuladores/CatFoliosGarantia.aspx.vb @@ -38,7 +38,7 @@ Partial Class Acumuladores_CatFoliosGarantia If Not Page.IsPostBack Then CargaSubProyectos() - CargadatosGvFolioGarantia() + CargadatosGvFolioGarantia(-1, "-1") End If End Sub @@ -53,11 +53,11 @@ Partial Class Acumuladores_CatFoliosGarantia DdlSubProyectos.Items.Insert(0, New ListItem("Todos", "-1")) End Sub - Private Sub CargadatosGvFolioGarantia() + Private Sub CargadatosGvFolioGarantia(EstatusValor As Integer, tipoFolioValor As String) Dim objAcum As New ClsAcumuladores - If objAcum.FoliosGarantiaGet(-1, UsuarioActual.Empresa.CveEmpresa) Then + If objAcum.FoliosGarantiaGet(-1, UsuarioActual.Empresa.CveEmpresa, Estatus:=EstatusValor, TipoFolio:=tipoFolioValor) Then GvFolioGarantia.DataSource = objAcum.DtResultados Else GvFolioGarantia.DataSource = Nothing @@ -116,7 +116,7 @@ Partial Class Acumuladores_CatFoliosGarantia If Not Actualizar Then - If ObjAcum.FoliosGarantiaAdd(TxtFolioGarantia.Text, If(ChkEstatus.Checked = True, 1, 0), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlSubProyectos.SelectedValue.ToEntero) Then + If ObjAcum.FoliosGarantiaAdd(TxtFolioGarantia.Text, If(ChkEstatus.Checked = True, 1, 0), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlSubProyectos.SelectedValue.ToEntero, DdlTipoFolioModal.SelectedValue, TxtLimite.Text.ToEntero) Then TxtFolioGarantia.Text = "" ChkEstatus.Checked = True @@ -125,7 +125,7 @@ Partial Class Acumuladores_CatFoliosGarantia 'TxtCompra.Text = "" 'TxtPuntos.Text = "" - CargadatosGvFolioGarantia() + CargadatosGvFolioGarantia(-1, "-1") RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarFolioGarantia"), "jsHideModalFolioGarantia") UpGral.Update() @@ -135,7 +135,8 @@ Partial Class Acumuladores_CatFoliosGarantia Alert("Ocurrió un error al guardar el Folio de Garantía", TipoMensaje.MsgError) End If Else - If ObjAcum.FoliosGarantiaUpdate(CveFolioGarantia, TxtFolioGarantia.Text, If(ChkEstatus.Checked = True, 1, 0), UsuarioActual.CveUsuario, DdlSubProyectos.SelectedValue.ToEntero) Then + If ObjAcum.FoliosGarantiaUpdate(CveFolioGarantia, TxtFolioGarantia.Text, If(ChkEstatus.Checked = True, 1, 0), UsuarioActual.CveUsuario, DdlSubProyectos.SelectedValue.ToEntero, + DdlTipoFolioModal.SelectedValue, TxtLimite.Text.ToEntero) Then TxtFolioGarantia.Text = "" ChkEstatus.Checked = True @@ -144,7 +145,7 @@ Partial Class Acumuladores_CatFoliosGarantia 'TxtCompra.Text = "" 'TxtPuntos.Text = "" - CargadatosGvFolioGarantia() + CargadatosGvFolioGarantia(-1, "-1") UpModalFolioGarantia.Update() RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarFolioGarantia"), "jsHideModalFolioGarantia") @@ -171,7 +172,7 @@ Partial Class Acumuladores_CatFoliosGarantia Dim CveCapacitador As Integer = GvRow.DataKey("CveFolioGarantia") If objAcum.FoliosGarantiaRemove(CveCapacitador, UsuarioActual.CveEmpresa) Then - CargadatosGvFolioGarantia() + CargadatosGvFolioGarantia(-1, "-1") Alert("Capacitador Eliminó Correctamente ", TipoMensaje.MsgInformacion) Else @@ -180,7 +181,7 @@ Partial Class Acumuladores_CatFoliosGarantia objAcum.Dispose() - CargadatosGvFolioGarantia() + CargadatosGvFolioGarantia(-1, "-1") CveFolioGarantia = -1 @@ -198,6 +199,8 @@ Partial Class Acumuladores_CatFoliosGarantia TxtFolioGarantia.Text = GvRow.DataKey("FolioGarantia") ChkEstatus.Checked = If(GvRow.DataKey("Estatus") = "Activo", True, False) + TxtLimite.Text = GvRow.DataKey("Limite") + DdlTipoFolioModal.SelectedValue = GvRow.DataKey("tipoFolio") 'TxtCargo.Text = GvRow.DataKey("Cargo").ToDecimal.ToString("###,###,###.00") 'TxtBonificacion.Text = GvRow.DataKey("Bonificacion").ToDecimal.ToString("###,###,###.00") 'TxtCompra.Text = GvRow.DataKey("Compra").ToDecimal.ToString("###,###,###.00") @@ -221,6 +224,8 @@ Partial Class Acumuladores_CatFoliosGarantia #End Region - + Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) + CargadatosGvFolioGarantia(DdlEstatus.SelectedValue.ToEntero, DdlTipoFolio.SelectedValue) + End Sub End Class diff --git a/App_Code/ClsAcumuladores.vb b/App_Code/ClsAcumuladores.vb index 56eb8028b..0a9418855 100644 --- a/App_Code/ClsAcumuladores.vb +++ b/App_Code/ClsAcumuladores.vb @@ -483,7 +483,7 @@ Public Class ClsAcumuladores #Region " FOLIOS GARANTÍA " - Public Function FoliosGarantiaGet(CveFolioGarantia As Integer, CveEmpresa As Integer, Optional Estatus As Integer = -1) As Boolean + Public Function FoliosGarantiaGet(CveFolioGarantia As Integer, CveEmpresa As Integer, Optional Estatus As Integer = -1, Optional TipoFolio As String = "-1") As Boolean Dim Retorno As Boolean = False 'Data = New DataTable @@ -493,6 +493,7 @@ Public Class ClsAcumuladores .Add("@CveFolioGarantia", SqlDbType.Int).Value = CveFolioGarantia .Add("@Estatus", SqlDbType.Int).Value = Estatus .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@tipoFolio", SqlDbType.VarChar).Value = TipoFolio End With Try @@ -507,7 +508,7 @@ Public Class ClsAcumuladores Return Retorno End Function - Public Function FoliosGarantiaAdd(FolioGarantia As String, Estatus As Integer, CveUsuario As Integer, CveEmpresa As Integer, CveSubProyecto As Integer) As Boolean + Public Function FoliosGarantiaAdd(FolioGarantia As String, Estatus As Integer, CveUsuario As Integer, CveEmpresa As Integer, CveSubProyecto As Integer, TipoFolio As String, Limite As Integer) As Boolean Dim Retorno As Boolean = False 'Data = New DataTable @@ -520,6 +521,8 @@ Public Class ClsAcumuladores .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + .Add("@TipoFolio", SqlDbType.VarChar).Value = TipoFolio + .Add("@Limite", SqlDbType.Int).Value = Limite End With @@ -535,7 +538,7 @@ Public Class ClsAcumuladores Return Retorno End Function - Public Function FoliosGarantiaUpdate(CveFolioGarantia As Integer, FolioGarantia As String, Estatus As Integer, CveUsuario As Integer, CveSubProyecto As Integer) As Boolean + Public Function FoliosGarantiaUpdate(CveFolioGarantia As Integer, FolioGarantia As String, Estatus As Integer, CveUsuario As Integer, CveSubProyecto As Integer, TipoFolio As String, Limite As Integer) As Boolean Dim Retorno As Boolean = False 'Data = New DataTable @@ -548,6 +551,8 @@ Public Class ClsAcumuladores .Add("@Estatus", SqlDbType.Bit).Value = Estatus .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + .Add("@TipoFolio", SqlDbType.VarChar).Value = TipoFolio + .Add("@Limite", SqlDbType.Int).Value = Limite End With diff --git a/Empresas/141/Formatos/Factura.rdlc b/Empresas/141/Formatos/Factura.rdlc index 671af6634..98de34936 100644 --- a/Empresas/141/Formatos/Factura.rdlc +++ b/Empresas/141/Formatos/Factura.rdlc @@ -1099,7 +1099,7 @@ - =Fields!PS.Value & " " & Fields!Obs.Value + =Fields!PS.Value & System.Environment.NewLine & IIF(Fields!Obs.Value <> "","Observaciones: ","") & Fields!Obs.Value - 20.5093cm + 20.50931cm