This commit is contained in:
Rakcsle Supertramp
2020-07-25 13:24:38 -07:00
14 changed files with 890 additions and 217 deletions

View File

@@ -4285,12 +4285,11 @@ Public Class ClsPaginas
PaginaDict.Add("/CRM/CatProbabilidadAcercamiento.aspx".ToUpper(), 1306)
'PaginaDict.Add("/CRM/Acercamiento.aspx".ToUpper(), 1308)
PaginaDict.Add("/CRM/Acercamiento.aspx".ToUpper(), 1305)
PaginaDict.Add("/CRM/RepAcercamientosEtapas.aspx".ToUpper(), 1310)
PaginaDict.Add("/CRM/RepAcercamientos.aspx".ToUpper(), 1311)
PaginaDict.Add("/CRM/PopUpBuscarAcercamiento.aspx".ToUpper(), 1312)
PaginaDict.Add("/CRM/RepAcercamientosProcesos.aspx".ToUpper(), 1313)
PaginaDict.Add("/CRM/RepAcercamientosRechazos.aspx".ToUpper(), 1314)
PaginaDict.Add("/CRM/RepAcercamientosProcesosDetalle.aspx".ToUpper(), 758)
PaginaDict.Add("/CRM/RepAcercamientosProcesosDetalle.aspx".ToUpper(), 1313)
PaginaDict.Add("/CRM/CatMetas.aspx".ToUpper(), 684)
#End Region
#Region "CxC"

View File

@@ -201,7 +201,7 @@ Namespace ADSSession
Case OpcionSession.CerrarSession
Dim objlist = _dicSessionobj.Values.ToList()
For Each user As ADSSession.ADSSessionObj In objlist
If CveUsuario = user.CveUsuario AndAlso (CveEmpresa = -1 OrElse CveEmpresa = user.CveEmpresa) Then
If CveUsuario = user.CveUsuario Then 'AndAlso (CveEmpresa = -1 OrElse CveEmpresa = user.CveEmpresa) Then
Dim taspsig As String = user.ASPSIG '"94C6AC57E8599390A4B7B8AB41FEABEF466D9B31120BE06D78110E66265F1ACC5616297BF3B88EDCEE71EBCFE35484308F62C8017EAC29FB3F0FB45CEC09E8F03DFBB4A4DD890D45755B7A30185C6D01F20AEFA74BE3A25FD12D536B20DCB8D9940A3D95"
Dim tsessionID As String = user.SessionID
Dim url = System.Configuration.ConfigurationManager.AppSettings("urlcerrarSession").ToString()

View File

@@ -47,12 +47,47 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
context.Response.Write(GettingCURP(context.Request("Curp").ToString(), context.Request("year").ToString().ToEntero()))
Case "ValidaCURP"
context.Response.Write(ValidaCURP(context.Request("Curp").ToString()))
Case "sendMail"
context.Response.Write(sendMail(context))
End Select
Catch ex As Exception
ex.GuardaLog(ex.Message)
End Try
End Sub
Private Function sendMail(context As HttpContext) As String
Dim retorno As String = "true"
Dim nombre As String = ""
Dim correo As String = ""
Dim sitio As String = ""
Dim cuerpo As String = ""
Dim obj = context.Request("Nombre")
If Not IsNothing(obj) Then
nombre = obj.ToString()
End If
obj = context.Request("Correo")
If Not IsNothing(obj) Then
correo = obj.ToString()
End If
obj = context.Request("Sitio")
If Not IsNothing(obj) Then
sitio = obj.ToString()
End If
obj = context.Request("Cuerpo")
If Not IsNothing(obj) Then
cuerpo = obj.ToString()
End If
Dim Body As String = String.Format("Nombre : {0}<br/>Nombre : {0}<br/>Correo : {1}<br/>Sitio : {2}<br/><br/>{3}", nombre, correo, sitio, cuerpo)
Dim para As String = "rene.molina@adssistemas.mx,sig.buzon@gmail.com,julian@adssistemas.mx;paola@adssistemas.mx;"
para = "caudillo.90d@gmail.com"
Dim Mail As New ClsSisMail()
If Mail.SendMail(ClsPaginas.EmpresaNotificaciones, para, "NotificaciónProspecto", Body) Then
retorno = "true"
Else
retorno = "false"
End If
Return retorno
End Function
Private Sub GetUser(ByVal context As HttpContext)
Dim usuario As String = context.Request("usuario").ToString()

View File

