This commit is contained in:
rakcsle
2021-07-20 08:43:52 -07:00
11 changed files with 336 additions and 261 deletions

View File

@@ -1503,7 +1503,7 @@ Public Class ClsInventarios
End Function End Function
Public Function GetKardexAlmacenHorizontal(CvePS As Integer, FechaFin As Date, CveAlmacen As Integer, CveUnidadMedida As Integer, CveProveedor As Integer, CveTipoAlmacen As Integer, Public Function GetKardexAlmacenHorizontal(CvePS As Integer, FechaFin As Date, CveAlmacen As Integer, CveUnidadMedida As Integer, CveProveedor As Integer, CveTipoAlmacen As Integer,
IncluyeTransitorios As Integer, CveClasificacion As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional CondicionExistencias As Integer = 0, IncluyeTransitorios As Integer, CveClasificacion As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional CondicionExistencias As Integer = 0,
Optional Orden As Integer = -1, Optional Marcas As String = "-1", Optional IncluyeProyectado As Integer = -1, Optional CveAlmacenes As String = "-1") As Boolean Optional Orden As Integer = -1, Optional Marcas As String = "-1", Optional IncluyeProyectado As Integer = -1, Optional CveAlmacenes As String = "-1", Optional GPO As Integer = 1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Inv_KardexAlmacenHorizontalGet") DataAdapter("PA_Inv_KardexAlmacenHorizontalGet")
@@ -1525,46 +1525,8 @@ Public Class ClsInventarios
.Add("@Marcas", SqlDbType.VarChar).Value = Marcas .Add("@Marcas", SqlDbType.VarChar).Value = Marcas
.Add("@IncluyeProyectado", SqlDbType.TinyInt).Value = IncluyeProyectado .Add("@IncluyeProyectado", SqlDbType.TinyInt).Value = IncluyeProyectado
.Add("@CveAlmacenes", SqlDbType.NVarChar).Value = CveAlmacenes .Add("@CveAlmacenes", SqlDbType.NVarChar).Value = CveAlmacenes
End With .Add("@GPO", SqlDbType.Int).Value = GPO
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch Ex1 As SqlException
Me.OnError("Ocurrió un error al obtener el kardex de almacen.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
Catch ex As Exception
OnError("Ocurrió un error al obtener el kardex de almacen.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
Public Function GetKardexAlmacenHorizontalAgrupado(CvePS As Integer, FechaFin As Date, CveAlmacen As Integer, CveUnidadMedida As Integer, CveProveedor As Integer, CveTipoAlmacen As Integer,
IncluyeTransitorios As Integer, CveClasificacion As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional CondicionExistencias As Integer = 0,
Optional Orden As Integer = -1, Optional Marcas As String = "-1", Optional IncluyeProyectado As Integer = -1, Optional CveAlmacenes As String = "-1") As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Inv_KardexAlmacenHorizontalGetAgrupado")
With SqlAdapter.SelectCommand.Parameters
'.Add("@FechaI", SqlDbType.VarChar).Value = FechaI
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
.Add("@CvePS", SqlDbType.Int).Value = CvePS
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
.Add("@CveUnidadMedida", SqlDbType.Int).Value = CveUnidadMedida
.Add("@IncluyeTransitorios", SqlDbType.Int).Value = IncluyeTransitorios
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveProveedorCompra", SqlDbType.Int).Value = CveProveedor
.Add("@CveTipoAlmacen", SqlDbType.Int).Value = CveTipoAlmacen
.Add("@ExistenciasCondicion", SqlDbType.Int).Value = CondicionExistencias
.Add("@Orden", SqlDbType.Int).Value = Orden
.Add("@Marcas", SqlDbType.VarChar).Value = Marcas
.Add("@IncluyeProyectado", SqlDbType.TinyInt).Value = IncluyeProyectado
.Add("@CveAlmacenes", SqlDbType.NVarChar).Value = CveAlmacenes
End With End With
Try Try

View File

@@ -5400,12 +5400,16 @@
</div> </div>
</div> </div>
<br /> <br />
<div class="row col-md-12" align="right" runat="server" id="divBusqueda" visible="false">
<input type="text" id="TxtBusqueda3" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda3','{0}');", GvContratosControl.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda3','{0}');", GvContratosControl.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<asp:GridView ID="GvContratosControl" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron partidas" <asp:GridView ID="GvContratosControl" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron partidas"
DataKeyNames="CveContratoDetalle,CvePS,PS,Cantidad,PU,CantidadMax,CveUnidadMedida,Abreviatura,CveSubProyecto,SubProyecto,Codigo,CveProyecto,Proyecto,IVA,RetISR,RetIVA,IEPSPorcentaje,IEPSGrabaIVA,CveClasificacion,Clasificacion" DataKeyNames="CveContratoDetalle,CvePS,PS,Cantidad,PU,CantidadMax,CveUnidadMedida,Abreviatura,CveSubProyecto,SubProyecto,Codigo,CveProyecto,Proyecto,IVA,RetISR,RetIVA,IEPSPorcentaje,IEPSGrabaIVA,CveClasificacion,Clasificacion"
CssClass="table GVEstimacion table-advance table-hover" GridLines="None" Width="100%"> CssClass="table GVEstimacion table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None" Width="100%">
<Columns> <Columns>
<asp:TemplateField HeaderText="Producto"> <asp:TemplateField HeaderText="Producto">
@@ -5439,6 +5443,9 @@
</div> </div>
</div> </div>
<div class="row form-group form-md-line-input input-iconright" style="text-align:right!important">
<asp:CheckBox ID="ChkContinualAgregandoControl" runat="server" TextAlign="Left" Text="Continuar agregando" CssClass="form-control" Checked="true" Visible="false"/>
</div>

View File

@@ -18146,46 +18146,86 @@ Partial Class Compras_Compras
End If End If
ActualizaTotales = True ActualizaTotales = True
Select Case Modalidad Dim ObjContratos As New ClsContratos
Case "A" 'ADD Dim TieneError As Boolean = False
Dim Mensaje As String = ""
Dim SATClavePS = -1 Dim dttemp As DataTable = GlobalDTContratos().FiltraParametros(String.Format("CveSubProyecto = {0}", DdlSubProyecto.SelectedValue.ToString))
Dim PSRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPS.SelectedValue.ToEntero).FiltroPrimero("") If dttemp IsNot Nothing AndAlso dttemp.Rows.Count > 0 Then
If PSRow IsNot Nothing Then Dim drContrato As DataRow = dttemp.Rows(0)
SATClavePS = PSRow("SATClavePS").ToString.ToEntero If ObjContratos.GetContratosDetalle(drContrato("CveContrato").ToString.ToEntero) Then
End If Dim dtContratodetalle As DataTable = ObjContratos.DtResultados.FiltraParametros(String.Format("CvePS = {0}", DdlPS.SelectedValue.ToString))
Dim IVA As Double If dtContratodetalle IsNot Nothing AndAlso dtContratodetalle.Rows.Count > 0 Then
If chkImportacion.Checked Then Dim drContratoDetalle As DataRow = dtContratodetalle(0)
IVA = (txtImportacion.Text.Trim.ToDouble / (TxtCantidad.Text.Trim.ToDouble * TxtPrecio.Text.Trim.ToDouble)) If Convert.ToBoolean(drContratoDetalle("LimitarCantidad")) Then
If ObjContratos.GetReporteContratosAvancesDetalleControl(drContrato("CveContrato").ToString.ToEntero, UsuarioActual.CveEmpresa) Then
Dim dtContratodetalleControl As DataTable = ObjContratos.DtResultados.FiltraParametros(String.Format("CvePS = {0}", DdlPS.SelectedValue.ToString))
If dtContratodetalleControl IsNot Nothing AndAlso dtContratodetalleControl.Rows.Count > 0 Then
Dim drContratoDetalleControl As DataRow = dtContratodetalleControl(0)
If TxtCantidad.Text.Trim.ToDouble > drContratoDetalleControl("FaltanteCantidad").ToString.ToDouble Then
Mensaje = String.Format("La cantidad del Producto/Servicio debe ser menor o igual a {0}", drContratoDetalleControl("FaltanteCantidad").ToString)
TieneError = True
End If
Else
Mensaje = "Este producto no pertence al contrato seleccionado"
TieneError = True
End If
Else
Mensaje = "Error al consultar el contrato"
End If
End If
Else Else
IVA = Math.Round(DdlIVA.SelectedValue.ToDouble - 1, 2) Mensaje = "Este producto no pertence al contrato seleccionado"
TieneError = True
End If End If
AddPS(TxtCantidad.Text.Trim.ToDouble, ddlUM.SelectedValue.ToEntero, ddlUM.SelectedItem.Text, DdlClasificacion.SelectedValue.ToEntero, DdlClasificacion.SelectedItem.Text, DdlPS.SelectedValue.ToEntero, DdlPS.SelectedText, HdnTipoPS.Value.ToEntero, Else
DdlSubProyecto.SelectedValue.ToString, DdlSubProyecto.SelectedItem.Text, DdlProyecto.SelectedItem.Text, DdlProyecto.SelectedValue.ToString, TxtObsPS.Text.Trim, TxtPrecio.Text.Trim.ToDouble, Total, IVA, Mensaje = "Error al consultar el contrato"
TxtRetIVAModal.Text.ToDouble / 100, TxtRetISRModal.Text.ToDouble / 100, TxtIEPSModal.Text.ToDouble / 100, 0, TxtDescuentoModal.Text.ToDouble, OtrosGastos:=TxtOtrosGastos.Text.ToDouble, CveTipoGasto:=DdlTipoGasto.SelectedValue.ToEntero, TipoGasto:=DdlTipoGasto.SelectedItem.Text,
NoDeducible:=ChkEsNoDeduciblePS.Checked, CveSATPS:=SATClavePS)
AddPS2() End If
LimpiaAgregar() End If
If Not TieneError Then
Select Case Modalidad
Case "A" 'ADD
If ChkAgregar.Checked = True And Modalidad = "A" Then Dim SATClavePS = -1
RegistraScript("displayToastr(1);", "display") Dim PSRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPS.SelectedValue.ToEntero).FiltroPrimero("")
Else If PSRow IsNot Nothing Then
SATClavePS = PSRow("SATClavePS").ToString.ToEntero
End If
Dim IVA As Double
If chkImportacion.Checked Then
IVA = (txtImportacion.Text.Trim.ToDouble / (TxtCantidad.Text.Trim.ToDouble * TxtPrecio.Text.Trim.ToDouble))
Else
IVA = Math.Round(DdlIVA.SelectedValue.ToDouble - 1, 2)
End If
AddPS(TxtCantidad.Text.Trim.ToDouble, ddlUM.SelectedValue.ToEntero, ddlUM.SelectedItem.Text, DdlClasificacion.SelectedValue.ToEntero, DdlClasificacion.SelectedItem.Text, DdlPS.SelectedValue.ToEntero, DdlPS.SelectedText, HdnTipoPS.Value.ToEntero,
DdlSubProyecto.SelectedValue.ToString, DdlSubProyecto.SelectedItem.Text, DdlProyecto.SelectedItem.Text, DdlProyecto.SelectedValue.ToString, TxtObsPS.Text.Trim, TxtPrecio.Text.Trim.ToDouble, Total, IVA,
TxtRetIVAModal.Text.ToDouble / 100, TxtRetISRModal.Text.ToDouble / 100, TxtIEPSModal.Text.ToDouble / 100, 0, TxtDescuentoModal.Text.ToDouble, OtrosGastos:=TxtOtrosGastos.Text.ToDouble, CveTipoGasto:=DdlTipoGasto.SelectedValue.ToEntero, TipoGasto:=DdlTipoGasto.SelectedItem.Text,
NoDeducible:=ChkEsNoDeduciblePS.Checked, CveSATPS:=SATClavePS)
AddPS2()
LimpiaAgregar()
If ChkAgregar.Checked = True And Modalidad = "A" Then
RegistraScript("displayToastr(1);", "display")
Else
RegistraScript(String.Format("$('#{0}').modal('hide');", "divAddProducto"))
End If
Case "U" 'UPDATE
UpdatePS()
Alert("Concepto actualizado Correctamente.", TipoMensaje.MsgInformacion)
RegistraScript(String.Format("$('#{0}').modal('hide');", "divAddProducto")) RegistraScript(String.Format("$('#{0}').modal('hide');", "divAddProducto"))
End If End Select
ActualizaTotales = False
Case "U" 'UPDATE If UsuarioActual.Empresa.Funcionalidad(562).ToEntero > 0 Then CargaGastosServicios(UsuarioActual.Empresa.Funcionalidad(562).ToEntero)
UpdatePS()
Alert("Concepto actualizado Correctamente.", TipoMensaje.MsgInformacion)
RegistraScript(String.Format("$('#{0}').modal('hide');", "divAddProducto"))
End Select
ActualizaTotales = False
If UsuarioActual.Empresa.Funcionalidad(562).ToEntero > 0 Then CargaGastosServicios(UsuarioActual.Empresa.Funcionalidad(562).ToEntero) If UsuarioActual.Empresa.UsaAC Then
CompruebaAgregar()
If UsuarioActual.Empresa.UsaAC Then GuardaAC()
CompruebaAgregar() End If
GuardaAC() Else
Alert(Mensaje, TipoMensaje.MsgAdvertencia)
End If End If
'If UsuarioActual.Empresa.Funcionalidad(577).ToString = "1" Then 'If UsuarioActual.Empresa.Funcionalidad(577).ToString = "1" Then
@@ -20808,9 +20848,17 @@ Partial Class Compras_Compras
If ObjContratos.DtResultados.Rows.Count > 0 Then If ObjContratos.DtResultados.Rows.Count > 0 Then
GvContratosControl.DataSource = ObjContratos.DtResultados GvContratosControl.DataSource = ObjContratos.DtResultados
BtnAplicarContrato.Visible = True BtnAplicarContrato.Visible = True
divBusqueda.Visible = True
ChkContinualAgregandoControl.Visible = True
ChkContinualAgregandoControl.Checked = True
Else Else
GvContratosControl.DataSource = Nothing GvContratosControl.DataSource = Nothing
BtnAplicarContrato.Visible = False BtnAplicarContrato.Visible = False
divBusqueda.Visible = False
ChkContinualAgregandoControl.Visible = False
ChkContinualAgregandoControl.Checked = False
End If End If
End If End If
@@ -20885,11 +20933,9 @@ Partial Class Compras_Compras
Next Next
AddPS2() AddPS2()
If Not ChkContinualAgregandoControl.Checked Then
RegistraScript("$('#DivmodalConmtrato').modal('hide')")
RegistraScript("$('#DivmodalConmtrato').modal('hide')") End If
End Sub End Sub

