Thalamus cambio de tipode dato de celda a fecha
This commit is contained in:
@@ -157,6 +157,28 @@
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UpAccionesPresupuestos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkModalAddPSVentas" Visible="false" runat="server" OnClick="LnkModalAddPSVentas_Click"> <i class="fa fa-plus" style="font-weight:bold;" ></i>Agregar PS Venta</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkModalAddPSControl" Visible="false" runat="server" OnClick="LnkModalAddPSControl_Click"> <i class="fa fa-plus" style="font-weight:bold;"></i>Agregar PS Control</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkModalAddPresupuestoVentas" Visible="false" runat="server" OnClick="LnkModalAddPresupuestoVentas_Click"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i>Agregar Presupuesto Venta</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkModalAddPresupuestoControl" Visible="false" runat="server" OnClick="LnkModalAddPresupuestoControl_Click"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i>Agregar Presupuesto Control</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
@@ -890,71 +912,10 @@
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}');sumagvx();", Gv.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
|
||||
<table class="table Widthall">
|
||||
<tr class="Titulos">
|
||||
<td runat="server" id="thOcCliente" style="width: 75px">
|
||||
<asp:Literal Text="OC <br/> Cliente" ID="tdOC" runat="server" />
|
||||
</td>
|
||||
<td style="width: 150px">Cantidad</td>
|
||||
<td runat="server" id="thLimitar" style="width: 75px">
|
||||
<asp:Literal Text="Limitar" runat="server" ID="tdLimitar" /></td>
|
||||
<td runat="server" id="thNoIdentificacionv" style="width: 75px">
|
||||
<asp:Literal Text="Clave Interna Cliente" ID="tdCveInterna" runat="server" /></td>
|
||||
<td style="width: 400px">Producto/Servicio</td>
|
||||
<td style="width: 100px">U. M.</td>
|
||||
<td style="width: 150px" runat="server" id="TDObservacion" visible="false">Observación</td>
|
||||
<td style="width: 150px">Precio Unitario</td>
|
||||
<td style="width: 150px">Total</td>
|
||||
<td style="width: 150px" id="THAvance" runat="server" visible="false">Permite Avance</td>
|
||||
<%-- <td style="width: 150px" id="tdCol7" runat="server">Permite Estimación </td>--%>
|
||||
<td style="width: 100px">Comandos</td>
|
||||
</tr>
|
||||
<tr class="Titulos">
|
||||
<td runat="server" id="tdOcCliente">
|
||||
<asp:TextBox ID="TxtOCInterna" runat="server" MaxLength="15" Width="70px"></asp:TextBox>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtCantidad" runat="server" Width="70px"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" TargetControlID="TxtCantidad" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<asp:RequiredFieldValidator ID="RFVCantidad" runat="server" ControlToValidate="TxtCantidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAgregar"></asp:RequiredFieldValidator><ajax:ValidatorCalloutExtender ID="CVECantidad" runat="server" HighlightCssClass="vco" TargetControlID="RFVCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td runat="server" id="tdLimitar2">
|
||||
<asp:CheckBox ID="ChkLimitarVenta" runat="server" />
|
||||
</td>
|
||||
<td runat="server" id="tdNoIdentificacionv">
|
||||
<asp:TextBox ID="TxtNoIdentificacionv" runat="server" MaxLength="15" Width="70px"></asp:TextBox>
|
||||
</td>
|
||||
<td>
|
||||
<div style="max-width: 550px;">
|
||||
<asp:DropDownList ID="DdlClasificacionAdd" 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>
|
||||
<br />
|
||||
<ADS:Dropdownlost runat="server" ID="DdlProductows" CssStyle="width: 100%;" CssClassDdl="select2me" DataTextField="PSCodigo" DataValueField="CvePS" />
|
||||
</div>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlUM" runat="server" AutoPostBack="true" DataTextField="UnidadMedida" DataValueField="CveUnidadMedida" CssClass="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;"></asp:DropDownList>
|
||||
</td>
|
||||
|
||||
<td runat="server" id="tdObservaciones" visible="false">
|
||||
<asp:TextBox ID="TxtObservacionesDetalles" runat="server" Width="100px"></asp:TextBox>
|
||||
</td>
|
||||
|
||||
<td style="width: 75px">
|
||||
<asp:TextBox ID="TxtPU" runat="server" Width="70px"></asp:TextBox><ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender2" runat="server" TargetControlID="TxtPU" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<asp:RequiredFieldValidator ID="RFVPU" runat="server" ControlToValidate="TxtPU" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''P.U.''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAgregar"></asp:RequiredFieldValidator><ajax:ValidatorCalloutExtender ID="CVEPU" runat="server" HighlightCssClass="vco" TargetControlID="RFVPU" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td></td>
|
||||
<td id="TDAvance" runat="server" visible="false"></td>
|
||||
<td>
|
||||
<asp:Button Text="Agregar" runat="server" ID="BtnAgregarDetalle" Width="100px" OnClick="BtnAgregarDetalle_Click" ValidationGroup="GrpAgregar" class="btn btn-default" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</asp:Panel>
|
||||
|
||||
</ContentTemplate>
|
||||
@@ -965,122 +926,134 @@
|
||||
<asp:UpdatePanel ID="UpGV" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="Gv" ClientIDMode="Static" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron Conceptos" DataKeyNames="CveContratoDetalle,CveUM, CvePS, Cantidad, PU,CveTipoPresupuesto,CveClasificacion" ShowHeader="true" SelectedRowStyle-BackColor="#66CCFF" CssClass="table table-striped table-hover Widthall mysmallbtn" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="OC <br/> Cliente">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LbOCInternaEdit" Text='<%# Eval("OCInterna")%>' runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtOCInternaEdit" MaxLength="15" runat="server" Text='<%# Eval("OCInterna") %>' Width="70px"></asp:TextBox>
|
||||
</EditItemTemplate>
|
||||
<ItemStyle Width="75px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cantidad">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtCantidad" Text='<%# Eval("CantidadContratada")%>' runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtCantidad" runat="server" Text='<%# Eval("CantidadContratada") %>' Width="90px"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtenderCantidad" runat="server" TargetControlID="TxtCantidad" FilterType="Custom, Numbers" ValidChars="." />
|
||||
</EditItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Limitar">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblLimitar" Text='<%# If(Eval("LimitarCantidad").ToString = "True", "Si", "No")%>' runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkLimitarCantidad" runat="server" Checked='<%# Eval("LimitarCantidad").ToString%>'></asp:CheckBox>
|
||||
</EditItemTemplate>
|
||||
<ItemStyle Width="75px" HorizontalAlign="Center" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Clave <br/> Interna <br/> Cliente">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblNoIdentificacion" Text='<%# Eval("NoIdentificacion")%>' runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtNoIdentificacion" MaxLength="15" runat="server" Text='<%# Eval("NoIdentificacion") %>' Width="70px"></asp:TextBox>
|
||||
</EditItemTemplate>
|
||||
<ItemStyle Width="75px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Producto/Servicio" 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>
|
||||
<asp:Literal ID="LtUM" Text='<%# Eval("UM")%>' runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<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>
|
||||
<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"
|
||||
ShowHeader="true" SelectedRowStyle-BackColor="#66CCFF" CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="OC <br/> Cliente">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LbOCInternaEdit" Text='<%# Eval("OCInterna")%>' runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtOCInternaEdit" MaxLength="15" runat="server" Text='<%# Eval("OCInterna") %>' Width="70px"></asp:TextBox>
|
||||
</EditItemTemplate>
|
||||
<ItemStyle Width="75px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cantidad">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtCantidad" Text='<%# Eval("CantidadContratada")%>' runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtCantidad" runat="server" Text='<%# Eval("CantidadContratada") %>' Width="90px"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtenderCantidad" runat="server" TargetControlID="TxtCantidad" FilterType="Custom, Numbers" ValidChars="." />
|
||||
</EditItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Limitar">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblLimitar" Text='<%# If(Eval("LimitarCantidad").ToString = "True", "Si", "No")%>' runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkLimitarCantidad" runat="server" Checked='<%# Eval("LimitarCantidad").ToString%>'></asp:CheckBox>
|
||||
</EditItemTemplate>
|
||||
<ItemStyle Width="75px" HorizontalAlign="Center" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Clave Int. Cliente">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblNoIdentificacion" Text='<%# Eval("NoIdentificacion")%>' runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtNoIdentificacion" MaxLength="15" runat="server" Text='<%# Eval("NoIdentificacion") %>' Width="70px"></asp:TextBox>
|
||||
</EditItemTemplate>
|
||||
<ItemStyle Width="75px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Producto/Servicio" 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>
|
||||
<asp:Literal ID="LtUM" Text='<%# Eval("UM")%>' runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<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>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Observacion" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblObservacion" Text='<%# Eval("Observacion")%>' runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtObservacion" runat="server" Text='<%# Eval("Observacion") %>' Width="70px"></asp:TextBox>
|
||||
</EditItemTemplate>
|
||||
<ItemStyle Width="75px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Observacion" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblObservacion" Text='<%# Eval("Observacion")%>' runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtObservacion" runat="server" Text='<%# Eval("Observacion") %>' Width="70px"></asp:TextBox>
|
||||
</EditItemTemplate>
|
||||
<ItemStyle Width="75px" />
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Precio Unitario">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtPU" Text='<%# Eval("PU", "{0:###,###,##0.00##}")%>' runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<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" />
|
||||
</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>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Avance" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="CHKPAvance" Enabled="false" AutoPostBack="true" OnCheckedChanged="AvaClick" runat="server" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<%-- <asp:TemplateField HeaderText="Estimacion">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="CHKPEstimacion" Enabled="false" AutoPostBack="true" OnCheckedChanged="EstClick" runat="server" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>--%>
|
||||
<asp:TemplateField HeaderText="Editar" ItemStyle-Width="50px" ItemStyle-HorizontalAlign="Center">
|
||||
<EditItemTemplate>
|
||||
<div style="width: 65px;">
|
||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGV" /><asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
|
||||
</div>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit"
|
||||
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>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:TemplateField HeaderText="Precio Unitario">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtPU" Text='<%# Eval("PU", "{0:###,###,##0.00##}")%>' runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<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" />
|
||||
</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>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Avance" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="CHKPAvance" Enabled="false" AutoPostBack="true" OnCheckedChanged="AvaClick" runat="server" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="150px" 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>
|
||||
<div style="width: 65px;">
|
||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGV" /><asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
|
||||
</div>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit"
|
||||
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>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<table class="table Widthall">
|
||||
@@ -1117,10 +1090,10 @@
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel ID="TabPVInsumos" runat="server" HeaderText="Suministros">
|
||||
<ajax:TabPanel ID="TabPVInsumos" runat="server" HeaderText="Control">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel ID="UpTitulosInsumos" runat="server" UpdateMode="Conditional">
|
||||
<%-- <asp:UpdatePanel ID="UpTitulosInsumos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:Panel ID="PanelContratosInsumos" runat="server">
|
||||
@@ -1140,7 +1113,7 @@
|
||||
<td style="width: 150px">Precio Unitario</td>
|
||||
<td style="width: 150px">Total</td>
|
||||
<td style="width: 150px" id="THAvanceInsumos" runat="server" visible="false">Permite Avance</td>
|
||||
<%-- <td style="width: 150px" id="tdCol7" runat="server">Permite Estimación </td>--%>
|
||||
|
||||
<td style="width: 100px">Comandos</td>
|
||||
</tr>
|
||||
<tr class="Titulos">
|
||||
@@ -1180,109 +1153,126 @@
|
||||
</asp:Panel>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:UpdatePanel>--%>
|
||||
|
||||
|
||||
|
||||
<div class="row col-md-12" align="right">
|
||||
<input type="text" id="TxtBusqueda3" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda3','{0}');sumagvx();", GvInsumos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda3','{0}');sumagvx();", GvInsumos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
|
||||
<asp:UpdatePanel ID="UpGVInsumos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvInsumos" ClientIDMode="Static" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron Conceptos" DataKeyNames="CveContratoDetalle,CveUM, CvePS, Cantidad, PU,CveTipoPresupuesto,CveClasificacion" ShowHeader="true" SelectedRowStyle-BackColor="#66CCFF" CssClass="table table-striped table-hover Widthall mysmallbtn" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Cantidad">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtCantidad" Text='<%# Eval("CantidadContratada")%>' runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtCantidad" runat="server" Text='<%# Eval("CantidadContratada") %>' Width="90px"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtenderCantidad" runat="server" TargetControlID="TxtCantidad" FilterType="Custom, Numbers" ValidChars="." />
|
||||
</EditItemTemplate>
|
||||
<ItemStyle Width="150px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Limitar">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblLimitar" Text='<%# If(Eval("LimitarCantidad").ToString = "True", "Si", "No")%>' runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkLimitarCantidad" runat="server" Checked='<%# Eval("LimitarCantidad").ToString%>'></asp:CheckBox>
|
||||
</EditItemTemplate>
|
||||
<ItemStyle Width="75px" HorizontalAlign="Center" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Clave <br/> Interna">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblNoIdentificacion" Text='<%# Eval("NoIdentificacion")%>' runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtNoIdentificacion" MaxLength="15" runat="server" Text='<%# Eval("NoIdentificacion") %>' Width="70px"></asp:TextBox>
|
||||
</EditItemTemplate>
|
||||
<ItemStyle Width="75px" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Producto/Servicio" 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>
|
||||
<asp:Literal ID="LtUM" Text='<%# Eval("UM")%>' runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<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>
|
||||
<asp:TemplateField HeaderText="Precio Unitario">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtPU" Text='<%# Eval("PU", "{0:###,###,##0.00##}")%>' runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<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" />
|
||||
</asp:TemplateField>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<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>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<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" ShowHeader="true" SelectedRowStyle-BackColor="#66CCFF"
|
||||
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
||||
|
||||
<asp:TemplateField HeaderText="Avance" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="CHKPAvance" Enabled="false" AutoPostBack="true" OnCheckedChanged="AvaClick" runat="server" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<%-- <asp:TemplateField HeaderText="Estimacion">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="CHKPEstimacion" Enabled="false" AutoPostBack="true" OnCheckedChanged="EstClick" runat="server" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>--%>
|
||||
<asp:TemplateField HeaderText="Editar" ItemStyle-Width="50px" ItemStyle-HorizontalAlign="Center">
|
||||
<EditItemTemplate>
|
||||
<div style="width: 65px;">
|
||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGV" /><asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
|
||||
</div>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit"
|
||||
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>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Cantidad">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtCantidad" Text='<%# Eval("CantidadContratada")%>' runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtCantidad" runat="server" Text='<%# Eval("CantidadContratada") %>' Width="90px"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtenderCantidad" runat="server" TargetControlID="TxtCantidad" FilterType="Custom, Numbers" ValidChars="." />
|
||||
</EditItemTemplate>
|
||||
<ItemStyle Width="150px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Limitar">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblLimitar" Text='<%# If(Eval("LimitarCantidad").ToString = "True", "Si", "No")%>' runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkLimitarCantidad" runat="server" Checked='<%# Eval("LimitarCantidad").ToString%>'></asp:CheckBox>
|
||||
</EditItemTemplate>
|
||||
<ItemStyle Width="75px" HorizontalAlign="Center" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Clave <br/> Interna">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblNoIdentificacion" Text='<%# Eval("NoIdentificacion")%>' runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtNoIdentificacion" MaxLength="15" runat="server" Text='<%# Eval("NoIdentificacion") %>' Width="70px"></asp:TextBox>
|
||||
</EditItemTemplate>
|
||||
<ItemStyle Width="75px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Producto/Servicio" 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>
|
||||
<asp:Literal ID="LtUM" Text='<%# Eval("UM")%>' runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<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>
|
||||
<asp:TemplateField HeaderText="Precio Unitario">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtPU" Text='<%# Eval("PU", "{0:###,###,##0.00##}")%>' runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<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" />
|
||||
</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>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Avance" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="CHKPAvance" Enabled="false" AutoPostBack="true" OnCheckedChanged="AvaClick" runat="server" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Editar" ItemStyle-Width="50px" 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="Editar" ItemStyle-Width="50px" ItemStyle-HorizontalAlign="Center">
|
||||
<EditItemTemplate>
|
||||
<div style="width: 65px;">
|
||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGV" /><asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
|
||||
</div>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit"
|
||||
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>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class="table Widthall">
|
||||
<tr class="Titulos">
|
||||
@@ -2233,6 +2223,7 @@
|
||||
|
||||
|
||||
<%--MODAL UPLOAD--%>
|
||||
|
||||
<div id="ModalUpload" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
@@ -2449,13 +2440,6 @@
|
||||
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="position: relative;">
|
||||
<div class="row ">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-md-5" style="position: relative; margin-left: 10px!important">
|
||||
<asp:TextBox ID="txtFechaI4" Style="margin-top: 10px!important" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
|
||||
|
||||
@@ -2519,6 +2503,222 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<%-- Modal Ventas presupuestos Agregar--%>
|
||||
<div id="ModalVentasAddPS" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalVentasAddPS" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlModalVentasPSTitulo" runat="server"></asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtOCInterna" CssClass="form-control" runat="server" MaxLength="100" CausesValidation="true"></asp:TextBox>
|
||||
<label for="<%= TxtOCInterna.ClientID.ToString()%>">OC:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtCantidad" runat="server" CssClass="form-control" ></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" TargetControlID="TxtCantidad" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<asp:RequiredFieldValidator ID="RFVCantidad" runat="server" ControlToValidate="TxtCantidad" 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="GrpAddPSVentas"> </asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtCantidad.ClientID.ToString()%>">Cantidad:</label>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:CheckBox ID="ChkLimitarVenta" runat="server" CssClass="form-control" />
|
||||
<label for="<%= ChkLimitarVenta.ClientID.ToString()%>">Limitar:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtNoIdentificacionv" runat="server" MaxLength="15" CssClass="form-control" ></asp:TextBox>
|
||||
<label for="<%= TxtNoIdentificacionv.ClientID.ToString()%>">Clave Interna Cliente:</label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlClasificacionAdd" 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="<%= DdlClasificacionAdd.ClientID.ToString()%>">Clasificación:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<ADS:Dropdownlost runat="server" ID="DdlProductows" CssStyle="width: 100%;" CssClassDdl="form-control select2me" DataTextField="PSCodigo" DataValueField="CvePS" />
|
||||
<label for="<%= DdlProductows.ClientID.ToString()%>">Producto:</label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlUM" runat="server" AutoPostBack="true" DataTextField="UnidadMedida" DataValueField="CveUnidadMedida" CssClass="form-control select2me" ></asp:DropDownList>
|
||||
<label for="<%= DdlUM.ClientID.ToString()%>">U. M.:</label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtPU" runat="server" Width="70px" CssClass="form-control"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender2" runat="server" TargetControlID="TxtPU" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<asp:RequiredFieldValidator ID="RFVPU" runat="server" ControlToValidate="TxtPU" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''P.U.''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddPSVentas"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtPU.ClientID.ToString()%>">P.U.:</label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" style="text-align:right!important">
|
||||
<asp:CheckBox ID="ChkContinualAgregandoVentas" runat="server" TextAlign="Left" Text="Continuar agregando" CssClass="form-control" Checked="true" />
|
||||
</div>
|
||||
<br />
|
||||
<td id="TDAvance" runat="server" visible="false"></td>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
|
||||
<asp:Button Text="Guardar" runat="server" ID="BtnAgregarDetalle" Width="100px" OnClick="BtnAgregarDetalle_Click" ValidationGroup="GrpAddPSVentas" class="btn btn-success" /></td>
|
||||
<button id="Button5" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<%--MODAL CONTROL PRESUPUESTOS AGREGAR--%>
|
||||
<div id="ModalControlAddPS" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalControlAddPS" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlModalControlPSTitulo" runat="server"></asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtCantidadInsumos" runat="server" CssClass="form-control" ></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FETxtCantidadInsumos" runat="server" TargetControlID="TxtCantidadInsumos" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<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">
|
||||
<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>
|
||||
<label for="<%= DdlClasificacionAddInsumos.ClientID.ToString()%>">Clasificación:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<label for="<%= DdlProductowsInsumos.ClientID.ToString()%>">Producto:</label>
|
||||
<ADS:Dropdownlost runat="server" ID="DdlProductowsInsumos" CssStyle="width: 100%;" CssClassDdl="form-control select2me" DataTextField="PSCodigo" DataValueField="CvePS" />
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<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>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtPUInsumos" runat="server" Width="70px" CssClass="form-control"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FETxtPUInsumos" runat="server" TargetControlID="TxtPUInsumos" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<asp:RequiredFieldValidator ID="RFVTxtPUInsumos" runat="server" ControlToValidate="TxtPUInsumos" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''P.U.''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddPSControl"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtPUInsumos.ClientID.ToString()%>">P.U.:</label>
|
||||
</div>
|
||||
|
||||
|
||||
<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" />
|
||||
</div>
|
||||
<br />
|
||||
<td id="TD1" runat="server" visible="false"></td>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button Text="Guardar" runat="server" ID="BtnAgregarDetalleInsumos" Width="100px" OnClick="BtnAgregarDetalleInsumos_Click" ValidationGroup="GrpAddPSControl" class="btn btn-success" />
|
||||
<button id="Button4" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<%--Modal Carga Presupuesto--%>
|
||||
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpModalCargaPresupuesto">
|
||||
<ContentTemplate>
|
||||
|
||||
<div id="ModalUploadPresupuesto" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title"><asp:Label runat="server" ID="LnlModalcargaPresupuestoTitulo"></asp:Label></h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel runat="server" ID="UpdatePanel1" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:TextBox ID="TxtModalCargaPresupuesto" CssClass="ADSdropzone hidden" data-maxFile="1" Text="" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<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>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<iframe id="my_iframe" style="display: none;"></iframe>
|
||||
|
||||
</asp:Content>
|
||||
|
||||
@@ -394,7 +394,17 @@ Partial Class Contratos_ContratoObra
|
||||
'Configuración de Modalidad Update
|
||||
BtnGuardar.Text = "Guardar Cambios"
|
||||
|
||||
If Request("Opt") IsNot Nothing AndAlso IsNumeric(Request("Opt")) Then TAB.ActiveTabIndex = Request("Opt").ToEntero
|
||||
If Request("Opt") IsNot Nothing AndAlso IsNumeric(Request("Opt")) Then Tab.ActiveTabIndex = Request("Opt").ToEntero
|
||||
|
||||
If CveContrato > 0 Then
|
||||
|
||||
LnkModalAddPSVentas.Visible = True
|
||||
LnkModalAddPSControl.Visible = True
|
||||
LnkModalAddPresupuestoVentas.Visible = True
|
||||
LnkModalAddPresupuestoControl.Visible = True
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
'Configuración de Modalidad Insert
|
||||
LblFechaCaptura.Text = Now.ToShortDateString()
|
||||
@@ -1001,30 +1011,30 @@ Partial Class Contratos_ContratoObra
|
||||
TabPVInsumos.Visible = False
|
||||
RowEstatus.Visible = False
|
||||
TabPres.HeaderText = "Partidas"
|
||||
thOcCliente.Style.Add("display", "none")
|
||||
tdOcCliente.Style.Add("display", "none")
|
||||
thNoIdentificacionv.Style.Add("display", "none")
|
||||
thLimitar.Style.Add("display", "none")
|
||||
tdLimitar2.Style.Add("display", "none")
|
||||
tdNoIdentificacionv.Style.Add("display", "none")
|
||||
'thOcCliente.Style.Add("display", "none")
|
||||
'tdOcCliente.Style.Add("display", "none")
|
||||
'thNoIdentificacionv.Style.Add("display", "none")
|
||||
'thLimitar.Style.Add("display", "none")
|
||||
'tdLimitar2.Style.Add("display", "none")
|
||||
'tdNoIdentificacionv.Style.Add("display", "none")
|
||||
'RowFlexible.Visible = False
|
||||
TableDatosCabecera.Visible = False
|
||||
TabAvanveDocumento.Visible = False
|
||||
TabSistema.Visible = False
|
||||
'RowPorcentajeComision.Visible = False
|
||||
TabContratosGastos.Visible = False
|
||||
tdCveInterna.Text = ""
|
||||
tdLimitar.Text = ""
|
||||
tdOC.Text = ""
|
||||
THAvance.Visible = False
|
||||
THAvance.Style.Add("display", "none")
|
||||
'tdCveInterna.Text = ""
|
||||
'tdLimitar.Text = ""
|
||||
'tdOC.Text = ""
|
||||
'THAvance.Visible = False
|
||||
'THAvance.Style.Add("display", "none")
|
||||
TDAvance.Style.Add("display", "none")
|
||||
TxtOCInterna.Visible = False
|
||||
TxtNoIdentificacionv.Visible = False
|
||||
ChkLimitarVenta.Visible = False
|
||||
DvObservaciones.Visible = True
|
||||
TDObservacion.Visible = True
|
||||
tdObservaciones.Visible = True
|
||||
'TDObservacion.Visible = True
|
||||
'tdObservaciones.Visible = True
|
||||
TxtObservaciones.Text = ObjContratos.DtResultados.Rows(0)("Observaciones").ToString
|
||||
Gv.Columns(6).Visible = True
|
||||
'DdlPeriodo.SelectedValueExist(ObjContratos.DtResultados.Rows(0)("CvePeriodo").ToString)
|
||||
@@ -1768,6 +1778,9 @@ Partial Class Contratos_ContratoObra
|
||||
DdlProductows.SelectedText = "Seleccione"
|
||||
DdlProductows.SelectedValue = "-1"
|
||||
End If
|
||||
|
||||
UpModalVentasAddPS.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaPSInsumos()
|
||||
@@ -1852,53 +1865,123 @@ Partial Class Contratos_ContratoObra
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnAgregarDetalle_Click(sender As Object, e As EventArgs)
|
||||
Dim Row As DataRow = TmpDT.NewRow()
|
||||
Row("Cantidad") = TxtCantidad.Text.ToDouble.FormatoNumero
|
||||
Row("CantidadContratada") = TxtCantidad.Text.ToDouble.FormatoNumero
|
||||
Row("CveUM") = DdlUM.SelectedValue.ToEntero
|
||||
Row("UM") = DdlUM.SelectedItem
|
||||
Row("CveClasificacion") = DdlClasificacionAdd.SelectedValue
|
||||
Row("Clasificacion") = DdlClasificacionAdd.SelectedItem
|
||||
Row("CvePS") = DdlProductows.SelectedValue.ToEntero
|
||||
Row("PS") = DdlProductows.SelectedText
|
||||
Row("CodigoPS") = DdlProductows.SelectedText
|
||||
Row("PU") = TxtPU.Text.ToDouble.FormatoNumero
|
||||
Row("Total") = (TxtCantidad.Text.ToDouble * TxtPU.Text.ToDouble).FormatoNumero
|
||||
Row("CveTipoPresupuesto") = 2
|
||||
Row("NoIdentificacion") = TxtNoIdentificacionv.Text.Trim
|
||||
Row("OCInterna") = TxtOCInterna.Text.Trim
|
||||
Row("LimitarCantidad") = If(ChkLimitarVenta.Checked, 1, 0)
|
||||
Row("Observacion") = TxtObservacionesDetalles.Text
|
||||
|
||||
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")), Row("OCInterna").ToString, Observacion:=Row("Observacion").ToString) 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)
|
||||
|
||||
If CveContratoDetalleEditar = -1 Then
|
||||
|
||||
Dim Row As DataRow = TmpDT.NewRow()
|
||||
Row("Cantidad") = TxtCantidad.Text.ToDouble.FormatoNumero
|
||||
Row("CantidadContratada") = TxtCantidad.Text.ToDouble.FormatoNumero
|
||||
Row("CveUM") = DdlUM.SelectedValue.ToEntero
|
||||
Row("UM") = DdlUM.SelectedItem
|
||||
Row("CveClasificacion") = DdlClasificacionAdd.SelectedValue
|
||||
Row("Clasificacion") = DdlClasificacionAdd.SelectedItem
|
||||
Row("CvePS") = DdlProductows.SelectedValue.ToEntero
|
||||
Row("PS") = DdlProductows.SelectedText
|
||||
Row("CodigoPS") = DdlProductows.SelectedText
|
||||
Row("PU") = TxtPU.Text.ToDouble.FormatoNumero
|
||||
Row("Total") = (TxtCantidad.Text.ToDouble * TxtPU.Text.ToDouble).FormatoNumero
|
||||
Row("CveTipoPresupuesto") = 2
|
||||
Row("NoIdentificacion") = TxtNoIdentificacionv.Text.Trim
|
||||
Row("OCInterna") = TxtOCInterna.Text.Trim
|
||||
Row("LimitarCantidad") = If(ChkLimitarVenta.Checked, 1, 0)
|
||||
Row("Observacion") = "" 'TxtObservacionesDetalles.Text
|
||||
|
||||
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")), Row("OCInterna").ToString, Observacion:=Row("Observacion").ToString) 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)
|
||||
TmpDT.AcceptChanges()
|
||||
Dim TotalRow = Row("Total").ToString.ToDouble
|
||||
|
||||
CargaGVPresupuestos(TmpDT.FiltraParametros("CveTipoPresupuesto=2"))
|
||||
|
||||
UpGV.Update()
|
||||
LimpiarModalVentas()
|
||||
|
||||
LbTotalGeneral.Text = (LbTotalGeneral.Text.ToDouble + TotalRow).ToString.FormatoNumero
|
||||
LblImporte.Text = LbTotalGeneral.Text
|
||||
TxtCantidad.Focus()
|
||||
UpGral.Update()
|
||||
|
||||
|
||||
If Not ChkContinualAgregandoVentas.Checked Then
|
||||
RegistraScript("$('#ModalVentasAddPS').modal('hide')")
|
||||
End If
|
||||
|
||||
Else
|
||||
Alert("Ocurrio un error al agregar el detalle", TipoMensaje.MsgError)
|
||||
End If
|
||||
Row("CveContratoDetalle") = ObjContratos.DtResultados.Rows(0)("CveContratoDetalle")
|
||||
TmpDT.Rows.Add(Row)
|
||||
TmpDT.AcceptChanges()
|
||||
Dim TotalRow = Row("Total").ToString.ToDouble
|
||||
|
||||
ObjContratos.Dispose()
|
||||
Else
|
||||
|
||||
|
||||
Dim Cantidad, PU As Double : Dim CvePS, CveUM As Integer
|
||||
Dim NoIdentificacion As String = ""
|
||||
Dim OCInterna As String = ""
|
||||
Dim LimitarCantidad As Boolean
|
||||
Dim Observaciones As String = ""
|
||||
|
||||
Cantidad = TxtCantidad.Text.ToDouble
|
||||
PU = TxtPU.Text.ToDouble
|
||||
CvePS = DdlProductows.SelectedValue.ToEntero
|
||||
CveUM = DdlUM.SelectedValue.ToEntero
|
||||
NoIdentificacion = TxtNoIdentificacionv.Text.Trim
|
||||
OCInterna = TxtOCInterna.Text.Trim
|
||||
LimitarCantidad = If(ChkLimitarVenta.Checked, True, False)
|
||||
Observaciones = ""
|
||||
|
||||
Dim row = TmpDT.Select(String.Format(" CveContratoDetalle={0}", CveContratoDetalleEditar))(0)
|
||||
Dim LimitarCantidadValidator As Boolean = row("LimitarCantidad").ToString = "True"
|
||||
|
||||
|
||||
Dim ObjContratos As New ClsContratos
|
||||
If ObjContratos.UpdateContratosDetalle(CveContratoDetalleEditar, CveContrato, CvePS, Cantidad, PU, UsuarioActual.CveUsuario, NoIdentificacion, LimitarCantidad, OCInterna, Observaciones) 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}",
|
||||
row("PS").ToString, row("Cantidad").ToString, row("PU").ToString, Cantidad, PU)
|
||||
guardarBitacora(msj)
|
||||
End If
|
||||
|
||||
row("Cantidad") = Cantidad
|
||||
row("CantidadContratada") = Cantidad
|
||||
row("PU") = PU
|
||||
row("Total") = Cantidad * PU
|
||||
row("CveUM") = CveUM
|
||||
row("UM") = DdlUM.SelectedItem.Text
|
||||
row("NoIdentificacion") = NoIdentificacion
|
||||
row("OCInterna") = OCInterna
|
||||
row("LimitarCantidad") = LimitarCantidad
|
||||
row("Observacion") = Observaciones
|
||||
|
||||
TmpDT.AcceptChanges()
|
||||
Alert("Cambios realizados correctamente.", TipoMensaje.MsgInformacion)
|
||||
RegistraScript("$('#ModalVentasAddPS').modal('hide')")
|
||||
Else
|
||||
Alert("Error al Actualizar Detalle", TipoMensaje.MsgError)
|
||||
End If
|
||||
ObjContratos.Dispose()
|
||||
|
||||
|
||||
|
||||
Gv.EditIndex = -1
|
||||
LbTotalGeneral.Text = TmpDT.FiltraParametros("CveTipoPresupuesto=2").SUM("Total").FormatoNumero
|
||||
LblImporte.Text = LbTotalGeneral.Text
|
||||
CargaGVPresupuestos(TmpDT.FiltraParametros("CveTipoPresupuesto=2"))
|
||||
|
||||
UpGV.Update()
|
||||
TxtCantidad.Text = ""
|
||||
TxtOCInterna.Text = ""
|
||||
TxtNoIdentificacionv.Text = ""
|
||||
TxtObservacionesDetalles.Text = ""
|
||||
TxtPU.Text = ""
|
||||
DdlClasificacionAdd.SelectedValue = "-1"
|
||||
LbTotalGeneral.Text = (LbTotalGeneral.Text.ToDouble + TotalRow).ToString.FormatoNumero
|
||||
LblImporte.Text = LbTotalGeneral.Text
|
||||
TxtCantidad.Focus()
|
||||
UpGral.Update()
|
||||
Else
|
||||
Alert("Ocurrio un error al agregar el detalle", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjContratos.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatosPresup()
|
||||
@@ -2070,6 +2153,7 @@ Partial Class Contratos_ContratoObra
|
||||
TmpDT.Rows.Remove(DbRow)
|
||||
CargaGVPresupuestos(TmpDT.FiltraParametros("CveTipoPresupuesto=2"))
|
||||
LbTotalGeneral.Text = Gv.Rows.Cast(Of GridViewRow)().Sum(Function(gvr) gvr.FCLabel("LtTotal").Text.ToDouble).ToString.FormatoNumero
|
||||
Alert("Detalle eliminado eliminado correctamente.")
|
||||
Else
|
||||
Alert("Ocurrió un error al eliminar el detalle (Producto/Servicio). Por favor vuelva a intentar", TipoMensaje.MsgError)
|
||||
End If
|
||||
@@ -2101,47 +2185,111 @@ Partial Class Contratos_ContratoObra
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnAgregarDetalleInsumos_Click(sender As Object, e As EventArgs)
|
||||
Dim Row As DataRow = TmpDT.NewRow()
|
||||
Row("Cantidad") = 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("Total") = (TxtCantidadInsumos.Text.ToDouble * TxtPUInsumos.Text.ToDouble).FormatoNumero
|
||||
Row("CveTipoPresupuesto") = 1
|
||||
Row("NoIdentificacion") = TxtNoIdentificacionvInsumos.Text.Trim
|
||||
Row("LimitarCantidad") = If(ChkLimitar.Checked, 1, 0)
|
||||
|
||||
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")), "") 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)
|
||||
If CveContratoDetalleEditar = -1 Then
|
||||
|
||||
Dim Row As DataRow = TmpDT.NewRow()
|
||||
Row("Cantidad") = 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("Total") = (TxtCantidadInsumos.Text.ToDouble * TxtPUInsumos.Text.ToDouble).FormatoNumero
|
||||
Row("CveTipoPresupuesto") = 1
|
||||
Row("NoIdentificacion") = TxtNoIdentificacionvInsumos.Text.Trim
|
||||
Row("LimitarCantidad") = If(ChkLimitarInsumos.Checked, 1, 0)
|
||||
|
||||
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")), "") 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)
|
||||
Dim TotalRow = Row("Total").ToString.ToDouble
|
||||
|
||||
CargaGVPresupuestosInsumos(TmpDT.FiltraParametros("CveTipoPresupuesto=1"))
|
||||
|
||||
UpGVInsumos.Update()
|
||||
LimpiarModalControl()
|
||||
LbTotalGeneralInsumos.Text = (LbTotalGeneralInsumos.Text.ToDouble + TotalRow).ToString.FormatoNumero
|
||||
'LblImporte.Text = LbTotalGeneral.Text
|
||||
TxtCantidadInsumos.Focus()
|
||||
UpGral.Update()
|
||||
|
||||
|
||||
If Not ChkContinualAgregandoControl.Checked Then
|
||||
RegistraScript("$('#ModalControlAddPS').modal('hide')")
|
||||
End If
|
||||
|
||||
Else
|
||||
Alert("Ocurrio un error al agregar el detalle", TipoMensaje.MsgError)
|
||||
End If
|
||||
Row("CveContratoDetalle") = ObjContratos.DtResultados.Rows(0)("CveContratoDetalle")
|
||||
TmpDT.Rows.Add(Row)
|
||||
Dim TotalRow = Row("Total").ToString.ToDouble
|
||||
|
||||
ObjContratos.Dispose()
|
||||
|
||||
Else
|
||||
|
||||
Dim Cantidad, PU As Double
|
||||
Dim CvePS, CveUM As Integer
|
||||
Dim NoIdentificacion As String = ""
|
||||
Dim LimitarCantidad As Boolean
|
||||
|
||||
Cantidad = TxtCantidadInsumos.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 ObjContratos As New ClsContratos
|
||||
If ObjContratos.UpdateContratosDetalle(CveContratoDetalleEditar, CveContrato, CvePS, Cantidad, PU, UsuarioActual.CveUsuario, NoIdentificacion, LimitarCantidad, "") 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}",
|
||||
row("PS").ToString, row("Cantidad").ToString, row("PU").ToString, Cantidad, PU)
|
||||
guardarBitacora(msj)
|
||||
End If
|
||||
|
||||
row("Cantidad") = Cantidad
|
||||
row("CantidadContratada") = Cantidad
|
||||
row("PU") = PU
|
||||
row("Total") = Cantidad * PU
|
||||
row("CveUM") = CveUM
|
||||
row("UM") = DdlUMInsumos.SelectedItem.Text
|
||||
row("NoIdentificacion") = NoIdentificacion
|
||||
row("LimitarCantidad") = LimitarCantidad
|
||||
TmpDT.AcceptChanges()
|
||||
Alert("Cambios realizados correctamente.", TipoMensaje.MsgInformacion)
|
||||
RegistraScript("$('#ModalControlAddPS').modal('hide')")
|
||||
Else
|
||||
Alert("Error al Actualizar Detalle", TipoMensaje.MsgError)
|
||||
End If
|
||||
ObjContratos.Dispose()
|
||||
|
||||
|
||||
GvInsumos.EditIndex = -1
|
||||
LbTotalGeneralInsumos.Text = TmpDT.FiltraParametros("CveTipoPresupuesto=1").SUM("Total").FormatoNumero
|
||||
CargaGVPresupuestosInsumos(TmpDT.FiltraParametros("CveTipoPresupuesto=1"))
|
||||
|
||||
UpGVInsumos.Update()
|
||||
TxtCantidadInsumos.Text = ""
|
||||
TxtPUInsumos.Text = ""
|
||||
DdlClasificacionAddInsumos.SelectedValue = "-1"
|
||||
LbTotalGeneralInsumos.Text = (LbTotalGeneralInsumos.Text.ToDouble + TotalRow).ToString.FormatoNumero
|
||||
'LblImporte.Text = LbTotalGeneral.Text
|
||||
TxtCantidadInsumos.Focus()
|
||||
UpGral.Update()
|
||||
Else
|
||||
Alert("Ocurrio un error al agregar el detalle", TipoMensaje.MsgError)
|
||||
|
||||
End If
|
||||
|
||||
ObjContratos.Dispose()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
#Region "GV PRESUPUESTOS"
|
||||
@@ -2251,7 +2399,8 @@ Partial Class Contratos_ContratoObra
|
||||
If ObjContratos.RemoveContratosDetalle(CveContratoDetalle, CveContrato) Then
|
||||
TmpDT.Rows.Remove(DbRow)
|
||||
CargaGVPresupuestosInsumos(TmpDT.FiltraParametros("CveTipoPresupuesto=1"))
|
||||
LbTotalGeneralInsumos.Text = GvInsumos.Rows.Cast(Of GridViewRow)().Sum(Function(gvr) gvr.FCLiteral("LtTotal").Text.ToDouble).ToString.FormatoNumero
|
||||
LbTotalGeneralInsumos.Text = GvInsumos.Rows.Cast(Of GridViewRow)().Sum(Function(gvr) gvr.FCLabel("LtTotal").Text.ToDouble).ToString.FormatoNumero
|
||||
Alert("Detalle eliminado eliminado correctamente.")
|
||||
Else
|
||||
Alert("Ocurrió un error al eliminar el detalle (Producto/Servicio). Por favor vuelva a intentar", TipoMensaje.MsgError)
|
||||
End If
|
||||
@@ -2284,7 +2433,7 @@ Partial Class Contratos_ContratoObra
|
||||
Row("Total") = (TxtCantidadInt.Text.ToDouble * TxtPUInt.Text.ToDouble).FormatoNumero
|
||||
Row("CveTipoPresupuesto") = 1
|
||||
Row("NoIdentificacion") = TxtNoIdentificacionv.Text.Trim
|
||||
Row("LimitarCantidad") = ChkLimitar.Checked
|
||||
Row("LimitarCantidad") = False 'ChkLimitar.Checked <-- Estaba usando un checkbox de un logar muy diferente a donde esta ese formilario, posiblemente se copio codigo y se fue por equivocacion
|
||||
|
||||
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, Row("LimitarCantidad").ToString.ToEntero = 1, "") Then
|
||||
@@ -4408,6 +4557,473 @@ Partial Class Contratos_ContratoObra
|
||||
|
||||
|
||||
|
||||
Property ModalVentasPSAdd As Boolean
|
||||
Get
|
||||
If ViewState("ModalVentasAdd") Is Nothing Then
|
||||
Return False
|
||||
Else
|
||||
Return Boolean.Parse(ViewState("ModalVentasAdd").ToString)
|
||||
End If
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("ModalVentasAdd") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Property ModalControlPSAdd As Boolean
|
||||
Get
|
||||
If ViewState("ModalControlPSAdd") Is Nothing Then
|
||||
Return False
|
||||
Else
|
||||
Return Boolean.Parse(ViewState("ModalControlPSAdd").ToString)
|
||||
End If
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("ModalControlPSAdd") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property Carga As Boolean
|
||||
Get
|
||||
If ViewState("ModalControlPSAdd") Is Nothing Then
|
||||
Return False
|
||||
Else
|
||||
Return Boolean.Parse(ViewState("ModalControlPSAdd").ToString)
|
||||
End If
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("ModalControlPSAdd") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Enum EnumTipoCargaPresupuesto
|
||||
Ventas
|
||||
Control
|
||||
End Enum
|
||||
|
||||
Property TipoCargaPresupuesto As EnumTipoCargaPresupuesto
|
||||
Get
|
||||
If ViewState("TipoCargaPresupuesto") Is Nothing Then
|
||||
Return EnumTipoCargaPresupuesto.Ventas
|
||||
Else
|
||||
Return DirectCast(ViewState("TipoCargaPresupuesto"), EnumTipoCargaPresupuesto)
|
||||
End If
|
||||
End Get
|
||||
Set(value As EnumTipoCargaPresupuesto)
|
||||
ViewState("TipoCargaPresupuesto") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Property CveContratoDetalleEditar As Integer
|
||||
Get
|
||||
|
||||
If ViewState("CveContratoDetalleEditar") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return ViewState("CveContratoDetalleEditar").ToString.ToEntero
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveContratoDetalleEditar") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Sub LnkModalAddPresupuestoVentas_Click(sender As Object, e As EventArgs)
|
||||
|
||||
LnlModalcargaPresupuestoTitulo.Text = "Carga Presupuesto Ventas"
|
||||
UpModalCargaPresupuesto.Update()
|
||||
RegistraScript("$('#ModalUploadPresupuesto').modal('show')")
|
||||
TipoCargaPresupuesto = EnumTipoCargaPresupuesto.Ventas
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkModalAddPresupuestoControl_Click(sender As Object, e As EventArgs)
|
||||
|
||||
LnlModalcargaPresupuestoTitulo.Text = "Carga Presupuesto Control"
|
||||
UpModalCargaPresupuesto.Update()
|
||||
RegistraScript("$('#ModalUploadPresupuesto').modal('show')")
|
||||
TipoCargaPresupuesto = EnumTipoCargaPresupuesto.Control
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkModalAddPSVentas_Click(sender As Object, e As EventArgs)
|
||||
|
||||
ModalVentasPSAdd = True
|
||||
ChkContinualAgregandoVentas.Visible = True
|
||||
ChkContinualAgregandoVentas.Checked = True
|
||||
LimpiarModalVentas()
|
||||
RegistraScript("$('#ModalVentasAddPS').modal('show')")
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkModalAddPSControl_Click(sender As Object, e As EventArgs)
|
||||
|
||||
ModalControlPSAdd = True
|
||||
ChkContinualAgregandoControl.Visible = True
|
||||
ChkContinualAgregandoControl.Checked = True
|
||||
LimpiarModalControl()
|
||||
RegistraScript("$('#ModalControlAddPS').modal('show')")
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub LnkEditarPresupuestoVentaDetalle_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||
LimpiarModalVentas()
|
||||
|
||||
'CveContratoDetalle,CveUM,CvePS,Cantidad,PU,CveTipoPresupuesto,CveClasificacion,CodigoPS,LimitarCantidad
|
||||
|
||||
CveContratoDetalleEditar = GvRow.DataKey("CveContratoDetalle").ToEntero
|
||||
|
||||
|
||||
TxtOCInterna.Text = GvRow.DataKey("OCInterna")
|
||||
TxtCantidad.Text = GvRow.DataKey("Cantidad").ToDouble.ToString
|
||||
|
||||
ChkLimitarVenta.Checked = Boolean.Parse(GvRow.DataKey("LimitarCantidad"))
|
||||
|
||||
TxtNoIdentificacionv.Text = GvRow.DataKey("NoIdentificacion").ToDouble.ToString
|
||||
DdlClasificacionAdd.SelectedValueExist(GvRow.DataKey("CveClasificacion").ToEntero)
|
||||
|
||||
DdlProductows.txtText.Value = GvRow.DataKey("PS").ToString
|
||||
DdlProductows.txtValue.Value = GvRow.DataKey("CvePS").ToString
|
||||
|
||||
DdlUM.DataSource = GlobalDTProductosServiciosEquivalencias(DdlProductows.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa)
|
||||
DdlUM.DataBind()
|
||||
DdlUM.SelectedValueExist(GvRow.DataKey("CveUM").ToDouble.ToString)
|
||||
|
||||
TxtPU.Text = GvRow.DataKey("PU").ToDouble.ToString
|
||||
|
||||
|
||||
|
||||
ModalVentasPSAdd = False
|
||||
ChkContinualAgregandoVentas.Visible = False
|
||||
ChkContinualAgregandoVentas.Checked = False
|
||||
|
||||
|
||||
RegistraScript("$('#ModalVentasAddPS').modal('show')")
|
||||
End Sub
|
||||
Protected Sub LnkEditarPresupuestoControlDetalle_Click(sender As Object, e As EventArgs)
|
||||
Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||
LimpiarModalControl()
|
||||
|
||||
CveContratoDetalleEditar = gvRow.DataKey("CveContratoDetalle").ToEntero
|
||||
|
||||
TxtCantidadInsumos.Text = gvRow.DataKey("Cantidad").ToDouble.ToString
|
||||
ChkLimitarInsumos.Checked = Boolean.Parse(gvRow.DataKey("LimitarCantidad"))
|
||||
TxtNoIdentificacionvInsumos.Text = gvRow.DataKey("NoIdentificacion")
|
||||
|
||||
DdlClasificacionAddInsumos.SelectedValueExist(gvRow.DataKey("CveClasificacion").ToEntero)
|
||||
|
||||
DdlProductowsInsumos.txtText.Value = gvRow.DataKey("PS").ToString
|
||||
DdlProductowsInsumos.txtValue.Value = gvRow.DataKey("CvePS").ToString
|
||||
|
||||
|
||||
DdlUMInsumos.DataSource = GlobalDTProductosServiciosEquivalencias(DdlProductowsInsumos.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa)
|
||||
DdlUMInsumos.DataBind()
|
||||
DdlUMInsumos.SelectedValueExist(gvRow.DataKey("CveUM").ToDouble.ToString)
|
||||
|
||||
|
||||
|
||||
TxtPUInsumos.Text = gvRow.DataKey("PU").ToDouble.ToString
|
||||
|
||||
|
||||
|
||||
ModalControlPSAdd = False
|
||||
ChkContinualAgregandoControl.Visible = False
|
||||
ChkContinualAgregandoControl.Checked = False
|
||||
|
||||
RegistraScript("$('#ModalControlAddPS').modal('show')")
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub LimpiarModalVentas()
|
||||
|
||||
TxtOCInterna.Text = ""
|
||||
TxtCantidad.Text = ""
|
||||
ChkLimitarVenta.Checked = False
|
||||
TxtNoIdentificacionv.Text = ""
|
||||
DdlClasificacionAdd.SelectedValueExist(-1)
|
||||
DdlProductows.txtText.Value = ""
|
||||
DdlProductows.txtValue.Value = ""
|
||||
DdlUM.SelectedValueExist(-1)
|
||||
TxtPU.Text = ""
|
||||
|
||||
|
||||
If ModalVentasPSAdd = True Then
|
||||
LtlModalVentasPSTitulo.Text = "Agregar Producto Presupuesto de Ventas"
|
||||
Else
|
||||
LtlModalVentasPSTitulo.Text = "Editar Producto Presupuesto de Ventas"
|
||||
End If
|
||||
|
||||
|
||||
UpModalVentasAddPS.Update()
|
||||
|
||||
End Sub
|
||||
Private Sub LimpiarModalControl()
|
||||
|
||||
|
||||
|
||||
TxtCantidadInsumos.Text = ""
|
||||
ChkLimitarInsumos.Checked = False
|
||||
TxtNoIdentificacionvInsumos.Text = ""
|
||||
|
||||
DdlClasificacionAddInsumos.SelectedValueExist(-1)
|
||||
DdlProductowsInsumos.txtText.Value = ""
|
||||
DdlProductowsInsumos.txtValue.Value = ""
|
||||
DdlUMInsumos.SelectedValueExist(-1)
|
||||
TxtPUInsumos.Text = ""
|
||||
|
||||
|
||||
If ModalControlPSAdd = True Then
|
||||
LtlModalControlPSTitulo.Text = "Agregar Producto Presupuesto Control"
|
||||
Else
|
||||
LtlModalControlPSTitulo.Text = "Editar Producto Presupuesto Control"
|
||||
End If
|
||||
|
||||
UpModalControlAddPS.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Protected Sub BtnCargaPresupuesto_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim DTCargaPresupuesto As New DataTable
|
||||
DTCargaPresupuesto = CargaPreSupuestoExcel()
|
||||
|
||||
If DTCargaPresupuesto.Rows.Count > 0 Then
|
||||
ProcesaDatosCargaPresupuesto(DTCargaPresupuesto)
|
||||
Else
|
||||
Alert("No se encintraron partidas en el documento", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Function CargaPreSupuestoExcel() As DataTable
|
||||
|
||||
Dim FileExtension As String = "-1"
|
||||
Dim Filesgral As List(Of Archivo) = TxtModalCargaPresupuesto.getfiles().Archivos
|
||||
Dim Filename As String = ""
|
||||
Dim DTPS = New DataTable
|
||||
|
||||
For Each fileItem As Archivo In Filesgral
|
||||
|
||||
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)
|
||||
Dim workbook = ExcelFile.Load(fileItem.FileUrl)
|
||||
Dim worksheet = workbook.Worksheets(0)
|
||||
DTPS = worksheet.CreateDataTable(New CreateDataTableOptions() With
|
||||
{
|
||||
.ColumnHeaders = True,
|
||||
.StartRow = 0,
|
||||
.NumberOfColumns = 4,
|
||||
.NumberOfRows = worksheet.Rows.Count,
|
||||
.Resolution = ColumnTypeResolution.AutoPreferStringCurrentCulture
|
||||
})
|
||||
|
||||
Next
|
||||
|
||||
TxtModalCargaPresupuesto.Text = ""
|
||||
|
||||
RegistraScript("$('#ModalUploadPresupuesto').modal('hide')")
|
||||
|
||||
UpModalCargaPresupuesto.Update()
|
||||
|
||||
Return DTPS
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
Private Sub ProcesaDatosCargaPresupuesto(DTPresupuesto 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)
|
||||
Dim CvePS As Integer
|
||||
Dim CveUM As Integer
|
||||
|
||||
If StrArray.Length > 0 Then
|
||||
If CBool(StrArray(0)) = True Then
|
||||
CvePS = StrArray(1).ToEntero
|
||||
Else
|
||||
RowNoEncontrados &= StrArray(1) & "<\BR>"
|
||||
End If
|
||||
End If
|
||||
|
||||
If CvePS > 0 And DrowPS("Cantidad").ToString.ToDouble > 0 Then
|
||||
|
||||
CveUM = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimeroValor("CveUnidadMedida", "").ToString.ToEntero
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
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("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()
|
||||
|
||||
If RowNoEncontrados.Length > 0 Then
|
||||
Alert($"Productos no encontrados <br> {RowNoEncontrados} ")
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -205,7 +205,7 @@ public class TareasJam : IHttpHandler
|
||||
|
||||
|
||||
DataTable dtCloned = DTVentas.Clone();
|
||||
dtCloned.Columns[3].DataType = typeof(string);
|
||||
dtCloned.Columns[3].DataType = typeof(DateTime);
|
||||
|
||||
foreach (DataRow row in DTVentas.Rows)
|
||||
{
|
||||
@@ -215,7 +215,7 @@ public class TareasJam : IHttpHandler
|
||||
DTVentas = dtCloned;
|
||||
foreach (DataRow dRow in DTVentas.Rows)
|
||||
{
|
||||
string tmpDate = dRow[3].ToString().ToDate().ToString("yyyy/MM/dd");
|
||||
DateTime tmpDate = dRow[3].ToString().ToDate().ToString("yyyy/MM/dd").ToDate();
|
||||
dRow[3] = tmpDate;
|
||||
}
|
||||
|
||||
@@ -223,7 +223,7 @@ public class TareasJam : IHttpHandler
|
||||
|
||||
|
||||
dtCloned = DTAlmacenes.Clone();
|
||||
dtCloned.Columns[3].DataType = typeof(string);
|
||||
dtCloned.Columns[3].DataType = typeof(DateTime);
|
||||
|
||||
foreach (DataRow row in DTAlmacenes.Rows)
|
||||
{
|
||||
@@ -233,7 +233,7 @@ public class TareasJam : IHttpHandler
|
||||
DTAlmacenes = dtCloned;
|
||||
foreach (DataRow dRow in DTAlmacenes.Rows)
|
||||
{
|
||||
string tmpDate = dRow[3].ToString().ToDate().ToString("yyyy/MM/dd");
|
||||
DateTime tmpDate = dRow[3].ToString().ToDate().ToString("yyyy/MM/dd").ToDate();
|
||||
dRow[3] = tmpDate;
|
||||
}
|
||||
DTAlmacenes.AcceptChanges();
|
||||
@@ -249,8 +249,6 @@ public class TareasJam : IHttpHandler
|
||||
|
||||
if (!ErrorProceso)
|
||||
{
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
int count = 2;
|
||||
var wbVentas = new ClosedXML.Excel.XLWorkbook(FormatoVentas);
|
||||
@@ -261,7 +259,7 @@ public class TareasJam : IHttpHandler
|
||||
wsVentas.Cell(count, 1).Value = "'" + DRow["systemId"].ToString();
|
||||
wsVentas.Cell(count, 2).Value = DRow["Branch"].ToString();
|
||||
wsVentas.Cell(count, 3).Value = "'" + DRow["Code"].ToString();
|
||||
wsVentas.Cell(count, 4).Value = "'" + DRow["Sale Date"].ToString();
|
||||
wsVentas.Cell(count, 4).Value = DRow["Sale Date"].ToString();
|
||||
wsVentas.Cell(count, 5).Value = DRow["Quantity"].ToString();
|
||||
wsVentas.Cell(count, 6).Value = DRow["Amount"].ToString();
|
||||
wsVentas.Cell(count, 7).Value = DRow["Transaction ID"].ToString();
|
||||
@@ -279,7 +277,7 @@ public class TareasJam : IHttpHandler
|
||||
wsAlmacenes.Cell(count, 1).Value = "'" + DRow["Code"].ToString();
|
||||
wsAlmacenes.Cell(count, 2).Value = DRow["Quantity"].ToString();
|
||||
wsAlmacenes.Cell(count, 3).Value = DRow["Description"].ToString();
|
||||
wsAlmacenes.Cell(count, 4).Value = "'" + DRow["Stock Date"].ToString();
|
||||
wsAlmacenes.Cell(count, 4).Value = DRow["Stock Date"].ToString();
|
||||
count++;
|
||||
}
|
||||
wbAlmacenes.SaveAs(RutaAlmacenes);
|
||||
|
||||
@@ -21907,7 +21907,14 @@ Partial Class Ventas
|
||||
Dim Mensaje = UsuarioActual.Empresa.Funcionalidad(152)
|
||||
If Mensaje = "" Then Return 0
|
||||
|
||||
Dim Celular = ObjFactura.Cliente.CobranzaTelefono
|
||||
Dim Celular As String = ""
|
||||
|
||||
Try
|
||||
Celular = ObjFactura.Cliente.CobranzaTelefono
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
If Celular.Length <> 10 Then Return 3
|
||||
|
||||
'ARMA MENSAJE
|
||||
|
||||
Reference in New Issue
Block a user