@@ -3,6 +3,31 @@
<asp:Content ID="Content1" ContentPlaceHolderID="CP" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server">
<style>
.Filtros {
padding: 10px;
background-color: #C3C3C3;
}
.Filtros label, .Filtros .form-group.form-md-line-input .form-control ~ label {
color: #fff;
font-weight: 600;
}
.form-group.form-md-line-input .form-control {
background-color: #fff;
}
.GVRep tr td a {
display: block;
text-align: center;
}
#chartdiv {
width: 100%;
height: 500px;
}
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
Reporte Detalle de los Acercamientos Procesos
@@ -23,11 +48,106 @@
<asp:UpdatePanel ID="upDatosRepA" runat ="server" UpdateMode="Conditional" >
<ContentTemplate>
<div class="Filtros portlet solid grey-cascade portlet-filter">
<div class="row">
<div class="col-md-2" style="width: 85%">
<div class="row">
<div class="col-sm-3" style="width: 25%">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlTipoProceso" runat="server" DataTextField="TipoProceso" DataValueField="CveTipoProceso" CssClass="form-control input-sm select2me Widthall" OnSelectedIndexChanged="DdlTipoProceso_Change" AutoPostBack="true" Width="100%"></asp:DropDownList>
<asp:Label runat="server" Text="Proceso:" AssociatedControlID="DdlTipoProceso"></asp:Label>
</div>
</div>
<div class="col-sm-3" style="width: 25%">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlVendedor" runat="server" DataTextField="Vendedor" DataValueField="CveVendedor" CssClass="form-control input-sm select2me Widthall" Width="100%"></asp:DropDownList>
<asp:Label runat="server" Text="Vendedor:" AssociatedControlID="DdlVendedor"></asp:Label>
</div>
</div>
<div class="col-sm-3" style="width: 25%">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlMedioCaptacion" runat="server" DataTextField="MedioCaptacion" DataValueField="CveMedioCaptacion" CssClass="form-control input-sm select2me Widthall" Width="100%"></asp:DropDownList>
<asp:Label runat="server" Text="Medio de Captación:" AssociatedControlID="DdlMedioCaptacion"></asp:Label>
</div>
</div>
<div class="col-md-2" style="width: 25%">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlProbabilidad" runat="server" DataTextField="ProbabilidadAcercamiento" DataValueField="CveProbabilidadAcercamiento" CssClass="form-control input-sm select2me Widthall" Width="100%"></asp:DropDownList>
<asp:Label runat="server" Text="Probabilidad:" AssociatedControlID="DdlProbabilidad"></asp:Label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-2" style="padding-left: 15px; width: 25%;display:none">
<div class="form-group form-md-line-input input-iconright" style="width: 100%">
<asp:DropDownList ID="DdlGrupo1" runat="server" CssClass="form-control input-sm select2me Widthall" Width="100%">
<asp:ListItem Value="1" Text="Vendedor" Selected="true"></asp:ListItem>
<asp:ListItem Value="2" Text="Medio de Captación"></asp:ListItem>
<asp:ListItem Value="3" Text="Probabilidad de Acercamiento"></asp:ListItem>
<asp:ListItem Value="4" Text="Fecha"></asp:ListItem>
<asp:ListItem Value="5" Text="Sucursal"></asp:ListItem>
</asp:DropDownList>
<asp:Label runat="server" Text="Agrupado Por:" AssociatedControlID="DdlGrupo1"></asp:Label>
</div>
</div>
<div class="col-md-3" style="display: none; width: 25%">
<div class="form-group form-md-line-input input-iconright" style="width: 100%">
<asp:DropDownList ID="DdlGrupo2" runat="server" CssClass="form-control input-sm select2me Widthall" Style="width: 100%">
<asp:ListItem Value="-1" Text="Ninguno" Selected="True"></asp:ListItem>
<asp:ListItem Value="1" Text="Vendedor"></asp:ListItem>
<asp:ListItem Value="2" Text="Medio Captacion"></asp:ListItem>
<asp:ListItem Value="3" Text="Probabilidad de Acercamiento"></asp:ListItem>
<asp:ListItem Value="4" Text="Fecha"></asp:ListItem>
<asp:ListItem Value="5" Text="Sucursal"></asp:ListItem>
</asp:DropDownList>
<asp:Label runat="server" Text="Agrupado Por(2):" AssociatedControlID="DdlGrupo2"></asp:Label>
</div>
</div>
<div class="col-md-2" style="width: 25%;padding-right: 15px;padding-left: 15px;">
<div class="form-group form-md-line-input input-iconright">
<asp:Label runat="server" Text="Fecha Inicio:" AssociatedControlID="TxtFechaInicio"></asp:Label>
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px; margin-bottom: -10px; padding-bottom: 10px;">
<asp:TextBox ID="TxtFechaInicio" runat="server" CssClass="form-control" CausesValidation="true" Width="98%" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="imgFechaInicio" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEEFechaSolicitudI" runat="server" TargetControlID="TxtFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEFechaSolicitudI" TargetControlID="TxtFechaInicio" PopupButtonID="imgFechaInicio" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
</div>
</div>
<div class="col-md-2" style="width: 25%">
<div class="">
<asp:Label runat="server" Text="Fecha Fin:" AssociatedControlID="TxtFechaFin"></asp:Label>
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px; margin-bottom: -10px; padding-bottom: 10px;">
<asp:TextBox ID="TxtFechaFin" runat="server" CssClass="form-control" CausesValidation="true" Width="98%" MaxLength="10"></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="MEEFechaSolicitudF" runat="server" TargetControlID="TxtFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEFechaSolicitudF" TargetControlID="TxtFechaFin" PopupButtonID="imgFechaFin" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
</div>
</div>
</div>
</div>
<div class="col-md-2" style="width: 138px">
<div class="col-sm-1 text-right" style="width: 138px">
<br />
<asp:LinkButton ID="LnkConsultar" OnClick="LnkConsultar_Click" runat="server" CssClass="btn btn-default">Consultar</asp:LinkButton>
</div>
</div>
</div>
</div>
<asp:GridView ID="GVRepAcercamientosDetalle" runat="server" GridLines="None" CssClass ="table table-hover table-striped ScrollAD Widthall" AutoGenerateColumns="False" DataKeyNames="CveAcercamiento">
<Columns>
<asp:TemplateField HeaderText="Empresa">
<asp:TemplateField HeaderText="Prospecto">
<ItemTemplate>
<asp:Label ID="lblempresa" runat="server" Text='<%# Eval("Empresa")%>'> </asp:Label>
<asp:HyperLink href='<%# Eval("Empresa","/{0}")%>' runat="server" Text='<%# Eval("Empresa")%>'>HyperLink</asp:HyperLink>
<%--<asp:Label ID="lblempresa" runat="server" Text='<%# Eval("Empresa")%>'> </asp:Label>--%>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Vendedor">
@@ -35,12 +155,17 @@
<asp:Label ID="lblvendedor" runat="server" Text='<%# Eval("Vendedor")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Nombre Acercamiento">
<ItemTemplate>
<asp:Label ID="lblnombreAcercamiento" runat="server" Text='<%# Eval("NombreAcercamiento")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Medio Captacion">
<ItemTemplate>
<asp:Label ID="lblmedioCaptacion" runat="server" Text='<%# Eval("MedioCaptacion")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Etapa Proceso">
<asp:TemplateField HeaderText="Etapa del Proceso">
<ItemTemplate>
<asp:Label ID="lbletapaProceso" runat="server" Text='<%# Eval("EtapaProceso")%>'> </asp:Label>
</ItemTemplate>
@@ -50,17 +175,12 @@
<asp:Label ID="lblprobabilidadAcercamiento" runat="server" Text='<%# Eval("ProbabilidadAcercamiento")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Nombre Acercamiento">
<ItemTemplate>
<asp:Label ID="lblnombreAcercamiento" runat="server" Text='<%# Eval("NombreAcercamiento")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Nombre">
<asp:TemplateField HeaderText="Nombre del Contacto">
<ItemTemplate>
<asp:Label ID="lblnombre" runat="server" Text='<%# Eval("Nombre")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Telefono Oficina">
<asp:TemplateField HeaderText="Telefono">
<ItemTemplate>
<asp:Label ID="lbltelefonoOficina" runat="server" Text='<%# Eval("TelefonoOficina")%>'> </asp:Label>
</ItemTemplate>

View File