View File

@@ -1046,21 +1046,26 @@
<ItemStyle Width="150px" HorizontalAlign="Right" /> <ItemStyle Width="150px" HorizontalAlign="Right" />
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Dias" Visible="true"> <asp:TemplateField HeaderText="Dias" Visible="true">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="LtlDias" CssClass="ltltotalgvx2" Text='<%# Eval("Dias")%>' runat="server"></asp:Label> <asp:Label ID="LtlDias" CssClass="ltltotalgvx2" Text='<%# Eval("Dias")%>' runat="server"></asp:Label>
</ItemTemplate> </ItemTemplate>
<ItemStyle Width="150px" HorizontalAlign="Right" /> <ItemStyle Width="150px" HorizontalAlign="Right" />
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Limitar Cantidad" Visible="true">
<ItemTemplate>
<asp:Label ID="LtlLimitarCantidad" CssClass="ltltotalgvx2" Text='<%# Eval("LimitarCantidad")%>' runat="server"></asp:Label>
</ItemTemplate>
<ItemStyle Width="150px" HorizontalAlign="Right" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Editar" ItemStyle-Width="50px" ItemStyle-HorizontalAlign="Center"> <asp:TemplateField HeaderText="Editar" ItemStyle-Width="50px" ItemStyle-HorizontalAlign="Center">
<ItemTemplate> <ItemTemplate>
<asp:LinkButton ID="LnkEditarPresupuestoControlDetalle" OnClick="LnkEditarPresupuestoControlDetalle_Click" runat="server" AlternateText="Editar" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" /> <asp:LinkButton ID="LnkEditarPresupuestoControlDetalle" OnClick="LnkEditarPresupuestoControlDetalle_Click" runat="server" AlternateText="Editar" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Eliminar" ItemStyle-Width="50px" ItemStyle-HorizontalAlign="Center"> <asp:TemplateField HeaderText="Eliminar" ItemStyle-Width="50px" ItemStyle-HorizontalAlign="Center">
<ItemTemplate> <ItemTemplate>
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" <asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red"
@@ -2869,6 +2874,11 @@
<asp:RequiredFieldValidator ID="RFVPU" runat="server" ControlToValidate="TxtPU" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''P.U.''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddPSVentas"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVPU" runat="server" ControlToValidate="TxtPU" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''P.U.''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddPSVentas"></asp:RequiredFieldValidator>
<label for="<%= TxtPU.ClientID.ToString()%>">P.U.:</label> <label for="<%= TxtPU.ClientID.ToString()%>">P.U.:</label>
</div> </div>
<div class="form-group form-md-line-input input-iconright">
<asp:CheckBox id="ChkLimitarCantidadAdd" runat="server" Checked="true"/>
<label for="<%= ChkLimitarCantidadAdd.ClientID.ToString()%>"> Limitar Cantidad</label>
</div>
<div class="form-group form-md-line-input input-iconright" style="text-align:right!important"> <div class="form-group form-md-line-input input-iconright" style="text-align:right!important">
@@ -2892,7 +2902,7 @@
<%--MODAL CONTROL PRESUPUESTOS AGREGAR--%> <%--MODAL CONTROL PRESUPUESTOS AGREGAR--%>
<div id="ModalControlAddPS" class="modal ADS fade" role="dialog"> <div id="ModalControlAddPS" class="modal ADS fade" role="dialog">
<div class="modal-dialog" style="width: 450px;"> <div class="modal-dialog" style="width: 500px;">
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalControlAddPS" UpdateMode="Conditional"> <asp:UpdatePanel runat="server" class="modal-content" ID="UpModalControlAddPS" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
@@ -2946,25 +2956,17 @@
<label for="<%= TxtPUInsumos.ClientID.ToString()%>">P.U.:</label> <label for="<%= TxtPUInsumos.ClientID.ToString()%>">P.U.:</label>
</div> </div>
<div class="form-group form-md-line-input input-iconright" runat="server" id="DVActividadesRH" visible="false" > <div class="form-group form-md-line-input input-iconright" runat="server" id="DVActividadesRH" visible="false" >
<asp:DropDownList ID="DdlActividades" runat="server" DataTextField="Actividad" DataValueField="CveActividad" CssClass="table-group-action-input form-control input-inline input-sm select2me" Style="width: 100%;"></asp:DropDownList> <asp:DropDownList ID="DdlActividades" runat="server" DataTextField="Actividad" DataValueField="CveActividad" CssClass="table-group-action-input form-control input-inline input-sm select2me" Style="width: 100%;"></asp:DropDownList>
<label for="<%= DdlActividades.ClientID.ToString()%>">Actividad:</label> <label for="<%= DdlActividades.ClientID.ToString()%>">Actividad:</label>
<asp:RequiredFieldValidator ID="RFVDdlActividades" runat="server" ControlToValidate="DdlActividades" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Actividad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddPSControl"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVDdlActividades" runat="server" ControlToValidate="DdlActividades" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Actividad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddPSControl"></asp:RequiredFieldValidator>
</div> </div>
<div class="form-group form-md-line-input input-iconright" runat="server" id="DVSubTipoActivoFijo" visible="false" >
<div class="form-group form-md-line-input input-iconright" runat="server" id="DVSubTipoActivoFijo" visible="false" > <asp:DropDownList ID="DdlSubTipoActivoFijo" runat="server" DataTextField="SubTipoActivoFijo" DataValueField="CveSubTipoActivoFijo" CssClass="table-group-action-input form-control input-inline input-sm select2me" Style="width: 100%;"></asp:DropDownList>
<asp:DropDownList ID="DdlSubTipoActivoFijo" runat="server" DataTextField="SubTipoActivoFijo" DataValueField="CveSubTipoActivoFijo" CssClass="table-group-action-input form-control input-inline input-sm select2me" Style="width: 100%;"></asp:DropDownList> <label for="<%= DdlSubTipoActivoFijo.ClientID.ToString()%>">Sub Tipo Activo Fijo:</label>
<label for="<%= DdlSubTipoActivoFijo.ClientID.ToString()%>">Sub Tipo Activo Fijo:</label> <asp:RequiredFieldValidator ID="RfvDdlSubTipoActivoFijo" runat="server" ControlToValidate="DdlActividades" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Sub Tipo Activo Fijo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddPSControl"></asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="RfvDdlSubTipoActivoFijo" runat="server" ControlToValidate="DdlActividades" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Sub Tipo Activo Fijo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddPSControl"></asp:RequiredFieldValidator> </div>
</div>
<div class="form-group form-md-line-input input-iconright" runat="server" id="DVDias" visible="false"> <div class="form-group form-md-line-input input-iconright" runat="server" id="DVDias" visible="false">
<asp:TextBox ID="TxtDias" runat="server" CssClass="form-control" ></asp:TextBox> <asp:TextBox ID="TxtDias" runat="server" CssClass="form-control" ></asp:TextBox>
@@ -2972,9 +2974,10 @@
<asp:RequiredFieldValidator ID="RFVTxtDias" runat="server" ControlToValidate="TxtDias" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Dias''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddPSControl" ></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVTxtDias" runat="server" ControlToValidate="TxtDias" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Dias''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddPSControl" ></asp:RequiredFieldValidator>
<label for="<%= TxtDias.ClientID.ToString()%>">Dias:</label> <label for="<%= TxtDias.ClientID.ToString()%>">Dias:</label>
</div> </div>
<div class="form-group form-md-line-input input-iconright">
<asp:CheckBox id="ChkLimitarCantidad" runat="server" Checked="true"/>
<label for="<%= ChkLimitarCantidad.ClientID.ToString()%>"> Limitar Cantidad</label>
</div>
<div class="form-group form-md-line-input input-iconright" style="text-align:right!important"> <div class="form-group form-md-line-input input-iconright" style="text-align:right!important">
<asp:CheckBox ID="ChkContinualAgregandoControl" runat="server" TextAlign="Left" Text="Continuar agregando" CssClass="form-control" Checked="true" /> <asp:CheckBox ID="ChkContinualAgregandoControl" runat="server" TextAlign="Left" Text="Continuar agregando" CssClass="form-control" Checked="true" />

