Funcionalidad 706, en ventas y estados financieros
This commit is contained in:
@@ -193,7 +193,7 @@ Public Class ClsContabilidad
|
||||
End Function
|
||||
|
||||
Public Function AddPrePolizas(Modulo As String, CvePlantillaPoliza As Integer, Cargos As Double, Abonos As Double, CveMoneda As Integer, Fecha As Date, Concepto As String, CveUsuario As Integer, CveEmpresa As Integer, Optional FolioFijo As Integer = 0, Optional ReglaFolioPoliza As String = "", Optional CveTipoPoliza As Integer = -1,
|
||||
Optional AgregarFolio As Boolean = False) As Integer
|
||||
Optional AgregarFolio As Boolean = False, Optional TipoContable As Integer = -1) As Integer
|
||||
FolioPoliza = -1
|
||||
Dim Retorno As Integer = -1
|
||||
|
||||
@@ -215,6 +215,7 @@ Public Class ClsContabilidad
|
||||
.Add("@FolioPoliza", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
.Add("@ReglaFolioPoliza", SqlDbType.VarChar).Value = ReglaFolioPoliza
|
||||
.Add("@AgregarFolio", SqlDbType.Bit).Value = AgregarFolio
|
||||
.Add("@TipoContable", SqlDbType.Int).Value = TipoContable
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -2470,8 +2470,13 @@ Namespace Modelos
|
||||
End If
|
||||
IdCtaContableCliente = IdCtaContable
|
||||
|
||||
If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 190, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 193, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
Dim ContabilizableRem As Boolean = False
|
||||
If ObjFactura.TipoContable <> -1 Then
|
||||
ContabilizableRem = True
|
||||
End If
|
||||
|
||||
If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 190, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=ContabilizableRem, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 193, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=ContabilizableRem, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
Else
|
||||
@@ -5249,7 +5254,7 @@ Namespace Modelos
|
||||
If Not AplicaRefacturacionConPagos AndAlso ((((ObjFactura.Saldo > 0 AndAlso (CveEstatus > 0 AndAlso Not CveEstatus.Contiene(20, 23))) OrElse (ObjFactura.Total = 0 AndAlso UsuarioActual.CveEmpresa.Contiene(72) AndAlso ObjFactura.TipoDocto.Contiene("Ing"))) AndAlso CveEstatus.Contiene(4, 5)) OrElse (CvePlantillaPoliza = 7 AndAlso (CveEstatus > 0 AndAlso Not CveEstatus.Contiene(20, 23)))) Then
|
||||
|
||||
'CUANDO SE CANCELA, LA PÓLIZA DEBE DE SER DE DIARIO
|
||||
CvePrePoliza = ObjConta.AddPrePolizas("Modelos/CancelarDocumento", CvePlantillaPoliza, ObjFactura.Total, ObjFactura.Total, ObjFactura.CveMoneda, CancelacionFecha, ObjFactura.Cliente.Nombre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=3)
|
||||
CvePrePoliza = ObjConta.AddPrePolizas("Modelos/CancelarDocumento", CvePlantillaPoliza, ObjFactura.Total, ObjFactura.Total, ObjFactura.CveMoneda, CancelacionFecha, ObjFactura.Cliente.Nombre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=3, TipoContable:=ObjFactura.TipoContable)
|
||||
ObjFactura.CvePrePoliza = CvePrePoliza
|
||||
|
||||
If ObjFactura.CvePrePoliza <= 0 Then
|
||||
@@ -7285,6 +7290,8 @@ Namespace Modelos
|
||||
|
||||
Public Property MotivoCancelacion As String = ""
|
||||
|
||||
Public Property TipoContable As Integer = -1
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@ WebHandler Language="VB" Class="SIGFacturacion" %>
|
||||
|
||||
<%@ WebHandler Language="VB" Class="SIGFacturacion" %>
|
||||
|
||||
Imports System
|
||||
Imports System.Web
|
||||
Imports System.Net.Http
|
||||
@@ -11,62 +11,62 @@ Imports Extensiones
|
||||
Imports System.IO
|
||||
Imports Modelos
|
||||
|
||||
Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
|
||||
Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
|
||||
Private Property CveEmpresaFacturar As Integer = 143
|
||||
|
||||
Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
|
||||
context.Response.ContentType = "text/plain"
|
||||
context.Response.ContentType = "text/plain"
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
Try
|
||||
'If context.Request.InputStream IsNot Nothing Then
|
||||
' Using reader As New StreamReader(context.Request.InputStream)
|
||||
' Dim json = reader.ReadToEnd
|
||||
|
||||
' If Not String.IsNullOrEmpty(json) Then
|
||||
' Dim JsonRequest As JObject = JObject.Parse(json)
|
||||
' If JsonRequest IsNot Nothing Then
|
||||
' Dim Metodo = JsonRequest("Metodo").ToString()
|
||||
' If Metodo = "FactMasivaRemisiones" Then
|
||||
' Dim pCveEmpresa = JsonRequest("CveEmpresa").ToString()
|
||||
' Dim pFechaI As String = ""
|
||||
' Dim pFechaF As String = ""
|
||||
|
||||
' If JsonRequest("FechaI") IsNot Nothing AndAlso JsonRequest("FechaF") IsNot Nothing Then
|
||||
' pFechaI = JsonRequest("FechaI")
|
||||
' pFechaF = JsonRequest("FechaF")
|
||||
' End If
|
||||
|
||||
' IniciaFacturacionMasiva(context, CveEmpresaFacturar, pFechaI, pFechaF)
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' End Using
|
||||
'End If
|
||||
|
||||
Dim Metodo = If(context.Request("Metodo") = Nothing, "", context.Request("Metodo").ToString())
|
||||
If Metodo = "FactMasivaRemisiones" Then
|
||||
Dim pFechaI As String = ""
|
||||
Dim pFechaF As String = ""
|
||||
|
||||
If context.Request("FechaI") IsNot Nothing AndAlso context.Request("FechaF") IsNot Nothing Then
|
||||
pFechaI = context.Request("FechaI")
|
||||
pFechaF = context.Request("FechaF")
|
||||
End If
|
||||
|
||||
Retorno = IniciaFacturacionMasiva(CveEmpresaFacturar, pFechaI, pFechaF)
|
||||
Try
|
||||
'If context.Request.InputStream IsNot Nothing Then
|
||||
' Using reader As New StreamReader(context.Request.InputStream)
|
||||
' Dim json = reader.ReadToEnd
|
||||
|
||||
' If Not String.IsNullOrEmpty(json) Then
|
||||
' Dim JsonRequest As JObject = JObject.Parse(json)
|
||||
' If JsonRequest IsNot Nothing Then
|
||||
' Dim Metodo = JsonRequest("Metodo").ToString()
|
||||
' If Metodo = "FactMasivaRemisiones" Then
|
||||
' Dim pCveEmpresa = JsonRequest("CveEmpresa").ToString()
|
||||
' Dim pFechaI As String = ""
|
||||
' Dim pFechaF As String = ""
|
||||
|
||||
' If JsonRequest("FechaI") IsNot Nothing AndAlso JsonRequest("FechaF") IsNot Nothing Then
|
||||
' pFechaI = JsonRequest("FechaI")
|
||||
' pFechaF = JsonRequest("FechaF")
|
||||
' End If
|
||||
|
||||
' IniciaFacturacionMasiva(context, CveEmpresaFacturar, pFechaI, pFechaF)
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' End Using
|
||||
'End If
|
||||
|
||||
Dim Metodo = If(context.Request("Metodo") = Nothing, "", context.Request("Metodo").ToString())
|
||||
If Metodo = "FactMasivaRemisiones" Then
|
||||
Dim pFechaI As String = ""
|
||||
Dim pFechaF As String = ""
|
||||
|
||||
If context.Request("FechaI") IsNot Nothing AndAlso context.Request("FechaF") IsNot Nothing Then
|
||||
pFechaI = context.Request("FechaI")
|
||||
pFechaF = context.Request("FechaF")
|
||||
End If
|
||||
|
||||
Retorno = IniciaFacturacionMasiva(CveEmpresaFacturar, pFechaI, pFechaF)
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
ex.GuardaLog(ex.Message)
|
||||
End Try
|
||||
|
||||
If Retorno Then
|
||||
context.Response.Write("True")
|
||||
Else
|
||||
context.Response.Write("False")
|
||||
End Try
|
||||
|
||||
If Retorno Then
|
||||
context.Response.Write("True")
|
||||
Else
|
||||
context.Response.Write("False")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -77,7 +77,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private Function IniciaFacturacionMasiva(pCveEmpresa As String, pFechaI As String, pFechaF As String) As Boolean
|
||||
Private Function IniciaFacturacionMasiva(pCveEmpresa As String, pFechaI As String, pFechaF As String) As Boolean
|
||||
Dim Retorno As Boolean = True
|
||||
Dim JsonRetorno As New JObject()
|
||||
Dim CveEmpresa As Integer = pCveEmpresa.ToEntero()
|
||||
@@ -96,9 +96,9 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
FechaI = New DateTime(DomingoAnterior.Year, DomingoAnterior.Month, DomingoAnterior.Day, 0, 0, 0)
|
||||
FechaF = New DateTime(Sabado.Year, Sabado.Month, Sabado.Day, 23, 59, 59)
|
||||
|
||||
JsonRetorno = EjecutarFacturacionMasiva(Usuario, FechaI, FechaF, Usuario.Empresa.FacturaProduccion)
|
||||
Else
|
||||
Retorno = False
|
||||
JsonRetorno = EjecutarFacturacionMasiva(Usuario, FechaI, FechaF, Usuario.Empresa.FacturaProduccion)
|
||||
Else
|
||||
Retorno = False
|
||||
GuardaLogFacturacion("Ejecución no permitida, no es el dia permitido para ejecucion o no se espeficaron las fechas")
|
||||
End If
|
||||
Else
|
||||
@@ -107,11 +107,11 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
|
||||
JsonRetorno = EjecutarFacturacionMasiva(Usuario, FechaI, FechaF, Usuario.Empresa.FacturaProduccion)
|
||||
End If
|
||||
End If
|
||||
|
||||
GuardaLogFacturacion("Ejecución Exitosa, se generaron las siguientes facturas:")
|
||||
GuardaLogFacturacion(JsonRetorno.ToString())
|
||||
|
||||
End If
|
||||
|
||||
GuardaLogFacturacion("Ejecución Exitosa, se generaron las siguientes facturas:")
|
||||
GuardaLogFacturacion(JsonRetorno.ToString())
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
@@ -242,8 +242,8 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
json.Add(New JProperty("Almacen", ObsInv.ToString()))
|
||||
|
||||
Return json
|
||||
End Function
|
||||
|
||||
End Function
|
||||
|
||||
#Region "V A L I D A - D A T O S"
|
||||
Private Function ValidaUsuarioSistema(CveEmpresa As Integer) As Usuario
|
||||
Dim UsuarioActual As Usuario = Nothing
|
||||
@@ -277,8 +277,8 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
UsuarioActual.Empresa = ObjEmpresa.Empresa
|
||||
End If
|
||||
ObjEmpresa.Dispose()
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
#Region "D E F I N I R - O B J E T O S"
|
||||
Private Function CreaFactura(Resp As Modelos.Factura.MMensajeFactura, UsuarioActual As Usuario, DTRemisionesPS As DataTable, CveCliente As Integer, CveSubProyecto As Integer, CveMoneda As Integer, DatosRemisiones As JObject, FechaI As DateTime, FechaF As DateTime) As Modelos.Factura
|
||||
@@ -780,7 +780,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
|
||||
'RECARGAR GV
|
||||
Return Row
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
#Region "E N V I O - C O R R E O"
|
||||
Private Sub EnviarCorreo(Objfactura As Modelos.Factura, UsuarioActual As Usuario)
|
||||
@@ -924,9 +924,9 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
End If
|
||||
End Try
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
Public Sub GuardaLogFacturacion(Str As String)
|
||||
Dim ArchivoW As StreamWriter
|
||||
Dim strLineaTMP As String
|
||||
@@ -949,8 +949,8 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
|
||||
ArchivoW.Close()
|
||||
ArchivoW.Dispose()
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#Region "G L O B A L - D T"
|
||||
Public Property GlobalTipoCambio(Optional Fecha As Date = MinFecha) As Double
|
||||
Get
|
||||
@@ -1135,10 +1135,10 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
Set(value As DataTable)
|
||||
HttpContext.Current.Application("GlobalDTPSATPS") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Property
|
||||
|
||||
#Region "GLOBALES DE SAT COMERCIO EXTERIOR"
|
||||
|
||||
|
||||
Property GlobalDTClavePedimento() As DataTable
|
||||
Get
|
||||
GlobalDTClavePedimento = DirectCast(HttpContext.Current.Application("GlobalDTClavePedimento"), DataTable)
|
||||
@@ -1248,10 +1248,10 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
Set(value As DataTable)
|
||||
HttpContext.Current.Application("GlobalDTColonia") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Property GlobalDTPSATUM() As DataTable
|
||||
Get
|
||||
GlobalDTPSATUM = DirectCast(HttpContext.Current.Application("GlobalDTPSATUM"), DataTable)
|
||||
@@ -1635,8 +1635,8 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
Set(value As DataTable)
|
||||
HttpContext.Current.Application("GlobalDTLeyendasFiscales") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Property
|
||||
|
||||
Property GlobalDTEstatusFactura() As DataTable
|
||||
Get
|
||||
GlobalDTEstatusFactura = DirectCast(HttpContext.Current.Application("GlobalDTEstatusFactura"), DataTable)
|
||||
@@ -1680,37 +1680,37 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
HttpContext.Current.Application("GlobalDTProyectos") = value
|
||||
End Set
|
||||
End Property
|
||||
Public Property GlobalDTSubProyectos(CveProyecto As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEmpresa As Integer = -1, Optional Estatus As Integer = 1) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = String.Format("GlobalDTSubProyectos-{0}", CveEmpresa)
|
||||
'sino existe, recarga los datos
|
||||
If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Or (DirectCast(HttpContext.Current.Application(AppNombre), DataTable) IsNot Nothing AndAlso DirectCast(HttpContext.Current.Application(AppNombre), DataTable).Rows.Count = 0) Then
|
||||
Dim P As New ClsSubProyectos
|
||||
If P.GetSubProyectos(CveEmpresa:=CveEmpresa) Then HttpContext.Current.Application(AppNombre) = P.DtResultados
|
||||
P.Dispose()
|
||||
|
||||
End If
|
||||
|
||||
If CveProyecto <> -1 OrElse CveSubProyecto <> -1 OrElse CveEmpresa <> -1 OrElse Estatus <> -1 Then
|
||||
Dim StrSQL As New StringBuilder
|
||||
If CveProyecto <> -1 Then StrSQL.AppendFormat(" AND CveProyecto = {0}", CveProyecto)
|
||||
If CveSubProyecto <> -1 Then StrSQL.AppendFormat(" AND CveSubProyecto = {0}", CveSubProyecto)
|
||||
If Estatus <> -1 Then StrSQL.AppendFormat(" AND CveEstatus = {0}", Estatus)
|
||||
If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa)
|
||||
|
||||
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
|
||||
GlobalDTSubProyectos = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
|
||||
Else
|
||||
GlobalDTSubProyectos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(ByVal value As DataTable)
|
||||
Dim AppNombre As String = String.Format("GlobalDTSubProyectos-{0}", CveEmpresa)
|
||||
HttpContext.Current.Application(AppNombre) = value
|
||||
End Set
|
||||
Public Property GlobalDTSubProyectos(CveProyecto As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEmpresa As Integer = -1, Optional Estatus As Integer = 1) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = String.Format("GlobalDTSubProyectos-{0}", CveEmpresa)
|
||||
'sino existe, recarga los datos
|
||||
If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Or (DirectCast(HttpContext.Current.Application(AppNombre), DataTable) IsNot Nothing AndAlso DirectCast(HttpContext.Current.Application(AppNombre), DataTable).Rows.Count = 0) Then
|
||||
Dim P As New ClsSubProyectos
|
||||
If P.GetSubProyectos(CveEmpresa:=CveEmpresa) Then HttpContext.Current.Application(AppNombre) = P.DtResultados
|
||||
P.Dispose()
|
||||
|
||||
End If
|
||||
|
||||
If CveProyecto <> -1 OrElse CveSubProyecto <> -1 OrElse CveEmpresa <> -1 OrElse Estatus <> -1 Then
|
||||
Dim StrSQL As New StringBuilder
|
||||
If CveProyecto <> -1 Then StrSQL.AppendFormat(" AND CveProyecto = {0}", CveProyecto)
|
||||
If CveSubProyecto <> -1 Then StrSQL.AppendFormat(" AND CveSubProyecto = {0}", CveSubProyecto)
|
||||
If Estatus <> -1 Then StrSQL.AppendFormat(" AND CveEstatus = {0}", Estatus)
|
||||
If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa)
|
||||
|
||||
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
|
||||
GlobalDTSubProyectos = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
|
||||
Else
|
||||
GlobalDTSubProyectos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(ByVal value As DataTable)
|
||||
Dim AppNombre As String = String.Format("GlobalDTSubProyectos-{0}", CveEmpresa)
|
||||
HttpContext.Current.Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTSubProyectosUsuarios(CveUsuario As Integer, CveProyecto As Integer, CveEmpresa As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEstatus As Integer = -1) As DataTable
|
||||
Get
|
||||
@@ -2305,44 +2305,44 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
HttpContext.Current.Application("GlobalDTAlmacen") = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTAlmacenUsuarios(CveUsuario As Integer, CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = 1) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = String.Format("GlobalDTAlmacenUsuarios-{0}", CveEmpresa)
|
||||
'sino existe, recarga los datos
|
||||
If HttpContext.Current.Application(AppNombre) Is Nothing Then
|
||||
Dim ObjUsr As New ClsSisUsuarios
|
||||
If ObjUsr.GetAlmacen(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjUsr.DtResultados
|
||||
ObjUsr.Dispose()
|
||||
End If
|
||||
Dim Str As New StringBuilder
|
||||
Str.AppendFormat("CveUsuario = {0} AND CveEmpresa = {1} ", CveUsuario, CveEmpresa)
|
||||
If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen)
|
||||
|
||||
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
|
||||
GlobalDTAlmacenUsuarios = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Dim AppNombre As String = String.Format("GlobalDTAlmacenUsuarios-{0}", CveEmpresa)
|
||||
HttpContext.Current.Application(AppNombre) = value
|
||||
End Set
|
||||
'Get
|
||||
' If CveEmpresa <> -1 Then
|
||||
' Dim Str As New StringBuilder
|
||||
' Str.AppendFormat("CveUsuario = {0} AND CveEmpresa = {1} ", CveUsuario, CveEmpresa)
|
||||
' If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen)
|
||||
|
||||
' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAlmacenUsuarios"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
|
||||
' GlobalDTAlmacenUsuarios = Dv.ToTable
|
||||
' Dv.Dispose()
|
||||
' Else
|
||||
' GlobalDTAlmacenUsuarios = DirectCast(HttpContext.Current.Application("GlobalDTAlmacenUsuarios"), DataTable)
|
||||
' End If
|
||||
|
||||
'End Get
|
||||
'Set(value As DataTable)
|
||||
' HttpContext.Current.Application("GlobalDTAlmacenUsuarios") = value
|
||||
'End Set
|
||||
Property GlobalDTAlmacenUsuarios(CveUsuario As Integer, CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = 1) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = String.Format("GlobalDTAlmacenUsuarios-{0}", CveEmpresa)
|
||||
'sino existe, recarga los datos
|
||||
If HttpContext.Current.Application(AppNombre) Is Nothing Then
|
||||
Dim ObjUsr As New ClsSisUsuarios
|
||||
If ObjUsr.GetAlmacen(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjUsr.DtResultados
|
||||
ObjUsr.Dispose()
|
||||
End If
|
||||
Dim Str As New StringBuilder
|
||||
Str.AppendFormat("CveUsuario = {0} AND CveEmpresa = {1} ", CveUsuario, CveEmpresa)
|
||||
If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen)
|
||||
|
||||
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
|
||||
GlobalDTAlmacenUsuarios = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Dim AppNombre As String = String.Format("GlobalDTAlmacenUsuarios-{0}", CveEmpresa)
|
||||
HttpContext.Current.Application(AppNombre) = value
|
||||
End Set
|
||||
'Get
|
||||
' If CveEmpresa <> -1 Then
|
||||
' Dim Str As New StringBuilder
|
||||
' Str.AppendFormat("CveUsuario = {0} AND CveEmpresa = {1} ", CveUsuario, CveEmpresa)
|
||||
' If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen)
|
||||
|
||||
' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAlmacenUsuarios"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
|
||||
' GlobalDTAlmacenUsuarios = Dv.ToTable
|
||||
' Dv.Dispose()
|
||||
' Else
|
||||
' GlobalDTAlmacenUsuarios = DirectCast(HttpContext.Current.Application("GlobalDTAlmacenUsuarios"), DataTable)
|
||||
' End If
|
||||
|
||||
'End Get
|
||||
'Set(value As DataTable)
|
||||
' HttpContext.Current.Application("GlobalDTAlmacenUsuarios") = value
|
||||
'End Set
|
||||
End Property
|
||||
Property GlobalDTNom_Periodos() As DataTable
|
||||
Get
|
||||
@@ -2397,9 +2397,9 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
Set(value As DataTable)
|
||||
HttpContext.Current.Application("GlobalDTVtaCobranzaEstatus") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
End Property
|
||||
|
||||
|
||||
#Region "***********************************************************************DT EVENTOS****************************************************************************************"
|
||||
Property GlobalDTTiposEventos() As DataTable
|
||||
Get
|
||||
@@ -2435,9 +2435,9 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
Set(value As DataTable)
|
||||
HttpContext.Current.Application("GlobalDTOIEstatusEventos") = value
|
||||
End Set
|
||||
End Property
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " **********************************************************************DT PROSPECTOS*************************************************************************************"
|
||||
Property GlobalDTProspectosCaracteristicasClasificaciones() As DataTable
|
||||
Get
|
||||
@@ -2478,9 +2478,9 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
Set(value As DataTable)
|
||||
HttpContext.Current.Application("GlobalDTProspectosCaracteristicasOpciones") = value
|
||||
End Set
|
||||
End Property
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "***********************************************************************DT ACTIVOS FIJOS**********************************************************************************"
|
||||
Property GlobalDTActivoFijos(CveEmpresa As Integer, Optional CveSubTipoActivoFijo As Integer = -1, Optional CveActivoFijo As Integer = -1) As DataTable
|
||||
Get
|
||||
@@ -2573,10 +2573,10 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
Set(value As DataTable)
|
||||
HttpContext.Current.Application("GlobalDTTipoActivoFijo") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "***********************************************************************DT GENERALES**************************************************************************************"
|
||||
Property GlobalDTGralPaises() As DataTable
|
||||
Get
|
||||
@@ -2664,10 +2664,10 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
Set(value As DataTable)
|
||||
HttpContext.Current.Application("GlobalDTGralColectivas") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "***********************************************************************DT PROSPECTOS*************************************************************************************"
|
||||
Property GlobalDTProspectosSupervisores(CveEmpresa As Integer) As DataTable
|
||||
Get
|
||||
@@ -2876,8 +2876,8 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
Set(value As DataTable)
|
||||
HttpContext.Current.Application("GlobalDTProspectosTipos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Property
|
||||
|
||||
#Region " DT PROSPECTOS SOLICITUDES"
|
||||
Property GlobalDTProspectosSolicitudes(CveEmpresa As Integer) As DataTable
|
||||
Get
|
||||
@@ -2944,15 +2944,15 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
Set(value As DataTable)
|
||||
HttpContext.Current.Application("GlobalDTProspectosSolicitudesApoyos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "**********************************************DT AMORTIZACIÓN CONTABLE PLAN DE DESARROLLO********************************************************************************"
|
||||
|
||||
|
||||
#Region "***********************************************************************DT AMORTIZACIÓN CONTABLE*********************************************************************************************"
|
||||
|
||||
|
||||
Property GlobalDTAC_RubrosIngreso() As DataTable
|
||||
Get
|
||||
GlobalDTAC_RubrosIngreso = DirectCast(HttpContext.Current.Application("GlobalDTAC_RubrosIngreso"), DataTable)
|
||||
@@ -3208,11 +3208,11 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
Set(value As DataTable)
|
||||
HttpContext.Current.Application("GlobalDTAC_MatrizEgresos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
End Property
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Property GlobalDTAC_PD_EjeRector(CveEmpresa As Integer) As DataTable
|
||||
Get
|
||||
If CveEmpresa <> -1 Then
|
||||
@@ -3291,9 +3291,9 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
Set(value As DataTable)
|
||||
HttpContext.Current.Application("GlobalDTAC_PD_Metas") = value
|
||||
End Set
|
||||
End Property
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "***********************************************************************GLOBAL DT ORDENES DE COMPRA***********************************************************************"
|
||||
Property GlobalDTOCEstatus(CveEmpresa As Integer) As DataTable
|
||||
Get
|
||||
@@ -3308,75 +3308,75 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
Set(value As DataTable)
|
||||
HttpContext.Current.Application("GlobalDTOCEstatus") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property GlobalDTOCEstatusUsuarios(CveEmpresa As Integer, Optional CveUsuario As Integer = -1, Optional Tipo As String = "") As DataTable
|
||||
Get
|
||||
|
||||
Dim AppNombre As String = String.Format("GlobalDTOCEstatusUsuarios-{0}", CveEmpresa)
|
||||
'sino existe, recarga los datos
|
||||
If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
|
||||
|
||||
Dim ObjOC As New ClsOC
|
||||
If ObjOC.GetEstatusUsuarios(-1, -1, -1, -1, CveEmpresa) Then
|
||||
HttpContext.Current.Application(AppNombre) = ObjOC.DtResultados
|
||||
Else
|
||||
HttpContext.Current.Application(AppNombre) = Nothing
|
||||
End If
|
||||
|
||||
ObjOC.Dispose()
|
||||
|
||||
End If
|
||||
|
||||
Dim filtro As New StringBuilder
|
||||
filtro.AppendFormat("CveEmpresa = {0} ", CveEmpresa)
|
||||
If CveUsuario > 0 Then
|
||||
filtro.AppendFormat(" AND CveUsuario={0} ", CveUsuario)
|
||||
End If
|
||||
If Tipo <> "" Then
|
||||
filtro.AppendFormat(" AND Tipo='{0}'", Tipo)
|
||||
End If
|
||||
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), filtro.ToString, "", DataViewRowState.CurrentRows)
|
||||
GlobalDTOCEstatusUsuarios = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Dim AppNombre As String = String.Format("GlobalDTOCEstatusUsuarios-{0}", CveEmpresa)
|
||||
HttpContext.Current.Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'Property GlobalDTOCEstatusUsuarios(CveEmpresa As Integer, Optional CveUsuario As Integer = -1, Optional Tipo As String = "") As DataTable
|
||||
' Get
|
||||
' If CveEmpresa <> -1 Then
|
||||
' Dim filtro As New StringBuilder
|
||||
' filtro.AppendFormat("CveEmpresa = {0} ", CveEmpresa)
|
||||
' If CveUsuario > 0 Then
|
||||
' filtro.AppendFormat(" AND CveUsuario={0} ", CveUsuario)
|
||||
' End If
|
||||
' If Tipo <> "" Then
|
||||
' filtro.AppendFormat(" AND Tipo='{0}'", Tipo)
|
||||
' End If
|
||||
' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTOCEstatusUsuarios"), DataTable), filtro.ToString, "", DataViewRowState.CurrentRows)
|
||||
' GlobalDTOCEstatusUsuarios = Dv.ToTable
|
||||
' Dv.Dispose()
|
||||
' Else
|
||||
' GlobalDTOCEstatusUsuarios = DirectCast(HttpContext.Current.Application("GlobalDTOCEstatusUsuarios"), DataTable)
|
||||
' End If
|
||||
' End Get
|
||||
' Set(value As DataTable)
|
||||
' HttpContext.Current.Application("GlobalDTOCEstatusUsuarios") = value
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
|
||||
End Property
|
||||
|
||||
Property GlobalDTOCEstatusUsuarios(CveEmpresa As Integer, Optional CveUsuario As Integer = -1, Optional Tipo As String = "") As DataTable
|
||||
Get
|
||||
|
||||
Dim AppNombre As String = String.Format("GlobalDTOCEstatusUsuarios-{0}", CveEmpresa)
|
||||
'sino existe, recarga los datos
|
||||
If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
|
||||
|
||||
Dim ObjOC As New ClsOC
|
||||
If ObjOC.GetEstatusUsuarios(-1, -1, -1, -1, CveEmpresa) Then
|
||||
HttpContext.Current.Application(AppNombre) = ObjOC.DtResultados
|
||||
Else
|
||||
HttpContext.Current.Application(AppNombre) = Nothing
|
||||
End If
|
||||
|
||||
ObjOC.Dispose()
|
||||
|
||||
End If
|
||||
|
||||
Dim filtro As New StringBuilder
|
||||
filtro.AppendFormat("CveEmpresa = {0} ", CveEmpresa)
|
||||
If CveUsuario > 0 Then
|
||||
filtro.AppendFormat(" AND CveUsuario={0} ", CveUsuario)
|
||||
End If
|
||||
If Tipo <> "" Then
|
||||
filtro.AppendFormat(" AND Tipo='{0}'", Tipo)
|
||||
End If
|
||||
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), filtro.ToString, "", DataViewRowState.CurrentRows)
|
||||
GlobalDTOCEstatusUsuarios = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Dim AppNombre As String = String.Format("GlobalDTOCEstatusUsuarios-{0}", CveEmpresa)
|
||||
HttpContext.Current.Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'Property GlobalDTOCEstatusUsuarios(CveEmpresa As Integer, Optional CveUsuario As Integer = -1, Optional Tipo As String = "") As DataTable
|
||||
' Get
|
||||
' If CveEmpresa <> -1 Then
|
||||
' Dim filtro As New StringBuilder
|
||||
' filtro.AppendFormat("CveEmpresa = {0} ", CveEmpresa)
|
||||
' If CveUsuario > 0 Then
|
||||
' filtro.AppendFormat(" AND CveUsuario={0} ", CveUsuario)
|
||||
' End If
|
||||
' If Tipo <> "" Then
|
||||
' filtro.AppendFormat(" AND Tipo='{0}'", Tipo)
|
||||
' End If
|
||||
' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTOCEstatusUsuarios"), DataTable), filtro.ToString, "", DataViewRowState.CurrentRows)
|
||||
' GlobalDTOCEstatusUsuarios = Dv.ToTable
|
||||
' Dv.Dispose()
|
||||
' Else
|
||||
' GlobalDTOCEstatusUsuarios = DirectCast(HttpContext.Current.Application("GlobalDTOCEstatusUsuarios"), DataTable)
|
||||
' End If
|
||||
' End Get
|
||||
' Set(value As DataTable)
|
||||
' HttpContext.Current.Application("GlobalDTOCEstatusUsuarios") = value
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "F I N A N Z A S "
|
||||
Property GlobalDTFinan_RazonesFinancieras() As DataTable
|
||||
Get
|
||||
@@ -3385,10 +3385,10 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
Set(value As DataTable)
|
||||
HttpContext.Current.Application("GlobalDTFinan_RazonesFinancieras") = value
|
||||
End Set
|
||||
End Property
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region "***********************************************************************GLOBAL DT CONTABILIDAD****************************************************************************"
|
||||
Property GlobalDTContaPlantillasPolizas(CveEmpresa As Integer, Optional TipoPlantilla As Integer = -1) As DataTable
|
||||
Get
|
||||
@@ -3442,9 +3442,9 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
Set(value As DataTable)
|
||||
HttpContext.Current.Application("GlobalDTContaConceptosContables") = value
|
||||
End Set
|
||||
End Property
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "**********************************************************************GLOBAL DT RH (RECURSOS HUMANOS)********************************************************************"
|
||||
Property GlobalDTAsistenciaDetalle() As DataTable
|
||||
Get
|
||||
@@ -3596,13 +3596,13 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
Set(value As DataTable)
|
||||
HttpContext.Current.Application("GlobalDTTipoBuzon") = value
|
||||
End Set
|
||||
End Property
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "*********** D T - C O M B U S T I B L E S ***********"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Property GlobalDTCombustibles(CveEmpresa As Integer) As DataTable
|
||||
Get
|
||||
If CveEmpresa <> -1 Then
|
||||
@@ -3641,11 +3641,11 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
Set(ByVal value As DataTable)
|
||||
HttpContext.Current.Application("GlobalDTCombustiblesTipos") = value
|
||||
End Set
|
||||
End Property
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "*********** D T - M A N T E N I M I E N T O S ***********"
|
||||
|
||||
|
||||
Property GlobalDTMantenimientosTipos() As DataTable
|
||||
Get
|
||||
GlobalDTMantenimientosTipos = DirectCast(HttpContext.Current.Application("GlobalDTMantenimientosTipos"), DataTable)
|
||||
@@ -3684,13 +3684,13 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
|
||||
HttpContext.Current.Application("GlobalDTMantenimientosTipos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region "*********** D T - T A L L E R E S ***********"
|
||||
|
||||
|
||||
Property GlobalDTTalleresTipos() As DataTable
|
||||
Get
|
||||
GlobalDTTalleresTipos = DirectCast(HttpContext.Current.Application("GlobalDTTalleresTipos"), DataTable)
|
||||
@@ -3707,12 +3707,12 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
Set(value As DataTable)
|
||||
HttpContext.Current.Application("GlobalDTTalleres") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "*********** D T - D I S T R I B U I D O R E S ***********"
|
||||
|
||||
|
||||
Property GlobalDTDistribuidoresTipos() As DataTable
|
||||
Get
|
||||
GlobalDTDistribuidoresTipos = DirectCast(HttpContext.Current.Application("GlobalDTDistribuidoresTipos"), DataTable)
|
||||
@@ -3729,11 +3729,11 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
Set(value As DataTable)
|
||||
HttpContext.Current.Application("GlobalDTDistribuidores") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
Property GlobalDTOIRevision(CveEmpresa As Integer) As DataTable
|
||||
Get
|
||||
If CveEmpresa <> -1 Then
|
||||
@@ -3824,8 +3824,8 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
Set(value As DataTable)
|
||||
HttpContext.Current.Application("GlobalDTPaqueterias") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
End Class
|
||||
@@ -2,26 +2,26 @@
|
||||
'Option Explicit On
|
||||
'Option Strict On
|
||||
|
||||
Imports System
|
||||
Imports System.Web
|
||||
Imports System.Data
|
||||
Imports Newtonsoft.Json.Linq
|
||||
Imports Extensiones
|
||||
Imports System.IO
|
||||
Imports Microsoft.AspNet.SignalR
|
||||
|
||||
Public Class SIGFacturacionCiclica : Implements IHttpHandler, IRequiresSessionState
|
||||
Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
|
||||
Imports System
|
||||
Imports System.Web
|
||||
Imports System.Data
|
||||
Imports Newtonsoft.Json.Linq
|
||||
Imports Extensiones
|
||||
Imports System.IO
|
||||
Imports Microsoft.AspNet.SignalR
|
||||
|
||||
Public Class SIGFacturacionCiclica : Implements IHttpHandler, IRequiresSessionState
|
||||
Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
|
||||
context.Response.ContentType = "text/plain"
|
||||
Dim retorno = False
|
||||
Try
|
||||
If context.Request("Metodo") IsNot Nothing Then
|
||||
Select Case context.Request("Metodo")
|
||||
Dim retorno = False
|
||||
Try
|
||||
If context.Request("Metodo") IsNot Nothing Then
|
||||
Select Case context.Request("Metodo")
|
||||
Case "EjecutaServicio"
|
||||
ModExtensiones.GuardaLogAD("Servicio Ejecutado...........", "LogFacturacionCiclica")
|
||||
retorno = IniciaFacturacionMasiva()
|
||||
End Select
|
||||
|
||||
retorno = IniciaFacturacionMasiva()
|
||||
End Select
|
||||
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
@@ -32,65 +32,65 @@ Public Class SIGFacturacionCiclica : Implements IHttpHandler, IRequiresSessionSt
|
||||
context.Response.Write("True")
|
||||
Else
|
||||
context.Response.Write("False")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable
|
||||
Get
|
||||
Return False
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private Function Parametros(Cadena As String) As Hashtable
|
||||
Dim P1() As String = Cadena.Split("&"c)
|
||||
Dim Tmp As String
|
||||
Dim P2() As String
|
||||
|
||||
Dim URLParametros As New Hashtable
|
||||
|
||||
For Each Tmp In P1
|
||||
P2 = Tmp.Replace("%26%", "&").Split("="c)
|
||||
URLParametros.Add(P2(0).ToString.ToUpper, P2(1))
|
||||
Next
|
||||
Return URLParametros
|
||||
End Function
|
||||
|
||||
#Region "V A L I D A - D A T O S"
|
||||
Private Function ValidaUsuarioSistema(CveEmpresa As Integer) As Usuario
|
||||
Dim UsuarioActual As Usuario = Nothing
|
||||
Dim ObjUsuarios As New ClsSisUsuarios
|
||||
If ObjUsuarios.GetUsuarios(100) Then
|
||||
If ObjUsuarios.DtResultados.Rows.Count > 0 Then
|
||||
Dim Usuario = ObjUsuarios.DtResultados.Rows(0)("Usuario").ToString()
|
||||
Dim Contrasenia = ObjUsuarios.DtResultados.Rows(0)("Contraseña").ToString()
|
||||
UsuarioActual = ObjUsuarios.ValidaUsuario(Usuario, Contrasenia, IMEI, CveEmpresa)
|
||||
UsuarioActual.CveEmpresa = CveEmpresa
|
||||
CreaObjetoEmpresa(UsuarioActual)
|
||||
End If
|
||||
End If
|
||||
ObjUsuarios.Dispose()
|
||||
Return UsuarioActual
|
||||
End Function
|
||||
Private Sub CreaObjetoEmpresa(ByRef UsuarioActual As Usuario)
|
||||
|
||||
Dim ObjEmpresa As New ClsSisEmpresas()
|
||||
If ObjEmpresa.GetEmpresas(UsuarioActual.CveEmpresa, "-1", "-1", "-1", "-1") Then
|
||||
If ObjEmpresa.GetEmpresasFuncionalidades(UsuarioActual.CveEmpresa) Then
|
||||
Dim dttmp As Data.DataTable = ObjEmpresa.DtResultados
|
||||
|
||||
Dim EmpresasFuncionalidades As New HybridDictionary
|
||||
For Each Row As Data.DataRow In dttmp.Rows
|
||||
EmpresasFuncionalidades.Add(Convert.ToInt32(Row("CveFuncionalidad")), Row("Valor").ToString)
|
||||
Next
|
||||
ObjEmpresa.Empresa.SetFuncionalidades(EmpresasFuncionalidades)
|
||||
End If
|
||||
|
||||
UsuarioActual.Empresa = ObjEmpresa.Empresa
|
||||
End If
|
||||
ObjEmpresa.Dispose()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable
|
||||
Get
|
||||
Return False
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private Function Parametros(Cadena As String) As Hashtable
|
||||
Dim P1() As String = Cadena.Split("&"c)
|
||||
Dim Tmp As String
|
||||
Dim P2() As String
|
||||
|
||||
Dim URLParametros As New Hashtable
|
||||
|
||||
For Each Tmp In P1
|
||||
P2 = Tmp.Replace("%26%", "&").Split("="c)
|
||||
URLParametros.Add(P2(0).ToString.ToUpper, P2(1))
|
||||
Next
|
||||
Return URLParametros
|
||||
End Function
|
||||
|
||||
#Region "V A L I D A - D A T O S"
|
||||
Private Function ValidaUsuarioSistema(CveEmpresa As Integer) As Usuario
|
||||
Dim UsuarioActual As Usuario = Nothing
|
||||
Dim ObjUsuarios As New ClsSisUsuarios
|
||||
If ObjUsuarios.GetUsuarios(100) Then
|
||||
If ObjUsuarios.DtResultados.Rows.Count > 0 Then
|
||||
Dim Usuario = ObjUsuarios.DtResultados.Rows(0)("Usuario").ToString()
|
||||
Dim Contrasenia = ObjUsuarios.DtResultados.Rows(0)("Contraseña").ToString()
|
||||
UsuarioActual = ObjUsuarios.ValidaUsuario(Usuario, Contrasenia, IMEI, CveEmpresa)
|
||||
UsuarioActual.CveEmpresa = CveEmpresa
|
||||
CreaObjetoEmpresa(UsuarioActual)
|
||||
End If
|
||||
End If
|
||||
ObjUsuarios.Dispose()
|
||||
Return UsuarioActual
|
||||
End Function
|
||||
Private Sub CreaObjetoEmpresa(ByRef UsuarioActual As Usuario)
|
||||
|
||||
Dim ObjEmpresa As New ClsSisEmpresas()
|
||||
If ObjEmpresa.GetEmpresas(UsuarioActual.CveEmpresa, "-1", "-1", "-1", "-1") Then
|
||||
If ObjEmpresa.GetEmpresasFuncionalidades(UsuarioActual.CveEmpresa) Then
|
||||
Dim dttmp As Data.DataTable = ObjEmpresa.DtResultados
|
||||
|
||||
Dim EmpresasFuncionalidades As New HybridDictionary
|
||||
For Each Row As Data.DataRow In dttmp.Rows
|
||||
EmpresasFuncionalidades.Add(Convert.ToInt32(Row("CveFuncionalidad")), Row("Valor").ToString)
|
||||
Next
|
||||
ObjEmpresa.Empresa.SetFuncionalidades(EmpresasFuncionalidades)
|
||||
End If
|
||||
|
||||
UsuarioActual.Empresa = ObjEmpresa.Empresa
|
||||
End If
|
||||
ObjEmpresa.Dispose()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
Private Function IniciaFacturacionMasiva() As Boolean
|
||||
Dim Retorno As Boolean = True
|
||||
@@ -101,8 +101,8 @@ Public Class SIGFacturacionCiclica : Implements IHttpHandler, IRequiresSessionSt
|
||||
If ObjContratos.CicloComercialGet(-1, -1, -1, -1, FechaRef, FechaRef, -1) Then
|
||||
DTCicloComercial = ObjContratos.DtResultados.FiltraParametros("FueFacturado = 0 AND FacturacionCiclicaAutomatico = 1")
|
||||
End If
|
||||
End Using
|
||||
|
||||
End Using
|
||||
|
||||
If DTCicloComercial IsNot Nothing Then
|
||||
For Each RowEmpresa As DataRow In DTCicloComercial.FiltraParametros("", DistinctColumns:={"CveEmpresa"}).Rows
|
||||
Dim CveEmpresa As Integer = RowEmpresa("CveEmpresa").ToString().ToEntero()
|
||||
@@ -113,12 +113,12 @@ Public Class SIGFacturacionCiclica : Implements IHttpHandler, IRequiresSessionSt
|
||||
Next
|
||||
End If
|
||||
|
||||
Return Retorno
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Private Function EjecutarFacturacionMasiva(UsuarioActual As Usuario, DTCicloComercial As DataTable) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
If DTCicloComercial IsNot Nothing Then
|
||||
For Each Row As DataRow In DTCicloComercial.Rows
|
||||
|
||||
@@ -152,36 +152,36 @@ Public Class SIGFacturacionCiclica : Implements IHttpHandler, IRequiresSessionSt
|
||||
|
||||
End If
|
||||
|
||||
Return Retorno
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Private Function EmitirImprimir(UsuarioActual As Usuario, RowCiclo As DataRow) As Modelos.Factura.MMensajeFactura
|
||||
Private Function EmitirImprimir(UsuarioActual As Usuario, RowCiclo As DataRow) As Modelos.Factura.MMensajeFactura
|
||||
Dim Resp As New Modelos.Factura.MMensajeFactura
|
||||
|
||||
Dim ObjFactura = CreaObjetosVenta(UsuarioActual, RowCiclo)
|
||||
|
||||
Dim ObjFactura = CreaObjetosVenta(UsuarioActual, RowCiclo)
|
||||
|
||||
If ObjFactura Is Nothing Then
|
||||
Resp.Mensajes.Add("Ocurrió un error al procesar los datos de la Venta ")
|
||||
ObjFactura = Nothing
|
||||
Return Resp
|
||||
End If
|
||||
|
||||
If ObjFactura.CveCliente > 0 Then
|
||||
Resp.Mensajes.Add("Ocurrió un error al procesar los datos de la Venta ")
|
||||
ObjFactura = Nothing
|
||||
Return Resp
|
||||
End If
|
||||
|
||||
If ObjFactura.CveCliente > 0 Then
|
||||
If ObjFactura.DtDetalle.Rows.Count > 0 Then
|
||||
Resp = ObjFactura.EmitirFactura()
|
||||
Else
|
||||
Resp.Mensajes.Add("No se pudo completar facturación por que no se encontraron partidas ")
|
||||
Resp = ObjFactura.EmitirFactura()
|
||||
Else
|
||||
Resp.Mensajes.Add("No se pudo completar facturación por que no se encontraron partidas ")
|
||||
End If
|
||||
Else
|
||||
Resp.Mensajes.Add("No se pudo completar facturación por que no se encontraro el cliente ")
|
||||
End If
|
||||
|
||||
Return Resp
|
||||
Resp.Mensajes.Add("No se pudo completar facturación por que no se encontraro el cliente ")
|
||||
End If
|
||||
|
||||
Return Resp
|
||||
End Function
|
||||
|
||||
#Region "P R E P A R A - V E N T A"
|
||||
Private Function CreaDTVentas() As DataTable
|
||||
Dim TmpDT = New DataTable
|
||||
Dim TmpDT = New DataTable
|
||||
TmpDT.Columns.Add("CveVenta", GetType(Integer))
|
||||
TmpDT.Columns.Add("Consec", GetType(Integer))
|
||||
TmpDT.Columns.Add("Cantidad", GetType(Decimal))
|
||||
@@ -268,8 +268,8 @@ Public Class SIGFacturacionCiclica : Implements IHttpHandler, IRequiresSessionSt
|
||||
TmpDT.Columns.Add("CveTamaño", GetType(Integer))
|
||||
TmpDT.Columns.Add("EsCargo", GetType(Boolean))
|
||||
|
||||
Return TmpDT
|
||||
End Function
|
||||
Return TmpDT
|
||||
End Function
|
||||
Private Function CreaObjetosVenta(UsuarioActual As Usuario, DR As DataRow) As Modelos.Factura
|
||||
Dim ObjFactura = New Modelos.Factura(UsuarioActual)
|
||||
Try
|
||||
@@ -453,134 +453,134 @@ Public Class SIGFacturacionCiclica : Implements IHttpHandler, IRequiresSessionSt
|
||||
Catch ex As Exception
|
||||
ObjFactura = Nothing
|
||||
OnError("Ocurrió un error al generar la factura", ex)
|
||||
End Try
|
||||
End Try
|
||||
|
||||
|
||||
Return ObjFactura
|
||||
|
||||
End Function
|
||||
|
||||
Private Function PreParaTimbre(Obj As Modelos.Factura, UsuarioActual As Usuario) As CFDITimbre
|
||||
Dim Timbre As New CFDITimbre
|
||||
Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", ""))
|
||||
Timbre.Comprobante.Folio = Obj.Folio.ToString
|
||||
Timbre.Comprobante.Serie = Obj.Serie
|
||||
Timbre.Comprobante.Fecha = Obj.FechaCP
|
||||
Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
|
||||
Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
|
||||
Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
|
||||
Timbre.Comprobante.Subtotal = Obj.SubTotal
|
||||
Timbre.Comprobante.Descuentos = Obj.Descuento
|
||||
Timbre.Comprobante.Moneda = Obj.MonedaSAT
|
||||
Timbre.Comprobante.TipoCambio = If(Obj.CveMoneda = 1, "1", Obj.TipoCambio.ToString)
|
||||
Timbre.Comprobante.Total = Obj.Total
|
||||
|
||||
Timbre.Comprobante.LugarExpedicion = Obj.SubProyecto.CP
|
||||
Timbre.Comprobante.Confirmacion = ""
|
||||
|
||||
Timbre.Receptor.RFC = Obj.Cliente.RFC
|
||||
Timbre.Receptor.Nombre = Obj.Cliente.Nombre
|
||||
Timbre.Receptor.ResidenciaFiscal = ""
|
||||
Timbre.Receptor.NumeroRegistroTributario = ""
|
||||
Timbre.Receptor.UsoCFDI = Obj.ClaveUsoCFDI
|
||||
|
||||
|
||||
If Obj.CveTipoRelacion > 0 Then
|
||||
Select Case Obj.CveTipoRelacion
|
||||
Case 1
|
||||
Timbre.CFDIRelacionados.TipoRelacion = "01"
|
||||
Timbre.CFDIRelacionados.TipoRelacionTexto = "01-Nota de Crédito aplicada a Ingreso"
|
||||
Case 2
|
||||
Timbre.CFDIRelacionados.TipoRelacion = "02"
|
||||
Timbre.CFDIRelacionados.TipoRelacionTexto = "02-Nota de débito de los documentos relacionados"
|
||||
Case 3
|
||||
Timbre.CFDIRelacionados.TipoRelacion = "03"
|
||||
Timbre.CFDIRelacionados.TipoRelacionTexto = "03-Devolución aplicada a Ingreso"
|
||||
Case 4
|
||||
Timbre.CFDIRelacionados.TipoRelacion = "04"
|
||||
Timbre.CFDIRelacionados.TipoRelacionTexto = "04-Refacturación de Ingreso"
|
||||
Case 7
|
||||
Timbre.CFDIRelacionados.TipoRelacion = "07"
|
||||
Timbre.CFDIRelacionados.TipoRelacionTexto = "07-CFDI por aplicación de anticipo"
|
||||
Case 8
|
||||
Timbre.CFDIRelacionados.TipoRelacion = "08"
|
||||
Timbre.CFDIRelacionados.TipoRelacionTexto = "08-Factura generada por pagos en parcialidades "
|
||||
Case 9
|
||||
Timbre.CFDIRelacionados.TipoRelacion = "09"
|
||||
Timbre.CFDIRelacionados.TipoRelacionTexto = "09-Factura generada por pagos diferidos"
|
||||
|
||||
End Select
|
||||
|
||||
'If DtVentasNC IsNot Nothing AndAlso DtVentasNC.Rows.Count > 0 Then
|
||||
' For Each Dr As DataRow In DtVentasNC.Rows
|
||||
' Timbre.CFDIRelacionados.UUID.Add(Dr("FolioFiscal").ToString)
|
||||
' Next
|
||||
'Else
|
||||
' Timbre.CFDIRelacionados.UUID.Add(HdnFolioFiscalNC.Value)
|
||||
'End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Dim totSubTotal As Decimal = Obj.SubTotal
|
||||
Dim totIVA As Decimal = Obj.IVA
|
||||
Dim totRetIVA As Decimal = Obj.RetIVA
|
||||
Dim totRetISR As Decimal = Obj.RetISR
|
||||
Dim i As Integer = 1
|
||||
|
||||
'detalles
|
||||
Dim tPS As String = ""
|
||||
|
||||
For Each drr As DataRow In Obj.DtDetalle.Rows
|
||||
If drr("PS").ToString.Length = 1 Then
|
||||
tPS = drr("Obs").ToString
|
||||
Else
|
||||
If drr("PS").ToString.Length = 0 Then
|
||||
tPS = ""
|
||||
Else
|
||||
tPS = String.Format("{0} {1}", drr("PS"), drr("Obs"))
|
||||
End If
|
||||
End If
|
||||
'condicionante, especial
|
||||
If UsuarioActual.CveEmpresa = 15 Then drr("UM") = "" ' les comentan que no debe de ir la etiqueta de "unidad" en el producto
|
||||
|
||||
Dim concepto As New CFDIConceptos With {.Cantidad = drr("Cantidad").ToString.ToDecimal,
|
||||
.Descripcion = tPS,
|
||||
.ValorUnitario = drr("PU").ToString.ToDecimal,
|
||||
.Importe = drr("TotalImporte").ToString.ToDecimal,
|
||||
.Descuento = drr("Descuento").ToString.ToDecimal,
|
||||
.Unidad = drr("UM").ToString,
|
||||
.ClaveUnidad = drr("SATClaveUM").ToString,
|
||||
.ClaveProdServ = drr("SATClaveProdServ").ToString,
|
||||
.Noidentificacion = drr("Noidentificacion").ToString,
|
||||
.CuentaPredial = drr("CuentaPredial").ToString}
|
||||
'verifica suma subtotales
|
||||
If i = Obj.DtDetalle.Rows.Count AndAlso totSubTotal <> concepto.Importe Then 'proceso de ajusta de decimales
|
||||
concepto.Importe = totSubTotal
|
||||
End If
|
||||
totSubTotal = totSubTotal - concepto.Importe
|
||||
|
||||
'siempre estaremos agregando el iva, auqnue sea en importe cero o tasa cero, para que se emita la factura
|
||||
' If drr("ImporteIVA").ToString.ToDouble > 0 Then
|
||||
concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeIVA").ToString.ToDecimal, .Impuesto = "002", .Importe = drr("ImporteIVA").ToString.ToDecimal})
|
||||
' End If
|
||||
|
||||
If drr("ImporteIEPS").ToString.ToDouble > 0 Then
|
||||
concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeIEPS").ToString.ToDecimal, .Impuesto = "003", .Importe = drr("ImporteIEPS").ToString.ToDecimal})
|
||||
End If
|
||||
|
||||
If drr("ImporteRetIVA").ToString.ToDouble > 0 Then 'si hay retenciones
|
||||
concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "R", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeRetIVA").ToString.ToDecimal, .Impuesto = "002", .Importe = drr("ImporteRetIVA").ToString.ToDecimal})
|
||||
End If
|
||||
|
||||
If drr("ImporteRetISR").ToString.ToDouble > 0 Then 'retención de ISR
|
||||
concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "R", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeRetISR").ToString.ToDecimal, .Impuesto = "001", .Importe = drr("ImporteRetISR").ToString.ToDecimal})
|
||||
End If
|
||||
|
||||
Timbre.Conceptos.Add(concepto)
|
||||
i += 1
|
||||
Next
|
||||
Return Timbre
|
||||
Return ObjFactura
|
||||
|
||||
End Function
|
||||
|
||||
Private Function PreParaTimbre(Obj As Modelos.Factura, UsuarioActual As Usuario) As CFDITimbre
|
||||
Dim Timbre As New CFDITimbre
|
||||
Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", ""))
|
||||
Timbre.Comprobante.Folio = Obj.Folio.ToString
|
||||
Timbre.Comprobante.Serie = Obj.Serie
|
||||
Timbre.Comprobante.Fecha = Obj.FechaCP
|
||||
Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
|
||||
Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
|
||||
Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
|
||||
Timbre.Comprobante.Subtotal = Obj.SubTotal
|
||||
Timbre.Comprobante.Descuentos = Obj.Descuento
|
||||
Timbre.Comprobante.Moneda = Obj.MonedaSAT
|
||||
Timbre.Comprobante.TipoCambio = If(Obj.CveMoneda = 1, "1", Obj.TipoCambio.ToString)
|
||||
Timbre.Comprobante.Total = Obj.Total
|
||||
|
||||
Timbre.Comprobante.LugarExpedicion = Obj.SubProyecto.CP
|
||||
Timbre.Comprobante.Confirmacion = ""
|
||||
|
||||
Timbre.Receptor.RFC = Obj.Cliente.RFC
|
||||
Timbre.Receptor.Nombre = Obj.Cliente.Nombre
|
||||
Timbre.Receptor.ResidenciaFiscal = ""
|
||||
Timbre.Receptor.NumeroRegistroTributario = ""
|
||||
Timbre.Receptor.UsoCFDI = Obj.ClaveUsoCFDI
|
||||
|
||||
|
||||
If Obj.CveTipoRelacion > 0 Then
|
||||
Select Case Obj.CveTipoRelacion
|
||||
Case 1
|
||||
Timbre.CFDIRelacionados.TipoRelacion = "01"
|
||||
Timbre.CFDIRelacionados.TipoRelacionTexto = "01-Nota de Crédito aplicada a Ingreso"
|
||||
Case 2
|
||||
Timbre.CFDIRelacionados.TipoRelacion = "02"
|
||||
Timbre.CFDIRelacionados.TipoRelacionTexto = "02-Nota de débito de los documentos relacionados"
|
||||
Case 3
|
||||
Timbre.CFDIRelacionados.TipoRelacion = "03"
|
||||
Timbre.CFDIRelacionados.TipoRelacionTexto = "03-Devolución aplicada a Ingreso"
|
||||
Case 4
|
||||
Timbre.CFDIRelacionados.TipoRelacion = "04"
|
||||
Timbre.CFDIRelacionados.TipoRelacionTexto = "04-Refacturación de Ingreso"
|
||||
Case 7
|
||||
Timbre.CFDIRelacionados.TipoRelacion = "07"
|
||||
Timbre.CFDIRelacionados.TipoRelacionTexto = "07-CFDI por aplicación de anticipo"
|
||||
Case 8
|
||||
Timbre.CFDIRelacionados.TipoRelacion = "08"
|
||||
Timbre.CFDIRelacionados.TipoRelacionTexto = "08-Factura generada por pagos en parcialidades "
|
||||
Case 9
|
||||
Timbre.CFDIRelacionados.TipoRelacion = "09"
|
||||
Timbre.CFDIRelacionados.TipoRelacionTexto = "09-Factura generada por pagos diferidos"
|
||||
|
||||
End Select
|
||||
|
||||
'If DtVentasNC IsNot Nothing AndAlso DtVentasNC.Rows.Count > 0 Then
|
||||
' For Each Dr As DataRow In DtVentasNC.Rows
|
||||
' Timbre.CFDIRelacionados.UUID.Add(Dr("FolioFiscal").ToString)
|
||||
' Next
|
||||
'Else
|
||||
' Timbre.CFDIRelacionados.UUID.Add(HdnFolioFiscalNC.Value)
|
||||
'End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Dim totSubTotal As Decimal = Obj.SubTotal
|
||||
Dim totIVA As Decimal = Obj.IVA
|
||||
Dim totRetIVA As Decimal = Obj.RetIVA
|
||||
Dim totRetISR As Decimal = Obj.RetISR
|
||||
Dim i As Integer = 1
|
||||
|
||||
'detalles
|
||||
Dim tPS As String = ""
|
||||
|
||||
For Each drr As DataRow In Obj.DtDetalle.Rows
|
||||
If drr("PS").ToString.Length = 1 Then
|
||||
tPS = drr("Obs").ToString
|
||||
Else
|
||||
If drr("PS").ToString.Length = 0 Then
|
||||
tPS = ""
|
||||
Else
|
||||
tPS = String.Format("{0} {1}", drr("PS"), drr("Obs"))
|
||||
End If
|
||||
End If
|
||||
'condicionante, especial
|
||||
If UsuarioActual.CveEmpresa = 15 Then drr("UM") = "" ' les comentan que no debe de ir la etiqueta de "unidad" en el producto
|
||||
|
||||
Dim concepto As New CFDIConceptos With {.Cantidad = drr("Cantidad").ToString.ToDecimal,
|
||||
.Descripcion = tPS,
|
||||
.ValorUnitario = drr("PU").ToString.ToDecimal,
|
||||
.Importe = drr("TotalImporte").ToString.ToDecimal,
|
||||
.Descuento = drr("Descuento").ToString.ToDecimal,
|
||||
.Unidad = drr("UM").ToString,
|
||||
.ClaveUnidad = drr("SATClaveUM").ToString,
|
||||
.ClaveProdServ = drr("SATClaveProdServ").ToString,
|
||||
.Noidentificacion = drr("Noidentificacion").ToString,
|
||||
.CuentaPredial = drr("CuentaPredial").ToString}
|
||||
'verifica suma subtotales
|
||||
If i = Obj.DtDetalle.Rows.Count AndAlso totSubTotal <> concepto.Importe Then 'proceso de ajusta de decimales
|
||||
concepto.Importe = totSubTotal
|
||||
End If
|
||||
totSubTotal = totSubTotal - concepto.Importe
|
||||
|
||||
'siempre estaremos agregando el iva, auqnue sea en importe cero o tasa cero, para que se emita la factura
|
||||
' If drr("ImporteIVA").ToString.ToDouble > 0 Then
|
||||
concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeIVA").ToString.ToDecimal, .Impuesto = "002", .Importe = drr("ImporteIVA").ToString.ToDecimal})
|
||||
' End If
|
||||
|
||||
If drr("ImporteIEPS").ToString.ToDouble > 0 Then
|
||||
concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeIEPS").ToString.ToDecimal, .Impuesto = "003", .Importe = drr("ImporteIEPS").ToString.ToDecimal})
|
||||
End If
|
||||
|
||||
If drr("ImporteRetIVA").ToString.ToDouble > 0 Then 'si hay retenciones
|
||||
concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "R", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeRetIVA").ToString.ToDecimal, .Impuesto = "002", .Importe = drr("ImporteRetIVA").ToString.ToDecimal})
|
||||
End If
|
||||
|
||||
If drr("ImporteRetISR").ToString.ToDouble > 0 Then 'retención de ISR
|
||||
concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "R", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeRetISR").ToString.ToDecimal, .Impuesto = "001", .Importe = drr("ImporteRetISR").ToString.ToDecimal})
|
||||
End If
|
||||
|
||||
Timbre.Conceptos.Add(concepto)
|
||||
i += 1
|
||||
Next
|
||||
Return Timbre
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -3580,7 +3580,13 @@ Partial Class PopUpVerFactura
|
||||
If (UsuarioActual.CveEmpresa = 72) Then
|
||||
params.Add(New ReportParameter("DomicilioFiscal", DomicilioFiscalCompu))
|
||||
End If
|
||||
ImprimirPDF("Empresas/Grales/Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Entrada de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios")
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(172, 173) Then
|
||||
ImprimirPDFStimulsoft("Empresas/Grales/Formatos/EntradaSalida.mrt", DtMovimientos, params, String.Format("Entrada de Almacen - {0}", Folio.ToString))
|
||||
Else
|
||||
ImprimirPDF("Empresas/Grales/Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Entrada de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios")
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Case 3, 16, 37, 40 ' S A L I D A S
|
||||
@@ -3843,7 +3849,11 @@ Partial Class PopUpVerFactura
|
||||
If A.Exists Then
|
||||
ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios")
|
||||
Else
|
||||
ImprimirPDF("Empresas/Grales/Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios")
|
||||
If UsuarioActual.CveEmpresa.Contiene(172, 173) Then
|
||||
ImprimirPDFStimulsoft("Empresas/Grales/Formatos/EntradaSalida.mrt", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString))
|
||||
Else
|
||||
ImprimirPDF("Empresas/Grales/Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios")
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
@@ -1,220 +1,213 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepAnexoCatalogo.aspx.vb" Inherits="AC2_RepAnexoCatalogo" EnableEventValidation="false" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.table-VH {
|
||||
padding-top: 58px;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
<asp:Label runat="server" ID="LbTitulo" Text="Anexo del Catálogo"></asp:Label>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExcel" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkImprimir" runat="server"><i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle magindate">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" CssClass="btn btn-default" OnClick="BtnConsultar_Click" ValidationGroup="GrpConsulta" />
|
||||
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a><%--class="expand"--%>
|
||||
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<%--<div class="row">--%>
|
||||
<ul class="list-inline text-size-12">
|
||||
<li>F. I.</li>
|
||||
<li style="margin-right: 30px">
|
||||
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 80px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaDel" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10" Height="24px"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioDel" class="btn default " Text="<i class='fa fa-calendar'></i>" Height="24px" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaDel" runat="server" TargetControlID="TxtFechaDel" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioDel" runat="server" TargetControlID="TxtFechaDel" PopupButtonID="ImgCalendarioDel" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
|
||||
<asp:CompareValidator ID="CVTxtFechaDel" runat="server" ControlToValidate="TxtFechaDel" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpConsulta"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CECVTxtFechaDel" runat="server" HighlightCssClass="vco" TargetControlID="CVTxtFechaDel" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
|
||||
</li>
|
||||
<li>F. F. </li>
|
||||
<li style="margin-right: 30px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 80px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaAl" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10" Height="24px"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioAl" class="btn default " Text="<i class='fa fa-calendar'></i>" Height="24px" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaAl" runat="server" TargetControlID="TxtFechaAl" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioAl" runat="server" TargetControlID="TxtFechaAl" PopupButtonID="ImgCalendarioAl" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
|
||||
|
||||
<asp:CompareValidator ID="CVTxtFechaAl" runat="server" ControlToValidate="TxtFechaAl" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Fin''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpConsulta"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CECVTxtFechaAl" runat="server" HighlightCssClass="vco" TargetControlID="CVTxtFechaAl" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li>Cuenta:
|
||||
</li>
|
||||
<li>
|
||||
<asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="true" Width="350px">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
<asp:RequiredFieldValidator ID="RFVDdlCuentas" runat="server" InitialValue="-1" ControlToValidate="DdlCuentas" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CERFVDdlCuentas" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlCuentas" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||
|
||||
<ul class="list-inline text-size-12">
|
||||
<li>
|
||||
Tipo Movto:
|
||||
</li>
|
||||
<li>
|
||||
<asp:DropDownList CssClass="form-control input-sm" ID="DdlCuenta" runat="server" DataTextField="Cuenta" DataValueField="CveCuenta" TabIndex="4">
|
||||
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Con movimientos" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Saldo actual no igual a cero" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Con movimientos y saldo no igual a cero" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Con movimientos o saldo no igual a cero" Value="4"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
<li>
|
||||
SubProyecto:
|
||||
</li>
|
||||
<li>
|
||||
<asp:DropDownList ID="DdlSubproyecto" runat="server" Width="100%" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
<li runat="server" id="tdTipoReporte" visible="true">Tipo:
|
||||
</li>
|
||||
|
||||
<li runat="server" id="tdTipoReporte2" visible="true">
|
||||
<asp:DropDownList ID="DdlTipoReporte" CssClass="form-control input-sm" runat="server" Width="150px">
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementario" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementario" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<asp:DropDownList Visible="false" CssClass="form-control input-sm" Width="150px" ID="DdlTipoCuentas" ClientIDMode="Static" runat="server" DataTextField="Nombre" DataValueField="CveCuenta" TabIndex="4" AutoPostBack="true">
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<br />
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" runat="server" GridLines="None" CssClass="ScrollAD table table-smallpadding Widthall" data-heighterror="375" data-freezecols="0" data-freezerows="-1"
|
||||
ShowHeader="True" ShowHeaderWhenEmpty="true" AllowPaging="False" ShowFooter="False" EmptyDataText="No se encontraron cuentas con los parametros establecidos." AutoGenerateColumns="False" OnRowDataBound="GvIngresos_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Cuenta" HeaderStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbCodigo" runat="server" Text='<%# Eval("Codigo")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="180" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Nombre" HeaderStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="320" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Saldos Iniciales">
|
||||
<HeaderTemplate>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td colspan="2">Saldos Iniciales</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Deudor</td>
|
||||
<td>Acreedor</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbSaldoInicial" runat="server" Text='<%# Eval("SaldoInicial", "{0:N2}")%>'></asp:Label>
|
||||
<asp:Label ID="LbSaldoInicial2" runat="server" Width="30px" Visible="false"></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="145" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cargos">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbCargos" runat="server" Text='<%# Eval("Cargos", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="145" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Abonos">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbAbonos" runat="server" Text='<%# Eval("Abonos", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="145" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Saldos Actuales">
|
||||
<HeaderTemplate>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td colspan="2">Saldos Actuales</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Deudor</td>
|
||||
<td>Acreedor</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLSaldoActual" runat="server" Text='<%# Eval("SaldoActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbSaldoActual" runat="server" Text='<%# Eval("SaldoActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
<asp:Label ID="LbSaldoActual" runat="server" Width="30px" Visible="false"></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="145" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<HeaderStyle Font-Bold="true" HorizontalAlign="Center" />
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepAnexoCatalogo.aspx.vb" Inherits="AC2_RepAnexoCatalogo" EnableEventValidation="false" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.table-VH {
|
||||
padding-top: 58px;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
<asp:Label runat="server" ID="LbTitulo" Text="Anexo del Catálogo"></asp:Label>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExcel" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkImprimir" runat="server"><i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" CssClass="btn btn-default" OnClick="BtnConsultar_Click" ValidationGroup="Valida" />
|
||||
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a><%--class="expand"--%>
|
||||
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<%--<div class="row">--%>
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate">
|
||||
Cuenta
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="true" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
<asp:RequiredFieldValidator ID="RFVDdlCuentas" runat="server" InitialValue="-1" ControlToValidate="DdlCuentas" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CERFVDdlCuentas" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlCuentas" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Tipo Movto
|
||||
</div>
|
||||
<div class="col-md-2 truncate">
|
||||
<asp:DropDownList ID="DdlCuenta" runat="server" DataTextField="Cuenta" DataValueField="CveCuenta" TabIndex="4" CssClass="form-control input-sm select2me" Width="100%">
|
||||
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Con movimientos" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Saldo actual no igual a cero" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Con movimientos y saldo no igual a cero" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Con movimientos o saldo no igual a cero" Value="4"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Fecha Inicio:
|
||||
</div>
|
||||
<div class="col-md-1" style="min-width: 115px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Fecha Fin:
|
||||
</div>
|
||||
<div class="col-md-1" style="min-width: 115px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate" id="tdTipoReporte" visible="true">
|
||||
Tipo
|
||||
</div>
|
||||
<div class="col-md-2" id="tdTipoReporte2" visible="true">
|
||||
<asp:DropDownList ID="DdlTipoReporte" CssClass="form-control input-sm select2me" runat="server" Width="100%">
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementario" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementario" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
SubProyecto
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlSubproyecto" runat="server" Width="100%" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList Visible="false" CssClass="form-control input-sm" Width="150px" ID="DdlTipoCuentas" ClientIDMode="Static" runat="server" DataTextField="Nombre" DataValueField="CveCuenta" TabIndex="4" AutoPostBack="true">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<br />
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" runat="server" GridLines="None" CssClass="ScrollAD table table-smallpadding Widthall" data-heighterror="375" data-freezecols="0" data-freezerows="-1"
|
||||
ShowHeader="True" ShowHeaderWhenEmpty="true" AllowPaging="False" ShowFooter="False" EmptyDataText="No se encontraron cuentas con los parametros establecidos." AutoGenerateColumns="False" OnRowDataBound="GvIngresos_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Cuenta" HeaderStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbCodigo" runat="server" Text='<%# Eval("Codigo")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="180" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Nombre" HeaderStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="320" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Saldos Iniciales">
|
||||
<HeaderTemplate>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td colspan="2">Saldos Iniciales</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Deudor</td>
|
||||
<td>Acreedor</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbSaldoInicial" runat="server" Text='<%# Eval("SaldoInicial", "{0:N2}")%>'></asp:Label>
|
||||
<asp:Label ID="LbSaldoInicial2" runat="server" Width="30px" Visible="false"></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="145" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cargos">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbCargos" runat="server" Text='<%# Eval("Cargos", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="145" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Abonos">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbAbonos" runat="server" Text='<%# Eval("Abonos", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="145" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Saldos Actuales">
|
||||
<HeaderTemplate>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td colspan="2">Saldos Actuales</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Deudor</td>
|
||||
<td>Acreedor</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLSaldoActual" runat="server" Text='<%# Eval("SaldoActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbSaldoActual" runat="server" Text='<%# Eval("SaldoActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
<asp:Label ID="LbSaldoActual" runat="server" Width="30px" Visible="false"></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="145" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<HeaderStyle Font-Bold="true" HorizontalAlign="Center" />
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script type="text/javascript">
|
||||
|
||||
<%-- function pageLoad(sender, args) {
|
||||
@@ -285,7 +278,7 @@
|
||||
|
||||
}--%>
|
||||
|
||||
function Enable() {
|
||||
function Enable() {
|
||||
var Producto = $get("DdlTipoCuentas").value;
|
||||
if (Producto == "-2") {
|
||||
//document.getElementById("TxtCuenta").disabled = false;
|
||||
@@ -297,19 +290,19 @@
|
||||
//document.getElementById("TxtCuenta").value = " ";
|
||||
//document.getElementById("TxtCuenta").disabled = true;
|
||||
$get("C_DdlCuentas").value = "-1";
|
||||
document.getElementById("C_DdlCuentas").disabled = true;
|
||||
}
|
||||
document.getElementById("C_DdlCuentas").disabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
function Scroll() {
|
||||
function Scroll() {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 360;
|
||||
if (Alto < 100) {
|
||||
Alto = 100;
|
||||
if (Alto < 100) {
|
||||
Alto = 100;
|
||||
}
|
||||
$('#<%=GvDatos.ClientID%>').ADScroll({
|
||||
height: Alto
|
||||
});
|
||||
$('#<%=GvDatos.ClientID%>').ADScroll({
|
||||
height: Alto
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
@@ -138,8 +138,8 @@ Partial Class AC2_RepAnexoCatalogo
|
||||
End If
|
||||
|
||||
|
||||
TxtFechaDel.Text = FechaInicio.ToShortDateString
|
||||
TxtFechaAl.Text = FechaFin.ToShortDateString
|
||||
txtFechaI.Text = FechaInicio.ToShortDateString
|
||||
txtFechaF.Text = FechaFin.ToShortDateString
|
||||
|
||||
If Not ErrorParametros Then
|
||||
CargaDatos()
|
||||
@@ -308,8 +308,8 @@ Partial Class AC2_RepAnexoCatalogo
|
||||
If DdlTipoCuentas.SelectedValue.ToEntero = -2 AndAlso DdlCuentas.SelectedValue.ToEntero = -1 Then
|
||||
Alert("El campo Cuenta es obligatorio.", TipoMensaje.MsgError)
|
||||
Else
|
||||
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate)
|
||||
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate)
|
||||
FechaInicio = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", Date.Now, txtFechaI.Text.ToDate)
|
||||
FechaFin = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", Date.Now, txtFechaF.Text.ToDate)
|
||||
IdCuenta = If(DdlTipoCuentas.SelectedValue.ToEntero = -2, DdlCuentas.SelectedValue.ToEntero, DdlTipoCuentas.SelectedValue.ToEntero)
|
||||
|
||||
CargaDatos()
|
||||
|
||||
@@ -1,259 +1,248 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepMovimientosAuxiliaresCatalogo.aspx.vb" Inherits="Conta_RepMovimientosAuxiliaresCatalogo" EnableEventValidation="false" %>
|
||||
|
||||
<asp:Content ContentPlaceHolderID="Css" runat="server">
|
||||
<style>
|
||||
.truncate {
|
||||
width: 300px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
table{
|
||||
border:none!important;
|
||||
}
|
||||
tr{
|
||||
border:none!important;
|
||||
}
|
||||
|
||||
td{
|
||||
border:none!important;
|
||||
}
|
||||
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Generar EXCEL</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="Imprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
|
||||
Movimientos Auxiliares del Catálogo
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" CssClass="btn btn-default" Text="Consultar" Width="100px" OnClick="BtnConsultar_Click" ValidationGroup="GrpConsulta" />
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<label class="col-md-1" style="width: 80px; padding-right: 2px;">Fecha Inicio:</label>
|
||||
<div class="col-md-2" style="width: 110px;">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 80px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaDel" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioDel" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaDel" runat="server" TargetControlID="TxtFechaDel" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioDel" runat="server" TargetControlID="TxtFechaDel" PopupButtonID="ImgCalendarioDel" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
|
||||
<asp:CompareValidator ID="CVTxtFechaDel" runat="server" ControlToValidate="TxtFechaDel" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpConsulta"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CECVTxtFechaDel" runat="server" HighlightCssClass="vco" TargetControlID="CVTxtFechaDel" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-md-1" style="width: 75px; padding-right: 2px;">Fecha Fin:</label>
|
||||
<div class="col-md-2" style="width: 110px;">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 80px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaAl" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioAl" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaAl" runat="server" TargetControlID="TxtFechaAl" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioAl" runat="server" TargetControlID="TxtFechaAl" PopupButtonID="ImgCalendarioAl" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
|
||||
<asp:CompareValidator ID="CVTxtFechaAl" runat="server" ControlToValidate="TxtFechaAl" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Fin''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpConsulta"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CECVTxtFechaAl" runat="server" HighlightCssClass="vco" TargetControlID="CVTxtFechaAl" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-md-1" style="display:none;">Tipo de Cuentas:</label>
|
||||
<div class="col-md-1" style="display:none;">
|
||||
<asp:DropDownList ID="DdlTipoCuentas" CssClass="form-control input-sm" runat="server" DataTextField="Nombre" DataValueField="CveCuenta" TabIndex="4" AutoPostBack="true" ClientIDMode="Static">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1" style="width: 60px;">Cuenta:</label>
|
||||
<div class="col-md-4">
|
||||
<%-- <asp:HiddenField ID="HdnCveCuenta" runat="server" ClientIDMode="Static" />
|
||||
<asp:TextBox ID="TxtCuenta" CssClass="form-control-input" runat="server" ClientIDMode="Static" Enabled="false" TabIndex="5" onclick="this.setSelectionRange(0, this.value.length)" Width="100"></asp:TextBox>--%>
|
||||
<asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="false">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
<asp:RequiredFieldValidator ID="RFVDdlCuentas" runat="server" InitialValue="-1" ControlToValidate="DdlCuentas" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CERFVDdlCuentas" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlCuentas" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="portlet-body" style="display: none">
|
||||
<div class="row">
|
||||
<label class="col-md-1">Moneda:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlMoneda" CssClass="form-control input-sm" runat="server" DataTextField="Moneda" DataValueField="CveMoneda" TabIndex="5" ClientIDMode="Static" Width="70px">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-2" style="width: 80px;">SubProyecto: </label>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlSubproyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me" Width="100px">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-2" runat="server" id="tdTipoReporte" visible="true">
|
||||
<div class="row">
|
||||
<label class="col-md-3">Tipo:</label>
|
||||
<div class="col-md-6">
|
||||
<asp:DropDownList ID="DdlTipoReporte" CssClass="form-control input-sm" runat="server" Width="100px">
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementarias" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementarias" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<br />
|
||||
<%-- <div class="text-right">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>--%>
|
||||
|
||||
|
||||
<div class="row" style="margin-right: 10px; margin-top: 18px;" align="right">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server" >
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" runat="server"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" AutoGenerateColumns="False"
|
||||
EmptyDataText="No se encontrarios movimientos."
|
||||
DataKeyNames="" OnRowDataBound="GvDatos_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField ControlStyle-CssClass="Widthall">
|
||||
<HeaderTemplate>
|
||||
<table width="100%" style="border:none">
|
||||
<tr>
|
||||
<td colspan="3"><font size="2">Cuenta</font></td>
|
||||
<td colspan="1"><font size="2">Nombre</font></td>
|
||||
<td colspan="4"></td>
|
||||
<td><font size="2">Saldo Inicial</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="60px" align="center">Fecha</td>
|
||||
<td width="60px" align="center">Tipo</td>
|
||||
<td width="60px" align="center">Número</td>
|
||||
<td width="300px" align="left">Concepto</td>
|
||||
<td width="100px" align="center">Referencia</td>
|
||||
<td width="100px" align="center">Referencia Movto</td>
|
||||
<td width="100px" align="center">SubProyecto</td>
|
||||
<td width="100px" align="center">Cargos</td>
|
||||
<td width="100px" align="center">Abonos</td>
|
||||
<td width="100px" align="center">Saldo</td>
|
||||
</tr>
|
||||
</table>
|
||||
<%--<hr />--%>
|
||||
</HeaderTemplate>
|
||||
<%-- <HeaderStyle />--%>
|
||||
<ItemTemplate>
|
||||
<table width="100%" " style="border:none">
|
||||
<tr runat="server" id="tr1">
|
||||
<td colspan="3" align="left" width="180px">
|
||||
<asp:Label ID="LbCuenta" runat="server" Text='<%# Eval("Codigo")%>'></asp:Label>
|
||||
</td>
|
||||
<td colspan="1" align="left" width="300px">
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</td>
|
||||
<td colspan="2" width="200px"></td>
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepMovimientosAuxiliaresCatalogo.aspx.vb" Inherits="Conta_RepMovimientosAuxiliaresCatalogo" EnableEventValidation="false" %>
|
||||
|
||||
<asp:Content ContentPlaceHolderID="Css" runat="server">
|
||||
<style>
|
||||
.truncate {
|
||||
width: 300px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
table {
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
tr {
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
td {
|
||||
border: none !important;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Generar EXCEL</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="Imprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
|
||||
Movimientos Auxiliares del Catálogo
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" CssClass="btn btn-default" Text="Consultar" Width="100px" OnClick="BtnConsultar_Click" ValidationGroup="GrpConsulta" />
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<div class="col-md-1">
|
||||
Fecha Inicio:
|
||||
</div>
|
||||
<div class="col-md-1" style="min-width: 115px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpConsulta"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
Fecha Fin:
|
||||
</div>
|
||||
<div class="col-md-1" style="min-width: 115px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100% !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpConsulta"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<label class="col-md-1" style="display: none;">Tipo de Cuentas:</label>
|
||||
<div class="col-md-2" style="display: none;">
|
||||
<asp:DropDownList ID="DdlTipoCuentas" CssClass="form-control input-sm" runat="server" DataTextField="Nombre" DataValueField="CveCuenta" TabIndex="4" AutoPostBack="true" ClientIDMode="Static">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
Cuenta:
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="false">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlCuentas" runat="server" InitialValue="-1" ControlToValidate="DdlCuentas" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CERFVDdlCuentas" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlCuentas" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="portlet-body" style="display: none">
|
||||
<div class="row">
|
||||
<label class="col-md-1">Moneda:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlMoneda" CssClass="form-control input-sm select2me" runat="server" DataTextField="Moneda" DataValueField="CveMoneda" TabIndex="5" ClientIDMode="Static" Width="100%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-2" style="width: 80px;">SubProyecto: </label>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlSubproyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-2" runat="server" id="tdTipoReporte" visible="true">
|
||||
<div class="row">
|
||||
<label class="col-md-3">Tipo:</label>
|
||||
<div class="col-md-6">
|
||||
<asp:DropDownList ID="DdlTipoReporte" CssClass="form-control input-sm select2me" runat="server" Width="100%">
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementarias" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementarias" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<br />
|
||||
|
||||
<div class="row" style="margin-right: 10px; margin-top: 18px;" align="right">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" runat="server"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" AutoGenerateColumns="False"
|
||||
EmptyDataText="No se encontrarios movimientos."
|
||||
DataKeyNames="" OnRowDataBound="GvDatos_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField ControlStyle-CssClass="Widthall">
|
||||
<HeaderTemplate>
|
||||
<table width="100%" style="border: none">
|
||||
<tr>
|
||||
<td colspan="3"><font size="2">Cuenta</font></td>
|
||||
<td colspan="1"><font size="2">Nombre</font></td>
|
||||
<td colspan="4"></td>
|
||||
<td><font size="2">Saldo Inicial</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="60px" align="center">Fecha</td>
|
||||
<td width="60px" align="center">Tipo</td>
|
||||
<td width="60px" align="center">Número</td>
|
||||
<td width="300px" align="left">Concepto</td>
|
||||
<td width="100px" align="center">Referencia</td>
|
||||
<td width="100px" align="center">Referencia Movto</td>
|
||||
<td width="100px" align="center">SubProyecto</td>
|
||||
<td width="100px" align="center">Cargos</td>
|
||||
<td width="100px" align="center">Abonos</td>
|
||||
<td width="100px" align="center">Saldo</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<table width="100%" style="border: none">
|
||||
<tr runat="server" id="tr1">
|
||||
<td colspan="3" align="left" width="180px">
|
||||
<asp:Label ID="LbCuenta" runat="server" Text='<%# Eval("Codigo")%>'></asp:Label>
|
||||
</td>
|
||||
<td colspan="1" align="left" width="300px">
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</td>
|
||||
<td colspan="2" width="200px"></td>
|
||||
<td style="font-weight: normal;" align="right" width="100px">Saldo Inicial:
|
||||
</td>
|
||||
<td style="font-weight: normal;" align="right" width="100px">
|
||||
<asp:Label ID="LbSaldoInicial" runat="server" Text='<%# Eval("SaldoInicial", "{0:N2}")%>'></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr runat="server" id="tr2">
|
||||
<td width="60px" style="border: 0px;" align="center">
|
||||
<asp:Literal ID="LbFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}")%>'></asp:Literal>
|
||||
</td>
|
||||
<td width="60px" style="border: 0px;" align="center">
|
||||
<asp:Literal ID="LbTipo" runat="server" Text='<%# Eval("TipoPoliza")%>'></asp:Literal>
|
||||
</td>
|
||||
<td width="60px" style="border: 0px;" align="center">
|
||||
<asp:HyperLink ID="HLPoliza" runat="server" Text='<%# Eval("Folio")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbNumero" runat="server" Text='<%# Eval("Folio")%>'></asp:Label>--%>
|
||||
</td>
|
||||
|
||||
<td width="300px" align="left">
|
||||
<div class="truncate" style="width: 300px;">
|
||||
<asp:Label ID="LbConcepto" runat="server" CssClass="truncate" Text='<%# Eval("Concepto")%>' title='<%# Eval("Concepto")%>' ></asp:Label>
|
||||
</div>
|
||||
</td>
|
||||
<td width="100px">
|
||||
<asp:Label ID="LbReferencia" runat="server" Text='<%# Eval("Referencia")%>'></asp:Label>
|
||||
</td>
|
||||
<td width="60px" style="border: 0px;" align="center">
|
||||
<asp:Literal ID="LtlRefMovto" runat="server" Text='<%# Eval("ReferenciaAdmin")%>'></asp:Literal>
|
||||
<%--<asp:Label ID="LbNumero" runat="server" Text='<%# Eval("Folio")%>'></asp:Label>--%>
|
||||
</td>
|
||||
<td width="100px">
|
||||
<asp:Label ID="LblSubProyecto" runat="server" Text='<%# Eval("SubProyecto")%>'></asp:Label>
|
||||
</td>
|
||||
<td width="100px" align="right">
|
||||
<asp:Label ID="LbCargos" runat="server"></asp:Label>
|
||||
</td>
|
||||
<td width="100px" align="right">
|
||||
<asp:Label ID="LbAbonos" runat="server"></asp:Label>
|
||||
</td>
|
||||
<td width="100px" align="right">
|
||||
<asp:Label ID="LbSaldo" runat="server"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
<ItemStyle />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="JS" runat="Server">
|
||||
</td>
|
||||
<td style="font-weight: normal;" align="right" width="100px">
|
||||
<asp:Label ID="LbSaldoInicial" runat="server" Text='<%# Eval("SaldoInicial", "{0:N2}")%>'></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr runat="server" id="tr2">
|
||||
<td width="60px" style="border: 0px;" align="center">
|
||||
<asp:Literal ID="LbFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}")%>'></asp:Literal>
|
||||
</td>
|
||||
<td width="60px" style="border: 0px;" align="center">
|
||||
<asp:Literal ID="LbTipo" runat="server" Text='<%# Eval("TipoPoliza")%>'></asp:Literal>
|
||||
</td>
|
||||
<td width="60px" style="border: 0px;" align="center">
|
||||
<asp:HyperLink ID="HLPoliza" runat="server" Text='<%# Eval("Folio")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</td>
|
||||
|
||||
<td width="300px" align="left">
|
||||
<div class="truncate" style="width: 300px;">
|
||||
<asp:Label ID="LbConcepto" runat="server" CssClass="truncate" Text='<%# Eval("Concepto")%>' title='<%# Eval("Concepto")%>'></asp:Label>
|
||||
</div>
|
||||
</td>
|
||||
<td width="100px">
|
||||
<asp:Label ID="LbReferencia" runat="server" Text='<%# Eval("Referencia")%>'></asp:Label>
|
||||
</td>
|
||||
<td width="60px" style="border: 0px;" align="center">
|
||||
<asp:Literal ID="LtlRefMovto" runat="server" Text='<%# Eval("ReferenciaAdmin")%>'></asp:Literal>
|
||||
</td>
|
||||
<td width="100px">
|
||||
<asp:Label ID="LblSubProyecto" runat="server" Text='<%# Eval("SubProyecto")%>'></asp:Label>
|
||||
</td>
|
||||
<td width="100px" align="right">
|
||||
<asp:Label ID="LbCargos" runat="server"></asp:Label>
|
||||
</td>
|
||||
<td width="100px" align="right">
|
||||
<asp:Label ID="LbAbonos" runat="server"></asp:Label>
|
||||
</td>
|
||||
<td width="100px" align="right">
|
||||
<asp:Label ID="LbSaldo" runat="server"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
<ItemStyle />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script type="text/javascript">
|
||||
|
||||
</script>
|
||||
|
||||
</asp:Content>
|
||||
</script>
|
||||
|
||||
</asp:Content>
|
||||
|
||||
@@ -108,8 +108,8 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
|
||||
DdlMoneda.DataSource = GlobalDTMonedas
|
||||
'DdlMoneda.Dispose()
|
||||
DdlMoneda.DataBind()
|
||||
TxtFechaDel.Text = Now.FirstDayOfMonth.ToShortDateString
|
||||
TxtFechaAl.Text = Now.LastDayOfMonth.ToShortDateString
|
||||
txtFechaI.Text = Now.FirstDayOfMonth.ToShortDateString
|
||||
txtFechaF.Text = Now.LastDayOfMonth.ToShortDateString
|
||||
|
||||
|
||||
If Request("CveCuenta") IsNot Nothing AndAlso IsNumeric(Request("CveCuenta")) AndAlso Request("CveCuenta").ToEntero > 0 Then
|
||||
@@ -119,7 +119,7 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
|
||||
'HdnCveCuenta.Value = IdCuenta.ToString
|
||||
|
||||
FechaFin = Request("FF").ToDate
|
||||
TxtFechaAl.Text = FechaFin.ToShortDateString
|
||||
txtFechaF.Text = FechaFin.ToShortDateString
|
||||
|
||||
DdlCuentas.SelectedValueExist(IdCuenta)
|
||||
If DdlCuentas.SelectedValue.ToEntero <> -1 Then
|
||||
@@ -129,10 +129,10 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
|
||||
|
||||
If Request("FI") IsNot Nothing AndAlso Request("FI").ToString.Length = 10 AndAlso Request("FI").ToDate > "01/01/1000".ToDate Then
|
||||
FechaInicio = Request("FI").ToDate
|
||||
TxtFechaDel.Text = FechaInicio.ToShortDateString
|
||||
txtFechaI.Text = FechaInicio.ToShortDateString
|
||||
Else
|
||||
FechaInicio = DateSerial(Year(FechaFin), Month(FechaFin), 1)
|
||||
TxtFechaDel.Text = FechaInicio.ToShortDateString
|
||||
TxtFechaF.Text = FechaInicio.ToShortDateString
|
||||
End If
|
||||
|
||||
If Request("CveSubProyecto") IsNot Nothing Then
|
||||
@@ -179,8 +179,8 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
|
||||
If DdlTipoCuentas.SelectedValue.ToEntero = -2 AndAlso DdlCuentas.SelectedValue.ToEntero = -1 Then
|
||||
Alert("El campo Cuenta es obligatorio.", TipoMensaje.MsgError)
|
||||
Else
|
||||
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate)
|
||||
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate)
|
||||
FechaInicio = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", Date.Now, txtFechaI.Text.ToDate)
|
||||
FechaFin = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", Date.Now, txtFechaF.Text.ToDate)
|
||||
IdCuenta = If(DdlTipoCuentas.SelectedValue.ToEntero = -2, DdlCuentas.SelectedValue.ToEntero, DdlTipoCuentas.SelectedValue.ToEntero)
|
||||
|
||||
CargaDatos()
|
||||
@@ -412,8 +412,8 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
|
||||
If DdlTipoCuentas.SelectedValue.ToEntero = -2 AndAlso DdlCuentas.SelectedValue.ToEntero = -1 Then
|
||||
Alert("El campo Cuenta es obligatorio.", TipoMensaje.MsgError)
|
||||
Else
|
||||
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate)
|
||||
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate)
|
||||
FechaInicio = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", Date.Now, txtFechaI.Text.ToDate)
|
||||
FechaFin = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", Date.Now, txtFechaF.Text.ToDate)
|
||||
IdCuenta = If(DdlTipoCuentas.SelectedValue.ToEntero = -2, DdlCuentas.SelectedValue.ToEntero, DdlTipoCuentas.SelectedValue.ToEntero)
|
||||
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
@@ -1,116 +1,112 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepSituacionFinanciera.aspx.vb" Inherits="AC2_SituacionFinanciera" %>
|
||||
|
||||
<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">
|
||||
<asp:Literal ID="LtTitulo" Text="Estado de Situación Financiera" runat="server" />
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Exporta Excel</asp:LinkButton>
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepSituacionFinanciera.aspx.vb" Inherits="AC2_SituacionFinanciera" %>
|
||||
|
||||
<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">
|
||||
<asp:Literal ID="LtTitulo" Text="Estado de Situación Financiera" runat="server" />
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Exporta Excel</asp:LinkButton>
|
||||
<%--<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="20px" Height="20px" /> --%>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="Imprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="Imprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
<%--<asp:ImageButton ID="Imprimir" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" /> --%>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkCerrar" runat="server" visible="false"><i class="fa-solid fa-shield" ></i> Cerrar Ejercicio</asp:LinkButton>
|
||||
</li>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpFiltros" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" CssClass="btn btn-default" Text="Consultar" runat="server" OnClick="BtnConsultar_Click" />
|
||||
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a><%--class="expand"--%>
|
||||
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate" style="width: 90px;">Ejercicio:</label>
|
||||
<div class="col-md-2" style="width: 125px;">
|
||||
<asp:DropDownList ID="DdlEjercicio" runat="server" CssClass="select2me" DataTextField="Ejercicio" DataValueField="Ejercicio" Width="100px">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 truncate" style="width: 90px;">Periodo:</label>
|
||||
<div class="col-md-2" style="width: 130px;">
|
||||
<asp:DropDownList ID="DdlPeriodo" runat="server" Width="100px" CssClass="select2me">
|
||||
<asp:ListItem Text="Enero" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Febrero" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Marzo" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Abril" Value="4"></asp:ListItem>
|
||||
<asp:ListItem Text="Mayo" Value="5"></asp:ListItem>
|
||||
<asp:ListItem Text="Junio" Value="6"></asp:ListItem>
|
||||
<asp:ListItem Text="Julio" Value="7"></asp:ListItem>
|
||||
<asp:ListItem Text="Agosto" Value="8"></asp:ListItem>
|
||||
<asp:ListItem Text="Septiembre" Value="9"></asp:ListItem>
|
||||
<asp:ListItem Text="Octubre" Value="10"></asp:ListItem>
|
||||
<asp:ListItem Text="Noviembre" Value="11"></asp:ListItem>
|
||||
<asp:ListItem Text="Diciembre" Value="12"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-2" style="width: 80px; display:none;">SubProyecto: </label>
|
||||
<div class="col-md-2" style=" display:none;">
|
||||
<asp:DropDownList ID="DdlSubproyecto" runat="server" Width="150px" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me" >
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3" runat="server" id="tdTipoReporte" visible="true">
|
||||
|
||||
<label class="col-md-1 truncate">Tipo:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlTipoReporte" runat="server" Width="130px" CssClass="form-control input-sm">
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementario" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementario" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Con Firma:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:CheckBox ID="ChkFirma" CssClass="make-switchsd" data-size="small" runat="server" />
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Nivel 2:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:CheckBox ID="ChkNivel" CssClass="make-switchsd" data-size="small" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
|
||||
<rvweb:ReportViewer ID="rvReporteador" Visible="false" runat="server" Width="100%" Height="600"></rvweb:ReportViewer>
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6">
|
||||
<table style="width: 100%; float: left; margin-right: 20px;">
|
||||
<tr>
|
||||
<td width="100%" padding="0">
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkCerrar" runat="server" Visible="false"><i class="fa-solid fa-shield" ></i> Cerrar Ejercicio</asp:LinkButton>
|
||||
</li>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpFiltros" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" CssClass="btn btn-default" Text="Consultar" runat="server" OnClick="BtnConsultar_Click" />
|
||||
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a><%--class="expand"--%>
|
||||
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate">Ejercicio:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlEjercicio" runat="server" CssClass="select2me" DataTextField="Ejercicio" DataValueField="Ejercicio" Width="100%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Periodo:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlPeriodo" runat="server" Width="100%" CssClass="select2me">
|
||||
<asp:ListItem Text="Enero" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Febrero" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Marzo" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Abril" Value="4"></asp:ListItem>
|
||||
<asp:ListItem Text="Mayo" Value="5"></asp:ListItem>
|
||||
<asp:ListItem Text="Junio" Value="6"></asp:ListItem>
|
||||
<asp:ListItem Text="Julio" Value="7"></asp:ListItem>
|
||||
<asp:ListItem Text="Agosto" Value="8"></asp:ListItem>
|
||||
<asp:ListItem Text="Septiembre" Value="9"></asp:ListItem>
|
||||
<asp:ListItem Text="Octubre" Value="10"></asp:ListItem>
|
||||
<asp:ListItem Text="Noviembre" Value="11"></asp:ListItem>
|
||||
<asp:ListItem Text="Diciembre" Value="12"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1" style="display: none;">SubProyecto: </label>
|
||||
<div class="col-md-2" style="display: none;">
|
||||
<asp:DropDownList ID="DdlSubproyecto" runat="server" Width="150px" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||
<div class="row">
|
||||
<div class="col-md-3" runat="server" id="tdTipoReporte" visible="true">
|
||||
<div class="row">
|
||||
<label class="col-md-4 truncate" >Tipo:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlTipoReporte" runat="server" CssClass="select2me" Width="100%">
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementario" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementario" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Con Firma:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:CheckBox ID="ChkFirma" CssClass="make-switchsd" data-size="small" runat="server" />
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Nivel 2:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:CheckBox ID="ChkNivel" CssClass="make-switchsd" data-size="small" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
|
||||
<rvweb:ReportViewer ID="rvReporteador" Visible="false" runat="server" Width="100%" Height="600"></rvweb:ReportViewer>
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6">
|
||||
<table style="width: 100%; float: left; margin-right: 20px;">
|
||||
<tr>
|
||||
<td width="100%" padding="0">
|
||||
<center>
|
||||
<h3>ACTIVO</h3>
|
||||
|
||||
@@ -217,16 +213,16 @@
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</center>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<table style="width: 100%; float: left;">
|
||||
<tr>
|
||||
<td width="100%">
|
||||
</center>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<table style="width: 100%; float: left;">
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<center>
|
||||
<h3>PASIVO</h3>
|
||||
<asp:UpdatePanel ID="UpPasivo" UpdateMode="Conditional" runat="server">
|
||||
@@ -332,34 +328,34 @@
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</center>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<table style="max-width: 550px; width: 90%;">
|
||||
<tr>
|
||||
<td width="275px" align="center">
|
||||
<h4>Total del Pasivo:</h4>
|
||||
</td>
|
||||
<td width="100px" align="right">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalPasivoActual"></asp:Label>
|
||||
</td>
|
||||
<td runat="server" id="TdTotalPasivo" width="100px" align="right" visible="false">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalPasivoAnterior"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
</center>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<table style="max-width: 550px; width: 90%;">
|
||||
<tr>
|
||||
<td width="275px" align="center">
|
||||
<h4>Total del Pasivo:</h4>
|
||||
</td>
|
||||
<td width="100px" align="right">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalPasivoActual"></asp:Label>
|
||||
</td>
|
||||
<td runat="server" id="TdTotalPasivo" width="100px" align="right" visible="false">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalPasivoAnterior"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
<center>
|
||||
<h3>
|
||||
<asp:Literal Text="CAPITAL" ID="LtlTituloHacienda" runat="server" />
|
||||
@@ -495,46 +491,46 @@
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</center>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<table style="max-width: 550px; width: 90%;">
|
||||
<tr>
|
||||
<td width="50%" style="text-align: center;">
|
||||
<h4>
|
||||
<asp:Literal ID="LtlTotalHacienda" Text="Total Capital:" runat="server" />
|
||||
</h4>
|
||||
</td>
|
||||
<td width="25%" align="right">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalPatrimonioActual"></asp:Label>
|
||||
</td>
|
||||
<td runat="server" id="TdTotalPatrimonio" width="25%" align="right" visible="false">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalPatrimonioAnterior"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
</center>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<table style="max-width: 550px; width: 90%;">
|
||||
<tr>
|
||||
<td width="50%" style="text-align: center;">
|
||||
<h4>
|
||||
<asp:Literal ID="LtlTotalHacienda" Text="Total Capital:" runat="server" />
|
||||
</h4>
|
||||
</td>
|
||||
<td width="25%" align="right">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalPatrimonioActual"></asp:Label>
|
||||
</td>
|
||||
<td runat="server" id="TdTotalPatrimonio" width="25%" align="right" visible="false">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalPatrimonioAnterior"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<center>
|
||||
<table style="max-width: 550px; width: 90%;">
|
||||
<tr>
|
||||
@@ -549,14 +545,14 @@
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
</center>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<center>
|
||||
<table style="max-width: 550px; width: 90%;">
|
||||
<tr>
|
||||
@@ -573,54 +569,54 @@
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12">
|
||||
<asp:Label runat="server" ID="LbDescuadre" ForeColor="Red" Font-Bold="false" Font-Size="Small"></asp:Label>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="ModalCierre" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalEditarFecha" UpdateMode="Conditional" RenderMode="Inline">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlCierre" Text="Cierre de Ejercicio" runat="server"> </asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate" style="width: 90px;">Ejercicio:</label>
|
||||
<div class="col-md-2" style="width: 125px;">
|
||||
<asp:DropDownList ID="DdlEjercicioCierre" runat="server" CssClass="select2me" DataTextField="Ejercicio" DataValueField="Ejercicio" Width="100px">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 truncate" style="width: 90px;">Cuentas:</label>
|
||||
<div class="col-md-5">
|
||||
<asp:DropDownList ID="DdlCuentas" runat="server" CssClass="select2me" DataTextField="CtaCodigo" DataValueField="CveCuenta" Width="100%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnCierre" runat="server" Text="Guardar" CssClass="btn btn-primary" ValidationGroup="VgmEditarFecha" />
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
</center>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12">
|
||||
<asp:Label runat="server" ID="LbDescuadre" ForeColor="Red" Font-Bold="false" Font-Size="Small"></asp:Label>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="ModalCierre" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalEditarFecha" UpdateMode="Conditional" RenderMode="Inline">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlCierre" Text="Cierre de Ejercicio" runat="server"> </asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate" style="width: 90px;">Ejercicio:</label>
|
||||
<div class="col-md-2" style="width: 125px;">
|
||||
<asp:DropDownList ID="DdlEjercicioCierre" runat="server" CssClass="select2me" DataTextField="Ejercicio" DataValueField="Ejercicio" Width="100px">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 truncate" style="width: 90px;">Cuentas:</label>
|
||||
<div class="col-md-5">
|
||||
<asp:DropDownList ID="DdlCuentas" runat="server" CssClass="select2me" DataTextField="CtaCodigo" DataValueField="CveCuenta" Width="100%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnCierre" runat="server" Text="Guardar" CssClass="btn btn-primary" ValidationGroup="VgmEditarFecha" />
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
@@ -784,6 +784,18 @@
|
||||
<td>activado
|
||||
</td>
|
||||
</tr>
|
||||
<tr align="left" id="TrTipoContable" runat="server" visible="False">
|
||||
<td><b>Tipo Contable:</b> </td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlTipoContable" runat="server" CssClass="form-control input-sm select2me" Width="80%">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementaria" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVTipoContable" runat="server" ControlToValidate="DdlTipoContable" InitialValue="-1" ErrorMessage="Debe Seleccionarse un tipo contable" ValidationGroup="GrpEmitirImprimir"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCETipoContable" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoContable" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
|
||||
@@ -5568,6 +5568,17 @@ Partial Class Ventas
|
||||
LBFacturarAnticipo.Visible = UsuarioActual.TienePermisoProceso(274)
|
||||
End If
|
||||
|
||||
'SI ES COMPLEMENTARIA, NO DEBE PERMITIR FACTURAR
|
||||
If UsuarioActual.Empresa.Funcionalidad(706) = "1" AndAlso DbRowVenta("TipoContable").ToString() <> "-1" Then
|
||||
If DbRowVenta("TipoContable").ToString() = "0" Then
|
||||
BtnsFacturar.Visible = False
|
||||
End If
|
||||
|
||||
TrTipoContable.Visible = True
|
||||
DdlTipoContable.SelectedValueExist(DbRowVenta("TipoContable").ToString())
|
||||
DdlTipoContable.Enabled = False
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If DbRowVenta("TipoDocto").ToString().Contiene("Cot", "Pd2") Then
|
||||
@@ -9115,10 +9126,13 @@ Partial Class Ventas
|
||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/Factura.rdlc", UsuarioActual.Empresa.Ruta))
|
||||
Dim Archivo2 As New System.IO.FileInfo(String.Format("{0}Formatos/Remision.rdlc", UsuarioActual.Empresa.Ruta))
|
||||
|
||||
Dim ArchivoSti As New System.IO.FileInfo(String.Format("{0}Formatos/Factura.mrt", UsuarioActual.Empresa.Ruta))
|
||||
Dim ArchivoSti2 As New System.IO.FileInfo(String.Format("{0}Formatos/Remision.mrt", UsuarioActual.Empresa.Ruta))
|
||||
|
||||
LnkImprimir.Visible = False
|
||||
|
||||
'If (UsuarioActual.CveEmpresa.Contiene(1, 4, 5, 7, 11, 12, 72, 80, 81, 83) And UsuarioActual.CveUsuario = 100) Or UsuarioActual.CveEmpresa.Contiene(80, 83) Or UsuarioActual.CveUsuario = 100 Then
|
||||
If (Archivo.Exists Or Archivo2.Exists) And IfNull(CveVenta, 0).ToString().ToEntero() > 0 Then
|
||||
If (Archivo.Exists Or Archivo2.Exists Or ArchivoSti.Exists Or ArchivoSti2.Exists) And IfNull(CveVenta, 0).ToString().ToEntero() > 0 Then
|
||||
HplDownPDF.Visible = True
|
||||
HplDownPDF.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", CveVenta)))
|
||||
If UsuarioActual.CveRol = 1 Then
|
||||
@@ -12640,7 +12654,13 @@ Partial Class Ventas
|
||||
tCveTipoPoliza = 1 ' que sea siempre ingreso.
|
||||
End If
|
||||
|
||||
factura.CvePrePoliza = ObjConta.AddPrePolizas("Ventas/GuardarVenta", factura.CvePlantillaPoliza, factura.Total, factura.Total, factura.CveMoneda, factura.Fecha, If(CveEmpresaCRM > 0, LblEmpresaCRM.Text, factura.Cliente.Nombre), factura.CveUsuario, factura.CveEmpresa, CveTipoPoliza:=tCveTipoPoliza)
|
||||
Dim TipoContable As Integer = -1
|
||||
If UsuarioActual.Empresa.Funcionalidad(706) = "1" AndAlso factura.TipoDocto = "Rem" Then
|
||||
'1-Contable, 0-Complementaria
|
||||
TipoContable = DdlTipoContable.SelectedValue.ToEntero()
|
||||
End If
|
||||
|
||||
factura.CvePrePoliza = ObjConta.AddPrePolizas("Ventas/GuardarVenta", factura.CvePlantillaPoliza, factura.Total, factura.Total, factura.CveMoneda, factura.Fecha, If(CveEmpresaCRM > 0, LblEmpresaCRM.Text, factura.Cliente.Nombre), factura.CveUsuario, factura.CveEmpresa, CveTipoPoliza:=tCveTipoPoliza, TipoContable:=TipoContable)
|
||||
|
||||
Dim RFCReceptor As String = ""
|
||||
|
||||
@@ -13126,7 +13146,7 @@ Partial Class Ventas
|
||||
|
||||
If ErrorList.Count = 0 Then
|
||||
'prepoliza
|
||||
GuardarVentaPrePolizas(ObjConta, factura, TmpDTDetalle, CveNCaVincular, objContPaqi, ObjBancos, ObjVentas, ObjEventos:=ObjEventos, EsNCAmortizacion:=EsNCAmortizacion, NCDescuento:=NCDescuento, ListaNCDescuento:=ListaNCDescuento, ObjInventario:=ObjInventario)
|
||||
GuardarVentaPrePolizas(ObjConta, factura, TmpDTDetalle, CveNCaVincular, objContPaqi, ObjBancos, ObjVentas, ObjEventos:=ObjEventos, EsNCAmortizacion:=EsNCAmortizacion, NCDescuento:=NCDescuento, ListaNCDescuento:=ListaNCDescuento, ObjInventario:=ObjInventario, TipoContable:=TipoContable)
|
||||
If ErrorList.Count = 0 Then
|
||||
|
||||
'INVENTARIOS
|
||||
@@ -13161,7 +13181,7 @@ Partial Class Ventas
|
||||
Private Sub GuardarVentaPrePolizas(ByRef ObjConta As ClsContabilidad, factura As Modelos.Factura, TmpDTDetalleMovimientos As DataTable, CveNCaVincular As Integer,
|
||||
ByRef objContPaqi As ClsContPAQi, Optional ByRef ObjBancos As ClsBancos = Nothing, ByRef Optional ObjVentas As ClsVentas = Nothing,
|
||||
ByRef Optional ObjEventos As ClsOIEventos = Nothing, Optional EsNCAmortizacion As Boolean = False, Optional NCDescuento As Boolean = False,
|
||||
Optional ValorMultiplicador As Integer = 1, Optional ListaNCDescuento As List(Of Modelos.Factura) = Nothing, Optional ObjInventario As ClsInventarios = Nothing)
|
||||
Optional ValorMultiplicador As Integer = 1, Optional ListaNCDescuento As List(Of Modelos.Factura) = Nothing, Optional ObjInventario As ClsInventarios = Nothing, Optional TipoContable As Integer = -1)
|
||||
|
||||
Dim CveIE As Integer = -1
|
||||
Dim DT As DataTable = Nothing
|
||||
@@ -13180,7 +13200,7 @@ Partial Class Ventas
|
||||
If DdlTipoComprobante.SelectedValue <> "Cot" Then
|
||||
If factura.CvePrePoliza > 0 Then
|
||||
|
||||
If ProcesoPrepolizas(ObjConta, factura, CveIE, TmpDTDetalleMovimientos, objContPaqi, ValorMultiplicador, ObjBancos, ObjVentas, ObjEventos:=ObjEventos, EsNCAmortizacion:=EsNCAmortizacion, NCDescuento:=NCDescuento, ListaNCDescuento:=ListaNCDescuento, ObjInventario:=ObjInventario) Then
|
||||
If ProcesoPrepolizas(ObjConta, factura, CveIE, TmpDTDetalleMovimientos, objContPaqi, ValorMultiplicador, ObjBancos, ObjVentas, ObjEventos:=ObjEventos, EsNCAmortizacion:=EsNCAmortizacion, NCDescuento:=NCDescuento, ListaNCDescuento:=ListaNCDescuento, ObjInventario:=ObjInventario, TipoContable:=TipoContable) Then
|
||||
ErrorList.Add("Ocurrió un error al agregar los Movimientos de la prepoliza.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||
End If
|
||||
|
||||
@@ -13192,7 +13212,7 @@ Partial Class Ventas
|
||||
Private Function ProcesoPrepolizas(ByRef ObjConta As ClsContabilidad, ObjFactura As Modelos.Factura, CveIE As Integer, TmpDTDetalle As DataTable, ByRef objContPaqi As ClsContPAQi,
|
||||
Optional ValorMultiplicador As Integer = 1, ByRef Optional ObjBancos As ClsBancos = Nothing, ByRef Optional ObjVentas As ClsVentas = Nothing,
|
||||
ByRef Optional ObjEventos As ClsOIEventos = Nothing, Optional EsNCAmortizacion As Boolean = False, Optional NCDescuento As Boolean = False,
|
||||
Optional ListaNCDescuento As List(Of Modelos.Factura) = Nothing, Optional ObjInventario As ClsInventarios = Nothing) As Boolean
|
||||
Optional ListaNCDescuento As List(Of Modelos.Factura) = Nothing, Optional ObjInventario As ClsInventarios = Nothing, Optional TipoContable As Integer = -1) As Boolean
|
||||
Try
|
||||
Dim DT As DataTable
|
||||
Dim CvePlantilaPoliza As Integer
|
||||
@@ -13343,8 +13363,13 @@ Partial Class Ventas
|
||||
End If
|
||||
IdCtaContableCliente = IdCtaContable
|
||||
|
||||
If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 190, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 193, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
Dim ContabilizableRem As Boolean = False
|
||||
If TipoContable <> -1 Then
|
||||
ContabilizableRem = True
|
||||
End If
|
||||
|
||||
If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 190, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=ContabilizableRem, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 193, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=ContabilizableRem, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
Else
|
||||
@@ -16523,189 +16548,194 @@ Partial Class Ventas
|
||||
#End Region
|
||||
|
||||
#Region "I M A G E - B U T T O N S"
|
||||
Protected Function CancelarFactura(ByRef ObjVentas As ClsVentas, ByRef ObjConta As ClsContabilidad, ByRef ObjAC As ClsContPAQi, ByRef ObjBancos As ClsBancos) As Boolean
|
||||
Dim IDPoliza As Integer = -1
|
||||
Dim CvePrePoliza As Integer
|
||||
Dim CvePlantillaPoliza As Integer
|
||||
'Protected Function CancelarFactura(ByRef ObjVentas As ClsVentas, ByRef ObjConta As ClsContabilidad, ByRef ObjAC As ClsContPAQi, ByRef ObjBancos As ClsBancos) As Boolean
|
||||
' Dim IDPoliza As Integer = -1
|
||||
' Dim CvePrePoliza As Integer
|
||||
' Dim CvePlantillaPoliza As Integer
|
||||
|
||||
Dim ErrorCancelar As Boolean = False
|
||||
Dim Mensaje As String = ""
|
||||
' Dim ErrorCancelar As Boolean = False
|
||||
' Dim Mensaje As String = ""
|
||||
|
||||
Try
|
||||
ObjFacturaDevolucion.TipoDocto = ObjFactura.TipoDocto
|
||||
' Try
|
||||
' ObjFacturaDevolucion.TipoDocto = ObjFactura.TipoDocto
|
||||
|
||||
If ObjFacturaDevolucion.TipoDocto.Contiene("Egs", "Dev") Then
|
||||
CvePlantillaPoliza = 7
|
||||
ElseIf ObjFacturaDevolucion.TipoDocto.Contiene("Ing", "Rem", "Ant") Then
|
||||
CvePlantillaPoliza = 4
|
||||
End If
|
||||
' Dim TipoContable As Integer = -1
|
||||
' If ObjFacturaDevolucion.TipoDocto.Contiene("Egs", "Dev") Then
|
||||
' CvePlantillaPoliza = 7
|
||||
' ElseIf ObjFacturaDevolucion.TipoDocto.Contiene("Ing", "Rem", "Ant") Then
|
||||
' CvePlantillaPoliza = 4
|
||||
' End If
|
||||
|
||||
' If UsuarioActual.Empresa.Funcionalidad(706) = "1" AndAlso Then
|
||||
|
||||
' End If
|
||||
|
||||
|
||||
CvePrePoliza = ObjConta.AddPrePolizas("Ventas/GuardaEstatus", CvePlantillaPoliza, TxtTotal.Text.ToDouble, TxtTotal.Text.Replace(",", "").ToDouble, DdlMoneda.SelectedValue.ToEntero(), Now, NombreCliente, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
ObjFacturaDevolucion.CveVenta = CveVenta
|
||||
ObjFacturaDevolucion.CvePrePoliza = CvePrePoliza
|
||||
' CvePrePoliza = ObjConta.AddPrePolizas("Ventas/GuardaEstatus", CvePlantillaPoliza, TxtTotal.Text.ToDouble, TxtTotal.Text.Replace(",", "").ToDouble, DdlMoneda.SelectedValue.ToEntero(), Now, NombreCliente, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
' ObjFacturaDevolucion.CveVenta = CveVenta
|
||||
' ObjFacturaDevolucion.CvePrePoliza = CvePrePoliza
|
||||
|
||||
|
||||
If NuevaFactura = 1 AndAlso UsuarioActual.TienePermisoProceso(222) Then
|
||||
If ObjVentas.GetVentaDetalle(ObjFacturaDevolucion.CveVenta) Then
|
||||
TmpDT = ObjVentas.DtResultados
|
||||
TmpDT.Columns.Add("CveVentaDetalleRNC", GetType(Integer))
|
||||
TmpDT.Columns.Add("TieneProntoPago", GetType(String))
|
||||
TmpDT.Columns.Add("ImporteProntoPago", GetType(Decimal))
|
||||
End If
|
||||
ErrorCancelar = ProcesoPrepolizas(ObjConta, ObjFacturaDevolucion, -1, TmpDT, ObjAC, -1, ObjBancos, ObjVentas)
|
||||
Else
|
||||
ErrorCancelar = ProcesoPrepolizas(ObjConta, ObjFacturaDevolucion, -1, TmpDT, ObjAC, -1, ObjBancos, ObjVentas)
|
||||
End If
|
||||
' If NuevaFactura = 1 AndAlso UsuarioActual.TienePermisoProceso(222) Then
|
||||
' If ObjVentas.GetVentaDetalle(ObjFacturaDevolucion.CveVenta) Then
|
||||
' TmpDT = ObjVentas.DtResultados
|
||||
' TmpDT.Columns.Add("CveVentaDetalleRNC", GetType(Integer))
|
||||
' TmpDT.Columns.Add("TieneProntoPago", GetType(String))
|
||||
' TmpDT.Columns.Add("ImporteProntoPago", GetType(Decimal))
|
||||
' End If
|
||||
' ErrorCancelar = ProcesoPrepolizas(ObjConta, ObjFacturaDevolucion, -1, TmpDT, ObjAC, -1, ObjBancos, ObjVentas)
|
||||
' Else
|
||||
' ErrorCancelar = ProcesoPrepolizas(ObjConta, ObjFacturaDevolucion, -1, TmpDT, ObjAC, -1, ObjBancos, ObjVentas)
|
||||
' End If
|
||||
|
||||
If Not ErrorCancelar Then
|
||||
ErrorCancelar = GuardarVentaImpuestosLocales(ObjVentas, ObjConta, ObjFacturaDevolucion, -1)
|
||||
End If
|
||||
' If Not ErrorCancelar Then
|
||||
' ErrorCancelar = GuardarVentaImpuestosLocales(ObjVentas, ObjConta, ObjFacturaDevolucion, -1)
|
||||
' End If
|
||||
|
||||
If CveEstatus = 4 Then
|
||||
' If CveEstatus = 4 Then
|
||||
|
||||
If ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, "", Now, CveVenta, IDPoliza) Then
|
||||
Mensaje = "El nuevo estatus se guardó correctamente"
|
||||
Else
|
||||
ErrorCancelar = True
|
||||
End If
|
||||
' If ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, "", Now, CveVenta, IDPoliza) Then
|
||||
' Mensaje = "El nuevo estatus se guardó correctamente"
|
||||
' Else
|
||||
' ErrorCancelar = True
|
||||
' End If
|
||||
|
||||
'Si se está mandando a Cancelada SAT
|
||||
ElseIf CveEstatus = 5 Then
|
||||
' 'Si se está mandando a Cancelada SAT
|
||||
' ElseIf CveEstatus = 5 Then
|
||||
|
||||
Dim DT As DataTable = Nothing
|
||||
' Dim DT As DataTable = Nothing
|
||||
|
||||
If FolioFiscal = "" Then
|
||||
Dim XmlDoc As New XmlDocument
|
||||
XmlDoc.Load(Ruta & "XML\" & DdlTipoComprobante.SelectedValue & "\" & VentaFolio & ".xml")
|
||||
ViewState("FolioFiscal") = XmlDoc.DocumentElement("cfdi:Complemento").FirstChild.Attributes("UUID").InnerText
|
||||
End If
|
||||
' If FolioFiscal = "" Then
|
||||
' Dim XmlDoc As New XmlDocument
|
||||
' XmlDoc.Load(Ruta & "XML\" & DdlTipoComprobante.SelectedValue & "\" & VentaFolio & ".xml")
|
||||
' ViewState("FolioFiscal") = XmlDoc.DocumentElement("cfdi:Complemento").FirstChild.Attributes("UUID").InnerText
|
||||
' End If
|
||||
|
||||
Dim ObjCancelacion As New Timbrado
|
||||
' Dim ObjCancelacion As New Timbrado
|
||||
|
||||
Dim Total As Decimal = TxtTotal.Text.ToDecimal
|
||||
Dim RFCReceptor As String = HdnRFCVenta.Value
|
||||
' Dim Total As Decimal = TxtTotal.Text.ToDecimal
|
||||
' Dim RFCReceptor As String = HdnRFCVenta.Value
|
||||
|
||||
If Not ObjVentas.UpdateEstatusFactura(13, FolioFiscal, "", Now, CveVenta, IDPoliza) Then 'Marcamos la factura como refacturada, si no se cancelo en el SAT el estatus nos dejara cancelarla despues
|
||||
ErrorCancelar = True
|
||||
End If
|
||||
Dim RespCancelacion = ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscal, Total, RFCReceptor, UsuarioActual.Empresa.RFC)
|
||||
If RespCancelacion.Verificado Then
|
||||
'falta verificar traer el acuse y reenviarlo
|
||||
' If Not ObjVentas.UpdateEstatusFactura(13, FolioFiscal, "", Now, CveVenta, IDPoliza) Then 'Marcamos la factura como refacturada, si no se cancelo en el SAT el estatus nos dejara cancelarla despues
|
||||
' ErrorCancelar = True
|
||||
' End If
|
||||
' Dim RespCancelacion = ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscal, Total, RFCReceptor, UsuarioActual.Empresa.RFC)
|
||||
' If RespCancelacion.Verificado Then
|
||||
' 'falta verificar traer el acuse y reenviarlo
|
||||
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC Then
|
||||
Dim IDMPoliza As Modelos.RetornoPolizaConta = GenerarPolizaAC(ObjAC, ObjFacturaDevolucion, True)
|
||||
IDPoliza = IDMPoliza.IdPoliza
|
||||
If IDMPoliza.IdPoliza <= 0 Then
|
||||
Mensaje = "No se pudo generar la poliza"
|
||||
ErrorCancelar = True
|
||||
End If
|
||||
End If
|
||||
' If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC Then
|
||||
' Dim IDMPoliza As Modelos.RetornoPolizaConta = GenerarPolizaAC(ObjAC, ObjFacturaDevolucion, True)
|
||||
' IDPoliza = IDMPoliza.IdPoliza
|
||||
' If IDMPoliza.IdPoliza <= 0 Then
|
||||
' Mensaje = "No se pudo generar la poliza"
|
||||
' ErrorCancelar = True
|
||||
' End If
|
||||
' End If
|
||||
|
||||
If Not ErrorCancelar Then
|
||||
If ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, ObjCancelacion.CancelacionAcuse, Now, CveVenta, IDPoliza, CvePAC:=UsuarioActual.Empresa.CvePAC) Then
|
||||
Mensaje = "El nuevo estatus se guardó correctamente"
|
||||
Else
|
||||
ErrorCancelar = True
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
ErrorCancelar = True
|
||||
End If
|
||||
' If Not ErrorCancelar Then
|
||||
' If ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, ObjCancelacion.CancelacionAcuse, Now, CveVenta, IDPoliza, CvePAC:=UsuarioActual.Empresa.CvePAC) Then
|
||||
' Mensaje = "El nuevo estatus se guardó correctamente"
|
||||
' Else
|
||||
' ErrorCancelar = True
|
||||
' End If
|
||||
' End If
|
||||
' Else
|
||||
' ErrorCancelar = True
|
||||
' End If
|
||||
|
||||
ObjCancelacion = Nothing
|
||||
' ObjCancelacion = Nothing
|
||||
|
||||
End If
|
||||
Catch ex As Exception
|
||||
GuardaLog("CancelF." & ex.ToString())
|
||||
ErrorCancelar = True
|
||||
End Try
|
||||
' End If
|
||||
' Catch ex As Exception
|
||||
' GuardaLog("CancelF." & ex.ToString())
|
||||
' ErrorCancelar = True
|
||||
' End Try
|
||||
|
||||
Return Not ErrorCancelar
|
||||
End Function
|
||||
Protected Function CancelarFactura2(ObjVentas As ClsVentas, ObjConta As ClsContabilidad, ObjAC As ClsContPAQi, ObjBancos As ClsBancos) As Boolean
|
||||
' Return Not ErrorCancelar
|
||||
'End Function
|
||||
'Protected Function CancelarFactura2(ObjVentas As ClsVentas, ObjConta As ClsContabilidad, ObjAC As ClsContPAQi, ObjBancos As ClsBancos) As Boolean
|
||||
|
||||
Dim IDPoliza As Integer = -1
|
||||
Dim CvePrePoliza As Integer
|
||||
Dim CvePlantillaPoliza As Integer
|
||||
' Dim IDPoliza As Integer = -1
|
||||
' Dim CvePrePoliza As Integer
|
||||
' Dim CvePlantillaPoliza As Integer
|
||||
|
||||
Dim ErrorCancelar As Boolean = False
|
||||
Dim Mensaje As String = ""
|
||||
' Dim ErrorCancelar As Boolean = False
|
||||
' Dim Mensaje As String = ""
|
||||
|
||||
CreaObjetosVenta()
|
||||
' CreaObjetosVenta()
|
||||
|
||||
If ObjFactura.TipoDocto.Contiene("Egs", "Dev") Then
|
||||
CvePlantillaPoliza = 7
|
||||
ElseIf ObjFactura.TipoDocto.Contiene("Ing", "Rem") Then
|
||||
CvePlantillaPoliza = 4
|
||||
End If
|
||||
' If ObjFactura.TipoDocto.Contiene("Egs", "Dev") Then
|
||||
' CvePlantillaPoliza = 7
|
||||
' ElseIf ObjFactura.TipoDocto.Contiene("Ing", "Rem") Then
|
||||
' CvePlantillaPoliza = 4
|
||||
' End If
|
||||
|
||||
|
||||
CvePrePoliza = ObjConta.AddPrePolizas("Ventas/GuardaEstatus", CvePlantillaPoliza, TxtTotal.Text.ToDouble, TxtTotal.Text.Replace(",", "").ToDouble, DdlMoneda.SelectedValue.ToEntero(), Now, NombreCliente, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
ObjFactura.CveVenta = CveVenta
|
||||
ObjFactura.CvePrePoliza = CvePrePoliza
|
||||
' CvePrePoliza = ObjConta.AddPrePolizas("Ventas/GuardaEstatus", CvePlantillaPoliza, TxtTotal.Text.ToDouble, TxtTotal.Text.Replace(",", "").ToDouble, DdlMoneda.SelectedValue.ToEntero(), Now, NombreCliente, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
' ObjFactura.CveVenta = CveVenta
|
||||
' ObjFactura.CvePrePoliza = CvePrePoliza
|
||||
|
||||
If HplSaldoAuxiliar.Text.ToDecimal > 0 Then
|
||||
ErrorCancelar = ProcesoPrepolizas(ObjConta, ObjFactura, -1, TmpDT, ObjAC, -1, ObjBancos, ObjVentas)
|
||||
End If
|
||||
' If HplSaldoAuxiliar.Text.ToDecimal > 0 Then
|
||||
' ErrorCancelar = ProcesoPrepolizas(ObjConta, ObjFactura, -1, TmpDT, ObjAC, -1, ObjBancos, ObjVentas)
|
||||
' End If
|
||||
|
||||
If Not ErrorCancelar Then
|
||||
ErrorCancelar = GuardarVentaImpuestosLocales(ObjVentas, ObjConta, ObjFactura, -1)
|
||||
End If
|
||||
' If Not ErrorCancelar Then
|
||||
' ErrorCancelar = GuardarVentaImpuestosLocales(ObjVentas, ObjConta, ObjFactura, -1)
|
||||
' End If
|
||||
|
||||
If CveEstatus = 4 Then
|
||||
' If CveEstatus = 4 Then
|
||||
|
||||
If ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, "", Now, CveVenta, IDPoliza) Then
|
||||
Mensaje = "El nuevo estatus se guardó correctamente"
|
||||
Else
|
||||
ErrorCancelar = True
|
||||
End If
|
||||
' If ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, "", Now, CveVenta, IDPoliza) Then
|
||||
' Mensaje = "El nuevo estatus se guardó correctamente"
|
||||
' Else
|
||||
' ErrorCancelar = True
|
||||
' End If
|
||||
|
||||
'Si se está mandando a Cancelada SAT
|
||||
ElseIf CveEstatus = 5 Then
|
||||
' 'Si se está mandando a Cancelada SAT
|
||||
' ElseIf CveEstatus = 5 Then
|
||||
|
||||
Dim DT As DataTable = Nothing
|
||||
' Dim DT As DataTable = Nothing
|
||||
|
||||
If FolioFiscal = "" Then
|
||||
Dim XmlDoc As New XmlDocument
|
||||
XmlDoc.Load(Ruta & "XML\" & DdlTipoComprobante.SelectedValue & "\" & VentaFolio & ".xml")
|
||||
ViewState("FolioFiscal") = XmlDoc.DocumentElement("cfdi:Complemento").FirstChild.Attributes("UUID").InnerText
|
||||
End If
|
||||
' If FolioFiscal = "" Then
|
||||
' Dim XmlDoc As New XmlDocument
|
||||
' XmlDoc.Load(Ruta & "XML\" & DdlTipoComprobante.SelectedValue & "\" & VentaFolio & ".xml")
|
||||
' ViewState("FolioFiscal") = XmlDoc.DocumentElement("cfdi:Complemento").FirstChild.Attributes("UUID").InnerText
|
||||
' End If
|
||||
|
||||
'Si es cancelar en el SAT:
|
||||
Dim CFDi As New ClbNegBICFDv3_2.ClsNegEDI
|
||||
Dim Respuesta As New ClbNegBICFDv3_2.ClsNegRespuesta
|
||||
Respuesta = CFDi.CancelaCFdi(UsuarioActual.Empresa.BIUsuario, UsuarioActual.Empresa.BIContraseña, Ruta & "Certificados\" & UsuarioActual.Empresa.ArchivoPfx, UsuarioActual.Empresa.ContraseñaKey, UsuarioActual.Empresa.RFC, FolioFiscal, "http://208.43.160.178/srvCFDi/service1.asmx")
|
||||
' 'Si es cancelar en el SAT:
|
||||
' Dim CFDi As New ClbNegBICFDv3_2.ClsNegEDI
|
||||
' Dim Respuesta As New ClbNegBICFDv3_2.ClsNegRespuesta
|
||||
' Respuesta = CFDi.CancelaCFdi(UsuarioActual.Empresa.BIUsuario, UsuarioActual.Empresa.BIContraseña, Ruta & "Certificados\" & UsuarioActual.Empresa.ArchivoPfx, UsuarioActual.Empresa.ContraseñaKey, UsuarioActual.Empresa.RFC, FolioFiscal, "http://208.43.160.178/srvCFDi/service1.asmx")
|
||||
|
||||
If Respuesta Is Nothing Then
|
||||
'Alert("La factura no se pudo cancelar. <br />Posbiles causas:<br /> - Los servicios del SAT están ocupados.<br /> - El Folio Fiscal no ha quedado registrado.", TipoMensaje.MsgError)
|
||||
Me.GuardaLog(CFDi.MsgError)
|
||||
ErrorCancelar = True
|
||||
Mensaje = "La factura no se pudo cancelar. <br />Posbiles causas:<br /> - Los servicios del SAT están ocupados.<br /> - El Folio Fiscal no ha quedado registrado."
|
||||
ElseIf Respuesta.NoCertificadoSAT <> String.Empty Then
|
||||
' If Respuesta Is Nothing Then
|
||||
' 'Alert("La factura no se pudo cancelar. <br />Posbiles causas:<br /> - Los servicios del SAT están ocupados.<br /> - El Folio Fiscal no ha quedado registrado.", TipoMensaje.MsgError)
|
||||
' Me.GuardaLog(CFDi.MsgError)
|
||||
' ErrorCancelar = True
|
||||
' Mensaje = "La factura no se pudo cancelar. <br />Posbiles causas:<br /> - Los servicios del SAT están ocupados.<br /> - El Folio Fiscal no ha quedado registrado."
|
||||
' ElseIf Respuesta.NoCertificadoSAT <> String.Empty Then
|
||||
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC Then
|
||||
Dim IDMPoliza As Modelos.RetornoPolizaConta = GenerarPolizaAC(ObjAC, ObjFacturaDevolucion, True)
|
||||
IDPoliza = IDMPoliza.IdPoliza
|
||||
If IDMPoliza.IdPoliza <= 0 Then
|
||||
Mensaje = "No se pudo generar la poliza"
|
||||
ErrorCancelar = True
|
||||
End If
|
||||
End If
|
||||
' If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC Then
|
||||
' Dim IDMPoliza As Modelos.RetornoPolizaConta = GenerarPolizaAC(ObjAC, ObjFacturaDevolucion, True)
|
||||
' IDPoliza = IDMPoliza.IdPoliza
|
||||
' If IDMPoliza.IdPoliza <= 0 Then
|
||||
' Mensaje = "No se pudo generar la poliza"
|
||||
' ErrorCancelar = True
|
||||
' End If
|
||||
' End If
|
||||
|
||||
If Not ErrorCancelar Then
|
||||
If ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, Respuesta.NoCertificadoSAT, Respuesta.FechaTimbrado, CveVenta, IDPoliza) Then
|
||||
Mensaje = "El nuevo estatus se guardó correctamente"
|
||||
Else
|
||||
ErrorCancelar = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
' If Not ErrorCancelar Then
|
||||
' If ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, Respuesta.NoCertificadoSAT, Respuesta.FechaTimbrado, CveVenta, IDPoliza) Then
|
||||
' Mensaje = "El nuevo estatus se guardó correctamente"
|
||||
' Else
|
||||
' ErrorCancelar = True
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
|
||||
End If
|
||||
' End If
|
||||
|
||||
Return Not ErrorCancelar
|
||||
End Function
|
||||
' Return Not ErrorCancelar
|
||||
'End Function
|
||||
|
||||
Protected Sub ImgBtnAddC_Click(sender As Object, e As ImageClickEventArgs) Handles ImgBtnAddC.Click
|
||||
Dim Row As DataRow = Nothing
|
||||
@@ -17120,6 +17150,10 @@ Partial Class Ventas
|
||||
tdFechaVigencia.Visible = DdlTipoComprobante.SelectedValue.Contiene("Cot")
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(706) = "1" AndAlso (CveVenta <= 0 OrElse EsCreaApartirDe) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Rem") Then
|
||||
TrTipoContable.Visible = True
|
||||
End If
|
||||
|
||||
Updatetabs.Update()
|
||||
UPCondicionesPago.Update()
|
||||
UpCliente.Update()
|
||||
@@ -19818,6 +19852,7 @@ Partial Class Ventas
|
||||
If Not OcurrioError AndAlso RemisionesLista.Count > 0 AndAlso DtRemConceptosSurtidos IsNot Nothing Then
|
||||
If DtRemConceptosSurtidos.SUMD("Surtido") <> DtRemConceptosSurtidos.SUMD("Cantidad") Then
|
||||
OcurrioError = True
|
||||
Alert("Lo facturado no coincide con lo surtido en inventario", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
Reference in New Issue
Block a user