eFacturas Agregar complmento, se agrega CveFactura a filtro de complementos ya vinculados, Compras Unificacion se retorna valor SeUnifico
This commit is contained in:
@@ -2410,7 +2410,7 @@ Public Class ClsCompras
|
||||
End Function
|
||||
|
||||
|
||||
Public Function GetCompararComplementoPago(CveProveedor As Integer, Monto As Decimal, XMLPagos As String, CveEmpresa As Integer, Optional CveIE As Integer = -1, Optional OP As Integer = 1) As Boolean
|
||||
Public Function GetCompararComplementoPago(CveProveedor As Integer, Monto As Decimal, XMLPagos As String, CveEmpresa As Integer, Optional CveIE As Integer = -1, Optional OP As Integer = 1, Optional CveFactura As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Comp_CompararComplementoPagoGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -2420,6 +2420,7 @@ Public Class ClsCompras
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveIE", SqlDbType.Int).Value = CveIE
|
||||
.Add("@OP", SqlDbType.Int).Value = OP
|
||||
.Add("@CveFactura", SqlDbType.Int).Value = CveFactura
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
@@ -446,6 +446,7 @@ Public Class ClsContratos
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function TerminarContrato(CveContrato As Integer, CveTipoEstatus As Integer, CveEmpresa As Integer) As Integer
|
||||
Dim Retorno = -1
|
||||
|
||||
@@ -511,10 +512,167 @@ Public Class ClsContratos
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region "CONTRATO OBRA"
|
||||
|
||||
Public Function AddContratosObra(NumeroContrato As String, DescripcionContrato As String, NumeroLicitacion As String, CveProveedor As Integer, CveCliente As Integer, CveProspecto As Integer, FechaInicial As DateTime, FechaFinal As DateTime,
|
||||
Ubicacion As String, Responsable As String, CveProyecto As Integer, PorIVA As Double, PorAnticipo As Double, PorAmortizacionAnticipo As Double, PorGarantia As Double, Archivo As String,
|
||||
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 = "") As Integer
|
||||
|
||||
Dim Retorno As Integer = -1
|
||||
DataAdapter("PA_Con_ContratosObraAdd")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@NumeroContrato", SqlDbType.VarChar).Value = NumeroContrato
|
||||
.Add("@DescripcionContrato", SqlDbType.VarChar).Value = DescripcionContrato
|
||||
.Add("@NumeroLicitacion", SqlDbType.VarChar).Value = NumeroLicitacion
|
||||
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||
.Add("@CveProspecto", SqlDbType.Int).Value = CveProspecto
|
||||
.Add("@FechaInicial", SqlDbType.DateTime).Value = FechaInicial
|
||||
.Add("@FechaFinal", SqlDbType.DateTime).Value = FechaFinal
|
||||
.Add("@Ubicacion", SqlDbType.VarChar).Value = Ubicacion
|
||||
.Add("@Responsable", SqlDbType.VarChar).Value = Responsable
|
||||
.Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto
|
||||
.Add("@CveContratosEstatus", SqlDbType.Int).Value = CveContratosEstatus
|
||||
.Add("@PorIVA", SqlDbType.Float).Value = PorIVA
|
||||
.Add("@PorAnticipo", SqlDbType.Float).Value = PorAnticipo
|
||||
.Add("@PorAmortizacionAnticipo", SqlDbType.Float).Value = PorAmortizacionAnticipo
|
||||
.Add("@PorGarantia", SqlDbType.Float).Value = PorGarantia
|
||||
'.Add("@EstatusContrato", SqlDbType.Bit).Value = EstatusContrato
|
||||
.Add("@Archivo", SqlDbType.VarChar).Value = Archivo
|
||||
.Add("@Geom", SqlDbType.VarChar).Value = Geom
|
||||
.Add("@CveContratoPadre", SqlDbType.Int).Value = CveContratoPadre
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@EsPresupuestal", SqlDbType.Int).Value = EsPresupuestal
|
||||
.Add("@CveContratoTipo", SqlDbType.SmallInt).Value = CveContratoTipo
|
||||
.Add("@ImporteMin", SqlDbType.Money).Value = Minimo
|
||||
.Add("@ImporteMax", SqlDbType.Money).Value = Maximo
|
||||
.Add("@Importe", SqlDbType.Money).Value = Importe
|
||||
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
|
||||
.Add("@TipoCambio", SqlDbType.Money).Value = TipoCambio
|
||||
.Add("@ModalidadDetalle", SqlDbType.TinyInt).Value = ModalidadDetalle
|
||||
.Add("@CveSucursalCliente", SqlDbType.Int).Value = CveSucursalCliente
|
||||
.Add("@CveAlmacenOrigen", SqlDbType.Int).Value = CveAlmacenOrigen
|
||||
.Add("@CveAlmacenDestino", SqlDbType.Int).Value = CveAlmacenDestino
|
||||
.Add("@PorcentajeComision", SqlDbType.Int).Value = PorcentajeComision
|
||||
.Add("@TipoGarantia", SqlDbType.Int).Value = TipoGarantia
|
||||
.Add("@Folio", SqlDbType.Int).Value = Folio
|
||||
.Add("@FechaVenc", SqlDbType.Date).Value = FechaVenc
|
||||
.Add("@EstatusFianza", SqlDbType.Int).Value = EstatusFianza
|
||||
.Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo
|
||||
.Add("@CveCuentaEquipo", SqlDbType.Int).Value = CveCuentaEquipo
|
||||
.Add("@CveContratoPlantilla", SqlDbType.Int).Value = CveContratoPlantilla
|
||||
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
|
||||
.Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones
|
||||
.Add("@CveDireccionEnvio", SqlDbType.Int).Value = CveDireccionEnvio
|
||||
.Add("@AplicaImpuestosLocales", SqlDbType.Bit).Value = If(AplicaImpuestosLocales, 1, 0)
|
||||
.Add("@CorreoNotificacionPedDev", SqlDbType.VarChar).Value = CorreoNotificacionPedDev
|
||||
|
||||
.Add("@CveContrato", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = CInt(SqlAdapter.SelectCommand.Parameters("@CveContrato").Value)
|
||||
Catch ex As Exception
|
||||
If ex.Message.Contains("Número: 2601;") Then
|
||||
Alert("Ya existe un contrato con el mismo número de contrato registrado: " & NumeroContrato & ".", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
OnError("Ocurrió un error al agregar el Contrato.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End If
|
||||
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
Public Function UpdateContratosObra(CveContrato As Integer, NumeroContrato As String, DescripcionContrato As String, NumeroLicitacion As String, CveProveedor As Integer, CveCliente As Integer, CveProspecto As Integer, FechaInicial As DateTime, FechaFinal As DateTime,
|
||||
Ubicacion As String, Responsable As String, PorIVA As Double, PorAnticipo As Double, PorAmortizacionAnticipo As Double, PorGarantia As Double, Archivo As String, 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.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 = "") As Boolean
|
||||
Dim Retorno = False
|
||||
|
||||
DataAdapter("PA_Con_ContratosObraUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveContrato", SqlDbType.Int).Value = CveContrato
|
||||
.Add("@NumeroContrato", SqlDbType.VarChar).Value = NumeroContrato
|
||||
.Add("@DescripcionContrato", SqlDbType.VarChar).Value = DescripcionContrato
|
||||
.Add("@NumeroLicitacion", SqlDbType.VarChar).Value = NumeroLicitacion
|
||||
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||
.Add("@CveProspecto", SqlDbType.Int).Value = CveProspecto
|
||||
.Add("@FechaInicial", SqlDbType.DateTime).Value = FechaInicial
|
||||
.Add("@FechaFinal", SqlDbType.DateTime).Value = FechaFinal
|
||||
.Add("@Ubicacion", SqlDbType.VarChar).Value = Ubicacion
|
||||
.Add("@Responsable", SqlDbType.VarChar).Value = Responsable
|
||||
.Add("@CveContratosEstatus", SqlDbType.Int).Value = CveContratosEstatus
|
||||
.Add("@PorIVA", SqlDbType.Float).Value = PorIVA
|
||||
.Add("@PorAnticipo", SqlDbType.Float).Value = PorAnticipo
|
||||
.Add("@PorAmortizacionAnticipo", SqlDbType.Float).Value = PorAmortizacionAnticipo
|
||||
.Add("@PorGarantia", SqlDbType.Float).Value = PorGarantia
|
||||
'.Add("@EstatusContrato", SqlDbType.Bit).Value = EstatusContrato
|
||||
.Add("@Archivo", SqlDbType.VarChar).Value = Archivo
|
||||
.Add("@Geom", SqlDbType.VarChar).Value = Geom
|
||||
.Add("@CveContratoPadre", SqlDbType.Int).Value = CveContratoPadre
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@EsPresupuestal", SqlDbType.Int).Value = EsPresupuestal
|
||||
.Add("@ImporteMin", SqlDbType.Money).Value = Minimo
|
||||
.Add("@ImporteMax", SqlDbType.Money).Value = Maximo
|
||||
.Add("@Importe", SqlDbType.Money).Value = Importe
|
||||
.Add("@CveContratoTipo", SqlDbType.SmallInt).Value = CveContratoTipo
|
||||
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
|
||||
.Add("@TipoCambio", SqlDbType.Money).Value = TipoCambio
|
||||
.Add("@ModalidadDetalle", SqlDbType.TinyInt).Value = ModalidadDetalle
|
||||
.Add("@CveSucursalCliente", SqlDbType.Int).Value = CveSucursalCliente
|
||||
.Add("@CveAlmacenOrigen", SqlDbType.Int).Value = CveAlmacenOrigen
|
||||
.Add("@CveAlmacenDestino", SqlDbType.Int).Value = CveAlmacenDestino
|
||||
.Add("@PorcentajeComision", SqlDbType.Int).Value = PorcentajeComision
|
||||
.Add("@TipoGarantia", SqlDbType.Int).Value = TipoGarantia
|
||||
.Add("@Folio", SqlDbType.Int).Value = Folio
|
||||
.Add("@FechaVenc", SqlDbType.Date).Value = FechaVenc
|
||||
.Add("@EstatusFianza", SqlDbType.Int).Value = EstatusFianza
|
||||
.Add("@CveContratoPlantilla", SqlDbType.Int).Value = CveContratoPlantilla
|
||||
.Add("@CveCuentaEquipo", SqlDbType.Int).Value = CveCuentaEquipo
|
||||
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
|
||||
.Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones
|
||||
.Add("@CveDireccionEnvio", SqlDbType.Int).Value = CveDireccionEnvio
|
||||
.Add("@AplicaImpuestosLocales", SqlDbType.Bit).Value = If(AplicaImpuestosLocales, 1, 0)
|
||||
.Add("@CorreoNotificacionPedDev", SqlDbType.VarChar).Value = CorreoNotificacionPedDev
|
||||
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
If ex.Message.Contains("Número: 2601;") Then
|
||||
Alert("Ya existe un contrato con el mismo número de contrato registrado: " & NumeroContrato & ".", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
OnError("Ocurrió un error al actualizar el Contrato.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End If
|
||||
|
||||
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
|
||||
|
||||
@@ -4978,9 +4978,7 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/PV/PVRepCompras.aspx".ToUpper(), 272)
|
||||
PaginaDict.Add("/PV/PVRepVentasCompras.aspx".ToUpper(), 273)
|
||||
|
||||
|
||||
|
||||
|
||||
PaginaDict.Add("/Contratos/ContratoObra.aspx".ToUpper(), -1)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -2653,6 +2653,8 @@ Partial Class Compras_eFacturas
|
||||
|
||||
|
||||
Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||
|
||||
Dim CveFacturaComplemento As Integer = gvRow.DataKey("CveFactura").ToString.ToEntero
|
||||
Dim CveComplementoPagoCompra As Integer = gvRow.DataKey("CveComplementoPagoCompra").ToString.ToEntero
|
||||
|
||||
If CveComplementoPagoCompra > 0 Then
|
||||
@@ -2773,7 +2775,7 @@ Partial Class Compras_eFacturas
|
||||
|
||||
|
||||
Dim ObjCompraFolios As New ClsCompras
|
||||
If ObjCompraFolios.GetCompararComplementoPago(gvRow.DataKey("CveProveedor").ToEntero, Monto, nodePagos2.InnerXml.Replace("pago10:", ""), UsuarioActual.CveEmpresa, OP:=2) Then
|
||||
If ObjCompraFolios.GetCompararComplementoPago(gvRow.DataKey("CveProveedor").ToEntero, Monto, nodePagos2.InnerXml.Replace("pago10:", ""), UsuarioActual.CveEmpresa, OP:=If(CveComplementoPagoCompra > 0, 2, 1), CveFactura:=CveFacturaComplemento) Then
|
||||
'
|
||||
'.GetCompararComplementoPago(gvRow.DataKey("CveProveedor").ToEntero, Monto, nodePagos2.InnerXml.Replace("pago10:", ""), UsuarioActual.CveEmpresa) Then
|
||||
If ObjCompraFolios.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
2679
Contratos/ContratoObra.aspx
Normal file
2679
Contratos/ContratoObra.aspx
Normal file
File diff suppressed because it is too large
Load Diff
4415
Contratos/ContratoObra.aspx.vb
Normal file
4415
Contratos/ContratoObra.aspx.vb
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user