View File

@@ -1498,7 +1498,7 @@ Partial Class Contratos_ContratoObra
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") = False 'If(ChkLimitarVenta.Checked, 1, 0) Row("LimitarCantidad") = ChkLimitarCantidadAdd.Checked 'If(ChkLimitarVenta.Checked, 1, 0)
Row("Observacion") = "" 'TxtObservacionesDetalles.Text Row("Observacion") = "" 'TxtObservacionesDetalles.Text
Row("CveRubro") = 1 Row("CveRubro") = 1
@@ -1508,7 +1508,7 @@ Partial Class Contratos_ContratoObra
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, False, "", Observacion:=Row("Observacion").ToString, CveRubro:=1) 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, Convert.ToBoolean(Row("LimitarCantidad")), "", Observacion:=Row("Observacion").ToString, CveRubro:=1) 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"))
@@ -1557,13 +1557,15 @@ Partial Class Contratos_ContratoObra
'OCInterna = TxtOCInterna.Text.Trim 'OCInterna = TxtOCInterna.Text.Trim
'LimitarCantidad = If(ChkLimitarVenta.Checked, True, False) 'LimitarCantidad = If(ChkLimitarVenta.Checked, True, False)
Observaciones = "" Observaciones = ""
Dim limitarCantidad As Boolean = ChkLimitarCantidad.Checked
Dim row = TmpDT.Select(String.Format(" CveContratoDetalle={0}", CveContratoDetalleEditar))(0) Dim row = TmpDT.Select(String.Format(" CveContratoDetalle={0}", CveContratoDetalleEditar))(0)
Dim LimitarCantidadValidator As Boolean = row("LimitarCantidad").ToString = "True" Dim LimitarCantidadValidator As Boolean = row("LimitarCantidad").ToString = "True"
Dim ObjContratos As New ClsContratos Dim ObjContratos As New ClsContratos
If ObjContratos.UpdateContratosDetalle(CveContratoDetalleEditar, CveContrato, CvePS, Cantidad, PU, UsuarioActual.CveUsuario, NoIdentificacion, False, "", Observaciones, CveRubro:=1) Then If ObjContratos.UpdateContratosDetalle(CveContratoDetalleEditar, CveContrato, CvePS, Cantidad, PU, UsuarioActual.CveUsuario, NoIdentificacion, limitarCantidad, "", Observaciones, CveRubro:=1) 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}",
@@ -1579,7 +1581,7 @@ Partial Class Contratos_ContratoObra
row("UM") = DdlUM.SelectedItem.Text row("UM") = DdlUM.SelectedItem.Text
row("NoIdentificacion") = NoIdentificacion row("NoIdentificacion") = NoIdentificacion
row("OCInterna") = "" row("OCInterna") = ""
row("LimitarCantidad") = False row("LimitarCantidad") = limitarCantidad
row("Observacion") = Observaciones row("Observacion") = Observaciones
TmpDT.AcceptChanges() TmpDT.AcceptChanges()
@@ -1591,15 +1593,13 @@ Partial Class Contratos_ContratoObra
ObjContratos.Dispose() ObjContratos.Dispose()
Gv.EditIndex = -1 Gv.EditIndex = -1
LbTotalGeneral.Text = TmpDT.FiltraParametros("CveTipoPresupuesto=2").SUM("Total").FormatoNumero LbTotalGeneral.Text = TmpDT.FiltraParametros("CveTipoPresupuesto=2").SUM("Total").FormatoNumero
LblImporte.Text = LbTotalGeneral.Text LblImporte.Text = LbTotalGeneral.Text
CargaGVPresupuestos(TmpDT.FiltraParametros("CveTipoPresupuesto=2")) CargaGVPresupuestos(TmpDT.FiltraParametros("CveTipoPresupuesto=2"))
End If End If
CveContratoDetalleEditar = -1
End Sub End Sub
Private Sub CargaDatosPresup() Private Sub CargaDatosPresup()
@@ -1850,7 +1850,7 @@ Partial Class Contratos_ContratoObra
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") = False Row("LimitarCantidad") = ChkLimitarCantidad.Checked
Row("CveRubro") = DdlRubro.SelectedValue.ToEntero Row("CveRubro") = DdlRubro.SelectedValue.ToEntero
Row("Rubro") = DdlRubro.SelectedItem.Text Row("Rubro") = DdlRubro.SelectedItem.Text
@@ -1909,7 +1909,7 @@ Partial Class Contratos_ContratoObra
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, False, "", If ObjContratos.AddContratosDetalle(CveContrato, Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDouble, Row("PU").ToString.ToDouble, UsuarioActual.CveUsuario, Row("CveTipoPresupuesto").ToString.ToEntero, Row("NoIdentificacion").ToString, Convert.ToBoolean(Row("LimitarCantidad")), "",
CveRubro:=Row("CveRubro").ToString.ToEntero, CveActividad:=Row("CveActividad").ToString.ToEntero, CveSubTipoActivoFijo:=Row("CveSubTipoActivoFijo").ToString.ToEntero, Dias:=Row("Dias").ToString.ToEntero) Then CveRubro:=Row("CveRubro").ToString.ToEntero, CveActividad:=Row("CveActividad").ToString.ToEntero, CveSubTipoActivoFijo:=Row("CveSubTipoActivoFijo").ToString.ToEntero, Dias:=Row("Dias").ToString.ToEntero) 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"))
@@ -1977,12 +1977,14 @@ Partial Class Contratos_ContratoObra
Cantidad = TxtCantidadInsumos.Text.ToDouble Cantidad = TxtCantidadInsumos.Text.ToDouble
PU = TxtPUInsumos.Text.ToDouble PU = TxtPUInsumos.Text.ToDouble
Dim limitarCantidad As Boolean = ChkLimitarCantidad.Checked
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, "", False, "", CveRubro:=CveRubro, CveActividad:=CveActividad, CveSubTipoActivoFijo:=CveSubTipoActivoFijo, Dias:=Dias) Then If ObjContratos.UpdateContratosDetalle(CveContratoDetalleEditar, CveContrato, CvePS, Cantidad, PU, UsuarioActual.CveUsuario, "", limitarCantidad, "", CveRubro:=CveRubro, CveActividad:=CveActividad, CveSubTipoActivoFijo:=CveSubTipoActivoFijo, Dias:=Dias) 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}",
@@ -1999,7 +2001,7 @@ Partial Class Contratos_ContratoObra
row("CveUM") = CveUM row("CveUM") = CveUM
row("NoIdentificacion") = "" 'NoIdentificacion row("NoIdentificacion") = "" 'NoIdentificacion
row("LimitarCantidad") = False row("LimitarCantidad") = limitarCantidad
row("CveActividad") = CveActividad row("CveActividad") = CveActividad
row("CveSubTipoActivoFijo") = CveSubTipoActivoFijo row("CveSubTipoActivoFijo") = CveSubTipoActivoFijo
@@ -2028,10 +2030,10 @@ Partial Class Contratos_ContratoObra
End If End If
ObjContratos.Dispose() ObjContratos.Dispose()
GvInsumos.EditIndex = -1 GvInsumos.EditIndex = -1
LbTotalGeneralInsumos.Text = TmpDT.FiltraParametros("CveTipoPresupuesto=1").SUM("Total").FormatoNumero LbTotalGeneralInsumos.Text = TmpDT.FiltraParametros("CveTipoPresupuesto=1").SUM("Total").FormatoNumero
CargaGVPresupuestosInsumos(TmpDT.FiltraParametros("CveTipoPresupuesto=1")) CargaGVPresupuestosInsumos(TmpDT.FiltraParametros("CveTipoPresupuesto=1"))
CveContratoDetalleEditar = -1
End If End If
@@ -2067,9 +2069,14 @@ Partial Class Contratos_ContratoObra
'e.Row.FCLinkButton("imgE").Visible = False 'e.Row.FCLinkButton("imgE").Visible = False
'e.Row.FCLinkButton("imgD").Visible = False 'e.Row.FCLinkButton("imgD").Visible = False
End If End If
If e.Row.FCLabel("LtlLimitarCantidad").Text.ToString = "True" Then
e.Row.FCLabel("LtlLimitarCantidad").Text = "Si"
Else
e.Row.FCLabel("LtlLimitarCantidad").Text = "No"
End If
End If End If
If e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5 Then If e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5 Then
e.Row.FCDropDownList("DdlUMEdit").DataSource = GlobalDTProductosServiciosEquivalencias(e.Row.DataKey("CvePS").ToString.ToEntero, -1, UsuarioActual.CveEmpresa) e.Row.FCDropDownList("DdlUMEdit").DataSource = GlobalDTProductosServiciosEquivalencias(e.Row.DataKey("CvePS").ToString.ToEntero, -1, UsuarioActual.CveEmpresa)
e.Row.FCDropDownList("DdlUMEdit").DataBind() e.Row.FCDropDownList("DdlUMEdit").DataBind()
e.Row.FCDropDownList("DdlUMEdit").SelectedValue = e.Row.DataKey("CveUM") e.Row.FCDropDownList("DdlUMEdit").SelectedValue = e.Row.DataKey("CveUM")
@@ -4200,7 +4207,7 @@ Partial Class Contratos_ContratoObra
End Sub End Sub
Protected Sub LnkModalAddPSVentas_Click(sender As Object, e As EventArgs) Protected Sub LnkModalAddPSVentas_Click(sender As Object, e As EventArgs)
CveContratoDetalleEditar = -1
ModalVentasPSAdd = True ModalVentasPSAdd = True
ChkContinualAgregandoVentas.Visible = True ChkContinualAgregandoVentas.Visible = True
ChkContinualAgregandoVentas.Checked = True ChkContinualAgregandoVentas.Checked = True
@@ -4210,7 +4217,7 @@ Partial Class Contratos_ContratoObra
End Sub End Sub
Protected Sub LnkModalAddPSControl_Click(sender As Object, e As EventArgs) Protected Sub LnkModalAddPSControl_Click(sender As Object, e As EventArgs)
CveContratoDetalleEditar = -1
ModalControlPSAdd = True ModalControlPSAdd = True
ChkContinualAgregandoControl.Visible = True ChkContinualAgregandoControl.Visible = True
ChkContinualAgregandoControl.Checked = True ChkContinualAgregandoControl.Checked = True
@@ -4264,8 +4271,7 @@ Partial Class Contratos_ContratoObra
DdlClasificacionAddInsumos.SelectedValueExist(gvRow.DataKey("CveClasificacion").ToEntero) DdlClasificacionAddInsumos.SelectedValueExist(gvRow.DataKey("CveClasificacion").ToEntero)
DdlProductowsInsumos.txtText.Value = gvRow.DataKey("PS").ToString DdlProductowsInsumos.ddl.SelectedValueExist(gvRow.DataKey("CvePS").ToString.ToEntero)
DdlProductowsInsumos.txtValue.Value = gvRow.DataKey("CvePS").ToString
DdlUMInsumos.DataSource = GlobalDTProductosServiciosEquivalencias(DdlProductowsInsumos.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa) DdlUMInsumos.DataSource = GlobalDTProductosServiciosEquivalencias(DdlProductowsInsumos.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa)
@@ -4273,6 +4279,8 @@ Partial Class Contratos_ContratoObra
DdlUMInsumos.SelectedValueExist(gvRow.DataKey("CveUM").ToDouble.ToString) DdlUMInsumos.SelectedValueExist(gvRow.DataKey("CveUM").ToDouble.ToString)
TxtPUInsumos.Text = gvRow.DataKey("PU").ToDouble.ToString TxtPUInsumos.Text = gvRow.DataKey("PU").ToDouble.ToString
Dim limitarCantidad As String = gvRow.DataKey("LimitarCantidad").ToString
ChkLimitarCantidad.Checked = limitarCantidad = "True"
DdlRubro.SelectedValueExist(gvRow.DataKey("CveRubro").ToString) DdlRubro.SelectedValueExist(gvRow.DataKey("CveRubro").ToString)
@@ -4344,6 +4352,7 @@ Partial Class Contratos_ContratoObra
DdlProductows.txtValue.Value = "" DdlProductows.txtValue.Value = ""
DdlUM.SelectedValueExist(-1) DdlUM.SelectedValueExist(-1)
TxtPU.Text = "" TxtPU.Text = ""
ChkLimitarCantidad.Checked = False
If ModalVentasPSAdd = True Then If ModalVentasPSAdd = True Then

