-- que se pueda modificar la cantidad de producto, teniendo cvecompra asignada
This commit is contained in:
@@ -845,27 +845,27 @@ Partial Class OC
|
||||
'Nuevo Proceso que permite modificar detalles
|
||||
'If Not UsuarioActual.TienePermisoProceso(131) Then
|
||||
If GlobalDTOCEstatus(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveEstatus = {0}", CveEstatus)).Rows.Count > 0 Then
|
||||
Dim Dr As DataRow
|
||||
Dr = GlobalDTOCEstatus(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveEstatus = {0}", CveEstatus))(0)
|
||||
If UsuarioActual.TienePermisoProceso(203) And Dr("TipoTermino").ToString.ToEntero = 3 And Dr("Tipo").ToString = "OC" Then
|
||||
CargaClasificaciones()
|
||||
DesHabilitar()
|
||||
GvD.Columns(9).Visible = True
|
||||
LbAgregar.Enabled = True
|
||||
txtPrecioUnitario.Enabled = True
|
||||
DdlProyecto.Enabled = True
|
||||
DdlSubProyecto.Enabled = True
|
||||
TxtObsPS.Enabled = True
|
||||
CboUnidadMedida.Enabled = True
|
||||
DdlClasificacion.Enabled = True
|
||||
DdlP2.Enabled = True
|
||||
TxtCant.Enabled = True
|
||||
BtnGuardar.Enabled = True
|
||||
BtnCancelar.Enabled = True
|
||||
ElseIf Dr("TipoTermino").ToString.ToEntero = 3 And Dr("Tipo").ToString = "OC" Then
|
||||
DesHabilitar()
|
||||
End If
|
||||
Dim Dr As DataRow
|
||||
Dr = GlobalDTOCEstatus(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveEstatus = {0}", CveEstatus))(0)
|
||||
If (UsuarioActual.TienePermisoProceso(203)) AndAlso Dr("TipoTermino").ToString.ToEntero = 3 AndAlso Dr("Tipo").ToString = "OC" Then
|
||||
CargaClasificaciones()
|
||||
If Not UsuarioActual.TienePermisoProceso(131) Then DesHabilitar()
|
||||
GvD.Columns(9).Visible = True
|
||||
LbAgregar.Enabled = True
|
||||
txtPrecioUnitario.Enabled = True
|
||||
DdlProyecto.Enabled = True
|
||||
DdlSubProyecto.Enabled = True
|
||||
TxtObsPS.Enabled = True
|
||||
CboUnidadMedida.Enabled = True
|
||||
DdlClasificacion.Enabled = True
|
||||
DdlP2.Enabled = True
|
||||
TxtCant.Enabled = True
|
||||
BtnGuardar.Enabled = True
|
||||
BtnCancelar.Enabled = True
|
||||
ElseIf Dr("TipoTermino").ToString.ToEntero = 3 And Dr("Tipo").ToString = "OC" AndAlso Not UsuarioActual.TienePermisoProceso(131) Then
|
||||
DesHabilitar()
|
||||
End If
|
||||
End If
|
||||
'End If
|
||||
|
||||
'NO PERMITE REGISTRAR PS
|
||||
@@ -3594,9 +3594,6 @@ Partial Class OC
|
||||
|
||||
If Not (e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5) Then
|
||||
|
||||
|
||||
|
||||
|
||||
If e.Row.RowState = DataControlRowState.Normal Or e.Row.RowState = DataControlRowState.Alternate Then
|
||||
If UsuarioActual.Empresa.Tipo_CentroCosto = 1 Or UsuarioActual.Empresa.Tipo_CentroCosto = 2 Then
|
||||
Dim Str As String = e.Row.DBCampo("SubProyecto")
|
||||
@@ -3609,7 +3606,6 @@ Partial Class OC
|
||||
'comente esta linea, RMF: 2015.04.20
|
||||
'If DtEstatusUsuarios.FiltraParametros(String.Format("CveSubProyecto = {0}", e.Row.DBCampo("CveSubProyecto"))).Rows.Count = 0 Then e.Row.FCImageButton("ImgEdit").Visible = False : e.Row.FCImageButton("ImgDelete").Visible = False
|
||||
|
||||
|
||||
If TipoOC = "OC" AndAlso Not IsDBNull(e.Row.DBCampo("CveOrdenCompraPadre")) AndAlso IsNumeric(e.Row.DBCampo("CveOrdenCompraPadre")) Then
|
||||
GvD.Columns(10).Visible = True
|
||||
lblTipoPadreHijo.Visible = True
|
||||
@@ -3623,10 +3619,6 @@ Partial Class OC
|
||||
'CveAFVinculado
|
||||
e.Row.FCLiteral("LitMaq").Text = String.Format("<a class='Texto' href='../AF/AF.aspx?CveActivoFijo={0}'>{1}</a>", e.Row.DBCampo("CveActivoFijo"), e.Row.DBCampo("CodigoAF"))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'CveCompraDetalle Vinculada
|
||||
Dim ObjOC As New ClsOC
|
||||
If ObjOC.GetOCVinculadasPendientes(e.Row.DBCampo("CveOrdenCompraDetalle").ToEntero) Then
|
||||
@@ -3680,8 +3672,6 @@ Partial Class OC
|
||||
If e.Row.DBCampo("CveClasificacionOG").ToString.ToEntero > 0 Then e.Row.FCDropDownList("DdlAC5").SelectedValue = e.Row.DBCampo("CveClasificacionOG")
|
||||
End If
|
||||
|
||||
|
||||
|
||||
'CLASIFICACION
|
||||
If isWithFamily() Then
|
||||
e.Row.FCLabel("LblClasificacion").Text = e.Row.DBCampo("SubFamilia")
|
||||
@@ -3693,7 +3683,7 @@ Partial Class OC
|
||||
Drr = GlobalDTOCEstatus(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveEstatus = {0}", CveEstatus))(0)
|
||||
If Drr IsNot Nothing AndAlso UsuarioActual.TienePermisoProceso(203) AndAlso Drr("TipoTermino").ToString.ToEntero = 3 AndAlso Drr("Tipo").ToString = "OC" Then
|
||||
If e.Row.DataKey("CveCompra").ToEntero > 0 Then
|
||||
If Not UsuarioActual.CveUsuario = 100 Then '[IPP] PARA PODER EDITAR
|
||||
If e.Row.DBCampo("CantidadNoEditable").ToDouble >= e.Row.DBCampo("Cantidad").ToDouble Then '[IPP] PARA PODER EDITAR
|
||||
e.Row.FCLinkButton("imgE").Enabled = False
|
||||
e.Row.FCLinkButton("imgE").ToolTip = "El concepto no se puede editar porque ya esta asignado a una compra"
|
||||
e.Row.FCLinkButton("imgD").Enabled = False
|
||||
@@ -3709,7 +3699,6 @@ Partial Class OC
|
||||
e.Row.FCLinkButton("imgD").Attributes.Remove("Data-toggle")
|
||||
e.Row.FCLinkButton("imgD").Attributes.Add("Data-toggle", "tooltip")
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
@@ -3729,6 +3718,14 @@ Partial Class OC
|
||||
FiltroClasificacion = String.Format("CveClasificacion = {0}", e.Row.DBCampo("CveClasificacion"))
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("CantidadVinculadaCompra").ToDouble > 0 OrElse e.Row.DBCampo("CantidadSurtidaAmacen").ToDouble > 0 OrElse e.Row.DBCampo("CantidadVinculada").ToDouble > 0 Then
|
||||
e.Row.FCDropDownList("DdlPS").Enabled = False
|
||||
e.Row.FCDropDownList("DdlClasificacion").Enabled = False
|
||||
e.Row.FCDropDownList("CboUnidadMedidaEdit").Enabled = False
|
||||
e.Row.FCTextBox("TxtImporteEdit").Enabled = False
|
||||
e.Row.FCTextBox("TxtDescuentoEdit").Enabled = False
|
||||
End If
|
||||
|
||||
'DDL PS
|
||||
If e.Row.DBCampo("CveClasificacion").ToString() <> "" Then
|
||||
e.Row.FCDropDownList("DdlPS").DataSource = GlobalDTPS(CveEmpresaActual).FiltraParametros(FiltroClasificacion, "PS")
|
||||
@@ -3781,8 +3778,6 @@ Partial Class OC
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(590).ToString.ToEntero = 1 Then 'empresa agricola
|
||||
e.Row.FCDropDownList("DdlCultivosCuadroEdit").Visible = True
|
||||
e.Row.FCDropDownList("DdlCultivosCuadroEdit").DataSource = GlobalDTCultivosCuadro(UsuarioActual.CveEmpresa).FiltraParametros($"CveSubProyecto = {e.Row.DBCampo("CveSubProyecto").ToEntero}")
|
||||
|
||||
Reference in New Issue
Block a user