Merge branch 'master' of http://agonzalez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -2688,77 +2688,88 @@ Partial Class Compras_Compras
|
||||
|
||||
TmpDT.Columns.Add("CveContrato", GetType(Integer))
|
||||
TmpDT.Columns.Add("DifPSSat", GetType(Integer))
|
||||
TmpDT.Columns.Add("CveContratoDetalle", GetType(Integer))
|
||||
TmpDT.Columns.Add("CveCultivoCuadroDetalle", GetType(Integer))
|
||||
|
||||
If Not TmpDT.Columns.Contains("CveContratoDetalle") Then
|
||||
TmpDT.Columns.Add("CveContratoDetalle", GetType(Integer))
|
||||
End If
|
||||
|
||||
|
||||
If Not TmpDT.Columns.Contains("CveCultivoCuadroDetalle") Then
|
||||
TmpDT.Columns.Add("CveCultivoCuadroDetalle", GetType(Integer))
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
GvPS.DataSource = TmpDT
|
||||
GvPS.DataBind()
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
CargaHidendsAC()
|
||||
End If
|
||||
|
||||
CalculaTotales(True)
|
||||
|
||||
If UsuarioActual.Empresa.UsaInventarios Then
|
||||
DtInv = TmpDT.FiltraParametros(String.Format("CveTipoPS = 2")).Copy
|
||||
|
||||
If dr("Inventario").ToString = "1" Then
|
||||
|
||||
CveMovimientoAlmacen = dr("CveMovimiento").ToString.ToEntero
|
||||
|
||||
Dim Inv As New ClsInventarios
|
||||
If Inv.GetMovimientosDetalle(dr("CveMovimiento").ToString.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
'Dim TempParametros = Encripta(String.Format("OP=Alm&CveMovimiento={0}", dr("CveMovimiento")))
|
||||
'ImgImprimirAlmacen.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", TempParametros)
|
||||
|
||||
ImgImprimirAlmacen.Visible = True
|
||||
ImgImprimirAlmacen.NavigateUrl = String.Format("/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}", dr("CveMovimiento"))
|
||||
|
||||
Dim drt As DataRow
|
||||
'actualizo el almacen
|
||||
For Each dri As DataRow In DtInv.Rows
|
||||
|
||||
drt = Inv.DtResultados.FiltroPrimero(String.Format("CvePS = {0} AND Cantidad = {1}", dri("CvePS"), dri("Cantidad")))
|
||||
If drt IsNot Nothing Then
|
||||
Dim TmpDr As DataRow = TmpDT.Select($"Consec = {dri("Consec").ToString.ToEntero}")(0) 'Charlie
|
||||
TmpDr("CveAlmacen") = drt("CveAlmacen") 'Charlie
|
||||
|
||||
dri("CveAlmacen") = drt("CveAlmacen")
|
||||
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
'Proceso Super Tramposo de Charlie
|
||||
If Inv.GetMovimientosDetalle(dr("CveMovimiento").ToString.ToEntero, UsuarioActual.CveEmpresa, CveCompra:=-123) Then
|
||||
Dim drt As DataRow
|
||||
For Each dri As DataRow In DtInv.Rows
|
||||
drt = Inv.DtResultados.FiltroPrimero(String.Format("CvePS = {0} AND Cantidad = {1}", dri("CvePS"), dri("Cantidad")))
|
||||
If drt IsNot Nothing Then
|
||||
Dim TmpDr As DataRow = TmpDT.Select($"Consec = {dri("Consec").ToString.ToEntero}")(0)
|
||||
TmpDr("CveAlmacen") = drt("CveAlmacen")
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
Inv.Dispose()
|
||||
GvPS.DataBind()
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
CargaHidendsAC()
|
||||
End If
|
||||
|
||||
CargaGvInv()
|
||||
CalculaTotales(True)
|
||||
|
||||
'Ocultamos "Recibir Aqui"
|
||||
GvInv.Columns(6).Visible = False
|
||||
GvInv.Columns(7).Visible = False
|
||||
If UsuarioActual.Empresa.UsaInventarios Then
|
||||
DtInv = TmpDT.FiltraParametros(String.Format("CveTipoPS = 2")).Copy
|
||||
|
||||
If dr("Inventario").ToString = "1" Then
|
||||
|
||||
CveMovimientoAlmacen = dr("CveMovimiento").ToString.ToEntero
|
||||
|
||||
Dim Inv As New ClsInventarios
|
||||
If Inv.GetMovimientosDetalle(dr("CveMovimiento").ToString.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
'Dim TempParametros = Encripta(String.Format("OP=Alm&CveMovimiento={0}", dr("CveMovimiento")))
|
||||
'ImgImprimirAlmacen.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", TempParametros)
|
||||
|
||||
ImgImprimirAlmacen.Visible = True
|
||||
ImgImprimirAlmacen.NavigateUrl = String.Format("/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}", dr("CveMovimiento"))
|
||||
|
||||
Dim drt As DataRow
|
||||
'actualizo el almacen
|
||||
For Each dri As DataRow In DtInv.Rows
|
||||
|
||||
drt = Inv.DtResultados.FiltroPrimero(String.Format("CvePS = {0} AND Cantidad = {1}", dri("CvePS"), dri("Cantidad")))
|
||||
If drt IsNot Nothing Then
|
||||
Dim TmpDr As DataRow = TmpDT.Select($"Consec = {dri("Consec").ToString.ToEntero}")(0) 'Charlie
|
||||
TmpDr("CveAlmacen") = drt("CveAlmacen") 'Charlie
|
||||
|
||||
dri("CveAlmacen") = drt("CveAlmacen")
|
||||
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
'Proceso Super Tramposo de Charlie
|
||||
If Inv.GetMovimientosDetalle(dr("CveMovimiento").ToString.ToEntero, UsuarioActual.CveEmpresa, CveCompra:=-123) Then
|
||||
Dim drt As DataRow
|
||||
For Each dri As DataRow In DtInv.Rows
|
||||
drt = Inv.DtResultados.FiltroPrimero(String.Format("CvePS = {0} AND Cantidad = {1}", dri("CvePS"), dri("Cantidad")))
|
||||
If drt IsNot Nothing Then
|
||||
Dim TmpDr As DataRow = TmpDT.Select($"Consec = {dri("Consec").ToString.ToEntero}")(0)
|
||||
TmpDr("CveAlmacen") = drt("CveAlmacen")
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
Inv.Dispose()
|
||||
|
||||
End If
|
||||
|
||||
CargaGvInv()
|
||||
|
||||
'Ocultamos "Recibir Aqui"
|
||||
GvInv.Columns(6).Visible = False
|
||||
GvInv.Columns(7).Visible = False
|
||||
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
DdlTipoComprobante.Enabled = False
|
||||
DdlTipoComprobante.Enabled = False
|
||||
DdlTipoComprobante.SelectedValue = dr("TipoDocto").ToString
|
||||
If dr("TipoDocto").ToString = "Fac" Then
|
||||
ChkAplicaNotaCredito.Enabled = True
|
||||
|
||||
@@ -37,208 +37,222 @@
|
||||
<link href="/Metronic/assets/global/plugins/dropzone/css/dropzone.css" rel="stylesheet"/>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
|
||||
|
||||
Avance de Contrato
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
<ajax:TabContainer ID="Tab" runat="server" Width="100%" CssClass="tabBodyOverride" ActiveTabIndex="0">
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UPPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" ValidationGroup="GrpConsultar" Text="Consultar" class="btn btn-default" />
|
||||
</div>
|
||||
<div class="titlefiltros caption" style="position: relative;">
|
||||
<asp:UpdatePanel class="row" ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<label class="col-md-1 truncate">Contrato:</label>
|
||||
<div class="col-md-6 col-lg-4">
|
||||
<div class="ddls">
|
||||
<asp:DropDownList ID="DdlContratos" runat="server" DataTextField="ContratoCompleto" DataValueField="CveContrato" Class=" form-control input-inline select2me" Width="100%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2 col-lg-2 " style="display: none!important">
|
||||
<asp:DropDownList ID="DdlAvances" runat="server" DataTextField="Name" DataValueField="Fecha" Class=" form-control input-inline select2me" Width="100%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-1" style="text-align: right!important">
|
||||
Fecha:
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFecha" runat="server" CssClass="form-control" CausesValidation="true" Style="width: 118px" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgFecha" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" TargetControlID="TxtFecha" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFecha" TargetControlID="TxtFecha" PopupButtonID="ImgFecha" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFecha" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFecha" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFecha1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFecha" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFecha2" runat="server" HighlightCssClass="vco" TargetControlID="CVFecha" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-6" style="text-align:right!important">
|
||||
<div style="display: inline-block">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", Gv.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px; height: 25px; border-color: #89C4F4;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", Gv.ClientID) %>" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<table class="table table-striped Widthall">
|
||||
<tr>
|
||||
<th style="width: 300px;"></th>
|
||||
<th style="width: 100px;"></th>
|
||||
<th style="width: 100px;"></th>
|
||||
<th style="width: 100px;"></th>
|
||||
<th style="width: 100px;"></th>
|
||||
<th style="width: 100px;"></th>
|
||||
<th style="width: 100px;"></th>
|
||||
<th style="width: 100px;"></th>
|
||||
<th style="width: 100px;"></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Producto / Servicio</th>
|
||||
<th colspan="2">Avance</th>
|
||||
<th colspan="2">Ultimo Avance</th>
|
||||
<th colspan="2">Levantamiento</th>
|
||||
<th style="text-align: right;">Anexo</th>
|
||||
<th style="text-align: right;"></th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<asp:GridView ID="Gv" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron partidas para levantar avance"
|
||||
DataKeyNames="CveFamilias,CveSubFamilias,CveContratoDetalle,PS,Cantidad,Importe,Cantidad_Ultima,Importe_Ultima,PU,CantidadMax,Avance"
|
||||
CssClass="table GVEstimacion table-advance table-hover mysmallbtn" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="Producto" runat="server" CssClass="Texto" Text='<%# Eval("PS")%>' Visible="false"></asp:LinkButton>
|
||||
<asp:Label ID="LinkButton1" runat="server" CssClass="Texto" Text='<%# Eval("PS")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="UM">
|
||||
<ItemTemplate>
|
||||
<span><%# Eval("Abreviatura")%></span>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Cantidad">
|
||||
<ItemTemplate>
|
||||
<span><%# Eval("Cantidad", "{0:N2}")%></span>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Importe">
|
||||
<ItemTemplate>
|
||||
<span><%# Eval("Importe", "{0:N2}")%></span>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cantidad">
|
||||
<ItemTemplate>
|
||||
<span><%# Eval("Cantidad_Ultima", "{0:N2}")%></span>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Importe">
|
||||
<ItemTemplate>
|
||||
<span><%# Eval("Importe_Ultima", "{0:N2}")%></span>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cantidad">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtCantidad" Text="" CssClass="txtcant" onkeyup="ValidateCant(this)" type="number" step="any" data-cantidad='<%# Eval("CantidadMax")%>' data-pu='<%# Eval("PU")%>' data-cve='<%# Eval("CveContratoDetalle") %>' Width="90" runat="server"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Importe">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtImporte" Text="" data-cve='<%# Eval("CveContratoDetalle") %>' CssClass="txtimporte" type="number" step="any" Width="90" runat="server"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText=" ">
|
||||
<ItemTemplate>
|
||||
|
||||
<asp:LinkButton ID="LnkAnexo" runat="server" OnClick="GetAnexos" AlternateText="Agregar Anexo" CssClass="btn btn-circle btn-sm btn-success anexo" Text="<i class='fa fa-folder'></i>" />
|
||||
<asp:LinkButton runat="server" CssClass="btn btn-circle btn-sm btn-success" ID="LnkModalDropzone" Visible="false"> <i class='fa fa-plus'></i></asp:LinkButton>
|
||||
|
||||
<div runat="server" id="ModalAnexoEvidencia" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Cargar Evidencia</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
<div style="text-align: left">
|
||||
<asp:TextBox ID="TXTAnexo" CssClass="ADSdropzone hidden" data-maxFile="10" Text="" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkGuardarAvance" Text="Guardar" CssClass="btn btn-primary" runat="server" OnClick="LnkGuardarAvance_Click" Visible="false" Height="30px" ValidationGroup="GrpGuardar"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="text-center" runat="server" visible="false">
|
||||
<asp:Button ID="BtnGuardar" CssClass="btn btn-primary" runat="server" Text="Guardar" Visible="false" ValidationGroup="GrpGuardar" />
|
||||
</div>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
|
||||
<%-- <ajax:TabContainer ID="Tab" runat="server" Width="100%" CssClass="tabBodyOverride" ActiveTabIndex="0">
|
||||
|
||||
<ajax:TabPanel ID="TabAvance" runat="server" HeaderText="Avance">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel ID="UPPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" ValidationGroup="GrpConsultar" Text="Consultar" class="btn btn-default" />
|
||||
</div>
|
||||
<div class="titlefiltros caption" style="position: relative;">
|
||||
<asp:UpdatePanel class="row" ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<label class="col-md-1 truncate">Contrato:</label>
|
||||
<div class="col-md-6 col-lg-4">
|
||||
<div class="ddls">
|
||||
<asp:DropDownList ID="DdlContratos" runat="server" DataTextField="ContratoCompleto" DataValueField="CveContrato" Class=" form-control input-inline select2me" Width="100%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2 col-lg-2 " style="display:none!important">
|
||||
<asp:DropDownList ID="DdlAvances" runat="server" DataTextField="Name" DataValueField="Fecha" Class=" form-control input-inline select2me" Width="100%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-1" style="text-align:right!important">
|
||||
Fecha:
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFecha" runat="server" CssClass="form-control" CausesValidation="true" Style="width: 118px" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgFecha" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" TargetControlID="TxtFecha" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFecha" TargetControlID="TxtFecha" PopupButtonID="ImgFecha" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFecha" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFecha" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFecha1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFecha" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFecha2" runat="server" HighlightCssClass="vco" TargetControlID="CVFecha" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-6" style="text-align:right">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<table class="table table-striped Widthall">
|
||||
<tr>
|
||||
<th style="width: 300px;"></th>
|
||||
<th style="width: 100px;"></th>
|
||||
<th style="width: 100px;"></th>
|
||||
<th style="width: 100px;"></th>
|
||||
<th style="width: 100px;"></th>
|
||||
<th style="width: 100px;"></th>
|
||||
<th style="width: 100px;"></th>
|
||||
<th style="width: 100px;"></th>
|
||||
<th style="width: 100px;"></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Producto / Servicio</th>
|
||||
<th colspan="2">Avance</th>
|
||||
<th colspan="2">Ultimo Avance</th>
|
||||
<th colspan="2">Levantamiento</th>
|
||||
<th style="text-align: right;">Anexo</th>
|
||||
<th style="text-align: right;"> </th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<asp:GridView ID="Gv" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron partidas para levantar avance"
|
||||
DataKeyNames="CveFamilias,CveSubFamilias,CveContratoDetalle,PS,Cantidad,Importe,Cantidad_Ultima,Importe_Ultima,PU,CantidadMax,Avance"
|
||||
CssClass="table GVEstimacion table-advance table-hover" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="Producto" runat="server" CssClass="Texto" Text='<%# Eval("PS")%>' Visible="false"></asp:LinkButton>
|
||||
<asp:Label ID="LinkButton1" runat="server" CssClass="Texto" Text='<%# Eval("PS")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="UM">
|
||||
<ItemTemplate>
|
||||
<span><%# Eval("Abreviatura")%></span>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Cantidad">
|
||||
<ItemTemplate>
|
||||
<span><%# Eval("Cantidad", "{0:N2}")%></span>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Importe">
|
||||
<ItemTemplate>
|
||||
<span><%# Eval("Importe", "{0:N2}")%></span>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cantidad">
|
||||
<ItemTemplate>
|
||||
<span><%# Eval("Cantidad_Ultima", "{0:N2}")%></span>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Importe">
|
||||
<ItemTemplate>
|
||||
<span><%# Eval("Importe_Ultima", "{0:N2}")%></span>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cantidad">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtCantidad" Text="" CssClass="txtcant" onkeyup="ValidateCant(this)" type="number" step="any" data-cantidad='<%# Eval("CantidadMax")%>' data-pu='<%# Eval("PU")%>' data-cve='<%# Eval("CveContratoDetalle") %>' Width="90" runat="server"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Importe">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtImporte" Text="" data-cve='<%# Eval("CveContratoDetalle") %>' CssClass="txtimporte" type="number" step="any" Width="90" runat="server"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText=" ">
|
||||
<ItemTemplate>
|
||||
|
||||
<asp:LinkButton ID="LnkAnexo" runat="server" OnClick="GetAnexos" AlternateText="Agregar Anexo" CssClass="btn btn-circle btn-sm btn-success anexo" Text="<i class='fa fa-folder'></i>" />
|
||||
<asp:LinkButton runat="server" CssClass="btn btn-circle btn-sm btn-success" ID="LnkModalDropzone" Visible="false"> <i class='fa fa-plus'></i></asp:LinkButton>
|
||||
|
||||
<div runat="server" id="ModalAnexoEvidencia" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Cargar Evidencia</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
<div style="text-align: left">
|
||||
<asp:TextBox ID="TXTAnexo" CssClass="ADSdropzone hidden" data-maxFile="10" Text="" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkGuardarAvance" Text="Guardar" CssClass="btn btn-primary" runat="server" OnClick="LnkGuardarAvance_Click" Visible="false" ValidationGroup="GrpGuardar" ></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="text-center" runat="server" visible ="false">
|
||||
<asp:Button id="BtnGuardar" CssClass="btn btn-primary" runat="server" Text="Guardar" Visible="false" ValidationGroup="GrpGuardar" />
|
||||
</div>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
@@ -341,7 +355,7 @@
|
||||
</ajax:TabPanel>
|
||||
|
||||
|
||||
</ajax:TabContainer>
|
||||
</ajax:TabContainer>--%>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -138,8 +138,8 @@ Partial Class Contratos_ContratoAvance
|
||||
DdlContratos.DataSource = GlobalDTContratos.FiltraParametros(String.Format($"CveContratoTipo in (30,31) AND CveEmpresa = {UsuarioActual.CveEmpresa}"))
|
||||
DdlContratos.DataBind()
|
||||
|
||||
DDlContratosEstimaciones.DataSource = GlobalDTContratos.FiltraParametros(String.Format($"CveContratoTipo in (30,31) AND CveEmpresa = {UsuarioActual.CveEmpresa}"))
|
||||
DDlContratosEstimaciones.DataBind()
|
||||
'DDlContratosEstimaciones.DataSource = GlobalDTContratos.FiltraParametros(String.Format($"CveContratoTipo in (30,31) AND CveEmpresa = {UsuarioActual.CveEmpresa}"))
|
||||
'DDlContratosEstimaciones.DataBind()
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -207,7 +207,7 @@ Partial Class Contratos_ContratoAvance
|
||||
If e.Row.DataKey("CveContratoDetalle").ToEntero > 0 Then
|
||||
|
||||
Dim LnkAnexo As LinkButton = e.Row.FCLinkButton("LnkModalDropzone")
|
||||
'LnkAnexo.Visible = True
|
||||
|
||||
Dim DVAnexo As Control = DirectCast(e.Row.FindControl("ModalAnexoEvidencia"), Control)
|
||||
LnkAnexo.OnClientClick = $" $('#{DVAnexo.ClientID}').modal('show'); return false;"
|
||||
|
||||
@@ -220,9 +220,20 @@ Partial Class Contratos_ContratoAvance
|
||||
Dim LnkGuardarAvance As LinkButton = e.Row.FCLinkButton("LnkGuardarAvance")
|
||||
LnkGuardarAvance.Visible = True
|
||||
|
||||
|
||||
If e.Row.DataKey("CantidadMax").ToDouble = 0 Then
|
||||
LnkAnexo.Visible = False
|
||||
e.Row.FCTextBox("TxtCantidad").Visible = False
|
||||
LnkGuardarAvance.Visible = False
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub GetAnexos(sender As Object, e As System.EventArgs)
|
||||
@@ -432,120 +443,120 @@ Partial Class Contratos_ContratoAvance
|
||||
#Region "ESTIMACION"
|
||||
|
||||
|
||||
Private Sub CargaAvancesParaEstimar()
|
||||
CveContratoEstimacion = -1
|
||||
'Private Sub CargaAvancesParaEstimar()
|
||||
' CveContratoEstimacion = -1
|
||||
|
||||
Dim ObjContratos As New ClsContratos()
|
||||
Dim DTEstimaciones As New DataTable
|
||||
Dim NumeroEstimacionActual As Integer = 0
|
||||
' Dim ObjContratos As New ClsContratos()
|
||||
' Dim DTEstimaciones As New DataTable
|
||||
' Dim NumeroEstimacionActual As Integer = 0
|
||||
|
||||
If ObjContratos.GetContratosAvanceEstimacion(DDlContratosEstimaciones.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, -1) Then
|
||||
DTEstimaciones = ObjContratos.DtResultados
|
||||
' If ObjContratos.GetContratosAvanceEstimacion(DDlContratosEstimaciones.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, -1) Then
|
||||
' DTEstimaciones = ObjContratos.DtResultados
|
||||
|
||||
CveContratoEstimacion = DDlContratosEstimaciones.SelectedValue.ToEntero
|
||||
' CveContratoEstimacion = DDlContratosEstimaciones.SelectedValue.ToEntero
|
||||
|
||||
|
||||
End If
|
||||
' End If
|
||||
|
||||
|
||||
ObjContratos.Dispose()
|
||||
' ObjContratos.Dispose()
|
||||
|
||||
|
||||
If DTEstimaciones.Rows.Count > 0 Then
|
||||
GvEstimaciones.DataSource = DTEstimaciones
|
||||
BtnGuardarEstimacion.Visible = True
|
||||
Else
|
||||
GvEstimaciones.DataSource = Nothing
|
||||
BtnGuardarEstimacion.Visible = False
|
||||
End If
|
||||
GvEstimaciones.DataBind()
|
||||
' If DTEstimaciones.Rows.Count > 0 Then
|
||||
' GvEstimaciones.DataSource = DTEstimaciones
|
||||
' BtnGuardarEstimacion.Visible = True
|
||||
' Else
|
||||
' GvEstimaciones.DataSource = Nothing
|
||||
' BtnGuardarEstimacion.Visible = False
|
||||
' End If
|
||||
' GvEstimaciones.DataBind()
|
||||
|
||||
UpEstimaciones.Update()
|
||||
End Sub
|
||||
' UpEstimaciones.Update()
|
||||
'End Sub
|
||||
|
||||
Private Sub BtnConsultarEstimaciones_Click(sender As Object, e As EventArgs) Handles BtnConsultarEstimaciones.Click
|
||||
'Private Sub BtnConsultarEstimaciones_Click(sender As Object, e As EventArgs) Handles BtnConsultarEstimaciones.Click
|
||||
|
||||
CargaAvancesParaEstimar()
|
||||
' CargaAvancesParaEstimar()
|
||||
|
||||
End Sub
|
||||
'End Sub
|
||||
|
||||
Private Sub GvEstimaciones_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEstimaciones.RowDataBound
|
||||
'Private Sub GvEstimaciones_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEstimaciones.RowDataBound
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
' If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.DBCampo("CveContratoDetalle").ToString.ToEntero = 0 Then
|
||||
' If e.Row.DBCampo("CveContratoDetalle").ToString.ToEntero = 0 Then
|
||||
|
||||
|
||||
If e.Row.DBCampo("CveSubFamilias").ToString.ToEntero = 0 Then
|
||||
If e.Row.DBCampo("CveFamilias").ToString.ToEntero = 0 Then
|
||||
e.Row.CssClass = "SubTotales"
|
||||
Else
|
||||
e.Row.CssClass = "SubTotales2"
|
||||
End If
|
||||
Else
|
||||
e.Row.CssClass = "SubTotales3"
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
' If e.Row.DBCampo("CveSubFamilias").ToString.ToEntero = 0 Then
|
||||
' If e.Row.DBCampo("CveFamilias").ToString.ToEntero = 0 Then
|
||||
' e.Row.CssClass = "SubTotales"
|
||||
' Else
|
||||
' e.Row.CssClass = "SubTotales2"
|
||||
' End If
|
||||
' Else
|
||||
' e.Row.CssClass = "SubTotales3"
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
|
||||
End Sub
|
||||
'End Sub
|
||||
|
||||
Private Sub BtnGuardarEstimacion_Click(sender As Object, e As EventArgs) Handles BtnGuardarEstimacion.Click
|
||||
'Private Sub BtnGuardarEstimacion_Click(sender As Object, e As EventArgs) Handles BtnGuardarEstimacion.Click
|
||||
|
||||
CveEstimacionNueva = -1
|
||||
NuemeroEstimacionNuevo = -1
|
||||
' CveEstimacionNueva = -1
|
||||
' NuemeroEstimacionNuevo = -1
|
||||
|
||||
Dim ObjContratos As New ClsContratos()
|
||||
Dim ErrorProceso As Boolean = False
|
||||
' Dim ObjContratos As New ClsContratos()
|
||||
' Dim ErrorProceso As Boolean = False
|
||||
|
||||
ObjContratos.IniciaTransacSQL()
|
||||
' ObjContratos.IniciaTransacSQL()
|
||||
|
||||
|
||||
If ObjContratos.AddContratosAvanceEstimacion(CveContratoEstimacion, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
' If ObjContratos.AddContratosAvanceEstimacion(CveContratoEstimacion, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
CveEstimacionNueva = ObjContratos.CveEstimacionNueva
|
||||
NuemeroEstimacionNuevo = ObjContratos.NumeroEstimacionNueva
|
||||
' CveEstimacionNueva = ObjContratos.CveEstimacionNueva
|
||||
' NuemeroEstimacionNuevo = ObjContratos.NumeroEstimacionNueva
|
||||
|
||||
For Each GvRow As GridViewRow In GvEstimaciones.Rows
|
||||
' For Each GvRow As GridViewRow In GvEstimaciones.Rows
|
||||
|
||||
If GvRow.DataKey("CveContratoAvance").ToEntero > 0 Then
|
||||
If Not ObjContratos.UpdateContratosAvanceEstimacion(GvRow.DataKey("CveContratoAvance").ToEntero, ObjContratos.CveEstimacionNueva, UsuarioActual.CveEmpresa) Then
|
||||
ErrorProceso = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
' If GvRow.DataKey("CveContratoAvance").ToEntero > 0 Then
|
||||
' If Not ObjContratos.UpdateContratosAvanceEstimacion(GvRow.DataKey("CveContratoAvance").ToEntero, ObjContratos.CveEstimacionNueva, UsuarioActual.CveEmpresa) Then
|
||||
' ErrorProceso = True
|
||||
' Exit For
|
||||
' End If
|
||||
' End If
|
||||
' Next
|
||||
|
||||
Else
|
||||
ErrorProceso = True
|
||||
End If
|
||||
' Else
|
||||
' ErrorProceso = True
|
||||
' End If
|
||||
|
||||
'AddContratosAvanceEstimacion
|
||||
'UpdateContratosAvanceEstimacion
|
||||
' 'AddContratosAvanceEstimacion
|
||||
' 'UpdateContratosAvanceEstimacion
|
||||
|
||||
|
||||
|
||||
If Not ErrorProceso Then
|
||||
ObjContratos.Commit()
|
||||
Alert($"Estimación {NuemeroEstimacionNuevo} agregada correctamente.")
|
||||
' If Not ErrorProceso Then
|
||||
' ObjContratos.Commit()
|
||||
' Alert($"Estimación {NuemeroEstimacionNuevo} agregada correctamente.")
|
||||
|
||||
BtnGuardarEstimacion.Visible = False
|
||||
BtnDescargarGenerado.Visible = True
|
||||
' BtnGuardarEstimacion.Visible = False
|
||||
' BtnDescargarGenerado.Visible = True
|
||||
|
||||
Else
|
||||
ObjContratos.RollBack()
|
||||
End If
|
||||
' Else
|
||||
' ObjContratos.RollBack()
|
||||
' End If
|
||||
|
||||
ObjContratos.Dispose()
|
||||
' ObjContratos.Dispose()
|
||||
|
||||
UpEstimaciones.Update()
|
||||
End Sub
|
||||
' UpEstimaciones.Update()
|
||||
'End Sub
|
||||
|
||||
Private Sub BtnDescargarGenerado_Click(sender As Object, e As EventArgs) Handles BtnDescargarGenerado.Click
|
||||
'Private Sub BtnDescargarGenerado_Click(sender As Object, e As EventArgs) Handles BtnDescargarGenerado.Click
|
||||
|
||||
GeneraAnexo(CveEstimacionNueva, NuemeroEstimacionNuevo, Now, DDlContratosEstimaciones.SelectedItem.Text)
|
||||
' GeneraAnexo(CveEstimacionNueva, NuemeroEstimacionNuevo, Now, DDlContratosEstimaciones.SelectedItem.Text)
|
||||
|
||||
End Sub
|
||||
'End Sub
|
||||
|
||||
Private Sub GeneraAnexo(CveEstimacion As Integer, NumeroEstimacion As Integer, FechaEstimacion As Date, NumeroContrato As String)
|
||||
|
||||
|
||||
@@ -320,24 +320,20 @@
|
||||
</div>
|
||||
<div class="caption uppercase" style="position: relative;"><i class="fa fa-info-circle"></i>Datos del Contrato</div>
|
||||
</div>
|
||||
<div class="portlet-body rowpadding">
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="portlet-body rowpadding">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-2 truncate">No. Contrato:</label>
|
||||
<div class="col-md-10">
|
||||
<label class="col-md-3 truncate">No. Contrato:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:TextBox ID="TxtNumeroContrato" runat="server" Width="200px" MaxLength="50"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVNumeroContrato" runat="server" ControlToValidate="TxtNumeroContrato" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''No. Contrato''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCENumeroContrato" runat="server" HighlightCssClass="vco" TargetControlID="RFVNumeroContrato" Width="300px" BehaviorID="_content_VCENumeroContrato"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-2 truncate">Descripción del Contrato:</label>
|
||||
<div class="col-md-10">
|
||||
<label class="col-md-3 truncate">Descripción del Contrato:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:TextBox ID="TxtDescripcionContrato" runat="server" MaxLength="70" Width="400px" TextMode="MultiLine" ></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVDescripcionContrato" runat="server" ControlToValidate="TxtDescripcionContrato" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''DescripcionContrato''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEDescripcionContrato" runat="server" HighlightCssClass="vco" TargetControlID="RFVDescripcionContrato" Width="300px" BehaviorID="_content_VCEDescripcionContrato"></ajax:ValidatorCalloutExtender>
|
||||
@@ -345,16 +341,16 @@
|
||||
</div>
|
||||
|
||||
<div id="trLicitacion" runat="server" class="row">
|
||||
<label class="col-md-2 truncate">Número Licitación:</label>
|
||||
<div class="col-md-10">
|
||||
<label class="col-md-3 truncate">Número Licitación:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:TextBox ID="TxtNumeroLicitacion" runat="server" MaxLength="70" Width="200px"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" id="TrProveedor" runat="server">
|
||||
<label class="col-md-2 truncate ">
|
||||
<label class="col-md-3 truncate ">
|
||||
<asp:Label ID="LblProveedor" runat="server" Text="Proveedor:"></asp:Label></label>
|
||||
<div class="col-md-10">
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList ID="DdlContratista" runat="server" CssClass="input-sm form-control select2me" AppendDataBoundItems="True" DataTextField="RazonSocial" DataValueField="CveProveedor" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 350px !important;" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
@@ -363,10 +359,10 @@
|
||||
|
||||
|
||||
<div class="row" >
|
||||
<label class="col-md-2 truncate ">
|
||||
<label class="col-md-3 truncate ">
|
||||
<asp:Label ID="LblCliente" runat="server" Text="Cliente:"></asp:Label></label>
|
||||
|
||||
<div class="col-md-10">
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList ID="DdlCliente" runat="server" AppendDataBoundItems="True" DataTextField="NombreComercial" DataValueField="CveCliente" Class="table-group-action-input form-control input-inline input-sm select2me" Style="width: 350px !important;" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
@@ -378,21 +374,21 @@
|
||||
|
||||
|
||||
<div class="row" style="display: none;">
|
||||
<label class="col-md-2 truncate ">Ubicacion:</label>
|
||||
<div class="col-md-10">
|
||||
<label class="col-md-3 truncate ">Ubicacion:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:TextBox ID="TxtUbicacion" runat="server" MaxLength="50" Width="400px"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id="divResponsable" runat="server">
|
||||
<label class="col-md-2 truncate ">Responsable:</label>
|
||||
<div class="col-md-10">
|
||||
<label class="col-md-3 truncate ">Responsable:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:TextBox ID="TxtResponsable" runat="server" MaxLength="50" Width="400px"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" id="div3" runat="server">
|
||||
<label class="col-md-2 truncate ">Lugar:</label>
|
||||
<div class="col-md-10">
|
||||
<label class="col-md-3 truncate ">Lugar:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:TextBox ID="TxtLugar" runat="server" MaxLength="300" Width="400px"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
@@ -400,8 +396,8 @@
|
||||
|
||||
<div class="row">
|
||||
|
||||
<label class="col-md-2 truncate">Tipo Contrato:</label>
|
||||
<div class="col-md-10">
|
||||
<label class="col-md-3 truncate">Tipo Contrato:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList ID="DdlTipoContratoObra" runat="server" CssClass="select2me" Width="150px" >
|
||||
<asp:ListItem Value="-1">Seleccione uno</asp:ListItem>
|
||||
<asp:ListItem Value="30">Obra</asp:ListItem>
|
||||
@@ -415,8 +411,8 @@
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-2 truncate">Fecha Inicial:</label>
|
||||
<div class="col-md-10">
|
||||
<label class="col-md-3 truncate">Fecha Inicial:</label>
|
||||
<div class="col-md-9">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaInicial" runat="server" CssClass="form-control" CausesValidation="True" Style="width: 118px" MaxLength="10"></asp:TextBox><span class="input-group-btn "><asp:LinkButton ID="ImgCalendarioInicial" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton></span>
|
||||
</div>
|
||||
@@ -427,8 +423,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-2 truncate">Fecha Final:</label>
|
||||
<div class="col-md-10">
|
||||
<label class="col-md-3 truncate">Fecha Final:</label>
|
||||
<div class="col-md-9">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaFinal" runat="server" CssClass="form-control" CausesValidation="True" Style="width: 118px" MaxLength="10"></asp:TextBox><span class="input-group-btn "><asp:LinkButton ID="ImgCalendarioFinal" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton></span>
|
||||
</div>
|
||||
@@ -445,8 +441,8 @@
|
||||
|
||||
<div class="row" id="DVddlproyecto" runat="server">
|
||||
|
||||
<asp:Label runat="server" ID="LblProyecto" class="col-md-2 truncate">Proyecto:</asp:Label>
|
||||
<div class="col-md-10">
|
||||
<asp:Label runat="server" ID="LblProyecto" class="col-md-3 truncate">Proyecto:</asp:Label>
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList ID="DdlProyecto" runat="server" AppendDataBoundItems="true" DataTextField="Proyecto" DataValueField="CveProyecto" Class="table-group-action-input form-control input-inline input-sm select2me" Style="width: 200px;" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Sin Proyecto asignado" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
@@ -459,8 +455,8 @@
|
||||
|
||||
<div class="row" id="DVSubProyecto" runat="server" visible="false">
|
||||
|
||||
<asp:Label runat="server" ID="LblSubProyectoTitulo" class="col-md-2 truncate"></asp:Label>
|
||||
<asp:Label runat="server" ID="LblSubProyecto" class="col-md-10 truncate"></asp:Label>
|
||||
<asp:Label runat="server" ID="LblSubProyectoTitulo" class="col-md-3 truncate"></asp:Label>
|
||||
<asp:Label runat="server" ID="LblSubProyecto" class="col-md-9 truncate"></asp:Label>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -484,24 +480,23 @@
|
||||
</div>
|
||||
<div class="caption uppercase" style="position: relative;"><i class="fa fa-info-circle"></i>Información</div>
|
||||
</div>
|
||||
<div class="portlet-body rowpadding">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="portlet-body rowpadding">
|
||||
|
||||
<div class="row" id="TrCliente" runat="server" visible="False">
|
||||
<label class="col-md-2 truncate">
|
||||
<asp:Label ID="Label1" runat="server" Text="Cliente:"></asp:Label></label><div class="col-md-10">
|
||||
<label class="col-md-3 ">
|
||||
<asp:Label ID="Label1" runat="server" Text="Cliente:"></asp:Label></label>
|
||||
<div class="col-md-9">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="row" id="TrClienteSucursal" runat="server" visible="False">
|
||||
<label class="col-md-2 truncate">
|
||||
<asp:Label ID="Label2" runat="server" Text="Sucursal Cliente:"></asp:Label></label><div class="col-md-10">
|
||||
<label class="col-md-3 ">
|
||||
<asp:Label ID="Label2" runat="server" Text="Sucursal Cliente:"></asp:Label></label>
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList ID="DdlSucursalCliente" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="SucursalCliente" DataValueField="CveClienteSucursal" Width="75%">
|
||||
<asp:ListItem Selected="true" Text="Matriz" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
@@ -514,64 +509,64 @@
|
||||
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-2 truncate">Moneda:</label>
|
||||
<div class="col-md-10">
|
||||
<asp:DropDownList ID="DdlMoneda" CssClass="form-control input-sm select2me" runat="server" DataTextField="Moneda" AutoPostBack="True" DataValueField="CveMoneda" Width="150px"></asp:DropDownList>
|
||||
<label class="col-md-3 ">Moneda:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList ID="DdlMoneda" CssClass="form-control input-sm select2me" runat="server" DataTextField="Moneda" AutoPostBack="True" DataValueField="CveMoneda" Width="200px"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" runat="server" id="tipoCambio" visible="False">
|
||||
<label class="col-md-2 truncate">Tipo de cambio:</label>
|
||||
<div class="col-md-10">
|
||||
<asp:TextBox ID="TxtTipoCambio" runat="server" MaxLength="12" Width="90px"></asp:TextBox>
|
||||
<label class="col-md-3 ">Tipo de cambio:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:TextBox ID="TxtTipoCambio" runat="server" MaxLength="12" Width="200px"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender7" runat="server" TargetControlID="TxtTipoCambio" FilterType="Custom, Numbers" ValidChars="." BehaviorID="_content_SoloNumeros" />
|
||||
</div>
|
||||
</div>
|
||||
<div id="trIva" runat="server" class="row">
|
||||
<label class="col-md-2 truncate">% IVA:</label>
|
||||
<div class="col-md-10">
|
||||
<asp:TextBox ID="TxtPorIVA" runat="server" MaxLength="12" Width="150px"></asp:TextBox><ajax:FilteredTextBoxExtender ID="SoloNumeros" runat="server" TargetControlID="TxtPorIVA" FilterType="Custom, Numbers" ValidChars="." BehaviorID="_content_SoloNumeros" />
|
||||
<label class="col-md-3 ">% IVA:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:TextBox ID="TxtPorIVA" runat="server" MaxLength="12" Width="200px"></asp:TextBox><ajax:FilteredTextBoxExtender ID="SoloNumeros" runat="server" TargetControlID="TxtPorIVA" FilterType="Custom, Numbers" ValidChars="." BehaviorID="_content_SoloNumeros" />
|
||||
</div>
|
||||
</div>
|
||||
<div id="trAnticipo" runat="server" class="row">
|
||||
<label class="col-md-2 truncate ">% Anticipo:</label>
|
||||
<div class="col-md-10">
|
||||
<asp:TextBox ID="TxtPorAnticipo" runat="server" MaxLength="12" Width="150px"></asp:TextBox>
|
||||
<label class="col-md-3 ">% Anticipo:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:TextBox ID="TxtPorAnticipo" runat="server" MaxLength="12" Width="200px"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div id="trAmortizacion" runat="server" class="row">
|
||||
<label class="col-md-2 truncate ">% Amortización de Anticipo:</label>
|
||||
<div class="col-md-10">
|
||||
<asp:TextBox ID="TxtPorAmortizacionAnticipo" runat="server" MaxLength="12" Width="150px"></asp:TextBox>
|
||||
<label class="col-md-3 ">% Amortización de Anticipo:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:TextBox ID="TxtPorAmortizacionAnticipo" runat="server" MaxLength="12" Width="200px"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div id="trPorGarantia" runat="server" class="row">
|
||||
<label class="col-md-2 truncate ">% Garantía:</label>
|
||||
<div class="col-md-10">
|
||||
<asp:TextBox ID="TxtPorGarantia" runat="server" MaxLength="12" Width="150px"></asp:TextBox>
|
||||
<label class="col-md-3 ">% Garantía:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:TextBox ID="TxtPorGarantia" runat="server" MaxLength="12" Width="200px"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row" runat="server">
|
||||
<label class="col-md-2 truncate ">% Limite de Gastos:</label>
|
||||
<div class="col-md-10">
|
||||
<asp:TextBox ID="TxtLimiteGastos" runat="server" MaxLength="5" Width="150px"></asp:TextBox>
|
||||
<label class="col-md-3 ">% Limite de Gastos:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:TextBox ID="TxtLimiteGastos" runat="server" MaxLength="5" Width="200px"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender3" runat="server" TargetControlID="TxtLimiteGastos" FilterType="Custom, Numbers" ValidChars=",." BehaviorID="_content_SoloNumeros" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" id="DvTotal" runat="server">
|
||||
<label class="col-md-2 truncate ">Total:</label>
|
||||
<div class="col-md-10">
|
||||
<asp:TextBox ID="TxtTotal" runat="server" MaxLength="12" Width="150px"></asp:TextBox>
|
||||
<label class="col-md-3 ">Total con IVA:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:TextBox ID="TxtTotal" runat="server" MaxLength="12" Width="200px"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender8" runat="server" TargetControlID="TxtTotal" FilterType="Custom, Numbers" ValidChars=",." BehaviorID="_content_SoloNumeros" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row" id="DvObservaciones" runat="server" visible="false">
|
||||
<label class="col-md-2 truncate ">Observación de Facturación:</label>
|
||||
<div class="col-md-10">
|
||||
<label class="col-md-3 ">Observación de Facturación:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" Width="400px" TextMode="MultiLine" Rows="2"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1274,12 +1269,12 @@
|
||||
<div id="dvCa" style="width: 100%; top: 30px">
|
||||
<table id="dTable" class="table Widthall ">
|
||||
<tr>
|
||||
<td width="30%" id="TH1" style="font-size: medium; text-align: center!important; background-color: #b9b9b9;"><strong>Clasificación</strong> </td>
|
||||
<td width="15%" 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 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>
|
||||
<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="18%" id="TH3" style="font-size: medium; text-align: center!important; background-color: #b9b9b9;"><strong>Avance</strong> </td>
|
||||
<td width="18%" id="TH4" style="font-size: medium; text-align: center!important; background-color: #dddddd;"><strong>Faltante</strong> </td>
|
||||
<td width="10%" id="TH5" style="font-size: medium; text-align: center!important; background-color: #b9b9b9;"><strong>Avance Por Facturar</strong> </td>
|
||||
<td width="5%" id="TH6" style="font-size: medium; text-align: center!important; background-color: #dddddd;"><strong>Anticipo</strong> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
@@ -1303,10 +1298,14 @@
|
||||
<asp:LinkButton ID="LBAvanceImporte" OnClick="MuestaModalVentasAvance" Text='<%# Eval("AvanceImporte", "{0:###,###,##0.00##}") %>' 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="%" 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" />
|
||||
@@ -1346,8 +1345,8 @@
|
||||
<div id="dvCaCon" style="width: 100%; top: 30px">
|
||||
<table id="dTable" class="table Widthall ">
|
||||
<tr>
|
||||
<td width="30%" id="TH1" style="font-size: medium; text-align: center!important; background-color: #b9b9b9;"><strong>Clasificación</strong> </td>
|
||||
<td width="15%" id="TH2" style="font-size: medium; text-align: center!important; background-color: #dddddd;"><strong>Contratado</strong> </td>
|
||||
<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 width="15%" id="TH5" style="font-size: medium; text-align: center!important; background-color: #b9b9b9;"><strong>Avance Por Facturar</strong> </td>
|
||||
@@ -1375,9 +1374,11 @@
|
||||
<asp:LinkButton ID="LBAvanceImporte" OnClick="MuestaModalVentasAvance" Text='<%# Eval("AvanceImporte", "{0:###,###,##0.00##}") %>' 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="%" DataField="FaltantePorcentaje" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="5%" />
|
||||
|
||||
<%-- <asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="7.5%" ItemStyle-CssClass="Derecha">
|
||||
<ItemTemplate>
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
<link href="/Metronic/assets/global/plugins/dropzone/css/dropzone.css" rel="stylesheet"/>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
|
||||
Autorización de Avance
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
|
||||
</asp:Content>
|
||||
@@ -45,130 +46,140 @@
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
<ajax:TabContainer ID="Tab" runat="server" Width="100%" CssClass="tabBodyOverride" ActiveTabIndex="0">
|
||||
|
||||
|
||||
|
||||
|
||||
<ajax:TabPanel ID="TabEstimación" runat="server" HeaderText="Estimación">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpEstimaciones" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultarEstimaciones" runat="server" Text="Consultar" class="btn btn-default" />
|
||||
</div>
|
||||
|
||||
<div class="titlefiltros caption" style="position: relative;">
|
||||
<asp:UpdatePanel class="row" ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<label class="col-md-1 truncate">Contrato:</label>
|
||||
<div class="col-md-6 col-lg-4">
|
||||
<div class="ddls">
|
||||
<asp:DropDownList ID="DDlContratosEstimaciones" runat="server" DataTextField="ContratoCompleto" DataValueField="CveContrato" Class=" form-control input-inline select2me" Width="100%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<asp:GridView ID="GvEstimaciones" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron partidas para levantar avance"
|
||||
DataKeyNames="CveContratoAvance,CveFamilias,CveSubFamilias,CveContratoDetalle,PS,Cantidad,Importe,Cantidad_Ultima,Importe_Ultima,PU,CantidadMax,Avance,Fecha,CveEstimacion"
|
||||
CssClass="table GVEstimacion table-advance table-hover mysmallbtn" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="" ItemStyle-Width="60%">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="Producto" runat="server" CssClass="Texto" Text='<%# Eval("PS")%>' Visible="false" ></asp:LinkButton>
|
||||
<asp:Label ID="LinkButton1" runat="server" CssClass="Texto" Text='<%# Eval("PS")%>' ></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cantidad">
|
||||
<ItemTemplate>
|
||||
<span><%# Eval("Cantidad", "{0:N2}")%></span>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Importe">
|
||||
<ItemTemplate>
|
||||
<span><%# Eval("Importe", "{0:N2}")%></span>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cantidad">
|
||||
<ItemTemplate>
|
||||
<span><%# Eval("Cantidad_Ultima", "{0:N2}")%></span>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Importe">
|
||||
<ItemTemplate>
|
||||
<span><%# Eval("Importe_Ultima", "{0:N2}")%></span>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Acciones">
|
||||
<ItemTemplate>
|
||||
<ContentTemplate>
|
||||
|
||||
<table style="width:120px!important">
|
||||
<tr>
|
||||
<td>
|
||||
<asp:LinkButton ID="LnkAnexo" runat="server" OnClick="GetAnexos" AlternateText="Agregar Anexo" CssClass="btn btn-circle btn-sm btn-success anexo" Text="<i class='fa fa-folder'></i>" Visible="false" />
|
||||
</td>
|
||||
<td>
|
||||
<asp:LinkButton ID="LnkEliminarAvance" runat="server" OnClick="LnkEliminarAvance_Click" AlternateText="Agregar Anexo" Visible="false"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Confimra la elimiancion del avance?" data-btn-ok-label="si"
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="text-center">
|
||||
|
||||
<asp:Button id="BtnAutoriza" CssClass="btn btn-primary" runat="server" Text="Autorizar" Visible="false" OnClick="BtnAutoriza_Click" />
|
||||
<asp:Button id="BtnGuardarEstimacion" CssClass="btn btn-primary" runat="server" Text="Generar Estimacion" Visible="false"/>
|
||||
<asp:Button id="BtnDescargarGenerado" CssClass="btn btn-primary" runat="server" Text="Descarga Generador" Visible="false"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultarEstimaciones" runat="server" Text="Consultar" class="btn btn-default" />
|
||||
</div>
|
||||
|
||||
<div class="titlefiltros caption" style="position: relative;">
|
||||
<asp:UpdatePanel class="row" ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<label class="col-md-1 truncate">Contrato:</label>
|
||||
<div class="col-md-6 col-lg-4">
|
||||
<div class="ddls">
|
||||
<asp:DropDownList ID="DDlContratosEstimaciones" runat="server" DataTextField="ContratoCompleto" DataValueField="CveContrato" Class=" form-control input-inline select2me" Width="100%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6" style="text-align: right!important">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-md-6" style="text-align:right!important">
|
||||
<div style="display: inline-block">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvEstimaciones.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px; height: 25px; border-color: #89C4F4;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvEstimaciones.ClientID) %>" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<br />
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<asp:GridView ID="GvEstimaciones" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron partidas para levantar avance"
|
||||
DataKeyNames="CveContratoAvance,CveFamilias,CveSubFamilias,CveContratoDetalle,PS,Cantidad,Importe,Cantidad_Ultima,Importe_Ultima,PU,CantidadMax,Avance,Fecha,CveEstimacion"
|
||||
CssClass="table GVEstimacion table-advance table-hover mysmallbtn" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="" ItemStyle-Width="60%">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="Producto" runat="server" CssClass="Texto" Text='<%# Eval("PS")%>' Visible="false"></asp:LinkButton>
|
||||
<asp:Label ID="LinkButton1" runat="server" CssClass="Texto" Text='<%# Eval("PS")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cantidad">
|
||||
<ItemTemplate>
|
||||
<span><%# Eval("Cantidad", "{0:N2}")%></span>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Importe">
|
||||
<ItemTemplate>
|
||||
<span><%# Eval("Importe", "{0:N2}")%></span>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cantidad">
|
||||
<ItemTemplate>
|
||||
<span><%# Eval("Cantidad_Ultima", "{0:N2}")%></span>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Importe">
|
||||
<ItemTemplate>
|
||||
<span><%# Eval("Importe_Ultima", "{0:N2}")%></span>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Acciones">
|
||||
<ItemTemplate>
|
||||
|
||||
<table style="width: 120px!important">
|
||||
<tr>
|
||||
<td>
|
||||
<asp:LinkButton ID="LnkAnexo" runat="server" OnClick="GetAnexos" AlternateText="Agregar Anexo" CssClass="btn btn-circle btn-sm btn-success anexo" Text="<i class='fa fa-folder'></i>" Visible="false" />
|
||||
</td>
|
||||
<td>
|
||||
<asp:LinkButton ID="LnkEliminarAvance" runat="server" OnClick="LnkEliminarAvance_Click" AlternateText="Agregar Anexo" Visible="false"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Confimra la elimiancion del avance?" data-btn-ok-label="si" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="text-center">
|
||||
|
||||
<asp:Button ID="BtnAutoriza" CssClass="btn btn-primary" runat="server" Text="Autorizar" Visible="false" OnClick="BtnAutoriza_Click" />
|
||||
<asp:Button ID="BtnGuardarEstimacion" CssClass="btn btn-primary" runat="server" Text="Generar Estimacion" Visible="false" />
|
||||
<asp:Button ID="BtnDescargarGenerado" CssClass="btn btn-primary" runat="server" Text="Descarga Generador" Visible="false" />
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="BtnDescargarGenerado" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
|
||||
</ajax:TabContainer>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -221,14 +221,26 @@
|
||||
|
||||
<asp:TemplateField HeaderText="Avance $">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="HplOFA" CssClass="Texto" runat="server" Text='<%# Eval("AvanceImporte", "{0:N2}")%>'></asp:Label>
|
||||
<asp:Label ID="LblAvanceImporte" CssClass="Texto" runat="server" Text='<%# Eval("AvanceImporte", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Facturado">
|
||||
<asp:TemplateField HeaderText="Avance Acumulado $">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblFacturado" CssClass="Texto" runat="server" Text='<%# Eval("Facturado")%>'></asp:Label>
|
||||
<asp:Label ID="LblAvanceAcumuladoImporte" CssClass="Texto" runat="server" Text='<%# Eval("AvanceAcumuladoImporte", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
|
||||
<asp:HyperLinkField ItemStyle-HorizontalAlign="Center" HeaderText="Factura" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="~/Ventas/Ventas.aspx?CveVenta={0}" DataTextField="SerieFolio" Target="_blank" />
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Estado">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblEstatus" CssClass="Texto" runat="server" Text='<%# Eval("EstimacionEstatus")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Center"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
|
||||
@@ -373,7 +373,7 @@ Partial Class RepContratosObraAvancesDetalle
|
||||
Dim objContrato As New ClsContratos
|
||||
Dim DTArchivos As New DataTable
|
||||
|
||||
If objContrato.GetContratosAvanceAnexos(Drow("CveContratoDetalle").ToString.ToEntero, Drow("Fecha").ToString, UsuarioActual.CveUsuario, CveEstimacion:=CveEstimacion) Then
|
||||
If objContrato.GetContratosAvanceAnexos(Drow("CveContratoDetalle").ToString.ToEntero, UsuarioActual.CveUsuario, CveEstimacion:=CveEstimacion) Then
|
||||
DTArchivos = objContrato.DtResultados
|
||||
End If
|
||||
objContrato.Dispose()
|
||||
|
||||
@@ -116,7 +116,7 @@ Partial Class RepContratosObraAvancesPartida
|
||||
Dim CveContratoAvance As Integer = GvRow.DataKey("CveContratoAvance").ToEntero
|
||||
|
||||
Dim objContrato As New ClsContratos
|
||||
If objContrato.GetContratosAvanceAnexos(CveContratoDetalle, Fecha, UsuarioActual.CveUsuario, CveEstimacion:=CveEstimacion, CveContratoAvance:=CveContratoAvance) Then
|
||||
If objContrato.GetContratosAvanceAnexos(CveContratoDetalle, UsuarioActual.CveUsuario, CveEstimacion:=CveEstimacion, CveContratoAvance:=CveContratoAvance) Then
|
||||
GvAnexos.DataSource = objContrato.DtResultados
|
||||
GvAnexos.DataBind()
|
||||
GvAnexos.Visible = True
|
||||
|
||||
@@ -273,188 +273,210 @@ public class TareasJam : IHttpHandler
|
||||
|
||||
if (!ErrorProceso)
|
||||
{
|
||||
//////////////////////////////////////////////////////////////
|
||||
|
||||
this.GuardaLog($"EjecutaThalamus: llenando archivo excel ventas. ");
|
||||
int count = 2;
|
||||
var wbVentas = new ClosedXML.Excel.XLWorkbook(FormatoVentas);
|
||||
var wsVentas = wbVentas.Worksheet(1);
|
||||
|
||||
foreach (DataRow DRow in DTVentas.Rows)
|
||||
try
|
||||
{
|
||||
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, 5).Value = DRow["Quantity"].ToString();
|
||||
wsVentas.Cell(count, 6).Value = DRow["Amount"].ToString();
|
||||
wsVentas.Cell(count, 7).Value = DRow["Transaction ID"].ToString();
|
||||
count++;
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
|
||||
this.GuardaLog($"EjecutaThalamus: llenando archivo excel ventas. ");
|
||||
int count = 2;
|
||||
var wbVentas = new ClosedXML.Excel.XLWorkbook(FormatoVentas);
|
||||
this.GuardaLog($"EjecutaThalamus: archivo excel ventas cargado. ");
|
||||
this.GuardaLog($"EjecutaThalamus: archivo excel ventas creando sheet.");
|
||||
var wsVentas = wbVentas.Worksheet(1);
|
||||
this.GuardaLog($"EjecutaThalamus: archivo excel ventas sheet creada.");
|
||||
|
||||
foreach (DataRow DRow in DTVentas.Rows)
|
||||
{
|
||||
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, 5).Value = DRow["Quantity"].ToString();
|
||||
wsVentas.Cell(count, 6).Value = DRow["Amount"].ToString();
|
||||
wsVentas.Cell(count, 7).Value = DRow["Transaction ID"].ToString();
|
||||
count++;
|
||||
}
|
||||
this.GuardaLog($"EjecutaThalamus: guardando archivo excel ventas " + RutaVentas + " ");
|
||||
wbVentas.SaveAs(RutaVentas);
|
||||
|
||||
var wbAlmacenes = new ClosedXML.Excel.XLWorkbook(FormatoAlmacenes);
|
||||
var wsAlmacenes = wbAlmacenes.Worksheet(1);
|
||||
|
||||
count = 2;
|
||||
|
||||
this.GuardaLog($"EjecutaThalamus: llenando archivo excel almacenes. ");
|
||||
foreach (DataRow DRow in DTAlmacenes.Rows)
|
||||
{
|
||||
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();
|
||||
count++;
|
||||
}
|
||||
this.GuardaLog($"EjecutaThalamus: guardando archivo excel alamcenes " + RutaAlmacenes + " ");
|
||||
wbAlmacenes.SaveAs(RutaAlmacenes);
|
||||
|
||||
var wbAClientes = new ClosedXML.Excel.XLWorkbook(FormatoClientes);
|
||||
var wsClientes = wbAClientes.Worksheet(1);
|
||||
|
||||
count = 2;
|
||||
|
||||
this.GuardaLog($"EjecutaThalamus: llenando archivo excel clientes. ");
|
||||
foreach (DataRow DRow in DTClientes.Rows)
|
||||
{
|
||||
wsClientes.Cell(count, 1).Value = "'" + DRow["systemId"].ToString();
|
||||
wsClientes.Cell(count, 2).Value = DRow["fiscalIdMex"].ToString();
|
||||
wsClientes.Cell(count, 3).Value = DRow["fiscalName"].ToString();
|
||||
wsClientes.Cell(count, 4).Value = DRow["email"].ToString();
|
||||
wsClientes.Cell(count, 5).Value = DRow["address.countryId"].ToString();
|
||||
wsClientes.Cell(count, 6).Value = DRow["address.stateId"].ToString();
|
||||
wsClientes.Cell(count, 7).Value = DRow["address.city"].ToString();
|
||||
wsClientes.Cell(count, 8).Value = DRow["address.street1"].ToString();
|
||||
wsClientes.Cell(count, 9).Value = DRow["address.street2"].ToString();
|
||||
wsClientes.Cell(count, 10).Value = "'" + DRow["address.postalCode"].ToString();
|
||||
wsClientes.Cell(count, 11).Value = DRow["phone.intCode"].ToString();
|
||||
wsClientes.Cell(count, 12).Value = DRow["phone.areaCode"].ToString();
|
||||
wsClientes.Cell(count, 13).Value = "'" + DRow["phone.number"].ToString();
|
||||
wsClientes.Cell(count, 14).Value = DRow["salesman"].ToString();
|
||||
|
||||
count++;
|
||||
}
|
||||
|
||||
this.GuardaLog($"EjecutaThalamus: guardando archivo excel clientes " + RutaClientes + " ");
|
||||
wbAClientes.SaveAs(RutaClientes);
|
||||
|
||||
var wbProductos = new ClosedXML.Excel.XLWorkbook(FormatoProductos);
|
||||
var wsProductos = wbProductos.Worksheet(1);
|
||||
|
||||
count = 2;
|
||||
this.GuardaLog($"EjecutaThalamus: llenando archivo excel productos. ");
|
||||
foreach (DataRow DRow in DTProductos.Rows)
|
||||
{
|
||||
wsProductos.Cell(count, 1).Value = "'" + DRow["Código Producto Interno"].ToString();
|
||||
wsProductos.Cell(count, 2).Value = DRow["Nombre del Producto"].ToString();
|
||||
wsProductos.Cell(count, 3).Value = DRow["Presentación"].ToString();
|
||||
|
||||
count++;
|
||||
}
|
||||
this.GuardaLog($"EjecutaThalamus: guardando archivo excel productos " + RutaProductos + " ");
|
||||
wbProductos.SaveAs(RutaProductos);
|
||||
/////////////////////////////////////////////////////////////
|
||||
|
||||
}
|
||||
this.GuardaLog($"EjecutaThalamus: guardando archivo excel ventas " + RutaVentas + " ");
|
||||
wbVentas.SaveAs(RutaVentas);
|
||||
|
||||
var wbAlmacenes = new ClosedXML.Excel.XLWorkbook(FormatoAlmacenes);
|
||||
var wsAlmacenes = wbAlmacenes.Worksheet(1);
|
||||
|
||||
count = 2;
|
||||
|
||||
this.GuardaLog($"EjecutaThalamus: llenando archivo excel almacenes. ");
|
||||
foreach (DataRow DRow in DTAlmacenes.Rows)
|
||||
catch (Exception ex)
|
||||
{
|
||||
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();
|
||||
count++;
|
||||
}
|
||||
this.GuardaLog($"EjecutaThalamus: guardando archivo excel alamcenes " + RutaAlmacenes + " ");
|
||||
wbAlmacenes.SaveAs(RutaAlmacenes);
|
||||
|
||||
var wbAClientes = new ClosedXML.Excel.XLWorkbook(FormatoClientes);
|
||||
var wsClientes = wbAClientes.Worksheet(1);
|
||||
|
||||
count = 2;
|
||||
|
||||
this.GuardaLog($"EjecutaThalamus: llenando archivo excel clientes. ");
|
||||
foreach (DataRow DRow in DTClientes.Rows)
|
||||
{
|
||||
wsClientes.Cell(count, 1).Value = "'" + DRow["systemId"].ToString();
|
||||
wsClientes.Cell(count, 2).Value = DRow["fiscalIdMex"].ToString();
|
||||
wsClientes.Cell(count, 3).Value = DRow["fiscalName"].ToString();
|
||||
wsClientes.Cell(count, 4).Value = DRow["email"].ToString();
|
||||
wsClientes.Cell(count, 5).Value = DRow["address.countryId"].ToString();
|
||||
wsClientes.Cell(count, 6).Value = DRow["address.stateId"].ToString();
|
||||
wsClientes.Cell(count, 7).Value = DRow["address.city"].ToString();
|
||||
wsClientes.Cell(count, 8).Value = DRow["address.street1"].ToString();
|
||||
wsClientes.Cell(count, 9).Value = DRow["address.street2"].ToString();
|
||||
wsClientes.Cell(count, 10).Value = "'" + DRow["address.postalCode"].ToString();
|
||||
wsClientes.Cell(count, 11).Value = DRow["phone.intCode"].ToString();
|
||||
wsClientes.Cell(count, 12).Value = DRow["phone.areaCode"].ToString();
|
||||
wsClientes.Cell(count, 13).Value = "'" + DRow["phone.number"].ToString();
|
||||
wsClientes.Cell(count, 14).Value = DRow["salesman"].ToString();
|
||||
|
||||
count++;
|
||||
this.GuardaLog($"EjecutaThalamus: Error procesamiento archivos exel " + ex.StackTrace.ToString() + " ");
|
||||
ErrorProceso = true;
|
||||
Respuesta = false;
|
||||
}
|
||||
|
||||
this.GuardaLog($"EjecutaThalamus: guardando archivo excel clientes " + RutaClientes + " ");
|
||||
wbAClientes.SaveAs(RutaClientes);
|
||||
|
||||
var wbProductos= new ClosedXML.Excel.XLWorkbook(FormatoProductos);
|
||||
var wsProductos = wbProductos.Worksheet(1);
|
||||
|
||||
count = 2;
|
||||
this.GuardaLog($"EjecutaThalamus: llenando archivo excel productos. ");
|
||||
foreach (DataRow DRow in DTProductos.Rows)
|
||||
if (!ErrorProceso)
|
||||
{
|
||||
wsProductos.Cell(count, 1).Value = "'" + DRow["Código Producto Interno"].ToString();
|
||||
wsProductos.Cell(count, 2).Value = DRow["Nombre del Producto"].ToString();
|
||||
wsProductos.Cell(count, 3).Value = DRow["Presentación"].ToString();
|
||||
var FInfoProductos = new FileInfo(RutaProductos);
|
||||
var FInfoVentas = new FileInfo(RutaVentas);
|
||||
var FInfoClientes = new FileInfo(RutaClientes);
|
||||
var FInfoAlmacenes = new FileInfo(RutaAlmacenes);
|
||||
|
||||
count++;
|
||||
}
|
||||
this.GuardaLog($"EjecutaThalamus: guardando archivo excel productos " + RutaProductos + " ");
|
||||
wbProductos.SaveAs(RutaProductos);
|
||||
/////////////////////////////////////////////////////////////
|
||||
bool CargaProductos = false;
|
||||
bool CargaVentas = false;
|
||||
bool CargaClientes = false;
|
||||
bool CargaAlmacenes = false;
|
||||
|
||||
var FInfoProductos = new FileInfo(RutaProductos);
|
||||
var FInfoVentas = new FileInfo(RutaVentas);
|
||||
var FInfoClientes = new FileInfo(RutaClientes);
|
||||
var FInfoAlmacenes = new FileInfo(RutaAlmacenes);
|
||||
|
||||
bool CargaProductos = false;
|
||||
bool CargaVentas = false;
|
||||
bool CargaClientes = false;
|
||||
bool CargaAlmacenes = false;
|
||||
|
||||
SBLog.AppendLine("<b>Cargas</b><br>");
|
||||
SBLog.AppendLine("<table border='1'> <tr><th>Archivo</th><th>Estado</th></tr>");
|
||||
SBLog.AppendLine("<b>Cargas</b><br>");
|
||||
SBLog.AppendLine("<table border='1'> <tr><th>Archivo</th><th>Estado</th></tr>");
|
||||
|
||||
|
||||
this.GuardaLog($"EjecutaThalamus: Cargando archivo excel productos a FTP. ");
|
||||
CargaProductos = CargarArchivos(FInfoProductos, FTPServer, TFPUsr, FTPPass);
|
||||
this.GuardaLog($"EjecutaThalamus: Cargando archivo excel productos a FTP. ");
|
||||
CargaProductos = CargarArchivos(FInfoProductos, FTPServer, TFPUsr, FTPPass);
|
||||
|
||||
if (CargaProductos)
|
||||
{
|
||||
this.GuardaLog($"EjecutaThalamus: Verificando archivo productos. ");
|
||||
CargaProductos = VerificarArchivo(FInfoProductos, FInfoProductos.Length, FTPServer, TFPUsr, FTPPass);
|
||||
}
|
||||
if (CargaProductos)
|
||||
{
|
||||
this.GuardaLog($"EjecutaThalamus: Verificando archivo productos. ");
|
||||
CargaProductos = VerificarArchivo(FInfoProductos, FInfoProductos.Length, FTPServer, TFPUsr, FTPPass);
|
||||
}
|
||||
|
||||
if (CargaProductos)
|
||||
{
|
||||
SBLog.AppendLine($"<tr><td>Productos</td><td>ok</td></tr>");
|
||||
}
|
||||
else
|
||||
{
|
||||
SBLog.AppendLine($"<tr><td>Productos</td><td>Error carga</td></tr>");
|
||||
}
|
||||
if (CargaProductos)
|
||||
{
|
||||
SBLog.AppendLine($"<tr><td>Productos</td><td>ok</td></tr>");
|
||||
}
|
||||
else
|
||||
{
|
||||
SBLog.AppendLine($"<tr><td>Productos</td><td>Error carga</td></tr>");
|
||||
}
|
||||
|
||||
if (CargaProductos)
|
||||
{
|
||||
this.GuardaLog($"EjecutaThalamus: Cargando archivo excel ventas a FTP. ");
|
||||
CargaVentas = CargarArchivos(FInfoVentas, $"{FTPServer}/Ventas", TFPUsr, FTPPass);
|
||||
if (CargaVentas)
|
||||
{
|
||||
this.GuardaLog($"EjecutaThalamus: Verificando archivo ventas. ");
|
||||
CargaVentas = VerificarArchivo(FInfoVentas, FInfoVentas.Length, $"{FTPServer}/Ventas", TFPUsr, FTPPass);
|
||||
}
|
||||
}
|
||||
|
||||
if (CargaProductos)
|
||||
{
|
||||
this.GuardaLog($"EjecutaThalamus: Cargando archivo excel ventas a FTP. ");
|
||||
CargaVentas = CargarArchivos(FInfoVentas, $"{FTPServer}/Ventas", TFPUsr, FTPPass);
|
||||
if (CargaVentas)
|
||||
{
|
||||
this.GuardaLog($"EjecutaThalamus: Verificando archivo ventas. ");
|
||||
CargaVentas = VerificarArchivo(FInfoVentas, FInfoVentas.Length, $"{FTPServer}/Ventas", TFPUsr, FTPPass);
|
||||
SBLog.AppendLine($"<tr><td>Ventas</td><td>ok</td></tr>");
|
||||
}
|
||||
else
|
||||
{
|
||||
SBLog.AppendLine($"<tr><td>Ventas</td><td>Error carga</td></tr>");
|
||||
}
|
||||
}
|
||||
|
||||
if (CargaVentas)
|
||||
{
|
||||
SBLog.AppendLine($"<tr><td>Ventas</td><td>ok</td></tr>");
|
||||
}
|
||||
else
|
||||
{
|
||||
SBLog.AppendLine($"<tr><td>Ventas</td><td>Error carga</td></tr>");
|
||||
}
|
||||
if (CargaProductos & CargaVentas)
|
||||
{
|
||||
this.GuardaLog($"EjecutaThalamus: Cargando archivo excel clientes a FTP. ");
|
||||
CargaClientes = CargarArchivos(FInfoClientes, $"{FTPServer}/Clientes", TFPUsr, FTPPass);
|
||||
if (CargaClientes)
|
||||
{
|
||||
this.GuardaLog($"EjecutaThalamus: Verificando archivo clientes. ");
|
||||
CargaClientes = VerificarArchivo(FInfoClientes, FInfoClientes.Length, $"{FTPServer}/Clientes", TFPUsr, FTPPass);
|
||||
}
|
||||
}
|
||||
|
||||
if (CargaProductos & CargaVentas)
|
||||
{
|
||||
this.GuardaLog($"EjecutaThalamus: Cargando archivo excel clientes a FTP. ");
|
||||
CargaClientes = CargarArchivos(FInfoClientes, $"{FTPServer}/Clientes", TFPUsr, FTPPass);
|
||||
if (CargaClientes)
|
||||
{
|
||||
this.GuardaLog($"EjecutaThalamus: Verificando archivo clientes. ");
|
||||
CargaClientes = VerificarArchivo(FInfoClientes, FInfoClientes.Length, $"{FTPServer}/Clientes", TFPUsr, FTPPass);
|
||||
SBLog.AppendLine($"<tr><td>Clientes</td><td>ok</td></tr>");
|
||||
}
|
||||
}
|
||||
|
||||
if (CargaClientes)
|
||||
{
|
||||
SBLog.AppendLine($"<tr><td>Clientes</td><td>ok</td></tr>");
|
||||
}
|
||||
else
|
||||
{
|
||||
SBLog.AppendLine($"<tr><td>Clientes</td><td>Error carga</td></tr>");
|
||||
}
|
||||
|
||||
if (CargaProductos & CargaVentas & CargaClientes)
|
||||
{
|
||||
this.GuardaLog($"EjecutaThalamus: Cargando archivo excel almacenes a FTP. ");
|
||||
CargaAlmacenes = CargarArchivos(FInfoAlmacenes, $"{FTPServer}/Stock", TFPUsr, FTPPass);
|
||||
if (CargaClientes)
|
||||
else
|
||||
{
|
||||
this.GuardaLog($"EjecutaThalamus: Verificando archivo almacenes. ");
|
||||
CargaAlmacenes = VerificarArchivo(FInfoAlmacenes, FInfoAlmacenes.Length, $"{FTPServer}/Stock", TFPUsr, FTPPass);
|
||||
SBLog.AppendLine($"<tr><td>Clientes</td><td>Error carga</td></tr>");
|
||||
}
|
||||
}
|
||||
|
||||
if (CargaAlmacenes)
|
||||
{
|
||||
SBLog.AppendLine($"<tr><td>Almacenes</td><td>ok</td></tr>");
|
||||
}
|
||||
else
|
||||
{
|
||||
SBLog.AppendLine($"<tr><td>Almacenes</td><td>Error carga</td></tr>");
|
||||
}
|
||||
if (CargaProductos & CargaVentas & CargaClientes)
|
||||
{
|
||||
this.GuardaLog($"EjecutaThalamus: Cargando archivo excel almacenes a FTP. ");
|
||||
CargaAlmacenes = CargarArchivos(FInfoAlmacenes, $"{FTPServer}/Stock", TFPUsr, FTPPass);
|
||||
if (CargaClientes)
|
||||
{
|
||||
this.GuardaLog($"EjecutaThalamus: Verificando archivo almacenes. ");
|
||||
CargaAlmacenes = VerificarArchivo(FInfoAlmacenes, FInfoAlmacenes.Length, $"{FTPServer}/Stock", TFPUsr, FTPPass);
|
||||
}
|
||||
}
|
||||
|
||||
if (CargaAlmacenes)
|
||||
{
|
||||
SBLog.AppendLine($"<tr><td>Almacenes</td><td>ok</td></tr>");
|
||||
}
|
||||
else
|
||||
{
|
||||
SBLog.AppendLine($"<tr><td>Almacenes</td><td>Error carga</td></tr>");
|
||||
}
|
||||
|
||||
|
||||
if (CargaProductos & CargaVentas & CargaClientes & CargaAlmacenes)
|
||||
{
|
||||
Respuesta = true;
|
||||
}
|
||||
else
|
||||
if (CargaProductos & CargaVentas & CargaClientes & CargaAlmacenes)
|
||||
{
|
||||
Respuesta = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Respuesta = false;
|
||||
}
|
||||
|
||||
}else
|
||||
{
|
||||
Respuesta = false;
|
||||
}
|
||||
@@ -505,8 +527,8 @@ public class TareasJam : IHttpHandler
|
||||
|
||||
|
||||
ClsSisMail Correo = new ClsSisMail();
|
||||
string Para = "julian@adssistemas.mx;rene.molina@adssistemas.mx;oscar.irigoyen@adssistemas.mx";
|
||||
// string Para = "oscar.irigoyen@adssistemas.mx";
|
||||
string Para = "julian@adssistemas.mx;rene.molina@adssistemas.mx;oscar.irigoyen@adssistemas.mx";
|
||||
// string Para = "oscar.irigoyen@adssistemas.mx";
|
||||
string Asunto = ErrorProceso ? $"Carga Layout Corteva {DateTime.Now.ToString("yyyy-MM-dd")}" : $"Carga Layout Corteva Error {DateTime.Now.ToString("yyyy-MM-dd")}";
|
||||
|
||||
Correo.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Cuerpo, Archivos:ListaArchivos);
|
||||
|
||||
Reference in New Issue
Block a user