Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -33,7 +33,7 @@ public partial class AF_CatTiposServiciosActividades : ClsPaginas
|
||||
private void CargaDatos()
|
||||
{
|
||||
ClsAF ObjAF = new ClsAF();
|
||||
if (ObjAF.GetTiposServiciosActividades(-1, -1))
|
||||
if (ObjAF.GetTiposServiciosActividades(-1, -1,-1))
|
||||
{
|
||||
GvDatos.DataSource = ObjAF.DtResultados;
|
||||
GvDatos.DataBind();
|
||||
@@ -74,7 +74,7 @@ public partial class AF_CatTiposServiciosActividades : ClsPaginas
|
||||
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
CveTipoServicioActividad = GvRow.DataKey("CveTipoServicioActividad").ToEntero();
|
||||
ClsAF ObjAF = new ClsAF();
|
||||
if (ObjAF.DeleteTiposServiciosActividades(CveTipoServicioActividad))
|
||||
if (ObjAF.DeleteTiposServiciosActividades(CveTipoServicioActividad, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
CargaDatos();
|
||||
UpDatos.Update();
|
||||
@@ -89,14 +89,14 @@ public partial class AF_CatTiposServiciosActividades : ClsPaginas
|
||||
ClsAF ObjAF = new ClsAF();
|
||||
if (BtnAgregarTipoServicio.Text == "Agregar")
|
||||
{
|
||||
if (ObjAF.AddTiposServiciosActividades(DdlActividades.SelectedValue.ToEntero(),TxtDuracion.Text.ToEntero(),TxtObservaciones.Text))
|
||||
if (ObjAF.AddTiposServiciosActividades(DdlActividades.SelectedValue.ToEntero(),-1,TxtDuracion.Text.ToDecimal(),TxtObservaciones.Text))
|
||||
{
|
||||
Alert("Se agregó la Actividad del Tipo de Servicio correctamente");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ObjAF.UpdateTiposServiciosActividades(CveTipoServicioActividad,DdlActividades.SelectedValue.ToEntero(),TxtDuracion.Text.ToEntero(),TxtObservaciones.Text))
|
||||
if (ObjAF.UpdateActividades(DdlActividades.SelectedValue.ToEntero(),TxtDuracion.Text.ToEntero(),TxtObservaciones.Text))
|
||||
{
|
||||
Alert("Se actualizó la Actividad del Tipo de Servicio correctamente");
|
||||
}
|
||||
|
||||
@@ -137,67 +137,91 @@
|
||||
|
||||
|
||||
<div class="portlet-body form">
|
||||
|
||||
<div class="row" runat="server" id="DVFolioAsignado" visible="false" >
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<label for="<%= LblFolio.ClientID.ToString()%>">Folio:</label>
|
||||
<asp:Label runat="server" ID="LblFolio" CssClass="form-control"></asp:Label>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:Label runat="server" ID="LblFolio"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<label for="<%= LblAsiganado.ClientID.ToString()%>">Asignado:</label>
|
||||
<asp:Label runat="server" ID="LblAsiganado" CssClass="form-control"></asp:Label>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlPrioridad" CssClass="form-control input-sm select2me" Width="100%" runat="server" >
|
||||
<asp:DropDownList ID="DdlPrioridad" CssClass="form-control input-sm select2me" Width="100%" runat="server">
|
||||
<asp:ListItem Value="1">Baja</asp:ListItem>
|
||||
<asp:ListItem Value="2">Media</asp:ListItem>
|
||||
<asp:ListItem Value="3">Alta</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlPrioridad.ClientID.ToString()%>">
|
||||
<asp:Label runat="server" ID="LblPrioridad" Text="Prioridad"></asp:Label>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<label for="<%= txtFechaI.ClientID.ToString()%>">
|
||||
<asp:Label runat="server" ID="LblFechaInicio" Text="Fecha Inicio"></asp:Label>
|
||||
</label>
|
||||
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 110px !important; padding: 0px;">
|
||||
<asp:TextBox Width="100px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<div runat="server" id="DVFechaFin" visible="false" class="form-group form-md-line-input input-iconright">
|
||||
<label for="<%= txtFechaF.ClientID.ToString()%>">
|
||||
<asp:Label runat="server" ID="LblFechaFin" Text="Fecha Fin"></asp:Label>
|
||||
</label>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 110px !important; padding: 0px;">
|
||||
<asp:TextBox Width="100px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<%--<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>--%>
|
||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<%--<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>--%>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
|
||||
<div runat="server" id="DVEstatus" visible="true" class="form-group form-md-line-input input-iconright" >
|
||||
<asp:DropDownList ID="DdlOrdenesTrabajoEstatus" CssClass="form-control input-sm select2me" Width="100%" runat="server" DataTextField="EstatusOT" DataValueField="CveEstatusOT" >
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<label for="<%= txtFechaI.ClientID.ToString()%>">
|
||||
<asp:Label runat="server" ID="LblFechaInicio" Text="Fecha Inicio"></asp:Label>
|
||||
</label>
|
||||
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 110px !important; padding: 0px;">
|
||||
<asp:TextBox Width="100px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div runat="server" id="DVFechaFin" visible="false" class="form-group form-md-line-input input-iconright">
|
||||
<label for="<%= txtFechaF.ClientID.ToString()%>">
|
||||
<asp:Label runat="server" ID="LblFechaFin" Text="Fecha Fin"></asp:Label>
|
||||
</label>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 110px !important; padding: 0px;">
|
||||
<asp:TextBox Width="100px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<%--<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>--%>
|
||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<%--<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>--%>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
<div runat="server" id="DVEstatus" visible="false" class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlOrdenesTrabajoEstatus" CssClass="form-control input-sm select2me" Width="100%" runat="server" DataTextField="EstatusOT" DataValueField="CveEstatusOT">
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlOrdenesTrabajoEstatus.ClientID.ToString()%>">
|
||||
<asp:Label runat="server" ID="Label2" Text="Estatus"></asp:Label>
|
||||
</label>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -235,7 +259,7 @@
|
||||
|
||||
<asp:GridView ID="GvMaterial" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron datos" ToolTip="" CssClass="table table-smallpadding Widthall"
|
||||
OnRowDataBound="GvMaterial_RowDataBound"
|
||||
DataKeyNames="CveMaterial,Cantidad,CvePS,Importe"
|
||||
DataKeyNames="CveMaterial,Cantidad,CvePS,Importe,Faltante"
|
||||
GridLines="None">
|
||||
<Columns>
|
||||
|
||||
@@ -248,7 +272,7 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="45%" HeaderText="Importe">
|
||||
<asp:TemplateField ItemStyle-Width="45%" HeaderText="Importe" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtImporte" runat="server" Text='<%# Eval("Importe") %>' Width="100px"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
@@ -256,15 +280,25 @@
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="150px" HeaderText="Faltante" Visible="false" ItemStyle-HorizontalAlign="Right">
|
||||
<HeaderTemplate>
|
||||
|
||||
<asp:HyperLink ID="HLOC" runat="server" Text="" Target="_blank" CssClass="Texto" data-toggle="tooltip" data-placement="top" title="Crear orden de compra" >Faltante <i class="fa fa-shopping-cart" aria-hidden="true"></i></asp:HyperLink>
|
||||
|
||||
Faltante
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlFaltante" runat="server" Text='<%# Eval("Faltante") %>' Width="220px"></asp:Label>
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<asp:Label ID="LtlFaltante" runat="server" Text='<%# Eval("Faltante") %>' ></asp:Label>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<asp:HyperLink Visible="false" ID="HLOC" runat="server" Target="_blank" CssClass="Texto" data-toggle="tooltip" data-placement="top" title="Crear orden de compra" Text="<i class='fa fa-shopping-cart'></i> OC" ></asp:HyperLink>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
+
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
|
||||
@@ -50,12 +50,16 @@ Partial Class AF_OrdenTrabajo
|
||||
If Request("CveOrdenTrabajo") IsNot Nothing Then
|
||||
CveOrdenTrabajo = Request("CveOrdenTrabajo").ToEntero
|
||||
|
||||
DVFechaFin.Visible = True
|
||||
Tab.Visible = True
|
||||
If CveOrdenTrabajo > 0 Then
|
||||
|
||||
CargaDatos()
|
||||
DVFechaFin.Visible = True
|
||||
DVFolioAsignado.Visible = True
|
||||
DVEstatus.Visible = True
|
||||
|
||||
Tab.Visible = True
|
||||
CargaDatos()
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
@@ -78,7 +82,7 @@ Partial Class AF_OrdenTrabajo
|
||||
DdlAF.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa, -1)
|
||||
DdlAF.DataBind()
|
||||
|
||||
|
||||
DdlAF.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
@@ -127,7 +131,8 @@ Partial Class AF_OrdenTrabajo
|
||||
|
||||
If ObjAF.DtResultados IsNot Nothing AndAlso ObjAF.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
LblFolio.Text = $"Folio OT: {ObjAF.DtResultados(0)("Folio").ToString}"
|
||||
LblFolio.Text = ObjAF.DtResultados(0)("Folio").ToString
|
||||
LblAsiganado.Text = ObjAF.DtResultados(0)("NombreCompleto").ToString
|
||||
|
||||
DdlSubProyecto.SelectedValueExist(ObjAF.DtResultados(0)("CveSubProyecto").ToString)
|
||||
DdlAF.SelectedValueExist(ObjAF.DtResultados(0)("CveAF").ToString)
|
||||
@@ -197,6 +202,16 @@ Partial Class AF_OrdenTrabajo
|
||||
|
||||
Else
|
||||
|
||||
If DdlOrdenesTrabajoEstatus.SelectedValue.ToEntero = 3 Then
|
||||
If txtFechaF.Text.Length = 0 Then
|
||||
Alert("La fecha fin es requerida.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
ObjAF.IniciaTransacSQL()
|
||||
Dim ErrorProceso As Boolean = False
|
||||
@@ -210,7 +225,7 @@ Partial Class AF_OrdenTrabajo
|
||||
FechaFinal = txtFechaF.Text.ToDate
|
||||
End If
|
||||
|
||||
If Not ObjAF.UpdateOrdenesTrabajo(CveOrdenTrabajo, DdlTipoServicio.SelectedValue.ToEntero, DdlAF.SelectedValue.ToEntero, TxtServicio.Text.Trim, DdlSubProyecto.SelectedValue.ToEntero, DdlPrioridad.SelectedValue.ToEntero, txtFechaI.Text.ToDate, FechaFinal, MaxFecha, DdlOrdenesTrabajoEstatus.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
If Not ObjAF.UpdateOrdenesTrabajo(CveOrdenTrabajo, DdlTipoServicio.SelectedValue.ToEntero, DdlAF.SelectedValue.ToEntero, TxtServicio.Text.Trim, DdlSubProyecto.SelectedValue.ToEntero, DdlPrioridad.SelectedValue.ToEntero, txtFechaI.Text.ToDate, FechaFinal, MaxFecha, DdlOrdenesTrabajoEstatus.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, -1) Then
|
||||
ErrorProceso = True
|
||||
End If
|
||||
|
||||
@@ -394,12 +409,16 @@ Partial Class AF_OrdenTrabajo
|
||||
|
||||
Protected Sub GvMaterial_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
|
||||
If e.Row.RowType = DataControlRowType.Header Then
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If GvMaterial.Columns(4).Visible Then
|
||||
|
||||
Dim HLOC As HyperLink = e.Row.FCHyperLink("HLOC")
|
||||
HLOC.NavigateUrl = $"../OC/OC.aspx?CveOrdenTrabajo={CveOrdenTrabajo}"
|
||||
If e.Row.DataKey("Faltante").ToDecimal > 0 Then
|
||||
Dim HLOC As HyperLink = e.Row.FCHyperLink("HLOC")
|
||||
HLOC.Visible = True
|
||||
HLOC.NavigateUrl = $"../OC/OC.aspx?CveOrdenTrabajo={CveOrdenTrabajo}"
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
237
AF/OrdenTrabajoAsignacion.aspx
Normal file
237
AF/OrdenTrabajoAsignacion.aspx
Normal file
@@ -0,0 +1,237 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="OrdenTrabajoAsignacion.aspx.vb" Inherits="AF_OrdenTrabajoAsignacion" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.Widthall {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollHeadInner {
|
||||
width: 100% !important;
|
||||
background-color: #dddddd;
|
||||
padding-left: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollFoot {
|
||||
display: none;
|
||||
position: static;
|
||||
}
|
||||
|
||||
.table-scrollable {
|
||||
margin: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scroll {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.table.dataTable {
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollBody table th {
|
||||
padding: 0px !important;
|
||||
padding-right: 4px !important;
|
||||
padding-left: 4px !important;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Ordenes de trabajo Asignación
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpFiltro" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter" style="">
|
||||
<div class="portlet-title portlet-filterT smalltitle" style="min-height: 49px; position: relative;">
|
||||
<div class="tools">
|
||||
<asp:UpdatePanel runat="server" style="display: inline-block;">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnFiltrar" runat="server" Text="Consultar" class="btn btn-primary" OnClick="BtnFiltrar_Click" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<a href="javascript:;" class="expand" data-original-title="" title=""></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption magindate">
|
||||
|
||||
<div class="row" style="width: 100%">
|
||||
|
||||
|
||||
<div class="col-md-1">
|
||||
<asp:Label runat="server" ID="LblSubProyecto"></asp:Label>:
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlSubProyecto" CssClass="form-control input-sm select2me" Width="100%" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto"></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 truncate">Activo Fijo:</div>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlAF" CssClass="form-control input-sm select2me" Width="100%" runat="server" DataTextField="CodDesc" DataValueField="CveActivoFijo"></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 ">Tipo Servicio:</div>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlTipoServicio" CssClass="form-control input-sm select2me" Width="100%" runat="server" DataTextField="Nombre" DataValueField="CveTipoServicio"></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-1">Fecha Inicio:</div>
|
||||
<div class="col-md-1" style="vertical-align:top!important">
|
||||
<div class="input-group input-sm date date-picker" data-date-format="dd/mm/yyyy" style="padding: 5px 0px;">
|
||||
<asp:TextBox ID="TxtFechaI" runat="server" CausesValidation="true" CssClass="form-control input-sm" Width="80"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgFecha" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" TargetControlID="TxtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaI" TargetControlID="TxtFechaI" PopupButtonID="ImgFecha" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<%--<asp:RequiredFieldValidator ID="RFVFechaNacimiento" runat="server" ControlToValidate="TxtFecha" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaNacimiento''</b> es necesario, por favor ingréselo." ValidationGroup="GrpCosulta"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFechaNacimiento" runat="server" ControlToValidate="TxtFecha" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaNacimiento''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpCosulta"></asp:CompareValidator>--%>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-1">Fecha Fin:</div>
|
||||
<div class="col-md-1">
|
||||
|
||||
|
||||
<div class="input-group input-sm date date-picker" data-date-format="dd/mm/yyyy" style="padding: 5px 0px;">
|
||||
<asp:TextBox ID="TxtFechaF" runat="server" CausesValidation="true" CssClass="form-control input-sm" Width="80"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgFechaFin" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="TxtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaFinal" TargetControlID="TxtFechaF" PopupButtonID="ImgFechaFin" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: block;">
|
||||
<div class="row">
|
||||
<div class="col-md-1 ">Prioridad:</div>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlPrioridad" CssClass="form-control input-sm select2me" Width="100%" runat="server">
|
||||
<asp:ListItem Value="-1">Todas</asp:ListItem>
|
||||
<asp:ListItem Value="1">Baja</asp:ListItem>
|
||||
<asp:ListItem Value="2">Media</asp:ListItem>
|
||||
<asp:ListItem Value="3">Alta</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron datos" ToolTip="Listado de metricas" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true"
|
||||
DataKeyNames="CvePersonal,CveOrdenTrabajo"
|
||||
|
||||
GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<asp:HyperLinkField HeaderText="Folio" DataNavigateUrlFields="CveOrdenTrabajo" DataNavigateUrlFormatString="~/AF/OrdenTrabajo.aspx?CveOrdenTrabajo={0}" DataTextField="Folio" ItemStyle-Width="60px" Target="_blank" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
<asp:TemplateField HeaderText="Servicio">
|
||||
<ItemStyle Width="140px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlServicio" runat="server" Text='<%# Eval("Servicio")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Tipo Servicio">
|
||||
<ItemStyle Width="140px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTipoServicio" runat="server" Text='<%# Eval("TipoServicio")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="SubProyecto">
|
||||
<ItemStyle Width="140px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSubProyecto" runat="server" Text='<%# Eval("SubProyecto")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="A.F.">
|
||||
<ItemStyle Width="140px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCodigoAF" runat="server" Text='<%# Eval("CodigoAF")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Fecha Inicio" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemStyle Width="110px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaInicio" runat="server" Text='<%# Eval("FechaInicio", "{0:d}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Fecha Fin" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemStyle Width="110px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaFin" runat="server" Text='<%# Eval("FechaFin", "{0:d}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemStyle Width="100px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("EstatusOT")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Personal" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemStyle Width="300px" />
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlPersonal" runat="server" DataTextField="Nombre" DataValueField="CvePersonal" CssClass="form-control input-sm select2me" Width="100%" ></asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="text-align:center">
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpGuardar" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnGuardar" runat="server" Text="Guardar" ValidationGroup="GrpGuardar" CssClass="btn btn-primary" OnClick="BtnGuardar_Click" Enabled="false" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
227
AF/OrdenTrabajoAsignacion.aspx.vb
Normal file
227
AF/OrdenTrabajoAsignacion.aspx.vb
Normal file
@@ -0,0 +1,227 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class AF_OrdenTrabajoAsignacion
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region " PROPIEDADES"
|
||||
|
||||
Property DT_Cabeceras As DataTable
|
||||
Get
|
||||
|
||||
If ViewState("DT_Cabeceras") Is Nothing Then
|
||||
|
||||
Return New DataTable
|
||||
Else
|
||||
Return DirectCast(ViewState("DT_Cabeceras"), DataTable)
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DT_Cabeceras") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Property DT_Datos As DataTable
|
||||
Get
|
||||
|
||||
If ViewState("DT_Datos") Is Nothing Then
|
||||
Return New DataTable
|
||||
Else
|
||||
Return DirectCast(ViewState("DT_Datos"), DataTable)
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DT_Datos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
CargaCombos()
|
||||
CargaDatos()
|
||||
|
||||
Dim FechaActual As Date = Now
|
||||
|
||||
|
||||
'TxtFechaF.Text = $"{FechaActual.Day.ToString("00")}/{FechaActual.Month.ToString("00")}/{FechaActual.Year}"
|
||||
TxtFechaF.Text = ""
|
||||
FechaActual = FechaActual.AddDays(-30)
|
||||
TxtFechaI.Text = $"{FechaActual.Day.ToString("00")}/{FechaActual.Month.ToString("00")}/{FechaActual.Year}"
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
#Region " CARGA PARAMETROS "
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " CARGA COMBOS "
|
||||
Protected Sub CargaCombos()
|
||||
|
||||
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto)
|
||||
|
||||
DdlAF.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa, -1)
|
||||
DdlAF.DataBind()
|
||||
|
||||
DdlAF.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
If ObjAF.GetTiposServicios(-1, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
DdlTipoServicio.DataSource = ObjAF.DtResultados
|
||||
Else
|
||||
DdlTipoServicio.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
DdlTipoServicio.DataBind()
|
||||
DdlTipoServicio.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
UpFiltro.Update()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " CARGA DATOS "
|
||||
Protected Sub BtnFiltrar_Click(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " GV DATOS "
|
||||
|
||||
Private Sub CargaDatos()
|
||||
|
||||
Dim FechaInicio, FechaFin As Date
|
||||
|
||||
FechaInicio = TxtFechaI.Text.ToDate
|
||||
|
||||
|
||||
FechaFin = MaxFecha
|
||||
If TxtFechaF.Text.Length = 10 Then
|
||||
FechaFin = TxtFechaF.Text.ToDate
|
||||
End If
|
||||
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
If ObjAF.GetOrdenesTrabajo(-1, DdlTipoServicio.SelectedValue.ToEntero, -1, DdlAF.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlPrioridad.SelectedValue.ToEntero, FechaInicio, FechaFin, MaxFecha, -1, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
GvDatos.DataSource = ObjAF.DtResultados
|
||||
|
||||
If ObjAF.DtResultados.Rows.Count > 0 Then
|
||||
BtnGuardar.Enabled = True
|
||||
Else
|
||||
BtnGuardar.Enabled = False
|
||||
End If
|
||||
|
||||
Else
|
||||
GvDatos.DataSource = Nothing
|
||||
BtnGuardar.Enabled = False
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
Dim CvePersonal As Integer = e.Row.DataKey("CvePersonal").ToEntero
|
||||
Dim DdlPersonal As DropDownList = e.Row.FCDropDownList("DdlPersonal")
|
||||
|
||||
DdlPersonal.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa, -1).FiltraParametros("CveEstatusPersonal = 1")
|
||||
DdlPersonal.DataBind()
|
||||
DdlPersonal.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
|
||||
|
||||
DdlPersonal.SelectedValueExist(CvePersonal)
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
Protected Sub LnkEliminarMetricaValor_Click(sender As Object, e As EventArgs)
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
Dim ObjAf As New ClsAF
|
||||
Dim ErrorProceso As Boolean = False
|
||||
Dim CountAsiganados As Integer = 0
|
||||
|
||||
|
||||
ObjAf.IniciaTransacSQL()
|
||||
|
||||
For Each GvRow As GridViewRow In GvDatos.Rows
|
||||
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
Dim CvePersonal As Integer = GvRow.DataKey("CvePersonal").ToEntero
|
||||
Dim DdlPersonal As DropDownList = GvRow.FCDropDownList("DdlPersonal")
|
||||
Dim CveOrdenTrabajo As Integer = GvRow.DataKey("CveOrdenTrabajo").ToEntero
|
||||
|
||||
If DdlPersonal.SelectedValue.ToEntero > 0 AndAlso (DdlPersonal.SelectedValue.ToEntero <> CvePersonal) Then
|
||||
|
||||
If Not ObjAf.UpdateOrdenesTrabajo(CveOrdenTrabajo, -1, -1, "-1", -1, -1, MinFecha, MaxFecha, MaxFecha, -1, UsuarioActual.CveEmpresa, DdlPersonal.SelectedValue.ToEntero) Then
|
||||
ErrorProceso = True
|
||||
Else
|
||||
CountAsiganados = CountAsiganados + 1
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
Next
|
||||
|
||||
If Not ErrorProceso Then
|
||||
|
||||
ObjAf.Commit()
|
||||
|
||||
If CountAsiganados > 0 Then
|
||||
Alert($"{CountAsiganados} ordenes de trabajo asignadas.")
|
||||
Else
|
||||
Alert($"No se asigno ninguna orden de trabajo.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
Else
|
||||
ObjAf.RollBack()
|
||||
End If
|
||||
|
||||
ObjAf.Dispose()
|
||||
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
248
AF/RepOrdenTrabajo.aspx
Normal file
248
AF/RepOrdenTrabajo.aspx
Normal file
@@ -0,0 +1,248 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepOrdenTrabajo.aspx.vb" Inherits="AF_RepOrdenTrabajo" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.Widthall {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollHeadInner {
|
||||
width: 100% !important;
|
||||
background-color: #dddddd;
|
||||
padding-left: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollFoot {
|
||||
display: none;
|
||||
position: static;
|
||||
}
|
||||
|
||||
.table-scrollable {
|
||||
margin: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scroll {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.table.dataTable {
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollBody table th {
|
||||
padding: 0px !important;
|
||||
padding-right: 4px !important;
|
||||
padding-left: 4px !important;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Reporte ordenes de trabajo
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpFiltro" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter" style="">
|
||||
<div class="portlet-title portlet-filterT smalltitle" style="min-height: 49px; position: relative;">
|
||||
<div class="tools">
|
||||
<asp:UpdatePanel runat="server" style="display: inline-block;">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnFiltrar" runat="server" Text="Consultar" class="btn btn-primary" OnClick="BtnFiltrar_Click" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<a href="javascript:;" class="expand" data-original-title="" title=""></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
|
||||
<div class="row" >
|
||||
|
||||
<div class="col-md-1">
|
||||
Folio:
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<asp:TextBox runat="server" ID="TxtFolio" CssClass="form-control input-sm " />
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
<asp:Label runat="server" ID="LblSubProyecto"></asp:Label>:
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlSubProyecto" CssClass="form-control input-sm select2me" Width="100%" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto"></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 truncate">Activo Fijo:</div>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlAF" CssClass="form-control input-sm select2me" Width="100%" runat="server" DataTextField="CodDesc" DataValueField="CveActivoFijo"></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 ">Tipo Servicio:</div>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlTipoServicio" CssClass="form-control input-sm select2me" Width="100%" runat="server" DataTextField="Nombre" DataValueField="CveTipoServicio"></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: block;">
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="col-md-1 ">Personal:</div>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlPersonal" runat="server" DataTextField="Nombre" DataValueField="CvePersonal" CssClass="form-control input-sm select2me" Width="100%" ></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-md-1">Fecha Inicio:</div>
|
||||
<div class="col-md-1" style="vertical-align:top!important">
|
||||
<div class="input-group input-sm date date-picker" data-date-format="dd/mm/yyyy" style="padding: 5px 0px;">
|
||||
<asp:TextBox ID="TxtFechaI" runat="server" CausesValidation="true" CssClass="form-control input-sm" Width="100px"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgFecha" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" TargetControlID="TxtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaI" TargetControlID="TxtFechaI" PopupButtonID="ImgFecha" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<%--<asp:RequiredFieldValidator ID="RFVFechaNacimiento" runat="server" ControlToValidate="TxtFecha" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaNacimiento''</b> es necesario, por favor ingréselo." ValidationGroup="GrpCosulta"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFechaNacimiento" runat="server" ControlToValidate="TxtFecha" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaNacimiento''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpCosulta"></asp:CompareValidator>--%>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-1">Fecha Fin:</div>
|
||||
<div class="col-md-1">
|
||||
|
||||
|
||||
<div class="input-group input-sm date date-picker" data-date-format="dd/mm/yyyy" style="padding: 5px 0px;">
|
||||
<asp:TextBox ID="TxtFechaF" runat="server" CausesValidation="true" CssClass="form-control input-sm" Width="100px"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgFechaFin" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="TxtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaFinal" TargetControlID="TxtFechaF" PopupButtonID="ImgFechaFin" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 ">Estatus:</div>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlOrdenesTrabajoEstatus" CssClass="form-control input-sm select2me" Width="100%" runat="server" DataTextField="EstatusOT" DataValueField="CveEstatusOT">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-1 ">Prioridad:</div>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlPrioridad" CssClass="form-control input-sm select2me" Width="100%" runat="server">
|
||||
<asp:ListItem Value="-1">Todas</asp:ListItem>
|
||||
<asp:ListItem Value="1">Baja</asp:ListItem>
|
||||
<asp:ListItem Value="2">Media</asp:ListItem>
|
||||
<asp:ListItem Value="3">Alta</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron datos" ToolTip="Listado de metricas" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true"
|
||||
DataKeyNames="CvePersonal,CveOrdenTrabajo"
|
||||
|
||||
GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<asp:HyperLinkField HeaderText="Folio" DataNavigateUrlFields="CveOrdenTrabajo" DataNavigateUrlFormatString="~/AF/OrdenTrabajo.aspx?CveOrdenTrabajo={0}" DataTextField="Folio" ItemStyle-Width="60px" Target="_blank" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
<asp:TemplateField HeaderText="Servicio">
|
||||
<ItemStyle Width="140px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlServicio" runat="server" Text='<%# Eval("Servicio")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Tipo Servicio">
|
||||
<ItemStyle Width="140px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTipoServicio" runat="server" Text='<%# Eval("TipoServicio")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="SubProyecto">
|
||||
<ItemStyle Width="140px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSubProyecto" runat="server" Text='<%# Eval("SubProyecto")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="A.F.">
|
||||
<ItemStyle Width="140px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCodigoAF" runat="server" Text='<%# Eval("CodigoAF")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Fecha Inicio" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemStyle Width="110px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaInicio" runat="server" Text='<%# Eval("FechaInicio", "{0:d}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Fecha Fin" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemStyle Width="110px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaFin" runat="server" Text='<%# Eval("FechaFin", "{0:d}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemStyle Width="100px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("EstatusOT")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Asignado" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemStyle Width="100px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlNombreCompleto" runat="server" Text='<%# Eval("NombreCompleto")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
187
AF/RepOrdenTrabajo.aspx.vb
Normal file
187
AF/RepOrdenTrabajo.aspx.vb
Normal file
@@ -0,0 +1,187 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class AF_RepOrdenTrabajo
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region " PROPIEDADES"
|
||||
|
||||
Property DT_Cabeceras As DataTable
|
||||
Get
|
||||
|
||||
If ViewState("DT_Cabeceras") Is Nothing Then
|
||||
|
||||
Return New DataTable
|
||||
Else
|
||||
Return DirectCast(ViewState("DT_Cabeceras"), DataTable)
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DT_Cabeceras") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Property DT_Datos As DataTable
|
||||
Get
|
||||
|
||||
If ViewState("DT_Datos") Is Nothing Then
|
||||
Return New DataTable
|
||||
Else
|
||||
Return DirectCast(ViewState("DT_Datos"), DataTable)
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DT_Datos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
CargaCombos()
|
||||
CargaDatos()
|
||||
|
||||
Dim FechaActual As Date = Now
|
||||
|
||||
|
||||
'TxtFechaF.Text = $"{FechaActual.Day.ToString("00")}/{FechaActual.Month.ToString("00")}/{FechaActual.Year}"
|
||||
TxtFechaF.Text = ""
|
||||
FechaActual = FechaActual.AddDays(-30)
|
||||
TxtFechaI.Text = $"{FechaActual.Day.ToString("00")}/{FechaActual.Month.ToString("00")}/{FechaActual.Year}"
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
#Region " CARGA PARAMETROS "
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " CARGA COMBOS "
|
||||
Protected Sub CargaCombos()
|
||||
|
||||
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto)
|
||||
|
||||
DdlAF.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa, -1)
|
||||
DdlAF.DataBind()
|
||||
|
||||
DdlAF.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
If ObjAF.GetTiposServicios(-1, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
DdlTipoServicio.DataSource = ObjAF.DtResultados
|
||||
Else
|
||||
DdlTipoServicio.DataSource = Nothing
|
||||
End If
|
||||
|
||||
If ObjAF.GetOrdenesTrabajoEstatus(UsuarioActual.CveEmpresa) Then
|
||||
DdlOrdenesTrabajoEstatus.DataSource = ObjAF.DtResultados
|
||||
Else
|
||||
DdlOrdenesTrabajoEstatus.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
DdlTipoServicio.DataBind()
|
||||
DdlTipoServicio.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
DdlOrdenesTrabajoEstatus.DataBind()
|
||||
DdlOrdenesTrabajoEstatus.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
|
||||
|
||||
|
||||
DdlPersonal.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa, -1).FiltraParametros("CveEstatusPersonal = 1")
|
||||
DdlPersonal.DataBind()
|
||||
DdlPersonal.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
|
||||
UpFiltro.Update()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " CARGA DATOS "
|
||||
Protected Sub BtnFiltrar_Click(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " GV DATOS "
|
||||
|
||||
Private Sub CargaDatos()
|
||||
|
||||
|
||||
Dim FechaInicio, FechaFin As Date
|
||||
Dim Folio As Integer = If(TxtFolio.Text.ToEntero > 0, TxtFolio.Text.ToEntero, -1)
|
||||
FechaInicio = TxtFechaI.Text.ToDate
|
||||
|
||||
|
||||
If DdlOrdenesTrabajoEstatus.SelectedValue.ToEntero = 3 AndAlso TxtFechaF.Text.Trim.Length = 0 Then
|
||||
FechaFin = MaxFecha.AddDays(1)
|
||||
Else
|
||||
FechaFin = MaxFecha
|
||||
End If
|
||||
|
||||
|
||||
If TxtFechaF.Text.Length = 10 Then
|
||||
FechaFin = TxtFechaF.Text.ToDate
|
||||
End If
|
||||
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
If ObjAF.GetOrdenesTrabajo(-1, DdlTipoServicio.SelectedValue.ToEntero, Folio, DdlAF.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlPrioridad.SelectedValue.ToEntero, FechaInicio, FechaFin, MaxFecha, DdlOrdenesTrabajoEstatus.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
GvDatos.DataSource = ObjAF.DtResultados
|
||||
Else
|
||||
GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
Protected Sub LnkEliminarMetricaValor_Click(sender As Object, e As EventArgs)
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
@@ -4239,6 +4239,40 @@ Public Class ClsAF
|
||||
End Function
|
||||
|
||||
|
||||
'Public Function GetOrdenesTrabajoAsignacion(CveSubProyecto As Integer, CveAF As Integer, CveTipoServicio As Integer, FechaInicio As Date, FechaFin As Date, Prioridad As Integer, CveEmpresa As Integer) As Boolean
|
||||
|
||||
' Dim Retorno As Boolean = False
|
||||
|
||||
' DataAdapter("PA_AF_OrdenesTrabajoAsignacionGet")
|
||||
|
||||
' With SqlAdapter.SelectCommand.Parameters
|
||||
' .Add("@CveOrdenTrabajo", SqlDbType.Int).Value = CveOrdenTrabajo
|
||||
' .Add("@CveTipoServicio", SqlDbType.Int).Value = CveTipoServicio
|
||||
|
||||
' .Add("@CveAF", SqlDbType.Int).Value = CveAF
|
||||
' .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
' .Add("@Prioridad", SqlDbType.Int).Value = Prioridad
|
||||
' .Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
|
||||
'' .Add("@FechaFin", SqlDbType.Date).Value = FechaFin
|
||||
|
||||
' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
|
||||
|
||||
|
||||
' End With
|
||||
|
||||
' Try
|
||||
' SqlAdapter.Fill(Data)
|
||||
' Retorno = True
|
||||
' Catch ex As Exception
|
||||
' OnError("Ocurrió un error al consultar las ordenes de trabajo", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
' End Try
|
||||
|
||||
' Return Retorno
|
||||
|
||||
'End Function
|
||||
|
||||
|
||||
Public Function AddOrdenesTrabajo(CveTipoServicio As Integer, CveAF As Integer, Servicio As String, CveSubProyecto As Integer, Prioridad As Integer, FechaInicio As Date, FechaFin As Date, FechaFinReal As Date, CveEstatusOT As Integer, CveEmpresa As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -4279,7 +4313,7 @@ Public Class ClsAF
|
||||
|
||||
|
||||
|
||||
Public Function UpdateOrdenesTrabajo(CveOrdenTrabajo As Integer, CveTipoServicio As Integer, CveAF As Integer, Servicio As String, CveSubProyecto As Integer, Prioridad As Integer, FechaInicio As Date, FechaFin As Date, FechaFinReal As Date, CveEstatusOT As Integer, CveEmpresa As Integer) As Boolean
|
||||
Public Function UpdateOrdenesTrabajo(CveOrdenTrabajo As Integer, CveTipoServicio As Integer, CveAF As Integer, Servicio As String, CveSubProyecto As Integer, Prioridad As Integer, FechaInicio As Date, FechaFin As Date, FechaFinReal As Date, CveEstatusOT As Integer, CveEmpresa As Integer, CvePersonal As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -4299,6 +4333,7 @@ Public Class ClsAF
|
||||
.Add("@FechaFinReal", SqlDbType.Date).Value = FechaFinReal
|
||||
.Add("@CveEstatusOT", SqlDbType.Int).Value = CveEstatusOT
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
|
||||
|
||||
End With
|
||||
|
||||
|
||||
@@ -4723,7 +4723,7 @@ Public Class ClsBancos
|
||||
strBody.AppendFormat(" </tr>")
|
||||
|
||||
|
||||
For Each dr As DataRow In DtResultados.FiltraParametros("CveConceptoContable IN (17,312) AND CveCompra > 0").Rows
|
||||
For Each dr As DataRow In DtResultados.FiltraParametros("CveConceptoContable IN (17,312,308) AND CveCompra > 0").Rows
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td>{0}</td>", dr("Fecha").ToString.ToDate.ToShortDateString())
|
||||
strBody.AppendFormat(" <td>{0}</td>", dr("SerieFolio").ToString)
|
||||
|
||||
@@ -6231,7 +6231,7 @@ Public Class ClsContPAQi
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
||||
.Add("@FechaF", SqlDbType.Date).Value = FechaF
|
||||
.Add("@FechaF", SqlDbType.DateTime).Value = String.Format("{0} 23:59:59", FechaF.ToShortDateString).ToDateTime
|
||||
.Add("@IdCuentaPadre", SqlDbType.Int).Value = IdCuenta
|
||||
.Add("@OpcionCuentas", SqlDbType.Int).Value = OpcionCuentas
|
||||
.Add("@Tipo", SqlDbType.Int).Value = TipoMovtos
|
||||
@@ -10585,7 +10585,7 @@ Public Class ClsContPAQi
|
||||
StrSQL.Append(" ( ")
|
||||
StrSQL.Append(" @IdCtaSup INT, ")
|
||||
StrSQL.Append(" @FechaI DATE, ")
|
||||
StrSQL.Append(" @FechaF DATE, ")
|
||||
StrSQL.Append(" @FechaF DATETIME, ")
|
||||
StrSQL.Append(" @Tipo INT, ")
|
||||
StrSQL.Append(" @SegmentoNegocio INT = -1 ")
|
||||
StrSQL.Append(" ) ")
|
||||
@@ -10776,7 +10776,7 @@ Public Class ClsContPAQi
|
||||
StrSQL.Append(" ( ")
|
||||
StrSQL.Append(" @IdCtaSup INT, ")
|
||||
StrSQL.Append(" @FechaI DATE, ")
|
||||
StrSQL.Append(" @FechaF DATE, ")
|
||||
StrSQL.Append(" @FechaF DATETIME, ")
|
||||
StrSQL.Append(" @Tipo INT, ")
|
||||
StrSQL.Append(" @SegmentoNegocio INT = -1 ")
|
||||
StrSQL.Append(" ) ")
|
||||
@@ -10883,7 +10883,7 @@ Public Class ClsContPAQi
|
||||
StrSQL.Append(" ( ")
|
||||
StrSQL.Append(" @IdCtaSup INT, ")
|
||||
StrSQL.Append(" @FechaI DATE, ")
|
||||
StrSQL.Append(" @FechaF DATE, ")
|
||||
StrSQL.Append(" @FechaF DATETIME, ")
|
||||
StrSQL.Append(" @Tipo INT, ")
|
||||
StrSQL.Append(" @SegmentoNegocio INT = -1 ")
|
||||
StrSQL.Append(" ) ")
|
||||
@@ -11140,7 +11140,7 @@ Public Class ClsContPAQi
|
||||
StrSQL.Append(" ( ")
|
||||
StrSQL.Append(" @IdCtaSup INT, ")
|
||||
StrSQL.Append(" @FechaI DATE, ")
|
||||
StrSQL.Append(" @FechaF DATE, ")
|
||||
StrSQL.Append(" @FechaF DATETIME, ")
|
||||
StrSQL.Append(" @CveMoneda INT = 1 ")
|
||||
StrSQL.Append(" ) ")
|
||||
StrSQL.Append(" RETURNS FLOAT ")
|
||||
|
||||
@@ -5542,6 +5542,27 @@ Public Class ClsContabilidad
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
Public Function GetRepIVAComparativo(FechaInicio As Date, FechaFin As Date, CveUsuarioConsulta As Integer, Conciliado As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Conta_ImpuestosComparativo")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
|
||||
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
|
||||
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
|
||||
.Add("@Conciliado", SqlDbType.Int).Value = Conciliado
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener el reporte de IVA Comparativo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetRepIVAAcumulado(FechaInicio As Date, FechaFin As Date, Conciliado As Integer, TipoImpuesto As Integer, CveUsuarioConsulta As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Conta_IVAAcumulado")
|
||||
|
||||
@@ -192,20 +192,34 @@ Public Class ClsPaginas
|
||||
Application("GlobalDTNomConceptos") = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTTiposGastos(CveEmpresa As Integer) As DataTable
|
||||
Property GlobalDTTiposGastos(CveEmpresa As Integer, Optional Estatus As Integer = 1) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = String.Format("GlobalDTTiposGastos-{0}", CveEmpresa)
|
||||
'sino existe, recarga los datos
|
||||
If Application(AppNombre) Is Nothing Then
|
||||
Dim ObjCompra As New ClsCompras()
|
||||
If ObjCompra.GetTipoGasto(-1, -1) Then Application(AppNombre) = ObjCompra.DtResultados Else Application(AppNombre) = Nothing
|
||||
ObjCompra.Dispose()
|
||||
End If
|
||||
|
||||
If CveEmpresa <> -1 Then
|
||||
Dim Dv As New DataView(DirectCast(Application("GlobalDTTiposGastos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
|
||||
|
||||
Dim StrSQL As New StringBuilder
|
||||
StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa)
|
||||
If Estatus >= 0 Then StrSQL.AppendFormat(" AND CveEstatus = {0} ", Estatus)
|
||||
|
||||
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
|
||||
GlobalDTTiposGastos = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
Else
|
||||
GlobalDTTiposGastos = DirectCast(Application("GlobalDTTiposGastos"), DataTable)
|
||||
GlobalDTTiposGastos = DirectCast(Application(AppNombre), DataTable)
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTTiposGastos") = value
|
||||
Dim AppNombre As String = String.Format("GlobalDTTiposGastos-{0}", CveEmpresa)
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
|
||||
End Property
|
||||
Property GlobalDTMFActividad(CveEmpresa As Integer, Optional Estatus As Integer = -1, Optional CveActividad As Integer = -1) As DataTable
|
||||
Get
|
||||
@@ -3964,6 +3978,11 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/AF/TipoOrdenTrabajo.aspx".ToUpper(), -1)
|
||||
PaginaDict.Add("/AF/OrdenTrabajo.aspx".ToUpper(), -1)
|
||||
PaginaDict.Add("/AF/RepOrdenTrabajo.aspx".ToUpper(), -1)
|
||||
PaginaDict.Add("/AF/OrdenTrabajoAsignacion.aspx".ToUpper(), -1)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
'AIMMGM
|
||||
|
||||
@@ -620,7 +620,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
|
||||
|
||||
'verifica existencias
|
||||
If Pagina.Contiene("ventas/ventas", "oc/oc", "inv/traspaso") AndAlso CveEmpresa.Contiene(72, 80, 119, 140, 141, 152) Then
|
||||
If Pagina.Contiene("ventas/ventas", "oc/oc", "inv/traspaso") AndAlso CveEmpresa.Contiene(72, 80, 119, 140, 141, 152, 153) Then
|
||||
UsaGlobal = False
|
||||
|
||||
Dim objInv As New ClsInventarios
|
||||
|
||||
@@ -1415,6 +1415,12 @@ Partial Class Bancos_PopIECompras
|
||||
CveConcepto2 = 41
|
||||
CveProveedor2 = DdlAcreedor.SelectedValue.ToEntero
|
||||
CveIE = -1
|
||||
'verifica que se halla selccionado algun acreedor
|
||||
If DdlAcreedor.SelectedValue.ToEntero <= 0 Then
|
||||
Inserta = False
|
||||
Alert("Debe especificar el Acreedor.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
Case "6" 'Ventas
|
||||
ImportePagado = TxtImporte.Text.Trim.ToDecimal
|
||||
CveProveedor2 = CveProveedor
|
||||
@@ -3312,18 +3318,18 @@ Partial Class Bancos_PopIECompras
|
||||
ImporteMovimiento = 0
|
||||
End Select
|
||||
|
||||
If ImporteMovimiento <> 0 Then
|
||||
If ImporteMovimiento <> 0 AndAlso MsgError = "" Then
|
||||
'Conta ContPAQ
|
||||
If IdCtaContable = 0 Then
|
||||
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
|
||||
idCuentaContabilizacion = 0
|
||||
End If
|
||||
|
||||
'Conta SIG
|
||||
If CveCuenta = 0 Then
|
||||
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
|
||||
CveCuentaContabilizacion = 0
|
||||
End If
|
||||
''Conta SIG
|
||||
'If CveCuenta = 0 Then
|
||||
' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
|
||||
' CveCuentaContabilizacion = 0
|
||||
'End If
|
||||
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, If(ConceptoContable = 30, TxtFolio.Text.Trim, TxtObservaciones.Text), ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, -1, CveCompra, -1, CveProveedor:=CveProveedor2, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=TimpocambioGeneral, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeImpuesto) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
@@ -3333,7 +3339,7 @@ Partial Class Bancos_PopIECompras
|
||||
Next
|
||||
|
||||
|
||||
If ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 5) Then
|
||||
If MsgError = "" AndAlso ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 5) Then
|
||||
If ObjMov.ValorPolizaDescuadre > 0 Then
|
||||
MsgError = ObjMov.MensajePolizaDescuadre
|
||||
GuardaLogAD($"Bancos/PopIECompras | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||
|
||||
@@ -33,7 +33,7 @@ public partial class Compras_CatTipoGasto : ClsPaginas
|
||||
private void CargaDatos()
|
||||
{
|
||||
ClsCompras ObjCompras = new ClsCompras();
|
||||
if (ObjCompras.GetTipoGasto(-1,UsuarioActual.CveEmpresa))
|
||||
if (ObjCompras.GetTipoGasto(-1, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
GvDatos.DataSource = ObjCompras.DtResultados;
|
||||
GvDatos.DataBind();
|
||||
@@ -41,6 +41,17 @@ public partial class Compras_CatTipoGasto : ClsPaginas
|
||||
ObjCompras.Dispose();
|
||||
}
|
||||
|
||||
private void RecargarGlobal()
|
||||
{
|
||||
set_GlobalDTTiposGastos(UsuarioActual.CveEmpresa, -1, null);
|
||||
//ClsCompras ObjCompras = new ClsCompras();
|
||||
//if (ObjCompras.GetTipoGasto(-1, -1))
|
||||
//{
|
||||
// set_GlobalDTTiposGastos(UsuarioActual.CveEmpresa, ObjCompras.DtResultados);
|
||||
//}
|
||||
//ObjCompras.Dispose();
|
||||
}
|
||||
|
||||
protected void BtnAgregarTipoGastoD_Click(object sender, EventArgs e)
|
||||
{
|
||||
BtnAgregarTipoGasto.Text = "Agregar";
|
||||
@@ -74,6 +85,7 @@ public partial class Compras_CatTipoGasto : ClsPaginas
|
||||
Alert("Se eliminó el Tipo de Gasto correctamente");
|
||||
}
|
||||
ObjCompras.Dispose();
|
||||
RecargarGlobal();
|
||||
}
|
||||
|
||||
protected void BtnAgregarTipoGasto_Click(object sender, EventArgs e)
|
||||
@@ -81,23 +93,22 @@ public partial class Compras_CatTipoGasto : ClsPaginas
|
||||
ClsCompras ObjCompras = new ClsCompras();
|
||||
if (BtnAgregarTipoGasto.Text == "Agregar")
|
||||
{
|
||||
if (ObjCompras.AddTipoGasto(TxtTipoGasto.Text,ChkEstatus.Checked,DateTime.Now.ToString(),UsuarioActual.CveUsuario,UsuarioActual.CveEmpresa))
|
||||
if (ObjCompras.AddTipoGasto(TxtTipoGasto.Text, ChkEstatus.Checked, DateTime.Now.ToString(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
CargaDatos();
|
||||
UpDatos.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposD"));
|
||||
Alert("Se agregó el Tipo de Gasto correctamente");
|
||||
}
|
||||
}else
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ObjCompras.UpdateTipoGasto(CveTipoGasto,TxtTipoGasto.Text,ChkEstatus.Checked,-1,-1))
|
||||
if (ObjCompras.UpdateTipoGasto(CveTipoGasto, TxtTipoGasto.Text, ChkEstatus.Checked, -1, -1))
|
||||
{
|
||||
CargaDatos();
|
||||
UpDatos.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposD"));
|
||||
Alert("Se actualizó el Tipo de Gasto correctamente");
|
||||
}
|
||||
}
|
||||
ObjCompras.Dispose();
|
||||
CargaDatos();
|
||||
RecargarGlobal();
|
||||
UpDatos.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposD"));
|
||||
}
|
||||
}
|
||||
@@ -26,7 +26,7 @@ Partial Class AC_RepAnexoCatalogo
|
||||
ViewState("FechaInicio") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaFin As Date
|
||||
Private Property FechaFin As DateTime
|
||||
Get
|
||||
FechaFin = ViewState("FechaFin").ToString.ToDate
|
||||
End Get
|
||||
|
||||
@@ -40,6 +40,13 @@
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExcel2" OnClick="LnkExcel2_Click" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Generales del proveedor</asp:LinkButton>
|
||||
</li>
|
||||
<asp:UpdatePanel runat="server" ID="UPPCompara" UpdateMode="Conditional" >
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkModalCompara" OnClick="LnkModalCompara_Click" runat="server"><i class="fa fa-list-o" style="font-weight:bold;"></i> Comparativo</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
@@ -271,6 +278,41 @@
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div id="ModalCompara" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel ID="UpCompara" class="modal-dialog rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Comparativo</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
|
||||
<asp:GridView ID="GvCompara" runat="server" GridLines="None" AutoGenerateColumns="False" EmptyDataText="" CssClass="table table-striped table-hover table-advance Widthall">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Msg" HeaderText="Mensaje" />
|
||||
<asp:BoundField DataField="FueConciliado" HeaderText="Conciliado" />
|
||||
<asp:BoundField DataField="Fecha" HeaderText="Fecha" DataFormatString="{0:d}" />
|
||||
<asp:BoundField DataField="ImporteMN" HeaderText="Importe" DataFormatString="{0:N2}" />
|
||||
<asp:HyperLinkField DataTextField="CvePrePoliza" DataNavigateUrlFormatString="/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}" DataNavigateUrlFields="CvePrePoliza" HeaderText="Prepoliza" />
|
||||
<asp:HyperLinkField DataTextField="CveIE" DataNavigateUrlFormatString="/Bancos/IE.aspx?CveIE={0}" DataNavigateUrlFields="CveIE" HeaderText="IE" />
|
||||
<asp:BoundField DataField="FechaAplicado" HeaderText="Fecha Aplicado" DataFormatString="{0:d}" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
.
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
@@ -332,6 +332,27 @@ public partial class Contabilidad_RepIVA : ClsPaginas
|
||||
Response.End();
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected void LnkModalCompara_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
ClsContabilidad Objconta = new ClsContabilidad();
|
||||
|
||||
int Conciliado = DdlTipoMovto.SelectedValue.ToEntero();
|
||||
|
||||
if (Objconta.GetRepIVAComparativo(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), UsuarioActual.CveUsuario, Conciliado, UsuarioActual.CveEmpresa ))
|
||||
{
|
||||
GvCompara.DataSource = Objconta.DtResultados;
|
||||
}
|
||||
|
||||
Objconta.Dispose();
|
||||
GvCompara.DataBind();
|
||||
RegistraScript("$('#ModalCompara').modal('show')");
|
||||
UpCompara.Update();
|
||||
}
|
||||
|
||||
|
||||
protected string LV(string Valor)
|
||||
{
|
||||
return (Valor.ToDecimal() > 0) ? Valor.ToDecimal().ToString().FormatoNumero(0).Replace(",", string.Empty) : "";
|
||||
|
||||
Binary file not shown.
@@ -138,10 +138,10 @@
|
||||
|
||||
GuardaLogAsax(String.Format("Globalasax 7:{0}", DateTime.Now))
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
'C A R G A - T I P O G A S T O S
|
||||
Using ObjCompra As New ClsCompras()
|
||||
If ObjCompra.GetTipoGasto(-1, -1) Then Application("GlobalDTTiposGastos") = ObjCompra.DtResultados Else Application("GlobalDTTiposGastos") = Nothing
|
||||
End Using
|
||||
''C A R G A - T I P O G A S T O S
|
||||
'Using ObjCompra As New ClsCompras()
|
||||
' If ObjCompra.GetTipoGasto(-1, -1) Then Application("GlobalDTTiposGastos") = ObjCompra.DtResultados Else Application("GlobalDTTiposGastos") = Nothing
|
||||
'End Using
|
||||
|
||||
GuardaLogAsax(String.Format("Globalasax 8:{0}", DateTime.Now))
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -1007,129 +1007,10 @@
|
||||
</div>
|
||||
<div class="portlet-body form-horizontal form-row-sepe">
|
||||
<div class="form-body">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-4">Clientes: </label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlCtaContableClientes" CssClass="form-control input-medium" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
<asp:Button ID="BtnActivaRegistroClientes" runat="server" CssClass="btn btn-primary btn-sm" Text="+" CommandArgument="Clientes" Visible="False" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-4">Extranjera Clientes: </label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlMonedaExtranjeraClientes" CssClass="form-control input-medium" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
<asp:Button ID="Button2" runat="server" CssClass="btn btn-primary btn-sm" Text="+" CommandArgument="Clientes" Visible="False" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-4">Complementaria Clientes: </label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlCtaContableCompClientes" CssClass="form-control input-medium" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
<asp:Button ID="BtnActivaRegCompClientes" runat="server" CssClass="btn btn-primary btn-sm" Text="+" CommandArgument="Clientes" Visible="False" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-4">Anticipos: </label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlCtaContableAnticipos" CssClass="form-control input-medium " runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
<asp:Button ID="BtnActivaRegistroAnticipos" runat="server" CssClass="btn btn-primary btn-sm" Text="+" CommandArgument="Anticipos" Visible="False" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-4">Extranjera Anticipos: </label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlMonedaExtranjeraAnticipos" CssClass="form-control input-medium" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
<asp:Button ID="Button4" runat="server" CssClass="btn btn-primary btn-sm" Text="+" CommandArgument="Clientes" Visible="False" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-4">Complementaria Anticipos: </label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlCtaContableCompAnticipos" CssClass="form-control input-medium" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
<asp:Button ID="BtnActivaRegCompAnticipos" runat="server" CssClass="btn btn-primary btn-sm" Text="+" CommandArgument="Anticipos" Visible="False" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-4">Ret. IVA: </label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlCtaContableRetIVA" CssClass="form-control input-medium " runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
<asp:Button ID="BtnActivaRegistroIVA" runat="server" CssClass="btn btn-primary btn-sm" Text="+" CommandArgument="RetIVA" Visible="False" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-4">Ret. ISR: </label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlCtaContableRetISR" CssClass="form-control input-medium " runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
<asp:Button ID="BtnActivaRegistroISR" runat="server" CssClass="btn btn-primary btn-sm" Text="+" CommandArgument="RetISR" Visible="False" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-4">Fondo de Garantía: </label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlCtaContableFondoGarantia" CssClass="form-control input-medium " runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
<asp:Button ID="Button1" runat="server" CssClass="btn btn-primary btn-sm" Text="+" CommandArgument="RetIVA" Visible="False" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet light xspadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Cuentas y conceptos</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form-horizontal form-row-sepe">
|
||||
<div class="form-body">
|
||||
<asp:UpdatePanel runat="server" ID="UpCuentaConceptos" UpdateMode="Conditional">
|
||||
<div id="divCuentas" runat="server" visible="false">
|
||||
<asp:UpdatePanel runat="server" ID="UpCuentaConceptos" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvCuentasContable" runat="server" DataKeyNames="ConceptoContable,NombreCuenta" AutoGenerateColumns="False" EmptyDataText="No se encontraron Ventas en el Cliente" ToolTip="Listado de Historial de Ventas" CssClass="table table-striped table-advance table-hover" Style="text-align: center; min-width: 783px; width: 100%;" GridLines="None">
|
||||
<asp:GridView ID="GvCta" runat="server" DataKeyNames="ConceptoContable,NombreCuenta" AutoGenerateColumns="False" EmptyDataText="" ToolTip="Listado de Historial de Ventas" CssClass="table table-striped table-advance table-hover" Style="text-align: center; width: 100%;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Concepto Contable" DataField="ConceptoContable" />
|
||||
<asp:BoundField HeaderText="Nombre Cuenta" DataField="NombreCuenta" />
|
||||
@@ -1137,9 +1018,119 @@
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</div>
|
||||
<div id="divCuentasContp" runat="server" visible="false">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-4">Clientes: </label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlCtaContableClientes" CssClass="form-control input-medium" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
<asp:Button ID="BtnActivaRegistroClientes" runat="server" CssClass="btn btn-primary btn-sm" Text="+" CommandArgument="Clientes" Visible="False" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-4">Extranjera Clientes: </label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlMonedaExtranjeraClientes" CssClass="form-control input-medium" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
<asp:Button ID="Button2" runat="server" CssClass="btn btn-primary btn-sm" Text="+" CommandArgument="Clientes" Visible="False" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-4">Complementaria Clientes: </label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlCtaContableCompClientes" CssClass="form-control input-medium" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
<asp:Button ID="BtnActivaRegCompClientes" runat="server" CssClass="btn btn-primary btn-sm" Text="+" CommandArgument="Clientes" Visible="False" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-4">Anticipos: </label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlCtaContableAnticipos" CssClass="form-control input-medium " runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
<asp:Button ID="BtnActivaRegistroAnticipos" runat="server" CssClass="btn btn-primary btn-sm" Text="+" CommandArgument="Anticipos" Visible="False" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-4">Extranjera Anticipos: </label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlMonedaExtranjeraAnticipos" CssClass="form-control input-medium" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
<asp:Button ID="Button4" runat="server" CssClass="btn btn-primary btn-sm" Text="+" CommandArgument="Clientes" Visible="False" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-4">Complementaria Anticipos: </label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlCtaContableCompAnticipos" CssClass="form-control input-medium" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
<asp:Button ID="BtnActivaRegCompAnticipos" runat="server" CssClass="btn btn-primary btn-sm" Text="+" CommandArgument="Anticipos" Visible="False" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-4">Ret. IVA: </label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlCtaContableRetIVA" CssClass="form-control input-medium " runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
<asp:Button ID="BtnActivaRegistroIVA" runat="server" CssClass="btn btn-primary btn-sm" Text="+" CommandArgument="RetIVA" Visible="False" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-4">Ret. ISR: </label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlCtaContableRetISR" CssClass="form-control input-medium " runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
<asp:Button ID="BtnActivaRegistroISR" runat="server" CssClass="btn btn-primary btn-sm" Text="+" CommandArgument="RetISR" Visible="False" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-4">Fondo de Garantía: </label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlCtaContableFondoGarantia" CssClass="form-control input-medium " runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
<asp:Button ID="Button1" runat="server" CssClass="btn btn-primary btn-sm" Text="+" CommandArgument="RetIVA" Visible="False" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -791,7 +791,7 @@ Partial Class Clientes
|
||||
If Request("ATI") IsNot Nothing AndAlso IsNumeric(Request("ATI")) Then
|
||||
Tab.ActiveTabIndex = Request("ATI").ToEntero
|
||||
End If
|
||||
CargaCuentasyConceptos()
|
||||
'CargaCuentasyConceptos()
|
||||
Else
|
||||
'Configuración de Modalidad Insert
|
||||
|
||||
@@ -1079,13 +1079,13 @@ Partial Class Clientes
|
||||
DdlMonedaExtranjeraAnticipos.Attributes.Add("onclick", "CargaCuentas(9);")
|
||||
|
||||
End Sub
|
||||
Private Sub CargaCuentasyConceptos()
|
||||
Private Sub CargaCuentasConceptos()
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
If ObjConta.GetCuentasyConceptos(CveCliente) Then
|
||||
GvCuentasContable.DataSource = ObjConta.DtResultados
|
||||
If ObjConta.GetCuentasConceptos(6, UsuarioActual.CveEmpresa, CveCliente:=CveCliente) Then
|
||||
GvCta.DataSource = ObjConta.DtResultados
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
GvCuentasContable.DataBind()
|
||||
GvCta.DataBind()
|
||||
UpCuentaConceptos.Update()
|
||||
End Sub
|
||||
Protected Sub BtnCargarCuentas_Click(sender As Object, e As EventArgs) Handles BtnCargarCuentas.Click
|
||||
@@ -1681,8 +1681,17 @@ Partial Class Clientes
|
||||
End If
|
||||
|
||||
CargaEventoBitacora()
|
||||
|
||||
'Ocultamos la mayoria de informacion si es no-frecuente
|
||||
If UsuarioActual.Empresa.Funcionalidad(300) = "1" Then
|
||||
CargaCuentasConceptos()
|
||||
divCuentas.Visible = True
|
||||
divCuentasContp.Visible = False
|
||||
Else
|
||||
divCuentas.Visible = False
|
||||
divCuentasContp.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
'Ocultamos la mayoria de informacion si es no-frecuente
|
||||
If ObjClientes.TipoCliente = 2 Then
|
||||
TabFiscalContable.Visible = False
|
||||
TabCxC.Visible = False
|
||||
|
||||
@@ -14534,7 +14534,10 @@ Partial Class Ventas
|
||||
End Sub
|
||||
Private Sub RecargaSucursalPartidas()
|
||||
Dim CveSubProyecto As Integer = DdlSubProyectoDatos.SelectedValue.ToEntero()
|
||||
Dim SubProyecto As String = DdlSubProyectoDatos.SelectedItem.Text
|
||||
Dim SubProyecto As String = ""
|
||||
If CveSubProyecto > 0 Then
|
||||
SubProyecto = DdlSubProyectoDatos.SelectedItem.Text
|
||||
End If
|
||||
|
||||
If TmpDT IsNot Nothing AndAlso TmpDT.Rows.Count > 0 Then
|
||||
For Each Row As DataRow In TmpDT.Rows
|
||||
@@ -15233,8 +15236,6 @@ Partial Class Ventas
|
||||
Row("CvePS") = CvePS
|
||||
Row("Obs") = Obs
|
||||
|
||||
|
||||
|
||||
Dim DrPS As DataRow = Nothing
|
||||
|
||||
DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("") ' Estado = -1
|
||||
|
||||
Reference in New Issue
Block a user