From 3fe6e4a0edc2b6d919d8606f9ae80b89efa7dfae Mon Sep 17 00:00:00 2001 From: rakcsle Date: Fri, 31 May 2024 12:54:29 -0700 Subject: [PATCH 1/7] RegPrePolizas se vacio Grid al editar pre poliza ya creada --- Compras/Compras.aspx.vb | 6 +++--- Contabilidad/RegPrePolizaS.aspx.vb | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index ef294b50b..c0c464012 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -9780,7 +9780,7 @@ Partial Class Compras_Compras - + Dim TCAnt As Decimal = If(DdlMoneda.SelectedValue = "1", 1, If(CveCompra > 0, LblTC.Text.ToDecimal, TxtTC.Text.ToDecimal)) If UsuarioActual.Empresa.CveEmpresa.Contiene(13, 83) Then @@ -9792,7 +9792,7 @@ Partial Class Compras_Compras e.Row.DBCampo("CveMoneda"), e.Row.DBCampo("TCCompra").ToDouble, DdlMoneda.SelectedValue, - IIf(DdlMoneda.SelectedValue = "1", 1, TxtTC.Text), + TCAnt, e.Row.FCTextBox("TxtComision").ClientID )) 'SI ES UNA COMPRA NUEVA SE PONE EL TOTAL, SI NO EL SALDO @@ -9824,7 +9824,7 @@ Partial Class Compras_Compras e.Row.DBCampo("CveMoneda"), e.Row.DBCampo("TCCompra").ToDouble, DdlMoneda.SelectedValue, - IIf(DdlMoneda.SelectedValue = "1", 1, TxtTC.Text) + TCAnt )) 'SI ES UNA COMPRA NUEVA SE PONE EL TOTAL, SI NO EL SALDO e.Row.FCTextBox("TxtAnticipo").Attributes.Add("onKeyUp", String.Format("FnCambiaAnt({0},this,{1},{2},{3},{4},{5});", diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb index ab4a57400..07148d380 100644 --- a/Contabilidad/RegPrePolizaS.aspx.vb +++ b/Contabilidad/RegPrePolizaS.aspx.vb @@ -1690,7 +1690,7 @@ Partial Class ContabilidadC_RegPrePolizaS End If - If DdlPlantilla.SelectedValue.ToEntero <> 53 Then + If DdlPlantilla.SelectedValue.ToEntero <> 53 And Not CvePrePoliza > 0 Then Dim x As Integer = 0 For Each gvRow As GridViewRow In GvMov.Rows @@ -1769,7 +1769,7 @@ Partial Class ContabilidadC_RegPrePolizaS DtMovimientos.AcceptChanges() - If DdlPlantilla.SelectedValue.ToEntero <> 53 Then + If DdlPlantilla.SelectedValue.ToEntero <> 53 And Not CvePrePoliza > 0 Then GvMov.DataSource = DtMovimientos GvMov.DataBind() GvPrePoliza.DataBind() From 1a675098036e178de008b133b8ce6ac4134ee850 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Fri, 31 May 2024 16:01:44 -0700 Subject: [PATCH 2/7] Candado de depositos de caja. no permitir si hay pendientes de pagar. --- Bancos/DepositosCaja.aspx.vb | 59 ++++++++++++++++++++++++++++++++++-- 1 file changed, 57 insertions(+), 2 deletions(-) diff --git a/Bancos/DepositosCaja.aspx.vb b/Bancos/DepositosCaja.aspx.vb index c3e8473b4..e99be126b 100644 --- a/Bancos/DepositosCaja.aspx.vb +++ b/Bancos/DepositosCaja.aspx.vb @@ -157,6 +157,11 @@ Partial Class Bancos_DepositosCaja Private Sub BtnDepositar_Click(sender As Object, e As EventArgs) Handles BtnDepositar.Click + + If Not Validaciones() Then + Exit Sub + End If + Dim TotalImporte As Decimal = 0 Dim TotalImportePrePoliza As Decimal Dim Comision As Decimal = TxtComision.Text.ToDecimal @@ -465,8 +470,58 @@ Partial Class Bancos_DepositosCaja lblValorTotalSeleccionado.Text = "0.0" CargaDatos() ObjConta.Dispose() - End Sub - + End Sub + + Private Function Validaciones() As Boolean + + Dim Respuesta As Boolean = True + + If Not ValidaCobranza() Then + Respuesta = False + End If + + Return Respuesta + + End Function + + + Private Function ValidaCobranza() As Boolean + Dim Respuesta As Boolean = False + + If UsuarioActual.CveEmpresa.Contiene(195) Then + + Dim ObjMovtos As New ClsMovimientos() + Dim FechaI, FechaF As Date + FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim().ToDate, MinFecha) + FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim().ToDate, MaxFecha).AddDays(1) + + If ObjMovtos.GetRemisionesCobranza(UsuarioActual.CveEmpresa, DdlSubProyectos.SelectedValue.ToEntero, FechaI, FechaF) Then + Dim dtt As DataTable = ObjMovtos.DtResultados.FiltraParametros($"CveVenta > 0 AND (CveUsuarioCobranza IS NULL OR CveUsuarioCobranza = {UsuarioActual.CveUsuario}) AND TipoDocto IN ('Ing','Rem')") + 'Dim Dtta As DataTable = dtt.FiltraParametros($"CveUsuarioCobranza = {UsuarioActual.CveUsuario} ") + 'If Dtta IsNot Nothing AndAlso Dtta.Rows.Count > 0 Then dtt = Dtta + + If dtt.Rows.Count = 0 Then + Respuesta = True + Else + Respuesta = False + Alert("Se detectaron cobros pendientes.", TipoMensaje.MsgAdvertencia) + End If + + Else + Alert("Error al consultarcobros pendientes.", TipoMensaje.MsgAdvertencia) + Respuesta = False + End If + + ObjMovtos.Dispose() + + Else + Respuesta = True + End If + + Return Respuesta + End Function + + Private Sub ObtenerTotalImporta() Dim Total As Double = 0 From 27c325e5ada7d64c3bb1b535efa43cfb65475779 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Fri, 31 May 2024 19:33:23 -0700 Subject: [PATCH 3/7] --Unificacion de reporte de cortes --- App_Code/ClsPuntoVenta.vb | 46 +++++++++++++++++++++++++++++++++++---- 1 file changed, 42 insertions(+), 4 deletions(-) diff --git a/App_Code/ClsPuntoVenta.vb b/App_Code/ClsPuntoVenta.vb index cc16fe654..a376c0d50 100644 --- a/App_Code/ClsPuntoVenta.vb +++ b/App_Code/ClsPuntoVenta.vb @@ -17,19 +17,25 @@ Public Class ClsPuntoVenta Private SqlCommand As SqlCommand Private SqlTransacc As SqlTransaction Private Data As DataTable + Private Dataset As DataSet 'Atributos de la clase Private disposedValue As Boolean = False ' Para detectar llamadas redundantes 'PARA REGISTRAR CONEXION - Private CveConexion As Integer = 0 - + Private CveConexion As Integer = 0 + #End Region - + #Region "Propiedades" Public ReadOnly Property DtResultados() As DataTable Get DtResultados = Data End Get + End Property + Public ReadOnly Property DataSetResultados() As DataSet + Get + DataSetResultados = Dataset + End Get End Property Public Property CveCorte As Integer @@ -245,6 +251,37 @@ Public Class ClsPuntoVenta Return Retorno End Function + ''' + ''' Desglose del reporte de cortes, resumen e IVA + ''' + ''' + ''' + ''' + ''' + ''' + Public Function GetVta_ReporteCortesDetalle(CveCorte As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Opcion As Integer) As Boolean + Dim Retorno As Boolean = False + + DataAdapter("PA_Vta_ReporteCortesDetalleGet") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveCorte", SqlDbType.Int).Value = CveCorte + .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@Opcion", SqlDbType.Int).Value = Opcion + End With + + Try + Dataset = New DataSet() + SqlAdapter.Fill(Dataset) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener los detalle de cortes", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function + 'Public Function GetCortesPorCuenta(CveCuenta As Integer, CveEmpresa As Integer) As Boolean ' Dim Retorno As Boolean = False @@ -450,7 +487,8 @@ Public Class ClsPuntoVenta If Not Me.disposedValue Then If disposing Then ' TODO: dispose managed state (managed objects). - If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not Dataset Is Nothing Then Dataset.Dispose() : Dataset = Nothing If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing From 1877e57ebaade64abff87611178e75a0dc72f908 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Fri, 31 May 2024 19:33:56 -0700 Subject: [PATCH 4/7] --Tipo de producto servicio adicional --- App_Code/ClsProductosServicios.vb | 8 +- Ventas/ProductosServicios.aspx | 136 ++++++++++++++++-------------- Ventas/ProductosServicios.aspx.vb | 16 +++- 3 files changed, 89 insertions(+), 71 deletions(-) diff --git a/App_Code/ClsProductosServicios.vb b/App_Code/ClsProductosServicios.vb index 17d7860aa..65d76357c 100644 --- a/App_Code/ClsProductosServicios.vb +++ b/App_Code/ClsProductosServicios.vb @@ -1052,7 +1052,7 @@ Public Class ClsProductosServicios Return Retorno End Function - Public Function AddPSAdicionales(CvePS As Integer, CvePSAdicional As Integer, Cantidad As Decimal) As Boolean + Public Function AddPSAdicionales(CvePS As Integer, CvePSAdicional As Integer, Cantidad As Decimal, Tipo As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Gral_ProductosServiciosAdicionalesAdd") @@ -1061,7 +1061,7 @@ Public Class ClsProductosServicios .Add("@CvePS", SqlDbType.Int).Value = CvePS .Add("@CvePSAdicional", SqlDbType.Int).Value = CvePSAdicional .Add("@Cantidad", SqlDbType.Money).Value = Cantidad - + .Add("@Tipo", SqlDbType.TinyInt).Value = Tipo End With Try @@ -1081,7 +1081,7 @@ Public Class ClsProductosServicios Return Retorno End Function - Public Function UpdatePSAdicionales(CvePS As Integer, CvePSAdicional As Integer, CvePSAdicionalAnterior As Integer, Cantidad As Decimal) As Boolean + Public Function UpdatePSAdicionales(CvePS As Integer, CvePSAdicional As Integer, CvePSAdicionalAnterior As Integer, Cantidad As Decimal, Tipo As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Gral_ProductosServiciosAdicionalesUpdate") @@ -1091,7 +1091,7 @@ Public Class ClsProductosServicios .Add("@CvePSAdicional", SqlDbType.Int).Value = CvePSAdicional .Add("@CvePSAdicionalAnterior", SqlDbType.Int).Value = CvePSAdicionalAnterior .Add("@Cantidad", SqlDbType.Money).Value = Cantidad - + .Add("@Tipo", SqlDbType.TinyInt).Value = Tipo End With Try diff --git a/Ventas/ProductosServicios.aspx b/Ventas/ProductosServicios.aspx index d551e714c..ce4071fea 100644 --- a/Ventas/ProductosServicios.aspx +++ b/Ventas/ProductosServicios.aspx @@ -80,9 +80,9 @@
  • -
  • - -
  • +
  • + +
  • @@ -358,7 +358,6 @@
    - a
    @@ -482,7 +481,7 @@
    - + @@ -642,7 +641,7 @@
    - Cargar Archivo + Cargar Archivo
    @@ -823,7 +822,7 @@ -
    - -
    - - -
    -
    + +
    + + +
    +

    @@ -1421,7 +1420,7 @@
    - +
    @@ -1449,7 +1448,7 @@ ValidationGroup="GrpGuardar">
    - + @@ -2091,44 +2090,44 @@