This commit is contained in:
2021-01-30 10:53:06 -07:00
55 changed files with 11228 additions and 699 deletions

View File

@@ -390,7 +390,8 @@
<asp:BoundField DataField="Consecutivo" HeaderText="Consecutivo" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
<asp:BoundField DataField="FolioFactura" HeaderText="Factura" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />
<asp:BoundField DataField="Cliente" HeaderText="Cliente" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="30%" />
<asp:BoundField DataField="CodigoPS" HeaderText="Producto" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="20%" />
<asp:BoundField DataField="Codigo" HeaderText="Código" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
<asp:BoundField DataField="PS" HeaderText="Producto" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="20%" />
<asp:BoundField DataField="TipoUso" HeaderText="Tipo Uso" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
<asp:BoundField DataField="CodigoEnsamble" HeaderText="Código Ensamble" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
<asp:BoundField DataField="CodigoLinea" HeaderText="Código Linea" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />

View File

@@ -4350,11 +4350,13 @@ Public Class ClsBancos
Return Retorno
End Function
Public Function GetAcreedoresReporte(CveEmpresa As Integer) As Boolean
Public Function GetAcreedoresReporte(CveEmpresa As Integer, Optional FechaI As Date = MinFecha, Optional FechaF As Date = MaxFecha) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Banc_AcreedorReporte")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@FechaI", SqlDbType.Date).Value = FechaI
.Add("@FechaF", SqlDbType.Date).Value = FechaF
End With
Try
SqlAdapter.Fill(Data)

View File