@@ -7,9 +7,14 @@ using System.Web.UI.WebControls;
using Extensiones;
using System.Data;
public partial class CRM_RepAcercamientosProcesosDetalle : ClsPaginas
public partial class CRM_RepAcercamientosProcesosDetalle : ClsPaginas
{
#region Propiedades
private int RCveTipoProceso
{
get { return (ViewState["RCveTipoProceso"] == null) ? 0 : Convert.ToInt32(ViewState["RCveTipoProceso"]); }
set { ViewState["RCveTipoProceso"] = value; }
}
private int RcveVendedor
{
get { return (ViewState["RcveVendedor"] == null) ? 0 : Convert.ToInt32(ViewState["RcveVendedor"]); }
@@ -46,12 +51,37 @@ public partial class CRM_RepAcercamientosProcesosDetalle : ClsPaginas
set { ViewState["RsFechaFin"] = value; }
}
private DataTable DtMedioCaptacion
{
get
{
return (DataTable)ViewState["DtMedioCaptacion"];
}
set
{
ViewState["DtMedioCaptacion"] = value;
}
}
private DataTable DtProbabilidadAcercamiento
{
get
{
return (DataTable)ViewState["DtProbabilidadAcercamiento"];
}
set
{
ViewState["DtProbabilidadAcercamiento"] = value;
}
}
#endregion
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
int CveTipoProceso = Request["CveTipoProceso"] == null ? -1 : Request["CveTipoProceso"].ToString().ToEntero();
CargaDdl();
RCveTipoProceso = Request["CveTipoProceso"] == null ? -1 : Request["CveTipoProceso"].ToString().ToEntero();
RcveVendedor = Request["cveVendedor"] == null ? -1 : Request["cveVendedor"].ToString().ToEntero();
RcveMedioCaptacion = Request["cveMedioCaptacion"] == null ? -1 : Request["cveMedioCaptacion"].ToString().ToEntero();
RcveProbabilidadAcercamiento = Request["cveProbabilidadAcercamiento"] == null ? -1 : Request["cveProbabilidadAcercamiento"].ToString().ToEntero();
@@ -59,35 +89,140 @@ public partial class CRM_RepAcercamientosProcesosDetalle : ClsPaginas
RsFecha = Request["Fecha"] == null ? "" : Request["Fecha"].ToString();
RsFechaIni = Request["FechaInicio"] == null ? "" : Request["FechaInicio"].ToString();
RsFechaFin = Request["FechaFin"] == null ? "" : Request["FechaFin"].ToString();
try { RsFechaIni = RsFechaIni.ToDateTime().ToString("yyyy/MM/dd"); }
try { RsFechaIni = RsFechaIni.ToDateTime().ToString("yyyy/MM/dd"); TxtFechaInicio.Text = RsFechaIni.ToDateTime().ToString("dd/MM/yyyy"); }
catch (Exception) { RsFechaIni = ""; }
try { RsFechaFin = RsFechaFin.ToDateTime().ToString("yyyy/MM/dd"); }
try { RsFechaFin = RsFechaFin.ToDateTime().ToString("yyyy/MM/dd"); TxtFechaFin.Text = RsFechaFin.ToDateTime().ToString("dd/MM/yyyy"); }
catch (Exception) { RsFechaFin = ""; }
switch (CveTipoProceso)
switch (RCveTipoProceso)
{
case 1:
RcveVendedor = Request["CveGrupo1"] == null ? -1 : Request["CveGrupo1"].ToString().ToEntero();
break;
case 2:
RcveMedioCaptacion = Request["CveGrupo1"] == null ? -1 : Request["CveGrupo1"].ToString().ToEntero();
RcveMedioCaptacion = Request["CveGrupo1"] == null ? -1 : Request["CveGrupo1"].ToString().ToEntero();
break;
case 3:
RcveProbabilidadAcercamiento = Request["CveGrupo1"] == null ? -1 : Request["CveGrupo1"].ToString().ToEntero();
RcveProbabilidadAcercamiento = Request["CveGrupo1"] == null ? -1 : Request["CveGrupo1"].ToString().ToEntero();
break;
case 4:
RsFecha = Request["CveGrupo1"] == null ? "" : Request["CveGrupo1"].ToString();
RsFecha = Request["CveGrupo1"] == null ? "" : Request["CveGrupo1"].ToString();
break;
}
DdlTipoProceso.SelectedValueExist(RCveTipoProceso);
//DdlGrupo1.SelectedValueExist(idgrupo1);
//DdlGrupo2.SelectedValueExist(idgrupo2);
DdlVendedor.SelectedValueExist(RcveVendedor);
DdlMedioCaptacion.SelectedValueExist(RcveMedioCaptacion);
DdlProbabilidad.SelectedValueExist(RcveProbabilidadAcercamiento);
cargarDatos();
}
}
protected void CargaDdl()
{
ClsCRM ObjCRM = new ClsCRM();
DdlTipoProceso.DataSource = null;
DdlVendedor.DataSource = null;
DdlMedioCaptacion.DataSource = null;
DdlProbabilidad.DataSource = null;
if (ObjCRM.GetTipoProceso(UsuarioActual.CveEmpresa, 1))
{
DdlTipoProceso.DataSource = ObjCRM.DtResultados;
}
DdlVendedor.DataSource = get_GlobalDTVendedores(UsuarioActual.CveEmpresa);
if (ObjCRM.GetMedioCaptacion(UsuarioActual.CveEmpresa))
{
DdlMedioCaptacion.Items.Clear();
DdlMedioCaptacion.DataSource = ObjCRM.DtResultados;
DtMedioCaptacion = ObjCRM.DtResultados;
}
if (ObjCRM.GetProbabilidadAcercamiento(UsuarioActual.CveEmpresa, -1))
{
DdlProbabilidad.DataSource = ObjCRM.DtResultados;
DtProbabilidadAcercamiento = ObjCRM.DtResultados;
}
ObjCRM.Dispose();
DdlTipoProceso.DataBind();
DdlVendedor.DataBind();
DdlMedioCaptacion.DataBind();
DdlProbabilidad.DataBind();
DdlVendedor.Items.Insert(0, new ListItem("Seleccione ", "-1"));
DdlMedioCaptacion.Items.Insert(0, new ListItem("Seleccione ", "-1"));
DdlProbabilidad.Items.Insert(0, new ListItem("Seleccione ", "-1"));
DdlTipoProceso.Items.Insert(0, new ListItem("Seleccione", "-1"));
DdlVendedor.SelectedValue = "-1";
DdlMedioCaptacion.SelectedValue = "-1";
DdlProbabilidad.SelectedValue = "-1";
DdlTipoProceso.SelectedIndex = 0;
int n;
string CveProbabilidadAcercamiento = Request["CveProbabilidadAcercamiento"];
bool isNumeric = int.TryParse(CveProbabilidadAcercamiento, out n);
int c;
string CveTipoProceso = Request["CveTipoProceso"];
bool isNumericC = int.TryParse(CveTipoProceso, out c);
if (isNumeric && isNumericC)
{
DdlProbabilidad.SelectedValue = CveProbabilidadAcercamiento;
DdlTipoProceso.SelectedValue = CveTipoProceso;
}
upDatosRepA.Update();
}
protected void DdlTipoProceso_Change(object sender, EventArgs e)
{
DdlMedioCaptacion.Items.Clear();
DdlMedioCaptacion.DataSource = DtMedioCaptacion.FiltraParametros(String.Format("CveTipoProceso = {0}", DdlTipoProceso.SelectedValue.ToEntero()));
DdlMedioCaptacion.DataBind();
DdlMedioCaptacion.Items.Insert(0, new ListItem("Seleccione", "-1"));
DdlProbabilidad.Items.Clear();
DdlProbabilidad.DataSource = DtProbabilidadAcercamiento.FiltraParametros(String.Format("CveTipoProceso = {0}", DdlTipoProceso.SelectedValue.ToEntero()));
DdlProbabilidad.DataBind();
DdlProbabilidad.Items.Insert(0, new ListItem("Seleccione", "-1"));
upDatosRepA.Update();
}
protected void cargarDatos()
{
ClsCRM ObjRepA = new ClsCRM();
ObjRepA.RepAcercamientosDetalle(UsuarioActual.CveEmpresa,RcveVendedor, RcveMedioCaptacion, RcveProbabilidadAcercamiento, RcveEtapaProceso, RsFecha, RsFechaIni, RsFechaFin);
ObjRepA.RepAcercamientosDetalle(UsuarioActual.CveEmpresa, RcveVendedor, RcveMedioCaptacion, RcveProbabilidadAcercamiento, RcveEtapaProceso, RsFecha, RsFechaIni, RsFechaFin);
GVRepAcercamientosDetalle.DataSource = ObjRepA.DtResultados;
ObjRepA.Dispose();
GVRepAcercamientosDetalle.DataBind();
upDatosRepA.Update();
}
protected void LnkConsultar_Click(object sender, EventArgs e)
{
RCveTipoProceso = DdlTipoProceso.SelectedValue.ToEntero();
switch (RCveTipoProceso)
{
case 1:
RcveVendedor = Request["CveGrupo1"] == null ? -1 : Request["CveGrupo1"].ToString().ToEntero();
break;
case 2:
RcveMedioCaptacion = Request["CveGrupo1"] == null ? -1 : Request["CveGrupo1"].ToString().ToEntero();
break;
case 3:
RcveProbabilidadAcercamiento = Request["CveGrupo1"] == null ? -1 : Request["CveGrupo1"].ToString().ToEntero();
break;
case 4:
RsFecha = Request["CveGrupo1"] == null ? "" : Request["CveGrupo1"].ToString();
break;
}
RsFechaIni = TxtFechaInicio.Text.Length > 0 ? TxtFechaInicio.Text.ToDateTime().ToString("yyyy/MM/dd") : "";
RsFechaFin = TxtFechaFin.Text.Length > 0 ? TxtFechaFin.Text.ToDateTime().ToString("yyyy/MM/dd") : "";
RcveVendedor = DdlVendedor.SelectedValue.ToEntero();
RcveMedioCaptacion = DdlMedioCaptacion.SelectedValue.ToEntero();
RcveProbabilidadAcercamiento = DdlProbabilidad.SelectedValue.ToEntero();
cargarDatos();
}
}

View File

