mejoras, en indirectos
This commit is contained in:
@@ -302,18 +302,11 @@
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>--%>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ajax:TabContainer ID="Tab" runat="server" Width="100%" CssClass="tabBodyOverride" ActiveTabIndex="0">
|
||||
</asp:UpdatePanel>--%>
|
||||
|
||||
<ajax:TabContainer ID="Tab" runat="server" Width="100%" ActiveTabIndex="0">
|
||||
<ajax:TabPanel ID="TabInformacionGeneral" runat="server" HeaderText="Información General">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="portlet smmallpadding light bordered">
|
||||
@@ -810,7 +803,7 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="Gv" ClientIDMode="Static" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron Conceptos"
|
||||
DataKeyNames="CveContratoDetalle,CveUM, CvePS, Cantidad, PU,CveTipoPresupuesto,CveClasificacion,CodigoPS,LimitarCantidad,PS,OCInterna,NoIdentificacion,PermitirAvance,CantidadContratada"
|
||||
DataKeyNames="CveContratoDetalle,CveUM, CvePS, Cantidad, PU,CveTipoPresupuesto,CodigoPS,LimitarCantidad,PS,NoIdentificacion,PermitirAvance,CantidadContratada"
|
||||
ShowHeader="true" SelectedRowStyle-BackColor="#66CCFF" CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
||||
<Columns>
|
||||
|
||||
@@ -824,13 +817,10 @@
|
||||
</EditItemTemplate>
|
||||
<ItemStyle Width="50px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Concepto" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtPS" Text='<%# Eval("CodigoPS")%>' runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="400px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="U.M.">
|
||||
<ItemTemplate>
|
||||
@@ -839,10 +829,8 @@
|
||||
<EditItemTemplate>
|
||||
<asp:DropDownList ID="DdlUMEdit" runat="server" AutoPostBack="true" DataTextField="UnidadMedida" DataValueField="CveUnidadMedida" CssClass="table-group-action-input form-control input-inline input-small input-sm" Style="width: 75px !important;"></asp:DropDownList>
|
||||
</EditItemTemplate>
|
||||
<ItemStyle Width="100px" />
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<ItemStyle Width="80px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Observacion" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblObservacion" Text='<%# Eval("Observacion")%>' runat="server"></asp:Literal>
|
||||
@@ -851,9 +839,7 @@
|
||||
<asp:TextBox ID="TxtObservacion" runat="server" Text='<%# Eval("Observacion") %>' Width="70px"></asp:TextBox>
|
||||
</EditItemTemplate>
|
||||
<ItemStyle Width="75px" />
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Precio Unitario">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtPU" Text='<%# Eval("PU", "{0:###,###,##0.00##}")%>' runat="server"></asp:Literal>
|
||||
@@ -861,13 +847,13 @@
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtPU" runat="server" Text='<%# Eval("PU", "{0:###,###,##0.00##}")%>' Width="90px"></asp:TextBox><ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtenderPU" runat="server" TargetControlID="TxtPU" FilterType="Custom, Numbers" ValidChars=".," />
|
||||
</EditItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Total">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtTotal" CssClass="ltltotalgvx" data-value='<%# Eval("Total")%>' Text='<%# Eval("Total", "{0:###,###,##0.00##}")%>' runat="server"></asp:Label>
|
||||
<asp:Label ID="LtTotal" CssClass="ltltotalgvx" data-value='<%# Eval("Total")%>' Text='<%# Eval("Total", "{0:N2}")%>' runat="server"></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
<ItemStyle Width="100px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Avance" Visible="false">
|
||||
<ItemTemplate>
|
||||
@@ -876,17 +862,12 @@
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="¿Habilitar el avance?" data-btn-ok-label="si" ></asp:LinkButton>
|
||||
|
||||
<asp:CheckBox ID="CHKPAvance" Enabled="True" Visible="false" AutoPostBack="true" OnCheckedChanged="AvaClick" runat="server" />
|
||||
|
||||
|
||||
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Editar" ItemStyle-Width="50px" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEditarPresupuestoVentaDetalle" OnClick="LnkEditarPresupuestoVentaDetalle_Click" runat="server" AlternateText="Editar" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<%-- <asp:TemplateField HeaderText="Editar" ItemStyle-Width="50px" ItemStyle-HorizontalAlign="Center">
|
||||
<EditItemTemplate>
|
||||
@@ -901,15 +882,13 @@
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
<asp:TemplateField HeaderText="Eliminar" ItemStyle-Width="50px" ItemStyle-HorizontalAlign="Center">
|
||||
<asp:TemplateField HeaderText="" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEditarPresupuestoVentaDetalle" OnClick="LnkEditarPresupuestoVentaDetalle_Click" runat="server" AlternateText="Editar" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red"
|
||||
Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Esta seguro de eliminar el concepto?" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
@@ -972,7 +951,7 @@
|
||||
<div class="col-md-12">
|
||||
|
||||
<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,Dias,CveRubro,CveActividad,CveSubTipoActivoFijo" ShowHeader="true" SelectedRowStyle-BackColor="#66CCFF"
|
||||
DataKeyNames="CveContratoDetalle,CveUM, CvePS, Cantidad, PU,CveTipoPresupuesto,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">
|
||||
|
||||
<Columns>
|
||||
@@ -986,13 +965,10 @@
|
||||
</EditItemTemplate>
|
||||
<ItemStyle Width="50px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Concepto" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtPS" Text='<%# Eval("CodigoPS")%>' runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="400px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="U.M.">
|
||||
<ItemTemplate>
|
||||
@@ -1001,7 +977,7 @@
|
||||
<EditItemTemplate>
|
||||
<asp:DropDownList ID="DdlUMEdit" runat="server" AutoPostBack="true" DataTextField="UnidadMedida" DataValueField="CveUnidadMedida" CssClass="table-group-action-input form-control input-inline input-small input-sm" Style="width: 75px !important;"></asp:DropDownList>
|
||||
</EditItemTemplate>
|
||||
<ItemStyle Width="100px" />
|
||||
<ItemStyle Width="80px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Precio Unitario">
|
||||
<ItemTemplate>
|
||||
@@ -1010,14 +986,14 @@
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtPU" runat="server" Text='<%# Eval("PU", "{0:###,###,##0.00##}")%>' Width="90px"></asp:TextBox><ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtenderPU" runat="server" TargetControlID="TxtPU" FilterType="Custom, Numbers" ValidChars="." />
|
||||
</EditItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Total">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtTotal" CssClass="ltltotalgvx2" data-value='<%# Eval("Total")%>' Text='<%# Eval("Total", "{0:###,###,##0.00##}")%>' runat="server"></asp:Label>
|
||||
<asp:Label ID="LtTotal" CssClass="ltltotalgvx2" data-value='<%# Eval("Total")%>' Text='<%# Eval("Total", "{0:N2}")%>' runat="server"></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
<ItemStyle Width="100px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Avance" Visible="false">
|
||||
@@ -1031,24 +1007,18 @@
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlDias" CssClass="ltltotalgvx2" Text='<%# Eval("Dias")%>' runat="server"></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
<ItemStyle Width="50px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Limitar Cantidad" Visible="true">
|
||||
<asp:TemplateField HeaderText="Limitar" Visible="true">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlLimitarCantidad" CssClass="ltltotalgvx2" Text='<%# Eval("LimitarCantidad")%>' runat="server"></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Editar" ItemStyle-Width="50px" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemStyle Width="50px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Center">
|
||||
<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>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Eliminar" ItemStyle-Width="50px" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red"
|
||||
Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Esta seguro de eliminar el concepto?" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
@@ -1147,7 +1117,7 @@
|
||||
|
||||
<asp:UpdatePanel ID="UPGVInt" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvInt" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron Conceptos" DataKeyNames="CveContratoDetalle,CveUM, CvePS, Cantidad, PU,CveTipoPresupuesto,CveClasificacion"
|
||||
<asp:GridView ID="GvInt" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron Conceptos" DataKeyNames="CveContratoDetalle,CveUM, CvePS, Cantidad, PU,CveTipoPresupuesto"
|
||||
ShowHeader="false" SelectedRowStyle-BackColor="#66CCFF" CssClass="table table-striped table-hover Widthall mysmallbtn" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Cantidad">
|
||||
@@ -1366,8 +1336,8 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12" align="right">
|
||||
<input type="text" id="TxtFiltra" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtFiltra','{0}')", GvDatosAvance.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtFiltra','{0}')", GvDatosAvance.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
<input type="text" id="TxtFiltraAControl" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtFiltraAControl','{0}')", GvDatosAvanceControl.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtFiltraAControl','{0}')", GvDatosAvanceControl.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1375,12 +1345,12 @@
|
||||
<ContentTemplate>
|
||||
|
||||
<div id="dvCaCon" style="width: 100%; top: 30px">
|
||||
<table id="dTable" class="table Widthall ">
|
||||
<table id="dcTable" class="table Widthall ">
|
||||
<tr>
|
||||
<td width="25%" id="TH1" style="font-size: medium; text-align: center!important; background-color: #b9b9b9;"><strong>Clasificación</strong> </td>
|
||||
<td width="10%" id="TH2" style="font-size: medium; text-align: center!important; background-color: #dddddd;"><strong>Contratado</strong> </td>
|
||||
<td width="15%" id="TH3" style="font-size: medium; text-align: center!important; background-color: #b9b9b9;"><strong>Avance</strong> </td>
|
||||
<td width="15%" id="TH4" style="font-size: medium; text-align: center!important; background-color: #dddddd;"><strong>Faltante</strong> </td>
|
||||
<td id="THc1" style="font-size: medium; text-align: center!important; background-color: #b9b9b9;"><strong>Clasificación</strong> </td>
|
||||
<td width="15%" id="THc2" style="font-size: medium; text-align: center!important; background-color: #dddddd;"><strong>Contratado</strong> </td>
|
||||
<td width="20%" id="THc3" style="font-size: medium; text-align: center!important; background-color: #b9b9b9;"><strong>Avance</strong> </td>
|
||||
<td width="20%" id="THc4" style="font-size: medium; text-align: center!important; background-color: #dddddd;"><strong>Faltante</strong> </td>
|
||||
<%-- <td width="15%" id="TH5" style="font-size: medium; text-align: center!important; background-color: #b9b9b9;"><strong>Avance Por Facturar</strong> </td>
|
||||
<td width="10%" id="TH6" style="font-size: medium; text-align: center!important; background-color: #dddddd;"><strong>Anticipo</strong> </td>--%>
|
||||
</tr>
|
||||
@@ -1389,12 +1359,12 @@
|
||||
|
||||
<asp:GridView ID="GvDatosAvanceControl" ClientIDMode="Static" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron datos con los filtros especificados"
|
||||
DataKeyNames="CveClasificacion,CvePS,CodigoPS,Clasificacion,CveContratoDetalle,CveRubro"
|
||||
CssClass="table table-striped table-hover Widthall" BorderColor="#D3D3D3" GridLines="None">
|
||||
CssClass="table table-striped table-hover Widthall" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Producto/Servicio" DataField="CodigoPS" ItemStyle-Width="30%" />
|
||||
<asp:BoundField HeaderText="Producto/Servicio" DataField="CodigoPS" />
|
||||
|
||||
<asp:BoundField HeaderText="Cantidad" DataField="ContratoCantidad" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00##}" ItemStyle-Width="7.5%" />
|
||||
<asp:BoundField HeaderText="Importe $" DataField="ContratoImporte" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00##}" ItemStyle-Width="7.5%" />
|
||||
<asp:BoundField HeaderText="Importe $" DataField="ContratoImporte" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" ItemStyle-Width="7.5%" />
|
||||
|
||||
<asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="7.5%" ItemStyle-CssClass="Derecha">
|
||||
<ItemTemplate>
|
||||
@@ -1403,27 +1373,15 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Importe $" ItemStyle-Width="7.5%" ItemStyle-CssClass="Derecha">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LBAvanceImporte" OnClick="MuestaModalVentasAvanceInterno" Text='<%# Eval("AvanceImporte", "{0:###,###,##0.00##}") %>' runat="server" />
|
||||
<asp:LinkButton ID="LBAvanceImporte" OnClick="MuestaModalVentasAvanceInterno" Text='<%# Eval("AvanceImporte", "{0:N2}") %>' runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="AvancePorcentaje" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="5%" />
|
||||
|
||||
<asp:BoundField HeaderText="Cantidad" DataField="FaltanteCantidad" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00##}" ItemStyle-Width="7.5%" />
|
||||
<asp:BoundField HeaderText="Importe $" DataField="FaltanteImporte" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00##}" ItemStyle-Width="7.5%" />
|
||||
<asp:BoundField HeaderText="Importe $" DataField="FaltanteImporte" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" ItemStyle-Width="7.5%" />
|
||||
<asp:BoundField HeaderText="%" DataField="FaltantePorcentaje" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="5%" />
|
||||
|
||||
<%-- <asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="7.5%" ItemStyle-CssClass="Derecha">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LBAvanceXFacturarCantidad" OnClick="MuestaModalVentasAvance" Text='<%# Eval("AvanceXFacturarCantidad", "{0:###,###,##0.00##}") %>' runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Importe $" ItemStyle-Width="7.5%" ItemStyle-CssClass="Derecha">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LBAvanceXFacturarImporte" OnClick="MuestaModalVentasAvance" Text='<%# Eval("AvanceXFacturarImporte", "{0:###,###,##0.00##}") %>' runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Importe $" DataField="Anticipos" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00##}" ItemStyle-Width="10%" />--%>
|
||||
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
@@ -2897,7 +2855,7 @@
|
||||
<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="5">Insumos-Indirecto</asp:ListItem>
|
||||
<asp:ListItem Value="5">Indirectos</asp:ListItem>
|
||||
<asp:ListItem Value="3">Mano de Obra</asp:ListItem>
|
||||
<asp:ListItem Value="4">Maquinaria Herramienta Flotilla</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
@@ -2912,13 +2870,7 @@
|
||||
<asp:RequiredFieldValidator ID="RFVTxtCantidadInsumos" runat="server" ControlToValidate="TxtCantidadInsumos" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddPSControl"> </asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtCantidadInsumos.ClientID.ToString()%>">Cantidad:</label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" runat="server" visible="false" id="DVClasificacion" >
|
||||
<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>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" runat="server" visible="false" id="DVPS" >
|
||||
<label for="<%= DdlProductowsInsumos.ClientID.ToString()%>">Producto:</label>
|
||||
<ADS:Dropdownlost runat="server" ID="DdlProductowsInsumos" CssStyle="width: 100%;" CssClassDdl="form-control select2me" DataTextField="PSCodigo" DataValueField="CvePS" />
|
||||
|
||||
@@ -440,7 +440,7 @@ Partial Class Contratos_ContratoObra
|
||||
|
||||
End If
|
||||
|
||||
CargaEstadoCueta()
|
||||
CargaEstadoCuenta()
|
||||
|
||||
TabEstadoCuenta.Visible = True
|
||||
|
||||
@@ -497,17 +497,17 @@ Partial Class Contratos_ContratoObra
|
||||
If CveContrato > 0 Then
|
||||
If UsuarioActual.TienePermisoProceso(164) Then
|
||||
BtnEliminar.Visible = True
|
||||
Gv.Columns(8).Visible = True
|
||||
Gv.Columns(7).Visible = True
|
||||
GvInsumos.Columns(7).Visible = True
|
||||
Else
|
||||
BtnEliminar.Visible = False
|
||||
Gv.Columns(8).Visible = False
|
||||
Gv.Columns(7).Visible = False
|
||||
GvInsumos.Columns(7).Visible = False
|
||||
End If
|
||||
|
||||
Else
|
||||
TabPres.Visible = False
|
||||
Gv.Columns(8).Visible = True
|
||||
Gv.Columns(7).Visible = True
|
||||
GvInsumos.Columns(7).Visible = True
|
||||
|
||||
End If
|
||||
@@ -902,7 +902,7 @@ Partial Class Contratos_ContratoObra
|
||||
If TipoContrato = 4 Then
|
||||
TabPI.Visible = True
|
||||
End If
|
||||
If ObjContratos.GetContratosDetalle(CveContrato, UsuarioActual.CveEmpresa) Then
|
||||
If ObjContratos.GetContratosDetalle(CveContrato, UsuarioActual.CveEmpresa, 2) Then
|
||||
TmpDT = ObjContratos.DtResultados
|
||||
If TmpDT.MAX("Cantidad_Original").ToString.ToEntero > 0 OrElse TmpDT.MAX("PU_Original").ToString.ToEntero > 0 Then
|
||||
BtnAutorizar.Visible = False
|
||||
@@ -921,12 +921,11 @@ Partial Class Contratos_ContratoObra
|
||||
UpGVInsumos.Update()
|
||||
UPGVInt.Update()
|
||||
|
||||
TotalAvanceVentas = TmpDT.FiltraParametros("CveTipoPresupuesto=2 AND CveContratoDetalle > 0").SUM("Total").ToDecimal
|
||||
TotalAvanceInterno = TmpDT.FiltraParametros("CveTipoPresupuesto=1 AND CveContratoDetalle > 0").SUM("Total").ToDecimal
|
||||
|
||||
TotalAvanceVentas = TmpDT.FiltraParametros("CveTipoPresupuesto=2").SUM("Total").ToDecimal
|
||||
TotalAvanceInterno = TmpDT.FiltraParametros("CveTipoPresupuesto=1").SUM("Total").ToDecimal
|
||||
|
||||
LbTotalGeneral.Text = TmpDT.FiltraParametros("CveTipoPresupuesto=2").SUM("Total").FormatoNumero()
|
||||
LbTotalGeneralInsumos.Text = TmpDT.FiltraParametros("CveTipoPresupuesto=1").SUM("Total").FormatoNumero()
|
||||
LbTotalGeneral.Text = TmpDT.FiltraParametros("CveTipoPresupuesto=2 AND CveContratoDetalle > 0").SUM("Total").FormatoNumero()
|
||||
LbTotalGeneralInsumos.Text = TmpDT.FiltraParametros("CveTipoPresupuesto=1 AND CveContratoDetalle > 0").SUM("Total").FormatoNumero()
|
||||
|
||||
LbTotalGeneralInt.Text = TmpDT.FiltraParametros("CveTipoPresupuesto=1").SUM("Total").FormatoNumero()
|
||||
'LblImporte.Text = "$" & TmpDT.FiltraParametros("CveTipoPresupuesto=2").SUM("Total").FormatoNumero()
|
||||
@@ -1354,9 +1353,9 @@ Partial Class Contratos_ContratoObra
|
||||
DdlClasificacionAdd.DataBind()
|
||||
DdlClasificacionAdd.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
DdlClasificacionAddInsumos.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa) ' GlobalDTClasificacionesPresupuestos(UsuarioActual.CveEmpresa)
|
||||
DdlClasificacionAddInsumos.DataBind()
|
||||
DdlClasificacionAddInsumos.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
'DdlClasificacionAddInsumos.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa) ' GlobalDTClasificacionesPresupuestos(UsuarioActual.CveEmpresa)
|
||||
'DdlClasificacionAddInsumos.DataBind()
|
||||
'DdlClasificacionAddInsumos.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
DdlClasificacionInt.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa) 'GlobalDTSubFamilias(UsuarioActual.CveEmpresa)
|
||||
DdlClasificacionInt.DataBind()
|
||||
@@ -1418,9 +1417,9 @@ Partial Class Contratos_ContratoObra
|
||||
DdlUMInsumos.DataBind()
|
||||
UpTitulos.Update()
|
||||
End Sub
|
||||
Protected Sub DdlClasificacionInsumos_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlClasificacionAddInsumos.SelectedIndexChanged
|
||||
ChangeDdlProductoInsumos()
|
||||
End Sub
|
||||
'Protected Sub DdlClasificacionInsumos_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlClasificacionAddInsumos.SelectedIndexChanged
|
||||
' ChangeDdlProductoInsumos()
|
||||
'End Sub
|
||||
Private Sub ChangeDdlProductoInsumos()
|
||||
If UsuarioActual.Empresa.Funcionalidad(105) = "" Then
|
||||
'Dim filtro As String = ""
|
||||
@@ -1432,15 +1431,15 @@ Partial Class Contratos_ContratoObra
|
||||
' filtro = String.Format("CveClasificacion={0}", DdlClasificacionAddInsumos.SelectedValue)
|
||||
' End If
|
||||
'End If
|
||||
DdlProductowsInsumos.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=DdlClasificacionAddInsumos.SelectedValue.ToEntero).FiltraParametros("", "PSCodigo")
|
||||
DdlProductowsInsumos.DataBind()
|
||||
DdlProductowsInsumos.ddl.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
Else
|
||||
'If isWhitFamily() Then
|
||||
' DdlProductowsInsumos.ddlWS.Attributes.Add("data-idSubFamilia", DdlClasificacionAddInsumos.SelectedValue)
|
||||
'Else
|
||||
DdlProductowsInsumos.ddlWS.Attributes.Add("data-idClasificacion", DdlClasificacionAddInsumos.SelectedValue)
|
||||
'End If
|
||||
'DdlProductowsInsumos.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=DdlClasificacionAddInsumos.SelectedValue.ToEntero).FiltraParametros("", "PSCodigo")
|
||||
'DdlProductowsInsumos.DataBind()
|
||||
'DdlProductowsInsumos.ddl.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
Else
|
||||
'If isWhitFamily() Then
|
||||
' DdlProductowsInsumos.ddlWS.Attributes.Add("data-idSubFamilia", DdlClasificacionAddInsumos.SelectedValue)
|
||||
'Else
|
||||
' DdlProductowsInsumos.ddlWS.Attributes.Add("data-idClasificacion", DdlClasificacionAddInsumos.SelectedValue)
|
||||
'End If
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
@@ -1503,15 +1502,11 @@ Partial Class Contratos_ContratoObra
|
||||
Row("NoIdentificacion") = "" 'TxtNoIdentificacionv.Text.Trim
|
||||
Row("OCInterna") = "" 'TxtOCInterna.Text.Trim
|
||||
Row("LimitarCantidad") = ChkLimitarCantidadAdd.Checked 'If(ChkLimitarVenta.Checked, 1, 0)
|
||||
Row("Observacion") = "" 'TxtObservacionesDetalles.Text
|
||||
|
||||
Row("CveRubro") = 1
|
||||
|
||||
Row("Observacion") = "" 'TxtObservacionesDetalles.Text
|
||||
Row("CveRubro") = 2
|
||||
|
||||
|
||||
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, Convert.ToBoolean(Row("LimitarCantidad")), "", Observacion:=Row("Observacion").ToString, CveRubro:=1) Then
|
||||
|
||||
If Autorizado Then
|
||||
@@ -1842,8 +1837,6 @@ Partial Class Contratos_ContratoObra
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If CveContratoDetalleEditar = -1 Then
|
||||
|
||||
Dim Row As DataRow = TmpDT.NewRow()
|
||||
@@ -1901,8 +1894,8 @@ Partial Class Contratos_ContratoObra
|
||||
|
||||
Row("CveUM") = DdlUMInsumos.SelectedValue.ToEntero
|
||||
Row("UM") = DdlUMInsumos.SelectedItem
|
||||
Row("CveClasificacion") = DdlClasificacionAddInsumos.SelectedValue
|
||||
Row("Clasificacion") = DdlClasificacionAddInsumos.SelectedItem
|
||||
'Row("CveClasificacion") = DdlClasificacionAddInsumos.SelectedValue
|
||||
'Row("Clasificacion") = DdlClasificacionAddInsumos.SelectedItem
|
||||
Row("CvePS") = DdlProductowsInsumos.SelectedValue.ToEntero
|
||||
Row("PS") = DdlProductowsInsumos.SelectedText
|
||||
Row("CodigoPS") = DdlProductowsInsumos.SelectedText
|
||||
@@ -1915,10 +1908,7 @@ Partial Class Contratos_ContratoObra
|
||||
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, Convert.ToBoolean(Row("LimitarCantidad")), "",
|
||||
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 un precio ${3}.", Row("Cantidad"), Row("UM"), Row("PS"), Row("PU"))
|
||||
' guardarBitacora(msj)
|
||||
'End If
|
||||
|
||||
|
||||
Row("CveContratoDetalle") = ObjContratos.DtResultados.Rows(0)("CveContratoDetalle")
|
||||
TmpDT.Rows.Add(Row)
|
||||
@@ -2053,8 +2043,12 @@ Partial Class Contratos_ContratoObra
|
||||
|
||||
Protected Sub GVInsumos_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs) Handles GvInsumos.RowDataBound
|
||||
|
||||
If e.Row.RowIndex > -1 Then
|
||||
|
||||
If e.Row.RowIndex > -1 Then
|
||||
If e.Row.DBCampo("CveContratoDetalle") = "" Then
|
||||
e.Row.CssClass = "SubTotales"
|
||||
End If
|
||||
|
||||
|
||||
e.Row.FCCheckBox("CHKPAvance").Visible = Autorizado
|
||||
'e.Row.FCCheckBox("CHKPEstimacion").Visible = Autorizado
|
||||
If UsuarioActual.TienePermisoProceso(124) Then
|
||||
@@ -3266,70 +3260,6 @@ Partial Class Contratos_ContratoObra
|
||||
#End Region
|
||||
|
||||
#Region "SUBIR EXCEL"
|
||||
Public Sub DescargarFormato()
|
||||
Dim Directorio As String = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\Formatos\FormatoContrato.xlsx"
|
||||
Dim Archivo As New IO.FileInfo(Directorio)
|
||||
If Archivo.Exists Then
|
||||
Response.Clear()
|
||||
Response.ClearHeaders()
|
||||
Response.ClearContent()
|
||||
Response.AddHeader("Content-Disposition", "attachment; filename=" + Archivo.Name)
|
||||
Response.AddHeader("Content-Length", Archivo.Length.ToString())
|
||||
Response.ContentType = "text/plain"
|
||||
Response.Flush()
|
||||
Response.TransmitFile(Archivo.FullName)
|
||||
Response.End()
|
||||
End If
|
||||
End Sub
|
||||
'Public Sub LbDescargarExcel_Click(sender As Object, e As EventArgs) Handles LbDescargarExcel.Click
|
||||
' DescargarFormato()
|
||||
'End Sub
|
||||
Private Function ReadExcelFile(ByVal flatFilePath As String, ByVal firstRowHasHeaders As Boolean) As DataTable
|
||||
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
||||
Dim excelFile As ExcelFile = ExcelFile.Load(flatFilePath)
|
||||
|
||||
Dim unnamed As Integer = 0
|
||||
Dim cols As Integer
|
||||
Dim columns As String()
|
||||
Dim curRow As Integer = 0
|
||||
Dim curCol As Integer = 0
|
||||
Dim dataTable As DataTable = New DataTable()
|
||||
Dim worksheet As ExcelWorksheet = excelFile.Worksheets(0)
|
||||
|
||||
For cols = 0 To worksheet.Rows(0).AllocatedCells.Count - 1
|
||||
|
||||
If firstRowHasHeaders Then
|
||||
|
||||
If worksheet.Rows(0).Cells(cols).Value IsNot Nothing Then
|
||||
dataTable.Columns.Add(worksheet.Rows(0).Cells(cols).Value.ToString())
|
||||
Else
|
||||
dataTable.Columns.Add("Unnamed Column " & (System.Threading.Interlocked.Increment(unnamed)))
|
||||
End If
|
||||
|
||||
curRow = 1
|
||||
Else
|
||||
dataTable.Columns.Add("Column " & (cols + 1))
|
||||
End If
|
||||
Next
|
||||
|
||||
While curRow < worksheet.Rows.Count
|
||||
columns = New String(cols - 1) {}
|
||||
|
||||
For curCol = 0 To cols - 1
|
||||
|
||||
If worksheet.Rows(curRow).Cells(curCol).Value Is Nothing Then
|
||||
columns(curCol) = ""
|
||||
Else
|
||||
columns(curCol) = worksheet.Rows(curRow).Cells(curCol).Value.ToString()
|
||||
End If
|
||||
Next
|
||||
|
||||
dataTable.Rows.Add(columns)
|
||||
curRow += 1
|
||||
End While
|
||||
|
||||
Return dataTable
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
@@ -3353,8 +3283,8 @@ Partial Class Contratos_ContratoObra
|
||||
Private Sub BtnCargaExcel_Click(sender As Object, e As EventArgs) Handles BtnCargaExcel.Click
|
||||
If TxtExcel.getfiles().Archivos.Count > 0 Then
|
||||
Dim file As Archivo = TxtExcel.getfiles().Archivos(0)
|
||||
Dim Directorio As String = AppDomain.CurrentDomain.BaseDirectory & file.patch
|
||||
Dim Tipo As String = If(file.Extencion.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "CSV")
|
||||
Dim Directorio As String = AppDomain.CurrentDomain.BaseDirectory & file.path
|
||||
Dim Tipo As String = If(file.Extension.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "CSV")
|
||||
' CargarArchivo(Directorio, file.filename, Tipo)
|
||||
Else
|
||||
Alert("No existe el archivo. Favor de subir un archivo excel a la plataforma.", TipoMensaje.MsgError)
|
||||
@@ -3601,7 +3531,7 @@ Partial Class Contratos_ContratoObra
|
||||
#End Region
|
||||
|
||||
#Region " IMPRIMIR DOCUMENTO - SABE "
|
||||
Public Sub DescarFormato(documento As String)
|
||||
Public Sub DescargarFormato(documento As String)
|
||||
|
||||
Dim PathRoot As String = Server.MapPath("/")
|
||||
Dim PathSource As String
|
||||
@@ -4273,7 +4203,7 @@ Partial Class Contratos_ContratoObra
|
||||
TxtCantidadInsumos.Text = gvRow.DataKey("CantidadContratada").ToDouble.ToString
|
||||
|
||||
|
||||
DdlClasificacionAddInsumos.SelectedValueExist(gvRow.DataKey("CveClasificacion").ToEntero)
|
||||
' DdlClasificacionAddInsumos.SelectedValueExist(gvRow.DataKey("CveClasificacion").ToEntero)
|
||||
|
||||
DdlProductowsInsumos.ddl.SelectedValueExist(gvRow.DataKey("CvePS").ToString.ToEntero)
|
||||
|
||||
@@ -4294,7 +4224,7 @@ Partial Class Contratos_ContratoObra
|
||||
DVActividadesRH.Visible = True
|
||||
DVSubTipoActivoFijo.Visible = False
|
||||
|
||||
DVClasificacion.Visible = False
|
||||
' DVClasificacion.Visible = False
|
||||
DVPS.Visible = False
|
||||
DVUM.Visible = False
|
||||
|
||||
@@ -4310,7 +4240,7 @@ Partial Class Contratos_ContratoObra
|
||||
DVSubTipoActivoFijo.Visible = True
|
||||
|
||||
|
||||
DVClasificacion.Visible = False
|
||||
'DVClasificacion.Visible = False
|
||||
DVPS.Visible = False
|
||||
DVUM.Visible = False
|
||||
|
||||
@@ -4323,7 +4253,7 @@ Partial Class Contratos_ContratoObra
|
||||
DVActividadesRH.Visible = False
|
||||
DVSubTipoActivoFijo.Visible = False
|
||||
|
||||
DVClasificacion.Visible = True
|
||||
'DVClasificacion.Visible = True
|
||||
DVPS.Visible = True
|
||||
DVUM.Visible = True
|
||||
|
||||
@@ -4334,7 +4264,6 @@ Partial Class Contratos_ContratoObra
|
||||
End If
|
||||
|
||||
|
||||
|
||||
ModalControlPSAdd = False
|
||||
ChkContinualAgregandoControl.Visible = False
|
||||
ChkContinualAgregandoControl.Checked = False
|
||||
@@ -4386,7 +4315,7 @@ Partial Class Contratos_ContratoObra
|
||||
|
||||
TxtCantidadInsumos.Text = ""
|
||||
|
||||
DdlClasificacionAddInsumos.SelectedValueExist(-1)
|
||||
' DdlClasificacionAddInsumos.SelectedValueExist(-1)
|
||||
DdlProductowsInsumos.txtText.Value = ""
|
||||
DdlProductowsInsumos.txtValue.Value = ""
|
||||
DdlUMInsumos.SelectedValueExist(-1)
|
||||
@@ -4394,7 +4323,7 @@ Partial Class Contratos_ContratoObra
|
||||
|
||||
DdlRubro.SelectedValue = "2"
|
||||
|
||||
DVClasificacion.Visible = True
|
||||
' DVClasificacion.Visible = True
|
||||
DVPS.Visible = True
|
||||
DVUM.Visible = True
|
||||
|
||||
@@ -4450,6 +4379,7 @@ Partial Class Contratos_ContratoObra
|
||||
Dim DTCargaPresupuestoInsumos As New DataTable
|
||||
Dim DTCargaPresupuestoManoObra As New DataTable
|
||||
Dim DTCargaPresupuestoFlotillas As New DataTable
|
||||
Dim DTCargaPresupuestoIndirectos As New DataTable
|
||||
|
||||
|
||||
If TipoCargaPresupuesto = EnumTipoCargaPresupuesto.Ventas Then
|
||||
@@ -4457,7 +4387,7 @@ Partial Class Contratos_ContratoObra
|
||||
DTCargaPresupuesto = CargaPreSupuestoExcel("Presupuesto")
|
||||
|
||||
If DTCargaPresupuesto.Rows.Count > 0 Then
|
||||
ProcesaDatosCargaPresupuesto(DTCargaPresupuesto, Nothing, Nothing)
|
||||
ProcesaDatosCargaPresupuesto(DTCargaPresupuesto, Nothing, Nothing, Nothing)
|
||||
Else
|
||||
Alert("No se encintraron partidas en el documento", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
@@ -4466,9 +4396,10 @@ Partial Class Contratos_ContratoObra
|
||||
|
||||
DTCargaPresupuesto = CargaPreSupuestoExcel("Insumos")
|
||||
DTCargaPresupuestoManoObra = CargaPreSupuestoExcel("ManoObra")
|
||||
DTCargaPresupuestoFlotillas = CargaPreSupuestoExcel("Maquinaria")
|
||||
DTCargaPresupuestoFlotillas = CargaPresupuestoExcel("Maquinaria")
|
||||
DTCargaPresupuestoIndirectos = CargaPresupuestoExcel("Indirectos")
|
||||
|
||||
ProcesaDatosCargaPresupuesto(DTCargaPresupuesto, DTCargaPresupuestoManoObra, DTCargaPresupuestoFlotillas)
|
||||
ProcesaDatosCargaPresupuesto(DTCargaPresupuesto, DTCargaPresupuestoManoObra, DTCargaPresupuestoFlotillas, DTCargaPresupuestoIndirectos)
|
||||
|
||||
End If
|
||||
|
||||
@@ -4478,7 +4409,6 @@ Partial Class Contratos_ContratoObra
|
||||
|
||||
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
|
||||
@@ -4503,11 +4433,10 @@ Partial Class Contratos_ContratoObra
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Function CargaPreSupuestoExcel(Hoja As String) As DataTable
|
||||
Private Function CargaPresupuestoExcel(Hoja As String) As DataTable
|
||||
|
||||
Dim FileExtension As String = "-1"
|
||||
Dim Filesgral As List(Of Archivo) = TxtModalCargaPresupuesto.getfiles().Archivos
|
||||
@@ -4518,13 +4447,11 @@ Partial Class Contratos_ContratoObra
|
||||
|
||||
FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "")
|
||||
|
||||
|
||||
If Not FileExtension.ToUpper.Contiene("XLSX", "XSL") Then
|
||||
Alert("El archivo no es una archivo de Excel", TipoMensaje.MsgAdvertencia)
|
||||
Exit For
|
||||
End If
|
||||
|
||||
|
||||
Dim tempArray() As String
|
||||
tempArray = fileItem.filename.ToString().Split("-".ToCharArray())
|
||||
SpreadsheetInfo.SetLicense(Extensiones.SerialGemBoxSpreadsheet)
|
||||
@@ -4541,23 +4468,15 @@ Partial Class Contratos_ContratoObra
|
||||
|
||||
Next
|
||||
|
||||
|
||||
|
||||
RegistraScript("$('#ModalUploadPresupuesto').modal('hide')")
|
||||
|
||||
UpModalCargaPresupuesto.Update()
|
||||
|
||||
|
||||
DTPS = DTPS.FiltraParametros("Cantidad > 0")
|
||||
|
||||
|
||||
Return DTPS
|
||||
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
Private Sub ProcesaDatosCargaPresupuesto(DTPresupuesto As DataTable, DTCargaPresupuestoManoObra As DataTable, DTCargaPresupuestoFlotillas As DataTable)
|
||||
Private Sub ProcesaDatosCargaPresupuesto(DTPresupuesto As DataTable, DTCargaPresupuestoManoObra As DataTable, DTCargaPresupuestoFlotillas As DataTable, DTCargaPresupuestoIndirectos As DataTable)
|
||||
|
||||
|
||||
If Not DTPresupuesto Is Nothing Then
|
||||
@@ -4572,6 +4491,10 @@ Partial Class Contratos_ContratoObra
|
||||
DTCargaPresupuestoFlotillas.CaseSensitive = False
|
||||
End If
|
||||
|
||||
If Not DTCargaPresupuestoIndirectos Is Nothing Then
|
||||
DTCargaPresupuestoIndirectos.CaseSensitive = False
|
||||
End If
|
||||
|
||||
Dim ErrorProceso = False
|
||||
|
||||
Dim DTPS = New DataTable
|
||||
@@ -4617,24 +4540,18 @@ Partial Class Contratos_ContratoObra
|
||||
Dim CvePS As Integer = -1
|
||||
Dim CveUM As Integer = -1
|
||||
Dim StrArray() As String
|
||||
|
||||
|
||||
StrArray = GetPS("Codigo", DrowPS("Codigo").ToString).Split("|"c)
|
||||
|
||||
If StrArray.Length > 0 Then
|
||||
|
||||
If CBool(StrArray(0)) = True Then
|
||||
CvePS = StrArray(1).ToEntero
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If CvePS = -1 Then
|
||||
|
||||
StrArray = GetPS("PS", DrowPS("Producto").ToString).Split("|"c)
|
||||
|
||||
If StrArray.Length > 0 Then
|
||||
If CBool(StrArray(0)) = True Then
|
||||
CvePS = StrArray(1).ToEntero
|
||||
@@ -4852,13 +4769,117 @@ Partial Class Contratos_ContratoObra
|
||||
ErrorProceso = True
|
||||
RowNoEncontrados &= "Sub Tipo: " & DrowPS("SubTipoAF").ToString & "<\BR>"
|
||||
End If
|
||||
|
||||
|
||||
Next
|
||||
|
||||
|
||||
End If
|
||||
|
||||
If Not DTCargaPresupuestoIndirectos Is Nothing Then
|
||||
|
||||
For Each DrowPS As DataRow In DTCargaPresupuestoIndirectos.Rows
|
||||
|
||||
Dim CvePS As Integer = -1
|
||||
Dim CveUM As Integer = -1
|
||||
Dim StrArray() As String
|
||||
StrArray = GetPS("Codigo", DrowPS("Codigo").ToString).Split("|"c)
|
||||
|
||||
If StrArray.Length > 0 Then
|
||||
If CBool(StrArray(0)) = True Then
|
||||
CvePS = StrArray(1).ToEntero
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If CvePS = -1 Then
|
||||
|
||||
StrArray = GetPS("PS", DrowPS("Producto").ToString).Split("|"c)
|
||||
If StrArray.Length > 0 Then
|
||||
If CBool(StrArray(0)) = True Then
|
||||
CvePS = StrArray(1).ToEntero
|
||||
End If
|
||||
End If
|
||||
|
||||
If CvePS = -1 Then
|
||||
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
|
||||
Dim CveClasificacion As Integer
|
||||
If DrowPS.Table.Columns.Contains("Clasificacion") Then
|
||||
CveClasificacion = GlobalDTClasificaciones(CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveClasificacion", String.Format("Clasificacion = '{0}'", DrowPS("Clasificacion").ToString.Trim)).ToEntero
|
||||
Else
|
||||
CveClasificacion = GlobalDTClasificaciones(CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)("CveClasificacion").ToString.ToEntero 'toma el primero
|
||||
End If
|
||||
|
||||
Dim CveUnidadMedida As Integer = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveUnidadMedida", $"UnidadMedida = '{ DrowPS("UnidadMedida").ToString}' OR Abreviatura = '{ DrowPS("UnidadMedida").ToString}'").ToString.ToEntero
|
||||
|
||||
If Not CveUnidadMedida > 0 Then
|
||||
CveUnidadMedida = GlobalDTUnidadesMedida(CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)("CveUnidadMedida").ToString.ToEntero
|
||||
End If
|
||||
|
||||
If ObjPS.AddPS(CveClasificacion, 1, CveUnidadMedida, DrowPS("Codigo").ToString.Trim, "", "", DrowPS("Producto").ToString, DrowPS("PU").ToString.ToDouble, 0, 0, False, 0, False, If(TipoCargaPresupuesto = EnumTipoCargaPresupuesto.Ventas, True, False),
|
||||
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, 1, CveTipoPS:=2, CveSATPS:=-1, CveMarca:=-1, CveTamaño:=-1, CveMedida:=-1, CveRinTamaño:=-1, CveModelo:=-1, Litraje:=-1, IEPSPorcentaje:=-1, CveClasificacion2:=-1, CveClasificacionDetalle:=-1) > 0 Then
|
||||
CvePS = ObjPS.CvePS
|
||||
Else
|
||||
CvePS = -1
|
||||
RowNoEncontrados &= "Producto: " & StrArray(1) & "<\BR>"
|
||||
End If
|
||||
|
||||
ObjPS.Dispose()
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If CvePS > 0 And DrowPS("Cantidad").ToString.ToDouble > 0 Then
|
||||
|
||||
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.Control
|
||||
Row("CveTipoPresupuesto") = 1
|
||||
Row("CveRubro") = 5
|
||||
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 ErrorProceso Then
|
||||
|
||||
@@ -4888,13 +4909,8 @@ Partial Class Contratos_ContratoObra
|
||||
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")
|
||||
@@ -4956,22 +4972,14 @@ Partial Class Contratos_ContratoObra
|
||||
|
||||
ObjContratos.Dispose()
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If RowNoEncontrados.Length > 0 Then
|
||||
Alert($"Productos y Sub Tipos no encontrados <br> {RowNoEncontrados} ", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Protected Sub LnkHabilitaAvance_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||
@@ -4990,10 +4998,8 @@ Partial Class Contratos_ContratoObra
|
||||
|
||||
row("PermitirAvance") = IIf(PermitirAvance = 1, 0, 1).ToString.ToEntero
|
||||
|
||||
|
||||
CargaGVPresupuestos(TmpDT.FiltraParametros("CveTipoPresupuesto=2"))
|
||||
|
||||
|
||||
Alert("Se ha permitido levantar avance", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("no se pudo permitir avance", TipoMensaje.MsgAdvertencia)
|
||||
@@ -5003,7 +5009,7 @@ Partial Class Contratos_ContratoObra
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaEstadoCueta()
|
||||
Private Sub CargaEstadoCuenta()
|
||||
|
||||
|
||||
Dim ObjContratos As New ClsContratos
|
||||
@@ -5247,7 +5253,7 @@ Partial Class Contratos_ContratoObra
|
||||
DVDias.Visible = True
|
||||
DVActividadesRH.Visible = True
|
||||
|
||||
DVClasificacion.Visible = False
|
||||
'DVClasificacion.Visible = False
|
||||
DVPS.Visible = False
|
||||
DVUM.Visible = False
|
||||
|
||||
@@ -5259,7 +5265,7 @@ Partial Class Contratos_ContratoObra
|
||||
DVDias.Visible = True
|
||||
DVActividadesRH.Visible = False
|
||||
|
||||
DVClasificacion.Visible = False
|
||||
'DVClasificacion.Visible = False
|
||||
DVPS.Visible = False
|
||||
DVUM.Visible = False
|
||||
|
||||
@@ -5268,8 +5274,8 @@ Partial Class Contratos_ContratoObra
|
||||
Else
|
||||
DVDias.Visible = False
|
||||
DVActividadesRH.Visible = False
|
||||
|
||||
DVClasificacion.Visible = True
|
||||
'
|
||||
'DVClasificacion.Visible = True
|
||||
DVPS.Visible = True
|
||||
DVUM.Visible = True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user