Bloqueo AF 13, Actualzia Compra fecha vencimiento, Rep OC bloquear mostrar oc req de proyectos no asignados

This commit is contained in:
rakcsle
2025-03-24 08:52:41 -07:00
parent dcc6f22a0e
commit 9ee7372d07
13 changed files with 150 additions and 58 deletions

View File

@@ -2476,7 +2476,7 @@
</div>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="Obs" ItemStyle-Width="300px" ControlStyle-CssClass="Texto" />
<asp:BoundField DataField="Obs" ControlStyle-CssClass="Texto" />
<asp:TemplateField ItemStyle-Width="20%">
<ItemTemplate>
<asp:TextBox runat="server" ID="TxtReferencia" Width="120px"></asp:TextBox>
@@ -2491,23 +2491,12 @@
</asp:DropDownList>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="20%">
<asp:TemplateField ItemStyle-Width="30%">
<ItemTemplate>
<asp:DropDownList ID="DdlPersonalGv" DataTextField="NombreCompletoNombre" DataValueField="CvePersonal" AppendDataBoundItems="true" runat="server" Width="100%" CssClass="form-control input-sm select2me">
<asp:DropDownList ID="DdlPersonalGv" DataTextField="NombreCompletoNombre" DataValueField="CvePersonal" AppendDataBoundItems="true" runat="server" Width="100%" CssClass="form-control select2me" style="margin-top:15px!important " >
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
<%--<asp:Label runat="server" ID="LbCveAF" Text='<%# Eval("CodAF")%>'></asp:Label>--%>
<%--<asp:TextBox ID="LblCodigo" Text='<%# Eval("CodAF")%>' runat="server" Visible="false" Width="40px"></asp:TextBox>
<asp:HyperLink runat="server" ImageUrl="/Imagenes/buscar.gif" ID="HLBuscarAF"></asp:HyperLink>
<asp:HiddenField runat="server" ID="HdnCveConcepto" Value='<%# Eval("CveConcepto")%>' />
<asp:HiddenField runat="server" ID="HdnIndex" />
<asp:HiddenField runat="server" ID="HdnCveAF" Value='<%# Eval("CveActivoFijo")%>' />
<asp:HiddenField runat="server" ID="HdnCodAF" Value='<%# Eval("CodAF")%>' />--%>
</ItemTemplate>
<%-- <ItemStyle Width="90px" />--%>
</asp:DropDownList>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="100px">
<ItemTemplate>

View File

@@ -1568,6 +1568,7 @@ Partial Class Compras_Compras
If UsuarioActual.CveEmpresa = 189 Then
BtnCancelarCompra.Visible = False
End If
CargaGvPersonal()
Else
ViewState("CveProveedor") = -1
@@ -9357,6 +9358,16 @@ Partial Class Compras_Compras
Dim CvePersonal As Integer = 0
If Cont < GvPersonal.Rows.Count Then CvePersonal = GvPersonal.Rows(Cont).FCDropDownList("DdlPersonalGv").SelectedValue.ToEntero
'If CvePersonal <= 0 AndAlso RBLContado.SelectedValue.ToEntero = 2 AndAlso TxtNumeroReembolso.Text.Length > 0 Then
' CvePersonal = DdlPersonalReembolso.SelectedValue.ToEntero
' If Not CvePersonal > 0 Then
' Alert("Debe asignar personal al reembolso.", TipoMensaje.MsgAdvertencia)
' Retorno = False
' End If
'End If
Dim Referencia As String = ""
If Cont < GvPersonal.Rows.Count Then Referencia = GvPersonal.Rows(Cont).FCTextBox("TxtReferencia").Text

View File

