resolviendo merge
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();
|
||||
@@ -96,9 +96,10 @@ public partial class Compras_CatTipoGasto : ClsPaginas
|
||||
{
|
||||
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))
|
||||
{
|
||||
Alert("Se actualizó el Tipo de Gasto correctamente");
|
||||
}
|
||||
|
||||
@@ -1332,6 +1332,10 @@ Partial Class Compras_Compras
|
||||
|
||||
End If
|
||||
|
||||
If DdlTipoComprobante.SelectedValue = "DEV" Then
|
||||
InicializaAplicaNCFact()
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
@@ -16930,8 +16934,9 @@ Partial Class Compras_Compras
|
||||
CargaRetISRConcepto()
|
||||
|
||||
|
||||
|
||||
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") Then
|
||||
InicializaAplicaNCFact()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Private Sub OriginalesVisible(Accion As Boolean)
|
||||
|
||||
@@ -824,6 +824,17 @@
|
||||
<asp:Button ID="BtnCargarCuentas" runat="server" ClientIDMode="Static" Text="CargaCuentas" Style="display: none;" />
|
||||
<asp:HiddenField ID="HdnCuenta" runat="server" ClientIDMode="Static" Value="0" />
|
||||
|
||||
<div id="divCuentas" runat="server" visible="false">
|
||||
|
||||
<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" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
||||
<div id="divCuentasContp" runat="server" visible="false">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
@@ -1149,7 +1160,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
@@ -852,6 +852,15 @@ Partial Class Compras_Proveedores
|
||||
DdlDIOTPais.SelectedValueExist(ObjProveedor.DIOTCvePais)
|
||||
TxtDIOTNacionalidad.Text = ObjProveedor.DIOTNacionalidad
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(300) = "1" Then
|
||||
CargaCuentasConceptos()
|
||||
divCuentas.Visible = True
|
||||
divCuentasContp.Visible = False
|
||||
Else
|
||||
divCuentas.Visible = False
|
||||
divCuentasContp.Visible = True
|
||||
End If
|
||||
|
||||
'Contable
|
||||
If UsuarioActual.Empresa.UsaContabilidad Or UsuarioActual.Empresa.UsaContabilidadSIG Then
|
||||
DdlCtaContAcreedores.AutoPostBack = True
|
||||
@@ -1010,6 +1019,16 @@ Partial Class Compras_Proveedores
|
||||
DdlUsuarioEvaluador.DataBind()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCuentasConceptos()
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
If ObjConta.GetCuentasConceptos(1, UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor) Then
|
||||
GvCta.DataSource = ObjConta.DtResultados
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
GvCta.DataBind()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaContactos(ByRef ObjProveedor As ClsCompProveedores)
|
||||
'TRAE CONTACTOS GENERALES Y POR SUCURSAL
|
||||
If ObjProveedor.GetProveedoresContactos(-1, CveProveedor, -1) Then
|
||||
|
||||
@@ -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.
@@ -731,6 +731,6 @@
|
||||
}
|
||||
|
||||
</script>
|
||||
<script src="<%= String.Format("https://maps.googleapis.com/maps/api/js?key={0}&libraries=places", Extensiones.GOOGLE_MAPS_API_KEY) %>"</script>
|
||||
<script src="<%= String.Format("https://maps.googleapis.com/maps/api/js?key={0}&libraries=places", Extensiones.ModExtensiones.GOOGLE_MAPS_API_KEY) %>"</script>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
@@ -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))
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
<asp:LinkButton ID="LnkExportar" runat="server"><i class="fa fa-ad-excel"></i> Generar Excel</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkSeries" Visible="false" runat="server">Series</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkSeries" Visible="false" runat="server"><i class="fa fa-list"></i> Series Disponibles</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<a target="_blank" class="ayuda" href="../Documentacion/DocumentacionInventarios.aspx#Kardex"> </a>
|
||||
@@ -501,7 +501,7 @@
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div id="DivModalSerie" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpdatePanel1" UpdateMode="Conditional" RenderMode="Inline" style="width:40%">
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpdatePanel1" UpdateMode="Conditional" RenderMode="Inline" style="width:50%">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
@@ -510,16 +510,16 @@
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row" style="width:100%">
|
||||
<div style="width:95%;margin-left:2.5%;margin-right:2.5%">
|
||||
<div style="width:98%;margin-left:1.5%;margin-right:1.5%">
|
||||
<asp:UpdatePanel ID="UpGridSeries" runat="server" UpdateMode="Conditional" RenderMode="Inline">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvSeries" Width="100%" runat="server" ShowHeader="true" EmptyDataText="No hay registros." AutoGenerateColumns="False" AllowPaging="False"
|
||||
<asp:GridView ID="GvSeries" Width="98%" runat="server" ShowHeader="true" EmptyDataText="No hay registros." AutoGenerateColumns="False" AllowPaging="False"
|
||||
ShowFooter="True" ShowHeaderWhenEmpty="True" CssClass="table table-striped table-advance table-hover ScrollAD" GridLines="None"
|
||||
DataKeyNames="CveEmpresa,CveAlmacen,Almacen,PS,CvePS,Serie,Lote,FechaCaducidad,CveSeccionAlmacen,Existencia,Valor">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Almacén" DataField="Almacen"/>
|
||||
<asp:BoundField HeaderText="Serie" DataField="Serie"/>
|
||||
<asp:BoundField HeaderText="Existencia" DataField="Existencia" DataFormatString="{0:N}"/>
|
||||
<asp:BoundField HeaderText="Existencia" DataField="Existencia" DataFormatString="{0:#,###}"/>
|
||||
</Columns>
|
||||
|
||||
</asp:GridView>
|
||||
|
||||
@@ -418,7 +418,7 @@
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:GridView ID="GvInv" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False" ShowFooter="True" ShowHeader="true" ShowHeaderWhenEmpty="True"
|
||||
DataKeyNames="EntregaDirecta,Consec,CodigoBarras,CvePS,CveUM,PU,CantidadC,CantidadF,UM,PS,CveCompraDetalle,CveOrdenCompraDetalle,PUExtranjero,AplicaSerieLote,CveClasificacion,Codigo,CveVentaDetalle,CostoIndirecto,CveTamaño,Lote,AplicaSeccion,AplicaLote,AplicaCaducidad,AplicaSerie" HeaderStyle-CssClass="Titulos" RowStyle-Height="25px" CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" data-heighterror="450" data-freezerows="1" GridLines="None">
|
||||
DataKeyNames="EntregaDirecta,Consec,CodigoBarras,CvePS,CveUM,PU,CantidadC,CantidadF,UM,PS,CveCompraDetalle,CveOrdenCompraDetalle,PUExtranjero,AplicaSerieLote,CveClasificacion,Codigo,CveVentaDetalle,CostoIndirecto,CveTamaño,Lote,AplicaSeccion,AplicaLote,AplicaCaducidad,AplicaSerie,CveAlmacenDevolucionProveedor" HeaderStyle-CssClass="Titulos" RowStyle-Height="25px" CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" data-heighterror="450" data-freezerows="1" GridLines="None">
|
||||
<HeaderStyle Height="58px" />
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
|
||||
@@ -91,6 +91,14 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
Return ViewState("IdPoliza").ToString.ToEntero
|
||||
End Get
|
||||
End Property
|
||||
Private Property DtAlmacenesDevolucion As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtAlmacenesDevolucion"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtAlmacenesDevolucion") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtDatosDetalle As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtDatosDetalle"), DataTable)
|
||||
@@ -245,6 +253,14 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
ViewState("CveAlmacenApartado") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveAlmacenDevolucionProveedor As Integer
|
||||
Get
|
||||
Return CType(ViewState("CveAlmacenDevolucionProveedor"), Integer)
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveAlmacenDevolucionProveedor") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TipoMovimiento As Integer
|
||||
Get
|
||||
Return CType(ViewState("TipoMovimiento"), Integer)
|
||||
@@ -361,6 +377,14 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
ViewState("CveVendedor") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property RealizarTraspasoAlmacenDevolucion() As Boolean
|
||||
Get
|
||||
Return If(IsNothing(ViewState("RealizarTraspasoAlmacenDevolucion")), False, CBool(ViewState("RealizarTraspasoAlmacenDevolucion")))
|
||||
End Get
|
||||
Set
|
||||
ViewState("RealizarTraspasoAlmacenDevolucion") = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -404,8 +428,9 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
CveFleteCompra = -1
|
||||
BuscaEntregaDirecta = -1
|
||||
CveAlmacenApartado = -1
|
||||
CveAlmacenDevolucionProveedor = -1
|
||||
TipoMovimiento = 1
|
||||
|
||||
RealizarTraspasoAlmacenDevolucion = False
|
||||
CantidadTotal = 0
|
||||
IndexSeccionAlmacen = 0
|
||||
|
||||
@@ -778,6 +803,8 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
DivTipoCambio.Visible = False
|
||||
Apartado = False
|
||||
CveAlmacenApartado = -1
|
||||
CveAlmacenDevolucionProveedor = -1
|
||||
RealizarTraspasoAlmacenDevolucion = False
|
||||
BtnGuardar.Enabled = True
|
||||
CargaAlmacenes(-1)
|
||||
|
||||
@@ -829,6 +856,9 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
Private Sub CargaCompra(pCveCompra As Integer, pCveProveedor As Integer)
|
||||
'CargaAlmacenes(-1)
|
||||
|
||||
RealizarTraspasoAlmacenDevolucion = False
|
||||
CveAlmacenDevolucionProveedor = -1
|
||||
|
||||
Dim ObjCompras As New ClsCompras
|
||||
Dim ObjInventario As New ClsInventarios
|
||||
|
||||
@@ -896,6 +926,13 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
DtRecepcion = ObjInventario.DtResultados.Copy()
|
||||
End If
|
||||
|
||||
If TipoMovimiento = 2 AndAlso GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveTipoAlmacen:=21).Rows.Count > 0 Then
|
||||
RealizarTraspasoAlmacenDevolucion = True
|
||||
CveAlmacenDevolucionProveedor = DtRecepcion.Rows(0)("CveAlmacenDevolucionProveedor").ToString.ToEntero
|
||||
'CreaDTAlmacenDevolucion()
|
||||
'CargaAlmacenes(-1, "21", CveTipoCompra)
|
||||
End If
|
||||
|
||||
DtDatosDetalle = Nothing
|
||||
CreaDtDetalle()
|
||||
DtDatosLoteDetalle = Nothing
|
||||
@@ -1494,6 +1531,14 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CreaDTAlmacenDevolucion()
|
||||
If DtAlmacenesDevolucion Is Nothing Then
|
||||
DtAlmacenesDevolucion = New DataTable
|
||||
DtAlmacenesDevolucion.Columns.Add("CveCompraDetalle", GetType(Integer))
|
||||
DtAlmacenesDevolucion.Columns.Add("CveAlmacenOriginal", GetType(Integer))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaSerie(Tipo As Integer, Optional CerrarCompletado As Boolean = False)
|
||||
'RegistraScript("document.getElementById(""TxtSerie"").focus();")
|
||||
RegistraScript("$('#DivSerie').modal();", "ModalLote")
|
||||
@@ -1637,7 +1682,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
End If
|
||||
|
||||
If TipoMovimiento = 2 Then
|
||||
If DtExistencias.SUM("Existencia", $"Serie = {Serie}") = 0 Then
|
||||
If DtExistencias.SUM("Existencia", $"Serie = '{Serie}'") = 0 Then
|
||||
MensajeSinExistencias.Append($"Serie: <b>{Serie}</b>. <br/>")
|
||||
Continue For
|
||||
End If
|
||||
@@ -2206,6 +2251,10 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
Dim CveMovimientoVirtual As Integer = -1
|
||||
Dim FolioVirtual As Integer = -1
|
||||
|
||||
'TRASPASO DEVOLUCION
|
||||
Dim CveMovimientoSalidaTraspaso As Integer = -1
|
||||
Dim FolioSalidaTraspaso As String = ""
|
||||
|
||||
'CONTABILIDAD
|
||||
Dim CvePrePoliza = -1
|
||||
Dim MensajeContabilidad = ""
|
||||
@@ -2218,19 +2267,26 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
|
||||
If HdnTipoDocto.Value <> "Fac" Then RecibidaCompleta = False
|
||||
|
||||
Dim CveConceptoAlmacen As Integer = If(TipoMovimiento > 1, 13, 2)
|
||||
|
||||
Dim CveAlmacen As Integer = DdlAlmacen.SelectedValue.ToEntero
|
||||
|
||||
Dim CveModalidad As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=CveAlmacen).FiltroPrimeroValor("CveModalidad").ToEntero()
|
||||
|
||||
Dim EsContabilizable As Boolean = (CveModalidad = 1)
|
||||
|
||||
'ENTRADA ALMACÉN
|
||||
CveMovimiento = ObjInventario.AddMovimiento(CveAlmacen, If(TipoMovimiento > 1, 13, 2), 1, FechaMovto, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
|
||||
CveCompraSurtir, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, TipoCambio:=If(DdlMonedaTC.SelectedValue.ToEntero = 1, -1, TipoCambio),
|
||||
MovimientoFijo:=If(TipoMovimiento = 2, True, False), Remision:=TxtRemision.Text, Modulo:="RA/G1")
|
||||
If CveMovimiento > 0 Then
|
||||
CveMovimientoOriginal = CveMovimiento
|
||||
InvFolio = ObjInventario.Folio.ToString
|
||||
If RealizarTraspasoAlmacenDevolucion AndAlso TipoMovimiento = 2 Then
|
||||
CveConceptoAlmacen = 26
|
||||
|
||||
'For Each gvr As GridViewRow In GvInv.Rows
|
||||
' If gvr.FCCheckBox("cbInv").Checked AndAlso gvr.FCTextBox("TbCantidadF").Text.ToDecimal > 0 Then
|
||||
' Dim Row As DataRow = DtAlmacenesDevolucion.NewRow()
|
||||
' Row("CveCompraDetalle") = gvr.DataKey("CveCompraDetalle").ToEntero()
|
||||
' Row("CveAlmacenOriginal") = gvr.DataKey("CveAlmacenOriginal").ToEntero()
|
||||
' DtAlmacenesDevolucion.Rows.Add(Row)
|
||||
' End If
|
||||
'Next
|
||||
|
||||
Dim DtDetalle As New DataTable
|
||||
Dim DtDetalleLote As New DataTable
|
||||
Dim PU As Decimal = 0.0D
|
||||
@@ -2238,6 +2294,119 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
Dim CostoIndirecto As Decimal = 0.0D
|
||||
Dim SumaTotal As Decimal = 0.0D
|
||||
Dim Cont As Integer = 0
|
||||
|
||||
Dim CveMovtoSalidaActual = -1
|
||||
Dim CveMovtoEntradaActual = -1
|
||||
Dim CveVendedorActual = -1
|
||||
Dim CveClienteActual = -1
|
||||
|
||||
Dim CveAlmacenDestino = CveAlmacen
|
||||
Dim CveSeccionDestino As Integer = -1
|
||||
|
||||
'For Each RowAlmacen As DataRow In DtAlmacenesDevolucion.FiltraParametros("", DistinctColumns:={"CveAlmacenOrignal"}).Rows
|
||||
|
||||
'SALIDA DE ALMACEN POR TRASPASO
|
||||
CveMovimientoSalidaTraspaso = ObjInventario.AddMovimiento(CveAlmacen, CveConceptoAlmacen, 1, FechaMovto, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
|
||||
CveCompraSurtir, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, TipoCambio:=If(DdlMonedaTC.SelectedValue.ToEntero = 1, -1, TipoCambio),
|
||||
MovimientoFijo:=If(TipoMovimiento = 2, True, False), CveAlmacenDestino:=CveAlmacenDestino, Remision:=TxtRemision.Text, Modulo:="RA/G11")
|
||||
|
||||
If CveMovimientoSalidaTraspaso > 0 Then
|
||||
FolioSalidaTraspaso = ObjInventario.Folio.ToString()
|
||||
|
||||
For Each gvr As GridViewRow In GvInv.Rows '.Cast(Of GridViewRow).Where(Function(row) row.DataKey("CveAlmacenOrignal") = RowAlmacen("CveAlmacenOrignal").ToString())
|
||||
If gvr.FCCheckBox("cbInv").Checked AndAlso gvr.FCTextBox("TbCantidadF").Text.ToDecimal > 0 Then
|
||||
|
||||
PU = DtInv.Rows(gvr.RowIndex)("PU").ToString.ToDecimal
|
||||
CostoIndirecto = DtInv.Rows(gvr.RowIndex)("CostoIndirecto").ToString.ToDecimal
|
||||
PUExtranjero = DtInv.Rows(gvr.RowIndex)("PUExtranjero").ToString.ToDecimal
|
||||
|
||||
'SI FUE POR SERIE LOTE
|
||||
DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", gvr.DataKey("Consec").ToEntero))
|
||||
DtDetalleLote = DtDatosLoteDetalle.FiltraParametros(String.Format("ConsecId = {0}", gvr.DataKey("Consec").ToEntero))
|
||||
If DtDetalle.Rows.Count > 0 Then
|
||||
Dim ContDt As Integer = 0
|
||||
For Each Dr As DataRow In DtDetalle.Rows
|
||||
SumaTotal += PU + CostoIndirecto
|
||||
If RecibidaCompleta AndAlso Cont + 1 = GvInv.Rows.Count AndAlso ContDt + 1 = DtDetalle.Rows.Count AndAlso Math.Round((TotalCompraOC * If(TipoCambio > 1, TipoCambio, 1)), 2) <> SumaTotal Then
|
||||
If Not UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
PU = Math.Round((TotalCompraOC * If(TipoCambio > 1, TipoCambio, 1)), 2).ToDecimal - (SumaTotal - (PU))
|
||||
End If
|
||||
End If
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaTraspaso, 1, gvr.DataKey("CveUM").ToEntero, gvr.DataKey("CvePS").ToEntero, PU, -1, PUTC:=If(DdlMonedaTC.SelectedValue.ToEntero = 1, -1, PUExtranjero), Serie:=Dr("Serie").ToString, CveCompraDetalle:=gvr.DataKey("CveCompraDetalle").ToEntero, CveOrdenCompraDetalle:=gvr.DataKey("CveOrdenCompraDetalle").ToEntero, CveVentaDetalle:=gvr.DataKey("CveVentaDetalle").ToEntero, CostoIndirecto:=CostoIndirecto, CveUsuarioModifico:=UsuarioActual.CveUsuario, FechaCaducidad:=If(CBool(gvr.DataKey("AplicaCaducidad")), gvr.FCTextBox("TxtCaducidad").Text.ToDate, MinFecha), Lote:=If(CBool(gvr.DataKey("AplicaLote")), gvr.FCTextBox("TxtLote").Text, ""), CveSeccionAlmacen:=If(CBool(gvr.DataKey("AplicaSeccion")), gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero, -1)) Then
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
End If
|
||||
ContDt += 1
|
||||
Next
|
||||
ElseIf DtDetalleLote.Rows.Count > 0 Then
|
||||
Dim ContDt As Integer = 0
|
||||
For Each Dr As DataRow In DtDetalleLote.Rows
|
||||
SumaTotal += Dr("Cantidad").ToString.ToDecimal * (PU + CostoIndirecto)
|
||||
If RecibidaCompleta AndAlso Cont + 1 = GvInv.Rows.Count AndAlso ContDt + 1 = DtDetalleLote.Rows.Count AndAlso Math.Round((TotalCompraOC * If(TipoCambio > 1, TipoCambio, 1)), 2) <> SumaTotal Then
|
||||
If Not UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
PU = (Math.Round((TotalCompraOC * If(TipoCambio > 1, TipoCambio, 1)), 2).ToDecimal - (SumaTotal - (Dr("Cantidad").ToString.ToDecimal * (PU)))) / Dr("Cantidad").ToString.ToDecimal
|
||||
End If
|
||||
End If
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaTraspaso, Dr("Cantidad").ToString.ToDouble, gvr.DataKey("CveUM").ToEntero, gvr.DataKey("CvePS").ToEntero, PU, -1, PUTC:=If(DdlMonedaTC.SelectedValue.ToEntero = 1, -1, PUExtranjero), Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveCompraDetalle:=gvr.DataKey("CveCompraDetalle").ToEntero, CveOrdenCompraDetalle:=gvr.DataKey("CveOrdenCompraDetalle").ToEntero, CveVentaDetalle:=gvr.DataKey("CveVentaDetalle").ToEntero, CostoIndirecto:=CostoIndirecto, CveUsuarioModifico:=UsuarioActual.CveUsuario, CveSeccionAlmacen:=If(CBool(gvr.DataKey("AplicaSeccion")), gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero, -1)) Then
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
ContDt += 1
|
||||
Next
|
||||
Else
|
||||
SumaTotal += gvr.FCTextBox("TbCantidadF").Text.ToDecimal * (PU + CostoIndirecto) ' considerar el costo indirecto para el ajuste
|
||||
If RecibidaCompleta AndAlso Cont + 1 = GvInv.Rows.Count AndAlso Math.Round((TotalCompraOC * If(TipoCambio > 1, TipoCambio, 1)), 2) <> Math.Round(SumaTotal, 2) Then
|
||||
Dim tTotal As Decimal = gvr.FCTextBox("TbCantidadF").Text.ToDecimal * (PU)
|
||||
If Not UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
PU = (Math.Round((TotalCompraOC * If(TipoCambio > 1, TipoCambio, 1)), 2).ToDecimal - (SumaTotal - tTotal)) / gvr.FCTextBox("TbCantidadF").Text.ToDecimal
|
||||
End If
|
||||
End If
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaTraspaso, gvr.FCTextBox("TbCantidadF").Text.ToDouble, gvr.DataKey("CveUM").ToEntero, gvr.DataKey("CvePS").ToEntero, PU, -1, PUTC:=If(DdlMonedaTC.SelectedValue.ToEntero = 1, -1, PUExtranjero), CveCompraDetalle:=gvr.DataKey("CveCompraDetalle").ToEntero, CveOrdenCompraDetalle:=gvr.DataKey("CveOrdenCompraDetalle").ToEntero, CveVentaDetalle:=gvr.DataKey("CveVentaDetalle").ToEntero, CostoIndirecto:=CostoIndirecto, CveUsuarioModifico:=UsuarioActual.CveUsuario, FechaCaducidad:=If(CBool(gvr.DataKey("AplicaCaducidad")), gvr.FCTextBox("TxtCaducidad").Text.ToDate, MinFecha), Lote:=If(CBool(gvr.DataKey("AplicaLote")), gvr.FCTextBox("TxtLote").Text, ""), CveSeccionAlmacen:=If(CBool(gvr.DataKey("AplicaSeccion")), gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero, -1)) Then
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
End If
|
||||
'If ObjInventario.CveMovimientoDetalle > 0 AndAlso DtSeccionAlmacen.Rows.Count > 0 Then
|
||||
' For Each Dr As DataRow In DtSeccionAlmacen.FiltraParametros($"IndexSeccionAlmacen = {gvr.RowIndex}").Rows
|
||||
' If Not ObjInventario.AddMovimientosDetalleSeccionesAlmacen(ObjInventario.CveMovimientoDetalle, Dr("CveSeccionAlmacen").ToString.ToEntero, Dr("CantidadSeccionAlmacen").ToString.ToDecimal) Then
|
||||
' ErrorMovInv = True
|
||||
' Exit For
|
||||
' End If
|
||||
' Next
|
||||
'End If
|
||||
Cont += 1
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
'Next
|
||||
|
||||
'MODIFICA EL CONCEPTO PARA REALIZAR LA ENTRADA
|
||||
CveConceptoAlmacen = 27
|
||||
CveAlmacen = CveAlmacenDevolucionProveedor
|
||||
End If
|
||||
|
||||
'ENTRADA ALMACÉN
|
||||
CveMovimiento = ObjInventario.AddMovimiento(CveAlmacen, CveConceptoAlmacen, 1, FechaMovto, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
|
||||
CveCompraSurtir, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, TipoCambio:=If(DdlMonedaTC.SelectedValue.ToEntero = 1, -1, TipoCambio),
|
||||
MovimientoFijo:=If(TipoMovimiento = 2, True, False), CveMovimientoRelacionado:=CveMovimientoSalidaTraspaso, Remision:=TxtRemision.Text, Modulo:="RA/G1")
|
||||
|
||||
If CveMovimiento > 0 Then
|
||||
CveMovimientoOriginal = CveMovimiento
|
||||
InvFolio = ObjInventario.Folio.ToString
|
||||
|
||||
Dim DtDetalle As New DataTable
|
||||
Dim DtDetalleLote As New DataTable
|
||||
Dim PU As Decimal = 0.0D
|
||||
Dim PUExtranjero As Decimal = 0.0D
|
||||
Dim CostoIndirecto As Decimal = 0.0D
|
||||
Dim SumaTotal As Decimal = 0.0D
|
||||
Dim Cont As Integer = 0
|
||||
|
||||
For Each gvr As GridViewRow In GvInv.Rows
|
||||
If gvr.FCCheckBox("cbInv").Checked AndAlso gvr.FCTextBox("TbCantidadF").Text.ToDecimal > 0 Then
|
||||
|
||||
@@ -2858,6 +3027,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
MensajeError = "Error al obtener movimientos"
|
||||
End If
|
||||
End If
|
||||
|
||||
'PREPOLIZA - NC
|
||||
If TipoMovimiento = 3 AndAlso Not ErrorMovInv Then
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
||||
@@ -2983,6 +3153,75 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ErrorMovInv AndAlso TipoMovimiento = 2 AndAlso CveMovimientoSalidaTraspaso > 0 Then
|
||||
|
||||
'VARIABLES
|
||||
Dim Fecha As Date = Now
|
||||
Dim CveProveedor As Integer = -1
|
||||
Dim ProveedorNombre As String = ""
|
||||
Dim SerieFolio As String = ""
|
||||
|
||||
'Dim DrAlmO, DrAlmD As DataRow
|
||||
'Dim CveSucursalOrigen, CveSucursalDestino As Integer
|
||||
'Dim TipoAlmacenOrigen, TipoAlmacenDestino As Integer
|
||||
'Dim CveSubProyectoOrigen, CveSubProyectoDestino As Integer
|
||||
Dim IdCtaContableOrigen, IdCtaContableDestino As Integer
|
||||
|
||||
If ObjCompras.GetCompras(CveCompraSurtir, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
'Fecha = ObjCompras.DtResultados(0)("Fecha").ToString.ToDate
|
||||
Fecha = TxtFecha.Text.ToDate
|
||||
CveProveedor = ObjCompras.DtResultados(0)("CveProveedor").ToString.ToEntero
|
||||
ProveedorNombre = ObjCompras.DtResultados(0)("RazonSocial").ToString
|
||||
SerieFolio = $"Compra: {ObjCompras.DtResultados(0)("SerieFolio").ToString}"
|
||||
Else
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
'DrAlmO = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacen.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
'DrAlmD = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=CveAlmacenDevolucionProveedor).FiltroPrimero("")
|
||||
|
||||
'If Not ErrorMovInv AndAlso DrAlmO IsNot Nothing AndAlso DrAlmD IsNot Nothing Then
|
||||
' CveSucursalOrigen = DrAlmO("CveSubProyecto").ToString.ToEntero
|
||||
' TipoAlmacenOrigen = DrAlmO("CveTipoAlmacen").ToString.ToEntero
|
||||
' CveSubProyectoOrigen = DrAlmO("CveSubProyecto").ToString.ToEntero
|
||||
' IdCtaContableOrigen = DrAlmO("IdCtaContable").ToString.ToEntero
|
||||
|
||||
' CveSucursalDestino = DrAlmD("CveSubProyecto").ToString.ToEntero
|
||||
' TipoAlmacenDestino = DrAlmD("CveTipoAlmacen").ToString.ToEntero
|
||||
' CveSubProyectoDestino = DrAlmD("CveSubProyecto").ToString.ToEntero
|
||||
' IdCtaContableDestino = DrAlmO("IdCtaContable").ToString.ToEntero
|
||||
'Else
|
||||
' ErrorMovInv = True
|
||||
'End If
|
||||
|
||||
Dim resultado As DataTable = Nothing
|
||||
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalidaTraspaso, UsuarioActual.CveEmpresa) Then
|
||||
resultado = ObjInventario.DtResultados.Copy()
|
||||
Else
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
'Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen= {CveAlmacenDevolucionProveedor}").ToEntero()
|
||||
|
||||
'AGREGAMOS PREPOLIZAS TRASPASO DIRECTO:
|
||||
Dim CvePrePolizaTraspaso As Integer = ObjConta.AddPrePolizas("RecepcionAlmacen/TraspasoAlmacen", 53, 0, 0, 1, Now, ProveedorNombre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
If CvePrePolizaTraspaso > 0 AndAlso ObjInventario.GetMovimientosDetalle(CveMovimientoSalidaTraspaso, UsuarioActual.CveEmpresa) Then
|
||||
Dim importe As Decimal = resultado.SUMD("Total").RoundSQL
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaTraspaso, True, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContableOrigen, -1, CveMovimientoAlmacen:=CveMovimientoSalidaTraspaso, Contabilizable:=False, ImporteMX:=importe) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
If Not ErrorMovInv AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePolizaTraspaso, False, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContableDestino, -1, CveMovimientoAlmacen:=CveMovimiento, Contabilizable:=False, ImporteMX:=importe) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
Else
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
'AGREGA SALDOS A OC SURTIDAS
|
||||
If Not ErrorMovInv And CveOCSurtir > 0 Then
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
||||
@@ -3013,8 +3252,19 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
|
||||
Dim Msg As New StringBuilder
|
||||
Dim link As String = String.Format("<a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a>", CveMovimiento, InvFolio)
|
||||
Msg.AppendFormat("Movimiento Registrado: Folio: <b>{0}</b>", link)
|
||||
Msg.AppendFormat("<br/><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimiento)))
|
||||
'SI LO SOLO GENERO EL MOVIMIENTO DE ENTRADA O SALIDA
|
||||
If CveMovimiento > 0 AndAlso CveMovimientoSalidaTraspaso <= 0 Then
|
||||
Msg.AppendFormat("Movimiento Registrado: Folio: <b>{0}</b>", link)
|
||||
Msg.AppendFormat("<br/><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimiento)))
|
||||
'SI GENERO UN TRASPASO AL ALMACEN DE DEVOLUCION
|
||||
ElseIf CveMovimiento > 0 AndAlso CveMovimientoSalidaTraspaso > 0 Then
|
||||
Msg.AppendFormat("Movimiento de Salida: Folio: <b>{0}</b>", String.Format("<a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a>", CveMovimientoSalidaTraspaso, FolioSalidaTraspaso))
|
||||
Msg.AppendFormat("<br/><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoSalidaTraspaso)))
|
||||
|
||||
Msg.AppendFormat("<br/>Movimiento de Entrada: Folio: <b>{0}</b>", link)
|
||||
Msg.AppendFormat("<br/><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimiento)))
|
||||
End If
|
||||
|
||||
|
||||
'If CveMovtoSalidaDirecta > 0 Then
|
||||
' Msg.AppendFormat("<br/><br/> Movimientos de control:<br/>")
|
||||
@@ -3047,7 +3297,6 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
link = String.Format("<a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a>", CveMovimientoVirtual, FolioVirtual)
|
||||
Msg.AppendFormat("<br/>Movimiento de Entrada al Almacen Virtual: Folio: <b>{0}</b>", link)
|
||||
Msg.AppendFormat("<br/><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoVirtual)))
|
||||
|
||||
End If
|
||||
|
||||
'CONTABILIDAD
|
||||
|
||||
@@ -202,7 +202,7 @@
|
||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ningun Traspaso de Almacén"
|
||||
ToolTip="Remisiones sin Facturar" data-rows="2"
|
||||
ToolTip="" data-rows="2"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
||||
data-sort="true" GridLines="None">
|
||||
<Columns>
|
||||
|
||||
@@ -5390,11 +5390,11 @@ Partial Class OC
|
||||
If CveConfianzaProveedor <= 0 Then
|
||||
CveConfianzaProveedor = 2
|
||||
End If
|
||||
|
||||
ChkCotizacion.Checked = CveConfianzaProveedor > 0
|
||||
ChkCotizacion.Enabled = CveConfianzaProveedor <= 0
|
||||
End If
|
||||
|
||||
ChkCotizacion.Checked = CveConfianzaProveedor > 0
|
||||
ChkCotizacion.Enabled = CveConfianzaProveedor <= 0
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
@@ -701,7 +701,7 @@ Partial Class Ventas_PortalCliente
|
||||
End If
|
||||
|
||||
If EstatusPagoProsepago = 0 Then
|
||||
Alert("Ocurrió un error al procesar el pago, no se a realizadó ningun cargo. Por favor verifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||
Alert("La transacción no se pudo realizar, no se aplicó ningun cargo. Por favor verifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
@@ -1131,7 +1131,7 @@ Partial Class Ventas_PortalCliente
|
||||
|
||||
If Not TieneError Then
|
||||
ObjConta.Commit()
|
||||
Alert($"Se realizó el pago exitoso de las siguientes facturas:<br><br> {MensajeAlert.ToString}", TipoMensaje.MsgInformacion)
|
||||
Alert($"La transacción se realizó correctamente y el pago se aplicó en las siguientes facturas:<br><br> {MensajeAlert.ToString}", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
ObjConta.RollBack()
|
||||
Alert(MensajeError.ToString, TipoMensaje.MsgError)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -3718,7 +3718,7 @@
|
||||
<div style="max-height: 300px; overflow-y: auto;">
|
||||
<asp:GridView ID="GVAnticipos" runat="server" AutoGenerateColumns="False" ClientIDMode="Static" EmptyDataText="No se encontraron Anticipos del Cliente"
|
||||
ToolTip="Listado de Anticipos" CssClass="GVAnticipos table table-striped table-hover Widthall" data-height="300" Style="text-align: center;" GridLines="None"
|
||||
DataKeyNames="ISTotal,Saldo,CveIE,Folio,Tipo,CveVenta,CveConceptoContable,CveConceptoContableAmor, TotalAnticipo, SubTotalAnticipo, IVAAnticipo,IEPS, ImpuestosLocalesAnticipo, SubTotalAmortizacion, SubTotal, Original, IVA, RetIVA, RetISR, IdCtaContableNC,FolioFiscal, CveClasificacionNC, IdCtaContableNCSIG, TipoCambio,TipoCambioPago,TipoCambioHoy, CveMoneda,Fecha,SaldoSubTotal,SaldoConImpuestos,RegresarImpuesto">
|
||||
DataKeyNames="ISTotal,Saldo,CveIE,Folio,Tipo,CveVenta,CveConceptoContable,CveConceptoContableAmor, TotalAnticipo, SubTotalAnticipo, IVAAnticipo,IEPS, ImpuestosLocalesAnticipo, SubTotalAmortizacion, SubTotal, Original, IVA, RetIVA, RetISR, IdCtaContableNC,FolioFiscal, CveClasificacionNC, IdCtaContableNCSIG, TipoCambio,TipoCambioPago,TipoCambioHoy, CveMoneda,Fecha,SaldoSubTotal,SaldoConImpuestos,RegresarImpuesto,CveCliente">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
|
||||
@@ -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