Contrtos compras
This commit is contained in:
@@ -5158,7 +5158,7 @@
|
||||
</div>
|
||||
|
||||
|
||||
<div id="DvModalContratos" class="modal ADS fade" role="dialog">
|
||||
<%-- <div id="DvModalContratos" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
@@ -5197,7 +5197,111 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="DivmodalConmtrato" class="modal ADS fade">
|
||||
<div class="modal-dialog">
|
||||
<asp:UpdatePanel ID="UpModalContrato" runat="server" class="modal-content rowpadding" tabindex="-1" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4>
|
||||
<asp:Label Text="Contratos" ID="LblTituloContrato" runat="server" />
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList runat="server" ID="DdlContratosObra" AutoPostBack="true" OnSelectedIndexChanged="DdlContratosCompras_SelectedIndexChanged" DataTextField="ContratoCompleto" DataValueField="CveContrato" CssClass="form-control input-sm select2me" Width="100%">
|
||||
<asp:ListItem Value="-1">Seleccione uno</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlContratosObra.ClientID.ToString()%>">Contrato:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlTipoGastoObra" runat="server" DataTextField="TipoGasto" DataValueField="CveTipoGasto" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlTipoGastoObra.ClientID.ToString()%>">Tipo de Gasto:</label>
|
||||
|
||||
|
||||
<asp:RequiredFieldValidator runat="server" Enabled="true" InitialValue="-1" Display="None" ID="RFVDdlTipoGastoObra" ControlToValidate="DdlTipoGastoObra" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Gasto''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpAplicaContrato"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CERFVDdlTipoGastoObra" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlTipoGastoObra" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<asp:GridView ID="GvContratosControl" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron partidas"
|
||||
DataKeyNames="CveContratoDetalle,CvePS,PS,Cantidad,PU,CantidadMax,CveUnidadMedida,Abreviatura,CveSubProyecto,SubProyecto,Codigo,CveProyecto,Proyecto,IVA,RetISR,RetIVA,IEPSPorcentaje,IEPSGrabaIVA,CveClasificacion,Clasificacion,CveTipoPS,CveSATPS"
|
||||
CssClass="table GVEstimacion table-advance table-hover" GridLines="None" Width="100%">
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField HeaderText="Producto">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblPS" runat="server" CssClass="Texto" Text='<%# Eval("PS")%>' Width="250px"></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Cantidad">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtCantidad" Text="" type="number" step="any"
|
||||
Width="90" runat="server" ></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="PU">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox runat="server" ID="TxtPU" Text='<%# Eval("PU", "{0:N2}")%>' type="number" step="any" Width="60px" >
|
||||
</asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Importe">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtImporte" Text="" CssClass='<%# String.Format("ImporteCSS CssImporte{0}", Eval("CveContratoDetalle")) %>' type="number" step="any" Width="90" runat="server" onkeydown="keydownenabledtab(event)"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-10" style="text-align:right!important">Sub Total: </div>
|
||||
<div class="col-md-2"><asp:Label runat="server" ClientIDMode="Static" id="LblTotalContrato"></asp:Label></div>
|
||||
|
||||
<br />
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
||||
<asp:Button ID="BtnAplicarContrato" runat="server" Text="Aceptar" ClientIDMode="Static" CssClass="btn btn-success" OnClick="BtnAplicarContrato_Click" ValidationGroup="GrpAplicaContrato" CausesValidation="true" />
|
||||
<button type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="JS" runat="server">
|
||||
@@ -6292,14 +6396,80 @@
|
||||
}
|
||||
|
||||
|
||||
//function ScrollVentanaAddProducto() {
|
||||
// let wh = $(window).height();
|
||||
|
||||
// if (wh <= 770) {
|
||||
// // $('#DVBodyAddProducto').css("max-height", 450);
|
||||
// }
|
||||
//}
|
||||
|
||||
function ValidateCant(ncss, SubtotalValidar) {
|
||||
|
||||
let SubTotal = 0.0;
|
||||
|
||||
let CantidadS = $(".CssCantidad" + ncss).val();
|
||||
let PuS = $(".CssPU" + ncss).val();
|
||||
|
||||
let Cantidad = 0.0;
|
||||
let Pu = 0.0;
|
||||
|
||||
try{
|
||||
|
||||
if (CantidadS.length > 0 && PuS.length > 0) {
|
||||
|
||||
Cantidad = parseFloat(CantidadS);
|
||||
Pu = parseFloat(PuS);
|
||||
|
||||
$(".CssImporte" + ncss).val(Cantidad * Pu);
|
||||
|
||||
|
||||
}else{
|
||||
$(".CssImporte" + ncss).val("0");
|
||||
}
|
||||
|
||||
|
||||
} catch (error) {
|
||||
$(".CssImporte" + ncss).val("0");
|
||||
}
|
||||
|
||||
//$('.ImporteCSS').each(function () {
|
||||
|
||||
|
||||
// if(! isNaN(parseFloat($(this).val()) )){
|
||||
// SubTotal = SubTotal + parseFloat($(this).val())
|
||||
// }
|
||||
|
||||
//});
|
||||
|
||||
ValidaBotonContrato(SubtotalValidar);
|
||||
|
||||
|
||||
|
||||
//if (SubtotalValidar == SubTotal) {
|
||||
// $('#BtnAplicarContrato').prop('disabled', false);
|
||||
//} else {
|
||||
// $('#BtnAplicarContrato').prop('disabled', true);
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
function ValidaBotonContrato(SubtotalValidar) {
|
||||
|
||||
let SubTotal = 0.0;
|
||||
|
||||
|
||||
|
||||
$('.ImporteCSS').each(function () {
|
||||
|
||||
if (!isNaN(parseFloat($(this).val()))) {
|
||||
SubTotal = SubTotal + parseFloat($(this).val())
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
if (SubtotalValidar == SubTotal) {
|
||||
$('#BtnAplicarContrato').prop('disabled', false);
|
||||
} else {
|
||||
$('#BtnAplicarContrato').prop('disabled', true);
|
||||
}
|
||||
|
||||
$('#LblTotalContrato').text(SubTotal);
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user