View File

@@ -349,7 +349,10 @@
</div> </div>
</div> </div>
<br /> <br />
<div class="row col-md-12" align="right" id="DivBuscador" runat="server"> <div class="row col-md-4" align="left" id="divRegistrados" runat="server">
<asp:Label runat="server">Número de registros: <b><asp:Literal ID="LtlTotalRegistros" runat="server"></asp:Literal></b></asp:Label>
</div>
<div class="row col-md-8" align="right" id="DivBuscador" runat="server">
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="return Filtrar(event);" style="display: inline-block; margin-right: -20px; width: 150px;" /> <input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="return Filtrar(event);" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvIFD.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a> <a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvIFD.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
<div style="display: inline-block;" id="SumFiltra"></div> <div style="display: inline-block;" id="SumFiltra"></div>

View File

@@ -139,6 +139,7 @@ Partial Class Inventarios_InventarioFisicoDetalle
LBAvance.Visible = UsuarioActual.TienePermisoProceso(178) ' si tiene permiso de ver el avance, se activa LBAvance.Visible = UsuarioActual.TienePermisoProceso(178) ' si tiene permiso de ver el avance, se activa
End Select End Select
GvIFD.Visible = False GvIFD.Visible = False
divRegistrados.Visible = False
DivBuscador.Visible = False DivBuscador.Visible = False
If ObjInventario.GetInventarioFisicoDetallesAlmacen(CveInventarioFisico, UsuarioActual.CveEmpresa) Then If ObjInventario.GetInventarioFisicoDetallesAlmacen(CveInventarioFisico, UsuarioActual.CveEmpresa) Then
@@ -251,6 +252,8 @@ Partial Class Inventarios_InventarioFisicoDetalle
Protected Sub BtnVerRegistrados_Click(sender As Object, e As EventArgs) Protected Sub BtnVerRegistrados_Click(sender As Object, e As EventArgs)
GvIFD.Visible = True GvIFD.Visible = True
DivBuscador.Visible = True DivBuscador.Visible = True
divRegistrados.Visible = True
Dim Inventario As New ClsInventarios Dim Inventario As New ClsInventarios
If Inventario.GetInventarioFisicoDetalle(CveInventarioFisico, ddlUsuario.SelectedValue.ToString.ToEntero) Then If Inventario.GetInventarioFisicoDetalle(CveInventarioFisico, ddlUsuario.SelectedValue.ToString.ToEntero) Then
If Inventario.DtResultados.Rows.Count > 0 Then If Inventario.DtResultados.Rows.Count > 0 Then
@@ -263,6 +266,7 @@ Partial Class Inventarios_InventarioFisicoDetalle
GvIFD.DataSource = Nothing GvIFD.DataSource = Nothing
End If End If
' DtDatos = Inventario.DtResultados ' DtDatos = Inventario.DtResultados
LtlTotalRegistros.Text = Inventario.DtResultados.Rows.Count
End If End If
Inventario.Dispose() Inventario.Dispose()
GvIFD.DataBind() GvIFD.DataBind()
@@ -457,6 +461,8 @@ Partial Class Inventarios_InventarioFisicoDetalle
End If End If
GvIFD.Visible = False GvIFD.Visible = False
DivBuscador.Visible = False DivBuscador.Visible = False
divRegistrados.Visible = False
UPPInventario.Update() UPPInventario.Update()
End Sub End Sub