@@ -1089,6 +1089,43 @@ Public Class ClsCRM
End Function
#End Region
#Region "Asignar Vendedor a Prospectos"
Public Function GetProspectosPorAsignarVendedor(CveEmpresa As Integer, Optional Empresa As String = "-1", Optional CveSubProyecto As Integer = -1, Optional CveGiro As Integer = -1) As Boolean
Dim retorno As Boolean = False
DataAdapter("PA_CRM_GetProspectosPorAsignarVendedor", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@Empresa", SqlDbType.NVarChar).Value = Empresa
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveGiro", SqlDbType.Int).Value = CveGiro
End With
Try
SqlAdapter.Fill(Data)
retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener los Prospectos sin Vendedor.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return retorno
End Function
Public Function AsignarVendedor(CveProspectos As String, CveVendedor As Integer) As Boolean
Dim retorno As Boolean = False
DataAdapter("PA_CRM_AsignarVendedores", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters
.Add("@ProspectosCve", SqlDbType.NVarChar).Value = CveProspectos
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
End With
Try
SqlAdapter.Fill(Data)
retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener los Prospectos sin Vendedor.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return retorno
End Function
#End Region
#Region "IDisposable Support"
' IDisposable
Protected Overridable Sub Dispose(disposing As Boolean)

View File

@@ -33,6 +33,7 @@ Public Class ClsEncuestas
SqlConexion.ConnectionString = ConfigurationManager.ConnectionStrings("Conexion").ConnectionString
Try
SqlConexion.Open()
ConexionAdd()
Catch ex As Exception
OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
End Try
@@ -42,7 +43,6 @@ Public Class ClsEncuestas
End If
SqlAdapter = New SqlDataAdapter("", SqlConexion)
ConexionAdd()
End Sub
Private Sub DataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
With SqlAdapter.SelectCommand

View File

@@ -540,6 +540,33 @@ Public Class ClsNominas
Return Retorno
End Function
Public Function PA_Nom_NominasAutorizarUP(cvePersonal As Int32, cvePeriodo As Int32, salarioDiario As Decimal, sBC As Decimal, sDI As Decimal, horasDobles As Int16, horasTriples As Int16, total As Double, subTotal As Double, diasPagados As Double, diasFaltados As Int32, diasVacaciones As Int32, diasIncapacidad As Int32) As Boolean
Dim retorno As Boolean = False
DataAdapter("PA_Nom_NominasAutorizarUP", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters
.Add("@CvePersonal", SqlDbType.Int).Value = cvePersonal
.Add("@CvePeriodo", SqlDbType.Int).Value = cvePeriodo
.Add("@SalarioDiario", SqlDbType.SmallMoney).Value = salarioDiario
.Add("@SBC", SqlDbType.SmallMoney).Value = sBC
.Add("@SDI", SqlDbType.SmallMoney).Value = sDI
.Add("@HorasDobles", SqlDbType.SmallInt).Value = horasDobles
.Add("@HorasTriples", SqlDbType.SmallInt).Value = horasTriples
.Add("@Total", SqlDbType.Float).Value = total
.Add("@SubTotal", SqlDbType.Float).Value = subTotal
.Add("@DiasPagados", SqlDbType.Float).Value = diasPagados
.Add("@DiasFaltados", SqlDbType.Int).Value = diasFaltados
.Add("@DiasVacaciones", SqlDbType.Int).Value = diasVacaciones
.Add("@DiasIncapacidad", SqlDbType.Int).Value = diasIncapacidad
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al autorizar la nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return retorno
End Function
Public Function AddNom_Nominas(FolioNom As Integer, CveNominaTipo As Integer, CvePersonal As Integer, CvePeriodo As Integer, SubTotal As Double, Descuento As Double, RetISR As Double, Total As Double,
CveMoneda As Integer, TipoCambio As Double, CveMetodoPago As Integer, Fecha As Date, MotivoDescuento As String, Observaciones As String,
Alfa1 As String, Alfa2 As String, Alfa3 As String, Num1 As Double, Num2 As Double, Num3 As Double,

View File

@@ -4453,6 +4453,7 @@ Public Class ClsPaginas
PaginaDict.Add("/CRM/RepAcercamientosRechazos.aspx".ToUpper(), 1314)
PaginaDict.Add("/CRM/RepAcercamientosProcesosDetalle.aspx".ToUpper(), 1313)
PaginaDict.Add("/CRM/CatMetas.aspx".ToUpper(), 684)
PaginaDict.Add("/CRM/AsignarVendedorEnProspectos.aspx".ToUpper(), 695)
#End Region
#Region "CxC"
@@ -5123,7 +5124,7 @@ Public Class ClsPaginas
PaginaDict.Add("/Contabilidad/OCDetalleAlmacen.aspx".ToUpper(), -1)
PaginaDict.Add("/testApi.aspx".ToUpper(), -1)
'PaginaDict.Add("/Compras/Efacturas.aspx".ToUpper(), 2007)
'PaginaDict.Add("/Compras/Compras.aspx".ToUpper(), 2008)
@@ -5287,11 +5288,11 @@ Public Class ClsPaginas
If sw IsNot Nothing AndAlso Not (Not User.Identity.IsAuthenticated OrElse UsuarioActual Is Nothing) Then
sw.Stop()
If Not Page.IsPostBack Then
Using ObjUsuario As New ClsSisUsuarios
ObjUsuario.AddBitacora(CveModulo, "", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Request.Url.PathAndQuery.ToString(), sw.ElapsedMilliseconds)
End Using
End If
'If Not Page.IsPostBack Then
' Using ObjUsuario As New ClsSisUsuarios
' ObjUsuario.AddBitacora(CveModulo, "", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Request.Url.PathAndQuery.ToString(), sw.ElapsedMilliseconds)
' End Using
'End If
End If
If Not IsNothing(ViewState("strToastMsglargonoreplace")) AndAlso ViewState("strToastMsglargonoreplace").ToString.Length > 0 Then
@@ -6833,13 +6834,6 @@ Public Class ClsPaginas
params.Add(New ReportParameter("Ref", TipoDocumentoRef))
params.Add(New ReportParameter("AplicaPagare", AplicaPagare))
'ALAN YEPIZ
If UsuarioActual.CveEmpresa.Contiene(123) Then
params.Add(New ReportParameter("DiaExpedicion", String.Format("{0}", Vta.Fecha.ToDate.Day)))
params.Add(New ReportParameter("MesExpedicion", String.Format("{0}", Vta.Fecha.ToDate.Month)))
params.Add(New ReportParameter("AñoExpedicion", String.Format("{0}", Vta.Fecha.ToDate.Year)))
End If
RutaFormato = String.Format("{0}Formatos\{1}.rdlc", UsuarioActual.Empresa.Ruta, NombreArchivo)
RutaFormatoDefault = String.Format("Empresas\Grales\Formatos\{0}.rdlc", NombreArchivo)
Case "Cot"
@@ -7474,11 +7468,11 @@ Public Class ClsPaginas
' nombreautorizo = "Lic. LUIS JORGE CONTRERAS LANDGRAVE"
'End If
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos\OC.rdlc", EmpresaActual.Ruta))
If Not Archivo.Exists OrElse EmpresaActual.CveEmpresa.Contiene(4, 145, 7, 11, 12, 13, 72, 80, 83, 122, 126) Then
If Not Archivo.Exists OrElse EmpresaActual.CveEmpresa.Contiene(4, 145, 7, 11, 12, 13, 72, 80, 83, 122, 126, 158) Then
params.Add(New ReportParameter("Descuento", DtDetalle.SUM("Descuento").ToString.FormatoNumero(2)))
End If
'DATOS PARA DESCUENTO
If EmpresaActual.CveEmpresa.Contiene(4, 145, 7, 11, 12, 13, 72, 80, 83, 119, 122, 126) Then 'EMPRESAS QUE YA TIENEN EL AJUSTE EN EL FORMATO
If EmpresaActual.CveEmpresa.Contiene(4, 145, 7, 11, 12, 13, 72, 80, 83, 119, 122, 126, 158) Then 'EMPRESAS QUE YA TIENEN EL AJUSTE EN EL FORMATO
params.Add(New ReportParameter("SubTotal", ObjOC.SubTotal.ToString))
params.Add(New ReportParameter("SubTotal2", DtDetalle.SUM("Total").ToString))
Else

View File

@@ -0,0 +1,9 @@
Imports Microsoft.VisualBasic
Namespace Models.Request
Public Class RequestLogin
Public Property UserName As String
Public Property Password As String
End Class
End Namespace

View File

@@ -0,0 +1,10 @@
Imports Microsoft.VisualBasic
Namespace Models.Response
Public Class ResponseGenericModel(Of T)
Public Property IsSuccess As Boolean
Public Property Msg As String
Public Property Result As T
End Class
End Namespace

View File

@@ -0,0 +1,93 @@
Imports Microsoft.VisualBasic
Imports Newtonsoft.Json
Namespace Models.Response
Public Class ResponseLogin
Public Property CveUsuario As Long
Public Property Usuario As String
Public Property Nombre As String
Public Property Correo As String
Public Property CveEmpresa As Long
Public Property Empresa As String
Public Property CvePlataforma As Long
Public Property Estatus As Boolean
Public Property CveRol As Integer
Public Property Rol As String
Public Property CveToken As Long
Public Property AccessToken As String
Public Property RefreshToken As String
Public Property UsuarioModulos As List(Of UsuarioModulo)
Public Property UsuarioEmpresas As List(Of UsuarioEmpresa)
Public Property EmpresaFuncionalidades As List(Of EmpresaFuncionalidad)
End Class
Public Class UsuarioModulo
Public Property CveModulo As Long
Public Property Modulo As String
Public Property CveUsuario As Long
Public Property Agrupacion As String
Public Property Descripcion As String
Public Property Liga As String
Public Property CveModuloAcceso As Long
Public Property CveProcesoAcceso As Long
Public Property Permitir As Long
Public Property Estilo As String
Public Property Padre As String
Public Property CvePadre As Long
Public Property Usuario As String
Public Property CveRol As Long
Public Property Rol As String
Public Property CvePlataforma As Long
Public Property Parametros As String
End Class
Public Class UsuarioEmpresa
Public Property Tipo_CentroCosto As Long
Public Property CveEmpresa As Long
Public Property Empresa As String
Public Property CveUsuario As Long
Public Property Usuario As String
Public Property Contraseña As String
Public Property CveCliente As Long
Public Property Cliente As String
Public Property CveProveedor As Long
Public Property Proveedor As String
Public Property FechaUltimoAcceso As DateTime
Public Property Nombre As String
Public Property CveRol As Long
Public Property Rol As String
Public Property Telefono As String
Public Property Correo As String
Public Property Estatus As Boolean
Public Property FechaIng As DateTime
Public Property EsSupervisorRH As Boolean
Public Property CveSupervisa As Long
Public Property CveAutoriza As Long
Public Property CvePersonal As Long
Public Property CveVendedor As Long
Public Property CvePlataforma As Long
Public Property ComprasProgramadas As Long
Public Property ProveedoresResponsables As Long
Public Property CveSubProyecto As Long
Public Property CveUsuarioIng As Long
Public Property CveEncuestaCRM As Long
<JsonIgnore>
Public Property EmpresaFuncionalidades As List(Of EmpresaFuncionalidad)
Public Function Funcionalidad(ByVal CveFuncionalidad As Long) As String
Return If(EmpresaFuncionalidades IsNot Nothing AndAlso EmpresaFuncionalidades.FirstOrDefault(Function(x) x.CveFuncionalidad = CveFuncionalidad) IsNot Nothing, EmpresaFuncionalidades.FirstOrDefault(Function(x) x.CveFuncionalidad = CveFuncionalidad).Valor, "")
End Function
End Class
Public Class EmpresaFuncionalidad
Public Property CveEmpresa As Long
Public Property CveFuncionalidad As Long
Public Property Valor As String
Public Property Descripción As String
Public Property Funcionalidad As String
End Class
End Namespace

View File

@@ -2981,8 +2981,10 @@ Public Class Timbrado
comprobante.Conceptos(i).ClaveProdServ = concep.ClaveProdServ
If ObjCFDITimbre.Comprobante.TipoComprobante <> "P" Then
comprobante.Conceptos(i).Descuento = concep.Descuento
comprobante.Conceptos(i).DescuentoSpecified = True
If concep.Descuento > 0 Then
comprobante.Conceptos(i).Descuento = concep.Descuento
comprobante.Conceptos(i).DescuentoSpecified = True
End If
End If
If concep.Noidentificacion <> "" Then comprobante.Conceptos(i).NoIdentificacion = concep.Noidentificacion
@@ -2996,33 +2998,39 @@ Public Class Timbrado
k = 0
'SI NO ES FACTURA EN 0 AGREGA LOS IMPUESTOS
If Not ObjCFDITimbre.Comprobante.TipoComprobante.Contiene("P", "N") AndAlso (Ventas.Total <> 0 OrElse (ObjCFDITimbre.TotalImpuestosRetenidos > 0 OrElse ObjCFDITimbre.TotalImpuestosTrasladados > 0)) Then
comprobante.Conceptos(i).Impuestos = New Profact.TimbraCFDI33.ComprobanteConceptoImpuestos()
comprobante.Conceptos(i).Impuestos.Traslados = New Profact.TimbraCFDI33.ComprobanteConceptoImpuestosTraslado(concep.Impuestos.FindAll(Function(p As CFDIConceptosImpuestos) p.TrasladooRetencion = "T").Count - 1) {}
If concep.Impuestos.FindAll(Function(p As CFDIConceptosImpuestos) p.TrasladooRetencion <> "T").Count > 0 Then
comprobante.Conceptos(i).Impuestos.Retenciones = New Profact.TimbraCFDI33.ComprobanteConceptoImpuestosRetencion(concep.Impuestos.FindAll(Function(p As CFDIConceptosImpuestos) p.TrasladooRetencion <> "T").Count - 1) {}
If concep.Impuestos.Count > 0 Then
comprobante.Conceptos(i).Impuestos = New Profact.TimbraCFDI33.ComprobanteConceptoImpuestos()
comprobante.Conceptos(i).Impuestos.Traslados = New Profact.TimbraCFDI33.ComprobanteConceptoImpuestosTraslado(concep.Impuestos.FindAll(Function(p As CFDIConceptosImpuestos) p.TrasladooRetencion = "T").Count - 1) {}
If concep.Impuestos.FindAll(Function(p As CFDIConceptosImpuestos) p.TrasladooRetencion <> "T").Count > 0 Then
comprobante.Conceptos(i).Impuestos.Retenciones = New Profact.TimbraCFDI33.ComprobanteConceptoImpuestosRetencion(concep.Impuestos.FindAll(Function(p As CFDIConceptosImpuestos) p.TrasladooRetencion <> "T").Count - 1) {}
End If
For Each imp As CFDIConceptosImpuestos In concep.Impuestos
If imp.TrasladooRetencion = "T" Then
comprobante.Conceptos(i).Impuestos.Traslados(j) = New Profact.TimbraCFDI33.ComprobanteConceptoImpuestosTraslado()
comprobante.Conceptos(i).Impuestos.Traslados(j).Base = imp.Base
comprobante.Conceptos(i).Impuestos.Traslados(j).Impuesto = imp.Impuesto
comprobante.Conceptos(i).Impuestos.Traslados(j).TipoFactor = imp.TipoFactor
comprobante.Conceptos(i).Impuestos.Traslados(j).Importe = imp.Importe
comprobante.Conceptos(i).Impuestos.Traslados(j).ImporteSpecified = True
comprobante.Conceptos(i).Impuestos.Traslados(j).TasaOCuota = imp.TasaOCuota.FormatoNumero(6)
comprobante.Conceptos(i).Impuestos.Traslados(j).TasaOCuotaSpecified = True
j += 1
Else
comprobante.Conceptos(i).Impuestos.Retenciones(k) = New Profact.TimbraCFDI33.ComprobanteConceptoImpuestosRetencion()
comprobante.Conceptos(i).Impuestos.Retenciones(k).Base = imp.Base
comprobante.Conceptos(i).Impuestos.Retenciones(k).Impuesto = imp.Impuesto
comprobante.Conceptos(i).Impuestos.Retenciones(k).TipoFactor = imp.TipoFactor
comprobante.Conceptos(i).Impuestos.Retenciones(k).Importe = imp.Importe
comprobante.Conceptos(i).Impuestos.Retenciones(k).TasaOCuota = imp.TasaOCuota.ToString.ToDecimal
k += 1
End If
Next
End If
For Each imp As CFDIConceptosImpuestos In concep.Impuestos
If imp.TrasladooRetencion = "T" Then
comprobante.Conceptos(i).Impuestos.Traslados(j) = New Profact.TimbraCFDI33.ComprobanteConceptoImpuestosTraslado()
comprobante.Conceptos(i).Impuestos.Traslados(j).Base = imp.Base
comprobante.Conceptos(i).Impuestos.Traslados(j).Impuesto = imp.Impuesto
comprobante.Conceptos(i).Impuestos.Traslados(j).TipoFactor = imp.TipoFactor
comprobante.Conceptos(i).Impuestos.Traslados(j).Importe = imp.Importe
comprobante.Conceptos(i).Impuestos.Traslados(j).ImporteSpecified = True
comprobante.Conceptos(i).Impuestos.Traslados(j).TasaOCuota = imp.TasaOCuota.FormatoNumero(6)
comprobante.Conceptos(i).Impuestos.Traslados(j).TasaOCuotaSpecified = True
j += 1
Else
comprobante.Conceptos(i).Impuestos.Retenciones(k) = New Profact.TimbraCFDI33.ComprobanteConceptoImpuestosRetencion()
comprobante.Conceptos(i).Impuestos.Retenciones(k).Base = imp.Base
comprobante.Conceptos(i).Impuestos.Retenciones(k).Impuesto = imp.Impuesto
comprobante.Conceptos(i).Impuestos.Retenciones(k).TipoFactor = imp.TipoFactor
comprobante.Conceptos(i).Impuestos.Retenciones(k).Importe = imp.Importe
comprobante.Conceptos(i).Impuestos.Retenciones(k).TasaOCuota = imp.TasaOCuota.ToString.ToDecimal
k += 1
End If
Next
End If
i += 1
Next

36
App_Code/TimbradoB.vb Normal file
View File

@@ -0,0 +1,36 @@
Imports Microsoft.VisualBasic
Public Class TimbradoB
'Public Function TimbrarFactura(UsuarioActual As Usuario, Ventas As Modelos.Factura, Optional CvePACEspecial As Integer = -1) As Boolean
' Dim Retorno As Boolean = False
' Dim tCvePAC As Integer = UsuarioActual.Empresa.CvePAC
' If CvePACEspecial <> -1 Then tCvePAC = CvePACEspecial
' Dim objs As ADSTimbrado.TimbradoEmpresa
' Dim result = ADSTimbrado.Timbrado.TimbrarFactura(Ventas, objs, ADSTimbrado.PacTimbrado.PADEv)
' Retorno = result.isOK
' If result.isOK Then
' Else
' End If
' Return Retorno
'End Function
End Class
'Public Class TimbradoEmpresa
' Inherits ADSTimbradoLibrary.TimbradoEmpresa
' Public Overrides Function UpdateEstatusFactura(FolioFiscal As String, ObjCFDITimbre As ADSTimbradoLibrary.CFDITimbre, facturaCFDI As ADSTimbradoLibrary.Factura, CvePAC As Integer) As String
' Throw New NotImplementedException()
' End Function
' Public Overrides Function Timbre() As String
' Throw New NotImplementedException()
' End Function
'End Class

View File

@@ -3450,9 +3450,16 @@ Partial Class Bancos_IE
Dim DTCuentas As DataTable = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeCompraDevDinC)
Dim CveCuentaIVAxAcreditarDevDinC = 0
Dim CveCuentaIVAAcreditableDevDinC = 0
Dim IdCtaIVAXAcreditarDevDinC = DTCuentas.Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero
Dim IdCtaIVAAcreditableDevDinC = DTCuentas.Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero
Dim IdCtaIVAXAcreditarDevDinC As Integer
Dim IdCtaIVAAcreditableDevDinC As Integer
If DTCuentas IsNot Nothing AndAlso DTCuentas.Rows.Count > 0 Then
IdCtaIVAXAcreditarDevDinC = DTCuentas.Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero
IdCtaIVAAcreditableDevDinC = DTCuentas.Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero
Else
MsgError = "Sin Registros de porcentaje impuesto"
End If
Dim IVADevMN As Decimal = 0
Dim IEPSDevMN As Decimal = 0
@@ -4508,7 +4515,8 @@ Partial Class Bancos_IE
End If
If UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" Then
If Not ObjConta.ContabilizarPrePoliza(CvePrePolizaCancelacion, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjAC) Then
If Not ObjConta.ContabilizarPrePoliza(CvePrePolizaCancelacion, UsuarioActual.CveUsuario, UsuarioActual.Empresa, pIDPoliza:=If(IDPoliza > 0, IDPoliza, -1), ObjConta:=ObjAC) Then
ErrorCancelar = True
MensajeError = "Error al contabilizar poliza"
End If

View File

@@ -385,6 +385,93 @@
<ajax:TabPanel ID="TabReporte" runat="server" HeaderText="Reporte">
<ContentTemplate>
<div id="PFiltroReporte" class="portlet solid grey-cascade portlet-filter" style="">
<div class="portlet-title portlet-filterT smalltitle" style="">
<div class="tools">
<asp:Button ID="BtnConsultarReporte" runat="server" Text="Consultar" class="btn btn-primary" OnClick="BtnConsultarReporte_Click" />
<a href="javascript:;" class="expand"></a>
</div>
<div class="titlefiltros caption">
<div class="row text-size-12">
<div class="col-md-1"><span>Fecha Inicio:</span></div>
<div class="col-md-1">
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 90px !important; padding: 0px;">
<%--width: 120px !important;--%>
<asp:TextBox ID="TxtFechaInicio" runat="server" CssClass="form-control text-size-12" CausesValidation="true" MaxLength="10" Width="80px"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="LnkTxtFechaInicio" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="METxtFechaInicio" runat="server" TargetControlID="TxtFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CETxtFechaInicio" TargetControlID="TxtFechaInicio" PopupButtonID="LnkTxtFechaInicio" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<%--<asp:RequiredFieldValidator ID="RequiredFieldValidator1" 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="Valida"></asp:RequiredFieldValidator>--%>
<asp:CompareValidator ID="CVTxtFechaInicio" runat="server" ControlToValidate="TxtFechaInicio" 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="GpoReporte"></asp:CompareValidator>
<%--<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>--%>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="server" HighlightCssClass="vco" TargetControlID="CVTxtFechaInicio" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="col-md-1" style="margin-left: 20px"><span>Fecha Fin:</span></div>
<div class="col-md-1">
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 90px !important; padding: 0px;">
<%--width: 120px !important;--%>
<asp:TextBox ID="TxtFechaFin" runat="server" CssClass="form-control text-size-12" CausesValidation="true" MaxLength="10" Width="80px"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="LnkTxtFechaFin" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="METxtFechaFin" runat="server" TargetControlID="TxtFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CETxtFechaFin" TargetControlID="TxtFechaFin" PopupButtonID="LnkTxtFechaFin" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<%--<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TxtFechaFin" 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="CVTxtFechaFin" runat="server" ControlToValidate="TxtFechaFin" 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="GpoReporte"></asp:CompareValidator>
<%--<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender5" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>--%>
<ajax:ValidatorCalloutExtender ID="VCECVTxtFechaFin" runat="server" HighlightCssClass="vco" TargetControlID="CVTxtFechaFin" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
</div>
</div>
<div class="portlet-body" style="display: none;">
</div>
</div>
<div class="row">
<div class="col-md-12">
<asp:UpdatePanel ID="UpReporte" runat="server" UpdateMode="Conditional">

View File

@@ -931,14 +931,29 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
#region"REPORTE"
protected void CargaReporte()
{
DateTime FInicio = MinFecha;
DateTime FFin = MaxFecha;
if(TxtFechaInicio.Text.Length == 10)
{
FInicio = TxtFechaInicio.Text.ToDate();
}
if(TxtFechaFin.Text.Length == 10)
{
FFin = TxtFechaFin.Text.ToDate();
}
ClsBancos bancos = new ClsBancos();
if (bancos.GetAcreedoresReporte(UsuarioActual.CveEmpresa))
if (bancos.GetAcreedoresReporte(UsuarioActual.CveEmpresa, FInicio, FFin))
{
GvReporte.DataSource = bancos.DtResultados;
GvReporte.DataBind();
}
bancos.Dispose();
UpReporte.Update();
}
protected void GvReporte_RowDataBound(object sender, GridViewRowEventArgs e)
{
@@ -970,4 +985,9 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
UpDatos.Update();
UpMovAcreedor.Update();
}
protected void BtnConsultarReporte_Click(object sender, EventArgs e)
{
CargaReporte();
}
}

View File

@@ -0,0 +1,102 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="AsignarVendedorEnProspectos.aspx.cs" Inherits="CRM_AsignarVendedorEnProspectos" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
Asignar Vendedor a Prospectos
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div id="DivFiltros" class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle">
<div class="tools">
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" OnClick="BtnConsultar_Click" class="btn btn-primary" ValidationGroup="Valida" />
</div>
<div class="titlefiltros caption">
<div class="row" style="margin-left: 10px;">
<label class="col-md-1 " style="width: 90px; margin-top: 5px;">Nombre:</label>
<div class="col-md-2">
<asp:TextBox ID="TxtNombre" runat="server" CssClass="form-control" CausesValidation="true" Width="98%" MaxLength="10"></asp:TextBox>
</div>
<label class="col-md-1 " style="width: 90px; margin-top: 5px;">SubProyecto:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlSubProyecto" runat="server" Width="100%" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me"></asp:DropDownList>
</div>
<label class="col-md-1 " style="width: 90px; margin-top: 5px;">Giro:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlGiroClasificacion" Width="100%" runat="server" DataValueField="CveClienteClasificacion" DataTextField="ClienteClasificacion" AppendDataBoundItems="true" CssClass="form-control input-sm select2me"></asp:DropDownList>
</div>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel runat="server" UpdateMode="conditional" ID="UPPrecioLista">
<ContentTemplate>
<div class="row">
<div class="col-md-6">
<div class="portlet light smmallpadding traspasorow bordered xspadding">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">Asignar vendedor</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
<div class="tools">
<a href="javascript:;" class="collapse"></a>
</div>
</div>
<div class="portlet-body rowpadding">
<div class="row">
<label class="col-md-1 " style="width: 90px; margin-top: 5px;">Vendedor:</label>
<div class="col-md-5">
<asp:DropDownList ID="DdlVendedor" Width="100%" runat="server" DataValueField="CveVendedor" DataTextField="Vendedor" AppendDataBoundItems="true" CssClass="form-control input-sm select2me"></asp:DropDownList>
</div>
</div>
<div class="text-right">
<asp:LinkButton ID="BtnAsignar" runat="server" OnClick="BtnAsignar_Click" AlternateText="Actualizar" CausesValidation="True" CssClass="btn btn-primary" Text="Asignar Seleccionadas" ValidationGroup="GrpGuardar" />
</div>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel runat="server" UpdateMode="conditional" ID="UpDatos">
<ContentTemplate>
<div class="row" style="margin-left: 0px; margin-top: 15px; margin-bottom: 5px; text-align: right; margin-right: 5px;" align="left">
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvProspectos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvProspectos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
<asp:GridView ID="GvProspectos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveEmpresaCRM,Empresa,CveSubProyecto,SubProyecto,CveGiro,Giro" EmptyDataText="No se encontraron registros"
ToolTip="Listado de Temas" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" data-freezerows="1" GridLines="None">
<Columns>
<asp:TemplateField HeaderText="Asignar" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:CheckBox runat="server" ID="ChkAsignar" Checked="false" />
</ItemTemplate>
</asp:TemplateField>
<asp:HyperLinkField DataNavigateUrlFields="CveEmpresaCRM" DataNavigateUrlFormatString="/CRM/EmpresaCRM.aspx?CveEmpresaCRM={0}" DataTextField="Empresa" HeaderText="Prospectos" SortExpression="Empresa" />
<asp:HyperLinkField DataNavigateUrlFields="CveEmpresaCRM" DataNavigateUrlFormatString="/CRM/EmpresaCRM.aspx?CveEmpresaCRM={0}" DataTextField="SubProyecto" HeaderText="SubProyecto" SortExpression="SubProyecto" />
<asp:HyperLinkField DataNavigateUrlFields="CveEmpresaCRM" DataNavigateUrlFormatString="/CRM/EmpresaCRM.aspx?CveEmpresaCRM={0}" DataTextField="Giro" HeaderText="Giro" SortExpression="ClienteClasificacion" />
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
</asp:Content>

View File

@@ -0,0 +1,94 @@
using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using Microsoft.Reporting.WebForms;
using Extensiones;
public partial class CRM_AsignarVendedorEnProspectos : ClsPaginas
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.CargaFiltros();
this.CargaDatos();
}
}
private void CargaDatos()
{
string Empresa = (TxtNombre.Text == "" ? "-1" : TxtNombre.Text);
ClsCRM ObjCRM = new ClsCRM();
if (ObjCRM.GetProspectosPorAsignarVendedor(UsuarioActual.CveEmpresa, Empresa, DdlSubProyecto.SelectedValue.ToEntero(),DdlGiroClasificacion.SelectedValue.ToEntero()))
{
GvProspectos.DataSource = ObjCRM.DtResultados;
}
ObjCRM.Dispose();
GvProspectos.DataBind();
}
private void CargaFiltros()
{
DdlSubProyecto.DataSource = get_GlobalDTSubProyectos(-1, CveEmpresa: UsuarioActual.CveEmpresa);
DdlSubProyecto.Items.Insert(0, new ListItem("Seleccione", "-1"));
DdlSubProyecto.DataBind();
DdlGiroClasificacion.DataSource = get_GlobalDTClienteClasificaciones(UsuarioActual.CveEmpresa);
DdlGiroClasificacion.Items.Insert(0, new ListItem("Seleccione", "-1"));
DdlGiroClasificacion.DataBind();
DdlVendedor.DataSource = get_GlobalDTVendedores(UsuarioActual.CveEmpresa);
DdlVendedor.Items.Insert(0, new ListItem("Seleccione", "-1"));
DdlVendedor.DataBind();
}
protected void BtnConsultar_Click(object sender, EventArgs e)
{
CargaDatos();
}
protected void BtnAsignar_Click(object sender, EventArgs e)
{
StringBuilder CveProspectos = new StringBuilder();
GridViewRowCollection RowsProspectos = GvProspectos.Rows;
foreach (GridViewRow Prospecto in RowsProspectos)
{
bool Asignado = Prospecto.FCCheckBox("ChkAsignar").Checked;
if (Asignado)
{
int CveProspecto = Prospecto.DataKey("CveEmpresaCRM").ToEntero();
CveProspectos.AppendFormat("{0},",CveProspecto);
}
}
string CveProspectosFinal = CveProspectos.ToString();
int CveVendedor = DdlVendedor.SelectedValue.ToEntero();
if (CveProspectosFinal.Length > 0 && CveVendedor != -1)
{
CveProspectos.Remove((CveProspectos.Length -1),1);
ClsCRM ObjCRM = new ClsCRM();
if (ObjCRM.AsignarVendedor(CveProspectosFinal,CveVendedor))
{
string Vendedor = DdlVendedor.SelectedItem.Text;
string MensajeExito = String.Format("El vendedor '{0}' fue asignado a los prospectos de manera exitosa", Vendedor);
Alert(MensajeExito);
this.CargaDatos();
UpDatos.Update();
}
ObjCRM.Dispose();
}
}
}

