Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -195,7 +195,8 @@ Public Class ClsCompras
|
|||||||
AplicaNotaCredito As Boolean, Observaciones As String, CveEstatusCompra As Integer, CvePrePoliza As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional IdPoliza As Integer = -1,
|
AplicaNotaCredito As Boolean, Observaciones As String, CveEstatusCompra As Integer, CvePrePoliza As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional IdPoliza As Integer = -1,
|
||||||
Optional CveOC As Integer = -1, Optional CveCajaChica As Integer = -1, Optional CvePersonal As Integer = -1, Optional NumeroReembolso As String = "-1", Optional CveProveedorSucursal As Integer = -1,
|
Optional CveOC As Integer = -1, Optional CveCajaChica As Integer = -1, Optional CvePersonal As Integer = -1, Optional NumeroReembolso As String = "-1", Optional CveProveedorSucursal As Integer = -1,
|
||||||
Optional AplicoPromocion As Boolean = False, Optional PorcentajeIVA As Double = 0, Optional CveMetodoPago As Integer = -1, Optional CveRetIVAConcepto As Integer = -1, Optional CveConceptoContableAlmacen As Integer = -1,
|
Optional AplicoPromocion As Boolean = False, Optional PorcentajeIVA As Double = 0, Optional CveMetodoPago As Integer = -1, Optional CveRetIVAConcepto As Integer = -1, Optional CveConceptoContableAlmacen As Integer = -1,
|
||||||
Optional CveRetISRConcepto As Integer = -1, Optional NoDeducible As Boolean = False, Optional CveTipoCompra As Integer = -1, Optional TotalOriginal As Double = 0, Optional CveTipoConcepto As Integer = 1, Optional CveFactura As Integer = -1) As Boolean
|
Optional CveRetISRConcepto As Integer = -1, Optional NoDeducible As Boolean = False, Optional CveTipoCompra As Integer = -1, Optional TotalOriginal As Double = 0, Optional CveTipoConcepto As Integer = 1, Optional CveFactura As Integer = -1,
|
||||||
|
Optional CveContrato As Integer = -1) As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
@@ -246,6 +247,7 @@ Public Class ClsCompras
|
|||||||
.Add("@TotalOriginal", SqlDbType.Money).Value = TotalOriginal
|
.Add("@TotalOriginal", SqlDbType.Money).Value = TotalOriginal
|
||||||
.Add("@CveTipoConcepto", SqlDbType.Int).Value = CveTipoConcepto
|
.Add("@CveTipoConcepto", SqlDbType.Int).Value = CveTipoConcepto
|
||||||
.Add("@CveFactura", SqlDbType.Int).Value = CveFactura
|
.Add("@CveFactura", SqlDbType.Int).Value = CveFactura
|
||||||
|
.Add("@CveContrato", SqlDbType.Int).Value = CveContrato
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
@@ -267,10 +269,9 @@ Public Class ClsCompras
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function UpdateCompra(Descripcion As String, FolioSecundario As String, FechaVencimiento As Date, AplicaNotaCredito As Boolean, Observaciones As String, CveEstatusCompra As Integer,
|
Public Function UpdateCompra(Descripcion As String, FolioSecundario As String, FechaVencimiento As Date, AplicaNotaCredito As Boolean, Observaciones As String, CveEstatusCompra As Integer,
|
||||||
Descuento As Double, SubTotal As Double, IVA As Double, Total As Double, CveUsuario As Integer,
|
Descuento As Double, SubTotal As Double, IVA As Double, Total As Double, CveUsuario As Integer, CveCompra As Integer, Optional CveCajaChica As Integer = -1, Optional CvePersonal As Integer = -1,
|
||||||
CveCompra As Integer, Optional CveCajaChica As Integer = -1, Optional CvePersonal As Integer = -1,
|
Optional CveProveedorSucursal As Integer = -1, Optional PorcentajeIVA As Double = 0, Optional NumeroReembolso As String = "", Optional CveTipoCompra As Integer = -1, Optional NoDeducible As Boolean = False,
|
||||||
Optional CveProveedorSucursal As Integer = -1, Optional PorcentajeIVA As Double = 0,
|
Optional CveFactura As Integer = -1, Optional CveContrato As Integer = -1) As Boolean
|
||||||
Optional NumeroReembolso As String = "", Optional CveTipoCompra As Integer = -1, Optional NoDeducible As Boolean = False, Optional CveFactura As Integer = -1) As Boolean
|
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
@@ -297,6 +298,7 @@ Public Class ClsCompras
|
|||||||
.Add("@CveTipoCompra", SqlDbType.Int).Value = CveTipoCompra
|
.Add("@CveTipoCompra", SqlDbType.Int).Value = CveTipoCompra
|
||||||
.Add("@NoDeducible", SqlDbType.Bit).Value = NoDeducible
|
.Add("@NoDeducible", SqlDbType.Bit).Value = NoDeducible
|
||||||
.Add("@CveFactura", SqlDbType.Int).Value = CveFactura
|
.Add("@CveFactura", SqlDbType.Int).Value = CveFactura
|
||||||
|
.Add("@CveContrato", SqlDbType.Int).Value = CveContrato
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
@@ -2206,7 +2208,7 @@ Public Class ClsCompras
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function UpdateEstatusAlmacenDetalle(CveCompraDetalle As Integer, ValorEstatus As Integer, CveUsuario As Integer) As Boolean
|
Public Function UpdateEstatusAlmacenDetalle(CveCompraDetalle As Integer, ValorEstatus As Integer, CveUsuario As Integer, Optional CantidadDevolucion As Decimal = 0) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Comp_ComprasDetalleEstatusAlmacenUpdate")
|
DataAdapter("PA_Comp_ComprasDetalleEstatusAlmacenUpdate")
|
||||||
|
|
||||||
@@ -2214,6 +2216,7 @@ Public Class ClsCompras
|
|||||||
.Add("@CveCompraDetalle", SqlDbType.Int).Value = CveCompraDetalle
|
.Add("@CveCompraDetalle", SqlDbType.Int).Value = CveCompraDetalle
|
||||||
.Add("@Estatus", SqlDbType.Int).Value = ValorEstatus
|
.Add("@Estatus", SqlDbType.Int).Value = ValorEstatus
|
||||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
|
.Add("@CantidadDevolucion", SqlDbType.Decimal).Value = CantidadDevolucion
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -1014,7 +1014,9 @@ Public Class ClsContratos
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "CONTRATOS DETALLE"
|
#Region "CONTRATOS DETALLE"
|
||||||
Public Function AddContratosDetalle(CveContrato As Integer, CvePS As Integer, Cantidad As Double, PU As Double, CveUsuario As Integer, CveTipoPresupuesto As Integer, NoIdentificacion As String, LimitarCantidad As Boolean, OCInterna As String, Optional Observacion As String = "") As Boolean
|
|
||||||
|
Public Function AddContratosDetalle(CveContrato As Integer, CvePS As Integer, Cantidad As Double, PU As Double, CveUsuario As Integer, CveTipoPresupuesto As Integer, NoIdentificacion As String, LimitarCantidad As Boolean, OCInterna As String,
|
||||||
|
Optional Observacion As String = "", Optional CveRubro As Integer = -1, Optional CveActividad As Integer = -1, Optional CveSubTipoActivoFijo As Integer = -1, Optional Dias As Integer = -1) As Boolean
|
||||||
Dim Retorno = False
|
Dim Retorno = False
|
||||||
|
|
||||||
DataAdapter("PA_Con_ContratosDetalleAdd")
|
DataAdapter("PA_Con_ContratosDetalleAdd")
|
||||||
@@ -1029,6 +1031,10 @@ Public Class ClsContratos
|
|||||||
.Add("@OCInterna", SqlDbType.VarChar).Value = OCInterna
|
.Add("@OCInterna", SqlDbType.VarChar).Value = OCInterna
|
||||||
.Add("@LimitarCantidad", SqlDbType.Bit).Value = If(LimitarCantidad, 1, 0)
|
.Add("@LimitarCantidad", SqlDbType.Bit).Value = If(LimitarCantidad, 1, 0)
|
||||||
.Add("@Observacion", SqlDbType.VarChar).Value = Observacion
|
.Add("@Observacion", SqlDbType.VarChar).Value = Observacion
|
||||||
|
.Add("@CveRubro", SqlDbType.Int).Value = CveRubro
|
||||||
|
.Add("@CveActividad", SqlDbType.Int).Value = CveActividad
|
||||||
|
.Add("@CveSubTipoActivoFijo", SqlDbType.Int).Value = CveSubTipoActivoFijo
|
||||||
|
.Add("@Dias", SqlDbType.Int).Value = Dias
|
||||||
|
|
||||||
'NoIdentificacion
|
'NoIdentificacion
|
||||||
End With
|
End With
|
||||||
@@ -1044,7 +1050,8 @@ Public Class ClsContratos
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
Public Function UpdateContratosDetalle(CveContratoDetalle As Integer, CveContrato As Integer, CvePS As Integer, Cantidad As Double, PU As Double, CveUsuario As Integer, NoIdentificacion As String, LimitarCantidad As Boolean, OCInterna As String, Optional Observacion As String = "") As Boolean
|
Public Function UpdateContratosDetalle(CveContratoDetalle As Integer, CveContrato As Integer, CvePS As Integer, Cantidad As Double, PU As Double, CveUsuario As Integer, NoIdentificacion As String, LimitarCantidad As Boolean, OCInterna As String,
|
||||||
|
Optional Observacion As String = "", Optional CveRubro As Integer = -1, Optional CveActividad As Integer = -1, Optional CveSubTipoActivoFijo As Integer = -1, Optional Dias As Integer = -1) As Boolean
|
||||||
Dim Retorno = False
|
Dim Retorno = False
|
||||||
|
|
||||||
DataAdapter("PA_Con_ContratosDetalleUpdate")
|
DataAdapter("PA_Con_ContratosDetalleUpdate")
|
||||||
@@ -1059,6 +1066,10 @@ Public Class ClsContratos
|
|||||||
.Add("@OCInterna", SqlDbType.VarChar).Value = OCInterna
|
.Add("@OCInterna", SqlDbType.VarChar).Value = OCInterna
|
||||||
.Add("@LimitarCantidad", SqlDbType.Bit).Value = If(LimitarCantidad, 1, 0)
|
.Add("@LimitarCantidad", SqlDbType.Bit).Value = If(LimitarCantidad, 1, 0)
|
||||||
.Add("@Observacion", SqlDbType.VarChar).Value = Observacion
|
.Add("@Observacion", SqlDbType.VarChar).Value = Observacion
|
||||||
|
.Add("@CveRubro", SqlDbType.Int).Value = CveRubro
|
||||||
|
.Add("@CveActividad", SqlDbType.Int).Value = CveActividad
|
||||||
|
.Add("@CveSubTipoActivoFijo", SqlDbType.Int).Value = CveSubTipoActivoFijo
|
||||||
|
.Add("@Dias", SqlDbType.Int).Value = Dias
|
||||||
|
|
||||||
End With
|
End With
|
||||||
|
|
||||||
|
|||||||
@@ -1309,8 +1309,14 @@ Public Class ClsInventarios
|
|||||||
Retorno = True
|
Retorno = True
|
||||||
End If
|
End If
|
||||||
Catch Ex1 As SqlException
|
Catch Ex1 As SqlException
|
||||||
|
|
||||||
If Ex1.Message.Contains("50019") Then
|
If Ex1.Message.Contains("50019") Then
|
||||||
Me.OnError(" El producto no tiene existencia.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
Me.OnError(" El producto no tiene existencia.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
|
||||||
|
ElseIf Ex1.Message.Contains("CK_Inv_MovimientosDetalle_MetodoInventario") Then
|
||||||
|
|
||||||
|
Me.OnError("El movimiento debe de tener una Serie.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
|
||||||
Else
|
Else
|
||||||
If Ex1.Message.Contains("50021") Then
|
If Ex1.Message.Contains("50021") Then
|
||||||
Me.OnError(" El producto ingresado previamente.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
Me.OnError(" El producto ingresado previamente.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
@@ -1437,7 +1443,7 @@ Public Class ClsInventarios
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function GetMovimientosTransitorios(CveAlmacenDestino As Integer, CveTipoAlmacenDestino As Integer, CveAlmacenTransitorio As Integer, CveUsuarioResponsable As Integer, Folio As Integer, CveEmpresa As Integer) As Boolean
|
Public Function GetMovimientosTransitorios(CveAlmacenDestino As Integer, CveTipoAlmacenDestino As Integer, CveAlmacenTransitorio As Integer, CveUsuarioResponsable As Integer, Folio As Integer, CveEmpresa As Integer, CveUsuario As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Inv_MovimientosTransitoriosGet")
|
DataAdapter("PA_Inv_MovimientosTransitoriosGet")
|
||||||
|
|
||||||
@@ -1448,6 +1454,7 @@ Public Class ClsInventarios
|
|||||||
.Add("@Folio", SqlDbType.Int).Value = Folio
|
.Add("@Folio", SqlDbType.Int).Value = Folio
|
||||||
.Add("@CveUsuarioResponsable", SqlDbType.Int).Value = CveUsuarioResponsable
|
.Add("@CveUsuarioResponsable", SqlDbType.Int).Value = CveUsuarioResponsable
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
@@ -1868,7 +1875,7 @@ Public Class ClsInventarios
|
|||||||
Optional Serie As String = "-1", Optional Lote As String = "-1", Optional FechaCaducidad As Date = MinFecha,
|
Optional Serie As String = "-1", Optional Lote As String = "-1", Optional FechaCaducidad As Date = MinFecha,
|
||||||
Optional CveVendedor As Integer = -1, Optional CveCliente As Integer = -1,
|
Optional CveVendedor As Integer = -1, Optional CveCliente As Integer = -1,
|
||||||
Optional ExcluyeAdelantado As Integer = -1, Optional PendientePorSurtir As Integer = -1,
|
Optional ExcluyeAdelantado As Integer = -1, Optional PendientePorSurtir As Integer = -1,
|
||||||
Optional ExcluyeApartados As Integer = 1, Optional RestringirAlmacenes As Integer = -1) As Decimal
|
Optional ExcluyeApartados As Integer = 1, Optional RestringirAlmacenes As Integer = -1, Optional ExcluyeTransitorios As Integer = -1) As Decimal
|
||||||
Dim Retorno As Decimal = -1
|
Dim Retorno As Decimal = -1
|
||||||
|
|
||||||
If FechaMovto = "-1" Then
|
If FechaMovto = "-1" Then
|
||||||
@@ -1893,6 +1900,7 @@ Public Class ClsInventarios
|
|||||||
.Add("@ExcluyeAdelantado", SqlDbType.Int).Value = ExcluyeAdelantado
|
.Add("@ExcluyeAdelantado", SqlDbType.Int).Value = ExcluyeAdelantado
|
||||||
.Add("@PendientePorSurtir", SqlDbType.Int).Value = PendientePorSurtir
|
.Add("@PendientePorSurtir", SqlDbType.Int).Value = PendientePorSurtir
|
||||||
.Add("@ExcluyeApartados", SqlDbType.Int).Value = ExcluyeApartados
|
.Add("@ExcluyeApartados", SqlDbType.Int).Value = ExcluyeApartados
|
||||||
|
.Add("@ExcluyeTransitorios", SqlDbType.Int).Value = ExcluyeTransitorios
|
||||||
.Add("@RestringirAlmacenes", SqlDbType.Int).Value = RestringirAlmacenes
|
.Add("@RestringirAlmacenes", SqlDbType.Int).Value = RestringirAlmacenes
|
||||||
|
|
||||||
.Add("@Existencia", SqlDbType.Money).Direction = ParameterDirection.Output
|
.Add("@Existencia", SqlDbType.Money).Direction = ParameterDirection.Output
|
||||||
@@ -1920,7 +1928,7 @@ Public Class ClsInventarios
|
|||||||
Optional FechaMovto As String = "-1", Optional CveVendedor As Integer = -1, Optional CveCliente As Integer = -1,
|
Optional FechaMovto As String = "-1", Optional CveVendedor As Integer = -1, Optional CveCliente As Integer = -1,
|
||||||
Optional Serie As String = "-1", Optional Lote As String = "-1", Optional Caducidad As Date = MinFecha,
|
Optional Serie As String = "-1", Optional Lote As String = "-1", Optional Caducidad As Date = MinFecha,
|
||||||
Optional ExcluyeAdelantado As Integer = -1, Optional PendientePorSurtir As Integer = -1,
|
Optional ExcluyeAdelantado As Integer = -1, Optional PendientePorSurtir As Integer = -1,
|
||||||
Optional ExcluyeApartados As Integer = 1, Optional RestringirAlmacenes As Integer = -1, Optional TopSelect As Integer = 10000) As Boolean
|
Optional ExcluyeApartados As Integer = 1, Optional RestringirAlmacenes As Integer = -1, Optional ExcluyeTransitorios As Integer = -1, Optional TopSelect As Integer = 10000) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Inv_ExistenciasGet")
|
DataAdapter("PA_Inv_ExistenciasGet")
|
||||||
|
|
||||||
@@ -1941,6 +1949,7 @@ Public Class ClsInventarios
|
|||||||
.Add("@ExcluyeAdelantado", SqlDbType.Int).Value = ExcluyeAdelantado
|
.Add("@ExcluyeAdelantado", SqlDbType.Int).Value = ExcluyeAdelantado
|
||||||
.Add("@PendientePorSurtir", SqlDbType.Int).Value = PendientePorSurtir
|
.Add("@PendientePorSurtir", SqlDbType.Int).Value = PendientePorSurtir
|
||||||
.Add("@ExcluyeApartados", SqlDbType.Int).Value = ExcluyeApartados
|
.Add("@ExcluyeApartados", SqlDbType.Int).Value = ExcluyeApartados
|
||||||
|
.Add("@ExcluyeTransitorios", SqlDbType.Int).Value = ExcluyeTransitorios
|
||||||
.Add("@RestringirAlmacenes", SqlDbType.Int).Value = RestringirAlmacenes
|
.Add("@RestringirAlmacenes", SqlDbType.Int).Value = RestringirAlmacenes
|
||||||
.Add("@TopSelect", SqlDbType.Int).Value = TopSelect
|
.Add("@TopSelect", SqlDbType.Int).Value = TopSelect
|
||||||
|
|
||||||
@@ -2675,6 +2684,7 @@ Public Class ClsInventarios
|
|||||||
DataAdapter("PA_Inv_InventarioFisicoResultadoAvance")
|
DataAdapter("PA_Inv_InventarioFisicoResultadoAvance")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveInventarioFisico", SqlDbType.Int).Value = CveInventarioFisico
|
.Add("@CveInventarioFisico", SqlDbType.Int).Value = CveInventarioFisico
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
|
|||||||
@@ -634,6 +634,8 @@ Public Class ClsPaginas
|
|||||||
Application("GlobalDTEmpresas") = value
|
Application("GlobalDTEmpresas") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
|
||||||
Property GlobalDTClasificaciones(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1, Optional UsoClasificacion As Integer = -1, Optional CveClasificacion As Integer = -1) As DataTable
|
Property GlobalDTClasificaciones(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1, Optional UsoClasificacion As Integer = -1, Optional CveClasificacion As Integer = -1) As DataTable
|
||||||
Get
|
Get
|
||||||
Dim AppNombre As String = String.Format("GlobalDTClasificaciones-{0}", CveEmpresa)
|
Dim AppNombre As String = String.Format("GlobalDTClasificaciones-{0}", CveEmpresa)
|
||||||
@@ -664,6 +666,41 @@ Public Class ClsPaginas
|
|||||||
Application(AppNombre) = value
|
Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Property GlobalDTRHActividades(CveEmpresa As Integer) As DataTable
|
||||||
|
Get
|
||||||
|
Dim AppNombre As String = String.Format("GlobalDTRHActividades-{0}", CveEmpresa)
|
||||||
|
'sino existe, recarga los datos
|
||||||
|
If Application(AppNombre) Is Nothing Then
|
||||||
|
|
||||||
|
Dim ObjRH As New ClsRH
|
||||||
|
If ObjRH.GetActividades(CveEmpresa) Then Application(AppNombre) = ObjRH.DtResultados
|
||||||
|
ObjRH.Dispose()
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
If CveEmpresa <> -1 Then
|
||||||
|
Dim Str As New StringBuilder
|
||||||
|
Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
|
||||||
|
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
|
||||||
|
GlobalDTRHActividades = Dv.ToTable
|
||||||
|
Dv.Dispose()
|
||||||
|
Else
|
||||||
|
GlobalDTRHActividades = DirectCast(Application(AppNombre), DataTable)
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
End Get
|
||||||
|
Set(value As DataTable)
|
||||||
|
Dim AppNombre As String = String.Format("GlobalDTRHActividades-{0}", CveEmpresa)
|
||||||
|
Application(AppNombre) = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Property GlobalDTClasificaciones2(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1) As DataTable
|
Property GlobalDTClasificaciones2(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1) As DataTable
|
||||||
Get
|
Get
|
||||||
Dim AppNombre As String = String.Format("GlobalDTClasificaciones2-{0}", CveEmpresa)
|
Dim AppNombre As String = String.Format("GlobalDTClasificaciones2-{0}", CveEmpresa)
|
||||||
@@ -4847,7 +4884,7 @@ Public Class ClsPaginas
|
|||||||
PaginaDict.Add("/RH/RepVacaciones.aspx".ToUpper(), 422)
|
PaginaDict.Add("/RH/RepVacaciones.aspx".ToUpper(), 422)
|
||||||
PaginaDict.Add("/RH/CatChecadorTipo.aspx".ToUpper(), 427)
|
PaginaDict.Add("/RH/CatChecadorTipo.aspx".ToUpper(), 427)
|
||||||
PaginaDict.Add("/RH/CatChecadorHorarios.aspx".ToUpper(), 428)
|
PaginaDict.Add("/RH/CatChecadorHorarios.aspx".ToUpper(), 428)
|
||||||
PaginaDict.Add("/RH/CatChecadorEstaciones.aspx".ToUpper(), 627)
|
|
||||||
PaginaDict.Add("/RH/RepChecadorPreAsistencia.aspx".ToUpper(), 628)
|
PaginaDict.Add("/RH/RepChecadorPreAsistencia.aspx".ToUpper(), 628)
|
||||||
PaginaDict.Add("/RH/CatCaptaciones.aspx".ToUpper(), 629)
|
PaginaDict.Add("/RH/CatCaptaciones.aspx".ToUpper(), 629)
|
||||||
PaginaDict.Add("/RH/RepUniformes.aspx".ToUpper(), 630)
|
PaginaDict.Add("/RH/RepUniformes.aspx".ToUpper(), 630)
|
||||||
|
|||||||
@@ -1359,6 +1359,8 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
|||||||
|
|
||||||
Public Property CveUniforme As Integer
|
Public Property CveUniforme As Integer
|
||||||
|
|
||||||
|
Public Property CveActividad As Integer
|
||||||
|
|
||||||
|
|
||||||
Public ReadOnly Property DtResultados() As DataTable
|
Public ReadOnly Property DtResultados() As DataTable
|
||||||
Get
|
Get
|
||||||
@@ -6866,6 +6868,50 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
|||||||
End Try
|
End Try
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
#Region " A C T I V I D A D E S"
|
||||||
|
|
||||||
|
|
||||||
|
Public Function GetActividades(CveEmpresa As Integer) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_RH_ActividadesGet")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.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 listado de actividades ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
Public Function AddActividades(Actividad As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
|
||||||
|
CveActividad = -1
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_RH_ActividadesAdd")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@Actividad", SqlDbType.VarChar).Value = Actividad
|
||||||
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@CveActividad", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||||
|
End With
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
|
||||||
|
CveActividad = SqlAdapter.SelectCommand.Parameters("@CveActividad").Value.ToString.ToEntero
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al obtener el listado de ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -233,7 +233,7 @@
|
|||||||
<xs:element name="NumCuenta" msprop:Generator_ColumnVarNameInTable="columnNumCuenta" msprop:Generator_ColumnPropNameInRow="NumCuenta" msprop:Generator_ColumnPropNameInTable="NumCuentaColumn" msprop:Generator_UserColumnName="NumCuenta" type="xs:string" minOccurs="0" />
|
<xs:element name="NumCuenta" msprop:Generator_ColumnVarNameInTable="columnNumCuenta" msprop:Generator_ColumnPropNameInRow="NumCuenta" msprop:Generator_ColumnPropNameInTable="NumCuentaColumn" msprop:Generator_UserColumnName="NumCuenta" type="xs:string" minOccurs="0" />
|
||||||
<xs:element name="CveMoneda" msprop:Generator_ColumnVarNameInTable="columnCveMoneda" msprop:Generator_ColumnPropNameInRow="CveMoneda" msprop:Generator_ColumnPropNameInTable="CveMonedaColumn" msprop:Generator_UserColumnName="CveMoneda" type="xs:short" minOccurs="0" />
|
<xs:element name="CveMoneda" msprop:Generator_ColumnVarNameInTable="columnCveMoneda" msprop:Generator_ColumnPropNameInRow="CveMoneda" msprop:Generator_ColumnPropNameInTable="CveMonedaColumn" msprop:Generator_UserColumnName="CveMoneda" type="xs:short" minOccurs="0" />
|
||||||
<xs:element name="CveVenta" msprop:Generator_ColumnVarNameInTable="columnCveVenta" msprop:Generator_ColumnPropNameInRow="CveVenta" msprop:Generator_ColumnPropNameInTable="CveVentaColumn" msprop:Generator_UserColumnName="CveVenta" type="xs:short" minOccurs="0" />
|
<xs:element name="CveVenta" msprop:Generator_ColumnVarNameInTable="columnCveVenta" msprop:Generator_ColumnPropNameInRow="CveVenta" msprop:Generator_ColumnPropNameInTable="CveVentaColumn" msprop:Generator_UserColumnName="CveVenta" type="xs:short" minOccurs="0" />
|
||||||
<xs:element name="PorcentajeIVA" msprop:Generator_ColumnVarNameInTable="columnPorcentajeIVA" msprop:Generator_ColumnPropNameInRow="PorcentajeIVA" msprop:Generator_ColumnPropNameInTable="PorcentajeIVAColumn" msprop:Generator_UserColumnName="PorcentajeIVA" type="xs:string" minOccurs="0" />
|
<xs:element name="PorcentajeIVA" msprop:Generator_ColumnVarNameInTable="columnPorcentajeIVA" msprop:Generator_ColumnPropNameInRow="PorcentajeIVA" msprop:Generator_ColumnPropNameInTable="PorcentajeIVAColumn" msprop:Generator_UserColumnName="PorcentajeIVA" type="xs:double" minOccurs="0" />
|
||||||
<xs:element name="RetIVAServicios" msprop:Generator_ColumnVarNameInTable="columnRetIVAServicios" msprop:Generator_ColumnPropNameInRow="RetIVAServicios" msprop:Generator_ColumnPropNameInTable="RetIVAServiciosColumn" msprop:Generator_UserColumnName="RetIVAServicios" type="xs:double" minOccurs="0" />
|
<xs:element name="RetIVAServicios" msprop:Generator_ColumnVarNameInTable="columnRetIVAServicios" msprop:Generator_ColumnPropNameInRow="RetIVAServicios" msprop:Generator_ColumnPropNameInTable="RetIVAServiciosColumn" msprop:Generator_UserColumnName="RetIVAServicios" type="xs:double" minOccurs="0" />
|
||||||
<xs:element name="FolioFiscal" msprop:Generator_ColumnVarNameInTable="columnFolioFiscal" msprop:Generator_ColumnPropNameInRow="FolioFiscal" msprop:Generator_ColumnPropNameInTable="FolioFiscalColumn" msprop:Generator_UserColumnName="FolioFiscal" type="xs:string" minOccurs="0" />
|
<xs:element name="FolioFiscal" msprop:Generator_ColumnVarNameInTable="columnFolioFiscal" msprop:Generator_ColumnPropNameInRow="FolioFiscal" msprop:Generator_ColumnPropNameInTable="FolioFiscalColumn" msprop:Generator_UserColumnName="FolioFiscal" type="xs:string" minOccurs="0" />
|
||||||
<xs:element name="Fecha" msprop:Generator_ColumnVarNameInTable="columnFecha" msprop:Generator_ColumnPropNameInRow="Fecha" msprop:Generator_ColumnPropNameInTable="FechaColumn" msprop:Generator_UserColumnName="Fecha" type="xs:dateTime" minOccurs="0" />
|
<xs:element name="Fecha" msprop:Generator_ColumnVarNameInTable="columnFecha" msprop:Generator_ColumnPropNameInRow="Fecha" msprop:Generator_ColumnPropNameInTable="FechaColumn" msprop:Generator_UserColumnName="Fecha" type="xs:dateTime" minOccurs="0" />
|
||||||
|
|||||||
@@ -2886,7 +2886,7 @@ Namespace Modelos
|
|||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
DT = TmpDTDetalle.FiltraParametros($"CvePS <> {ObjFactura.CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto"})
|
DT = TmpDTDetalle.FiltraParametros($"CvePS <> {ObjFactura.CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto", "PorcentajeIVA"})
|
||||||
|
|
||||||
If DT.Rows.Count > 0 Then
|
If DT.Rows.Count > 0 Then
|
||||||
'Se agrega movimiento separado por la cuenta de ventas (ER)
|
'Se agrega movimiento separado por la cuenta de ventas (ER)
|
||||||
@@ -2919,7 +2919,7 @@ Namespace Modelos
|
|||||||
' CveCuentaContabilizacion = 0
|
' CveCuentaContabilizacion = 0
|
||||||
'End If
|
'End If
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContableAplicar, Concepto, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVentaAplicar, CveVentaAmortizacion:=CveVentaAmortizacionAplicar, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, CveCuenta:=CveCuenta) Then
|
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContableAplicar, Concepto, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVentaAplicar, CveVentaAmortizacion:=CveVentaAmortizacionAplicar, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, PorcentajeImpuesto:=Row2("PorcentajeIVA").ToString().ToDecimal) Then
|
||||||
ErrorPrepoliza = True
|
ErrorPrepoliza = True
|
||||||
Else
|
Else
|
||||||
ObjFactura.SeGuardoPrePoliza = True
|
ObjFactura.SeGuardoPrePoliza = True
|
||||||
@@ -2961,7 +2961,7 @@ Namespace Modelos
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
DT = TmpDTDetalle.FiltraParametros($"CvePS <> {ObjFactura.CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto"})
|
DT = TmpDTDetalle.FiltraParametros($"CvePS <> {ObjFactura.CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto", "PorcentajeIVA"})
|
||||||
|
|
||||||
If DT.Rows.Count > 0 Then
|
If DT.Rows.Count > 0 Then
|
||||||
'Se agrega movimiento separado por la cuenta de ventas (ER)
|
'Se agrega movimiento separado por la cuenta de ventas (ER)
|
||||||
@@ -3006,7 +3006,7 @@ Namespace Modelos
|
|||||||
' CveCuentaContabilizacion = 0
|
' CveCuentaContabilizacion = 0
|
||||||
'End If
|
'End If
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContableAplicar, Concepto, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVentaAplicar, CveVentaAmortizacion:=CveVentaAmortizacionAplicar, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, CveCuenta:=CveCuenta) Then
|
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContableAplicar, Concepto, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVentaAplicar, CveVentaAmortizacion:=CveVentaAmortizacionAplicar, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, PorcentajeImpuesto:=Row2("PorcentajeIVA").ToString().ToDecimal) Then
|
||||||
ErrorPrepoliza = True
|
ErrorPrepoliza = True
|
||||||
Else
|
Else
|
||||||
ObjFactura.SeGuardoPrePoliza = True
|
ObjFactura.SeGuardoPrePoliza = True
|
||||||
|
|||||||
@@ -446,7 +446,7 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
HlSaldarCuentasSinPagar.Visible = True
|
HlSaldarCuentasSinPagar.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa = 119 And CveUsuarioProgramo <> -1 Then
|
If UsuarioActual.CveEmpresa.Contiene(119, 158) And CveUsuarioProgramo <> -1 Then
|
||||||
LnkPDFSolicitud.Visible = True
|
LnkPDFSolicitud.Visible = True
|
||||||
LnkExcelSolicitud.Visible = True
|
LnkExcelSolicitud.Visible = True
|
||||||
End If
|
End If
|
||||||
@@ -942,6 +942,9 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
Dim TipoCambioGeneral As Decimal = 0
|
Dim TipoCambioGeneral As Decimal = 0
|
||||||
Dim tipoCambioCompraValuacion As Decimal = 1
|
Dim tipoCambioCompraValuacion As Decimal = 1
|
||||||
|
|
||||||
|
Dim UsaComplementariaBancos As Boolean = If(UsuarioActual.CveEmpresa.Contiene(119, 158), True, False)
|
||||||
|
Dim UsaComplementariaProveedores As Boolean = If(UsuarioActual.CveEmpresa.Contiene(119, 158), True, False)
|
||||||
|
|
||||||
Dim FuncionalidadFluctuacionImpuestos As Boolean = If(UsuarioActual.Empresa.Funcionalidad(159) = "1", True, False)
|
Dim FuncionalidadFluctuacionImpuestos As Boolean = If(UsuarioActual.Empresa.Funcionalidad(159) = "1", True, False)
|
||||||
|
|
||||||
Dim TipoCambioFluctuacion As Decimal = 1
|
Dim TipoCambioFluctuacion As Decimal = 1
|
||||||
@@ -1046,7 +1049,7 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}"
|
ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||||
IdCtaContable = IdCtaContComplementaria
|
IdCtaContable = IdCtaContComplementaria
|
||||||
CveCuenta = CveCuentaProveedorExtranjera
|
CveCuenta = CveCuentaProveedorExtranjera
|
||||||
If ImporteMovimiento <> 0 AndAlso (UsuarioActual.CveEmpresa = 119 Or IdCtaContable > 0) Then 'Cuando tiene complementaria lo dividimos en dos
|
If ImporteMovimiento <> 0 AndAlso (UsaComplementariaProveedores Or IdCtaContable > 0) Then 'Cuando tiene complementaria lo dividimos en dos
|
||||||
importeMX = ImporteMovimiento
|
importeMX = ImporteMovimiento
|
||||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0.00D, Referencia, CveConceptoComplementaria, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, CveCompra:=gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedor, ImporteMX:=Math.Round(ImporteMovimiento * tipoCambioCompraValuacion - ImporteMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioCompraValuacion, CveCuenta:=CveCuentaComplementaria) Then
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0.00D, Referencia, CveConceptoComplementaria, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, CveCompra:=gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedor, ImporteMX:=Math.Round(ImporteMovimiento * tipoCambioCompraValuacion - ImporteMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioCompraValuacion, CveCuenta:=CveCuentaComplementaria) Then
|
||||||
MsgError = "No se pudo insertar la póliza"
|
MsgError = "No se pudo insertar la póliza"
|
||||||
@@ -2034,7 +2037,7 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
|
|
||||||
If (Not DivTarjeta.Visible Or DdlTarjeta.SelectedValue.ToEntero = -1) Then
|
If (Not DivTarjeta.Visible Or DdlTarjeta.SelectedValue.ToEntero = -1) Then
|
||||||
If TipoCambioPago > 1 AndAlso CveMoneda = 2 Then
|
If TipoCambioPago > 1 AndAlso CveMoneda = 2 Then
|
||||||
If UsuarioActual.CveEmpresa = 119 Or (CveCuentaBancariaComplementaria > 0 OrElse IdCuentaBancariaComplementaria > 0) Then
|
If UsaComplementariaBancos Or (CveCuentaBancariaComplementaria > 0 OrElse IdCuentaBancariaComplementaria > 0) Then
|
||||||
If CveMoneda = 2 AndAlso CveMonedaFiltro = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES
|
If CveMoneda = 2 AndAlso CveMonedaFiltro = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES
|
||||||
TipoCambioPago = TxtTCDolares.Text.ToDecimal
|
TipoCambioPago = TxtTCDolares.Text.ToDecimal
|
||||||
ElseIf CveMoneda = 2 AndAlso CveMonedaFiltro = 2 Then
|
ElseIf CveMoneda = 2 AndAlso CveMonedaFiltro = 2 Then
|
||||||
@@ -3121,6 +3124,7 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
Dim CveMoneda As Integer = gr.DataKey("CveMoneda").ToEntero
|
Dim CveMoneda As Integer = gr.DataKey("CveMoneda").ToEntero
|
||||||
Dim FechaCompra As Date = gr.DataKey("Fecha").ToDate
|
Dim FechaCompra As Date = gr.DataKey("Fecha").ToDate
|
||||||
Dim CveSubProyecto As Integer = gr.DataKey("CveSubProyecto").ToEntero
|
Dim CveSubProyecto As Integer = gr.DataKey("CveSubProyecto").ToEntero
|
||||||
|
Dim UsaComplementariaProveedores As Boolean = If(UsuarioActual.CveEmpresa.Contiene(119, 158), True, False)
|
||||||
|
|
||||||
Dim CveConceptoContablePago As Integer = 17
|
Dim CveConceptoContablePago As Integer = 17
|
||||||
If gr.DataKey("CveTipoConcepto").ToEntero = 2 Then CveConceptoContablePago = 308 'cuando es acreedor
|
If gr.DataKey("CveTipoConcepto").ToEntero = 2 Then CveConceptoContablePago = 308 'cuando es acreedor
|
||||||
@@ -3141,7 +3145,7 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
|
|
||||||
CvePrePoliza = ObjConta.AddPrePolizas("Bancos/ProveedoresAbonar/Saldar", 98, gr.DataKey("Saldo").ToDecimal, gr.DataKey("Saldo").ToDecimal, gr.DataKey("CveMoneda").ToEntero, TxtFechaIncobrable.Text.ToDate, ConceptoPartida, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
CvePrePoliza = ObjConta.AddPrePolizas("Bancos/ProveedoresAbonar/Saldar", 98, gr.DataKey("Saldo").ToDecimal, gr.DataKey("Saldo").ToDecimal, gr.DataKey("CveMoneda").ToEntero, TxtFechaIncobrable.Text.ToDate, ConceptoPartida, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
If CveMoneda > 1 AndAlso (IdCtaContComplementaria > 0 Or UsuarioActual.CveEmpresa = 119) Then
|
If CveMoneda > 1 AndAlso (IdCtaContComplementaria > 0 Or UsaComplementariaProveedores) Then
|
||||||
IdCtaContable = IdCtaContComplementaria
|
IdCtaContable = IdCtaContComplementaria
|
||||||
CveCuenta = CveCuentaProveedorExtranjera
|
CveCuenta = CveCuentaProveedorExtranjera
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, 0.00D, gr.DataKey("SerieFolio").ToString, CveConceptoContableComplementaria, ConceptoPartida, Now, IdCtaContable:=IdCtaContable, CveIE:=-1, IdSegmentoNegocio:=-1, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=Math.Round(Saldo * TCCompra - Saldo, 2, MidpointRounding.AwayFromZero), ImporteME:=Saldo, TipoCambio:=TCCompra, CveCuenta:=CveCuentaComplementaria) Then
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, 0.00D, gr.DataKey("SerieFolio").ToString, CveConceptoContableComplementaria, ConceptoPartida, Now, IdCtaContable:=IdCtaContable, CveIE:=-1, IdSegmentoNegocio:=-1, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=Math.Round(Saldo * TCCompra - Saldo, 2, MidpointRounding.AwayFromZero), ImporteME:=Saldo, TipoCambio:=TCCompra, CveCuenta:=CveCuentaComplementaria) Then
|
||||||
|
|||||||
@@ -80,6 +80,17 @@
|
|||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
|
||||||
|
<asp:UpdatePanel runat="server" ID="UpAccionesContratos" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
|
||||||
|
<li runat="server" visible="false" id="LiAccionesContratos">
|
||||||
|
<asp:LinkButton ID="LnkContratos" OnClick="LnkContratos_Click" runat="server"><i class='fa fa-th-list'></i> Contratos</asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
<Triggers>
|
<Triggers>
|
||||||
<asp:PostBackTrigger ControlID="LnkExportaGv" />
|
<asp:PostBackTrigger ControlID="LnkExportaGv" />
|
||||||
@@ -5134,10 +5145,60 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div id="DvModalContratos" class="modal ADS fade" role="dialog">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
|
||||||
|
<!-- Modal content-->
|
||||||
|
<div class="modal-content" style="width: 500px; margin-left: 50px;">
|
||||||
|
<div class="modal-header ">
|
||||||
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
|
<h4 class="modal-title">Contratos de Obra</h4>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-body">
|
||||||
|
<asp:UpdatePanel runat="server" ID="UpModalcontratos">
|
||||||
|
<ContentTemplate>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
<div class="col-md-2" style="text-align: center; margin-top: 5px">
|
||||||
|
Contrato:
|
||||||
|
</div>
|
||||||
|
<div class="col-md-10">
|
||||||
|
<asp:DropDownList ID="DdlContrato" runat="server" DataTextField="ContratoCompleto" DataValueField="CveContrato" Class="select2me" Width="100%" ></asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-5"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<asp:UpdatePanel runat="server">
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:Button ID="BtnModalContratos" OnClick="BtnModalContratos_Click" runat="server" ClientIDMode="Static" Text="Guardar" CssClass="btn btn-primary" />
|
||||||
|
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content4" ContentPlaceHolderID="JS" runat="server">
|
<asp:Content ID="Content4" ContentPlaceHolderID="JS" runat="server">
|
||||||
<script src="/Metronic/assets/global/plugins/jquery.pulsate.min.js"></script>
|
<script src="/Metronic/assets/global/plugins/jquery.pulsate.min.js"></script>
|
||||||
|
|||||||
@@ -1165,6 +1165,26 @@ Partial Class Compras_Compras
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Private Property CveContratoObra As Integer
|
||||||
|
Get
|
||||||
|
If ViewState("CveContratoObra") Is Nothing Then
|
||||||
|
Return -1
|
||||||
|
Else
|
||||||
|
Return ViewState("CveContratoObra").ToString.ToEntero
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
ViewState("CveContratoObra") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
If Not IsPostBack Then
|
If Not IsPostBack Then
|
||||||
'ImgBtnBuscarOC.Attributes.Add("data-toggle", "tooltip")
|
'ImgBtnBuscarOC.Attributes.Add("data-toggle", "tooltip")
|
||||||
@@ -1186,6 +1206,7 @@ Partial Class Compras_Compras
|
|||||||
CveConceptoContableAlmacen = 0
|
CveConceptoContableAlmacen = 0
|
||||||
EsNoDeducible = False
|
EsNoDeducible = False
|
||||||
CveTipoConcepto = 1
|
CveTipoConcepto = 1
|
||||||
|
CargaContratos()
|
||||||
'******** Prorrateo ********************************************
|
'******** Prorrateo ********************************************
|
||||||
If UsuarioActual.Empresa.Funcionalidad(117) <> "" Then
|
If UsuarioActual.Empresa.Funcionalidad(117) <> "" Then
|
||||||
btnProrateo.Visible = True
|
btnProrateo.Visible = True
|
||||||
@@ -1314,7 +1335,7 @@ Partial Class Compras_Compras
|
|||||||
Dim ObjPersonal As New ClsRH
|
Dim ObjPersonal As New ClsRH
|
||||||
ObjPersonal.GetPersonal(-1, UsuarioActual.CveEmpresa)
|
ObjPersonal.GetPersonal(-1, UsuarioActual.CveEmpresa)
|
||||||
DdlPersonal.DataSource = ObjPersonal.DtResultados
|
DdlPersonal.DataSource = ObjPersonal.DtResultados
|
||||||
DdlPersonalReembolso.DataSource = ObjPersonal.DtResultados
|
DdlPersonalReembolso.DataSource = ObjPersonal.DtResultados.FiltraParametros("CveEstatusPersonal = 1")
|
||||||
ObjPersonal.Dispose()
|
ObjPersonal.Dispose()
|
||||||
DdlPersonal.DataBind()
|
DdlPersonal.DataBind()
|
||||||
DdlPersonalReembolso.DataBind()
|
DdlPersonalReembolso.DataBind()
|
||||||
@@ -1442,6 +1463,8 @@ Partial Class Compras_Compras
|
|||||||
DivEsNoDeducible.Visible = True
|
DivEsNoDeducible.Visible = True
|
||||||
DivActualizarVincular.Visible = True
|
DivActualizarVincular.Visible = True
|
||||||
|
|
||||||
|
'LiAccionesContratos.Visible = False
|
||||||
|
|
||||||
Else
|
Else
|
||||||
|
|
||||||
ViewState("CveProveedor") = -1
|
ViewState("CveProveedor") = -1
|
||||||
@@ -4604,19 +4627,18 @@ Partial Class Compras_Compras
|
|||||||
CveEstatusFactura = 6
|
CveEstatusFactura = 6
|
||||||
End If
|
End If
|
||||||
'hay amortización directa como descuento. RMF Temporal
|
'hay amortización directa como descuento. RMF Temporal
|
||||||
If UsuarioActual.CveEmpresa = 119 Then
|
|
||||||
'If LblAmortizacion.Text.ToDouble > 0 AndAlso TxtDescuento.Text.ToDouble = 0 Then
|
|
||||||
' TxtDescuento.Text = LblAmortizacion.Text
|
|
||||||
' LblAmortizacion.Text = "0.00"
|
|
||||||
'End If
|
|
||||||
|
|
||||||
'o si el descuento es igual a la amortizacion
|
'If LblAmortizacion.Text.ToDouble > 0 AndAlso TxtDescuento.Text.ToDouble = 0 Then
|
||||||
'If LblAmortizacion.Text.ToDouble = TxtDescuento.Text.ToDouble Then
|
' TxtDescuento.Text = LblAmortizacion.Text
|
||||||
' TxtDescuento.Text = LblAmortizacion.Text
|
' LblAmortizacion.Text = "0.00"
|
||||||
' LblAmortizacion.Text = "0.00"
|
'End If
|
||||||
'End If
|
|
||||||
|
'o si el descuento es igual a la amortizacion
|
||||||
|
'If LblAmortizacion.Text.ToDouble = TxtDescuento.Text.ToDouble Then
|
||||||
|
' TxtDescuento.Text = LblAmortizacion.Text
|
||||||
|
' LblAmortizacion.Text = "0.00"
|
||||||
|
'End If
|
||||||
|
|
||||||
End If
|
|
||||||
'si el registro es manual, toma el mismo dato
|
'si el registro es manual, toma el mismo dato
|
||||||
If CveFactura <= 0 Then TotalOriginal = TxtTotal.Text.ToDecimal
|
If CveFactura <= 0 Then TotalOriginal = TxtTotal.Text.ToDecimal
|
||||||
|
|
||||||
@@ -4637,7 +4659,7 @@ Partial Class Compras_Compras
|
|||||||
TxtRedondeo.Text.ToDouble, TxtTotal.Text.ToDouble, TxtFecha.Text.Trim.ToDate, DdlMoneda.SelectedValue.ToEntero, TipoCambio, TxtFechaPago.Text.Trim.ToDate, ChkAplicaNotaCredito.Checked, TxtObsFact.Text.Trim, CveEstatusFactura,
|
TxtRedondeo.Text.ToDouble, TxtTotal.Text.ToDouble, TxtFecha.Text.Trim.ToDate, DdlMoneda.SelectedValue.ToEntero, TipoCambio, TxtFechaPago.Text.Trim.ToDate, ChkAplicaNotaCredito.Checked, TxtObsFact.Text.Trim, CveEstatusFactura,
|
||||||
CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, IdPoliza, CveCajaChica:=CveCajaChica, CvePersonal:=CvePersonal, NumeroReembolso:=NumeroReembolso, CveProveedorSucursal:=DdlProveedorSucursal.SelectedValue.ToEntero,
|
CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, IdPoliza, CveCajaChica:=CveCajaChica, CvePersonal:=CvePersonal, NumeroReembolso:=NumeroReembolso, CveProveedorSucursal:=DdlProveedorSucursal.SelectedValue.ToEntero,
|
||||||
AplicoPromocion:=ChkOCPromocion.Checked, PorcentajeIVA:=PorcentajeIVA, CveMetodoPago:=CveMetodoPago, CveRetIVAConcepto:=If(DdlRetIVAConcepto.Items.Count > 0, DdlRetIVAConcepto.SelectedValue.ToEntero, -1), CveConceptoContableAlmacen:=CveConceptoContableAlmacen,
|
AplicoPromocion:=ChkOCPromocion.Checked, PorcentajeIVA:=PorcentajeIVA, CveMetodoPago:=CveMetodoPago, CveRetIVAConcepto:=If(DdlRetIVAConcepto.Items.Count > 0, DdlRetIVAConcepto.SelectedValue.ToEntero, -1), CveConceptoContableAlmacen:=CveConceptoContableAlmacen,
|
||||||
CveRetISRConcepto:=If(DdlRetISRConcepto.Items.Count > 0, DdlRetISRConcepto.SelectedValue.ToEntero, -1), NoDeducible:=EsNoDeducible, CveTipoCompra:=DdlTipoCompra.SelectedValue.ToEntero, TotalOriginal:=TotalOriginal, CveTipoConcepto:=CveTipoConcepto) Then
|
CveRetISRConcepto:=If(DdlRetISRConcepto.Items.Count > 0, DdlRetISRConcepto.SelectedValue.ToEntero, -1), NoDeducible:=EsNoDeducible, CveTipoCompra:=DdlTipoCompra.SelectedValue.ToEntero, TotalOriginal:=TotalOriginal, CveTipoConcepto:=CveTipoConcepto, CveContrato:=CveContratoObra) Then
|
||||||
|
|
||||||
ViewState("CveCompra") = ObjCompras.CveCompra
|
ViewState("CveCompra") = ObjCompras.CveCompra
|
||||||
If ObjCompras.DtResultados.Rows.Count > 0 Then ViewState("CompraFolio") = ObjCompras.DtResultados.Rows(0)("vFolio").ToString
|
If ObjCompras.DtResultados.Rows.Count > 0 Then ViewState("CompraFolio") = ObjCompras.DtResultados.Rows(0)("vFolio").ToString
|
||||||
@@ -5030,7 +5052,7 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
|
Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa = 119 AndAlso (DdlPersonalReembolso.SelectedValue.ToEntero > 0 Or DdlCuentaCajaChicaReembolso.SelectedValue.ToEntero > 0 Or DdlTipoComprobante.SelectedValue = "Ant") Then
|
If UsuarioActual.CveEmpresa.Contiene(119, 158) AndAlso (DdlPersonalReembolso.SelectedValue.ToEntero > 0 Or DdlCuentaCajaChicaReembolso.SelectedValue.ToEntero > 0 Or DdlTipoComprobante.SelectedValue = "Ant") Then
|
||||||
AutoConta = False
|
AutoConta = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -6897,7 +6919,7 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
If Not RegistroCuentaPuente AndAlso Not ChkNCInvNC.Checked Then
|
If Not RegistroCuentaPuente AndAlso Not ChkNCInvNC.Checked Then
|
||||||
'GASTO
|
'GASTO
|
||||||
If UsuarioActual.CveEmpresa = 119 Then
|
If UsuarioActual.CveEmpresa.Contiene(119, 158) Then
|
||||||
DT = TmpDT
|
DT = TmpDT
|
||||||
Else
|
Else
|
||||||
DT = TmpDT.FiltraParametros("ISNULL(AplicaCostoIndirecto,0) <> 1")
|
DT = TmpDT.FiltraParametros("ISNULL(AplicaCostoIndirecto,0) <> 1")
|
||||||
@@ -7034,6 +7056,7 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
Case 5 'Proveedores
|
Case 5 'Proveedores
|
||||||
If CveTipoConcepto = 2 Then ConceptoContable = 305 'cuando es acreedor
|
If CveTipoConcepto = 2 Then ConceptoContable = 305 'cuando es acreedor
|
||||||
|
Dim UsaComplementaria As Boolean = UsuarioActual.CveEmpresa.Contiene(119, 158)
|
||||||
If tipoCambioActual <> 1 Then
|
If tipoCambioActual <> 1 Then
|
||||||
Select Case ConceptoContable
|
Select Case ConceptoContable
|
||||||
Case 5
|
Case 5
|
||||||
@@ -7059,7 +7082,7 @@ Partial Class Compras_Compras
|
|||||||
Else
|
Else
|
||||||
IdCtaContable = CtaProveedorComplementaria
|
IdCtaContable = CtaProveedorComplementaria
|
||||||
CveCuenta = CveCuentaProveedorComplementaria
|
CveCuenta = CveCuentaProveedorComplementaria
|
||||||
If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or CveCuenta > 0 Or UsuarioActual.CveEmpresa = 119) Then 'Cuando tiene complementaria lo dividimos en dos Then
|
If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or CveCuenta > 0 OrElse UsaComplementaria) Then 'Cuando tiene complementaria lo dividimos en dos Then
|
||||||
importeMN = importeMovimiento
|
importeMN = importeMovimiento
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Referencia, CveConceptoContableComplementaria, Concepto, FechaMovimiento, IdCtaContable, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=importeMovimiento * tipoCambioActual - importeMovimiento, ImporteME:=importeMovimiento, CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Referencia, CveConceptoContableComplementaria, Concepto, FechaMovimiento, IdCtaContable, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=importeMovimiento * tipoCambioActual - importeMovimiento, ImporteME:=importeMovimiento, CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
|
||||||
ErrorPrepoliza = True
|
ErrorPrepoliza = True
|
||||||
@@ -15228,7 +15251,7 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
'SI PUEDE RECIBIR POR OC Y COMPRA
|
'SI PUEDE RECIBIR POR OC Y COMPRA
|
||||||
' si usa almacen, si tiene activado que reciba por OC, y que si la compra tipo Proveedor. que lo muestre
|
' si usa almacen, si tiene activado que reciba por OC, y que si la compra tipo Proveedor. que lo muestre
|
||||||
If UsuarioActual.CveEmpresa = 119 AndAlso UsuarioActual.Empresa.UsaInventarios And UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 AndAlso CveTipoConcepto = 1 Then
|
If UsuarioActual.CveEmpresa.Contiene(119, 158) AndAlso UsuarioActual.Empresa.UsaInventarios And UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 AndAlso CveTipoConcepto = 1 Then
|
||||||
DivOCVinculaInv.Visible = True
|
DivOCVinculaInv.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -15270,7 +15293,7 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
'PROMOCIONES
|
'PROMOCIONES
|
||||||
LtOCPromocion.Text = StrPromos.ToString
|
LtOCPromocion.Text = StrPromos.ToString
|
||||||
If LtOCPromocion.Text.Length > 0 And UsuarioActual.CveEmpresa = 119 Then
|
If LtOCPromocion.Text.Length > 0 And UsuarioActual.CveEmpresa.Contiene(119, 158) Then
|
||||||
DivOCPromocion.Visible = True
|
DivOCPromocion.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -15544,12 +15567,6 @@ Partial Class Compras_Compras
|
|||||||
'If DdlOCVinculaInv.SelectedValue.ToEntero = 237 And Not CveFlete > 0 Then Alert("Necesita vincular un flete si selecciona Factura de Flete", TipoMensaje.MsgAdvertencia) : Exit Sub
|
'If DdlOCVinculaInv.SelectedValue.ToEntero = 237 And Not CveFlete > 0 Then Alert("Necesita vincular un flete si selecciona Factura de Flete", TipoMensaje.MsgAdvertencia) : Exit Sub
|
||||||
'If DdlOCVinculaInv.SelectedValue.ToEntero = 240 And Not CveImportacion > 0 Then Alert("Necesita vincular una Importación si selecciona Factura de Importación", TipoMensaje.MsgAdvertencia) : Exit Sub
|
'If DdlOCVinculaInv.SelectedValue.ToEntero = 240 And Not CveImportacion > 0 Then Alert("Necesita vincular una Importación si selecciona Factura de Importación", TipoMensaje.MsgAdvertencia) : Exit Sub
|
||||||
|
|
||||||
'If UsuarioActual.CveEmpresa = 119 And DdlTipoComprobante.SelectedValue = "Fac" Then
|
|
||||||
' If Not VerificarProductosCompraConOC() Then
|
|
||||||
' Exit Sub
|
|
||||||
' End If
|
|
||||||
'End If
|
|
||||||
|
|
||||||
Dim SubTotalGV = 0.0D
|
Dim SubTotalGV = 0.0D
|
||||||
Dim Amortizacion As Decimal = TmpDT.SUMD("Total")
|
Dim Amortizacion As Decimal = TmpDT.SUMD("Total")
|
||||||
If ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 Then
|
If ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 Then
|
||||||
@@ -15612,7 +15629,7 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
'SI PUEDE RECIBIR POR OC Y COMPRA
|
'SI PUEDE RECIBIR POR OC Y COMPRA
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa = 119 AndAlso UsuarioActual.Empresa.UsaInventarios And UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 AndAlso CveTipoConcepto = 1 Then
|
If UsuarioActual.CveEmpresa.Contiene(119, 158) AndAlso UsuarioActual.Empresa.UsaInventarios And UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 AndAlso CveTipoConcepto = 1 Then
|
||||||
|
|
||||||
If DdlOCVinculaInv.SelectedValue.ToEntero <= 0 Then
|
If DdlOCVinculaInv.SelectedValue.ToEntero <= 0 Then
|
||||||
Alert("El campo <b>Tipo de recepción almacén</b> es necesario. Por favor verifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
Alert("El campo <b>Tipo de recepción almacén</b> es necesario. Por favor verifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||||
@@ -16603,12 +16620,19 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
Protected Sub DdlTipoComprobante_SelectedIndexChanged(sender As Object, e As EventArgs)
|
Protected Sub DdlTipoComprobante_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
LiAccionesContratos.Visible = False
|
||||||
|
|
||||||
If DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
|
If DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
|
||||||
|
|
||||||
If DdlTipoComprobante.SelectedValue = "NC" Then
|
If DdlTipoComprobante.SelectedValue = "NC" Then
|
||||||
DivReembolso.Visible = False
|
DivReembolso.Visible = False
|
||||||
RBLPago.Items(2).Enabled = False
|
RBLPago.Items(2).Enabled = False
|
||||||
|
|
||||||
|
|
||||||
|
If Not CveCompra > 0 Then
|
||||||
|
LiAccionesContratos.Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
DivReembolso.Visible = True
|
DivReembolso.Visible = True
|
||||||
RBLPago.Items(2).Enabled = True
|
RBLPago.Items(2).Enabled = True
|
||||||
@@ -16632,6 +16656,8 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
UpAccionesContratos.Update()
|
||||||
UPCondicionesPago.Update()
|
UPCondicionesPago.Update()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -17275,7 +17301,7 @@ Partial Class Compras_Compras
|
|||||||
LblAmortizacion.Text = "0.00"
|
LblAmortizacion.Text = "0.00"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa = 119 AndAlso TieneAmortizacion Then
|
If UsuarioActual.CveEmpresa.Contiene(119, 158) AndAlso TieneAmortizacion Then
|
||||||
Amortizacion = LblAmortizacion.Text.Trim.ToDecimal
|
Amortizacion = LblAmortizacion.Text.Trim.ToDecimal
|
||||||
TxtSubTotal.Text = (TxtSubTotal.Text.ToDouble + Amortizacion).ToString
|
TxtSubTotal.Text = (TxtSubTotal.Text.ToDouble + Amortizacion).ToString
|
||||||
End If
|
End If
|
||||||
@@ -18798,9 +18824,9 @@ Partial Class Compras_Compras
|
|||||||
For Each gvr As GridViewRow In GvSolDev.Rows
|
For Each gvr As GridViewRow In GvSolDev.Rows
|
||||||
If gvr.FCTextBox("TxtCant").Text.ToDecimal > 0 Then
|
If gvr.FCTextBox("TxtCant").Text.ToDecimal > 0 Then
|
||||||
'actualiza el estatus del detalle
|
'actualiza el estatus del detalle
|
||||||
ObjCompras.UpdateEstatusAlmacenDetalle(gvr.DataKey("CveCompraDetalle").ToEntero, 0, UsuarioActual.CveUsuario)
|
ObjCompras.UpdateEstatusAlmacenDetalle(gvr.DataKey("CveCompraDetalle").ToEntero, 0, UsuarioActual.CveUsuario, CantidadDevolucion:=gvr.FCTextBox("TxtCant").Text.ToDecimal)
|
||||||
Else
|
Else
|
||||||
ObjCompras.UpdateEstatusAlmacenDetalle(gvr.DataKey("CveCompraDetalle").ToEntero, 1, UsuarioActual.CveUsuario)
|
ObjCompras.UpdateEstatusAlmacenDetalle(gvr.DataKey("CveCompraDetalle").ToEntero, 1, UsuarioActual.CveUsuario, CantidadDevolucion:=0)
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
@@ -20447,6 +20473,24 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
Protected Sub BtnModalContratos_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
RegistraScript("$('#DvModalContratos').modal('hide');")
|
||||||
|
CveContratoObra = DdlContrato.SelectedValue.ToEntero
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
Protected Sub LnkContratos_Click(sender As Object, e As EventArgs)
|
||||||
|
RegistraScript("$('#DvModalContratos').modal('show');")
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
Public Class MMensajeDevolucion
|
Public Class MMensajeDevolucion
|
||||||
|
|||||||
@@ -1322,10 +1322,10 @@ Partial Class PopUpVerFactura
|
|||||||
Dim CantidadProductos As Decimal = 0
|
Dim CantidadProductos As Decimal = 0
|
||||||
Dim CantidadUsados As Decimal = 0
|
Dim CantidadUsados As Decimal = 0
|
||||||
|
|
||||||
If CveConcepto = 3 Or CveConcepto = 18 Or CveConcepto = 30 Or CveConcepto = 34 Or CveConcepto = 35 Or CveConcepto = 16 Or CveConcepto = 7 Then 'SALIDA Y DEVOLUCION DEL CLIENTE
|
If CveConcepto = 3 Or CveConcepto = 18 Or CveConcepto = 30 Or CveConcepto = 34 Or CveConcepto = 35 Or CveConcepto = 16 Or CveConcepto = 7 Or CveConcepto = 40 Then 'SALIDA Y DEVOLUCION DEL CLIENTE
|
||||||
If ObjInventarios.GetMovimientosDetalleImpresion(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
If ObjInventarios.GetMovimientosDetalleImpresion(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
||||||
DtMovimientos = ObjInventarios.DtResultados
|
DtMovimientos = ObjInventarios.DtResultados
|
||||||
|
Alert("asdf")
|
||||||
DtMovimientos.Columns("No").AutoIncrement = True
|
DtMovimientos.Columns("No").AutoIncrement = True
|
||||||
DtMovimientos.Columns("No").AutoIncrementSeed = DtMovimientos.Rows.Count + 1
|
DtMovimientos.Columns("No").AutoIncrementSeed = DtMovimientos.Rows.Count + 1
|
||||||
DtMovimientos.Columns("No").AutoIncrementStep = 1
|
DtMovimientos.Columns("No").AutoIncrementStep = 1
|
||||||
@@ -1630,6 +1630,7 @@ Partial Class PopUpVerFactura
|
|||||||
params.Add(New ReportParameter("Descuentos", If(CveCompra > 0 AndAlso dr IsNot Nothing, (dr("Descuentos").ToString.ToDouble).FormatoNumero(2), "")))
|
params.Add(New ReportParameter("Descuentos", If(CveCompra > 0 AndAlso dr IsNot Nothing, (dr("Descuentos").ToString.ToDouble).FormatoNumero(2), "")))
|
||||||
params.Add(New ReportParameter("IVA", If(CveCompra > 0 AndAlso dr IsNot Nothing, dr("IVA").ToString.FormatoNumero(2), "")))
|
params.Add(New ReportParameter("IVA", If(CveCompra > 0 AndAlso dr IsNot Nothing, dr("IVA").ToString.FormatoNumero(2), "")))
|
||||||
params.Add(New ReportParameter("Total", If(CveCompra > 0 AndAlso dr IsNot Nothing, dr("Total").ToString.FormatoNumero(2), "")))
|
params.Add(New ReportParameter("Total", If(CveCompra > 0 AndAlso dr IsNot Nothing, dr("Total").ToString.FormatoNumero(2), "")))
|
||||||
|
params.Add(New ReportParameter("Observaciones", Observaciones))
|
||||||
'params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
|
'params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
|
||||||
params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio)))
|
params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio)))
|
||||||
If (UsuarioActual.CveEmpresa = 72) Then
|
If (UsuarioActual.CveEmpresa = 72) Then
|
||||||
@@ -1638,7 +1639,7 @@ Partial Class PopUpVerFactura
|
|||||||
ImprimirPDF("Empresas/Grales/Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Entrada de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios")
|
ImprimirPDF("Empresas/Grales/Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Entrada de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Case 3, 16, 37 ' S A L I D A S
|
Case 3, 16, 37, 40 ' S A L I D A S
|
||||||
'Dim Archivo As New System.IO.FileInfo(String.Format("Empresas/{0}/Formatos/Salidas.rdlc", 72))
|
'Dim Archivo As New System.IO.FileInfo(String.Format("Empresas/{0}/Formatos/Salidas.rdlc", 72))
|
||||||
'Dim Imagen As New System.IO.FileInfo(String.Format("Empresas/{0}/Logo.png", 72))
|
'Dim Imagen As New System.IO.FileInfo(String.Format("Empresas/{0}/Logo.png", 72))
|
||||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/Salidas.rdlc", UsuarioActual.Empresa.Ruta))
|
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/Salidas.rdlc", UsuarioActual.Empresa.Ruta))
|
||||||
@@ -1646,7 +1647,7 @@ Partial Class PopUpVerFactura
|
|||||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||||
Dim params As New List(Of ReportParameter)
|
Dim params As New List(Of ReportParameter)
|
||||||
Dim concepto As String = ""
|
Dim concepto As String = ""
|
||||||
If CveConcepto = 3 Then
|
If CveConcepto.Contiene(3, 40) Then
|
||||||
concepto = "SALIDA DE ALMACÉN"
|
concepto = "SALIDA DE ALMACÉN"
|
||||||
ElseIf CveConcepto = 37 Then
|
ElseIf CveConcepto = 37 Then
|
||||||
concepto = "SALIDA VIRTUAL"
|
concepto = "SALIDA VIRTUAL"
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ Partial Class Compras_ProveedoresAuxiliar
|
|||||||
If ObjConta.GetProveedoresAuxiliar(DdlProveeedores.SelectedValue.ToEntero, -1, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, UsuarioActual.CveEmpresa,
|
If ObjConta.GetProveedoresAuxiliar(DdlProveeedores.SelectedValue.ToEntero, -1, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, UsuarioActual.CveEmpresa,
|
||||||
DdlOpcion.SelectedValue.ToEntero, DdlTipoProveedor.SelectedValue.ToEntero, DdlOpcionContabilizable.SelectedValue.ToEntero) Then
|
DdlOpcion.SelectedValue.ToEntero, DdlTipoProveedor.SelectedValue.ToEntero, DdlOpcionContabilizable.SelectedValue.ToEntero) Then
|
||||||
If DdlOpcion.SelectedValue.ToEntero = 2 Then
|
If DdlOpcion.SelectedValue.ToEntero = 2 Then
|
||||||
GvP.DataSource = ObjConta.DtResultados.FiltraParametros($" IIF(ISNULL(CveConceptoContable,0) = 5 AND Importe >= 0,0,1) = 1 ")
|
GvP.DataSource = ObjConta.DtResultados '.FiltraParametros($" IIF(ISNULL(CveConceptoContable,0) in (5,311) AND Importe >= 0,0,1) = 1 ") 'excluye las provisiones
|
||||||
Else
|
Else
|
||||||
GvP.DataSource = ObjConta.DtResultados
|
GvP.DataSource = ObjConta.DtResultados
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -93,33 +93,40 @@ Partial Class Compras_ReembolsosComprobaciones
|
|||||||
|
|
||||||
Dim ObjPersonal As New ClsRH
|
Dim ObjPersonal As New ClsRH
|
||||||
ObjPersonal.GetPersonal(-1, UsuarioActual.CveEmpresa)
|
ObjPersonal.GetPersonal(-1, UsuarioActual.CveEmpresa)
|
||||||
DdlPersonal.DataSource = ObjPersonal.DtResultados.FiltraParametros("CveEstatusPersonal = 1")
|
|
||||||
ObjPersonal.Dispose()
|
|
||||||
DdlPersonal.DataBind()
|
|
||||||
|
|
||||||
CargaTipoTransaccion()
|
If UsuarioActual.CveEmpresa.Contiene(119, 158) Then
|
||||||
|
DdlPersonal.DataSource = ObjPersonal.DtResultados
|
||||||
If UsuarioActual.Empresa.Funcionalidad(506) = "1" Then
|
|
||||||
CbPermitirExcedente.Visible = True
|
|
||||||
Else
|
Else
|
||||||
CbPermitirExcedente.Visible = False
|
DdlPersonal.DataSource = ObjPersonal.DtResultados.FiltraParametros("CveEstatusPersonal = 1")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa.Contiene(1, 4, 7, 11, 12, 72, 80, 119) Then
|
|
||||||
rowComisiones.Visible = True
|
ObjPersonal.Dispose()
|
||||||
|
DdlPersonal.DataBind()
|
||||||
|
|
||||||
|
CargaTipoTransaccion()
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(506) = "1" Then
|
||||||
|
CbPermitirExcedente.Visible = True
|
||||||
|
Else
|
||||||
|
CbPermitirExcedente.Visible = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.CveEmpresa.Contiene(1, 4, 7, 11, 12, 72, 80, 119) Then
|
||||||
|
rowComisiones.Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.CveEmpresa = 119 Then
|
||||||
|
ChkReembolsarSinBancos.Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
TxtFechaPrePoliza.Text = Date.Now.ToShortDateString
|
||||||
|
|
||||||
|
'CargaCuentasDiferencia()
|
||||||
|
|
||||||
|
'TableDiferencia.Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa = 119 Then
|
|
||||||
ChkReembolsarSinBancos.Visible = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
TxtFechaPrePoliza.Text = Date.Now.ToShortDateString
|
|
||||||
|
|
||||||
'CargaCuentasDiferencia()
|
|
||||||
|
|
||||||
'TableDiferencia.Visible = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#Region " FILTROS "
|
#Region " FILTROS "
|
||||||
|
|||||||
@@ -291,6 +291,9 @@ Partial Class Compras_RepComprasDetalle
|
|||||||
FechaICaptura = If(IsDate(TxtFechaICaptura.Text.Trim()), TxtFechaICaptura.Text.Trim(), "-1")
|
FechaICaptura = If(IsDate(TxtFechaICaptura.Text.Trim()), TxtFechaICaptura.Text.Trim(), "-1")
|
||||||
FechaFCaptura = If(IsDate(TxtFechaFCaptura.Text.Trim()), TxtFechaFCaptura.Text.Trim(), "-1")
|
FechaFCaptura = If(IsDate(TxtFechaFCaptura.Text.Trim()), TxtFechaFCaptura.Text.Trim(), "-1")
|
||||||
|
|
||||||
|
Dim AnioMes As String = If(FechaF <> "-1", "-1", IfNull(Request("AnioMes"), "-1").ToString())
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If RblTipoCambio.SelectedValue.ToEntero = 3 And TxtEspecifico.Text <> "" Then
|
If RblTipoCambio.SelectedValue.ToEntero = 3 And TxtEspecifico.Text <> "" Then
|
||||||
TCEspecifico = TxtEspecifico.Text.ToDouble
|
TCEspecifico = TxtEspecifico.Text.ToDouble
|
||||||
@@ -301,7 +304,7 @@ Partial Class Compras_RepComprasDetalle
|
|||||||
Dim SubProyectos As String = IIf(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM).ToString
|
Dim SubProyectos As String = IIf(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM).ToString
|
||||||
Dim TipoGasto As String = IIf(DdlTipoGasto.GetSelectedValuesM = "", "-1", DdlTipoGasto.GetSelectedValuesM).ToString
|
Dim TipoGasto As String = IIf(DdlTipoGasto.GetSelectedValuesM = "", "-1", DdlTipoGasto.GetSelectedValuesM).ToString
|
||||||
|
|
||||||
If ObjCompras.GetRepComprasDetalle(DdlGrupo.SelectedValue.ToEntero, IfNull(Request("Anio"), Now.Year).ToString.ToEntero, IfNull(Request("Mes"), "-1").ToString.ToEntero, IfNull(Request("AnioMes"), "-1").ToString(), IfNull(Request("Fecha"), "-1").ToString(),
|
If ObjCompras.GetRepComprasDetalle(DdlGrupo.SelectedValue.ToEntero, IfNull(Request("Anio"), Now.Year).ToString.ToEntero, IfNull(Request("Mes"), "-1").ToString.ToEntero, AnioMes, IfNull(Request("Fecha"), "-1").ToString(),
|
||||||
DdlProveedores.SelectedValue.ToEntero, CveMoneda, DdlUsuario.SelectedValue.ToEntero, FechaI, FechaF, DDlUsuarioCaptura.SelectedValue.ToEntero,
|
DdlProveedores.SelectedValue.ToEntero, CveMoneda, DdlUsuario.SelectedValue.ToEntero, FechaI, FechaF, DDlUsuarioCaptura.SelectedValue.ToEntero,
|
||||||
IfNull(Request("NumeroRemesa"), "-1").ToString.ToEntero, IfNull(Request("CveUsuarioRemesa"), "-1").ToString.ToEntero, FechaICaptura, FechaFCaptura, IfNull(Request("FechaCaptura"), "-1").ToString,
|
IfNull(Request("NumeroRemesa"), "-1").ToString.ToEntero, IfNull(Request("CveUsuarioRemesa"), "-1").ToString.ToEntero, FechaICaptura, FechaFCaptura, IfNull(Request("FechaCaptura"), "-1").ToString,
|
||||||
SubProyectos, DdlTipoDocto.SelectedValue, UsuarioActual.CveEmpresa,
|
SubProyectos, DdlTipoDocto.SelectedValue, UsuarioActual.CveEmpresa,
|
||||||
|
|||||||
@@ -229,16 +229,21 @@
|
|||||||
<table width="100%">
|
<table width="100%">
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<asp:Button ID="BtnGuardar" runat="server" Text="Guardar" OnClick="BtnGuardar_Click" ValidationGroup="GrpGuardar" class="btn btn-primary" />
|
|
||||||
|
<asp:Button ID="BtnGuardar" runat="server" Text="Guardar" OnClick="BtnGuardar_Click" ValidationGroup="GrpGuardar" class="btn btn-primary" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModal" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
|
||||||
<div id="divAgregarSucursal" class="modal ADS fade" role="dialog">
|
<div id="divAgregarSucursal" class="modal ADS fade" role="dialog">
|
||||||
<div class="modal-dialog" style="width: 450px;">
|
<div class="modal-dialog" style="width: 450px;">
|
||||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModal" UpdateMode="Conditional">
|
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModal2" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="modal-header ">
|
<div class="modal-header ">
|
||||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
@@ -299,8 +304,18 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<asp:Button ID="LbAgregar" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpGuardarRegistro" />
|
<div class="row">
|
||||||
|
<div class="col-md-9">
|
||||||
|
<asp:Button ID="LbAgregar" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpGuardarRegistro" />
|
||||||
<button id="BtnCancelarSucursal" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
<button id="BtnCancelarSucursal" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-3" align="right" runat="server">
|
||||||
|
<label for="<%= ChkSeguirAgregando.ClientID.ToString()%>">Seguir agregando:</label>
|
||||||
|
<asp:CheckBox ID="ChkSeguirAgregando" runat="server" Checked="true" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<asp:HiddenField ID="HdnModalidad" runat="server" Value="I" ClientIDMode="Static" />
|
<asp:HiddenField ID="HdnModalidad" runat="server" Value="I" ClientIDMode="Static" />
|
||||||
<asp:HiddenField ID="HdnID" runat="server" Value="-1" ClientIDMode="Static" />
|
<asp:HiddenField ID="HdnID" runat="server" Value="-1" ClientIDMode="Static" />
|
||||||
@@ -308,7 +323,8 @@
|
|||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -231,9 +231,14 @@ Partial Class Contabilidad_PlantillasPolizasDetalle
|
|||||||
If CvePlantillaPoliza > 0 Then
|
If CvePlantillaPoliza > 0 Then
|
||||||
If ObjPlantillaPolizaDetalle.AddConta_PlantillasPolizasDetalles(CvePlantillaPoliza, DdlConcepto.SelectedValue.ToEntero, DdlTipoMovimiento.SelectedValue.ToEntero, DdlCtaContable.SelectedValue.ToEntero, TxtOrden.Text.Trim.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DDLSubProyecto.SelectedValue.ToEntero, DDLProveedor.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero, DdlPorcentajeImpuesto.SelectedValue.ToDecimal) Then
|
If ObjPlantillaPolizaDetalle.AddConta_PlantillasPolizasDetalles(CvePlantillaPoliza, DdlConcepto.SelectedValue.ToEntero, DdlTipoMovimiento.SelectedValue.ToEntero, DdlCtaContable.SelectedValue.ToEntero, TxtOrden.Text.Trim.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DDLSubProyecto.SelectedValue.ToEntero, DDLProveedor.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero, DdlPorcentajeImpuesto.SelectedValue.ToDecimal) Then
|
||||||
TxtOrden.Text = ""
|
TxtOrden.Text = ""
|
||||||
updatatos()
|
If Not ChkSeguirAgregando.Checked Then
|
||||||
Alert("El nuevo Registro se guardó correctamente.", TipoMensaje.MsgInformacion)
|
updatatos()
|
||||||
UpTitulos.Update()
|
Alert("El nuevo Registro se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||||
|
Else
|
||||||
|
RegistraScript(String.Format("$('#{0}').modal();", "divAgregarSucursal"))
|
||||||
|
UpModal.Update()
|
||||||
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
ErrorDetalle = True
|
ErrorDetalle = True
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -298,14 +298,14 @@
|
|||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|
||||||
<asp:GridView ID="GvCompara" runat="server" GridLines="None" AutoGenerateColumns="False" EmptyDataText="" CssClass="table table-striped table-hover table-advance Widthall">
|
<asp:GridView ID="GvCompara" runat="server" GridLines="None" AutoGenerateColumns="False" EmptyDataText="" CssClass="table table-striped table-hover table-advance Widthall" OnRowDataBound="GvCompara_RowDataBound">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField DataField="Msg" HeaderText="Mensaje" />
|
<asp:BoundField DataField="Msg" HeaderText="Mensaje" />
|
||||||
<asp:BoundField DataField="FueConciliado" HeaderText="Conciliado" />
|
<asp:BoundField DataField="FueConciliado" HeaderText="Conciliado" />
|
||||||
<asp:BoundField DataField="Fecha" HeaderText="Fecha" DataFormatString="{0:d}" />
|
<asp:BoundField DataField="Fecha" HeaderText="Fecha" DataFormatString="{0:d}" />
|
||||||
<asp:BoundField DataField="ImporteMN" HeaderText="Importe" DataFormatString="{0:N2}" />
|
<asp:BoundField DataField="ImporteMN" HeaderText="Importe" DataFormatString="{0:N2}" />
|
||||||
<asp:HyperLinkField DataTextField="CvePrePoliza" DataNavigateUrlFormatString="/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}" DataNavigateUrlFields="CvePrePoliza" HeaderText="Prepoliza" />
|
<asp:HyperLinkField DataTextField="FolioPoliza" DataNavigateUrlFormatString="/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}" DataNavigateUrlFields="CvePrePoliza" HeaderText="Prepoliza" />
|
||||||
<asp:HyperLinkField DataTextField="CveIE" DataNavigateUrlFormatString="/Bancos/IE.aspx?CveIE={0}" DataNavigateUrlFields="CveIE" HeaderText="IE" />
|
<asp:HyperLinkField DataTextField="FolioIE" DataNavigateUrlFormatString="/Bancos/IE.aspx?CveIE={0}" DataNavigateUrlFields="CveIE" HeaderText="IE" />
|
||||||
<asp:BoundField DataField="FechaAplicado" HeaderText="Fecha Aplicado" DataFormatString="{0:d}" />
|
<asp:BoundField DataField="FechaAplicado" HeaderText="Fecha Aplicado" DataFormatString="{0:d}" />
|
||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
|
|||||||
@@ -221,10 +221,10 @@ public partial class Contabilidad_RepIVA : ClsPaginas
|
|||||||
System.IO.FileInfo Archivo = new System.IO.FileInfo(string.Format("{0}/Formatos/{1}", UsuarioActual.Empresa.Ruta, Formato));
|
System.IO.FileInfo Archivo = new System.IO.FileInfo(string.Format("{0}/Formatos/{1}", UsuarioActual.Empresa.Ruta, Formato));
|
||||||
string Ruta;// = (Archivo.Exists ? string.Format("{0}/{1}", UsuarioActual.Empresa.Ruta, Formato ): ModExtensiones.DirectorioBaseEmpresas + $@"Empresas\Grales\Formatos\{Formato}");
|
string Ruta;// = (Archivo.Exists ? string.Format("{0}/{1}", UsuarioActual.Empresa.Ruta, Formato ): ModExtensiones.DirectorioBaseEmpresas + $@"Empresas\Grales\Formatos\{Formato}");
|
||||||
|
|
||||||
Alert(string.Format("{0}/Formatos/{1}", UsuarioActual.Empresa.Ruta, Formato));
|
//Alert(string.Format("{0}Formatos\\{1}", UsuarioActual.Empresa.Ruta, Formato));
|
||||||
if (Archivo.Exists)
|
if (Archivo.Exists)
|
||||||
{
|
{
|
||||||
Ruta = string.Format("{0}/Formatos/{1}", UsuarioActual.Empresa.Ruta, Formato);
|
Ruta = string.Format("{0}Formatos\\{1}", UsuarioActual.Empresa.Ruta, Formato);
|
||||||
ImprimirbytesPDF(ImprimirPDFCrystal(Ruta, Dt, para, "Reporte de IVA", Opcion), "Reporte de IVA", Opcion);
|
ImprimirbytesPDF(ImprimirPDFCrystal(Ruta, Dt, para, "Reporte de IVA", Opcion), "Reporte de IVA", Opcion);
|
||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
@@ -371,4 +371,15 @@ public partial class Contabilidad_RepIVA : ClsPaginas
|
|||||||
{
|
{
|
||||||
return (Valor.ToDecimal() > 0) ? Valor.ToDecimal().ToString().FormatoNumero(0).Replace(",", string.Empty) : "";
|
return (Valor.ToDecimal() > 0) ? Valor.ToDecimal().ToString().FormatoNumero(0).Replace(",", string.Empty) : "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void GvCompara_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||||
|
{
|
||||||
|
if (e.Row.DBCampo("FueConciliado") == "")
|
||||||
|
{
|
||||||
|
e.Row.CssClass = "SubTotales";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepEstadoResultadosHorizontal.aspx.vb" Inherits="Contabilidad_RepEstadoResultadosHorizontal" %>
|
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepEstadoResultadosHorizontal.aspx.vb" Inherits="Contabilidad_RepEstadoResultadosHorizontal" EnableEventValidation="false" %>
|
||||||
|
|
||||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
@@ -1048,6 +1048,28 @@
|
|||||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
|
||||||
|
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
|
||||||
<%--<asp:TemplateField HeaderText="Período Actual">
|
<%--<asp:TemplateField HeaderText="Período Actual">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||||
@@ -1120,6 +1142,30 @@
|
|||||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
|
||||||
|
|
||||||
<%-- <asp:TemplateField HeaderText="Período Actual">
|
<%-- <asp:TemplateField HeaderText="Período Actual">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||||
@@ -1192,6 +1238,30 @@
|
|||||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Acumulado">
|
<asp:TemplateField HeaderText="Acumulado">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAcumulado", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAcumulado", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||||
|
|||||||
@@ -1821,7 +1821,7 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
|||||||
|
|
||||||
Row = DtGastosSubProyectoH.NewRow
|
Row = DtGastosSubProyectoH.NewRow
|
||||||
|
|
||||||
If DtGastosSubProyectoH.Rows.Count > 0 Then
|
If DtGastosSubProyectoH.Rows.Count > 1 Then
|
||||||
|
|
||||||
|
|
||||||
IndexData = 0
|
IndexData = 0
|
||||||
|
|||||||
@@ -942,7 +942,7 @@
|
|||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
|
|
||||||
<asp:GridView ID="GvInsumos" ClientIDMode="Static" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron Conceptos"
|
<asp:GridView ID="GvInsumos" ClientIDMode="Static" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron Conceptos"
|
||||||
DataKeyNames="CveContratoDetalle,CveUM, CvePS, Cantidad, PU,CveTipoPresupuesto,CveClasificacion,CodigoPS,LimitarCantidad,PS,NoIdentificacion,CantidadContratada" ShowHeader="true" SelectedRowStyle-BackColor="#66CCFF"
|
DataKeyNames="CveContratoDetalle,CveUM, CvePS, Cantidad, PU,CveTipoPresupuesto,CveClasificacion,CodigoPS,LimitarCantidad,PS,NoIdentificacion,CantidadContratada,Dias,CveRubro,CveActividad,CveSubTipoActivoFijo" ShowHeader="true" SelectedRowStyle-BackColor="#66CCFF"
|
||||||
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
||||||
|
|
||||||
<Columns>
|
<Columns>
|
||||||
@@ -997,6 +997,13 @@
|
|||||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField HeaderText="Dias" Visible="true">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Label ID="LtlDias" CssClass="ltltotalgvx2" Text='<%# Eval("Dias")%>' runat="server"></asp:Label>
|
||||||
|
</ItemTemplate>
|
||||||
|
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Editar" ItemStyle-Width="50px" ItemStyle-HorizontalAlign="Center">
|
<asp:TemplateField HeaderText="Editar" ItemStyle-Width="50px" ItemStyle-HorizontalAlign="Center">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LnkEditarPresupuestoControlDetalle" OnClick="LnkEditarPresupuestoControlDetalle_Click" runat="server" AlternateText="Editar" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
<asp:LinkButton ID="LnkEditarPresupuestoControlDetalle" OnClick="LnkEditarPresupuestoControlDetalle_Click" runat="server" AlternateText="Editar" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||||
@@ -2696,7 +2703,15 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:DropDownList ID="DdlRubro" runat="server" CssClass="table-group-action-input form-control input-inline input-sm select2me" Style="width: 100%;" AutoPostBack="true" OnSelectedIndexChanged="DdlRubro_SelectedIndexChanged">
|
||||||
|
<asp:ListItem Value="2">Insumos</asp:ListItem>
|
||||||
|
<asp:ListItem Value="3">Mano de Obra</asp:ListItem>
|
||||||
|
<asp:ListItem Value="4">Flotillas</asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
<label for="<%= DdlRubro.ClientID.ToString()%>">Rubro:</label>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
@@ -2707,31 +2722,18 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="form-group form-md-line-input input-iconright" runat="server" visible="false" id="DVClasificacion" >
|
||||||
<%-- <div class="form-group form-md-line-input input-iconright">
|
|
||||||
<asp:CheckBox ID="ChkLimitarInsumos" runat="server" CssClass="form-control" />
|
|
||||||
<label for="<%= ChkLimitarInsumos.ClientID.ToString()%>">Limitar:</label>
|
|
||||||
</div>--%>
|
|
||||||
|
|
||||||
<%-- <div class="form-group form-md-line-input input-iconright">
|
|
||||||
<asp:TextBox ID="TxtNoIdentificacionvInsumos" runat="server" MaxLength="15" CssClass="form-control" ></asp:TextBox>
|
|
||||||
<label for="<%= TxtNoIdentificacionvInsumos.ClientID.ToString()%>">Clave Interna:</label>
|
|
||||||
</div>--%>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
|
||||||
<asp:DropDownList ID="DdlClasificacionAddInsumos" runat="server" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" CssClass="table-group-action-input form-control input-inline input-sm select2me" Style="width: 100%;"></asp:DropDownList>
|
<asp:DropDownList ID="DdlClasificacionAddInsumos" runat="server" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" CssClass="table-group-action-input form-control input-inline input-sm select2me" Style="width: 100%;"></asp:DropDownList>
|
||||||
<label for="<%= DdlClasificacionAddInsumos.ClientID.ToString()%>">Clasificación:</label>
|
<label for="<%= DdlClasificacionAddInsumos.ClientID.ToString()%>">Clasificación:</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright" runat="server" visible="false" id="DVPS" >
|
||||||
<label for="<%= DdlProductowsInsumos.ClientID.ToString()%>">Producto:</label>
|
<label for="<%= DdlProductowsInsumos.ClientID.ToString()%>">Producto:</label>
|
||||||
<ADS:Dropdownlost runat="server" ID="DdlProductowsInsumos" CssStyle="width: 100%;" CssClassDdl="form-control select2me" DataTextField="PSCodigo" DataValueField="CvePS" />
|
<ADS:Dropdownlost runat="server" ID="DdlProductowsInsumos" CssStyle="width: 100%;" CssClassDdl="form-control select2me" DataTextField="PSCodigo" DataValueField="CvePS" />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright" runat="server" visible="false" id="DVUM" >
|
||||||
<asp:DropDownList ID="DdlUMInsumos" runat="server" AutoPostBack="true" DataTextField="UnidadMedida" DataValueField="CveUnidadMedida" CssClass="form-control select2me" ></asp:DropDownList>
|
<asp:DropDownList ID="DdlUMInsumos" runat="server" AutoPostBack="true" DataTextField="UnidadMedida" DataValueField="CveUnidadMedida" CssClass="form-control select2me" ></asp:DropDownList>
|
||||||
<label for="<%= DdlUMInsumos.ClientID.ToString()%>">U. M.:</label>
|
<label for="<%= DdlUMInsumos.ClientID.ToString()%>">U. M.:</label>
|
||||||
</div>
|
</div>
|
||||||
@@ -2745,9 +2747,27 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="form-group form-md-line-input input-iconright" runat="server" id="DVActividadesRH" visible="false" >
|
||||||
|
|
||||||
|
<asp:DropDownList ID="DdlActividades" runat="server" DataTextField="Actividad" DataValueField="CveActividad" CssClass="table-group-action-input form-control input-inline input-sm select2me" Style="width: 100%;"></asp:DropDownList>
|
||||||
|
<label for="<%= DdlActividades.ClientID.ToString()%>">Actividad:</label>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVDdlActividades" runat="server" ControlToValidate="DdlActividades" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Actividad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddPSControl"></asp:RequiredFieldValidator>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group form-md-line-input input-iconright" runat="server" id="DVDias" visible="false">
|
||||||
|
<asp:TextBox ID="TxtDias" runat="server" CssClass="form-control" ></asp:TextBox>
|
||||||
|
<ajax:FilteredTextBoxExtender ID="FilTxtDias" runat="server" TargetControlID="TxtDias" FilterType="Numbers" InvalidChars="-+.," />
|
||||||
|
<asp:RequiredFieldValidator ID="RFVTxtDias" runat="server" ControlToValidate="TxtDias" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Dias''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddPSControl" ></asp:RequiredFieldValidator>
|
||||||
|
<label for="<%= TxtDias.ClientID.ToString()%>">Dias:</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright" style="text-align:right!important">
|
<div class="form-group form-md-line-input input-iconright" style="text-align:right!important">
|
||||||
<asp:CheckBox ID="ChkContinualAgregandoControl" runat="server" TextAlign="Left" Text="Continuar agregando" CssClass="form-control" Checked="true" />
|
<asp:CheckBox ID="ChkContinualAgregandoControl" runat="server" TextAlign="Left" Text="Continuar agregando" CssClass="form-control" Checked="true" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
<td id="TD1" runat="server" visible="false"></td>
|
<td id="TD1" runat="server" visible="false"></td>
|
||||||
|
|
||||||
@@ -2793,10 +2813,14 @@
|
|||||||
<asp:UpdatePanel runat="server">
|
<asp:UpdatePanel runat="server">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
|
<asp:LinkButton ID="BtnDecargaFormato" runat="server" ClientIDMode="Static" Text="<i class='fa fa-download' aria-hidden='true'></i> Formato" CssClass="btn btn-warning" OnClick="BtnDecargaFormato_Click" />
|
||||||
<asp:Button ID="BtnCargaPresupuesto" runat="server" ClientIDMode="Static" Text="Guardar" CssClass="btn btn-primary" OnClick="BtnCargaPresupuesto_Click" />
|
<asp:Button ID="BtnCargaPresupuesto" runat="server" ClientIDMode="Static" Text="Guardar" CssClass="btn btn-primary" OnClick="BtnCargaPresupuesto_Click" />
|
||||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
|
<Triggers>
|
||||||
|
<asp:PostBackTrigger ControlID="BtnDecargaFormato" />
|
||||||
|
</Triggers>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -596,6 +596,19 @@ Partial Class Contratos_ContratoObra
|
|||||||
TmpDT.Columns.Add("LimitarCantidad", GetType(Integer))
|
TmpDT.Columns.Add("LimitarCantidad", GetType(Integer))
|
||||||
TmpDT.Columns.Add("OCInterna", GetType(String))
|
TmpDT.Columns.Add("OCInterna", GetType(String))
|
||||||
TmpDT.Columns.Add("Observacion", GetType(String))
|
TmpDT.Columns.Add("Observacion", GetType(String))
|
||||||
|
|
||||||
|
|
||||||
|
TmpDT.Columns.Add("CveRubro", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("CveActividad", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("CveSubTipoActivoFijo", GetType(Integer))
|
||||||
|
|
||||||
|
TmpDT.Columns.Add("Rubro", GetType(String))
|
||||||
|
TmpDT.Columns.Add("Actividad", GetType(String))
|
||||||
|
TmpDT.Columns.Add("SubTipoActivoFijo", GetType(String))
|
||||||
|
|
||||||
|
TmpDT.Columns.Add("Dias", GetType(Integer))
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub Limpiar()
|
Protected Sub Limpiar()
|
||||||
TxtNumeroContrato.Text = ""
|
TxtNumeroContrato.Text = ""
|
||||||
@@ -1477,10 +1490,14 @@ Partial Class Contratos_ContratoObra
|
|||||||
Row("LimitarCantidad") = False 'If(ChkLimitarVenta.Checked, 1, 0)
|
Row("LimitarCantidad") = False 'If(ChkLimitarVenta.Checked, 1, 0)
|
||||||
Row("Observacion") = "" 'TxtObservacionesDetalles.Text
|
Row("Observacion") = "" 'TxtObservacionesDetalles.Text
|
||||||
|
|
||||||
|
Row("CveRubro") = 1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dim ObjContratos As New ClsContratos
|
Dim ObjContratos As New ClsContratos
|
||||||
|
|
||||||
|
|
||||||
If ObjContratos.AddContratosDetalle(CveContrato, Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDouble, Row("PU").ToString.ToDouble, UsuarioActual.CveUsuario, Row("CveTipoPresupuesto").ToString.ToEntero, Row("NoIdentificacion").ToString, False, "", Observacion:=Row("Observacion").ToString) Then
|
If ObjContratos.AddContratosDetalle(CveContrato, Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDouble, Row("PU").ToString.ToDouble, UsuarioActual.CveUsuario, Row("CveTipoPresupuesto").ToString.ToEntero, Row("NoIdentificacion").ToString, False, "", Observacion:=Row("Observacion").ToString, CveRubro:=1) Then
|
||||||
|
|
||||||
If Autorizado Then
|
If Autorizado Then
|
||||||
Dim msj As String = String.Format("Se agregaron {0} {1} del producto {2} con un precio ${3}.", Row("Cantidad"), Row("UM"), Row("PS"), Row("PU"))
|
Dim msj As String = String.Format("Se agregaron {0} {1} del producto {2} con un precio ${3}.", Row("Cantidad"), Row("UM"), Row("PS"), Row("PU"))
|
||||||
@@ -1535,7 +1552,7 @@ Partial Class Contratos_ContratoObra
|
|||||||
|
|
||||||
|
|
||||||
Dim ObjContratos As New ClsContratos
|
Dim ObjContratos As New ClsContratos
|
||||||
If ObjContratos.UpdateContratosDetalle(CveContratoDetalleEditar, CveContrato, CvePS, Cantidad, PU, UsuarioActual.CveUsuario, NoIdentificacion, False, "", Observaciones) Then
|
If ObjContratos.UpdateContratosDetalle(CveContratoDetalleEditar, CveContrato, CvePS, Cantidad, PU, UsuarioActual.CveUsuario, NoIdentificacion, False, "", Observaciones, CveRubro:=1) Then
|
||||||
|
|
||||||
If Autorizado Then
|
If Autorizado Then
|
||||||
Dim msj As String = String.Format("Se realizaron los siguientes cambios, el Presupuesto Interno se modificó: {1} {0} {2:C2} a {3} {0} {4:C2}",
|
Dim msj As String = String.Format("Se realizaron los siguientes cambios, el Presupuesto Interno se modificó: {1} {0} {2:C2} a {3} {0} {4:C2}",
|
||||||
@@ -1796,25 +1813,59 @@ Partial Class Contratos_ContratoObra
|
|||||||
Dim Row As DataRow = TmpDT.NewRow()
|
Dim Row As DataRow = TmpDT.NewRow()
|
||||||
Row("Cantidad") = TxtCantidadInsumos.Text.ToDouble.FormatoNumero
|
Row("Cantidad") = TxtCantidadInsumos.Text.ToDouble.FormatoNumero
|
||||||
Row("CantidadContratada") = TxtCantidadInsumos.Text.ToDouble.FormatoNumero
|
Row("CantidadContratada") = TxtCantidadInsumos.Text.ToDouble.FormatoNumero
|
||||||
Row("CveUM") = DdlUMInsumos.SelectedValue.ToEntero
|
|
||||||
Row("UM") = DdlUMInsumos.SelectedItem
|
|
||||||
Row("CveClasificacion") = DdlClasificacionAddInsumos.SelectedValue
|
|
||||||
Row("Clasificacion") = DdlClasificacionAddInsumos.SelectedItem
|
|
||||||
Row("CvePS") = DdlProductowsInsumos.SelectedValue.ToEntero
|
|
||||||
Row("PS") = DdlProductowsInsumos.SelectedText
|
|
||||||
Row("CodigoPS") = DdlProductowsInsumos.SelectedText
|
|
||||||
Row("PU") = TxtPUInsumos.Text.ToDouble.FormatoNumero
|
Row("PU") = TxtPUInsumos.Text.ToDouble.FormatoNumero
|
||||||
Row("Total") = (TxtCantidadInsumos.Text.ToDouble * TxtPUInsumos.Text.ToDouble).FormatoNumero
|
Row("Total") = (TxtCantidadInsumos.Text.ToDouble * TxtPUInsumos.Text.ToDouble).FormatoNumero
|
||||||
Row("CveTipoPresupuesto") = 1
|
Row("CveTipoPresupuesto") = 1
|
||||||
Row("NoIdentificacion") = "" 'TxtNoIdentificacionvInsumos.Text.Trim
|
Row("NoIdentificacion") = "" 'TxtNoIdentificacionvInsumos.Text.Trim
|
||||||
Row("LimitarCantidad") = False
|
Row("LimitarCantidad") = False
|
||||||
|
|
||||||
|
Row("CveRubro") = DdlRubro.SelectedValue.ToEntero
|
||||||
|
Row("Rubro") = DdlRubro.SelectedItem.Text
|
||||||
|
|
||||||
|
If DdlRubro.SelectedValue.ToEntero = 3 Then
|
||||||
|
Row("CveActividad") = DdlActividades.SelectedValue.ToEntero
|
||||||
|
Row("Actividad") = DdlActividades.SelectedItem.Text
|
||||||
|
Row("Dias") = TxtDias.Text.ToEntero
|
||||||
|
Row("CveSubTipoActivoFijo") = -1
|
||||||
|
|
||||||
|
|
||||||
|
Row("CveUM") = -1
|
||||||
|
Row("UM") = ""
|
||||||
|
Row("CveClasificacion") = -1
|
||||||
|
Row("Clasificacion") = ""
|
||||||
|
Row("CvePS") = -1
|
||||||
|
Row("PS") = DdlActividades.SelectedItem.Text
|
||||||
|
Row("CodigoPS") = DdlActividades.SelectedItem.Text
|
||||||
|
|
||||||
|
Else
|
||||||
|
Row("CveActividad") = -1
|
||||||
|
Row("Actividad") = ""
|
||||||
|
Row("CveSubTipoActivoFijo") = -1
|
||||||
|
Row("Dias") = 0
|
||||||
|
|
||||||
|
|
||||||
|
Row("CveUM") = DdlUMInsumos.SelectedValue.ToEntero
|
||||||
|
Row("UM") = DdlUMInsumos.SelectedItem
|
||||||
|
Row("CveClasificacion") = DdlClasificacionAddInsumos.SelectedValue
|
||||||
|
Row("Clasificacion") = DdlClasificacionAddInsumos.SelectedItem
|
||||||
|
Row("CvePS") = DdlProductowsInsumos.SelectedValue.ToEntero
|
||||||
|
Row("PS") = DdlProductowsInsumos.SelectedText
|
||||||
|
Row("CodigoPS") = DdlProductowsInsumos.SelectedText
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
Dim ObjContratos As New ClsContratos
|
Dim ObjContratos As New ClsContratos
|
||||||
If ObjContratos.AddContratosDetalle(CveContrato, Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDouble, Row("PU").ToString.ToDouble, UsuarioActual.CveUsuario, Row("CveTipoPresupuesto").ToString.ToEntero, Row("NoIdentificacion").ToString, False, "") Then
|
If ObjContratos.AddContratosDetalle(CveContrato, Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDouble, Row("PU").ToString.ToDouble, UsuarioActual.CveUsuario, Row("CveTipoPresupuesto").ToString.ToEntero, Row("NoIdentificacion").ToString, False, "",
|
||||||
If Autorizado Then
|
CveRubro:=Row("CveRubro").ToString.ToEntero, CveActividad:=Row("CveActividad").ToString.ToEntero, CveSubTipoActivoFijo:=Row("CveSubTipoActivoFijo").ToString.ToEntero, Dias:=Row("Dias").ToString.ToEntero) Then
|
||||||
Dim msj As String = String.Format("Se agregaron {0} {1} del producto {2} con un precio ${3}.", Row("Cantidad"), Row("UM"), Row("PS"), Row("PU"))
|
'If Autorizado Then
|
||||||
guardarBitacora(msj)
|
' Dim msj As String = String.Format("Se agregaron {0} {1} del producto {2} con un precio ${3}.", Row("Cantidad"), Row("UM"), Row("PS"), Row("PU"))
|
||||||
End If
|
' guardarBitacora(msj)
|
||||||
|
'End If
|
||||||
|
|
||||||
Row("CveContratoDetalle") = ObjContratos.DtResultados.Rows(0)("CveContratoDetalle")
|
Row("CveContratoDetalle") = ObjContratos.DtResultados.Rows(0)("CveContratoDetalle")
|
||||||
TmpDT.Rows.Add(Row)
|
TmpDT.Rows.Add(Row)
|
||||||
Dim TotalRow = Row("Total").ToString.ToDouble
|
Dim TotalRow = Row("Total").ToString.ToDouble
|
||||||
@@ -1843,22 +1894,34 @@ Partial Class Contratos_ContratoObra
|
|||||||
|
|
||||||
Dim Cantidad, PU As Double
|
Dim Cantidad, PU As Double
|
||||||
Dim CvePS, CveUM As Integer
|
Dim CvePS, CveUM As Integer
|
||||||
'Dim NoIdentificacion As String = ""
|
|
||||||
'Dim LimitarCantidad As Boolean
|
Dim CveRubro As Integer = DdlRubro.SelectedValue.ToEntero
|
||||||
|
|
||||||
|
Dim CveActividad As Integer = -1
|
||||||
|
Dim CveSubTipoActivoFijo As Integer = -1
|
||||||
|
Dim Dias As Integer = 0
|
||||||
|
|
||||||
|
If CveRubro = 3 Then
|
||||||
|
|
||||||
|
CveActividad = DdlActividades.SelectedValue.ToEntero
|
||||||
|
Dias = TxtDias.Text.ToEntero
|
||||||
|
|
||||||
|
CvePS = -1
|
||||||
|
CveUM = -1
|
||||||
|
Else
|
||||||
|
CvePS = DdlProductowsInsumos.SelectedValue.ToEntero
|
||||||
|
CveUM = DdlUMInsumos.SelectedValue.ToEntero
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
Cantidad = TxtCantidadInsumos.Text.ToDouble
|
Cantidad = TxtCantidadInsumos.Text.ToDouble
|
||||||
PU = TxtPUInsumos.Text.ToDouble
|
PU = TxtPUInsumos.Text.ToDouble
|
||||||
CvePS = DdlProductowsInsumos.SelectedValue.ToEntero
|
|
||||||
CveUM = DdlUMInsumos.SelectedValue.ToEntero
|
|
||||||
'NoIdentificacion = TxtNoIdentificacionvInsumos.Text.Trim
|
|
||||||
'LimitarCantidad = If(ChkLimitarInsumos.Checked, True, False)
|
|
||||||
|
|
||||||
Dim row = TmpDT.Select(String.Format(" CveContratoDetalle={0}", CveContratoDetalleEditar))(0)
|
Dim row = TmpDT.Select(String.Format(" CveContratoDetalle={0}", CveContratoDetalleEditar))(0)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dim ObjContratos As New ClsContratos
|
Dim ObjContratos As New ClsContratos
|
||||||
If ObjContratos.UpdateContratosDetalle(CveContratoDetalleEditar, CveContrato, CvePS, Cantidad, PU, UsuarioActual.CveUsuario, "", False, "") Then
|
If ObjContratos.UpdateContratosDetalle(CveContratoDetalleEditar, CveContrato, CvePS, Cantidad, PU, UsuarioActual.CveUsuario, "", False, "", CveRubro:=CveRubro, CveActividad:=CveActividad, CveSubTipoActivoFijo:=CveSubTipoActivoFijo, Dias:=Dias) Then
|
||||||
|
|
||||||
If Autorizado Then
|
If Autorizado Then
|
||||||
Dim msj As String = String.Format("Se realizaron los siguientes cambios, el Presupuesto Interno se modificó: {1} {0} {2:C2} a {3} {0} {4:C2}",
|
Dim msj As String = String.Format("Se realizaron los siguientes cambios, el Presupuesto Interno se modificó: {1} {0} {2:C2} a {3} {0} {4:C2}",
|
||||||
@@ -2194,9 +2257,6 @@ Partial Class Contratos_ContratoObra
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If ObjContratos.GetReporteContratosAvancesDetalleControl(CveContrato, UsuarioActual.CveEmpresa) Then
|
If ObjContratos.GetReporteContratosAvancesDetalleControl(CveContrato, UsuarioActual.CveEmpresa) Then
|
||||||
|
|
||||||
GvDatosAvanceControl.DataSource = ObjContratos.DtResultados
|
GvDatosAvanceControl.DataSource = ObjContratos.DtResultados
|
||||||
@@ -4008,17 +4068,10 @@ Partial Class Contratos_ContratoObra
|
|||||||
Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||||
LimpiarModalVentas()
|
LimpiarModalVentas()
|
||||||
|
|
||||||
'CveContratoDetalle,CveUM,CvePS,Cantidad,PU,CveTipoPresupuesto,CveClasificacion,CodigoPS,LimitarCantidad
|
|
||||||
|
|
||||||
CveContratoDetalleEditar = GvRow.DataKey("CveContratoDetalle").ToEntero
|
CveContratoDetalleEditar = GvRow.DataKey("CveContratoDetalle").ToEntero
|
||||||
|
|
||||||
|
|
||||||
'TxtOCInterna.Text = GvRow.DataKey("OCInterna")
|
|
||||||
TxtCantidad.Text = GvRow.DataKey("CantidadContratada").ToDouble.ToString
|
TxtCantidad.Text = GvRow.DataKey("CantidadContratada").ToDouble.ToString
|
||||||
|
|
||||||
'ChkLimitarVenta.Checked = Boolean.Parse(GvRow.DataKey("LimitarCantidad"))
|
|
||||||
|
|
||||||
'TxtNoIdentificacionv.Text = GvRow.DataKey("NoIdentificacion").ToDouble.ToString
|
|
||||||
DdlClasificacionAdd.SelectedValueExist(GvRow.DataKey("CveClasificacion").ToEntero)
|
DdlClasificacionAdd.SelectedValueExist(GvRow.DataKey("CveClasificacion").ToEntero)
|
||||||
|
|
||||||
DdlProductows.txtText.Value = GvRow.DataKey("PS").ToString
|
DdlProductows.txtText.Value = GvRow.DataKey("PS").ToString
|
||||||
@@ -4040,14 +4093,17 @@ Partial Class Contratos_ContratoObra
|
|||||||
RegistraScript("$('#ModalVentasAddPS').modal('show')")
|
RegistraScript("$('#ModalVentasAddPS').modal('show')")
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub LnkEditarPresupuestoControlDetalle_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkEditarPresupuestoControlDetalle_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||||
|
|
||||||
|
Dim CveRubro As Integer = gvRow.DataKey("CveRubro").ToEntero
|
||||||
|
|
||||||
LimpiarModalControl()
|
LimpiarModalControl()
|
||||||
|
|
||||||
CveContratoDetalleEditar = gvRow.DataKey("CveContratoDetalle").ToEntero
|
CveContratoDetalleEditar = gvRow.DataKey("CveContratoDetalle").ToEntero
|
||||||
|
|
||||||
TxtCantidadInsumos.Text = gvRow.DataKey("CantidadContratada").ToDouble.ToString
|
TxtCantidadInsumos.Text = gvRow.DataKey("CantidadContratada").ToDouble.ToString
|
||||||
'ChkLimitarInsumos.Checked = Boolean.Parse(gvRow.DataKey("LimitarCantidad"))
|
|
||||||
' TxtNoIdentificacionvInsumos.Text = gvRow.DataKey("NoIdentificacion")
|
|
||||||
|
|
||||||
DdlClasificacionAddInsumos.SelectedValueExist(gvRow.DataKey("CveClasificacion").ToEntero)
|
DdlClasificacionAddInsumos.SelectedValueExist(gvRow.DataKey("CveClasificacion").ToEntero)
|
||||||
|
|
||||||
@@ -4059,16 +4115,42 @@ Partial Class Contratos_ContratoObra
|
|||||||
DdlUMInsumos.DataBind()
|
DdlUMInsumos.DataBind()
|
||||||
DdlUMInsumos.SelectedValueExist(gvRow.DataKey("CveUM").ToDouble.ToString)
|
DdlUMInsumos.SelectedValueExist(gvRow.DataKey("CveUM").ToDouble.ToString)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
TxtPUInsumos.Text = gvRow.DataKey("PU").ToDouble.ToString
|
TxtPUInsumos.Text = gvRow.DataKey("PU").ToDouble.ToString
|
||||||
|
|
||||||
|
DdlRubro.SelectedValueExist(gvRow.DataKey("CveRubro").ToString)
|
||||||
|
|
||||||
|
If CveRubro = 3 Then
|
||||||
|
|
||||||
|
DVDias.Visible = True
|
||||||
|
DVActividadesRH.Visible = True
|
||||||
|
|
||||||
|
DVClasificacion.Visible = False
|
||||||
|
DVPS.Visible = False
|
||||||
|
DVUM.Visible = False
|
||||||
|
|
||||||
|
DdlActividades.SelectedValueExist(gvRow.DataKey("CveActividad"))
|
||||||
|
TxtDias.Text = gvRow.DataKey("Dias")
|
||||||
|
Else
|
||||||
|
DVDias.Visible = False
|
||||||
|
DVActividadesRH.Visible = False
|
||||||
|
|
||||||
|
DVClasificacion.Visible = True
|
||||||
|
DVPS.Visible = True
|
||||||
|
DVUM.Visible = True
|
||||||
|
|
||||||
|
DdlActividades.SelectedValueExist(-1)
|
||||||
|
TxtDias.Text = "0"
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ModalControlPSAdd = False
|
ModalControlPSAdd = False
|
||||||
ChkContinualAgregandoControl.Visible = False
|
ChkContinualAgregandoControl.Visible = False
|
||||||
ChkContinualAgregandoControl.Checked = False
|
ChkContinualAgregandoControl.Checked = False
|
||||||
|
|
||||||
|
UpModalControlAddPS.Update()
|
||||||
|
|
||||||
RegistraScript("$('#ModalControlAddPS').modal('show')")
|
RegistraScript("$('#ModalControlAddPS').modal('show')")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -4098,7 +4180,12 @@ Partial Class Contratos_ContratoObra
|
|||||||
End Sub
|
End Sub
|
||||||
Private Sub LimpiarModalControl()
|
Private Sub LimpiarModalControl()
|
||||||
|
|
||||||
|
DdlActividades.Items.Clear()
|
||||||
|
|
||||||
|
DdlActividades.DataSource = GlobalDTRHActividades(UsuarioActual.CveEmpresa)
|
||||||
|
DdlActividades.DataBind()
|
||||||
|
|
||||||
|
DdlActividades.Items.Insert(0, New ListItem("Seleccione una", "-1"))
|
||||||
|
|
||||||
TxtCantidadInsumos.Text = ""
|
TxtCantidadInsumos.Text = ""
|
||||||
'ChkLimitarInsumos.Checked = False
|
'ChkLimitarInsumos.Checked = False
|
||||||
@@ -4110,6 +4197,21 @@ Partial Class Contratos_ContratoObra
|
|||||||
DdlUMInsumos.SelectedValueExist(-1)
|
DdlUMInsumos.SelectedValueExist(-1)
|
||||||
TxtPUInsumos.Text = ""
|
TxtPUInsumos.Text = ""
|
||||||
|
|
||||||
|
DdlRubro.SelectedValue = "2"
|
||||||
|
' DdlRubro_SelectedIndexChanged(Nothing, Nothing)
|
||||||
|
|
||||||
|
|
||||||
|
DVClasificacion.Visible = True
|
||||||
|
DVPS.Visible = True
|
||||||
|
DVUM.Visible = True
|
||||||
|
|
||||||
|
DVDias.Visible = False
|
||||||
|
DVActividadesRH.Visible = False
|
||||||
|
|
||||||
|
TxtDias.Text = ""
|
||||||
|
DdlActividades.SelectedValueExist(-1)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If ModalControlPSAdd = True Then
|
If ModalControlPSAdd = True Then
|
||||||
LtlModalControlPSTitulo.Text = "Agregar Producto Presupuesto Control"
|
LtlModalControlPSTitulo.Text = "Agregar Producto Presupuesto Control"
|
||||||
@@ -4126,19 +4228,67 @@ Partial Class Contratos_ContratoObra
|
|||||||
Protected Sub BtnCargaPresupuesto_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnCargaPresupuesto_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
Dim DTCargaPresupuesto As New DataTable
|
Dim DTCargaPresupuesto As New DataTable
|
||||||
DTCargaPresupuesto = CargaPreSupuestoExcel()
|
Dim DTCargaPresupuestoInsumos As New DataTable
|
||||||
|
Dim DTCargaPresupuestoManoObra As New DataTable
|
||||||
|
Dim DTCargaPresupuestoFlotillas As New DataTable
|
||||||
|
|
||||||
|
|
||||||
|
If TipoCargaPresupuesto = EnumTipoCargaPresupuesto.Ventas Then
|
||||||
|
|
||||||
|
DTCargaPresupuesto = CargaPreSupuestoExcel("Presupuesto")
|
||||||
|
|
||||||
|
If DTCargaPresupuesto.Rows.Count > 0 Then
|
||||||
|
ProcesaDatosCargaPresupuesto(DTCargaPresupuesto, Nothing, Nothing)
|
||||||
|
Else
|
||||||
|
Alert("No se encintraron partidas en el documento", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
|
||||||
If DTCargaPresupuesto.Rows.Count > 0 Then
|
|
||||||
' ProcesaDatosCargaPresupuesto(DTCargaPresupuesto)
|
|
||||||
Else
|
Else
|
||||||
Alert("No se encintraron partidas en el documento", TipoMensaje.MsgAdvertencia)
|
|
||||||
|
DTCargaPresupuesto = CargaPreSupuestoExcel("Insumos")
|
||||||
|
DTCargaPresupuestoManoObra = CargaPreSupuestoExcel("ManoObra")
|
||||||
|
DTCargaPresupuestoFlotillas = CargaPreSupuestoExcel("Flotillas")
|
||||||
|
|
||||||
|
ProcesaDatosCargaPresupuesto(DTCargaPresupuesto, DTCargaPresupuestoManoObra, DTCargaPresupuestoFlotillas)
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
TxtModalCargaPresupuesto.Text = ""
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnDecargaFormato_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
|
||||||
|
Dim FI As New IO.FileInfo($"{Extensiones.DirectorioBaseEmpresas}\Empresas\Grales\Formatos\FormatoPresupuestoObra.xlsx")
|
||||||
|
|
||||||
|
If TipoCargaPresupuesto = EnumTipoCargaPresupuesto.Ventas Then
|
||||||
|
FI = New IO.FileInfo($"{Extensiones.DirectorioBaseEmpresas}\Empresas\Grales\Formatos\FormatoPresupuestoObra.xlsx")
|
||||||
|
Else
|
||||||
|
FI = New IO.FileInfo($"{Extensiones.DirectorioBaseEmpresas}\Empresas\Grales\Formatos\FormatoPresupuestoObraInterno.xlsx")
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If FI.Exists Then
|
||||||
|
|
||||||
|
Response.ContentType = "application/octet-stream"
|
||||||
|
|
||||||
|
If TipoCargaPresupuesto = EnumTipoCargaPresupuesto.Ventas Then
|
||||||
|
Response.AppendHeader("Content-Disposition", $"attachment; filename=FormatoPresupuestoObra.xlsx")
|
||||||
|
Else
|
||||||
|
Response.AppendHeader("Content-Disposition", $"attachment; filename=FormatoPresupuestoObraInterno.xlsx")
|
||||||
|
End If
|
||||||
|
|
||||||
|
Response.TransmitFile(FI.FullName)
|
||||||
|
Response.End()
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Private Function CargaPreSupuestoExcel(Hoja As String) As DataTable
|
||||||
Private Function CargaPreSupuestoExcel() As DataTable
|
|
||||||
|
|
||||||
Dim FileExtension As String = "-1"
|
Dim FileExtension As String = "-1"
|
||||||
Dim Filesgral As List(Of Archivo) = TxtModalCargaPresupuesto.getfiles().Archivos
|
Dim Filesgral As List(Of Archivo) = TxtModalCargaPresupuesto.getfiles().Archivos
|
||||||
@@ -4160,7 +4310,7 @@ Partial Class Contratos_ContratoObra
|
|||||||
tempArray = fileItem.filename.ToString().Split("-".ToCharArray())
|
tempArray = fileItem.filename.ToString().Split("-".ToCharArray())
|
||||||
SpreadsheetInfo.SetLicense(Extensiones.SerialGemBoxSpreadsheet)
|
SpreadsheetInfo.SetLicense(Extensiones.SerialGemBoxSpreadsheet)
|
||||||
Dim workbook = ExcelFile.Load(fileItem.FileUrl)
|
Dim workbook = ExcelFile.Load(fileItem.FileUrl)
|
||||||
Dim worksheet = workbook.Worksheets(0)
|
Dim worksheet = workbook.Worksheets(Hoja)
|
||||||
DTPS = worksheet.CreateDataTable(New CreateDataTableOptions() With
|
DTPS = worksheet.CreateDataTable(New CreateDataTableOptions() With
|
||||||
{
|
{
|
||||||
.ColumnHeaders = True,
|
.ColumnHeaders = True,
|
||||||
@@ -4172,7 +4322,7 @@ Partial Class Contratos_ContratoObra
|
|||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
TxtModalCargaPresupuesto.Text = ""
|
|
||||||
|
|
||||||
RegistraScript("$('#ModalUploadPresupuesto').modal('hide')")
|
RegistraScript("$('#ModalUploadPresupuesto').modal('hide')")
|
||||||
|
|
||||||
@@ -4183,179 +4333,334 @@ Partial Class Contratos_ContratoObra
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
'Private Sub ProcesaDatosCargaPresupuesto(DTPresupuesto As DataTable)
|
Private Sub ProcesaDatosCargaPresupuesto(DTPresupuesto As DataTable, DTCargaPresupuestoManoObra As DataTable, DTCargaPresupuestoFlotillas As DataTable)
|
||||||
|
|
||||||
' Dim DTPS = New DataTable
|
|
||||||
' DTPS.Columns.Add("CveContratoDetalle", GetType(Integer))
|
|
||||||
' DTPS.Columns.Add("Cantidad", GetType(Double))
|
|
||||||
' DTPS.Columns.Add("CantidadContratada", GetType(Double))
|
|
||||||
' DTPS.Columns.Add("CveUM", GetType(Integer))
|
|
||||||
' DTPS.Columns.Add("UM", GetType(String))
|
|
||||||
' DTPS.Columns.Add("CveClasificacion", GetType(Integer))
|
|
||||||
' DTPS.Columns.Add("Clasificacion", GetType(String))
|
|
||||||
' DTPS.Columns.Add("CvePS", GetType(Integer))
|
|
||||||
' DTPS.Columns.Add("PS", GetType(String))
|
|
||||||
' DTPS.Columns.Add("CodigoPS", GetType(String))
|
|
||||||
' DTPS.Columns.Add("PU", GetType(Double))
|
|
||||||
' DTPS.Columns.Add("Total", GetType(Double))
|
|
||||||
' DTPS.Columns.Add("CveTipoPresupuesto", GetType(Integer))
|
|
||||||
' DTPS.Columns.Add("PermitirAvance", GetType(Integer))
|
|
||||||
' DTPS.Columns.Add("PermitirEstimacion", GetType(Integer))
|
|
||||||
' DTPS.Columns.Add("UsuarioAvance", GetType(Integer))
|
|
||||||
' DTPS.Columns.Add("Cantidad_Original", GetType(Double))
|
|
||||||
' DTPS.Columns.Add("PU_Original", GetType(Double))
|
|
||||||
' DTPS.Columns.Add("Total_Original", GetType(Double))
|
|
||||||
' DTPS.Columns.Add("NoIdentificacion", GetType(String))
|
|
||||||
' DTPS.Columns.Add("LimitarCantidad", GetType(Integer))
|
|
||||||
' DTPS.Columns.Add("OCInterna", GetType(String))
|
|
||||||
' DTPS.Columns.Add("Observacion", GetType(String))
|
|
||||||
|
|
||||||
' Dim RowNoEncontrados As String = ""
|
|
||||||
|
|
||||||
' For Each DrowPS As DataRow In DTPresupuesto.Rows
|
|
||||||
|
|
||||||
|
|
||||||
' Dim StrArray() As String = GetPS("PS", DrowPS("PS").ToString).Split("|"c)
|
If Not DTPresupuesto Is Nothing Then
|
||||||
' Dim CvePS As Integer
|
DTPresupuesto.CaseSensitive = False
|
||||||
' Dim CveUM As Integer
|
End If
|
||||||
|
|
||||||
' If StrArray.Length > 0 Then
|
If Not DTCargaPresupuestoManoObra Is Nothing Then
|
||||||
' If CBool(StrArray(0)) = True Then
|
DTCargaPresupuestoManoObra.CaseSensitive = False
|
||||||
' CvePS = StrArray(1).ToEntero
|
End If
|
||||||
' Else
|
|
||||||
' RowNoEncontrados &= StrArray(1) & "<\BR>"
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' If CvePS > 0 And DrowPS("Cantidad").ToString.ToDouble > 0 Then
|
If Not DTCargaPresupuestoFlotillas Is Nothing Then
|
||||||
|
DTCargaPresupuestoFlotillas.CaseSensitive = False
|
||||||
|
End If
|
||||||
|
|
||||||
' CveUM = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimeroValor("CveUnidadMedida", "").ToString.ToEntero
|
Dim ErrorProceso = False
|
||||||
|
|
||||||
' Dim Row As DataRow = DTPS.NewRow()
|
|
||||||
' Row("Cantidad") = DrowPS("Cantidad").ToString.ToDouble
|
|
||||||
' Row("CantidadContratada") = DrowPS("Cantidad").ToString.ToDouble
|
|
||||||
' Row("CveUM") = CveUM
|
|
||||||
' Row("UM") = ""
|
|
||||||
' Row("CveClasificacion") = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimeroValor("CveClasificacion", "").ToString.ToEntero
|
|
||||||
' Row("Clasificacion") = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = '{ Row("CveClasificacion").ToString }'").ToString
|
|
||||||
' Row("CvePS") = CvePS
|
|
||||||
' Row("PS") = DrowPS("PS").ToString
|
|
||||||
' Row("CodigoPS") = DrowPS("PS").ToString
|
|
||||||
' Row("PU") = DrowPS("PU").ToString.ToDouble
|
|
||||||
' Row("Total") = DrowPS("Cantidad").ToString.ToDouble * DrowPS("PU").ToString.ToDouble
|
|
||||||
|
|
||||||
|
|
||||||
' Select Case TipoCargaPresupuesto
|
|
||||||
' Case EnumTipoCargaPresupuesto.Ventas
|
|
||||||
' Row("CveTipoPresupuesto") = 2
|
|
||||||
' Exit Select
|
|
||||||
' Case EnumTipoCargaPresupuesto.Control
|
|
||||||
' Row("CveTipoPresupuesto") = 1
|
|
||||||
' Exit Select
|
|
||||||
' Case Else
|
|
||||||
' Row("CveTipoPresupuesto") = 1
|
|
||||||
' End Select
|
|
||||||
|
|
||||||
|
|
||||||
' Row("NoIdentificacion") = ""
|
|
||||||
' Row("OCInterna") = ""
|
|
||||||
' Row("LimitarCantidad") = 0
|
|
||||||
' Row("Observacion") = ""
|
|
||||||
|
|
||||||
' DTPS.Rows.Add(Row)
|
|
||||||
|
|
||||||
' End If
|
|
||||||
' Next
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
' Dim ErrorProceso = False
|
|
||||||
' Dim ObjContratos As New ClsContratos
|
|
||||||
' Dim TotalRow As Double = 0
|
|
||||||
' ObjContratos.IniciaTransacSQL()
|
|
||||||
|
|
||||||
' For Each Row As DataRow In DTPS.Rows
|
Dim DTPS = New DataTable
|
||||||
|
DTPS.Columns.Add("CveContratoDetalle", GetType(Integer))
|
||||||
|
DTPS.Columns.Add("Cantidad", GetType(Double))
|
||||||
|
DTPS.Columns.Add("CantidadContratada", GetType(Double))
|
||||||
|
DTPS.Columns.Add("CveUM", GetType(Integer))
|
||||||
|
DTPS.Columns.Add("UM", GetType(String))
|
||||||
|
DTPS.Columns.Add("CveClasificacion", GetType(Integer))
|
||||||
|
DTPS.Columns.Add("Clasificacion", GetType(String))
|
||||||
|
DTPS.Columns.Add("CvePS", GetType(Integer))
|
||||||
|
DTPS.Columns.Add("PS", GetType(String))
|
||||||
|
DTPS.Columns.Add("CodigoPS", GetType(String))
|
||||||
|
DTPS.Columns.Add("PU", GetType(Double))
|
||||||
|
DTPS.Columns.Add("Total", GetType(Double))
|
||||||
|
DTPS.Columns.Add("CveTipoPresupuesto", GetType(Integer))
|
||||||
|
DTPS.Columns.Add("PermitirAvance", GetType(Integer))
|
||||||
|
DTPS.Columns.Add("PermitirEstimacion", GetType(Integer))
|
||||||
|
DTPS.Columns.Add("UsuarioAvance", GetType(Integer))
|
||||||
|
DTPS.Columns.Add("Cantidad_Original", GetType(Double))
|
||||||
|
DTPS.Columns.Add("PU_Original", GetType(Double))
|
||||||
|
DTPS.Columns.Add("Total_Original", GetType(Double))
|
||||||
|
DTPS.Columns.Add("NoIdentificacion", GetType(String))
|
||||||
|
DTPS.Columns.Add("LimitarCantidad", GetType(Integer))
|
||||||
|
DTPS.Columns.Add("OCInterna", GetType(String))
|
||||||
|
DTPS.Columns.Add("Observacion", GetType(String))
|
||||||
|
|
||||||
' If ObjContratos.AddContratosDetalle(CveContrato, Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDouble, Row("PU").ToString.ToDouble, UsuarioActual.CveUsuario, Row("CveTipoPresupuesto").ToString.ToEntero, Row("NoIdentificacion").ToString, Convert.ToBoolean(Row("LimitarCantidad")), Row("OCInterna").ToString, Observacion:=Row("Observacion").ToString) Then
|
DTPS.Columns.Add("CveRubro", GetType(Integer))
|
||||||
|
DTPS.Columns.Add("CveActividad", GetType(Integer))
|
||||||
|
DTPS.Columns.Add("CveSubTipoActivoFijo", GetType(Integer))
|
||||||
|
|
||||||
' If Autorizado Then
|
DTPS.Columns.Add("Rubro", GetType(String))
|
||||||
' Dim msj As String = String.Format("Se agregaron {0} {1} del producto {2} con un precio ${3}.", Row("Cantidad"), Row("UM"), Row("PS"), Row("PU"))
|
DTPS.Columns.Add("Actividad", GetType(String))
|
||||||
' guardarBitacora(msj)
|
DTPS.Columns.Add("SubTipoActivoFijo", GetType(String))
|
||||||
' End If
|
DTPS.Columns.Add("Dias", GetType(Integer))
|
||||||
|
|
||||||
' Dim NrowTmpDT As DataRow = TmpDT.NewRow
|
Dim RowNoEncontrados As String = ""
|
||||||
|
|
||||||
|
If Not DTPresupuesto Is Nothing Then
|
||||||
|
For Each DrowPS As DataRow In DTPresupuesto.Rows
|
||||||
|
|
||||||
|
|
||||||
' NrowTmpDT("Cantidad") = Row("Cantidad")
|
Dim StrArray() As String = GetPS("PS", DrowPS("Producto").ToString).Split("|"c)
|
||||||
' NrowTmpDT("CantidadContratada") = Row("CantidadContratada")
|
Dim CvePS As Integer
|
||||||
' NrowTmpDT("CveUM") = Row("CveUM")
|
Dim CveUM As Integer
|
||||||
' NrowTmpDT("UM") = Row("UM")
|
|
||||||
' NrowTmpDT("CveClasificacion") = Row("CveClasificacion")
|
|
||||||
' NrowTmpDT("Clasificacion") = Row("Clasificacion")
|
|
||||||
' NrowTmpDT("CvePS") = Row("CvePS")
|
|
||||||
' NrowTmpDT("PS") = Row("PS")
|
|
||||||
' NrowTmpDT("CodigoPS") = Row("CodigoPS")
|
|
||||||
' NrowTmpDT("PU") = Row("PU")
|
|
||||||
' NrowTmpDT("Total") = Row("Total")
|
|
||||||
' NrowTmpDT("CveTipoPresupuesto") = Row("CveTipoPresupuesto")
|
|
||||||
' NrowTmpDT("NoIdentificacion") = Row("NoIdentificacion")
|
|
||||||
' NrowTmpDT("OCInterna") = Row("OCInterna")
|
|
||||||
' NrowTmpDT("LimitarCantidad") = Row("LimitarCantidad")
|
|
||||||
' NrowTmpDT("Observacion") = Row("Observacion")
|
|
||||||
|
|
||||||
|
If StrArray.Length > 0 Then
|
||||||
' NrowTmpDT("CveContratoDetalle") = ObjContratos.DtResultados.Rows(0)("CveContratoDetalle")
|
If CBool(StrArray(0)) = True Then
|
||||||
|
CvePS = StrArray(1).ToEntero
|
||||||
' TmpDT.Rows.Add(NrowTmpDT)
|
Else
|
||||||
' TmpDT.AcceptChanges()
|
RowNoEncontrados &= StrArray(1) & "<\BR>"
|
||||||
|
End If
|
||||||
' TotalRow = TotalRow + NrowTmpDT("Total").ToString.ToDouble
|
End If
|
||||||
' Else
|
|
||||||
' ErrorProceso = True
|
|
||||||
' Exit For
|
|
||||||
' End If
|
|
||||||
' Next
|
|
||||||
|
|
||||||
|
|
||||||
' If ErrorProceso Then
|
|
||||||
' ObjContratos.RollBack()
|
|
||||||
' Alert("Se presento un error al cargar el presupuesto.", TipoMensaje.MsgError)
|
|
||||||
' Else
|
|
||||||
|
|
||||||
' ObjContratos.Commit()
|
|
||||||
' Alert("Presupuesto Cargado correctamente")
|
|
||||||
|
|
||||||
|
|
||||||
' Select Case TipoCargaPresupuesto
|
|
||||||
' Case EnumTipoCargaPresupuesto.Ventas
|
|
||||||
' CargaGVPresupuestos(TmpDT.FiltraParametros("CveTipoPresupuesto=2"))
|
|
||||||
' UpGV.Update()
|
|
||||||
' Exit Select
|
|
||||||
' Case EnumTipoCargaPresupuesto.Control
|
|
||||||
' CargaGVPresupuestosInsumos(TmpDT.FiltraParametros("CveTipoPresupuesto=1"))
|
|
||||||
' UpGVInsumos.Update()
|
|
||||||
' Exit Select
|
|
||||||
' Case Else
|
|
||||||
|
|
||||||
' End Select
|
|
||||||
|
|
||||||
' LbTotalGeneral.Text = (LbTotalGeneral.Text.ToDouble + TotalRow).ToString.FormatoNumero
|
|
||||||
' LblImporte.Text = LbTotalGeneral.Text
|
|
||||||
' UpGral.Update()
|
|
||||||
|
|
||||||
' End If
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
' ObjContratos.Dispose()
|
If CvePS > 0 And DrowPS("Cantidad").ToString.ToDouble > 0 Then
|
||||||
|
|
||||||
' If RowNoEncontrados.Length > 0 Then
|
|
||||||
' Alert($"Productos no encontrados <br> {RowNoEncontrados} ")
|
|
||||||
' End If
|
|
||||||
|
|
||||||
|
|
||||||
'End Sub
|
|
||||||
|
CveUM = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveUnidadMedida", $" UnidadMedida = '{ DrowPS("UnidadMedida").ToString.Trim }' OR Abreviatura = '{ DrowPS("UnidadMedida").ToString.Trim }'").ToEntero
|
||||||
|
|
||||||
|
If CveUM <= 0 Then
|
||||||
|
CveUM = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimeroValor("CveUnidadMedida", "").ToString.ToEntero
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
Dim Row As DataRow = DTPS.NewRow()
|
||||||
|
|
||||||
|
Row("Cantidad") = DrowPS("Cantidad").ToString.ToDouble
|
||||||
|
Row("CantidadContratada") = DrowPS("Cantidad").ToString.ToDouble
|
||||||
|
Row("CveUM") = CveUM
|
||||||
|
Row("UM") = ""
|
||||||
|
Row("CveClasificacion") = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimeroValor("CveClasificacion", "").ToString.ToEntero
|
||||||
|
Row("Clasificacion") = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = '{ Row("CveClasificacion").ToString }'").ToString
|
||||||
|
Row("CvePS") = CvePS
|
||||||
|
Row("PS") = DrowPS("Producto").ToString
|
||||||
|
Row("CodigoPS") = DrowPS("Producto").ToString
|
||||||
|
Row("PU") = DrowPS("PU").ToString.ToDouble
|
||||||
|
Row("Total") = DrowPS("Cantidad").ToString.ToDouble * DrowPS("PU").ToString.ToDouble
|
||||||
|
|
||||||
|
Select Case TipoCargaPresupuesto
|
||||||
|
Case EnumTipoCargaPresupuesto.Ventas
|
||||||
|
|
||||||
|
Row("CveTipoPresupuesto") = 2
|
||||||
|
Row("CveRubro") = 1
|
||||||
|
Row("CveActividad") = -1
|
||||||
|
Row("CveSubTipoActivoFijo") = -1
|
||||||
|
Row("Dias") = 0
|
||||||
|
|
||||||
|
Exit Select
|
||||||
|
Case EnumTipoCargaPresupuesto.Control
|
||||||
|
Row("CveTipoPresupuesto") = 1
|
||||||
|
Row("CveRubro") = 2
|
||||||
|
Row("CveActividad") = -1
|
||||||
|
Row("CveSubTipoActivoFijo") = -1
|
||||||
|
Row("Dias") = 0
|
||||||
|
Exit Select
|
||||||
|
Case Else
|
||||||
|
Row("CveTipoPresupuesto") = 1
|
||||||
|
Row("CveActividad") = -1
|
||||||
|
Row("CveSubTipoActivoFijo") = -1
|
||||||
|
Row("Dias") = 0
|
||||||
|
End Select
|
||||||
|
|
||||||
|
|
||||||
|
Row("NoIdentificacion") = ""
|
||||||
|
Row("OCInterna") = ""
|
||||||
|
Row("LimitarCantidad") = 0
|
||||||
|
Row("Observacion") = ""
|
||||||
|
|
||||||
|
DTPS.Rows.Add(Row)
|
||||||
|
Else
|
||||||
|
ErrorProceso = True
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
If Not DTCargaPresupuestoManoObra Is Nothing And Not ErrorProceso Then
|
||||||
|
|
||||||
|
|
||||||
|
For Each DrowPS As DataRow In DTCargaPresupuestoManoObra.Rows
|
||||||
|
|
||||||
|
Dim CveActividad As Integer = 0
|
||||||
|
Dim Actividad As String
|
||||||
|
|
||||||
|
|
||||||
|
If DrowPS("Actividad").ToString.Trim.Length > 0 Then
|
||||||
|
GlobalDTRHActividades(UsuarioActual.CveEmpresa) = Nothing
|
||||||
|
CveActividad = GlobalDTRHActividades(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveActividad", $" Actividad = '{ DrowPS("Actividad").ToString.Trim }'").ToEntero
|
||||||
|
|
||||||
|
If CveActividad <= 0 Then
|
||||||
|
|
||||||
|
|
||||||
|
Dim ObjRH As New ClsRH()
|
||||||
|
|
||||||
|
If ObjRH.AddActividades(DrowPS("Actividad").ToString.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||||
|
|
||||||
|
CveActividad = ObjRH.CveActividad
|
||||||
|
|
||||||
|
If CveActividad <= 0 Then
|
||||||
|
ErrorProceso = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
GlobalDTRHActividades(UsuarioActual.CveEmpresa) = Nothing
|
||||||
|
|
||||||
|
Else
|
||||||
|
ErrorProceso = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
ObjRH.Dispose()
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If CveActividad > 0 And DrowPS("Cantidad").ToString.ToDouble > 0 And Not ErrorProceso Then
|
||||||
|
|
||||||
|
Actividad = GlobalDTRHActividades(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Actividad", $" CveActividad = {CveActividad}")
|
||||||
|
|
||||||
|
Dim Row As DataRow = DTPS.NewRow()
|
||||||
|
Row("Cantidad") = DrowPS("Cantidad").ToString.ToDouble
|
||||||
|
Row("CantidadContratada") = DrowPS("Cantidad").ToString.ToDouble
|
||||||
|
Row("CveUM") = -1
|
||||||
|
Row("UM") = "Actividad RH"
|
||||||
|
Row("CveClasificacion") = -1
|
||||||
|
Row("Clasificacion") = ""
|
||||||
|
Row("CvePS") = -1
|
||||||
|
Row("PS") = Actividad
|
||||||
|
Row("CodigoPS") = Actividad
|
||||||
|
Row("PU") = DrowPS("PU").ToString.ToDouble
|
||||||
|
Row("Total") = DrowPS("Cantidad").ToString.ToDouble * DrowPS("PU").ToString.ToDouble
|
||||||
|
|
||||||
|
Row("CveTipoPresupuesto") = 1
|
||||||
|
Row("CveRubro") = 3
|
||||||
|
Row("CveActividad") = CveActividad
|
||||||
|
Row("CveSubTipoActivoFijo") = -1
|
||||||
|
Row("Dias") = DrowPS("Dias").ToString.ToEntero
|
||||||
|
|
||||||
|
Row("NoIdentificacion") = ""
|
||||||
|
Row("OCInterna") = ""
|
||||||
|
Row("LimitarCantidad") = 0
|
||||||
|
Row("Observacion") = ""
|
||||||
|
|
||||||
|
DTPS.Rows.Add(Row)
|
||||||
|
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
Next
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not DTCargaPresupuestoFlotillas Is Nothing Then
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If Not ErrorProceso Then
|
||||||
|
|
||||||
|
Dim ObjContratos As New ClsContratos
|
||||||
|
Dim TotalRow As Double = 0
|
||||||
|
ObjContratos.IniciaTransacSQL()
|
||||||
|
|
||||||
|
For Each Row As DataRow In DTPS.Rows
|
||||||
|
|
||||||
|
If ObjContratos.AddContratosDetalle(CveContrato, Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDouble, Row("PU").ToString.ToDouble, UsuarioActual.CveUsuario, Row("CveTipoPresupuesto").ToString.ToEntero,
|
||||||
|
Row("NoIdentificacion").ToString, Convert.ToBoolean(Row("LimitarCantidad")), Row("OCInterna").ToString, Observacion:=Row("Observacion").ToString, CveRubro:=Row("CveRubro").ToString.ToEntero,
|
||||||
|
CveActividad:=Row("CveActividad").ToString.ToEntero, CveSubTipoActivoFijo:=Row("CveSubTipoActivoFijo").ToString.ToEntero, Dias:=Row("Dias").ToString.ToEntero) Then
|
||||||
|
|
||||||
|
If Autorizado Then
|
||||||
|
Dim msj As String = String.Format("Se agregaron {0} {1} del producto {2} con rubro {4} con un precio ${3}.", Row("Cantidad"), Row("UM"), Row("PS"), Row("PU"), Row("CveRubro"))
|
||||||
|
guardarBitacora(msj)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim NrowTmpDT As DataRow = TmpDT.NewRow
|
||||||
|
|
||||||
|
|
||||||
|
NrowTmpDT("Cantidad") = Row("Cantidad")
|
||||||
|
NrowTmpDT("CantidadContratada") = Row("CantidadContratada")
|
||||||
|
NrowTmpDT("CveUM") = Row("CveUM")
|
||||||
|
NrowTmpDT("UM") = Row("UM")
|
||||||
|
NrowTmpDT("CveClasificacion") = Row("CveClasificacion")
|
||||||
|
NrowTmpDT("Clasificacion") = Row("Clasificacion")
|
||||||
|
NrowTmpDT("CvePS") = Row("CvePS")
|
||||||
|
|
||||||
|
|
||||||
|
NrowTmpDT("PS") = Row("PS")
|
||||||
|
NrowTmpDT("CodigoPS") = Row("CodigoPS")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
NrowTmpDT("PU") = Row("PU")
|
||||||
|
NrowTmpDT("Total") = Row("Total")
|
||||||
|
NrowTmpDT("CveTipoPresupuesto") = Row("CveTipoPresupuesto")
|
||||||
|
NrowTmpDT("NoIdentificacion") = Row("NoIdentificacion")
|
||||||
|
NrowTmpDT("OCInterna") = Row("OCInterna")
|
||||||
|
NrowTmpDT("LimitarCantidad") = Row("LimitarCantidad")
|
||||||
|
NrowTmpDT("Observacion") = Row("Observacion")
|
||||||
|
|
||||||
|
NrowTmpDT("CveRubro") = Row("CveRubro")
|
||||||
|
NrowTmpDT("CveActividad") = Row("CveActividad")
|
||||||
|
NrowTmpDT("CveSubTipoActivoFijo") = Row("CveSubTipoActivoFijo")
|
||||||
|
|
||||||
|
NrowTmpDT("Rubro") = Row("Rubro")
|
||||||
|
NrowTmpDT("Actividad") = Row("Actividad")
|
||||||
|
NrowTmpDT("SubTipoActivoFijo") = Row("SubTipoActivoFijo")
|
||||||
|
|
||||||
|
|
||||||
|
NrowTmpDT("CveContratoDetalle") = ObjContratos.DtResultados.Rows(0)("CveContratoDetalle")
|
||||||
|
|
||||||
|
TmpDT.Rows.Add(NrowTmpDT)
|
||||||
|
TmpDT.AcceptChanges()
|
||||||
|
|
||||||
|
TotalRow = TotalRow + NrowTmpDT("Total").ToString.ToDouble
|
||||||
|
Else
|
||||||
|
ErrorProceso = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
|
||||||
|
If ErrorProceso Then
|
||||||
|
ObjContratos.RollBack()
|
||||||
|
Alert("Se presento un error al cargar el presupuesto.", TipoMensaje.MsgError)
|
||||||
|
Else
|
||||||
|
|
||||||
|
ObjContratos.Commit()
|
||||||
|
Alert("Presupuesto Cargado correctamente")
|
||||||
|
|
||||||
|
|
||||||
|
Select Case TipoCargaPresupuesto
|
||||||
|
Case EnumTipoCargaPresupuesto.Ventas
|
||||||
|
CargaGVPresupuestos(TmpDT.FiltraParametros("CveTipoPresupuesto=2"))
|
||||||
|
UpGV.Update()
|
||||||
|
Exit Select
|
||||||
|
Case EnumTipoCargaPresupuesto.Control
|
||||||
|
CargaGVPresupuestosInsumos(TmpDT.FiltraParametros("CveTipoPresupuesto=1"))
|
||||||
|
UpGVInsumos.Update()
|
||||||
|
Exit Select
|
||||||
|
Case Else
|
||||||
|
|
||||||
|
End Select
|
||||||
|
|
||||||
|
LbTotalGeneral.Text = (LbTotalGeneral.Text.ToDouble + TotalRow).ToString.FormatoNumero
|
||||||
|
LblImporte.Text = LbTotalGeneral.Text
|
||||||
|
UpGral.Update()
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
ObjContratos.Dispose()
|
||||||
|
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
If RowNoEncontrados.Length > 0 Then
|
||||||
|
Alert($"Productos no encontrados <br> {RowNoEncontrados} ")
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -4588,42 +4893,34 @@ Partial Class Contratos_ContratoObra
|
|||||||
Con.Dispose()
|
Con.Dispose()
|
||||||
|
|
||||||
|
|
||||||
If DTDatos.Rows.Count > 0 Then
|
Try
|
||||||
|
If DTDatos.Rows.Count > 0 Then
|
||||||
|
|
||||||
Dim CantidadAvance As Decimal = DTDatos.Rows(0)("Cantidad").ToString.ToDecimal
|
Dim CantidadAvance As Decimal = DTDatos.Rows(0)("Cantidad").ToString.ToDecimal
|
||||||
Dim ImporteAvance As Decimal = DTDatos.Rows(0)("AvanceImporte").ToString.ToDecimal
|
Dim ImporteAvance As Decimal = DTDatos.Rows(0)("AvanceImporte").ToString.ToDecimal
|
||||||
Dim TotalAvancePorcentaje As Decimal = If(ImporteAvance > 0, (ImporteAvance * 100 / TotalAvanceVentas).RoundSQL(2), 0)
|
Dim TotalAvancePorcentaje As Decimal = If(ImporteAvance > 0, (ImporteAvance * 100 / TotalAvanceVentas).RoundSQL(2), 0)
|
||||||
|
|
||||||
Dim CantidadInterno As Decimal = DTDatos.Rows(0)("CantidadInterno").ToString.ToDecimal
|
Dim CantidadInterno As Decimal = DTDatos.Rows(0)("CantidadInterno").ToString.ToDecimal
|
||||||
Dim ImporteInterno As Decimal = DTDatos.Rows(0)("ImporteInterno").ToString.ToDecimal
|
Dim ImporteInterno As Decimal = DTDatos.Rows(0)("ImporteInterno").ToString.ToDecimal
|
||||||
Dim TotalFaltantePorcentaje As Decimal = If(ImporteInterno > 0, (ImporteInterno * 100 / TotalAvanceInterno).RoundSQL(2), 0)
|
Dim TotalFaltantePorcentaje As Decimal = If(ImporteInterno > 0, (ImporteInterno * 100 / TotalAvanceInterno).RoundSQL(2), 0)
|
||||||
|
|
||||||
|
|
||||||
LtlAvanceImporte.Text = $"$ { ImporteAvance.ToString("###,###,###.00") }"
|
LtlAvanceImporte.Text = $"$ { ImporteAvance.ToString("###,###,###.00") }"
|
||||||
LtlAvanceImporteProcentaje1.Text = $"{TotalAvancePorcentaje.ToString("###.00")} %"
|
LtlAvanceImporteProcentaje1.Text = $"{TotalAvancePorcentaje.ToString("###.00")} %"
|
||||||
LtlAvanceImporteProcentaje2.Text = $"{TotalAvancePorcentaje.ToString("###.00")}%"
|
LtlAvanceImporteProcentaje2.Text = $"{TotalAvancePorcentaje.ToString("###.00")}%"
|
||||||
SPAvance1.Attributes.Add("style", $"width:{TotalAvancePorcentaje.ToString.ToEntero}%")
|
SPAvance1.Attributes.Add("style", $"width:{TotalAvancePorcentaje.ToString.ToEntero}%")
|
||||||
|
|
||||||
|
|
||||||
LtlAvanceInternoImporte.Text = $"$ {DTDatos.Rows(0)("ImporteInterno").ToString.ToDecimal.ToString("###,###,###.00")}"
|
LtlAvanceInternoImporte.Text = $"$ {DTDatos.Rows(0)("ImporteInterno").ToString.ToDecimal.ToString("###,###,###.00")}"
|
||||||
LtlAvanceInternoImportePorcentaje1.Text = $"{TotalFaltantePorcentaje.ToString("###.00")} %"
|
LtlAvanceInternoImportePorcentaje1.Text = $"{TotalFaltantePorcentaje.ToString("###.00")} %"
|
||||||
LtlAvanceInternoImportePorcentaje2.Text = $"{TotalFaltantePorcentaje.ToString("###.00")}%"
|
LtlAvanceInternoImportePorcentaje2.Text = $"{TotalFaltantePorcentaje.ToString("###.00")}%"
|
||||||
SPFaltante.Attributes.Add("style", $"width:{TotalFaltantePorcentaje.ToString.ToEntero}%")
|
SPFaltante.Attributes.Add("style", $"width:{TotalFaltantePorcentaje.ToString.ToEntero}%")
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
|
||||||
'Dim TotalContratos As Decimal = DTDatos.SUM("Importe")
|
End Try
|
||||||
'Dim TotalAvance As Decimal = DTDatos.SUM("AvanceImporte")
|
|
||||||
'Dim TotalFaltante As Decimal = TotalContratos - TotalAvance
|
|
||||||
|
|
||||||
|
|
||||||
'Dim TotalAvancePorcentaje As Decimal = ((TotalAvance * 100) / TotalContratos).RoundAD(2)
|
|
||||||
'Dim TotalFaltantePorcentaje As Decimal = (100 - TotalAvancePorcentaje).RoundAD(2)
|
|
||||||
|
|
||||||
|
|
||||||
' LtlGrafNumeroContratos.Text = NumeroContratos.ToString
|
|
||||||
'LtlGrafTotal.Text = TotalContratos.ToString("###,###,###.00")
|
|
||||||
|
|
||||||
|
|
||||||
DVGraficas.Visible = True
|
DVGraficas.Visible = True
|
||||||
@@ -4635,6 +4932,29 @@ Partial Class Contratos_ContratoObra
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Protected Sub DdlRubro_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
|
||||||
|
If DdlRubro.SelectedValue.ToEntero = 3 Then
|
||||||
|
DVDias.Visible = True
|
||||||
|
DVActividadesRH.Visible = True
|
||||||
|
|
||||||
|
DVClasificacion.Visible = False
|
||||||
|
DVPS.Visible = False
|
||||||
|
DVUM.Visible = False
|
||||||
|
Else
|
||||||
|
DVDias.Visible = False
|
||||||
|
DVActividadesRH.Visible = False
|
||||||
|
|
||||||
|
DVClasificacion.Visible = True
|
||||||
|
DVPS.Visible = True
|
||||||
|
DVUM.Visible = True
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
UpModalControlAddPS.Update()
|
||||||
|
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@@ -1235,7 +1235,7 @@ Partial Class Inventarios_Consignaciones
|
|||||||
Dim ObjInventarios As New ClsInventarios
|
Dim ObjInventarios As New ClsInventarios
|
||||||
Dim Dt As DataTable = Nothing
|
Dim Dt As DataTable = Nothing
|
||||||
|
|
||||||
If ObjInventarios.GetMovimientosTransitorios(DdlAlmacenRecepcion.SelectedValue.ToEntero, 4, DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero, -1, If(TxtFolioRecepcion.Text = "", -1, TxtFolioRecepcion.Text.ToEntero), UsuarioActual.CveEmpresa) Then
|
If ObjInventarios.GetMovimientosTransitorios(DdlAlmacenRecepcion.SelectedValue.ToEntero, 4, DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero, -1, If(TxtFolioRecepcion.Text = "", -1, TxtFolioRecepcion.Text.ToEntero), UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
|
||||||
Dt = ObjInventarios.DtResultados
|
Dt = ObjInventarios.DtResultados
|
||||||
Else
|
Else
|
||||||
Alert("Ocurrió un error al consultar los movimientos transitorios. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
Alert("Ocurrió un error al consultar los movimientos transitorios. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||||
|
|||||||
@@ -260,7 +260,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row" id="divDestino" runat="server" visible="False">
|
<div class="row" id="divDestino" runat="server" visible="False">
|
||||||
<label class="col-md-1 truncate">
|
<label class="col-md-1 truncate">
|
||||||
<asp:Label runat="server" ID="Label1">Destino:</asp:Label>
|
<asp:Label runat="server" ID="LblDestino">Destino:</asp:Label>
|
||||||
</label>
|
</label>
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<asp:Literal ID="LtlAlmacenDestino" runat="server"></asp:Literal>
|
<asp:Literal ID="LtlAlmacenDestino" runat="server"></asp:Literal>
|
||||||
|
|||||||
@@ -728,7 +728,13 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
TxtObservaciones.Text = Mov.Observaciones
|
TxtObservaciones.Text = Mov.Observaciones
|
||||||
TxtResponsable.Text = Mov.Recibio
|
TxtResponsable.Text = Mov.Recibio
|
||||||
|
|
||||||
If Mov.CveAlmacenDestino > 0 Then divDestino.Visible = True : LtlAlmacenDestino.Text = Mov.AlmacenDestino
|
If Mov.CveAlmacenDestino > 0 Then
|
||||||
|
divDestino.Visible = True
|
||||||
|
LtlAlmacenDestino.Text = Mov.AlmacenDestino
|
||||||
|
If DtMov.Rows(0)("Origen").ToString = "1" Then
|
||||||
|
LblDestino.Text = "Origen:"
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
CveMovimientoRelacionado = Mov.CveMovimientoRelacionado
|
CveMovimientoRelacionado = Mov.CveMovimientoRelacionado
|
||||||
FolioRelacionado = Mov.FolioRelacionado
|
FolioRelacionado = Mov.FolioRelacionado
|
||||||
|
|||||||
@@ -2512,7 +2512,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'se registra
|
'se registra
|
||||||
If ContabilizaMovimientoAlmacen(ObjConta, TxtFecha.Text.ToDate, HLFolio.Text, "EntregaAlmacen", CveMovimiento, CveMovimientoEntrada, ImporteAlmacen, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, True) <= 0 Then
|
If ContabilizaMovimientoAlmacen(ObjConta, TxtFecha.Text.ToDate, HLFolio.Text, "EntregaAlmacen", CveMovimiento, CveMovimientoEntrada, ImporteAlmacen, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False) <= 0 Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -328,37 +328,37 @@ Partial Class Inventarios_InventarioFisicoDetalle
|
|||||||
End If
|
End If
|
||||||
FechaCaducidad = If(TxtFechaCaducidad.Text.Length > 0, TxtFechaCaducidad.Text, MinFecha.ToString)
|
FechaCaducidad = If(TxtFechaCaducidad.Text.Length > 0, TxtFechaCaducidad.Text, MinFecha.ToString)
|
||||||
End If
|
End If
|
||||||
If AplicaSeccion Then
|
'If AplicaSeccion Then
|
||||||
Dim ObjInv As New ClsInventarios
|
' Dim ObjInv As New ClsInventarios
|
||||||
Dim SeccionesAlmacenDelProducto As New DataTable
|
' Dim SeccionesAlmacenDelProducto As New DataTable
|
||||||
If ObjInv.GetProductosServiciosAlmacenSeccion(CveProducto, -1, -1, UsuarioActual.CveEmpresa) Then
|
' If ObjInv.GetProductosServiciosAlmacenSeccion(CveProducto, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||||
SeccionesAlmacenDelProducto = ObjInv.DtResultados.FiltraParametros(String.Format("CveAlmacen IN ({0})", CveAlmacenes))
|
' SeccionesAlmacenDelProducto = ObjInv.DtResultados.FiltraParametros(String.Format("CveAlmacen IN ({0})", CveAlmacenes))
|
||||||
End If
|
' End If
|
||||||
'Dim SeccionesAlmacenDelProducto As DataTable = (UsuarioActual.CveEmpresa, -1, CveProducto) '.FiltraParametros(String.Format("CveAlmacen IN ({0})", CveAlmacenes))
|
' 'Dim SeccionesAlmacenDelProducto As DataTable = (UsuarioActual.CveEmpresa, -1, CveProducto) '.FiltraParametros(String.Format("CveAlmacen IN ({0})", CveAlmacenes))
|
||||||
'Alert(SeccionesAlmacenDelProducto.Rows.Count.ToString)
|
' 'Alert(SeccionesAlmacenDelProducto.Rows.Count.ToString)
|
||||||
If SeccionesAlmacenDelProducto.Rows.Count = 1 Then
|
' If SeccionesAlmacenDelProducto.Rows.Count = 1 Then
|
||||||
CveSeccionAlmacen = SeccionesAlmacenDelProducto.FiltroPrimeroValor("CveSeccionAlmacen")
|
' CveSeccionAlmacen = SeccionesAlmacenDelProducto.FiltroPrimeroValor("CveSeccionAlmacen")
|
||||||
Else
|
' Else
|
||||||
divSeccion.Visible = AplicaSeccion
|
' divSeccion.Visible = AplicaSeccion
|
||||||
If DdlSeccionAlmacen.Items.Count = 0 Then
|
' If DdlSeccionAlmacen.Items.Count = 0 Then
|
||||||
DdlSeccionAlmacen.DataSource = SeccionesAlmacenDelProducto
|
' DdlSeccionAlmacen.DataSource = SeccionesAlmacenDelProducto
|
||||||
DdlSeccionAlmacen.DataBind()
|
' DdlSeccionAlmacen.DataBind()
|
||||||
DdlSeccionAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
' DdlSeccionAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
If DdlSeccionAlmacen.SelectedValue = "-1" Then
|
' If DdlSeccionAlmacen.SelectedValue = "-1" Then
|
||||||
RfvSeccionAlmacen.Enabled = True
|
' RfvSeccionAlmacen.Enabled = True
|
||||||
RfvSeccionAlmacen.Visible = True
|
' RfvSeccionAlmacen.Visible = True
|
||||||
RfvSeccionAlmacen.SetFocusOnError = True
|
' RfvSeccionAlmacen.SetFocusOnError = True
|
||||||
RfvSeccionAlmacen.Validate()
|
' RfvSeccionAlmacen.Validate()
|
||||||
RfvSeccionAlmacen.ValidationGroup = " "
|
' RfvSeccionAlmacen.ValidationGroup = " "
|
||||||
Exit Sub
|
' Exit Sub
|
||||||
End If
|
' End If
|
||||||
CveSeccionAlmacen = DdlSeccionAlmacen.SelectedValue.ToEntero
|
' CveSeccionAlmacen = DdlSeccionAlmacen.SelectedValue.ToEntero
|
||||||
End If
|
' End If
|
||||||
ObjInv.Dispose()
|
' ObjInv.Dispose()
|
||||||
SeccionAlmacen = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1).FiltroPrimeroValor("SeccionAlmacen", String.Format("CveSeccionAlmacen = {0}", CveSeccionAlmacen))
|
' SeccionAlmacen = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1).FiltroPrimeroValor("SeccionAlmacen", String.Format("CveSeccionAlmacen = {0}", CveSeccionAlmacen))
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
RFVSerie.ValidationGroup = "GrpIngresar"
|
RFVSerie.ValidationGroup = "GrpIngresar"
|
||||||
RFVSerie.Enabled = False
|
RFVSerie.Enabled = False
|
||||||
|
|||||||
@@ -194,6 +194,7 @@
|
|||||||
<asp:ListItem Text="Marca,Modelo,Rin,Medida de Barrenación" Value="1" />
|
<asp:ListItem Text="Marca,Modelo,Rin,Medida de Barrenación" Value="1" />
|
||||||
<asp:ListItem Text="Familia,Marca,Rin,Medida de Barrenación" Value="2" />
|
<asp:ListItem Text="Familia,Marca,Rin,Medida de Barrenación" Value="2" />
|
||||||
<asp:ListItem Text="Familia,Linea,Rin,Medida de Barrenación" Value="3" />
|
<asp:ListItem Text="Familia,Linea,Rin,Medida de Barrenación" Value="3" />
|
||||||
|
<asp:ListItem Text="Rin,Medida de Barrenación" Value="4" />
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
<asp:DropDownList runat="server" ID="DdlMedidas" CssClass="form-control input-sm select2me" Width="150px" DataTextField="Medida" DataValueField="CveMedida"></asp:DropDownList>
|
<asp:DropDownList runat="server" ID="DdlMedidas" CssClass="form-control input-sm select2me" Width="150px" DataTextField="Medida" DataValueField="CveMedida"></asp:DropDownList>
|
||||||
</td>
|
</td>
|
||||||
<td rowspan="2">
|
<td rowspan="2">
|
||||||
<div id="DivEquivalentes" style="overflow-y: auto; overflow-x:hidden; width: 150px; height:100px" runat="server" visible="False">
|
<div id="DivEquivalentes" style="overflow-y: auto; overflow-x:hidden; width: 150px; height:70px" runat="server" visible="False">
|
||||||
<asp:GridView ID="GvEquival" runat="server" AutoGenerateColumns="False" DataKeyNames="CveMedidaEquivalencia,CveMedida,CveRin,CveMedidaEquivalente,CveRinEquivalente,Medida,RinTamaño,MedidaEquivalente,RinTamañoEquivalente" EmptyDataText="" ToolTip="" CssClass="table table-striped table-advance table-hover" Style="margin-top: 10px; width: 100%" GridLines="None">
|
<asp:GridView ID="GvEquival" runat="server" AutoGenerateColumns="False" DataKeyNames="CveMedidaEquivalencia,CveMedida,CveRin,CveMedidaEquivalente,CveRinEquivalente,Medida,RinTamaño,MedidaEquivalente,RinTamañoEquivalente" EmptyDataText="" ToolTip="" CssClass="table table-striped table-advance table-hover" Style="margin-top: 10px; width: 100%" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField ItemStyle-Width="300px" HeaderText="Equivalentes">
|
<asp:TemplateField ItemStyle-Width="300px" HeaderText="Equivalentes">
|
||||||
@@ -138,7 +138,7 @@
|
|||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
</div>
|
</div>
|
||||||
<div id="DivMedRin" style="overflow-y: auto; width: 765px; height: 230px;" runat="server" visible="True">
|
<div id="DivMedRin" style="overflow-y: auto; width: 765px; height: 325px;" runat="server" visible="False">
|
||||||
<asp:GridView ID="GvMedRin" Width="100%" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron registros" ToolTip="Listado de Contratos encontrados." CssClass="table table-striped table-hover" GridLines="None">
|
<asp:GridView ID="GvMedRin" Width="100%" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron registros" ToolTip="Listado de Contratos encontrados." CssClass="table table-striped table-hover" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField DataField="Almacen" HeaderText="Almacén" />
|
<asp:BoundField DataField="Almacen" HeaderText="Almacén" />
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ Partial Class Inventarios_Default
|
|||||||
If ValidarFiltrosSeleccionados() OrElse CvePS > 0 Then
|
If ValidarFiltrosSeleccionados() OrElse CvePS > 0 Then
|
||||||
Dim ObjInventarios As New ClsInventarios()
|
Dim ObjInventarios As New ClsInventarios()
|
||||||
If ObjInventarios.GetExistenciasProducto(CvePS, -1, UsuarioActual.CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"),
|
If ObjInventarios.GetExistenciasProducto(CvePS, -1, UsuarioActual.CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"),
|
||||||
ExcluyeApartados:=-1, ExcluyeAdelantado:=1, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero, TopSelect:=100) Then
|
ExcluyeApartados:=-1, ExcluyeAdelantado:=1, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero, ExcluyeTransitorios:=1, TopSelect:=100) Then
|
||||||
Dim dr As Data.DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
|
Dim dr As Data.DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
|
||||||
|
|
||||||
If dr IsNot Nothing Then
|
If dr IsNot Nothing Then
|
||||||
@@ -243,6 +243,7 @@ Partial Class Inventarios_Default
|
|||||||
ObjInventarios.Dispose()
|
ObjInventarios.Dispose()
|
||||||
GvMedRin.DataBind()
|
GvMedRin.DataBind()
|
||||||
UPDatos.Update()
|
UPDatos.Update()
|
||||||
|
DivMedRin.Visible = True
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaEquivalencia()
|
Private Sub CargaEquivalencia()
|
||||||
|
|||||||
@@ -938,12 +938,12 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
TotalCompraOC = ObjCompras.DtResultados.Rows(0)("SubTotal").ToString.ToDecimal - ObjCompras.DtResultados.Rows(0)("Descuentos").ToString.ToDecimal
|
TotalCompraOC = ObjCompras.DtResultados.Rows(0)("SubTotal").ToString.ToDecimal - ObjCompras.DtResultados.Rows(0)("Descuentos").ToString.ToDecimal
|
||||||
CveTipoCompra = ObjCompras.DtResultados.Rows(0)("CveTipoCompra").ToString.ToEntero
|
CveTipoCompra = ObjCompras.DtResultados.Rows(0)("CveTipoCompra").ToString.ToEntero
|
||||||
|
|
||||||
If TipoMovimiento = 3 Then
|
If CveTipoCompra = 9 Then
|
||||||
CargaAlmacenes(-1, "21,2", CveTipoCompra)
|
|
||||||
ElseIf CveTipoCompra = 9 Then
|
|
||||||
CargaAlmacenes(-1, "27", CveTipoCompra)
|
CargaAlmacenes(-1, "27", CveTipoCompra)
|
||||||
ElseIf CveTipoCompra = 10 Then
|
ElseIf CveTipoCompra = 10 Then
|
||||||
CargaAlmacenes(-1, CveTipoCompra:=CveTipoCompra)
|
CargaAlmacenes(-1, CveTipoCompra:=CveTipoCompra)
|
||||||
|
ElseIf TipoMovimiento = 3 Then
|
||||||
|
CargaAlmacenes(-1, "21,2", CveTipoCompra)
|
||||||
Else
|
Else
|
||||||
CargaAlmacenes(-1)
|
CargaAlmacenes(-1)
|
||||||
End If
|
End If
|
||||||
@@ -2713,13 +2713,13 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If DtPSVirtual IsNot Nothing AndAlso DtPSVirtual.Rows.Count > 0 Then
|
If DtPSVirtual IsNot Nothing AndAlso DtPSVirtual.Rows.Count > 0 Then
|
||||||
Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen= {DdlAlmacen.SelectedValue}").ToEntero()
|
'Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen= {DdlAlmacen.SelectedValue}").ToEntero()
|
||||||
|
|
||||||
Dim CveTipoAlmacenFiltro As Integer = If(CveTipoCompra = 9, 25, 24)
|
Dim CveTipoAlmacenFiltro As Integer = If(CveTipoCompra = 9, 25, 24)
|
||||||
|
|
||||||
Dim CveAlmacenVirutal As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=tCveAlmacen).FiltroPrimeroValor("CveAlmacenVirtual").ToEntero()
|
Dim CveAlmacenVirtual As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=tCveAlmacen).FiltroPrimeroValor("CveAlmacenVirtual").ToEntero()
|
||||||
|
|
||||||
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirutal, If(TipoMovimiento > 1, 13, 2), 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompraSurtir, -1, -1, -1, CveMovimientoRelacionado:=CveMovimiento, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="RA/G4")
|
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, If(TipoMovimiento > 1, 13, 2), 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompraSurtir, -1, -1, -1, CveMovimientoRelacionado:=CveMovimiento, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="RA/G4")
|
||||||
FolioVirtual = ObjInventario.Folio
|
FolioVirtual = ObjInventario.Folio
|
||||||
|
|
||||||
For Each RowUsado As DataRow In DtPSVirtual.Rows
|
For Each RowUsado As DataRow In DtPSVirtual.Rows
|
||||||
@@ -2865,11 +2865,11 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
Next
|
Next
|
||||||
|
|
||||||
If DtPSVirtual IsNot Nothing AndAlso DtPSVirtual.Rows.Count > 0 Then
|
If DtPSVirtual IsNot Nothing AndAlso DtPSVirtual.Rows.Count > 0 Then
|
||||||
Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen= {DdlAlmacen.SelectedValue}").ToEntero()
|
'Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen= {DdlAlmacen.SelectedValue}").ToEntero()
|
||||||
|
|
||||||
Dim CveAlmacenVirutal As Integer = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 25).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto={CveSubProyecto}").ToEntero()
|
Dim CveAlmacenVirtual As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=CveAlmacen).FiltroPrimeroValor("CveAlmacenVirtual").ToEntero()
|
||||||
|
|
||||||
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirutal, If(TipoMovimiento > 1, 13, 2), 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompraSurtir, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="RA/G5")
|
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, If(TipoMovimiento > 1, 13, 2), 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompraSurtir, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="RA/G5")
|
||||||
FolioVirtual = ObjInventario.Folio
|
FolioVirtual = ObjInventario.Folio
|
||||||
|
|
||||||
For Each RowUsado As DataRow In DtPSVirtual.Rows
|
For Each RowUsado As DataRow In DtPSVirtual.Rows
|
||||||
|
|||||||
@@ -194,9 +194,10 @@ Partial Class Inventarios_RepAnomalias
|
|||||||
e.Row.Cells(8).Text = "0"
|
e.Row.Cells(8).Text = "0"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If e.Row.Cells(7).Text = MinFecha Then
|
If e.Row.Cells(7).Text = MinFecha.ToString Then
|
||||||
e.Row.Cells(7).Text = ""
|
e.Row.Cells(7).Text = ""
|
||||||
End If
|
End If
|
||||||
|
|
||||||
e.Row.FCLabel("Lblc").Text = e.Row.RowIndex + 1
|
e.Row.FCLabel("Lblc").Text = e.Row.RowIndex + 1
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -1521,7 +1521,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
FolioBusqueda = If(TxtFolioRecepcion.Text = "", -1, TxtFolioRecepcion.Text.ToEntero)
|
FolioBusqueda = If(TxtFolioRecepcion.Text = "", -1, TxtFolioRecepcion.Text.ToEntero)
|
||||||
|
|
||||||
Dim ObjInventarios As New ClsInventarios
|
Dim ObjInventarios As New ClsInventarios
|
||||||
If ObjInventarios.GetMovimientosTransitorios(DdlAlmacenRecepcion.SelectedValue.ToEntero, -1, DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero, -1, FolioBusqueda, UsuarioActual.CveEmpresa) Then
|
If ObjInventarios.GetMovimientosTransitorios(DdlAlmacenRecepcion.SelectedValue.ToEntero, -1, DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero, -1, FolioBusqueda, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
|
||||||
Dtt = ObjInventarios.DtResultados.FiltraParametros(String.Format("CveTipoAlmacenDestino <> 4"))
|
Dtt = ObjInventarios.DtResultados.FiltraParametros(String.Format("CveTipoAlmacenDestino <> 4"))
|
||||||
Else
|
Else
|
||||||
Alert("Ocurrió un error al consultar los movimientos transitorios. Por favor vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
Alert("Ocurrió un error al consultar los movimientos transitorios. Por favor vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||||
@@ -1623,7 +1623,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Dim CveMovimientoEntrada As Integer = 0
|
Dim CveMovimientoEntrada As Integer = 0
|
||||||
Dim Folio As Integer = 0
|
Dim tFolio As Integer = 0
|
||||||
Dim ErrorMovInv As Boolean = False
|
Dim ErrorMovInv As Boolean = False
|
||||||
Dim TextoError As String = ""
|
Dim TextoError As String = ""
|
||||||
Dim Fecha As Date = TxtFechaRecepcion.Text.ToDate
|
Dim Fecha As Date = TxtFechaRecepcion.Text.ToDate
|
||||||
@@ -1647,7 +1647,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
If Concepto = "" Then Concepto = "Cancelación Traspaso"
|
If Concepto = "" Then Concepto = "Cancelación Traspaso"
|
||||||
|
|
||||||
If Not ErrorMovInv Then
|
If Not ErrorMovInv Then
|
||||||
Folio = ObjInventario.Folio
|
tFolio = ObjInventario.Folio
|
||||||
CvePrePoliza = ObjConta.AddPrePolizas("Inventario/TraspasoAlmacen", 53, 0, 0, 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
CvePrePoliza = ObjConta.AddPrePolizas("Inventario/TraspasoAlmacen", 53, 0, 0, 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
If CvePrePoliza <= 0 Then
|
If CvePrePoliza <= 0 Then
|
||||||
@@ -1739,14 +1739,14 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
Dim ImporteDecimal As Decimal = importe.ToDecimal.RoundSQL
|
Dim ImporteDecimal As Decimal = importe.ToDecimal.RoundSQL
|
||||||
Dim IdCtaContable As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero)).ToEntero
|
Dim IdCtaContable As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero)).ToEntero
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteDecimal, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1,
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteDecimal, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1,
|
||||||
CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=ImporteDecimal) Then
|
CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=ImporteDecimal) Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
TextoError = "Ocurrió un erro al cancelar el traspaso"
|
TextoError = "Ocurrió un erro al cancelar el traspaso"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteDecimal, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1,
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteDecimal, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1,
|
||||||
CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=ImporteDecimal) Then
|
CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=ImporteDecimal) Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
TextoError = "Ocurrió un erro al cancelar el traspaso"
|
TextoError = "Ocurrió un erro al cancelar el traspaso"
|
||||||
End If
|
End If
|
||||||
@@ -1768,7 +1768,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
TxtObservacionesRecepcion.Text = ""
|
TxtObservacionesRecepcion.Text = ""
|
||||||
|
|
||||||
Dim Mensaje As StringBuilder = New StringBuilder
|
Dim Mensaje As StringBuilder = New StringBuilder
|
||||||
Mensaje.AppendFormat("Se realizo correctamente la cancelación. <br/> Folio de Entrada: <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}"" target=""_blank"">{0}</a></b>", Folio, CveMovimientoEntrada)
|
Mensaje.AppendFormat("Se realizo correctamente la cancelación. <br/> Folio de Entrada: <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}"" target=""_blank"">{0}</a></b>", tFolio, CveMovimientoEntrada)
|
||||||
Mensaje.AppendFormat("<br/><a target='_blank' href='/Compras/PopUpVerFactura.aspx?P={0}'>Imprimir Reporte</a>", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoEntrada))) 'onclick='ImprimirTraslado()'
|
Mensaje.AppendFormat("<br/><a target='_blank' href='/Compras/PopUpVerFactura.aspx?P={0}'>Imprimir Reporte</a>", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoEntrada))) 'onclick='ImprimirTraslado()'
|
||||||
If CveMovimientoVirtualEntrada > 0 Then Mensaje.AppendFormat("<br/>Folio Virtual: <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}"" target=""_blank"">{2}</a></b> <br/><a target='_blank' href='/Compras/PopUpVerFactura.aspx?P={0}'>Imprimir Entrada Virtual</a>", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoVirtualEntrada)), CveMovimientoVirtualEntrada, FolioVirtualEntrada)
|
If CveMovimientoVirtualEntrada > 0 Then Mensaje.AppendFormat("<br/>Folio Virtual: <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}"" target=""_blank"">{2}</a></b> <br/><a target='_blank' href='/Compras/PopUpVerFactura.aspx?P={0}'>Imprimir Entrada Virtual</a>", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoVirtualEntrada)), CveMovimientoVirtualEntrada, FolioVirtualEntrada)
|
||||||
|
|
||||||
@@ -1816,7 +1816,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL())
|
Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL())
|
||||||
|
|
||||||
'' verifica que no se halla recibido previamente, si ya se recibió da salida
|
'' verifica que no se halla recibido previamente, si ya se recibió da salida
|
||||||
If ObjInventario.GetMovimientosTransitorios(CveAlmacenDestino, -1, CveAlmacenTransitorio, -1, FolioBusqueda, UsuarioActual.CveEmpresa) Then
|
If ObjInventario.GetMovimientosTransitorios(CveAlmacenDestino, -1, CveAlmacenTransitorio, -1, FolioBusqueda, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
|
||||||
Dtt = ObjInventario.DtResultados.FiltraParametros(String.Format("CveTipoAlmacenDestino <> 4"), "", {"CveMovimientoDetalle", "Codigo", "Cantidad"})
|
Dtt = ObjInventario.DtResultados.FiltraParametros(String.Format("CveTipoAlmacenDestino <> 4"), "", {"CveMovimientoDetalle", "Codigo", "Cantidad"})
|
||||||
If Dtt IsNot Nothing AndAlso Dtt.FiltraParametros("Cantidad < 0").Rows.Count > 0 Then
|
If Dtt IsNot Nothing AndAlso Dtt.FiltraParametros("Cantidad < 0").Rows.Count > 0 Then
|
||||||
|
|
||||||
|
|||||||
@@ -221,7 +221,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li id="tdBExi" runat="server" visible="false">
|
<li id="tdBExi" runat="server" visible="false">
|
||||||
<a onclick="javascript:AbrirVentana('/Inventarios/PopUpExistenciasAlmacen.aspx?CvePS=-1',800,547,'N');">
|
<a onclick="javascript:AbrirVentana('/Inventarios/PopUpExistenciasAlmacen.aspx?CvePS=-1',800,597,'N');">
|
||||||
<i class="fa fa-cubes"></i>
|
<i class="fa fa-cubes"></i>
|
||||||
Buscar Existencias
|
Buscar Existencias
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -46,8 +46,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<label id="LblMarca" runat="server" visible="false" class="col-md-1 v-center truncate">Marca:</label>
|
<label id="LblMarca" runat="server" visible="false" class="col-md-1 v-center truncate">Marca:</label>
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
<asp:ListBox ID="DdlMarca" runat="server" DataTextField="Marca" DataValueField="CveMarca" data-text="Todos" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" Style="width: 50%; height: 50px !important;">
|
<asp:ListBox ID="DdlMarca" visible="false" runat="server" DataTextField="Marca" DataValueField="CveMarca" data-text="Todos" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" Style="width: 50%; height: 50px !important;">
|
||||||
<asp:ListItem Text="Todas" Value="-1"></asp:ListItem>
|
|
||||||
</asp:ListBox>
|
</asp:ListBox>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -221,7 +221,7 @@ Partial Class Ventas_ActualizarPrecios
|
|||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
If Correcto Then
|
If Correcto AndAlso Not TieneError Then
|
||||||
Alert("Los Precios de lista de los Productos/Servicios se actualizaron correctamente")
|
Alert("Los Precios de lista de los Productos/Servicios se actualizaron correctamente")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -531,29 +531,38 @@ Partial Class Ventas_ActualizarPrecios
|
|||||||
|
|
||||||
Private Function ActualizarPreciosFranquicia(ObjPS As ClsProductosServicios, Codigo As String, PS As String, Precio As Decimal, PrecioMinimo As Decimal, PrecioLista As String) As Boolean
|
Private Function ActualizarPreciosFranquicia(ObjPS As ClsProductosServicios, Codigo As String, PS As String, Precio As Decimal, PrecioMinimo As Decimal, PrecioLista As String) As Boolean
|
||||||
Dim FranquiciasStr As String = UsuarioActual.Empresa.Funcionalidad(563)
|
Dim FranquiciasStr As String = UsuarioActual.Empresa.Funcionalidad(563)
|
||||||
Dim Franquicias = FranquiciasStr.Split(","c)
|
|
||||||
Dim Porcentaje As Decimal = If(TxtPorcentaje.Text = "", -1, TxtPorcentaje.Text.ToDecimal)
|
|
||||||
Dim StrMsg As New StringBuilder
|
Dim StrMsg As New StringBuilder
|
||||||
For Each Franquicia In Franquicias
|
Dim StrMsgError As New StringBuilder
|
||||||
Dim CveFranquicia As Integer = Franquicia.ToEntero
|
If FranquiciasStr <> "" Then
|
||||||
Dim CvePS As Integer = GlobalDTPS(CveFranquicia, Codigo:=Codigo).FiltroPrimeroValor("CvePS", "").ToEntero
|
|
||||||
Dim CvePrecioLisa As Integer = GlobalDTPrecioListas(CveFranquicia).FiltroPrimeroValor("CvePrecioLista", String.Format("PrecioLista = '{0}'", PrecioLista)).ToEntero
|
|
||||||
|
|
||||||
If CvePS <= 0 Then
|
Dim Franquicias = FranquiciasStr.Split(","c)
|
||||||
Dim EmpresaFranquicia As String = GlobalDTEmpresas(CveEmpresa:=CveFranquicia).FiltroPrimeroValor("Empresa")
|
Dim Porcentaje As Decimal = If(TxtPorcentaje.Text = "", -1, TxtPorcentaje.Text.ToDecimal)
|
||||||
StrMsg.AppendFormat("El producto '{0}' no se encuentra en la Franquicia '{1}'", PS, EmpresaFranquicia)
|
|
||||||
|
|
||||||
End If
|
For Each Franquicia In Franquicias
|
||||||
If CvePrecioLisa <= 0 Then
|
Dim CveFranquicia As Integer = Franquicia.ToEntero
|
||||||
Dim EmpresaFranquicia As String = GlobalDTEmpresas(CveEmpresa:=CveFranquicia).FiltroPrimeroValor("Empresa")
|
Dim CvePS As Integer = GlobalDTPS(CveFranquicia, Codigo:=Codigo).FiltroPrimeroValor("CvePS", "").ToEntero
|
||||||
StrMsg.AppendFormat("El precio lista '{0}' no existe en la Franquicia '{1}'", DdlPrecioLista.SelectedItem.Text, EmpresaFranquicia)
|
Dim CvePrecioLisa As Integer = GlobalDTPrecioListas(CveFranquicia).FiltroPrimeroValor("CvePrecioLista", String.Format("PrecioLista = '{0}'", PrecioLista)).ToEntero
|
||||||
End If
|
|
||||||
If CvePrecioLisa > 0 AndAlso CvePS > 0 AndAlso Not ObjPS.UpdatePSPreciosLista(Precio, CvePrecioLisa, Porcentaje, CvePS, UsuarioActual.CveUsuario, DateTime.Now, If(RblTipo.SelectedValue = "Imp", True, False), PrecioMinimo:=PrecioMinimo) Then
|
|
||||||
StrMsg.AppendFormat("No se pudo actualizar el producto")
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
|
|
||||||
If StrMsg.ToString = "" Then
|
If CvePS <= 0 Then
|
||||||
|
Dim EmpresaFranquicia As String = GlobalDTEmpresas(CveEmpresa:=CveFranquicia).FiltroPrimeroValor("Empresa")
|
||||||
|
StrMsg.AppendFormat("El producto '{0}' no se encuentra en la Franquicia '{1}' <br/>", PS, EmpresaFranquicia)
|
||||||
|
|
||||||
|
End If
|
||||||
|
'If CvePrecioLisa <= 0 Then
|
||||||
|
' Dim EmpresaFranquicia As String = GlobalDTEmpresas(CveEmpresa:=CveFranquicia).FiltroPrimeroValor("Empresa")
|
||||||
|
' StrMsg.AppendFormat("El precio lista '{0}' no existe en la Franquicia '{1}'<br/>", DdlPrecioLista.SelectedItem.Text, EmpresaFranquicia)
|
||||||
|
'End If
|
||||||
|
If CvePrecioLisa > 0 AndAlso CvePS > 0 AndAlso Not ObjPS.UpdatePSPreciosLista(Precio, CvePrecioLisa, Porcentaje, CvePS, UsuarioActual.CveUsuario, DateTime.Now, If(RblTipo.SelectedValue = "Imp", True, False), PrecioMinimo:=PrecioMinimo) Then
|
||||||
|
StrMsgError.AppendFormat("No se pudo actualizar el producto")
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
If StrMsgError.ToString = "" Then
|
||||||
|
If StrMsg.ToString <> "" Then
|
||||||
|
Alert(StrMsg.ToString, TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
Return False
|
Return False
|
||||||
Else
|
Else
|
||||||
Return True
|
Return True
|
||||||
|
|||||||
@@ -9141,7 +9141,7 @@ Partial Class Clientes
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Dim ImporteBonificacion As Decimal = 0
|
Dim ImporteBonificacion As Decimal = 0
|
||||||
If ObjAcum.GetMovimientosDistribuidorResumen(CveCliente, UsuarioActual.CveEmpresa) AndAlso ObjAcum.DtResultados.Rows.Count > 0 Then
|
If ObjAcum.GetMovimientosDistribuidorResumen(CveCliente, UsuarioActual.CveEmpresa) AndAlso ObjAcum.DtResultados.Rows.Count >= 4 Then
|
||||||
GvUsadosResumen.DataSource = ObjAcum.DtResultados
|
GvUsadosResumen.DataSource = ObjAcum.DtResultados
|
||||||
ImporteBonificacion = ObjAcum.DtResultados.Rows(4)("Valor").ToString().ToDecimal()
|
ImporteBonificacion = ObjAcum.DtResultados.Rows(4)("Valor").ToString().ToDecimal()
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -261,7 +261,7 @@
|
|||||||
<asp:UpdatePanel ID="UPVentas" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UPVentas" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:GridView ID="GvCxC" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas por Cobrar Pendientes"
|
<asp:GridView ID="GvCxC" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas por Cobrar Pendientes"
|
||||||
DataKeyNames="TipoDocto,CveVenta,CveCliente,SerieFolio,Original,SubTotal,IVA,IEPS,RetIVA,RetISR,Num3,CveSubProyecto,CveMoneda,Saldo,TipoCambio, RFC,UUID,Fecha,PorcentajeIVA,DescuentoProntoPago,CveTipoRetencion,Descuento"
|
DataKeyNames="TipoDocto,CveVenta,CveCliente,SerieFolio,Original,SubTotal,IVA,IEPS,RetIVA,RetISR,Num3,CveSubProyecto,CveMoneda,Saldo,TipoCambio, RFC,UUID,Fecha,PorcentajeIVA,DescuentoProntoPago,CveTipoRetencion,Descuento,ClaveMetodoPagoSAT"
|
||||||
CssClass="table table-striped table-advance table-hover Widthall" Style="text-align: center;" GridLines="None">
|
CssClass="table table-striped table-advance table-hover Widthall" Style="text-align: center;" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
@@ -358,7 +358,15 @@
|
|||||||
<asp:TemplateField Visible="False">
|
<asp:TemplateField Visible="False">
|
||||||
<HeaderTemplate>CveVenta</HeaderTemplate>
|
<HeaderTemplate>CveVenta</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:HyperLink ID="HplF2" CssClass="Texto" Text='<%# Eval("CveVenta")%>' runat="server"></asp:HyperLink>
|
<asp:HyperLink ID="HplF2" CssClass="btn-success" Text='<%# Eval("CveVenta")%>' runat="server"></asp:HyperLink>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
|
||||||
|
<asp:TemplateField >
|
||||||
|
<HeaderTemplate>Complemento Pago</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:LinkButton runat="server" ID="LnkComplemento" CssClass="text-success" Text="<i class='fa fa-check' aria-hidden='true'></i>" OnClientClick="return false;" ></asp:LinkButton>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
|||||||
@@ -636,6 +636,17 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
e.Row.FCCheckBox("Chk").Visible = False
|
e.Row.FCCheckBox("Chk").Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If e.Row.DBCampo("CveVenta").ToEntero > 0 Then
|
||||||
|
If e.Row.DataKey("ClaveMetodoPagoSAT") = "PUE" Then
|
||||||
|
e.Row.FCLinkButton("LnkComplemento").Text = "<i class='fa fa-times' aria-hidden='true'></i>"
|
||||||
|
e.Row.FCLinkButton("LnkComplemento").CssClass = "text-danger"
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
e.Row.FCLinkButton("LnkComplemento").Visible = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -2071,8 +2082,13 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
Dim SubProyecto = DrSubProyecto("SubProyecto").ToString
|
Dim SubProyecto = DrSubProyecto("SubProyecto").ToString
|
||||||
Dim Proyecto = DrSubProyecto("Proyecto").ToString
|
Dim Proyecto = DrSubProyecto("Proyecto").ToString
|
||||||
|
|
||||||
Dim CveSATNC = "84111506"
|
Dim CveSATNC As Integer
|
||||||
Dim DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, SATClavePS:=CveSATNC, AplicaParaVenta:=1).FiltroPrimero("")
|
Dim ArrayNC As String() = UsuarioActual.Empresa.Funcionalidad(591).Split(",".ToCharArray())
|
||||||
|
Dim NCBonificacion As Integer = 0
|
||||||
|
If ArrayNC.Length > 6 Then 'CONCEPTO DE PRONTO PAGO
|
||||||
|
CveSATNC = ArrayNC(6).ToEntero()
|
||||||
|
End If
|
||||||
|
Dim DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CveSATNC, AplicaParaVenta:=1).FiltroPrimero("")
|
||||||
|
|
||||||
For Each Dr As DataRow In DtImpuestos.Rows
|
For Each Dr As DataRow In DtImpuestos.Rows
|
||||||
AgregaTempDTNC(ObjFacturaDevolucion.DtDetalle, DrPS("CvePS").ToString.ToEntero, DrPS("PS").ToString, DrPS("Codigo").ToString, DrPS("PSCodigo").ToString, DrPS("CveTipoPS").ToString.ToEntero, DrPS("Inv_CveMetodoInventario").ToString.ToEntero,
|
AgregaTempDTNC(ObjFacturaDevolucion.DtDetalle, DrPS("CvePS").ToString.ToEntero, DrPS("PS").ToString, DrPS("Codigo").ToString, DrPS("PSCodigo").ToString, DrPS("CveTipoPS").ToString.ToEntero, DrPS("Inv_CveMetodoInventario").ToString.ToEntero,
|
||||||
@@ -2505,6 +2521,18 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
|
|
||||||
'For i = 0 To CveVentas.Count - 1
|
'For i = 0 To CveVentas.Count - 1
|
||||||
Dim ObjBancos As New ClsBancos
|
Dim ObjBancos As New ClsBancos
|
||||||
|
|
||||||
|
|
||||||
|
If ObjBancos.GetComplementoPagosRep(-1, Now.AddYears(-2), Now, CveIE, -1, If(CveIESustitucion > 0, 2, 1), UsuarioActual.CveEmpresa, -1) Then
|
||||||
|
If Not ObjBancos.DtResultados.Rows.Count > 0 Then
|
||||||
|
ObjBancos.Dispose()
|
||||||
|
Alert("No se generaron complementos de pago porque no hay facturas con método de pago PPD", TipoMensaje.MsgAdvertencia)
|
||||||
|
Return ""
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ObjBancos.IniciaTransacSQL()
|
ObjBancos.IniciaTransacSQL()
|
||||||
|
|
||||||
If ObjBancos.GeneraTimbrePago(CveIE, -1, UsuarioActual, CveCliente, CFDIRelacionado:=CFDIRelacionadoSustitucion, EsRegeneracion:=If(CveIESustitucion > 0, True, False)) Then
|
If ObjBancos.GeneraTimbrePago(CveIE, -1, UsuarioActual, CveCliente, CFDIRelacionado:=CFDIRelacionadoSustitucion, EsRegeneracion:=If(CveIESustitucion > 0, True, False)) Then
|
||||||
|
|||||||
@@ -2700,6 +2700,8 @@ Partial Class PV
|
|||||||
Objeto.Attributes.Add("data-cvesubproyecto", DdlSubProyectoDatos.SelectedValue)
|
Objeto.Attributes.Add("data-cvesubproyecto", DdlSubProyectoDatos.SelectedValue)
|
||||||
'Objeto.ddlWS.Attributes.Add("data-cveclasificacion", CveClasificacion.ToString)
|
'Objeto.ddlWS.Attributes.Add("data-cveclasificacion", CveClasificacion.ToString)
|
||||||
Objeto.ddlWS.Attributes.Add("data-cveclasificacion", "-1")
|
Objeto.ddlWS.Attributes.Add("data-cveclasificacion", "-1")
|
||||||
|
Objeto.ddlWS.Attributes.Add("data-aplicaparaventa", "1")
|
||||||
|
|
||||||
If AplicaAlmacen Then
|
If AplicaAlmacen Then
|
||||||
Objeto.ddlWS.Attributes.Add("data-pagina", "ventas/ventas")
|
Objeto.ddlWS.Attributes.Add("data-pagina", "ventas/ventas")
|
||||||
Else
|
Else
|
||||||
|
|||||||
@@ -132,7 +132,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtPS" CssClass="form-control Mayuscula" runat="server" MaxLength="846"></asp:TextBox>
|
<asp:TextBox ID="TxtPS" TextMode="MultiLine" Rows="2" CssClass="form-control Mayuscula" runat="server" MaxLength="846"></asp:TextBox>
|
||||||
<label class="truncate" for="<%= TxtPS.ClientID.ToString()%>">Descripción del Producto / Servicio:</label>
|
<label class="truncate" for="<%= TxtPS.ClientID.ToString()%>">Descripción del Producto / Servicio:</label>
|
||||||
<asp:RequiredFieldValidator ID="RFVPS" runat="server" ControlToValidate="TxtPS" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Producto Servicio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVPS" runat="server" ControlToValidate="TxtPS" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Producto Servicio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCEPS" runat="server" HighlightCssClass="vco" TargetControlID="RFVPS" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCEPS" runat="server" HighlightCssClass="vco" TargetControlID="RFVPS" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
|
|||||||
@@ -2823,8 +2823,8 @@
|
|||||||
<asp:RadioButtonList ID="RBLTipoContrato" AppendDataBoundItems="true" OnSelectedIndexChanged="RBLTipoContrato_SelectedIndexChanged" AutoPostBack="true" runat="server" RepeatDirection="Horizontal">
|
<asp:RadioButtonList ID="RBLTipoContrato" AppendDataBoundItems="true" OnSelectedIndexChanged="RBLTipoContrato_SelectedIndexChanged" AutoPostBack="true" runat="server" RepeatDirection="Horizontal">
|
||||||
<asp:ListItem Text="Venta" Value="2" Selected="True" />
|
<asp:ListItem Text="Venta" Value="2" Selected="True" />
|
||||||
<asp:ListItem Text="Suministro" Value="1" />
|
<asp:ListItem Text="Suministro" Value="1" />
|
||||||
<%--<asp:ListItem Text="Consignación" Value="3" Enabled="false" />--%>
|
|
||||||
<asp:ListItem Text="Obra" Value="4" />
|
<asp:ListItem Text="Obra" Value="4" />
|
||||||
|
|
||||||
</asp:RadioButtonList>
|
</asp:RadioButtonList>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
|
|||||||
@@ -8312,7 +8312,7 @@ Partial Class Ventas
|
|||||||
If ObjFolios.GetFolios(TipoDoctoConsulta, UsuarioActual.CveEmpresa) Then
|
If ObjFolios.GetFolios(TipoDoctoConsulta, UsuarioActual.CveEmpresa) Then
|
||||||
Dim DT As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format(" CveSubProyecto = {0} And Estado = 'Activo'", DdlSubProyectoDatos.SelectedValue))
|
Dim DT As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format(" CveSubProyecto = {0} And Estado = 'Activo'", DdlSubProyectoDatos.SelectedValue))
|
||||||
If DT.Rows.Count > 0 Then
|
If DT.Rows.Count > 0 Then
|
||||||
ObjFactura.Serie = DT.Rows(0)("Serie").ToString()
|
ObjFacturaDevolucion.Serie = DT.Rows(0)("Serie").ToString()
|
||||||
End If
|
End If
|
||||||
DT.Dispose()
|
DT.Dispose()
|
||||||
End If
|
End If
|
||||||
@@ -8590,7 +8590,7 @@ Partial Class Ventas
|
|||||||
If ObjFolios.GetFolios(TipoDoctoConsulta, UsuarioActual.CveEmpresa) Then
|
If ObjFolios.GetFolios(TipoDoctoConsulta, UsuarioActual.CveEmpresa) Then
|
||||||
Dim DT As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format(" CveSubProyecto = {0} And Estado = 'Activo'", DdlSubProyectoDatos.SelectedValue))
|
Dim DT As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format(" CveSubProyecto = {0} And Estado = 'Activo'", DdlSubProyectoDatos.SelectedValue))
|
||||||
If DT.Rows.Count > 0 Then
|
If DT.Rows.Count > 0 Then
|
||||||
ObjFactura.Serie = DT.Rows(0)("Serie").ToString()
|
ObjFacturaBonificacion.Serie = DT.Rows(0)("Serie").ToString()
|
||||||
End If
|
End If
|
||||||
DT.Dispose()
|
DT.Dispose()
|
||||||
End If
|
End If
|
||||||
@@ -9117,7 +9117,7 @@ Partial Class Ventas
|
|||||||
ObjFactura.NumeroPersonas = 0
|
ObjFactura.NumeroPersonas = 0
|
||||||
|
|
||||||
|
|
||||||
If ObjFactura.TipoDocto = "Ant" And DdlContratosModal.SelectedValue.ToEntero > 0 Or ObjFactura.TipoDocto = "Ing" And DdlContratosModal.SelectedValue.ToEntero > 0 Then
|
If ObjFactura.TipoDocto = "Ant" And DdlContratosModal.SelectedValue.ToEntero > 0 Or ObjFactura.TipoDocto = "Ing" And DdlContratosModal.SelectedValue.ToEntero > 0 Or ObjFactura.TipoDocto = "Egs" And DdlContratosModal.SelectedValue.ToEntero > 0 Then
|
||||||
CveContrato = DdlContratosModal.SelectedValue.ToEntero
|
CveContrato = DdlContratosModal.SelectedValue.ToEntero
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -16417,6 +16417,10 @@ Partial Class Ventas
|
|||||||
Dim TotalCalculableImpuestosIVA As Decimal = 0
|
Dim TotalCalculableImpuestosIVA As Decimal = 0
|
||||||
PU = PU.RoundAD(6) ' el precio unitario puede llevar hasta 6 decimales permitidos
|
PU = PU.RoundAD(6) ' el precio unitario puede llevar hasta 6 decimales permitidos
|
||||||
|
|
||||||
|
If Not TmpDT.Columns.Contains("RetIVA") Then
|
||||||
|
TmpDT.Columns.Add("RetIVA", GetType(Decimal))
|
||||||
|
End If
|
||||||
|
|
||||||
Row = TmpDT.NewRow()
|
Row = TmpDT.NewRow()
|
||||||
Row("CveProyecto") = CveProyecto
|
Row("CveProyecto") = CveProyecto
|
||||||
Row("Proyecto") = Proyecto
|
Row("Proyecto") = Proyecto
|
||||||
@@ -16543,7 +16547,11 @@ Partial Class Ventas
|
|||||||
Row("IVA") = Row("PorcentajeIVA")
|
Row("IVA") = Row("PorcentajeIVA")
|
||||||
Row("ImporteIVA") = (Row("PorcentajeIVA").ToString().ToDecimal * TotalCalculableImpuestosIVA).RoundAD(NumeroDecimales)
|
Row("ImporteIVA") = (Row("PorcentajeIVA").ToString().ToDecimal * TotalCalculableImpuestosIVA).RoundAD(NumeroDecimales)
|
||||||
Row("ImporteRetIVA") = (ClienteRetIVA * TotalCalculableImpuestos).RoundAD(NumeroDecimales)
|
Row("ImporteRetIVA") = (ClienteRetIVA * TotalCalculableImpuestos).RoundAD(NumeroDecimales)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Row("RetIVA") = (ClienteRetIVA * TotalCalculableImpuestos).RoundAD(NumeroDecimales)
|
Row("RetIVA") = (ClienteRetIVA * TotalCalculableImpuestos).RoundAD(NumeroDecimales)
|
||||||
|
|
||||||
Row("ImporteRetISR") = (ClienteRetISR * TotalCalculableImpuestos).RoundAD(NumeroDecimales)
|
Row("ImporteRetISR") = (ClienteRetISR * TotalCalculableImpuestos).RoundAD(NumeroDecimales)
|
||||||
Row("PorcentajeRetIVA") = ClienteRetIVA
|
Row("PorcentajeRetIVA") = ClienteRetIVA
|
||||||
Row("PorcentajeRetISR") = ClienteRetISR
|
Row("PorcentajeRetISR") = ClienteRetISR
|
||||||
@@ -16741,6 +16749,8 @@ Partial Class Ventas
|
|||||||
TmpDT.Columns.Add("TipoDescuento", GetType(Integer))
|
TmpDT.Columns.Add("TipoDescuento", GetType(Integer))
|
||||||
TmpDT.Columns.Add("TotalImporte", GetType(Decimal))
|
TmpDT.Columns.Add("TotalImporte", GetType(Decimal))
|
||||||
TmpDT.Columns.Add("Total", GetType(Decimal))
|
TmpDT.Columns.Add("Total", GetType(Decimal))
|
||||||
|
TmpDT.Columns.Add("RetIVA", GetType(Decimal))
|
||||||
|
TmpDT.Columns.Add("RetISR", GetType(Decimal))
|
||||||
'Para uso del módulo contable
|
'Para uso del módulo contable
|
||||||
TmpDT.Columns.Add("AsientoContableVentas", GetType(Integer))
|
TmpDT.Columns.Add("AsientoContableVentas", GetType(Integer))
|
||||||
TmpDT.Columns.Add("IdCtaContVentas", GetType(Integer))
|
TmpDT.Columns.Add("IdCtaContVentas", GetType(Integer))
|
||||||
@@ -22613,6 +22623,42 @@ Partial Class Ventas
|
|||||||
If Not GeneraPrePolizaMovimientoAlmacen(ObjInventario, ObjConta, ObjContPaq, ObjFactura, ObjFactura.CvePrePoliza, CveMovimientoSalidaGeneral, CveAlmacenOrigenContrato) Then
|
If Not GeneraPrePolizaMovimientoAlmacen(ObjInventario, ObjConta, ObjContPaq, ObjFactura, ObjFactura.CvePrePoliza, CveMovimientoSalidaGeneral, CveAlmacenOrigenContrato) Then
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Dim RealizarMovimientoVirtual As Boolean = False
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
|
||||||
|
RealizarMovimientoVirtual = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
'VIRTUAL SALIDA
|
||||||
|
If RealizarMovimientoVirtual Then
|
||||||
|
|
||||||
|
Dim dtvirtual As DataTable = Nothing
|
||||||
|
Dim CveAlmacenVirtual As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=CveAlmacenOrigenContrato).FiltroPrimeroValor("CveAlmacenVirtual", "").ToEntero()
|
||||||
|
Dim CveMovimientoVirtualSalida As Integer
|
||||||
|
|
||||||
|
If ObjInventario.GetMovimientosDetalleVirtual(CveMovimientoSalidaGeneral, UsuarioActual.CveEmpresa) Then
|
||||||
|
|
||||||
|
dtvirtual = ObjInventario.DtResultados
|
||||||
|
|
||||||
|
If dtvirtual.Rows.Count > 0 Then
|
||||||
|
CveMovimientoVirtualSalida = ObjInventario.AddMovimiento(CveAlmacenVirtual, 37, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:="", Modulo:="VV2", CveMovimientoRelacionado:=CveMovimientoSalidaGeneral)
|
||||||
|
'FolioVirtualSalida = ObjInventario.Folio
|
||||||
|
|
||||||
|
For Each RowVirtual As DataRow In dtvirtual.Rows
|
||||||
|
Dim CvePS = RowVirtual("CvePS").ToString().ToEntero()
|
||||||
|
Dim CantidadUsado As Double = RowVirtual("Cantidad").ToString().ToDouble()
|
||||||
|
Dim PU As Decimal = RowVirtual("PU").ToString().ToDecimal()
|
||||||
|
Dim CveUM As Integer = RowVirtual("CveUM").ToString().ToEntero()
|
||||||
|
|
||||||
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoVirtualSalida, CantidadUsado, CveUM, CvePS, PU, -1, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
@@ -28910,11 +28956,11 @@ Partial Class Ventas
|
|||||||
Alert("Se selecciono un contrato de obra, para continuar seleccione una estimación.", TipoMensaje.MsgAdvertencia)
|
Alert("Se selecciono un contrato de obra, para continuar seleccione una estimación.", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ElseIf DdlTipoComprobante.SelectedValue = "Ant" Then
|
ElseIf DdlTipoComprobante.SelectedValue = "Ant" Or DdlTipoComprobante.SelectedValue = "Egs" Then
|
||||||
Respuesta = True
|
Respuesta = True
|
||||||
Else
|
Else
|
||||||
Alert("Tipo de documento no valido para contratos de obra.", TipoMensaje.MsgAdvertencia)
|
Alert("Tipo de documento no valido para contratos de obra.", TipoMensaje.MsgAdvertencia)
|
||||||
Respuesta = True
|
Respuesta = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
|
|||||||
@@ -140,6 +140,10 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user