View File

@@ -141,12 +141,19 @@
</div> </div>
</div> </div>
<label class="col-md-1 truncate">Producto:</label> <label class="col-md-1 truncate">Producto:</label>
<div class="col-md-2"> <div class="col-md-1">
<asp:DropDownList ID="DdlExistencia" runat="server" CssClass="select2me" Width="100%" CssStyle="width: 100%;"> <asp:DropDownList ID="DdlExistencia" runat="server" CssClass="select2me" Width="100%" CssStyle="width: 100%;">
<asp:ListItem Text="Con existencia" Value="2" /> <asp:ListItem Text="Con existencia" Value="2" />
<asp:ListItem Text="Sin existencia" Value="3" /> <asp:ListItem Text="Sin existencia" Value="3" />
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<label class="col-md-1 truncate">Ver por:</label>
<div class="col-md-1">
<asp:DropDownList ID="Ddlgrupo" runat="server" CssClass="select2me" Width="100%" CssStyle="width: 100%;">
<asp:ListItem Text="Almacenes" Value="1" />
<asp:ListItem Text="Sucursales" Value="2" />
</asp:DropDownList>
</div>
</div> </div>
</div> </div>
</div> </div>
@@ -216,10 +223,6 @@
<asp:ListItem Text="No" Value="0" Selected="True" /> <asp:ListItem Text="No" Value="0" Selected="True" />
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<div class="col-md-1"><span>Ver por SubProyecto:</span></div>
<div class="col-md-1">
<asp:CheckBox runat="server" ID="chkAgruparSubProyecto"/>
</div>
</asp:Panel> </asp:Panel>
</div> </div>
</div> </div>

View File

