From edb8c16ab6c2d32b2a5884169278f55a8f8b29aa Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Mon, 23 Nov 2020 16:16:18 -0700 Subject: [PATCH] =?UTF-8?q?Contratos=20pesta=C3=B1a=20gastos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/ClsContratos.vb | 80 +++- Contratos/ContratoObra.aspx | 225 +++++++++- Contratos/ContratoObra.aspx.vb | 765 ++++++++++++++++++++------------- 3 files changed, 760 insertions(+), 310 deletions(-) diff --git a/App_Code/ClsContratos.vb b/App_Code/ClsContratos.vb index fb7ca7697..74b4d1432 100644 --- a/App_Code/ClsContratos.vb +++ b/App_Code/ClsContratos.vb @@ -146,6 +146,7 @@ Public Class ClsContratos Public Property Ubicacion As String Public Property Responsable As String Public Property Lugar As String + Public Property LimiteDeGasto As Double Public Property CveSubProyecto As Integer Public Property SubProyectoContrato As String Public Property CveProyecto As Integer @@ -291,7 +292,8 @@ Public Class ClsContratos Me.FechaVenc = Data.Rows(0)("FechaVenc").ToString.ToDate Me.CveVendedor = Data.Rows(0)("CveVendedor").ToString.ToEntero Me.ImporteTotal = Data.Rows(0)("ImporteTotal").ToString.ToDecimal - Me.Lugar = Data.Rows(0)("Lugar").ToString + Me.Lugar = Data.Rows(0)("Lugar").ToString + Me.LimiteDeGasto = Data.Rows(0)("LimiteDeGasto").ToString.ToDouble Observaciones = Data.Rows(0)("Observaciones").ToString CveDireccionEnvio = Data.Rows(0)("CveDireccionEnvio").ToString.ToEntero @@ -543,7 +545,7 @@ Public Class ClsContratos Geom As String, CveContratoPadre As Integer, CveUsuario As Integer, CveEmpresa As Integer, EsPresupuestal As Boolean, Minimo As Double, Maximo As Double, Importe As Double, CveMoneda As Integer, ModalidadDetalle As Integer, Optional CveContratosEstatus As Integer = -1, Optional CveContratoTipo As Integer = -1, Optional TipoCambio As Double = 1, Optional CveSucursalCliente As Integer = -1, Optional CveAlmacenOrigen As Integer = -1, Optional CveAlmacenDestino As Integer = -1, Optional PorcentajeComision As Integer = -1, Optional TipoGarantia As Integer = -1, Optional Folio As Integer = -1, Optional FechaVenc As Date = Nothing, Optional EstatusFianza As Integer = -1, Optional CvePeriodo As Integer = -1, Optional CveContratoPlantilla As Integer = -1, Optional CveCuentaEquipo As Integer = -1, - Optional CveVendedor As Integer = -1, Optional Observaciones As String = "", Optional CveDireccionEnvio As Integer = -1, Optional AplicaImpuestosLocales As Boolean = False, Optional CorreoNotificacionPedDev As String = "", Optional Lugar As String = "") As Integer + Optional CveVendedor As Integer = -1, Optional Observaciones As String = "", Optional CveDireccionEnvio As Integer = -1, Optional AplicaImpuestosLocales As Boolean = False, Optional CorreoNotificacionPedDev As String = "", Optional Lugar As String = "", Optional LimiteDeGasto As Double = 0) As Integer Dim Retorno As Integer = -1 DataAdapter("PA_Con_ContratosObraAdd") @@ -595,6 +597,7 @@ Public Class ClsContratos .Add("@AplicaImpuestosLocales", SqlDbType.Bit).Value = If(AplicaImpuestosLocales, 1, 0) .Add("@CorreoNotificacionPedDev", SqlDbType.VarChar).Value = CorreoNotificacionPedDev .Add("@Lugar", SqlDbType.VarChar).Value = Lugar + .Add("@LimiteDeGasto", SqlDbType.Money).Value = LimiteDeGasto .Add("@CveContrato", SqlDbType.Int).Direction = ParameterDirection.Output @@ -621,7 +624,7 @@ Public Class ClsContratos CveContratoPadre As Integer, CveUsuario As Integer, CveEmpresa As Integer, EsPresupuestal As Boolean, Minimo As Double, Maximo As Double, Importe As Double, CveMoneda As Integer, ModalidadDetalle As Integer, Optional CveContratosEstatus As Integer = -1, Optional CveContratoTipo As Integer = -1, Optional TipoCambio As Double = 1.0, Optional CveSucursalCliente As Integer = -1, Optional CveAlmacenOrigen As Integer = -1, Optional CveAlmacenDestino As Integer = -1, Optional PorcentajeComision As Integer = -1, Optional TipoGarantia As Integer = -1, Optional Folio As Integer = -1, Optional FechaVenc As Date = Nothing, Optional EstatusFianza As Integer = -1, Optional CveContratoPlantilla As Integer = -1, Optional CveCuentaEquipo As Integer = -1, - Optional CveVendedor As Integer = -1, Optional Observaciones As String = "", Optional CveDireccionEnvio As Integer = -1, Optional AplicaImpuestosLocales As Boolean = False, Optional CorreoNotificacionPedDev As String = "", Optional Lugar As String = "") As Boolean + Optional CveVendedor As Integer = -1, Optional Observaciones As String = "", Optional CveDireccionEnvio As Integer = -1, Optional AplicaImpuestosLocales As Boolean = False, Optional CorreoNotificacionPedDev As String = "", Optional Lugar As String = "", Optional LimiteDeGasto As Double = 0) As Boolean Dim Retorno = False DataAdapter("PA_Con_ContratosObraUpdate") @@ -671,7 +674,8 @@ Public Class ClsContratos .Add("@CveDireccionEnvio", SqlDbType.Int).Value = CveDireccionEnvio .Add("@AplicaImpuestosLocales", SqlDbType.Bit).Value = If(AplicaImpuestosLocales, 1, 0) .Add("@CorreoNotificacionPedDev", SqlDbType.VarChar).Value = CorreoNotificacionPedDev - .Add("@Lugar", SqlDbType.VarChar).Value = Lugar + .Add("@Lugar", SqlDbType.VarChar).Value = Lugar + .Add("@LimiteDeGasto", SqlDbType.Money).Value = LimiteDeGasto End With @@ -824,6 +828,74 @@ Public Class ClsContratos #End Region +#Region "GASTOS OBRA" + + + + + Public Function GetContratosObragGastosVeiculos(CveContrato As Integer, CveEmpresa As Integer) As Boolean + Dim Retorno = False + + DataAdapter("PA_Con_ContratosObraGastosVeiculosGet") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveContrato", SqlDbType.Int).Value = CveContrato + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al consultar los gastos de veiculos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function + + + + Public Function GetContratosObragGastosCompras(CveContrato As Integer, CveEmpresa As Integer) As Boolean + Dim Retorno = False + + DataAdapter("PA_Con_ContratosObraGastosComprasGet") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveContrato", SqlDbType.Int).Value = CveContrato + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al consultar los gastos de compra.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function + + + Public Function GetContratosObragGastosNomina(CveContrato As Integer, CveEmpresa As Integer) As Boolean + Dim Retorno = False + + DataAdapter("PA_Con_ContratosObraGastosNominaGet") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveContrato", SqlDbType.Int).Value = CveContrato + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al consultar los gastos de nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function + +#End Region + + #Region "C I C L O C O M E R C I A L" Public Function CicloComercialAdd(CveContrato As Integer, CveCotizacion As Integer, CveCliente As Integer, FueFacturado As Boolean, CveFactura As Integer, Estatus As Integer, CveEmpresa As Integer, FechaVenc As Date) As Boolean Dim Retorno As Boolean = False diff --git a/Contratos/ContratoObra.aspx b/Contratos/ContratoObra.aspx index b710ac331..e3ccfab73 100644 --- a/Contratos/ContratoObra.aspx +++ b/Contratos/ContratoObra.aspx @@ -97,6 +97,11 @@ Agregar Presupuesto Interno + +
  • + Agregar Gasto +
  • + @@ -570,10 +575,20 @@ --%> + +
    + +
    + + +
    +
    +
    - + +
    @@ -1647,6 +1662,156 @@ + + + + + + + + +
    +
    + + + + + + + + + +
    Contrato:Gastos:Nomina:Indirectos:%Gasto:
    + +
    +
    + +
    +
    + +
    +
    +
    + +
    +
    vehículos
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + +
    + +
    +
    +
    + +
    +
    Compras
    +
    +
    + + + + + + + + + + + + + + + + +
    +
    +
    + +
    + + +
    +
    + +
    +
    +
    + +
    +
    Nomina
    +
    +
    + + + + + + + + + + + + + + + +
    +
    +
    + +
    + + + + + +
    +
    + + +
    +
    + @@ -2039,7 +2204,11 @@ - + + + + + <%-- @@ -2050,7 +2219,7 @@ - + --%> @@ -2761,14 +2930,11 @@ <%--Modal Carga Presupuesto--%> - - - - +