Contratos
This commit is contained in:
@@ -351,7 +351,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" id="TrProveedor" runat="server">
|
||||
<div class="row" id="TrProveedor" runat="server" visible="false">
|
||||
<label class="col-md-3 truncate ">
|
||||
<asp:Label ID="LblProveedor" runat="server" Text="Proveedor:"></asp:Label></label>
|
||||
<div class="col-md-9">
|
||||
@@ -841,7 +841,7 @@
|
||||
<asp:TextBox ID="TxtCantidad" runat="server" Text='<%# Eval("CantidadContratada") %>' Width="90px"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtenderCantidad" runat="server" TargetControlID="TxtCantidad" FilterType="Custom, Numbers" ValidChars="." />
|
||||
</EditItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
<ItemStyle Width="50px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
@@ -974,67 +974,7 @@
|
||||
<ajax:TabPanel ID="TabPVInsumos" runat="server" HeaderText="Presupuesto de Control">
|
||||
<ContentTemplate>
|
||||
|
||||
<%-- <asp:UpdatePanel ID="UpTitulosInsumos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:Panel ID="PanelContratosInsumos" runat="server">
|
||||
|
||||
<div class="row col-md-12" align="right">
|
||||
<input type="text" id="TxtBusquedaInsumos" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaInsumos','{0}');sumagvx2();", GvInsumos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaInsumos','{0}');sumagvx2();", GvInsumos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
|
||||
<table class="table Widthall">
|
||||
<tr class="Titulos">
|
||||
<td style="width: 150px">Cantidad</td>
|
||||
<td style="width: 75px">Limitar</td>
|
||||
<td style="width: 75px">Clave Interna</td>
|
||||
<td style="width: 400px">Producto/Servicio</td>
|
||||
<td style="width: 100px">U. M.</td>
|
||||
<td style="width: 150px">Precio Unitario</td>
|
||||
<td style="width: 150px">Total</td>
|
||||
<td style="width: 150px" id="THAvanceInsumos" runat="server" visible="false">Permite Avance</td>
|
||||
|
||||
<td style="width: 100px">Comandos</td>
|
||||
</tr>
|
||||
<tr class="Titulos">
|
||||
<td>
|
||||
<asp:TextBox ID="TxtCantidadInsumos" runat="server" Width="70px"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender10" runat="server" TargetControlID="TxtCantidadInsumos" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<asp:RequiredFieldValidator ID="RFVCantidadInsumos" runat="server" ControlToValidate="TxtCantidadInsumos" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAgregarInsumos"></asp:RequiredFieldValidator><ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="RFVCantidadInsumos" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:CheckBox ID="ChkLimitar" runat="server" />
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtNoIdentificacionvInsumos" runat="server" MaxLength="15" Width="70px"></asp:TextBox>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<div style="max-width: 550px;">
|
||||
<asp:DropDownList ID="DdlClasificacionAddInsumos" runat="server" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" CssClass="table-group-action-input form-control input-inline input-sm select2me" Style="width: 100%;"></asp:DropDownList>
|
||||
<br />
|
||||
<ADS:Dropdownlost runat="server" ID="DdlProductowsInsumos" CssStyle="width: 100%;" CssClassDdl="select2me" DataTextField="PSCodigo" DataValueField="CvePS" />
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlUMInsumos" runat="server" AutoPostBack="true" DataTextField="UnidadMedida" DataValueField="CveUnidadMedida" CssClass="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;"></asp:DropDownList></td>
|
||||
<td style="width: 75px">
|
||||
<asp:TextBox ID="TxtPUInsumos" runat="server" Width="70px"></asp:TextBox><ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender12" runat="server" TargetControlID="TxtPUInsumos" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<asp:RequiredFieldValidator ID="RFVPUInsumos" runat="server" ControlToValidate="TxtPUInsumos" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''P.U.''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAgregarInsumos"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CVEPUInsumos" runat="server" HighlightCssClass="vco" TargetControlID="RFVPUInsumos" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td></td>
|
||||
<td id="TDAvanceInsumos" runat="server" visible="false"></td>
|
||||
<td>
|
||||
<asp:Button Text="Agregar" runat="server" ID="BtnAgregarDetalleInsumos" Width="100px" OnClick="BtnAgregarDetalleInsumos_Click" ValidationGroup="GrpAgregarInsumos" class="btn btn-default" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</asp:Panel>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>--%>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1063,7 +1003,7 @@
|
||||
<asp:TextBox ID="TxtCantidad" runat="server" Text='<%# Eval("CantidadContratada") %>' Width="90px"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtenderCantidad" runat="server" TargetControlID="TxtCantidad" FilterType="Custom, Numbers" ValidChars="." />
|
||||
</EditItemTemplate>
|
||||
<ItemStyle Width="150px" />
|
||||
<ItemStyle Width="50px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
|
||||
@@ -738,8 +738,8 @@ Partial Class Contratos_ContratoObra
|
||||
TxtCorreoNotificacion.Text = ObjContratos.DtResultados.Rows(0)("CorreoNotificacionPedDev").ToString
|
||||
DdlCliente.SelectedValueExist(ObjContratos.DtResultados.Rows(0)("CveCliente").ToString)
|
||||
|
||||
If ObjContratos.CveProveedor > 0 Then
|
||||
TrProveedor.Visible = True
|
||||
If ObjContratos.CveProveedor > 0 Then
|
||||
' TrProveedor.Visible = True
|
||||
TrCliente.Visible = False
|
||||
CargaContratista()
|
||||
DdlContratista.SelectedValue = ObjContratos.CveProveedor.ToString
|
||||
@@ -1621,6 +1621,7 @@ Partial Class Contratos_ContratoObra
|
||||
End Sub
|
||||
|
||||
#Region "GV PRESUPUESTOS"
|
||||
|
||||
Protected Sub EstClick(sender As Object, e As System.EventArgs)
|
||||
'Get the button that raised the event
|
||||
Dim btn As CheckBox = DirectCast(sender, CheckBox)
|
||||
@@ -2420,19 +2421,12 @@ Partial Class Contratos_ContratoObra
|
||||
|
||||
Dim GvRow As GridViewRow = CType(((CType(sender, LinkButton)).NamingContainer), GridViewRow)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Dim CveClasificacion As Integer = GvRow.DataKey("CveClasificacion").ToEntero
|
||||
Dim CvePS As Integer = GvRow.DataKey("CvePS").ToEntero
|
||||
Dim CodigoPS As String = GvRow.DataKey("CodigoPS")
|
||||
Dim Clasificacion As String = GvRow.DataKey("Clasificacion")
|
||||
Dim CveRubro As Integer = GvRow.DataKey("CveRubro").ToEntero
|
||||
|
||||
|
||||
|
||||
|
||||
GvDatosVentasAvance.Visible = False
|
||||
|
||||
If CveRubro = 3 Then
|
||||
@@ -3308,17 +3302,21 @@ Partial Class Contratos_ContratoObra
|
||||
|
||||
|
||||
|
||||
Private Function GetPS(Opt As String, Valor As String) As String
|
||||
Private Function GetPS(Opt As String, Valor As String) As String
|
||||
|
||||
Dim StrReturn As String = String.Empty
|
||||
Dim CvePS As Integer = 0
|
||||
|
||||
CvePS = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePS", Opt & " = '" & Valor & "'").ToString.ToEntero
|
||||
|
||||
If CvePS > 0 Then
|
||||
StrReturn = "True|" & CvePS.ToString
|
||||
Else
|
||||
|
||||
StrReturn = "False|" & Valor & " en la fila " & NumRow & ", columna " & Opt
|
||||
End If
|
||||
|
||||
Return StrReturn
|
||||
|
||||
End Function
|
||||
|
||||
Private Sub BtnCargaExcel_Click(sender As Object, e As EventArgs) Handles BtnCargaExcel.Click
|
||||
@@ -4503,7 +4501,7 @@ Partial Class Contratos_ContratoObra
|
||||
{
|
||||
.ColumnHeaders = True,
|
||||
.StartRow = 0,
|
||||
.NumberOfColumns = 4,
|
||||
.NumberOfColumns = 5,
|
||||
.NumberOfRows = worksheet.Rows.Count,
|
||||
.Resolution = ColumnTypeResolution.AutoPreferStringCurrentCulture
|
||||
})
|
||||
@@ -4543,10 +4541,6 @@ Partial Class Contratos_ContratoObra
|
||||
|
||||
Dim ErrorProceso = False
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Dim DTPS = New DataTable
|
||||
DTPS.Columns.Add("CveContratoDetalle", GetType(Integer))
|
||||
DTPS.Columns.Add("Cantidad", GetType(Double))
|
||||
@@ -4584,21 +4578,65 @@ Partial Class Contratos_ContratoObra
|
||||
Dim RowNoEncontrados As String = ""
|
||||
|
||||
If Not DTPresupuesto Is Nothing Then
|
||||
|
||||
For Each DrowPS As DataRow In DTPresupuesto.Rows
|
||||
|
||||
Dim CvePS As Integer = -1
|
||||
Dim CveUM As Integer = -1
|
||||
Dim StrArray() As String
|
||||
|
||||
Dim StrArray() As String = GetPS("PS", DrowPS("Producto").ToString).Split("|"c)
|
||||
Dim CvePS As Integer
|
||||
Dim CveUM As Integer
|
||||
|
||||
StrArray = GetPS("Codigo", DrowPS("Codigo").ToString).Split("|"c)
|
||||
|
||||
If StrArray.Length > 0 Then
|
||||
|
||||
If CBool(StrArray(0)) = True Then
|
||||
CvePS = StrArray(1).ToEntero
|
||||
Else
|
||||
RowNoEncontrados &= "Producto: " & StrArray(1) & "<\BR>"
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If CvePS = -1 Then
|
||||
|
||||
StrArray = GetPS("PS", DrowPS("Producto").ToString).Split("|"c)
|
||||
|
||||
If StrArray.Length > 0 Then
|
||||
If CBool(StrArray(0)) = True Then
|
||||
CvePS = StrArray(1).ToEntero
|
||||
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
If CvePS = -1 Then
|
||||
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
|
||||
|
||||
Dim CveClasificacion As Integer = GlobalDTClasificaciones(CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)("CveClasificacion").ToString.ToEntero
|
||||
Dim CveUnidadMedida As Integer = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveUnidadMedida", $"UnidadMedida = '{ DrowPS("UnidadMedida").ToString}' OR Abreviatura = '{ DrowPS("UnidadMedida").ToString}'").ToString.ToEntero
|
||||
|
||||
If Not CveUnidadMedida > 0 Then
|
||||
CveUnidadMedida = GlobalDTUnidadesMedida(CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)("CveUnidadMedida").ToString.ToEntero
|
||||
End If
|
||||
|
||||
If ObjPS.AddPS(CveClasificacion, 1, CveUnidadMedida, DrowPS("Codigo").ToString.Trim, "", "", DrowPS("Producto").ToString, DrowPS("PU").ToString.ToDouble, -1, 0, False, 0, False, If(TipoCargaPresupuesto = EnumTipoCargaPresupuesto.Ventas, True, False),
|
||||
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, 1, CveTipoPS:=2, CveSATPS:=-1, CveMarca:=-1, CveTamaño:=-1, CveMedida:=-1, CveRinTamaño:=-1, CveModelo:=-1, Litraje:=-1, IEPSPorcentaje:=-1, CveClasificacion2:=-1, CveClasificacionDetalle:=-1) > 0 Then
|
||||
CvePS = ObjPS.CvePS
|
||||
Else
|
||||
CvePS = -1
|
||||
RowNoEncontrados &= "Producto: " & StrArray(1) & "<\BR>"
|
||||
End If
|
||||
|
||||
ObjPS.Dispose()
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If CvePS > 0 And DrowPS("Cantidad").ToString.ToDouble > 0 Then
|
||||
|
||||
CveUM = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveUnidadMedida", $" UnidadMedida = '{ DrowPS("UnidadMedida").ToString.Trim }' OR Abreviatura = '{ DrowPS("UnidadMedida").ToString.Trim }'").ToEntero
|
||||
|
||||
@@ -277,7 +277,8 @@
|
||||
|
||||
<asp:TemplateField HeaderText="Descripción">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblDescripcion" CssClass="Texto" runat="server" Text='<%# Eval("DescripcionContrato")%>'> </asp:Label>
|
||||
|
||||
<asp:HyperLink ID="HplDescripcion" CssClass="Texto" runat="server" Text='<%# Eval("DescripcionContrato") %>' NavigateUrl='<%# Eval("CveContrato", "ContratoObra.aspx?CveContrato={0}")%>' Target="_blank" ></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
@@ -568,6 +568,7 @@ Partial Class OC
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
CargaDatosAgregarPS()
|
||||
|
||||
Reference in New Issue
Block a user