Merge branch 'master' of http://agonzalez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -945,7 +945,7 @@ Public Class ClsBancos
|
||||
|
||||
Public Function GeneraTimbrePago(CveIE As Integer, CveVenta As Integer, UsuarioActual As Usuario, Optional CveCliente As Integer = -1, Optional CFDIRelacionado As String = "-1", Optional EsRegeneracion As Boolean = False, Optional CvePrePoliza As Integer = -1, Optional FechaTimbrado As DateTime = MinFecha) As Boolean
|
||||
|
||||
If FechaTimbrado = MinFecha Then FechaTimbrado = DateTime.Now
|
||||
|
||||
Dim Serie As String = "Pag"
|
||||
Dim Folio As Integer = -1
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -961,6 +961,33 @@ Public Class ClsBancos
|
||||
'If EsCancelacion Then Estatus = 2
|
||||
If EsRegeneracion Then Estatus = 3
|
||||
|
||||
If FechaTimbrado = MinFecha Then
|
||||
Dim RowFiltro As DataRow = Nothing
|
||||
|
||||
RowFiltro = dttpagos.FiltroPrimero("")
|
||||
|
||||
If RowFiltro IsNot Nothing Then
|
||||
If Now.EsHorarioVerano Then
|
||||
Dim UTCOffsetVerano As Integer = RowFiltro("UTCOffsetVerano").ToString().ToEntero()
|
||||
If UTCOffsetVerano <> 0 Then
|
||||
FechaTimbrado = DateTime.UtcNow.AddHours(UTCOffsetVerano)
|
||||
Else
|
||||
FechaTimbrado = DateTime.Now
|
||||
End If
|
||||
Else
|
||||
Dim UTCOffsetInvierno As Integer = RowFiltro("UTCOffsetInvierno").ToString().ToEntero()
|
||||
If UTCOffsetInvierno <> 0 Then
|
||||
FechaTimbrado = DateTime.UtcNow.AddHours(UTCOffsetInvierno)
|
||||
Else
|
||||
FechaTimbrado = DateTime.Now
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
FechaTimbrado = DateTime.Now
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Dim tCveComplementoPago As Integer = AddComplementoPago(If(CvePrePoliza > 0, CveIE, dr("CveIE").ToString.ToEntero), -1, Serie, Folio, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CvePrePoliza:=CvePrePoliza, Estatus:=Estatus)
|
||||
If tCveComplementoPago > 0 Then
|
||||
@@ -4089,12 +4116,13 @@ Public Class ClsBancos
|
||||
|
||||
#Region "CONCILIACIÓN BANCARIA"
|
||||
|
||||
Public Function UpdateConciliacionBancaria(CveIE As Integer, FechaAplicado As Date) As Boolean
|
||||
Public Function UpdateConciliacionBancaria(CveIE As Integer, FechaAplicado As Date, CveUsuario As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Banc_ConciliacionBancariaUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveIE", SqlDbType.Int).Value = CveIE
|
||||
.Add("@FechaAplicado", SqlDbType.Date).Value = FechaAplicado
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
@@ -4188,12 +4216,13 @@ Public Class ClsBancos
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function DesconciliarIE(CveIE As Integer, FechaDesconciliado As Date) As Boolean
|
||||
Public Function DesconciliarIE(CveIE As Integer, FechaDesconciliado As Date, CveUsuario As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Banc_IEDesconciliar")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveIE", SqlDbType.Int).Value = CveIE
|
||||
.Add("@FechaDesconciliado", SqlDbType.Date).Value = FechaDesconciliado
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
@@ -145,6 +145,7 @@ Public Class ClsContratos
|
||||
Public Property FechaFinal As DateTime
|
||||
Public Property Ubicacion As String
|
||||
Public Property Responsable As String
|
||||
Public Property Lugar As String
|
||||
Public Property CveSubProyecto As Integer
|
||||
Public Property SubProyectoContrato As String
|
||||
Public Property CveProyecto As Integer
|
||||
@@ -290,6 +291,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
|
||||
|
||||
Observaciones = Data.Rows(0)("Observaciones").ToString
|
||||
CveDireccionEnvio = Data.Rows(0)("CveDireccionEnvio").ToString.ToEntero
|
||||
AplicaImpuestosLocales = CBool(Data.Rows(0)("AplicaImpuestosLocales"))
|
||||
@@ -540,7 +543,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 = "") 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 = "") As Integer
|
||||
|
||||
Dim Retorno As Integer = -1
|
||||
DataAdapter("PA_Con_ContratosObraAdd")
|
||||
@@ -591,6 +594,7 @@ 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("@CveContrato", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
|
||||
@@ -617,7 +621,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 = "") 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 = "") As Boolean
|
||||
Dim Retorno = False
|
||||
|
||||
DataAdapter("PA_Con_ContratosObraUpdate")
|
||||
@@ -666,7 +670,8 @@ Public Class ClsContratos
|
||||
.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("@CorreoNotificacionPedDev", SqlDbType.VarChar).Value = CorreoNotificacionPedDev
|
||||
.Add("@Lugar", SqlDbType.VarChar).Value = Lugar
|
||||
|
||||
End With
|
||||
|
||||
@@ -2149,11 +2154,11 @@ Public Class ClsContratos
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
#Region " REPORTES AVANCES "
|
||||
|
||||
|
||||
Public Function GetReporteContratosAvancesCP(CveEmpresa As Integer, CveCliente As Integer, CveProveedor As Integer, CveTipoContrato As Integer, CveContrato As Integer, Optional CveEstatus As Integer = -1, Optional CveTipoEstatus As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -2178,7 +2183,17 @@ Public Class ClsContratos
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Public Function GetReporteContratosAvancesDetalleCP(CveContrato As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -2197,8 +2212,34 @@ Public Class ClsContratos
|
||||
OnError("Ocurrió un error al obtener el Reporte de Avances Detalle CP.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
|
||||
Public Function GetReporteContratosAvancesDetalleControl(CveContrato As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Con_ReporteContratosAvancesControlDetalle")
|
||||
|
||||
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 obtener el Reporte de Avances de control.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
Public Function GetVentasAvance(CveContrato As Integer, CveClasificacion As Integer, CvePS As Integer, Tipo As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
|
||||
@@ -1758,12 +1758,12 @@ Public Class ClsPaginas
|
||||
End Property
|
||||
Property GlobalDTContratosTipos(CveEmpresa As Integer) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = String.Format("GlobalDTContratosTipos-{0}", CveEmpresa)
|
||||
Dim AppNombre As String = "GlobalDTContratosTipos"
|
||||
|
||||
'sino existe, recarga los datos
|
||||
If Application(AppNombre) Is Nothing Then
|
||||
Dim ObjContratos As New ClsContratos
|
||||
If ObjContratos.GetContratosTipos(CveEmpresa) Then Application(AppNombre) = ObjContratos.DtResultados
|
||||
If ObjContratos.GetContratosTipos(-1) Then Application(AppNombre) = ObjContratos.DtResultados
|
||||
ObjContratos.Dispose()
|
||||
End If
|
||||
|
||||
@@ -1771,7 +1771,7 @@ Public Class ClsPaginas
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Dim AppNombre As String = String.Format("GlobalDTContratosTipos-{0}", CveEmpresa)
|
||||
Dim AppNombre As String = "GlobalDTContratosTipos"
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -494,7 +494,7 @@ Public Class ClsProductosServicios
|
||||
If Ex1.Message.Contains("Número: 2627;") Then
|
||||
Alert("El Nuevo Producto o Servicio no se guardo debido a que actualmente se encuentra registrado", TipoMensaje.MsgAdvertencia)
|
||||
ElseIf Ex1.Message.Contains("Número: 2601;") Then
|
||||
Alert("El Nuevo Producto o Servicio tiene Codigo duplicado.", TipoMensaje.MsgAdvertencia)
|
||||
Alert("El Nuevo Producto o Servicio tiene Codigo duplicado:" & Codigo, TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
Me.OnError("Ocurrió un error al guardar el nuevo Producto o Servicio.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End If
|
||||
|
||||
@@ -1346,7 +1346,7 @@ Public Class ClsVentas
|
||||
Public Function GetRepVentas(FechaI As Date, FechaF As Date, FechaIEjec As Date, FechaFEjec As Date, CveCliente As Integer, CveSubProyectoEjecucion As Integer,
|
||||
CveVendedor As String, CveUsuario As Integer, CveEstatus As String, IVA As String, CveEmpresa As Integer, Gpo As Integer, Optional TipoDocto As String = "-1",
|
||||
Optional CveProyecto As Integer = -1, Optional CveSubProyecto As String = "-1", Optional TipoCambio As Integer = 1, Optional TCEspecifico As Decimal = -1, Optional CveUsuarioConsulta As Integer = -1,
|
||||
Optional CveClienteClasificacion As Integer = -1, Optional CveCondicionesPago As Integer = -1, Optional TipoCliente As Integer = -1) As Boolean
|
||||
Optional CveClienteClasificacion As Integer = -1, Optional CveCondicionesPago As Integer = -1, Optional TipoCliente As Integer = -1, Optional ModalidadContable As Boolean = False) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_VentasGetRep")
|
||||
|
||||
@@ -1373,6 +1373,7 @@ Public Class ClsVentas
|
||||
.Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion
|
||||
.Add("@CveCondicionesPago", SqlDbType.Int).Value = CveCondicionesPago
|
||||
.Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente
|
||||
.Add("@ModalidadContable", SqlDbType.Bit).Value = ModalidadContable
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -1477,7 +1478,7 @@ Public Class ClsVentas
|
||||
Vendedor As String, CveUsuario As Integer, CveEstatus As String, FechaI As Date, FechaF As Date, CveCorte As Integer, TipoDocto As String,
|
||||
CveSubProyectoEjecucion As Integer, CveEmpresa As Integer, FechaIEjec As Date, FechaFEjec As Date, Optional CveProyecto As Integer = -1,
|
||||
Optional CveSubProyecto As String = "-1", Optional TipoCambio As Integer = 1, Optional TCEspecifico As Decimal = -1, Optional CveMoneda As Integer = -1, Optional CveUsuarioConsulta As Integer = -1,
|
||||
Optional CveClienteClasificacion As Integer = -1, Optional CveCondicionesPago As Integer = -1, Optional TipoCliente As Integer = -1) As Boolean
|
||||
Optional CveClienteClasificacion As Integer = -1, Optional CveCondicionesPago As Integer = -1, Optional TipoCliente As Integer = -1, Optional ModalidadContable As Boolean = False) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_VentasGetRepDetalle")
|
||||
|
||||
@@ -1509,6 +1510,7 @@ Public Class ClsVentas
|
||||
.Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion
|
||||
.Add("@CveCondicionesPago", SqlDbType.Int).Value = CveCondicionesPago
|
||||
.Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente
|
||||
.Add("@ModalidadContable", SqlDbType.Bit).Value = ModalidadContable
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -4707,7 +4707,7 @@ Namespace Modelos
|
||||
|
||||
If CveMovimientoDevolucion > 0 Then
|
||||
For Each Dr As DataRow In DtExistencias.FiltraParametros($"CveMovimiento = {RowMovimiento("CveMovimiento").ToString()}").Rows
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoDevolucion, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, -1, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoDevolucion, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, -1, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero) Then
|
||||
ErrorCancelar = True
|
||||
MensajeError = "Ocurrió un error al procesar los conceptos de salida. Por favor vuelva a intentar."
|
||||
Exit For
|
||||
@@ -4810,7 +4810,7 @@ Namespace Modelos
|
||||
|
||||
|
||||
'REALIZA LA DEVOLUCION AL ALMACEN VIRTUAL
|
||||
If Not GeneraMovimientosVirtuales(CveVenta, CveMovimientoDevolucion, RowMovimiento("CveMovimiento").ToString().ToEntero(), ObjInventario) Then
|
||||
If Not ErrorCancelar AndAlso Not GeneraMovimientosVirtuales(CveVenta, CveMovimientoDevolucion, RowMovimiento("CveMovimiento").ToString().ToEntero(), ObjInventario) Then
|
||||
ErrorCancelar = True
|
||||
MensajeError = "Ocurrió un error al cargar los datos de devolución. Por favor vuelva a intentar."
|
||||
End If
|
||||
@@ -4824,6 +4824,10 @@ Namespace Modelos
|
||||
End If
|
||||
End If
|
||||
|
||||
If ErrorCancelar Then
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
'SI EXISTEN HAY EXISTENCIA EN (ENTREGA POR ADELANTADO) SE TIENE QUE REGRESAR AL ALMACEN ORGINAL (GENERAL,SIN COSTO)
|
||||
@@ -4857,6 +4861,10 @@ Namespace Modelos
|
||||
End If
|
||||
Next
|
||||
|
||||
If ErrorCancelar Then
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Next
|
||||
End If
|
||||
|
||||
@@ -5297,7 +5305,7 @@ Namespace Modelos
|
||||
Exit For
|
||||
End If
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaDevRem, DrRem("Cantidad").ToString.ToDecimal, DrRem("CveUM").ToString.ToEntero, DrRem("CvePS").ToString.ToEntero, DrRem("PU").ToString.ToDecimal, CveAF:=DrRem("CveActivoFijo").ToString.ToEntero, Serie:=DrRem("Serie").ToString, Lote:=DrRem("Lote").ToString, CveVentaDetalle:=CveVentaDetalleRem, CveMovimientoDetalleEntrada:=DrRem("CveMovimientoDetalle").ToString().ToEntero()) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaDevRem, DrRem("Cantidad").ToString.ToDecimal, DrRem("CveUM").ToString.ToEntero, DrRem("CvePS").ToString.ToEntero, DrRem("PU").ToString.ToDecimal, CveAF:=DrRem("CveActivoFijo").ToString.ToEntero, Serie:=DrRem("Serie").ToString, Lote:=DrRem("Lote").ToString, CveVentaDetalle:=CveVentaDetalleRem, CveMovimientoDetalleEntrada:=DrRem("CveMovimientoDetalle").ToString().ToEntero(), CveSeccionAlmacen:=-3) Then
|
||||
ErrorCancelar = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -5320,7 +5328,7 @@ Namespace Modelos
|
||||
If Not ErrorCancelar Then
|
||||
If DtEntradaDetalle IsNot Nothing Then
|
||||
For Each Dr As DataRow In DtEntradaDetalle.Rows
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaDevRem, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString().ToEntero(), CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaDevRem, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString().ToEntero(), CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString, CveSeccionAlmacen:=-3) Then
|
||||
ErrorCancelar = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -6097,6 +6105,28 @@ Namespace Modelos
|
||||
Public Sub SetCliente()
|
||||
If CveCliente > 0 Then
|
||||
Cliente = New Modelos.ClienteModel(CveCliente, CveEmpresa)
|
||||
If Me.CveClienteSucursal > 0 Then
|
||||
Dim ObjCliente As New ClsClientes()
|
||||
If ObjCliente.GetSucursales(CveCliente, Me.CveClienteSucursal) AndAlso ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||
Me.ClienteSucursal = New Modelos.SucursalModel(ObjCliente.DtResultados.Rows(0))
|
||||
End If
|
||||
ObjCliente.Dispose()
|
||||
Else
|
||||
Me.ClienteSucursal = New Modelos.SucursalModel()
|
||||
Me.ClienteSucursal.NoExt = Cliente.NoExt
|
||||
Me.ClienteSucursal.NoInt = Cliente.NoInt
|
||||
Me.ClienteSucursal.Localidad = Cliente.Localidad
|
||||
Me.ClienteSucursal.Direccion = Cliente.Direccion
|
||||
Me.ClienteSucursal.Colonia = Cliente.Colonia
|
||||
Me.ClienteSucursal.Municipio = Cliente.Localidad
|
||||
Me.ClienteSucursal.Estado = Cliente.Estado
|
||||
Me.ClienteSucursal.CP = Cliente.CP
|
||||
Me.ClienteSucursal.Pais = Cliente.Pais
|
||||
Me.ClienteSucursal.CorreoSucursal = Cliente.CorreoCotizacion
|
||||
Me.ClienteSucursal.TelefonoSucursal = Cliente.Telefono
|
||||
Me.ClienteSucursal.Sucursal = Cliente.Sucursal
|
||||
Me.ClienteSucursal.ImprimeNombreSucursal = Cliente.ImprimeNombreSucursal.ToString()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Public Sub SetMoneda()
|
||||
@@ -9435,7 +9465,8 @@ Namespace Modelos
|
||||
Public Property ClaveSATColonia As String
|
||||
Public Property ClaveSATCP As String
|
||||
Public Property EsDistribuidor As Boolean
|
||||
|
||||
Public Property CorreoCotizacion As String
|
||||
Public Property ImprimeNombreSucursal As Integer
|
||||
End Class
|
||||
|
||||
<Serializable>
|
||||
|
||||
@@ -966,6 +966,13 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
Private Function GETUMSAT(ByVal context As HttpContext) As String
|
||||
Dim retorno As String = ""
|
||||
|
||||
|
||||
If context.Application("GlobalDTPSATUM") Is Nothing Then
|
||||
Dim ObjGrales As New ClsGenerales
|
||||
If ObjGrales.GetSATUnidadMedida Then context.Application("GlobalDTPSATUM") = ObjGrales.DtResultados.AsEnumerable() Else context.Application("GlobalDTPSATUM") = Nothing
|
||||
ObjGrales.Dispose()
|
||||
End If
|
||||
|
||||
Dim DTUM = DirectCast(context.Application("GlobalDTPSATUM"), EnumerableRowCollection(Of DataRow))
|
||||
Dim DtPSRetorno As DataTable
|
||||
|
||||
|
||||
@@ -178,7 +178,7 @@ Partial Class Bancos_ConciliacionesBancariasaspx
|
||||
If Not CBool(Dr("FueConciliado").ToString) And Dr("CveIE").ToString.ToEntero > 0 Then
|
||||
For Each DrE As DataRow In DtDatosEdoCuenta.Rows
|
||||
If ((Dr("FechaDocumento").ToString.ToDate = DrE("FechaDocumento").ToString.ToDate And Dr("Importe").ToString.ToDouble = DrE("Importe").ToString.ToDouble And Dr("Tipo").ToString = DrE("Tipo").ToString And DdlCriterio.SelectedValue.ToEntero = 1) Or (Dr("Importe").ToString.ToDouble = DrE("Importe").ToString.ToDouble And Dr("Tipo").ToString = DrE("Tipo").ToString And DdlCriterio.SelectedValue.ToEntero = 2)) And Not CBool(DrE("Seleccionado").ToString) And Not CBool(DrE("FueConciliado").ToString) And Not CBool(Dr("Seleccionado").ToString) Then
|
||||
If Not ObjBancos.UpdateConciliacionBancaria(Dr("CveIE").ToString.ToEntero, If(Dr("FechaDocumento").ToString.ToDate < txtFechaI.Text.ToDate, TxtFechaAplicado.Text.ToDate, Dr("FechaDocumento").ToString.ToDate)) Or Not ObjBancos.UpdateIEEstadoCuenta(DrE("CveIEEstadoCuenta").ToString.ToEntero, DrE("Importe").ToString.ToDouble, True, Dr("CveIE").ToString.ToEntero,
|
||||
If Not ObjBancos.UpdateConciliacionBancaria(Dr("CveIE").ToString.ToEntero, If(Dr("FechaDocumento").ToString.ToDate < txtFechaI.Text.ToDate, TxtFechaAplicado.Text.ToDate, Dr("FechaDocumento").ToString.ToDate), UsuarioActual.CveUsuario) Or Not ObjBancos.UpdateIEEstadoCuenta(DrE("CveIEEstadoCuenta").ToString.ToEntero, DrE("Importe").ToString.ToDouble, True, Dr("CveIE").ToString.ToEntero,
|
||||
DrE("Referencia").ToString, DrE("Tipo").ToString, DrE("FechaDocumento").ToString.ToDate, DrE("CveCuenta").ToString.ToEntero) Then
|
||||
ErrorTrans = True
|
||||
Else
|
||||
@@ -283,7 +283,7 @@ Partial Class Bancos_ConciliacionesBancariasaspx
|
||||
Dim CveIE As Integer = 0
|
||||
For Each Gvr As GridViewRow In GvDatos.Rows
|
||||
If Gvr.FCCheckBox("ChkConciliado").Checked And Gvr.FCCheckBox("ChkConciliado").Enabled Then
|
||||
If Not ObjBancos.UpdateConciliacionBancaria(Gvr.DataKey("CveIE").ToEntero, If(Gvr.DataKey("FechaDocumento").ToString.ToDate < txtFechaI.Text.ToDate, TxtFechaAplicado.Text.ToDate, Gvr.DataKey("FechaDocumento").ToString.ToDate)) Then
|
||||
If Not ObjBancos.UpdateConciliacionBancaria(Gvr.DataKey("CveIE").ToEntero, If(Gvr.DataKey("FechaDocumento").ToString.ToDate < txtFechaI.Text.ToDate, TxtFechaAplicado.Text.ToDate, Gvr.DataKey("FechaDocumento").ToString.ToDate), UsuarioActual.CveUsuario) Then
|
||||
ErrorTrans = True
|
||||
Else
|
||||
If Not ObjOI.AddEventoBitacora("El pago ha sido conciliado", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveIE:=Gvr.DataKey("CveIE").ToEntero) Then
|
||||
@@ -350,7 +350,7 @@ Partial Class Bancos_ConciliacionesBancariasaspx
|
||||
For Each Gvr As GridViewRow In GvDatos.Rows
|
||||
If Gvr.FCCheckBox("ChkConciliado").Checked And Gvr.FCCheckBox("ChkConciliado").Enabled Then
|
||||
Selecciono = True
|
||||
If Not ObjBancos.UpdateConciliacionBancaria(Gvr.DataKey("CveIE").ToEntero, If(Gvr.DataKey("FechaDocumento").ToString.ToDate < txtFechaI.Text.ToDate, TxtFechaAplicado.Text.ToDate, Gvr.DataKey("FechaDocumento").ToString.ToDate)) Then
|
||||
If Not ObjBancos.UpdateConciliacionBancaria(Gvr.DataKey("CveIE").ToEntero, If(Gvr.DataKey("FechaDocumento").ToString.ToDate < txtFechaI.Text.ToDate, TxtFechaAplicado.Text.ToDate, Gvr.DataKey("FechaDocumento").ToString.ToDate), UsuarioActual.CveUsuario) Then
|
||||
ErrorTrans = True
|
||||
Else
|
||||
If Not ObjOI.AddEventoBitacora("El pago ha sido conciliado", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveIE:=Gvr.DataKey("CveIE").ToEntero) Then
|
||||
@@ -402,7 +402,7 @@ Partial Class Bancos_ConciliacionesBancariasaspx
|
||||
Dim ErrorTrans As Boolean = False
|
||||
|
||||
If ModalidadDesconciliar = "D" Then
|
||||
If ObjBancos.DesconciliarIE(CveIEDesconciliar, TxtFechaDesconciliado.Text.ToDate()) Then
|
||||
If ObjBancos.DesconciliarIE(CveIEDesconciliar, TxtFechaDesconciliado.Text.ToDate(), UsuarioActual.CveUsuario) Then
|
||||
If Not ObjOI.AddEventoBitacora("El pago ha sido desconciliado", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveIE:=CveIEDesconciliar) Then
|
||||
ErrorTrans = True
|
||||
End If
|
||||
@@ -412,7 +412,7 @@ Partial Class Bancos_ConciliacionesBancariasaspx
|
||||
ElseIf ModalidadDesconciliar = "DT" Then
|
||||
For Each Gvr As GridViewRow In GvDatos.Rows
|
||||
If Gvr.FCCheckBox("ChkConciliado").Checked And Not Gvr.FCCheckBox("ChkConciliado").Enabled Then
|
||||
If Not ObjBancos.DesconciliarIE(Gvr.DataKey("CveIE").ToEntero, TxtFechaDesconciliado.Text.ToDate()) Then
|
||||
If Not ObjBancos.DesconciliarIE(Gvr.DataKey("CveIE").ToEntero, TxtFechaDesconciliado.Text.ToDate(), UsuarioActual.CveUsuario) Then
|
||||
ErrorTrans = True
|
||||
Else
|
||||
If Not ObjOI.AddEventoBitacora("El pago ha sido desconciliado", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveIE:=Gvr.DataKey("CveIE").ToEntero) Then
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvD" runat="server" GridLines="None"
|
||||
DataKeyNames="CobranzaCorreo,CveIE,CveVenta,CveEmpresa,FechaDocumento, PagoAbreviaturaSAT,Folio, ClaveFormaPagoSAT, NumCuenta,Importe, FolioFiscal,VentaSerie,VentaFolio,VentaAbreviaturaSAT, VentaImportePagado,MetodoPago,TipoCambio,NumParcialidad,ImpSaldoInsoluto,ImpSaldoAnterior,RFC,NombreCliente,PorcentajeIVA,PorcentajeIEPS,CuentaBeneficiario,SerieFolioPago,FolioFiscalComplemento,CveComplementoPago"
|
||||
DataKeyNames="CobranzaCorreo,CveIE,CveVenta,CveEmpresa,FechaDocumento, PagoAbreviaturaSAT,Folio, ClaveFormaPagoSAT, NumCuenta,Importe, FolioFiscal,VentaSerie,VentaFolio,VentaAbreviaturaSAT, VentaImportePagado,MetodoPago,TipoCambio,NumParcialidad,ImpSaldoInsoluto,ImpSaldoAnterior,RFC,NombreCliente,PorcentajeIVA,PorcentajeIEPS,CuentaBeneficiario,SerieFolioPago,FolioFiscalComplemento,CveComplementoPago,UTCOffsetVerano,UTCOffsetInvierno"
|
||||
CssClass="table table-striped table-advance table-hover Widthall mysmallbtn" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left">
|
||||
|
||||
@@ -51,28 +51,44 @@ Partial Class Bancos_RepComplementoPago
|
||||
|
||||
|
||||
For Each gvr As GridViewRow In GvD.Rows
|
||||
If gvr.FCCheckBox("Chk").Checked Then
|
||||
Dim Banco As New ClsBancos
|
||||
Banco.IniciaTransacSQL()
|
||||
|
||||
|
||||
If Banco.GeneraTimbrePago(gvr.DataKey("CveIE").ToEntero, -1, UsuarioActual) Then
|
||||
If Banco.Mensaje = "" Then
|
||||
Banco.Commit()
|
||||
PDFReciboDePagos(-1, -1, Banco.CveComplementoPago, False)
|
||||
Str.AppendFormat("Folio: <b>{0}</b> ", Banco.ComplementoSerieFolio)
|
||||
Str.AppendFormat("<a class=""texto"" style='color:#337ab7' href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank"">XML <i class=""fa fa-file""></i></i></a> ", Encripta(String.Format("OP=CompP&EXT=xml&SerieFolio={0}&CveComplementoPago={1}", Banco.ComplementoSerieFolio, Banco.CveComplementoPago)))
|
||||
Str.AppendFormat("<a class=""texto"" style='color:#337ab7' href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank"">PDF <i class=""fa fa-ad-pdf""></i></i></i></a> ", Encripta(String.Format("OP=CompP&EXT=pdf&SerieFolio={0}&CveComplementoPago={1}", Banco.ComplementoSerieFolio, Banco.CveComplementoPago)))
|
||||
Str.AppendFormat("<a style='color:#337ab7' target='_blank' href='./IE.aspx?CveIE={0}'>{1}</a> {2}<br>", gvr.DataKey("CveIE"), gvr.DataKey("Folio"), gvr.DataKey("NombreCliente"))
|
||||
MandaCorreo(Banco.ComplementoSerieFolio, gvr.DataKey("CobranzaCorreo"))
|
||||
End If
|
||||
|
||||
Else
|
||||
Str.AppendFormat("No se genero complemento del Folio {0} por el siguiente motivo: {1}", gvr.DataKey("Folio"), Banco.Mensaje)
|
||||
Banco.RollBack()
|
||||
If gvr.FCCheckBox("Chk").Checked Then
|
||||
Dim FechaTimbrado As DateTime = DateTime.Now
|
||||
|
||||
Dim UTCOffset As Integer = 0
|
||||
|
||||
If Now.EsHorarioVerano Then
|
||||
If gvr.DataKey("UTCOffsetVerano").ToEntero() <> 0 Then
|
||||
UTCOffset = gvr.DataKey("UTCOffsetVerano").ToEntero()
|
||||
End If
|
||||
Else
|
||||
If gvr.DataKey("UTCOffsetInvierno").ToEntero() <> 0 Then
|
||||
UTCOffset = gvr.DataKey("UTCOffsetInvierno").ToEntero()
|
||||
End If
|
||||
End If
|
||||
|
||||
If UTCOffset <> 0 Then
|
||||
FechaTimbrado = DateTime.UtcNow.AddHours(UTCOffset)
|
||||
End If
|
||||
|
||||
Dim Banco As New ClsBancos
|
||||
Banco.IniciaTransacSQL()
|
||||
|
||||
If Banco.GeneraTimbrePago(gvr.DataKey("CveIE").ToEntero, -1, UsuarioActual, FechaTimbrado:=FechaTimbrado) Then
|
||||
If Banco.Mensaje = "" Then
|
||||
Banco.Commit()
|
||||
PDFReciboDePagos(-1, -1, Banco.CveComplementoPago, False)
|
||||
Str.AppendFormat("Folio: <b>{0}</b> ", Banco.ComplementoSerieFolio)
|
||||
Str.AppendFormat("<a class=""texto"" style='color:#337ab7' href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank"">XML <i class=""fa fa-file""></i></i></a> ", Encripta(String.Format("OP=CompP&EXT=xml&SerieFolio={0}&CveComplementoPago={1}", Banco.ComplementoSerieFolio, Banco.CveComplementoPago)))
|
||||
Str.AppendFormat("<a class=""texto"" style='color:#337ab7' href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank"">PDF <i class=""fa fa-ad-pdf""></i></i></i></a> ", Encripta(String.Format("OP=CompP&EXT=pdf&SerieFolio={0}&CveComplementoPago={1}", Banco.ComplementoSerieFolio, Banco.CveComplementoPago)))
|
||||
Str.AppendFormat("<a style='color:#337ab7' target='_blank' href='./IE.aspx?CveIE={0}'>{1}</a> {2}<br>", gvr.DataKey("CveIE"), gvr.DataKey("Folio"), gvr.DataKey("NombreCliente"))
|
||||
MandaCorreo(Banco.ComplementoSerieFolio, gvr.DataKey("CobranzaCorreo"))
|
||||
End If
|
||||
|
||||
Else
|
||||
Str.AppendFormat("No se genero complemento del Folio {0} por el siguiente motivo: {1}", gvr.DataKey("Folio"), Banco.Mensaje)
|
||||
Banco.RollBack()
|
||||
End If
|
||||
|
||||
Banco.Dispose()
|
||||
End If
|
||||
Next
|
||||
|
||||
@@ -476,10 +476,16 @@ Partial Class Contratos_ContratoAvance
|
||||
|
||||
Dim DtControl As New DataTable
|
||||
Dim ObjContratos As New ClsContratos
|
||||
Dim Lugar As String = ""
|
||||
Dim DescripcionContrato As String = ""
|
||||
|
||||
|
||||
If ObjContratos.GetContratosObraAvancesControlAcumulativo(CveContrato, CveEstimacion, UsuarioActual.CveEmpresa) Then
|
||||
DtControl = ObjContratos.DtResultados
|
||||
If DtControl.Rows.Count > 0 Then
|
||||
Lugar = DtControl(0)("Lugar").ToString
|
||||
DescripcionContrato = DtControl(0)("DescripcionContrato").ToString
|
||||
End If
|
||||
End If
|
||||
ObjContratos.Dispose()
|
||||
|
||||
@@ -502,10 +508,16 @@ Partial Class Contratos_ContratoAvance
|
||||
|
||||
WSControl.Cell(20, 6).Value = NumeroContrato
|
||||
|
||||
WSControl.Cell(18, 2).Value = "" 'Lugar
|
||||
WSControl.Cell(18, 2).Value = Lugar
|
||||
WSControl.Cell(18, 2).Style.Alignment.SetHorizontal(XLAlignmentHorizontalValues.Left)
|
||||
WSControl.Cell(18, 2).Style.Alignment.SetVertical(XLAlignmentVerticalValues.Top)
|
||||
|
||||
WSControl.Cell(17, 6).Value = "" 'Periodo Fecha Inicial
|
||||
WSControl.Cell(17, 7).Value = "" 'Periuodo Fecha Final
|
||||
WSControl.Cell(20, 2).Value = "" 'Obra
|
||||
WSControl.Cell(20, 2).Value = DescripcionContrato
|
||||
WSControl.Cell(20, 2).Style.Alignment.SetHorizontal(XLAlignmentHorizontalValues.Left)
|
||||
WSControl.Cell(20, 2).Style.Alignment.SetVertical(XLAlignmentVerticalValues.Top)
|
||||
|
||||
WSControl.Cell(22, 7).Value = "" 'Presupuesto segun contrato
|
||||
WSControl.Cell(19, 5).Value = "" 'Contrtatista
|
||||
|
||||
@@ -613,8 +625,6 @@ Partial Class Contratos_ContratoAvance
|
||||
range.Value = "C. SALVADOR SUAREZ"
|
||||
|
||||
|
||||
|
||||
|
||||
range = WSControl.Range($"A{CuerrentRow + 5}:D{CuerrentRow + 5}")
|
||||
range.Merge()
|
||||
range.Style.Border.BottomBorder = ClosedXML.Excel.XLBorderStyleValues.Thin
|
||||
@@ -632,12 +642,11 @@ Partial Class Contratos_ContratoAvance
|
||||
range.Style.Font.Bold = True
|
||||
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
CuerrentRow = CuerrentRow + 1
|
||||
RowCountControl = RowCountControl + 1
|
||||
|
||||
Next
|
||||
|
||||
WBAnexo.Worksheet(1).CopyTo(WBAnexoSalvar, "CONTROL")
|
||||
@@ -654,9 +663,7 @@ Partial Class Contratos_ContratoAvance
|
||||
WSDetalle.Cell(4, 10).Value = "" 'Fecha a
|
||||
WSDetalle.Cell(4, 11).Value = NumeroEstimacion
|
||||
|
||||
'WSDetalle.Picture("Logo").Name = $"Logo{Drow("CveContratoDetalle").ToString}"
|
||||
'WSDetalle.Picture("Firma").Name = $"Firma{Drow("CveContratoDetalle").ToString}"
|
||||
|
||||
WSDetalle.Cell(6, 6).Value = DescripcionContrato
|
||||
|
||||
WSDetalle.Cell(14, 2).Value = Drow("Codigo").ToString
|
||||
WSDetalle.Cell(14, 3).Value = Drow("PS").ToString
|
||||
@@ -715,12 +722,9 @@ Partial Class Contratos_ContratoAvance
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Next
|
||||
|
||||
|
||||
|
||||
|
||||
Dim msB = New MemoryStream()
|
||||
WBAnexoSalvar.SaveAs(msB)
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<li runat="server" id="liTerminarContrato" visible="false">
|
||||
<%-- <li runat="server" id="liTerminarContrato" visible="false">
|
||||
<asp:LinkButton ID="LBTerminarContrato" Visible="false" OnClick="LBTerminarContrato_Click" runat="server" data-toggle="confirmation" data-popout="true" data-original-title="Esta seguro de terminar el contrato?" data-btn-ok-label="si"> <i class="fa fa-check"> </i> Concluir Contrato</asp:LinkButton>
|
||||
</li>
|
||||
<li runat="server" id="liCancelarContrato" visible="false">
|
||||
@@ -155,7 +155,7 @@
|
||||
<asp:LinkButton ID="LnkAjusteAF" Visible="true" runat="server" OnClick="LnkAjusteAF_Click"> <i class="fa fa-pencil" style="font-weight:bold;"></i>Habilitar Ajuste A.F.</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:UpdatePanel>--%>
|
||||
|
||||
<asp:UpdatePanel ID="UpAccionesPresupuestos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
@@ -185,7 +185,7 @@
|
||||
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LbDescargarExcel" />
|
||||
<%-- <asp:PostBackTrigger ControlID="LbDescargarExcel" />
|
||||
<asp:PostBackTrigger ControlID="LBImprimir" />
|
||||
<asp:PostBackTrigger ControlID="LBImprimirGastos" />
|
||||
<asp:PostBackTrigger ControlID="LbImprimirSuministros" />
|
||||
@@ -195,7 +195,7 @@
|
||||
<asp:PostBackTrigger ControlID="LbImprmirAF" />
|
||||
<asp:PostBackTrigger ControlID="LbImprmirAFExcel" />
|
||||
<asp:PostBackTrigger ControlID="LbImprimirPedDev" />
|
||||
<asp:PostBackTrigger ControlID="LbImprimirPedDevExcel" />
|
||||
<asp:PostBackTrigger ControlID="LbImprimirPedDevExcel" />--%>
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
@@ -209,6 +209,7 @@
|
||||
|
||||
<%-- <asp:UpdatePanel ID="UPTipo" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div id="DivTipoContrato" class="row" runat="server" visible="true">
|
||||
<div class="col-md-12">
|
||||
|
||||
@@ -373,6 +374,13 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" id="div3" runat="server">
|
||||
<label class="col-md-2 truncate ">Lugar:</label>
|
||||
<div class="col-md-10">
|
||||
<asp:TextBox ID="TxtLugar" runat="server" MaxLength="300" Width="400px"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%-- <div class="row" id="RowFlexible" runat="server">
|
||||
<label class="col-md-2 truncate ">Flexible:</label>
|
||||
<div class="col-md-10">
|
||||
@@ -950,7 +958,8 @@
|
||||
DataKeyNames="CveContratoDetalle,CveUM, CvePS, Cantidad, PU,CveTipoPresupuesto,CveClasificacion,CodigoPS,LimitarCantidad,PS,OCInterna,NoIdentificacion,PermitirAvance"
|
||||
ShowHeader="true" SelectedRowStyle-BackColor="#66CCFF" CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="OC <br/> Cliente">
|
||||
|
||||
<%-- <asp:TemplateField HeaderText="OC <br/> Cliente">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LbOCInternaEdit" Text='<%# Eval("OCInterna")%>' runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
@@ -958,7 +967,9 @@
|
||||
<asp:TextBox ID="TxtOCInternaEdit" MaxLength="15" runat="server" Text='<%# Eval("OCInterna") %>' Width="70px"></asp:TextBox>
|
||||
</EditItemTemplate>
|
||||
<ItemStyle Width="75px" />
|
||||
</asp:TemplateField>
|
||||
</asp:TemplateField>--%>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Cantidad">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtCantidad" Text='<%# Eval("CantidadContratada")%>' runat="server"></asp:Literal>
|
||||
@@ -978,7 +989,7 @@
|
||||
</EditItemTemplate>
|
||||
<ItemStyle Width="75px" HorizontalAlign="Center" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Clave Int. Cliente">
|
||||
<%-- <asp:TemplateField HeaderText="Clave Int. Cliente">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblNoIdentificacion" Text='<%# Eval("NoIdentificacion")%>' runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
@@ -986,7 +997,7 @@
|
||||
<asp:TextBox ID="TxtNoIdentificacion" MaxLength="15" runat="server" Text='<%# Eval("NoIdentificacion") %>' Width="70px"></asp:TextBox>
|
||||
</EditItemTemplate>
|
||||
<ItemStyle Width="75px" />
|
||||
</asp:TemplateField>
|
||||
</asp:TemplateField>--%>
|
||||
<asp:TemplateField HeaderText="Producto/Servicio" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtPS" Text='<%# Eval("CodigoPS")%>' runat="server"></asp:Literal>
|
||||
@@ -1216,7 +1227,7 @@
|
||||
</EditItemTemplate>
|
||||
<ItemStyle Width="75px" HorizontalAlign="Center" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Clave <br/> Interna">
|
||||
<%-- <asp:TemplateField HeaderText="Clave <br/> Interna">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblNoIdentificacion" Text='<%# Eval("NoIdentificacion")%>' runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
@@ -1224,7 +1235,7 @@
|
||||
<asp:TextBox ID="TxtNoIdentificacion" MaxLength="15" runat="server" Text='<%# Eval("NoIdentificacion") %>' Width="70px"></asp:TextBox>
|
||||
</EditItemTemplate>
|
||||
<ItemStyle Width="75px" />
|
||||
</asp:TemplateField>
|
||||
</asp:TemplateField>--%>
|
||||
<asp:TemplateField HeaderText="Producto/Servicio" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtPS" Text='<%# Eval("CodigoPS")%>' runat="server"></asp:Literal>
|
||||
@@ -1517,66 +1528,158 @@
|
||||
<ajax:TabPanel ID="TabReporteAvance" Visible="false" runat="server" HeaderText="Avance">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12" align="right">
|
||||
<input type="text" id="TxtFiltra" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtFiltra','{0}')", GvDatosAvance.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtFiltra','{0}')", GvDatosAvance.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<asp:UpdatePanel ID="UpDatosAvance" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div id="dvCa" style="width: 100%; top: 30px">
|
||||
<table id="dTable" class="table Widthall ">
|
||||
<tr>
|
||||
<td width="30%" id="TH1" style="font-size: medium; text-align: center!important; background-color: #b9b9b9;"><strong>Clasificación</strong> </td>
|
||||
<td width="15%" id="TH2" style="font-size: medium; text-align: center!important; background-color: #dddddd;"><strong>Contratado</strong> </td>
|
||||
<td width="15%" id="TH3" style="font-size: medium; text-align: center!important; background-color: #b9b9b9;"><strong>Avance</strong> </td>
|
||||
<td width="15%" id="TH4" style="font-size: medium; text-align: center!important; background-color: #dddddd;"><strong>Faltante</strong> </td>
|
||||
<td width="15%" id="TH5" style="font-size: medium; text-align: center!important; background-color: #b9b9b9;"><strong>Avance Por Facturar</strong> </td>
|
||||
<td width="10%" id="TH6" style="font-size: medium; text-align: center!important; background-color: #dddddd;"><strong>Anticipo</strong> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="GvDatosAvance" ClientIDMode="Static" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron datos con los filtros especificados" CssClass="table table-striped table-hover Widthall" BorderColor="#D3D3D3" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Producto/Servicio" DataField="CodigoPS" ItemStyle-Width="30%" />
|
||||
<ajax:TabContainer ID="TabEstimacion" runat="server" Width="100%" CssClass="tabBodyOverride" ActiveTabIndex="0">
|
||||
|
||||
<ajax:TabPanel ID="TabPanel1" Visible="true" runat="server" HeaderText="Estimación">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12" align="right">
|
||||
<input type="text" id="TxtFiltra" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtFiltra','{0}')", GvDatosAvance.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtFiltra','{0}')", GvDatosAvance.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<asp:UpdatePanel ID="UpDatosAvance" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div id="dvCa" style="width: 100%; top: 30px">
|
||||
<table id="dTable" class="table Widthall ">
|
||||
<tr>
|
||||
<td width="30%" id="TH1" style="font-size: medium; text-align: center!important; background-color: #b9b9b9;"><strong>Clasificación</strong> </td>
|
||||
<td width="15%" id="TH2" style="font-size: medium; text-align: center!important; background-color: #dddddd;"><strong>Contratado</strong> </td>
|
||||
<td width="15%" id="TH3" style="font-size: medium; text-align: center!important; background-color: #b9b9b9;"><strong>Avance</strong> </td>
|
||||
<td width="15%" id="TH4" style="font-size: medium; text-align: center!important; background-color: #dddddd;"><strong>Faltante</strong> </td>
|
||||
<td width="15%" id="TH5" style="font-size: medium; text-align: center!important; background-color: #b9b9b9;"><strong>Avance Por Facturar</strong> </td>
|
||||
<td width="10%" id="TH6" style="font-size: medium; text-align: center!important; background-color: #dddddd;"><strong>Anticipo</strong> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="GvDatosAvance" ClientIDMode="Static" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron datos con los filtros especificados" CssClass="table table-striped table-hover Widthall" BorderColor="#D3D3D3" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Producto/Servicio" DataField="CodigoPS" ItemStyle-Width="30%" />
|
||||
|
||||
<asp:BoundField HeaderText="Cantidad" DataField="ContratoCantidad" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00##}" ItemStyle-Width="7.5%" />
|
||||
<asp:BoundField HeaderText="Importe $" DataField="ContratoImporte" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00##}" ItemStyle-Width="7.5%" />
|
||||
|
||||
<asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="7.5%" ItemStyle-CssClass="Derecha">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LBAvanceCantidad" OnClick="MuestaModalVentasAvance" Text='<%# Eval("AvanceCantidad", "{0:###,###,##0.00##}") %>' runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Importe $" ItemStyle-Width="7.5%" ItemStyle-CssClass="Derecha">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LBAvanceImporte" OnClick="MuestaModalVentasAvance" Text='<%# Eval("AvanceImporte", "{0:###,###,##0.00##}") %>' runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:BoundField HeaderText="Cantidad" DataField="FaltanteCantidad" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00##}" ItemStyle-Width="7.5%" />
|
||||
<asp:BoundField HeaderText="Importe $" DataField="FaltanteImporte" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00##}" ItemStyle-Width="7.5%" />
|
||||
|
||||
<asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="7.5%" ItemStyle-CssClass="Derecha">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LBAvanceXFacturarCantidad" OnClick="MuestaModalVentasAvance" Text='<%# Eval("AvanceXFacturarCantidad", "{0:###,###,##0.00##}") %>' runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Importe $" ItemStyle-Width="7.5%" ItemStyle-CssClass="Derecha">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LBAvanceXFacturarImporte" OnClick="MuestaModalVentasAvance" Text='<%# Eval("AvanceXFacturarImporte", "{0:###,###,##0.00##}") %>' runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Importe $" DataField="Anticipos" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00##}" ItemStyle-Width="10%" />
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel ID="TabInterno" Visible="true" runat="server" HeaderText="Interno">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12" align="right">
|
||||
<input type="text" id="TxtFiltra" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtFiltra','{0}')", GvDatosAvance.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtFiltra','{0}')", GvDatosAvance.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<asp:UpdatePanel ID="UpDatosAvanceControl" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div id="dvCaCon" style="width: 100%; top: 30px">
|
||||
<table id="dTable" class="table Widthall ">
|
||||
<tr>
|
||||
<td width="30%" id="TH1" style="font-size: medium; text-align: center!important; background-color: #b9b9b9;"><strong>Clasificación</strong> </td>
|
||||
<td width="15%" id="TH2" style="font-size: medium; text-align: center!important; background-color: #dddddd;"><strong>Contratado</strong> </td>
|
||||
<td width="15%" id="TH3" style="font-size: medium; text-align: center!important; background-color: #b9b9b9;"><strong>Avance</strong> </td>
|
||||
<td width="15%" id="TH4" style="font-size: medium; text-align: center!important; background-color: #dddddd;"><strong>Faltante</strong> </td>
|
||||
<%-- <td width="15%" id="TH5" style="font-size: medium; text-align: center!important; background-color: #b9b9b9;"><strong>Avance Por Facturar</strong> </td>
|
||||
<td width="10%" id="TH6" style="font-size: medium; text-align: center!important; background-color: #dddddd;"><strong>Anticipo</strong> </td>--%>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="GvDatosAvanceControl" ClientIDMode="Static" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron datos con los filtros especificados" CssClass="table table-striped table-hover Widthall" BorderColor="#D3D3D3" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Producto/Servicio" DataField="CodigoPS" ItemStyle-Width="30%" />
|
||||
|
||||
<asp:BoundField HeaderText="Cantidad" DataField="ContratoCantidad" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00##}" ItemStyle-Width="7.5%" />
|
||||
<asp:BoundField HeaderText="Importe $" DataField="ContratoImporte" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00##}" ItemStyle-Width="7.5%" />
|
||||
|
||||
<asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="7.5%" ItemStyle-CssClass="Derecha">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LBAvanceCantidad" OnClick="MuestaModalVentasAvance" Text='<%# Eval("AvanceCantidad", "{0:###,###,##0.00##}") %>' runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Importe $" ItemStyle-Width="7.5%" ItemStyle-CssClass="Derecha">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LBAvanceImporte" OnClick="MuestaModalVentasAvance" Text='<%# Eval("AvanceImporte", "{0:###,###,##0.00##}") %>' runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:BoundField HeaderText="Cantidad" DataField="FaltanteCantidad" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00##}" ItemStyle-Width="7.5%" />
|
||||
<asp:BoundField HeaderText="Importe $" DataField="FaltanteImporte" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00##}" ItemStyle-Width="7.5%" />
|
||||
|
||||
<%-- <asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="7.5%" ItemStyle-CssClass="Derecha">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LBAvanceXFacturarCantidad" OnClick="MuestaModalVentasAvance" Text='<%# Eval("AvanceXFacturarCantidad", "{0:###,###,##0.00##}") %>' runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Importe $" ItemStyle-Width="7.5%" ItemStyle-CssClass="Derecha">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LBAvanceXFacturarImporte" OnClick="MuestaModalVentasAvance" Text='<%# Eval("AvanceXFacturarImporte", "{0:###,###,##0.00##}") %>' runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Importe $" DataField="Anticipos" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00##}" ItemStyle-Width="10%" />--%>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
|
||||
</ajax:TabContainer>
|
||||
|
||||
|
||||
|
||||
<asp:BoundField HeaderText="Cantidad" DataField="ContratoCantidad" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00##}" ItemStyle-Width="7.5%" />
|
||||
<asp:BoundField HeaderText="Importe $" DataField="ContratoImporte" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00##}" ItemStyle-Width="7.5%" />
|
||||
|
||||
<asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="7.5%" ItemStyle-CssClass="Derecha">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LBAvanceCantidad" OnClick="MuestaModalVentasAvance" Text='<%# Eval("AvanceCantidad", "{0:###,###,##0.00##}") %>' runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Importe $" ItemStyle-Width="7.5%" ItemStyle-CssClass="Derecha">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LBAvanceImporte" OnClick="MuestaModalVentasAvance" Text='<%# Eval("AvanceImporte", "{0:###,###,##0.00##}") %>' runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:BoundField HeaderText="Cantidad" DataField="FaltanteCantidad" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00##}" ItemStyle-Width="7.5%" />
|
||||
<asp:BoundField HeaderText="Importe $" DataField="FaltanteImporte" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00##}" ItemStyle-Width="7.5%" />
|
||||
|
||||
<asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="7.5%" ItemStyle-CssClass="Derecha">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LBAvanceXFacturarCantidad" OnClick="MuestaModalVentasAvance" Text='<%# Eval("AvanceXFacturarCantidad", "{0:###,###,##0.00##}") %>' runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Importe $" ItemStyle-Width="7.5%" ItemStyle-CssClass="Derecha">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LBAvanceXFacturarImporte" OnClick="MuestaModalVentasAvance" Text='<%# Eval("AvanceXFacturarImporte", "{0:###,###,##0.00##}") %>' runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Importe $" DataField="Anticipos" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00##}" ItemStyle-Width="10%" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
@@ -454,12 +454,12 @@ Partial Class Contratos_ContratoObra
|
||||
If CveContrato > 0 Then
|
||||
If UsuarioActual.TienePermisoProceso(164) Then
|
||||
BtnEliminar.Visible = True
|
||||
Gv.Columns(11).Visible = True
|
||||
GvInsumos.Columns(9).Visible = True
|
||||
Gv.Columns(9).Visible = True
|
||||
GvInsumos.Columns(8).Visible = True
|
||||
Else
|
||||
BtnEliminar.Visible = False
|
||||
Gv.Columns(11).Visible = False
|
||||
GvInsumos.Columns(9).Visible = False
|
||||
Gv.Columns(9).Visible = False
|
||||
GvInsumos.Columns(8).Visible = False
|
||||
End If
|
||||
|
||||
'If CveTipoContrato.Contiene(11, 25) Then 'ciclo comercial
|
||||
@@ -469,8 +469,8 @@ Partial Class Contratos_ContratoObra
|
||||
|
||||
Else
|
||||
TabPres.Visible = False
|
||||
Gv.Columns(11).Visible = True
|
||||
GvInsumos.Columns(9).Visible = True
|
||||
Gv.Columns(9).Visible = True
|
||||
GvInsumos.Columns(8).Visible = True
|
||||
|
||||
End If
|
||||
|
||||
@@ -993,7 +993,7 @@ Partial Class Contratos_ContratoObra
|
||||
'RowPorcentajeComision.Visible = False
|
||||
RowEstatus.Visible = False
|
||||
'dvAddendum.Visible = False
|
||||
liImprimir.Visible = True
|
||||
'liImprimir.Visible = True
|
||||
CargaPlantillas()
|
||||
'TrContratoPlantilla.Visible = True
|
||||
'DdlPeriodo.SelectedValueExist(ObjContratos.DtResultados.Rows(0)("CvePeriodo"))
|
||||
@@ -1042,7 +1042,7 @@ Partial Class Contratos_ContratoObra
|
||||
'TDObservacion.Visible = True
|
||||
'tdObservaciones.Visible = True
|
||||
TxtObservaciones.Text = ObjContratos.DtResultados.Rows(0)("Observaciones").ToString
|
||||
Gv.Columns(6).Visible = True
|
||||
Gv.Columns(4).Visible = True
|
||||
'DdlPeriodo.SelectedValueExist(ObjContratos.DtResultados.Rows(0)("CvePeriodo").ToString)
|
||||
End If
|
||||
|
||||
@@ -1073,6 +1073,7 @@ Partial Class Contratos_ContratoObra
|
||||
TxtFechaInicial.Text = ObjContratos.FechaInicial.ToShortDateString
|
||||
TxtUbicacion.Text = ObjContratos.Ubicacion
|
||||
TxtResponsable.Text = ObjContratos.Responsable
|
||||
TxtLugar.Text = ObjContratos.Lugar
|
||||
TxtPorAnticipo.Text = ObjContratos.PorAmortizacionAnticipo.FormatoNumero
|
||||
TxtPorAmortizacionAnticipo.Text = ObjContratos.PorAmortizacionAnticipo.FormatoNumero
|
||||
TxtPorGarantia.Text = ObjContratos.PorGarantia.FormatoNumero
|
||||
@@ -1100,8 +1101,8 @@ Partial Class Contratos_ContratoObra
|
||||
If ObjContratos.TipoEstatus = 2 Then
|
||||
DdlEstatus.Enabled = False
|
||||
If UsuarioActual.TienePermisoProceso(173) Then
|
||||
liVigenteContrato.Visible = True
|
||||
LBVigenteContrato.Visible = True
|
||||
'liVigenteContrato.Visible = True
|
||||
'LBVigenteContrato.Visible = True
|
||||
End If
|
||||
Else
|
||||
DdlEstatus.Items.Clear()
|
||||
@@ -1110,17 +1111,17 @@ Partial Class Contratos_ContratoObra
|
||||
DdlEstatus.DataBind()
|
||||
Select Case ObjContratos.TipoEstatus
|
||||
Case 1
|
||||
If UsuarioActual.TienePermisoProceso(173) Then
|
||||
liTerminarContrato.Visible = True
|
||||
LBTerminarContrato.Visible = True
|
||||
|
||||
liCancelarContrato.Visible = True
|
||||
LBCancelarContrato.Visible = True
|
||||
If UsuarioActual.TienePermisoProceso(173) Then
|
||||
' liTerminarContrato.Visible = True
|
||||
'LBTerminarContrato.Visible = True
|
||||
|
||||
' liCancelarContrato.Visible = True
|
||||
'LBCancelarContrato.Visible = True
|
||||
End If
|
||||
Case 2, 3 ' reactivar el contrato
|
||||
If UsuarioActual.TienePermisoProceso(173) Then
|
||||
liVigenteContrato.Visible = True
|
||||
LBVigenteContrato.Visible = True
|
||||
If UsuarioActual.TienePermisoProceso(173) Then
|
||||
' liVigenteContrato.Visible = True
|
||||
' LBVigenteContrato.Visible = True
|
||||
End If
|
||||
End Select
|
||||
|
||||
@@ -1315,7 +1316,7 @@ Partial Class Contratos_ContratoObra
|
||||
TxtTipoCambio.Text.ToDouble, CveSucursalCliente:=DdlSucursalCliente.SelectedValue.ToEntero, CveAlmacenOrigen:=-1, CveAlmacenDestino:=-1,
|
||||
PorcentajeComision:=0, TipoGarantia:=-1, Folio:=0, FechaVenc:=Nothing, EstatusFianza:=1,
|
||||
CvePeriodo:=-1, CveCuentaEquipo:=-1, CveContratoPlantilla:=-1, CveVendedor:=-1,
|
||||
Observaciones:=TxtObservaciones.Text, CveDireccionEnvio:=-1, AplicaImpuestosLocales:=False, CorreoNotificacionPedDev:=TxtCorreoNotificacion.Text.Trim())
|
||||
Observaciones:=TxtObservaciones.Text, CveDireccionEnvio:=-1, AplicaImpuestosLocales:=False, CorreoNotificacionPedDev:=TxtCorreoNotificacion.Text.Trim(), Lugar:=TxtLugar.Text.Trim)
|
||||
|
||||
|
||||
TieneError = Not GuardaFianzas(ObjContratos)
|
||||
@@ -1414,7 +1415,7 @@ Partial Class Contratos_ContratoObra
|
||||
CveAlmacenOrigen:=-1, CveAlmacenDestino:=-1, PorcentajeComision:=0,
|
||||
TipoGarantia:=-1, Folio:=-1, FechaVenc:=Nothing, EstatusFianza:=-1, CveContratoPlantilla:=-1,
|
||||
CveCuentaEquipo:=-1, CveVendedor:=-1, Observaciones:=TxtObservaciones.Text, CveDireccionEnvio:=-1, AplicaImpuestosLocales:=False,
|
||||
CorreoNotificacionPedDev:=TxtCorreoNotificacion.Text.Trim()) Then
|
||||
CorreoNotificacionPedDev:=TxtCorreoNotificacion.Text.Trim(), Lugar:=TxtLugar.Text.Trim) Then
|
||||
|
||||
|
||||
TieneError = Not GuardaFianzas(ObjContratos)
|
||||
@@ -1840,11 +1841,11 @@ Partial Class Contratos_ContratoObra
|
||||
Gv.DataSource = DtTemp
|
||||
DtPresupuestos = DtTemp
|
||||
Gv.DataBind()
|
||||
If CveTipoContrato = 25 Then
|
||||
Gv.Columns(0).Visible = False
|
||||
Gv.Columns(2).Visible = False
|
||||
Gv.Columns(3).Visible = False
|
||||
Gv.Columns(9).Visible = False
|
||||
If CveTipoContrato = 25 Then
|
||||
' Gv.Columns(0).Visible = False
|
||||
Gv.Columns(2).Visible = False
|
||||
' Gv.Columns(3).Visible = False
|
||||
Gv.Columns(7).Visible = False
|
||||
End If
|
||||
'If (Gv.Rows.Count > 0) Then
|
||||
' Gv.UseAccessibleHeader = True
|
||||
@@ -2581,7 +2582,7 @@ Partial Class Contratos_ContratoObra
|
||||
End If
|
||||
|
||||
TabReporteAvance.Visible = True
|
||||
lbImprimirAvance.Visible = True
|
||||
'lbImprimirAvance.Visible = True
|
||||
|
||||
Dim Modalidad = IfNull(Request("Tipo"), 1, 2)
|
||||
|
||||
@@ -2600,16 +2601,32 @@ Partial Class Contratos_ContratoObra
|
||||
Alert("Ocurrió un Error al obtener el Reporte de Avances. Por favor vuelva a intentar", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjContratos.Dispose()
|
||||
'ObjContratos.Dispose()
|
||||
GvDatosAvance.DataBind()
|
||||
|
||||
If (GvDatosAvance.Rows.Count > 0) Then
|
||||
GvDatosAvance.UseAccessibleHeader = True
|
||||
GvDatosAvance.HeaderRow.TableSection = TableRowSection.TableHeader
|
||||
RegistraScript("OrdenarGV();")
|
||||
End If
|
||||
|
||||
UpGral.Update()
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
If ObjContratos.GetReporteContratosAvancesDetalleControl(CveContrato, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
GvDatosAvanceControl.DataSource = ObjContratos.DtResultados
|
||||
Else
|
||||
Alert("Ocurrió un Error al obtener el Reporte de Avances de control. Por favor vuelva a intentar", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
|
||||
GvDatosAvanceControl.DataBind()
|
||||
|
||||
ObjContratos.Dispose()
|
||||
UpGral.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatosAvance_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatosAvance.RowDataBound
|
||||
@@ -2629,6 +2646,27 @@ Partial Class Contratos_ContratoObra
|
||||
e.Row.FCLinkButton("LBAvanceXFacturarCantidad").CommandArgument = Liga2
|
||||
e.Row.FCLinkButton("LBAvanceXFacturarImporte").CommandArgument = Liga2
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub GvDatosAvanceControl_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatosAvanceControl.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.DBCampo("CveClasificacion").ToString.ToEntero = 0 Then
|
||||
e.Row.CssClass = "Totales white"
|
||||
ElseIf e.Row.DBCampo("CvePS").ToString.ToEntero = 0 Then
|
||||
e.Row.CssClass = "SubTotales"
|
||||
End If
|
||||
|
||||
'Dim Liga1 = $"{e.Row.DBCampo("CveClasificacion").ToEntero}|{e.Row.DBCampo("Clasificacion")}|{e.Row.DBCampo("CvePS").ToEntero}|{e.Row.DBCampo("CodigoPS")}|1"
|
||||
'e.Row.FCLinkButton("LBAvanceCantidad").CommandArgument = Liga1
|
||||
'e.Row.FCLinkButton("LBAvanceImporte").CommandArgument = Liga1
|
||||
|
||||
'Dim Liga2 = $"{e.Row.DBCampo("CveClasificacion").ToEntero}|{e.Row.DBCampo("Clasificacion")}|{e.Row.DBCampo("CvePS").ToEntero}|{e.Row.DBCampo("CodigoPS")}|2"
|
||||
'e.Row.FCLinkButton("LBAvanceXFacturarCantidad").CommandArgument = Liga2
|
||||
'e.Row.FCLinkButton("LBAvanceXFacturarImporte").CommandArgument = Liga2
|
||||
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub MuestaModalVentasAvance(sender As Object, e As EventArgs)
|
||||
@@ -2672,9 +2710,9 @@ Partial Class Contratos_ContratoObra
|
||||
GVAvanceXDocumento.DataSource = ObjContratos.DtResultados
|
||||
DtAvanceDocumento = ObjContratos.DtResultados
|
||||
If DtAvanceDocumento.Rows.Count > 0 Then
|
||||
LBImprimir.Visible = True
|
||||
End If
|
||||
LBImprimirInformacionG.Visible = True
|
||||
'LBImprimir.Visible = True
|
||||
End If
|
||||
' LBImprimirInformacionG.Visible = True
|
||||
Else
|
||||
Alert("Ocurrió un error al obtener el Reporte de Avances por Documento. Por favor vuelva a intentar", TipoMensaje.MsgError)
|
||||
End If
|
||||
@@ -2871,7 +2909,7 @@ Partial Class Contratos_ContratoObra
|
||||
|
||||
If GvContratosGastos.Rows.Count > 0 Then
|
||||
GvContratosGastos.HeaderRow.CssClass = "SinColor"
|
||||
LBImprimirGastos.Visible = True
|
||||
'LBImprimirGastos.Visible = True
|
||||
End If
|
||||
|
||||
UpContratoGasto.Update()
|
||||
@@ -2948,12 +2986,12 @@ Partial Class Contratos_ContratoObra
|
||||
|
||||
UpPedidosDevoluciones.Update()
|
||||
End Sub
|
||||
Protected Sub ImgExcelPedDev_Click(sender As Object, e As EventArgs) Handles LbImprimirPedDevExcel.Click
|
||||
GenerarPDFPedDev("Excel")
|
||||
End Sub
|
||||
Protected Sub ImgImprimirPedDev_Click(sender As Object, e As EventArgs) Handles LbImprimirPedDev.Click
|
||||
GenerarPDFPedDev()
|
||||
End Sub
|
||||
'Protected Sub ImgExcelPedDev_Click(sender As Object, e As EventArgs) Handles LbImprimirPedDevExcel.Click
|
||||
' GenerarPDFPedDev("Excel")
|
||||
'End Sub
|
||||
'Protected Sub ImgImprimirPedDev_Click(sender As Object, e As EventArgs) Handles LbImprimirPedDev.Click
|
||||
' GenerarPDFPedDev()
|
||||
'End Sub
|
||||
Private Sub GenerarPDFPedDev(Optional Formato As String = "PDF")
|
||||
If DsDatosPedDev Is Nothing Then
|
||||
Alert("No se pudieron consultar los pedidos y devoluciones", TipoMensaje.MsgAdvertencia)
|
||||
@@ -3202,27 +3240,27 @@ Partial Class Contratos_ContratoObra
|
||||
|
||||
ObjInv.Dispose()
|
||||
|
||||
LnkAjusteAF.Visible = True
|
||||
'LnkAjusteAF.Visible = True
|
||||
DivHajusteAF.Visible = False
|
||||
GvDatosAlmacen.Columns(6).Visible = False
|
||||
|
||||
CargaInventarios()
|
||||
UPHajusteAF.Update()
|
||||
UpHajusteAcciones.Update()
|
||||
|
||||
UPHajusteAF.Update()
|
||||
' UpHajusteAcciones.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub LnkAjusteAF_Click(sender As Object, e As EventArgs)
|
||||
|
||||
LnkAjusteAF.Visible = False
|
||||
Protected Sub LnkAjusteAF_Click(sender As Object, e As EventArgs)
|
||||
|
||||
' LnkAjusteAF.Visible = False
|
||||
DivHajusteAF.Visible = True
|
||||
GvDatosAlmacen.Columns(6).Visible = True
|
||||
|
||||
CargaInventarios()
|
||||
|
||||
UPHajusteAF.Update()
|
||||
UpHajusteAcciones.Update()
|
||||
UPHajusteAF.Update()
|
||||
' UpHajusteAcciones.Update()
|
||||
UpAlmacen.Update()
|
||||
|
||||
End Sub
|
||||
@@ -3425,9 +3463,9 @@ Partial Class Contratos_ContratoObra
|
||||
Response.End()
|
||||
End If
|
||||
End Sub
|
||||
Public Sub LbDescargarExcel_Click(sender As Object, e As EventArgs) Handles LbDescargarExcel.Click
|
||||
DescargarFormato()
|
||||
End Sub
|
||||
'Public Sub LbDescargarExcel_Click(sender As Object, e As EventArgs) Handles LbDescargarExcel.Click
|
||||
' DescargarFormato()
|
||||
'End Sub
|
||||
Private Function ReadExcelFile(ByVal flatFilePath As String, ByVal firstRowHasHeaders As Boolean) As DataTable
|
||||
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
||||
Dim excelFile As ExcelFile = ExcelFile.Load(flatFilePath)
|
||||
@@ -3702,9 +3740,9 @@ Partial Class Contratos_ContratoObra
|
||||
#Region " IMPRESION "
|
||||
|
||||
#Region " IMPRIMIR AVANCE POR DOCUMENTO "
|
||||
Protected Sub ImgImprimir_Click(sender As Object, e As EventArgs) Handles LBImprimir.Click
|
||||
GenerarPDF()
|
||||
End Sub
|
||||
'Protected Sub ImgImprimir_Click(sender As Object, e As EventArgs) Handles LBImprimir.Click
|
||||
' GenerarPDF()
|
||||
'End Sub
|
||||
Private Sub GenerarPDF(Optional Formato As String = "PDF")
|
||||
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
@@ -3730,66 +3768,67 @@ Partial Class Contratos_ContratoObra
|
||||
End If
|
||||
Dim Nombre As String = If(LtlTitulo.Text.Length > 20, LtlTitulo.Text.Substring(0, 20), LtlTitulo.Text)
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepContratoAvanceDocumento.rdlc", dt, params, $"{Nombre}-AvanceDocumento", Formato:=Formato)
|
||||
End Sub
|
||||
Private Sub LBImprimirInformacionG_Click(sender As Object, e As EventArgs) Handles LBImprimirInformacionG.Click
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
Dim dt As DataTable = DtAvanceDocumento
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("Contrato", Titulo))
|
||||
'DATOS DEL CONTRATO
|
||||
params.Add(New ReportParameter("NoContrato", TxtNumeroContrato.Text.Trim))
|
||||
params.Add(New ReportParameter("Descripcion", TxtDescripcionContrato.Text.Trim))
|
||||
params.Add(New ReportParameter("Proveedor", If(TrProveedor.Visible = True, DdlContratista.SelectedItem.Text.Trim, "-")))
|
||||
params.Add(New ReportParameter("Ubicacion", TxtUbicacion.Text.Trim))
|
||||
params.Add(New ReportParameter("Responsable", TxtResponsable.Text.Trim))
|
||||
params.Add(New ReportParameter("Almacen", "-"))
|
||||
params.Add(New ReportParameter("Porcentaje", "-"))
|
||||
'CENTRO DE COSTOS
|
||||
params.Add(New ReportParameter("Proyecto", If(DVddlproyecto.Visible = True, DdlProyecto.SelectedItem.Text.Trim, "-")))
|
||||
params.Add(New ReportParameter("SubProyecto", CveSubProyecto.ToString))
|
||||
params.Add(New ReportParameter("Addendum", ""))
|
||||
'INFORMACION
|
||||
params.Add(New ReportParameter("Cliente", If(TrCliente.Visible = True, DdlCliente.SelectedItem.Text.Trim, "-")))
|
||||
params.Add(New ReportParameter("Sucursal", If(TrClienteSucursal.Visible = True, DdlSucursalCliente.SelectedItem.Text.Trim, "-")))
|
||||
params.Add(New ReportParameter("FechaInicial", TxtFechaInicial.Text.Trim))
|
||||
params.Add(New ReportParameter("FechaFinal", TxtFechaFinal.Text.Trim))
|
||||
params.Add(New ReportParameter("Moneda", DdlMoneda.SelectedItem.Text.Trim))
|
||||
params.Add(New ReportParameter("TipoCambio", If(tipoCambio.Visible = True, TxtTipoCambio.Text.Trim, "-")))
|
||||
params.Add(New ReportParameter("IVA", TxtPorIVA.Text.Trim))
|
||||
params.Add(New ReportParameter("Anticipo", TxtPorAnticipo.Text.Trim))
|
||||
params.Add(New ReportParameter("Amortizacion", TxtPorAmortizacionAnticipo.Text.Trim))
|
||||
params.Add(New ReportParameter("Garantia", TxtPorGarantia.Text.Trim))
|
||||
params.Add(New ReportParameter("Minimo", "-"))
|
||||
params.Add(New ReportParameter("Maximo", "-"))
|
||||
params.Add(New ReportParameter("Total", If(DvTotal.Visible = True, TxtTotal.Text.Trim, "-")))
|
||||
'Estatus
|
||||
params.Add(New ReportParameter("Estatus", DdlEstatus.SelectedItem.Text.Trim))
|
||||
params.Add(New ReportParameter("TipoGarantia", ""))
|
||||
params.Add(New ReportParameter("EstatusFianza", ""))
|
||||
params.Add(New ReportParameter("Folio", "0"))
|
||||
params.Add(New ReportParameter("FechaVencimiento", ""))
|
||||
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
Else
|
||||
params.Add(New ReportParameter("LogoPath", ""))
|
||||
End If
|
||||
ImprimirPDF("Empresas/Grales/Formatos/Contrato.rdlc", dt, params, $"Contrato-{Titulo}", Formato:="PDF")
|
||||
|
||||
End Sub
|
||||
|
||||
'Private Sub LBImprimirInformacionG_Click(sender As Object, e As EventArgs) Handles LBImprimirInformacionG.Click
|
||||
' Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
' Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
' Dim dt As DataTable = DtAvanceDocumento
|
||||
' Dim params As New List(Of ReportParameter)
|
||||
' params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
' params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
' params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
' params.Add(New ReportParameter("Contrato", Titulo))
|
||||
' 'DATOS DEL CONTRATO
|
||||
' params.Add(New ReportParameter("NoContrato", TxtNumeroContrato.Text.Trim))
|
||||
' params.Add(New ReportParameter("Descripcion", TxtDescripcionContrato.Text.Trim))
|
||||
' params.Add(New ReportParameter("Proveedor", If(TrProveedor.Visible = True, DdlContratista.SelectedItem.Text.Trim, "-")))
|
||||
' params.Add(New ReportParameter("Ubicacion", TxtUbicacion.Text.Trim))
|
||||
' params.Add(New ReportParameter("Responsable", TxtResponsable.Text.Trim))
|
||||
' params.Add(New ReportParameter("Almacen", "-"))
|
||||
' params.Add(New ReportParameter("Porcentaje", "-"))
|
||||
' 'CENTRO DE COSTOS
|
||||
' params.Add(New ReportParameter("Proyecto", If(DVddlproyecto.Visible = True, DdlProyecto.SelectedItem.Text.Trim, "-")))
|
||||
' params.Add(New ReportParameter("SubProyecto", CveSubProyecto.ToString))
|
||||
' params.Add(New ReportParameter("Addendum", ""))
|
||||
' 'INFORMACION
|
||||
' params.Add(New ReportParameter("Cliente", If(TrCliente.Visible = True, DdlCliente.SelectedItem.Text.Trim, "-")))
|
||||
' params.Add(New ReportParameter("Sucursal", If(TrClienteSucursal.Visible = True, DdlSucursalCliente.SelectedItem.Text.Trim, "-")))
|
||||
' params.Add(New ReportParameter("FechaInicial", TxtFechaInicial.Text.Trim))
|
||||
' params.Add(New ReportParameter("FechaFinal", TxtFechaFinal.Text.Trim))
|
||||
' params.Add(New ReportParameter("Moneda", DdlMoneda.SelectedItem.Text.Trim))
|
||||
' params.Add(New ReportParameter("TipoCambio", If(tipoCambio.Visible = True, TxtTipoCambio.Text.Trim, "-")))
|
||||
' params.Add(New ReportParameter("IVA", TxtPorIVA.Text.Trim))
|
||||
' params.Add(New ReportParameter("Anticipo", TxtPorAnticipo.Text.Trim))
|
||||
' params.Add(New ReportParameter("Amortizacion", TxtPorAmortizacionAnticipo.Text.Trim))
|
||||
' params.Add(New ReportParameter("Garantia", TxtPorGarantia.Text.Trim))
|
||||
' params.Add(New ReportParameter("Minimo", "-"))
|
||||
' params.Add(New ReportParameter("Maximo", "-"))
|
||||
' params.Add(New ReportParameter("Total", If(DvTotal.Visible = True, TxtTotal.Text.Trim, "-")))
|
||||
' 'Estatus
|
||||
' params.Add(New ReportParameter("Estatus", DdlEstatus.SelectedItem.Text.Trim))
|
||||
' params.Add(New ReportParameter("TipoGarantia", ""))
|
||||
' params.Add(New ReportParameter("EstatusFianza", ""))
|
||||
' params.Add(New ReportParameter("Folio", "0"))
|
||||
' params.Add(New ReportParameter("FechaVencimiento", ""))
|
||||
|
||||
' If Imagen.Exists Then
|
||||
' params.Add(New ReportParameter("LogoPath", logouri))
|
||||
' Else
|
||||
' params.Add(New ReportParameter("LogoPath", ""))
|
||||
' End If
|
||||
' ImprimirPDF("Empresas/Grales/Formatos/Contrato.rdlc", dt, params, $"Contrato-{Titulo}", Formato:="PDF")
|
||||
|
||||
'End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "I M P R E S I O N D E G A S T O S"
|
||||
Protected Sub ImgImprimirGastos_Click(sender As Object, e As EventArgs) Handles LBImprimirGastos.Click
|
||||
GenerarPDFGastos()
|
||||
End Sub
|
||||
'Protected Sub ImgImprimirGastos_Click(sender As Object, e As EventArgs) Handles LBImprimirGastos.Click
|
||||
' GenerarPDFGastos()
|
||||
'End Sub
|
||||
Private Sub GenerarPDFGastos(Optional Formato As String = "PDF")
|
||||
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
@@ -3819,22 +3858,22 @@ Partial Class Contratos_ContratoObra
|
||||
End If
|
||||
Dim Nombre As String = If(LtlTitulo.Text.Length > 20, LtlTitulo.Text.Substring(0, 20), LtlTitulo.Text)
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepContratoGastos.rdlc", dt, params, $"{Nombre}-Gastos", Formato:=Formato)
|
||||
End Sub
|
||||
|
||||
Private Sub LBAgregarGasto_Click(sender As Object, e As EventArgs) Handles LBAgregarGasto.Click
|
||||
TxtDescripcion.Text = ""
|
||||
TxtImporteC.Text = ""
|
||||
TxtFecha.Text = ""
|
||||
UpAgregarGastos.Update()
|
||||
RegistraScript("$('#ModalAgregarGastos').modal();")
|
||||
End Sub
|
||||
|
||||
'Private Sub LBAgregarGasto_Click(sender As Object, e As EventArgs) Handles LBAgregarGasto.Click
|
||||
' TxtDescripcion.Text = ""
|
||||
' TxtImporteC.Text = ""
|
||||
' TxtFecha.Text = ""
|
||||
' UpAgregarGastos.Update()
|
||||
' RegistraScript("$('#ModalAgregarGastos').modal();")
|
||||
'End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "I M P R E S I O N D E S U M I N I S T R O S"
|
||||
Protected Sub ImgImprimirSuministros_Click(sender As Object, e As EventArgs) Handles LbImprimirSuministros.Click
|
||||
GenerarPDFSuministros()
|
||||
End Sub
|
||||
'Protected Sub ImgImprimirSuministros_Click(sender As Object, e As EventArgs) Handles LbImprimirSuministros.Click
|
||||
' GenerarPDFSuministros()
|
||||
'End Sub
|
||||
Private Sub GenerarPDFSuministros(Optional Formato As String = "PDF")
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
@@ -3863,9 +3902,9 @@ Partial Class Contratos_ContratoObra
|
||||
#End Region
|
||||
|
||||
#Region "I M P R E S I O N D E A V A N C E "
|
||||
Private Sub lbImprimirAvance_Click(sender As Object, e As EventArgs) Handles lbImprimirAvance.Click
|
||||
GenerarPDFAvance()
|
||||
End Sub
|
||||
'Private Sub lbImprimirAvance_Click(sender As Object, e As EventArgs) Handles lbImprimirAvance.Click
|
||||
' GenerarPDFAvance()
|
||||
'End Sub
|
||||
Private Sub GenerarPDFAvance(Optional Formato As String = "PDF")
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
@@ -3895,9 +3934,9 @@ Partial Class Contratos_ContratoObra
|
||||
#End Region
|
||||
|
||||
#Region "I M P R E S I O N D E P R E S U P U E S T O "
|
||||
Private Sub lLbImprimirPresupuesto_Click(sender As Object, e As EventArgs) Handles LbImprimirPresupuesto.Click
|
||||
GenerarPDFPPresupuesto()
|
||||
End Sub
|
||||
'Private Sub lLbImprimirPresupuesto_Click(sender As Object, e As EventArgs) Handles LbImprimirPresupuesto.Click
|
||||
' GenerarPDFPPresupuesto()
|
||||
'End Sub
|
||||
Private Sub GenerarPDFPPresupuesto(Optional Formato As String = "PDF")
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
@@ -3927,12 +3966,12 @@ Partial Class Contratos_ContratoObra
|
||||
#End Region
|
||||
|
||||
#Region "I M P R E S I O N D E A C T I V O S F I J O S "
|
||||
Private Sub LbImprmirAF_Click(sender As Object, e As EventArgs) Handles LbImprmirAF.Click
|
||||
GenerarPDFActivosFijos()
|
||||
End Sub
|
||||
Private Sub LbImprmirAFExcel_Click(sender As Object, e As EventArgs) Handles LbImprmirAFExcel.Click
|
||||
GenerarPDFActivosFijos("Excel")
|
||||
End Sub
|
||||
'Private Sub LbImprmirAF_Click(sender As Object, e As EventArgs) Handles LbImprmirAF.Click
|
||||
' GenerarPDFActivosFijos()
|
||||
'End Sub
|
||||
'Private Sub LbImprmirAFExcel_Click(sender As Object, e As EventArgs) Handles LbImprmirAFExcel.Click
|
||||
' GenerarPDFActivosFijos("Excel")
|
||||
'End Sub
|
||||
Private Sub GenerarPDFActivosFijos(Optional Formato As String = "PDF")
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
@@ -4053,13 +4092,13 @@ Partial Class Contratos_ContratoObra
|
||||
ObjGral.Dispose()
|
||||
'DdlPlantillaContrato.DataSource = DtPlantillasContratos
|
||||
'DdlPlantillaContrato.DataBind()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnImprimirC_Click(sender As Object, e As EventArgs) Handles liImprimir.Click
|
||||
' Dim docx As String = DtPlantillasContratos.FiltroPrimeroValor("URL", $"CveContratoPlantilla = {DdlPlantillaContrato.SelectedValue}")
|
||||
' DescarFormato(docx)
|
||||
End Sub
|
||||
|
||||
'Protected Sub BtnImprimirC_Click(sender As Object, e As EventArgs) Handles liImprimir.Click
|
||||
' ' Dim docx As String = DtPlantillasContratos.FiltroPrimeroValor("URL", $"CveContratoPlantilla = {DdlPlantillaContrato.SelectedValue}")
|
||||
' ' DescarFormato(docx)
|
||||
'End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-1">
|
||||
<%-- <div class="col-md-1">
|
||||
Fecha Inicio:
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
@@ -46,9 +46,9 @@
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>--%>
|
||||
|
||||
<%--
|
||||
<div class="col-md-1">
|
||||
Fecha Fin:
|
||||
</div>
|
||||
@@ -65,7 +65,7 @@
|
||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrConsulta"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
<div class="col-md-1">
|
||||
Cliente:
|
||||
@@ -92,6 +92,151 @@
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpGrafica" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-xs-4">
|
||||
<div class="dashboard-stat2 " style="border: 2px solid #DDD; margin-bottom: 0px; height: 141.8px!important">
|
||||
|
||||
<div class="display">
|
||||
|
||||
<div class="number" style="display: none!important">
|
||||
<small>Contratos</small>
|
||||
<h3 class="font-purple-soft">
|
||||
<span>
|
||||
<asp:Literal Text="0" ID="LtlGrafNumeroContratos" runat="server" /></span>
|
||||
</h3>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="number">
|
||||
<small>Total</small>
|
||||
<h3 class="font-purple-soft">
|
||||
<span>$<asp:Literal Text="0" ID="LtlGrafTotal" runat="server" /></span>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="icon">
|
||||
<i class="fa fa-list-ol"></i>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-xs-4">
|
||||
<div class="dashboard-stat2 " style="border: 2px solid #DDD; margin-bottom: 0px;">
|
||||
<div class="display">
|
||||
|
||||
<div class="number" style="width:80%!important">
|
||||
|
||||
<table style="width:100%!important">
|
||||
<td>
|
||||
<small>Avance</small>
|
||||
<h3 class="font-green-sharp">
|
||||
<span>
|
||||
<asp:Literal Text="0" ID="LtlAvanceImporte" runat="server" />
|
||||
</span>
|
||||
<small class="font-green-sharp"></small>
|
||||
</h3>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<small>Porcentaje</small>
|
||||
<h3 class="font-green-sharp">
|
||||
<span>
|
||||
<asp:Literal Text="0" ID="LtlAvanceImporteProcentaje1" runat="server" />
|
||||
</span>
|
||||
<small class="font-green-sharp"></small>
|
||||
</h3>
|
||||
|
||||
</td>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="icon">
|
||||
<i class="icon-pie-chart"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress-info">
|
||||
|
||||
<div class="progress">
|
||||
<span runat="server" id="SPAvance1" style="width: 76%;" class="progress-bar progress-bar-success green-sharp">
|
||||
<%--<span runat="server" id="SPAvance2" class="sr-only">76% Avance</span>--%>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="status">
|
||||
<div class="status-title">Avance </div>
|
||||
<div class="status-number"> <asp:Literal Text="0" ID="LtlAvanceImporteProcentaje2" runat="server" /> </div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-4">
|
||||
<div class="dashboard-stat2 " style="border: 2px solid #DDD; margin-bottom: 0px;">
|
||||
<div class="display">
|
||||
|
||||
<div class="number" style="width:80%!important">
|
||||
|
||||
<table style="width:100%!important">
|
||||
<td>
|
||||
<small>Faltante</small>
|
||||
<h3 class="font-red-haze">
|
||||
<span>
|
||||
<asp:Literal Text="0" ID="LtlFaltanteImporte" runat="server" />
|
||||
</span>
|
||||
<small class="font-red-haze"></small>
|
||||
</h3>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<small>Porcentaje</small>
|
||||
<h3 class="font-red-haze">
|
||||
<span>
|
||||
<asp:Literal Text="0" ID="LtlFaltanteImportePorcentaje1" runat="server" />
|
||||
</span>
|
||||
<small class="font-red-haze"></small>
|
||||
</h3>
|
||||
|
||||
</td>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="icon">
|
||||
<i class="icon-pie-chart"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress-info">
|
||||
<div class="progress">
|
||||
<span runat="server" id="SPFaltante" style="width: 76%;" class="progress-bar progress-bar-success red-haze">
|
||||
<%--<span class="sr-only">76% Avance</span>--%>
|
||||
</span>
|
||||
</div>
|
||||
<div class="status">
|
||||
<div class="status-title">Faltante </div>
|
||||
<div class="status-number"><asp:Literal Text="0" ID="LtlFaltanteImportePorcentaje2" runat="server" /> </div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
@@ -116,45 +261,91 @@
|
||||
DataKeyNames="CveContrato,NumeroContrato" ShowHeader="True"
|
||||
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Fecha I.">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LitEst" runat="server" Text='<%# Eval("FechaInicial", "{0:dd/MM/yyyy}")%>' ></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Center"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cliente">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplCliente" CssClass="Texto" runat="server" Text='<%# Eval("Nombre") %>' NavigateUrl='<%# Eval("CveCliente", "../Ventas/Clientes.aspx?CveCliente={0}")%>' Target="_blank" ></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="# Contrato">
|
||||
|
||||
<asp:TemplateField HeaderText="# Contrato">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplContratado" CssClass="Texto" runat="server" Text='<%# Eval("NumeroContrato")%>' Target="_blank" ></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Cliente">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplCliente" CssClass="Texto" runat="server" Text='<%# Eval("Nombre") %>' NavigateUrl='<%# Eval("CveCliente", "../Ventas/Clientes.aspx?CveCliente={0}")%>' Target="_blank" ></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Descripción">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblDescripcion" CssClass="Texto" runat="server" Text='<%# Eval("DescripcionContrato")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Fecha I.">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblFechaInicial" runat="server" Text='<%# Eval("FechaInicial", "{0:dd/MM/yyyy}")%>' ></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Center"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Fecha F.">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblFechaFinal" runat="server" Text='<%# Eval("FechaFinal", "{0:dd/MM/yyyy}")%>' ></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Center"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Proyecto">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblProyecto" CssClass="Texto" runat="server" Text='<%# Eval("Proyecto")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Importe">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblImporte" CssClass="Texto" runat="server" Text='<%# Eval("Importe", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Avance $">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblAvanceImporte" CssClass="Texto" runat="server" Text='<%# Eval("AvanceImporte", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Faltante $">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblFaltanteImporte" CssClass="Texto" runat="server" Text='<%# Eval("FaltanteImporte", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Avance %" >
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblIAvancePorcentaje" runat="server" Text='<%# Eval("AvancePorcentaje", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Avance $">
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Faltante %" >
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="HplOFA" CssClass="Texto" runat="server" Text='<%# Eval("AvanceImporte", "{0:N2}")%>'></asp:Label>
|
||||
<asp:Label ID="LblFaltantePorcentaje" runat="server" Text='<%# Eval("FaltantePorcentaje", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
|
||||
@@ -11,7 +11,7 @@ Partial Class RepContratosObraAvances
|
||||
|
||||
CargaClientes()
|
||||
CargaContratos()
|
||||
'CargaDatos()
|
||||
CargaDatos()
|
||||
|
||||
End If
|
||||
End Sub
|
||||
@@ -20,9 +20,11 @@ Partial Class RepContratosObraAvances
|
||||
Private Sub CargaDatos()
|
||||
|
||||
Dim Con As New ClsContratos
|
||||
Dim DTDatos As New DataTable
|
||||
|
||||
If Con.GetContratosObraRepAvances(txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, DdlCliente.SelectedValue.ToEntero, DdlContrato.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
If Con.GetContratosObraRepAvances(MinFecha, MaxFecha, DdlCliente.SelectedValue.ToEntero, DdlContrato.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
GVDatos.DataSource = Con.DtResultados
|
||||
DTDatos = Con.DtResultados
|
||||
Else
|
||||
GVDatos.DataSource = Nothing
|
||||
End If
|
||||
@@ -30,8 +32,47 @@ Partial Class RepContratosObraAvances
|
||||
Con.Dispose()
|
||||
|
||||
GVDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
|
||||
UpDatos.Update()
|
||||
|
||||
|
||||
If DTDatos.Rows.Count > 0 Then
|
||||
Indicadores(DTDatos)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub Indicadores(DTDatos As DataTable)
|
||||
|
||||
Dim NumeroContratos As Integer = DTDatos.Rows.Count
|
||||
|
||||
Dim TotalContratos As Decimal = DTDatos.SUM("Importe")
|
||||
Dim TotalAvance As Decimal = DTDatos.SUM("AvanceImporte")
|
||||
Dim TotalFaltante As Decimal = TotalContratos - TotalAvance
|
||||
|
||||
|
||||
Dim TotalAvancePorcentaje As Decimal = (TotalAvance * 100) / TotalContratos
|
||||
Dim TotalFaltantePorcentaje As Decimal = 100 - TotalAvancePorcentaje
|
||||
|
||||
|
||||
LtlGrafNumeroContratos.Text = NumeroContratos.ToString
|
||||
LtlGrafTotal.Text = TotalContratos.ToString("###,###,###.00")
|
||||
|
||||
|
||||
LtlAvanceImporte.Text = $"$ {TotalAvance.ToString("###,###,###.00")}"
|
||||
LtlAvanceImporteProcentaje1.Text = $"{TotalAvancePorcentaje.ToString("###.00")} %"
|
||||
LtlAvanceImporteProcentaje2.Text = $"{TotalAvancePorcentaje.ToString("###.00")}%"
|
||||
SPAvance1.Attributes.Add("style", $"width:{TotalAvancePorcentaje.ToString.ToEntero}%")
|
||||
|
||||
|
||||
LtlFaltanteImporte.Text = $"$ {TotalFaltante.ToString("###,###,###.00")}"
|
||||
LtlFaltanteImportePorcentaje1.Text = $"{TotalFaltantePorcentaje.ToString("###.00")} %"
|
||||
LtlFaltanteImportePorcentaje2.Text = $"{TotalFaltantePorcentaje.ToString("###.00")}%"
|
||||
SPFaltante.Attributes.Add("style", $"width:{TotalFaltantePorcentaje.ToString.ToEntero}%")
|
||||
|
||||
UpGrafica.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
#Region "C O M B O S"
|
||||
|
||||
@@ -8,89 +8,159 @@
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Reporte Contratos Avance Detalle
|
||||
<asp:Label runat="server" ID="LblNumeroContrato"></asp:Label>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<%-- <asp:UpdatePanel ID="UpFiltros" runat="server" UpdateMode="Conditional">
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpGrafica" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<div class="portlet solid grey-cascade portlet-filter" style="">
|
||||
<div class="portlet-title portlet-filterT smalltitle" >
|
||||
<div class="row">
|
||||
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" CausesValidation="true" ValidationGroup="GrConsulta" />
|
||||
</div>
|
||||
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-1">
|
||||
Fecha Inicio:
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrConsulta"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrConsulta"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<div class="col-xs-4">
|
||||
<div class="dashboard-stat2 " style="border: 2px solid #DDD; margin-bottom: 0px; height: 141.8px!important">
|
||||
|
||||
<div class="display">
|
||||
|
||||
</div>
|
||||
<div class="number" style="display: none!important">
|
||||
<small>Numero Estimaciones</small>
|
||||
<h3 class="font-purple-soft">
|
||||
<span>
|
||||
<asp:Literal Text="0" ID="LtlGrafNumeroEstimaciones2" runat="server" /></span>
|
||||
</h3>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="number">
|
||||
<small>Numero Estimaciones</small>
|
||||
<h3 class="font-purple-soft">
|
||||
<span><asp:Literal Text="0" ID="LtlGrafNumeroEstimaciones" runat="server" /></span>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="icon">
|
||||
<i class="fa fa-list-ol"></i>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-1">
|
||||
Fecha Fin:
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
<div class="col-xs-4">
|
||||
<div class="dashboard-stat2 " style="border: 2px solid #DDD; margin-bottom: 0px;">
|
||||
<div class="display">
|
||||
|
||||
<div class="number" style="width:80%!important">
|
||||
|
||||
<table style="width:100%!important">
|
||||
<td>
|
||||
<small>Avance</small>
|
||||
<h3 class="font-green-sharp">
|
||||
<span>
|
||||
<asp:Literal Text="0" ID="LtlAvanceImporte" runat="server" />
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrConsulta"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrConsulta"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<small class="font-green-sharp"></small>
|
||||
</h3>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<small>Porcentaje</small>
|
||||
<h3 class="font-green-sharp">
|
||||
<span>
|
||||
<asp:Literal Text="0" ID="LtlAvanceImporteProcentaje1" runat="server" />
|
||||
</span>
|
||||
<small class="font-green-sharp"></small>
|
||||
</h3>
|
||||
|
||||
</td>
|
||||
</table>
|
||||
|
||||
<div class="col-md-1">
|
||||
Cliente:
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlCliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" Class="select2me" Width="100PX" ></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="icon">
|
||||
<i class="icon-pie-chart"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress-info">
|
||||
|
||||
<div class="progress">
|
||||
<span runat="server" id="SPAvance1" style="width: 76%;" class="progress-bar progress-bar-success green-sharp">
|
||||
<%--<span runat="server" id="SPAvance2" class="sr-only">76% Avance</span>--%>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="status">
|
||||
<div class="status-title">Avance </div>
|
||||
<div class="status-number"> <asp:Literal Text="0" ID="LtlAvanceImporteProcentaje2" runat="server" /> </div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
Contrato:
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlContrato" runat="server" DataTextField="NumeroContrato" DataValueField="CveContrato" Class="select2me" Width="100PX" ></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-xs-4">
|
||||
<div class="dashboard-stat2 " style="border: 2px solid #DDD; margin-bottom: 0px;height: 141.8px!important;">
|
||||
<div class="display">
|
||||
|
||||
<div class="number" style="width:80%!important">
|
||||
|
||||
<table style="width:100%!important">
|
||||
<td>
|
||||
<small>Fecha Fin</small>
|
||||
<h3 class="font-red-haze">
|
||||
<span>
|
||||
<asp:Literal Text="0" ID="LtlFechaFin" runat="server" />
|
||||
</span>
|
||||
<small class="font-red-haze"></small>
|
||||
</h3>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<small>Dias Restantes</small>
|
||||
<h3 class="font-red-haze">
|
||||
<span>
|
||||
<asp:Literal Text="0" ID="LtlDiasRestantes" runat="server" />
|
||||
</span>
|
||||
<small class="font-red-haze"></small>
|
||||
</h3>
|
||||
|
||||
</td>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="icon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%-- <div class="progress-info">
|
||||
<div class="progress">
|
||||
<span runat="server" id="SPFaltante" style="width: 76%;" class="progress-bar progress-bar-success red-haze">
|
||||
<span class="sr-only">76% Avance</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="status">
|
||||
<div class="status-title">Días </div>
|
||||
<div class="status-number"><asp:Literal Text="" ID="LtlFaltanteImportePorcentaje2" runat="server" /> </div>
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>--%>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
@@ -99,11 +169,11 @@
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-3" style="text-align:left!important">
|
||||
<strong><asp:Label runat="server" ID="LblNumeroContrato"></asp:Label></strong>
|
||||
<div class="col-md-6" style="text-align:left!important">
|
||||
<strong></strong>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3" style="text-align:right!important">
|
||||
<div class="col-md-6" style="text-align:right!important">
|
||||
<div style="display: inline-block">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px; height: 25px; border-color: #89C4F4;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
@@ -115,7 +185,7 @@
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-12">
|
||||
|
||||
<asp:GridView ID="GVDatos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron contratos con los Filtros seleccionados"
|
||||
DataKeyNames="CveEstimacion,NumeroEstimacion,FechaEstimacion,NumeroContrato" ShowHeader="True"
|
||||
|
||||
@@ -8,7 +8,6 @@ Partial Class RepContratosObraAvancesDetalle
|
||||
|
||||
|
||||
Property CveContrato As Integer
|
||||
|
||||
Get
|
||||
If ViewState("CveContrato") Is Nothing Then
|
||||
Return -1
|
||||
@@ -18,17 +17,30 @@ Partial Class RepContratosObraAvancesDetalle
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveContrato") = value
|
||||
End Set
|
||||
|
||||
|
||||
End Property
|
||||
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property NumeroContrato As String
|
||||
Get
|
||||
If ViewState("NumeroContrato") Is Nothing Then
|
||||
Return ""
|
||||
Else
|
||||
Return ViewState("NumeroContrato").ToString
|
||||
End If
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("NumeroContrato") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
CveContrato = If(Request("CveContrato") IsNot Nothing AndAlso Request("CveContrato").ToString.ToEntero > 0, Request("CveContrato").ToString.ToEntero, -1)
|
||||
LblNumeroContrato.Text = If(Request("NumeroContrato") IsNot Nothing AndAlso Request("NumeroContrato").ToString.Length > 0, $"Numero Contrato: {Request("NumeroContrato").ToString}", "")
|
||||
NumeroContrato = If(Request("NumeroContrato") IsNot Nothing AndAlso Request("NumeroContrato").ToString.Length > 0, $"{Request("NumeroContrato").ToString}", "")
|
||||
LblNumeroContrato.Text = If(Request("NumeroContrato") IsNot Nothing AndAlso Request("NumeroContrato").ToString.Length > 0, $"Estimaciones del Contrato: {Request("NumeroContrato").ToString}", "")
|
||||
|
||||
If CveContrato > 0 Then
|
||||
CargaDatos()
|
||||
@@ -40,54 +52,72 @@ Partial Class RepContratosObraAvancesDetalle
|
||||
Private Sub CargaDatos()
|
||||
|
||||
Dim Con As New ClsContratos
|
||||
|
||||
Dim DTDatos As DataTable = New DataTable
|
||||
Dim DTContrato As DataTable = New DataTable
|
||||
|
||||
If Con.GetContratosObraRepAvancesDetalle(CveContrato, UsuarioActual.CveEmpresa) Then
|
||||
GVDatos.DataSource = Con.DtResultados
|
||||
|
||||
DTDatos = Con.DtResultados
|
||||
If Con.DtResultados.Rows.Count = 0 Then
|
||||
Alert("No se encontraron estimaciones.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
Else
|
||||
GVDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
If Con.GetContratosObraRepAvances(MinFecha, MaxFecha, -1, CveContrato, UsuarioActual.CveEmpresa) Then
|
||||
DTContrato = Con.DtResultados
|
||||
If DTContrato.Rows.Count > 0 Then
|
||||
Indicadores(DTContrato, DTDatos.Rows.Count)
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Con.Dispose()
|
||||
|
||||
GVDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
|
||||
UpDatos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
'#Region "C O M B O S"
|
||||
Private Sub Indicadores(DTDatos As DataTable, NumeroEstimaciones As Integer)
|
||||
|
||||
LtlGrafNumeroEstimaciones.Text = NumeroEstimaciones
|
||||
|
||||
|
||||
' Private Sub CargaContratos()
|
||||
' DdlContrato.DataSource = GlobalDTContratos.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveContratoTipo IN(30,31) ")
|
||||
' DdlContrato.DataBind()
|
||||
' DdlContrato.Items.Insert(0, New System.Web.UI.WebControls.ListItem("Todos", "-1"))
|
||||
' End Sub
|
||||
Dim AvanceImporte As Decimal = DTDatos(0)("AvanceImporte").ToString.ToDecimal
|
||||
Dim TotalContratos As Decimal = DTDatos(0)("Importe").ToString.ToDecimal
|
||||
Dim TotalAvancePorcentaje As Decimal = (AvanceImporte * 100) / TotalContratos
|
||||
Dim TotalFaltantePorcentaje As Decimal = 100 - TotalAvancePorcentaje
|
||||
|
||||
Dim FechaFinal As Date = DTDatos(0)("FechaFinal").ToString.ToDate
|
||||
Dim Dias As Integer = (FechaFinal - Now).Days
|
||||
|
||||
Dias = If(Dias < 0, 0, Dias)
|
||||
|
||||
LtlAvanceImporte.Text = $"$ {AvanceImporte.ToString("###,###,###.00")}"
|
||||
|
||||
LtlAvanceImporteProcentaje1.Text = $"{TotalAvancePorcentaje.ToString("###.00")} %"
|
||||
LtlAvanceImporteProcentaje2.Text = $"{TotalAvancePorcentaje.ToString("###.00")}%"
|
||||
SPAvance1.Attributes.Add("style", $"width:{TotalAvancePorcentaje.ToString.ToEntero}%")
|
||||
|
||||
LtlFechaFin.Text = FechaFinal.ToString("dd/MM/yyyy")
|
||||
LtlDiasRestantes.Text = Dias.ToString("###,###")
|
||||
|
||||
UpGrafica.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
' Private Sub CargaClientes()
|
||||
' Dim dt As DataTable = Nothing
|
||||
' Dim Cli As New ClsClientes
|
||||
' If Cli.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||
' dt = Cli.DtResultados
|
||||
' End If
|
||||
' Cli.Dispose()
|
||||
' DdlCliente.DataSource = dt
|
||||
' DdlCliente.DataBind()
|
||||
' DdlCliente.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
' End Sub
|
||||
|
||||
'#End Region
|
||||
|
||||
Protected Sub GV_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GVDatos.RowDataBound
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
Dim HplNumeroEstimacion As HyperLink = e.Row.FCHyperLink("HplNumeroEstimacion")
|
||||
HplNumeroEstimacion.NavigateUrl = $"./RepContratosObraAvancesPartida.aspx?CveEstimacion={e.Row.DataKey("CveEstimacion")}&NumeroEstimacion={ e.Row.DataKey("NumeroEstimacion")}&CveContrato={ CveContrato }"
|
||||
HplNumeroEstimacion.NavigateUrl = $"./RepContratosObraAvancesPartida.aspx?CveEstimacion={e.Row.DataKey("CveEstimacion")}&NumeroEstimacion={ e.Row.DataKey("NumeroEstimacion")}&CveContrato={ CveContrato }&NumeroContrato={NumeroContrato}"
|
||||
|
||||
Dim LnkAnexo As LinkButton = e.Row.FCLinkButton("LnkAnexo")
|
||||
|
||||
@@ -97,9 +127,6 @@ Partial Class RepContratosObraAvancesDetalle
|
||||
|
||||
End Sub
|
||||
|
||||
'Protected Sub CmdConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
|
||||
' CargaDatos()
|
||||
'End Sub
|
||||
|
||||
|
||||
Protected Sub LnkAnexo_Click(sender As Object, e As EventArgs)
|
||||
@@ -130,18 +157,23 @@ Partial Class RepContratosObraAvancesDetalle
|
||||
|
||||
Dim DtControl As New DataTable
|
||||
Dim ObjContratos As New ClsContratos
|
||||
|
||||
|
||||
Dim Lugar As String = ""
|
||||
Dim DescripcionContrato As String = ""
|
||||
|
||||
|
||||
If ObjContratos.GetContratosObraAvancesControlAcumulativo(CveContrato, CveEstimacion, UsuarioActual.CveEmpresa) Then
|
||||
DtControl = ObjContratos.DtResultados
|
||||
|
||||
|
||||
If DtControl.Rows.Count > 0 Then
|
||||
Lugar = DtControl(0)("Lugar").ToString
|
||||
DescripcionContrato = DtControl(0)("DescripcionContrato").ToString
|
||||
End If
|
||||
End If
|
||||
ObjContratos.Dispose()
|
||||
|
||||
If DtControl.Rows.Count > 0 Then
|
||||
|
||||
|
||||
Dim WBAnexo = New ClosedXML.Excel.XLWorkbook(PlantillaAnexo)
|
||||
|
||||
Dim WBAnexoSalvar = New ClosedXML.Excel.XLWorkbook
|
||||
@@ -158,10 +190,16 @@ Partial Class RepContratosObraAvancesDetalle
|
||||
|
||||
WSControl.Cell(20, 6).Value = NumeroContrato
|
||||
|
||||
WSControl.Cell(18, 2).Value = "" 'Lugar
|
||||
WSControl.Cell(18, 2).Value = Lugar
|
||||
WSControl.Cell(18, 2).Style.Alignment.SetHorizontal(XLAlignmentHorizontalValues.Left)
|
||||
WSControl.Cell(18, 2).Style.Alignment.SetVertical(XLAlignmentVerticalValues.Top)
|
||||
|
||||
WSControl.Cell(17, 6).Value = "" 'Periodo Fecha Inicial
|
||||
WSControl.Cell(17, 7).Value = "" 'Periuodo Fecha Final
|
||||
WSControl.Cell(20, 2).Value = "" 'Obra
|
||||
WSControl.Cell(20, 2).Value = DescripcionContrato
|
||||
WSControl.Cell(20, 2).Style.Alignment.SetHorizontal(XLAlignmentHorizontalValues.Left)
|
||||
WSControl.Cell(20, 2).Style.Alignment.SetVertical(XLAlignmentVerticalValues.Top)
|
||||
|
||||
WSControl.Cell(22, 7).Value = "" 'Presupuesto segun contrato
|
||||
WSControl.Cell(19, 5).Value = "" 'Contrtatista
|
||||
|
||||
@@ -310,9 +348,7 @@ Partial Class RepContratosObraAvancesDetalle
|
||||
WSDetalle.Cell(4, 10).Value = "" 'Fecha a
|
||||
WSDetalle.Cell(4, 11).Value = NumeroEstimacion
|
||||
|
||||
'WSDetalle.Picture("Logo").Name = $"Logo{Drow("CveContratoDetalle").ToString}"
|
||||
'WSDetalle.Picture("Firma").Name = $"Firma{Drow("CveContratoDetalle").ToString}"
|
||||
|
||||
WSDetalle.Cell(6, 6).Value = DescripcionContrato
|
||||
|
||||
WSDetalle.Cell(14, 2).Value = Drow("Codigo").ToString
|
||||
WSDetalle.Cell(14, 3).Value = Drow("PS").ToString
|
||||
@@ -353,7 +389,7 @@ Partial Class RepContratosObraAvancesDetalle
|
||||
|
||||
Dim ImgWidth As Double = Imagen.Height
|
||||
|
||||
Dim nRowmas As Integer = ImgWidth / RowH
|
||||
Dim nRowmas As Integer = (ImgWidth / RowH).ToEntero
|
||||
|
||||
CurrectRowImg = CurrectRowImg + nRowmas
|
||||
|
||||
@@ -396,13 +432,5 @@ Partial Class RepContratosObraAvancesDetalle
|
||||
|
||||
End Sub
|
||||
|
||||
'Public Function GetStream(excelWorkbook As ClosedXML.Excel.XLWorkbook) As Stream
|
||||
|
||||
' Dim fs = New MemoryStream()
|
||||
' excelWorkbook.SaveAs(fs)
|
||||
' fs.Position = 0
|
||||
' Return fs
|
||||
|
||||
'End Function
|
||||
|
||||
End Class
|
||||
@@ -8,45 +8,14 @@
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Reporte Contratos Avance por partida
|
||||
<asp:Label runat="server" ID="LblEstimacion"></asp:Label>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
<%-- <asp:UpdatePanel ID="UpFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Panel ID="PnlFiltros" runat="server" DefaultButton="CmdConsultar">
|
||||
<div class="portlet solid grey-cascade portlet-filter" style="">
|
||||
<div class="portlet-title portlet-filterT" style="">
|
||||
<div class="titlefiltros caption ">
|
||||
<ul class="list-inline" id="TrProgramar" runat="server">
|
||||
<li>Cliente:
|
||||
<asp:DropDownList ID="DdlCliente" runat="server" AutoPostBack="true" DataTextField="NombreComercial" DataValueField="CveCliente" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 250px !important;"></asp:DropDownList>
|
||||
</li>
|
||||
<li>Contratos:
|
||||
<asp:DropDownList ID="DdlContrato" runat="server" AutoPostBack="true" DataTextField="NumeroContrato" DataValueField="CveContrato" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;"></asp:DropDownList>
|
||||
</li>
|
||||
<li style="display: none;">Sección:
|
||||
<asp:DropDownList ID="DdlSeccion" runat="server" AutoPostBack="false" DataTextField="Seccion" DataValueField="CveSeccion" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;"></asp:DropDownList>
|
||||
</li>
|
||||
<li>Partida:
|
||||
<asp:DropDownList ID="DdlClasificacion" runat="server" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 90px !important;"></asp:DropDownList>
|
||||
</li>
|
||||
<li>Productos y Servicios:
|
||||
<asp:DropDownList ID="DdlPS" runat="server" AutoPostBack="true" DataTextField="PS" DataValueField="CvePS" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 150px !important;"></asp:DropDownList>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<asp:Button ID="CmdConsultar" runat="server" Text="Consultar" class="btn btn-primary" CausesValidation="true" ValidationGroup="GrConsulta" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>--%>
|
||||
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
@@ -56,7 +25,7 @@
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-3" style="text-align:left!important">
|
||||
<strong> <asp:Label runat="server" ID="LblEstimacion"></asp:Label></strong>
|
||||
<strong> </strong>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3" style="text-align:right!important">
|
||||
|
||||
@@ -25,7 +25,6 @@ Partial Class RepContratosObraAvancesPartida
|
||||
|
||||
|
||||
Property CveContrato As Integer
|
||||
|
||||
Get
|
||||
If ViewState("CveContrato") Is Nothing Then
|
||||
Return -1
|
||||
@@ -36,8 +35,20 @@ Partial Class RepContratosObraAvancesPartida
|
||||
Set(value As Integer)
|
||||
ViewState("CveContrato") = value
|
||||
End Set
|
||||
|
||||
|
||||
End Property
|
||||
|
||||
|
||||
Property NumeroContrato As String
|
||||
Get
|
||||
If ViewState("NumeroContrato") Is Nothing Then
|
||||
Return ""
|
||||
Else
|
||||
Return ViewState("NumeroContrato").ToString
|
||||
End If
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("NumeroContrato") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
@@ -46,8 +57,9 @@ Partial Class RepContratosObraAvancesPartida
|
||||
|
||||
CveEstimacion = If(Request("CveEstimacion") IsNot Nothing AndAlso Request("CveEstimacion").ToString.ToEntero > 0, Request("CveEstimacion").ToString.ToEntero, -1)
|
||||
CveContrato = If(Request("CveContrato") IsNot Nothing AndAlso Request("CveContrato").ToString.ToEntero > 0, Request("CveContrato").ToString.ToEntero, -1)
|
||||
NumeroContrato = If(Request("NumeroContrato") IsNot Nothing AndAlso Request("NumeroContrato").ToString.Length > 0, $"{Request("NumeroContrato").ToString}", "")
|
||||
|
||||
LblEstimacion.Text = If(Request("NumeroEstimacion") IsNot Nothing AndAlso Request("NumeroEstimacion").ToString.Length > 0, $"Numero Estimacion: {Request("NumeroEstimacion").ToString}", "")
|
||||
LblEstimacion.Text = If(Request("NumeroEstimacion") IsNot Nothing AndAlso Request("NumeroEstimacion").ToString.Length > 0, $"Contgrato { NumeroContrato } Estimacion {Request("NumeroEstimacion").ToString}", "")
|
||||
|
||||
|
||||
If CveEstimacion > 0 Then
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -34,13 +34,16 @@
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<li>
|
||||
<asp:UpdatePanel runat="server" UpdateMode="conditional">
|
||||
<ContentTemplate>
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnTerminarTrayeto" OnClick="BtnTerminarTrayeto_Click"><i class="fa fa-map-marker"></i>Terminar Trayecto</asp:LinkButton>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</li>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkAgregar" OnClick="LnkAgregar_Click" runat="server"><i class="fa fa-plus"></i>Agregar Gasto</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
@@ -488,6 +491,62 @@
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabContainer>
|
||||
<div id="DModal" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModal" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="ltlMotititulo" Text="Modelo" runat="server"> </asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtCantidad" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFCCantidad" runat="server" ControlToValidate="TxtCantidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor seleccione uno." ValidationGroup="VgmGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECantidad" runat="server" HighlightCssClass="vco" TargetControlID="RFCCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<label for="<%= TxtCantidad.ClientID.ToString()%>">Cantidad:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtPrecio" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVPrecio" runat="server" ControlToValidate="TxtPrecio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Precio''</b> es necesario, por favor seleccione uno." ValidationGroup="VgmGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEPrecio" runat="server" HighlightCssClass="vco" TargetControlID="RFVPrecio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<label for="<%= TxtPrecio.ClientID.ToString()%>">Precio:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtDescripcion" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVModelo" runat="server" ControlToValidate="TxtDescripcion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripción''</b> es necesario, por favor seleccione uno." ValidationGroup="VgmGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOModelo" runat="server" HighlightCssClass="vco" TargetControlID="RFVModelo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<label for="<%= TxtDescripcion.ClientID.ToString()%>">Descripción:</label>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtObs" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<label for="<%= TxtObs.ClientID.ToString()%>">Observaciones:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row v-center">
|
||||
<label class="col-md-12" style="color: gray">Fecha:</label>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy hh:mm">
|
||||
<asp:TextBox ID="TxtFecha" runat="server" CssClass="form-control input-sm ADDateTimePicker" CausesValidation="true" MaxLength="18" Width="132px "></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVFecha" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> es necesario, por favor seleccione uno." ValidationGroup="VgmGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEI" runat="server" HighlightCssClass="vco" TargetControlID="RFVFecha" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnGuardar" OnClick="BtnGuardar_Click" runat="server" Text="Agregar" CssClass="btn btn-primary" ValidationGroup="VgmGuardar" />
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script type="text/javascript">
|
||||
|
||||
@@ -226,4 +226,34 @@ Partial Class GPS_TrayectoDetalle
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub LimpiaModal()
|
||||
TxtCantidad.Text = ""
|
||||
TxtPrecio.Text = ""
|
||||
TxtDescripcion.Text = ""
|
||||
TxtObs.Text = ""
|
||||
TxtFecha.Text = ""
|
||||
End Sub
|
||||
Protected Sub LnkAgregar_Click(sender As Object, e As EventArgs)
|
||||
LimpiaModal()
|
||||
'Modalidad = "A"
|
||||
BtnGuardar.Text = "Agregar"
|
||||
ltlMotititulo.Text = "Agregar Gasto"
|
||||
|
||||
UpModal.Update()
|
||||
RegistraScript("$('#DModal').modal()")
|
||||
End Sub
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
|
||||
Dim ObjPS As New ClsGPS
|
||||
'If Modalidad = "A" Then
|
||||
|
||||
'ElseIf Modalidad = "U" Then
|
||||
' If ObjPS.UpdateGasto(CveGPSGasto, TxtCantidad.Text.ToDecimal(), TxtPrecio.Text.Trim().ToDecimal(), TxtDescripcion.Text.Trim(), TxtObs.Text.Trim(), TxtFecha.Text.ToDateTime(), UsuarioActual.CveUsuario) Then
|
||||
' RegistraScript("$('#DModal').modal('hide')")
|
||||
' Alert("El Gasto se agregó correctamente.", TipoMensaje.MsgInformacion)
|
||||
' End If
|
||||
'End If
|
||||
If ObjPS.AddGasto(TxtCantidad.Text.ToDecimal(), TxtPrecio.Text.Trim().ToDecimal(), TxtDescripcion.Text.Trim(), TxtObs.Text.Trim(), TxtFecha.Text.ToDateTime(),
|
||||
2, UsuarioActual.CveUsuario, UsuarioActual.CveCliente, CveTrayecto:=Me.CveTrayecto) Then
|
||||
RegistraScript("$('#DModal').modal('hide')")
|
||||
Alert("El Gasto se agregó correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
@@ -978,8 +978,17 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
CargaAlmacenes(DtRecepcion.Rows(0)("CveSubProyecto").ToString.ToEntero, "22", CveTipoCompra)
|
||||
End If
|
||||
Else
|
||||
SumarImporteUsados = False
|
||||
DtRecepcion = ObjInventario.DtResultados.Copy()
|
||||
|
||||
'VERIFICA LOS QUE TENGAN LAS CLASIFICACION DE USADOS
|
||||
If ObjCompras.GetCompraDetalle(pCveCompra) Then
|
||||
If ObjCompras.DtResultados.COUNT("Cantidad", "CveClasificacion=20519") > 0 Then
|
||||
SumarImporteUsados = True
|
||||
Else
|
||||
SumarImporteUsados = False
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
CveAlmacenDevolucionProveedor = DtRecepcion.Rows(0)("CveAlmacenDevolucionProveedor").ToString.ToEntero
|
||||
@@ -2886,7 +2895,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
Dim dtt As DataTable = ObjInventario.DtResultados
|
||||
Dim tTotalInsertado As Decimal = dtt.SUMD("TotalOriginal") + ImporteIngresoAdicional
|
||||
If CveTipoCompra = 8 Then 'entrada almacen con costo indirecto cargado en la misma compra
|
||||
tTotalInsertado = dtt.SUMD("Total") ' está incluido el costo indirecto en la factura
|
||||
tTotalInsertado = dtt.SUMD("Total") + ImporteIngresoAdicional ' está incluido el costo indirecto en la factura
|
||||
End If
|
||||
If Math.Round(TotalCompraOC * If(TipoCambio > 1, TipoCambio, 1), 2) <> Math.Round(tTotalInsertado, 2) Then
|
||||
ErrorMovInv = True
|
||||
|
||||
@@ -2866,44 +2866,37 @@ Partial Class ProductosyServicios
|
||||
End Function
|
||||
|
||||
Private Function GuardarProductosEquivalenteEnFranquicia(ObjPS As ClsProductosServicios, Agregar As Boolean) As Boolean
|
||||
Dim EmpresasFranquicia = ObtenerFranquiciasInt()
|
||||
For Each Franquicia As Integer In EmpresasFranquicia
|
||||
Dim CvePSPagina As Integer = GlobalDTPS(Franquicia).FiltroPrimeroValor("CvePS", String.Format("Codigo = '{0}'", TxtCodigo.Text.Trim)).ToEntero
|
||||
Dim CvePSAdicional As Integer = GlobalDTPS(Franquicia).FiltroPrimeroValor("CvePS", String.Format("PS = '{0}'", DdlPSAdicional.SelectedItem.Text)).ToEntero
|
||||
If UsuarioActual.Empresa.Funcionalidad(563) <> "" Then
|
||||
|
||||
If CvePSPagina <= 0 Then
|
||||
Alert(String.Format("El producto de la página no existe en la franquicia: '{0}'", GlobalDTEmpresas(Franquicia).FiltroPrimeroValor("Empresa")), TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
Dim StrEmpresas As String = UsuarioActual.Empresa.Funcionalidad(563)
|
||||
Dim EmpresasFranquicia As List(Of Integer) = StrEmpresas.Split(","c).ToList().ConvertAll(Function(x) Convert.ToInt32(x))
|
||||
For Each Franquicia As Integer In EmpresasFranquicia
|
||||
Dim CvePSPagina As Integer = GlobalDTPS(Franquicia).FiltroPrimeroValor("CvePS", String.Format("Codigo = '{0}'", TxtCodigo.Text.Trim)).ToEntero
|
||||
Dim CvePSAdicional As Integer = GlobalDTPS(Franquicia).FiltroPrimeroValor("CvePS", String.Format("PS = '{0}'", DdlPSAdicional.SelectedItem.Text)).ToEntero
|
||||
|
||||
If CvePSPagina <= 0 Then
|
||||
Alert(String.Format("El producto adicional no existe en la franquicia: '{0}'", GlobalDTEmpresas(Franquicia).FiltroPrimeroValor("Empresa")), TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
If Agregar Then
|
||||
If Not ObjPS.AddPSAdicionales(CvePSPagina, CvePSAdicional, If(TxtCantidadPSAdicional.Visible, TxtCantidadPSAdicional.Text.ToDecimal, 0)) Then
|
||||
Return True
|
||||
If CvePSPagina <= 0 Then
|
||||
Alert(String.Format("El producto de la página no existe en la franquicia: '{0}'", GlobalDTEmpresas(Franquicia).FiltroPrimeroValor("Empresa")), TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
Else
|
||||
Dim PSAnterior As String = GlobalDTPS(Franquicia).FiltroPrimeroValor("PS", String.Format("CvePS = '{0}'", CvePSAdicional))
|
||||
Dim CvePSAnterio As Integer = GlobalDTPS(Franquicia).FiltroPrimeroValor("CvePS", String.Format("PS = '{0}'", PSAnterior)).ToEntero
|
||||
|
||||
If Not ObjPS.UpdatePSAdicionales(CvePSPagina, CvePSAdicional, CvePSAnterio, If(TxtCantidadPSAdicional.Visible, TxtCantidadPSAdicional.Text.ToDecimal, 0)) Then
|
||||
Return True
|
||||
If CvePSPagina <= 0 Then
|
||||
Alert(String.Format("El producto adicional no existe en la franquicia: '{0}'", GlobalDTEmpresas(Franquicia).FiltroPrimeroValor("Empresa")), TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
If Agregar Then
|
||||
If Not ObjPS.AddPSAdicionales(CvePSPagina, CvePSAdicional, If(TxtCantidadPSAdicional.Visible, TxtCantidadPSAdicional.Text.ToDecimal, 0)) Then
|
||||
Return True
|
||||
End If
|
||||
Else
|
||||
Dim PSAnterior As String = GlobalDTPS(Franquicia).FiltroPrimeroValor("PS", String.Format("CvePS = '{0}'", CvePSAdicional))
|
||||
Dim CvePSAnterio As Integer = GlobalDTPS(Franquicia).FiltroPrimeroValor("CvePS", String.Format("PS = '{0}'", PSAnterior)).ToEntero
|
||||
|
||||
If Not ObjPS.UpdatePSAdicionales(CvePSPagina, CvePSAdicional, CvePSAnterio, If(TxtCantidadPSAdicional.Visible, TxtCantidadPSAdicional.Text.ToDecimal, 0)) Then
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Private Function ObtenerFranquiciasInt() As Integer()
|
||||
Dim FranquiciasStr As String = UsuarioActual.Empresa.Funcionalidad(137)
|
||||
Dim Franquicias = FranquiciasStr.Split(","c)
|
||||
Dim ReturnFranquicias(Franquicias.Length) As Integer
|
||||
Dim Contador As Integer = 0
|
||||
For Each Franquicia In Franquicias
|
||||
ReturnFranquicias(Contador) = Franquicia.ToEntero
|
||||
Contador += 1
|
||||
Next
|
||||
Return ReturnFranquicias
|
||||
End Function
|
||||
End Class
|
||||
|
||||
@@ -303,6 +303,12 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate">Modalidad Contable:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:CheckBox ID="ChkModalidadContable" runat="server" Checked="false" CssClass="input-sm" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
|
||||
@@ -450,8 +450,8 @@ Partial Class RepVentaDetalle
|
||||
ConfiguraEmpresa()
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjVentas As New ClsVentas()
|
||||
Private Sub CargaDatos()
|
||||
|
||||
Dim AnioMes = If(Request("AnioMes") IsNot Nothing, Request("AnioMes").ToString, "-1").ToString
|
||||
Dim Fecha = If(Request("Fecha") IsNot Nothing, Request("Fecha").ToString, "-1").ToString
|
||||
Dim IVA = If(Request("IVA") IsNot Nothing, Request("IVA").ToString, "-1").ToString
|
||||
@@ -478,12 +478,15 @@ Partial Class RepVentaDetalle
|
||||
FechaIEjec = If(IsDate(TxtFechaIEjec.Text.Trim()), TxtFechaIEjec.Text.Trim.ToDate, MinFecha)
|
||||
FechaFEjec = If(IsDate(TxtFechaFEjec.Text.Trim()), TxtFechaFEjec.Text.Trim.ToDate, MaxFecha)
|
||||
|
||||
'FechaI, FechaF, -1, UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero
|
||||
Dim ModalidadContable As Boolean = CBool(If(Request("ModalidadContable") IsNot Nothing, Request("ModalidadContable").ToEntero(), 0))
|
||||
|
||||
Dim ObjVentas As New ClsVentas()
|
||||
'FechaI, FechaF, -1, UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero
|
||||
If ObjVentas.GetRepVentasDetalle(DdlGrupo.SelectedValue.ToEntero, Anio.ToEntero, Mes.ToEntero, AnioMes, Fecha, CveCliente,
|
||||
IVA, Vendedores, DdlUsuario.SelectedValue.ToEntero, Estatus, FechaI, FechaF,
|
||||
CveCorte.ToEntero, TipoComprobante, DdlSubProyectoEjecucion.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, FechaIEjec, FechaFEjec,
|
||||
CveProyecto, Sucursales, TipoCambio, TCEspecifico, CveMoneda, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero,
|
||||
CveCondicionesPago:=CveCondicionesPago, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero) Then
|
||||
CveCondicionesPago:=CveCondicionesPago, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, ModalidadContable:=ModalidadContable) Then
|
||||
DtVentas = AddRows(ObjVentas.DtResultados)
|
||||
ImgImprimir.Enabled = True
|
||||
GvDatos.DataSource = AddRows(ObjVentas.DtResultados)
|
||||
@@ -491,9 +494,11 @@ Partial Class RepVentaDetalle
|
||||
Else
|
||||
GvDatos.DataSource = Nothing
|
||||
GvVsh.DataSource = Nothing
|
||||
End If
|
||||
Agrupador = DdlGrupo.SelectedItem.Text
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
|
||||
Agrupador = DdlGrupo.SelectedItem.Text
|
||||
|
||||
GvDatos.DataBind()
|
||||
GvVsh.DataBind()
|
||||
End Sub
|
||||
|
||||
@@ -293,8 +293,12 @@
|
||||
<asp:ListItem Text="Venta Mostrador" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate">Modalidad Contable:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:CheckBox ID="ChkModalidadContable" runat="server" Checked="false" CssClass="input-sm" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -10,8 +10,8 @@ Imports System.IO
|
||||
Imports System.Xml
|
||||
|
||||
Partial Class Ventas_RepVentas
|
||||
Inherits ClsPaginas
|
||||
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "Propiedades"
|
||||
Private Property Opcion As String
|
||||
Get
|
||||
@@ -74,12 +74,12 @@ Partial Class Ventas_RepVentas
|
||||
Set(value As DataTable)
|
||||
ViewState("DtColor") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
TipoCambio = 1
|
||||
@@ -117,11 +117,11 @@ Partial Class Ventas_RepVentas
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#Region " CARGA COMBOS "
|
||||
|
||||
|
||||
Private Sub CargaGrupo()
|
||||
DdlGrupo.Items.Insert(0, New ListItem("Año", "1"))
|
||||
DdlGrupo.Items.Insert(1, New ListItem("Mes", "2"))
|
||||
@@ -284,10 +284,10 @@ Partial Class Ventas_RepVentas
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectos(DdlProyecto.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
DdlSubProyecto.DataBind()
|
||||
'DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " CARGA DATOS "
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
|
||||
CargaDatos()
|
||||
@@ -321,7 +321,7 @@ Partial Class Ventas_RepVentas
|
||||
|
||||
If ObjVentas.GetRepVentas(FechaI, FechaF, FechaIEjec, FechaFEjec, CveCliente, DdlSubProyectoEjecucion.SelectedValue.ToEntero, Vendedores,
|
||||
DdlUsuario.SelectedValue.ToEntero, Estatus, "-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, TipoComprobante, DdlProyecto.SelectedValue.ToEntero, Sucursales, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, CveUsuarioConsulta:=UsuarioActual.CveUsuario,
|
||||
CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero) Then
|
||||
CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, ModalidadContable:=ChkModalidadContable.Checked) Then
|
||||
GvDatos.DataSource = ObjVentas.DtResultados
|
||||
DtVentas = ObjVentas.DtResultados
|
||||
Else
|
||||
@@ -332,12 +332,12 @@ Partial Class Ventas_RepVentas
|
||||
CveProyecto = DdlProyecto.SelectedValue.ToEntero
|
||||
ObjVentas.Dispose()
|
||||
GvDatos.DataBind()
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "SELECTED INDEX CHANGE"
|
||||
|
||||
|
||||
Protected Sub DdlClienteClasificacion_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CargaClientes()
|
||||
End Sub
|
||||
@@ -380,10 +380,10 @@ Partial Class Ventas_RepVentas
|
||||
CargaDatos()
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivTipoCambio"))
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " GV DATOS - ROW DATABOUND "
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
@@ -417,11 +417,60 @@ Partial Class Ventas_RepVentas
|
||||
Else
|
||||
CveSubProyecto = e.Row.DBCampo("CveSubProyecto")
|
||||
CveProyecto = e.Row.DBCampo("CveProyecto")
|
||||
End If
|
||||
|
||||
|
||||
'LIGA A DETALLE
|
||||
Dim Liga As String = $"/Ventas/RepVentaDetalle.aspx?GPO={DdlGrupo.SelectedValue}&Anio={e.Row.DBCampo("Anio")}&Mes={e.Row.DBCampo("Mes")}&AnioMes={e.Row.DBCampo("AnioMes")}&Fecha={e.Row.DBCampo("Fecha")}&AnioEjec={e.Row.DBCampo("AnioEjec")}&MesEjec={e.Row.DBCampo("MesEjec")}&AnioMesEjec={e.Row.DBCampo("AnioMesEjec")}&FechaEjec={e.Row.DBCampo("FechaEjec")}&CveCliente={e.Row.DBCampo("CveCliente")}&CveVendedor={ e.Row.DBCampo("CveVendedor")}&CveUsuario={e.Row.DBCampo("CveUsuario")}&CveEstatusFactura={e.Row.DBCampo("CveEstatusFactura")}&FechaI={FechaI}&FechaF={FechaF}&FechaIEjec={FechaIEjec}&FechaFEjec={FechaFEjec}&IVA={e.Row.DBCampo("GPO_IVA")}&CveCorte={ e.Row.DBCampo("CveCorte")}&TipoDocto={ DdlTipoComprobante.GetSelectedValuesM}&CveSubProyectoEjecucion={e.Row.DBCampo("CveSubProyectoEjecucion")}&CveSubProyecto={CveSubProyecto}&CveProyecto={CveProyecto}&TipoCambio={TipoCambio}&TCEspecifico={TCEspecifico}&CveMoneda={CveMoneda}&CveClienteClasificacion={e.Row.DBCampo("CveClienteClasificacion")}&CveCondicionesPago={DdlCondicionesPago.SelectedValue}&TipoCliente={ If(DdlGrupo.SelectedValue.ToEntero = 20, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue)}"
|
||||
End If
|
||||
|
||||
Dim FechaInicial As String = FechaI
|
||||
Dim FechaFinal As String = FechaF
|
||||
|
||||
If Not e.Row.DBCampo("GPO").Contains("Total") Then
|
||||
Select Case DdlGrupo.SelectedValue.ToEntero()
|
||||
Case 2 ' MES
|
||||
Dim FechaIRef As DateTime = FechaI.ToDateTime()
|
||||
Dim FechaFRef As DateTime = FechaF.ToDateTime()
|
||||
|
||||
Dim Anio As Integer = FechaFRef.Year
|
||||
Dim Mes As Integer = e.Row.DBCampo("Mes").ToEntero()
|
||||
Dim lastDayOfMonth = DateTime.DaysInMonth(Anio, Mes)
|
||||
|
||||
Dim Dia As Integer = FechaFRef.Day
|
||||
|
||||
If e.Row.DBCampo("Mes").ToEntero() <> FechaFRef.Month Then
|
||||
Dia = lastDayOfMonth
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("Mes").ToEntero() <> FechaIRef.Month Then
|
||||
FechaInicial = New DateTime(Anio, Mes, 1).ToString("dd/MM/yyyy")
|
||||
End If
|
||||
|
||||
FechaFinal = New DateTime(Anio, Mes, Dia).ToString("dd/MM/yyyy")
|
||||
Case 3 ' AÑO/MES
|
||||
Dim FechaIRef As DateTime = FechaI.ToDateTime()
|
||||
Dim FechaFRef As DateTime = FechaF.ToDateTime()
|
||||
|
||||
Dim Anio As Integer = e.Row.DBCampo("Anio").ToEntero()
|
||||
Dim Mes As Integer = e.Row.DBCampo("Mes").ToEntero()
|
||||
Dim lastDayOfMonth = DateTime.DaysInMonth(Anio, Mes)
|
||||
|
||||
Dim Dia As Integer = FechaFRef.Day
|
||||
|
||||
If e.Row.DBCampo("Mes").ToEntero() <> FechaFRef.Month Then
|
||||
Dia = lastDayOfMonth
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("Mes").ToEntero() <> FechaIRef.Month Then
|
||||
FechaInicial = New DateTime(Anio, Mes, 1).ToString("dd/MM/yyyy")
|
||||
End If
|
||||
|
||||
FechaFinal = New DateTime(Anio, Mes, Dia).ToString("dd/MM/yyyy")
|
||||
Case 4 ' FECHA
|
||||
FechaInicial = e.Row.DBCampo("Fecha").ToDateTime().ToString("dd/MM/yyyy")
|
||||
FechaFinal = e.Row.DBCampo("Fecha").ToDateTime().ToString("dd/MM/yyyy")
|
||||
End Select
|
||||
End If
|
||||
|
||||
|
||||
'LIGA A DETALLE
|
||||
Dim Liga As String = $"/Ventas/RepVentaDetalle.aspx?GPO={DdlGrupo.SelectedValue}&Anio={e.Row.DBCampo("Anio")}&Mes={e.Row.DBCampo("Mes")}&AnioMes={e.Row.DBCampo("AnioMes")}&Fecha={e.Row.DBCampo("Fecha")}&AnioEjec={e.Row.DBCampo("AnioEjec")}&MesEjec={e.Row.DBCampo("MesEjec")}&AnioMesEjec={e.Row.DBCampo("AnioMesEjec")}&FechaEjec={e.Row.DBCampo("FechaEjec")}&CveCliente={e.Row.DBCampo("CveCliente")}&CveVendedor={ e.Row.DBCampo("CveVendedor")}&CveUsuario={e.Row.DBCampo("CveUsuario")}&CveEstatusFactura={e.Row.DBCampo("CveEstatusFactura")}&FechaI={FechaInicial}&FechaF={FechaFinal}&FechaIEjec={FechaIEjec}&FechaFEjec={FechaFEjec}&IVA={e.Row.DBCampo("GPO_IVA")}&CveCorte={ e.Row.DBCampo("CveCorte")}&TipoDocto={ DdlTipoComprobante.GetSelectedValuesM}&CveSubProyectoEjecucion={e.Row.DBCampo("CveSubProyectoEjecucion")}&CveSubProyecto={CveSubProyecto}&CveProyecto={CveProyecto}&TipoCambio={TipoCambio}&TCEspecifico={TCEspecifico}&CveMoneda={CveMoneda}&CveClienteClasificacion={e.Row.DBCampo("CveClienteClasificacion")}&CveCondicionesPago={DdlCondicionesPago.SelectedValue}&TipoCliente={ If(DdlGrupo.SelectedValue.ToEntero = 20, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue)}&ModalidadContable={If(ChkModalidadContable.Checked, 1, 0)}"
|
||||
|
||||
|
||||
e.Row.FCLiteral("LtlGrupo").Text = "<a class=""" & Css & """ href=""" & Liga & """>" & e.Row.FCLiteral("LtlGrupo").Text & "</a>"
|
||||
@@ -434,9 +483,9 @@ Partial Class Ventas_RepVentas
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " PERSONALIZAR "
|
||||
Protected Sub BtnPersonalizar_Click(sender As Object, e As System.EventArgs)
|
||||
Personaliza()
|
||||
@@ -519,18 +568,18 @@ Partial Class Ventas_RepVentas
|
||||
|
||||
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " EXCEL "
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
'GvDatos.ExportToExcel("ReporteVentas" & Now.ToShortDateString)
|
||||
GenerarPDF("Excel")
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "PDF"
|
||||
|
||||
|
||||
Private Sub GenerarPDF(Optional Formato As String = "PDF")
|
||||
If DtVentas IsNot Nothing Then
|
||||
Dim StrFiltro As New StringBuilder
|
||||
@@ -602,10 +651,10 @@ Partial Class Ventas_RepVentas
|
||||
Response.AppendHeader("Content-Disposition", "attachment; filename=ReporteHP.csv")
|
||||
Response.Write(Str.ToString)
|
||||
Context.Response.End()
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "XML-CONFIGURACIÓN"
|
||||
Private Sub XmlConf(CveUsuario As Integer, CveModulo As Integer, Values As String(,))
|
||||
Dim settings As New XmlWriterSettings()
|
||||
@@ -644,11 +693,11 @@ Partial Class Ventas_RepVentas
|
||||
{"SucursalEjecuccion", DdlSubProyectoEjecucion.Text.ToString()},
|
||||
{"Proyecto", DdlProyecto.Text.ToString()}
|
||||
}
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "GRAFICA"
|
||||
|
||||
|
||||
Protected Sub LnkVerGrafica_Click(sender As Object, e As EventArgs)
|
||||
If Not DtVentas IsNot Nothing AndAlso DtVentas.Rows.Count > 0 Then
|
||||
Alert("No hay datos disponibles", TipoMensaje.MsgAdvertencia)
|
||||
@@ -778,9 +827,9 @@ Partial Class Ventas_RepVentas
|
||||
|
||||
Protected Sub DdlVer_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CambioGrafica()
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -4177,6 +4177,11 @@ Partial Class Ventas
|
||||
DdlTipoAmortizacionAnticipo.SelectedValueExist(DbRowVenta("CveTipoAmortizacionAnticipo"))
|
||||
DdlTiposRelacion.SelectedValueExist(DbRowVenta("CveTipoRelacion"))
|
||||
|
||||
'Si es AMORTIZACIÓN ANTICIPO SOBRE FACTURA EN CERO no debe timbrar
|
||||
If DbRowVenta("CveTipoAmortizacionAnticipo").ToString().ToEntero() = 3 Then
|
||||
BtnEmitir.Visible = False
|
||||
End If
|
||||
|
||||
'HdnAmortizacion.Value = LblAmort.Text.ToDouble.ToString()
|
||||
'HdnSubTotalDescuestos.Value = (TxtSubTotal.Text.Replace(",", "").ToDouble - LblDescuentos.Text.Replace(",", "").ToDouble - LblAmortizacion.Text.Trim.Replace(",", "").ToDouble - TxtRetISR.Text.Replace(",", "").ToDouble).FormatoNumero(2)
|
||||
'DdlAmortizacionConceptos.SelectedValue = DbRowVenta("AnticipoPosicion").ToString()
|
||||
@@ -5723,6 +5728,15 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
'Puede hacer pedido
|
||||
If Me.CveVenta <= 0 Then
|
||||
If Not UsuarioActual.TienePermisoProceso(177) Then
|
||||
If DdlTipoComprobante.Items.FindByValue("Pd2") IsNot Nothing Then
|
||||
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Pd2"))
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
'CUANDO SEA COTIZACION Y SEA COMPUPROVEEDORES (EMPRESA 72) NO DEBE ENVIAR CORREO AL CLIENTE
|
||||
If UsuarioActual.CveEmpresa = 72 AndAlso DdlTipoComprobante.SelectedValue = "Cot" Then
|
||||
ChkEnviarFactura.Checked = False
|
||||
@@ -7660,6 +7674,11 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
'Si es AMORTIZACIÓN ANTICIPO SOBRE FACTURA EN CERO no debe timbrar
|
||||
If DdlTipoAmortizacionAnticipo.SelectedValue = "3" Then
|
||||
DebeTimbrar = False
|
||||
End If
|
||||
|
||||
If ObjFactura.TipoDocto.Contiene("Ing", "Egs", "Ant", "Dev") Then
|
||||
If UsuarioActual.Empresa.TipoFacturacion = "CFDi" AndAlso UsuarioActual.Empresa.FacturaProduccion Then
|
||||
|
||||
@@ -11906,8 +11925,6 @@ Partial Class Ventas
|
||||
IdCtaContable = 0
|
||||
CveCuenta = 0
|
||||
CveSubProyectoContabilizar = CveSubProyectoVenta
|
||||
Dim PorcentajeImpuestoPago As Decimal = TmpDT.MAX("PorcentajeIVA").ToDecimal
|
||||
|
||||
|
||||
If GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString().ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa).Rows.Count = 1 Then
|
||||
IdCtaContable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString().ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)("IdCtaContable").ToString().ToEntero()
|
||||
@@ -11938,36 +11955,47 @@ Partial Class Ventas
|
||||
Exit For
|
||||
End If
|
||||
|
||||
'IVA X TRASLADAR
|
||||
IdCtaIVAXTrasladar = If(IdCtaIVAXTrasladar > 0, IdCtaIVAXTrasladar, UsuarioActual.Empresa.IdCuentaIVAxTrasladar)
|
||||
CveCuentaIVAxTrasladar = If(CveCuentaIVAxTrasladar > 0, CveCuentaIVAxTrasladar, UsuarioActual.Empresa.CveCuentaIVAxTrasladar)
|
||||
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 13, NombreCliente, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString())
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, (importeMovimiento * ObjFactura.IVA) / ObjFactura.Total, Referencia, 13, Concepto, Fecha, IdCtaIVAXTrasladar, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=((importeMovimiento * ObjFactura.IVA) / ObjFactura.Total) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuentaIVAxTrasladar, CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuestoPago) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
|
||||
If ObjFactura.IVA <> 0 Then
|
||||
Dim PorcentajeImpuestoPago As Decimal = TmpDT.MAX("PorcentajeIVA").ToDecimal
|
||||
|
||||
'IVA X TRASLADAR
|
||||
IdCtaIVAXTrasladar = If(IdCtaIVAXTrasladar > 0, IdCtaIVAXTrasladar, UsuarioActual.Empresa.IdCuentaIVAxTrasladar)
|
||||
CveCuentaIVAxTrasladar = If(CveCuentaIVAxTrasladar > 0, CveCuentaIVAxTrasladar, UsuarioActual.Empresa.CveCuentaIVAxTrasladar)
|
||||
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 13, NombreCliente, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString())
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, (importeMovimiento * ObjFactura.IVA) / ObjFactura.Total, Referencia, 13, Concepto, Fecha, IdCtaIVAXTrasladar, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=((importeMovimiento * ObjFactura.IVA) / ObjFactura.Total) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuentaIVAxTrasladar, CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuestoPago) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
'IVA PAGADO
|
||||
IdCtaIVATrasladado = If(IdCtaIVATrasladado > 0, IdCtaIVATrasladado, UsuarioActual.Empresa.IdCuentaIVATrasladado)
|
||||
CveCuentaIVATrasladado = If(CveCuentaIVATrasladado > 0, CveCuentaIVATrasladado, UsuarioActual.Empresa.CveCuentaIVATrasladado)
|
||||
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 61, NombreCliente, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString())
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, (importeMovimiento * ObjFactura.IVA) / ObjFactura.Total, Referencia, 61, Concepto, Fecha, IdCtaIVATrasladado, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=((importeMovimiento * ObjFactura.IVA) / ObjFactura.Total) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuentaIVATrasladado, CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuestoPago) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
'IVA PAGADO
|
||||
IdCtaIVATrasladado = If(IdCtaIVATrasladado > 0, IdCtaIVATrasladado, UsuarioActual.Empresa.IdCuentaIVATrasladado)
|
||||
CveCuentaIVATrasladado = If(CveCuentaIVATrasladado > 0, CveCuentaIVATrasladado, UsuarioActual.Empresa.CveCuentaIVATrasladado)
|
||||
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 61, NombreCliente, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString())
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, (importeMovimiento * ObjFactura.IVA) / ObjFactura.Total, Referencia, 61, Concepto, Fecha, IdCtaIVATrasladado, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=((importeMovimiento * ObjFactura.IVA) / ObjFactura.Total) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuentaIVATrasladado, CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuestoPago) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
'IEPS X TRASLADAR
|
||||
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 38, NombreCliente, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString())
|
||||
If ObjFactura.IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, (importeMovimiento * ObjFactura.IEPS) / ObjFactura.Total, Referencia, 38, Concepto, Fecha, UsuarioActual.Empresa.IdCuentaIEPSxTrasladar, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=((importeMovimiento * ObjFactura.IEPS) / ObjFactura.Total) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=UsuarioActual.Empresa.CveCuentaIEPSxTrasladar, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
'IEPS PAGADO
|
||||
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 39, NombreCliente, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString())
|
||||
If ObjFactura.IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, (importeMovimiento * ObjFactura.IEPS) / ObjFactura.Total, Referencia, 39, Concepto, Fecha, UsuarioActual.Empresa.IdCuentaIEPSTrasladado, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=((importeMovimiento * ObjFactura.IEPS) / ObjFactura.Total) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=UsuarioActual.Empresa.CveCuentaIEPSTrasladado, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
If ObjFactura.IEPS <> 0 Then
|
||||
Dim PorcentajeImpuestoPago As Decimal = TmpDT.MAX("PorcentajeIEPS").ToDecimal
|
||||
|
||||
'IEPS X TRASLADAR
|
||||
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 38, NombreCliente, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString())
|
||||
If ObjFactura.IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, (importeMovimiento * ObjFactura.IEPS) / ObjFactura.Total, Referencia, 38, Concepto, Fecha, UsuarioActual.Empresa.IdCuentaIEPSxTrasladar, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=((importeMovimiento * ObjFactura.IEPS) / ObjFactura.Total) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=UsuarioActual.Empresa.CveCuentaIEPSxTrasladar, CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuestoPago) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
'IEPS PAGADO
|
||||
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 39, NombreCliente, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString())
|
||||
If ObjFactura.IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, (importeMovimiento * ObjFactura.IEPS) / ObjFactura.Total, Referencia, 39, Concepto, Fecha, UsuarioActual.Empresa.IdCuentaIEPSTrasladado, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=((importeMovimiento * ObjFactura.IEPS) / ObjFactura.Total) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=UsuarioActual.Empresa.CveCuentaIEPSTrasladado, CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuestoPago) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
@@ -12125,7 +12153,7 @@ Partial Class Ventas
|
||||
|
||||
If UsuarioActual.Empresa.UsaInventarios AndAlso factura.TipoDocto.Contiene("Ing", "Egs", "Rem", "Dev") Then
|
||||
|
||||
If RemisionesLista.Count > 0 AndAlso factura.TipoDocto.Contiene("Ing", "Egs", "Rem") Then
|
||||
If RemisionesLista.Count > 0 AndAlso factura.TipoDocto.Contiene("Ing", "Rem") Then
|
||||
For Each CveRemision As Integer In RemisionesLista
|
||||
'El almacen general es el Primer Almacen de Material en la Sucursal
|
||||
If Not TraspasoAlmacen(ObjInventario, CveRemision, ObjConta, True, 9) Then
|
||||
@@ -12816,7 +12844,7 @@ Partial Class Ventas
|
||||
|
||||
pdf = PdfFactura(ObjFactura)
|
||||
Catch ex As Exception
|
||||
Alert("Ocurrió un error al generar el PDF", TipoMensaje.MsgError)
|
||||
OnError("Ocurrió un error al generar el PDF", ex)
|
||||
End Try
|
||||
|
||||
LocalSerieFolio = ObjFactura.SerieFolio
|
||||
@@ -16660,6 +16688,16 @@ Partial Class Ventas
|
||||
LnkRemisiones.Visible = False
|
||||
End If
|
||||
|
||||
'Puede hacer pedido
|
||||
If Me.CveVenta <= 0 Then
|
||||
If Not UsuarioActual.TienePermisoProceso(177) Then
|
||||
If DdlTipoComprobante.Items.FindByValue("Pd2") IsNot Nothing Then
|
||||
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Pd2"))
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
'[IPP]: FALTA CONFIGURAR Y DAR PERMISO A TODOS LOS QUE TENGAN ACCESO A VENTAS
|
||||
''Puede remisionar
|
||||
'If Not UsuarioActual.TienePermisoProceso(199) Then
|
||||
|
||||
Reference in New Issue
Block a user