@@ -5,8 +5,7 @@
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style>
.Filtros {
padding: 10px;
background-color: #C3C3C3;
padding: 10px;background-color: #95A5A6;
}
.Filtros label, .Filtros .form-group.form-md-line-input .form-control ~ label {

View File

@@ -15,10 +15,10 @@
<Width>6.26873cm</Width>
</TablixColumn>
<TablixColumn>
<Width>1.69187cm</Width>
<Width>2.82959cm</Width>
</TablixColumn>
<TablixColumn>
<Width>2.8175cm</Width>
<Width>1.67979cm</Width>
</TablixColumn>
<TablixColumn>
<Width>1.11844cm</Width>
@@ -223,7 +223,7 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>Sección Almacén</Value>
<Value>Sección</Value>
<Style>
<FontFamily>MYRIAd Pro</FontFamily>
<FontSize>8pt</FontSize>
@@ -700,7 +700,7 @@
<Top>0.17639cm</Top>
<Left>0.12931cm</Left>
<Height>0.96717cm</Height>
<Width>19.16932cm</Width>
<Width>19.16933cm</Width>
<Style>
<Border>
<Style>None</Style>
@@ -1190,7 +1190,7 @@
</Style>
</PageHeader>
<PageFooter>
<Height>3.15049cm</Height>
<Height>2.33028cm</Height>
<PrintOnFirstPage>true</PrintOnFirstPage>
<PrintOnLastPage>true</PrintOnLastPage>
<ReportItems>

View File

@@ -236,6 +236,7 @@ Partial Class LogIn
End If
Dim cookie = FormsAuthentication.GetAuthCookie(Encripta(Usuario.CveUsuario), False)
'ADSSession.ADSSessionConfig.SessionManager(ADSSession.OpcionSession.SetAspSig, ASPSIG:=Request.Cookies.Get(".ASPXSIG").Value)
Response.Cookies.Add(cookie)
'RegistraScript(String.Format("iniciaSesion('{0}')", ReturnUrl.Replace("'", "\'")))
Response.Redirect(ReturnUrl, True)

View File

@@ -24,14 +24,6 @@ Partial Class RH_ActualizacionMasiva
#Region "Propiedades"
Private Property DTEmpleados As DataTable
Get
Return DirectCast(ViewState("DTEmpleados"), DataTable)
End Get
Set(value As DataTable)
ViewState("DTEmpleados") = value
End Set
End Property
Private ReadOnly Property DTUsuarios As DataTable
Get
Return DirectCast(ViewState("DTUsuarios"), DataTable)
@@ -270,7 +262,7 @@ Partial Class RH_ActualizacionMasiva
column += 1
libro.Cell(Fila, column).Value = "SD IMSS"
column += 1
DTEmpleados = New DataTable()
Dim DTEmpleados As New DataTable()
libro.Row(1).CellsUsed().Style.Font.FontColor = ClosedXML.Excel.XLColor.White
libro.Row(1).CellsUsed().Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189))
@@ -283,9 +275,9 @@ Partial Class RH_ActualizacionMasiva
column = 1
Fila = Fila + 1
libro.Cell(Fila, column).Value = dro("Codigo")
libro.Cell(Fila, column).Value = String.Format("'{0}", dro("Codigo"))
column += 1
libro.Cell(Fila, column).Value = dro("Nombre")
libro.Cell(Fila, column).Value = String.Format("'{0}", dro("Nombre"))
column += 1
libro.Column(column).Width = 35
libro.Cell(Fila, column).Value = dro("SalarioDiario")
@@ -322,7 +314,15 @@ Partial Class RH_ActualizacionMasiva
Dim continuar As Boolean = Filesgral.Count > 0
Dim stringError As String = ""
Dim fileItem As Archivo = If(continuar, Filesgral(0), Nothing)
Dim DTEmpleados As New DataTable()
Using ObjPersonal As New ClsRH
If ObjPersonal.GetPersonalMasivo(-1, -1, -1, -1, UsuarioActual.CveEmpresa) Then
DTEmpleados = ObjPersonal.DtResultados
Else
continuar = False
stringError = "Ocurrio un Error al procesar el excel "
End If
End Using
If continuar Then
Dim FileExtension As String = fileItem.Extencion.ToUpper()
@@ -348,7 +348,7 @@ Partial Class RH_ActualizacionMasiva
If continuar Then
Dim OcurrioError As Boolean = False
Dim contador As Integer = 0
Using ObjPersonal As ClsRH = New ClsRH()
For Each Row As DataRow In DTEXcel.Rows
If Row("Codigo").ToString() <> "" Then
@@ -357,10 +357,9 @@ Partial Class RH_ActualizacionMasiva
Dim CvePersonal As Integer = drow("CvePersonal").ToString().ToEntero()
If ObjPersonal.UpdateSalarios(CvePersonal, DateTime.Now.ToString("yyyy/MM/dd"), UsuarioActual.CveEmpresa, Row("SDD").ToString().ToDecimal(), Row("SDI").ToString().ToDecimal(), Row("SD IMSS").ToString().ToDecimal(), Row("SDD").ToString().ToDecimal()) Then
contador = contador + 1
Else
OcurrioError = True
ObjPersonal.RollBack()
Exit For
End If
End If
@@ -369,12 +368,16 @@ Partial Class RH_ActualizacionMasiva
Next
If Not OcurrioError Then
'ObjPersonal.Commit()
Alert("La información se guardó correctamente.", TipoMensaje.MsgInformacion)
ObjPersonal.Commit()
Alert(String.Format("La información se guardó correctamente.<br/> se registraron {0} empleados", contador), TipoMensaje.MsgInformacion)
Else
ObjPersonal.RollBack()
Alert("Ocurrió un error al guardar la información.", TipoMensaje.MsgError)
End If
End Using
Else
Alert(stringError, TipoMensaje.MsgError)
End If
End Sub
End Class

View File