@@ -139,60 +139,46 @@ Partial Class Inventarios_KardexAlmacen
Dim CveAlmacenes As String = ddlAlmacen.GetSelectedValues() Dim CveAlmacenes As String = ddlAlmacen.GetSelectedValues()
Dim CveProveedorCompra As Integer = If(DdlProveedor.SelectedValue.ToEntero > 0, DdlProveedor.SelectedValue.ToEntero, -1) Dim CveProveedorCompra As Integer = If(DdlProveedor.SelectedValue.ToEntero > 0, DdlProveedor.SelectedValue.ToEntero, -1)
Dim Marcas As String = If(DdlMarca.GetSelectedValuesM = "", "-1", DdlMarca.GetSelectedValuesM) Dim Marcas As String = If(DdlMarca.GetSelectedValuesM = "", "-1", DdlMarca.GetSelectedValuesM)
Dim dtMovs As DataTable = Nothing Dim GPO As Integer = Ddlgrupo.SelectedValue.ToEntero
If chkAgruparSubProyecto.Checked Then If ObjMovimientos.GetKardexAlmacenHorizontal(CvePS, FechaF, -1, DdlUnidadMedida.SelectedValue.ToEntero, CveProveedorCompra, DdlTipoAlmacen.SelectedValue.ToEntero(), DdlIncluyeTransitorios.SelectedValue.ToEntero(),
If ObjMovimientos.GetKardexAlmacenHorizontalAgrupado(CvePS, FechaF, -1, DdlUnidadMedida.SelectedValue.ToEntero, CveProveedorCompra, DdlTipoAlmacen.SelectedValue.ToEntero(), DdlIncluyeTransitorios.SelectedValue.ToEntero(), DdlClasificacion.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CondicionExistencias:=DdlExistencia.SelectedValue, Orden:=DdlOrden.SelectedValue.ToEntero(), Marcas:=Marcas, IncluyeProyectado:=DdlProyeccionFiltro.SelectedValue.ToEntero, CveAlmacenes:=CveAlmacenes) Then DdlClasificacion.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CondicionExistencias:=DdlExistencia.SelectedValue,
If ObjMovimientos.DtResultados IsNot Nothing AndAlso ObjMovimientos.DtResultados.Rows.Count > 0 Then Orden:=DdlOrden.SelectedValue.ToEntero(), Marcas:=Marcas, IncluyeProyectado:=DdlProyeccionFiltro.SelectedValue.ToEntero, CveAlmacenes:=CveAlmacenes, GPO:=GPO) Then
dt = ObjMovimientos.DtResultados If ObjMovimientos.DtResultados IsNot Nothing AndAlso ObjMovimientos.DtResultados.Rows.Count > 0 Then
End If dt = ObjMovimientos.DtResultados
Else Dim ListaBorrar As New List(Of DataColumn)
ObjMovimientos.Dispose() For index = 3 To dt.Columns.Count - 1
Alert("Ocurrió un error al consultar el Kardex.", TipoMensaje.MsgError) Dim TotColumna As Double = 0
Exit Sub For Each Dr As DataRow In dt.Rows
End If TotColumna += Dr.Item(index).ToString.ToDouble
Else Next
If ObjMovimientos.GetKardexAlmacenHorizontal(CvePS, FechaF, -1, DdlUnidadMedida.SelectedValue.ToEntero, CveProveedorCompra, DdlTipoAlmacen.SelectedValue.ToEntero(), DdlIncluyeTransitorios.SelectedValue.ToEntero(), DdlClasificacion.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CondicionExistencias:=DdlExistencia.SelectedValue, Orden:=DdlOrden.SelectedValue.ToEntero(), Marcas:=Marcas, IncluyeProyectado:=DdlProyeccionFiltro.SelectedValue.ToEntero, CveAlmacenes:=CveAlmacenes) Then 'If Not TotColumna > 0 Then
If ObjMovimientos.DtResultados IsNot Nothing AndAlso ObjMovimientos.DtResultados.Rows.Count > 0 Then ' ListaBorrar.Add(dt.Columns(index))
dt = ObjMovimientos.DtResultados 'End If
End If
Else
ObjMovimientos.Dispose()
Alert("Ocurrió un error al consultar el Kardex.", TipoMensaje.MsgError)
Exit Sub
End If
End If
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
Dim ListaBorrar As New List(Of DataColumn)
For index = 3 To dt.Columns.Count - 1
Dim TotColumna As Double = 0
For Each Dr As DataRow In dt.Rows
TotColumna += Dr.Item(index).ToString.ToDouble
Next Next
'If Not TotColumna > 0 Then For Each item As DataColumn In ListaBorrar
' ListaBorrar.Add(dt.Columns(index)) dt.Columns().Remove(item)
'End If Next
Next dt.AcceptChanges()
For Each item As DataColumn In ListaBorrar GvDatos.DataSource = dt
dt.Columns().Remove(item) Else
Next Alert("La búsqueda no contiene resultados.", TipoMensaje.MsgAdvertencia)
dt.AcceptChanges() GvDatos.Columns.Clear()
GvDatos.DataSource = dt dt = Nothing
GvDatos.DataBind() Exit Sub
End If
Else Else
Alert("La búsqueda no contiene resultados.", TipoMensaje.MsgAdvertencia) ObjMovimientos.Dispose()
GvDatos.Columns.Clear() Alert("Ocurrió un error al consultar el Kardex.", TipoMensaje.MsgError)
dt = Nothing
Exit Sub Exit Sub
End If End If
GvDatos.DataBind()
For index = 4 To GvDatos.Rows(0).Cells.Count - 1 For index = 4 To GvDatos.Rows(0).Cells.Count - 1
GvDatos.HeaderRow.Cells(index).Text = GvDatos.HeaderRow.Cells(index).Text.Split("|")(0) GvDatos.HeaderRow.Cells(index).Text = GvDatos.HeaderRow.Cells(index).Text.Split("|")(0)
Next Next
ObjMovimientos.Dispose()
End Sub End Sub
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound

View File

@@ -2747,33 +2747,33 @@
</div> </div>
</div> </div>
<br /> <br />
<div class="row col-md-12" align="right" runat="server" id="divBusqueda" visible="false">
<input type="text" id="TxtBusqueda3" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda3','{0}');", GvContratosControl.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda3','{0}');", GvContratosControl.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<asp:GridView ID="GvContratosControl" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron partidas" <asp:GridView ID="GvContratosControl" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron partidas"
DataKeyNames="CveContratoDetalle,CvePS,PS,Cantidad,PU,CantidadMax,CveUnidadMedida,Abreviatura,CveSubProyecto,SubProyecto,Codigo,CveProyecto,Proyecto,IVA,RetISR,RetIVA,IEPSPorcentaje,IEPSGrabaIVA,CveClasificacion,Clasificacion" DataKeyNames="CveContratoDetalle,CvePS,PS,Cantidad,PU,CantidadMax,CveUnidadMedida,Abreviatura,CveSubProyecto,SubProyecto,Codigo,CveProyecto,Proyecto,IVA,RetISR,RetIVA,IEPSPorcentaje,IEPSGrabaIVA,CveClasificacion,Clasificacion"
CssClass="table GVEstimacion table-advance table-hover" GridLines="None" Width="100%"> CssClass="table GVEstimacion table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None" Width="100%">
<Columns> <Columns>
<asp:TemplateField HeaderText="Producto"> <asp:TemplateField HeaderText="Producto">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="LblPS" runat="server" CssClass="Texto" Text='<%# Eval("PS")%>'></asp:Label> <asp:Label ID="LblPS" runat="server" CssClass="Texto" Text='<%# Eval("PS")%>' Width="250px"></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Cant. Max" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<span><%# Eval("CantidadMax", "{0:N2}")%></span>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Cantidad">
<ItemTemplate>
<asp:TextBox ID="TxtCantidad" Text="" CssClass="txtcant" onkeyup="ValidateCant(this)" type="number" step="any"
data-cantidad='<%# Eval("CantidadMax")%>' data-pu='<%# Eval("PU")%>' data-cve='<%# Eval("CveContratoDetalle") %>'
Width="70" runat="server"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="PU" ItemStyle-HorizontalAlign="Right"> <asp:TemplateField HeaderText="Cantidad">
<ItemTemplate>
<asp:TextBox ID="TxtCantidad" Text="" CssClass="txtcant" onkeyup="ValidateCantCon(this)" type="number" step="any"
data-cantidad='<%# Eval("CantidadMax")%>' data-pu='<%# Eval("PU")%>' data-cve='<%# Eval("CveContratoDetalle") %>'
Width="90" runat="server"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="PU">
<ItemTemplate> <ItemTemplate>
<span><%# Eval("PU", "{0:N2}")%></span> <span><%# Eval("PU", "{0:N2}")%></span>
</ItemTemplate> </ItemTemplate>
@@ -2790,8 +2790,9 @@
</div> </div>
</div> </div>
<div class="row form-group form-md-line-input input-iconright" style="text-align:right!important">
<asp:CheckBox ID="ChkContinualAgregandoControl" runat="server" TextAlign="Left" Text="Continuar agregando" CssClass="form-control" Checked="true" Visible="false"/>
</div>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">

View File

