Merge branch 'master' of http://agonzalez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -100,10 +100,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<div class="col-md-6" style="text-align:right">
|
<div class="col-md-6" style="text-align:right">
|
||||||
<a class="linkfile" id="btnanexogral" runat="server" >
|
|
||||||
<span class="btn btn-circle btn-sm btn-success"><i class='fa fa-plus'></i></span>Agregar
|
|
||||||
<asp:TextBox ID="AnexoGral" Text='' runat="server"></asp:TextBox>
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ Partial Class Contratos_ContratoAvance
|
|||||||
|
|
||||||
If Not IsPostBack Then
|
If Not IsPostBack Then
|
||||||
BtnGuardar.Visible = False
|
BtnGuardar.Visible = False
|
||||||
btnanexogral.Visible = False
|
|
||||||
CargaContrato()
|
CargaContrato()
|
||||||
|
|
||||||
|
|
||||||
@@ -147,7 +147,7 @@ Partial Class Contratos_ContratoAvance
|
|||||||
DtDatos = ObjContratos.DtResultados
|
DtDatos = ObjContratos.DtResultados
|
||||||
If ObjContratos.DtResultados.Rows.Count > 0 Then
|
If ObjContratos.DtResultados.Rows.Count > 0 Then
|
||||||
BtnGuardar.Visible = True
|
BtnGuardar.Visible = True
|
||||||
btnanexogral.Visible = True
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
@@ -155,7 +155,7 @@ Partial Class Contratos_ContratoAvance
|
|||||||
fecha = DdlAvances.SelectedValue
|
fecha = DdlAvances.SelectedValue
|
||||||
DtDatos = ObjContratos.DtResultados
|
DtDatos = ObjContratos.DtResultados
|
||||||
BtnGuardar.Visible = False
|
BtnGuardar.Visible = False
|
||||||
btnanexogral.Visible = False
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
ObjContratos.Dispose()
|
ObjContratos.Dispose()
|
||||||
@@ -280,7 +280,7 @@ Partial Class Contratos_ContratoAvance
|
|||||||
Dim TieneError = False
|
Dim TieneError = False
|
||||||
Dim CveContratoDetalle As Integer
|
Dim CveContratoDetalle As Integer
|
||||||
Dim Cantidad As Double
|
Dim Cantidad As Double
|
||||||
Dim filesgral As List(Of Archivo) = AnexoGral.getfiles().Archivos
|
'Dim filesgral As List(Of Archivo) = AnexoGral.getfiles().Archivos
|
||||||
Dim guardarArchivos As New List(Of Archivo)
|
Dim guardarArchivos As New List(Of Archivo)
|
||||||
|
|
||||||
For Each gvr As GridViewRow In Gv.Rows
|
For Each gvr As GridViewRow In Gv.Rows
|
||||||
@@ -328,9 +328,10 @@ Partial Class Contratos_ContratoAvance
|
|||||||
Alert("No se logro guardar el Presupuesto favor de intentarlo mas tarde o comuniquese con soporte", TipoMensaje.MsgAdvertencia)
|
Alert("No se logro guardar el Presupuesto favor de intentarlo mas tarde o comuniquese con soporte", TipoMensaje.MsgAdvertencia)
|
||||||
Else
|
Else
|
||||||
Dim urlsave As String = String.Format("Empresas\{0}\Contrato\{1}\Anexos", UsuarioActual.CveEmpresa, CveContrato)
|
Dim urlsave As String = String.Format("Empresas\{0}\Contrato\{1}\Anexos", UsuarioActual.CveEmpresa, CveContrato)
|
||||||
For Each fileItem As Archivo In filesgral
|
|
||||||
fileItem.filename.FilesMove(fileItem.filename, urlsave)
|
'For Each fileItem As Archivo In filesgral
|
||||||
Next
|
' fileItem.filename.FilesMove(fileItem.filename, urlsave)
|
||||||
|
'Next
|
||||||
|
|
||||||
For Each fileItem As Archivo In guardarArchivos
|
For Each fileItem As Archivo In guardarArchivos
|
||||||
fileItem.filename.FilesMove(fileItem.filename.Replace($".{fileItem.Extencion}", ""), urlsave)
|
fileItem.filename.FilesMove(fileItem.filename.Replace($".{fileItem.Extencion}", ""), urlsave)
|
||||||
@@ -338,7 +339,7 @@ Partial Class Contratos_ContratoAvance
|
|||||||
ObjContratos.Commit()
|
ObjContratos.Commit()
|
||||||
Alert("se guardo Correctamente")
|
Alert("se guardo Correctamente")
|
||||||
End If
|
End If
|
||||||
AnexoGral.Text = "[]"
|
'AnexoGral.Text = "[]"
|
||||||
ObjContratos.Dispose()
|
ObjContratos.Dispose()
|
||||||
CargaddlAvance()
|
CargaddlAvance()
|
||||||
CargaDatosAvance()
|
CargaDatosAvance()
|
||||||
|
|||||||
@@ -75,87 +75,7 @@
|
|||||||
<asp:UpdatePanel runat="server">
|
<asp:UpdatePanel runat="server">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
<%-- <li runat="server" id="liTerminarContrato" visible="false">
|
|
||||||
<asp:LinkButton ID="LBTerminarContrato" Visible="false" OnClick="LBTerminarContrato_Click" runat="server" data-toggle="confirmation" data-popout="true" data-original-title="Esta seguro de terminar el contrato?" data-btn-ok-label="si"> <i class="fa fa-check"> </i> Concluir Contrato</asp:LinkButton>
|
|
||||||
</li>
|
|
||||||
<li runat="server" id="liCancelarContrato" visible="false">
|
|
||||||
<asp:LinkButton ID="LBCancelarContrato" Visible="false" OnClick="LBCancelarContrato_Click" runat="server" data-toggle="confirmation" data-popout="true" data-original-title="Esta seguro de cancelar el contrato?" data-btn-ok-label="si"> <i class="fa fa-times"> </i> Cancelar Contrato</asp:LinkButton>
|
|
||||||
</li>
|
|
||||||
<li runat="server" id="liVigenteContrato" visible="false">
|
|
||||||
<asp:LinkButton ID="LBVigenteContrato" Visible="false" OnClick="LBVigenteContrato_Click" runat="server" data-toggle="confirmation" data-popout="true" data-original-title="Esta seguro de pasar a vigente el contrato?" data-btn-ok-label="si"> <i class="fa fa-times"> </i> Reactivar Contrato</asp:LinkButton>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<asp:LinkButton ID="LbDescargarExcel" Visible="True" OnClick="LbDescargarExcel_Click" runat="server"><i class='fa fa-file-excel-o' style="font-weight:bold;"></i> Descargar Formato</asp:LinkButton>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<asp:HyperLink ID="LbCrearApartirDe" NavigateUrl="#" data-toggle="modal" data-target="#ModalCrearApartirDe" runat="server"><i class='fa fa-refresh'></i> Crear A Partir De</asp:HyperLink>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>
|
|
||||||
<asp:HyperLink ID="HlAgregarExcel" NavigateUrl="#" Visible="True" data-toggle="modal" data-target="#DivCargaExcel" runat="server"><i class='fa fa-server'></i> Importar Listado</asp:HyperLink>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
|
|
||||||
<li>
|
|
||||||
<asp:LinkButton ID="LBAgregarGasto" runat="server"><i class="fa fa-plus"></i> Agregar Gastos</asp:LinkButton>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
|
|
||||||
<li>
|
|
||||||
<asp:LinkButton ID="LBImprimir" Visible="false" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> Avance por Documento PDF</asp:LinkButton>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
|
|
||||||
<li>
|
|
||||||
<asp:LinkButton ID="liImprimir" runat="server" Visible="false"><i class='fa fa-download'></i> Descargar Contrato</i></asp:LinkButton>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>
|
|
||||||
<asp:LinkButton ID="LBImprimirInformacionG" Visible="false" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> Informacion PDF</asp:LinkButton>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
|
|
||||||
<li>
|
|
||||||
<asp:LinkButton ID="LBImprimirGastos" Visible="false" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> Gastos PDF</asp:LinkButton>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
|
|
||||||
<li>
|
|
||||||
<asp:LinkButton ID="LbImprimirSuministros" Visible="true" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> Suministros PDF</asp:LinkButton>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<asp:LinkButton ID="lbImprimirAvance" Visible="False" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> Avance PDF</asp:LinkButton>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>
|
|
||||||
<asp:LinkButton ID="LbImprimirPresupuesto" Visible="true" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> Presupuesto PDF</asp:LinkButton>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>
|
|
||||||
<asp:LinkButton ID="LbImprmirAF" Visible="true" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> Activos Fijos PDF</asp:LinkButton>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>
|
|
||||||
<asp:LinkButton ID="LbImprmirAFExcel" Visible="true" runat="server"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Activos Fijos Excel</asp:LinkButton>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<asp:LinkButton ID="LbImprimirPedDev" Visible="true" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> Pedidos / Devoluciones PDF</asp:LinkButton>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>
|
|
||||||
<asp:LinkButton ID="LbImprimirPedDevExcel" Visible="true" runat="server"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Pedidos / Devoluciones Excel</asp:LinkButton>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<asp:UpdatePanel ID="UpHajusteAcciones" runat="server" UpdateMode="Conditional">
|
|
||||||
|
|
||||||
<ContentTemplate>
|
|
||||||
<li>
|
|
||||||
<asp:LinkButton ID="LnkAjusteAF" Visible="true" runat="server" OnClick="LnkAjusteAF_Click"> <i class="fa fa-pencil" style="font-weight:bold;"></i>Habilitar Ajuste A.F.</asp:LinkButton>
|
|
||||||
</li>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>--%>
|
|
||||||
|
|
||||||
<asp:UpdatePanel ID="UpAccionesPresupuestos" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpAccionesPresupuestos" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
@@ -165,7 +85,7 @@
|
|||||||
</li>
|
</li>
|
||||||
|
|
||||||
<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>
|
<asp:LinkButton ID="LnkModalAddPSControl" Visible="false" runat="server" OnClick="LnkModalAddPSControl_Click"> <i class="fa fa-plus" style="font-weight:bold;"></i>Agregar PS Interno</asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
@@ -955,21 +875,10 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<asp:GridView ID="Gv" ClientIDMode="Static" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron Conceptos"
|
<asp:GridView ID="Gv" ClientIDMode="Static" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron Conceptos"
|
||||||
DataKeyNames="CveContratoDetalle,CveUM, CvePS, Cantidad, PU,CveTipoPresupuesto,CveClasificacion,CodigoPS,LimitarCantidad,PS,OCInterna,NoIdentificacion,PermitirAvance"
|
DataKeyNames="CveContratoDetalle,CveUM, CvePS, Cantidad, PU,CveTipoPresupuesto,CveClasificacion,CodigoPS,LimitarCantidad,PS,OCInterna,NoIdentificacion,PermitirAvance,CantidadContratada"
|
||||||
ShowHeader="true" SelectedRowStyle-BackColor="#66CCFF" CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
ShowHeader="true" SelectedRowStyle-BackColor="#66CCFF" CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
||||||
<Columns>
|
<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">
|
<asp:TemplateField HeaderText="Cantidad">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtCantidad" Text='<%# Eval("CantidadContratada")%>' runat="server"></asp:Literal>
|
<asp:Literal ID="LtCantidad" Text='<%# Eval("CantidadContratada")%>' runat="server"></asp:Literal>
|
||||||
@@ -981,25 +890,7 @@
|
|||||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||||
</asp:TemplateField>
|
</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">
|
<asp:TemplateField HeaderText="Producto/Servicio" ItemStyle-HorizontalAlign="Left">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtPS" Text='<%# Eval("CodigoPS")%>' runat="server"></asp:Literal>
|
<asp:Literal ID="LtPS" Text='<%# Eval("CodigoPS")%>' runat="server"></asp:Literal>
|
||||||
@@ -1206,7 +1097,7 @@
|
|||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
|
|
||||||
<asp:GridView ID="GvInsumos" ClientIDMode="Static" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron Conceptos"
|
<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"
|
DataKeyNames="CveContratoDetalle,CveUM, CvePS, Cantidad, PU,CveTipoPresupuesto,CveClasificacion,CodigoPS,LimitarCantidad,PS,NoIdentificacion,CantidadContratada" ShowHeader="true" SelectedRowStyle-BackColor="#66CCFF"
|
||||||
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
||||||
|
|
||||||
<Columns>
|
<Columns>
|
||||||
@@ -1221,25 +1112,7 @@
|
|||||||
<ItemStyle Width="150px" />
|
<ItemStyle Width="150px" />
|
||||||
</asp:TemplateField>
|
</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">
|
<asp:TemplateField HeaderText="Producto/Servicio" ItemStyle-HorizontalAlign="Left">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtPS" Text='<%# Eval("CodigoPS")%>' runat="server"></asp:Literal>
|
<asp:Literal ID="LtPS" Text='<%# Eval("CodigoPS")%>' runat="server"></asp:Literal>
|
||||||
@@ -2736,10 +2609,10 @@
|
|||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<%-- <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>
|
<asp:TextBox ID="TxtOCInterna" CssClass="form-control" runat="server" MaxLength="100" CausesValidation="true"></asp:TextBox>
|
||||||
<label for="<%= TxtOCInterna.ClientID.ToString()%>">OC:</label>
|
<label for="<%= TxtOCInterna.ClientID.ToString()%>">OC:</label>
|
||||||
</div>
|
</div>--%>
|
||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtCantidad" runat="server" CssClass="form-control" ></asp:TextBox>
|
<asp:TextBox ID="TxtCantidad" runat="server" CssClass="form-control" ></asp:TextBox>
|
||||||
@@ -2750,15 +2623,15 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<%-- <div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:CheckBox ID="ChkLimitarVenta" runat="server" CssClass="form-control" />
|
<asp:CheckBox ID="ChkLimitarVenta" runat="server" CssClass="form-control" />
|
||||||
<label for="<%= ChkLimitarVenta.ClientID.ToString()%>">Limitar:</label>
|
<label for="<%= ChkLimitarVenta.ClientID.ToString()%>">Limitar:</label>
|
||||||
</div>
|
</div>--%>
|
||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<%-- <div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtNoIdentificacionv" runat="server" MaxLength="15" CssClass="form-control" ></asp:TextBox>
|
<asp:TextBox ID="TxtNoIdentificacionv" runat="server" MaxLength="15" CssClass="form-control" ></asp:TextBox>
|
||||||
<label for="<%= TxtNoIdentificacionv.ClientID.ToString()%>">Clave Interna Cliente:</label>
|
<label for="<%= TxtNoIdentificacionv.ClientID.ToString()%>">Clave Interna Cliente:</label>
|
||||||
</div>
|
</div>--%>
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
@@ -2830,15 +2703,15 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<%-- <div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:CheckBox ID="ChkLimitarInsumos" runat="server" CssClass="form-control" />
|
<asp:CheckBox ID="ChkLimitarInsumos" runat="server" CssClass="form-control" />
|
||||||
<label for="<%= ChkLimitarInsumos.ClientID.ToString()%>">Limitar:</label>
|
<label for="<%= ChkLimitarInsumos.ClientID.ToString()%>">Limitar:</label>
|
||||||
</div>
|
</div>--%>
|
||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<%-- <div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtNoIdentificacionvInsumos" runat="server" MaxLength="15" CssClass="form-control" ></asp:TextBox>
|
<asp:TextBox ID="TxtNoIdentificacionvInsumos" runat="server" MaxLength="15" CssClass="form-control" ></asp:TextBox>
|
||||||
<label for="<%= TxtNoIdentificacionvInsumos.ClientID.ToString()%>">Clave Interna:</label>
|
<label for="<%= TxtNoIdentificacionvInsumos.ClientID.ToString()%>">Clave Interna:</label>
|
||||||
</div>
|
</div>--%>
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
|||||||
@@ -423,16 +423,7 @@ Partial Class Contratos_ContratoObra
|
|||||||
|
|
||||||
TAB.ActiveTabIndex = 0
|
TAB.ActiveTabIndex = 0
|
||||||
|
|
||||||
'If UsuarioActual.Empresa.CvePlataforma = 3 Then
|
|
||||||
' rdventa.Checked = True
|
|
||||||
' rdventa_CheckedChanged(Nothing, Nothing)
|
|
||||||
' If (DdlTipoContrato.Items.FindByValue("14") Is Nothing) Then
|
|
||||||
' DdlTipoContrato.Items.Insert(1, New ListItem("Contrato de Cuenta y Equipo", "14"))
|
|
||||||
' End If
|
|
||||||
' DdlTipoContrato.SelectedValue = "14"
|
|
||||||
' TipoContrato = 14
|
|
||||||
' BtnTipoContrato_Click(Nothing, Nothing)
|
|
||||||
'End If
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -444,8 +435,6 @@ Partial Class Contratos_ContratoObra
|
|||||||
CargaDatosEncabezado()
|
CargaDatosEncabezado()
|
||||||
|
|
||||||
|
|
||||||
' CargaImpuestosLocales()
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
@@ -468,11 +457,6 @@ Partial Class Contratos_ContratoObra
|
|||||||
GvInsumos.Columns(7).Visible = False
|
GvInsumos.Columns(7).Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'If CveTipoContrato.Contiene(11, 25) Then 'ciclo comercial
|
|
||||||
' Gv.Columns(9).Visible = False
|
|
||||||
' GvInsumos.Columns(8).Visible = False
|
|
||||||
'End If
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
TabPres.Visible = False
|
TabPres.Visible = False
|
||||||
Gv.Columns(8).Visible = True
|
Gv.Columns(8).Visible = True
|
||||||
@@ -503,7 +487,7 @@ Partial Class Contratos_ContratoObra
|
|||||||
|
|
||||||
CargaProyecto()
|
CargaProyecto()
|
||||||
CargaContratista()
|
CargaContratista()
|
||||||
' CargaVendedores()
|
|
||||||
|
|
||||||
DdlUM.DataSource = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa)
|
DdlUM.DataSource = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa)
|
||||||
DdlUM.DataBind()
|
DdlUM.DataBind()
|
||||||
@@ -511,36 +495,16 @@ Partial Class Contratos_ContratoObra
|
|||||||
DdlMoneda.DataBind()
|
DdlMoneda.DataBind()
|
||||||
|
|
||||||
|
|
||||||
' CargaContratoPadre()
|
|
||||||
CargaContratosEstatus()
|
CargaContratosEstatus()
|
||||||
CreaDT()
|
CreaDT()
|
||||||
|
|
||||||
'DdlAlmacenOrigen.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
|
||||||
'DdlAlmacenDestino.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
|
||||||
|
|
||||||
'If UsuarioActual.TienePermisoProceso(172) Then
|
|
||||||
' RowPorcentajeComision.Visible = True
|
|
||||||
'End If
|
|
||||||
If UsuarioActual.CveEmpresa.Contiene(72, 80) Then divResponsable.Visible = False
|
If UsuarioActual.CveEmpresa.Contiene(72, 80) Then divResponsable.Visible = False
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
'Public Sub CargaDireccionesEnvios(CveCliente As Integer)
|
|
||||||
' Dim ObjVentas As New ClsClientes
|
|
||||||
' If ObjVentas.DireccionEnvioGet(-1, CveCliente, -1) Then
|
|
||||||
|
|
||||||
' If ObjVentas.DtResultados.Rows.Count > 0 Then
|
|
||||||
' DdlClienteDireccionEnvio.DataSource = ObjVentas.DtResultados
|
|
||||||
' DdlClienteDireccionEnvio.DataBind()
|
|
||||||
' DivClienteDireccion.Visible = True
|
|
||||||
' Else
|
|
||||||
' DivClienteDireccion.Visible = False
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' End If
|
|
||||||
' ObjVentas.Dispose()
|
|
||||||
' UpGral.Update()
|
|
||||||
'End Sub
|
|
||||||
|
|
||||||
Protected Sub DdlMoneda_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlMoneda.SelectedIndexChanged
|
Protected Sub DdlMoneda_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlMoneda.SelectedIndexChanged
|
||||||
|
|
||||||
@@ -597,15 +561,9 @@ Partial Class Contratos_ContratoObra
|
|||||||
TxtFechaInicial.Text = ""
|
TxtFechaInicial.Text = ""
|
||||||
TxtFechaFinal.Text = ""
|
TxtFechaFinal.Text = ""
|
||||||
TxtPorIVA.Text = ""
|
TxtPorIVA.Text = ""
|
||||||
'txtMinimo.Text = ""
|
|
||||||
'txtMaximo.Text = ""
|
|
||||||
'TxtArchivo.Text = ""
|
|
||||||
|
|
||||||
DdlProyecto.SelectedValue = "-1"
|
DdlProyecto.SelectedValue = "-1"
|
||||||
'DdlSubProyectoContrato.SelectedValue = "-1"
|
|
||||||
'DdlContratoPadre.SelectedValue = "-1"
|
|
||||||
|
|
||||||
'Tab Presupuesto
|
|
||||||
TxtCantidad.Text = ""
|
TxtCantidad.Text = ""
|
||||||
TxtPU.Text = ""
|
TxtPU.Text = ""
|
||||||
TmpDT.Clear()
|
TmpDT.Clear()
|
||||||
@@ -621,151 +579,36 @@ Partial Class Contratos_ContratoObra
|
|||||||
If Not TipoContrato.Contiene({7, 9, 13, 16, 18, 21}) Then
|
If Not TipoContrato.Contiene({7, 9, 13, 16, 18, 21}) Then
|
||||||
TabAF.Visible = False
|
TabAF.Visible = False
|
||||||
End If
|
End If
|
||||||
'TabContratosGastos.Visible = False
|
|
||||||
|
|
||||||
|
|
||||||
'DONDE OCUPA ALMACEN
|
'DONDE OCUPA ALMACEN
|
||||||
Dim CveTipoAlmacenOrigen = "12,15"
|
Dim CveTipoAlmacenOrigen = "12,15"
|
||||||
Dim CveTipoAlmacenDestino = "11,12"
|
Dim CveTipoAlmacenDestino = "11,12"
|
||||||
|
|
||||||
'If TipoContrato.Contiene({7, 9, 13, 16, 18, 21, 27}) Then
|
|
||||||
' RowAlmacen.Visible = True
|
|
||||||
' If TipoContrato.Contiene(7, 9, 13, 21, 27) Then
|
|
||||||
' If TipoContrato.Contiene(27) Then
|
|
||||||
' CveTipoAlmacenOrigen = "1"
|
|
||||||
' CveTipoAlmacenDestino = "17"
|
|
||||||
' End If
|
|
||||||
' RowAlmacenOrigen.Visible = True
|
|
||||||
' End If
|
|
||||||
'End If
|
|
||||||
|
|
||||||
'Dim CveOrigen = DdlAlmacenOrigen.SelectedValue
|
|
||||||
'DdlAlmacenOrigen.Items.Clear()
|
|
||||||
'DdlAlmacenOrigen.SelectedValue = "-1"
|
|
||||||
'DdlAlmacenOrigen.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
|
||||||
'DdlAlmacenOrigen.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveTipoAlmacen IN ({CveTipoAlmacenOrigen})") ' GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1) 'GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
|
||||||
'DdlAlmacenOrigen.DataBind()
|
|
||||||
'DdlAlmacenOrigen.SelectedValueExist(CveOrigen)
|
|
||||||
''SI EL ALMACEN ANTERIOR DEL CONTRATO NO ESTA EN LOS ALMACENES ACTUALES LO INSERTA A FUERZAS
|
|
||||||
'If DdlAlmacenOrigen.SelectedValue <> CveOrigen Then
|
|
||||||
' DdlAlmacenOrigen.Items.Insert(1, New ListItem(GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Almacen", $"CveAlmacen = {CveOrigen}"), CveOrigen))
|
|
||||||
' DdlAlmacenOrigen.SelectedValueExist(CveOrigen)
|
|
||||||
'End If
|
|
||||||
|
|
||||||
'Dim CveDestino = DdlAlmacenDestino.SelectedValue
|
|
||||||
'DdlAlmacenDestino.Items.Clear()
|
|
||||||
'DdlAlmacenDestino.SelectedValue = "-1"
|
|
||||||
'DdlAlmacenDestino.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
|
||||||
'DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveTipoAlmacen In ({CveTipoAlmacenDestino})") 'GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1)
|
|
||||||
'DdlAlmacenDestino.DataBind()
|
|
||||||
'DdlAlmacenDestino.SelectedValueExist(CveDestino)
|
|
||||||
''SI EL ALMACEN ANTERIOR DEL CONTRATO NO ESTA EN LOS ALMACENES ACTUALES LO INSERTA A FUERZAS
|
|
||||||
'If DdlAlmacenDestino.SelectedValue <> CveDestino Then
|
|
||||||
' DdlAlmacenDestino.Items.Insert(1, New ListItem(GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Almacen", $"CveAlmacen = {CveDestino}"), CveDestino))
|
|
||||||
' DdlAlmacenDestino.SelectedValueExist(CveDestino)
|
|
||||||
'End If
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub MuestraPermiteAvance()
|
Private Sub MuestraPermiteAvance()
|
||||||
|
|
||||||
'If Not TipoContrato.Contiene({4, 5, 25, 11}) Then
|
|
||||||
' Gv.Columns(9).Visible = False
|
|
||||||
' GvInsumos.Columns(7).Visible = False
|
|
||||||
' THAvance.Style.Add("display", "none")
|
|
||||||
' TDAvance.Style.Add("display", "none")
|
|
||||||
' THAvance.Visible = False
|
|
||||||
' THAvanceInsumos.Visible = False
|
|
||||||
' ' tdCol7.Visible = False
|
|
||||||
' TDAvance.Visible = False
|
|
||||||
' TDAvanceInsumos.Visible = False
|
|
||||||
'Else
|
|
||||||
' Gv.Columns(9).Visible = True
|
|
||||||
' GvInsumos.Columns(6).Visible = True
|
|
||||||
' THAvance.Visible = True
|
|
||||||
' THAvanceInsumos.Visible = True
|
|
||||||
' 'tdCol7.Visible = True
|
|
||||||
' TDAvance.Visible = True
|
|
||||||
' TDAvanceInsumos.Visible = True
|
|
||||||
'End If
|
|
||||||
'UpTitulos.Update()
|
|
||||||
'UpGral.Update()
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " PANTALLA INICIAL"
|
|
||||||
'Protected Sub rpCompra_CheckedChanged(sender As Object, e As EventArgs) Handles rpCompra.CheckedChanged
|
|
||||||
' loadComboTipoContrato(False)
|
|
||||||
'End Sub
|
|
||||||
'Protected Sub rdventa_CheckedChanged(sender As Object, e As EventArgs) Handles rdventa.CheckedChanged
|
|
||||||
' loadComboTipoContrato(True)
|
|
||||||
'End Sub
|
|
||||||
|
|
||||||
'Private Sub loadComboTipoContrato(venta As Boolean)
|
|
||||||
' Try
|
|
||||||
' If venta Then
|
|
||||||
' DdlTipoContrato.DataSource = GlobalDTContratosTipos(UsuarioActual.CveEmpresa).FiltraParametros(" TipoMovimiento = 1")
|
|
||||||
|
|
||||||
' Else
|
|
||||||
' DdlTipoContrato.DataSource = GlobalDTContratosTipos(UsuarioActual.CveEmpresa).FiltraParametros(" TipoMovimiento = 0")
|
|
||||||
' End If
|
|
||||||
' dvDetContrato.Visible = True
|
|
||||||
' ' DdlTipoContrato.Visible = True
|
|
||||||
' DdlTipoContrato.DataBind()
|
|
||||||
' DdlTipoContrato.Items.Insert(0, New ListItem("Seleccione una opción", "-1"))
|
|
||||||
' If UsuarioActual.CveEmpresa.Contiene(1, 11, 4, 12) And venta Then
|
|
||||||
' DdlTipoContrato.Items.Insert(1, New ListItem("Contrato con facturación ciclica", "25"))
|
|
||||||
' End If
|
|
||||||
' UPTipo.Update()
|
|
||||||
' Catch ex As Exception
|
|
||||||
' Alert(ex.Message, TipoMensaje.MsgError)
|
|
||||||
|
|
||||||
' End Try
|
|
||||||
'End Sub
|
|
||||||
|
|
||||||
#End Region
|
|
||||||
|
|
||||||
#Region " INICIO DE PAGINA "
|
#Region " INICIO DE PAGINA "
|
||||||
|
|
||||||
'Protected Sub DdlTipoContrato_SelectedIndexChanged(sender As Object, e As EventArgs)
|
|
||||||
' CargaTipoContrato()
|
|
||||||
|
|
||||||
' '12/04/2018 - Se configuran campos de convenio de precio fijo
|
|
||||||
' If DdlTipoContrato.SelectedValue = "28" Then
|
|
||||||
' CargaConvenioPrecioFijo()
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' If UsuarioActual.CveEmpresa = 72 And DdlTipoContrato.SelectedValue.Contiene("7", "8", "10", "13", "28") Then
|
|
||||||
' GetNoContratoNuevo()
|
|
||||||
' End If
|
|
||||||
|
|
||||||
'End Sub
|
|
||||||
|
|
||||||
|
|
||||||
'Private Sub CargaTipoContrato()
|
|
||||||
' If DdlTipoContrato.SelectedIndex = 0 Then
|
|
||||||
' TxtDescripcionTipoContrato.Text = ""
|
|
||||||
' Exit Sub
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' TipoContrato = DdlTipoContrato.SelectedValue.ToEntero
|
|
||||||
' If GlobalDTContratosTipos(UsuarioActual.CveEmpresa).FiltraParametros("CveContratoTipo = " & DdlTipoContrato.SelectedValue).Rows.Count > 0 Then
|
|
||||||
' TxtDescripcionTipoContrato.Text = GlobalDTContratosTipos(UsuarioActual.CveEmpresa).FiltraParametros("CveContratoTipo = " & DdlTipoContrato.SelectedValue)(0)("Descripcion").ToString()
|
|
||||||
' TxtDescripcionTipoContrato.Visible = True
|
|
||||||
' End If
|
|
||||||
|
|
||||||
|
|
||||||
' CargaContratoPadre()
|
|
||||||
' UpProyecto.Update()
|
|
||||||
'End Sub
|
|
||||||
|
|
||||||
Private Sub modalidades(modalidadDetalleInt As Integer)
|
Private Sub modalidades(modalidadDetalleInt As Integer)
|
||||||
|
|
||||||
If modalidadDetalleInt = 1 Then
|
If modalidadDetalleInt = 1 Then
|
||||||
ModalidadDetalle = 1
|
ModalidadDetalle = 1
|
||||||
|
|
||||||
' DvMax.Visible = True
|
|
||||||
' DvMin.Visible = True
|
|
||||||
DvTotal.Visible = True
|
DvTotal.Visible = True
|
||||||
|
|
||||||
|
|
||||||
@@ -774,34 +617,24 @@ Partial Class Contratos_ContratoObra
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If CveTipoContrato = 25 Then
|
If CveTipoContrato = 25 Then
|
||||||
'DvMax.Visible = False
|
|
||||||
' DvMin.Visible = False
|
|
||||||
DvTotal.Visible = False
|
DvTotal.Visible = False
|
||||||
|
|
||||||
' DivFianzas.Visible = False
|
|
||||||
'DivImpuestosLocales.Visible = False
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ElseIf modalidadDetalleInt = 2 Then
|
ElseIf modalidadDetalleInt = 2 Then
|
||||||
ModalidadDetalle = 2
|
ModalidadDetalle = 2
|
||||||
|
|
||||||
' DvMax.Visible = True
|
|
||||||
' DvMin.Visible = True
|
|
||||||
DvTotal.Visible = True
|
DvTotal.Visible = True
|
||||||
'TxtCantidad.Visible = False
|
|
||||||
|
|
||||||
If CveContrato > 0 AndAlso CveTipoContrato <> 25 Then
|
If CveContrato > 0 AndAlso CveTipoContrato <> 25 Then
|
||||||
TableDatosCabecera.Visible = True
|
TableDatosCabecera.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CveTipoContrato = 25 Then
|
|
||||||
' DvMax.Visible = False
|
|
||||||
' DvMin.Visible = False
|
|
||||||
DvTotal.Visible = False
|
|
||||||
|
|
||||||
' DivFianzas.Visible = False
|
|
||||||
' DivImpuestosLocales.Visible = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -810,126 +643,7 @@ Partial Class Contratos_ContratoObra
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
'Protected Sub chkDetalleContrato_CheckedChanged(sender As Object, e As EventArgs)
|
|
||||||
' If chkDetalleContrato.Checked = False Then
|
|
||||||
' modalidades(1)
|
|
||||||
' Else
|
|
||||||
' modalidades(2)
|
|
||||||
' End If
|
|
||||||
'End Sub
|
|
||||||
|
|
||||||
'Protected Sub BtnTipoContrato_Click(sender As Object, e As EventArgs) Handles BtnTipoContrato.Click
|
|
||||||
' If DdlTipoContrato.SelectedIndex = 0 Then
|
|
||||||
' Alert("Tiene que seleccionar un tipo de Contrato.", TipoMensaje.MsgAdvertencia)
|
|
||||||
' Exit Sub
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' Me.CveTipoContrato = DdlTipoContrato.SelectedValue.ToEntero
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
' If rpCompra.Checked Then
|
|
||||||
|
|
||||||
' Response.Redirect($"/Contratos/Presupuestos.aspx?CveContrato=-1&CveContratoTipo={Me.CveTipoContrato}")
|
|
||||||
' 'RegistraScript("window.location='/Contratos/Presupuestos.aspx")
|
|
||||||
' Else
|
|
||||||
|
|
||||||
' modalidades(1)
|
|
||||||
|
|
||||||
' DivTipoContrato.Visible = False
|
|
||||||
|
|
||||||
' If rdventa.Checked Then
|
|
||||||
' DdlCliente.Visible = True
|
|
||||||
' TrCliente.Visible = True
|
|
||||||
|
|
||||||
' DdlContratista.Visible = False
|
|
||||||
' TrProveedor.Visible = False
|
|
||||||
|
|
||||||
|
|
||||||
' Else
|
|
||||||
' DdlCliente.Visible = False
|
|
||||||
' TrCliente.Visible = False
|
|
||||||
|
|
||||||
' TrProveedor.Visible = True
|
|
||||||
' DdlContratista.Visible = True
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' If rdventa.Checked Then
|
|
||||||
' cargaClientes()
|
|
||||||
' Else
|
|
||||||
' CargaContratista()
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' If DdlTipoContrato.SelectedValue = "14" Then
|
|
||||||
' TrCtaEquipo.Visible = True
|
|
||||||
' TrPeriodo.Visible = True
|
|
||||||
' RFVEstatus.ValidationGroup = ""
|
|
||||||
' RequiredFieldValidator1.ValidationGroup = ""
|
|
||||||
' DvMin.Visible = True
|
|
||||||
' DvMax.Visible = True
|
|
||||||
' DvTotal.Visible = True
|
|
||||||
' RowFlexible.Visible = False
|
|
||||||
' RowEstatus.Visible = False
|
|
||||||
' RowPorcentajeComision.Visible = False
|
|
||||||
' dvAddendum.Visible = False
|
|
||||||
' CargaPeriodos()
|
|
||||||
' CargaPlantillas()
|
|
||||||
' TrContratoPlantilla.Visible = True
|
|
||||||
' TabPres.HeaderText = "Partidas"
|
|
||||||
' Else
|
|
||||||
' DtPeriodo = Nothing
|
|
||||||
' End If
|
|
||||||
|
|
||||||
|
|
||||||
' If DdlTipoContrato.SelectedValue = "25" Then
|
|
||||||
' trLicitacion.Visible = False
|
|
||||||
' divResponsable.Visible = False
|
|
||||||
' TrPeriodo.Visible = True
|
|
||||||
' CargaPeriodos()
|
|
||||||
' trIva.Visible = False
|
|
||||||
' trAnticipo.Visible = False
|
|
||||||
' trAmortizacion.Visible = False
|
|
||||||
' trPorGarantia.Visible = False
|
|
||||||
' DvMin.Visible = False
|
|
||||||
' RowFlexible.Visible = False
|
|
||||||
' RowPorcentajeComision.Visible = False
|
|
||||||
' DvMax.Visible = False
|
|
||||||
' DvTotal.Visible = False
|
|
||||||
' RowEstatus.Visible = False
|
|
||||||
' TabPres.HeaderText = "Partidas"
|
|
||||||
' DdlSubProyectoContrato.AutoPostBack = True
|
|
||||||
' DvObservaciones.Visible = True
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' 'Dim CveTipoContrato = DdlTipoContrato.SelectedValue
|
|
||||||
|
|
||||||
' 'Dim TipoMov = GlobalDTContratosTipos.AsEnumerable().Where(Function(a) a("CveContratoTipo").ToString = CveTipoContrato).FirstOrDefault()("TipoMovimiento")
|
|
||||||
|
|
||||||
|
|
||||||
' DivContent.Visible = True
|
|
||||||
' ConfiguraTipos()
|
|
||||||
|
|
||||||
|
|
||||||
' UpGral.Update()
|
|
||||||
' 'UPTipo.Update()
|
|
||||||
' End If
|
|
||||||
|
|
||||||
'End Sub
|
|
||||||
|
|
||||||
|
|
||||||
'Protected Sub DdlSubProyectoContrato_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlSubProyectoContrato.SelectedIndexChanged
|
|
||||||
' Dim ObjFolios As New ClsGralFolios
|
|
||||||
' If ObjFolios.GetFolios("Con", UsuarioActual.CveEmpresa) Then
|
|
||||||
' If ObjFolios.DtResultados.FiltraParametros($"CveSubProyecto = {DdlSubProyectoContrato.SelectedValue}").Rows.Count > 0 Then
|
|
||||||
' FolioSugerido = $"{GlobalDTSubProyectos(-1, DdlSubProyectoContrato.SelectedValue.ToEntero).FiltroPrimeroValor("Serie")}-{ObjFolios.DtResultados.FiltroPrimeroValor("FActual", $"CveSubProyecto = {DdlSubProyectoContrato.SelectedValue}")}"
|
|
||||||
' TxtNumeroContrato.Text = FolioSugerido
|
|
||||||
' Else
|
|
||||||
' Alert("La sucursal no cuenta con folios de contratos", TipoMensaje.MsgAdvertencia)
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
' ObjFolios.Dispose()
|
|
||||||
' UpGral.Update()
|
|
||||||
'End Sub
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " CARGA DATOS "
|
#Region " CARGA DATOS "
|
||||||
@@ -959,7 +673,6 @@ Partial Class Contratos_ContratoObra
|
|||||||
TxtNumeroContrato.Text = ObjContratos.NumeroContrato
|
TxtNumeroContrato.Text = ObjContratos.NumeroContrato
|
||||||
TxtNumeroLicitacion.Text = ObjContratos.NumeroLicitacion
|
TxtNumeroLicitacion.Text = ObjContratos.NumeroLicitacion
|
||||||
TipoContrato = ObjContratos.CveContratoTipo
|
TipoContrato = ObjContratos.CveContratoTipo
|
||||||
' TxtPorcentajeComision.Text = ObjContratos.PorcentajeComision.ToString
|
|
||||||
CveTipoContrato = ObjContratos.DtResultados.Rows(0)("CveContratoTipo").ToString.ToEntero
|
CveTipoContrato = ObjContratos.DtResultados.Rows(0)("CveContratoTipo").ToString.ToEntero
|
||||||
TxtCorreoNotificacion.Text = ObjContratos.DtResultados.Rows(0)("CorreoNotificacionPedDev").ToString
|
TxtCorreoNotificacion.Text = ObjContratos.DtResultados.Rows(0)("CorreoNotificacionPedDev").ToString
|
||||||
DdlCliente.SelectedValueExist(ObjContratos.DtResultados.Rows(0)("CveCliente").ToString)
|
DdlCliente.SelectedValueExist(ObjContratos.DtResultados.Rows(0)("CveCliente").ToString)
|
||||||
@@ -977,102 +690,41 @@ Partial Class Contratos_ContratoObra
|
|||||||
DdlSucursalCliente.SelectedValue = ObjContratos.CveSucursalCliente.ToString
|
DdlSucursalCliente.SelectedValue = ObjContratos.CveSucursalCliente.ToString
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
'If DdlCliente.SelectedValue.ToEntero > 0 Then
|
|
||||||
' CargaDireccionesEnvios(DdlCliente.SelectedValue.ToEntero)
|
|
||||||
' DdlClienteDireccionEnvio.SelectedValueExist(ObjContratos.DtResultados.Rows(0)("CveDireccionEnvio").ToString.ToEntero)
|
|
||||||
'End If
|
|
||||||
|
|
||||||
'CargaContratoPadre()
|
|
||||||
CargaContratoAddendum()
|
CargaContratoAddendum()
|
||||||
|
|
||||||
If ObjContratos.DtResultados.Rows(0)("CveContratoTipo").ToString.ToEntero = 14 Then
|
If ObjContratos.DtResultados.Rows(0)("CveContratoTipo").ToString.ToEntero = 14 Then
|
||||||
' CargaPeriodos()
|
|
||||||
'TrCtaEquipo.Visible = True
|
|
||||||
' TrPeriodo.Visible = True
|
|
||||||
RFVEstatus.ValidationGroup = ""
|
RFVEstatus.ValidationGroup = ""
|
||||||
' RequiredFieldValidator1.ValidationGroup = ""
|
|
||||||
' DvMin.Visible = True
|
|
||||||
' DvMax.Visible = True
|
|
||||||
DvTotal.Visible = True
|
DvTotal.Visible = True
|
||||||
'RowFlexible.Visible = False
|
|
||||||
'RowPorcentajeComision.Visible = False
|
|
||||||
RowEstatus.Visible = False
|
RowEstatus.Visible = False
|
||||||
'dvAddendum.Visible = False
|
|
||||||
'liImprimir.Visible = True
|
|
||||||
CargaPlantillas()
|
CargaPlantillas()
|
||||||
'TrContratoPlantilla.Visible = True
|
|
||||||
'DdlPeriodo.SelectedValueExist(ObjContratos.DtResultados.Rows(0)("CvePeriodo"))
|
|
||||||
'DdlCuentaEquipo.SelectedValueExist(ObjContratos.DtResultados.Rows(0)("CveCuentaEquipo"))
|
|
||||||
'DdlPlantillaContrato.SelectedValueExist(ObjContratos.DtResultados.Rows(0)("CveContratoPlantilla"))
|
|
||||||
TabPres.HeaderText = "Partidas"
|
TabPres.HeaderText = "Partidas"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ObjContratos.DtResultados.Rows(0)("CveContratoTipo").ToString.ToEntero = 25 Then
|
If ObjContratos.DtResultados.Rows(0)("CveContratoTipo").ToString.ToEntero = 25 Then
|
||||||
trLicitacion.Visible = False
|
trLicitacion.Visible = False
|
||||||
divResponsable.Visible = False
|
divResponsable.Visible = False
|
||||||
'TrPeriodo.Visible = True
|
|
||||||
'CargaPeriodos()
|
|
||||||
trIva.Visible = False
|
trIva.Visible = False
|
||||||
trAnticipo.Visible = False
|
trAnticipo.Visible = False
|
||||||
trAmortizacion.Visible = False
|
trAmortizacion.Visible = False
|
||||||
trPorGarantia.Visible = False
|
trPorGarantia.Visible = False
|
||||||
'DvMin.Visible = False
|
|
||||||
' DvMax.Visible = False
|
|
||||||
DvTotal.Visible = False
|
DvTotal.Visible = False
|
||||||
TabPVInsumos.Visible = False
|
TabPVInsumos.Visible = False
|
||||||
RowEstatus.Visible = False
|
RowEstatus.Visible = False
|
||||||
TabPres.HeaderText = "Partidas"
|
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")
|
|
||||||
'RowFlexible.Visible = False
|
|
||||||
TableDatosCabecera.Visible = False
|
TableDatosCabecera.Visible = False
|
||||||
TabAvanveDocumento.Visible = False
|
TabAvanveDocumento.Visible = False
|
||||||
TabSistema.Visible = False
|
TabSistema.Visible = False
|
||||||
'RowPorcentajeComision.Visible = False
|
|
||||||
TabContratosGastos.Visible = False
|
TabContratosGastos.Visible = False
|
||||||
'tdCveInterna.Text = ""
|
|
||||||
'tdLimitar.Text = ""
|
|
||||||
'tdOC.Text = ""
|
|
||||||
'THAvance.Visible = False
|
|
||||||
'THAvance.Style.Add("display", "none")
|
|
||||||
TDAvance.Style.Add("display", "none")
|
TDAvance.Style.Add("display", "none")
|
||||||
TxtOCInterna.Visible = False
|
'TxtNoIdentificacionv.Visible = False
|
||||||
TxtNoIdentificacionv.Visible = False
|
|
||||||
ChkLimitarVenta.Visible = False
|
|
||||||
DvObservaciones.Visible = True
|
DvObservaciones.Visible = True
|
||||||
'TDObservacion.Visible = True
|
|
||||||
'tdObservaciones.Visible = True
|
|
||||||
TxtObservaciones.Text = ObjContratos.DtResultados.Rows(0)("Observaciones").ToString
|
TxtObservaciones.Text = ObjContratos.DtResultados.Rows(0)("Observaciones").ToString
|
||||||
Gv.Columns(3).Visible = True
|
Gv.Columns(3).Visible = True
|
||||||
'DdlPeriodo.SelectedValueExist(ObjContratos.DtResultados.Rows(0)("CvePeriodo").ToString)
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'If ObjContratos.DtResultados.Rows(0)("CveVendedor").ToString.ToEntero > 0 Then
|
|
||||||
' DdlVendedor.SelectedValueExist(ObjContratos.DtResultados.Rows(0)("CveVendedor"))
|
|
||||||
'End If
|
|
||||||
|
|
||||||
|
|
||||||
'If (DdlAlmacenDestino.Items.FindByValue(ObjContratos.CveAlmacen.ToString()) Is Nothing) Then
|
|
||||||
' Dim dr As DataRow = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveAlmacen = {0}", ObjContratos.CveAlmacen))
|
|
||||||
' If dr IsNot Nothing Then
|
|
||||||
' DdlAlmacenDestino.Items.Insert(1, New ListItem(dr("Almacen").ToString, dr("CveAlmacen").ToString)) ' lo genera Obj.SelectedValue = Valor.ToString
|
|
||||||
' End If
|
|
||||||
'End If
|
|
||||||
'DdlAlmacenDestino.SelectedValue = ObjContratos.CveAlmacen.ToString
|
|
||||||
|
|
||||||
'If (DdlAlmacenOrigen.Items.FindByValue(ObjContratos.CveAlmacenOrigen.ToString()) Is Nothing) Then
|
|
||||||
' Dim dr As DataRow = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveAlmacen = {0}", ObjContratos.CveAlmacenOrigen))
|
|
||||||
' If dr IsNot Nothing Then
|
|
||||||
' DdlAlmacenOrigen.Items.Insert(1, New ListItem(dr("Almacen").ToString, dr("CveAlmacen").ToString)) ' lo genera Obj.SelectedValue = Valor.ToString
|
|
||||||
' End If
|
|
||||||
'End If
|
|
||||||
'DdlAlmacenOrigen.SelectedValue = ObjContratos.CveAlmacenOrigen.ToString
|
|
||||||
|
|
||||||
FechaF = ObjContratos.FechaFinal
|
FechaF = ObjContratos.FechaFinal
|
||||||
FechaI = ObjContratos.FechaInicial
|
FechaI = ObjContratos.FechaInicial
|
||||||
TxtFechaFinal.Text = ObjContratos.FechaFinal.ToShortDateString
|
TxtFechaFinal.Text = ObjContratos.FechaFinal.ToShortDateString
|
||||||
@@ -1093,51 +745,24 @@ Partial Class Contratos_ContratoObra
|
|||||||
|
|
||||||
|
|
||||||
TxtPorIVA.Text = ObjContratos.PorIVA.ToString
|
TxtPorIVA.Text = ObjContratos.PorIVA.ToString
|
||||||
'txtMinimo.Text = ObjContratos.Minimo.FormatoNumero
|
|
||||||
'txtMaximo.Text = ObjContratos.Maximo.FormatoNumero
|
|
||||||
TxtTotal.Text = ObjContratos.Importe.FormatoNumero
|
TxtTotal.Text = ObjContratos.Importe.FormatoNumero
|
||||||
'TxtArchivo.Text = ObjContratos.Archivo
|
|
||||||
'DdlTipoGarantia.SelectedValueExist(ObjContratos.TipoGarantia)
|
|
||||||
'DdlEstatusFianza.SelectedValueExist(ObjContratos.EstatusFianza)
|
|
||||||
'TxtFolio.Text = ObjContratos.Folio.ToString
|
|
||||||
'txtFechaVenc.Text = ObjContratos.FechaVenc.ToString
|
|
||||||
DdlEstatus.SelectedValueExist(ObjContratos.CveContratosEstatus.ToString)
|
DdlEstatus.SelectedValueExist(ObjContratos.CveContratosEstatus.ToString)
|
||||||
CargarFianzas()
|
CargarFianzas()
|
||||||
|
|
||||||
If ObjContratos.TipoEstatus = 2 Then
|
If ObjContratos.TipoEstatus = 2 Then
|
||||||
DdlEstatus.Enabled = False
|
DdlEstatus.Enabled = False
|
||||||
If UsuarioActual.TienePermisoProceso(173) Then
|
|
||||||
'liVigenteContrato.Visible = True
|
|
||||||
'LBVigenteContrato.Visible = True
|
|
||||||
End If
|
|
||||||
Else
|
Else
|
||||||
DdlEstatus.Items.Clear()
|
DdlEstatus.Items.Clear()
|
||||||
'Se esta ocultando concluido'
|
'Se esta ocultando concluido'
|
||||||
DdlEstatus.DataSource = CType(DdlEstatus.DataSource, DataTable).FiltraParametros("TipoEstatus NOT IN (2)")
|
DdlEstatus.DataSource = CType(DdlEstatus.DataSource, DataTable).FiltraParametros("TipoEstatus NOT IN (2)")
|
||||||
DdlEstatus.DataBind()
|
DdlEstatus.DataBind()
|
||||||
Select Case ObjContratos.TipoEstatus
|
|
||||||
Case 1
|
|
||||||
If UsuarioActual.TienePermisoProceso(173) Then
|
|
||||||
' liTerminarContrato.Visible = True
|
|
||||||
'LBTerminarContrato.Visible = True
|
|
||||||
|
|
||||||
' liCancelarContrato.Visible = True
|
|
||||||
'LBCancelarContrato.Visible = True
|
|
||||||
End If
|
|
||||||
Case 2, 3 ' reactivar el contrato
|
|
||||||
If UsuarioActual.TienePermisoProceso(173) Then
|
|
||||||
' liVigenteContrato.Visible = True
|
|
||||||
' LBVigenteContrato.Visible = True
|
|
||||||
End If
|
|
||||||
End Select
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
TxtTipoCambio.Text = ObjContratos.TipoCambio.ToString
|
TxtTipoCambio.Text = ObjContratos.TipoCambio.ToString
|
||||||
|
|
||||||
ModalidadDetalle = ObjContratos.ModalidadDetalle
|
ModalidadDetalle = ObjContratos.ModalidadDetalle
|
||||||
'chkDetalleContrato.Checked = If(ModalidadDetalle = 2, True, False)
|
|
||||||
'ChkImpuestosLocales.Checked = ObjContratos.AplicaImpuestosLocales
|
|
||||||
'GvImpuestosLocales.Visible = ObjContratos.AplicaImpuestosLocales
|
|
||||||
modalidades(ModalidadDetalle)
|
modalidades(ModalidadDetalle)
|
||||||
|
|
||||||
CargaGVGastos()
|
CargaGVGastos()
|
||||||
@@ -1154,18 +779,10 @@ Partial Class Contratos_ContratoObra
|
|||||||
Contratante = ObjContratos.NombreComercial.ToString
|
Contratante = ObjContratos.NombreComercial.ToString
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'AFU.Visible = False
|
|
||||||
|
|
||||||
'TxtArchivo.Text = ObjContratos.Archivo.ToString
|
|
||||||
|
|
||||||
'ChkEstatusContrato.Checked = CBool(ObjContratos.EstatusContrato)
|
|
||||||
'DdlContratoPadre.SelectedValue = ObjContratos.CveContratoPadre.ToString
|
|
||||||
LblFechaCaptura.Text = ObjContratos.FechaIng.ToShortDateString
|
LblFechaCaptura.Text = ObjContratos.FechaIng.ToShortDateString
|
||||||
'HplSecciones.NavigateUrl = "/Contratos/ContratosSecciones.aspx?CveContrato=" & CveContrato
|
|
||||||
'CargaDatosPresup()
|
|
||||||
|
|
||||||
CargaPresupuesto()
|
CargaPresupuesto()
|
||||||
' MuestraPermiteAvance()
|
|
||||||
cargarBitacora()
|
cargarBitacora()
|
||||||
If LblImporte.Text.ToDecimal <= 0 Then
|
If LblImporte.Text.ToDecimal <= 0 Then
|
||||||
LblImporte.Text = ObjContratos.ImporteTotal.ToString.FormatoNumero
|
LblImporte.Text = ObjContratos.ImporteTotal.ToString.FormatoNumero
|
||||||
@@ -1173,7 +790,7 @@ Partial Class Contratos_ContratoObra
|
|||||||
|
|
||||||
If Not IsDBNull(ObjContratos.Archivo) AndAlso ObjContratos.Archivo <> "" AndAlso ObjContratos.Archivo <> "-1" AndAlso ObjContratos.Archivo <> $"{ObjContratos.CveContrato}." Then
|
If Not IsDBNull(ObjContratos.Archivo) AndAlso ObjContratos.Archivo <> "" AndAlso ObjContratos.Archivo <> "-1" AndAlso ObjContratos.Archivo <> $"{ObjContratos.CveContrato}." Then
|
||||||
ViewState("FUrl") = Path.Combine(UsuarioActual.Empresa.Ruta, "CONTRATOS", ObjContratos.Archivo)
|
ViewState("FUrl") = Path.Combine(UsuarioActual.Empresa.Ruta, "CONTRATOS", ObjContratos.Archivo)
|
||||||
'A2.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CONTRATO&CveEmpresa={0}&Archivo={1}", ObjContratos.CveEmpresa, ViewState("FUrl").ToString)))
|
|
||||||
BtnDescargar.Visible = True
|
BtnDescargar.Visible = True
|
||||||
Else
|
Else
|
||||||
BtnDescargar.Visible = False
|
BtnDescargar.Visible = False
|
||||||
@@ -1245,21 +862,19 @@ Partial Class Contratos_ContratoObra
|
|||||||
|
|
||||||
Private Sub CargarFianzas()
|
Private Sub CargarFianzas()
|
||||||
|
|
||||||
'DivFianzas.Visible = True
|
|
||||||
|
|
||||||
Dim ObjContrato As ClsContratos = New ClsContratos()
|
Dim ObjContrato As ClsContratos = New ClsContratos()
|
||||||
|
|
||||||
If ObjContrato.GetContratoFianza(CveContrato, -1, "-1", "-1", UsuarioActual.CveEmpresa, -1) Then
|
If ObjContrato.GetContratoFianza(CveContrato, -1, "-1", "-1", UsuarioActual.CveEmpresa, -1) Then
|
||||||
DtTmpFianzas = ObjContrato.DtResultados
|
DtTmpFianzas = ObjContrato.DtResultados
|
||||||
' GvFianzas.DataSource = ObjContrato.DtResultados
|
|
||||||
|
|
||||||
DtTmpFianzasInicial = DtTmpFianzas.Copy()
|
DtTmpFianzasInicial = DtTmpFianzas.Copy()
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ObjContrato.Dispose()
|
ObjContrato.Dispose()
|
||||||
' GvFianzas.DataBind()
|
|
||||||
' UpGvFianzas.Update()
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
@@ -1279,17 +894,12 @@ Partial Class Contratos_ContratoObra
|
|||||||
Dim Ruta = Session("FileFolder").ToString
|
Dim Ruta = Session("FileFolder").ToString
|
||||||
|
|
||||||
Dim Minimo, Maximo, Total As Double
|
Dim Minimo, Maximo, Total As Double
|
||||||
'If txtMinimo.Text.ToDouble > 0 Then Minimo = txtMinimo.Text.ToDouble Else Minimo = -1
|
|
||||||
'If txtMaximo.Text.ToDouble > 0 Then Maximo = txtMaximo.Text.ToDouble Else Maximo = -1
|
|
||||||
'If TxtTotal.Text.ToDouble > 0 Then Total = TxtTotal.Text.ToDouble Else Total = -1
|
|
||||||
Minimo = 0 'txtMinimo.Text.ToDouble
|
Minimo = 0 'txtMinimo.Text.ToDouble
|
||||||
Maximo = 0 'txtMaximo.Text.ToDouble
|
Maximo = 0 'txtMaximo.Text.ToDouble
|
||||||
Total = TxtTotal.Text.ToDouble
|
Total = TxtTotal.Text.ToDouble
|
||||||
|
|
||||||
'If DdlTipoContrato.SelectedValue = "25" AndAlso DdlPeriodo.SelectedValue.ToEntero() <= 0 Then
|
|
||||||
' Alert("Debe seleccionar el periodo de facturación.", TipoMensaje.MsgAdvertencia)
|
|
||||||
' Exit Sub
|
|
||||||
'End If
|
|
||||||
|
|
||||||
If DdlMoneda.SelectedIndex > 0 Then
|
If DdlMoneda.SelectedIndex > 0 Then
|
||||||
If TxtTipoCambio.Text.Trim.Length = 0 Or TxtTipoCambio.Text.Trim.ToDouble = 0.0 Then
|
If TxtTipoCambio.Text.Trim.Length = 0 Or TxtTipoCambio.Text.Trim.ToDouble = 0.0 Then
|
||||||
@@ -1350,28 +960,7 @@ Partial Class Contratos_ContratoObra
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'If UsuarioActual.Empresa.CvePlataforma = 3 AndAlso DdlTipoContrato.SelectedValue = "14" Then
|
|
||||||
' Dim FechaI As DateTime = TxtFechaInicial.Text.ToDateTime
|
|
||||||
' Dim FechaF As DateTime = TxtFechaFinal.Text.ToDateTime
|
|
||||||
' Dim Periodo As Integer = DtPeriodo.FiltraParametros($"CvePeriodo = {DdlPeriodo.SelectedValue.ToEntero}").Rows(0)("Dias").ToString.ToEntero
|
|
||||||
' Dim VigenciaEnDias As Double = DateDiff(DateInterval.Day, FechaI, FechaF)
|
|
||||||
' Dim CiclosComerciales As Integer = Math.Round(VigenciaEnDias / Periodo).ToEntero
|
|
||||||
' For Ciclo As Integer = 1 To CiclosComerciales
|
|
||||||
' If Not ObjContratos.CicloComercialAdd(CveContrato, -1, DdlCliente.SelectedValue.ToEntero, False, -1, 1, UsuarioActual.CveEmpresa, FechaI.AddDays(Periodo * Ciclo)) Then TieneError = True : Exit For
|
|
||||||
' Next
|
|
||||||
'ElseIf DdlTipoContrato.SelectedValue = "25" Then
|
|
||||||
' Dim FechaI As DateTime = TxtFechaInicial.Text.ToDateTime
|
|
||||||
' Dim FechaF As DateTime = TxtFechaFinal.Text.ToDateTime
|
|
||||||
' If FechaI >= DateTime.Today Then
|
|
||||||
' If Not ObjContratos.CicloComercialAdd(CveContrato, -1, DdlCliente.SelectedValue.ToEntero, False, -1, 1, UsuarioActual.CveEmpresa, FechaI) Then TieneError = True
|
|
||||||
' End If
|
|
||||||
' Dim Periodo As Integer = DtPeriodo.FiltroPrimeroValor("Meses", $"CvePeriodo = {DdlPeriodo.SelectedValue.ToEntero}").ToEntero
|
|
||||||
' Dim VigenciaMeses As Double = DateDiff(DateInterval.Month, FechaI, FechaF)
|
|
||||||
' Dim CiclosComerciales As Integer = Math.Ceiling(VigenciaMeses / Periodo).ToEntero
|
|
||||||
' For Ciclo As Integer = 1 To CiclosComerciales
|
|
||||||
' If Not ObjContratos.CicloComercialAdd(CveContrato, -1, DdlCliente.SelectedValue.ToEntero, False, -1, 1, UsuarioActual.CveEmpresa, If(FechaI.AddMonths(Periodo * Ciclo) > FechaF, FechaF, FechaI.AddMonths(Periodo * Ciclo))) Then TieneError = True : Exit For
|
|
||||||
' Next
|
|
||||||
'End If
|
|
||||||
|
|
||||||
If TxtNumeroContrato.Text = FolioSugerido Then
|
If TxtNumeroContrato.Text = FolioSugerido Then
|
||||||
Dim ObjFolios As New ClsGralFolios
|
Dim ObjFolios As New ClsGralFolios
|
||||||
@@ -1383,21 +972,6 @@ Partial Class Contratos_ContratoObra
|
|||||||
ObjFolios.Dispose()
|
ObjFolios.Dispose()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'If ChkImpuestosLocales.Checked Then
|
|
||||||
' Dim count As Integer = 0
|
|
||||||
|
|
||||||
' For Each GVR As GridViewRow In GvImpuestosLocales.Rows
|
|
||||||
' If GVR.FCCheckBox("ChkDeduccion").Checked Then
|
|
||||||
' count = count + 1
|
|
||||||
' ObjContratos.AddContratoImpuestosLocales(CveContrato, GVR.DataKey("CveImpuestoLocal").ToEntero)
|
|
||||||
' End If
|
|
||||||
' Next
|
|
||||||
|
|
||||||
' If count = 0 Then
|
|
||||||
' Alert("Debe seleccionar un Impuesto Local", TipoMensaje.MsgAdvertencia)
|
|
||||||
' TieneError = True
|
|
||||||
' End If
|
|
||||||
'End If
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
TieneError = True
|
TieneError = True
|
||||||
@@ -1429,35 +1003,6 @@ Partial Class Contratos_ContratoObra
|
|||||||
'Renombrar archivo
|
'Renombrar archivo
|
||||||
If Not TieneError Then
|
If Not TieneError Then
|
||||||
|
|
||||||
'If UsuarioActual.Empresa.CvePlataforma = 3 AndAlso DdlTipoContrato.SelectedValue = "14" Then
|
|
||||||
' Dim FechaIN As DateTime = TxtFechaInicial.Text.ToDateTime
|
|
||||||
' Dim FechaFN As DateTime = TxtFechaFinal.Text.ToDateTime
|
|
||||||
' Dim Periodo As Integer = DtPeriodo.FiltraParametros($"CvePeriodo = {DdlPeriodo.SelectedValue.ToEntero}").Rows(0)("Dias").ToString.ToEntero
|
|
||||||
' Dim VigenciaEnDias As Double = DateDiff(DateInterval.Day, FechaI, FechaF)
|
|
||||||
' Dim CiclosComerciales As Integer = Math.Round(VigenciaEnDias / Periodo).ToEntero
|
|
||||||
' For Ciclo As Integer = 1 To CiclosComerciales
|
|
||||||
' If Not ObjContratos.CicloComercialAdd(CveContrato, -1, DdlCliente.SelectedValue.ToEntero, False, -1, 1, UsuarioActual.CveEmpresa, FechaI.AddDays(Periodo * Ciclo)) Then TieneError = True : Exit For
|
|
||||||
' Next
|
|
||||||
'ElseIf CveTipoContrato = 25 Then
|
|
||||||
' Dim FechaIN As DateTime = TxtFechaInicial.Text.ToDateTime
|
|
||||||
' Dim FechaFN As DateTime = TxtFechaFinal.Text.ToDateTime
|
|
||||||
' If FechaFN <> FechaF OrElse FechaI <> FechaIN Then
|
|
||||||
' If Not ObjContratos.CicloComercialDelete(CveContrato, False, UsuarioActual.CveEmpresa) Then
|
|
||||||
' TieneError = True
|
|
||||||
' End If
|
|
||||||
' If Not TieneError Then
|
|
||||||
' If FechaIN >= DateTime.Today Then
|
|
||||||
' If Not ObjContratos.CicloComercialAdd(CveContrato, -1, DdlCliente.SelectedValue.ToEntero, False, -1, 1, UsuarioActual.CveEmpresa, FechaIN) Then TieneError = True
|
|
||||||
' End If
|
|
||||||
' Dim Periodo As Integer = DtPeriodo.FiltroPrimeroValor("Meses", $"CvePeriodo = {DdlPeriodo.SelectedValue.ToEntero}").ToEntero
|
|
||||||
' Dim VigenciaMeses As Double = DateDiff(DateInterval.Month, FechaI, FechaF)
|
|
||||||
' Dim CiclosComerciales As Integer = Math.Ceiling(VigenciaMeses / Periodo).ToEntero
|
|
||||||
' For Ciclo As Integer = 1 To CiclosComerciales
|
|
||||||
' If Not ObjContratos.CicloComercialAdd(CveContrato, -1, DdlCliente.SelectedValue.ToEntero, False, -1, 1, UsuarioActual.CveEmpresa, If(FechaIN.AddMonths(Periodo * Ciclo) > FechaFN, FechaFN, FechaIN.AddMonths(Periodo * Ciclo))) Then TieneError = True : Exit For
|
|
||||||
' Next
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
'End If
|
|
||||||
|
|
||||||
If ViewState("extencion") IsNot Nothing Then
|
If ViewState("extencion") IsNot Nothing Then
|
||||||
|
|
||||||
@@ -1475,35 +1020,15 @@ Partial Class Contratos_ContratoObra
|
|||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
|
|
||||||
End Try
|
End Try
|
||||||
' System.IO.File.Move(Archivo, String.Format("{0}{1}{2}", Ruta, CveContrato.ToString, Extension))
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'If ChkImpuestosLocales.Checked Then
|
|
||||||
' Dim count As Integer = 0
|
|
||||||
' ObjContratos.LimpiaImpuestosLocales(CveContrato)
|
|
||||||
|
|
||||||
' For Each GVR As GridViewRow In GvImpuestosLocales.Rows
|
|
||||||
' If GVR.FCCheckBox("ChkDeduccion").Checked Then
|
|
||||||
' count = count + 1
|
|
||||||
' ObjContratos.AddContratoImpuestosLocales(CveContrato, GVR.DataKey("CveImpuestoLocal").ToEntero)
|
|
||||||
' End If
|
|
||||||
' Next
|
|
||||||
|
|
||||||
' If count = 0 Then
|
|
||||||
' Alert("Debe seleccionar un Impuesto Local", TipoMensaje.MsgAdvertencia)
|
|
||||||
' TieneError = True
|
|
||||||
' End If
|
|
||||||
'Else
|
|
||||||
' ObjContratos.LimpiaImpuestosLocales(CveContrato)
|
|
||||||
'End If
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
TieneError = True
|
TieneError = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If TieneError Then
|
If TieneError Then
|
||||||
@@ -1895,15 +1420,15 @@ Partial Class Contratos_ContratoObra
|
|||||||
Row("PU") = TxtPU.Text.ToDouble.FormatoNumero
|
Row("PU") = TxtPU.Text.ToDouble.FormatoNumero
|
||||||
Row("Total") = (TxtCantidad.Text.ToDouble * TxtPU.Text.ToDouble).FormatoNumero
|
Row("Total") = (TxtCantidad.Text.ToDouble * TxtPU.Text.ToDouble).FormatoNumero
|
||||||
Row("CveTipoPresupuesto") = 2
|
Row("CveTipoPresupuesto") = 2
|
||||||
Row("NoIdentificacion") = TxtNoIdentificacionv.Text.Trim
|
Row("NoIdentificacion") = "" 'TxtNoIdentificacionv.Text.Trim
|
||||||
Row("OCInterna") = TxtOCInterna.Text.Trim
|
Row("OCInterna") = "" 'TxtOCInterna.Text.Trim
|
||||||
Row("LimitarCantidad") = If(ChkLimitarVenta.Checked, 1, 0)
|
Row("LimitarCantidad") = False 'If(ChkLimitarVenta.Checked, 1, 0)
|
||||||
Row("Observacion") = "" 'TxtObservacionesDetalles.Text
|
Row("Observacion") = "" 'TxtObservacionesDetalles.Text
|
||||||
|
|
||||||
Dim ObjContratos As New ClsContratos
|
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 ObjContratos.AddContratosDetalle(CveContrato, Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDouble, Row("PU").ToString.ToDouble, UsuarioActual.CveUsuario, Row("CveTipoPresupuesto").ToString.ToEntero, Row("NoIdentificacion").ToString, False, "", Observacion:=Row("Observacion").ToString) Then
|
||||||
|
|
||||||
If Autorizado 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"))
|
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"))
|
||||||
@@ -1940,17 +1465,17 @@ Partial Class Contratos_ContratoObra
|
|||||||
|
|
||||||
Dim Cantidad, PU As Double : Dim CvePS, CveUM As Integer
|
Dim Cantidad, PU As Double : Dim CvePS, CveUM As Integer
|
||||||
Dim NoIdentificacion As String = ""
|
Dim NoIdentificacion As String = ""
|
||||||
Dim OCInterna As String = ""
|
'Dim OCInterna As String = ""
|
||||||
Dim LimitarCantidad As Boolean
|
' Dim LimitarCantidad As Boolean
|
||||||
Dim Observaciones As String = ""
|
Dim Observaciones As String = ""
|
||||||
|
|
||||||
Cantidad = TxtCantidad.Text.ToDouble
|
Cantidad = TxtCantidad.Text.ToDouble
|
||||||
PU = TxtPU.Text.ToDouble
|
PU = TxtPU.Text.ToDouble
|
||||||
CvePS = DdlProductows.SelectedValue.ToEntero
|
CvePS = DdlProductows.SelectedValue.ToEntero
|
||||||
CveUM = DdlUM.SelectedValue.ToEntero
|
CveUM = DdlUM.SelectedValue.ToEntero
|
||||||
NoIdentificacion = TxtNoIdentificacionv.Text.Trim
|
'NoIdentificacion = TxtNoIdentificacionv.Text.Trim
|
||||||
OCInterna = TxtOCInterna.Text.Trim
|
'OCInterna = TxtOCInterna.Text.Trim
|
||||||
LimitarCantidad = If(ChkLimitarVenta.Checked, True, False)
|
'LimitarCantidad = If(ChkLimitarVenta.Checked, True, False)
|
||||||
Observaciones = ""
|
Observaciones = ""
|
||||||
|
|
||||||
Dim row = TmpDT.Select(String.Format(" CveContratoDetalle={0}", CveContratoDetalleEditar))(0)
|
Dim row = TmpDT.Select(String.Format(" CveContratoDetalle={0}", CveContratoDetalleEditar))(0)
|
||||||
@@ -1958,7 +1483,7 @@ Partial Class Contratos_ContratoObra
|
|||||||
|
|
||||||
|
|
||||||
Dim ObjContratos As New ClsContratos
|
Dim ObjContratos As New ClsContratos
|
||||||
If ObjContratos.UpdateContratosDetalle(CveContratoDetalleEditar, CveContrato, CvePS, Cantidad, PU, UsuarioActual.CveUsuario, NoIdentificacion, LimitarCantidad, OCInterna, Observaciones) Then
|
If ObjContratos.UpdateContratosDetalle(CveContratoDetalleEditar, CveContrato, CvePS, Cantidad, PU, UsuarioActual.CveUsuario, NoIdentificacion, False, "", Observaciones) Then
|
||||||
|
|
||||||
If Autorizado 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}",
|
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}",
|
||||||
@@ -1973,8 +1498,8 @@ Partial Class Contratos_ContratoObra
|
|||||||
row("CveUM") = CveUM
|
row("CveUM") = CveUM
|
||||||
row("UM") = DdlUM.SelectedItem.Text
|
row("UM") = DdlUM.SelectedItem.Text
|
||||||
row("NoIdentificacion") = NoIdentificacion
|
row("NoIdentificacion") = NoIdentificacion
|
||||||
row("OCInterna") = OCInterna
|
row("OCInterna") = ""
|
||||||
row("LimitarCantidad") = LimitarCantidad
|
row("LimitarCantidad") = False
|
||||||
row("Observacion") = Observaciones
|
row("Observacion") = Observaciones
|
||||||
|
|
||||||
TmpDT.AcceptChanges()
|
TmpDT.AcceptChanges()
|
||||||
@@ -2229,11 +1754,11 @@ Partial Class Contratos_ContratoObra
|
|||||||
Row("PU") = TxtPUInsumos.Text.ToDouble.FormatoNumero
|
Row("PU") = TxtPUInsumos.Text.ToDouble.FormatoNumero
|
||||||
Row("Total") = (TxtCantidadInsumos.Text.ToDouble * TxtPUInsumos.Text.ToDouble).FormatoNumero
|
Row("Total") = (TxtCantidadInsumos.Text.ToDouble * TxtPUInsumos.Text.ToDouble).FormatoNumero
|
||||||
Row("CveTipoPresupuesto") = 1
|
Row("CveTipoPresupuesto") = 1
|
||||||
Row("NoIdentificacion") = TxtNoIdentificacionvInsumos.Text.Trim
|
Row("NoIdentificacion") = "" 'TxtNoIdentificacionvInsumos.Text.Trim
|
||||||
Row("LimitarCantidad") = If(ChkLimitarInsumos.Checked, 1, 0)
|
Row("LimitarCantidad") = False
|
||||||
|
|
||||||
Dim ObjContratos As New ClsContratos
|
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 ObjContratos.AddContratosDetalle(CveContrato, Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDouble, Row("PU").ToString.ToDouble, UsuarioActual.CveUsuario, Row("CveTipoPresupuesto").ToString.ToEntero, Row("NoIdentificacion").ToString, False, "") Then
|
||||||
If Autorizado 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"))
|
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)
|
guardarBitacora(msj)
|
||||||
@@ -2266,22 +1791,22 @@ Partial Class Contratos_ContratoObra
|
|||||||
|
|
||||||
Dim Cantidad, PU As Double
|
Dim Cantidad, PU As Double
|
||||||
Dim CvePS, CveUM As Integer
|
Dim CvePS, CveUM As Integer
|
||||||
Dim NoIdentificacion As String = ""
|
'Dim NoIdentificacion As String = ""
|
||||||
Dim LimitarCantidad As Boolean
|
'Dim LimitarCantidad As Boolean
|
||||||
|
|
||||||
Cantidad = TxtCantidadInsumos.Text.ToDouble
|
Cantidad = TxtCantidadInsumos.Text.ToDouble
|
||||||
PU = TxtPUInsumos.Text.ToDouble
|
PU = TxtPUInsumos.Text.ToDouble
|
||||||
CvePS = DdlProductowsInsumos.SelectedValue.ToEntero
|
CvePS = DdlProductowsInsumos.SelectedValue.ToEntero
|
||||||
CveUM = DdlUMInsumos.SelectedValue.ToEntero
|
CveUM = DdlUMInsumos.SelectedValue.ToEntero
|
||||||
NoIdentificacion = TxtNoIdentificacionvInsumos.Text.Trim
|
'NoIdentificacion = TxtNoIdentificacionvInsumos.Text.Trim
|
||||||
LimitarCantidad = If(ChkLimitarInsumos.Checked, True, False)
|
'LimitarCantidad = If(ChkLimitarInsumos.Checked, True, False)
|
||||||
|
|
||||||
Dim row = TmpDT.Select(String.Format(" CveContratoDetalle={0}", CveContratoDetalleEditar))(0)
|
Dim row = TmpDT.Select(String.Format(" CveContratoDetalle={0}", CveContratoDetalleEditar))(0)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dim ObjContratos As New ClsContratos
|
Dim ObjContratos As New ClsContratos
|
||||||
If ObjContratos.UpdateContratosDetalle(CveContratoDetalleEditar, CveContrato, CvePS, Cantidad, PU, UsuarioActual.CveUsuario, NoIdentificacion, LimitarCantidad, "") Then
|
If ObjContratos.UpdateContratosDetalle(CveContratoDetalleEditar, CveContrato, CvePS, Cantidad, PU, UsuarioActual.CveUsuario, "", False, "") Then
|
||||||
|
|
||||||
If Autorizado 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}",
|
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}",
|
||||||
@@ -2295,8 +1820,8 @@ Partial Class Contratos_ContratoObra
|
|||||||
row("Total") = Cantidad * PU
|
row("Total") = Cantidad * PU
|
||||||
row("CveUM") = CveUM
|
row("CveUM") = CveUM
|
||||||
row("UM") = DdlUMInsumos.SelectedItem.Text
|
row("UM") = DdlUMInsumos.SelectedItem.Text
|
||||||
row("NoIdentificacion") = NoIdentificacion
|
row("NoIdentificacion") = "" 'NoIdentificacion
|
||||||
row("LimitarCantidad") = LimitarCantidad
|
row("LimitarCantidad") = False
|
||||||
TmpDT.AcceptChanges()
|
TmpDT.AcceptChanges()
|
||||||
Alert("Cambios realizados correctamente.", TipoMensaje.MsgInformacion)
|
Alert("Cambios realizados correctamente.", TipoMensaje.MsgInformacion)
|
||||||
RegistraScript("$('#ModalControlAddPS').modal('hide')")
|
RegistraScript("$('#ModalControlAddPS').modal('hide')")
|
||||||
@@ -2460,7 +1985,7 @@ Partial Class Contratos_ContratoObra
|
|||||||
Row("PU") = TxtPUInt.Text.ToDouble.FormatoNumero
|
Row("PU") = TxtPUInt.Text.ToDouble.FormatoNumero
|
||||||
Row("Total") = (TxtCantidadInt.Text.ToDouble * TxtPUInt.Text.ToDouble).FormatoNumero
|
Row("Total") = (TxtCantidadInt.Text.ToDouble * TxtPUInt.Text.ToDouble).FormatoNumero
|
||||||
Row("CveTipoPresupuesto") = 1
|
Row("CveTipoPresupuesto") = 1
|
||||||
Row("NoIdentificacion") = TxtNoIdentificacionv.Text.Trim
|
Row("NoIdentificacion") = "" ' TxtNoIdentificacionv.Text.Trim
|
||||||
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
|
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
|
Dim ObjContratos As New ClsContratos
|
||||||
@@ -4757,12 +4282,12 @@ Partial Class Contratos_ContratoObra
|
|||||||
CveContratoDetalleEditar = GvRow.DataKey("CveContratoDetalle").ToEntero
|
CveContratoDetalleEditar = GvRow.DataKey("CveContratoDetalle").ToEntero
|
||||||
|
|
||||||
|
|
||||||
TxtOCInterna.Text = GvRow.DataKey("OCInterna")
|
'TxtOCInterna.Text = GvRow.DataKey("OCInterna")
|
||||||
TxtCantidad.Text = GvRow.DataKey("Cantidad").ToDouble.ToString
|
TxtCantidad.Text = GvRow.DataKey("CantidadContratada").ToDouble.ToString
|
||||||
|
|
||||||
ChkLimitarVenta.Checked = Boolean.Parse(GvRow.DataKey("LimitarCantidad"))
|
'ChkLimitarVenta.Checked = Boolean.Parse(GvRow.DataKey("LimitarCantidad"))
|
||||||
|
|
||||||
TxtNoIdentificacionv.Text = GvRow.DataKey("NoIdentificacion").ToDouble.ToString
|
'TxtNoIdentificacionv.Text = GvRow.DataKey("NoIdentificacion").ToDouble.ToString
|
||||||
DdlClasificacionAdd.SelectedValueExist(GvRow.DataKey("CveClasificacion").ToEntero)
|
DdlClasificacionAdd.SelectedValueExist(GvRow.DataKey("CveClasificacion").ToEntero)
|
||||||
|
|
||||||
DdlProductows.txtText.Value = GvRow.DataKey("PS").ToString
|
DdlProductows.txtText.Value = GvRow.DataKey("PS").ToString
|
||||||
@@ -4789,9 +4314,9 @@ Partial Class Contratos_ContratoObra
|
|||||||
|
|
||||||
CveContratoDetalleEditar = gvRow.DataKey("CveContratoDetalle").ToEntero
|
CveContratoDetalleEditar = gvRow.DataKey("CveContratoDetalle").ToEntero
|
||||||
|
|
||||||
TxtCantidadInsumos.Text = gvRow.DataKey("Cantidad").ToDouble.ToString
|
TxtCantidadInsumos.Text = gvRow.DataKey("CantidadContratada").ToDouble.ToString
|
||||||
ChkLimitarInsumos.Checked = Boolean.Parse(gvRow.DataKey("LimitarCantidad"))
|
'ChkLimitarInsumos.Checked = Boolean.Parse(gvRow.DataKey("LimitarCantidad"))
|
||||||
TxtNoIdentificacionvInsumos.Text = gvRow.DataKey("NoIdentificacion")
|
' TxtNoIdentificacionvInsumos.Text = gvRow.DataKey("NoIdentificacion")
|
||||||
|
|
||||||
DdlClasificacionAddInsumos.SelectedValueExist(gvRow.DataKey("CveClasificacion").ToEntero)
|
DdlClasificacionAddInsumos.SelectedValueExist(gvRow.DataKey("CveClasificacion").ToEntero)
|
||||||
|
|
||||||
@@ -4819,10 +4344,10 @@ Partial Class Contratos_ContratoObra
|
|||||||
|
|
||||||
Private Sub LimpiarModalVentas()
|
Private Sub LimpiarModalVentas()
|
||||||
|
|
||||||
TxtOCInterna.Text = ""
|
'TxtOCInterna.Text = ""
|
||||||
TxtCantidad.Text = ""
|
TxtCantidad.Text = ""
|
||||||
ChkLimitarVenta.Checked = False
|
'ChkLimitarVenta.Checked = False
|
||||||
TxtNoIdentificacionv.Text = ""
|
'TxtNoIdentificacionv.Text = ""
|
||||||
DdlClasificacionAdd.SelectedValueExist(-1)
|
DdlClasificacionAdd.SelectedValueExist(-1)
|
||||||
DdlProductows.txtText.Value = ""
|
DdlProductows.txtText.Value = ""
|
||||||
DdlProductows.txtValue.Value = ""
|
DdlProductows.txtValue.Value = ""
|
||||||
@@ -4845,8 +4370,8 @@ Partial Class Contratos_ContratoObra
|
|||||||
|
|
||||||
|
|
||||||
TxtCantidadInsumos.Text = ""
|
TxtCantidadInsumos.Text = ""
|
||||||
ChkLimitarInsumos.Checked = False
|
'ChkLimitarInsumos.Checked = False
|
||||||
TxtNoIdentificacionvInsumos.Text = ""
|
'TxtNoIdentificacionvInsumos.Text = ""
|
||||||
|
|
||||||
DdlClasificacionAddInsumos.SelectedValueExist(-1)
|
DdlClasificacionAddInsumos.SelectedValueExist(-1)
|
||||||
DdlProductowsInsumos.txtText.Value = ""
|
DdlProductowsInsumos.txtText.Value = ""
|
||||||
|
|||||||
@@ -2748,10 +2748,7 @@
|
|||||||
<td>Contrato:</td>
|
<td>Contrato:</td>
|
||||||
<td><asp:DropDownList ID="DdlContrato" runat="server" AppendDataBoundItems="true" Width="350px" AutoPostBack="true" DataTextField="NumeroContrato" DataValueField="CveContrato" CssClass="select2me" ></asp:DropDownList></td>
|
<td><asp:DropDownList ID="DdlContrato" runat="server" AppendDataBoundItems="true" Width="350px" AutoPostBack="true" DataTextField="NumeroContrato" DataValueField="CveContrato" CssClass="select2me" ></asp:DropDownList></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr runat="server" id="DVEstimacionesObra" visible="false">
|
|
||||||
<td> Estimacion:</td>
|
|
||||||
<td><asp:DropDownList ID="DdlEstimacionesObra" runat="server" AppendDataBoundItems="true" Width="350px" AutoPostBack="true" DataTextField="NumeroEstimacion" DataValueField="CveEstimacion" CssClass="select2me"></asp:DropDownList></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
@@ -2794,12 +2791,21 @@
|
|||||||
<div id="ContratoDetalles" class="row" runat="server" visible="false">
|
<div id="ContratoDetalles" class="row" runat="server" visible="false">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="row" style="margin-bottom: 10px;">
|
<div class="row" style="margin-bottom: 10px;">
|
||||||
<div class="col-md-1">
|
|
||||||
<asp:Label runat="server" Text="Contrato:"></asp:Label>
|
<div class="col-md-6">
|
||||||
</div>
|
<table>
|
||||||
<div class="col-md-5">
|
<tr>
|
||||||
<asp:DropDownList runat="server" ID="DdlContratosModal" AutoPostBack="true" CssClass=" form-control input-sm select2me text-left" Width="400px" DataTextField="ContratoCompleto" DataValueField="CveContrato" />
|
<td><asp:Label runat="server" Text="Contrato:"></asp:Label></td>
|
||||||
|
<td><asp:DropDownList runat="server" ID="DdlContratosModal" AutoPostBack="true" CssClass=" form-control input-sm select2me text-left" Width="400px" DataTextField="ContratoCompleto" DataValueField="CveContrato" /></td>
|
||||||
|
</tr>
|
||||||
|
<tr runat="server" id="DVEstimacionesObra" visible="false">
|
||||||
|
<td> Estimacion:</td>
|
||||||
|
<td> <asp:DropDownList ID="DdlEstimacionesObra" runat="server" AppendDataBoundItems="true" Width="400px" AutoPostBack="true" DataTextField="NumeroEstimacion" DataValueField="CveEstimacion" CssClass="select2me"></asp:DropDownList> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-6 display4 bold" style="font-size: 16px;">
|
<div class="col-md-6 display4 bold" style="font-size: 16px;">
|
||||||
Saldo: $<asp:Literal Text="" ID="LtContratoImporteSaldo" runat="server" />
|
Saldo: $<asp:Literal Text="" ID="LtContratoImporteSaldo" runat="server" />
|
||||||
</div>
|
</div>
|
||||||
@@ -2813,6 +2819,7 @@
|
|||||||
<asp:ListItem Text="Venta" Value="2" Selected="True" />
|
<asp:ListItem Text="Venta" Value="2" Selected="True" />
|
||||||
<asp:ListItem Text="Suministro" Value="1" />
|
<asp:ListItem Text="Suministro" Value="1" />
|
||||||
<%--<asp:ListItem Text="Consignación" Value="3" Enabled="false" />--%>
|
<%--<asp:ListItem Text="Consignación" Value="3" Enabled="false" />--%>
|
||||||
|
<asp:ListItem Text="Obra" Value="4" />
|
||||||
</asp:RadioButtonList>
|
</asp:RadioButtonList>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
@@ -4307,7 +4314,7 @@
|
|||||||
<asp:RadioButtonList ID="RblOpcionContrato" runat="server" CssClass="rbl" RepeatDirection="Horizontal" RepeatLayout="Table">
|
<asp:RadioButtonList ID="RblOpcionContrato" runat="server" CssClass="rbl" RepeatDirection="Horizontal" RepeatLayout="Table">
|
||||||
<asp:ListItem Text="Si" Value="2"></asp:ListItem>
|
<asp:ListItem Text="Si" Value="2"></asp:ListItem>
|
||||||
<asp:ListItem Text="No" Value="1"></asp:ListItem>
|
<asp:ListItem Text="No" Value="1"></asp:ListItem>
|
||||||
<asp:ListItem Text="Obra" Value="3"></asp:ListItem>
|
|
||||||
</asp:RadioButtonList>
|
</asp:RadioButtonList>
|
||||||
|
|
||||||
<asp:LinkButton ID="BtnIniciarContrato" runat="server" CssClass="btn btn-success" Text="Aceptar" />
|
<asp:LinkButton ID="BtnIniciarContrato" runat="server" CssClass="btn btn-success" Text="Aceptar" />
|
||||||
|
|||||||
@@ -3031,21 +3031,7 @@ Partial Class Ventas
|
|||||||
LnkOCs.Visible = True
|
LnkOCs.Visible = True
|
||||||
UpnTools.Update()
|
UpnTools.Update()
|
||||||
|
|
||||||
ElseIf RblOpcionContrato.SelectedValue = "3" Then
|
|
||||||
|
|
||||||
DivEstimaciones.Visible = True
|
|
||||||
DVEstimacionesObra.Visible = True
|
|
||||||
|
|
||||||
DdlContrato.DataSource = DtContratos.FiltraParametros("CveContrato > 0", "NumeroContrato", DistinctColumns:={"CveContrato", "NumeroContrato"})
|
|
||||||
DdlContrato.DataBind()
|
|
||||||
DdlContrato.Items.Insert(0, New ListItem("Seleccione", "0"))
|
|
||||||
|
|
||||||
|
|
||||||
BtnEstimacion.Visible = False
|
|
||||||
GvEst.Visible = False
|
|
||||||
|
|
||||||
|
|
||||||
UPEstimaciones.Update()
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
BtnEstimacion.Visible = True
|
BtnEstimacion.Visible = True
|
||||||
@@ -3234,6 +3220,7 @@ Partial Class Ventas
|
|||||||
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Cot"))
|
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Cot"))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
DVEstimacionesObra.Visible = False
|
||||||
Select Case RBLTipoContrato.SelectedValue.ToEntero()
|
Select Case RBLTipoContrato.SelectedValue.ToEntero()
|
||||||
Case 1
|
Case 1
|
||||||
DdlTipoComprobante.Items.Insert(0, New ListItem("Pedido", "Ped"))
|
DdlTipoComprobante.Items.Insert(0, New ListItem("Pedido", "Ped"))
|
||||||
@@ -3246,7 +3233,35 @@ Partial Class Ventas
|
|||||||
DdlTipoComprobante.Items.Insert(0, New ListItem("Pedido de Consignación", "PeC"))
|
DdlTipoComprobante.Items.Insert(0, New ListItem("Pedido de Consignación", "PeC"))
|
||||||
DdlTipoComprobante.SelectedValue = "PeC"
|
DdlTipoComprobante.SelectedValue = "PeC"
|
||||||
DdlTipoComprobante.Enabled = False
|
DdlTipoComprobante.Enabled = False
|
||||||
|
|
||||||
|
Case 4
|
||||||
|
|
||||||
|
TabGenerales.Enabled = True
|
||||||
|
DVEstimacionesObra.Visible = True
|
||||||
|
DdlEstimacionesObra.Items.Clear()
|
||||||
|
Dim Con As New ClsContratos
|
||||||
|
If Con.GetContratosAvanceEstimacionVentas(DdlContratosModal.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa) Then
|
||||||
|
DdlEstimacionesObra.DataSource = Con.DtResultados
|
||||||
|
Else
|
||||||
|
DdlEstimacionesObra.DataSource = Nothing
|
||||||
|
End If
|
||||||
|
|
||||||
|
Con.Dispose()
|
||||||
|
|
||||||
|
DdlEstimacionesObra.DataBind()
|
||||||
|
DdlEstimacionesObra.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
|
||||||
|
BtnCargarContratoDetalles.Visible = False
|
||||||
|
BtnCancelarContratoDetalles.Visible = False
|
||||||
|
BtnCalcularTotalesContrato.Visible = False
|
||||||
|
|
||||||
|
BtnEstimacion.Visible = False
|
||||||
|
GvEst.Visible = False
|
||||||
|
GvContratoDetalles.Visible = False
|
||||||
|
|
||||||
End Select
|
End Select
|
||||||
|
UPEstimaciones.Update()
|
||||||
|
Updatetabs.Update()
|
||||||
|
|
||||||
ChkPSOC.Checked = False
|
ChkPSOC.Checked = False
|
||||||
CambiaTipoDocto()
|
CambiaTipoDocto()
|
||||||
@@ -3580,6 +3595,7 @@ Partial Class Ventas
|
|||||||
UpContratos.Update()
|
UpContratos.Update()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub DdlContratoModalSelectIndex()
|
Private Sub DdlContratoModalSelectIndex()
|
||||||
|
|
||||||
If Not DdlContratosModal.SelectedValue.ToEntero() > 0 Then
|
If Not DdlContratosModal.SelectedValue.ToEntero() > 0 Then
|
||||||
GvContratoDetalles.DataBind()
|
GvContratoDetalles.DataBind()
|
||||||
UpContratos.Update()
|
UpContratos.Update()
|
||||||
@@ -8757,6 +8773,13 @@ Partial Class Ventas
|
|||||||
ObjFactura.CveCorte = CveCorte
|
ObjFactura.CveCorte = CveCorte
|
||||||
ObjFactura.CveMesa = -1
|
ObjFactura.CveMesa = -1
|
||||||
ObjFactura.NumeroPersonas = 0
|
ObjFactura.NumeroPersonas = 0
|
||||||
|
|
||||||
|
|
||||||
|
If ObjFactura.TipoDocto = "Ant" And DdlContratosModal.SelectedValue.ToEntero > 0 Then
|
||||||
|
CveContrato = DdlContratosModal.SelectedValue.ToEntero
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
ObjFactura.CveContrato = If(CveContrato > 0, CveContrato, CvePresupuesto)
|
ObjFactura.CveContrato = If(CveContrato > 0, CveContrato, CvePresupuesto)
|
||||||
|
|
||||||
ObjFactura.CveClienteSucursal = DdlSucursalCliente.SelectedValue.ToEntero()
|
ObjFactura.CveClienteSucursal = DdlSucursalCliente.SelectedValue.ToEntero()
|
||||||
@@ -10511,7 +10534,7 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If ErrorList.Count = 0 AndAlso RblOpcionContrato.SelectedValue = "3" And DdlEstimacionesObra.SelectedValue.ToEntero > 0 Then
|
If ErrorList.Count = 0 AndAlso RBLTipoContrato.SelectedValue = "4" And DdlEstimacionesObra.SelectedValue.ToEntero > 0 Then
|
||||||
|
|
||||||
If Not ObjContr.UpdateContratosAvanceEstimacionVentas(DdlEstimacionesObra.SelectedValue.ToEntero, ObjFactura.CveVenta, UsuarioActual.CveEmpresa) Then
|
If Not ObjContr.UpdateContratosAvanceEstimacionVentas(DdlEstimacionesObra.SelectedValue.ToEntero, ObjFactura.CveVenta, UsuarioActual.CveEmpresa) Then
|
||||||
ErrorList.Add("Ocurrió un error al actualizar la estimación")
|
ErrorList.Add("Ocurrió un error al actualizar la estimación")
|
||||||
@@ -18104,19 +18127,19 @@ Partial Class Ventas
|
|||||||
BtnEstimacion.Visible = True
|
BtnEstimacion.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If RblOpcionContrato.SelectedValue = "3" Then
|
'If RblOpcionContrato.SelectedValue = "3" Then
|
||||||
|
|
||||||
|
|
||||||
GvEst.DataSource = Nothing
|
' GvEst.DataSource = Nothing
|
||||||
GvEst.DataBind()
|
' GvEst.DataBind()
|
||||||
BtnEstimacion.Visible = False
|
' BtnEstimacion.Visible = False
|
||||||
|
|
||||||
BtnCargarContratoDetalles.Visible = False
|
' BtnCargarContratoDetalles.Visible = False
|
||||||
BtnCancelarContratoDetalles.Visible = False
|
' BtnCancelarContratoDetalles.Visible = False
|
||||||
|
|
||||||
UPEstimaciones.Update()
|
' UPEstimaciones.Update()
|
||||||
|
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaDatosEstimaciones(CveCliente As Integer)
|
Private Sub CargaDatosEstimaciones(CveCliente As Integer)
|
||||||
@@ -18127,29 +18150,9 @@ Partial Class Ventas
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
If RblOpcionContrato.SelectedValue = "3" Then
|
|
||||||
|
|
||||||
DdlEstimacionesObra.Items.Clear()
|
|
||||||
|
|
||||||
If Con.GetContratosAvanceEstimacionVentas(DdlContrato.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa) Then
|
|
||||||
|
|
||||||
DdlEstimacionesObra.DataSource = Con.DtResultados
|
|
||||||
DdlEstimacionesObra.DataBind()
|
|
||||||
DdlEstimacionesObra.Items.Insert(0, New ListItem("Todos", "-1"))
|
|
||||||
|
|
||||||
Else
|
|
||||||
|
|
||||||
DdlEstimacionesObra.DataSource = Nothing
|
|
||||||
DdlEstimacionesObra.DataBind()
|
|
||||||
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
UPEstimaciones.Update()
|
If Con.GetEstimacionesPorFacturar(-1, CveCliente, DdlContrato.SelectedValue.ToEntero(), 0, UsuarioActual.CveEmpresa) Then
|
||||||
|
|
||||||
Else
|
|
||||||
|
|
||||||
If Con.GetEstimacionesPorFacturar(-1, CveCliente, DdlContrato.SelectedValue.ToEntero(), 0, UsuarioActual.CveEmpresa) Then
|
|
||||||
GvEst.DataSource = Con.DtResultados
|
GvEst.DataSource = Con.DtResultados
|
||||||
If Con.DtResultados.Rows.Count > 0 Then
|
If Con.DtResultados.Rows.Count > 0 Then
|
||||||
'BtnEstimacion.Visible = True
|
'BtnEstimacion.Visible = True
|
||||||
@@ -18165,7 +18168,7 @@ Partial Class Ventas
|
|||||||
DdlContrato.DataBind()
|
DdlContrato.DataBind()
|
||||||
GvEst.DataBind()
|
GvEst.DataBind()
|
||||||
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user