@@ -51,6 +51,7 @@
} else {
let contenedor = document.getElementById('chart_div');
contenedor.innerHTML = '';
console.log('vacio')
}
},
failure: function (r) {

View File

@@ -52,9 +52,9 @@ Partial Class RH_Organigrama
If Not IsPostBack Then
txtNivel.Text = ""
DdlSupervisorOrganigrama.SelectedIndex = 0
Dim viewFlag As Integer = CveCabecera
CargaSuperioresOrganigrama()
End If
Dim viewFlag As Integer = CveCabecera
CargaSuperioresOrganigrama()
End Sub

View File

@@ -4772,6 +4772,55 @@ Partial Class Sistemas_UsuarioDetalle
End Sub
Protected Sub BtnCerrarSession_Click(sender As Object, e As EventArgs)
ADSSession.ADSSessionConfig.SessionManager(ADSSession.OpcionSession.CerrarSession, CveUsuario:=CveUsuario)
End Sub
'ADSSession.ADSSessionConfig.SessionManager(ADSSession.OpcionSession.CerrarSession, CveUsuario:=CveUsuario)
Dim objlist As List(Of ADSSession.ADSSessionObj) = DirectCast(ADSSession.ADSSessionConfig.SessionManager(ADSSession.OpcionSession.getListasession, CveUsuario:=CveUsuario), List(Of ADSSession.ADSSessionObj))
For Each user As ADSSession.ADSSessionObj In objlist
If CveUsuario = user.CveUsuario Then 'AndAlso (CveEmpresa = -1 OrElse CveEmpresa = user.CveEmpresa) Then
Dim taspsig As String = user.ASPSIG '"94C6AC57E8599390A4B7B8AB41FEABEF466D9B31120BE06D78110E66265F1ACC5616297BF3B88EDCEE71EBCFE35484308F62C8017EAC29FB3F0FB45CEC09E8F03DFBB4A4DD890D45755B7A30185C6D01F20AEFA74BE3A25FD12D536B20DCB8D9940A3D95"
Dim tsessionID As String = user.SessionID
Dim url = System.Configuration.ConfigurationManager.AppSettings("urlcerrarSession").ToString()
Dim cookie As String = String.Format("ASP.NET_SessionId={0};.ASPXSIG={1}", tsessionID, taspsig)
sendURL(url, cookie)
End If
Next
Alert("Sessión Cerrada")
End Sub
Private Shared Function sendURL(ByVal URL As String, ByVal Optional Cookie As String = "", ByVal Optional maxTimeMilliseconds As Integer = 120000) As String
Dim resultado As String = ""
Try
Dim request As Net.HttpWebRequest = CType(Net.HttpWebRequest.Create(URL), Net.HttpWebRequest)
request.Timeout = maxTimeMilliseconds
request.Method = "POST"
request.ContentType = "text/xml; charset=utf-8"
If Not String.IsNullOrEmpty(Cookie) Then
request.Headers.Add("Cookie", Cookie)
End If
Using stream As IO.Stream = request.GetRequestStream()
Using stmw As IO.StreamWriter = New IO.StreamWriter(stream)
stmw.Write("")
End Using
End Using
Using response As Net.WebResponse = CType(request.GetResponse(), Net.WebResponse)
Using sr As IO.StreamReader = New IO.StreamReader(response.GetResponseStream())
resultado = sr.ReadToEnd()
sr.Close()
End Using
End Using
request = Nothing
Catch ex As Exception
'Extenciones.ApplicationParameter.GuardaLogEx(ex, $"SOAPAction : {SOAPAction} XML : {xml}")
End Try
Return resultado
End Function
End Class

View File

@@ -1300,14 +1300,14 @@
</div>
</ContentTemplate>
</asp:UpdatePanel>
<div id="DivOCRelacionadas" class="col-md-3" runat="server" visible="false">
<asp:GridView runat="server" ID="GvOCRelacionadas" Caption="OC Relacionadas:" AutoGenerateColumns="False" DataKeyNames="CveOrdenCompra,Folio"
CssClass="table table-striped table-advance table-hover Widthall mysmallbtn" GridLines="None">
<Columns>
<asp:HyperLinkField DataTextField="Folio" DataNavigateUrlFields="CveOrdenCompra" DataNavigateUrlFormatString="/OC/OC.aspx?OC={0}" HeaderText="Orden Compra" />
</Columns>
</asp:GridView>
</div>
<div id="DivOCRelacionadas" class="col-md-3" runat="server" visible="false">
<asp:GridView runat="server" ID="GvOCRelacionadas" Caption="OC Relacionadas:" AutoGenerateColumns="False" DataKeyNames="CveOrdenCompra,Folio"
CssClass="table table-striped table-advance table-hover Widthall mysmallbtn" GridLines="None">
<Columns>
<asp:HyperLinkField DataTextField="Folio" DataNavigateUrlFields="CveOrdenCompra" DataNavigateUrlFormatString="/OC/OC.aspx?OC={0}" HeaderText="Orden Compra" />
</Columns>
</asp:GridView>
</div>
</div>
</div>
<div class="col-md-6 ">
@@ -2879,6 +2879,192 @@
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel ID="TabAuxiliarConta" runat="server" HeaderText="Saldo" Visible="false">
<ContentTemplate>
<asp:Literal ID="LtlTipo1" runat="server"></asp:Literal>
<table border="0" class="contenido Widthall">
<tr>
<td align="left">
<%--<div class="note note-success">
<label class="title">Auxiliar contable de:</label>
<label>
<asp:Literal ID="LtlTipo2" runat="server"></asp:Literal>:&nbsp;</label><asp:Literal ID="LtlFolio" runat="server"></asp:Literal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<label>
<asp:Literal ID="LtlTipo3" runat="server"></asp:Literal>:&nbsp;</label><asp:Literal ID="LtlFechaVenta" runat="server"></asp:Literal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<label>
<asp:Literal runat="server" Text="Importe"></asp:Literal>:&nbsp;</label><asp:Literal ID="LtlImporte" runat="server"></asp:Literal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<label>
<asp:Literal runat="server" Text="Saldo"></asp:Literal>:&nbsp;</label><asp:Literal ID="LtlSaldo" runat="server"></asp:Literal>
</div>--%>
</td>
</tr>
<tr>
<td>
<div class="portlet light xspadding bordered">
<%--<div class="portlet-title">
<div class="caption font-green">
<i class="fa fa-th-list font-green"></i>
<span class="caption-subject bold uppercase">Movimientos</span>
</div>
<div class="actions">
<asp:UpdatePanel UpdateMode="Conditional" runat="server" ID="UpRepClientesPagosBancos">
<ContentTemplate>
<asp:LinkButton ID="LnkPagosClientesBancosPDF" runat="server" data-toggle="tooltip" Title="PDF"> <i class="fa fa-file-pdf-o" style="margin-right: 10px; font-size:15px; font-weight:bold; color:dimgray;"></i> </asp:LinkButton>
<asp:LinkButton ID="LnkPagosClientesBancosExcel" runat="server" data-toggle="tooltip" Title="Excel"><i class="fa fa-file-excel-o" style="margin-right: 10px; font-size:15px; font-weight:bold; color:dimgray;"></i> </asp:LinkButton>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LnkPagosClientesBancosPDF" />
<asp:PostBackTrigger ControlID="LnkPagosClientesBancosExcel" />
</Triggers>
</asp:UpdatePanel>
</div>
<div class="tools">
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
</div>
</div>--%>
<div class="portlet-body form-horizontal form-row-sepe formnombottom">
<table border="0">
<tr>
<td>
<asp:UpdatePanel UpdateMode="Conditional" runat="server" ID="UpDatos">
<ContentTemplate>
<asp:GridView ID="GVAuxiliar" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePrePoliza, Cargo, Abono, CveReferencia, IdPoliza,CvePrePolizaOriginal" EmptyDataText="No se encontraron Movimientos de Auxiliar" ToolTip="Listado de Auxiliar Contable" CssClass="table table-striped table-advance table-hover mysmallbtn Widthall" Style="text-align: center;" GridLines="None">
<Columns>
<asp:TemplateField>
<HeaderTemplate>Fecha</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlFechaMovto" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Concepto</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlConcepto" runat="server" Text='<%# Eval("ConceptoContable") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Cargo</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlCargo" runat="server" Text='<%# If(CDbl(Eval("Cargo")) = 0, "", Eval("Cargo", "{0:N2}")) %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Abono</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlAbono" runat="server" Text='<%# If(CDbl(Eval("Abono")) = 0, "", Eval("Abono", "{0:N2}")) %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Folio (Ref.)</HeaderTemplate>
<ItemTemplate>
&nbsp;<asp:HyperLink ID="HplReferencia" runat="server" Text='<%# Eval("Referencia", "{0}") %>' Target="_blank"></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false">
<HeaderTemplate>Contabilizado</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlContabilizado" runat="server" Text='<%# Eval("Contabilizado") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Num. Póliza</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlPoliza" runat="server"></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false">
<HeaderTemplate>Fecha Conta.</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlFechaConta" runat="server" Text='<%# Eval("FechaConta", "{0:d}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="8000px">
<HeaderTemplate>Referencia</HeaderTemplate>
<ItemTemplate>
<asp:HyperLink ID="LtlConceptoInfo" runat="server" Text='<%# Eval("Concepto") %>' NavigateUrl='<%# Eval("CvePrePoliza", "/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}") %>'></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Usuario</HeaderTemplate>
<ItemTemplate>
<asp:Label ToolTip='<%# Eval("Usuario") %>' runat="server">
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# If(Eval("Usuario").ToString.Length > 15, Eval("Usuario").ToString.Substring(0, 15), Eval("Usuario")) %>'></asp:Literal>
</asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle CssClass="Texto" />
<AlternatingRowStyle CssClass="TextoAlterno" />
<HeaderStyle CssClass="Titulos" />
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
</table>
</div>
</div>
<div>
</div>
</td>
</tr>
</table>
<div id="DivCancelar" class="modal fade">
<div class="modal-dialog" style="max-height: 500px; max-width: 500px;">
<asp:UpdatePanel ID="UpEliminarCotizacion" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
<h3 class="modal-title">Cancelar Movimiento</h3>
</div>
<div class="modal-body">
<div class="row" style="align-items: center; vertical-align: middle;">
<label class="col-md-4" style="max-width: 155px;">Concepto:</label>
<asp:TextBox ID="TxtConceptoCancelacion" runat="server" CssClass="form-control input-sm" Width="90%" CausesValidation="true" MaxLength="100" ValidationGroup="GrpCancelarPrepoliza"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVTxtConceptoCancelacion" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtConceptoCancelacion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpCancelarPrepoliza"></asp:RequiredFieldValidator>
</div>
<div class="row" style="align-items: center; vertical-align: middle;">
<label class="col-md-4" style="max-width: 155px;">Fecha de Cancelación:</label>
<div class="col-md-3">
<div class="input-group date date-picker" data-date-format="dd/mm/yyyy" style="width: 85px !important; padding: 0px;">
<asp:TextBox ID="TxtFechaCancelacion" runat="server" CssClass="form-control input-sm" Width="80px" CausesValidation="true" MaxLength="10" ValidationGroup="GrpCancelarPrepoliza"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="ImgCalendarioDel" class="btn default input-sm" Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MEEFechaCancelacion" runat="server" TargetControlID="TxtFechaCancelacion" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender ID="CalendarioCancelacion" runat="server" TargetControlID="TxtFechaCancelacion" PopupButtonID="ImgCalendarioDel" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:CompareValidator ID="CVFechaCancelacion" runat="server" ControlToValidate="TxtFechaCancelacion" Display="None" Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpCancelarPrepoliza" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Cancelación''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)."></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="VCOFecha2Cancelacion" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaCancelacion" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
<asp:RequiredFieldValidator ID="RequiredFieldValidator13" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtFechaCancelacion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="GrpCancelarPrepoliza"></asp:RequiredFieldValidator>
</div>
</div>
</div>
<div class="modal-footer">
<asp:Button ID="Button2" OnClick="BtnCancelarAux_Click" runat="server" CssClass="btn btn-success" Text="Cancelar Movimiento" ValidationGroup="GrpCancelarPrepoliza" />
<button type="button" class="btn default" data-dismiss="modal">Cancelar</button>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</ContentTemplate>
</ajax:TabPanel>
</ajax:TabContainer>
</ContentTemplate>
</asp:UpdatePanel>
@@ -3304,7 +3490,7 @@
<tr align="left" id="trCorreoNotif2" runat="server" visible="false">
<td>
<asp:TextBox ID="TxtCorreoNotificaciones" runat="server" Width="100%" CssClass="form-control"></asp:TextBox></td>
</tr>
</tr>
<tr align="left" id="trPaqueteriOpcionesLabel" runat="server" visible="false">
<td id="Td2" runat="server">Tipo de Entrega:&nbsp;</td>
</tr>
@@ -3689,7 +3875,7 @@
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div id="ModalOtrosConceptos" class="modal ADS fade" role="dialog">
<div class="modal-dialog">
@@ -5348,13 +5534,13 @@
<asp:UpdatePanel ID="UPPProyecto" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="form-group form-md-line-input input-iconright" id="divProyectoPyME" runat="server">
<asp:Label id="LblProyectoPyME" runat="server" for="<%= DdlProyectoPyME.ClientID.ToString()%>">Proyecto:</asp:Label>
<asp:Label ID="LblProyectoPyME" runat="server" for="<%= DdlProyectoPyME.ClientID.ToString()%>">Proyecto:</asp:Label>
<asp:DropDownList ID="DdlProyectoPyME" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Width="50%">
<asp:ListItem Selected="true" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:Label id="LblSubProyectoPyME" runat="server" for="<%= DdlSubProyectoPyME.ClientID.ToString()%>">SubProyecto:</asp:Label>
<asp:Label ID="LblSubProyectoPyME" runat="server" for="<%= DdlSubProyectoPyME.ClientID.ToString()%>">SubProyecto:</asp:Label>
<asp:DropDownList ID="DdlSubProyectoPyME" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="50%">
<asp:ListItem Selected="true" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
@@ -6397,24 +6583,24 @@
</div>
</div>
<div id="DivEstadoPaisCliente" runat="server" visible="false" class="row" style="padding-left: 16px;">
<div class="form-group form-md-line-input input-iconright col-xs-6">
<asp:DropDownList ID="DdlSATPais" runat="server" CssClass="form-control input-sm select2me" OnSelectedIndexChanged="DdlSATPais_SelectedIndexChanged" AutoPostBack="true">
<asp:ListItem Text="Seleccione" Value="-1"></asp:ListItem>
<asp:ListItem Value="MEX" Text="México" Selected="True"></asp:ListItem>
<asp:ListItem Value="USA" Text="USA"></asp:ListItem>
<asp:ListItem Value="CAN" Text="Canada"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVSATPais" runat="server" InitialValue="-1" ControlToValidate="DdlSATPais" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Pais''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= DdlSATPais.ClientID.ToString()%>">Pais:</label>
<div class="form-group form-md-line-input input-iconright col-xs-6">
<asp:DropDownList ID="DdlSATPais" runat="server" CssClass="form-control input-sm select2me" OnSelectedIndexChanged="DdlSATPais_SelectedIndexChanged" AutoPostBack="true">
<asp:ListItem Text="Seleccione" Value="-1"></asp:ListItem>
<asp:ListItem Value="MEX" Text="México" Selected="True"></asp:ListItem>
<asp:ListItem Value="USA" Text="USA"></asp:ListItem>
<asp:ListItem Value="CAN" Text="Canada"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVSATPais" runat="server" InitialValue="-1" ControlToValidate="DdlSATPais" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Pais''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= DdlSATPais.ClientID.ToString()%>">Pais:</label>
</div>
<div class="form-group form-md-line-input input-iconright col-xs-6">
<asp:DropDownList ID="DdlEstadoSAT" DataTextField="NombreEstado" DataValueField="CveSATEstado" runat="server" CssClass="form-control input-sm select2me">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RfvDdlEstadoSAT" runat="server" InitialValue="-1" ControlToValidate="DdlEstadoSAT" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Estado''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= DdlEstadoSAT.ClientID.ToString()%>">Estado:</label>
<asp:DropDownList ID="DdlEstadoSAT" DataTextField="NombreEstado" DataValueField="CveSATEstado" runat="server" CssClass="form-control input-sm select2me">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RfvDdlEstadoSAT" runat="server" InitialValue="-1" ControlToValidate="DdlEstadoSAT" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Estado''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= DdlEstadoSAT.ClientID.ToString()%>">Estado:</label>
</div>
</div>
<div id="DivCorreoCuentaCliente" runat="server" visible="false" class="row" style="padding-left: 16px;">
@@ -7141,121 +7327,121 @@
var ValorTxt = Obj.value;
var suma = 0;
var total = parseFloat($('#<%= HplSaldoAuxiliar.ClientID%>').text().replace(',', ''));
$('#<%= GVAnticipos.ClientID%> input[type="text"]').each(function (index) {
var currentsaldo = parseFloat($(this).val())
if (isNaN(currentsaldo)) { currentsaldo = 0 }
suma = currentsaldo + suma;
});
var txtvalue = (total - suma) + parseFloat(ValorTxt);
if (txtvalue < 0) { txtvalue = 0; }
if (txtvalue < Monto) { Monto = txtvalue.toFixed(2); }
$('#<%= GVAnticipos.ClientID%> input[type="text"]').each(function (index) {
var currentsaldo = parseFloat($(this).val())
if (isNaN(currentsaldo)) { currentsaldo = 0 }
suma = currentsaldo + suma;
});
var txtvalue = (total - suma) + parseFloat(ValorTxt);
if (txtvalue < 0) { txtvalue = 0; }
if (txtvalue < Monto) { Monto = txtvalue.toFixed(2); }
if (isNaN(ValorTxt))
ValorTxt = 0;
if (isNaN(Monto))
Monto = 0;
if (parseFloat(ValorTxt) < 0) {
ValorTxt = 0;
Obj.value = 0;
}
if (isNaN(ValorTxt))
ValorTxt = 0;
if (isNaN(Monto))
Monto = 0;
if (parseFloat(ValorTxt) < 0) {
ValorTxt = 0;
Obj.value = 0;
}
if (parseFloat(ValorTxt) > parseFloat(Monto)) {
alert("El monto de ''Anticipo a Amortizar'' no puede ser mayor al monto del ''Anticipo''");
Obj.value = Monto;
}
}
function ImprimirCotizacion() {
__doPostBack('ctl00$HB$LNKImprimirCotizacion', '');
}
function SetText2(ObjTo, Value) {
ObjTo.innerText = Value;
}
if (parseFloat(ValorTxt) > parseFloat(Monto)) {
alert("El monto de ''Anticipo a Amortizar'' no puede ser mayor al monto del ''Anticipo''");
Obj.value = Monto;
}
}
function ImprimirCotizacion() {
__doPostBack('ctl00$HB$LNKImprimirCotizacion', '');
}
function SetText2(ObjTo, Value) {
ObjTo.innerText = Value;
}
//VALIDA QUE LA CANTIDAD DE T (TXT) NO SEA MAYOR A C
function ValidarCantidad(t, c) {
t.value = (t.value > c ? c : t.value)
}
//VALIDA QUE LA CANTIDAD DE T (TXT) NO SEA MAYOR A C
function ValidarCantidad(t, c) {
t.value = (t.value > c ? c : t.value)
}
//VALIDA QUE LA CANTIDAD DE T (TXT) NO SEA MENOR A C
function ValidarCantidadMenor(t, c) {
t.value = (t.value > c ? t.value : c)
}
//VALIDA QUE LA CANTIDAD DE T (TXT) NO SEA MENOR A C
function ValidarCantidadMenor(t, c) {
t.value = (t.value > c ? t.value : c)
}
function Comma(Num) { //function to add commas to textboxes
Num += '';
Num = Num.replace(',', ''); Num = Num.replace(',', ''); Num = Num.replace(',', '');
Num = Num.replace(',', ''); Num = Num.replace(',', ''); Num = Num.replace(',', '');
x = Num.split('.');
x1 = x[0];
x2 = x.length > 1 ? '.' + x[1] : '';
var rgx = /(\d+)(\d{3})/;
while (rgx.test(x1))
x1 = x1.replace(rgx, '$1' + ',' + '$2');
return x1 + x2;
}
function Comma(Num) { //function to add commas to textboxes
Num += '';
Num = Num.replace(',', ''); Num = Num.replace(',', ''); Num = Num.replace(',', '');
Num = Num.replace(',', ''); Num = Num.replace(',', ''); Num = Num.replace(',', '');
x = Num.split('.');
x1 = x[0];
x2 = x.length > 1 ? '.' + x[1] : '';
var rgx = /(\d+)(\d{3})/;
while (rgx.test(x1))
x1 = x1.replace(rgx, '$1' + ',' + '$2');
return x1 + x2;
}
function AddCodigoBarrasSerie(e) {
if (e.keyCode == 13 || e.which == 13) {
$('#BtnCodigoBarrasSerie').click();
}
}
function AddCodigoBarrasSerie(e) {
if (e.keyCode == 13 || e.which == 13) {
$('#BtnCodigoBarrasSerie').click();
}
}
//SERIE PS
function SeriePS(e, b, txt, hdn) {
;
if (e.keyCode == 13 || e.which == 13) {
if (txt.value != "" && txt.value != hdn.value) {
$(b).click();
}
}
}
//SERIE PS
function SeriePS(e, b, txt, hdn) {
;
if (e.keyCode == 13 || e.which == 13) {
if (txt.value != "" && txt.value != hdn.value) {
$(b).click();
}
}
}
function SeriePSBlur(b, txt, hdn) {
;
if (txt.value != "" && txt.value != hdn.value) {
$(b).click();
}
}
function SeriePSBlur(b, txt, hdn) {
;
if (txt.value != "" && txt.value != hdn.value) {
$(b).click();
}
}
//SERIE-LOTE INV
var H1 = "";
var H2 = "";
var T = "";
//SERIE-LOTE INV
var H1 = "";
var H2 = "";
var T = "";
function EnterAFEdit(event, Txt, Hdn1, Hdn2) {
if (event.which == 13 || event.keyCode == 13) {
H1 = Hdn1;
H2 = Hdn2;
T = Txt;
$get("HdnCodAFEdit").value = Txt.value;
function EnterAFEdit(event, Txt, Hdn1, Hdn2) {
if (event.which == 13 || event.keyCode == 13) {
H1 = Hdn1;
H2 = Hdn2;
T = Txt;
$get("HdnCodAFEdit").value = Txt.value;
$('#BtnVinculaAFEdit').click();
}
}
$('#BtnVinculaAFEdit').click();
}
}
function AFBlurEdit(Txt, Hdn1, Hdn2) {
if (Txt.value.length > 0 && Txt.value != Hdn2.value) {
H1 = Hdn1;
H2 = Hdn2;
T = Txt;
$get("HdnCodAFEdit").value = Txt.value;
$('#BtnVinculaAFEdit').click();
}
}
function AFBlurEdit(Txt, Hdn1, Hdn2) {
if (Txt.value.length > 0 && Txt.value != Hdn2.value) {
H1 = Hdn1;
H2 = Hdn2;
T = Txt;
$get("HdnCodAFEdit").value = Txt.value;
$('#BtnVinculaAFEdit').click();
}
}
function EnterAFEditOK(Cve, Codigo) {
$get(H1.id).value = Cve;
$get(H2.id).value = Codigo;
$get(T.id).value = (Codigo == -1) ? "" : Codigo;
function EnterAFEditOK(Cve, Codigo) {
$get(H1.id).value = Cve;
$get(H2.id).value = Codigo;
$get(T.id).value = (Codigo == -1) ? "" : Codigo;
}
}
//Suma Totales
function FnSuma() {
$get('TxtSubTotal2').value = FormatoNumero(ToDouble($get('TxtSubTotal').value) - ToDouble($get('LblDescuentos').innerHTML) - ToDouble($get('LblAmortizacion').innerHTML), 2);
var totalVenta = ToDouble($get('TxtSubTotal2').value) + ToDouble($get('TxtIVA').value) + ToDouble($get('TxtIEPS') ? ToDouble($get('TxtIEPS').value) : 0) - ToDouble($get('TxtRetIVA').value) - ToDouble($get('TxtRetISR').value);
debugger;
$("#<%=GvImpuestosLocales2.ClientID%> input[type='text']").each(function () {
//Suma Totales
function FnSuma() {
$get('TxtSubTotal2').value = FormatoNumero(ToDouble($get('TxtSubTotal').value) - ToDouble($get('LblDescuentos').innerHTML) - ToDouble($get('LblAmortizacion').innerHTML), 2);
var totalVenta = ToDouble($get('TxtSubTotal2').value) + ToDouble($get('TxtIVA').value) + ToDouble($get('TxtIEPS') ? ToDouble($get('TxtIEPS').value) : 0) - ToDouble($get('TxtRetIVA').value) - ToDouble($get('TxtRetISR').value);
debugger;
$("#<%=GvImpuestosLocales2.ClientID%> input[type='text']").each(function () {
if ($(this).attr("class") == '5') // cuando es traslado de impuesto local, se suma
totalVenta += ToDouble($(this).val().toString());
@@ -7325,60 +7511,60 @@
var Total = ToDouble($get('TxtSubTotal').value);
let TipoAnticipo = $('#<%= DdlTipoAmortizacionAnticipo.ClientID %>').val();
let importeTxt = parseFloat(txt.value.replace(/,/g, ''));
let importeTxt = parseFloat(txt.value.replace(/,/g, ''));
if (isNaN(importeTxt)) {
importeTxt = 0;
} else {
if (importeTxt <= 0) {
importeTxt = 0;
chk.checked = false;
return;
}
}
if (isNaN(importeTxt)) {
importeTxt = 0;
} else {
if (importeTxt <= 0) {
importeTxt = 0;
chk.checked = false;
return;
}
}
saldo = (importeTxt > saldo) ? saldo : importeTxt;
saldo = (importeTxt > saldo) ? saldo : importeTxt;
var SaldoCompra = (Total - FnSumaValoresAnt() + ToDouble(txt.value)).toFixed(2); // le agrego lo del valor actual para validarlo //parseFloat(parseFloat($get('HdnVentaSaldo').value).toFixed(2));
if (SaldoCompra < 0) txt.value = SaldoCompra - txt.value;
//minimo entre saldocompra y el saldoanticipo
if (SaldoCompra < saldo) saldo = SaldoCompra;
var SaldoCompra = (Total - FnSumaValoresAnt() + ToDouble(txt.value)).toFixed(2); // le agrego lo del valor actual para validarlo //parseFloat(parseFloat($get('HdnVentaSaldo').value).toFixed(2));
if (SaldoCompra < 0) txt.value = SaldoCompra - txt.value;
//minimo entre saldocompra y el saldoanticipo
if (SaldoCompra < saldo) saldo = SaldoCompra;
if (ToDouble(txt.value) > 0) {
chk.checked = true;
} else {
chk.checked = false;
}
if (ToDouble(txt.value) > 0) {
chk.checked = true;
} else {
chk.checked = false;
}
if (ToDouble(txt.value) > saldo) {
txt.value = saldo;
alert("El Importe no debe de exceder a el saldo");
}
if (ToDouble(txt.value) > saldo) {
txt.value = saldo;
alert("El Importe no debe de exceder a el saldo");
}
$("#LblTotalAnticipos").text(FormatoNumero(FnSumaValoresAnt(), 2));
$("#LblTotalAnticipos").text(FormatoNumero(FnSumaValoresAnt(), 2));
$get('HdnVentaSaldo').value = Total - FnSumaValoresAnt();
}
$get('HdnVentaSaldo').value = Total - FnSumaValoresAnt();
}
function FnSumaValoresAnt() {
debugger;
var totalPoints = 0;
var t = '';
function FnSumaValoresAnt() {
debugger;
var totalPoints = 0;
var t = '';
$('input[name*=TxtAnticipo]').each(function () {
totalPoints += ToDouble($(this).val());
});
$('input[name*=TxtAnticipo]').each(function () {
totalPoints += ToDouble($(this).val());
});
return Math.round(totalPoints * 100) / 100;
}
return Math.round(totalPoints * 100) / 100;
}
function LimpiaModal() {
$('#<%= TxtDireccion.ClientID %>').val('');
function LimpiaModal() {
$('#<%= TxtDireccion.ClientID %>').val('');
$('#<%= TxtColonia.ClientID %>').val('');
$('#<%= TxtCiudad.ClientID %>').val('');
$('#<%= TxtEstado.ClientID %>').val('');

View File

@@ -1710,6 +1710,31 @@ Partial Class Ventas
#End Region
#Region "AuxiliarConta"
Property CvePrePolizaNegativa As Integer
Get
If ViewState("CvePrePolizaNegativa") Is Nothing Then
Return -1
Else
Return ViewState("CvePrePolizaNegativa").ToString.ToEntero
End If
End Get
Set(value As Integer)
ViewState("CvePrePolizaNegativa") = value
End Set
End Property
Private Property DTDatos As DataTable
Get
Return CType(ViewState("DTDatos"), DataTable)
End Get
Set(value As DataTable)
ViewState("DTDatos") = value
End Set
End Property
#End Region
#Region " A C U M U L A D O R E S"
Private Property ClienteEsDistribuidor As Boolean
@@ -3642,7 +3667,8 @@ Partial Class Ventas
HLPagar.NavigateUrl = $"/Bancos/PopIEVentas.aspx?CveVenta={CveVenta}&TB_iframe=true&height=500&width=675"
HlCuentaTerminal.Visible = True
End If
CargarSaldoAuxiliar(CveCliente)
TabAuxiliarConta.Visible = True
Dim TienePermiso As String = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, -1).FiltroPrimeroValor("CveSubProyecto", String.Format("CveSubProyecto = {0}", DbRowVenta("CveSubProyecto")))
If TienePermiso <> "" Then ' si tiene acceso en el subproyecto
'LkNotaCredito.Visible = UsuarioActual.TienePermisoProceso(175)
@@ -26096,4 +26122,123 @@ Partial Class Ventas
End If
ObjVentas.Dispose()
End Sub
#Region "Auxiliar"
Private Sub CargarSaldoAuxiliar(CveCliente As Integer)
CargaAuxiliarClienteCxC(CveCliente, CveVenta)
End Sub
Private Sub CargaAuxiliarClienteCxC(CveCliente As Integer, CveVenta As Integer)
Dim ObjMovtos As New ClsMovimientos()
If ObjMovtos.GetCxCClienteAuxiliar(CveCliente, CveVenta) Then
DtDatos = ObjMovtos.DtResultados
GVAuxiliar.DataSource = ObjMovtos.DtResultados
Else
GVAuxiliar.DataSource = Nothing
End If
ObjMovtos.Dispose()
GVAuxiliar.DataBind()
End Sub
Protected Sub BtnCancelarAux_Click(sender As Object, e As EventArgs)
AgregaPolizaNegativo(CvePrePolizaNegativa)
End Sub
Private Sub AgregaPolizaNegativo(CvePrePoliza As Integer)
Dim ObjContabilidad As New ClsContabilidad
Dim TieneError As Boolean = False
ObjContabilidad.IniciaTransacSQL()
Dim CvePrePolizaNueva As Integer = ObjContabilidad.AddPrePolizasNegativa(CvePrePoliza, UsuarioActual.CveUsuario, TxtConceptoCancelacion.Text, UsuarioActual.CveEmpresa, TxtFechaCancelacion.Text.ToDate)
If Not CvePrePolizaNueva > 0 Then
TieneError = True
End If
If Not TieneError Then
ObjContabilidad.Commit()
Dim Str As New StringBuilder
Str.Append("Se agrego la póliza de cancelación correctamente.<br/>")
RegistraScript(" $('#DivCancelar').modal('hide'); ")
If UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
If ObjContabilidad.ContabilizarPrePoliza(CvePrePolizaNueva, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
Str.AppendFormat("<a href='/Contabilidad/RegPoliza.aspx?IdPoliza={0}' target='_blank' class='Texto'>Ver Poliza</a>", ObjContabilidad.ContaIdPoliza)
End If
End If
Alert(Str.ToString)
Else
ObjContabilidad.RollBack()
End If
ObjContabilidad.Dispose()
CargarSaldoAuxiliar(CveCliente)
End Sub
Protected Sub GVAuxiliar_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVAuxiliar.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.RowIndex = 0 Then
e.Row.BackColor = Drawing.Color.LightGray
e.Row.FCLiteral("LtlFechaMovto").Text = "Totales:&nbsp;"
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Right
e.Row.Cells(0).ColumnSpan = 2
e.Row.Cells(1).Visible = False
e.Row.Cells(4).ColumnSpan = 3
e.Row.Cells(5).Visible = False
e.Row.Cells(6).Visible = False
e.Row.Cells(7).Visible = False
e.Row.Cells(8).Visible = False
ElseIf e.Row.RowIndex = 1 Then
e.Row.Cells(0).Width = Unit.Pixel(95)
e.Row.Cells(1).Width = Unit.Pixel(180)
e.Row.Cells(2).Width = Unit.Pixel(80)
e.Row.Cells(3).Width = Unit.Pixel(80)
e.Row.Cells(4).Width = Unit.Pixel(83)
e.Row.Cells(5).Width = Unit.Pixel(93)
e.Row.Cells(6).Width = Unit.Pixel(85)
e.Row.Cells(7).Width = Unit.Pixel(95)
e.Row.Cells(8).Width = Unit.Pixel(70)
End If
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Left
e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Right
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Right
e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Left
If e.Row.FCLiteral("LtlContabilizado").Text = "Si" Then
Dim Liga As String = String.Format("<a class=""Texto"" href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">", e.Row.DBCampo("IdPoliza"))
e.Row.FCLiteral("LtlPoliza").Text = String.Format("{0}{1}</a>", Liga, e.Row.DBCampo("Poliza"))
End If
If e.Row.DBCampo("CveConceptoContable").ToEntero.Contiene(2) AndAlso e.Row.DBCampo("CvePersonal").ToEntero > 0 Then
Dim Liga As String = String.Format("<a class=""Texto"" href=""/RH/Personal.aspx?CvePersonal={0}"">", e.Row.DBCampo("CvePersonal"))
e.Row.FCLiteral("LtlConcepto").Text = String.Format("{0}{1}</a>", Liga, e.Row.DBCampo("ConceptoContable"))
End If
If e.Row.DBCampo("TipoReferencia").ToEntero = 1 Then
e.Row.FCHyperLink("HplReferencia").NavigateUrl = $"/Bancos/IE.aspx?CveIE={e.Row.DBCampo("CveReferencia").ToEntero}"
ElseIf e.Row.DBCampo("TipoReferencia").ToEntero = 2 Then
e.Row.FCHyperLink("HplReferencia").NavigateUrl = $"/Ventas/Ventas.aspx?CveVenta={e.Row.DBCampo("CveReferencia").ToEntero}"
End If
If e.Row.DBCampo("CveConceptoContable").ToEntero.Contiene(275) AndAlso e.Row.DBCampo("CveVenta").ToEntero > 0 Then
e.Row.FCHyperLink("HplReferencia").NavigateUrl = $"/Ventas/Ventas.aspx?CveVenta={e.Row.DBCampo("CveVenta").ToEntero}"
End If
End If
End Sub
#End Region
End Class