@@ -2094,101 +2094,142 @@ Partial Class OC
Exit Sub Exit Sub
End If End If
'Valida cantidad en contrato
If DtDetalle IsNot Nothing Then Dim ObjContratos As New ClsContratos
Dim DrPS = GlobalDTPS(CveEmpresaActual, CvePS:=DdlP2.SelectedValue.ToEntero).FiltroPrimero("") Dim TieneError As Boolean = False
If DrPS Is Nothing Then Dim Mensaje As String = ""
Alert("Ocurrió un error al cargar la información del producto. Por favor vuelva a intentar.", TipoMensaje.MsgAdvertencia) Dim dttemp As DataTable = GlobalDTContratos().FiltraParametros(String.Format("CveSubProyecto = {0}", DdlSubProyecto.SelectedValue.ToString))
Exit Sub If dttemp IsNot Nothing AndAlso dttemp.Rows.Count > 0 Then
End If Dim drContrato As DataRow = dttemp.Rows(0)
If ObjContratos.GetContratosDetalle(drContrato("CveContrato").ToString.ToEntero) Then
If UsuarioActual.Empresa.Funcionalidad(532) = "1" Then Dim dtContratodetalle As DataTable = ObjContratos.DtResultados.FiltraParametros(String.Format("CvePS = {0}", DdlP2.SelectedValue.ToString))
Dim ObjCon As New ClsContratos If dtContratodetalle IsNot Nothing AndAlso dtContratodetalle.Rows.Count > 0 Then
Dim CvePresupuesto As Integer = 0 Dim drContratoDetalle As DataRow = dtContratodetalle(0)
Dim Autorizado As Double = 0 If Convert.ToBoolean(drContratoDetalle("LimitarCantidad")) Then
Dim Ejercido As Double = 0 If ObjContratos.GetReporteContratosAvancesDetalleControl(drContrato("CveContrato").ToString.ToEntero, UsuarioActual.CveEmpresa) Then
If ObjCon.GetPresupuestos(-1, "-1", DdlSubProyecto.SelectedValue.ToEntero, 2, -1, UsuarioActual.CveEmpresa) Then Dim dtContratodetalleControl As DataTable = ObjContratos.DtResultados.FiltraParametros(String.Format("CvePS = {0}", DdlP2.SelectedValue.ToString))
If ObjCon.DtResultados.Rows.Count > 0 Then If dtContratodetalleControl IsNot Nothing AndAlso dtContratodetalleControl.Rows.Count > 0 Then
CvePresupuesto = ObjCon.DtResultados.Rows(0)("CvePresupuesto").ToString.ToEntero Dim drContratoDetalleControl As DataRow = dtContratodetalleControl(0)
If CvePresupuesto > 0 Then If TxtCant.Text.Trim.ToDouble > drContratoDetalleControl("FaltanteCantidad").ToString.ToDouble Then
If ObjCon.GetPresupuestosDetalle(CvePresupuesto, -1, UsuarioActual.CveEmpresa) Then Mensaje = String.Format("La cantidad del Producto/Servicio debe ser menor o igual a {0}", drContratoDetalleControl("FaltanteCantidad").ToString)
If ObjCon.DtResultados.FiltraParametros($"CveClasificacion = {DdlClasificacion.SelectedValue.ToEntero} AND Importe > 0").Rows.Count > 0 Then TieneError = True
Autorizado = ObjCon.DtResultados.FiltraParametros($"CveClasificacion = {DdlClasificacion.SelectedValue.ToEntero} AND Importe > 0").Rows(0)("Importe").ToString.ToDouble
End If End If
Else
Mensaje = "Este producto no pertence al contrato seleccionado"
TieneError = True
End If End If
If ObjCon.GetPresupuestosRep(CvePresupuesto, -1, 1, $"01/09/{DateTime.Now.Year - 1}".ToDate, Now, UsuarioActual.CveEmpresa, DdlProyecto.SelectedValue.ToEntero, Else
Mensaje = "Error al consultar el contrato"
End If
End If
Else
Mensaje = "Este producto no pertence al contrato seleccionado"
TieneError = True
End If
Else
Mensaje = "Error al consultar el contrato"
End If
End If
If Not TieneError Then
ObjContratos.Dispose()
If DtDetalle IsNot Nothing Then
Dim DrPS = GlobalDTPS(CveEmpresaActual, CvePS:=DdlP2.SelectedValue.ToEntero).FiltroPrimero("")
If DrPS Is Nothing Then
Alert("Ocurrió un error al cargar la información del producto. Por favor vuelva a intentar.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If UsuarioActual.Empresa.Funcionalidad(532) = "1" Then
Dim ObjCon As New ClsContratos
Dim CvePresupuesto As Integer = 0
Dim Autorizado As Double = 0
Dim Ejercido As Double = 0
If ObjCon.GetPresupuestos(-1, "-1", DdlSubProyecto.SelectedValue.ToEntero, 2, -1, UsuarioActual.CveEmpresa) Then
If ObjCon.DtResultados.Rows.Count > 0 Then
CvePresupuesto = ObjCon.DtResultados.Rows(0)("CvePresupuesto").ToString.ToEntero
If CvePresupuesto > 0 Then
If ObjCon.GetPresupuestosDetalle(CvePresupuesto, -1, UsuarioActual.CveEmpresa) Then
If ObjCon.DtResultados.FiltraParametros($"CveClasificacion = {DdlClasificacion.SelectedValue.ToEntero} AND Importe > 0").Rows.Count > 0 Then
Autorizado = ObjCon.DtResultados.FiltraParametros($"CveClasificacion = {DdlClasificacion.SelectedValue.ToEntero} AND Importe > 0").Rows(0)("Importe").ToString.ToDouble
End If
End If
If ObjCon.GetPresupuestosRep(CvePresupuesto, -1, 1, $"01/09/{DateTime.Now.Year - 1}".ToDate, Now, UsuarioActual.CveEmpresa, DdlProyecto.SelectedValue.ToEntero,
DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveUsuario, DdlClasificacion.SelectedValue.ToEntero) Then DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveUsuario, DdlClasificacion.SelectedValue.ToEntero) Then
If ObjCon.DtResultados.Rows.Count > 0 Then If ObjCon.DtResultados.Rows.Count > 0 Then
Ejercido = ObjCon.DtResultados.Rows(0)("Ejercido").ToString.ToDouble Ejercido = ObjCon.DtResultados.Rows(0)("Ejercido").ToString.ToDouble
End If
End If End If
End If End If
End If End If
End If End If
End If ObjCon.Dispose()
ObjCon.Dispose()
If CvePresupuesto > 0 And Autorizado > 0 Then If CvePresupuesto > 0 And Autorizado > 0 Then
Dim Diferencia As Double = (Ejercido + If(txtPrecioUnitario.Text.ToDouble > 0, (txtPrecioUnitario.Text.ToDouble * TxtCant.Text.ToDouble) - TxtDescuentoAdd.Text.ToDouble, 0)) - Autorizado Dim Diferencia As Double = (Ejercido + If(txtPrecioUnitario.Text.ToDouble > 0, (txtPrecioUnitario.Text.ToDouble * TxtCant.Text.ToDouble) - TxtDescuentoAdd.Text.ToDouble, 0)) - Autorizado
If Diferencia > 0 Then If Diferencia > 0 Then
Alert($"No hay presupuesto disponible en el subproyecto <b>{DdlSubProyecto.SelectedItem.Text}</b> y la clasificación <b>{DdlClasificacion.SelectedItem.Text}</b> se excede por <b>{Diferencia.FormatoNumero}</b>", TipoMensaje.MsgAdvertencia) Alert($"No hay presupuesto disponible en el subproyecto <b>{DdlSubProyecto.SelectedItem.Text}</b> y la clasificación <b>{DdlClasificacion.SelectedItem.Text}</b> se excede por <b>{Diferencia.FormatoNumero}</b>", TipoMensaje.MsgAdvertencia)
Exit Sub Exit Sub
End If
End If End If
End If End If
End If
Dim RetISR As Double = DrPS("RetISR").ToString.ToDouble Dim RetISR As Double = DrPS("RetISR").ToString.ToDouble
Dim RetIVA As Double = DrPS("RetIVA").ToString.ToDouble Dim RetIVA As Double = DrPS("RetIVA").ToString.ToDouble
Dim IvaPS As Double = DrPS("IVA").ToString.ToDouble Dim IvaPS As Double = DrPS("IVA").ToString.ToDouble
'If IvaPS = -1 Then 'IVA DE LA SUCURSAL 'If IvaPS = -1 Then 'IVA DE LA SUCURSAL
' IvaPS = GlobalDTSubProyectos(-1, DdlSubProyecto.SelectedValue.ToEntero).FiltroPrimeroValor("IVA").ToDouble ' IvaPS = GlobalDTSubProyectos(-1, DdlSubProyecto.SelectedValue.ToEntero).FiltroPrimeroValor("IVA").ToDouble
'End If 'End If
Dim IEPSPS As Double = DrPS("IEPSPorcentaje").ToString.ToDouble Dim IEPSPS As Double = DrPS("IEPSPorcentaje").ToString.ToDouble
Dim IEPSPSIVA As Double = If(DrPS("IEPSGrabaIVA").ToString = "True", DrPS("IEPSPorcentaje").ToString.ToDouble, 0) Dim IEPSPSIVA As Double = If(DrPS("IEPSGrabaIVA").ToString = "True", DrPS("IEPSPorcentaje").ToString.ToDouble, 0)
Dim IdCuentaPorEjercer As Integer = If(HdnCveCuentaPorEjercer.Value = String.Empty, -1, HdnCveCuentaPorEjercer.Value.ToEntero) Dim IdCuentaPorEjercer As Integer = If(HdnCveCuentaPorEjercer.Value = String.Empty, -1, HdnCveCuentaPorEjercer.Value.ToEntero)
Dim IdCuentaComprometido As Integer = If(HdnCveCuentaComprometido.Value = String.Empty, -1, HdnCveCuentaComprometido.Value.ToEntero) Dim IdCuentaComprometido As Integer = If(HdnCveCuentaComprometido.Value = String.Empty, -1, HdnCveCuentaComprometido.Value.ToEntero)
Dim Proyecto As String = If(DdlProyecto.SelectedValue.ToString.ToEntero > 0, DdlProyecto.SelectedItem.Text, "Sin Proyecto") Dim Proyecto As String = If(DdlProyecto.SelectedValue.ToString.ToEntero > 0, DdlProyecto.SelectedItem.Text, "Sin Proyecto")
Dim SubProyecto As String = If(DdlSubProyecto.SelectedValue.ToString.ToEntero > 0, DdlSubProyecto.SelectedItem.Text, "Sin SubProyecto") Dim SubProyecto As String = If(DdlSubProyecto.SelectedValue.ToString.ToEntero > 0, DdlSubProyecto.SelectedItem.Text, "Sin SubProyecto")
Dim TotalPS As Double = If(txtPrecioUnitario.Text.ToDouble > 0, (txtPrecioUnitario.Text.ToDouble * TxtCant.Text.ToDouble) - TxtDescuentoAdd.Text.ToDouble, 0) Dim TotalPS As Double = If(txtPrecioUnitario.Text.ToDouble > 0, (txtPrecioUnitario.Text.ToDouble * TxtCant.Text.ToDouble) - TxtDescuentoAdd.Text.ToDouble, 0)
Dim ImportePS As Double = If(txtPrecioUnitario.Text.ToDouble > 0, txtPrecioUnitario.Text.ToDouble, 0) Dim ImportePS As Double = If(txtPrecioUnitario.Text.ToDouble > 0, txtPrecioUnitario.Text.ToDouble, 0)
Dim CveOrdenCompraDetalle As Integer = DtDetalle.MAX("CveOrdenCompraDetalle").ToEntero + 100 Dim CveOrdenCompraDetalle As Integer = DtDetalle.MAX("CveOrdenCompraDetalle").ToEntero + 100
'Si es Proveedor Extranjero el IVA es 0% 'Si es Proveedor Extranjero el IVA es 0%
If GlobalDTCompProveedores(CveEmpresaActual).FiltraParametros($"CveProveedor = {DdlProveedores.SelectedValue} AND RFC = 'XEXX010101000'").Rows.Count = 1 Then If GlobalDTCompProveedores(CveEmpresaActual).FiltraParametros($"CveProveedor = {DdlProveedores.SelectedValue} AND RFC = 'XEXX010101000'").Rows.Count = 1 Then
IvaPS = 0 IvaPS = 0
End If End If
AddPS(TxtCant.Text, DdlP2.SelectedValue.ToEntero, DdlP2.SelectedText, TxtObsPS.Text, ImportePS, TxtDescuentoAdd.Text.ToDouble, TotalPS, AddPS(TxtCant.Text, DdlP2.SelectedValue.ToEntero, DdlP2.SelectedText, TxtObsPS.Text, ImportePS, TxtDescuentoAdd.Text.ToDouble, TotalPS,
CboUnidadMedida.SelectedValue.ToEntero, IvaPS, IEPSPS, IEPSPSIVA, DdlClasificacion.SelectedValue.ToEntero, CboUnidadMedida.SelectedItem.Text, DdlClasificacion.SelectedItem.Text, DdlProyecto.SelectedValue.ToEntero, Proyecto, CboUnidadMedida.SelectedValue.ToEntero, IvaPS, IEPSPS, IEPSPSIVA, DdlClasificacion.SelectedValue.ToEntero, CboUnidadMedida.SelectedItem.Text, DdlClasificacion.SelectedItem.Text, DdlProyecto.SelectedValue.ToEntero, Proyecto,
DdlSubProyecto.SelectedValue.ToEntero, SubProyecto, LblCodigo.Text, HdnCveActivoFijo.Value.ToEntero, 0, CveOrdenCompraDetalle, CveOrdenCompra, IdCuentaPorEjercer, DdlSubProyecto.SelectedValue.ToEntero, SubProyecto, LblCodigo.Text, HdnCveActivoFijo.Value.ToEntero, 0, CveOrdenCompraDetalle, CveOrdenCompra, IdCuentaPorEjercer,
IdCuentaComprometido, DdlACGeneral1.SelectedValue.ToEntero, DdlACGeneral2.SelectedValue.ToEntero, DdlACGeneral3.SelectedValue.ToEntero, DdlACGeneral4.SelectedValue.ToEntero, IdCuentaComprometido, DdlACGeneral1.SelectedValue.ToEntero, DdlACGeneral2.SelectedValue.ToEntero, DdlACGeneral3.SelectedValue.ToEntero, DdlACGeneral4.SelectedValue.ToEntero,
DdlACGeneral5.SelectedValue.ToEntero, RetIVA, RetISR, CveCultivoCuadroDetalle:=DdlCultivosCuadro.SelectedValue.ToEntero, Cuadro:=DdlCultivosCuadro.SelectedItem.Text) DdlACGeneral5.SelectedValue.ToEntero, RetIVA, RetISR, CveCultivoCuadroDetalle:=DdlCultivosCuadro.SelectedValue.ToEntero, Cuadro:=DdlCultivosCuadro.SelectedItem.Text)
TxtCant.Text = "" TxtCant.Text = ""
CboUnidadMedida.SelectedIndex = 0 CboUnidadMedida.SelectedIndex = 0
DdlClasificacion.SelectedIndex = 0 DdlClasificacion.SelectedIndex = 0
DdlP2.SelectedValue = "-1" DdlP2.SelectedValue = "-1"
DdlP2.SelectedText = "Seleccione un producto o servicio" DdlP2.SelectedText = "Seleccione un producto o servicio"
txtPrecioUnitario.Text = "" txtPrecioUnitario.Text = ""
TxtObsPS.Text = "" TxtObsPS.Text = ""
HdnCveActivoFijo.Value = "" HdnCveActivoFijo.Value = ""
LblCodigo.Text = "" LblCodigo.Text = ""
LblCvePOA.Text = "" LblCvePOA.Text = ""
TxtCant.Focus() TxtCant.Focus()
Total.Text = "0.00" Total.Text = "0.00"
TxtDescuentoAdd.Text = "0.00" TxtDescuentoAdd.Text = "0.00"
End If
CargaSuperior()
CargaDatosDetalles()
UPPDetalle.Update()
Else
Alert(Mensaje, TipoMensaje.MsgAdvertencia)
End If End If
ObjContratos.Dispose()
CargaSuperior()
CargaDatosDetalles()
UPPDetalle.Update()
End Sub End Sub
Private Sub AddPS(Cantidad As String, CvePS As Integer, PS As String, Observaciones As String, Importe As Double, Descuento As Double, Total As Double, CveUnidadMedida As Integer, IVAPS As Double, IEPSPS As Double, IEPSPSIVA As Double, CveClasificacion As Integer, Private Sub AddPS(Cantidad As String, CvePS As Integer, PS As String, Observaciones As String, Importe As Double, Descuento As Double, Total As Double, CveUnidadMedida As Integer, IVAPS As Double, IEPSPS As Double, IEPSPSIVA As Double, CveClasificacion As Integer,
UM As String, Clasificacion As String, CveProyecto As Integer, Proyecto As String, CveSubProyecto As Integer, SubProyecto As String, CodigoAF As String, CveActivoFijo As Integer, TipoDato As Integer, UM As String, Clasificacion As String, CveProyecto As Integer, Proyecto As String, CveSubProyecto As Integer, SubProyecto As String, CodigoAF As String, CveActivoFijo As Integer, TipoDato As Integer,
@@ -8396,9 +8437,17 @@ Partial Class OC
If ObjContratos.DtResultados.Rows.Count > 0 Then If ObjContratos.DtResultados.Rows.Count > 0 Then
GvContratosControl.DataSource = ObjContratos.DtResultados GvContratosControl.DataSource = ObjContratos.DtResultados
BtnAplicarContrato.Visible = True BtnAplicarContrato.Visible = True
divBusqueda.Visible = True
ChkContinualAgregandoControl.Visible = True
ChkContinualAgregandoControl.Checked = True
Else Else
GvContratosControl.DataSource = Nothing GvContratosControl.DataSource = Nothing
BtnAplicarContrato.Visible = False BtnAplicarContrato.Visible = False
divBusqueda.Visible = False
ChkContinualAgregandoControl.Visible = False
ChkContinualAgregandoControl.Checked = False
End If End If
End If End If