View File

@@ -11,13 +11,16 @@
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<li>
<asp:HyperLink ID="LnkAgregar" NavigateUrl="/CRM/EmpresaCRM.aspx" runat="server" Target="_blank"><i class="fa fa-plus"></i><span style="padding-left:5px;">Agregar Prospecto</span></asp:HyperLink>
<asp:HyperLink ID="LnkAgregar" NavigateUrl="/CRM/EmpresaCRM.aspx" runat="server" Target="_blank"><i class="fa fa-plus"></i><span style="padding-left:5px;">Agregar</span></asp:HyperLink>
</li>
<li>
<asp:LinkButton ID="LnkCargaProspectos" runat="server" OnClick="LnkCargaProspectos_Click"><i class="fa fa-plus"></i><span style="padding-left:5px;">Cargar Prospectos</span></asp:LinkButton>
</li>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div id="PFiltros" class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle">
@@ -47,9 +50,9 @@
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="row" style="margin-right: 10px; margin-top: 18px;margin-bottom: 5px;" align="right">
<div class="row" style="margin-right: 10px; margin-top: 18px; margin-bottom: 5px;" align="right">
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
@@ -59,7 +62,7 @@
<Columns>
<asp:TemplateField HeaderText="Empresa" ItemStyle-Width="25%" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:HyperLink ID="HplEmpresa" Target="_blank" runat="server" Text='<%# Eval("Empresa")%>' data-toggle="tooltip" title="Ir a Detalle"> </asp:HyperLink>
<asp:HyperLink ID="HplEmpresa" Target="_blank" runat="server" Text='<%# Eval("Empresa")%>' data-toggle="tooltip" title="Ir a Detalle"> </asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="RFC" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Left">
@@ -72,21 +75,21 @@
<asp:Label ID="lblVendedor" runat="server" Text='<%# Eval("Vendedor")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="MedioCaptacion" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Left">
<asp:TemplateField HeaderText="Medio de Captacion" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label ID="lblMedioCaptacion" runat="server" Text='<%# Eval("MedioCaptacion")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Contactos" ItemStyle-Width="5%" ItemStyle-Font-Bold="true" ItemStyle-HorizontalAlign="Right">
</asp:TemplateField>
<asp:TemplateField HeaderText="Contactos" ItemStyle-Width="5%" ItemStyle-Font-Bold="true" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label ID="lblNoContactos" runat="server" Text='<%# Eval("NoContactos")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Acercamientos" ItemStyle-Width="5%" ItemStyle-Font-Bold="true" ItemStyle-HorizontalAlign="Right">
</asp:TemplateField>
<asp:TemplateField HeaderText="Acercamientos" ItemStyle-Width="5%" ItemStyle-Font-Bold="true" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label ID="lblNoAcercamientos" runat="server" Text='<%# Eval("NoAcercamientos")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
</asp:TemplateField>
<asp:BoundField DataField="FechaIng" ItemStyle-Width="10%" HeaderText="Fecha Ingreso" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:g}" />
<asp:TemplateField HeaderText="Usuario que Ingresó" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
@@ -95,14 +98,49 @@
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" Visible="false" ItemStyle-Width="10%" HeaderText="Comandos">
<ItemTemplate>
<asp:HyperLink ID="HplEditar" Target="_blank" runat="server" data-toggle="tooltip" CssClass="btn btn-circle btn-sm green" title="Editar" Text="<i class='fa fa-pencil'></i>"></asp:HyperLink>
<asp:LinkButton ID="LnkEliminar" runat="server" CommandName="Delete" AlternateText="Eliminar" data-toggle="confirmation" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-popout="true" data-original-title="¿Eliminar la Empresa tambien eliminara los Contacto de esta, seguro que desea continuar?" data-btn-ok-label="si" />
<asp:HyperLink ID="HplEditar" Target="_blank" runat="server" data-toggle="tooltip" CssClass="btn btn-circle btn-sm green" title="Editar" Text="<i class='fa fa-pencil'></i>"></asp:HyperLink>
<asp:LinkButton ID="LnkEliminar" runat="server" CommandName="Delete" AlternateText="Eliminar" data-toggle="confirmation" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-popout="true" data-original-title="¿Eliminar la Empresa tambien eliminara los Contacto de esta, seguro que desea continuar?" data-btn-ok-label="Sí" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
<div id="DivCargasMasivas" class="modal ADS fade" role="dialog">
<div class="modal-dialog" style="width: 450px;">
<asp:UpdatePanel runat="server" class="modal-content" ID="UpCargasMasivas" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-header ">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">
<asp:Literal ID="LtlTituloModalTiposD" runat="server">Cargar Prospectos</asp:Literal></h4>
</div>
<div class="modal-body">
<div class="row">
<div class="col-md-2" style="margin-left: 30px;text-align: left">
<asp:Button ID="BtnDescargar" runat="server" OnClick="BtnDescargar_Click" CssClass="btn btn-warning" Text="Descargar Formato" />
</div>
</div>
<br />
<div class="row">
<div class="col-md-11" style="margin-left: 30px; margin-right: 30px; margin-bottom: 50px;">
<asp:TextBox ID="TxtExcel" CssClass="ADSdropzone hidden" Text="" data-maxFile="1" runat="server"></asp:TextBox>
</div>
</div>
<div class="modal-footer">
<asp:Button ID="BtnAgregarProspectos" OnClick="BtnAgregarProspectos_Click" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpTiposD" />
<button id="Button3" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
</div>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="BtnDescargar"/>
</Triggers>
</asp:UpdatePanel>
</div>
</div>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
</asp:Content>

View File

@@ -1,11 +1,12 @@
using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using GemBox.Spreadsheet;
using Extensiones;
public partial class CRM_CatEmpresasCRM : ClsPaginas
@@ -124,4 +125,172 @@ public partial class CRM_CatEmpresasCRM : ClsPaginas
CargaMediosCaptacion();
UPFiltros.Update();
}
protected void LnkCargaProspectos_Click(object sender, EventArgs e)
{
RegistraScript(String.Format("$('#{0}').modal();", "DivCargasMasivas"));
}
protected void BtnDescargar_Click(object sender, EventArgs e)
{
string Directorio = ModExtensiones.DirectorioBaseEmpresas + "Empresas\\Grales\\Formatos\\FormatoDeProspectos.xlsx";
FileInfo Archivo = new FileInfo(Directorio);
Response.Clear();
Response.ClearHeaders();
Response.ClearContent();
Response.AddHeader("Content-Disposition", "attachment; filename=" + Archivo.Name);
Response.AddHeader("Content-Length", Archivo.Length.ToString());
Response.ContentType = "text/plain";
Response.Flush();
Response.TransmitFile(Archivo.FullName);
Response.End();
}
protected void BtnAgregarProspectos_Click(object sender, EventArgs e)
{
if( TxtExcel.getfiles().Archivos.Count > 0 )
{
Archivo file = TxtExcel.getfiles().Archivos[0];
string Directorio = Server.MapPath("~") + file.patch;
DataTable dt = ReadExcelFile(Directorio + file.filename, true);
DataRowCollection Rows = dt.Rows;
ClsCRM ObjCRM = new ClsCRM();
ObjCRM.IniciaTransacSQL();
bool TieneError = false;
foreach (DataRow row in Rows)
{
string Proceso = row["Proceso"].ToString();
string NombreEmpresa = row["Nombre de la empresa"].ToString();
string RFC = row["RFC"].ToString();
string Mail = row["Mail"].ToString();
string MedioCaptacion = row["Medio de Captación"].ToString();
string Agente = row["Agente"].ToString();
string Sucursal = row["Sucursal"].ToString();
string Giro = row["Giro"].ToString();
string ContactoPrincipal = row["Contacto Principal"].ToString();
string TelOficina = row["Teléfono de Oficina"].ToString();
string Celular = row["Celular"].ToString();
string Correo = row["Correo"].ToString();
int CveMedioCaptacion = -1;
if (ObjCRM.GetMedioCaptacion(UsuarioActual.CveEmpresa))
{
DataRow MediosCaptacion = ObjCRM.DtResultados.FiltroPrimero(String.Format("MedioCaptacion = '{0}'",MedioCaptacion));
if(MediosCaptacion != null)
{
CveMedioCaptacion = MediosCaptacion["CveMedioCaptacion"].ToString().ToEntero();
}else
{
Alert(String.Format("El medio de captación '{0}' no fue encontrado", MedioCaptacion), ModExtensiones.TipoMensaje.MsgAdvertencia);
TieneError = true;
break;
}
}
int CveVendedor = -1;
DataRow Vendedor = get_GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("Vendedor = '{0}'",Agente));
if (Vendedor != null)
{
CveVendedor = Vendedor["CveVendedor"].ToString().ToEntero();
}else
{
Alert(String.Format("El vendedor '{0}' no fue encontrado", MedioCaptacion), ModExtensiones.TipoMensaje.MsgAdvertencia);
TieneError = true;
break;
}
int CveSubProyecto = -1;
DataRow SubProyecto = get_GlobalDTSubProyectos(-1,CveEmpresa:UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("SubProyecto = '{0}'",Sucursal));
if(SubProyecto != null)
{
CveSubProyecto = SubProyecto["CveSubProyecto"].ToString().ToEntero();
}else
{
Alert(String.Format("El SubProyecto '{0}'", Sucursal), ModExtensiones.TipoMensaje.MsgAdvertencia);
TieneError = true;
break;
}
int CveGiro = -1;
DataRow GiroDt = get_GlobalDTClienteClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("ClienteClasificacion = '{0}'", Giro));
if (GiroDt != null)
{
CveGiro = GiroDt["CveClienteClasificacion"].ToString().ToEntero();
}
else
{
Alert(String.Format("El Giro de Empresa '{0}'", Giro), ModExtensiones.TipoMensaje.MsgAdvertencia);
TieneError = true;
break;
}
TieneError = (!(ObjCRM.AddEmpresaCRM(NombreEmpresa, RFC, CveMedioCaptacion, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, -1, CveVendedor, CveSubProyecto, Mail, CveGiro) > 0));
}
if (TieneError)
{
ObjCRM.RollBack();
}else
{
ObjCRM.Commit();
Alert("Prospectos agregados correctamente");
TxtExcel.Text = "";
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivCargasMasivas"));
}
ObjCRM.Dispose();
}
}
private DataTable ReadExcelFile(string flatFilePath, bool firstRowHasHeaders)
{
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet());
ExcelFile excelFile = ExcelFile.Load(flatFilePath);
int unnamed = 0;
int cols;
string[] columns;
int curRow = 0;
int curCol = 0;
DataTable dataTable = new DataTable();
ExcelWorksheet worksheet = excelFile.Worksheets[0];
for (cols = 0; cols <= worksheet.Rows[0].AllocatedCells.Count - 1; cols++)
{
if (firstRowHasHeaders)
{
if (worksheet.Rows[0].Cells[cols].Value != null)
dataTable.Columns.Add(worksheet.Rows[0].Cells[cols].Value.ToString().Trim());
else
dataTable.Columns.Add("Unnamed Column " + (System.Threading.Interlocked.Increment(ref unnamed)));
curRow = 1;
}
else
dataTable.Columns.Add("Column " + (cols + 1));
}
while (curRow < worksheet.Rows.Count)
{
columns = new string[cols - 1 + 1];
for (curCol = 0; curCol <= cols - 1; curCol++)
{
if (worksheet.Rows[curRow].Cells[curCol].Value == null)
columns[curCol] = "";
else
columns[curCol] = worksheet.Rows[curRow].Cells[curCol].Value.ToString();
}
dataTable.Rows.Add(columns);
curRow += 1;
}
return dataTable;
}
}

View File

@@ -13,7 +13,7 @@
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<li>
<asp:LinkButton ID="LnkAgregar" OnClick="LnkAgregar_Click" runat="server"><i class="fa fa-plus"></i><span style="padding-left:5px;">Agregar Etapas de Proceso</span></asp:LinkButton>
<asp:LinkButton ID="LnkAgregar" OnClick="LnkAgregar_Click" runat="server"><i class="fa fa-plus"></i><span style="padding-left:5px;">Agregar</span></asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkImprimir" OnClick="LnkImprimir_Click" runat="server"><i class="fa fa-file-pdf-o"></i><span style="padding-left:5px;">PDF</span></asp:LinkButton>
@@ -112,7 +112,7 @@
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" HeaderText="Comandos">
<ItemTemplate>
<asp:LinkButton ID="LnkEditar" runat="server" OnClick="LnkEditar_Click" data-toggle="tooltip" CssClass="btn btn-circle btn-sm green" title="Editar" Text="<i class='fa fa-pencil'></i>"></asp:LinkButton>
<asp:LinkButton ID="LnkEliminar" runat="server" CommandName="Delete" AlternateText="Eliminar" data-toggle="confirmation" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-popout="true" data-original-title="¿Está seguro que desea eliminar la Etapa del Proceso?" data-btn-ok-label="si" />
<asp:LinkButton ID="LnkEliminar" runat="server" CommandName="Delete" AlternateText="Eliminar" data-toggle="confirmation" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-popout="true" data-original-title="¿Está seguro que desea eliminar la Etapa del Proceso?" data-btn-ok-label="Sí" />
</ItemTemplate>
</asp:TemplateField>
</Columns>