@@ -3287,6 +3287,17 @@
<label for="<%= ChkUsaLimiteCredito.ClientID.ToString()%>">Usa límite de crédito:</label>
<asp:CheckBox ID="ChkUsaLimiteCredito" runat="server" />
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList runat="server" ID="DdlTipoFechaVencimiento" CssClass="form-control select2me" Width="200px">
<asp:ListItem Value="-1">-</asp:ListItem>
<asp:ListItem Value="1">Fecha Factura</asp:ListItem>
<asp:ListItem Value="2">Fecha Entrada</asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RfvDdlTipoFechaVencimiento" InitialValue="-1" runat="server" ControlToValidate="DdlTipoFechaVencimiento" Display="None"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Fecha Vencimiento''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCRfvDdlTipoFechaVencimiento" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlTipoFechaVencimiento" Width="300px"></ajax:ValidatorCalloutExtender>
<label for="<%= DdlTipoFechaVencimiento.ClientID.ToString()%>">Tipo Fecha Vencimiento:</label>
</div>
</div>
<div class="modal-footer">
<asp:LinkButton ID="LnkAddParametros" CssClass="btn btn-success" Text="Guardar" runat="server"></asp:LinkButton>

View File

@@ -930,6 +930,7 @@ Partial Class Compras_Proveedores
TxtPlazoCobranza.Text = ObjProveedor.PlazoPago.ToString
LblLimiteCredito.Text = ObjProveedor.LimiteCredito.ToString.FormatoNumero
LblPlazoCobranza.Text = ObjProveedor.PlazoPago.ToString
DdlTipoFechaVencimiento.SelectedValueExist(ObjProveedor.CveTipoFechaVencimiento)
'Sistema
ChkEstado.Checked = ObjProveedor.Estatus = "Activo"
@@ -4177,7 +4178,9 @@ Partial Class Compras_Proveedores
If CveProveedor > 0 Then
Dim ObjPro As New ClsCompProveedores
If ObjPro.UpdateProveedorLimiteCredito(CveProveedor, TxtLimiteCredito.Text.ToDecimal, TxtPlazoCobranza.Text.ToEntero, ChkUsaLimiteCredito.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
If ObjPro.UpdateProveedorLimiteCredito(CveProveedor, TxtLimiteCredito.Text.ToDecimal, TxtPlazoCobranza.Text.ToEntero, ChkUsaLimiteCredito.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
DdlTipoFechaVencimiento.SelectedValue.ToEntero) Then
Alert("Limite de crédito modificado correctamente.")
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAddParametros"))
End If

View File

@@ -41,6 +41,13 @@
width: 100%;
height: 500px;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice {
max-width: calc(100% - 2em);
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">

View File

@@ -146,7 +146,17 @@ Partial Class Compras_RepProductosServicios
DdlGrupo.Items.Insert(7, New ListItem("Proveedor", "10"))
DdlGrupo.Items.Insert(8, New ListItem("Usuario", "11"))
DdlGrupo.Items.Insert(9, New ListItem("Estatus Fact.", "12"))
If UsuarioActual.Empresa.Funcionalidad(307) <> "" Then DdlGrupo.Items.Insert(10, New ListItem(UsuarioActual.Empresa.Funcionalidad(307), "1"))
DdlGrupo.Items.Insert(10, New ListItem("Sucursal", "2"))
DdlGrupo.Items.Insert(11, New ListItem("Tipo de Gasto", "16"))
DdlGrupo.Items.Insert(12, New ListItem("Activo Fijo", "17"))
DdlGrupo.Items.Insert(13, New ListItem("Sub Tipo Activo Fijo", "18"))
DdlGrupo.Items.Insert(14, New ListItem("Tipo Activo Fijo", "19"))
DdlGrupo.Items.Insert(15, New ListItem("Tipo Documento", "20"))
If UsuarioActual.Empresa.Funcionalidad(307) <> "" Then DdlGrupo.Items.Insert(16, New ListItem(UsuarioActual.Empresa.Funcionalidad(307), "1"))
'Agrega el grupo si es una empresa Agricola
If UsuarioActual.Empresa.Funcionalidad(590).ToString.ToEntero = 1 Then
@@ -209,7 +219,7 @@ Partial Class Compras_RepProductosServicios
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If DdlGrupo.SelectedValue.ToEntero < 13 Or DdlGrupo.SelectedValue.ToEntero = 15 Then
If DdlGrupo.SelectedValue.ToEntero < 13 Or DdlGrupo.SelectedValue.ToEntero = 15 Or (DdlGrupo.SelectedValue.ToEntero >= 16) Then
If e.Row.DBCampo("GpoID") = "1" Then
e.Row.Cells(0).Text = e.Row.DBCampo("Moneda")
e.Row.CssClass = "Totales"
@@ -256,11 +266,21 @@ Partial Class Compras_RepProductosServicios
End If
Dim Liga = String.Format("/Compras/RepProductosServiciosDetalle.aspx?GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveProveedor={5}&CveUsuario={6}&CveEstatusFactura={7}&FechaI={8}&FechaF={9}&CveProyecto={10}&CveSubProyecto={11}&CveCategoria={12}&CveClasificacion={13}&CvePS={14}&CveFamilia={15}&CveSubFamilia={16}&CveTipoAF={17}&CveSubTipoAF={18}&CveAF={19}&CveMoneda={20}&CveTipoGasto={21}&TipoCambio={22}&TCEspecifico={23}&Deducible={24}&CveCultivo={25}",
'Dim Liga = String.Format("/Compras/RepProductosServiciosDetalle.aspx?GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveProveedor={5}&CveUsuario={6}&CveEstatusFactura={7}&FechaI={8}&FechaF={9}&CveProyecto={10}&CveSubProyecto={11}&CveCategoria={12}" &
' "&CveClasificacion={13}&CvePS={14}&CveFamilia={15}&CveSubFamilia={16}&CveTipoAF={17}&CveSubTipoAF={18}&CveAF={19}&CveMoneda={20}&CveTipoGasto={21}&TipoCambio={22}&TCEspecifico={23}&Deducible={24}&CveCultivo={25}" &
' "",
' DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveProveedor"), e.Row.DBCampo("CveUsuario"),
' e.Row.DBCampo("CveEstatusFactura"), FechaI, FechaF, e.Row.DBCampo("CveProyecto"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveCategoria"), e.Row.DBCampo("CveClasificacion"),
' e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveFamilia"), e.Row.DBCampo("CveSubFamilia"), e.Row.DBCampo("CveTipoAF"), e.Row.DBCampo("CveSubTipoAF"), e.Row.DBCampo("CveAF"), e.Row.DBCampo("CveMoneda"),
' DdlTipoGasto.GetSelectedValuesM, e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), DdlDeducible.SelectedValue.ToEntero, e.Row.DBCampo("CveCultivo"))
Dim Liga = String.Format("/Compras/RepProductosServiciosDetalle.aspx?GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveProveedor={5}&CveUsuario={6}&CveEstatusFactura={7}&FechaI={8}&FechaF={9}&CveProyecto={10}&CveSubProyecto={11}&CveCategoria={12}" &
"&CveClasificacion={13}&CvePS={14}&CveFamilia={15}&CveSubFamilia={16}&CveTipoAF={17}&CveSubTipoAF={18}&CveAF={19}&CveMoneda={20}&CveTipoGasto={21}&TipoCambio={22}&TCEspecifico={23}&Deducible={24}&CveCultivo={25}" &
"",
DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveProveedor"), e.Row.DBCampo("CveUsuario"),
e.Row.DBCampo("CveEstatusFactura"), FechaI, FechaF, e.Row.DBCampo("CveProyecto"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveCategoria"), e.Row.DBCampo("CveClasificacion"),
e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveFamilia"), e.Row.DBCampo("CveSubFamilia"), e.Row.DBCampo("CveTipoAF"), e.Row.DBCampo("CveSubTipoAF"), e.Row.DBCampo("CveAF"), e.Row.DBCampo("CveMoneda"),
DdlTipoGasto.GetSelectedValuesM, e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), DdlDeducible.SelectedValue.ToEntero, e.Row.DBCampo("CveCultivo"))
e.Row.DBCampo("CveTipoGasto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), DdlDeducible.SelectedValue.ToEntero, e.Row.DBCampo("CveCultivo"))
If Not e.Row.DBCampo("GpoID") = "1" Then

View File

@@ -95,7 +95,9 @@ Partial Class Compras_RepProductosServiciosDetalle
Usuario = If(Request("CveUsuario") IsNot Nothing AndAlso Request("CveUsuario").ToEntero() > 0, Request("CveUsuario").ToEntero(), -1).ToString
Familia = If(Request("CveFamilia") IsNot Nothing AndAlso Request("CveFamilia").ToEntero() > -3, Request("CveFamilia").ToEntero(), -1).ToString
SubFamilia = If(Request("CveSubFamilia") IsNot Nothing AndAlso Request("CveSubFamilia").ToEntero() > -3, Request("CveSubFamilia").ToEntero(), -1).ToString
ActivoFijo = If(Request("CveAF") IsNot Nothing AndAlso Request("CveAF").ToEntero() > 0, Request("CveAF").ToEntero(), -1).ToString
ActivoFijo = If(Request("CveAF") IsNot Nothing AndAlso (Request("CveAF").ToEntero() > 0 Or Request("CveAF").ToEntero() = -2), Request("CveAF").ToEntero(), -1).ToString
CveMoneda = If(Request("CveMoneda") IsNot Nothing AndAlso Request("CveMoneda").ToEntero() > 0, Request("CveMoneda").ToEntero(), -1).ToString.ToEntero
TipoDocto = If(Request("TipoDocto") IsNot Nothing, Request("TipoDocto").ToString, "-1").ToString
Deducible = If(Request("Deducible") IsNot Nothing, Request("Deducible").ToString, "-1").ToString
@@ -187,6 +189,7 @@ Partial Class Compras_RepProductosServiciosDetalle
'Carga Tipos de Gasto
DdlTipoGasto.DataSource = GlobalDTTiposGastos(UsuarioActual.CveEmpresa)
DdlTipoGasto.DataBind()
DdlTipoGasto.Items.Add(New ListItem("Sin Asignar", "-2"))
'Cargo Categorias
DdlCategoria.DataSource = GlobalDTGralCategorias(UsuarioActual.CveEmpresa)
@@ -227,10 +230,12 @@ Partial Class Compras_RepProductosServiciosDetalle
'Carga Tipos AF
DdlTipoAF.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa)
DdlTipoAF.DataBind()
DdlTipoAF.Items.Add(New ListItem("Sin Asignar", "-2"))
'Carga SubTipos AF
DdlSubTipoAF.DataSource = GlobalDTSubTipoActivoFijo(UsuarioActual.CveEmpresa)
DdlSubTipoAF.DataBind()
DdlSubTipoAF.Items.Add(New ListItem("Sin Asignar", "-2"))
'Carga Grupos
CargaGrupo()
@@ -261,6 +266,13 @@ Partial Class Compras_RepProductosServiciosDetalle
DdlGrupo.Items.Insert(9, New ListItem("Cultivo", "15"))
End If
DdlGrupo.Items.Insert(10, New ListItem("Sucursal", "2"))
DdlGrupo.Items.Insert(11, New ListItem("Tipo de Gasto", "16"))
DdlGrupo.Items.Insert(12, New ListItem("Activo Fijo", "17"))
DdlGrupo.Items.Insert(13, New ListItem("Sub Tipo Activo Fijo", "18"))
DdlGrupo.Items.Insert(14, New ListItem("Tipo Activo Fijo", "19"))
DdlGrupo.Items.Insert(15, New ListItem("Tipo Documento", "20"))
DdlGrupo.DataBind()
DdlGrupo.SelectedValueExist("8")
End Sub