Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -100,10 +100,17 @@ Partial Class AC_CatPresupuestoEgresos
|
||||
|
||||
Else
|
||||
'si es anteproyecto
|
||||
If DtPresupuestoEgresos.Rows(0)("Bloqueado").ToString = "0" Then
|
||||
'AndAlso Ejercicio >= UsuarioActual.Empresa.EjercicioActual
|
||||
BtnPresupuesto.Visible = True
|
||||
End If
|
||||
Dim Bloqueado As Boolean = True
|
||||
For Each dbRow As DataRow In DtPresupuestoEgresos.Rows
|
||||
If dbRow("Bloqueado").ToString() = "0" Then Bloqueado = False
|
||||
Next
|
||||
|
||||
BtnPresupuesto.Visible = True
|
||||
|
||||
'If DtPresupuestoEgresos.Rows(0)("Bloqueado").ToString = "0" Then
|
||||
' 'AndAlso Ejercicio >= UsuarioActual.Empresa.EjercicioActual
|
||||
' BtnPresupuesto.Visible = True
|
||||
'End If
|
||||
' If Ejercicio = UsuarioActual.Empresa.EjercicioActual Then
|
||||
End If
|
||||
|
||||
|
||||
@@ -202,7 +202,7 @@ Partial Class AC_PresupuestoEgresos2
|
||||
'Valida Ejercicio
|
||||
If objAC.GetEjerciciosPresupuestoEgresos(UsuarioActual.CveEmpresa) AndAlso objAC.DtResultados.Rows.Count > -1 Then
|
||||
Dim DtEjercicios = objAC.DtResultados.FiltraParametros(String.Format("Ejercicio = {0}", DdlEjercicio.SelectedValue))
|
||||
If DtEjercicios.Rows.Count > 0 AndAlso DtEjercicios.Rows(0)("Bloqueado").ToString = "1" AndAlso txtTotal.Text.ToDecimal > 0 Then
|
||||
If DtEjercicios.Rows.Count > 0 AndAlso DtEjercicios.Rows(0)("Bloqueado").ToString = "1" Then
|
||||
Alert("El Presupuesto de Egresos del ejercicio seleccionado ya esta bloqueado, solo puede generar Presupuestos en ceros.", TipoMensaje.MsgAdvertencia)
|
||||
objAC.Dispose()
|
||||
Exit Sub
|
||||
@@ -234,6 +234,10 @@ Partial Class AC_PresupuestoEgresos2
|
||||
Dim CveUnidadAdministrativa As Integer = CboUnidadAdministrativa.SelectedValue.ToString.ToEntero
|
||||
Dim CveClasificacionOG As Integer = CboClasificacionOG.SelectedValue.ToString.ToEntero
|
||||
|
||||
'If txtTotal.Text.ToDecimal > 0 Then
|
||||
' Alert("El Presupuesto de Egresos del ejercicio seleccionado se generaro proyecto. Después de este proceso se tendrá que autorizar el presupuesto de esta partida.", TipoMensaje.MsgAdvertencia)
|
||||
'Else
|
||||
|
||||
If CvePresupuestoEgresos = 0 Then
|
||||
If objAC.AddPresupuestoEgresos(DdlEjercicio.SelectedValue.ToEntero, CveProgramaOperativo, CveFuenteFinanciamiento, CveTipoGasto, CveUnidadAdministrativa, CveClasificacionOG, Total, Enero, Febrero, Marzo, Abril, Mayo, Junio, Julio, Agosto, Septiembre, Octubre, Noviembre, Diciembre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) > 0 Then
|
||||
Alert("El Presupuesto de Egreso se guardo Correctamente como Anteproyecto", TipoMensaje.MsgInformacion) '"document.location.href=""/AC/CatPresupuestoEgresos.aspx"""
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RegEgresosModificaciones.aspx.vb" Inherits="AC_RegPEAmpRed" %>
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" EnableEventValidation="true" CodeFile="RegEgresosModificaciones.aspx.vb" Inherits="AC_RegPEAmpRed" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
@@ -235,7 +235,7 @@
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UPPersonalizar" UpdateMode="Conditional">
|
||||
<asp:UpdatePanel runat="server" ID="UPPersonalizar">
|
||||
<ContentTemplate>
|
||||
<div id="DivAddPE" class="modal fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
@@ -1192,6 +1192,75 @@ Public Class ClsBancos
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function AddComplementoPagosSinc(cveUsuario As Int32, fechaInicio As String, cveEmpresa As Int32) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_AddComplementoPagosSinc", CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@cveUsuario", SqlDbType.Int).Value = cveUsuario
|
||||
.Add("@fechaInicio", SqlDbType.VarChar).Value = fechaInicio
|
||||
.Add("@cveEmpresa", SqlDbType.Int).Value = cveEmpresa
|
||||
.Add("@cveComplementoPagoSinc", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
retorno = False
|
||||
OnError("Ocurrió un error al cancelar estatus complemento de pago", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
Public Function UpComplementoPagosSinc(cveComplementoPagoSinc As Int32, fechaFin As String) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_UpComplementoPagosSinc", CommandType.StoredProcedure)
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@fechaFin", SqlDbType.VarChar).Value = fechaFin
|
||||
.Add("@cveComplementoPagoSinc", SqlDbType.Int).Value = cveComplementoPagoSinc
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
retorno = False
|
||||
OnError("Ocurrió un error al cancelar estatus complemento de pago", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
Public Function BlockComplementodePago(CveIE As Integer, BloqueadoUtilerias As Boolean, CveComplementoPagoSinc As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Banc_ComplementoPagoBlock")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveIE", SqlDbType.Int).Value = CveIE
|
||||
.Add("@CveComplementoPagoSinc", SqlDbType.Int).Value = CveComplementoPagoSinc
|
||||
.Add("@BloqueadoUtilerias", SqlDbType.Bit).Value = BloqueadoUtilerias
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
Retorno = False
|
||||
OnError("Ocurrió un error al Guardar complemento de pago", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function DropComplementodePago(CveIE As Integer, CveComplementoPagoSinc As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Banc_ComplementoPagoremove")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveIE", SqlDbType.Int).Value = CveIE
|
||||
.Add("@CveComplementoPagoSinc", SqlDbType.Int).Value = CveComplementoPagoSinc
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
Retorno = False
|
||||
OnError("Ocurrió un error al Guardar complemento de pago", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function AddComplementoPago(CveIE As Integer, CveVenta As Integer, Serie As String, Folio As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional CvePrePoliza As Integer = -1, Optional Estatus As Integer = 1) As Integer
|
||||
Dim Retorno As Integer = 0
|
||||
DataAdapter("PA_Banc_ComplementoPagoAdd")
|
||||
|
||||
@@ -212,6 +212,8 @@ Public Class ClsContabilidad
|
||||
|
||||
If ex.Message.Contains("50015;") Then
|
||||
OnError("No se puede registrar una póliza en un ejercicio Cerrado", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
ElseIf ex.Message.Contains("CK_Conta_PrePolizas_Concepto") Then
|
||||
OnError("Ocurrio un error al registrar la póliza, el concepto o descripción no puede ir vacio", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
Else
|
||||
OnError("Ocurrió un error al Guardar", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End If
|
||||
|
||||
@@ -1356,6 +1356,113 @@ Public Class ClsOIEventos
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
#Region "Circular"
|
||||
Public Function GetCircular(CveEmpresa As Integer, Optional CveCircular As Integer = -1, Optional FechaI As String = "-1", Optional FechaF As String = "-1",
|
||||
Optional CveUsuario As Integer = -1) As Boolean
|
||||
|
||||
FechaI = If(FechaI = "-1", Today.AddYears(-1).ToString, FechaI)
|
||||
FechaF = If(FechaF = "-1", Today.AddYears(1).ToString, FechaF)
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_OI_CircularesGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveCircular", SqlDbType.Int).Value = CveCircular
|
||||
.Add("@FechaI", SqlDbType.DateTime).Value = FechaI
|
||||
.Add("@FechaF", SqlDbType.DateTime).Value = FechaF
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al consultar el Circular.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function AddCircular(Asunto As String, Circular As String, CorreosInternos As String, FechaIng As String, CveUsuario As Integer, CveEmpresa As Integer,
|
||||
Optional CorreosExternos As String = "-1", Optional Adjunto As String = "-1") As Integer
|
||||
|
||||
Dim Retorno As Integer = -1
|
||||
|
||||
DataAdapter("PA_OI_CircularesAdd")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Asunto", SqlDbType.VarChar).Value = Asunto
|
||||
.Add("@Circular", SqlDbType.VarChar).Value = Circular
|
||||
.Add("@CorreosInternos", SqlDbType.VarChar).Value = CorreosInternos
|
||||
.Add("@FechaIng", SqlDbType.DateTime).Value = FechaIng
|
||||
.Add("@CorreosExternos", SqlDbType.VarChar).Value = CorreosExternos
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@Adjunto", SqlDbType.VarChar).Value = Adjunto
|
||||
.Add("@CveCircular", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = SqlAdapter.SelectCommand.Parameters("@CveCircular").Value.ToString.ToEntero
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al agregar el Circular.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateCircular(CveCircular As Integer, Asunto As String, Circular As String, CorreosInternos As String, CorreosExternos As String, Optional Adjunto As String = "-1") As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_OI_CircularesUpdate")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveCircular", SqlDbType.Int).Value = CveCircular
|
||||
.Add("@Asunto", SqlDbType.VarChar).Value = Asunto
|
||||
.Add("@Circular", SqlDbType.VarChar).Value = Circular
|
||||
.Add("@CorreosInternos", SqlDbType.VarChar).Value = CorreosInternos
|
||||
.Add("@CorreosExternos", SqlDbType.VarChar).Value = CorreosExternos
|
||||
.Add("@Adjunto", SqlDbType.VarChar).Value = Adjunto
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al actualizar el Circular.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function DeleteCircular(CveCircular As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_OI_CircularesRemove")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveCircular", SqlDbType.Int).Value = CveCircular
|
||||
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al eliminar el Circular.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
' IDisposable
|
||||
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
|
||||
|
||||
@@ -3976,6 +3976,8 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Compras/CatPaqueteriasGuiasTipo.aspx".ToUpper(), 753)
|
||||
PaginaDict.Add("/Compras/RepEvaluacionesProveedores.aspx".ToUpper(), 754)
|
||||
PaginaDict.Add("/Ventas/RepTopClientesVentas.aspx".ToUpper(), 755)
|
||||
PaginaDict.Add("/OI/Circular.aspx".ToUpper(), 756)
|
||||
PaginaDict.Add("/OI/CircularDetalle.aspx".ToUpper(), 757)
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -5159,6 +5161,7 @@ Public Class ClsPaginas
|
||||
Dim ds As New DataSet
|
||||
For Each rpds As ReportDataSource In DataSource
|
||||
Dim dt As DataTable = DirectCast(rpds.Value, Data.DataTable)
|
||||
dt = dt.Copy()
|
||||
dt.TableName = rpds.Name
|
||||
ds.Tables.Add(dt)
|
||||
Next
|
||||
@@ -5168,12 +5171,12 @@ Public Class ClsPaginas
|
||||
param.Values = {rpds.Values(0)}
|
||||
params.Add(param)
|
||||
Next
|
||||
|
||||
Dim ruta = wsreport.StreamPDF(RutaReporte, ds, params.ToArray(), NombreArchivo, Formato, CveEmpresa, CveUsuario)
|
||||
If File.Exists(ruta) Then
|
||||
Bytes = File.ReadAllBytes(ruta)
|
||||
File.Delete(ruta)
|
||||
End If
|
||||
Bytes = wsreport.StreamPDFBytes(RutaReporte, ds, params.ToArray(), NombreArchivo, Formato, CveEmpresa, CveUsuario)
|
||||
'Dim ruta = wsreport.StreamPDF(RutaReporte, ds, params.ToArray(), NombreArchivo, Formato, CveEmpresa, CveUsuario)
|
||||
'If File.Exists(ruta) Then
|
||||
' Bytes = File.ReadAllBytes(ruta)
|
||||
' File.Delete(ruta)
|
||||
'End If
|
||||
'Dim setup As AppDomainSetup = New AppDomainSetup
|
||||
'With setup
|
||||
' .ApplicationBase = Environment.CurrentDirectory
|
||||
|
||||
@@ -174,11 +174,26 @@ Public Class ClsSisUsuarios
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetModulosUsuariosPlataforma(CveUsuario As Integer, CvePlataforma As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("SELECT M.* FROM [dbo].[UsuariosModulos] UM INNER JOIN Modulos M ON M.CveModulo=UM.CveModulo WHERE M.CvePlataforma =@CvePlataforma AND @CveUsuario = UM .CveUsuario AND UM.Permitir =1", CommandType.Text)
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CvePlataforma", SqlDbType.Int).Value = CvePlataforma
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As SqlException
|
||||
OnError("Ocurrio un error al obtener el menu.", ex)
|
||||
Retorno = False
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function ValidaUsuario(Usuario As String, Password As String, tIMEI As String, Optional CveEmpresa As Integer = -1) As Usuario
|
||||
Dim Retorno As Usuario = Nothing
|
||||
|
||||
DataAdapter("PA_Sis_UsuariosGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = -1
|
||||
.Add("@CveRol", SqlDbType.Int).Value = -1
|
||||
@@ -186,7 +201,6 @@ Public Class ClsSisUsuarios
|
||||
.Add("@Contraseña", SqlDbType.VarChar).Value = Password
|
||||
.Add("@EsLogIn", SqlDbType.Bit).Value = 1
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
|
||||
@@ -233,6 +233,7 @@
|
||||
<xs:element name="NumCuenta" msprop:Generator_ColumnVarNameInTable="columnNumCuenta" msprop:Generator_ColumnPropNameInRow="NumCuenta" msprop:Generator_ColumnPropNameInTable="NumCuentaColumn" msprop:Generator_UserColumnName="NumCuenta" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="CveMoneda" msprop:Generator_ColumnVarNameInTable="columnCveMoneda" msprop:Generator_ColumnPropNameInRow="CveMoneda" msprop:Generator_ColumnPropNameInTable="CveMonedaColumn" msprop:Generator_UserColumnName="CveMoneda" type="xs:short" minOccurs="0" />
|
||||
<xs:element name="CveVenta" msprop:Generator_ColumnVarNameInTable="columnCveVenta" msprop:Generator_ColumnPropNameInRow="CveVenta" msprop:Generator_ColumnPropNameInTable="CveVentaColumn" msprop:Generator_UserColumnName="CveVenta" type="xs:short" minOccurs="0" />
|
||||
<xs:element name="PorcentajeIVA" msprop:Generator_ColumnVarNameInTable="columnPorcentajeIVA" msprop:Generator_ColumnPropNameInRow="PorcentajeIVA" msprop:Generator_ColumnPropNameInTable="PorcentajeIVAColumn" msprop:Generator_UserColumnName="PorcentajeIVA" type="xs:string" minOccurs="0" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
25
App_Code/WS/WSApiController.vb
Normal file
25
App_Code/WS/WSApiController.vb
Normal file
@@ -0,0 +1,25 @@
|
||||
Imports System.Web.Http
|
||||
Imports Extensiones
|
||||
Imports Microsoft.VisualBasic
|
||||
|
||||
Public Class WSApiController
|
||||
Inherits ApiController
|
||||
|
||||
Public ReadOnly Property CveUsuario As Integer
|
||||
Get
|
||||
Return Decripta(Request.Headers.Authorization.Parameter).Split("|"c)(0).ToEntero()
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property CveEmpresa As Integer
|
||||
Get
|
||||
Return Decripta(Request.Headers.Authorization.Parameter).Split("|"c)(4).ToEntero()
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property RutaEmpresa As String
|
||||
Get
|
||||
Return String.Format("{0}Empresas\{1}\", AppDomain.CurrentDomain.BaseDirectory, Decripta(Request.Headers.Authorization.Parameter).Split("|"c)(4))
|
||||
End Get
|
||||
End Property
|
||||
'
|
||||
End Class
|
||||
@@ -8,7 +8,7 @@ Namespace SIG
|
||||
<Extensiones.BasicAuthentication()>
|
||||
<RoutePrefix("api/SIGVentas")>
|
||||
Public Class SIGVentasController
|
||||
Inherits ApiController
|
||||
Inherits WSApiController
|
||||
|
||||
<Route("creartrama")>
|
||||
<HttpPost>
|
||||
@@ -57,12 +57,107 @@ Namespace SIG
|
||||
|
||||
Using Banco As New ClsBancos()
|
||||
If Banco.GetComplementoPagosRep(CveCliente, FechaI, FechaF, CveIE, CveVenta, opcion, CveEmpresa, Estatus:=status) Then
|
||||
respuesta = Banco.DtResultados
|
||||
respuesta = Banco.DtResultados.FiltraParametros("BloqueadoUtilerias = 0")
|
||||
End If
|
||||
Dim Serie As String = "Pag"
|
||||
Dim CveComplementoPagoTimbre As Integer = -1
|
||||
Dim Folio As Integer = -1
|
||||
respuesta.Columns.Add("CveComplementoPagoTimbre", GetType(Int32))
|
||||
respuesta.Columns.Add("CveComplementoPagoSinc", GetType(Int32))
|
||||
respuesta.Columns.Add("FolioTimbre", GetType(String))
|
||||
respuesta.AcceptChanges()
|
||||
Dim thencommit As Boolean = True
|
||||
Banco.IniciaTransacSQL()
|
||||
If Banco.AddComplementoPagosSinc(CveUsuario, DateTime.Now.ToString("yyyy/MM/dd"), CveEmpresa) Then
|
||||
Dim CveComplementoPagoSinc As Integer = Banco.DtResultados.Rows(0)("CveComplementoPagoSinc").ToString().ToEntero()
|
||||
For Each dr As System.Data.DataRow In respuesta.Select("CveVenta Is NULL")
|
||||
'CveComplementoPagoTimbre = Banco.AddComplementoPago(dr("CveIE").ToString().ToEntero(), -1, Serie, Folio, Me.CveUsuario, CveEmpresa, CvePrePoliza:=-1, Estatus:=1)
|
||||
Folio = 1 'Banco.FActual
|
||||
'dr("CveComplementoPagoTimbre") = CveComplementoPagoTimbre
|
||||
dr("FolioTimbre") = Folio
|
||||
dr("CveComplementoPagoSinc") = CveComplementoPagoSinc
|
||||
If Not Banco.BlockComplementodePago(dr("CveIE").ToString().ToEntero(), 1, CveComplementoPagoSinc) Then
|
||||
thencommit = False
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
thencommit = False
|
||||
End If
|
||||
respuesta.AcceptChanges()
|
||||
If thencommit Then
|
||||
Banco.Commit()
|
||||
Else
|
||||
respuesta = New System.Data.DataTable()
|
||||
Banco.RollBack()
|
||||
End If
|
||||
End Using
|
||||
|
||||
Return JSutil.strresponse(respuesta, (Not IsNothing(respuesta)), "")
|
||||
End Function
|
||||
|
||||
|
||||
<Route("SincronizarComplementoPago")>
|
||||
<HttpPost>
|
||||
Public Function SincronizarComplementoPago(<FromBody()> params As WsBody) As Object
|
||||
Dim dt As System.Data.DataTable = Newtonsoft.Json.JsonConvert.DeserializeObject(Of System.Data.DataTable)(Decripta(params.Datos))
|
||||
Dim dterror As Data.DataTable = dt.Copy()
|
||||
Dim CveEmpresa As Integer = 119
|
||||
Dim rutaxml As String = String.Format("{0}xml", RutaEmpresa)
|
||||
If Not System.IO.Directory.Exists(rutaxml) Then
|
||||
System.IO.Directory.CreateDirectory(rutaxml)
|
||||
End If
|
||||
|
||||
Using objbancos As New ClsBancos()
|
||||
objbancos.IniciaTransacSQL()
|
||||
dt.AcceptChanges()
|
||||
Dim continuar As Boolean = True
|
||||
For Each dr As System.Data.DataRow In dt.Rows
|
||||
If continuar AndAlso dr("Sincronizado").ToString() <> "1" Then
|
||||
If dr("SeTimbro").ToString() = 1 Then
|
||||
Dim CveComplementoPagoTimbre As Integer
|
||||
Try
|
||||
Using ArchivoW As New IO.StreamWriter(String.Format("{0}\{1}.xml", rutaxml, dr("FolioFiscalTimbre").ToString()), True, System.Text.Encoding.UTF8)
|
||||
Try
|
||||
ArchivoW.Write(dr("timbreXml").ToString())
|
||||
Catch
|
||||
continuar = False
|
||||
End Try
|
||||
End Using
|
||||
Catch
|
||||
continuar = False
|
||||
End Try
|
||||
If continuar Then
|
||||
CveComplementoPagoTimbre = objbancos.AddComplementoPago(dr("CveIE").ToString().ToEntero(), -1, "Pag", dr("FolioTimbre"), Me.CveUsuario, CveEmpresa, CvePrePoliza:=-1, Estatus:=1)
|
||||
continuar = CveComplementoPagoTimbre > 0
|
||||
End If
|
||||
If continuar Then continuar = objbancos.UpdateComplementoPago(CveComplementoPagoTimbre, dr("FolioFiscalTimbre").ToString(), dr("CvePAC").ToString().ToEntero(), CveEmpresa)
|
||||
If continuar Then
|
||||
dr("Sincronizado") = 1
|
||||
End If
|
||||
Else
|
||||
|
||||
If objbancos.DropComplementodePago(dr("CveIE").ToString().ToEntero(), 0) Then 'dr("CveComplementoPagoSinc").ToString().ToEntero()) Then
|
||||
dr("Sincronizado") = 1
|
||||
Else
|
||||
continuar = False
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
Next
|
||||
If continuar Then
|
||||
objbancos.Commit()
|
||||
Else
|
||||
dt = dterror
|
||||
objbancos.RollBack()
|
||||
End If
|
||||
End Using
|
||||
|
||||
dt.AcceptChanges()
|
||||
Return JSutil.strresponse(dt, (Not IsNothing(dt)), "")
|
||||
End Function
|
||||
|
||||
' GET api/<controller>
|
||||
Public Function GetValues() As IEnumerable(Of String)
|
||||
Return New String() {"value1", "value2"}
|
||||
|
||||
@@ -50,6 +50,8 @@ Namespace SIG
|
||||
|
||||
Dim OjEmpresa As Empresa = Nothing
|
||||
If user IsNot Nothing Then
|
||||
objuser.GetModulosUsuariosPlataforma(user.CveUsuario, 8)
|
||||
Dim dtmodulos As System.Data.DataTable = objuser.DtResultados
|
||||
If CveEmpresastr.ToEntero() > 0 Then
|
||||
user.CveEmpresa = CveEmpresastr.ToEntero()
|
||||
End If
|
||||
@@ -82,6 +84,7 @@ Namespace SIG
|
||||
Retorno = New List(Of String)
|
||||
Retorno.Add(Extensiones.ModExtensiones.Encripta(Newtonsoft.Json.JsonConvert.SerializeObject(Retornouser)))
|
||||
Retorno.Add(Extensiones.ModExtensiones.Encripta(Newtonsoft.Json.JsonConvert.SerializeObject(OjEmpresa)))
|
||||
Retorno.Add(Extensiones.ModExtensiones.Encripta(Newtonsoft.Json.JsonConvert.SerializeObject(dtmodulos)))
|
||||
|
||||
End If
|
||||
End Using
|
||||
|
||||
@@ -56,6 +56,33 @@
|
||||
</s:sequence>
|
||||
</s:complexType>
|
||||
</s:element>
|
||||
<s:element name="StreamPDFBytes">
|
||||
<s:complexType>
|
||||
<s:sequence>
|
||||
<s:element minOccurs="0" maxOccurs="1" name="RutaReporte" type="s:string" />
|
||||
<s:element minOccurs="0" maxOccurs="1" name="source">
|
||||
<s:complexType>
|
||||
<s:sequence>
|
||||
<s:element ref="s:schema" />
|
||||
<s:any />
|
||||
</s:sequence>
|
||||
</s:complexType>
|
||||
</s:element>
|
||||
<s:element minOccurs="0" maxOccurs="1" name="Parametros" type="tns:ArrayOfReportParameter" />
|
||||
<s:element minOccurs="0" maxOccurs="1" name="NombreArchivo" type="s:string" />
|
||||
<s:element minOccurs="0" maxOccurs="1" name="Formato" type="s:string" />
|
||||
<s:element minOccurs="1" maxOccurs="1" name="CveEmpresa" type="s:int" />
|
||||
<s:element minOccurs="1" maxOccurs="1" name="CveUsuario" type="s:int" />
|
||||
</s:sequence>
|
||||
</s:complexType>
|
||||
</s:element>
|
||||
<s:element name="StreamPDFBytesResponse">
|
||||
<s:complexType>
|
||||
<s:sequence>
|
||||
<s:element minOccurs="0" maxOccurs="1" name="StreamPDFBytesResult" type="s:base64Binary" />
|
||||
</s:sequence>
|
||||
</s:complexType>
|
||||
</s:element>
|
||||
</s:schema>
|
||||
</wsdl:types>
|
||||
<wsdl:message name="HelloWorldSoapIn">
|
||||
@@ -70,6 +97,12 @@
|
||||
<wsdl:message name="StreamPDFSoapOut">
|
||||
<wsdl:part name="parameters" element="tns:StreamPDFResponse" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="StreamPDFBytesSoapIn">
|
||||
<wsdl:part name="parameters" element="tns:StreamPDFBytes" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="StreamPDFBytesSoapOut">
|
||||
<wsdl:part name="parameters" element="tns:StreamPDFBytesResponse" />
|
||||
</wsdl:message>
|
||||
<wsdl:portType name="WebServiceSoap">
|
||||
<wsdl:operation name="HelloWorld">
|
||||
<wsdl:input message="tns:HelloWorldSoapIn" />
|
||||
@@ -79,6 +112,10 @@
|
||||
<wsdl:input message="tns:StreamPDFSoapIn" />
|
||||
<wsdl:output message="tns:StreamPDFSoapOut" />
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="StreamPDFBytes">
|
||||
<wsdl:input message="tns:StreamPDFBytesSoapIn" />
|
||||
<wsdl:output message="tns:StreamPDFBytesSoapOut" />
|
||||
</wsdl:operation>
|
||||
</wsdl:portType>
|
||||
<wsdl:binding name="WebServiceSoap" type="tns:WebServiceSoap">
|
||||
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
|
||||
@@ -100,6 +137,15 @@
|
||||
<soap:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="StreamPDFBytes">
|
||||
<soap:operation soapAction="http://tempuri.org/StreamPDFBytes" style="document" />
|
||||
<wsdl:input>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:binding>
|
||||
<wsdl:binding name="WebServiceSoap12" type="tns:WebServiceSoap">
|
||||
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
|
||||
@@ -121,6 +167,15 @@
|
||||
<soap12:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="StreamPDFBytes">
|
||||
<soap12:operation soapAction="http://tempuri.org/StreamPDFBytes" style="document" />
|
||||
<wsdl:input>
|
||||
<soap12:body use="literal" />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap12:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:binding>
|
||||
<wsdl:service name="WebService">
|
||||
<wsdl:port name="WebServiceSoap" binding="tns:WebServiceSoap">
|
||||
|
||||
@@ -307,7 +307,7 @@ Partial Class Bancos_ProductosFinancieros
|
||||
Dim FolioPoliza As Integer = -1
|
||||
Dim CveIE As Integer = -1
|
||||
|
||||
CvePrePoliza = ObjMov.AddPrePolizas("ProductosFinancieros/Registrar", DdlTipoMovimiento.SelectedValue.ToEntero, Importe, Importe, CveMoneda, TxtFecha.Text.ToDate, TxtConcepto.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
CvePrePoliza = ObjMov.AddPrePolizas("ProductosFinancieros/Registrar", DdlTipoMovimiento.SelectedValue.ToEntero, Importe, Importe, CveMoneda, TxtFecha.Text.ToDate, DdlTipoMovimiento.SelectedItem.Text & If(TxtConcepto.Text.Trim.Length > 0, " - " & TxtConcepto.Text.Trim, ""), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
If Not DdlTarjeta.Visible OrElse DdlTarjeta.SelectedValue.ToEntero < 1 Then
|
||||
CveIE = ObjBancos.AddBancos_IE(DdlCuentas.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, TxtFecha.Text.ToDate, TxtFolio.Text, "", Importe, CveMoneda, If(CveMoneda = 2, GlobalTipoCambio(TxtFecha.Text.Trim.ToDate).ToString.ToDouble, 0), TxtObservacion.Text.Trim, "", False, False, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
End If
|
||||
@@ -366,7 +366,7 @@ Partial Class Bancos_ProductosFinancieros
|
||||
idCuentaContabilizacion = 0
|
||||
End If
|
||||
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, "", If(DdlTarjeta.Visible AndAlso DdlTarjeta.SelectedValue.ToEntero > 0 AndAlso ConceptoContable = 30, 42, ConceptoContable), TxtConcepto.Text, FechaMovimiento, If(DdlTarjeta.Visible AndAlso DdlTarjeta.SelectedValue.ToEntero > 0 AndAlso ConceptoContable = 30, DdlTarjeta.SelectedValue.ToEntero, IdCtaContablePP), -1, CveIE, ImporteMX:=importeMovimiento, CveCuenta:=If(UsuarioActual.Empresa.UsaContabilidad AndAlso UsuarioActual.Empresa.UsaContabilidadSIG, ObtenerCuentaDobleConta(If(DdlTarjeta.Visible AndAlso DdlTarjeta.SelectedValue.ToEntero > 0 AndAlso ConceptoContable = 30, DdlTarjeta.SelectedValue.ToEntero, IdCtaContablePP), UsuarioActual.CveEmpresa), -1)) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, "", If(DdlTarjeta.Visible AndAlso DdlTarjeta.SelectedValue.ToEntero > 0 AndAlso ConceptoContable = 30, 42, ConceptoContable), DdlTipoMovimiento.SelectedItem.Text & If(TxtConcepto.Text.Trim.Length > 0, " - " & TxtConcepto.Text.Trim, ""), FechaMovimiento, If(DdlTarjeta.Visible AndAlso DdlTarjeta.SelectedValue.ToEntero > 0 AndAlso ConceptoContable = 30, DdlTarjeta.SelectedValue.ToEntero, IdCtaContablePP), -1, CveIE, ImporteMX:=importeMovimiento, CveCuenta:=If(UsuarioActual.Empresa.UsaContabilidad AndAlso UsuarioActual.Empresa.UsaContabilidadSIG, ObtenerCuentaDobleConta(If(DdlTarjeta.Visible AndAlso DdlTarjeta.SelectedValue.ToEntero > 0 AndAlso ConceptoContable = 30, DdlTarjeta.SelectedValue.ToEntero, IdCtaContablePP), UsuarioActual.CveEmpresa), -1)) Then
|
||||
ErrorTransaccion = True
|
||||
End If
|
||||
End If
|
||||
@@ -405,7 +405,7 @@ Partial Class Bancos_ProductosFinancieros
|
||||
If DdlTipoMovimiento.SelectedValue = "15" Or DdlTipoMovimiento.SelectedValue = "17" Or DdlTipoMovimiento.SelectedValue = "50" Then
|
||||
'PRESUPUESTO EGRESOS
|
||||
IdPoliza = ObjContaAC.AddPoliza(3, TxtConcepto.Text.Trim, Importe, Importe, UsuarioActual.CveUsuario, TxtFecha.Text.ToDate)
|
||||
|
||||
FolioPoliza = ObjContaAC.Folio
|
||||
If IdPoliza > 0 Then
|
||||
FolioPoliza = ObjContaAC.Folio
|
||||
Dim DtPresupuestosTemp As DataTable
|
||||
@@ -493,7 +493,7 @@ Partial Class Bancos_ProductosFinancieros
|
||||
If DdlTipoMovimiento.SelectedValue = "16" Then
|
||||
'PRESUPUESTO INGRESOS
|
||||
IdPoliza = ObjContaAC.AddPoliza(1, TxtConcepto.Text.Trim, Importe, Importe, UsuarioActual.CveUsuario, Fecha)
|
||||
|
||||
FolioPoliza = ObjContaAC.Folio
|
||||
If IdPoliza > 0 Then
|
||||
FolioPoliza = ObjContaAC.Folio
|
||||
Dim DtPresupuestosTemp As DataTable
|
||||
|
||||
@@ -104,16 +104,19 @@ Partial Class Bancos_RepComplementoPago
|
||||
Mensaje = "El Pago contiene facturas que no tienen folio fiscal"
|
||||
End If
|
||||
End If
|
||||
If e.Row.DBCampo("BloqueadoUtilerias") = "1" Then
|
||||
Mensaje = "Bloqueado Timbrando por aplicacion"
|
||||
End If
|
||||
e.Row.FCLiteral("LtlMon").Text = e.Row.DBCampo("PagoAbreviaturaSAT")
|
||||
|
||||
If Not Mensaje.Length = 0 Then
|
||||
e.Row.ForeColor = Drawing.Color.Red
|
||||
e.Row.FCCheckBox("Chk").Enabled = False
|
||||
e.Row.FCCheckBox("Chk").ToolTip = Mensaje
|
||||
End If
|
||||
If Not Mensaje.Length = 0 Then
|
||||
e.Row.ForeColor = Drawing.Color.Red
|
||||
e.Row.FCCheckBox("Chk").Enabled = False
|
||||
e.Row.FCCheckBox("Chk").ToolTip = Mensaje
|
||||
End If
|
||||
|
||||
Else
|
||||
e.Row.FCHyperLink("HplXML").Visible = True : e.Row.FCHyperLink("HplXML").NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CompP&EXT=xml&CveComplementoPago={0}&SerieFolio={1}&CveIE={2}", e.Row.DBCampo("CveComplementoPago"), e.Row.DBCampo("SerieFolioPago").ToString.Replace("&", "%26%"), e.Row.DBCampo("CveIE").ToString)))
|
||||
Else
|
||||
e.Row.FCHyperLink("HplXML").Visible = True : e.Row.FCHyperLink("HplXML").NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CompP&EXT=xml&CveComplementoPago={0}&SerieFolio={1}&CveIE={2}", e.Row.DBCampo("CveComplementoPago"), e.Row.DBCampo("SerieFolioPago").ToString.Replace("&", "%26%"), e.Row.DBCampo("CveIE").ToString)))
|
||||
e.Row.FCHyperLink("HplPDF").Visible = True : e.Row.FCHyperLink("HplPDF").NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CompP&EXT=pdf&CveComplementoPago={0}&SerieFolio={1}&CveIE={2}", e.Row.DBCampo("CveComplementoPago"), e.Row.DBCampo("SerieFolioPago").ToString.Replace("&", "%26%"), e.Row.DBCampo("CveIE").ToString)))
|
||||
e.Row.FCLinkButton("LnkSendMail").Visible = True
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
15190
Bin/Newtonsoft.Json.xml
15190
Bin/Newtonsoft.Json.xml
File diff suppressed because it is too large
Load Diff
@@ -366,6 +366,7 @@ public partial class CRM_Acercamiento : ClsPaginas
|
||||
}
|
||||
|
||||
CargaImagenes();
|
||||
CargaDdl();
|
||||
|
||||
UpEncabezado.Update();
|
||||
UPAcercamiento.Update();
|
||||
@@ -398,8 +399,6 @@ public partial class CRM_Acercamiento : ClsPaginas
|
||||
|
||||
RecuperaCve();
|
||||
TxtFechaApertura.Text = DateTime.Now.ToShortDateString();
|
||||
|
||||
CargaDdl();
|
||||
}
|
||||
|
||||
protected void RecuperaCve()
|
||||
@@ -420,7 +419,7 @@ public partial class CRM_Acercamiento : ClsPaginas
|
||||
|
||||
if (ObjCRM.GetProbabilidadAcercamiento(UsuarioActual.CveEmpresa, 1))
|
||||
{
|
||||
DdlProbabilidadAcercamiento.DataSource = ObjCRM.DtResultados;
|
||||
DdlProbabilidadAcercamiento.DataSource = ObjCRM.DtResultados.FiltraParametros(String.Format("CveTipoProceso = {0}", CveTipoProceso));
|
||||
}
|
||||
if (ObjCRM.GetEmpresasCRM(UsuarioActual.CveEmpresa))
|
||||
{
|
||||
@@ -434,7 +433,7 @@ public partial class CRM_Acercamiento : ClsPaginas
|
||||
//}
|
||||
if (ObjCRM.GetMedioCaptacion(UsuarioActual.CveEmpresa, 1))
|
||||
{
|
||||
DdlMedioCaptacion.DataSource = ObjCRM.DtResultados;
|
||||
DdlMedioCaptacion.DataSource = ObjCRM.DtResultados.FiltraParametros(String.Format("CveTipoProceso = {0}",CveTipoProceso));
|
||||
DdlMedioCaptacion.Items.Insert(0, new ListItem("Seleccione ", "-1"));
|
||||
}
|
||||
|
||||
|
||||
@@ -156,6 +156,7 @@ public partial class CRM_CatEtapasProceso : ClsPaginas
|
||||
DdlTipoProceso.SelectedValueExist(-1);
|
||||
|
||||
DdlTipoProceso.DataBind();
|
||||
DdlTipoProceso.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
DdlFiltroProceso.DataBind();
|
||||
|
||||
UPFiltros.Update();
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<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>
|
||||
<asp:GridView ID="GVDatos" runat="server" DataKeyNames="CveMedioCaptacion,MedioCaptacion, Descripcion, Estatus, CveEstatus, UsuarioIng, CveUsuarioIng, FechaIng" EmptyDataText="No se han registrado Medios de Captación"
|
||||
<asp:GridView ID="GVDatos" runat="server" DataKeyNames="CveMedioCaptacion,MedioCaptacion, Descripcion, Estatus, CveEstatus, UsuarioIng, CveUsuarioIng, FechaIng,CveTipoProceso, TipoProceso" EmptyDataText="No se han registrado Medios de Captación"
|
||||
EmptyDataRowStyle-HorizontalAlign="Center" CssClass="table table-striped table-advance table-hover ScrollAD Widthall mysmallbtn" data-sort="true"
|
||||
GridLines="None" AutoGenerateColumns="false" OnRowDeleting="GVDatos_RowDeleting" OnRowDataBound="GVDatos_RowDataBound">
|
||||
<Columns>
|
||||
@@ -52,6 +52,11 @@
|
||||
<asp:Label ID="lblUsuarioIng" runat="server" Text='<%# Eval("UsuarioIng")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Tipo Proceso" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblTipoProceso" runat="server" Text='<%# Eval("TipoProceso")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<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>
|
||||
@@ -87,6 +92,10 @@
|
||||
<label runat="server" id="lblEstatus" for="<%= ChkEstatus.ClientID.ToString()%>">Estatus:</label>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" />
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright" id="DivTipoProceso" runat="server">
|
||||
<label runat="server" id="LblTipoProceso" for="<%= DdlTipoProceso.ClientID.ToString()%>">Tipo Proceso:</label><br />
|
||||
<asp:DropDownList runat="server" ID="DdlTipoProceso" CssClass="form-control input-sm select2me" Width="50%" DataValueField="CveTipoProceso" DataTextField="TipoProceso"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnGuardar" OnClick="BtnGuardar_Click" runat="server" Text="Agregar" CssClass="btn btn-primary" ValidationGroup="VGGuardar" />
|
||||
|
||||
@@ -54,6 +54,7 @@ public partial class CRM_CatMediosCaptacion : ClsPaginas
|
||||
if (!IsPostBack)
|
||||
{
|
||||
CargaDatos();
|
||||
CargarModalDatos();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,6 +72,19 @@ public partial class CRM_CatMediosCaptacion : ClsPaginas
|
||||
GVDatos.DataBind();
|
||||
UPDatos.Update();
|
||||
}
|
||||
|
||||
private void CargarModalDatos()
|
||||
{
|
||||
ClsCRM ObjCRM = new ClsCRM();
|
||||
if (ObjCRM.GetTipoProceso(UsuarioActual.CveEmpresa))
|
||||
{
|
||||
DdlTipoProceso.DataSource = ObjCRM.DtResultados;
|
||||
}
|
||||
ObjCRM.Dispose();
|
||||
DdlTipoProceso.DataBind();
|
||||
DdlTipoProceso.Items.Insert(0,new ListItem("Seleccione","-1"));
|
||||
}
|
||||
|
||||
protected void limpiarCamposModal()
|
||||
{
|
||||
if (EsEditar == 1)
|
||||
@@ -88,6 +102,7 @@ public partial class CRM_CatMediosCaptacion : ClsPaginas
|
||||
TxtMedioCaptacion.Text = "";
|
||||
TxtDescripcion.Text = "";
|
||||
ChkEstatus.Checked = true;
|
||||
DdlTipoProceso.SelectedValue = "-1";
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -142,7 +157,7 @@ public partial class CRM_CatMediosCaptacion : ClsPaginas
|
||||
TxtMedioCaptacion.Text = GvRow.DataKey("MedioCaptacion").ToString();
|
||||
TxtDescripcion.Text = GvRow.DataKey("Descripcion").ToString();
|
||||
ChkEstatus.Checked = GvRow.DataKey("CveEstatus").ToString() == "True" ? true : false;
|
||||
|
||||
DdlTipoProceso.SelectedValue = GvRow.DataKey("CveTipoProceso").ToString();
|
||||
UPModal.Update();
|
||||
|
||||
this.RegistraScript("$('#DivModal').modal();");
|
||||
@@ -160,14 +175,14 @@ public partial class CRM_CatMediosCaptacion : ClsPaginas
|
||||
|
||||
if (EsEditar == 0)
|
||||
{
|
||||
if (ObjCRM.AddMedioCaptacion(MedioCaptacion, Descripcion, UsuarioActual.CveEmpresa, CveUsuarioIng))
|
||||
if (ObjCRM.AddMedioCaptacion(MedioCaptacion, Descripcion, UsuarioActual.CveEmpresa, CveUsuarioIng,DdlTipoProceso.SelectedValue.ToEntero()))
|
||||
{
|
||||
Alert("El Medio de Captación fue creado correctamente.", ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ObjCRM.UpdateMedioCaptacion(MedioCaptacion, Descripcion, Estatus, CveMedioCaptacion))
|
||||
if (ObjCRM.UpdateMedioCaptacion(MedioCaptacion, Descripcion, Estatus, CveMedioCaptacion,DdlTipoProceso.SelectedValue.ToEntero()))
|
||||
{
|
||||
Alert("El Medio de Captación fue actualizado correctamente.", ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<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>
|
||||
<asp:GridView ID="GVDatos" runat="server" DataKeyNames="CveProbabilidadAcercamiento, ProbabilidadAcercamiento, Estatus, CveEstatus, CveEmpresa, UsuarioIng, CveUsuarioIng, FechaIng"
|
||||
<asp:GridView ID="GVDatos" runat="server" DataKeyNames="CveProbabilidadAcercamiento, ProbabilidadAcercamiento, Estatus, CveEstatus, CveEmpresa, UsuarioIng, CveUsuarioIng, FechaIng,CveTipoProceso,TipoProceso"
|
||||
EmptyDataText="No se han registrado conceptos de Probabilidades de Acercamiento" EmptyDataRowStyle-HorizontalAlign="Center"
|
||||
CssClass="table table-striped table-advance table-hover ScrollAD Widthall mysmallbtn" data-sort="true" GridLines="None"
|
||||
AutoGenerateColumns="false" OnRowDeleting="GVDatos_RowDeleting" OnRowDataBound="GVDatos_RowDataBound">
|
||||
@@ -53,6 +53,11 @@
|
||||
<asp:Label ID="lblUsuarioIng" runat="server" Text='<%# Eval("UsuarioIng")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Tipo Proceso que Ingresó" ItemStyle-Width="25%" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblTipoProceso" runat="server" Text='<%# Eval("TipoProceso")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<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>
|
||||
@@ -88,6 +93,10 @@
|
||||
<label runat="server" id="lblEstatus" for="<%= ChkEstatus.ClientID.ToString()%>">Estatus:</label>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" />
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright" id="DivTipoProceso" runat="server">
|
||||
<label runat="server" id="LblTipoProceso" for="<%= DdlTipoProceso.ClientID.ToString()%>">Tipo Proceso:</label><br />
|
||||
<asp:DropDownList runat="server" ID="DdlTipoProceso" CssClass="form-control input-sm select2me" Width="50%" DataValueField="CveTipoProceso" DataTextField="TipoProceso"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnGuardar" OnClick="BtnGuardar_Click" runat="server" Text="Agregar" CssClass="btn btn-primary" ValidationGroup="VGGuardar" />
|
||||
|
||||
@@ -55,6 +55,7 @@ public partial class CRM_CatProbabilidadAcercamiento : ClsPaginas
|
||||
if (!IsPostBack)
|
||||
{
|
||||
CargaDatos();
|
||||
CargarModalDatos();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,6 +73,19 @@ public partial class CRM_CatProbabilidadAcercamiento : ClsPaginas
|
||||
GVDatos.DataBind();
|
||||
UPDatos.Update();
|
||||
}
|
||||
|
||||
private void CargarModalDatos()
|
||||
{
|
||||
ClsCRM ObjCRM = new ClsCRM();
|
||||
if (ObjCRM.GetTipoProceso(UsuarioActual.CveEmpresa))
|
||||
{
|
||||
DdlTipoProceso.DataSource = ObjCRM.DtResultados;
|
||||
}
|
||||
ObjCRM.Dispose();
|
||||
DdlTipoProceso.DataBind();
|
||||
DdlTipoProceso.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
}
|
||||
|
||||
protected void limpiarCamposModal()
|
||||
{
|
||||
if (EsEditar == 1)
|
||||
@@ -86,6 +100,7 @@ public partial class CRM_CatProbabilidadAcercamiento : ClsPaginas
|
||||
BtnGuardar.Text = "Guardar";
|
||||
DivEstatus.Visible = false;
|
||||
}
|
||||
DdlTipoProceso.SelectedValue = "-1";
|
||||
TxtProbabilidadAcercamiento.Text = "";
|
||||
//TxtDescripcion.Text = "";
|
||||
ChkEstatus.Checked = true;
|
||||
@@ -113,7 +128,7 @@ public partial class CRM_CatProbabilidadAcercamiento : ClsPaginas
|
||||
TxtProbabilidadAcercamiento.Text = GvRow.DataKey("ProbabilidadAcercamiento").ToString();
|
||||
//TxtDescripcion.Text = GvRow.DataKey("Descripcion").ToString();
|
||||
ChkEstatus.Checked = GvRow.DataKey("CveEstatus").ToString() == "True" ? true : false;
|
||||
|
||||
DdlTipoProceso.SelectedValue = GvRow.DataKey("CveTipoProceso").ToString();
|
||||
UPModal.Update();
|
||||
|
||||
this.RegistraScript("$('#DivModal').modal();");
|
||||
@@ -131,14 +146,14 @@ public partial class CRM_CatProbabilidadAcercamiento : ClsPaginas
|
||||
|
||||
if (EsEditar == 0)
|
||||
{
|
||||
if (ObjCRM.AddProbabilidadAcercamiento(ProbabilidadAcercamiento, UsuarioActual.CveEmpresa, CveUsuarioIng))
|
||||
if (ObjCRM.AddProbabilidadAcercamiento(ProbabilidadAcercamiento, UsuarioActual.CveEmpresa, CveUsuarioIng,DdlTipoProceso.SelectedValue.ToEntero()))
|
||||
{
|
||||
Alert("La Probabilidad de Acercamiento fue creada correctamente.", ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ObjCRM.UpdateProbabilidadAcercamiento(ProbabilidadAcercamiento, Estatus, CveProbabilidadAcercamiento))
|
||||
if (ObjCRM.UpdateProbabilidadAcercamiento(ProbabilidadAcercamiento, Estatus, CveProbabilidadAcercamiento,DdlTipoProceso.SelectedValue.ToEntero()))
|
||||
{
|
||||
Alert("La Probabilidad de Acercamiento fue actualizada correctamente.", ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
}
|
||||
|
||||
@@ -95,6 +95,7 @@ public partial class CRM_CatRechazoMotivo : ClsPaginas
|
||||
}
|
||||
ObjCRM.Dispose();
|
||||
DdlTipoProceso.DataBind();
|
||||
DdlTipoProceso.Items.Insert(0,new ListItem("Seleccione","-1"));
|
||||
}
|
||||
|
||||
protected void limpiarCamposModal(string NombreRechazo = "")
|
||||
|
||||
@@ -589,7 +589,7 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlTipoProceso" DataTextField="TipoProceso" DataValueField="CveTipoProceso" runat="server" Width="100%" AppendDataBoundItems="true" Class="form-control input-sm select2me"></asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlTipoProceso" DataTextField="TipoProceso" DataValueField="CveTipoProceso" runat="server" Width="100%" AppendDataBoundItems="true" Class="form-control input-sm select2me" OnSelectedIndexChanged="DdlTipoProceso_Change" AutoPostBack="true"></asp:DropDownList>
|
||||
<label for="<%= DdlTipoProceso.ClientID.ToString()%>"><span style="color: #F3565D">*</span> Proceso:</label>
|
||||
<asp:RequiredFieldValidator ID="RFVTipoProceso" CssClass="help-block errorimput" runat="server" ControlToValidate="DdlTipoProceso" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Proceso''</b> es necesario." InitialValue="-1" ValidationGroup="VGAcercamiento"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
|
||||
@@ -191,6 +191,32 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
||||
ViewState["CreoCliente"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
private DataTable DtMedioCaptacion
|
||||
{
|
||||
get
|
||||
{
|
||||
return (DataTable)ViewState["DtMedioCaptacion"];
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["DtMedioCaptacion"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
private DataTable DtProbabilidadAcercamiento
|
||||
{
|
||||
get
|
||||
{
|
||||
return (DataTable)ViewState["DtProbabilidadAcercamiento"];
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["DtProbabilidadAcercamiento"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
@@ -518,8 +544,9 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
||||
{
|
||||
DdlMedioCaptacion.DataSource = ObjCRM.DtResultados;
|
||||
DdlMedioCaptacion.Items.Insert(0, new ListItem("Seleccione ", "-1"));
|
||||
|
||||
DdlMedioCaptacionAcercamiento.Items.Clear();
|
||||
DdlMedioCaptacionAcercamiento.DataSource = ObjCRM.DtResultados;
|
||||
DtMedioCaptacion = ObjCRM.DtResultados;
|
||||
DdlMedioCaptacionAcercamiento.Items.Insert(0, new ListItem("Seleccione ", "-1"));
|
||||
}
|
||||
ObjCRM.Dispose();
|
||||
@@ -629,6 +656,21 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
||||
CargaEventoBitacora();
|
||||
}
|
||||
}
|
||||
|
||||
protected void DdlTipoProceso_Change(object sender, EventArgs e)
|
||||
{
|
||||
DdlMedioCaptacionAcercamiento.Items.Clear();
|
||||
DdlMedioCaptacionAcercamiento.DataSource = DtMedioCaptacion.FiltraParametros(String.Format("CveTipoProceso = {0}",DdlTipoProceso.SelectedValue.ToEntero()));
|
||||
DdlMedioCaptacionAcercamiento.DataBind();
|
||||
DdlMedioCaptacionAcercamiento.Items.Insert(0,new ListItem("Seleccione","-1"));
|
||||
|
||||
DdlProbabilidadAcercamiento.Items.Clear();
|
||||
DdlProbabilidadAcercamiento.DataSource = DtProbabilidadAcercamiento.FiltraParametros(String.Format("CveTipoProceso = {0}", DdlTipoProceso.SelectedValue.ToEntero()));
|
||||
DdlProbabilidadAcercamiento.DataBind();
|
||||
DdlProbabilidadAcercamiento.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
|
||||
UpAltaAcercamiento.Update();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region "ELIMINAR EMPRESA"
|
||||
@@ -1236,7 +1278,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
||||
{
|
||||
DdlTipoProceso.DataSource = ObjCRM.DtResultados;
|
||||
|
||||
if (ObjCRM.DtResultados.Rows.Count > 1)
|
||||
if (ObjCRM.DtResultados.Rows.Count > 0)
|
||||
DdlTipoProceso.Items.Insert(0, new ListItem("Seleccione ", "-1"));
|
||||
|
||||
DdlTipoProceso.DataBind();
|
||||
@@ -1247,6 +1289,8 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
||||
DdlProbabilidadAcercamiento.DataSource = ObjCRM.DtResultados;
|
||||
DdlProbabilidadAcercamiento.DataBind();
|
||||
DdlProbabilidadAcercamiento.Items.Insert(0, new ListItem("Seleccione ", "-1"));
|
||||
|
||||
DtProbabilidadAcercamiento = ObjCRM.DtResultados;
|
||||
}
|
||||
|
||||
DdlVendedor.DataSource = get_GlobalDTVendedores(UsuarioActual.CveEmpresa);
|
||||
@@ -1293,6 +1337,10 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
||||
}
|
||||
else
|
||||
{
|
||||
ClsCRM ObjCRM = new ClsCRM();
|
||||
CargaMetodosCaptacion();
|
||||
InicializaAcercamientos(ObjCRM);
|
||||
ObjCRM.Dispose();
|
||||
limpiarCamposModalAcercamiento();
|
||||
this.RegistraScript("$('#DivModalAltaAcercamiento').modal();");
|
||||
UpAltaAcercamiento.Update();
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
</td>
|
||||
<td class="text-right" style="width: 140px;"><b>Tipo de Proceso:</b></td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlTipoProceso" runat="server" AppendDataBoundItems="true" DataTextField="TipoProceso" DataValueField="CveTipoProceso" Class="table-group-action-input form-control input-inline input-sm select2me" Width="200px"></asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlTipoProceso" runat="server" AppendDataBoundItems="true" DataTextField="TipoProceso" DataValueField="CveTipoProceso" Class="table-group-action-input form-control input-inline input-sm select2me" Width="200px" OnSelectedIndexChanged="DdlTipoProceso_Change" AutoPostBack="true"></asp:DropDownList>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -10,6 +10,46 @@ using System.Data;
|
||||
|
||||
public partial class CRM_PopUpBuscarAcercamiento : ClsPaginas
|
||||
{
|
||||
|
||||
private DataTable DtMedioCaptacion
|
||||
{
|
||||
get
|
||||
{
|
||||
return (DataTable)ViewState["DtMedioCaptacion"];
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["DtMedioCaptacion"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
private DataTable DtProbabilidadAcercamiento
|
||||
{
|
||||
get
|
||||
{
|
||||
return (DataTable)ViewState["DtProbabilidadAcercamiento"];
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["DtProbabilidadAcercamiento"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
private DataTable DtRechazo
|
||||
{
|
||||
get
|
||||
{
|
||||
return (DataTable)ViewState["DtRechazo"];
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["DtRechazo"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
@@ -26,8 +66,10 @@ public partial class CRM_PopUpBuscarAcercamiento : ClsPaginas
|
||||
|
||||
if (ObjCRM.GetProbabilidadAcercamiento(UsuarioActual.CveEmpresa, 1))
|
||||
{
|
||||
DdlProbabilidad.Items.Clear();
|
||||
DdlProbabilidad.DataSource = ObjCRM.DtResultados;
|
||||
DdlProbabilidad.Items.Insert(0, new ListItem("Todas ", "-1"));
|
||||
DtProbabilidadAcercamiento = ObjCRM.DtResultados;
|
||||
}
|
||||
if (ObjCRM.GetEmpresasCRM(UsuarioActual.CveEmpresa))
|
||||
{
|
||||
@@ -41,14 +83,18 @@ public partial class CRM_PopUpBuscarAcercamiento : ClsPaginas
|
||||
}
|
||||
if (ObjCRM.GetMedioCaptacion(UsuarioActual.CveEmpresa, 1))
|
||||
{
|
||||
DdlMedioCaptacion.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
DdlMedioCaptacion.DataSource = ObjCRM.DtResultados;
|
||||
DdlMedioCaptacion.Items.Insert(0, new ListItem("Todos ", "-1"));
|
||||
DtMedioCaptacion = ObjCRM.DtResultados;
|
||||
}
|
||||
|
||||
if (ObjCRM.GetRechazoMotivo(UsuarioActual.CveEmpresa, 1))
|
||||
{
|
||||
DdlRechazoMotivo.Items.Clear();
|
||||
DdlRechazoMotivo.DataSource = ObjCRM.DtResultados;
|
||||
DdlRechazoMotivo.Items.Insert(0, new ListItem("Todos ", "-1"));
|
||||
DtRechazo = ObjCRM.DtResultados;
|
||||
}
|
||||
|
||||
DdlVendedor.DataSource = get_GlobalDTVendedores(UsuarioActual.CveEmpresa);
|
||||
@@ -63,6 +109,26 @@ public partial class CRM_PopUpBuscarAcercamiento : ClsPaginas
|
||||
DdlMedioCaptacion.DataBind();
|
||||
DdlRechazoMotivo.DataBind();
|
||||
}
|
||||
|
||||
protected void DdlTipoProceso_Change(object sender, EventArgs e)
|
||||
{
|
||||
DdlMedioCaptacion.Items.Clear();
|
||||
DdlMedioCaptacion.DataSource = DtMedioCaptacion.FiltraParametros(String.Format("CveTipoProceso = {0}", DdlTipoProceso.SelectedValue.ToEntero()));
|
||||
DdlMedioCaptacion.DataBind();
|
||||
DdlMedioCaptacion.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
|
||||
DdlProbabilidad.Items.Clear();
|
||||
DdlProbabilidad.DataSource = DtProbabilidadAcercamiento.FiltraParametros(String.Format("CveTipoProceso = {0}", DdlTipoProceso.SelectedValue.ToEntero()));
|
||||
DdlProbabilidad.DataBind();
|
||||
DdlProbabilidad.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
|
||||
DdlRechazoMotivo.Items.Clear();
|
||||
DdlRechazoMotivo.DataSource = DtRechazo.FiltraParametros(String.Format("CveTipoProceso = {0}", DdlTipoProceso.SelectedValue.ToEntero()));
|
||||
DdlRechazoMotivo.DataBind();
|
||||
DdlRechazoMotivo.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
|
||||
UpFiltros.Update();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region "CARGA DATOS"
|
||||
|
||||
@@ -42,18 +42,24 @@ public partial class CRM_RepAcercamientos : ClsPaginas
|
||||
{
|
||||
CveVendedor = DdlVendedor.SelectedValue.ToEntero();
|
||||
|
||||
string FechaInicio = TxtFechaInicio.Text == "" ? "-1" : TxtFechaInicio.Text;
|
||||
string FechaFin = TxtFechaFin.Text == "" ? "-1" : TxtFechaFin.Text;
|
||||
|
||||
ClsCRM ObjCRM = new ClsCRM();
|
||||
if (ObjCRM.GetAcercamiento(UsuarioActual.CveEmpresa, CveVendedor: CveVendedor, FechaInicio: FechaInicio, FechaFin: FechaFin))
|
||||
if (CveVendedor > 0)
|
||||
{
|
||||
GVDatos.DataSource = ObjCRM.DtResultados;
|
||||
GVDatos.DataBind();
|
||||
}
|
||||
string FechaInicio = TxtFechaInicio.Text == "" ? "-1" : TxtFechaInicio.Text;
|
||||
string FechaFin = TxtFechaFin.Text == "" ? "-1" : TxtFechaFin.Text;
|
||||
|
||||
ObjCRM.Dispose();
|
||||
UPDatos.Update();
|
||||
ClsCRM ObjCRM = new ClsCRM();
|
||||
if (ObjCRM.GetAcercamiento(UsuarioActual.CveEmpresa, CveVendedor: CveVendedor, FechaInicio: FechaInicio, FechaFin: FechaFin))
|
||||
{
|
||||
GVDatos.DataSource = ObjCRM.DtResultados;
|
||||
GVDatos.DataBind();
|
||||
}
|
||||
|
||||
ObjCRM.Dispose();
|
||||
UPDatos.Update();
|
||||
}else
|
||||
{
|
||||
Alert("El Campo Vendedor es requerido",ModExtensiones.TipoMensaje.MsgError);
|
||||
}
|
||||
}
|
||||
|
||||
protected void GVDatos_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Reporte de Procesos Acercamientos
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
|
||||
@@ -49,7 +50,7 @@
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlTipoProceso" runat="server" DataTextField="TipoProceso" DataValueField="CveTipoProceso" CssClass="form-control input-sm select2me Widthall"></asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlTipoProceso" runat="server" DataTextField="TipoProceso" DataValueField="CveTipoProceso" CssClass="form-control input-sm select2me Widthall" OnSelectedIndexChanged="DdlTipoProceso_Change" AutoPostBack="true"></asp:DropDownList>
|
||||
<asp:Label runat="server" Text="Proceso:" AssociatedControlID="DdlTipoProceso"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -27,6 +27,32 @@ public partial class CRM_RepAcercamientosProcesos : ClsPaginas
|
||||
get { return DtDatos = (DataTable)ViewState["DtDatos"]; }
|
||||
set { ViewState["DtDatos"] = value; }
|
||||
}
|
||||
|
||||
private DataTable DtMedioCaptacion
|
||||
{
|
||||
get
|
||||
{
|
||||
return (DataTable)ViewState["DtMedioCaptacion"];
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["DtMedioCaptacion"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
private DataTable DtProbabilidadAcercamiento
|
||||
{
|
||||
get
|
||||
{
|
||||
return (DataTable)ViewState["DtProbabilidadAcercamiento"];
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["DtProbabilidadAcercamiento"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
@@ -58,11 +84,14 @@ public partial class CRM_RepAcercamientosProcesos : ClsPaginas
|
||||
DdlVendedor.DataSource = get_GlobalDTVendedores(UsuarioActual.CveEmpresa);
|
||||
if (ObjCRM.GetMedioCaptacion(UsuarioActual.CveEmpresa))
|
||||
{
|
||||
DdlMedioCaptacion.Items.Clear();
|
||||
DdlMedioCaptacion.DataSource = ObjCRM.DtResultados;
|
||||
DtMedioCaptacion = ObjCRM.DtResultados;
|
||||
}
|
||||
if (ObjCRM.GetProbabilidadAcercamiento(UsuarioActual.CveEmpresa, -1))
|
||||
{
|
||||
DdlProbabilidad.DataSource = ObjCRM.DtResultados;
|
||||
DtProbabilidadAcercamiento = ObjCRM.DtResultados;
|
||||
}
|
||||
ObjCRM.Dispose();
|
||||
|
||||
@@ -73,6 +102,7 @@ public partial class CRM_RepAcercamientosProcesos : ClsPaginas
|
||||
DdlVendedor.Items.Insert(0, new ListItem("Seleccione ", "-1"));
|
||||
DdlMedioCaptacion.Items.Insert(0, new ListItem("Seleccione ", "-1"));
|
||||
DdlProbabilidad.Items.Insert(0, new ListItem("Seleccione ", "-1"));
|
||||
DdlTipoProceso.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
DdlVendedor.SelectedValue = "-1";
|
||||
DdlMedioCaptacion.SelectedValue = "-1";
|
||||
DdlProbabilidad.SelectedValue = "-1";
|
||||
@@ -289,4 +319,19 @@ public partial class CRM_RepAcercamientosProcesos : ClsPaginas
|
||||
}
|
||||
UPModalProd.Update();
|
||||
}
|
||||
|
||||
protected void DdlTipoProceso_Change(object sender, EventArgs e)
|
||||
{
|
||||
DdlMedioCaptacion.Items.Clear();
|
||||
DdlMedioCaptacion.DataSource = DtMedioCaptacion.FiltraParametros(String.Format("CveTipoProceso = {0}", DdlTipoProceso.SelectedValue.ToEntero()));
|
||||
DdlMedioCaptacion.DataBind();
|
||||
DdlMedioCaptacion.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
|
||||
DdlProbabilidad.Items.Clear();
|
||||
DdlProbabilidad.DataSource = DtProbabilidadAcercamiento.FiltraParametros(String.Format("CveTipoProceso = {0}", DdlTipoProceso.SelectedValue.ToEntero()));
|
||||
DdlProbabilidad.DataBind();
|
||||
DdlProbabilidad.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
|
||||
upDatosRepA.Update();
|
||||
}
|
||||
}
|
||||
@@ -28,6 +28,7 @@
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Reporte de Rechazos Acercamientos
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
|
||||
|
||||
@@ -27,6 +27,32 @@ public partial class CRM_RepAcercamientosRechazos : ClsPaginas
|
||||
get { return DtDatos = (DataTable)ViewState["DtDatos"]; }
|
||||
set { ViewState["DtDatos"] = value; }
|
||||
}
|
||||
|
||||
private DataTable DtMedioCaptacion
|
||||
{
|
||||
get
|
||||
{
|
||||
return (DataTable)ViewState["DtMedioCaptacion"];
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["DtMedioCaptacion"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
private DataTable DtProbabilidadAcercamiento
|
||||
{
|
||||
get
|
||||
{
|
||||
return (DataTable)ViewState["DtProbabilidadAcercamiento"];
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["DtProbabilidadAcercamiento"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
@@ -59,10 +85,12 @@ public partial class CRM_RepAcercamientosRechazos : ClsPaginas
|
||||
if (ObjCRM.GetMedioCaptacion(UsuarioActual.CveEmpresa))
|
||||
{
|
||||
DdlMedioCaptacion.DataSource = ObjCRM.DtResultados;
|
||||
DtMedioCaptacion = ObjCRM.DtResultados;
|
||||
}
|
||||
if (ObjCRM.GetProbabilidadAcercamiento(UsuarioActual.CveEmpresa, -1))
|
||||
{
|
||||
DdlProbabilidad.DataSource = ObjCRM.DtResultados;
|
||||
DtProbabilidadAcercamiento = ObjCRM.DtResultados;
|
||||
}
|
||||
ObjCRM.Dispose();
|
||||
|
||||
@@ -289,4 +317,19 @@ public partial class CRM_RepAcercamientosRechazos : ClsPaginas
|
||||
}
|
||||
UPModalProd.Update();
|
||||
}
|
||||
|
||||
protected void DdlTipoProceso_Change(object sender, EventArgs e)
|
||||
{
|
||||
DdlMedioCaptacion.Items.Clear();
|
||||
DdlMedioCaptacion.DataSource = DtMedioCaptacion.FiltraParametros(String.Format("CveTipoProceso = {0}", DdlTipoProceso.SelectedValue.ToEntero()));
|
||||
DdlMedioCaptacion.DataBind();
|
||||
DdlMedioCaptacion.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
|
||||
DdlProbabilidad.Items.Clear();
|
||||
DdlProbabilidad.DataSource = DtProbabilidadAcercamiento.FiltraParametros(String.Format("CveTipoProceso = {0}", DdlTipoProceso.SelectedValue.ToEntero()));
|
||||
DdlProbabilidad.DataBind();
|
||||
DdlProbabilidad.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
|
||||
upDatosRepA.Update();
|
||||
}
|
||||
}
|
||||
@@ -295,49 +295,58 @@ Partial Class Contabilidad2_CatCuentas
|
||||
Dim PorcentajeImpuesto As Decimal = TxtPorcentaje.Text.ToDecimal() / 100
|
||||
Dim CveBancoCuenta As Integer = ddlBancos.SelectedValue.ToEntero
|
||||
Dim CveAlmacen As Integer = DdlAlmacen.SelectedValue.ToEntero()
|
||||
If ObjConta.UpdateCuenta(IDSelected.ToEntero, Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToString.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, TxtNomIngles.Text.ToString,
|
||||
CveConceptoAdmin:=CveConceptoAdmin, CveProveedor:=CveProveedor, CveCliente:=CveCliente, CveClasificacion:=CveClasificacion, PorcentajeImpuesto:=PorcentajeImpuesto, CveBancoCuenta:=CveBancoCuenta, CveAlmacen:=CveAlmacen) Then
|
||||
|
||||
Dim codigo As String = DtDatos.FiltroPrimeroValor("Codigo", $"CveCuenta={IDSelected}")
|
||||
If DdlAgrupadorSAT.SelectedValue.ToEntero > 0 Then
|
||||
|
||||
If UsuarioActual.Empresa.TipoContabilidad <> 1 Then
|
||||
If ObjConta.UpdateCuenta(IDSelected.ToEntero, Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, DdlMoneda.SelectedValue.ToEntero,
|
||||
TxtDigAgrup.Text.ToString.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, TxtNomIngles.Text.ToString, CveConceptoAdmin:=CveConceptoAdmin,
|
||||
CveProveedor:=CveProveedor, CveCliente:=CveCliente, CveClasificacion:=CveClasificacion, PorcentajeImpuesto:=PorcentajeImpuesto,
|
||||
CveBancoCuenta:=CveBancoCuenta, CveAlmacen:=CveAlmacen) Then
|
||||
|
||||
Using ObjConta2 As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim codigo As String = DtDatos.FiltroPrimeroValor("Codigo", $"CveCuenta={IDSelected}")
|
||||
|
||||
If ObjConta2.GetCuentas(-1, "-1", -1) Then
|
||||
Dim Id As Integer = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"Codigo='{codigo}'").ToEntero
|
||||
Dim IdAgrupador As Integer
|
||||
If UsuarioActual.Empresa.TipoContabilidad <> 1 Then
|
||||
|
||||
If ObjConta2.GetAgrupadoresSAT() Then
|
||||
IdAgrupador = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"CodigoNombre='{DdlAgrupadorSAT.SelectedItem.Text}'").ToEntero
|
||||
End If
|
||||
If Id > 0 Then
|
||||
If ObjConta2.UpdateCuenta(Id, Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, DdlMoneda.SelectedValue.ToEntero, IdAgrupador, SubCuentaDe:=Tsubcuenta.Text.Trim) > 0 Then
|
||||
Using ObjConta2 As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
If ObjConta2.GetCuentas(-1, "-1", -1) Then
|
||||
Dim Id As Integer = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"Codigo='{codigo}'").ToEntero
|
||||
Dim IdAgrupador As Integer
|
||||
|
||||
If ObjConta2.GetAgrupadoresSAT() Then
|
||||
IdAgrupador = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"CodigoNombre='{DdlAgrupadorSAT.SelectedItem.Text}'").ToEntero
|
||||
End If
|
||||
If Id > 0 Then
|
||||
If ObjConta2.UpdateCuenta(Id, Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, DdlMoneda.SelectedValue.ToEntero, IdAgrupador, SubCuentaDe:=Tsubcuenta.Text.Trim) > 0 Then
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Using
|
||||
End Using
|
||||
End If
|
||||
|
||||
Dim customerRow As Data.DataRow
|
||||
customerRow = DtDatos.Select(String.Format("CveCuenta = {0}", IDSelected))(0)
|
||||
customerRow("Nombre") = Tnombre.Text
|
||||
DtDatos.AcceptChanges()
|
||||
|
||||
CargaDatos()
|
||||
ArbolCuentas.DataSource = DtDatos
|
||||
|
||||
Dim item As CheckBox = DirectCast(ArbolCuentas.FindControl(String.Format("chk{0}", IDSelected)), CheckBox)
|
||||
item.Text = String.Format("{0} - {1}", customerRow("CuentaFormato").ToString, Tnombre.Text)
|
||||
'updatos.Visible = False
|
||||
'Guardar.Visible = False
|
||||
LimpiarCampos()
|
||||
'RegistraScript("$get('BtnCambiaAgrupadorSAT').click();")
|
||||
updatos.Update()
|
||||
|
||||
Alert("La cuenta se guardo correctamente")
|
||||
End If
|
||||
|
||||
Dim customerRow As Data.DataRow
|
||||
customerRow = DtDatos.Select(String.Format("CveCuenta = {0}", IDSelected))(0)
|
||||
customerRow("Nombre") = Tnombre.Text
|
||||
DtDatos.AcceptChanges()
|
||||
|
||||
CargaDatos()
|
||||
ArbolCuentas.DataSource = DtDatos
|
||||
|
||||
Dim item As CheckBox = DirectCast(ArbolCuentas.FindControl(String.Format("chk{0}", IDSelected)), CheckBox)
|
||||
item.Text = String.Format("{0} - {1}", customerRow("CuentaFormato").ToString, Tnombre.Text)
|
||||
'updatos.Visible = False
|
||||
'Guardar.Visible = False
|
||||
LimpiarCampos()
|
||||
'RegistraScript("$get('BtnCambiaAgrupadorSAT').click();")
|
||||
updatos.Update()
|
||||
|
||||
Alert("La cuenta se guardo correctamente")
|
||||
Else
|
||||
Alert("Es necesario agregar el campo 'Agrupador SAT'", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
|
||||
ObjConta.Dispose()
|
||||
|
||||
End Sub
|
||||
@@ -356,17 +365,14 @@ Partial Class Contabilidad2_CatCuentas
|
||||
Dim CuentaEfectivo As Integer = 0
|
||||
Dim Afectable As Integer = 1 'If(DcuentaMayor.SelectedValue <> 2, 0, 1) ' cuando sea tipo 2, va a ser afectable
|
||||
Tcuenta.Text.Replace("-", "")
|
||||
Dim idnew As Integer = 0
|
||||
|
||||
Dim idnew As Integer = ObjConta.AddCuenta(
|
||||
IDSelected,
|
||||
TxtCuenta.Text.Replace("-", ""),
|
||||
Tnombre.Text,
|
||||
DTcuenta.SelectedValue.ToString,
|
||||
DcuentaMayor.SelectedValue.ToString.ToEntero,
|
||||
DdlMoneda.SelectedValue.ToEntero,
|
||||
TxtDigAgrup.Text.ToEntero,
|
||||
DdlAgrupadorSAT.SelectedValue.ToEntero,
|
||||
TxtNomIngles.Text.ToString)
|
||||
If DdlAgrupadorSAT.SelectedValue.ToEntero > 0 Then
|
||||
idnew = ObjConta.AddCuenta(IDSelected, TxtCuenta.Text.Replace("-", ""), Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero,
|
||||
DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, TxtNomIngles.Text.ToString)
|
||||
Else
|
||||
Alert("Es necesario agregar el campo 'Agrupador SAT'", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
If idnew > 0 Then
|
||||
|
||||
|
||||
Binary file not shown.
@@ -106,10 +106,15 @@ public partial class General_CATIEPSxEntidadFed : ClsPaginas
|
||||
|
||||
protected void LnkExcel_Click(object sender, EventArgs e)
|
||||
{
|
||||
GVIEPSxEntidadFed.ExportToExcelx("IEPS porEntidad Federativa");
|
||||
Imprimir("Excel");
|
||||
}
|
||||
|
||||
protected void LnkPDF_Click(object sender, EventArgs e)
|
||||
{
|
||||
Imprimir("PDF");
|
||||
}
|
||||
|
||||
private void Imprimir(string formato)
|
||||
{
|
||||
string FechaInicio = $" <b>Fecha Inicio:</b> {TxtIEPSfechaInicio.Text}";
|
||||
string FechaFin = $" <b>Fecha Inicio:</b> {TxtIEPSfechaFin.Text}";
|
||||
@@ -127,6 +132,6 @@ public partial class General_CATIEPSxEntidadFed : ClsPaginas
|
||||
paramList.Add(new ReportParameter("Filtros", $"{FechaInicio}{FechaFin}{IEPS}{Estado}{Agrupador}"));
|
||||
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/CatIepsEntidadFed.rdlc", DtIEPS, paramList,"IEPS por entidades federativa",RDSName:"DsInventarios");
|
||||
ImprimirPDF("Empresas/Grales/Formatos/CatIepsEntidadFed.rdlc", DtIEPS, paramList, "IEPS por entidades federativa",formato, RDSName: "DsInventarios");
|
||||
}
|
||||
}
|
||||
|
||||
82
OI/Circular.aspx
Normal file
82
OI/Circular.aspx
Normal file
@@ -0,0 +1,82 @@
|
||||
<%@ Page Title="OI Circular" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="Circular.aspx.vb" Inherits="OI_Circular" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<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:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Circular
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:HyperLink ID="LnkAgregar" runat="server" NavigateUrl="/OI/CircularDetalle.aspx?CveCircular=-1"> Agregar Circular</asp:HyperLink>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkPDF" runat="server"><i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpFiltros">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle" style="min-height: 45px; position: relative;">
|
||||
<div class="tools">
|
||||
<asp:Button ID="btConsultar" CssClass="btn btn-primary" runat="server" ValidationGroup="GrpConsultar" Text="Consultar" /></td>
|
||||
<a href="javascript;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
|
||||
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div class="titlefiltros caption magindate">
|
||||
<div class="row" style="width:90%">
|
||||
<div class="col-md-1 truncate text-right">Fecha Inicial: </div>
|
||||
<div class="col-md-3 col-sm-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 95px !important; padding: 0px;">
|
||||
<asp:TextBox Style="width: 80px !important;" ID="TxtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgFechaMes" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="TxtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaI" PopupButtonID="ImgFechaMes" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
<div class="col-md-1 truncate text-right">Fecha Final: </div>
|
||||
<div class="col-md-3 col-sm-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 95px !important; padding: 0px;">
|
||||
<asp:TextBox Style="width: 80px !important;" ID="TxtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="LinkButton1" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender2" runat="server" TargetControlID="TxtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarExtender2" TargetControlID="TxtFechaF" PopupButtonID="ImgFechaMes" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
<div class="col-md-1 truncate text-right">Usuario: </div>
|
||||
<div class="col-md-3 col-sm-2">
|
||||
<asp:DropDownList runat="server" ID="DdlUsuario" DataTextField="Nombre" DataValueField="CveUsuario" CssClass="select2me"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCircular,Asunto,Usuario" EmptyDataText="No se encontraron Circulares"
|
||||
ToolTip="Listado de Metas Vendedor" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; text-align: center; width: 100%" GridLines="None">
|
||||
<Columns>
|
||||
<asp:HyperLinkField HeaderText="Asunto" DataTextField="Asunto" DataNavigateUrlFields="CveCircular" DataNavigateUrlFormatString="/OI/CircularDetalle.aspx?CveCircular={0}" />
|
||||
<asp:HyperLinkField HeaderText="Usuario" DataTextField="Usuario" DataNavigateUrlFields="CveCircular" DataNavigateUrlFormatString="/OI/CircularDetalle.aspx?CveCircular={0}" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
66
OI/Circular.aspx.vb
Normal file
66
OI/Circular.aspx.vb
Normal file
@@ -0,0 +1,66 @@
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class OI_Circular
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
IniciarFiltros()
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
Private Sub IniciarFiltros()
|
||||
Dim FechaI As DateTime = New DateTime(Today.Year, Today.Month, 1)
|
||||
Dim FechaF As DateTime = New DateTime(Today.Year, Today.Month, 1).AddMonths(1).AddDays(-1)
|
||||
TxtFechaI.Text = FechaI.ToString()
|
||||
TxtFechaF.Text = FechaF.ToString
|
||||
|
||||
DdlUsuario.DataSource = GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
DdlUsuario.DataBind()
|
||||
DdlUsuario.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjOI As New ClsOIEventos
|
||||
If ObjOI.GetCircular(UsuarioActual.CveEmpresa, -1, TxtFechaI.Text, TxtFechaF.Text, DdlUsuario.SelectedValue.ToEntero) Then
|
||||
GvDatos.DataSource = ObjOI.DtResultados
|
||||
DtDatos = ObjOI.DtResultados
|
||||
End If
|
||||
ObjOI.Dispose()
|
||||
GvDatos.DataBind()
|
||||
End Sub
|
||||
|
||||
Protected Sub btConsultar_Click() Handles btConsultar.Click
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkPDF_Click() Handles LnkPDF.Click
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
Else
|
||||
params.Add(New ReportParameter("LogoPath", ""))
|
||||
End If
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
|
||||
params.Add(New ReportParameter("FechaImpresion", Today))
|
||||
params.Add(New ReportParameter("Filtros", String.Format("Fecha Inicial: {0} Fecha Final: {1}", TxtFechaI.Text, TxtFechaF.Text)))
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/Circulares.rdlc", DtDatos, params, "Circulares", "PDF", RDSName:="DataSet1")
|
||||
End Sub
|
||||
End Class
|
||||
171
OI/CircularDetalle.aspx
Normal file
171
OI/CircularDetalle.aspx
Normal file
@@ -0,0 +1,171 @@
|
||||
<%@ Page Title="OI Circular" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CircularDetalle.aspx.vb" Inherits="OI_CircularDetalle" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<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:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Circular Detalle
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkMandarCorreo" runat="server" Text="<i class='fa fa-plus'></i> Agregar Documento"></asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpCliente" runat="server" UpdateMode="Conditional" class="portlet light xspadding bordered whitoutcol" style="width: 40%;">
|
||||
<ContentTemplate>
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
|
||||
<i class="icon-pin font-green"></i>
|
||||
|
||||
</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 form-horizontal form-row-sepe formnombottom" style="padding-top: 0px; margin-top: -5px;">
|
||||
<div class="form-body">
|
||||
<div class="col-md-1" style="width: 100%">
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-md-1" style="width: 30%">
|
||||
<asp:Label runat="server" ID="LblAsunto">Asunto:</asp:Label>
|
||||
</div>
|
||||
<div class="col-md-1" style="width: 70%">
|
||||
<asp:TextBox runat="server" ID="TxtAsunto"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-md-1" style="width: 30%">
|
||||
<asp:Label runat="server" ID="LblCorreo">Para:</asp:Label>
|
||||
</div>
|
||||
<div class="col-md-1" style="width: 45%">
|
||||
<textarea runat="server" id="TxtCorreo" class="form-control"></textarea>
|
||||
</div>
|
||||
<div class="col-md-1" style="width: 15%">
|
||||
<asp:LinkButton runat="server" ID="LbBuscar" >Buscar</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-md-1" style="width: 30%">
|
||||
<asp:Label runat="server" ID="LblCorreoExtra">Correos Adicionales:</asp:Label>
|
||||
</div>
|
||||
<div class="col-md-1" style="width: 70%">
|
||||
<textarea runat="server" id="TxtCorreoAdicional" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-md-1" style="width: 30%">
|
||||
<asp:Label runat="server" ID="LblCircular">Circular:</asp:Label>
|
||||
</div>
|
||||
<div class="col-md-1" style="width: 70%">
|
||||
<textarea runat="server" id="TxtCircular" class="form-control" style="height:150px"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-md-1" style="width:30%">
|
||||
<asp:Label runat="server" ID="LblAdjunto">Adjuntar archivo:</asp:Label>
|
||||
</div>
|
||||
<div class="col-md-1" style="width:70%">
|
||||
<asp:TextBox ID="TxtFileDocumentacion" CssClass="ADSdropzone hidden" data-maxFile="1" Text="" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div id="archivosDiv" runat="server" class="row" visible="false">
|
||||
<div class="col-md-1" style="width:30%">
|
||||
<asp:Label runat="server" ID="Label1">Archivo cargado:</asp:Label>
|
||||
</div>
|
||||
<div class="col-md-1" style="width:70%">
|
||||
<asp:HyperLink runat="server" ID="HkArchivo" ></asp:HyperLink>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row" style="text-align: center">
|
||||
<asp:Button ID="BtnGuardar" runat="server" CssClass="btn btn-primary" Text="Guardar" Visible="true" ValidationGroup="GrpGuardar" />
|
||||
<asp:Button ID="BtnEliminar" runat="server" CssClass="btn btn-danger" Text="Eliminar" Visible="false" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
</div>
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="ModalDescuento" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content" style="width: 800px">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Label ID="LblTitulo1" runat="server" ClientIDMode="Static" Text="Descuento:" Style="display: none;"></asp:Label>
|
||||
<asp:Label ID="LblTitulo2" runat="server" ClientIDMode="Static" Text="Amortización de Anticipos:" Style="display: none;"></asp:Label></h4>
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<div class="row" style="width: 85%; text-align: center">
|
||||
<div class="col-md-1 truncate text-right" style="width: 20%; text-align: right">Rol: </div>
|
||||
<div class="col-md-3 col-sm-2" style="width: 20%; text-align: left">
|
||||
<asp:DropDownList runat="server" ID="DdlRolesFiltro" DataValue="CveRol" DataTextField="Rol" CssClass="select2me" />
|
||||
</div>
|
||||
<div class="col-md-1 truncate text-right" style="width: 20%; text-align: right">Sucursales: </div>
|
||||
<div class="col-md-3 col-sm-2" style="width: 20%; text-align: left">
|
||||
<asp:DropDownList runat="server" ID="DdlSucursales" DataValue="CveProyecto" DataTextField="SubProyecto" CssClass="select2me" />
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-2" style="width: 20%; text-align: right">
|
||||
<asp:Button ID="BtnBuscar" runat="server" CssClass="btn btn-primary" Text="Buscar" Visible="true" ValidationGroup="GrpGuardar" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-top: 30px;">
|
||||
<asp:UpdatePanel runat="server" ID="UpUsuarios" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvUsuarios" runat="server" AutoGenerateColumns="False" DataKeyNames="CveUsuario,Nombre,Correo" EmptyDataText="No se encontraron Motivo de Baja Registrados"
|
||||
ToolTip="Listado de Metas Vendedor" CssClass="table table-striped table-advance table-hover ScrollAD" Style="margin-top: 0px; text-align: center; width: 100%" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Nombre" DataField="Nombre">
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" Wrap="true" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField HeaderText="Correo" DataField="Correo">
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" Wrap="true" />
|
||||
</asp:BoundField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<%--<asp:Button ID="BtnAplicarDescP" runat="server" ClientIDMode="Static" OnClientClick="$('#ModalDescuento').modal('hide'); event.preventDefault();" Text="Aplicar" ValidationGroup="GrpDescuentoP" Style="display: none;" CssClass="btn btn-primary" />--%>
|
||||
<asp:Button ID="BtnAplicarDescG" runat="server" ClientIDMode="Static" Text="Aplicar" ValidationGroup="GrpDescuentoP" CssClass="btn btn-primary" />
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
250
OI/CircularDetalle.aspx.vb
Normal file
250
OI/CircularDetalle.aspx.vb
Normal file
@@ -0,0 +1,250 @@
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
Imports System.IO
|
||||
Imports System.Text.RegularExpressions
|
||||
|
||||
Partial Class OI_CircularDetalle
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Property DtUsuarios As DataTable
|
||||
Get
|
||||
Return If(IsNothing(ViewState("DtUsuarios")), Nothing, CType(ViewState("DtUsuarios"), DataTable))
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtUsuarios") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property CveCircular As Integer
|
||||
Get
|
||||
Return ViewState("CveCircular").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveCircular") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
CargarCve()
|
||||
ConfigurarBotones()
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargarCve()
|
||||
Dim PreCveCircular As String = Request.Params("CveCircular").ToString
|
||||
If IsNumeric(PreCveCircular) Then
|
||||
CveCircular = PreCveCircular.ToEntero
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ConfigurarBotones()
|
||||
If CveCircular > 0 Then
|
||||
BtnGuardar.Text = "Actualizar"
|
||||
BtnEliminar.Visible = True
|
||||
Else
|
||||
BtnGuardar.Text = "Guardar"
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
If CveCircular > 0 Then
|
||||
Dim ObjOI As New ClsOIEventos
|
||||
If ObjOI.GetCircular(UsuarioActual.CveEmpresa, CveCircular) Then
|
||||
Dim Circular As DataRow = ObjOI.DtResultados(0)
|
||||
|
||||
TxtAsunto.Text = Circular.Item("Asunto")
|
||||
TxtCorreo.Value = Circular.Item("CorreosInternos")
|
||||
TxtCorreoAdicional.Value = Circular.Item("CorreosExternos")
|
||||
TxtCircular.Value = Circular.Item("Circular")
|
||||
|
||||
If Circular.Item("ArchivoAdjunto") <> "" Then
|
||||
archivosDiv.Visible = True
|
||||
HkArchivo.NavigateUrl = String.Format("{0}Empresas\{1}\Formatos\{2}", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa, Circular.Item("ArchivoAdjunto"))
|
||||
HkArchivo.Text = Circular.Item("ArchivoAdjunto")
|
||||
End If
|
||||
|
||||
UpCliente.Update()
|
||||
End If
|
||||
ObjOI.Dispose()
|
||||
End If
|
||||
|
||||
DdlRolesFiltro.DataSource = GlobalDTRoles(UsuarioActual.CveEmpresa)
|
||||
DdlRolesFiltro.DataBind()
|
||||
DdlRolesFiltro.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
DdlSucursales.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa)
|
||||
DdlSucursales.DataBind()
|
||||
DdlSucursales.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End Sub
|
||||
|
||||
Private Sub BtnGuardar_Click() Handles BtnGuardar.Click
|
||||
Dim ObjOI As New ClsOIEventos
|
||||
If CveCircular > 0 Then
|
||||
|
||||
Dim AdjuntoValidate As String = NombreArchivo().Split("-")(1)
|
||||
|
||||
If ObjOI.UpdateCircular(CveCircular, TxtAsunto.Text, TxtCircular.Value, TxtCorreo.Value, TxtCorreoAdicional.Value, AdjuntoValidate) Then
|
||||
GuardarArchivo(CveCircular)
|
||||
Alert("Actualizado correctamente")
|
||||
End If
|
||||
Else
|
||||
Dim CorreoExtra As String = If(TxtCorreoAdicional.Value = "", "-1", TxtCorreoAdicional.Value)
|
||||
|
||||
Dim AdjuntoValidate As String = NombreArchivo().Split("-")(1)
|
||||
Dim CircularInsertado As Integer = ObjOI.AddCircular(TxtAsunto.Text, TxtCircular.Value, TxtCorreo.Value, Today.ToString, UsuarioActual.CveUsuario,
|
||||
UsuarioActual.CveEmpresa, CorreoExtra, AdjuntoValidate)
|
||||
If CircularInsertado > 0 Then
|
||||
GuardarArchivo(CircularInsertado)
|
||||
Alert("Ingresado correctamente")
|
||||
End If
|
||||
End If
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
Private Sub BtnEliminar_Click() Handles BtnEliminar.Click
|
||||
Dim ObjOI As New ClsOIEventos
|
||||
If ObjOI.DeleteCircular(CveCircular) Then
|
||||
Response.Redirect("~/OI/CircularDetalle.aspx?CveCircular=-1")
|
||||
End If
|
||||
ObjOI.Dispose()
|
||||
End Sub
|
||||
|
||||
Protected Sub LbBuscar_Click(sender As Object, e As EventArgs) Handles LbBuscar.Click
|
||||
LimpiarModal()
|
||||
RegistraScript("$('#ModalDescuento').modal()")
|
||||
End Sub
|
||||
|
||||
Private Sub LimpiarModal()
|
||||
DdlRolesFiltro.SelectedValue = -1
|
||||
DdlSucursales.SelectedValue = -1
|
||||
GvUsuarios.DataSource = Nothing
|
||||
GvUsuarios.DataBind()
|
||||
UpUsuarios.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnBuscar_Click() Handles BtnBuscar.Click
|
||||
Dim buscadorQuery As New StringBuilder
|
||||
buscadorQuery.Append(If(DdlRolesFiltro.SelectedValue.ToEntero > 0, String.Format("CveRol = {0}", DdlRolesFiltro.SelectedValue), ""))
|
||||
buscadorQuery.Append(If(DdlSucursales.SelectedValue.ToEntero > 0, String.Format("{0} CveSubProyecto = {1}", If(buscadorQuery.Length > 0, "AND", ""), DdlSucursales.SelectedValue), ""))
|
||||
GvUsuarios.DataSource = GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros(buscadorQuery.ToString)
|
||||
DtUsuarios = GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros(buscadorQuery.ToString)
|
||||
GvUsuarios.DataBind()
|
||||
UpUsuarios.Update()
|
||||
RegistraScript("$('#ModalDescuento').modal()")
|
||||
End Sub
|
||||
|
||||
Private Sub BtnAplicarDescG_Click() Handles BtnAplicarDescG.Click
|
||||
Dim UsuariosCorreos As String = ""
|
||||
For Each usuario As DataRow In DtUsuarios.Rows
|
||||
If usuario.Item("Correo").ToString.Length > 0 Then
|
||||
UsuariosCorreos = String.Format("{0}{1}" & Environment.NewLine, UsuariosCorreos, usuario.Item("Correo").ToString)
|
||||
End If
|
||||
Next
|
||||
TxtCorreo.Value = UsuariosCorreos
|
||||
RegistraScript("$('#ModalDescuento').modal('hide')")
|
||||
UpCliente.Update()
|
||||
End Sub
|
||||
|
||||
Private Function NombreArchivo() As String
|
||||
Dim Filesgral As List(Of Archivo) = TxtFileDocumentacion.getfiles().Archivos
|
||||
Dim Filename As String = "-1"
|
||||
For Each fileItem As Archivo In Filesgral
|
||||
Try
|
||||
Filename = fileItem.filename
|
||||
Catch ex As Exception
|
||||
Filename = "-1"
|
||||
End Try
|
||||
Next
|
||||
Return Filename
|
||||
End Function
|
||||
|
||||
Private Function TituloAnterior() As String
|
||||
Dim Directorio As New IO.DirectoryInfo(String.Format("{0}Empresas/{1}/Formatos/", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa))
|
||||
Dim ArchivosArreglo As IO.FileInfo() = Directorio.GetFiles()
|
||||
Dim patronRegEx As String = String.Format("^{0}_.*", CveCircular)
|
||||
Dim archivoEncontrado As String = ""
|
||||
For Each file As IO.FileInfo In ArchivosArreglo
|
||||
If Regex.IsMatch(file.Name, patronRegEx) Then
|
||||
archivoEncontrado = file.Name
|
||||
End If
|
||||
Next
|
||||
Return archivoEncontrado
|
||||
End Function
|
||||
|
||||
Private Function GuardarArchivo(CircularInsertado As Integer) As String
|
||||
|
||||
Dim respuesta As String = ""
|
||||
Dim FileExtension As String = "-1"
|
||||
Dim Filesgral As List(Of Archivo) = TxtFileDocumentacion.getfiles().Archivos
|
||||
Dim Filename As String = ""
|
||||
|
||||
For Each fileItem As Archivo In Filesgral
|
||||
Try
|
||||
respuesta = fileItem.filenameO
|
||||
FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "")
|
||||
Dim tempArray() As String
|
||||
tempArray = fileItem.filename.ToString().Split("-".ToCharArray())
|
||||
|
||||
Dim rutaDestino As String = UsuarioActual.Empresa.Ruta & "Formatos\" & CircularInsertado & "_" & fileItem.filenameO
|
||||
|
||||
Dim ArchivoAnterior As String = TituloAnterior()
|
||||
|
||||
If ArchivoAnterior.Length > 0 Then
|
||||
Dim docAnterior As String = String.Format("{0}Formatos\{1}", UsuarioActual.Empresa.Ruta, ArchivoAnterior)
|
||||
If File.Exists(docAnterior) Then
|
||||
File.Delete(docAnterior)
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not Directory.Exists(UsuarioActual.Empresa.Ruta & "\Formatos") Then
|
||||
Directory.CreateDirectory(UsuarioActual.Empresa.Ruta & "\Formatos")
|
||||
|
||||
End If
|
||||
|
||||
If System.IO.File.Exists(rutaDestino) Then
|
||||
System.IO.File.Delete(rutaDestino)
|
||||
End If
|
||||
|
||||
System.IO.File.Move(fileItem.FileUrl, rutaDestino)
|
||||
|
||||
Catch ex As Exception
|
||||
OnError("Error al cargar archivo", ex)
|
||||
End Try
|
||||
TxtFileDocumentacion.Text = ""
|
||||
Next
|
||||
|
||||
|
||||
Return respuesta
|
||||
End Function
|
||||
|
||||
Protected Sub LnkMandarCorreo_Click() Handles LnkMandarCorreo.Click
|
||||
Dim correos() As String
|
||||
correos = TxtCorreo.Value.Split(Environment.NewLine)
|
||||
'MandaCorreo()
|
||||
End Sub
|
||||
|
||||
Private Sub MandaCorreo(Asunto As String, Para As String, ArrayCC As String, body As String, ArchivoBinario As Byte())
|
||||
|
||||
Dim a As String = String.Format("{0} -- {1} --- {2}", Asunto, Para, ArrayCC)
|
||||
a.GuardaLog()
|
||||
|
||||
Dim Mail As New ClsSisMail()
|
||||
Dim LSRutasMail As New List(Of ClsSisMail.ArchivoMail)
|
||||
Dim itemMail As New ClsSisMail.ArchivoMail
|
||||
|
||||
With itemMail
|
||||
itemMail.ArchivoBinario = ArchivoBinario
|
||||
itemMail.NombreArchivo = "Invitación.pdf"
|
||||
|
||||
End With
|
||||
|
||||
LSRutasMail.Add(itemMail)
|
||||
|
||||
|
||||
Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, body, ArrayCC, LSRutasMail)
|
||||
Mail = Nothing
|
||||
End Sub
|
||||
End Class
|
||||
@@ -543,7 +543,7 @@ Partial Class Ventas_PortalCliente
|
||||
|
||||
#Region " PAGO PROSEPAGO "
|
||||
Private Sub InicializaProsepago()
|
||||
If Not UsuarioActual.CveEmpresa.Contiene(1, 4, 7, 11, 12) Then
|
||||
If Not UsuarioActual.CveEmpresa.Contiene(1, 4, 7, 11, 12, 145) Then
|
||||
GvCxC.Columns(10).Visible = False
|
||||
LBPagar.Visible = False
|
||||
End If
|
||||
@@ -632,7 +632,7 @@ Partial Class Ventas_PortalCliente
|
||||
|
||||
Dim uriString = ""
|
||||
Select Case UsuarioActual.CveEmpresa
|
||||
Case 1, 4, 7, 11, 12
|
||||
Case 1, 4, 7, 11, 12, 145
|
||||
uriString = "https://www.prosepago.com/tvirtual/tvds.aspx?ppost=1&t=123" ' VSH SEGURIDAD
|
||||
Case Else
|
||||
Alert("Sin terminal de pago configurada. Por favor comuniquese con su proveedor para verificar.", TipoMensaje.MsgAdvertencia)
|
||||
|
||||
@@ -4961,6 +4961,11 @@ Partial Class RH_Personal
|
||||
FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "")
|
||||
filemove = fileItem.filename
|
||||
|
||||
Dim yaExistente As String = String.Format("{0}Empresas\{1}\RH\Personal\{2}.jpg", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa, CvePersonal)
|
||||
If File.Exists(yaExistente) Then
|
||||
File.Delete(yaExistente)
|
||||
End If
|
||||
|
||||
If filemove <> "" Then
|
||||
filemove.FilesMove(CvePersonal.ToString, String.Format("Empresas\{0}\RH\Personal\", UsuarioActual.CveEmpresa))
|
||||
End If
|
||||
|
||||
@@ -10,7 +10,7 @@ using System.Xml;
|
||||
using Extensiones;
|
||||
using System.Data;
|
||||
using System.Text;
|
||||
using ADSistemaLibrary.SatXml;
|
||||
using ADSistemaLibrary2.SatXml;
|
||||
|
||||
//using ADS_CFDI_SAT;
|
||||
|
||||
@@ -187,7 +187,11 @@ public partial class Ventas_RepConciliacionEmitidosSat : ClsPaginas
|
||||
{
|
||||
|
||||
{
|
||||
string ruta = string.Format("{0}\\{1}", UsuarioActual.Empresa.Ruta.Trim(), gvrow.DataKey("RutaXml").Trim()).Replace("/", "\\"); //gvrow.DataKey("RutaXml");
|
||||
string rutaempresa = UsuarioActual.Empresa.Ruta.Trim().Replace("/", "\\");
|
||||
string rutafile = gvrow.DataKey("RutaXml").Trim().Replace("/", "\\");
|
||||
rutaempresa = rutaempresa.Substring(rutaempresa.Length - 1, 1) == "\\" ? rutaempresa.Substring(0, rutaempresa.Length - 1): rutaempresa;
|
||||
rutafile = rutafile.Substring(0, 1) == "\\" ? rutafile.Substring(1): rutafile;
|
||||
string ruta = string.Format("{0}\\{1}", rutaempresa, rutafile); //gvrow.DataKey("RutaXml");
|
||||
//Alert(ruta);
|
||||
|
||||
//return false;
|
||||
@@ -798,4 +802,953 @@ public partial class Ventas_RepConciliacionEmitidosSat : ClsPaginas
|
||||
}
|
||||
//String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", CveVenta, "XML", DbRowVenta("SerieFolio"), DbRowVenta("TipoDocto"))))
|
||||
}
|
||||
}
|
||||
namespace ADSistemaLibrary2.SatXml
|
||||
{
|
||||
public class XmlSatCFDI
|
||||
{
|
||||
public XmlSatCFDI()
|
||||
{
|
||||
comprobante = new CFDIComprobante();
|
||||
emisor = new CFDIEmisor();
|
||||
receptor = new CFDIReceptor();
|
||||
complemento = new CFDIComplemento();
|
||||
cFDIRelacionados = new List<CFDIRelacionado>();
|
||||
conceptos = new List<CFDIConcepto>();
|
||||
Impuestos = new List<CFDIImpuesto>();
|
||||
}
|
||||
public CFDIComprobante comprobante;
|
||||
public CFDIEmisor emisor;
|
||||
public CFDIReceptor receptor;
|
||||
public CFDIComplemento complemento;
|
||||
public List<CFDIRelacionado> cFDIRelacionados;
|
||||
public List<CFDIConcepto> conceptos;
|
||||
public List<CFDIImpuesto> Impuestos;
|
||||
public List<CFDIConcepto_I> GetConceptosforpdf()
|
||||
{
|
||||
List<CFDIConcepto_I> lcon = new List<CFDIConcepto_I>();
|
||||
if (conceptos != null)
|
||||
{
|
||||
int _orden = 0;
|
||||
foreach (CFDIConcepto item in conceptos)
|
||||
{
|
||||
_orden += 1;
|
||||
CFDIConcepto_I con = new CFDIConcepto_I
|
||||
{
|
||||
tipo = 1,
|
||||
orden = _orden,
|
||||
ClaveProdServ = item.ClaveProdServ,
|
||||
NoIdentificacion = item.NoIdentificacion,
|
||||
Cantidad = item.Cantidad,
|
||||
ClaveUnidad = item.ClaveUnidad,
|
||||
Unidad = item.Unidad,
|
||||
ValorUnitario = item.ValorUnitario,
|
||||
Importe = item.Importe,
|
||||
Descuento = item.Descuento,
|
||||
NumeroPedimento = item.NumeroPedimento,
|
||||
CuentaPredial = item.CuentaPredial,
|
||||
Descripcion = item.Descripcion
|
||||
};
|
||||
int index = 0;
|
||||
foreach (CFDIConceptoImpuesto Imp in item.Impuestos)
|
||||
{
|
||||
index++;
|
||||
if (index > 1)
|
||||
{
|
||||
lcon.Add(con);
|
||||
con = new CFDIConcepto_I
|
||||
{
|
||||
tipo = 2,
|
||||
orden = _orden,
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
con.Impuesto = Imp.ImpuestoTexto;
|
||||
con.Impuesto_Tipo = Imp.Tipo;
|
||||
con.Impuesto_Base = Imp.Base;
|
||||
con.Impuesto_TipoFactor = Imp.TipoFactor;
|
||||
con.Impuesto_TasaOCuota = Imp.TasaOCuota;
|
||||
con.Impuesto_Importe = Imp.Importe;
|
||||
}
|
||||
lcon.Add(con);
|
||||
}
|
||||
}
|
||||
|
||||
return lcon;
|
||||
}
|
||||
|
||||
public static XmlSatCFDI readXML(string fileUrl)
|
||||
{
|
||||
XmlSatCFDI xmlCFDI = new XmlSatCFDI();
|
||||
bool canread = true;
|
||||
//keys
|
||||
string keyComprobante = "Comprobante";
|
||||
string keyCfdiRelacionados = "CfdiRelacionados";
|
||||
string keyEmisor = "Emisor";
|
||||
string keyReceptor = "Receptor";
|
||||
string keyConceptos = "Conceptos";
|
||||
string keyImpuestos = "Impuestos";
|
||||
string keyComplemento = "Complemento";
|
||||
//endkeys
|
||||
string[] PrimerNivel = new string[] { keyCfdiRelacionados, keyEmisor, keyReceptor, keyConceptos, keyImpuestos, keyComplemento };
|
||||
//(canread = xtr.Read()) para evitar ciclos infinitos, todos los .Read() los guardo en la variable Canread y en los while reviso primero esta variable
|
||||
if (File.Exists(fileUrl))
|
||||
{
|
||||
XmlReaderSettings settings = new XmlReaderSettings();
|
||||
settings.ConformanceLevel = ConformanceLevel.Fragment;
|
||||
settings.IgnoreWhitespace = true;
|
||||
settings.IgnoreComments = true;
|
||||
using (XmlReader xtr = XmlReader.Create(fileUrl, settings))
|
||||
{
|
||||
|
||||
while ((canread = xtr.Read()) && !(xtr.NodeType == XmlNodeType.Element && xtr.Name.Replace("cfdi:","") == keyComprobante))
|
||||
{
|
||||
//if (xtr.NodeType != XmlNodeType.Element) { while (xtr.Read() && xtr.NodeType != XmlNodeType.Element) { } }
|
||||
}
|
||||
if (xtr.NodeType == XmlNodeType.Element && xtr.Name.Replace("cfdi:", "") == keyComprobante)
|
||||
{
|
||||
int Nivel = xtr.Depth;
|
||||
bool cont = xtr.MoveToFirstAttribute();
|
||||
while (cont)
|
||||
{
|
||||
|
||||
switch (xtr.Name.ToUpper())
|
||||
{
|
||||
case "XMLNS:CFDI": xmlCFDI.comprobante.xmlns_cfdi = xtr.Value; break;
|
||||
case "XMLNS:XSI": xmlCFDI.comprobante.xmlns_xsi = xtr.Value; break;
|
||||
case "XSI:SCHEMALOCATION": xmlCFDI.comprobante.xsi_schemaLocation = xtr.Value; break;
|
||||
case "VERSION": xmlCFDI.comprobante.Version = xtr.Value; break;
|
||||
case "SERIE": xmlCFDI.comprobante.Serie = xtr.Value; break;
|
||||
case "FOLIO": xmlCFDI.comprobante.Folio = xtr.Value; break;
|
||||
case "FECHA": xmlCFDI.comprobante.Fecha = xtr.Value; break;
|
||||
case "MONEDA": xmlCFDI.comprobante.Moneda = xtr.Value; break;
|
||||
case "SUBTOTAL": decimal SubTotal = 0; decimal.TryParse(xtr.Value, out SubTotal); xmlCFDI.comprobante.SubTotal = SubTotal; break;
|
||||
case "TOTAL": decimal Total = 0; decimal.TryParse(xtr.Value, out Total); xmlCFDI.comprobante.Total = Total; break;
|
||||
case "DESCUENTO": decimal Descuento = 0; decimal.TryParse(xtr.Value, out Descuento); xmlCFDI.comprobante.Descuento = Descuento; break;
|
||||
case "TIPOCAMBIO": decimal TipoCambio = 0; decimal.TryParse(xtr.Value, out TipoCambio); xmlCFDI.comprobante.TipoCambio = TipoCambio; break;
|
||||
case "TIPODECOMPROBANTE": xmlCFDI.comprobante.TipoDeComprobante = xtr.Value; break;
|
||||
case "FORMAPAGO": xmlCFDI.comprobante.FormaPago = xtr.Value; break;
|
||||
case "FORMADEPAGO": xmlCFDI.comprobante.FormaPago = xtr.Value; break;
|
||||
case "METODOPAGO": xmlCFDI.comprobante.MetodoPago = xtr.Value; break;
|
||||
case "METODODEPAGO": xmlCFDI.comprobante.MetodoPago = xtr.Value; break;
|
||||
case "CONDICIONESDEPAGO": xmlCFDI.comprobante.CondicionesDePago = xtr.Value; break;
|
||||
case "LUGAREXPEDICION": xmlCFDI.comprobante.LugarExpedicion = xtr.Value; break;
|
||||
case "CONFIRMACION": xmlCFDI.comprobante.Confirmacion = xtr.Value; break;
|
||||
case "NOCERTIFICADO": xmlCFDI.comprobante.NoCertificado = xtr.Value; break;
|
||||
case "SELLO": xmlCFDI.comprobante.Sello = xtr.Value; break;
|
||||
case "CERTIFICADO": xmlCFDI.comprobante.Certificado = xtr.Value; break;
|
||||
}
|
||||
cont = xtr.MoveToNextAttribute();
|
||||
}
|
||||
cont = xtr.MoveToFirstAttribute();
|
||||
while ((canread = xtr.Read()) && xtr.NodeType != XmlNodeType.Element) { }
|
||||
while (canread && xtr.Depth > Nivel)
|
||||
{
|
||||
if (PrimerNivel.Contains(xtr.Name.Replace("cfdi:", "")))
|
||||
{
|
||||
if (xtr.NodeType == XmlNodeType.Element && xtr.Name.Replace("cfdi:", "") == keyCfdiRelacionados)
|
||||
{
|
||||
int cDepth = xtr.Depth;
|
||||
|
||||
string TipoRelacion = null;
|
||||
cont = xtr.MoveToFirstAttribute();
|
||||
while (cont)
|
||||
{
|
||||
switch (xtr.Name.ToUpper())
|
||||
{
|
||||
case "TIPORELACION": TipoRelacion = xtr.Value; break;
|
||||
}
|
||||
cont = xtr.MoveToNextAttribute();
|
||||
}
|
||||
while ((canread = xtr.Read()) && xtr.NodeType != XmlNodeType.Element) { }
|
||||
while (canread && xtr.Depth > cDepth)
|
||||
{
|
||||
if (xtr.Name.Replace("cfdi:", "") == "CfdiRelacionado")
|
||||
{
|
||||
CFDIRelacionado cfdir = new CFDIRelacionado();
|
||||
cfdir.TipoRelacion = TipoRelacion;
|
||||
cfdir.UUID = xtr.GetAttribute("UUID");
|
||||
xmlCFDI.cFDIRelacionados.Add(cfdir);
|
||||
}
|
||||
while ((canread = xtr.Read()) && xtr.NodeType != XmlNodeType.Element) { }
|
||||
}
|
||||
|
||||
}
|
||||
if (xtr.NodeType == XmlNodeType.Element && xtr.Name.Replace("cfdi:", "") == keyEmisor)
|
||||
{
|
||||
|
||||
|
||||
int curentNivel = xtr.Depth;
|
||||
cont = xtr.MoveToFirstAttribute();
|
||||
while (cont)
|
||||
{
|
||||
switch (xtr.Name.ToUpper())
|
||||
{
|
||||
case "REGIMENFISCAL": xmlCFDI.emisor.RegimenFiscal = xtr.Value; break;
|
||||
case "NOMBRE": xmlCFDI.emisor.Nombre = xtr.Value; break;
|
||||
case "RFC": xmlCFDI.emisor.Rfc = xtr.Value; break;
|
||||
}
|
||||
cont = xtr.MoveToNextAttribute();
|
||||
}
|
||||
while ((canread = xtr.Read()) && !(xtr.NodeType == XmlNodeType.Element && curentNivel >= xtr.Depth)) { }//continua hasta que no tenga nodos y (el nodo sea tipo elemnto y ete en el mismo nivel)
|
||||
}
|
||||
if (xtr.NodeType == XmlNodeType.Element && xtr.Name.Replace("cfdi:", "") == keyReceptor)
|
||||
{
|
||||
int curentNivel = xtr.Depth;
|
||||
cont = xtr.MoveToFirstAttribute();
|
||||
while (cont)
|
||||
{
|
||||
switch (xtr.Name.ToUpper())
|
||||
{
|
||||
case "RFC": xmlCFDI.receptor.Rfc = xtr.Value; break;
|
||||
case "NOMBRE": xmlCFDI.receptor.Nombre = xtr.Value; break;
|
||||
case "RESIDENCIAFISCAL": xmlCFDI.receptor.ResidenciaFiscal = xtr.Value; break;
|
||||
case "NUMREGIDTRIB": xmlCFDI.receptor.NumRegIdTrib = xtr.Value; break;
|
||||
case "USOCFDI": xmlCFDI.receptor.UsoCFDI = xtr.Value; break;
|
||||
}
|
||||
cont = xtr.MoveToNextAttribute();
|
||||
}
|
||||
|
||||
while ((canread = xtr.Read()) && !(xtr.NodeType == XmlNodeType.Element && curentNivel >= xtr.Depth)) { }//continua hasta que no tenga nodos y (el nodo sea tipo elemnto y ete en el mismo nivel)
|
||||
}
|
||||
if (xtr.NodeType == XmlNodeType.Element && xtr.Name.Replace("cfdi:", "") == keyConceptos)
|
||||
{
|
||||
int cDepth = xtr.Depth;
|
||||
while ((canread = xtr.Read()) && xtr.NodeType != XmlNodeType.Element) { }
|
||||
while (canread && xtr.Depth > cDepth)
|
||||
{
|
||||
if (xtr.Name.Replace("cfdi:", "") == "Concepto")
|
||||
{
|
||||
int cDepthb = xtr.Depth;
|
||||
CFDIConcepto concepto = new CFDIConcepto();
|
||||
|
||||
cont = xtr.MoveToFirstAttribute();
|
||||
while (cont)
|
||||
{
|
||||
switch (xtr.Name.ToUpper())
|
||||
{
|
||||
case "CLAVEPRODSERV": concepto.ClaveProdServ = xtr.Value; break;
|
||||
case "NOIDENTIFICACION": concepto.NoIdentificacion = xtr.Value; break;
|
||||
case "CANTIDAD": concepto.Cantidad = xtr.Value; break;
|
||||
case "CLAVEUNIDAD": concepto.ClaveUnidad = xtr.Value; break;
|
||||
case "UNIDAD": concepto.Unidad = xtr.Value; break;
|
||||
case "VALORUNITARIO": decimal ValorUnitario = 0; decimal.TryParse(xtr.Value, out ValorUnitario); concepto.ValorUnitario = ValorUnitario; ; break;
|
||||
case "IMPORTE": decimal Importe = 0; decimal.TryParse(xtr.Value, out Importe); concepto.Importe = Importe; ; break;
|
||||
case "DESCUENTO": decimal DDescuento = 0; decimal.TryParse(xtr.Value, out DDescuento); concepto.Descuento = DDescuento; ; break;
|
||||
case "DESCRIPCION": concepto.Descripcion = xtr.Value; break;
|
||||
}
|
||||
cont = xtr.MoveToNextAttribute();
|
||||
}
|
||||
xtr.MoveToFirstAttribute();
|
||||
while ((canread = xtr.Read()) && xtr.NodeType != XmlNodeType.Element) { }
|
||||
while (canread && xtr.Depth > cDepthb)
|
||||
{
|
||||
if (xtr.NodeType == XmlNodeType.Element && xtr.Name.Replace("cfdi:", "") == "Impuestos")
|
||||
{
|
||||
int cDepthc = xtr.Depth;
|
||||
while ((canread = xtr.Read()) && xtr.NodeType != XmlNodeType.Element) { }
|
||||
while (canread && xtr.Depth > cDepthc)
|
||||
{
|
||||
if (xtr.Name.Replace("cfdi:", "") == "Traslado" || xtr.Name.Replace("cfdi:", "") == "Retencion")
|
||||
{
|
||||
CFDIConceptoImpuesto impuesto = new CFDIConceptoImpuesto();
|
||||
impuesto.Impuesto = xtr.GetAttribute("Impuesto");
|
||||
impuesto.Tipo = xtr.LocalName;
|
||||
decimal Base = 0;
|
||||
decimal.TryParse(xtr.GetAttribute("Base"), out Base);
|
||||
impuesto.Base = Base;
|
||||
impuesto.TipoFactor = xtr.GetAttribute("TipoFactor");
|
||||
decimal tasaOCuota = 0;
|
||||
decimal.TryParse(xtr.GetAttribute("TasaOCuota"), out tasaOCuota);
|
||||
impuesto.TasaOCuota = impuesto.TipoFactor == "Tasa" ? (tasaOCuota * 100).ToString("N4") : xtr.GetAttribute("TasaOCuota");
|
||||
decimal ImImporte = 0;
|
||||
decimal.TryParse(xtr.GetAttribute("Importe"), out ImImporte);
|
||||
impuesto.Importe = ImImporte;
|
||||
|
||||
concepto.Impuestos.Add(impuesto);
|
||||
}
|
||||
while ((canread = xtr.Read()) && xtr.NodeType != XmlNodeType.Element) { }
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
bool rednew = true;
|
||||
if (xtr.NodeType == XmlNodeType.Element && xtr.Name.Replace("cfdi:", "") == "InformacionAduanera")
|
||||
{
|
||||
concepto.NumeroPedimento = xtr.GetAttribute("NumeroPedimento");
|
||||
rednew = false; while ((canread = xtr.Read()) && xtr.NodeType != XmlNodeType.Element) { }
|
||||
}
|
||||
if (xtr.NodeType == XmlNodeType.Element && xtr.Name.Replace("cfdi:", "") == "CuentaPredial")
|
||||
{
|
||||
concepto.CuentaPredial = xtr.GetAttribute("CuentaPredial");
|
||||
rednew = false; while ((canread = xtr.Read()) && xtr.NodeType != XmlNodeType.Element) { }
|
||||
}
|
||||
if (rednew) { while ((canread = xtr.Read()) && xtr.NodeType != XmlNodeType.Element) { } }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
xmlCFDI.conceptos.Add(concepto);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (xtr.NodeType == XmlNodeType.Element && xtr.Name.Replace("cfdi:", "") == keyImpuestos)
|
||||
{
|
||||
int cDepth = xtr.Depth;
|
||||
|
||||
while ((canread = xtr.Read()) && xtr.NodeType != XmlNodeType.Element) { }
|
||||
while (canread && xtr.Depth > cDepth)
|
||||
{
|
||||
CFDIImpuesto impuest = new CFDIImpuesto();
|
||||
if (xtr.Name.Replace("cfdi:", "") == "Traslado" || xtr.Name.Replace("cfdi:", "") == "Retencion" && xmlCFDI.comprobante.Version != null)
|
||||
{
|
||||
impuest.Tipo = xtr.LocalName == "Traslado" ? "Traslados" : (xtr.LocalName == "Retencion" ? "Retenciones" : "");
|
||||
impuest.Impuesto = xmlCFDI.comprobante.Version == "3.3" ? xtr.GetAttribute("Impuesto") : xtr.GetAttribute("impuesto");
|
||||
impuest.TipoFactor = xtr.GetAttribute("TipoFactor");
|
||||
impuest.TasaOCuota = xmlCFDI.comprobante.Version == "3.3" ? xtr.GetAttribute("TasaOCuota") : xtr.GetAttribute("tasa");
|
||||
decimal ImImporte = 0;
|
||||
decimal.TryParse((xmlCFDI.comprobante.Version == "3.3" ? xtr.GetAttribute("Importe") : xtr.GetAttribute("importe")), out ImImporte);
|
||||
impuest.Importe = ImImporte;
|
||||
xmlCFDI.Impuestos.Add(impuest);
|
||||
}
|
||||
while ((canread = xtr.Read()) && xtr.NodeType != XmlNodeType.Element) { }
|
||||
|
||||
}
|
||||
}
|
||||
if (xtr.NodeType == XmlNodeType.Element && xtr.Name.Replace("cfdi:", "") == keyComplemento)
|
||||
{
|
||||
int cDepth = xtr.Depth;
|
||||
while ((canread = xtr.Read()) && xtr.NodeType != XmlNodeType.Element) { }
|
||||
while (canread && xtr.Depth > cDepth)
|
||||
{
|
||||
if (xtr.NodeType == XmlNodeType.Element && xtr.LocalName == "TimbreFiscalDigital" && xmlCFDI.comprobante.Version != null)
|
||||
{
|
||||
xmlCFDI.complemento.xmlns_tfd = xtr.GetAttribute("xmlns:tfd");
|
||||
xmlCFDI.complemento.xsi_schemaLocation = xtr.GetAttribute("xsi:schemaLocation");
|
||||
xmlCFDI.complemento.Version = xtr.GetAttribute("Version");
|
||||
xmlCFDI.complemento.UUID = xtr.GetAttribute("UUID");
|
||||
xmlCFDI.complemento.FechaTimbrado = xtr.GetAttribute("FechaTimbrado");
|
||||
xmlCFDI.complemento.RfcProvCertif = xtr.GetAttribute("RfcProvCertif");
|
||||
xmlCFDI.complemento.SelloCFD = xmlCFDI.comprobante.Version == "3.3" ? xtr.GetAttribute("SelloCFD") : xtr.GetAttribute("selloCFD");
|
||||
xmlCFDI.complemento.NoCertificadoSAT = xmlCFDI.comprobante.Version == "3.3" ? xtr.GetAttribute("NoCertificadoSAT") : xtr.GetAttribute("noCertificadoSAT");
|
||||
xmlCFDI.complemento.SelloSAT = xmlCFDI.comprobante.Version == "3.3" ? xtr.GetAttribute("SelloSAT") : xtr.GetAttribute("selloSAT");
|
||||
|
||||
}
|
||||
|
||||
if (xtr.NodeType == XmlNodeType.Element && xtr.LocalName == "Pagos" && xmlCFDI.comprobante.Version != null)
|
||||
{
|
||||
while ((canread = xtr.Read()) && xtr.NodeType != XmlNodeType.Element) { }
|
||||
xmlCFDI.complemento.Pagos = new CFDIPago();
|
||||
int depthpagos = xtr.Depth;
|
||||
bool conts = xtr.MoveToFirstAttribute();
|
||||
while (conts)
|
||||
{
|
||||
|
||||
decimal Base = 0;
|
||||
switch (xtr.Name.ToUpper())
|
||||
{
|
||||
case "FECHAPAGO": xmlCFDI.complemento.Pagos.FechaPago = xtr.Value; break;
|
||||
case "FORMADEPAGOP": xmlCFDI.complemento.Pagos.FormaDePagoP = xtr.Value; break;
|
||||
case "FORMADEPAGOPTEXT": xmlCFDI.complemento.Pagos.FormaDePagoPText = xtr.Value; break;
|
||||
case "MONEDAP": xmlCFDI.complemento.Pagos.MonedaP = xtr.Value; break;
|
||||
case "MONTO": decimal.TryParse(xtr.Value, out Base); xmlCFDI.complemento.Pagos.Monto = Base; break;
|
||||
case "TIPOCAMBIOP": decimal.TryParse(xtr.Value, out Base); xmlCFDI.complemento.Pagos.TipoCambioP = Base; break;
|
||||
case "NUMOPERACION": xmlCFDI.complemento.Pagos.NumOperacion = xtr.Value; break;
|
||||
case "NOMBANCOORDEXT": xmlCFDI.complemento.Pagos.NomBancoOrdExt = xtr.Value; break;
|
||||
case "RFCEMISORCTAORD": xmlCFDI.complemento.Pagos.RfcEmisorCtaOrd = xtr.Value; break;
|
||||
case "CTAORDENANTE": xmlCFDI.complemento.Pagos.CtaOrdenante = xtr.Value; break;
|
||||
case "RFCEMISORCTABEN": xmlCFDI.complemento.Pagos.RfcEmisorCtaBen = xtr.Value; break;
|
||||
case "CTABENEFICIARIO": xmlCFDI.complemento.Pagos.CtaBeneficiario = xtr.Value; break;
|
||||
}
|
||||
conts = xtr.MoveToNextAttribute();
|
||||
}
|
||||
conts = xtr.MoveToFirstAttribute();
|
||||
while ((canread = xtr.Read()) && xtr.NodeType != XmlNodeType.Element) { }
|
||||
while (canread && xtr.Depth > depthpagos)
|
||||
{
|
||||
CFDIPagoDoctoRelacionado objpago = new CFDIPagoDoctoRelacionado();
|
||||
conts = xtr.MoveToFirstAttribute();
|
||||
while (conts)
|
||||
{
|
||||
|
||||
decimal Basep = 0;
|
||||
switch (xtr.Name.ToUpper())
|
||||
{
|
||||
case "IDDOCUMENTO": objpago.IdDocumento = xtr.Value; break;
|
||||
case "SERIE": objpago.Serie = xtr.Value; break;
|
||||
case "FOLIO": objpago.Folio = xtr.Value; break;
|
||||
case "MONEDADR": objpago.MonedaDR = xtr.Value; break;
|
||||
case "METODODEPAGODR": objpago.MetodoDePagoDR = xtr.Value; break;
|
||||
case "NUMPARCIALIDAD": objpago.NumParcialidad = xtr.Value; break;
|
||||
case "IMPSALDOANT": decimal.TryParse(xtr.Value, out Basep); objpago.ImpSaldoAnt = Basep; break;
|
||||
case "IMPPAGADO": decimal.TryParse(xtr.Value, out Basep); objpago.ImpPagado = Basep; break;
|
||||
case "IMPSALDOINSOLUTO": decimal.TryParse(xtr.Value, out Basep); objpago.ImpSaldoInsoluto = Basep; break;
|
||||
|
||||
}
|
||||
conts = xtr.MoveToNextAttribute();
|
||||
}
|
||||
conts = xtr.MoveToFirstAttribute();
|
||||
xmlCFDI.complemento.Pagos.doctosRelacionados.Add(objpago);
|
||||
while ((canread = xtr.Read()) && xtr.NodeType != XmlNodeType.Element) { }
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
while ((canread = xtr.Read()) && xtr.NodeType != XmlNodeType.Element) { }
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//si no entro en ninguna de los anteriores no se debe ciclar
|
||||
while ((canread = xtr.Read()) && xtr.NodeType != XmlNodeType.Element) { }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if (xmlCFDI.comprobante.Version == "3.3" || xmlCFDI.comprobante.Version == "3.2")
|
||||
{
|
||||
return xmlCFDI;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public class utilValores
|
||||
{
|
||||
public utilValores(string nombre, string valor)
|
||||
{
|
||||
Nombre = nombre;
|
||||
Valor = valor;
|
||||
}
|
||||
public string Nombre { get; set; }
|
||||
public string Valor { get; set; }
|
||||
}
|
||||
public class utilImage
|
||||
{
|
||||
public utilImage(byte[] imagenByte)
|
||||
{
|
||||
ImagenByte = imagenByte;
|
||||
}
|
||||
public byte[] ImagenByte { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class CFDIComplemento
|
||||
{
|
||||
public string xmlns_tfd { get; set; }
|
||||
public string xsi_schemaLocation { get; set; }
|
||||
public string Version { get; set; }
|
||||
public string UUID { get; set; }
|
||||
public string FechaTimbrado { get; set; }
|
||||
public string RfcProvCertif { get; set; }
|
||||
public string SelloCFD { get; set; }
|
||||
public string NoCertificadoSAT { get; set; }
|
||||
public string SelloSAT { get; set; }
|
||||
public CFDIPago Pagos { get; set; }
|
||||
public string CadenaOriginal
|
||||
{
|
||||
get
|
||||
{
|
||||
return string.Format("||{0}|{1}|{2}|{3}|{4}|{5}||", Version, UUID, FechaTimbrado, RfcProvCertif, SelloCFD, NoCertificadoSAT);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
public class CFDIComprobante
|
||||
{
|
||||
public string xmlns_cfdi { get; set; }
|
||||
public string xmlns_xsi { get; set; }
|
||||
public string xsi_schemaLocation { get; set; }
|
||||
public string Version { get; set; }
|
||||
public string Serie { get; set; }
|
||||
public string Folio { get; set; }
|
||||
public string Fecha { get; set; }
|
||||
public string Moneda { get; set; }
|
||||
public decimal SubTotal { get; set; }
|
||||
public decimal Total { get; set; }
|
||||
public decimal Descuento { get; set; }
|
||||
public decimal TipoCambio { get; set; }
|
||||
public string TipoDeComprobante { get; set; }
|
||||
|
||||
public string TipoDeComprobanteSIG
|
||||
{
|
||||
get
|
||||
{
|
||||
string retorno = "";
|
||||
if (Version == "3.3")
|
||||
{
|
||||
switch (TipoDeComprobante)
|
||||
{
|
||||
case "I":
|
||||
retorno = "Ing";
|
||||
break;
|
||||
case "E":
|
||||
retorno = "Egs";
|
||||
break;
|
||||
case "P":
|
||||
retorno = "PA";
|
||||
break;
|
||||
//case "T":
|
||||
// retorno = "Traslado";
|
||||
// break;
|
||||
//case "N":
|
||||
// retorno = "Nómina";
|
||||
// break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (Version == "3.2")
|
||||
{
|
||||
switch (TipoDeComprobante)
|
||||
{
|
||||
case "ingreso":
|
||||
retorno = "Ing";
|
||||
break;
|
||||
case "egreso":
|
||||
retorno = "Egs";
|
||||
break;
|
||||
case "P":
|
||||
retorno = "PA";
|
||||
break;
|
||||
//case "T":
|
||||
// retorno = "Traslado";
|
||||
// break;
|
||||
//case "N":
|
||||
// retorno = "Nómina";
|
||||
// break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else { retorno = TipoDeComprobante; }
|
||||
return retorno;
|
||||
}
|
||||
}
|
||||
public string TipoDeComprobanteTexto
|
||||
{
|
||||
get
|
||||
{
|
||||
string retorno = "";
|
||||
|
||||
if (Version == "3.3")
|
||||
{
|
||||
switch (TipoDeComprobante)
|
||||
{
|
||||
case "I":
|
||||
retorno = "Ingreso";
|
||||
break;
|
||||
case "E":
|
||||
retorno = "Egreso";
|
||||
break;
|
||||
case "P":
|
||||
retorno = "Pago";
|
||||
break;
|
||||
case "T":
|
||||
retorno = "Traslado";
|
||||
break;
|
||||
case "N":
|
||||
retorno = "Nómina";
|
||||
break;
|
||||
|
||||
default:
|
||||
retorno = TipoDeComprobante;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (Version == "3.2")
|
||||
{
|
||||
switch (TipoDeComprobante)
|
||||
{
|
||||
case "ingreso":
|
||||
retorno = "Ing";
|
||||
break;
|
||||
case "egreso":
|
||||
retorno = "Egs";
|
||||
break;
|
||||
case "P":
|
||||
retorno = "PA";
|
||||
break;
|
||||
//case "T":
|
||||
// retorno = "Traslado";
|
||||
// break;
|
||||
//case "N":
|
||||
// retorno = "Nómina";
|
||||
// break;
|
||||
|
||||
default:
|
||||
retorno = TipoDeComprobante;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else { retorno = TipoDeComprobante; }
|
||||
return retorno;
|
||||
}
|
||||
}
|
||||
public string FormaPago { get; set; }
|
||||
|
||||
public string FormaPagoTexto
|
||||
{
|
||||
get
|
||||
{
|
||||
string retorno = "";
|
||||
|
||||
switch (FormaPago)
|
||||
{
|
||||
case "01": retorno = "Efectivo"; break;
|
||||
case "02": retorno = "Cheque nominativo"; break;
|
||||
case "03": retorno = "Transferencia electrónica de fondos"; break;
|
||||
case "04": retorno = "Tarjeta de crédito"; break;
|
||||
case "05": retorno = "Monedero electrónico"; break;
|
||||
case "06": retorno = "Dinero electrónico"; break;
|
||||
case "08": retorno = "Vales de despensa"; break;
|
||||
case "12": retorno = "Dación en pago"; break;
|
||||
case "13": retorno = "Pago por subrogación"; break;
|
||||
case "14": retorno = "Pago por consignación"; break;
|
||||
case "15": retorno = "Condonación"; break;
|
||||
case "17": retorno = "Compensación"; break;
|
||||
case "23": retorno = "Novación"; break;
|
||||
case "24": retorno = "Confusión"; break;
|
||||
case "25": retorno = "Remisión de deuda"; break;
|
||||
case "26": retorno = "Prescripción o caducidad"; break;
|
||||
case "27": retorno = "A satisfacción del acreedor"; break;
|
||||
case "28": retorno = "Tarjeta de débito"; break;
|
||||
case "29": retorno = "Tarjeta de servicios"; break;
|
||||
case "30": retorno = "Aplicación de anticipos"; break;
|
||||
case "31": retorno = "Intermediario pagos"; break;
|
||||
case "99": retorno = "Por definir"; break;
|
||||
default: retorno = FormaPago; break;
|
||||
}
|
||||
return retorno;
|
||||
}
|
||||
}
|
||||
public string MetodoPago { get; set; }
|
||||
public string MetodoPagoTexto
|
||||
{
|
||||
get
|
||||
{
|
||||
string retorno = "";
|
||||
|
||||
switch (MetodoPago)
|
||||
{
|
||||
case "PUE": retorno = "Pago en una sola exhibición"; break;
|
||||
case "PPD": retorno = "Pago en parcialidades o diferido"; break;
|
||||
default: retorno = MetodoPago; break;
|
||||
}
|
||||
return retorno;
|
||||
}
|
||||
}
|
||||
public string CondicionesDePago { get; set; }
|
||||
public string LugarExpedicion { get; set; }
|
||||
public string Confirmacion { get; set; }
|
||||
public string NoCertificado { get; set; }
|
||||
public string Sello { get; set; }
|
||||
public string Certificado { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class CFDIConcepto
|
||||
{
|
||||
public CFDIConcepto()
|
||||
{
|
||||
Impuestos = new List<CFDIConceptoImpuesto>();
|
||||
}
|
||||
public string ClaveProdServ { get; set; }
|
||||
public string NoIdentificacion { get; set; }
|
||||
public string Cantidad { get; set; }
|
||||
public string ClaveUnidad { get; set; }
|
||||
public string Unidad { get; set; }
|
||||
public decimal ValorUnitario { get; set; }
|
||||
public decimal Importe { get; set; }
|
||||
public decimal Descuento { get; set; }
|
||||
public string NumeroPedimento { get; set; }
|
||||
public string CuentaPredial { get; set; }
|
||||
public string Descripcion { get; set; }
|
||||
public List<CFDIConceptoImpuesto> Impuestos { get; set; }
|
||||
}
|
||||
|
||||
public class CFDIConcepto_I
|
||||
{
|
||||
public int tipo { get; set; }
|
||||
public int orden { get; set; }
|
||||
public string ClaveProdServ { get; set; }
|
||||
public string NoIdentificacion { get; set; }
|
||||
public string Cantidad { get; set; }
|
||||
public string ClaveUnidad { get; set; }
|
||||
public string Unidad { get; set; }
|
||||
public decimal ValorUnitario { get; set; }
|
||||
public decimal Importe { get; set; }
|
||||
public decimal Descuento { get; set; }
|
||||
public string NumeroPedimento { get; set; }
|
||||
public string CuentaPredial { get; set; }
|
||||
public string Descripcion { get; set; }
|
||||
|
||||
|
||||
public string Impuesto { get; set; }
|
||||
|
||||
public string Impuesto_Tipo { get; set; }
|
||||
public decimal Impuesto_Base { get; set; }
|
||||
public string Impuesto_TipoFactor { get; set; }
|
||||
public string Impuesto_TasaOCuota { get; set; }
|
||||
public decimal Impuesto_Importe { get; set; }
|
||||
}
|
||||
|
||||
public class CFDIConceptoImpuesto
|
||||
{
|
||||
public string Impuesto { get; set; }
|
||||
public string ImpuestoTexto
|
||||
{
|
||||
get
|
||||
{
|
||||
string retorno = "";
|
||||
|
||||
switch (Impuesto)
|
||||
{
|
||||
case "001": retorno = "ISR"; break;
|
||||
case "002": retorno = "IVA"; break;
|
||||
case "003": retorno = "IEPS"; break;
|
||||
}
|
||||
return retorno;
|
||||
}
|
||||
}
|
||||
public string Tipo { get; set; }
|
||||
public decimal Base { get; set; }
|
||||
public string TipoFactor { get; set; }
|
||||
public string TasaOCuota { get; set; }
|
||||
public decimal Importe { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class CFDIEmisor
|
||||
{
|
||||
public string RegimenFiscal { get; set; }
|
||||
|
||||
public string RegimenFiscalTexto
|
||||
{
|
||||
get
|
||||
{
|
||||
string retorno = "";
|
||||
|
||||
switch (RegimenFiscal)
|
||||
{
|
||||
case "601": retorno = "General de Ley Personas Morales"; break;
|
||||
case "603": retorno = "Personas Morales con Fines no Lucrativos"; break;
|
||||
case "605": retorno = "Sueldos y Salarios e Ingresos Asimilados a Salarios"; break;
|
||||
case "606": retorno = "Arrendamiento"; break;
|
||||
case "608": retorno = "Demás ingresos"; break;
|
||||
case "609": retorno = "Consolidación"; break;
|
||||
case "610": retorno = "Residentes en el Extranjero sin Establecimiento Permanente en México"; break;
|
||||
case "611": retorno = "Ingresos por Dividendos (socios y accionistas)"; break;
|
||||
case "612": retorno = "Personas Físicas con Actividades Empresariales y Profesionales"; break;
|
||||
case "614": retorno = "Ingresos por intereses"; break;
|
||||
case "616": retorno = "Sin obligaciones fiscales"; break;
|
||||
case "620": retorno = "Sociedades Cooperativas de Producción que optan por diferir sus ingresos"; break;
|
||||
case "621": retorno = "Incorporación Fiscal"; break;
|
||||
case "622": retorno = "Actividades Agrícolas, Ganaderas, Silvícolas y Pesqueras"; break;
|
||||
case "623": retorno = "Opcional para Grupos de Sociedades"; break;
|
||||
case "624": retorno = "Coordinados"; break;
|
||||
case "628": retorno = "Hidrocarburos"; break;
|
||||
case "607": retorno = "Régimen de Enajenación o Adquisición de Bienes"; break;
|
||||
case "629": retorno = "De los Regímenes Fiscales Preferentes y de las Empresas Multinacionales"; break;
|
||||
case "630": retorno = "Enajenación de acciones en bolsa de valores"; break;
|
||||
case "615": retorno = "Régimen de los ingresos por obtención de premios"; break;
|
||||
|
||||
}
|
||||
return retorno;
|
||||
}
|
||||
}
|
||||
public string Nombre { get; set; }
|
||||
public string Rfc { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class CFDIImpuesto
|
||||
{
|
||||
public string Tipo { get; set; }
|
||||
public string Impuesto { get; set; }
|
||||
public string ImpuestoTexto
|
||||
{
|
||||
get
|
||||
{
|
||||
string retorno = "";
|
||||
|
||||
switch (Impuesto)
|
||||
{
|
||||
case "001": retorno = "ISR"; break;
|
||||
case "002": retorno = "IVA"; break;
|
||||
case "003": retorno = "IEPS"; break;
|
||||
}
|
||||
return retorno;
|
||||
}
|
||||
}
|
||||
public string TipoFactor { get; set; }
|
||||
public string TasaOCuota { get; set; }
|
||||
public decimal Importe { get; set; }
|
||||
}
|
||||
|
||||
public class CFDIPago
|
||||
{
|
||||
public CFDIPago()
|
||||
{
|
||||
doctosRelacionados = new List<CFDIPagoDoctoRelacionado>();
|
||||
}
|
||||
public string FechaPago { get; set; }
|
||||
public string FormaDePagoP { get; set; }
|
||||
public string FormaDePagoPText { get; set; }
|
||||
public string MonedaP { get; set; }
|
||||
public decimal Monto { get; set; }
|
||||
public decimal TipoCambioP { get; set; }
|
||||
public string NumOperacion { get; set; }
|
||||
public string NomBancoOrdExt { get; set; }
|
||||
public string RfcEmisorCtaOrd { get; set; }
|
||||
public string CtaOrdenante { get; set; }
|
||||
public string RfcEmisorCtaBen { get; set; }
|
||||
public string CtaBeneficiario { get; set; }
|
||||
public List<CFDIPagoDoctoRelacionado> doctosRelacionados { get; set; }
|
||||
}
|
||||
|
||||
public class CFDIPagoDoctoRelacionado
|
||||
{
|
||||
public string IdDocumento { get; set; }
|
||||
public string Serie { get; set; }
|
||||
public string Folio { get; set; }
|
||||
public string MonedaDR { get; set; }
|
||||
public string MetodoDePagoDR { get; set; }
|
||||
public string NumParcialidad { get; set; }
|
||||
public decimal ImpSaldoAnt { get; set; }
|
||||
public decimal ImpPagado { get; set; }
|
||||
public decimal ImpSaldoInsoluto { get; set; }
|
||||
}
|
||||
|
||||
public class CFDIReceptor
|
||||
{
|
||||
public string Rfc { get; set; }
|
||||
public string Nombre { get; set; }
|
||||
public string ResidenciaFiscal { get; set; }
|
||||
public string NumRegIdTrib { get; set; }
|
||||
public string UsoCFDI { get; set; }
|
||||
public string UsoCFDITexto
|
||||
{
|
||||
get
|
||||
{
|
||||
string retorno = "N/A";
|
||||
|
||||
switch (UsoCFDI)
|
||||
{
|
||||
case "G01":
|
||||
retorno = "Adquisición de mercancías";
|
||||
break;
|
||||
case "G02":
|
||||
retorno = "Devoluciones, descuentos o bonificaciones";
|
||||
break;
|
||||
case "G03":
|
||||
retorno = "Gastos en general";
|
||||
break;
|
||||
case "I01":
|
||||
retorno = "Construcciones";
|
||||
break;
|
||||
case "I02":
|
||||
retorno = "Mobiliario y equipo de oficina por inversiones";
|
||||
break;
|
||||
case "I03":
|
||||
retorno = "Equipo de transporte";
|
||||
break;
|
||||
case "I04":
|
||||
retorno = "Equipo de cómputo y accesorios";
|
||||
break;
|
||||
case "I05":
|
||||
retorno = "Dados, troqueles, moldes, matrices y herramental";
|
||||
break;
|
||||
case "I06":
|
||||
retorno = "Comunicaciones telefónicas";
|
||||
break;
|
||||
case "I07":
|
||||
retorno = "Comunicaciones satelitales";
|
||||
break;
|
||||
case "I08":
|
||||
retorno = "Otra maquinaria y equipo";
|
||||
break;
|
||||
case "D01":
|
||||
retorno = "Honorarios médicos, dentales y gastos hospitalarios.";
|
||||
break;
|
||||
case "D02":
|
||||
retorno = "Gastos médicos por incapacidad o discapacidad";
|
||||
break;
|
||||
case "D03":
|
||||
retorno = "Gastos funerales.";
|
||||
break;
|
||||
case "D04":
|
||||
retorno = "Donativos.";
|
||||
break;
|
||||
case "D05":
|
||||
retorno = "Intereses reales efectivamente pagados por créditos hipotecarios (casa habitación).";
|
||||
break;
|
||||
case "D06":
|
||||
retorno = "Aportaciones voluntarias al SAR.";
|
||||
break;
|
||||
case "D07":
|
||||
retorno = "Primas por seguros de gastos médicos.";
|
||||
break;
|
||||
case "D08":
|
||||
retorno = "Gastos de transportación escolar obligatoria.";
|
||||
break;
|
||||
case "D09":
|
||||
retorno = "Depósitos en cuentas para el ahorro, primas que tengan como base planes de pensiones.";
|
||||
break;
|
||||
case "D10":
|
||||
retorno = "Pagos por servicios educativos (colegiaturas)";
|
||||
break;
|
||||
case "P01":
|
||||
retorno = "Por definir";
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return retorno;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class CFDIRelacionado
|
||||
{
|
||||
public string TipoRelacion { get; set; }
|
||||
public string TipoRelacionTexto
|
||||
{
|
||||
|
||||
get
|
||||
{
|
||||
string retorno;
|
||||
|
||||
switch (TipoRelacion)
|
||||
{
|
||||
case "01": retorno = "Nota de crédito de los documentos relacionados"; break;
|
||||
case "02": retorno = "Nota de débito de los documentos relacionados"; break;
|
||||
case "03": retorno = "Devolución de mercancía sobre facturas o traslados previos"; break;
|
||||
case "04": retorno = "Sustitución de los CFDI previos"; break;
|
||||
case "05": retorno = "Traslados de mercancias facturados previamente"; break;
|
||||
case "06": retorno = "Factura generada por los traslados previos"; break;
|
||||
case "07": retorno = "CFDI por aplicación de anticipo"; break;
|
||||
default:
|
||||
retorno = "Por definir";
|
||||
break;
|
||||
}
|
||||
return retorno;
|
||||
}
|
||||
}
|
||||
public string UUID { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -105,10 +105,12 @@ Partial Class Ventas_RepTopClientesVentas
|
||||
End Sub
|
||||
|
||||
Private Sub CambioGrafica()
|
||||
Dim DtClientesAux As New DataTable
|
||||
DtClientesAux = DtClientes.FiltraParametros("CveCliente > 0")
|
||||
Dim Dt As New DataTable()
|
||||
Dt.Columns.Add("Cliente")
|
||||
Dt.Columns.Add("Importe")
|
||||
For Each Dr As DataRow In DtClientes.Rows
|
||||
For Each Dr As DataRow In DtClientesAux.Rows
|
||||
Dim Row As DataRow = Nothing
|
||||
Row = Dt.NewRow()
|
||||
Row("Cliente") = Dr("NombreComercial").ToString
|
||||
|
||||
Reference in New Issue
Block a user