View File

@@ -132,19 +132,19 @@ public partial class CRM_CatEtapasProceso : ClsPaginas
{
if (EsEditar == 1)
{
LtlModalTitulo.Text = "Actualizar Etapa del Proceso";
//LtlModalTitulo.Text = "Actualizar Etapa del Proceso";
BtnGuardar.Text = "Actualizar";
DivEstatus.Visible = true;
DdlTipoProceso.SelectedValueExist("-1");
DdlTipoProceso.Enabled = false;
}
else
{
LtlModalTitulo.Text = "Agregar Etapa al Proceso";
//LtlModalTitulo.Text = "Agregar Etapa al Proceso";
BtnGuardar.Text = "Guardar";
DivEstatus.Visible = false;
DdlTipoProceso.SelectedValueExist("1");
DdlTipoProceso.SelectedValueExist("-1");
DdlTipoEtapa.SelectedValueExist("1");
DdlTipoProceso.Enabled = true;
@@ -152,6 +152,7 @@ public partial class CRM_CatEtapasProceso : ClsPaginas
TxtEtapaProceso.Text = "";
TxtDescripcion.Text = "";
ChkEstatus.Checked = true;
UPModal.Update();
}
protected void CargaTiposProceso()
@@ -203,6 +204,7 @@ public partial class CRM_CatEtapasProceso : ClsPaginas
DivOrden.Visible = false;
bloquearEtapasAnteriores(-1);
DdlTipoProceso.SelectedValueExist(CveTipoProcesoSeleccionado);
//cargaEtapas();
DdlTipoEtapa.SelectedValueExist(CveTipoEtapaSeleccionada);
UPModal.Update();
@@ -222,6 +224,11 @@ public partial class CRM_CatEtapasProceso : ClsPaginas
bloquearEtapasAnteriores(GvRow.DataKey("CveTipoEtapa").ToEntero());
CveEtapaProceso = GvRow.DataKey("CveEtapaProceso").ToEntero();
DdlTipoProceso.SelectedValueExist(GvRow.DataKey("CveTipoProceso"));
int CveTipoEtapaSeleccionado = GvRow.DataKey("CveTipoEtapa").ToEntero();
DataTable EtapasDisponiblesEditar = DTEtapas.FiltraParametros(String.Format("CveTipoEtapa = {0} OR TipoEtapa = 'Proceso'", CveTipoEtapaSeleccionado));
DdlTipoEtapa.DataSource = EtapasDisponiblesEditar;
DdlTipoEtapa.DataBind();
DdlTipoEtapa.SelectedValueExist(GvRow.DataKey("CveTipoEtapa"));
TxtEtapaProceso.Text = GvRow.DataKey("EtapaProceso").ToString();
@@ -308,7 +315,7 @@ public partial class CRM_CatEtapasProceso : ClsPaginas
//}
// PRECARGAMOS LA SIGUIENTE ETAPA A AGREGAR CON LOS MISMA DATOS DE LA ETAPA QUE SE INSERTO
CveTipoProcesoSeleccionado = CveTipoProceso;
//CveTipoProcesoSeleccionado = CveTipoProceso;
CveTipoEtapaSeleccionada = CveTipoEtapa;
ObjCRM.Dispose();
@@ -421,40 +428,26 @@ public partial class CRM_CatEtapasProceso : ClsPaginas
protected void DdlTipoProceso_Change(Object sender,EventArgs e)
{
int CveTipoProcesoSeleccionado = DdlTipoProceso.SelectedValue.ToEntero();
DataTable EtapasIterable = DTEtapas.Copy();
DataTable EtapasDefiniticas = DTEtapas.Copy();
DataTable EtapasAux = DTEtapas.Copy();
int indice = 0;
foreach (DataRow EtapaRow in EtapasIterable.Rows)
{
int CveTipoEtapa = EtapaRow["CveTipoEtapa"].ToEntero();
if (CveTipoEtapa != 2)
{
int CantidadEtapas = TmpDT.FiltraParametros(String.Format("CveTipoProceso = {0} AND CveTipoEtapa = {1}",DdlTipoProceso.SelectedValue,EtapaRow["CveTipoEtapa"])).Rows.Count;
if(CantidadEtapas > 0)
int CantidadEtapas = TmpDT.FiltraParametros(String.Format("CveTipoProceso = {0} AND CveTipoEtapa = {1}", CveTipoProcesoSeleccionado, CveTipoEtapa)).Rows.Count;
if (CantidadEtapas > 0)
{
EtapasAux.Rows.RemoveAt(indice);
EtapasAux = EtapasDefiniticas.FiltraParametros(String.Format("CveTipoEtapa <> {0}", CveTipoEtapa));
EtapasDefiniticas = EtapasAux.Copy();
}
}else
{
indice++;
}
}
//for (int i = 1; i < CveTipoEtapa; i++)
//{
// DataRow TipoEtapaRow = EtapasAux.Rows[indice];
// int CveTipoEtapaAux = TipoEtapaRow["CveTipoEtapa"].ToEntero();
// if (CveTipoEtapaAux == 2)
// {
// indice++;
// }
// else
// {
// EtapasAux.Rows.Remove(TipoEtapaRow);
// }
//}
EtapasAux.AcceptChanges();
DdlTipoEtapa.DataSource = EtapasAux;

View File

@@ -13,7 +13,7 @@
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<li>
<asp:LinkButton ID="LnkAgregar" OnClick="LnkAgregar_Click" runat="server"><i class="fa fa-plus"></i><span style="padding-left:5px;">Agregar Medio de Captación</span></asp:LinkButton>
<asp:LinkButton ID="LnkAgregar" OnClick="LnkAgregar_Click" runat="server"><i class="fa fa-plus"></i><span style="padding-left:5px;">Agregar</span></asp:LinkButton>
</li>
</ContentTemplate>
</asp:UpdatePanel>
@@ -60,7 +60,7 @@
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" HeaderText="Comandos">
<ItemTemplate>
<asp:LinkButton ID="LnkEditar" runat="server" OnClick="LnkEditar_Click" data-toggle="tooltip" CssClass="btn btn-circle btn-sm green" title="Editar" Text="<i class='fa fa-pencil'></i>"></asp:LinkButton>
<asp:LinkButton ID="LnkEliminar" runat="server" CommandName="Delete" AlternateText="Eliminar" data-toggle="confirmation" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-popout="true" data-original-title="¿Está seguro que desea eliminar el Medio Captación?" data-btn-ok-label="si" />
<asp:LinkButton ID="LnkEliminar" runat="server" CommandName="Delete" AlternateText="Eliminar" data-toggle="confirmation" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-popout="true" data-original-title="¿Está seguro que desea eliminar el Medio Captación?" data-btn-ok-label="Sí" />
</ItemTemplate>
</asp:TemplateField>
</Columns>

View File

@@ -13,7 +13,7 @@
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<li>
<asp:LinkButton ID="LnkAgregar" OnClick="LnkAgregar_Click" runat="server"><i class="fa fa-plus"></i><span style="padding-left:5px;">Agregar Probabilidad de Acercamiento</span></asp:LinkButton>
<asp:LinkButton ID="LnkAgregar" OnClick="LnkAgregar_Click" runat="server"><i class="fa fa-plus"></i><span style="padding-left:5px;">Agregar</span></asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkImprimir" OnClick="LnkImprimir_Click" runat="server"><i class="fa fa-file-pdf-o"></i><span style="padding-left:5px;">PDF</span></asp:LinkButton>
@@ -48,7 +48,7 @@
<asp:Label ID="lblProbabilidadAcercamiento" runat="server" Text='<%# Eval("ProbabilidadAcercamiento")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>--%>
<asp:TemplateField HeaderText="Tipo Proceso que Ingresó" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Left">
<asp:TemplateField HeaderText="Tipo Proceso" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label ID="lblTipoProceso" runat="server" Text='<%# Eval("TipoProceso")%>'> </asp:Label>
</ItemTemplate>

View File

@@ -104,13 +104,13 @@ public partial class CRM_CatProbabilidadAcercamiento : ClsPaginas
{
if (EsEditar == 1)
{
LtlModalTitulo.Text = "Actualizar Probabilidad de Acercamiento";
//LtlModalTitulo.Text = "Actualizar Probabilidad de Acercamiento";
BtnGuardar.Text = "Actualizar";
DivEstatus.Visible = true;
}
else
{
LtlModalTitulo.Text = "Agregar Probabilidad de Acercamiento";
//LtlModalTitulo.Text = "Agregar Probabilidad de Acercamiento";
BtnGuardar.Text = "Guardar";
DivEstatus.Visible = false;
}

View File

@@ -13,7 +13,7 @@
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<li>
<asp:LinkButton ID="LnkAgregarTipoProceso" OnClick="LnkAgregarTipoProceso_Click" runat="server"><i class="fa fa-plus"></i><span style="padding-left:5px;">Agregar Tipo de Proceso</span></asp:LinkButton>
<asp:LinkButton ID="LnkAgregarTipoProceso" OnClick="LnkAgregarTipoProceso_Click" runat="server"><i class="fa fa-plus"></i><span style="padding-left:5px;">Agregar</span></asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkImprimir" OnClick="LnkImprimir_Click" runat="server"><i class="fa fa-file-pdf-o"></i><span style="padding-left:5px;">PDF</span></asp:LinkButton>
@@ -74,7 +74,7 @@
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" HeaderText="Comandos">
<ItemTemplate>
<asp:LinkButton ID="LnkEditar" runat="server" OnClick="LnkEditar_Click" data-toggle="tooltip" CssClass="btn btn-circle btn-sm green" title="Editar" Text="<i class='fa fa-pencil'></i>"></asp:LinkButton>
<asp:LinkButton ID="LnkEliminar" runat="server" CommandName="Delete" AlternateText="Eliminar" data-toggle="confirmation" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-popout="true" data-original-title="¿Está seguro que desea eliminar el Tipo de Proceso?" data-btn-ok-label="si" />
<asp:LinkButton ID="LnkEliminar" runat="server" CommandName="Delete" AlternateText="Eliminar" data-toggle="confirmation" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-popout="true" data-original-title="¿Está seguro que desea eliminar el Tipo de Proceso?" data-btn-ok-label="Sí" />
</ItemTemplate>
</asp:TemplateField>
</Columns>

View File

@@ -73,13 +73,13 @@ public partial class CRM_CatTipoProceso : ClsPaginas
{
if (EsEditar == 1)
{
LtlModalTitulo.Text = "Actualizar Tipo de Proceso";
//LtlModalTitulo.Text = "Actualizar Tipo de Proceso";
BtnGuardar.Text = "Actualizar";
DivEstatus.Visible = true;
}
else
{
LtlModalTitulo.Text = "Agregar Tipo de Proceso";
//LtlModalTitulo.Text = "Agregar Tipo de Proceso";
BtnGuardar.Text = "Guardar";
DivEstatus.Visible = false;
}

View File

@@ -239,7 +239,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas
CreoCliente = false;
RecuperaCve();
CargaTipoProceso();
//CargaMetodosCaptacion();
CargaMetodosCaptacion();
CargaVendedores();
CargaSucursales();
CargarTiposEventos();
@@ -252,6 +252,8 @@ public partial class CRM_EmpresaCRM : ClsPaginas
VerificaPermisos();
CargaClasificaciones();
DdlPS.setEsWebService(true);
DdlPS.SelectedText = "Seleccione";
DdlPS.SelectedValue = "-1";
}
}
@@ -570,14 +572,16 @@ public partial class CRM_EmpresaCRM : ClsPaginas
if (ObjCRM.GetTipoProceso(UsuarioActual.CveEmpresa))
{
DdlTipoPrceso2.DataSource = ObjCRM.DtResultados;
DdlTipoPrceso2.Items.Insert(0, new ListItem("Seleccione","-1"));
}
DdlTipoPrceso2.DataBind();
ObjCRM.Dispose();
}
protected void CargaMetodosCaptacion()
{
ClsCRM ObjCRM = new ClsCRM();
if (ObjCRM.GetMedioCaptacion(UsuarioActual.CveEmpresa, 1))
if (ObjCRM.GetMedioCaptacion(UsuarioActual.CveEmpresa, -1))
{
DdlMedioCaptacion.DataSource = ObjCRM.DtResultados.FiltraParametros(String.Format("CveTipoProceso = {0}", DdlTipoPrceso2.SelectedValue));
DdlMedioCaptacion.Items.Insert(0, new ListItem("Seleccione ", "-1"));
@@ -758,6 +762,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas
else { ObjCRM.RollBack(); }
ObjCRM.Dispose();
objDatosTecnicos.Dispose();
}
#endregion
@@ -1513,6 +1518,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas
if ((UsuarioActual.CveVendedor != CveVendedor))
{
BtnGuardarEmpresa.Visible = false;
BtnEliminarEmpresa.Visible = false;
BtnAgregarContacto.Visible = false;
//LnkAgregarAcercamiento.Visible = false;
DivAccionesBitacora.Visible = false;

View File

@@ -10,6 +10,20 @@
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<li>
<asp:LinkButton ID="LnkPDF" OnClick="LnkPDF_Click" runat="server" Text="<i class='fa fa-file-pdf-o' style='font-weight:bold;'></i> PDF" ></asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkExcel" OnClick="LnkExcel_Click" runat="server" Text="<i class='fa fa-file-excel-o' style='font-weight:bold;'></i> Excel" ></asp:LinkButton>
</li>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LnkPDF" />
<asp:PostBackTrigger ControlID="LnkExcel" />
</Triggers>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
</asp:Content>
@@ -54,7 +68,7 @@
<ajax:CalendarExtender runat="server" ID="CEFechaSolicitudF" TargetControlID="TxtFechaFin" PopupButtonID="imgFechaFin" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
</div>
<label class="col-md-1" style="width: 30px; margin-top: 5px;">PS:</label>
<label class="col-md-1" style="width: 115px; margin-top: 5px;">Producto Servicio:</label>
<div class="col-md-2">
<div style="width:100%">
<ADS:Dropdownlost runat="server" Width="100%" ID="DdlPS" CssClassDdl="table-group-action-input form-control input-inline input-small input-sm select2me" DataTextField="PSCodigo" DataValueField="CvePS" />

View File

@@ -6,6 +6,7 @@ using System.Web.UI;
using System.Web.UI.WebControls;
using Extensiones;
using System.Data;
using Microsoft.Reporting.WebForms;
public partial class CRM_RepAcercamientos : ClsPaginas
{
@@ -22,6 +23,18 @@ public partial class CRM_RepAcercamientos : ClsPaginas
ViewState["CveVendedor"] = value;
}
}
private DataTable DtDatos
{
get
{
return (ViewState["DtDatos"] == null ? null : (DataTable)ViewState["DtDatos"]);
}
set
{
ViewState["DtDatos"] = value;
}
}
#endregion
protected void Page_Load(object sender, EventArgs e)
@@ -49,6 +62,7 @@ public partial class CRM_RepAcercamientos : ClsPaginas
if (ObjCRM.GetAcercamiento(UsuarioActual.CveEmpresa, CveVendedor: CveVendedor, FechaInicio: FechaInicio, FechaFin: FechaFin, CvePS: CvePS, CveGiroClasificacion:DdlGiroClasificacion.SelectedValue.ToEntero()))
{
GVDatos.DataSource = ObjCRM.DtResultados;
DtDatos = ObjCRM.DtResultados;
GVDatos.DataBind();
}
@@ -78,13 +92,43 @@ public partial class CRM_RepAcercamientos : ClsPaginas
//CALCULAMOS EL INTERVALO DE LA SEMANA ACTUAL
TxtFechaInicio.Text = DateTime.Now.AddDays(-((int)DateTime.Now.DayOfWeek) + 1).ToShortDateString();
//TxtFechaFin.Text = DateTime.Now.AddDays((7 - (int)DateTime.Now.DayOfWeek)).ToShortDateString();
TxtFechaFin.Text = DateTime.Now.AddDays((7 - (int)DateTime.Now.DayOfWeek)).ToShortDateString();
DdlPS.setEsWebService(true);
DdlPS.SelectedValue = "-1";
DdlPS.SelectedText = "Seleccione";
DataTable dtGiroClasificaciones = get_GlobalDTClienteClasificaciones(UsuarioActual.CveEmpresa);
DdlGiroClasificacion.DataSource = dtGiroClasificaciones;
DdlGiroClasificacion.DataBind();
DdlGiroClasificacion.Items.Insert(0, new ListItem("Seleccione", "-1"));
}
#endregion
protected void LnkPDF_Click(object sender, EventArgs e)
{
Imprimir("PDF");
}
protected void LnkExcel_Click(object sender, EventArgs e)
{
Imprimir("Excel");
}
private void Imprimir(string formato)
{
string VendedorFiltro = String.Format("<strong>Vendedor:</strong> {0}&nbsp;&nbsp;&nbsp;&nbsp;", (DdlVendedor.SelectedValue != "-1" ? DdlVendedor.SelectedItem.Text : "Todos"));
string ProductoServicioFiltro = String.Format("<strong>Producto Servicio:</strong> {0}&nbsp;&nbsp;&nbsp;&nbsp;", (DdlPS.SelectedValue != "-1" ? DdlPS.SelectedText : "Todos"));
string GiroFiltro = String.Format("<strong>Giro:</strong> {0}&nbsp;&nbsp;&nbsp;&nbsp;", (DdlGiroClasificacion.SelectedValue != "-1" ? DdlGiroClasificacion.SelectedItem.Text : "Todos"));
string FechaInicioFiltro = String.Format("<strong>Fecha Inicio:</strong> {0}&nbsp;&nbsp;&nbsp;&nbsp;", TxtFechaInicio.Text);
string FechaFinFiltro = String.Format("<strong>Fecha Fin:</strong> {0}&nbsp;&nbsp;&nbsp;&nbsp;", TxtFechaFin.Text);
string Filtros = String.Format("{0}{1}{2}{3}{4}", VendedorFiltro, FechaInicioFiltro, FechaFinFiltro, ProductoServicioFiltro, GiroFiltro);
List<ReportParameter> @params = new List<ReportParameter>();
@params.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa));
@params.Add(new ReportParameter("LogoPath", new Uri(Server.MapPath(string.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri));
@params.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Usuario));
@params.Add(new ReportParameter("AgrupadoPor", Filtros));
ImprimirPDF("Empresas/Grales/Formatos/RepAcercamientos.rdlc", DtDatos, @params, "Reporte de Acercamientos", formato);
}
}

View File

@@ -393,7 +393,7 @@ public partial class CRM_RepAcercamientosProcesos : ClsPaginas
doc.Add(header);
Paragraph Filtros = this.filtrosDelReporte();
doc.Add(Filtros);
PdfPTable table = this.convertirReporteATabla();
PdfPTable table = this.convertirReporteATabla(doc);
doc.Add(table);
doc.Close();
@@ -533,12 +533,15 @@ public partial class CRM_RepAcercamientosProcesos : ClsPaginas
return Filtros;
}
private PdfPTable convertirReporteATabla()
private PdfPTable convertirReporteATabla(Document doc)
{
int numeroDeColumnas = GVRepAcercamientosEtapas.Columns.Count;
PdfPTable table = new PdfPTable(numeroDeColumnas);
table.WidthPercentage = 100f;
float[] anchoColumnas = this.ColumnasWidth();
table.SetWidths(anchoColumnas);
BaseColor headerBackGroundColor = new BaseColor(240,240,240);
Font fuente = FontFactory.GetFont("Arial", 9f);
@@ -568,6 +571,29 @@ public partial class CRM_RepAcercamientosProcesos : ClsPaginas
return table;
}
private float[] ColumnasWidth()
{
int CantidadColumnas = GVRepAcercamientosEtapas.Columns.Count;
float[] ColumnsWidth = new float[CantidadColumnas];
int cursor = 0;
DataControlFieldCollection ColumnsCollection = GVRepAcercamientosEtapas.Columns;
foreach (DataControlField columns in ColumnsCollection)
{
if (columns.HeaderText == "Total")
{
ColumnsWidth[cursor] = 20f;
}else
{
ColumnsWidth[cursor] = 80f;
}
cursor++;
}
return ColumnsWidth;
}
protected void LnkExcel_Click(object sender, EventArgs e)
{
GVRepAcercamientosEtapas.ExportToExcelGembox("Reporte de Rechazos de Acercamiento", UsuarioActual, "", "", "Reporte de Rechazos de Acercamiento", "", -1);

View File

@@ -520,6 +520,9 @@ public partial class CRM_RepAcercamientosRechazos : ClsPaginas
PdfPTable table = new PdfPTable(numeroDeColumnas);
table.WidthPercentage = 100f;
//float[] anchoColumnas = this.ColumnasWidth();
//table.SetWidths(anchoColumnas);
BaseColor headerBackGroundColor = new BaseColor(240, 240, 240);
Font fuente = FontFactory.GetFont("Arial", 9f);
@@ -550,6 +553,30 @@ public partial class CRM_RepAcercamientosRechazos : ClsPaginas
return table;
}
private float[] ColumnasWidth()
{
int CantidadColumnas = GVRepAcercamientosEtapas.Columns.Count;
float[] ColumnsWidth = new float[CantidadColumnas];
int cursor = 0;
DataControlFieldCollection ColumnsCollection = GVRepAcercamientosEtapas.Columns;
foreach (DataControlField columns in ColumnsCollection)
{
//if (columns.HeaderText == "Total")
//{
// ColumnsWidth[cursor] = 20f;
//}
//else
//{
// ColumnsWidth[cursor] = 80f;
//}
cursor++;
}
return ColumnsWidth;
}
protected void LnkExcel_Click(object sender, EventArgs e)
{
GVRepAcercamientosEtapas.ExportToExcelGembox("Reporte de Rechazos de Acercamiento", UsuarioActual, "", "", "Reporte de Rechazos de Acercamiento", "", -1);

View File

@@ -4053,7 +4053,7 @@ Partial Class Compras_Compras
'Verifica funcionalidad 702 "Require orden de compra para factura de compra"
If UsuarioActual.Empresa.Funcionalidad(702) = "1" Then
If UsuarioActual.Empresa.Funcionalidad(128) <> "" Then
If Not EstaAsociadoACajaChica And Not EstaAsociadoAPersonal Then
If Not CompraEstaVinculadaOC Then
Alert("Debe de vincular una orden de compra para registrar la factura")

View File

@@ -910,7 +910,7 @@ Partial Class PopUpVerFactura
If Archivo.Exists Then
HttpContext.Current.Response.Clear()
HttpContext.Current.Response.ClearContent()
HttpContext.Current.Response.ContentType = If(IO.Path.GetExtension(Archivo.Name) = "xml", "application/xml", "application/pdf")
HttpContext.Current.Response.ContentType = If(IO.Path.GetExtension(Archivo.Name).ToLower = "xml", "application/xml", "application/pdf")
HttpContext.Current.Response.AppendHeader("Content-disposition", String.Format("attachment; filename={0}", Archivo.Name))
HttpContext.Current.Response.AddHeader("Content-Length", Archivo.Length.ToString())
HttpContext.Current.Response.TransmitFile(Path)

View File

@@ -542,7 +542,7 @@ Partial Class ContabilidadC_RegPrePoliza
End Sub
Private Sub DdlConceptosContables_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlConceptosContables.SelectedIndexChanged
If DdlConceptosContables.SelectedValue.ToEntero.Contiene(5, 17, 201, 205, 206, 14, 15, 16, 19, 25, 26, 21) Then
If DdlConceptosContables.SelectedValue.ToEntero.Contiene(5, 17, 201, 205, 206, 14, 15, 16, 19, 25, 26, 21, 18, 60) Then
CargaProveedores()
DdlProveedores.Visible = True
DdlCompras.Visible = True
@@ -557,7 +557,7 @@ Partial Class ContabilidadC_RegPrePoliza
Else
DdlPersonal.Visible = False
End If
If DdlConceptosContables.SelectedValue.ToEntero.Contiene(1, 2, 203, 207, 13, 61, 8, 9, 62, 63, 38, 39) Then
If DdlConceptosContables.SelectedValue.ToEntero.Contiene(1, 2, 203, 207, 13, 61, 8, 9, 62, 63, 38, 39, 12, 91) Then
CargaClientes()
DdlClientes.Visible = True
DdlVentas.Visible = True
@@ -594,11 +594,21 @@ Partial Class ContabilidadC_RegPrePoliza
End Sub
Private Sub DdlProveedores_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProveedores.SelectedIndexChanged
CargaCompras(DdlProveedores.SelectedValue.ToEntero)
If DdlConceptosContables.SelectedValue.ToEntero.Contiene(18, 60) Then
CargaNotasCreditoCompras(DdlProveedores.SelectedValue.ToEntero, DdlCompras)
Else
CargaCompras(DdlProveedores.SelectedValue.ToEntero)
End If
End Sub
Private Sub DdlClientes_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlClientes.selectedindexchange
CargaVentas(DdlClientes.SelectedValue.ToEntero)
If DdlConceptosContables.SelectedValue.ToEntero.Contiene(12, 91) Then
CargaVentas(DdlClientes.SelectedValue.ToEntero)
Else
CargaVentas(DdlClientes.SelectedValue.ToEntero)
End If
End Sub
Private Sub CargaSubProyectos()
@@ -646,6 +656,24 @@ Partial Class ContabilidadC_RegPrePoliza
End If
End Sub
Private Sub CargaNotasCreditoCompras(CveProveedor As Integer, ddl As DropDownList)
If DdlConceptosContables.SelectedValue.ToEntero.Contiene(18, 60) Then
Dim ObjCompras As New ClsCompras
ddl.ClearSelection()
If ObjCompras.GetCompras(UsuarioActual.CveEmpresa, "NC", "-1", "-1", "-1", "-1", "-1", "-1", "-1", "-1", CveProveedor:=CveProveedor, TopSelect:=1000) Then
ddl.DataSource = ObjCompras.DtResultados '.FiltraParametros("Saldo <> 0")
ddl.DataBind()
ddl.Items.Insert(0, New ListItem(" - ", "-1"))
Else
ddl.DataSource = Nothing
ddl.DataBind()
ddl.Items.Insert(0, New ListItem(" - ", "-1"))
End If
ObjCompras.Dispose()
End If
End Sub
Private Sub CargaClientes()
DdlClientes.setEsWebService(True)
DdlClientes.Attributes.Add("data-metodo", "getcliente")
@@ -676,6 +704,22 @@ Partial Class ContabilidadC_RegPrePoliza
ObjVentas.Dispose()
End Sub
Private Sub CargaNotasCreditoVentas(CveCliente As Integer)
Dim ObjVentas As New ClsVentas
DdlVentas.ClearSelection()
If ObjVentas.GetVentas(UsuarioActual.CveEmpresa, "-1", "-1", "-1", "-1", CveCliente, -1, -1, -1, "-1", "-1", "-1", CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
DdlVentas.DataSource = ObjVentas.DtResultados '.FiltraParametros("Saldo > 0")
DdlVentas.DataBind()
DdlVentas.Items.Insert(0, New ListItem(" - ", "-1"))
Else
DdlVentas.DataSource = Nothing
DdlVentas.DataBind()
DdlVentas.Items.Insert(0, New ListItem(" - ", "-1"))
End If
ObjVentas.Dispose()
End Sub
Private Sub CargaPersonal()
DdlPersonal.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa)
DdlPersonal.DataBind()
@@ -904,15 +948,7 @@ Partial Class ContabilidadC_RegPrePoliza
Dim IdCtaContable As Integer = 0
Dim PorcentajeImpuesto As Decimal = 0
'Registra movimieno bancario
If CveConcepto = 30 Then
CveIE = ObjIE.AddBancos_IE(CveCuenta, CveTipoTransaccion, TxtFecha.Text, Folio, Beneficiario, ImporteDocumento, CveMoneda, 0, Observaciones, "", False, False, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If CveIE < 0 Then MsgError = "No se pudo registrar movimiento bancario"
CveIEInsertado = CveIE
If ObjIE.GetBancosIE(CveIE, -1, -1, "-1", -1, "-1", "-1", -1, -1, -1, -1, -1, MinFecha, MaxFecha, MinFecha, MaxFecha, MinFecha, MaxFecha, -1, -1, UsuarioActual.CveEmpresa) Then
FolioIE = ObjIE.Folio
End If
End If
Dim CveProveedor As Integer = -1
@@ -945,7 +981,18 @@ Partial Class ContabilidadC_RegPrePoliza
CveIE = gvr.FCDropDownList("DdlSaldos").SelectedValue.ToEntero
Else
If CveConcepto = 30 Then
'Registra movimieno bancario
If CveConcepto = 30 Then
CveIE = ObjIE.AddBancos_IE(CveCuenta, CveTipoTransaccion, TxtFecha.Text, Folio, Beneficiario, ImporteDocumento, CveMoneda, 0, Observaciones, "", False, False, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If CveIE < 0 Then MsgError = "No se pudo registrar movimiento bancario"
CveIEInsertado = CveIE
If ObjIE.GetBancosIE(CveIE, -1, -1, "-1", -1, "-1", "-1", -1, -1, -1, -1, -1, MinFecha, MaxFecha, MinFecha, MaxFecha, MinFecha, MaxFecha, -1, -1, UsuarioActual.CveEmpresa) Then
FolioIE = ObjIE.Folio
End If
End If
CveIE = CveIEInsertado
Else
CveIE = -1
End If
@@ -993,7 +1040,7 @@ Partial Class ContabilidadC_RegPrePoliza
'MENSAJE PRINCIPAL
MensajeAlert.AppendFormat("<br/><br/>Folio de Póliza: <b><a href = ""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"" class=""texto"" target=""_blank"" >{1}</a></b>", ObjMov.ContaIdPoliza, ObjMov.ContaFolio)
MensajeAlert.AppendFormat("<br/><br/>Prepóliza: <b><a href = ""/Contabilidad/RegPrePoliza.aspx?CvePoliza={0}"" class=""texto"" target=""_blank"" >{1}</a></b>", CvePrePoliza, ObjMov.ContaFolio)
MensajeAlert.AppendFormat("<br/><br/>Prepóliza: <b><a href = ""/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}"" class=""texto"" target=""_blank"" >{1}</a></b>", CvePrePoliza, ObjMov.ContaFolio)
'Alert(MensajeAlert.ToString, ModExtensiones.TipoMensaje.MsgInformacion)
Else
Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico")
@@ -1671,7 +1718,12 @@ Partial Class ContabilidadC_RegPrePoliza
Protected Sub DdlProveedores_SelectedIndexChanged1(sender As Object, e As EventArgs)
Dim ddl As DropDownList = CType(sender, DropDownList)
Dim ddl2 As DropDownList = DirectCast(ddl.BindingContainer, GridViewRow).FCDropDownList("DdlCompras")
CargaCompras2(ddl.SelectedValue.ToEntero, ddl2)
If DdlConceptosContables.SelectedValue.ToEntero.Contiene(18, 60) Then
CargaNotasCreditoCompras(ddl.SelectedValue.ToEntero, ddl2)
Else
CargaCompras2(ddl.SelectedValue.ToEntero, ddl2)
End If
End Sub
Private Sub CargaCompras2(CveProveedor As Integer, ddl As DropDownList)

View File

@@ -514,7 +514,7 @@ Partial Class ContabilidadC_RegPrePolizaS
Else
DdlPersonal.Visible = False
End If
If DdlConceptosContables.SelectedValue.ToEntero.Contiene(1, 2, 203, 207, 13, 61, 8, 9, 62, 63, 38, 39) Then
If DdlConceptosContables.SelectedValue.ToEntero.Contiene(1, 2, 203, 207, 13, 61, 8, 9, 62, 63, 38, 39, 12, 91) Then
CargaClientes()
DdlClientes.Visible = True
DdlVentas.Visible = True
@@ -542,7 +542,11 @@ Partial Class ContabilidadC_RegPrePolizaS
End Sub
Private Sub CargaCuentasContables()
DdlCtaContable.DataSource = Session("DtCuentas")
Dim ObjConta As New ClsContabilidad
If ObjConta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
DdlCtaContable.DataSource = ObjConta.DtResultados
End If
ObjConta.Dispose()
DdlCtaContable.DataBind()
DdlCtaContable.Items.Insert(0, New ListItem("Sin Asignar", "0"))
End Sub
@@ -1058,8 +1062,13 @@ Partial Class ContabilidadC_RegPrePolizaS
DdlTipoGastoE.DataBind()
DdlTipoGastoE.Items.Insert(0, New ListItem("Sin Asignar", "0"))
End Sub
Private Sub CargaCtaContableE()
DdlCtaContableE.DataSource = Session("DtCuentas")
Private Sub CargaCtaContableE()
Dim ObjConta As New ClsContabilidad
If ObjConta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
DdlCtaContableE.DataSource = ObjConta.DtResultados
End If
ObjConta.Dispose()
DdlCtaContableE.DataBind()
DdlCtaContableE.Items.Insert(0, New ListItem("Sin Asignar", "0"))
End Sub
@@ -1086,7 +1095,7 @@ Partial Class ContabilidadC_RegPrePolizaS
Else
DdlClasificacionesE.Visible = False
End If
If DdlConceptosContablesE.SelectedValue.ToEntero.Contiene(1, 2, 203, 207, 13, 61, 8, 9, 62, 63, 38, 39) Then
If DdlConceptosContablesE.SelectedValue.ToEntero.Contiene(1, 2, 203, 207, 13, 61, 8, 9, 62, 63, 38, 39, 12, 91) Then
CargaClientesE()
DdlClientesE.Visible = True
DdlVentasE.Visible = True

View File

@@ -147,10 +147,10 @@ public partial class Contabilidad_RepIVA : ClsPaginas
}
if (e.Row.DBCampo("PorcentajeIVA").ToDecimal() > 0)
{
Decimal SubTotal = (e.Row.DBCampo("SubTotal16").ToDecimal() > 0 ? e.Row.DBCampo("SubTotal16").ToDecimal() : (e.Row.DBCampo("SubTotal8").ToDecimal() > 0 ? e.Row.DBCampo("SubTotal8").ToDecimal() : (Decimal)0.0));
Decimal SubTotal = (e.Row.DBCampo("SubTotal16").ToDecimal() != 0 ? e.Row.DBCampo("SubTotal16").ToDecimal() : (e.Row.DBCampo("SubTotal8").ToDecimal() != 0 ? e.Row.DBCampo("SubTotal8").ToDecimal() : (Decimal)0.0));
Decimal dif = Math.Round(SubTotal * e.Row.DBCampo("PorcentajeIVA").ToDecimal(), 2) - Math.Round(e.Row.DBCampo("IVA").ToDecimal() + Math.Round(e.Row.DBCampo("IVANoDeducible").ToDecimal()), 2);
if (dif > 1)
if (Math.Abs(dif) > 1)
{
e.Row.ForeColor = System.Drawing.Color.Red;
e.Row.Cells[0].Text = e.Row.Cells[0].Text + "Err";

View File

@@ -4,20 +4,6 @@
<ReportItems>
<Rectangle Name="Rectangle1">
<ReportItems>
<Image Name="Image1">
<Source>Embedded</Source>
<Value>Logo</Value>
<Sizing>FitProportional</Sizing>
<Top>0.41929cm</Top>
<Left>1.2827cm</Left>
<Height>3.23567cm</Height>
<Width>4.49779cm</Width>
<Style>
<Border>
<Style>None</Style>
</Border>
</Style>
</Image>
<Textbox Name="Textbox1">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
@@ -41,7 +27,6 @@
<Left>0.381cm</Left>
<Height>0.6cm</Height>
<Width>1.74625cm</Width>
<ZIndex>1</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -60,7 +45,7 @@
<Left>4.21416cm</Left>
<Height>2.78048cm</Height>
<Width>2.21979cm</Width>
<ZIndex>2</ZIndex>
<ZIndex>1</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -91,7 +76,7 @@
<Left>0.28575cm</Left>
<Height>0.6cm</Height>
<Width>3.2225cm</Width>
<ZIndex>3</ZIndex>
<ZIndex>2</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -107,7 +92,7 @@
<Left>0.28575cm</Left>
<Height>0cm</Height>
<Width>3.2225cm</Width>
<ZIndex>4</ZIndex>
<ZIndex>3</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -140,7 +125,7 @@
<Left>0.28575cm</Left>
<Height>0.6cm</Height>
<Width>3.09903cm</Width>
<ZIndex>5</ZIndex>
<ZIndex>4</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -156,7 +141,7 @@
<Left>0.28575cm</Left>
<Height>0cm</Height>
<Width>3.10079cm</Width>
<ZIndex>6</ZIndex>
<ZIndex>5</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -189,7 +174,7 @@
<Left>4.11891cm</Left>
<Height>0.6cm</Height>
<Width>1.90229cm</Width>
<ZIndex>7</ZIndex>
<ZIndex>6</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -205,7 +190,7 @@
<Left>3.61103cm</Left>
<Height>0cm</Height>
<Width>2.82292cm</Width>
<ZIndex>8</ZIndex>
<ZIndex>7</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -236,7 +221,7 @@
<Left>0.0635cm</Left>
<Height>0.6cm</Height>
<Width>6.67724cm</Width>
<ZIndex>9</ZIndex>
<ZIndex>8</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -270,7 +255,7 @@
<Left>6.97976cm</Left>
<Height>0.41303cm</Height>
<Width>1.04599cm</Width>
<ZIndex>10</ZIndex>
<ZIndex>9</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -303,7 +288,7 @@
<Left>6.97976cm</Left>
<Height>0.41628cm</Height>
<Width>1.08479cm</Width>
<ZIndex>11</ZIndex>
<ZIndex>10</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -336,7 +321,7 @@
<Left>6.97976cm</Left>
<Height>0.43596cm</Height>
<Width>3.37312cm</Width>
<ZIndex>12</ZIndex>
<ZIndex>11</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -369,7 +354,7 @@
<Left>6.97976cm</Left>
<Height>0.39892cm</Height>
<Width>1.55985cm</Width>
<ZIndex>13</ZIndex>
<ZIndex>12</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -402,7 +387,7 @@
<Left>6.97976cm</Left>
<Height>0.3901cm</Height>
<Width>2.36625cm</Width>
<ZIndex>14</ZIndex>
<ZIndex>13</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -435,7 +420,7 @@
<Left>6.97976cm</Left>
<Height>0.40421cm</Height>
<Width>1.58424cm</Width>
<ZIndex>15</ZIndex>
<ZIndex>14</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -468,7 +453,7 @@
<Left>6.95537cm</Left>
<Height>0.43118cm</Height>
<Width>3.37312cm</Width>
<ZIndex>16</ZIndex>
<ZIndex>15</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -501,7 +486,7 @@
<Left>6.95537cm</Left>
<Height>0.37069cm</Height>
<Width>1.07037cm</Width>
<ZIndex>17</ZIndex>
<ZIndex>16</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -534,7 +519,7 @@
<Left>6.97976cm</Left>
<Height>0.4601cm</Height>
<Width>2.10312cm</Width>
<ZIndex>18</ZIndex>
<ZIndex>17</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -567,7 +552,7 @@
<Left>6.97976cm</Left>
<Height>0.42008cm</Height>
<Width>1.04599cm</Width>
<ZIndex>19</ZIndex>
<ZIndex>18</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -600,7 +585,7 @@
<Left>6.95537cm</Left>
<Height>0.44125cm</Height>
<Width>1.96378cm</Width>
<ZIndex>20</ZIndex>
<ZIndex>19</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -616,7 +601,7 @@
<Left>8.06455cm</Left>
<Height>0cm</Height>
<Width>5.59245cm</Width>
<ZIndex>21</ZIndex>
<ZIndex>20</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -629,7 +614,7 @@
<Left>7.87726cm</Left>
<Height>0cm</Height>
<Width>5.77973cm</Width>
<ZIndex>22</ZIndex>
<ZIndex>21</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -642,7 +627,7 @@
<Left>10.22883cm</Left>
<Height>0cm</Height>
<Width>3.42816cm</Width>
<ZIndex>23</ZIndex>
<ZIndex>22</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -655,7 +640,7 @@
<Left>8.46349cm</Left>
<Height>0cm</Height>
<Width>5.16176cm</Width>
<ZIndex>24</ZIndex>
<ZIndex>23</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -668,7 +653,7 @@
<Left>9.28251cm</Left>
<Height>0cm</Height>
<Width>4.37449cm</Width>
<ZIndex>25</ZIndex>
<ZIndex>24</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -681,7 +666,7 @@
<Left>8.36824cm</Left>
<Height>0cm</Height>
<Width>5.28876cm</Width>
<ZIndex>26</ZIndex>
<ZIndex>25</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -694,7 +679,7 @@
<Left>10.10183cm</Left>
<Height>0cm</Height>
<Width>3.55516cm</Width>
<ZIndex>27</ZIndex>
<ZIndex>26</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -707,7 +692,7 @@
<Left>7.65501cm</Left>
<Height>0cm</Height>
<Width>6.00198cm</Width>
<ZIndex>28</ZIndex>
<ZIndex>27</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -720,7 +705,7 @@
<Left>9.01601cm</Left>
<Height>0cm</Height>
<Width>4.64099cm</Width>
<ZIndex>29</ZIndex>
<ZIndex>28</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -733,7 +718,7 @@
<Left>7.82113cm</Left>
<Height>0cm</Height>
<Width>5.83587cm</Width>
<ZIndex>30</ZIndex>
<ZIndex>29</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -746,7 +731,7 @@
<Left>8.79713cm</Left>
<Height>0cm</Height>
<Width>4.85987cm</Width>
<ZIndex>31</ZIndex>
<ZIndex>30</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -788,7 +773,7 @@
<Left>6.95537cm</Left>
<Height>1.79104cm</Height>
<Width>6.70163cm</Width>
<ZIndex>32</ZIndex>
<ZIndex>31</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -837,7 +822,7 @@
<Left>6.97976cm</Left>
<Height>0.89104cm</Height>
<Width>6.67724cm</Width>
<ZIndex>33</ZIndex>
<ZIndex>32</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -870,7 +855,7 @@
<Left>8.04338cm</Left>
<Height>0.34247cm</Height>
<Width>5.61362cm</Width>
<ZIndex>34</ZIndex>
<ZIndex>33</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -902,7 +887,7 @@
<Left>8.06455cm</Left>
<Height>0.33894cm</Height>
<Width>5.59245cm</Width>
<ZIndex>35</ZIndex>
<ZIndex>34</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -934,7 +919,7 @@
<Left>10.38816cm</Left>
<Height>0.34776cm</Height>
<Width>3.26884cm</Width>
<ZIndex>36</ZIndex>
<ZIndex>35</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -966,7 +951,7 @@
<Left>8.63838cm</Left>
<Height>0.2384cm</Height>
<Width>5.01862cm</Width>
<ZIndex>37</ZIndex>
<ZIndex>36</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -998,7 +983,7 @@
<Left>9.34601cm</Left>
<Height>0.30719cm</Height>
<Width>4.31099cm</Width>
<ZIndex>38</ZIndex>
<ZIndex>37</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -1030,7 +1015,7 @@
<Left>8.46874cm</Left>
<Height>0.27544cm</Height>
<Width>5.16176cm</Width>
<ZIndex>39</ZIndex>
<ZIndex>38</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -1062,7 +1047,7 @@
<Left>10.39905cm</Left>
<Height>0.32535cm</Height>
<Width>3.25795cm</Width>
<ZIndex>40</ZIndex>
<ZIndex>39</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -1094,7 +1079,7 @@
<Left>8.06455cm</Left>
<Height>0.32131cm</Height>
<Width>5.59245cm</Width>
<ZIndex>41</ZIndex>
<ZIndex>40</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -1126,7 +1111,7 @@
<Left>9.15344cm</Left>
<Height>0.30543cm</Height>
<Width>4.50356cm</Width>
<ZIndex>42</ZIndex>
<ZIndex>41</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -1166,7 +1151,7 @@
<Left>0.381cm</Left>
<Height>1.4631cm</Height>
<Width>6.05295cm</Width>
<ZIndex>43</ZIndex>
<ZIndex>42</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -1200,7 +1185,7 @@
<Left>3.61103cm</Left>
<Height>0.41382cm</Height>
<Width>2.82292cm</Width>
<ZIndex>44</ZIndex>
<ZIndex>43</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -1232,7 +1217,7 @@
<Left>8.0963cm</Left>
<Height>0.38481cm</Height>
<Width>5.5607cm</Width>
<ZIndex>45</ZIndex>
<ZIndex>44</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -1264,7 +1249,7 @@
<Left>9.01439cm</Left>
<Height>0.33189cm</Height>
<Width>4.6426cm</Width>
<ZIndex>46</ZIndex>
<ZIndex>45</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -1280,7 +1265,7 @@
<Left>2.02882cm</Left>
<Height>0cm</Height>
<Width>4.40513cm</Width>
<ZIndex>47</ZIndex>
<ZIndex>46</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -1293,7 +1278,7 @@
<Left>0.43512cm</Left>
<Height>0cm</Height>
<Width>5.99883cm</Width>
<ZIndex>48</ZIndex>
<ZIndex>47</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -1306,7 +1291,7 @@
<Left>0.43512cm</Left>
<Height>0cm</Height>
<Width>5.99883cm</Width>
<ZIndex>49</ZIndex>
<ZIndex>48</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>

View File

@@ -2896,7 +2896,7 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>$</Value>
<Value>=IIf(not IsNothing(Fields!ConceptoP.Value) ORELSE Fields!ImporteP.Value &gt;0,"$",Nothing)</Value>
<Style />
</TextRun>
</TextRuns>
@@ -2927,7 +2927,7 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!ImporteP.Value</Value>
<Value>=IIf(not IsNothing(Fields!ConceptoP.Value) ORELSE Fields!ImporteP.Value &gt;0,Fields!ImporteP.Value,nothing)</Value>
<Style>
<Format>#,0.00;(#,0.00)</Format>
</Style>
@@ -3025,7 +3025,7 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>$</Value>
<Value>=IIf(not IsNothing(Fields!ConceptoD.Value) ORELSE Fields!ImporteD.Value &gt;0,"$"," ")</Value>
<Style />
</TextRun>
</TextRuns>
@@ -3056,7 +3056,7 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!ImporteD.Value</Value>
<Value>=IIf(not IsNothing(Fields!ConceptoD.Value) ORELSE Fields!ImporteD.Value &gt;0,Fields!ImporteD.Value,nothing)</Value>
<Style>
<Format>#,0.00;(#,0.00)</Format>
</Style>
@@ -4194,7 +4194,7 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value> Percepciones y deducciones que en el aparecen a la fecha COMPUPROVEEDORES SA DE CV no me adeuda</Value>
<Value> Percepciones y deducciones que en el aparecen a la fecha [@Empresa] no me adeuda</Value>
<Style />
</TextRun>
</TextRuns>
@@ -5130,6 +5130,18 @@
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="Empresa">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="SubProyecto">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
</ReportParameters>
<rd:ReportUnitType>Cm</rd:ReportUnitType>
<rd:ReportID>40c94aad-a12a-44fb-ab0d-ea36a9656792</rd:ReportID>

View File

@@ -947,11 +947,11 @@ Partial Class Inventarios_RecepcionAlmacen
TotalCompraOC = ObjCompras.DtResultados.Rows(0)("SubTotal").ToString.ToDecimal - ObjCompras.DtResultados.Rows(0)("Descuentos").ToString.ToDecimal
CveTipoCompra = ObjCompras.DtResultados.Rows(0)("CveTipoCompra").ToString.ToEntero
If CveTipoCompra = 9 Then
If CveTipoCompra = 9 Then ' apoyo logistico
CargaAlmacenes(-1, "27", CveTipoCompra)
ElseIf CveTipoCompra = 10 Then
CargaAlmacenes(-1, CveTipoCompra:=CveTipoCompra)
ElseIf TipoMovimiento = 3 Then
ElseIf TipoMovimiento = 3 Then 'devolucion al proveedor
CargaAlmacenes(-1, "21,2", CveTipoCompra)
Else
CargaAlmacenes(-1)
@@ -983,6 +983,7 @@ Partial Class Inventarios_RecepcionAlmacen
CargaAlmacenes(DtRecepcion.Rows(0)("CveSubProyecto").ToString.ToEntero, "22", CveTipoCompra)
End If
End If
Else
DtRecepcion = ObjInventario.DtResultados.Copy()

View File

@@ -72,7 +72,7 @@ Partial Class Inventarios_RepAlmacenCompras
'Llena Almacen
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
DdlAlmacen.DataBind()
DdlAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlAlmacen.Items.Insert(0, New ListItem("Todos", "-1"))
End Sub
#End Region

View File

@@ -262,6 +262,7 @@ partial class Nomina_Finiquito : ClsPaginas
ChkesLiquidacion.Checked = esLiquidacion;
}
}
Timbrado tr;
if (DdlMotivoBaja.SelectedValue.ToEntero() > 0)
LblMotivoBaja.Text = DdlMotivoBaja.SelectedItem.Text;
else

View File

@@ -274,6 +274,15 @@
<asp:ListItem Text="Todos" Value="3"></asp:ListItem>
</asp:DropDownList>
</div>
<label class="col-md-1 " style="line-height: 1;">Agrupador:</label>
<div class="col-md-1">
<asp:DropDownList ID="DdlAgrupadorB" runat="server" Style="width: 100% !important;" CssClass="select2me">
<asp:ListItem Text="Sin Agrupación" Value="-1" Selected ="True"></asp:ListItem>
<asp:ListItem Text="Centro de costos" Value="1"></asp:ListItem>
<asp:ListItem Text="Departamento" Value="2"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>
</div>
@@ -307,7 +316,7 @@
</div>
</div>
<div class="portlet-body nomarginleftright form-horizontal form-row-sepe formnombottom ">
<asp:GridView ID="GvNominas" runat="server" DataKeyNames="CvePeriodo,CvePersonal,CveNomina,SeTimbro,SerieFolio,Nombre,Correo,Codigo,Turno,SubProyecto,NomAutorizado" AutoGenerateColumns="False" OnRowDataBound="GvNominas_RowDataBound"
<asp:GridView ID="GvNominas" runat="server" DataKeyNames="CvePeriodo,CvePersonal,CveNomina,SeTimbro,SerieFolio,Nombre,Correo,Codigo,Turno,Departamento,SubProyecto,NomAutorizado" AutoGenerateColumns="False" OnRowDataBound="GvNominas_RowDataBound"
CssClass="table table-striped table-advance table-hover mysmallbtn ScrollAD Widthall GvNominas" Style="text-align: center;" GridLines="None" data-cols="2" data-rows="2" data-heighterror="360">
<Columns>
@@ -323,7 +332,7 @@
<ItemTemplate>
<asp:Literal ID="LtlNombre" runat="server"></asp:Literal>
</ItemTemplate>
<ItemStyle Width="350px" HorizontalAlign="Left" />
<ItemStyle Width="300px" HorizontalAlign="Left" />
</asp:TemplateField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />

File diff suppressed because it is too large Load Diff

View File

@@ -1,33 +1,23 @@
<%@ Page Title="Nómina - Pre Nómina" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="PreNomina.aspx.vb" Inherits="Nomina_PreNomina" %>
<%@ Page Title="Nómina - Pre nómina" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="PreNomina.aspx.vb" Inherits="Nomina_PreNomina" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
<asp:UpdatePanel ID="UpnTools" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<li>
<%-- <asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Imprimir EXCEL</asp:LinkButton>--%>
<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="17px" Height="17px" />
<asp:LinkButton ID="ImgExcel" Target="_blank" runat="server"> <i class="fa fa-ad-excel"></i> Imprimir</asp:LinkButton>
</li>
<li>
<asp:HyperLink ID="HLImgImprimir" Target="_blank" runat="server" NavigateUrl="#"> <i class="fa fa-ad-pdf"></i> Imprimir</asp:HyperLink>
<%--<a id="HLImgImprimir" runat="server" href="#" class="Texto">
<img alt="Imprimir" src="/Imagenes/btnImprimir.gif"/>
</a>--%>
</li>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
Pre Nómina
Pre nómina
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
</asp:Content>
@@ -57,10 +47,10 @@
</div>
<div class="tools">
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
<a href="javascript:;" class="expand"></a>
<a onclick="document.getElementById('C_BtnConsultar').click();" class="reload"></a>
<asp:Button ID="BtnGuardarBono" runat="server" Text="Guardar Bonos" class="btn btn-primary" />
<asp:Button ID="BtnImpresion" runat="server" Text="Cerrar Nómina" class="btn btn-primary" />
<a href="javascript:;" class="expand"></a>
<a onclick="document.getElementById('C_BtnConsultar').click();" class="reload"></a>
</div>
</div>
<div class="portlet-body" style="display: none;">
@@ -79,7 +69,12 @@
</div>
</div>
<table id="TblHeader" runat="server" class="table table-striped table-advance table-hover" width="1385px">
</ContentTemplate>
</asp:UpdatePanel>
<br />
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<table id="TblHeader" runat="server" class="table table-striped table-advance table-hover Widthall TblHeader" >
<thead>
<tr class="Titulos">
<th rowspan="2" width="250px">Nombre</th>
@@ -99,7 +94,6 @@
<th id="TDBono" runat="server" rowspan="2" style="width: 60px;">Bono</th>
<th id="TDPagoAdicional" runat="server" rowspan="2" style="width: 60px;">Pago Adi</th>
<th id="TDDescuento" runat="server" rowspan="2" style="width: 60px;">Desc Adi</th>--%>
<th rowspan="2">&nbsp;</th>
</tr>
<tr class="Titulos">
<th width="35px">Tipo</th>
@@ -133,12 +127,8 @@
</tr>
</thead>
</table>
</ContentTemplate>
</asp:UpdatePanel>
<br />
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePersonal" EmptyDataText="No se encontraron Ventas con los filtros especificados" ToolTip="Pre Nómina" Width="1385px" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; text-align: center;" GridLines="None">
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePersonal" EmptyDataText="No se encontraron Ventas con los filtros especificados" data-tableheader=".TblHeader"
ToolTip="Pre Nómina" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" Style=" text-align: center;" GridLines="None" data-scrollwidthrow=".scrollwidthrow">
<Columns>
<asp:TemplateField>
<ItemTemplate>
@@ -345,37 +335,37 @@
</ItemTemplate>
<ItemStyle Width="60px" />
</asp:TemplateField>
<asp:TemplateField>
<asp:TemplateField Visible="false">
<ItemTemplate>
<asp:CheckBox ID="ChkAplica" runat="server" Visible="false" Checked='<%# Eval("AplicaBono") %>' />
</ItemTemplate>
<ItemStyle Width="70px" />
</asp:TemplateField>
<asp:TemplateField>
<asp:TemplateField Visible="false">
<ItemTemplate>
<asp:TextBox ID="TxtBono" runat="server" Visible="false" Text='<%# Eval("Importe", "{0:N0}") %>' Width="44px"></asp:TextBox>
</ItemTemplate>
<ItemStyle Width="60px" />
</asp:TemplateField>
<asp:TemplateField>
<asp:TemplateField Visible="false">
<ItemTemplate>
<asp:TextBox ID="TxtPagoAdicional" Visible="false" runat="server" Text='<%# Eval("PagoAdicional", "{0:N0}") %>' Width="44px"></asp:TextBox>
</ItemTemplate>
<ItemStyle Width="60px" />
</asp:TemplateField>
<asp:TemplateField>
<asp:TemplateField Visible="false">
<ItemTemplate>
<asp:TextBox ID="TxtDescuentoAdicional" Visible="false" runat="server" Text='<%# Eval("DescuentoAdicional", "{0:N0}") %>' Width="44px"></asp:TextBox>
</ItemTemplate>
<ItemStyle Width="60px" />
</asp:TemplateField>
</asp:TemplateField>
<%--<asp:TemplateField>
<ItemTemplate>
<asp:Literal ID="LtlHorasTriples" runat="server" Text='<%# Eval("HorasTriples") %>'></asp:Literal>
</ItemTemplate>
<ItemStyle Width="65px" />
</asp:TemplateField>--%>
<asp:TemplateField>
<asp:TemplateField Visible="false">
<ItemTemplate>
&nbsp;
</ItemTemplate>

View File

@@ -205,11 +205,12 @@ Partial Class Nomina_PreNomina
If e.Row.DBCampo("Asistencias").ToDouble = 0 Then e.Row.FCLiteral("LtlAsistencias").Text = ""
If e.Row.DBCampo("Faltas").ToDouble = 0 Then e.Row.FCLiteral("LtlFaltas").Text = ""
If e.Row.DBCampo("HorasDobles").ToDouble = 0 Then e.Row.FCLiteral("LtlHorasExtras").Text = ""
e.Row.CssClass = "scrollwidthrow"
End If
End If
End Sub
Protected Sub ImgExcel_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles ImgExcel.Click
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
GvDatos.ExportToExcel("PreNomina", TblHeader)
End Sub

View File

@@ -21,16 +21,14 @@
<td class="Titulos" colspan="4">Filtros para búsqueda</td>
</tr>
<tr align="left">
<td class="text-right"><b>Nombre:</b></td>
<td><asp:TextBox ID="TxtNombre" runat="server" MaxLength="90" Width="200px"></asp:TextBox></td>
<td class="text-right"><b>Empresa:</b></td>
<td><asp:TextBox ID="TxtNombreEmpresa" runat="server" MaxLength="90" Width="200px"></asp:TextBox></td>
<td class="text-right"><b>RFC:</b></td>
<td><asp:TextBox ID="TxtRFC" runat="server" MaxLength="90" Width="200px"></asp:TextBox></td>
</tr>
<tr align="left">
<td class="text-right">
<b>Teléfono/Celular:</b>
</td>
<td><asp:TextBox ID="txtCelular" runat="server" MaxLength="90" Width="200px"></asp:TextBox></td>
</tr>
<tr>
<td colspan="4" style="text-align: center;">
@@ -44,52 +42,52 @@
<br />
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<table id="TblBusqueda" runat="server" border="0" visible="false">
<table id="TblBusqueda" runat="server" border="0" visible="false" style="width:100%">
<tr>
<td align="left">Número de registros encontrados:&nbsp;<b><asp:Literal ID="LtlTotalRegistros" runat="server"></asp:Literal></b></td>
</tr>
<tr>
<td>
<div id="DivBeneficiarios" style="overflow-y:auto; width:760px; height:285px;">
<asp:GridView ID="GV" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" ToolTip="Listado de Contratos encontrados." CssClass="table table-striped table-advance table-hover" GridLines="None">
<div id="DivBeneficiarios" style="overflow-y:auto; width:100%; height:285px;">
<asp:GridView ID="GV" runat="server" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" ToolTip="Listado de Contratos encontrados." CssClass="table table-striped table-advance table-hover"
GridLines="None" DataKeyNames="CveEmpresaCRM,Empresa,RFC,Correo,CveEncuestaAplicada,CveSubProyecto,CveMedioCaptacion,MedioCaptacion,NoContactos,NoAcercamientos,CveUsuarioIng,UsuarioIng,FechaIng,CveEncuestaCRM,CveVendedorAsignado,Vendedor,CveCliente,CveTipoProceso,CveGiroClasificacion">
<Columns>
<asp:TemplateField HeaderText="Nombre">
<asp:TemplateField HeaderText="Empresa" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<div class="truncate" style="width:160px"><asp:HyperLink ID="Hpl" CssClass="Texto" runat="server" NavigateUrl="#" Text='<%# Eval("NombreCompleto")%>' tooltip='<%# Eval("CveProspecto") %>'></asp:HyperLink></div>
<asp:HyperLink runat="server" ID="Hpl" Text="Empresa" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Empresa">
<asp:TemplateField HeaderText="RFC" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<div class="truncate" style="width:125px"><asp:Label runat="server" ID="LblEmpresaNombre" Text='<%# Eval("EmpresaNombre")%>'></asp:Label></div>
<asp:HyperLink runat="server" ID="Hp2" Text="RFC" />
</ItemTemplate>
</asp:TemplateField>
<%--<asp:BoundField DataField="EmpresaNombre" HeaderText="Empresa"/>--%>
<asp:TemplateField HeaderText="">
<asp:TemplateField HeaderText="Medio Captación" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<div class="truncate" style="width:35px"><asp:Label runat="server" ID="LblProspectoTipo" Text='<%# Eval("ProspectoTipo")%>'></asp:Label></div>
<asp:HyperLink runat="server" ID="Hp3" Text="MedioCaptacion" />
</ItemTemplate>
</asp:TemplateField>
<%--<asp:BoundField DataField="ProspectoTipo" HeaderText=""/>--%>
<asp:TemplateField HeaderText="Calle">
<asp:TemplateField HeaderText="Vendedor" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<div class="truncate" style="width:130px"><asp:Label runat="server" ID="LblCalle" Text='<%# Eval("Calle")%>'></asp:Label></div>
<asp:HyperLink runat="server" ID="Hp4" Text="Vendedor" />
</ItemTemplate>
</asp:TemplateField>
<%--<asp:BoundField DataField="Calle" HeaderText="Calle"/>--%>
<asp:TemplateField HeaderText="#">
<asp:TemplateField HeaderText="Fecha Ingreso" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<div class="truncate" style="width:65px"><asp:Label runat="server" ID="LblNumero" Text='<%# Eval("Numero")%>'></asp:Label></div>
<asp:HyperLink runat="server" ID="Hp5" Text="FechaIng" />
</ItemTemplate>
</asp:TemplateField>
<%--<asp:BoundField DataField="Numero" HeaderText="#"/>--%>
<%--<asp:BoundField DataField="Edad" HeaderText="Edad"/>
<asp:BoundField DataField="FechaNacimiento" DataFormatString="{0:d}" HeaderText="F. Nacimiento"/>--%>
<asp:TemplateField HeaderText="Municipio">
<asp:TemplateField HeaderText="Usuario Ingreso" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<div class="truncate" style="width:130px"><asp:Label runat="server" ID="LblMunicipio" Text='<%# Eval("Municipio")%>'></asp:Label></div>
<asp:HyperLink runat="server" ID="Hp6" Text="UsuarioIng" />
</ItemTemplate>
</asp:TemplateField>
<%--<asp:BoundField DataField="Municipio" HeaderText="Municipio"/>--%>
<%--<asp:HyperLinkField DataNavigateUrlFields="CveEmpresaCRM" DataNavigateUrlFormatString="/CRM/EmpresaCRM.aspx?CveEmpresaCRM={0}" DataTextField="Empresa" HeaderText="Prospectos" SortExpression="Empresa" />--%>
<%--<asp:HyperLinkField DataNavigateUrlFields="CveEmpresaCRM" DataNavigateUrlFormatString="/CRM/EmpresaCRM.aspx?CveEmpresaCRM={0}" DataTextField="RFC" HeaderText="RFC" SortExpression="RFC" />--%>
<%--<asp:HyperLinkField DataNavigateUrlFields="CveEmpresaCRM" DataNavigateUrlFormatString="/CRM/EmpresaCRM.aspx?CveEmpresaCRM={0}" DataTextField="MedioCaptacion" HeaderText="Medio Captación" SortExpression="MedioCaptacion" />--%>
<%--<asp:HyperLinkField DataNavigateUrlFields="CveEmpresaCRM" DataNavigateUrlFormatString="/CRM/EmpresaCRM.aspx?CveEmpresaCRM={0}" DataTextField="Vendedor" HeaderText="Vendedor" SortExpression="Vendedor" />--%>
<%--<asp:HyperLinkField DataNavigateUrlFields="CveEmpresaCRM" DataNavigateUrlFormatString="/CRM/EmpresaCRM.aspx?CveEmpresaCRM={0}" DataTextField="FechaIng" HeaderText="Fecha Ingreso" SortExpression="FechaIng" />--%>
<%--<asp:HyperLinkField DataNavigateUrlFields="CveEmpresaCRM" DataNavigateUrlFormatString="/CRM/EmpresaCRM.aspx?CveEmpresaCRM={0}" DataTextField="UsuarioIng" HeaderText="Usuario Ingreso" SortExpression="UsuarioIng" />--%>
</Columns>
</asp:GridView>
</div>

View File

@@ -16,7 +16,7 @@ Partial Class PopUpBuscarProspectos
CType(Me.Master, BaseMasterPage).EsPopup = True
CType(Me.Master, BaseMasterPage).PopupWidth = 800
RegistraScript("$get('tdContenido').style.height='520px'")
TxtNombre.Focus()
'TxtNombre.Focus()
ViewState("Opt") = IfNull(Request("Opt"), "")
@@ -31,29 +31,26 @@ Partial Class PopUpBuscarProspectos
End Sub
Protected Sub BtnBuscar_Click(sender As Object, e As System.EventArgs) Handles BtnBuscar.Click
Dim ObjProsp As New ClsProspectos()
Dim ObjCRM As New ClsCRM()
Dim Nombre As String = "-1"
Dim RFC As String = "-1"
Dim NombreEmpresa As String = "-1"
Dim Celular As String = "-1"
If TxtNombre.Text.Trim <> String.Empty Then Nombre = TxtNombre.Text.Trim
If TxtNombreEmpresa.Text.Trim <> String.Empty Then NombreEmpresa = TxtNombreEmpresa.Text.Trim
If txtCelular.Text.Trim <> String.Empty Then Celular = txtCelular.Text.Trim
If ObjProsp.GetProspectosDetalle(-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, "-1", -1, Nombre, NombreEmpresa, Celular, UsuarioActual.CveEmpresa) Then
If ObjProsp.DtResultados.Rows.Count > 0 Then
LtlTotalRegistros.Text = ObjProsp.DtResultados.Rows.Count.ToString.FormatoNumero(0)
GV.DataSource = ObjProsp.DtResultados
If TxtRFC.Text.Trim <> String.Empty Then RFC = TxtRFC.Text.Trim
If TxtNombreEmpresa.Text.Trim <> String.Empty Then NombreEmpresa = TxtNombreEmpresa.Text.Trim
If ObjCRM.GetEmpresasCRM(UsuarioActual.CveEmpresa, -1, NombreEmpresa, RFC) Then
If ObjCRM.DtResultados.Rows.Count > 0 Then
LtlTotalRegistros.Text = ObjCRM.DtResultados.Rows.Count.ToString.FormatoNumero(0)
GV.DataSource = ObjCRM.DtResultados
Else
LtlTotalRegistros.Text = "0"
GV.DataSource = Nothing
Alert("No se encontraron registros con losparámetros solicitados.", Extensiones.TipoMensaje.MsgAdvertencia)
Alert("No se encontraron registros con los parámetros solicitados.", Extensiones.TipoMensaje.MsgAdvertencia)
End If
End If
ObjProsp.Dispose()
ObjCRM.Dispose()
GV.DataBind()
UPDatos.Update()
TblBusqueda.Visible = True
@@ -62,12 +59,17 @@ Partial Class PopUpBuscarProspectos
Protected Sub GV_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GV.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.RowIndex = 0 Then
'e.Row.Cells(0).Width = Unit.Pixel(250)
'e.Row.Cells(1).Width = Unit.Pixel(80)
e.Row.Cells(0).Width = Unit.Pixel(250)
e.Row.Cells(1).Width = Unit.Pixel(80)
End If
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
e.Row.FCHyperLink("Hpl").Attributes.Add("onclick", String.Format("Ir('/Prospeccion/Prospectos.aspx?CveProspecto={0}')", e.Row.DBCampo("CveProspecto")))
e.Row.FCHyperLink("Hpl").Attributes.Add("onclick", String.Format("Ir('/CRM/EmpresaCRM.aspx?CveEmpresaCRM={0}')", e.Row.DBCampo("CveEmpresaCRM")))
e.Row.FCHyperLink("Hp2").Attributes.Add("onclick", String.Format("Ir('/CRM/EmpresaCRM.aspx?CveEmpresaCRM={0}')", e.Row.DBCampo("CveEmpresaCRM")))
e.Row.FCHyperLink("Hp3").Attributes.Add("onclick", String.Format("Ir('/CRM/EmpresaCRM.aspx?CveEmpresaCRM={0}')", e.Row.DBCampo("CveEmpresaCRM")))
e.Row.FCHyperLink("Hp4").Attributes.Add("onclick", String.Format("Ir('/CRM/EmpresaCRM.aspx?CveEmpresaCRM={0}')", e.Row.DBCampo("CveEmpresaCRM")))
e.Row.FCHyperLink("Hp5").Attributes.Add("onclick", String.Format("Ir('/CRM/EmpresaCRM.aspx?CveEmpresaCRM={0}')", e.Row.DBCampo("CveEmpresaCRM")))
e.Row.FCHyperLink("Hp6").Attributes.Add("onclick", String.Format("Ir('/CRM/EmpresaCRM.aspx?CveEmpresaCRM={0}')", e.Row.DBCampo("CveEmpresaCRM")))
End If
End Sub
End Class

File diff suppressed because it is too large Load Diff

View File

@@ -27,7 +27,7 @@
<a href="javascript:;" class="collapse"></a>
<a onclick="document.getElementById('C_BtnConsultar').click();" class="reload"></a>
</div>
<div class="titlefiltros caption ">
<div class="titlefiltros ">
<ul class="list-inline">
<li>Cliente:
<asp:Button ID="BtnCargarClientes" runat="server" ClientIDMode="Static" Text="CargarClientes" Style="display: none;" />

View File

@@ -32,7 +32,11 @@
<asp:LinkButton ID="ImgImprimir" Visible="false" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
</li>--%>
<li>
<asp:LinkButton ID="ImgImprimirExpediente" Visible="false" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
<asp:LinkButton ID="ImgImprimirExpediente" Visible="false" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> Expediente de personal</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LbGafete" runat="server" CssClass="" Text="Gafete" />
</li>
<asp:UpdatePanel ID="UpBuzon" runat="server">
@@ -3221,8 +3225,6 @@
<td style="width: 40px;"></td>
<td style="width: 500px; text-align: right!important"></td>
<td style="width: 500px; text-align: right!important">
<asp:LinkButton ID="LbGafete" runat="server" CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-download' title='Descargar Contrato'></i>" />
</td>
<td style="width: 50px!important"></td>
</tr>
@@ -3295,9 +3297,6 @@
</tr>
</table>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LbGafete" />
</Triggers>
</asp:UpdatePanel>
</ContentTemplate>
</asp:UpdatePanel>

View File

@@ -3437,7 +3437,7 @@ Partial Class RH_Personal
params.Add(New ReportParameter("LogoUri", ""))
End If
ImprimirPDF("Empresas/Grales/Formatos/RHGafete.rdlc", New DataTable, params, "ReportePersonal", "PDF")
ImprimirPDF("Empresas/Grales/Formatos/RHGafete.rdlc", New DataTable, params, String.Format("Gafete_{0}", ObjPersonal.CvePersonal), "PDF")
End If
End If
ObjPersonal.Dispose()

View File

@@ -823,6 +823,7 @@ ADSScroll = function (tablescroll) {
tablefooter.attr('id', 'ADSF-' + tablescroll.attr('id'));
let trWwidth = $('<tr class="trnopadding ADtr SearchADHeader"></tr>');
let idTheader = tablescroll.data('tableheader');
let scrollwidthrow = tablescroll.data('scrollwidthrow') ? tablescroll.data('scrollwidthrow') : "";
let rowVisibles = isNaN(Number(tablescroll.data('rows'))) ? 1 : Number(tablescroll.data('rows'));
let rowFooter = isNaN(Number(tablescroll.data('footer'))) ? 0 : Number(tablescroll.data('footer'));
let heightBody = isNaN(Number(tablescroll.data('height'))) ? 200 : Number(tablescroll.data('height'));
@@ -861,12 +862,21 @@ ADSScroll = function (tablescroll) {
}
}
let firsttr = null;
tablescroll.find('> tbody > tr,> thead > tr,> tr').each(function () {
tablescroll.find('> tbody > tr' + scrollwidthrow + ',> thead > tr' + scrollwidthrow + ',> tr' + scrollwidthrow +'').each(function () {
var retorno = false;
firsttr = $(this);
if (firsttr.find(' > td[colspan], > th[colspan]').length) { retorno = true; }
return retorno;
});
if (firsttr == null) {
tablescroll.find('> tbody > tr,> thead > tr,> tr').each(function () {
var retorno = false;
firsttr = $(this);
if (firsttr.find(' > td[colspan], > th[colspan]').length) { retorno = true; }
return retorno;
});
}
tablescroll.before(divcontainer);
divcontainer.append(divheader);
divcontainer.append(divbody);

View File

@@ -244,7 +244,7 @@ Partial Class ProductosyServicios
End If
If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) And CvePS = -1 Then
If UsuarioActual.CveEmpresa.Contiene(72, 80) And CvePS = -1 Then
'DivDatos.Attributes("class") = "col-md-12"
TxtPS.Enabled = False
DivDdlTipo.Visible = True

25
testApi.aspx Normal file
View File

@@ -0,0 +1,25 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="testApi.aspx.vb" Inherits="testApi" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
Prueba api de Login
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
<div class="row">
<label class="col-md-12">
<asp:Label runat="server" ID="LblMsg" Font-Bold="true"></asp:Label>
</label>
</div>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
</asp:Content>

51
testApi.aspx.vb Normal file
View File

@@ -0,0 +1,51 @@
Option Strict On
Option Explicit On
Imports System.Data
Imports System.IO
Imports System.Net
Imports Extensiones
Imports Models.Request
Imports Models.Response
Imports Newtonsoft.Json
Partial Class testApi
Inherits ClsPaginas
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
Dim responseGenericModel = New ResponseGenericModel(Of ResponseLogin)()
Dim origResponse As HttpWebResponse
Dim origRequest As HttpWebRequest = DirectCast(HttpWebRequest.Create("http://sig.adssistemas.mx:90/api/usuario/Login"), HttpWebRequest)
'origRequest.Headers.Add("Authorization", "Barer c3NhX2RzdDpBc3AzY3RfMTIzNA==") Esto se usara cuando se tenga que mandar el token (todos excepto el login)
origRequest.AllowAutoRedirect = False
origRequest.Method = "POST"
origRequest.ContentType = "application/json"
origRequest.Accept = "application/json"
origRequest.Expect = "application/json"
Try
Dim requestLogin = New RequestLogin() With {
.UserName = "RPimienta",
.Password = "capillafc"
}
Dim requestJson = JsonConvert.SerializeObject(requestLogin)
origRequest.GetRequestStream.Write(System.Text.Encoding.UTF8.GetBytes(requestJson), 0, System.Text.Encoding.UTF8.GetBytes(requestJson).Count)
origResponse = DirectCast(origRequest.GetResponse(), HttpWebResponse)
Dim Stream As Stream = origResponse.GetResponseStream()
Dim sr As New StreamReader(Stream, Encoding.GetEncoding("utf-8"))
Dim str As String = sr.ReadToEnd()
responseGenericModel = JsonConvert.DeserializeObject(Of ResponseGenericModel(Of ResponseLogin))(str)
If responseGenericModel.IsSuccess Then
LblMsg.Text = $"Bienvenido {responseGenericModel.Result.Nombre}"
End If
Catch ex As WebException
Alert(ex.Response.ToString())
End Try
End If
End Sub
End Class

View File

@@ -150,6 +150,18 @@