Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -2315,7 +2315,6 @@ Public Class ClsPaginas
|
||||
Public Shared Property GlobalDTVtaCobranzaEstatus(CveEmpresa As Integer, Optional CveCobranzaEstatus As Integer = -1) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = $"GlobalDTVtaCobranzaEstatus-{CveEmpresa}"
|
||||
'sino existe, recarga los datos
|
||||
If HttpContext.Current.Application(AppNombre) Is Nothing Then
|
||||
Dim ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetCobranzaEstatus(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjVentas.DtResultados
|
||||
@@ -2438,20 +2437,22 @@ Public Class ClsPaginas
|
||||
#Region "***********************************************************************DT ACTIVOS FIJOS**********************************************************************************"
|
||||
Property GlobalDTActivoFijos(CveEmpresa As Integer, Optional CveSubTipoActivoFijo As Integer = -1, Optional CveActivoFijo As Integer = -1) As DataTable
|
||||
Get
|
||||
Dim dt As DataTable = Nothing
|
||||
'Dim Str As New StringBuilder
|
||||
'Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
|
||||
'If CveSubTipoActivoFijo <> -1 Then Str.AppendFormat(" AND CveSubTipoActivoFijo = {0}", CveSubTipoActivoFijo)
|
||||
Dim ObjAF As New ClsAF
|
||||
'If ObjAF.GetActivosFijos(CveActivoFijo, UsuarioActual.CveEmpresa, "-1", "-1", -1, -1, -1, "-1", -1, -1, -1, -1, -1) Then
|
||||
If ObjAF.GetActivosFijos(CveActivoFijo, CveEmpresa, "-1", "-1", -1, CveSubTipoActivoFijo, "-1", -1, -1, -1, -1, -1, "", -1) Then
|
||||
dt = ObjAF.DtResultados
|
||||
Dim AppNombre As String = $"GlobalDTActivoFijo-{CveEmpresa}"
|
||||
If HttpContext.Current.Application(AppNombre) Is Nothing Then
|
||||
Dim ObjActivosFijos As New ClsAF
|
||||
If ObjActivosFijos.GetActivosFijos(-1, CveEmpresa, "-1", "-1", -1, -1, "-1", -1, -1, -1, -1, -1, "", -1) Then HttpContext.Current.Application(AppNombre) = ObjActivosFijos.DtResultados
|
||||
ObjActivosFijos.Dispose()
|
||||
End If
|
||||
ObjAF.Dispose()
|
||||
GlobalDTActivoFijos = dt
|
||||
Dim Str As New StringBuilder
|
||||
If CveSubTipoActivoFijo <> -1 Then Str.AppendFormat(" CveSubTipoActivoFijo = {0} ", CveSubTipoActivoFijo)
|
||||
If CveActivoFijo > 0 Then Str.AppendFormat("{0} CveActivoFijo = {1}", IIf(Str.Length > 0, " AND ", ""), CveActivoFijo)
|
||||
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
|
||||
GlobalDTActivoFijos = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
End Get
|
||||
Set(ByVal value As DataTable)
|
||||
Application("GlobalDTActivoFijos") = value
|
||||
Dim AppNombre As String = $"GlobalDTActivoFijo-{CveEmpresa}"
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Public Shared Property GlobalDTEstadoActivoFijo() As DataTable
|
||||
@@ -2488,14 +2489,13 @@ Public Class ClsPaginas
|
||||
Public Shared Property GlobalDTModeloActivoFijo(CveEmpresa As Integer, CveMarca As Integer) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = $"GlobalDTModeloActivoFijo-{CveEmpresa}"
|
||||
'sino existe, recarga los datos
|
||||
If HttpContext.Current.Application(AppNombre) Is Nothing Then
|
||||
Dim ObjActivosFijos As New ClsAF
|
||||
If ObjActivosFijos.GetModelosActivosFijos(CveEmpresa, -1) Then HttpContext.Current.Application(AppNombre) = ObjActivosFijos.DtResultados
|
||||
ObjActivosFijos.Dispose()
|
||||
End If
|
||||
If CveMarca > 0 Then
|
||||
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), $"CveMarca = {CveMarca}", "", DataViewRowState.CurrentRows)
|
||||
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), $"CveMarcaActivoFijo = {CveMarca}", "", DataViewRowState.CurrentRows)
|
||||
GlobalDTModeloActivoFijo = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
Else
|
||||
@@ -2510,7 +2510,6 @@ Public Class ClsPaginas
|
||||
Public Shared Property GlobalDTSubTipoActivoFijo(CveEmpresa As Integer, Optional CveTipoActivoFijo As Integer = -1) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = $"GlobalDTSubTipoActivoFijo-{CveEmpresa}"
|
||||
'sino existe, recarga los datos
|
||||
If HttpContext.Current.Application(AppNombre) Is Nothing Then
|
||||
Dim ObjSubTipos As New ClsAF
|
||||
If ObjSubTipos.GetSubTiposActivosFijos(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjSubTipos.DtResultados
|
||||
@@ -2531,10 +2530,9 @@ Public Class ClsPaginas
|
||||
Public Shared Property GlobalDTTipoActivoFijo(CveEmpresa As Integer) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = $"GlobalDTTipoActivoFijo-{CveEmpresa}"
|
||||
'sino existe, recarga los datos
|
||||
If HttpContext.Current.Application(AppNombre) Is Nothing Then
|
||||
Dim GetTiposActivosFijos As New ClsAF
|
||||
If GetTiposActivosFijos.GetCaracteristicas(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = GetTiposActivosFijos.DtResultados
|
||||
If GetTiposActivosFijos.GetTiposActivosFijos(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = GetTiposActivosFijos.DtResultados
|
||||
GetTiposActivosFijos.Dispose()
|
||||
End If
|
||||
GlobalDTTipoActivoFijo = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
|
||||
@@ -4293,25 +4291,29 @@ Public Class ClsPaginas
|
||||
ObjUsuario.Dispose()
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Sub CargarCentrosDeCosto(DdlProyecto As ListControl, DdlSubProyecto As ListControl, LthProyectoP As Label, LblSubProyecto As Label, Optional AplicaTodos As String = "Todos", Optional DdlSubProyectoMultiple As ListControl = Nothing)
|
||||
Public Sub CargarCentrosDeCosto(DdlProyecto As ListControl, DdlSubProyecto As ListControl, LblProyecto As Label, LblSubProyecto As Label, Optional AplicaTodos As String = "Todos", Optional DdlSubProyectoMultiple As ListControl = Nothing, Optional divProyecto As HtmlControl = Nothing)
|
||||
|
||||
Select Case UsuarioActual.Empresa.Tipo_CentroCosto
|
||||
Case 1
|
||||
If DdlProyecto IsNot Nothing Then DdlProyecto.Visible = False
|
||||
If LthProyectoP IsNot Nothing Then LthProyectoP.Visible = False
|
||||
If LblProyecto IsNot Nothing Then LblProyecto.Visible = False
|
||||
If divProyecto IsNot Nothing Then divProyecto.Visible = False
|
||||
If LblSubProyecto IsNot Nothing Then LblSubProyecto.Text = "Centro de costo"
|
||||
Case 2
|
||||
If DdlProyecto IsNot Nothing Then DdlProyecto.Visible = False
|
||||
If LthProyectoP IsNot Nothing Then LthProyectoP.Visible = False
|
||||
If LblProyecto IsNot Nothing Then LblProyecto.Visible = False
|
||||
If divProyecto IsNot Nothing Then divProyecto.Visible = False
|
||||
If LblSubProyecto IsNot Nothing Then LblSubProyecto.Text = "Sucursal"
|
||||
Case 3
|
||||
If DdlProyecto IsNot Nothing Then DdlProyecto.Visible = False
|
||||
If LthProyectoP IsNot Nothing Then LthProyectoP.Visible = False
|
||||
If LblProyecto IsNot Nothing Then LblProyecto.Visible = False
|
||||
If divProyecto IsNot Nothing Then divProyecto.Visible = False
|
||||
If LblSubProyecto IsNot Nothing Then LblSubProyecto.Text = "Proyecto"
|
||||
Case 4
|
||||
If LthProyectoP IsNot Nothing Then LthProyectoP.Text = "Proyecto<br/>"
|
||||
If LblProyecto IsNot Nothing Then LblProyecto.Text = "Proyecto<br/>"
|
||||
If LblSubProyecto IsNot Nothing Then LblSubProyecto.Text = "Subproyecto"
|
||||
Case 5
|
||||
If LthProyectoP IsNot Nothing Then LthProyectoP.Text = "Proyecto<br/>"
|
||||
If LblProyecto IsNot Nothing Then LblProyecto.Text = "Proyecto<br/>"
|
||||
If LblSubProyecto IsNot Nothing Then LblSubProyecto.Text = "Sucursal"
|
||||
End Select
|
||||
If DdlProyecto IsNot Nothing Then
|
||||
@@ -7490,18 +7492,11 @@ Public Class ClsPaginas
|
||||
Dim tFechaUltimaFluctuacion As Date
|
||||
Dim tImportePago As Decimal
|
||||
Dim tImporteCompra As Decimal = Pago.ImportePago
|
||||
Dim CveConceptoContableComplementaria As Integer = 206
|
||||
Pago.CveConceptoPago = If(Pago.CveConceptoPago = -1, 17, Pago.CveConceptoPago) 'si viene en parametro lo toma com primera opcion, sino el 17
|
||||
If CompraActual.CveTipoConceptoProveedor = 2 Then Pago.CveConceptoPago = 308 'cuando es acreedor
|
||||
'
|
||||
If Pago.CveConceptoPago = 272 And CompraActual.CveMoneda = 2 Then Pago.CveConceptoPago = 304 'pago nota de crédito ME
|
||||
If CompraActual.CveMoneda <> 1 Then
|
||||
Select Case Pago.CveConceptoPago
|
||||
Case 17 : Pago.CveConceptoPago = 312
|
||||
Case 308 : Pago.CveConceptoPago = 309 : CveConceptoContableComplementaria = 310
|
||||
Case Else
|
||||
End Select
|
||||
End If
|
||||
|
||||
Dim ConPreP As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(1, CompraActual.CveMoneda, True, CompraActual.CveTipoConceptoProveedor)
|
||||
'cuando el Pago viene por NC, se utiliza un concepto
|
||||
If Pago.TipoPago.Contiene("NC", "DEV") Then If CompraActual.CveMoneda = 2 Then ConPreP.CveConcepto = 304 Else ConPreP.CveConcepto = 272 'pago nota de crédito ME
|
||||
|
||||
Dim Concepto As String = String.Format("{0} F:{1}", CompraActual.ProveedorNombre, CompraActual.SerieFolio)
|
||||
Dim FuncionalidadFluctuacionImpuestos As Boolean = If(UsuarioActual.Empresa.Funcionalidad(159) = "1", True, False)
|
||||
Dim tFecha As Date = Pago.Fecha
|
||||
@@ -7534,10 +7529,10 @@ Public Class ClsPaginas
|
||||
ImportePagoMN = (Pago.ImportePago * TCValuacionCompra).RoundSQL
|
||||
End If
|
||||
'movimiento de pago proveedor
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, ImportePagoMN, Pago.CveConceptoPago, CompraActual.SerieFolio, Concepto, CompraActual.IdCtaContableProv, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, CveCompraAmortizacion:=Pago.CveCompraAmortizacion, TipoCambio:=TCValuacionCompra, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, ImportePagoMN, ConPreP.CveConcepto, CompraActual.SerieFolio, Concepto, CompraActual.IdCtaContableProv, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, CveCompraAmortizacion:=Pago.CveCompraAmortizacion, TipoCambio:=TCValuacionCompra, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
|
||||
'movimiento de pago proveedor Complementaria
|
||||
If Not ErrorMovtos AndAlso CompraActual.CveMoneda > 1 AndAlso UsaComplementaria Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, (ImporteME * TCValuacionCompra - ImporteME).RoundSQL, CveConceptoContableComplementaria, CompraActual.SerieFolio, Concepto, CompraActual.IdCtaContableProvComplementaria, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, CveCompraAmortizacion:=Pago.CveCompraAmortizacion, TipoCambio:=TCValuacionCompra, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, (ImporteME * TCValuacionCompra - ImporteME).RoundSQL, ConPreP.CveConceptoComplementario, CompraActual.SerieFolio, Concepto, CompraActual.IdCtaContableProvComplementaria, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, CveCompraAmortizacion:=Pago.CveCompraAmortizacion, TipoCambio:=TCValuacionCompra, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
|
||||
End If
|
||||
If Pago.AplicaAcreditable Then
|
||||
'si tiene iva y su proporcion
|
||||
@@ -7619,35 +7614,36 @@ Public Class ClsPaginas
|
||||
'concepto pago
|
||||
Concepto = String.Format("{0} NC:{1}", CompraActual.ProveedorNombre, Pago.Referencia)
|
||||
If Pago.TipoPago = "Egsc" AndAlso Not ErrorMovtos Then ' A N T I C I P O / E G R E S O S X C O M P R O B A R
|
||||
Dim Ret As New ConceptosRetenciones
|
||||
Dim ConPrepAplicacion As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(11, CompraActual.CveMoneda, True, CompraActual.CveTipoConceptoProveedor)
|
||||
If Pago.CveMonedaPago > 1 Then
|
||||
'Agregamos la Extranjera
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, 21, Pago.Referencia, Concepto, CompraActual.IdCtaContableAnticipoProv, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, ConPrepAplicacion.CveConcepto, Pago.Referencia, Concepto, CompraActual.IdCtaContableAnticipoProv, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
|
||||
ImporteMN = (Pago.ImportePago * TCValuacionPago - Pago.ImportePago).RoundSQL
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, ImporteMN, 266, Pago.Referencia, Concepto, CompraActual.IdCtaContableAnticipoProvComplementaria, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, ImporteMN, ConPrepAplicacion.CveConceptoComplementario, Pago.Referencia, Concepto, CompraActual.IdCtaContableAnticipoProvComplementaria, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
|
||||
Else
|
||||
'Agregamos Nacional
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, 21, Pago.Referencia, Concepto, CompraActual.IdCtaContableAnticipoProv, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambioPago:=Pago.TCPago) Then ErrorMovtos = True
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, ConPrepAplicacion.CveConcepto, Pago.Referencia, Concepto, CompraActual.IdCtaContableAnticipoProv, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambioPago:=Pago.TCPago) Then ErrorMovtos = True
|
||||
End If
|
||||
End If
|
||||
If Pago.TipoPago.Contiene("NC", "DEV") AndAlso Not ErrorMovtos Then ' N O T A D E C R E D I T O
|
||||
Dim Ret As New ConceptosRetenciones
|
||||
Dim ConPrepAplicacion As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(15, CompraActual.CveMoneda, True, CompraActual.CveTipoConceptoProveedor)
|
||||
If Pago.CveMonedaPago > 1 Then
|
||||
'Agregamos la Extranjera
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, 342, Pago.Referencia, Concepto, CompraActual.IdCtaContableProv, CveCompra:=Pago.CveCompraAmortizacion, CveCompraAmortizacion:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, ConPrepAplicacion.CveConcepto, Pago.Referencia, Concepto, CompraActual.IdCtaContableProv, CveCompra:=Pago.CveCompraAmortizacion, CveCompraAmortizacion:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
|
||||
ImporteMN = (Pago.ImportePago * TCValuacionPago - Pago.ImportePago).RoundSQL
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, ImporteMN, 235, Pago.Referencia, Concepto, CompraActual.IdCtaContableProvComplementaria, CveCompra:=Pago.CveCompraAmortizacion, CveVentaAmortizacion:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, ImporteMN, ConPrepAplicacion.CveConceptoComplementario, Pago.Referencia, Concepto, CompraActual.IdCtaContableProvComplementaria, CveCompra:=Pago.CveCompraAmortizacion, CveVentaAmortizacion:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
|
||||
Else
|
||||
'Agregamos Nacional
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, 60, Pago.Referencia, Concepto, CompraActual.IdCtaContableProv, CveCompra:=Pago.CveCompraAmortizacion, CveCompraAmortizacion:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, ConPrepAplicacion.CveConcepto, Pago.Referencia, Concepto, CompraActual.IdCtaContableProv, CveCompra:=Pago.CveCompraAmortizacion, CveCompraAmortizacion:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
||||
End If
|
||||
End If
|
||||
If Pago.TipoPago = "DD" AndAlso Not ErrorMovtos Then ' D E U D O R D I V E R S O
|
||||
Dim Ret As New ConceptosRetenciones
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
If ObjConta.GetRetCuenta(66, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContableAcreditable = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero
|
||||
If Pago.CveMonedaPago > 1 AndAlso ObjConta.GetRetCuenta(207, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContablexAcreditar = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSxAcreditar").ToString.ToEntero
|
||||
End If
|
||||
If Pago.TipoPago = "DD" AndAlso Not ErrorMovtos Then ' D E U D O R D I V E R S O
|
||||
'Dim ConPrepAplicacion As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(1, CompraActual.CveMoneda, True, CompraActual.CveTipoConceptoProveedor)
|
||||
'Dim Ret As New ConceptosRetenciones
|
||||
'If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
' If ObjConta.GetRetCuenta(66, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContableAcreditable = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero
|
||||
' If Pago.CveMonedaPago > 1 AndAlso ObjConta.GetRetCuenta(207, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContablexAcreditar = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSxAcreditar").ToString.ToEntero
|
||||
'End If
|
||||
If Pago.CveMonedaPago > 1 Then
|
||||
'Agregamos la Extranjera
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, 92, Pago.Referencia, Concepto, CompraActual.IdCtaContableProv, CveCompra:=Pago.CveCompraAmortizacion, CveCompraAmortizacion:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
||||
@@ -7658,22 +7654,7 @@ Public Class ClsPaginas
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, 92, Pago.Referencia, Concepto, CompraActual.IdCtaContableProv, CveVenta:=Pago.CveCompraAmortizacion, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CveSubProyecto:=CompraActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
||||
End If
|
||||
End If
|
||||
'If Pago.TipoPago = "Egsc" AndAlso Not ErrorMovtos Then ' I N G R E S O S X C O M P R O B A R
|
||||
' Dim Ret As New ConceptosRetenciones
|
||||
' If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
' If ObjConta.GetRetCuenta(66, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContableAcreditable = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero
|
||||
' If Pago.CveMonedaPago > 1 AndAlso ObjConta.GetRetCuenta(207, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContablexAcreditar = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSxAcreditar").ToString.ToEntero
|
||||
' End If
|
||||
' If Pago.CveMonedaPago > 1 Then
|
||||
' 'Agregamos la Extranjera
|
||||
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 92, Pago.Referencia, Concepto, VentaActual.IdCtaContableClienteAnticipo, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
||||
' ImporteMN = (Pago.ImportePago * TCValuacionPago - Pago.ImportePago).RoundSQL
|
||||
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, ImporteMN, 207, Pago.Referencia, Concepto, VentaActual.IdCtaContableClienteAnticipoComplementaria, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
||||
' Else
|
||||
' 'Agregamos Nacional
|
||||
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 92, Pago.Referencia, Concepto, VentaActual.IdCtaContableClienteAnticipoExtranjera, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CveSubProyecto:=VentaActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
||||
' End If
|
||||
'End If
|
||||
|
||||
If Not ErrorMovtos AndAlso TCValuacionCompra <> TCValuacionPago Then
|
||||
Dim ConceptoContable, IdCtaContable As Integer
|
||||
Dim TipoMovimiento As Boolean
|
||||
@@ -7861,6 +7842,71 @@ Public Class ClsPaginas
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
' 1. Proveedores, 11. anticipos proveedores, 15. Notas de crédito de proveedores
|
||||
Public Shared ReadOnly Property ObtenerCveConceptoPrePoliza(CveTipoSaldo As Integer, CveMoneda As Integer, EsAplicacionPago As Boolean, CveTipoProveedor As Integer) As ConceptosTipoSaldo
|
||||
Get
|
||||
Dim Retorno As New ConceptosTipoSaldo
|
||||
If EsAplicacionPago Then
|
||||
Select Case CveTipoSaldo
|
||||
Case 1 ' proveedores/acreedores
|
||||
Select Case CveMoneda
|
||||
Case 1 'pesos
|
||||
Retorno.CveConcepto = If(CveTipoProveedor = 1, 17, 308)
|
||||
Case 2 'dólares
|
||||
Retorno.CveConcepto = If(CveTipoProveedor = 1, 312, 309)
|
||||
Retorno.CveConceptoComplementario = If(CveTipoProveedor = 1, 206, 310)
|
||||
End Select
|
||||
Case 11 ' anticipos
|
||||
Select Case CveMoneda
|
||||
Case 1 'pesos
|
||||
Retorno.CveConcepto = If(CveTipoProveedor = 1, 21, 56)
|
||||
Case 2 'dólares
|
||||
Retorno.CveConcepto = If(CveTipoProveedor = 1, 339, 346)
|
||||
Retorno.CveConceptoComplementario = If(CveTipoProveedor = 1, 266, 340)
|
||||
End Select
|
||||
Case 15 ' notas de crédito
|
||||
Select Case CveMoneda
|
||||
Case 1 'pesos
|
||||
Retorno.CveConcepto = If(CveTipoProveedor = 1, 60, 324)
|
||||
Case 2 'dólares
|
||||
Retorno.CveConcepto = If(CveTipoProveedor = 1, 342, 344)
|
||||
Retorno.CveConceptoComplementario = If(CveTipoProveedor = 1, 235, 235)
|
||||
End Select
|
||||
End Select
|
||||
Else 'cuando es la provisión
|
||||
Select Case CveTipoSaldo
|
||||
Case 1 ' proveedores/acreedores
|
||||
Select Case CveMoneda
|
||||
Case 1 'pesos
|
||||
Retorno.CveConcepto = If(CveTipoProveedor = 1, 5, 305)
|
||||
Case 2 'dólares
|
||||
Retorno.CveConcepto = If(CveTipoProveedor = 1, 311, 306)
|
||||
Retorno.CveConceptoComplementario = If(CveTipoProveedor = 1, 201, 307)
|
||||
End Select
|
||||
Case 11 ' anticipos
|
||||
Select Case CveMoneda
|
||||
Case 1 'pesos
|
||||
Retorno.CveConcepto = If(CveTipoProveedor = 1, 10, 48)
|
||||
Case 2 'dólares
|
||||
Retorno.CveConcepto = If(CveTipoProveedor = 1, 338, 345)
|
||||
Retorno.CveConceptoComplementario = If(CveTipoProveedor = 1, 266, 340)
|
||||
End Select
|
||||
Case 15 ' notas de crédito
|
||||
Select Case CveMoneda
|
||||
Case 1 'pesos
|
||||
Retorno.CveConcepto = If(CveTipoProveedor = 1, 18, 323)
|
||||
Case 2 'dólares
|
||||
Retorno.CveConcepto = If(CveTipoProveedor = 1, 341, 343)
|
||||
Retorno.CveConceptoComplementario = If(CveTipoProveedor = 1, 234, 234)
|
||||
End Select
|
||||
End Select
|
||||
|
||||
End If
|
||||
|
||||
Return Retorno
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Class ConceptosRetenciones
|
||||
Public Property CveConceptoxAcreditar As Integer
|
||||
Public Property CveConceptoAcreditable As Integer
|
||||
@@ -7868,6 +7914,10 @@ Public Class ClsPaginas
|
||||
Public Property IdCtaContableAcreditable As Integer
|
||||
Public Property IdCtaContIVANoAcreditable As Integer
|
||||
End Class
|
||||
Public Class ConceptosTipoSaldo
|
||||
Public Property CveConcepto As Integer
|
||||
Public Property CveConceptoComplementario As Integer
|
||||
End Class
|
||||
#End Region
|
||||
|
||||
#Region "P A G O D E V E N T A S "
|
||||
@@ -8547,8 +8597,8 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Compras/RepEvaluacionesProveedores.aspx".ToUpper(), 754)
|
||||
PaginaDict.Add("/Ventas/RepTopClientesVentas.aspx".ToUpper(), 755)
|
||||
PaginaDict.Add("/OI/Circular.aspx".ToUpper(), 756)
|
||||
PaginaDict.Add("/OI/CircularDetalle.aspx".ToUpper(), 757)
|
||||
PaginaDict.Add("/OI/CircularDetalleB.aspx".ToUpper(), 757)
|
||||
PaginaDict.Add("/OI/CircularDetalle.aspx".ToUpper(), 756)
|
||||
PaginaDict.Add("/OI/CircularDetalleB.aspx".ToUpper(), 756)
|
||||
PaginaDict.Add("/Compras/CatTipoGasto.aspx".ToUpper(), 759)
|
||||
#End Region
|
||||
#Region "Contabilidad"
|
||||
|
||||
@@ -5031,7 +5031,7 @@ Namespace Modelos
|
||||
|
||||
'SI YA ESTA TIMBRADA, NUEVO PROCESO REFACTURACION, ASIGNA LA CANCELACION PENDIENTE
|
||||
'EL ESTATUS REFACTURACION 4 ES PARA LAS QUE NO SE PUDIERON CANCELAR, DEBE OBLIGAR A CANCELAR ANTE EL SAT
|
||||
If EsRefacturacion AndAlso Me.CveEstatusFactura = 3 AndAlso CveMotivoCancelacion > 0 AndAlso CveEstatusRefacturacion <> 4 Then
|
||||
If EsRefacturacion AndAlso Me.CveEstatusFactura.Contiene(2, 3) AndAlso CveMotivoCancelacion > 0 AndAlso CveEstatusRefacturacion <> 4 Then
|
||||
CveEstatusFacturaAsignado = 23
|
||||
End If
|
||||
|
||||
|
||||
@@ -24,8 +24,7 @@ Imports iText.Layout
|
||||
Imports iText.Html2pdf
|
||||
Imports iText.Html2pdf.Resolver.Font
|
||||
Imports iText.Layout.Properties
|
||||
Imports Newtonsoft.Json
|
||||
|
||||
Imports Newtonsoft.Json
|
||||
Namespace Extensiones
|
||||
|
||||
#Region "E X T E N S I O N E S"
|
||||
@@ -1647,20 +1646,32 @@ Namespace Extensiones
|
||||
|
||||
<Runtime.CompilerServices.Extension()>
|
||||
Public Function FBColumn(gv As GridView, name As String) As DataControlField
|
||||
name = name.ToLower
|
||||
For Each col As DataControlField In gv.Columns
|
||||
If TypeOf col Is BoundField Then
|
||||
Dim field As BoundField = CType(col, BoundField)
|
||||
If field.DataField.ToLower = name OrElse field.SortExpression.ToLower = name OrElse field.HeaderText.Trim.ToLower = name Then
|
||||
Return col
|
||||
name = name.ToLower()
|
||||
Dim headerCells As TableCellCollection = Nothing
|
||||
If gv.Columns.Count > 0 Then
|
||||
For i = 0 To gv.Columns.Count - 1 'Si las columnas son autogeneradas, el número de columnas siempre es 0
|
||||
Dim col = gv.Columns(i)
|
||||
If TypeOf col Is BoundField Then
|
||||
Dim field As BoundField = CType(col, BoundField)
|
||||
If field.DataField.ToLower() = name OrElse field.SortExpression.ToLower() = name OrElse field.HeaderText.Trim().ToLower() = name Then
|
||||
Return col
|
||||
End If
|
||||
Continue For
|
||||
ElseIf TypeOf col Is HyperLinkField Then
|
||||
Dim field As HyperLinkField = CType(col, HyperLinkField)
|
||||
If field.DataTextField.ToLower() = name OrElse field.SortExpression.ToLower() = name OrElse field.HeaderText.Trim().ToLower() = name Then
|
||||
Return col
|
||||
End If
|
||||
Continue For
|
||||
End If
|
||||
ElseIf TypeOf col Is HyperLinkField Then
|
||||
Dim field As HyperLinkField = CType(col, HyperLinkField)
|
||||
If field.DataTextField.ToLower = name OrElse field.SortExpression.ToLower = name OrElse field.HeaderText.Trim.ToLower = name Then
|
||||
Return col
|
||||
If headerCells Is Nothing Then headerCells = gv.HeaderRow?.Cells
|
||||
If headerCells IsNot Nothing Then
|
||||
If headerCells(i).Text.Trim().ToLower() = name Then
|
||||
Return col
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
End If
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
|
||||
@@ -196,7 +196,7 @@ Public Class E119 : Implements IHttpHandler
|
||||
TieneError = True
|
||||
End If
|
||||
End Using
|
||||
Dim Msg As String = "Consultado día: " & Fecha.ToShortDateString
|
||||
Dim Msg As String = "Información día " & Fecha.ToShortDateString & If(RespuestaError.message <> "", " Error: " & RespuestaError.message, "")
|
||||
Msg.GuardaLogAD("LogE119")
|
||||
Else
|
||||
RespuestaError.message = "la fecha no es leida correctamente"
|
||||
|
||||
@@ -302,7 +302,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
|
||||
// DATOS PREPOLIZA
|
||||
if (DdlTipoTransaccion.SelectedValue == "1" && UsuarioActual.CveEmpresa != 119) FolioFijo = TxtFolio.Text.ToEntero();
|
||||
|
||||
CvePrePoliza = ObjMov.AddPrePolizas("Bancos/IE PAGO ACRREDORES", CvePlantillaPoliza, TxtImporte.Text.Trim().ToDouble(), TxtImporte.Text.Trim().ToDouble(), CveMonedaPago, TxtFechaDocumento.Text.ToDate(), DdlProveedores.SelectedText.ToString(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo: FolioFijo, ReglaFolioPoliza: ObjComp.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, null, UsuarioActual.CveEmpresa), CveTipoPoliza: ObjMov.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, "-1", UsuarioActual.CveEmpresa));
|
||||
CvePrePoliza = ObjMov.AddPrePolizas("PAGO ACRREDORES", CvePlantillaPoliza, TxtImporte.Text.Trim().ToDouble(), TxtImporte.Text.Trim().ToDouble(), CveMonedaPago, TxtFechaDocumento.Text.ToDate(), DdlProveedores.SelectedText.ToString(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo: FolioFijo, ReglaFolioPoliza: ObjComp.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, null, UsuarioActual.CveEmpresa), CveTipoPoliza: ObjMov.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, "-1", UsuarioActual.CveEmpresa));
|
||||
|
||||
if (CvePrePoliza > 0)
|
||||
{
|
||||
@@ -727,7 +727,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
|
||||
// DATOS PREPOLIZA
|
||||
if ((DdlTipoTransanccionPrestamo.SelectedValue == "1"))
|
||||
FolioFijo = TxtFolioPrestamo.Text.ToEntero();
|
||||
CvePrePoliza = ObjMov.AddPrePolizas("Bancos/IE PRESTAMO ACRREDORES", CvePlantillaPoliza, TxtImportePrestamo.Text.Trim().ToDouble(), TxtImportePrestamo.Text.Trim().ToDouble(), CveMoneda, TxtFechaPrestamo.Text.ToDate(), DdlProveedorPrestamo.SelectedText.ToString(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo: FolioFijo, ReglaFolioPoliza: ObjComp.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, null, UsuarioActual.CveEmpresa), CveTipoPoliza: ObjMov.ObtenerTipoPoliza(DdlTipoTransanccionPrestamo.SelectedValue, "-1", UsuarioActual.CveEmpresa));
|
||||
CvePrePoliza = ObjMov.AddPrePolizas("PRESTAMO ACRREDORES", CvePlantillaPoliza, TxtImportePrestamo.Text.Trim().ToDouble(), TxtImportePrestamo.Text.Trim().ToDouble(), CveMoneda, TxtFechaPrestamo.Text.ToDate(), DdlProveedorPrestamo.SelectedText.ToString(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo: FolioFijo, ReglaFolioPoliza: ObjComp.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, null, UsuarioActual.CveEmpresa), CveTipoPoliza: ObjMov.ObtenerTipoPoliza(DdlTipoTransanccionPrestamo.SelectedValue, "-1", UsuarioActual.CveEmpresa));
|
||||
|
||||
if (CvePrePoliza > 0)
|
||||
{
|
||||
|
||||
@@ -7143,13 +7143,14 @@ Partial Class Compras_Compras
|
||||
|
||||
'PROVISION de NC
|
||||
IdCtaContable = CtaProveedorExtranjera
|
||||
Dim CveCon As Integer = ObtConceptoContableProvisionCompra(CveTipoConcepto, DdlTipoComprobante.SelectedValue, DdlMoneda.SelectedValue.ToEntero, False)
|
||||
Dim ConPreP As ConceptosTipoSaldo = ClsPaginas.ObtenerCveConceptoPrePoliza(15, DdlMoneda.SelectedValue.ToEntero, False, CveTipoConcepto)
|
||||
'Dim CveCon As Integer = ObtConceptoContableProvisionCompra(CveTipoConcepto, DdlTipoComprobante.SelectedValue, DdlMoneda.SelectedValue.ToEntero, False)
|
||||
|
||||
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimiento, Referencia, CveCon, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento, ImporteME:=importeMovimiento, Contabilizable:=SeContabiliza) Then
|
||||
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimiento, Referencia, ConPreP.CveConcepto, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento, ImporteME:=importeMovimiento, Contabilizable:=SeContabiliza) Then
|
||||
IdCtaContable = CtaProveedorComplementaria
|
||||
CveCon = ObtConceptoContableProvisionCompra(CveTipoConcepto, DdlTipoComprobante.SelectedValue, DdlMoneda.SelectedValue.ToEntero, True)
|
||||
'CveCon = ObtConceptoContableProvisionCompra(CveTipoConcepto, DdlTipoComprobante.SelectedValue, DdlMoneda.SelectedValue.ToEntero, True)
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMN - importeMovimiento, Referencia, CveCon, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN - importeMovimiento, ImporteME:=importeMovimiento, Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMN - importeMovimiento, Referencia, ConPreP.CveConceptoComplementario, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN - importeMovimiento, ImporteME:=importeMovimiento, Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit Select
|
||||
End If
|
||||
@@ -7168,7 +7169,7 @@ Partial Class Compras_Compras
|
||||
Dim CveMonedaNC As Integer = If(TipoCambioFactura = 1, 1, 2)
|
||||
|
||||
IdCtaContable = CtaProveedorExtranjera
|
||||
CveCon = ObtConceptoContableProvisionCompra(Gvr.DataKey("CveTipoConcepto").ToEntero, "NC", CveMonedaNC, False)
|
||||
'CveCon = ObtConceptoContableProvisionCompra(Gvr.DataKey("CveTipoConcepto").ToEntero, "NC", CveMonedaNC, False)
|
||||
|
||||
CompraActual.CveCompra = Gvr.DataKey("CveCompra").ToEntero
|
||||
CompraActual.SerieFolio = Gvr.DataKey("SerieFolio")
|
||||
@@ -7241,17 +7242,8 @@ Partial Class Compras_Compras
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Case 21 'Anticipo
|
||||
|
||||
If ArrAnticipos.Count > 0 Then
|
||||
@@ -8677,14 +8669,7 @@ Partial Class Compras_Compras
|
||||
CveIE = gvr.DataKey("CveIE").ToEntero
|
||||
End Select
|
||||
|
||||
PorcentajePago = gvr.FCTextBox("TxtAnticipo").Text.ToDecimal / TxtTotal.Text.ToDecimal
|
||||
|
||||
If CveMonedaAnticipo > 1 Then
|
||||
Dim ImporteAntMN As Decimal = TipoCambioAnt * ImporteAnt - ImporteAnt
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimientoCompra, ImporteAntMN, "", CveConceptoCompraComplementaria, "", TxtFechaPago.Text.ToDate, IdCtaContableComp, -1, CveCompra:=CveCompraNC, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteAntMN, ImporteME:=If(TipoCambioAnt = 1, 0, ImporteAnt), TipoCambio:=TipoCambioAnt, CveSubProyecto:=CveSubProyectoAnticipo) Then
|
||||
ErrorMovtosCxP = 1
|
||||
End If
|
||||
End If
|
||||
'PorcentajePago = gvr.FCTextBox("TxtAnticipo").Text.ToDecimal / TxtTotal.Text.ToDecimal
|
||||
|
||||
Pago.CveIE = CveIE
|
||||
Pago.CveCompraAmortizacion = CveCompraNC
|
||||
@@ -20574,34 +20559,34 @@ Partial Class Compras_Compras
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function ObtConceptoContableProvisionCompra(CveTipoConcepto As Integer, TipoDocto As String, CveMoneda As Integer, Optional EsComplementaria As Boolean = False) As Integer
|
||||
Dim Retorno As Integer = -1
|
||||
'Private Function ObtConceptoContableProvisionCompra(CveTipoConcepto As Integer, TipoDocto As String, CveMoneda As Integer, Optional EsComplementaria As Boolean = False) As Integer
|
||||
' Dim Retorno As Integer = -1
|
||||
|
||||
If CveTipoConcepto = 1 Then ''PROVEEDOR
|
||||
If EsComplementaria Then
|
||||
Retorno = If(TipoDocto = "Fac", 201, 234)
|
||||
Return Retorno
|
||||
End If
|
||||
If CveMoneda = 1 Then
|
||||
Retorno = If(TipoDocto = "Fac", 5, 18)
|
||||
Else
|
||||
Retorno = If(TipoDocto = "Fac", 311, 341)
|
||||
End If
|
||||
Else ''ACREEDOR
|
||||
If EsComplementaria Then
|
||||
Retorno = If(TipoDocto = "Fac", -1, -1)
|
||||
Return Retorno
|
||||
End If
|
||||
If CveMoneda = 1 Then
|
||||
Retorno = If(TipoDocto = "Fac", 305, 323)
|
||||
Else
|
||||
Retorno = If(TipoDocto = "Fac", 306, 309)
|
||||
End If
|
||||
End If
|
||||
' 'If CveTipoConcepto = 1 Then ''PROVEEDOR
|
||||
' If EsComplementaria Then
|
||||
' Retorno = If(TipoDocto = "Fac", 201, 234)
|
||||
' Return Retorno
|
||||
' End If
|
||||
' If CveMoneda = 1 Then
|
||||
' Retorno = If(TipoDocto = "Fac", 5, 18)
|
||||
' Else
|
||||
' Retorno = If(TipoDocto = "Fac", 311, 341)
|
||||
' End If
|
||||
' Else ''ACREEDOR
|
||||
' If EsComplementaria Then
|
||||
' Retorno = If(TipoDocto = "Fac", -1, -1)
|
||||
' Return Retorno
|
||||
' End If
|
||||
' If CveMoneda = 1 Then
|
||||
' Retorno = If(TipoDocto = "Fac", 305, 323)
|
||||
' Else
|
||||
' Retorno = If(TipoDocto = "Fac", 306, 343)
|
||||
' End If
|
||||
' End If
|
||||
|
||||
Return Retorno
|
||||
' Return Retorno
|
||||
|
||||
End Function
|
||||
'End Function
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -158,9 +158,7 @@
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none">
|
||||
<div class="row">
|
||||
<div class="col-md-1" runat="server" id="DivLblProyecto">
|
||||
<asp:Label ID="LblProyecto" runat="server">Proyecto:</asp:Label>
|
||||
</div>
|
||||
<asp:Label ID="LblProyecto" runat="server" class="col-md-1 truncate">Proyecto:</asp:Label>
|
||||
<div class="col-md-2" runat="server" id="DivProyecto">
|
||||
<asp:DropDownList ID="DdlProyecto" CssClass="select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Width="100%"></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
@@ -68,7 +68,7 @@ Partial Class Compras_RepCompras
|
||||
txtFechaI.Text = $"01/01/{Now.Year}"
|
||||
|
||||
'Carga Tipo Centro de Costo
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, Nothing, LblSubProyecto)
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto)
|
||||
|
||||
'CargaProveedores
|
||||
DdlProveedores.setEsWebService(True)
|
||||
|
||||
@@ -197,9 +197,7 @@
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none">
|
||||
<div class="row">
|
||||
<div class="col-md-1" runat="server" id="DivLblProyecto">
|
||||
<asp:Label ID="LblProyecto" runat="server">Proyecto:</asp:Label>
|
||||
</div>
|
||||
<asp:Label ID="LblProyecto" runat="server" class="col-md-1 truncate">Proyecto:</asp:Label>
|
||||
<div class="col-md-2" runat="server" id="DivProyecto">
|
||||
<asp:DropDownList ID="DdlProyecto" CssClass="select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Width="100%"></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
@@ -178,8 +178,8 @@ Partial Class Compras_RepComprasDetalle
|
||||
End Sub
|
||||
Private Sub CargaCombos()
|
||||
|
||||
'Carga Tipo Centro de Costo
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, Nothing, LblSubProyecto)
|
||||
'Carga Tipo Centro de Costo
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto)
|
||||
|
||||
'Carga Tipo de Gasto
|
||||
DdlTipoGasto.DataSource = GlobalDTTiposGastos(UsuarioActual.CveEmpresa)
|
||||
|
||||
@@ -96,9 +96,7 @@
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none">
|
||||
<div class="row">
|
||||
<div class="col-md-1" runat="server" id="DivLblProyecto">
|
||||
<asp:Label ID="LblProyecto" runat="server">Proyecto:</asp:Label>
|
||||
</div>
|
||||
<asp:Label ID="LblProyecto" runat="server" class="col-md-1 truncate">Proyecto:</asp:Label>
|
||||
<div class="col-md-2" runat="server" id="DivProyecto">
|
||||
<asp:DropDownList ID="DdlProyecto" CssClass="select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Width="100%"></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
@@ -51,7 +51,7 @@ Partial Class Compras_RepComprasPeriodo
|
||||
Private Sub CargaCombos()
|
||||
|
||||
'Carga Tipo Centro de Costo
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, Nothing, LblSubProyecto)
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto)
|
||||
|
||||
'Carga Proveedores
|
||||
DdlProveedores.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
||||
|
||||
@@ -227,7 +227,7 @@
|
||||
</div>
|
||||
|
||||
<asp:Label runat="server" class="col-md-1" ID="LblProyecto"></asp:Label>
|
||||
<div class="col-md-1">
|
||||
<div class="col-md-1" runat="server" id="DivProyecto">
|
||||
<asp:DropDownList ID="DdlProyecto" runat="server" CssClass="select2me" DataTextField="Proyecto" DataValueField="CveProyecto" Width="100%" AutoPostBack="true">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
@@ -120,7 +120,7 @@ Partial Class Compras_RepCxP
|
||||
|
||||
'DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
||||
'DdlSubProyecto.DataBind()
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyectofiltro)
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyectofiltro, divProyecto:=DivProyecto)
|
||||
|
||||
DdlProveedoresClasificaciones.DataSource = GlobalDTProveedorClasificacion(UsuarioActual.CveEmpresa)
|
||||
DdlProveedoresClasificaciones.DataBind()
|
||||
|
||||
@@ -114,7 +114,7 @@ Partial Class Compras_RepProductosServicios
|
||||
CargaGrupo()
|
||||
|
||||
'Carga Tipo Centro de Costo
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, Nothing, LblSubProyecto)
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto)
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(590).ToString.ToEntero = 1 Then
|
||||
lblCultivo.Visible = True
|
||||
|
||||
@@ -180,8 +180,8 @@ Partial Class Compras_RepProductosServiciosDetalle
|
||||
|
||||
Private Sub SetValues()
|
||||
|
||||
'Carga Tipo Centro de Costo
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, Nothing, LblSubProyecto)
|
||||
'Carga Tipo Centro de Costo
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto)
|
||||
|
||||
'Carga Tipos de Gasto
|
||||
DdlTipoGasto.DataSource = GlobalDTTiposGastos(UsuarioActual.CveEmpresa)
|
||||
|
||||
@@ -98,9 +98,7 @@
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none">
|
||||
<div class="row">
|
||||
<div class="col-md-1" runat="server" id="DivLblProyecto">
|
||||
<asp:Label ID="LblProyecto" runat="server">Proyecto:</asp:Label>
|
||||
</div>
|
||||
<asp:Label ID="LblProyecto" runat="server" class="col-md-1 truncate">Proyecto:</asp:Label>
|
||||
<div class="col-md-2" runat="server" id="DivProyecto">
|
||||
<asp:DropDownList ID="DdlProyecto" CssClass="select2me" runat="server" OnSelectedIndexChanged="DdlProyecto_SelectedIndexChanged" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Width="100%"></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
@@ -61,7 +61,7 @@ public partial class Compras_RepProductosServiciosPeriodo : ClsPaginas
|
||||
DdlGrupo.Items.Insert(7, new ListItem("Proveedor", "10"));
|
||||
DdlGrupo.Items.Insert(8, new ListItem("Usuario", "11"));
|
||||
DdlGrupo.Items.Insert(9, new ListItem("Estatus Fact.", "12"));
|
||||
DdlGrupo.DataBind();
|
||||
DdlGrupo.DataBind();
|
||||
DdlGrupo.SelectedValueExist("8");
|
||||
}
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ Partial Class MovimientosconProveedores
|
||||
End Property
|
||||
Private Property CveSubProyecto As Integer
|
||||
Get
|
||||
CveSubProyecto = ViewState("CveSubProyecto").ToString
|
||||
CveSubProyecto = ViewState("CveSubProyecto").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveSubProyecto") = value
|
||||
|
||||
@@ -116,10 +116,8 @@
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>--%>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 truncate">
|
||||
Sucursal:
|
||||
</div>
|
||||
|
||||
<asp:Label runat="server" ID="LblSubProyecto" CssClass="col-md-1">SubProyecto:</asp:Label>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-small input-sm select2me" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
@@ -352,17 +350,17 @@
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate" title="Tipo Cliente:" data-toggle="tooltip" data-placement="top">
|
||||
<div class="col-md-1 truncate" title="Tipo Cliente:" data-toggle="tooltip" data-placement="top" id="divLineaAdicional1" runat="server" visible="false">
|
||||
Linea Adicional:
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="col-md-2" id="divLineaAdicional2" runat="server" visible="false">
|
||||
<asp:DropDownList ID="DdlTieneLineaAdicional" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Solo lineas adicionales" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Sin lineas adicionales" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate" title="Tipo Cliente:" data-toggle="tooltip" data-placement="top">
|
||||
<div class="col-md-1 truncate" title="Contrato:" data-toggle="tooltip" data-placement="top" id="divContrato1" visible="false" runat="server" >
|
||||
Contrato:
|
||||
</div>
|
||||
<div class="col-md-2" runat="server" id="divContrato" visible="false" >
|
||||
|
||||
@@ -112,15 +112,12 @@ Partial Class RepCxC
|
||||
Else
|
||||
DdlClientesWS.setEsWebService(False)
|
||||
CargaClientes()
|
||||
End If
|
||||
'DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
|
||||
'DdlClientes.DataBind()
|
||||
|
||||
'CargaSubProyectos
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
||||
DdlSubProyecto.DataBind()
|
||||
|
||||
'Carga Vendedor
|
||||
End If
|
||||
|
||||
'CargaSubProyectos
|
||||
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto)
|
||||
|
||||
'Carga Vendedor
|
||||
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa)
|
||||
DdlVendedor.DataBind()
|
||||
DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor)
|
||||
@@ -151,19 +148,12 @@ Partial Class RepCxC
|
||||
'Carga Clasificacion Cliente
|
||||
DdlClienteClasificacion.DataSource = GlobalDTClienteClasificaciones(UsuarioActual.CveEmpresa)
|
||||
DdlClienteClasificacion.DataBind()
|
||||
DdlClienteClasificacion.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
'Dim ObjSisUsuarios As New ClsSisUsuarios()
|
||||
|
||||
'If ObjSisUsuarios.GetEmpresasUsuario(UsuarioActual.CveUsuario) Then
|
||||
' DdlEmpresas.DataSource = ObjSisUsuarios.DtResultados
|
||||
' DdlEmpresas.DataBind()
|
||||
' DivEmpresasFiltro.Visible = True
|
||||
' For i As Integer = 0 To DdlEmpresas.Items.Count - 1
|
||||
' DdlEmpresas.Items(i).Selected = True
|
||||
' Next
|
||||
'End If
|
||||
'ObjSisUsuarios.Dispose()
|
||||
DdlClienteClasificacion.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
If UsuarioActual.CveEmpresa = 119 Then
|
||||
divLineaAdicional1.Visible = True
|
||||
divLineaAdicional2.Visible = True
|
||||
End If
|
||||
If UsuarioActual.CveEmpresa = 13 Then
|
||||
CargaContratos()
|
||||
End If
|
||||
@@ -176,6 +166,7 @@ Partial Class RepCxC
|
||||
DdlContrato.DataSource = ObjContratos.DtResultados
|
||||
End If
|
||||
divContrato.Visible = True
|
||||
divContrato1.visible = True
|
||||
ObjContratos.Dispose()
|
||||
DdlContrato.DataBind()
|
||||
|
||||
|
||||
@@ -334,20 +334,19 @@
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate" title="Tipo Cliente:" data-toggle="tooltip" data-placement="top">
|
||||
<div class="col-md-1 truncate" title="Tipo Cliente:" data-toggle="tooltip" data-placement="top" id="divLineaAdicional1" runat="server" visible="false">
|
||||
Linea Adicional:
|
||||
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlTieneLineaAdicional" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Solo lineas adicionales" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Sin lineas adicionales" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate" title="Tipo Cliente:" data-toggle="tooltip" data-placement="top">
|
||||
Contrato:
|
||||
</div>
|
||||
<div class="col-md-2" id="divLineaAdicional2" runat="server" visible="false">
|
||||
<asp:DropDownList ID="DdlTieneLineaAdicional" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Solo lineas adicionales" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Sin lineas adicionales" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate" title="Contrato:" data-toggle="tooltip" data-placement="top" id="divContrato1" visible="false" runat="server" >
|
||||
Contrato:
|
||||
</div>
|
||||
<div class="col-md-2" runat="server" id="divContrato" visible="false" >
|
||||
<asp:DropDownList ID="DdlContrato" runat="server" AppendDataBoundItems="true" DataTextField="TituloInfo" DataValueField="CveContrato" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
|
||||
@@ -247,13 +247,9 @@ Partial Class RepCxCDetalle
|
||||
#Region "CARGAS"
|
||||
Private Sub CargaCombos()
|
||||
Dim CveCliente, CveVendedor, CveUsuario, CveSubProyecto,
|
||||
CveEstatus, CveResponsable, CveAgrupador, CveClienteClasificacion As Integer
|
||||
|
||||
'CargaClientes
|
||||
'CargaClientes
|
||||
'txtFechaI.Text = Now.AddMonths(-12).FirstDayOfMonth.ToShortDateString
|
||||
txtFechaF.Text = Now.LastDayOfMonth.ToShortDateString
|
||||
CveEstatus, CveResponsable, CveAgrupador, CveClienteClasificacion As Integer
|
||||
|
||||
txtFechaF.Text = Now.LastDayOfMonth.ToShortDateString
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
|
||||
DdlClientesWS.setEsWebService(True)
|
||||
@@ -427,6 +423,10 @@ Partial Class RepCxCDetalle
|
||||
If UsuarioActual.CveEmpresa.Contiene(72, 80, 146, 119) Then ChkAnticipos.Visible = True
|
||||
|
||||
DdlTieneLineaAdicional.SelectedValueExist(If(Request("TieneLineaAdicional") IsNot Nothing, Request("TieneLineaAdicional").ToString, "-1").ToString)
|
||||
If UsuarioActual.CveEmpresa = 119 Then
|
||||
divLineaAdicional1.Visible = True
|
||||
divLineaAdicional2.Visible = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa = 13 Then
|
||||
CargaContratos()
|
||||
@@ -438,8 +438,9 @@ Partial Class RepCxCDetalle
|
||||
Dim ObjContratos As New ClsContratos
|
||||
If ObjContratos.GetContratos(-1, UsuarioActual.CveEmpresa, CveCliente:=-1) Then
|
||||
DdlContrato.DataSource = ObjContratos.DtResultados
|
||||
End If
|
||||
divContrato.Visible = True
|
||||
End If
|
||||
divContrato.Visible = True
|
||||
divContrato1.Visible = True
|
||||
ObjContratos.Dispose()
|
||||
DdlContrato.DataBind()
|
||||
|
||||
|
||||
@@ -1044,6 +1044,7 @@
|
||||
</Tablix>
|
||||
<Textbox Name="Textbox1">
|
||||
<CanGrow>true</CanGrow>
|
||||
<CanShrink>true</CanShrink>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
@@ -1060,9 +1061,9 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||
<Top>7.70772cm</Top>
|
||||
<Left>14.63922cm</Left>
|
||||
<Height>0.54708cm</Height>
|
||||
<Top>8.26648cm</Top>
|
||||
<Left>14.6392cm</Left>
|
||||
<Height>0.34478cm</Height>
|
||||
<Width>5.65062cm</Width>
|
||||
<ZIndex>5</ZIndex>
|
||||
<Style>
|
||||
@@ -1084,7 +1085,7 @@
|
||||
</TablixColumns>
|
||||
<TablixRows>
|
||||
<TablixRow>
|
||||
<Height>0.27059cm</Height>
|
||||
<Height>0.5841cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
@@ -1126,7 +1127,7 @@
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
<TablixRow>
|
||||
<Height>0.38492cm</Height>
|
||||
<Height>0.66667cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
@@ -1261,9 +1262,9 @@
|
||||
</TablixMembers>
|
||||
</TablixRowHierarchy>
|
||||
<DataSetName>DataSet1</DataSetName>
|
||||
<Top>7.14272cm</Top>
|
||||
<Top>7.01572cm</Top>
|
||||
<Left>14.60707cm</Left>
|
||||
<Height>0.65551cm</Height>
|
||||
<Height>1.25076cm</Height>
|
||||
<Width>5.68277cm</Width>
|
||||
<ZIndex>6</ZIndex>
|
||||
<Style>
|
||||
@@ -2036,7 +2037,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox19</rd:DefaultName>
|
||||
<Top>2.77039in</Top>
|
||||
<Top>2.72039in</Top>
|
||||
<Left>0.19628cm</Left>
|
||||
<Height>0.17324in</Height>
|
||||
<Width>1.7828in</Width>
|
||||
@@ -2080,7 +2081,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox3</rd:DefaultName>
|
||||
<Top>7.03678cm</Top>
|
||||
<Top>6.90978cm</Top>
|
||||
<Left>4.83044cm</Left>
|
||||
<Height>0.44003cm</Height>
|
||||
<Width>9.60024cm</Width>
|
||||
@@ -2112,7 +2113,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox19</rd:DefaultName>
|
||||
<Top>2.93113in</Top>
|
||||
<Top>2.88113in</Top>
|
||||
<Left>1.15271in</Left>
|
||||
<Height>0.44842cm</Height>
|
||||
<Width>4.52866in</Width>
|
||||
@@ -2157,7 +2158,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox2</rd:DefaultName>
|
||||
<Top>7.44506cm</Top>
|
||||
<Top>7.31806cm</Top>
|
||||
<Left>0.21985cm</Left>
|
||||
<Height>0.44842cm</Height>
|
||||
<Width>2.5581cm</Width>
|
||||
@@ -2172,301 +2173,6 @@
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Image Name="QRCode">
|
||||
<Source>External</Source>
|
||||
<Value>=Parameters!QR.Value</Value>
|
||||
<Sizing>FitProportional</Sizing>
|
||||
<Top>3.05943in</Top>
|
||||
<Left>0.13977in</Left>
|
||||
<Height>0.68104in</Height>
|
||||
<Width>0.78032in</Width>
|
||||
<ZIndex>30</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
</Style>
|
||||
</Image>
|
||||
<Textbox Name="Textbox63">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Serie del Certificado del Emisor</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
<Color>SteelBlue</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox2</rd:DefaultName>
|
||||
<Top>7.89591cm</Top>
|
||||
<Left>3.36322cm</Left>
|
||||
<Height>0.35889cm</Height>
|
||||
<Width>4.93935cm</Width>
|
||||
<ZIndex>31</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox64">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Folio Fiscal</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
<Color>SteelBlue</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox2</rd:DefaultName>
|
||||
<Top>8.29008cm</Top>
|
||||
<Left>3.36322cm</Left>
|
||||
<Height>0.40122cm</Height>
|
||||
<Width>4.93935cm</Width>
|
||||
<ZIndex>32</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox68">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>No. de Serie del Certificado de l SAT</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
<Color>SteelBlue</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox2</rd:DefaultName>
|
||||
<Top>8.72658cm</Top>
|
||||
<Left>3.36322cm</Left>
|
||||
<Height>0.3536cm</Height>
|
||||
<Width>4.93935cm</Width>
|
||||
<ZIndex>33</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox69">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Fecha y Hora de Certificación</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
<Color>SteelBlue</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox2</rd:DefaultName>
|
||||
<Top>9.12251cm</Top>
|
||||
<Left>3.36322cm</Left>
|
||||
<Height>0.31479cm</Height>
|
||||
<Width>4.93935cm</Width>
|
||||
<ZIndex>34</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox70">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!CertificadoContribuyente.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Left</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox2</rd:DefaultName>
|
||||
<Top>7.89591cm</Top>
|
||||
<Left>8.37312cm</Left>
|
||||
<Height>0.35889cm</Height>
|
||||
<Width>5.62289cm</Width>
|
||||
<ZIndex>35</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox76">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!FolioFiscal.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Left</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox2</rd:DefaultName>
|
||||
<Top>8.29008cm</Top>
|
||||
<Left>8.37312cm</Left>
|
||||
<Height>0.40122cm</Height>
|
||||
<Width>5.62289cm</Width>
|
||||
<ZIndex>36</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox77">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!SerieCertificadoSAT.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Left</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox2</rd:DefaultName>
|
||||
<Top>8.72658cm</Top>
|
||||
<Left>8.37312cm</Left>
|
||||
<Height>0.3536cm</Height>
|
||||
<Width>5.62289cm</Width>
|
||||
<ZIndex>37</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox96">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!FechaCertificacion.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Left</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox2</rd:DefaultName>
|
||||
<Top>9.12251cm</Top>
|
||||
<Left>8.37312cm</Left>
|
||||
<Height>0.31479cm</Height>
|
||||
<Width>5.62289cm</Width>
|
||||
<ZIndex>38</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox97">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
@@ -2494,11 +2200,11 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox19</rd:DefaultName>
|
||||
<Top>3.26381in</Top>
|
||||
<Top>3.39026in</Top>
|
||||
<Left>14.1724cm</Left>
|
||||
<Height>0.47666in</Height>
|
||||
<Height>0.13921in</Height>
|
||||
<Width>2.40844in</Width>
|
||||
<ZIndex>39</ZIndex>
|
||||
<ZIndex>30</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>#4f81bd</Color>
|
||||
@@ -2537,11 +2243,11 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox19</rd:DefaultName>
|
||||
<Top>3.91485in</Top>
|
||||
<Left>0.10881in</Left>
|
||||
<Top>3.93517in</Top>
|
||||
<Left>0.06298in</Left>
|
||||
<Height>0.15694in</Height>
|
||||
<Width>7.87931in</Width>
|
||||
<ZIndex>40</ZIndex>
|
||||
<ZIndex>31</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>White</Color>
|
||||
@@ -2582,11 +2288,11 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox2</rd:DefaultName>
|
||||
<Top>9.55881cm</Top>
|
||||
<Left>0.25897cm</Left>
|
||||
<Top>9.67392cm</Top>
|
||||
<Left>0.14256cm</Left>
|
||||
<Height>0.44842cm</Height>
|
||||
<Width>8.89387cm</Width>
|
||||
<ZIndex>41</ZIndex>
|
||||
<ZIndex>32</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -2615,11 +2321,11 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox19</rd:DefaultName>
|
||||
<Top>4.24278in</Top>
|
||||
<Left>0.10195in</Left>
|
||||
<Top>4.2506in</Top>
|
||||
<Left>0.05612in</Left>
|
||||
<Height>0.1296in</Height>
|
||||
<Width>7.86825in</Width>
|
||||
<ZIndex>42</ZIndex>
|
||||
<ZIndex>33</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>White</Color>
|
||||
@@ -2660,11 +2366,11 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox2</rd:DefaultName>
|
||||
<Top>10.4235cm</Top>
|
||||
<Left>0.25897cm</Left>
|
||||
<Top>10.44336cm</Top>
|
||||
<Left>0.14256cm</Left>
|
||||
<Height>0.33552cm</Height>
|
||||
<Width>8.89387cm</Width>
|
||||
<ZIndex>43</ZIndex>
|
||||
<ZIndex>34</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -2693,11 +2399,11 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox19</rd:DefaultName>
|
||||
<Top>4.55448in</Top>
|
||||
<Left>0.09839in</Left>
|
||||
<Top>4.5498in</Top>
|
||||
<Left>0.05256in</Left>
|
||||
<Height>0.11805in</Height>
|
||||
<Width>7.86825in</Width>
|
||||
<ZIndex>44</ZIndex>
|
||||
<ZIndex>35</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>White</Color>
|
||||
@@ -2738,11 +2444,11 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox2</rd:DefaultName>
|
||||
<Top>11.157cm</Top>
|
||||
<Left>0.20606cm</Left>
|
||||
<Top>11.17686cm</Top>
|
||||
<Left>0.15998cm</Left>
|
||||
<Height>0.34259cm</Height>
|
||||
<Width>8.89387cm</Width>
|
||||
<ZIndex>45</ZIndex>
|
||||
<Width>8.82354cm</Width>
|
||||
<ZIndex>36</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -3204,10 +2910,10 @@
|
||||
</Tablix>
|
||||
</ReportItems>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Top>12.06599cm</Top>
|
||||
<Top>11.9011cm</Top>
|
||||
<Height>1.93497cm</Height>
|
||||
<Width>20.28984cm</Width>
|
||||
<ZIndex>46</ZIndex>
|
||||
<ZIndex>37</ZIndex>
|
||||
<Visibility>
|
||||
<Hidden>=Microsoft.VisualBasic.Interaction.IIF(First(Fields!SerieFolio.Value, "DataSet4") <> "", False, True)</Hidden>
|
||||
</Visibility>
|
||||
@@ -3378,10 +3084,10 @@
|
||||
</Subreport>
|
||||
</ReportItems>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Top>5.71625cm</Top>
|
||||
<Top>5.65275cm</Top>
|
||||
<Height>1.2341cm</Height>
|
||||
<Width>20.2229cm</Width>
|
||||
<ZIndex>47</ZIndex>
|
||||
<ZIndex>38</ZIndex>
|
||||
<Visibility>
|
||||
<Hidden>= Not iif(IsNothing(Parameters!TieneCartaPorte), True, iif(Parameters!TieneCartaPorte.Value , True, False))</Hidden>
|
||||
</Visibility>
|
||||
@@ -3416,7 +3122,7 @@
|
||||
<Left>10.5005cm</Left>
|
||||
<Height>0.17222in</Height>
|
||||
<Width>0.82757in</Width>
|
||||
<ZIndex>48</ZIndex>
|
||||
<ZIndex>39</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>#4f81bd</Color>
|
||||
@@ -3458,7 +3164,7 @@
|
||||
<Left>4.96163in</Left>
|
||||
<Height>0.17083in</Height>
|
||||
<Width>3.00857in</Width>
|
||||
<ZIndex>49</ZIndex>
|
||||
<ZIndex>40</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>White</Color>
|
||||
@@ -3479,14 +3185,323 @@
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Rectangle Name="Rectangle1">
|
||||
<ReportItems>
|
||||
<Image Name="QRCode">
|
||||
<Source>External</Source>
|
||||
<Value>=Parameters!QR.Value</Value>
|
||||
<Sizing>FitProportional</Sizing>
|
||||
<Top>0.06848in</Top>
|
||||
<Left>0.0372in</Left>
|
||||
<Height>0.51336in</Height>
|
||||
<Width>0.79074in</Width>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
</Style>
|
||||
</Image>
|
||||
<Textbox Name="Textbox63">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Serie del Certificado del Emisor</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
<Color>SteelBlue</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox2</rd:DefaultName>
|
||||
<Top>0cm</Top>
|
||||
<Left>3.1027cm</Left>
|
||||
<Height>0.35889cm</Height>
|
||||
<Width>4.93935cm</Width>
|
||||
<ZIndex>1</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox64">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Folio Fiscal</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
<Color>SteelBlue</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox2</rd:DefaultName>
|
||||
<Top>0.39417cm</Top>
|
||||
<Left>3.1027cm</Left>
|
||||
<Height>0.29539cm</Height>
|
||||
<Width>4.93935cm</Width>
|
||||
<ZIndex>2</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox68">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>No. de Serie del Certificado de l SAT</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
<Color>SteelBlue</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox2</rd:DefaultName>
|
||||
<Top>0.76717cm</Top>
|
||||
<Left>3.1027cm</Left>
|
||||
<Height>0.3536cm</Height>
|
||||
<Width>4.93935cm</Width>
|
||||
<ZIndex>3</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox69">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Fecha y Hora de Certificación</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
<Color>SteelBlue</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox2</rd:DefaultName>
|
||||
<Top>1.1631cm</Top>
|
||||
<Left>3.1027cm</Left>
|
||||
<Height>0.31479cm</Height>
|
||||
<Width>4.93935cm</Width>
|
||||
<ZIndex>4</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox70">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!CertificadoContribuyente.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Left</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox2</rd:DefaultName>
|
||||
<Top>0cm</Top>
|
||||
<Left>8.1126cm</Left>
|
||||
<Height>0.35889cm</Height>
|
||||
<Width>5.62289cm</Width>
|
||||
<ZIndex>5</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox76">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!FolioFiscal.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Left</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox2</rd:DefaultName>
|
||||
<Top>0.39417cm</Top>
|
||||
<Left>8.1126cm</Left>
|
||||
<Height>0.33067cm</Height>
|
||||
<Width>5.62289cm</Width>
|
||||
<ZIndex>6</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox77">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!SerieCertificadoSAT.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Left</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox2</rd:DefaultName>
|
||||
<Top>0.76717cm</Top>
|
||||
<Left>8.1126cm</Left>
|
||||
<Height>0.3536cm</Height>
|
||||
<Width>5.62289cm</Width>
|
||||
<ZIndex>7</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox96">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!FechaCertificacion.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Left</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox2</rd:DefaultName>
|
||||
<Top>1.1631cm</Top>
|
||||
<Left>8.1126cm</Left>
|
||||
<Height>0.31479cm</Height>
|
||||
<Width>5.62289cm</Width>
|
||||
<ZIndex>8</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</ReportItems>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Top>7.84409cm</Top>
|
||||
<Left>0.19628cm</Left>
|
||||
<Height>1.6525cm</Height>
|
||||
<Width>13.9708cm</Width>
|
||||
<ZIndex>41</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
</Style>
|
||||
</Rectangle>
|
||||
</ReportItems>
|
||||
<Height>14.00096cm</Height>
|
||||
<Height>13.83608cm</Height>
|
||||
<Style />
|
||||
</Body>
|
||||
<Width>20.42213cm</Width>
|
||||
<Width>20.46091cm</Width>
|
||||
<Page>
|
||||
<PageFooter>
|
||||
<Height>0.64232cm</Height>
|
||||
<Height>0.43065cm</Height>
|
||||
<PrintOnFirstPage>true</PrintOnFirstPage>
|
||||
<PrintOnLastPage>true</PrintOnLastPage>
|
||||
<ReportItems>
|
||||
@@ -3511,8 +3526,8 @@
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox3</rd:DefaultName>
|
||||
<Top>0.04232cm</Top>
|
||||
<Left>16.75749cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Left>16.6252cm</Left>
|
||||
<Height>0.30896cm</Height>
|
||||
<Width>3.66464cm</Width>
|
||||
<Style>
|
||||
<Border>
|
||||
@@ -3554,9 +3569,9 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox8</rd:DefaultName>
|
||||
<Top>0.10582cm</Top>
|
||||
<Left>0.91139cm</Left>
|
||||
<Height>0.46771cm</Height>
|
||||
<Top>0.03881cm</Top>
|
||||
<Left>0.35502cm</Left>
|
||||
<Height>0.31247cm</Height>
|
||||
<Width>6.86562cm</Width>
|
||||
<ZIndex>1</ZIndex>
|
||||
<Style>
|
||||
|
||||
@@ -156,7 +156,7 @@ Partial Class Nomina_ReportePTU
|
||||
If Not IsNothing(rowc) Then
|
||||
CveConcepto = rowc("CveConcepto").ToString().ToEntero()
|
||||
Else
|
||||
CveConcepto = objNomina.AddConcepto("PTU", "Utilidades", "P", "", True, True, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, -1, -1, -1, 0, -1, 0, 0, 0, 0, 0)
|
||||
CveConcepto = objNomina.AddConcepto("PTU", "Utilidades", "P", "", True, True, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, -1, -1, -1, 0, -1, 0, 0, 0, 0, 0, -1, 1, -1, -1, -1, -1)
|
||||
End If
|
||||
If CveConcepto < 1 Then
|
||||
continuar = False
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
<Columns>
|
||||
<asp:HyperLinkField HeaderText="Asunto" DataTextField="Asunto" DataNavigateUrlFields="CveCircular" DataNavigateUrlFormatString="/OI/CircularDetalleB.aspx?CveCircular={0}" />
|
||||
<asp:HyperLinkField HeaderText="Usuario" DataTextField="Usuario" DataNavigateUrlFields="CveCircular" DataNavigateUrlFormatString="/OI/CircularDetalleB.aspx?CveCircular={0}" />
|
||||
<asp:HyperLinkField HeaderText="Fecha Ing." DataTextField="FechaIng" DataNavigateUrlFields="CveCircular" DataNavigateUrlFormatString="/OI/CircularDetalleB.aspx?CveCircular={0}" ItemStyle-Width="250px" />
|
||||
<asp:HyperLinkField HeaderText="Fecha Ing." DataTextField="FechaIng" DataTextFormatString="{0:d}" DataNavigateUrlFields="CveCircular" DataNavigateUrlFormatString="/OI/CircularDetalleB.aspx?CveCircular={0}" ItemStyle-Width="250px" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
|
||||
@@ -234,7 +234,7 @@
|
||||
<div class="col-md-12">
|
||||
|
||||
|
||||
<asp:GridView ID="GVUsuarios" runat="server" AutoGenerateColumns="false" DataKeyNames="Nombre,Correo,Empresa,CveRol,CveSubProyecto"
|
||||
<asp:GridView ID="GVUsuarios" runat="server" AutoGenerateColumns="false" DataKeyNames="Nombre,Correo,Empresa,CveRol,CveSubProyecto,CveClasificacion"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD GVUsuarios" GridLines="None" data-height="200"
|
||||
OnRowDataBound="GVUsuarios_RowDataBound">
|
||||
<Columns>
|
||||
@@ -247,18 +247,11 @@
|
||||
<asp:CheckBox ID="ChkOk" CssClass="ChkOk" Checked="false" runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate></HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlNombre" runat="server" Text='<%# Eval("Nombre") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Rol</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlRol" runat="server" Text='<%# Eval("Rol") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="Nombre" HeaderText="Nombre" />
|
||||
<asp:BoundField DataField="Rol" HeaderText="Rol" />
|
||||
<asp:BoundField DataField="CveRol" HeaderText="CveRol" HeaderStyle-CssClass="hidden" ItemStyle-CssClass="hidden" />
|
||||
<asp:BoundField DataField="CveSubProyecto" HeaderText="CveSubProyecto" HeaderStyle-CssClass="hidden" ItemStyle-CssClass="hidden" />
|
||||
<asp:BoundField DataField="CveClasificacion" HeaderText="CveClasificacion" HeaderStyle-CssClass="hidden" ItemStyle-CssClass="hidden" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
@@ -348,13 +341,15 @@
|
||||
//}
|
||||
function filtrarx() {
|
||||
//console.log('Entre 3')
|
||||
//var filtro = sotext($("div[id^='C_DVModalFiltros'] select:first").attr("id"));
|
||||
//console.log(filtro)
|
||||
FiltrarTablaStrMulti('<%=GVUsuarios.ClientID %>', null, sotext('<%=DdlRoles.ClientID %>'), $('#TxtBusquedaCorreos').val());
|
||||
var filtros = $("div[id^='C_DVModalFiltros'] select").map(function () {
|
||||
return soval(this.id);
|
||||
}).get();
|
||||
//console.log(filtros)
|
||||
FiltrarTablaStrMulti('<%=GVUsuarios.ClientID %>', null, $('#TxtBusquedaCorreos').val(), ...filtros);
|
||||
}
|
||||
function ADSBegin() {
|
||||
// loadeventos();
|
||||
// showhideUser()
|
||||
// showhideUser();
|
||||
}
|
||||
//inicializa tablas select2me etc etc.....
|
||||
function ADSReady() {
|
||||
|
||||
@@ -157,39 +157,37 @@ public partial class OI_CircularDetalleB : ClsPaginas
|
||||
DVModalFiltrosProveedores.Visible = false;
|
||||
DVModalFiltrosPersonal.Visible = false;
|
||||
DVModalFiltrosCliente.Visible = false;
|
||||
GVUsuarios.FBColumn("Rol").Visible = false;
|
||||
|
||||
switch (RLBTipoEnvioTipo.SelectedValue.ToEntero())
|
||||
|
||||
switch (RLBTipoEnvioTipo.SelectedValue.ToEntero())
|
||||
{
|
||||
case 1:
|
||||
DVModalFiltrosUsuarios.Visible = true;
|
||||
GVUsuarios.Columns[2].Visible = true;
|
||||
GVUsuarios.FBColumn("Rol").Visible = true;
|
||||
intTipoConsulta = 1;
|
||||
break;
|
||||
case 2:
|
||||
DVModalFiltrosProveedores.Visible = true;
|
||||
GVUsuarios.Columns[2].Visible = false;
|
||||
intTipoConsulta = 2;
|
||||
break;
|
||||
case 3:
|
||||
DVModalFiltrosPersonal.Visible = true;
|
||||
GVUsuarios.Columns[2].Visible = false;
|
||||
intTipoConsulta = 3;
|
||||
break;
|
||||
case 4:
|
||||
DVModalFiltrosCliente.Visible = true;
|
||||
GVUsuarios.Columns[2].Visible = false;
|
||||
intTipoConsulta = 4;
|
||||
break;
|
||||
default:
|
||||
DVModalFiltrosUsuarios.Visible = true;
|
||||
GVUsuarios.Columns[2].Visible = true;
|
||||
GVUsuarios.FBColumn("Rol").Visible = true;
|
||||
intTipoConsulta = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
ClsOIEventos ObjOI = new ClsOIEventos();
|
||||
|
||||
if (ObjOI.GetCircularCorreos(intTipoConsulta, UsuarioActual.CveEmpresa, -1, DdlSubProyecto.SelectedValue.ToEntero(), DdlCveClasificacionProveedor.SelectedValue.ToEntero(), DdlSubProyectoPersonal.SelectedValue.ToEntero(), DdlClasificacion.SelectedValue.ToEntero()))
|
||||
if (ObjOI.GetCircularCorreos(intTipoConsulta, UsuarioActual.CveEmpresa, -1, -1, -1, -1, -1))
|
||||
{
|
||||
|
||||
if (ObjOI.DtResultados.Rows.Count >= 1000)
|
||||
@@ -220,7 +218,7 @@ public partial class OI_CircularDetalleB : ClsPaginas
|
||||
|
||||
ObjOI.Dispose();
|
||||
GVUsuarios.DataBind();
|
||||
UpModalSeleccionCorreos.Update();
|
||||
UpModalSeleccionCorreos.Update();
|
||||
}
|
||||
|
||||
protected void GVUsuarios_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
@@ -527,22 +525,22 @@ public partial class OI_CircularDetalleB : ClsPaginas
|
||||
|
||||
protected void DdlSubProyecto_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
ConsultaCorreos();
|
||||
//ConsultaCorreos();
|
||||
}
|
||||
|
||||
protected void DdlCveClasificacionProveedor_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
ConsultaCorreos();
|
||||
//ConsultaCorreos();
|
||||
}
|
||||
|
||||
protected void DdlSubProyectoPersonal_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
ConsultaCorreos();
|
||||
//ConsultaCorreos();
|
||||
}
|
||||
|
||||
protected void DdlClasificacion_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
ConsultaCorreos();
|
||||
//ConsultaCorreos();
|
||||
}
|
||||
|
||||
protected void LnlActualizarCorreos_Click(object sender, EventArgs e)
|
||||
|
||||
@@ -34,7 +34,7 @@ Partial Class Prospectos_CatProspectos
|
||||
DdlClasificacion.DataSource = GlobalDTProspectosClasificaciones(UsuarioActual.CveEmpresa) : DdlClasificacion.DataBind()
|
||||
DdlZona.DataSource = GlobalDTProspectosSupervisores(UsuarioActual.CveEmpresa) : DdlZona.DataBind()
|
||||
DdlRegion.DataSource = GlobalDTProspectosCoordinadores(DdlZona.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) : DdlRegion.DataBind()
|
||||
DdlMunicipioFiltro.DataSource = GlobalDTGralMunicipios(26) : DdlMunicipioFiltro.DataBind()
|
||||
DdlMunicipioFiltro.DataSource = GlobalDTGralMunicipios("26") : DdlMunicipioFiltro.DataBind()
|
||||
|
||||
CargaDatos(True)
|
||||
ImgPersonalizar.Attributes.Add("onclick", "$('#DivPersonalizar').show(1000); PosicionaObjeto(this.id,'DivPersonalizar');")
|
||||
|
||||
@@ -197,11 +197,11 @@ Partial Class Prospectos_ProspectoExpediente
|
||||
End Sub
|
||||
|
||||
Private Sub CargaEstados(ddl As DropDownList, CvePais As Integer)
|
||||
ddl.DataSource = GlobalDTGralEstados(CvePais) : ddl.DataBind()
|
||||
ddl.DataSource = GlobalDTGralEstados("-1", CvePais) : ddl.DataBind()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaMunicipios(ddl As DropDownList, CveEstado As Integer)
|
||||
ddl.DataSource = GlobalDTGralMunicipios(CveEstado) : ddl.DataBind()
|
||||
ddl.DataSource = GlobalDTGralMunicipios("-1", CveEstado) : ddl.DataBind()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As System.EventArgs) Handles BtnGuardar.Click
|
||||
|
||||
@@ -153,11 +153,11 @@ Partial Class Prospectos_ProspectosG15
|
||||
|
||||
|
||||
Private Sub CargaEstados(ddl As DropDownList, CvePais As Integer)
|
||||
ddl.DataSource = GlobalDTGralEstados(CvePais) : ddl.DataBind()
|
||||
ddl.DataSource = GlobalDTGralEstados("-1", CvePais) : ddl.DataBind()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaMunicipios(ddl As DropDownList, CveEstado As Integer)
|
||||
ddl.DataSource = GlobalDTGralMunicipios(CveEstado) : ddl.DataBind()
|
||||
ddl.DataSource = GlobalDTGralMunicipios("-1", CveEstado) : ddl.DataBind()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCoordinadores(ddl As DropDownList, CveSupervisor As Integer)
|
||||
|
||||
@@ -137,11 +137,11 @@ Partial Class Prospectos_ProspectosSIP
|
||||
End Sub
|
||||
|
||||
Private Sub CargaEstados(ddl As DropDownList, CvePais As Integer)
|
||||
ddl.DataSource = GlobalDTGralEstados(CvePais) : ddl.DataBind()
|
||||
ddl.DataSource = GlobalDTGralEstados("-1", CvePais) : ddl.DataBind()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaMunicipios(ddl As DropDownList, CveEstado As Integer)
|
||||
ddl.DataSource = GlobalDTGralMunicipios(CveEstado) : ddl.DataBind()
|
||||
ddl.DataSource = GlobalDTGralMunicipios("-1", CveEstado) : ddl.DataBind()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCoordinadores(ddl As DropDownList, CveSupervisor As Integer)
|
||||
|
||||
@@ -24,7 +24,7 @@ Partial Class Prospectos_RepEncuestasDetalle
|
||||
|
||||
If CveMunicipio > 0 Then
|
||||
|
||||
Dim dr As DataRow = GlobalDTGralMunicipios(-1).FiltroPrimero("CveMunicipio =" & CveMunicipio)
|
||||
Dim dr As DataRow = GlobalDTGralMunicipios("-1", CveEstado:=-1).FiltroPrimero("CveMunicipio =" & CveMunicipio)
|
||||
If dr IsNot Nothing Then LblMunicipio.Text = dr("Municipio").ToString()
|
||||
End If
|
||||
LblSeccion.Text = Seccion.ToString
|
||||
|
||||
@@ -36,7 +36,7 @@ Partial Class Prospectos_RepProspectosRedes
|
||||
DdlClasificacion.DataSource = GlobalDTProspectosClasificaciones(UsuarioActual.CveEmpresa) : DdlClasificacion.DataBind()
|
||||
DdlZona.DataSource = GlobalDTProspectosSupervisores(UsuarioActual.CveEmpresa) : DdlZona.DataBind()
|
||||
DdlRegion.DataSource = GlobalDTProspectosCoordinadores(DdlZona.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) : DdlRegion.DataBind()
|
||||
DdlMunicipioFiltro.DataSource = GlobalDTGralMunicipios(26) : DdlMunicipioFiltro.DataBind()
|
||||
DdlMunicipioFiltro.DataSource = GlobalDTGralMunicipios("26") : DdlMunicipioFiltro.DataBind()
|
||||
DdlEscolaridad.DataSource = GlobalDTGralEscolaridades : DdlEscolaridad.DataBind()
|
||||
|
||||
CargaDatos(True)
|
||||
|
||||
@@ -1,218 +0,0 @@
|
||||
<%@ Page Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatCuentas.aspx.vb" Inherits="Contabilidad_CatCuentas" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
#treeviewarbolmiarbol, .catcuentascontarbol .catcuentasarbol {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#listviewbuscar {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.aradd {
|
||||
margin-left: 15px;
|
||||
background-color: #1caf9a;
|
||||
color: #ffffff;
|
||||
font-weight: 300;
|
||||
padding: 2px 7px 3px 8px;
|
||||
text-align: center;
|
||||
height: 15px;
|
||||
border-radius: 18px !important;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.aradd::before {
|
||||
font: normal normal normal 14px/1 FontAwesome;
|
||||
font-size: 9px !important;
|
||||
content: "\f067";
|
||||
}
|
||||
|
||||
.aredit {
|
||||
margin-left: 15px;
|
||||
background-color: #E87E04;
|
||||
color: #ffffff;
|
||||
font-weight: 300;
|
||||
padding: 2px 7px 3px 8px;
|
||||
text-align: center;
|
||||
height: 15px;
|
||||
border-radius: 18px !important;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.aredit::before {
|
||||
font: normal normal normal 14px/1 FontAwesome;
|
||||
font-size: 9px !important;
|
||||
content: "\f040";
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Cuentas Contables
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpCuentas" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="catcuentascontarbol">
|
||||
<fieldset>
|
||||
<legend>Cuentas</legend>
|
||||
<div class="catcuentasarbol">
|
||||
<div id="treeviewarbolmiarbol">
|
||||
<asp:Literal ID="Literal1" Visible="false" runat="server"></asp:Literal>
|
||||
<ADS:Arbol runat="server" ID="ArbolCuentas"></ADS:Arbol>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="catcuentasform">
|
||||
|
||||
|
||||
<asp:TextBox ID="Textbuscar" Style="display: none;" runat="server"></asp:TextBox>
|
||||
<asp:HiddenField ID="HdnID" runat="server" Value="" ClientIDMode="Static" />
|
||||
<asp:Button ID="editar" runat="server" Style="display: none;" Text="Buscar" />
|
||||
<asp:Button ID="agregar" Style="display: none;" runat="server" Text="Buscar" />
|
||||
<asp:Button ID="borrar" Style="display: none;" runat="server" Text="borrar" />
|
||||
<fieldset>
|
||||
<legend>Información de la cuenta</legend>
|
||||
<div class="form-line">
|
||||
<div class="catcuentas left">Cuenta</div>
|
||||
<div class="catcuentas right">
|
||||
<asp:TextBox ID="Tcuenta" runat="server" Enabled="False" MaxLength="30" Width="140px" ClientIDMode="Static"></asp:TextBox>
|
||||
<ajax:MaskedEditExtender TargetControlID="Tcuenta" ID="MEECuenta" runat="server" MaskType="Number" AutoComplete="True" AutoCompleteValue="0" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-line">
|
||||
<div class="catcuentas left">Nombre</div>
|
||||
<div class="catcuentas right">
|
||||
<asp:TextBox ID="Tnombre" Style="width: 100%;" runat="server" MaxLength="50"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<hr />
|
||||
<div class="form-line">
|
||||
<div class="catcuentas left">Subcuenta de</div>
|
||||
<div class="catcuentas right">
|
||||
<asp:TextBox ID="Tsubcuenta" runat="server" Enabled="False" Width="140px" ClientIDMode="Static"></asp:TextBox>
|
||||
<br />
|
||||
<asp:Label ID="LblSubCuenta" runat="server" Text="" Font-Italic="True" Font-Size="7pt" ClientIDMode="Static"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-line">
|
||||
<div class="catcuentas left">Tipo de Cuenta</div>
|
||||
<div class="catcuentas right">
|
||||
<asp:DropDownList ID="DTcuenta" CssClass="form-control input-sm input-small select2me" runat="server">
|
||||
<asp:ListItem Selected="True" Text="Seleccione " Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Activo Deudora " Value="A"></asp:ListItem>
|
||||
<asp:ListItem Text="Activo Acreedora " Value="B"></asp:ListItem>
|
||||
<asp:ListItem Text="Pasivo Deudora " Value="C"></asp:ListItem>
|
||||
<asp:ListItem Text="Pasivo Acreedora " Value="D"></asp:ListItem>
|
||||
<asp:ListItem Text="Capital Deudora " Value="E"></asp:ListItem>
|
||||
<asp:ListItem Text="Capital Acreedora " Value="F"></asp:ListItem>
|
||||
<asp:ListItem Text="Resultados Deudora " Value="G"></asp:ListItem>
|
||||
<asp:ListItem Text="Resultados Acreedora" Value="H"></asp:ListItem>
|
||||
<asp:ListItem Text="Estadisticas Deudora" Value="I"></asp:ListItem>
|
||||
<asp:ListItem Text="Estadisticas Acredora " Value="J"></asp:ListItem>
|
||||
<asp:ListItem Text="Orden Deudora " Value="K"></asp:ListItem>
|
||||
<asp:ListItem Text="Orden Acreedora " Value="L"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-line">
|
||||
<div class="catcuentas left">Cuenta Mayor</div>
|
||||
<div class="catcuentas right">
|
||||
<asp:DropDownList ID="DcuentaMayor" CssClass="form-control input-sm input-small select2me" runat="server">
|
||||
<asp:ListItem Selected="True" Text="Seleccione " Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Mayor " Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="No " Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Titulo " Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="SubTitulo " Value="4"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-line">
|
||||
<div class="catcuentas left">Agrupador SAT</div>
|
||||
<div class="catcuentas right">
|
||||
<asp:DropDownList ID="DdlAgrupadorSAT" DataTextField="CodigoNombre" DataValueField="Id" CssClass="form-control input-sm input-small select2me" Width="100%" runat="server">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-line">
|
||||
<div class="catcuentas left">Moneda</div>
|
||||
<div class="catcuentas right">
|
||||
<asp:DropDownList ID="DdlMoneda" DataTextField="Moneda" DataValueField="CveMoneda" CssClass="form-control input-sm input-small select2me" runat="server">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-line">
|
||||
<div class="catcuentas left">Dígito agrupador</div>
|
||||
<div class="catcuentas right">
|
||||
<asp:TextBox ID="TxtDigAgrup" Style="width: 40px;" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-line">
|
||||
<div class="catcuentas left">Nombre en ingles</div>
|
||||
<div class="catcuentas right">
|
||||
<asp:TextBox ID="TxtNomIngles" Style="width: 100%;" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<asp:Button ID="Guardar" CssClass="btn btn-primary" Visible="false" runat="server" Text="Guardar" />
|
||||
<asp:Button ID="nuevacuenta" CssClass="btn btn-success" Visible="false" runat="server" Text="Guardar" />
|
||||
<asp:Button ID="BtnEliminar" CssClass="btn btn-danger" Visible="false" runat="server" Text="Eliminar" OnClientClick="return confirm('Esta seguro de eliminar la cuenta?')" />
|
||||
</fieldset>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
<asp:Content ID="content7" ContentPlaceHolderID="JS" runat="server">
|
||||
<script>
|
||||
function buscararbolito(inputid, ulid) {
|
||||
|
||||
var texto = $("input#" + inputid).val();
|
||||
if ((texto == '') && ($('ul#' + ulid))) {
|
||||
$('ul#' + ulid + '').removeClass("listainvicible");
|
||||
}
|
||||
else {
|
||||
if ($('ul#' + ulid).hasClass('listainvicible') == false) {
|
||||
$('ul#' + ulid).addClass("listainvicible");
|
||||
}
|
||||
if ($('ul#' + ulid + ' li.livisible')) {
|
||||
$('ul#' + ulid + ' li.livisible').removeClass("livisible");
|
||||
}
|
||||
if ($('ul#' + ulid + ' input:checked')) {
|
||||
$('ul#' + ulid + ' input:checked').prop('checked', false);
|
||||
}
|
||||
if ($('ul#' + ulid + ' li:contains("' + texto + '") > input[type=checkbox]')) {
|
||||
$('ul#' + ulid + ' li:contains("' + texto + '") > input[type=checkbox]').prop('checked', true);
|
||||
}
|
||||
if ($('ul#' + ulid + ' li:contains("' + texto + '")')) {
|
||||
$('ul#' + ulid + ' li:contains("' + texto + '")').addClass("livisible");
|
||||
}
|
||||
if ($('ul#' + ulid + ' label:contains("' + texto + '") ~ ul li')) {
|
||||
$('ul#' + ulid + ' label:contains(""' + texto + '"") ~ ul li').addClass("livisible");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
jQuery(document).ready(function () {
|
||||
Sys.Application.add_load(function (s, e) {
|
||||
buscararbolito('C_ArbolCuentas_Abuscar', 'C_ArbolCuentas_miarbol')
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</asp:Content>
|
||||
@@ -1,289 +0,0 @@
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class Contabilidad_CatCuentas
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "Propiedades"
|
||||
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property IDSelected As Integer
|
||||
Get
|
||||
Return ViewState("idsel").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("idsel") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
CargaMonedas()
|
||||
CargaDatos()
|
||||
CargaAgrupadorSAT()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaMonedas()
|
||||
DdlMoneda.DataSource = GlobalDTMonedas
|
||||
DdlMoneda.DataBind()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaAgrupadorSAT()
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
If ObjConta.GetAgrupadoresSAT() Then
|
||||
DdlAgrupadorSAT.DataSource = ObjConta.DtResultados
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
DdlAgrupadorSAT.DataBind()
|
||||
DdlAgrupadorSAT.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
If ObjConta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
End If
|
||||
|
||||
'para obtener la mascara, tomo el primer dato y reemplazo los numeros por cero
|
||||
Dim Mascara As String = "####-####-###"
|
||||
If DtDatos IsNot Nothing AndAlso DtDatos.Rows.Count > 0 Then
|
||||
Mascara = "0000"
|
||||
End If
|
||||
|
||||
MEECuenta.Mask = Mascara.Replace("0", "9")
|
||||
MEECuenta.AutoComplete = True
|
||||
MEECuenta.AutoCompleteValue = Mascara
|
||||
|
||||
ArbolCuentas.DataSource = DtDatos
|
||||
ArbolCuentas.nivel = "CtaInicial"
|
||||
ArbolCuentas.nodoid = "CveCuenta"
|
||||
ArbolCuentas.padre = "CvePadre"
|
||||
ArbolCuentas.titulo = "CtaCodigo"
|
||||
|
||||
ObjConta.Dispose()
|
||||
End Sub
|
||||
|
||||
Private Function getNodospadreHijos(nodo As Integer) As DataTable
|
||||
Return DtDatos.FiltraParametros(String.Format("CveCuenta = {0}", nodo))
|
||||
End Function
|
||||
|
||||
Protected Sub agregar_Click(sender As Object, e As EventArgs) Handles ArbolCuentas.addclick
|
||||
|
||||
Dim dt As New DataTable
|
||||
Dim obj As ADServerControl.DragableItem = DirectCast(sender, ADServerControl.DragableItem)
|
||||
|
||||
LimpiarCampos()
|
||||
|
||||
IDSelected = obj.Cve
|
||||
dt = getNodospadreHijos(IDSelected)
|
||||
|
||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||
Dim dr As DataRow = dt.Rows(0)
|
||||
Tcuenta.Text = Trim(dr("CuentaFormato").ToString.Replace("-", "").ToString)
|
||||
Tsubcuenta.Text = dr("CuentaFormato").ToString()
|
||||
DTcuenta.SelectedValue = dr("Tipo").ToString()
|
||||
DcuentaMayor.SelectedValue = dr("CtaMayor").ToString
|
||||
LblSubCuenta.Text = dr("Nombre").ToString
|
||||
End If
|
||||
|
||||
Tcuenta.Enabled = True
|
||||
nuevacuenta.Visible = True
|
||||
UpDatos.Visible = True
|
||||
UpDatos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub editar_Click(sender As Object, e As EventArgs) Handles ArbolCuentas.editclick
|
||||
Dim dt As DataTable
|
||||
Dim obj As ADServerControl.DragableItem = DirectCast(sender, ADServerControl.DragableItem)
|
||||
|
||||
LimpiarCampos()
|
||||
|
||||
IDSelected = obj.Cve
|
||||
dt = getNodospadreHijos(IDSelected)
|
||||
|
||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||
Dim dr As DataRow = dt.Rows(0)
|
||||
Dim drt As DataRow
|
||||
Dim Hijos As Integer
|
||||
|
||||
Tcuenta.Text = dr("CuentaFormato").ToString.Replace("-", "").ToString
|
||||
Tnombre.Text = dr("Nombre").ToString()
|
||||
DTcuenta.SelectedValue = dr("Tipo").ToString()
|
||||
DcuentaMayor.SelectedValue = dr("CtaMayor").ToString
|
||||
DdlMoneda.SelectedValue = dr("CveMoneda").ToString
|
||||
|
||||
If dr("CveAgrupadorSAT").ToString.ToEntero = 0 Then
|
||||
DdlAgrupadorSAT.SelectedValue = -1
|
||||
Else
|
||||
DdlAgrupadorSAT.SelectedValue = dr("CveAgrupadorSAT").ToString
|
||||
End If
|
||||
|
||||
TxtDigAgrup.Text = dr("DigAgrup").ToString
|
||||
TxtNomIngles.Text = dr("NomIdioma").ToString
|
||||
|
||||
Hijos = DtDatos.FiltraParametros(String.Format("CvePadre = {0}", IDSelected)).Rows.Count
|
||||
|
||||
If Hijos = 0 Then BtnEliminar.Visible = True
|
||||
|
||||
dt = getNodospadreHijos(dr("CvePadre").ToString.ToEntero)
|
||||
If dt.Rows.Count > 0 Then
|
||||
drt = dt.Rows(0)
|
||||
Tsubcuenta.Text = drt("Codigo").ToString
|
||||
LblSubCuenta.Text = drt("Nombre").ToString
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Guardar.Visible = True
|
||||
UpDatos.Visible = True
|
||||
UpDatos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub Guardar_Click(sender As Object, e As EventArgs) Handles Guardar.Click
|
||||
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
Dim customerRow As Data.DataRow
|
||||
Dim item As CheckBox
|
||||
|
||||
If Tnombre.Text.Trim = "" Then Alert("Se debe ingresar un nombre a la Cuenta.", TipoMensaje.MsgError) : Exit Sub
|
||||
|
||||
If Not ObjConta.UpdateCuenta(IDSelected.ToEntero, Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToString.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, TxtNomIngles.Text.ToString) Then
|
||||
Alert("Ocurrió un error al actualizar la Cuenta.", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
customerRow = DtDatos.Select(String.Format("CveCuenta = {0}", IDSelected))(0)
|
||||
customerRow("Nombre") = Tnombre.Text
|
||||
DtDatos.AcceptChanges()
|
||||
|
||||
CargaDatos()
|
||||
ArbolCuentas.DataSource = DtDatos
|
||||
|
||||
item = DirectCast(ArbolCuentas.FindControl(String.Format("chk{0}", IDSelected)), CheckBox)
|
||||
item.Text = String.Format("{0} - {1}", customerRow("CuentaFormato").ToString, Tnombre.Text)
|
||||
LimpiarCampos()
|
||||
UpDatos.Update()
|
||||
|
||||
Alert("La Cuenta se guardó correctamente.")
|
||||
|
||||
End Sub
|
||||
Protected Sub nuevacuenta_Click(sender As Object, e As EventArgs) Handles nuevacuenta.Click
|
||||
|
||||
If Tnombre.Text.Trim = "" Then Alert("Se debe asignar un nombre a la Cuenta.", TipoMensaje.MsgError) : Exit Sub
|
||||
If Tcuenta.Text.Trim = "" Then Alert("Se debe asignar una Cuenta", TipoMensaje.MsgError) : Exit Sub
|
||||
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
Dim CuentaEfectivo As Integer = 0
|
||||
Dim Afectable As Integer = If(DcuentaMayor.SelectedValue <> 2, 0, 1) ' cuando sea tipo 2, va a ser afectable
|
||||
|
||||
Dim idnew = ObjConta.AddCuenta(IDSelected, Tcuenta.Text.Replace("-", ""), Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero,
|
||||
DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, TxtNomIngles.Text.ToString)
|
||||
|
||||
If idnew > 0 Then
|
||||
Dim dr As DataRow = DtDatos.NewRow
|
||||
Dim item As ADServerControl.DragableItem
|
||||
Dim objul As ADServerControl.DragableUL
|
||||
|
||||
dr("CveCuenta") = idnew
|
||||
dr("CuentaFormato") = Tcuenta.Text
|
||||
dr("Nombre") = Tnombre.Text
|
||||
dr("CtaCodigo") = String.Format("{0} - {1}", Tcuenta.Text, Tnombre.Text)
|
||||
dr("Tipo") = DTcuenta.SelectedValue.ToString
|
||||
dr("CtaMayor") = DcuentaMayor.SelectedValue.ToString
|
||||
dr("CvePadre") = IDSelected
|
||||
dr("Codigo") = Tnombre.Text
|
||||
dr("CveMoneda") = DdlMoneda.SelectedValue.ToEntero
|
||||
dr("DigAgrup") = TxtDigAgrup.Text.Trim.ToEntero
|
||||
dr("NomIdioma") = TxtNomIngles.Text.Trim
|
||||
|
||||
DtDatos.Rows.Add(dr)
|
||||
ArbolCuentas.DataSource = DtDatos
|
||||
|
||||
item = DirectCast(ArbolCuentas.FindControl(String.Format("{0}", IDSelected)), ADServerControl.DragableItem)
|
||||
objul = DirectCast(ArbolCuentas.FindControl(String.Format("ul{0}", IDSelected)), ADServerControl.DragableUL)
|
||||
|
||||
item.Attributes.Item("data-hijos") = item.Attributes.Item("data-hijos").ToEntero + 1
|
||||
|
||||
If (IsNothing(objul)) Then
|
||||
objul = New ADServerControl.DragableUL
|
||||
objul.ID = String.Format("ul{0}", item.Cve)
|
||||
item.Controls.Add(objul)
|
||||
End If
|
||||
|
||||
ArbolCuentas.additem(objul, idnew, IDSelected, String.Format("{0} - {1}", Tcuenta.Text, Tnombre.Text))
|
||||
|
||||
LimpiarCampos()
|
||||
|
||||
UpDatos.Update()
|
||||
CargaDatos()
|
||||
|
||||
Alert("La Cuenta se guardó correctamente.")
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
End Sub
|
||||
Private Sub LimpiarCampos()
|
||||
Tcuenta.Text = ""
|
||||
Tnombre.Text = ""
|
||||
DTcuenta.SelectedValue = "-1"
|
||||
DcuentaMayor.SelectedValue = "-1"
|
||||
DdlAgrupadorSAT.SelectedValue = "-1"
|
||||
DdlMoneda.SelectedValue = "1"
|
||||
TxtDigAgrup.Text = ""
|
||||
TxtNomIngles.Text = ""
|
||||
Guardar.Visible = False
|
||||
nuevacuenta.Visible = False
|
||||
Tcuenta.Enabled = False
|
||||
BtnEliminar.Visible = False
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnEliminar_Click(sender As Object, e As EventArgs) Handles BtnEliminar.Click
|
||||
Dim customerRow As Data.DataRow
|
||||
Dim item As ADServerControl.DragableItem
|
||||
Dim padre As ADServerControl.DragableItem
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
ObjConta.IniciaTransacSQL()
|
||||
|
||||
If ObjConta.RemoveCuenta(IDSelected.ToEntero) Then
|
||||
|
||||
customerRow = DtDatos.Select(String.Format("CveCuenta = {0}", IDSelected))(0)
|
||||
customerRow("CvePadre") = "-5"
|
||||
DtDatos.AcceptChanges()
|
||||
|
||||
ArbolCuentas.DataSource = DtDatos
|
||||
item = DirectCast(ArbolCuentas.FindControl(String.Format("{0}", IDSelected)), ADServerControl.DragableItem)
|
||||
padre = DirectCast(ArbolCuentas.FindControl(String.Format("{0}", item.CvePadre)), ADServerControl.DragableItem)
|
||||
padre.Attributes.Item("data-hijos") = padre.Attributes.Item("data-hijos").ToEntero - 1
|
||||
ArbolCuentas.Controls.Remove(item)
|
||||
RegistraScript(String.Format("$('#{0}').click();", editar.ClientID))
|
||||
|
||||
LimpiarCampos()
|
||||
UpCuentas.Update()
|
||||
|
||||
ObjConta.Commit()
|
||||
Alert("La Cuenta ha sido eliminada", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
ObjConta.RollBack()
|
||||
Alert("La Cuenta no pudo ser eliminada", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
End Sub
|
||||
End Class
|
||||
@@ -1,471 +0,0 @@
|
||||
<%@ Page Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="ContabilizacionCompras.aspx.cs" Inherits="Contabilidad_ContabilizacionCompras" %>
|
||||
|
||||
<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">
|
||||
Diario de Movimientos
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UPPFiltros" 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-primary" />
|
||||
<asp:CheckBox ID="chkexpand" ClientIDMode="Static" CssClass="hidden" runat="server" />
|
||||
<a href="javascript;" data-idchekbox='chkexpand' class='<%= Convert.ToBoolean(chkexpand.Checked) ? "collapse" : "expand" %>'></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate">Proveedores:</label>
|
||||
<div class="col-md-3">
|
||||
<asp:DropDownList ID="DdlProveedores" Width="260px" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="RazonSocial" DataValueField="CveProveedor">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Fecha Inicio:</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 110px !important; padding: 0px;">
|
||||
<asp:TextBox ID="txtFechaI" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioI" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<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="CalendarExtender1" TargetControlID="txtFechaI" PopupButtonID="ImgCalendarioI" 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>
|
||||
<label class="col-md-1 truncate">Fecha Fin:</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 110px !important; padding: 0px;">
|
||||
<asp:TextBox ID="txtFechaF" runat="server" CssClass="form-control" Width="99%" 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>
|
||||
<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="CalendarExtender2" 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 Inicial''</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 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="vcoFfvFF" 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>
|
||||
|
||||
<div class="portlet-body" <%= Convert.ToBoolean(chkexpand.Checked) ? "" : "style=\"display:none;\"" %>>
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate">Personal:</label>
|
||||
<div class="col-md-3">
|
||||
<asp:DropDownList ID="DdlPersonal" CssClass="form-control input-sm select2me" Width="260px" runat="server" AppendDataBoundItems="true" DataTextField="NombreCompleto" DataValueField="CvePersonal">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
|
||||
<asp:UpdatePanel ID="Updatetabs" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<ajax:TabContainer ID="Tab" runat="server" ActiveTabIndex="0" Width="100%">
|
||||
<ajax:TabPanel ID="TabCompras" runat="server" HeaderText="Compras">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel ID="UpGvCompras" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnContabilizarCompras" runat="server" CssClass="btn btn-success" Text="Contabilizar" />
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="GvPrePolizaCompras" runat="server" AutoGenerateColumns="False" Width="100%" CssClass="table table-advance table-hover" Style="text-align: center;" ForeColor="Black" DataKeyNames="CvePrePoliza,Fecha,CveTipoPoliza" OnRowDataBound="OnRowDataBound" GridLines="None" ShowHeader="false">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Panel ID="PnlDetalleCompras" runat="server" CssClass="Texto">
|
||||
<asp:GridView ID="GvD" runat="server" AutoGenerateColumns="False" CssClass="table detallerow table-hover" Style="text-align: center; float: right; width: 95%;" DataKeyNames="IdCtaContable,Cargo,Abono" GridLines="None" OnRowDataBound="GvD_RowDataBound">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="ConceptoContable" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="150px" HeaderText="Movimiento">
|
||||
<ItemStyle HorizontalAlign="Left" Width="150px" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField DataField="Concepto" ItemStyle-HorizontalAlign="Left" HeaderText="Concepto">
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField DataField="SubProyecto" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="100px" HeaderText="SubProyecto">
|
||||
<ItemStyle HorizontalAlign="Left" Width="120px" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField DataField="IdCtaContable" ItemStyle-Font-Italic="true" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="150px" ItemStyle-CssClass="truncate" HeaderText="Cuenta">
|
||||
<ItemStyle CssClass="truncate" Font-Italic="True" HorizontalAlign="Left" Width="150px" />
|
||||
</asp:BoundField>
|
||||
<asp:TemplateField HeaderText="Cargos">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlC" runat="server" Text='<%# Eval("Cargo", "{0:N2}") %>'></asp:Literal>
|
||||
<asp:Literal ID="LtlCME" runat="server" Text='<%# Eval("CargoME", "<br/>ME: {0:N2}") %>' Visible='<%# (Convert.ToDouble(Eval("CargoME")) != 0.00 )? true : false %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="120px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Abonos">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlA" runat="server" Text='<%# Eval("Abono", "{0:N2}") %>'></asp:Literal>
|
||||
<asp:Literal ID="LtlAME" runat="server" Text='<%# Eval("AbonoME", "<br/>ME: {0:N2}") %>' Visible='<%# (Convert.ToDouble(Eval("AbonoME")) != 0.00 )? true : false %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="120px" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle Font-Size="Smaller" />
|
||||
</asp:GridView>
|
||||
</asp:Panel>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr class="SubTotales">
|
||||
<td style="width: 25px;">
|
||||
<asp:CheckBox ID="Chk" runat="server" />
|
||||
</td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr style="background-color: #949494; color: black;">
|
||||
<td style="width: 50px"></td>
|
||||
<td style="width: 30px; text-align: right;">Fecha:</td>
|
||||
<td style="text-align: left; width: 80px;">
|
||||
<asp:TextBox ID="TxtFechaCompras" ItemStyle-HorizontalAlign="Left" Width="70px" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:TextBox></td>
|
||||
<td style="width: 50px; text-align: right;">Concepto:</td>
|
||||
<td style="width: 400px; text-align: left;">
|
||||
<asp:TextBox ID="TxtConceptoCompras" ItemStyle-HorizontalAlign="Left" Width="400px" runat="server" Text='<%# Eval("Concepto") %>'></asp:TextBox></td>
|
||||
<td style="width: 100px; text-align: right;">Poliza: </td>
|
||||
<td style="width: 70px; text-align: left;">
|
||||
<asp:Literal ID="LtPolizaTipoCompras" Text='<%# Eval("TipoPoliza", "{0:d}") %>' runat="server"></asp:Literal></td>
|
||||
<td style="width: 70px; text-align: left;"><asp:HyperLink ID="HplEdicion" runat="server" Target="_blank" Visible="false" CssClass="Texto" Text="Editar" NavigateUrl='<%# Eval("CvePrePoliza", "/PyME/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}")%>'></asp:HyperLink></td>
|
||||
</tr>
|
||||
<tr style="color: black;">
|
||||
<td></td>
|
||||
<td style="width: 30px; text-align: right;">Factura:</td>
|
||||
<td style="text-align: left; width: 80px;">
|
||||
<asp:HyperLink Target="_blank" ID="HplFacturaVenta" runat="server" Text='<%# Eval("Serie")%>' CssClass="Texto" NavigateUrl='<%# Eval("CveCompra", "/Compras/Compras.aspx?CveCompra={0}") %>'></asp:HyperLink></td>
|
||||
<td style="width: 50px; text-align: right;">Proveedor:</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:HyperLink Target="_blank" ID="HplProveedorVenta" runat="server" Text='<%# Eval("NombreComercial")%>' CssClass="Texto" NavigateUrl='<%# Eval("CveProveedor", "/Compras/Proveedores.aspx?CveProveedor={0}") %>'></asp:HyperLink></td>
|
||||
<td style="width: 30px; text-align: right;">Fecha:</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:Label ID="lblFechaVenta" ItemStyle-HorizontalAlign="Left" Width="70px" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Label></td>
|
||||
<td style="width: 50px; text-align: right;">Total:</td>
|
||||
<td style="width: 50px; text-align: left;">
|
||||
<asp:Label ID="lblTotalVenta" ItemStyle-HorizontalAlign="Left" Width="70px" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Label></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:Label ID="lblMoneda" ItemStyle-HorizontalAlign="Left" runat="server" Text='<%# Eval("Moneda") %>'></asp:Label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<ajax:TabPanel ID="TabPagos" runat="server" HeaderText="Pagos">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel ID="UpGvPagos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnContabilizarPagos" runat="server" CssClass="btn btn-success" Text="Contabilizar" />
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="GvPrePolizaPagos" runat="server" AutoGenerateColumns="False" Width="100%" CssClass="table table-advance table-hover" Style="text-align: center;" ForeColor="Black" DataKeyNames="CvePrePoliza,Fecha,CveTipoPoliza" OnRowDataBound="OnRowDataBound" GridLines="None" ShowHeader="false">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Panel ID="PnlDetallePagos" runat="server">
|
||||
<asp:GridView ID="GvD" runat="server" AutoGenerateColumns="false" CssClass="table detallerow table-hover" Style="text-align: center; float: right; width: 95%;" DataKeyNames="IdCtaContable, Cargo, Abono" GridLines="None" OnRowDataBound="GvD_RowDataBound">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="ConceptoContable" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="150px" HeaderText="Movimiento" />
|
||||
<asp:BoundField DataField="Concepto" ItemStyle-HorizontalAlign="Left" HeaderText="Concepto" />
|
||||
<asp:BoundField DataField="SubProyecto" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="100px" HeaderText="SubProyecto" />
|
||||
<asp:BoundField DataField="IdCtaContable" ItemStyle-Font-Italic="true" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="150px" ItemStyle-CssClass="truncate" HeaderText="Cuenta" />
|
||||
<asp:TemplateField HeaderText="Cargos">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlC" runat="server" Text='<%# Eval("Cargo", "{0:N2}") %>'></asp:Literal>
|
||||
<asp:Literal ID="LtlCME" runat="server" Text='<%# Eval("CargoME", "<br/>ME: {0:N2}") %>' Visible='<%# (Convert.ToDouble(Eval("CargoME")) != 0.00 )? true : false %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="120px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Abonos">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlA" runat="server" Text='<%# Eval("Abono", "{0:N2}") %>'></asp:Literal>
|
||||
<asp:Literal ID="LtlAME" runat="server" Text='<%# Eval("AbonoME", "<br/>ME: {0:N2}") %>' Visible='<%# (Convert.ToDouble(Eval("AbonoME")) != 0.00 )? true : false %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="120px" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle Font-Size="Smaller" />
|
||||
</asp:GridView>
|
||||
</asp:Panel>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr class="SubTotales">
|
||||
<td style="width: 25px;">
|
||||
<asp:CheckBox ID="Chk" runat="server" />
|
||||
</td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr style="background-color: #949494; color: black;">
|
||||
<td style="width: 50px"></td>
|
||||
<td style="width: 30px; text-align: right;">Fecha:</td>
|
||||
<td style="text-align: left; width: 80px;">
|
||||
<asp:TextBox ID="TxtFechaPagos" ItemStyle-HorizontalAlign="Left" Width="70px" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:TextBox></td>
|
||||
<td style="width: 50px; text-align: right;">Concepto:</td>
|
||||
<td style="width: 400px; text-align: left;">
|
||||
<asp:TextBox ID="TxtConceptoPagos" ItemStyle-HorizontalAlign="Left" Width="400px" runat="server" Text='<%# Eval("Concepto") %>'></asp:TextBox></td>
|
||||
<td style="width: 100px; text-align: right;">Poliza: </td>
|
||||
<td style="width: 70px; text-align: left;">
|
||||
<asp:Literal ID="LtPolizaTipoPagos" Text='<%# Eval("TipoPoliza", "{0:d}") %>' runat="server"></asp:Literal></td>
|
||||
<td style="width: 70px; text-align: left;"><asp:HyperLink ID="HplEdicion" runat="server" Target="_blank" Visible="false" CssClass="Texto" Text="Editar" NavigateUrl='<%# Eval("CvePrePoliza", "/PyME/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}")%>'></asp:HyperLink></td>
|
||||
</tr>
|
||||
<tr style="color: black;">
|
||||
<td></td>
|
||||
<td style="width: 30px; text-align: right;">Número:</td>
|
||||
<td style="text-align: left; width: 80px;">
|
||||
<asp:HyperLink Target="_blank" ID="HplFacturaPagos" runat="server" Text='<%# Eval("Serie")%>' CssClass="Texto" NavigateUrl='<%# Eval("CveIE", "/Bancos/IE.aspx?CveIE={0}") %>'></asp:HyperLink></td>
|
||||
<td style="width: 50px; text-align: right;">Pagador:</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:Label ID="lblProveedorPagos" runat="server" Text='<%# Eval("NombreComercial")%>' CssClass="Texto"></asp:Label></td>
|
||||
<td style="width: 30px; text-align: right;">Fecha:</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:Label ID="lblFechaPagos" ItemStyle-HorizontalAlign="Left" Width="70px" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Label></td>
|
||||
<td style="width: 50px; text-align: right;">Total:</td>
|
||||
<td style="width: 50px; text-align: left;">
|
||||
<asp:Label ID="lblTotalPagos" ItemStyle-HorizontalAlign="Left" Width="70px" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Label></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:Label ID="lblMoneda" ItemStyle-HorizontalAlign="Left" runat="server" Text='<%# Eval("Moneda") %>'></asp:Label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel ID="TabAnticipos" runat="server" HeaderText="Anticipos">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel ID="UpGvAnticipos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnContabilizarAnticipos" runat="server" CssClass="btn btn-success" Text="Contabilizar" />
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="GvPrePolizaAnticipos" runat="server" AutoGenerateColumns="False" Width="100%" CssClass="table table-advance table-hover" Style="text-align: center;" ForeColor="Black" DataKeyNames="CvePrePoliza,Fecha,CveTipoPoliza" OnRowDataBound="OnRowDataBound" GridLines="None" ShowHeader="false">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Panel ID="PnlDetalleAnticipos" runat="server">
|
||||
<asp:GridView ID="GvD" runat="server" AutoGenerateColumns="false" CssClass="table detallerow table-hover" Style="text-align: center; float: right; width: 95%;" DataKeyNames="IdCtaContable, Cargo, Abono" GridLines="None" OnRowDataBound="GvD_RowDataBound">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="ConceptoContable" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="150px" HeaderText="Movimiento" />
|
||||
<asp:BoundField DataField="Concepto" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Left" HeaderText="Concepto" />
|
||||
<asp:BoundField DataField="SubProyecto" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="100px" HeaderText="SubProyecto" />
|
||||
<asp:BoundField DataField="IdCtaContable" ItemStyle-Font-Size="Smaller" ItemStyle-Font-Italic="true" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="150px" ItemStyle-CssClass="truncate" HeaderText="Cuenta" />
|
||||
<asp:BoundField DataField="Cargo" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" DataFormatString="{0:N2}" HeaderText="Cargos" />
|
||||
<asp:BoundField DataField="Abono" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" DataFormatString="{0:N2}" HeaderText="Abonos" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</asp:Panel>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr class="SubTotales">
|
||||
<td style="width: 25px;">
|
||||
<asp:CheckBox ID="Chk" runat="server" />
|
||||
</td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr style="background-color: #949494; color: black;">
|
||||
<td style="width: 50px"></td>
|
||||
<td style="width: 30px; text-align: right;">Fecha:</td>
|
||||
<td style="text-align: left; width: 80px;">
|
||||
<asp:TextBox ID="TxtFechaAnticipos" ItemStyle-HorizontalAlign="Left" Width="70px" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:TextBox></td>
|
||||
<td style="width: 50px; text-align: right;">Concepto:</td>
|
||||
<td style="width: 400px; text-align: left;">
|
||||
<asp:TextBox ID="TxtConceptoAnticipos" ItemStyle-HorizontalAlign="Left" Width="400px" runat="server" Text='<%# Eval("Concepto") %>'></asp:TextBox></td>
|
||||
<td style="width: 100px; text-align: right;">Poliza: </td>
|
||||
<td style="width: 70px; text-align: left;">
|
||||
<asp:Literal ID="LtPolizaTipoAnticipos" Text='<%# Eval("TipoPoliza", "{0:d}") %>' runat="server"></asp:Literal></td>
|
||||
<td style="width: 70px; text-align: left;"><asp:HyperLink ID="HplEdicion" runat="server" Target="_blank" CssClass="Texto" Visible="false" Text="Editar" NavigateUrl='<%# Eval("CvePrePoliza", "/PyME/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}")%>'></asp:HyperLink></td>
|
||||
</tr>
|
||||
<tr style="color: black;">
|
||||
<td></td>
|
||||
<td style="width: 30px; text-align: right;">Número:</td>
|
||||
<td style="text-align: left; width: 80px;">
|
||||
<asp:HyperLink Target="_blank" ID="HplFacturaAnticipos" runat="server" Text='<%# Eval("Serie")%>' CssClass="Texto" NavigateUrl='<%# Eval("CveIE", "/Bancos/IE.aspx?CveIE={0}") %>'></asp:HyperLink></td>
|
||||
<td style="width: 50px; text-align: right;">Pagador:</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:Label ID="LblProveedorAnticipos" runat="server" Text='<%# Eval("NombreComercial")%>' CssClass="Texto"></asp:Label></td>
|
||||
<td style="width: 30px; text-align: right;">Fecha:</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:Label ID="lblFechaAnticipos" ItemStyle-HorizontalAlign="Left" Width="70px" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Label></td>
|
||||
<td style="width: 50px; text-align: right;">Total:</td>
|
||||
<td style="width: 50px; text-align: left;">
|
||||
<asp:Label ID="lblTotalAnticipos" ItemStyle-HorizontalAlign="Left" Width="70px" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Label></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:Label ID="lblMoneda" ItemStyle-HorizontalAlign="Left" runat="server" Text='<%# Eval("Moneda") %>'></asp:Label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel ID="TabAmortizaciones" runat="server" HeaderText="Amortizaciones">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel ID="UpGvAmortizaciones" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnContabilizarAmortizaciones" runat="server" CssClass="btn btn-success" Text="Contabilizar" />
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="GvPrePolizaAmortizaciones" runat="server" AutoGenerateColumns="False" Width="100%" CssClass="table table-advance table-hover" Style="text-align: center;" ForeColor="Black" DataKeyNames="CvePrePoliza,Fecha,CveTipoPoliza" OnRowDataBound="OnRowDataBound" GridLines="None" ShowHeader="false">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Panel ID="PnlDetalleAmortizaciones" runat="server">
|
||||
<asp:GridView ID="GvD" runat="server" AutoGenerateColumns="false" CssClass="table detallerow table-hover" Style="text-align: center; float: right; width: 95%;" DataKeyNames="IdCtaContable, Cargo, Abono" GridLines="None" OnRowDataBound="GvD_RowDataBound">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="ConceptoContable" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="150px" HeaderText="Movimiento" />
|
||||
<asp:BoundField DataField="Concepto" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="400px" HeaderText="Concepto" />
|
||||
<asp:BoundField DataField="SubProyecto" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="100px" HeaderText="SubProyecto" />
|
||||
<asp:BoundField DataField="IdCtaContable" ItemStyle-Font-Size="Smaller" ItemStyle-Font-Italic="true" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="150px" ItemStyle-CssClass="truncate" HeaderText="Cuenta" />
|
||||
<asp:BoundField DataField="Cargo" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" DataFormatString="{0:N2}" HeaderText="Cargos" />
|
||||
<asp:BoundField DataField="Abono" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" DataFormatString="{0:N2}" HeaderText="Abonos" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</asp:Panel>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr class="SubTotales">
|
||||
<td style="width: 25px;">
|
||||
<asp:CheckBox ID="Chk" runat="server" />
|
||||
</td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr style="background-color: #949494; color: black;">
|
||||
<td style="width: 50px"></td>
|
||||
<td style="width: 30px; text-align: right;">Fecha:</td>
|
||||
<td style="text-align: left; width: 80px;">
|
||||
<asp:TextBox ID="TxtFechaAmortizaciones" ItemStyle-HorizontalAlign="Left" Width="70px" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:TextBox></td>
|
||||
<td style="width: 50px; text-align: right;">Concepto:</td>
|
||||
<td style="width: 400px; text-align: left;">
|
||||
<asp:TextBox ID="TxtConceptoAmortizaciones" ItemStyle-HorizontalAlign="Left" Width="400px" runat="server" Text='<%# Eval("Concepto") %>'></asp:TextBox></td>
|
||||
<td style="width: 100px; text-align: right;">Poliza: </td>
|
||||
<td style="width: 70px; text-align: left;">
|
||||
<asp:Literal ID="LtPolizaTipoAmortizaciones" Text='<%# Eval("TipoPoliza", "{0:d}") %>' runat="server"></asp:Literal></td>
|
||||
<td style="width: 70px; text-align: left;"><asp:HyperLink ID="HplEdicion" runat="server" Target="_blank" CssClass="Texto" Visible="false" Text="Editar" NavigateUrl='<%# Eval("CvePrePoliza", "/PyME/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}")%>'></asp:HyperLink></td>
|
||||
</tr>
|
||||
<tr style="color: black;">
|
||||
<td></td>
|
||||
<td style="width: 30px; text-align: right;">Factura:</td>
|
||||
<td style="text-align: left; width: 80px;">
|
||||
<asp:HyperLink Target="_blank" ID="HplFacturaAmortizaciones" runat="server" Text='<%# Eval("Serie")%>' CssClass="Texto" NavigateUrl='<%# Eval("CveCompra", "/Compras/Compras.aspx?CveCompra={0}") %>'></asp:HyperLink></td>
|
||||
<td style="width: 50px; text-align: right;">Proveedor:</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:HyperLink Target="_blank" ID="HplProveedorAmortizaciones" runat="server" Text='<%# Eval("NombreComercial")%>' CssClass="Texto" NavigateUrl='<%# Eval("CveProveedor", "/Compras/Proveedors.aspx?CveProveedor={0}") %>'></asp:HyperLink></td>
|
||||
<td style="width: 30px; text-align: right;">Fecha:</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:Label ID="lblFechaAmortizaciones" ItemStyle-HorizontalAlign="Left" Width="70px" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Label></td>
|
||||
<td style="width: 50px; text-align: right;">Total:</td>
|
||||
<td style="width: 50px; text-align: left;">
|
||||
<asp:Label ID="lblTotalAmortizaciones" ItemStyle-HorizontalAlign="Left" Width="70px" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Label></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:Label ID="lblMoneda" ItemStyle-HorizontalAlign="Left" runat="server" Text='<%# Eval("Moneda") %>'></asp:Label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
</ajax:TabContainer>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
<script type="text/javascript">
|
||||
function cargarGridHijo() {
|
||||
$('.detallerow').each(function (index) {
|
||||
var tr = $("<tr ></tr>")
|
||||
var td = $("<td colspan='99'></td>")
|
||||
var tb = $(this);
|
||||
tb.closest("tr").after(tr);
|
||||
td.append(tb);
|
||||
tr.append(td);
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
cargarGridHijo();
|
||||
|
||||
Sys.Application.add_load(function (s, e) {
|
||||
cargarGridHijo();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</asp:Content>
|
||||
@@ -1,267 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
using System.Data;
|
||||
|
||||
public partial class Contabilidad_ContabilizacionCompras : ClsPaginas
|
||||
{
|
||||
private DataTable DTmpC
|
||||
{
|
||||
get
|
||||
{
|
||||
return (DataTable)ViewState["DTmpC"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["DTmpC"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
ClsContabilidad ObjCont = new ClsContabilidad();
|
||||
ObjCont.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa);
|
||||
string[] columnas = new string[3] { "CveCuenta", "CuentaFormato", "Nombre" };
|
||||
DTmpC = ObjCont.DtResultados.FiltraParametros("", "", columnas);
|
||||
ObjCont.Dispose();
|
||||
|
||||
DdlProveedores.DataSource = get_GlobalDTCompProveedores(UsuarioActual.CveEmpresa);
|
||||
DdlProveedores.DataBind();
|
||||
|
||||
DdlPersonal.DataSource = get_GlobalDTRHPersonal(UsuarioActual.CveEmpresa);
|
||||
DdlPersonal.DataBind();
|
||||
|
||||
txtFechaI.Text = DateTime.Now.FirstDayOfMonth().AddMonths(-1).ToShortDateString();
|
||||
txtFechaF.Text = DateTime.Now.ToShortDateString();
|
||||
//CargaDatos();
|
||||
}
|
||||
|
||||
BtnConsultar.Click += new EventHandler(this.BtnConsultar_Click);
|
||||
BtnContabilizarCompras.Click += new EventHandler(this.BtnGuardarCompras_Click);
|
||||
BtnContabilizarPagos.Click += new EventHandler(this.BtnGuardarPagos_Click);
|
||||
BtnContabilizarAnticipos.Click += new EventHandler(this.BtnGuardarAnticipos_Click);
|
||||
BtnContabilizarAmortizaciones.Click += new EventHandler(this.BtnGuardarAmortizaciones_Click);
|
||||
}
|
||||
|
||||
protected void OnRowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
GridView GvD = e.Row.FCGridView("GvD");
|
||||
int CvePrePoliza = e.Row.DataKey("CvePrePoliza").ToEntero();
|
||||
|
||||
e.Row.Cells[0].ToolTip = CvePrePoliza.ToString();
|
||||
|
||||
ClsContabilidad contP = new ClsContabilidad();
|
||||
|
||||
if (contP.GetContabilizacionDiarioDetalle(CvePrePoliza))
|
||||
{
|
||||
Double Abonos = 0;
|
||||
Double Cargos = 0;
|
||||
|
||||
Abonos = contP.DtResultados.SUM("Abono");
|
||||
Cargos = contP.DtResultados.SUM("Cargo");
|
||||
|
||||
if (Cargos != Abonos)
|
||||
{
|
||||
e.Row.FCCheckBox("Chk").Visible = false;
|
||||
}
|
||||
|
||||
GvD.DataSource = contP.DtResultados;
|
||||
}
|
||||
|
||||
if (UsuarioActual.CveRol == 1 || UsuarioActual.CveUsuario == 17 )
|
||||
{
|
||||
e.Row.FCHyperLink("HplEdicion").Visible = true;
|
||||
}
|
||||
|
||||
contP.Dispose();
|
||||
GvD.DataBind();
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void Contabilizar(int CvePrepoliza, DateTime Fecha, string Concepto, ClsContabilidad Obj)
|
||||
{
|
||||
if (Obj.ContabilizarPrePoliza(CvePrepoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, Fecha, Concepto))
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
private void BtnGuardarCompras_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClsContabilidad ObjMov = new ClsContabilidad();
|
||||
|
||||
foreach (GridViewRow row in GvPrePolizaCompras.Rows)
|
||||
{
|
||||
CheckBox chk = row.FCCheckBox("Chk");
|
||||
TextBox txtFecha = row.FCTextBox("TxtFechaCompras");
|
||||
TextBox txtConcepto = row.FCTextBox("TxtConceptoCompras");
|
||||
|
||||
if (chk != null && chk.Checked)
|
||||
{
|
||||
DateTime Fecha = txtFecha.Text.ToDate();
|
||||
int CvePrepoliza = GvPrePolizaCompras.DataKeys[row.RowIndex]["CvePrePoliza"].ToString().ToEntero();
|
||||
string Concepto = txtConcepto.Text;
|
||||
|
||||
Contabilizar(CvePrepoliza, Fecha, Concepto, ObjMov);
|
||||
}
|
||||
}
|
||||
ObjMov.Dispose();
|
||||
|
||||
Alert("Se Contabilizaron Correctamente los Siguientes Folios: <br>" + ObjMov.AlertaMensaje.ToString(), ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
CargaDatos();
|
||||
}
|
||||
|
||||
private void BtnGuardarPagos_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClsContabilidad ObjMov = new ClsContabilidad();
|
||||
|
||||
foreach (GridViewRow row in GvPrePolizaPagos.Rows)
|
||||
{
|
||||
CheckBox chk = row.FCCheckBox("Chk");
|
||||
TextBox txtFecha = row.FCTextBox("TxtFechaPagos");
|
||||
TextBox txtConcepto = row.FCTextBox("TxtConceptoPagos");
|
||||
|
||||
if (chk != null && chk.Checked)
|
||||
{
|
||||
DateTime Fecha = txtFecha.Text.ToDate();
|
||||
int CvePrepoliza = GvPrePolizaPagos.DataKeys[row.RowIndex]["CvePrePoliza"].ToString().ToEntero();
|
||||
string Concepto = txtConcepto.Text;
|
||||
|
||||
Contabilizar(CvePrepoliza, Fecha, Concepto, ObjMov);
|
||||
}
|
||||
}
|
||||
ObjMov.Dispose();
|
||||
|
||||
Alert("Se Contabilizaron Correctamente los Siguientes Folios: <br>" + ObjMov.AlertaMensaje.ToString(), ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
CargaDatos();
|
||||
}
|
||||
|
||||
private void BtnGuardarAnticipos_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClsContabilidad ObjMov = new ClsContabilidad();
|
||||
|
||||
foreach (GridViewRow row in GvPrePolizaAnticipos.Rows)
|
||||
{
|
||||
CheckBox chk = row.FCCheckBox("Chk");
|
||||
TextBox txtFecha = row.FCTextBox("TxtFechaAnticipos");
|
||||
TextBox txtConcepto = row.FCTextBox("TxtConceptoAnticipos");
|
||||
|
||||
if (chk != null && chk.Checked)
|
||||
{
|
||||
DateTime Fecha = txtFecha.Text.ToDate();
|
||||
int CvePrepoliza = GvPrePolizaAnticipos.DataKeys[row.RowIndex]["CvePrePoliza"].ToString().ToEntero();
|
||||
string Concepto = txtConcepto.Text;
|
||||
|
||||
Contabilizar(CvePrepoliza, Fecha, Concepto, ObjMov);
|
||||
}
|
||||
}
|
||||
ObjMov.Dispose();
|
||||
|
||||
Alert("Se Contabilizaron Correctamente los Siguientes Folios: <br>" + ObjMov.AlertaMensaje.ToString(), ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
CargaDatos();
|
||||
}
|
||||
|
||||
private void BtnGuardarAmortizaciones_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClsContabilidad ObjMov = new ClsContabilidad();
|
||||
foreach (GridViewRow row in GvPrePolizaAmortizaciones.Rows)
|
||||
{
|
||||
CheckBox chk = row.FCCheckBox("Chk");
|
||||
TextBox txtFecha = row.FCTextBox("TxtFechaAmortizaciones");
|
||||
TextBox txtConcepto = row.FCTextBox("TxtConceptoAmortizaciones");
|
||||
|
||||
if (chk != null && chk.Checked)
|
||||
{
|
||||
DateTime Fecha = txtFecha.Text.ToDate();
|
||||
int CvePrepoliza = GvPrePolizaAmortizaciones.DataKeys[row.RowIndex]["CvePrePoliza"].ToString().ToEntero();
|
||||
string Concepto = txtConcepto.Text;
|
||||
|
||||
Contabilizar(CvePrepoliza, Fecha, Concepto, ObjMov);
|
||||
}
|
||||
}
|
||||
ObjMov.Dispose();
|
||||
|
||||
Alert("Se Contabilizaron Correctamente los Siguientes Folios: <br>" + ObjMov.AlertaMensaje.ToString(), ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
CargaDatos();
|
||||
}
|
||||
|
||||
protected void BtnConsultar_Click(object sender, EventArgs e)
|
||||
{
|
||||
CargaDatos();
|
||||
}
|
||||
|
||||
private void CargaDatos()
|
||||
{
|
||||
DateTime FechaI = txtFechaI.Text.ToDate();
|
||||
DateTime FechaF = txtFechaF.Text.ToDate();
|
||||
|
||||
ClsContabilidad cont = new ClsContabilidad();
|
||||
|
||||
// Cargamos las Compras
|
||||
if (cont.GetContabilizacionDiario(UsuarioActual.CveEmpresa, 1, FechaI, FechaF, DdlProveedores.SelectedValue.ToEntero(), DdlPersonal.SelectedValue.ToEntero()))
|
||||
{
|
||||
GvPrePolizaCompras.DataSource = cont.DtResultados;
|
||||
GvPrePolizaCompras.DataBind();
|
||||
}
|
||||
|
||||
// Cargamos los pagos
|
||||
if (cont.GetContabilizacionDiario(UsuarioActual.CveEmpresa, 2, FechaI, FechaF, DdlProveedores.SelectedValue.ToEntero(), DdlPersonal.SelectedValue.ToEntero()))
|
||||
{
|
||||
|
||||
GvPrePolizaPagos.DataSource = cont.DtResultados;
|
||||
GvPrePolizaPagos.DataBind();
|
||||
}
|
||||
|
||||
// Cargamos las amortizaciones
|
||||
if (cont.GetContabilizacionDiario(UsuarioActual.CveEmpresa, 101, FechaI, FechaF, DdlProveedores.SelectedValue.ToEntero(), DdlPersonal.SelectedValue.ToEntero()))
|
||||
{
|
||||
GvPrePolizaAmortizaciones.DataSource = cont.DtResultados;
|
||||
GvPrePolizaAmortizaciones.DataBind();
|
||||
}
|
||||
|
||||
cont.Dispose();
|
||||
|
||||
UpGvCompras.Update();
|
||||
UpGvPagos.Update();
|
||||
UpGvAnticipos.Update();
|
||||
UpGvAmortizaciones.Update();
|
||||
}
|
||||
|
||||
protected void GvD_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
int cuenta = e.Row.DataKey("IdCtaContable").ToString().ToEntero();
|
||||
|
||||
|
||||
if (cuenta > 0)
|
||||
{
|
||||
DataRow dr = DTmpC.FiltroPrimero(String.Format("CveCuenta = {0}", cuenta));
|
||||
|
||||
if (dr != null) e.Row.Cells[3].Text = string.Format("{0}<br/>{1}", dr["CuentaFormato"], dr["Nombre"]);
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Row.Cells[0].ForeColor = System.Drawing.Color.Red;
|
||||
|
||||
((GridViewRow)((GridView)e.Row.NamingContainer).BindingContainer).FCCheckBox("Chk").Visible = false;
|
||||
}
|
||||
|
||||
if (Convert.ToDecimal(e.Row.DataKey("Cargo").ToString()) == 0) e.Row.Cells[4].Text = "";
|
||||
|
||||
if (Convert.ToDecimal(e.Row.DataKey("Abono").ToString()) == 0) e.Row.Cells[5].Text = "";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,423 +0,0 @@
|
||||
<%@ Page Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="ContabilizacionVentas.aspx.cs" Inherits="Contabilidad_ContabilizacionVentas" %>
|
||||
|
||||
<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">
|
||||
Diario de Ventas
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UPPFiltros" 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-primary" OnClick="BtnConsultar_Click" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate">Clientes:</label>
|
||||
<div class="col-md-3">
|
||||
<asp:DropDownList ID="DdlClientes" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="NombreComercial" DataValueField="CveCliente">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Fecha Inicio:</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 110px !important; padding: 0px;">
|
||||
<asp:TextBox ID="txtFechaI" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioI" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<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="CalendarExtender1" TargetControlID="txtFechaI" PopupButtonID="ImgCalendarioI" 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>
|
||||
<label class="col-md-1 truncate">Fecha Fin:</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 110px !important; padding: 0px;">
|
||||
<asp:TextBox ID="txtFechaF" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="LinkButton1" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<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="CalendarExtender2" 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="vcoFfvFF" 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>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
|
||||
<asp:UpdatePanel ID="UPPTabs" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<ajax:TabContainer ID="Tab" runat="server" ActiveTabIndex="0" Width="100%">
|
||||
<ajax:TabPanel ID="TabV" runat="server" HeaderText="Ventas">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpGvVentas" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnContabilizarVentas" runat="server" CssClass="btn btn-success" Text="Contabilizar" />
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="GvV" runat="server" AutoGenerateColumns="False" Width="100%" CssClass="table table-advance table-hover" Style="text-align: center;" ForeColor="Black" DataKeyNames="CvePrePoliza,Fecha" OnRowDataBound="OnRowDataBound" GridLines="None" ShowHeader="false">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Panel ID="PnlDetalleVentas" runat="server" CssClass="Texto">
|
||||
<asp:GridView ID="GvD" runat="server" AutoGenerateColumns="false" CssClass="table detallerow table-hover" Style="text-align: center; float: right; width: 95%;" DataKeyNames="IdCtaContable,Cargo,Abono" GridLines="None" OnRowDataBound="GvD_RowDataBound">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="ConceptoContable" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="150px" HeaderText="Movimiento" />
|
||||
<asp:BoundField DataField="Concepto" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Left" HeaderText="Concepto" />
|
||||
<asp:BoundField DataField="SubProyecto" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="100px" HeaderText="SubProyecto" />
|
||||
<asp:BoundField DataField="" ItemStyle-Font-Size="Smaller" ItemStyle-Font-Italic="true" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="150px" HeaderText="Cuenta" />
|
||||
<asp:BoundField DataField="Cargo" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" DataFormatString="{0:N2}" HeaderText="Cargos" />
|
||||
<asp:BoundField DataField="Abono" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" DataFormatString="{0:N2}" HeaderText="Abonos" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</asp:Panel>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr class="SubTotales">
|
||||
<td style="width: 25px;">
|
||||
<asp:CheckBox ID="Chk" runat="server" />
|
||||
</td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr style="background-color: #949494; color: black;">
|
||||
<td style="width: 50px"></td>
|
||||
<td style="width: 30px; text-align: right;">Fecha:</td>
|
||||
<td style="text-align: left; width: 80px;">
|
||||
<asp:TextBox ID="TxtFechaVentas" ItemStyle-HorizontalAlign="Left" Width="70px" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:TextBox></td>
|
||||
<td style="width: 50px; text-align: right;">Concepto:</td>
|
||||
<td style="width: 400px; text-align: left;">
|
||||
<asp:TextBox ID="TxtConceptoVentas" ItemStyle-HorizontalAlign="Left" Width="400px" runat="server" Text='<%# Eval("Concepto") %>'></asp:TextBox></td>
|
||||
<td style="width: 100px; text-align: right;">Poliza: </td>
|
||||
<td style="width: 70px; text-align: left;"><asp:Literal ID="LtPolizaTipoVentas" Text='<%# Eval("TipoPoliza", "{0:d}") %>' runat="server"></asp:Literal></td>
|
||||
<td style="width: 70px; text-align: left;"><asp:HyperLink ID="HplEdicion" runat="server" Target="_blank" CssClass="Texto" Visible="false" Text="Editar" NavigateUrl='<%# Eval("CvePrePoliza", "/PyME/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}")%>'></asp:HyperLink></td>
|
||||
|
||||
</tr>
|
||||
<tr style="color: black;">
|
||||
<td></td>
|
||||
<td style="width: 30px; text-align: right;">Factura:</td>
|
||||
<td style="text-align: left; width: 80px;">
|
||||
<asp:HyperLink Target="_blank" ID="HplFacturaVenta" runat="server" Text='<%# Eval("Serie")%>' CssClass="Texto" NavigateUrl='<%# Eval("CveVenta", "/Ventas/Ventas.aspx?CveVenta={0}") %>'></asp:HyperLink></td>
|
||||
<td style="width: 50px; text-align: right;">Cliente:</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:HyperLink Target="_blank" ID="HplClienteVenta" runat="server" Text='<%# Eval("NombreComercial")%>' CssClass="Texto" NavigateUrl='<%# Eval("CveCliente", "/Ventas/Clientes.aspx?CveCliente={0}") %>'></asp:HyperLink></td>
|
||||
<td style="width: 30px; text-align: right;">Fecha:</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:Label ID="lblFechaVenta" ItemStyle-HorizontalAlign="Left" Width="70px" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Label></td>
|
||||
<td style="width: 50px; text-align: right;">Total:</td>
|
||||
<td style="width: 50px; text-align: left;">
|
||||
<asp:Label ID="lblTotalVenta" ItemStyle-HorizontalAlign="Left" Width="70px" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Label></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:Label ID="lblMoneda" ItemStyle-HorizontalAlign="Left" runat="server" Text='<%# Eval("Moneda") %>'></asp:Label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<ajax:TabPanel ID="TabP" runat="server" HeaderText="Pagos">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel ID="UpGvPagos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnContabilizarPagos" runat="server" CssClass="btn btn-success" Text="Contabilizar" />
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="GvP" runat="server" AutoGenerateColumns="False" Width="100%" CssClass="table table-advance table-hover" Style="text-align: center;" ForeColor="Black" DataKeyNames="CvePrePoliza,Fecha" OnRowDataBound="OnRowDataBound" GridLines="None" ShowHeader="false">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Panel ID="PnlDetallePagos" runat="server">
|
||||
<asp:GridView ID="GvD" runat="server" AutoGenerateColumns="false" CssClass="table detallerow table-hover" Style="text-align: center; float: right; width: 95%;" DataKeyNames="IdCtaContable, Cargo, Abono" GridLines="None" OnRowDataBound="GvD_RowDataBound">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="ConceptoContable" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="150px" HeaderText="Movimiento" />
|
||||
<asp:BoundField DataField="Concepto" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Left" HeaderText="Concepto" />
|
||||
<asp:BoundField DataField="SubProyecto" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="100px" HeaderText="SubProyecto" />
|
||||
<asp:BoundField DataField="" ItemStyle-Font-Size="Smaller" ItemStyle-Font-Italic="true" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="150px" HeaderText="Cuenta" />
|
||||
<asp:BoundField DataField="Cargo" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" DataFormatString="{0:N2}" HeaderText="Cargos" />
|
||||
<asp:BoundField DataField="Abono" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" DataFormatString="{0:N2}" HeaderText="Abonos" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</asp:Panel>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr class="SubTotales">
|
||||
<td style="width: 25px;">
|
||||
<asp:CheckBox ID="Chk" runat="server" />
|
||||
</td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr style="background-color: #949494; color: black;">
|
||||
<td style="width: 50px"></td>
|
||||
<td style="width: 30px; text-align: right;">Fecha:</td>
|
||||
<td style="text-align: left; width: 80px;">
|
||||
<asp:TextBox ID="TxtFechaPagos" ItemStyle-HorizontalAlign="Left" Width="70px" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:TextBox></td>
|
||||
<td style="width: 50px; text-align: right;">Concepto:</td>
|
||||
<td style="width: 400px; text-align: left;">
|
||||
<asp:TextBox ID="TxtConceptoPagos" ItemStyle-HorizontalAlign="Left" Width="400px" runat="server" Text='<%# Eval("Concepto") %>'></asp:TextBox></td>
|
||||
<td style="width: 100px; text-align: right;">Poliza: </td>
|
||||
<td style="width: 70px; text-align: left;"><asp:Literal ID="LtPolizaTipoPagos" Text='<%# Eval("TipoPoliza", "{0:d}") %>' runat="server"></asp:Literal></td>
|
||||
<td style="width: 70px; text-align: left;"><asp:HyperLink ID="HplEdicion" runat="server" Target="_blank" CssClass="Texto" Visible="false" Text="Editar" NavigateUrl='<%# Eval("CvePrePoliza", "/PyME/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}")%>'></asp:HyperLink></td>
|
||||
|
||||
</tr>
|
||||
<tr style="color: black;">
|
||||
<td></td>
|
||||
<td style="width: 30px; text-align: right;">Número:</td>
|
||||
<td style="text-align: left; width: 80px;">
|
||||
<asp:HyperLink Target="_blank" ID="HplFacturaPagos" runat="server" Text='<%# Eval("Serie")%>' CssClass="Texto" NavigateUrl='<%# Eval("CveIE", "/Bancos/IE.aspx?CveIE={0}") %>'></asp:HyperLink></td>
|
||||
<td style="width: 50px; text-align: right;">Pagador:</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:Label ID="lblClientePagos" runat="server" Text='<%# Eval("NombreComercial")%>' CssClass="Texto"></asp:Label></td>
|
||||
<td style="width: 30px; text-align: right;">Fecha:</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:Label ID="lblFechaPagos" ItemStyle-HorizontalAlign="Left" Width="70px" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Label></td>
|
||||
<td style="width: 50px; text-align: right;">Total:</td>
|
||||
<td style="width: 50px; text-align: left;">
|
||||
<asp:Label ID="lblTotalPagos" ItemStyle-HorizontalAlign="Left" Width="70px" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Label></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:Label ID="lblMoneda" ItemStyle-HorizontalAlign="Left" runat="server" Text='<%# Eval("Moneda") %>'></asp:Label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel ID="TabA" runat="server" HeaderText="Anticipos">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel ID="UpGvAnticipos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnContabilizarAnticipos" runat="server" CssClass="btn btn-success" Text="Contabilizar" />
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="GvA" runat="server" AutoGenerateColumns="False" Width="100%" CssClass="table table-advance table-hover" Style="text-align: center;" ForeColor="Black" DataKeyNames="CvePrePoliza,Fecha" OnRowDataBound="OnRowDataBound" GridLines="None" ShowHeader="false">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Panel ID="PnlDetalleAnticipos" runat="server">
|
||||
<asp:GridView ID="GvD" runat="server" AutoGenerateColumns="false" CssClass="table detallerow table-hover" Style="text-align: center; float: right; width: 95%;" DataKeyNames="IdCtaContable, Cargo, Abono" GridLines="None" OnRowDataBound="GvD_RowDataBound">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="ConceptoContable" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="150px" HeaderText="Movimiento" />
|
||||
<asp:BoundField DataField="Concepto" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Left" HeaderText="Concepto" />
|
||||
<asp:BoundField DataField="SubProyecto" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="100px" HeaderText="SubProyecto" />
|
||||
<asp:BoundField DataField="" ItemStyle-Font-Size="Smaller" ItemStyle-Font-Italic="true" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="150px" HeaderText="Cuenta" />
|
||||
<asp:BoundField DataField="Cargo" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" DataFormatString="{0:N2}" HeaderText="Cargos" />
|
||||
<asp:BoundField DataField="Abono" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" DataFormatString="{0:N2}" HeaderText="Abonos" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</asp:Panel>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr class="SubTotales">
|
||||
<td style="width: 25px;">
|
||||
<asp:CheckBox ID="Chk" runat="server" />
|
||||
</td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr style="background-color: #949494; color: black;">
|
||||
<td style="width: 50px"></td>
|
||||
<td style="width: 30px; text-align: right;">Fecha:</td>
|
||||
<td style="text-align: left; width: 80px;">
|
||||
<asp:TextBox ID="TxtFechaAnticipos" ItemStyle-HorizontalAlign="Left" Width="70px" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:TextBox></td>
|
||||
<td style="width: 50px; text-align: right;">Concepto:</td>
|
||||
<td style="width: 400px; text-align: left;">
|
||||
<asp:TextBox ID="TxtConceptoAnticipos" ItemStyle-HorizontalAlign="Left" Width="400px" runat="server" Text='<%# Eval("Concepto") %>'></asp:TextBox></td>
|
||||
<td style="width: 100px; text-align: right;">Poliza: </td>
|
||||
<td style="width: 70px; text-align: left;"><asp:Literal ID="LtPolizaTipoAnticipos" Text='<%# Eval("TipoPoliza", "{0:d}") %>' runat="server"></asp:Literal></td>
|
||||
<td style="width: 70px; text-align: left;"><asp:HyperLink ID="HplEdicion" runat="server" Target="_blank" CssClass="Texto" Visible="false" Text="Editar" NavigateUrl='<%# Eval("CvePrePoliza", "/PyME/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}")%>'></asp:HyperLink></td>
|
||||
|
||||
</tr>
|
||||
<tr style="color: black;">
|
||||
<td></td>
|
||||
<td style="width: 30px; text-align: right;">Número:</td>
|
||||
<td style="text-align: left; width: 80px;">
|
||||
<asp:HyperLink Target="_blank" ID="HplFacturaAnticipos" runat="server" Text='<%# Eval("Serie")%>' CssClass="Texto" NavigateUrl='<%# Eval("CveIE", "/Bancos/IE.aspx?CveIE={0}") %>'></asp:HyperLink></td>
|
||||
<td style="width: 50px; text-align: right;">Pagador:</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:Label ID="LblClienteAnticipos" runat="server" Text='<%# Eval("NombreComercial")%>' CssClass="Texto"></asp:Label></td>
|
||||
<td style="width: 30px; text-align: right;">Fecha:</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:Label ID="lblFechaAnticipos" ItemStyle-HorizontalAlign="Left" Width="70px" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Label></td>
|
||||
<td style="width: 50px; text-align: right;">Total:</td>
|
||||
<td style="width: 50px; text-align: left;">
|
||||
<asp:Label ID="lblTotalAnticipos" ItemStyle-HorizontalAlign="Left" Width="70px" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Label></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:Label ID="lblMoneda" ItemStyle-HorizontalAlign="Left" runat="server" Text='<%# Eval("Moneda") %>'></asp:Label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel ID="TabAm" runat="server" HeaderText="Amortizaciones">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel ID="UpGvAmortizaciones" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnContabilizarAmortizaciones" runat="server" CssClass="btn btn-success" Text="Contabilizar" />
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="GvPrePolizaAmortizaciones" runat="server" AutoGenerateColumns="False" Width="100%" CssClass="table table-advance table-hover" Style="text-align: center;" ForeColor="Black" DataKeyNames="CvePrePoliza,Fecha" OnRowDataBound="OnRowDataBound" GridLines="None" ShowHeader="false">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Panel ID="PnlDetalleAmortizaciones" runat="server">
|
||||
<asp:GridView ID="GvD" runat="server" AutoGenerateColumns="false" CssClass="table detallerow table-hover" Style="text-align: center; float: right; width: 95%;" DataKeyNames="IdCtaContable, Cargo, Abono" GridLines="None" OnRowDataBound="GvD_RowDataBound">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="ConceptoContable" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="150px" HeaderText="Movimiento" />
|
||||
<asp:BoundField DataField="Concepto" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="400px" HeaderText="Concepto" />
|
||||
<asp:BoundField DataField="SubProyecto" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="100px" HeaderText="SubProyecto" />
|
||||
<asp:BoundField DataField="" ItemStyle-Font-Size="Smaller" ItemStyle-Font-Italic="true" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="150px" HeaderText="Cuenta" />
|
||||
<asp:BoundField DataField="Cargo" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" DataFormatString="{0:N2}" HeaderText="Cargos" />
|
||||
<asp:BoundField DataField="Abono" ItemStyle-Font-Size="Smaller" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" DataFormatString="{0:N2}" HeaderText="Abonos" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</asp:Panel>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr class="SubTotales">
|
||||
<td style="width: 25px;">
|
||||
<asp:CheckBox ID="Chk" runat="server" />
|
||||
</td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr style="background-color: #949494; color: black;">
|
||||
<td style="width: 50px"></td>
|
||||
<td style="width: 30px; text-align: right;">Fecha:</td>
|
||||
<td style="text-align: left; width: 80px;">
|
||||
<asp:TextBox ID="TxtFechaAmortizaciones" ItemStyle-HorizontalAlign="Left" Width="70px" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:TextBox></td>
|
||||
<td style="width: 50px; text-align: right;">Concepto:</td>
|
||||
<td style="width: 400px; text-align: left;">
|
||||
<asp:TextBox ID="TxtConceptoAmortizaciones" ItemStyle-HorizontalAlign="Left" Width="400px" runat="server" Text='<%# Eval("Concepto") %>'></asp:TextBox></td>
|
||||
<td style="width: 100px; text-align: right;">Poliza: </td>
|
||||
<td style="width: 70px; text-align: left;"><asp:Literal ID="LtPolizaTipoAmortizaciones" Text='<%# Eval("TipoPoliza", "{0:d}") %>' runat="server"></asp:Literal></td>
|
||||
<td style="width: 70px; text-align: left;"><asp:HyperLink ID="HplEdicion" runat="server" Target="_blank" CssClass="Texto" Visible="false" Text="Editar" NavigateUrl='<%# Eval("CvePrePoliza", "/PyME/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}")%>'></asp:HyperLink></td>
|
||||
|
||||
</tr>
|
||||
<tr style="color: black;">
|
||||
<td></td>
|
||||
<td style="width: 30px; text-align: right;">Factura:</td>
|
||||
<td style="text-align: left; width: 80px;">
|
||||
<asp:HyperLink Target="_blank" ID="HplFacturaAmortizaciones" runat="server" Text='<%# Eval("Serie")%>' CssClass="Texto" NavigateUrl='<%# Eval("CveVenta", "/Ventas/Ventas.aspx?CveVenta={0}") %>'></asp:HyperLink></td>
|
||||
<td style="width: 50px; text-align: right;">Cliente:</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:HyperLink Target="_blank" ID="HplClienteAmortizaciones" runat="server" Text='<%# Eval("NombreComercial")%>' CssClass="Texto" NavigateUrl='<%# Eval("CveCliente", "/Ventas/Clientes.aspx?CveCliente={0}") %>'></asp:HyperLink></td>
|
||||
<td style="width: 30px; text-align: right;">Fecha:</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:Label ID="lblFechaAmortizaciones" ItemStyle-HorizontalAlign="Left" Width="70px" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Label></td>
|
||||
<td style="width: 50px; text-align: right;">Total:</td>
|
||||
<td style="width: 50px; text-align: left;">
|
||||
<asp:Label ID="lblTotalAmortizaciones" ItemStyle-HorizontalAlign="Left" Width="70px" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Label></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:Label ID="lblMoneda" ItemStyle-HorizontalAlign="Left" runat="server" Text='<%# Eval("Moneda") %>'></asp:Label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
</ajax:TabContainer>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
<script type="text/javascript">
|
||||
function cargarGridHijo() {
|
||||
$('.detallerow').each(function (index) {
|
||||
var tr = $("<tr ></tr>")
|
||||
var td = $("<td colspan='99'></td>")
|
||||
var tb = $(this);
|
||||
tb.closest("tr").after(tr);
|
||||
td.append(tb);
|
||||
tr.append(td);
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
cargarGridHijo();
|
||||
|
||||
Sys.Application.add_load(function (s, e) {
|
||||
cargarGridHijo();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</asp:Content>
|
||||
@@ -1,298 +0,0 @@
|
||||
using System;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
using System.Data;
|
||||
|
||||
public partial class Contabilidad_ContabilizacionVentas : ClsPaginas
|
||||
{
|
||||
private DataTable DTmpC
|
||||
{
|
||||
get
|
||||
{
|
||||
return (DataTable)ViewState["DTmpC"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["DTmpC"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
ClsContabilidad ObjCont = new ClsContabilidad();
|
||||
ObjCont.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa);
|
||||
string[] columnas = new string[3] { "CveCuenta", "CuentaFormato", "Nombre"};
|
||||
DTmpC = ObjCont.DtResultados.FiltraParametros("", "", columnas);
|
||||
ObjCont.Dispose();
|
||||
|
||||
DdlClientes.DataSource = get_GlobalDTCliente(UsuarioActual.CveEmpresa);
|
||||
DdlClientes.DataBind();
|
||||
|
||||
txtFechaI.Text = DateTime.Now.AddMonths(-1).FirstDayOfMonth().ToShortDateString();
|
||||
txtFechaF.Text = DateTime.Now.ToShortDateString();
|
||||
|
||||
//cargaPolizas();
|
||||
}
|
||||
|
||||
BtnContabilizarVentas.Click += new EventHandler(this.BtnGuardarVentas_Click);
|
||||
BtnContabilizarPagos.Click += new EventHandler(this.BtnGuardarPagos_Click);
|
||||
BtnContabilizarAnticipos.Click += new EventHandler(this.BtnGuardarAnticipos_Click);
|
||||
BtnContabilizarAmortizaciones.Click += new EventHandler(this.BtnGuardarAmortizaciones_Click);
|
||||
//BtnConsultar.Click += new EventHandler(this.BtnConsultar_Click);
|
||||
}
|
||||
|
||||
protected void OnRowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
GridView GvD = e.Row.FCGridView("GvD");
|
||||
int CvePrePoliza = e.Row.DataKey("CvePrePoliza").ToEntero();
|
||||
|
||||
ClsContabilidad contP = new ClsContabilidad();
|
||||
|
||||
if (contP.GetContabilizacionDiarioDetalle(CvePrePoliza))
|
||||
{
|
||||
Double Abonos = 0;
|
||||
Double Cargos = 0;
|
||||
|
||||
Abonos = contP.DtResultados.SUM("Abono");
|
||||
Cargos = contP.DtResultados.SUM("Cargo");
|
||||
|
||||
if (Cargos != Abonos)
|
||||
{
|
||||
e.Row.FCCheckBox("Chk").Visible = false;
|
||||
}
|
||||
|
||||
GvD.DataSource = contP.DtResultados;
|
||||
}
|
||||
|
||||
if (UsuarioActual.CveRol == 1 || UsuarioActual.CveUsuario == 17)
|
||||
{
|
||||
e.Row.FCHyperLink("HplEdicion").Visible = true;
|
||||
}
|
||||
|
||||
contP.Dispose();
|
||||
GvD.DataBind();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void Contabilizar(int CvePrepoliza, DateTime Fecha, string Concepto, ClsContabilidad Obj)
|
||||
{
|
||||
if (Obj.ContabilizarPrePoliza(CvePrepoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, Fecha, Concepto))
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void BtnGuardarVentas_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClsContabilidad ObjMov = new ClsContabilidad();
|
||||
|
||||
foreach (GridViewRow row in GvV.Rows)
|
||||
{
|
||||
CheckBox chk = row.FCCheckBox("Chk");
|
||||
TextBox txtFecha = row.FCTextBox("TxtFechaVentas");
|
||||
TextBox txtConcepto = row.FCTextBox("TxtConceptoVentas");
|
||||
|
||||
if (chk != null && chk.Checked)
|
||||
{
|
||||
DateTime Fecha = txtFecha.Text.ToDate();
|
||||
int CvePrepoliza = GvV.DataKeys[row.RowIndex]["CvePrePoliza"].ToString().ToEntero();
|
||||
string Concepto = txtConcepto.Text;
|
||||
|
||||
Contabilizar(CvePrepoliza, Fecha, Concepto, ObjMov);
|
||||
}
|
||||
}
|
||||
ObjMov.Dispose();
|
||||
|
||||
Alert("Se Contabilizaron Correctamente los Siguientes Folios: <br>" + ObjMov.AlertaMensaje.ToString(), ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
cargaPolizas();
|
||||
|
||||
}
|
||||
|
||||
private void BtnGuardarPagos_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClsContabilidad ObjMov = new ClsContabilidad();
|
||||
|
||||
foreach (GridViewRow row in GvP.Rows)
|
||||
{
|
||||
CheckBox chk = row.FCCheckBox("Chk");
|
||||
TextBox txtFecha = row.FCTextBox("TxtFechaPagos");
|
||||
TextBox txtConcepto = row.FCTextBox("TxtConceptoPagos");
|
||||
|
||||
if (chk != null && chk.Checked)
|
||||
{
|
||||
DateTime Fecha = txtFecha.Text.ToDate();
|
||||
int CvePrepoliza = GvP.DataKeys[row.RowIndex]["CvePrePoliza"].ToString().ToEntero();
|
||||
string Concepto = txtConcepto.Text;
|
||||
|
||||
Contabilizar(CvePrepoliza, Fecha, Concepto, ObjMov);
|
||||
}
|
||||
}
|
||||
ObjMov.Dispose();
|
||||
|
||||
Alert("Se Contabilizaron Correctamente los Siguientes Folios: <br>" + ObjMov.AlertaMensaje.ToString(), ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
cargaPolizas();
|
||||
|
||||
}
|
||||
|
||||
private void BtnGuardarAnticipos_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClsContabilidad ObjMov = new ClsContabilidad();
|
||||
|
||||
foreach (GridViewRow row in GvA.Rows)
|
||||
{
|
||||
CheckBox chk = row.FCCheckBox("Chk");
|
||||
TextBox txtFecha = row.FCTextBox("TxtFechaAnticipos");
|
||||
TextBox txtConcepto = row.FCTextBox("TxtConceptoAnticipos");
|
||||
|
||||
if (chk != null && chk.Checked)
|
||||
{
|
||||
DateTime Fecha = txtFecha.Text.ToDate();
|
||||
int CvePrepoliza = GvA.DataKeys[row.RowIndex]["CvePrePoliza"].ToString().ToEntero();
|
||||
string Concepto = txtConcepto.Text;
|
||||
|
||||
Contabilizar(CvePrepoliza, Fecha, Concepto, ObjMov);
|
||||
}
|
||||
}
|
||||
ObjMov.Dispose();
|
||||
|
||||
Alert("Se Contabilizaron Correctamente los Siguientes Folios: <br>" + ObjMov.AlertaMensaje.ToString(), ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
cargaPolizas();
|
||||
|
||||
}
|
||||
|
||||
private void BtnGuardarAmortizaciones_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClsContabilidad ObjMov = new ClsContabilidad();
|
||||
|
||||
foreach (GridViewRow row in GvPrePolizaAmortizaciones.Rows)
|
||||
{
|
||||
CheckBox chk = row.FCCheckBox("Chk");
|
||||
TextBox txtFecha = row.FCTextBox("TxtFechaAmortizaciones");
|
||||
TextBox txtConcepto = row.FCTextBox("TxtConceptoAmortizaciones");
|
||||
|
||||
if (chk != null && chk.Checked)
|
||||
{
|
||||
DateTime Fecha = txtFecha.Text.ToDate();
|
||||
int CvePrepoliza = GvPrePolizaAmortizaciones.DataKeys[row.RowIndex]["CvePrePoliza"].ToString().ToEntero();
|
||||
string Concepto = txtConcepto.Text;
|
||||
|
||||
Contabilizar(CvePrepoliza, Fecha, Concepto, ObjMov);
|
||||
}
|
||||
}
|
||||
ObjMov.Dispose();
|
||||
|
||||
Alert("Se Contabilizaron Correctamente los Siguientes Folios: <br>" + ObjMov.AlertaMensaje.ToString(), ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
cargaPolizas();
|
||||
|
||||
}
|
||||
|
||||
private void cargaPolizas()
|
||||
{
|
||||
|
||||
DateTime FechaI = txtFechaI.Text.ToDate();
|
||||
DateTime FechaF = txtFechaF.Text.ToDate();
|
||||
|
||||
ClsContabilidad cont = new ClsContabilidad();
|
||||
|
||||
// Cargamos las ventas
|
||||
if (cont.GetContabilizacionDiario(UsuarioActual.CveEmpresa, 4, FechaI, FechaF))
|
||||
{
|
||||
if (DdlClientes.SelectedValue.ToEntero() > 0)
|
||||
{
|
||||
GvV.DataSource = cont.DtResultados.FiltraParametros($"CveCliente = {DdlClientes.SelectedValue}");
|
||||
}
|
||||
else
|
||||
{
|
||||
GvV.DataSource = cont.DtResultados;
|
||||
}
|
||||
GvV.DataBind();
|
||||
}
|
||||
|
||||
// Cargamos los pagos
|
||||
if (cont.GetContabilizacionDiario(UsuarioActual.CveEmpresa, 11, FechaI, FechaF))
|
||||
{
|
||||
if (DdlClientes.SelectedValue.ToEntero() > 0)
|
||||
{
|
||||
GvP.DataSource = cont.DtResultados.FiltraParametros($"CveCliente = {DdlClientes.SelectedValue}");
|
||||
}
|
||||
else
|
||||
{
|
||||
GvP.DataSource = cont.DtResultados;
|
||||
}
|
||||
GvP.DataBind();
|
||||
}
|
||||
|
||||
// Cargamos los anticipos
|
||||
if (cont.GetContabilizacionDiario(UsuarioActual.CveEmpresa, 12, FechaI, FechaF))
|
||||
{
|
||||
if (DdlClientes.SelectedValue.ToEntero() > 0)
|
||||
{
|
||||
GvA.DataSource = cont.DtResultados.FiltraParametros($"CveCliente = {DdlClientes.SelectedValue}");
|
||||
}
|
||||
else
|
||||
{
|
||||
GvA.DataSource = cont.DtResultados;
|
||||
}
|
||||
GvA.DataBind();
|
||||
}
|
||||
|
||||
// Cargamos las amortizaciones
|
||||
if (cont.GetContabilizacionDiario(UsuarioActual.CveEmpresa, 10, FechaI, FechaF))
|
||||
{
|
||||
if (DdlClientes.SelectedValue.ToEntero() > 0)
|
||||
{
|
||||
GvPrePolizaAmortizaciones.DataSource = cont.DtResultados.FiltraParametros($"CveCliente = {DdlClientes.SelectedValue}");
|
||||
}
|
||||
else
|
||||
{
|
||||
GvPrePolizaAmortizaciones.DataSource = cont.DtResultados;
|
||||
}
|
||||
GvPrePolizaAmortizaciones.DataBind();
|
||||
}
|
||||
|
||||
cont.Dispose();
|
||||
|
||||
UpGvVentas.Update();
|
||||
UpGvPagos.Update();
|
||||
UpGvAnticipos.Update();
|
||||
UpGvAmortizaciones.Update();
|
||||
UPPTabs.Update();
|
||||
}
|
||||
|
||||
protected void BtnConsultar_Click(object sender, EventArgs e)
|
||||
{
|
||||
cargaPolizas();
|
||||
}
|
||||
|
||||
|
||||
protected void GvD_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
int cuenta = e.Row.DataKey("IdCtaContable").ToString().ToEntero();
|
||||
|
||||
|
||||
if (cuenta > 0) {
|
||||
DataRow dr = DTmpC.FiltroPrimero(String.Format("CveCuenta = {0}", cuenta));
|
||||
|
||||
if (dr != null) e.Row.Cells[3].Text = string.Format("{0}<br/>{1}", dr["CuentaFormato"], dr["Nombre"]);
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Row.Cells[0].ForeColor = System.Drawing.Color.Red;
|
||||
|
||||
((GridViewRow)((GridView)e.Row.NamingContainer).BindingContainer).FCCheckBox("Chk").Visible = false;
|
||||
}
|
||||
|
||||
if (Convert.ToDecimal(e.Row.DataKey("Cargo").ToString()) == 0) e.Row.Cells[4].Text = "";
|
||||
|
||||
if (Convert.ToDecimal(e.Row.DataKey("Abono").ToString()) == 0) e.Row.Cells[5].Text = "";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,207 +0,0 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="PlantillasPolizas.aspx.vb" Inherits="Contabilidad_PlantillasPolizas" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
<link href="/Metronic/assets/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.css" rel="stylesheet" />
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.Widthall {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollHeadInner {
|
||||
width: 100% !important;
|
||||
background-color: #dddddd;
|
||||
padding-left: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollFoot {
|
||||
display: none;
|
||||
position: static;
|
||||
}
|
||||
|
||||
.table-scrollable {
|
||||
margin: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scroll {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.table.dataTable {
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollBody table th {
|
||||
padding: 0px !important;
|
||||
padding-right: 4px !important;
|
||||
padding-left: 4px !important;
|
||||
}
|
||||
|
||||
.sinlink td a {
|
||||
pointer-events: none;
|
||||
cursor: default;
|
||||
color: black;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
.white a {
|
||||
color: white !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:HyperLink NavigateUrl="#" data-toggle="modal" data-target="#DivGoPlantillaDetalle" ID="ImgDevoluciones" runat="server"> <i class="fa fa-pencil"></i> Registrar Plantilla Póliza</asp:HyperLink>
|
||||
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Plantillas de Pólizas
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePlantillaPoliza, TipoPoliza, CveEmpresa" EmptyDataText="No se encontraron PlantillaPolizas Registrados" ToolTip="Listado de PlantillaPolizas" CssClass="table table-striped table-advance table-hoverv Widthall" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Plantilla Póliza" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlPlantillaPoliza" runat="server" Text='<%# Eval("PlantillaPoliza", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Tipo Póliza" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTipoPoliza" runat="server" Text='<%# Eval("TipoPolizaTexto", "{0:d}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaIng" runat="server" Text='<%# Eval("FechaIng", "{0:d}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Usuario" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="ImgE" OnClick="Edit_Click" runat="server" AlternateText="Editar" CausesValidation="False"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div id="DivActualizarPlantilla" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModal" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModal" runat="server">Editar Plantilla</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<asp:Literal ID="LtlPlantillaPoliza" runat="server" Text="Plantilla"></asp:Literal>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<asp:DropDownList ID="DdlTiposPoliza" CssClass="form-control input-sm select2me" runat="server" DataValueField="CveTipoPoliza" DataTextField="TipoPoliza"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button id="BtnActualizarPlantilla" runat="server" class="btn btn-success" Text="Actualizar"/>
|
||||
<button id="BtnCancelarPlantilla" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
<asp:HiddenField ID="HdnModalidad" runat="server" Value="I" ClientIDMode="Static" />
|
||||
<asp:HiddenField ID="HdnID" runat="server" Value="-1" ClientIDMode="Static" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="DivGoPlantillaDetalle" class="modal fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Label ID="Label7" runat="server" ClientIDMode="Static" Text="Selecccione Plantilla Poliza"></asp:Label></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel ID="Upplantillapoliza" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<asp:DropDownList ID="DdlPlantillaPoliza" CssClass="form-control input-sm select2me" Style="width: 400px !important" runat="server" DataValueField="CvePlantillaPoliza" DataTextField="PlantillaPoliza"></asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<asp:DropDownList ID="DdlTipoPolizaModal" CssClass="form-control input-sm select2me" runat="server" DataValueField="CveTipoPoliza" DataTextField="TipoPoliza"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button id="BtnAgregarPoliza" runat="server" class="btn btn-success" Text="Agregar"/>
|
||||
<button id="CancelarPoliza" type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script language="javascript" type="text/javascript">
|
||||
function C() {
|
||||
return confirm('¿Está seguro que desea eliminar la Plantilla y todos sus Detalles?');
|
||||
}
|
||||
</script>
|
||||
<script src="/Metronic/assets/global/scripts/datatable.js"></script>
|
||||
<script src="/Metronic/assets/global/plugins/datatables/all.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
function OrdenarGV() {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 270;
|
||||
if (Alto < 100) {
|
||||
Alto = 100;
|
||||
}
|
||||
$('#C_GvDatos').DataTable({
|
||||
scrollY: Alto + 'px',
|
||||
scrollCollapse: true,
|
||||
paging: false,
|
||||
searching: false,
|
||||
info: false
|
||||
});
|
||||
$('#C_GvDatos').parent().parent().children().first().css("position", "static");
|
||||
}
|
||||
</script>
|
||||
|
||||
</asp:Content>
|
||||
@@ -1,124 +0,0 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class Contabilidad_PlantillasPolizas
|
||||
Inherits ClsPaginas
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjPlantillaPolizas As New ClsContabilidad
|
||||
If ObjPlantillaPolizas.GetConta_PlantillasPolizasEmpresas(-1, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
GvDatos.DataSource = ObjPlantillaPolizas.DtResultados
|
||||
GvDatos.DataBind()
|
||||
|
||||
If ObjPlantillaPolizas.GetConta_PlantillasPolizas(-1, -1) Then
|
||||
DdlPlantillaPoliza.DataSource = ObjPlantillaPolizas.DtResultados.FiltraParametros("CvePlantillaPoliza NOT IN (1,2,3,4,7,10,11,12,32,60)", "", {"CvePlantillaPoliza", "PlantillaPoliza"})
|
||||
DdlPlantillaPoliza.DataBind()
|
||||
End If
|
||||
|
||||
If ObjPlantillaPolizas.GetConta_TiposPoliza(UsuarioActual.CveEmpresa) Then
|
||||
DdlTiposPoliza.DataSource = ObjPlantillaPolizas.DtResultados.FiltraParametros($"CveEmpresa={UsuarioActual.CveEmpresa} OR CveEmpresa IS NULL")
|
||||
DdlTipoPolizaModal.DataSource = ObjPlantillaPolizas.DtResultados.FiltraParametros($"CveEmpresa={UsuarioActual.CveEmpresa} OR CveEmpresa IS NULL")
|
||||
DdlTiposPoliza.DataBind()
|
||||
DdlTipoPolizaModal.DataBind()
|
||||
End If
|
||||
Else
|
||||
Me.GvDatos.DataSource = Nothing
|
||||
End If
|
||||
OrdenaDatos()
|
||||
UpDatos.Update()
|
||||
ObjPlantillaPolizas.Dispose()
|
||||
End Sub
|
||||
|
||||
Private Sub BtnAgregarPoliza_Click(sender As Object, e As EventArgs) Handles BtnAgregarPoliza.Click
|
||||
Dim ObjPlantillaPolizas As New ClsContabilidad
|
||||
|
||||
If ObjPlantillaPolizas.AddConta_PlantillasPolizasEmpresas(DdlPlantillaPoliza.SelectedValue.ToEntero, DdlTipoPolizaModal.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
Response.Redirect(String.Format("/Contabilidad/PlantillasPolizasDetalle.aspx?CvePlantillaPoliza={0}", DdlPlantillaPoliza.SelectedValue))
|
||||
Else
|
||||
Alert("Ocurrió un error al agregar la plantilla.", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjPlantillaPolizas.Dispose()
|
||||
End Sub
|
||||
|
||||
Private Sub BtnActualizarPlantilla_Click(sender As Object, e As EventArgs) Handles BtnActualizarPlantilla.Click
|
||||
Dim ObjPlantillaPolizas As New ClsContabilidad
|
||||
|
||||
If ObjPlantillaPolizas.UpdateConta_PlantillasPolizasEmpresas(DdlPlantillaPoliza.SelectedValue.ToEntero, DdlTiposPoliza.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivActualizarPlantilla"))
|
||||
CargaDatos()
|
||||
Alert("La plantilla se actualizó correctamente.")
|
||||
Else
|
||||
Alert("Ocurrió un error al agregar la plantilla.", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjPlantillaPolizas.Dispose()
|
||||
End Sub
|
||||
|
||||
#Region "G V D A T O S"
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.Cells(5).Width = Unit.Pixel(40)
|
||||
e.Row.Cells(6).Width = Unit.Pixel(40)
|
||||
End If
|
||||
|
||||
If e.Row.DataKey("CveEmpresa").ToEntero = 1 Then
|
||||
e.Row.FCLinkButton("ImgE").Visible = False
|
||||
e.Row.FCLinkButton("ImgD").Visible = False
|
||||
End If
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||
e.Row.FCLiteral("LtlPlantillaPoliza").Text = "<a class=""Texto"" href=""/Contabilidad/PlantillasPolizasDetalle.aspx?CvePlantillaPoliza=" & e.Row.DBCampo("CvePlantillaPoliza") & """>" & e.Row.FCLiteral("LtlPlantillaPoliza").Text & "</a>"
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||
Dim ObjPlantillaPolizas As New ClsContabilidad
|
||||
If ObjPlantillaPolizas.RemoveConta_PlantillasPolizasDetalle(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
||||
If ObjPlantillaPolizas.RemoveConta_PlantillasPolizas(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
GvDatos.EditIndex = -1
|
||||
GlobalDTContaPlantillasPolizas(UsuarioActual.CveEmpresa) = ObjPlantillaPolizas.DtResultados
|
||||
CargaDatos()
|
||||
Alert("La Plantilla Poliza se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
End If
|
||||
ObjPlantillaPolizas.Dispose()
|
||||
End Sub
|
||||
|
||||
Public Sub Edit_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
|
||||
DdlTiposPoliza.SelectedValueExist(GvRow.DataKey("TipoPoliza"))
|
||||
|
||||
UpModal.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivActualizarPlantilla"))
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " O R D E N A M I E N T O JAVASCRIPT"
|
||||
Private Sub OrdenaDatos()
|
||||
If (GvDatos.Rows.Count > 0) Then
|
||||
GvDatos.UseAccessibleHeader = True
|
||||
GvDatos.HeaderRow.TableSection = TableRowSection.TableHeader
|
||||
RegistraScript("OrdenarGV();")
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
@@ -1,377 +0,0 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="PlantillasPolizasDetalle.aspx.vb" Inherits="Contabilidad_PlantillasPolizasDetalle" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
<link href="/Metronic/assets/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.css" rel="stylesheet" />
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.Widthall {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollHeadInner {
|
||||
width: 100% !important;
|
||||
background-color: #dddddd;
|
||||
padding-left: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollFoot {
|
||||
display: none;
|
||||
position: static;
|
||||
}
|
||||
|
||||
.table-scrollable {
|
||||
margin: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scroll {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.table.dataTable {
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollBody table th {
|
||||
padding: 0px !important;
|
||||
padding-right: 4px !important;
|
||||
padding-left: 4px !important;
|
||||
}
|
||||
|
||||
.sinlink td a {
|
||||
pointer-events: none;
|
||||
cursor: default;
|
||||
color: black;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
.white a {
|
||||
color: white !important;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
<li>
|
||||
<asp:HyperLink NavigateUrl="/Contabilidad/PlantillasPolizas.aspx" runat="server"><i class="fa fa-list"></i> Plantilla Póliza Listado</asp:HyperLink>
|
||||
</li>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Pantillas de Pólizas
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarSucursalModal" OnClick="BtnAgregarSucursalModal_Click" data-toggle="tooltip" data-placement="left" title="Agregar un Concepto a la Póliza." Text="<i class='fa fa-plus'></i> Agregar Concepto"></asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table class="table table-striped Widthall">
|
||||
<tr>
|
||||
<td>
|
||||
<table>
|
||||
<tr id="TRClave" runat="server">
|
||||
<td>
|
||||
<asp:Label ID="Label1" runat="server" Text="Clave Póliza:"></asp:Label>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtClave" type="number" runat="server" Width="300px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="rfvClave" runat="server" ControlToValidate="TxtPlantillaPoliza" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Clave Póliza''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoClave" runat="server" HighlightCssClass="vco" TargetControlID="rfvClave" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
|
||||
<td>
|
||||
<asp:Label ID="LblPlantillaPoliza" runat="server" Text="Plantilla Póliza:"></asp:Label>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtPlantillaPoliza" runat="server" Width="300px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVPP" runat="server" ControlToValidate="TxtPlantillaPoliza" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Plantilla Póliza''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEPP" runat="server" HighlightCssClass="vco" TargetControlID="RFVPP" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<table id="tableopcional" runat="server">
|
||||
<tr>
|
||||
<td>
|
||||
<asp:Label ID="LblTipoPoliza" runat="server" Text="Tipo de Póliza:"></asp:Label>
|
||||
</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlTipoPoliza" runat="server" AppendDataBoundItems="true" DataTextField="Tipo" DataValueField="Id" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 95px !important;">
|
||||
<asp:ListItem Value="-1" Text="Seleccione" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Value="2" Text="Egreso"></asp:ListItem>
|
||||
<asp:ListItem Value="1" Text="Ingreso"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlTipoPoliza" runat="server" ControlToValidate="DdlTipoPoliza" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Póliza''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCODdlTipoPoliza" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlTipoPoliza" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:Label ID="LblTPP" runat="server" Text="Tipo Plantilla:"></asp:Label>
|
||||
</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlTPP" runat="server" AppendDataBoundItems="true" DataTextField="TipoPlantillaPoliza" DataValueField="CveTipoPlantillaPoliza" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 138px !important;">
|
||||
<asp:ListItem Value="-1" Text="Seleccione" Selected="True"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlTPP" runat="server" ControlToValidate="DdlTPP" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Plantilla''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEDdlTPP" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlTPP" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:Label ID="LblEstatus" runat="server" Text="Estatus:"></asp:Label>
|
||||
</td>
|
||||
<td>
|
||||
<asp:CheckBox ID="ChkEstatus" Checked="true" runat="server" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:Label ID="LblFechaIng" runat="server" Text="Fecha:"></asp:Label>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtFechaIng" runat="server" Enabled="false"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:Label ID="LblUsuario" runat="server" Enabled="false" Text="Usuario:"></asp:Label>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtUsuario" runat="server" Enabled="false"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePlantillaPolizaDetalle, TipoMovimiento, CveSubProyecto, CveProveedor, CvePersonal, CveConcepto, IdCtaContable, Orden" EmptyDataText="No se encontraron Plantilla de Pólizas Registradas" ToolTip="Listado de Plantilla de Pólizas" CssClass="table table-striped table-advance table-hover Widthall" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Concepto Contable">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlConcepto" runat="server" Text='<%# Eval("ConceptoContable", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Tipo Movimiento">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTipoMovto" runat="server" Text='<%# Eval("TipoMovimiento", "{0}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Cuenta Contable">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCtaContable" runat="server" Text='<%# Eval("IdCtaContable", "{0}") %>'>></asp:Literal>
|
||||
</ItemTemplate>
|
||||
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="100px" HeaderText="SubProyecto">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSubProyecto" runat="server" Text='<%# Eval("SubProyecto") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="100px" HeaderText="Razón Social">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlProveedor" runat="server" Text='<%# Eval("RazonSocial") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="100px" HeaderText="Personal">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlPersonal" runat="server" Text='<%# Eval("Personal") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Orden">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlOrden" runat="server" Text='<%# Eval("Orden", "{0}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Usuario">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%#Eval("Usuario")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="80px">
|
||||
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="ImgE" OnClick="Edit_Click" runat="server" AlternateText="Editar" CausesValidation="False"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<asp:Button ID="BtnGuardar" runat="server" Text="Guardar" OnClick="BtnGuardar_Click" ValidationGroup="GrpGuardar" class="btn btn-primary" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<div id="divAgregarSucursal" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModal" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModal" runat="server">Agregar Concepto Contable</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlConcepto" CssClass="form-control input-sm select2me js-concepto-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="ConceptoContable" DataValueField="CveConceptoContable" Width="240px" ValidationGroup="GrpAgregar" AutoPostBack="true"></asp:DropDownList>
|
||||
<label for="<%= DdlConcepto.ClientID.ToString()%>">Concepto Contable</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlTipoMovimiento" CssClass="form-control input-sm select2me js-movimiento-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="TipoMovimiento" DataValueField="CveTipoMovimiento" Width="240px" ValidationGroup="GrpAgregar">
|
||||
<asp:ListItem Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Abono" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Cargo" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlTipoMovimiento.ClientID.ToString()%>">Tipo Movimiento:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlCtaContable" CssClass="form-control input-sm select2me js-cuenta-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" Width="240px" ValidationGroup="GrpAgregar"></asp:DropDownList>
|
||||
<label for="<%= DdlCtaContable.ClientID.ToString()%>">Cuenta Contable:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DDLSubProyecto" CssClass="form-control input-sm select2me js-subproyecto-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="240px" ValidationGroup="GrpAgregar"></asp:DropDownList>
|
||||
<label for="<%= DDLSubProyecto.ClientID.ToString()%>">SubProyecto:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DDLProveedor" CssClass="form-control input-sm select2me js-referencia-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="RazonSocial" DataValueField="CveProveedor" Width="240px" ValidationGroup="GrpAgregar"></asp:DropDownList>
|
||||
<label id="LblProveedor" runat="server" for="<%= DDLProveedor.ClientID.ToString()%>">Razón Social:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtOrden" CssClass="form-control " runat="server" MaxLength="4" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="TxtOrden" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Orden''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarRegistro"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtOrden.ClientID.ToString()%>">Orden:</label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlPersonal" CssClass="form-control input-sm select2me js-referencia-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="NombreCompleto" DataValueField="CvePersonal" Width="240px" ValidationGroup="GrpAgregar"></asp:DropDownList>
|
||||
<label id="LblPersonal" runat="server" for="<%= DdlPersonal.ClientID.ToString()%>">Personal:</label>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="LbAgregar" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpGuardarRegistro" />
|
||||
<button id="BtnCancelarSucursal" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
<asp:HiddenField ID="HdnModalidad" runat="server" Value="I" ClientIDMode="Static" />
|
||||
<asp:HiddenField ID="HdnID" runat="server" Value="-1" ClientIDMode="Static" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script type="text/javascript" language="javascript">
|
||||
function C() {
|
||||
return confirm('¿Está seguro que desea eliminar el Detalle de la Plantilla?');
|
||||
}
|
||||
|
||||
function validarNum(e) {
|
||||
tecla = (document.all) ? e.keyCode : e.which;
|
||||
if (tecla == 8) return true;
|
||||
patron = /\d/;
|
||||
te = String.fromCharCode(tecla);
|
||||
return patron.test(te);
|
||||
}
|
||||
function quitaNoNumero(obj) {
|
||||
patron = /\d/;
|
||||
if (!patron.test(obj.value)) {
|
||||
obj.value = "";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
function showDivEC() {
|
||||
$('#divAgregarSucursal').modal('show');
|
||||
}
|
||||
function hideDivEC() {
|
||||
$('#divAgregarSucursal').modal('hide');
|
||||
}
|
||||
|
||||
|
||||
function ShowDivRegistro() {
|
||||
$('#divAgregarSucursal').modal();
|
||||
}
|
||||
function HideDivRegistro() {
|
||||
$('#divAgregarSucursal').modal('hide');
|
||||
}
|
||||
|
||||
function SetValue(Hidden, Value) {
|
||||
document.getElementById(Hidden).value = Value;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<script src="/Metronic/assets/global/scripts/datatable.js"></script>
|
||||
<script src="/Metronic/assets/global/plugins/datatables/all.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
function OrdenarGV() {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 270;
|
||||
if (Alto < 100) {
|
||||
Alto = 100;
|
||||
}
|
||||
$('#C_GvDatos').DataTable({
|
||||
scrollY: Alto + 'px',
|
||||
scrollCollapse: true,
|
||||
paging: false,
|
||||
searching: false,
|
||||
info: false
|
||||
});
|
||||
$('#C_GvDatos').parent().parent().children().first().css("position", "static");
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
@@ -1,418 +0,0 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class Contabilidad_PlantillasPolizasDetalle
|
||||
Inherits ClsPaginas
|
||||
#Region "PROPIEDADES"
|
||||
|
||||
Private Property DTSubProyectos As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DTSubProyectos"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DTSubProyectos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property DTCuentasContables As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DTCuentasContables"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DTCuentasContables") = value
|
||||
End Set
|
||||
End Property
|
||||
Private ReadOnly Property CvePlantillaPoliza As Integer
|
||||
Get
|
||||
Return ViewState("CvePlantillaPoliza").ToString.ToEntero
|
||||
End Get
|
||||
End Property
|
||||
Public Property DTDetalle As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DTDetalle"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DTDetalle") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
ViewState("Orden") = ""
|
||||
TxtFechaIng.Text = Date.Today.ToString("dd/MM/yyyy")
|
||||
TxtUsuario.Text = UsuarioActual.CveUsuario.ToString
|
||||
CreadDTDetalle()
|
||||
|
||||
Dim ObjPlantillaPolizasTipo As New ClsContabilidad
|
||||
If ObjPlantillaPolizasTipo.GetConta_PlantillasPolizasTipo() Then
|
||||
Dim row As DataRow = ObjPlantillaPolizasTipo.DtResultados().NewRow()
|
||||
row("CveTipoPlantillaPoliza") = -1
|
||||
row("TipoPlantillaPoliza") = "Seleccione"
|
||||
ObjPlantillaPolizasTipo.DtResultados.Rows.Add(row)
|
||||
ObjPlantillaPolizasTipo.DtResultados.AcceptChanges()
|
||||
DdlTPP.DataSource = ObjPlantillaPolizasTipo.DtResultados()
|
||||
DdlTPP.DataBind()
|
||||
End If
|
||||
ObjPlantillaPolizasTipo.Dispose()
|
||||
|
||||
Dim dt As DataTable = Nothing
|
||||
If UsuarioActual.Empresa.UsaContabilidad Then
|
||||
Dim Conta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
If Conta.GetCuentas(-1, "-1", 1) Then
|
||||
dt = Conta.DtResultados
|
||||
DTCuentasContables = Conta.DtResultados
|
||||
Session("DtCuentas") = Conta.DtResultados
|
||||
End If
|
||||
Conta.Dispose()
|
||||
End If
|
||||
CargaCuenta()
|
||||
CargaDDL()
|
||||
CargaDDLProveedor()
|
||||
CargarConcepto()
|
||||
ViewState("CvePlantillaPoliza") = 0
|
||||
|
||||
If Request("CvePlantillaPoliza") IsNot Nothing AndAlso IsNumeric(Request("CvePlantillaPoliza")) AndAlso Request("CvePlantillaPoliza").ToEntero > 0 Then
|
||||
ViewState("CvePlantillaPoliza") = Request("CvePlantillaPoliza")
|
||||
TRClave.Visible = False
|
||||
TxtPlantillaPoliza.Enabled = False
|
||||
DdlTipoPoliza.Enabled = False
|
||||
DdlTPP.Enabled = False
|
||||
ChkEstatus.Enabled = False
|
||||
BtnGuardar.Visible = False
|
||||
tableopcional.Visible = False
|
||||
CargaDatos()
|
||||
CargaDatosPoliza(CvePlantillaPoliza)
|
||||
Else
|
||||
ViewState("CvePlantillaPoliza") = -1
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "C A R G A - D A T O S"
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjPlantillaPolizaDetalle As New ClsContabilidad
|
||||
If ObjPlantillaPolizaDetalle.GetConta_PlantillasPolizasDetalle(CvePlantillaPoliza, UsuarioActual.CveEmpresa) Then
|
||||
GvDatos.DataSource = ObjPlantillaPolizaDetalle.DtResultados
|
||||
ObjPlantillaPolizaDetalle.Dispose()
|
||||
GvDatos.DataBind()
|
||||
Else
|
||||
Me.GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
OrdenaDatos()
|
||||
End Sub
|
||||
Public Sub CargaDatosPoliza(CvePlantillaPoliza As Integer)
|
||||
Dim ObjPlantillaPolizas As New ClsContabilidad
|
||||
If ObjPlantillaPolizas.GetConta_PlantillasPolizas(CvePlantillaPoliza, -1) Then
|
||||
TxtPlantillaPoliza.Text = ObjPlantillaPolizas.PlantillaPoliza
|
||||
DdlTipoPoliza.SelectedValue = ObjPlantillaPolizas.TipoPoliza.ToString
|
||||
DdlTPP.SelectedValue = ObjPlantillaPolizas.CveTipoPlantillaPoliza.ToString
|
||||
If ObjPlantillaPolizas.Estatus = "Activo" Then
|
||||
ChkEstatus.Checked = True
|
||||
End If
|
||||
TxtFechaIng.Text = ObjPlantillaPolizas.FechaIng.ToShortDateString
|
||||
TxtUsuario.Text = ObjPlantillaPolizas.Usuario
|
||||
BtnGuardar.Text = "Actualizar"
|
||||
Else
|
||||
End If
|
||||
|
||||
ObjPlantillaPolizas.Dispose()
|
||||
End Sub
|
||||
|
||||
Private Sub LimpiaDatos()
|
||||
TxtPlantillaPoliza.Text = ""
|
||||
DdlTipoPoliza.SelectedValue = "-1"
|
||||
DdlTPP.SelectedValue = "-1"
|
||||
ChkEstatus.Checked = False
|
||||
ViewState("CvePlantillaPoliza") = -1
|
||||
GvDatos.DataSource = Nothing
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCuenta()
|
||||
DdlCtaContable.Items.Clear()
|
||||
DdlCtaContable.DataSource = DTCuentasContables
|
||||
DdlCtaContable.DataBind()
|
||||
DdlCtaContable.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
|
||||
Private Sub CargarConcepto()
|
||||
DdlConcepto.DataSource = GlobalDTContaConceptosContables(-1)
|
||||
DdlConcepto.DataBind()
|
||||
End Sub
|
||||
|
||||
Private Sub CreadDTDetalle()
|
||||
DTDetalle = New DataTable
|
||||
DTDetalle.Columns.Add("CvePlantillaPolizaDetalle", GetType(Integer)) 'Consec
|
||||
DTDetalle.Columns.Add("ConceptoContable", GetType(String))
|
||||
DTDetalle.Columns.Add("CveConcepto", GetType(Integer))
|
||||
DTDetalle.Columns.Add("TipoMovimiento", GetType(String))
|
||||
DTDetalle.Columns.Add("TipoMovto", GetType(Integer))
|
||||
DTDetalle.Columns.Add("IdCtaContable", GetType(Integer))
|
||||
DTDetalle.Columns.Add("Orden", GetType(String))
|
||||
DTDetalle.Columns.Add("Usuario", GetType(String))
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
|
||||
Dim ObjPlantillaPoliza As New ClsContabilidad
|
||||
Dim ErrorPlantilla = False
|
||||
Dim CvePlantilla = -1
|
||||
ObjPlantillaPoliza.IniciaTransacSQL()
|
||||
|
||||
If CvePlantillaPoliza < 0 Then
|
||||
If ObjPlantillaPoliza.AddConta_PlantillasPolizas(TxtClave.Text.ToEntero, TxtPlantillaPoliza.Text.Trim, DdlTPP.SelectedValue.ToEntero, DdlTipoPoliza.SelectedValue.ToEntero, ChkEstatus.Checked, TxtFechaIng.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
CvePlantilla = ObjPlantillaPoliza.CvePlantillaPoliza
|
||||
If DTDetalle.Rows.Count > 0 Then
|
||||
For Each Row As DataRow In DTDetalle.Rows
|
||||
If Not ObjPlantillaPoliza.AddConta_PlantillasPolizasDetalles(CvePlantilla, Row("CveConcepto").ToString.ToEntero, Row("TipoMovto").ToString.ToEntero, Row("IdCtaContable").ToString.ToEntero, Row("Orden").ToString.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DDLSubProyecto.SelectedValue.ToEntero, DDLProveedor.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero) Then
|
||||
ErrorPlantilla = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Else
|
||||
ErrorPlantilla = True
|
||||
End If
|
||||
|
||||
Else
|
||||
If ObjPlantillaPoliza.UpdateConta_PlantillasPolizas(TxtPlantillaPoliza.Text.Trim, DdlTPP.SelectedValue.ToEntero, DdlTipoPoliza.SelectedValue.ToEntero, ChkEstatus.Checked, CvePlantillaPoliza) Then
|
||||
ObjPlantillaPoliza.Commit()
|
||||
ObjPlantillaPoliza.Dispose()
|
||||
LimpiaDatos()
|
||||
Alert("La Plantilla Póliza y sus Detalles fueron Actualizados correctamente.", TipoMensaje.MsgInformacion, "document.location.href=""/Contabilidad/PlantillasPolizas.aspx?"";")
|
||||
Exit Sub
|
||||
Else
|
||||
ErrorPlantilla = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If Not ErrorPlantilla Then
|
||||
ObjPlantillaPoliza.Commit()
|
||||
LimpiaDatos()
|
||||
Alert("La Plantilla Póliza y su Detalle fue agregado correctamente.", TipoMensaje.MsgInformacion, "document.location.href=""/Contabilidad/PlantillasPolizas.aspx?"";")
|
||||
Else
|
||||
ObjPlantillaPoliza.RollBack()
|
||||
Alert("Error al agregar la Plantilla Póliza y el Detalle.", TipoMensaje.MsgError)
|
||||
End If
|
||||
ObjPlantillaPoliza.Dispose()
|
||||
End Sub
|
||||
Public Sub updatatos()
|
||||
|
||||
Dim ObjPlantillaPolizaDetalle As New ClsContabilidad
|
||||
If ObjPlantillaPolizaDetalle.GetConta_PlantillasPolizasDetalle(-1, -1) Then
|
||||
ViewState("DTPlantillaPolizaDetalle") = ObjPlantillaPolizaDetalle.DtResultados.FiltraParametros(String.Format(" CvePlantillaPoliza={0} AND CveEmpresa = {1}", CvePlantillaPoliza, UsuarioActual.CveEmpresa))
|
||||
|
||||
GlobalDTContaPlantillasPolizasDetalle(CvePlantillaPoliza) = ObjPlantillaPolizaDetalle.DtResultados
|
||||
End If
|
||||
If ObjPlantillaPolizaDetalle.GetConta_PlantillasPolizas(-1, -1) Then
|
||||
GlobalDTContaPlantillasPolizas(UsuarioActual.CveEmpresa) = ObjPlantillaPolizaDetalle.DtResultados
|
||||
End If
|
||||
ObjPlantillaPolizaDetalle.Dispose()
|
||||
End Sub
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
OcultaDiv()
|
||||
Dim ObjPlantillaPolizaDetalle As New ClsContabilidad
|
||||
Dim Row As DataRow
|
||||
Dim ErrorActualizar = False
|
||||
Dim ErrorDetalle = False
|
||||
|
||||
|
||||
If HdnModalidad.Value = "I" Then
|
||||
If CvePlantillaPoliza > 0 Then
|
||||
If ObjPlantillaPolizaDetalle.AddConta_PlantillasPolizasDetalles(CvePlantillaPoliza, DdlConcepto.SelectedValue.ToEntero, DdlTipoMovimiento.SelectedValue.ToEntero, DdlCtaContable.SelectedValue.ToEntero, TxtOrden.Text.Trim.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DDLSubProyecto.SelectedValue.ToEntero, DDLProveedor.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero) Then
|
||||
TxtOrden.Text = ""
|
||||
updatatos()
|
||||
Alert("El nuevo Registro se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpTitulos.Update()
|
||||
Else
|
||||
ErrorDetalle = True
|
||||
End If
|
||||
Else
|
||||
Try
|
||||
Row = DTDetalle.NewRow
|
||||
Row("CvePlantillaPolizaDetalle") = DTDetalle.Rows.Count + 1
|
||||
Row("ConceptoContable") = DdlConcepto.SelectedItem.ToString
|
||||
Row("CveConcepto") = DdlConcepto.SelectedValue.ToEntero
|
||||
Row("TipoMovimiento") = DdlTipoMovimiento.SelectedItem.ToString
|
||||
Row("TipoMovto") = DdlTipoMovimiento.SelectedValue.ToEntero
|
||||
Row("IdCtaContable") = DdlCtaContable.SelectedValue.ToEntero
|
||||
Row("Orden") = TxtOrden.Text.Trim.ToEntero
|
||||
Row("Usuario") = UsuarioActual.Usuario
|
||||
|
||||
DTDetalle.Rows.Add(Row)
|
||||
|
||||
TxtOrden.Text = ""
|
||||
UpTitulos.Update()
|
||||
Catch ex As Exception
|
||||
ErrorDetalle = True
|
||||
End Try
|
||||
End If
|
||||
Else
|
||||
If HdnID.Value.ToEntero <> -1 Then
|
||||
If CvePlantillaPoliza > 0 Then
|
||||
If ObjPlantillaPolizaDetalle.UpdateConta_PlantillasPolizasDetalle(DdlConcepto.SelectedValue.ToEntero, DdlTipoMovimiento.SelectedValue.ToEntero, DdlCtaContable.SelectedValue.ToEntero, TxtOrden.Text.Trim.ToEntero,
|
||||
HdnID.Value.ToEntero, DDLSubProyecto.SelectedValue.ToEntero, DDLProveedor.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero) Then
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
updatatos()
|
||||
Else
|
||||
ErrorActualizar = True
|
||||
End If
|
||||
Else
|
||||
Try
|
||||
Row = DTDetalle.NewRow
|
||||
Row("CvePlantillaPolizaDetalle") = DTDetalle.Rows.Count + 1
|
||||
Row("ConceptoContable") = DdlConcepto.SelectedItem.ToString
|
||||
Row("CveConcepto") = DdlConcepto.SelectedValue.ToEntero
|
||||
Row("TipoMovimiento") = DdlTipoMovimiento.SelectedItem.ToString
|
||||
Row("TipoMovto") = DdlTipoMovimiento.SelectedValue.ToEntero
|
||||
Row("IdCtaContable") = DdlCtaContable.SelectedValue.ToEntero
|
||||
Row("Orden") = TxtOrden.Text.Trim.ToEntero
|
||||
Row("Usuario") = UsuarioActual.Usuario
|
||||
DTDetalle.Rows.Add(Row)
|
||||
Catch ex As Exception
|
||||
ErrorActualizar = True
|
||||
End Try
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
ObjPlantillaPolizaDetalle.Dispose()
|
||||
|
||||
CargaDatos()
|
||||
UpDatos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
#Region "G V - D A T O S"
|
||||
|
||||
|
||||
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
Dim Cuenta As Integer = e.Row.DataKey("IdCtaContable").ToString.ToEntero
|
||||
e.Row.FCLiteral("LtlCtaContable").Text = DTCuentasContables.FiltroPrimeroValor("Nombre", $"Id = {Cuenta}")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||
Dim ObjPlantillaPolizaDetalle As New ClsContabilidad
|
||||
If CvePlantillaPoliza > 0 Then
|
||||
If ObjPlantillaPolizaDetalle.RemoveConta_PlantillasPolizasDetalle(CvePlantillaPoliza, GvDatos.Rows(e.RowIndex).DataKey("CvePlantillaPolizaDetalle").ToString.ToEntero) Then
|
||||
GvDatos.EditIndex = -1
|
||||
updatatos()
|
||||
Alert("El Concepto se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
Else
|
||||
Dim index = GvDatos.Rows(e.RowIndex).DataKey("CvePlantillaPolizaDetalle").ToString.ToEntero - 1
|
||||
DTDetalle.Rows.RemoveAt(index)
|
||||
End If
|
||||
ObjPlantillaPolizaDetalle.Dispose()
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Public Sub CargaDDL()
|
||||
|
||||
|
||||
DTSubProyectos = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
DDLSubProyecto.DataSource = DTSubProyectos
|
||||
DDLSubProyecto.DataBind()
|
||||
DDLSubProyecto.Items.Insert(0, New ListItem(" - ", "-1"))
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaDDLProveedor()
|
||||
DDLProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
||||
DDLProveedor.DataBind()
|
||||
DDLProveedor.Items.Insert(0, New ListItem(" - ", "-1"))
|
||||
DdlPersonal.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa)
|
||||
DdlPersonal.DataBind()
|
||||
DdlPersonal.Items.Insert(0, New ListItem(" - ", "-1"))
|
||||
End Sub
|
||||
|
||||
Private Sub DdlConcepto_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlConcepto.SelectedIndexChanged
|
||||
If DdlConcepto.SelectedValue.Contiene("130", "29") Then
|
||||
DdlPersonal.Visible = True
|
||||
LblPersonal.Visible = True
|
||||
Else
|
||||
DdlPersonal.Visible = False
|
||||
LblPersonal.Visible = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
#Region " O R D E N A M I E N T O JAVASCRIPT"
|
||||
Private Sub OrdenaDatos()
|
||||
If (GvDatos.Rows.Count > 0) Then
|
||||
GvDatos.UseAccessibleHeader = True
|
||||
GvDatos.HeaderRow.TableSection = TableRowSection.TableHeader
|
||||
RegistraScript("OrdenarGV();")
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Private Sub OcultaDiv()
|
||||
ScriptManager.RegisterStartupScript(Me, Me.GetType, "Llave", "HideDivRegistro();", True)
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub Edit_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
HdnModalidad.Value = "U"
|
||||
HdnID.Value = GvRow.DataKey("CvePlantillaPolizaDetalle")
|
||||
DdlConcepto.SelectedValueExist(GvRow.DataKey("CveConcepto"))
|
||||
DdlTipoMovimiento.SelectedValueExist(IIf(GvRow.DataKey("TipoMovimiento") = "Abono", 1, 0).ToString)
|
||||
DdlCtaContable.SelectedValueExist(GvRow.DataKey("IdCtaContable"))
|
||||
DDLSubProyecto.SelectedValueExist(GvRow.DataKey("CveSubProyecto"))
|
||||
TxtOrden.Text = GvRow.DataKey("Orden")
|
||||
LbAgregar.Text = "Actualizar"
|
||||
LtlTituloModal.Text = String.Format("{0}{1}", "Actualizar Concepto: ", DdlConcepto.SelectedItem)
|
||||
|
||||
If DdlConcepto.SelectedValue.Contiene("130", "29") Then
|
||||
DdlPersonal.SelectedValueExist(GvRow.DataKey("CvePersonal"))
|
||||
DdlPersonal.Visible = True
|
||||
LblPersonal.Visible = True
|
||||
Else
|
||||
DdlPersonal.SelectedIndex = 0
|
||||
DdlPersonal.Visible = False
|
||||
LblPersonal.Visible = False
|
||||
End If
|
||||
UpModal.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "divAgregarSucursal"))
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
Public Sub BtnAgregarSucursalModal_Click(sender As Object, e As EventArgs)
|
||||
DdlPersonal.Visible = False
|
||||
LblPersonal.Visible = False
|
||||
LbAgregar.Text = "Agregar"
|
||||
LtlTituloModal.Text = "Agregar Concepto Contable"
|
||||
DdlConcepto.SelectedIndex = 0
|
||||
DdlTipoMovimiento.SelectedIndex = 0
|
||||
DdlCtaContable.SelectedIndex = 0
|
||||
DDLSubProyecto.SelectedIndex = 0
|
||||
DDLProveedor.SelectedIndex = 0
|
||||
DdlPersonal.SelectedIndex = 0
|
||||
TxtOrden.Text = ""
|
||||
UpModal.Update()
|
||||
HdnModalidad.Value = "I"
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "divAgregarSucursal"))
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,556 +0,0 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RegPrePoliza.aspx.vb" Inherits="Contabilidad_RegPrePoliza" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.GvMov input, .GvMov td {
|
||||
height: 20px !important;
|
||||
}
|
||||
|
||||
.GvSize tr > th:nth-child(1), .GvSize tr > th:nth-child(3), .GvSize tr > th:nth-child(5),
|
||||
.GvSize tr > td:nth-child(1), .GvSize tr > td:nth-child(3), .GvSize tr > td:nth-child(5) {
|
||||
width: 17%;
|
||||
}
|
||||
|
||||
.GvSize tr > th:nth-child(2), .GvSize tr > td:nth-child(2) {
|
||||
width: 9%;
|
||||
}
|
||||
|
||||
.GvSize tr > th:nth-child(4), .GvSize tr > th:nth-child(8),
|
||||
.GvSize tr > td:nth-child(4), .GvSize tr > td:nth-child(8) {
|
||||
width: 12%;
|
||||
}
|
||||
|
||||
.GvSize tr > th:nth-child(6), .GvSize tr > th:nth-child(7),
|
||||
.GvSize tr > td:nth-child(6), .GvSize tr > td:nth-child(7) {
|
||||
width: 8%;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
<asp:Label ID="LblEncabezado" runat="server" Text=" Registro de Póliza"></asp:Label>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td align="left" style="width: 665px;">
|
||||
|
||||
<asp:UpdatePanel ID="UPPDocumento" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div id="DivConceptoPrePoliza" runat="server" class="chequesie22">
|
||||
<div class="chequesie12">
|
||||
<div class="row">
|
||||
<label class="col-md-2 control-label text-left">Fecha: </label>
|
||||
<div class="col-md-4" style="width: 42%;">
|
||||
<div class="input-group input-small date date-picker" data-date-format="dd/mm/yyyy">
|
||||
<asp:TextBox ID="TxtFecha" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="ImgCalendario" class="btn default"><i class="fa fa-calendar"></i></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" TargetControlID="TxtFecha" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="Calendario" runat="server" TargetControlID="TxtFecha" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaDocumento" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="El campo <b>''FechaDocumento''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFechaDocumento" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="El campo <b>''FechaDocumento''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
<div class="col-md-1" style="width: 5px;">
|
||||
<asp:CheckBox ID="ChkAutoConta" runat="server"></asp:CheckBox>
|
||||
</div>
|
||||
<label class="col-md-2">AutoContabilizar</label>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="chequesie22">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-2">Observaciones:</label>
|
||||
<div class="col-md-5">
|
||||
<asp:TextBox ID="TxtObservaciones" CssClass="form-control input-sm" runat="server" MaxLength="12" Width="400px" Rows="3" TextMode="MultiLine"></asp:TextBox>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1">Movimiento:</label>
|
||||
<div class="col-md-4">
|
||||
<asp:DropDownList ID="DdlPlantilla" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="True" DataTextField="PlantillaPoliza" DataValueField="CvePlantillaPoliza" Width="250px" ValidationGroup="GrpGuardar">
|
||||
</asp:DropDownList>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row" id="trNotificar" runat="server" visible="False">
|
||||
<label class="col-md-2">Notificar:</label>
|
||||
<div class="col-md-10">
|
||||
<asp:TextBox ID="TxtNotificarA" CssClass="form-control input-sm" runat="server" MaxLength="12" Width="400px" Rows="2" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id="trCuentaDeposito" runat="server" visible="False">
|
||||
<label class="col-md-2">Cuenta Depósito:</label>
|
||||
<div class="col-md-10">
|
||||
<asp:DropDownList ID="DdlCuentaDeposito" CssClass="form-control input-sm select2me" runat="server" DataTextField="CuentaDeposito" DataValueField="CveCuentaDeposito" Width="400px" AppendDataBoundItems="True"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVCuentaDeposito" runat="server" ControlToValidate="DdlCuentaDeposito" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta de Depósito''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECuentaDeposito" runat="server" HighlightCssClass="vco" TargetControlID="RFVCuentaDeposito" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
<div class="chequesie22">
|
||||
<div class="row" id="DivAgregarConceptos" runat="server" visible="true">
|
||||
<div class="col-md-12">
|
||||
<table border="0" rules="none" style="border-collapse: collapse; min-width: 980px;" class="table table-striped GvSize mygvps Widthall">
|
||||
<tr class="Titulos TextTab">
|
||||
<th>Concepto</th>
|
||||
<th>Cta. Contable</th>
|
||||
<th>Referencia</th>
|
||||
<th>Descripción</th>
|
||||
<th>SubProyecto</th>
|
||||
<th>Cargo</th>
|
||||
<th>Abono</th>
|
||||
<th style="width: 100px;">Comandos</th>
|
||||
<th runat="server" visible="false" id="nomostrar2"></th>
|
||||
</tr>
|
||||
<tr class="TextTab">
|
||||
<th>
|
||||
<asp:DropDownList ID="DdlConceptosContables" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="ConceptoContable" DataValueField="CveConceptoContable" Width="160px">
|
||||
</asp:DropDownList><br />
|
||||
</th>
|
||||
<th>
|
||||
<asp:DropDownList ID="DdlCtaContable" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="CveCuenta" Width="160px">
|
||||
</asp:DropDownList><br />
|
||||
</th>
|
||||
<th>
|
||||
<asp:TextBox ID="TxtReferencia" runat="server" Rows="2" TextMode="MultiLine" Width="150px"></asp:TextBox>
|
||||
</th>
|
||||
<th>
|
||||
<asp:TextBox ID="TxtDescripcion" runat="server" Rows="2" TextMode="MultiLine" Width="150px"></asp:TextBox>
|
||||
</th>
|
||||
<th>
|
||||
<asp:DropDownList ID="DdlSubProyecto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="160px">
|
||||
</asp:DropDownList><br />
|
||||
</th>
|
||||
<th>
|
||||
<asp:TextBox ID="TxtCargo" runat="server" Width="76px" Height="24px"></asp:TextBox>
|
||||
</th>
|
||||
<th>
|
||||
<asp:TextBox ID="TxtAbono" runat="server" Width="76px" Height="24px"></asp:TextBox>
|
||||
</th>
|
||||
<th align="center">
|
||||
<asp:LinkButton ID="LbAgregar" runat="server" CssClass="Texto" Enabled="true" Text="Agregar"></asp:LinkButton>
|
||||
</th>
|
||||
<th runat="server" visible="false" id="nomostrar"></th>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<asp:UpdatePanel ID="UPMovs" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<input id="HdnCveCuenta" runat="server" type="hidden" value="-1" clientidmode="Static" />
|
||||
<table style="width: 100%;" class="table GvSize table-striped table-advance table-hover">
|
||||
<tr class="Titulos">
|
||||
<th>Cuenta</th>
|
||||
<th>Referencia</th>
|
||||
<th>Descripción</th>
|
||||
<th>SubProyecto</th>
|
||||
<th>Ref. Bancaria</th>
|
||||
<th>Cargo</th>
|
||||
<th>Abono</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div style="width: 100%; min-height: 200px; overflow-scrolling: auto;">
|
||||
<asp:GridView ID="GvMov" runat="server" AutoGenerateColumns="False" ShowHeader="False" DataKeyNames="IdMov,IDCuenta,Cargo,Abono,TipoMovto,CveConcepto,CveProveedor,CvePersonal" Width="100%" CssClass=" GvMov GvSize table table-striped table-advance table-hover" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Cuenta</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCuenta" runat="server" Text='<%# Eval("Cuenta") %>'></asp:Literal><br />
|
||||
<asp:Label ID="LblCuentaCon" Font-Italic="true" Font-Size="7pt" runat="server" Text='<%# Eval("CodigoCuenta") %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Referencia</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlReferencia" runat="server" Text='<%# Eval("Referencia")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Concepto</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtConcepto" runat="server" Width="150px" Text='<%# Eval("Concepto")%>'></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
<ItemStyle />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>SubProyecto</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlSubProyecto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="140px"></asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
<ItemStyle />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Ref. Bancaria</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlSaldos" CssClass="select2me" runat="server" DataValueField="CveIE" DataTextField="RazonSocialSaldo" Visible="false" Style="width: 150px;"></asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
<ItemStyle />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Cargo</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtCargo" CssClass="txtcargo" runat="server" Style="text-align: right" Width="65px" Visible="False"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Abono</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtAbono" CssClass="txtabono" runat="server" Style="text-align: right" Width="65px" Visible="False"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar">
|
||||
<ItemTemplate>
|
||||
<asp:ImageButton Visible="false" ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" ImageUrl="/Imagenes/Btn_Delete.png" OnClientClick="javascript:return C();" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UpPrePoliza" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div style="width: 100%; min-height: 200px; overflow-scrolling: auto;">
|
||||
<asp:GridView ID="GvPrePoliza" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePrePolizaDetalle, CveConceptoContable, IdCtaContable, CveSubProyecto" Width="100%" CssClass="table table-striped table-advance table-hover" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Movimiento</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlConceptoContable" runat="server" Text='<%# Eval("ConceptoContable") %>'></asp:Literal><br />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="150px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Concepto</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtConcepto" runat="server" MaxLength="100" CssClass="form-control input-sm" Text='<%# Eval("Concepto") %>'></asp:TextBox><br />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="380px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>SubProyecto</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlSubProyecto" runat="server" Width="150px" CssClass="form-control input-sm select2me" DataValueField="CveSubProyecto" DataTextField="SubProyecto"></asp:DropDownList><br />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="150px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Cuenta</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlCtaContable" runat="server" Width="200px" CssClass="form-control input-sm select2me" DataValueField="CveCuenta" DataTextField="CtaCodigo"></asp:DropDownList><br />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="200px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Cargo</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtCargo" runat="server" CssClass=" txtcargo form-control input-sm" Style="text-align: right" Text='<%# If(Eval("TipoMovto").ToString = "False", Eval("ImporteMN", "{0:N2}"), "") %>'></asp:TextBox><br />
|
||||
<asp:CompareValidator ID="CVCargo" runat="server" ControlToValidate="TxtCargo" Display="None" ErrorMessage="El campo <b>''Cargo''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCCCargo" runat="server" HighlightCssClass="vco" TargetControlID="CVCargo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Abono</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtAbono" runat="server" CssClass=" txtabono form-control input-sm" Style="text-align: right" Text='<%# If(Eval("TipoMovto").ToString = "True", Eval("ImporteMN", "{0:N2}"), "") %>'></asp:TextBox><br />
|
||||
<asp:CompareValidator ID="CVAbono" runat="server" ControlToValidate="TxtAbono" Display="None" ErrorMessage="El campo <b>''Abono''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCCAbono" runat="server" HighlightCssClass="vco" TargetControlID="CVAbono" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<table class="table table-striped table-advance table-hover Widthall">
|
||||
<tr>
|
||||
<td style="width: 730px"> </td>
|
||||
<th style="width: 70px;">
|
||||
<asp:TextBox ID="TxtTotalCargos" runat="server" Style="text-align: right" Enabled="false" Width="70px"></asp:TextBox></th>
|
||||
<th style="width: 70px;">
|
||||
<asp:TextBox ID="TxtTotalAbonos" runat="server" Style="text-align: right" Enabled="false" Width="70px"></asp:TextBox></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" style="text-align: center;">
|
||||
<asp:UpdatePanel ID="UpGuardar" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnIEGuardar" runat="server" Text="Guardar" ValidationGroup="GrpGuardar" class="btn btn-primary" />
|
||||
<asp:ValidationSummary ID="VS" runat="server" DisplayMode="BulletList" ShowSummary="true" ValidationGroup="GrpGuardar" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script src="/Metronic/assets/global/plugins/dropzone/dropzone.js"></script>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script type="text/javascript" language="javascript">
|
||||
|
||||
function FnSuma(t, txt, importe) {
|
||||
|
||||
if (t.checked) {
|
||||
txt.value = FormatNumber(importe, 2, true, true, true);
|
||||
} else {
|
||||
txt.value = "";
|
||||
}
|
||||
|
||||
$get('TxtAbono').value = FormatNumber(SumaValores(), 2, true, true, true);
|
||||
|
||||
//alert(txt.value);
|
||||
}
|
||||
|
||||
//function FncImporte(t) {
|
||||
// $get('TxtImporte').value = FormatNumber(t.value, 2, true, true, true);
|
||||
// $get('HdnImporte').value = FormatNumber(t.value, 2, true, true, true);
|
||||
//}
|
||||
function FncImporte(txt, rowtxt, opcion) {
|
||||
|
||||
// opcion = 1, se registro desde el txtimporte
|
||||
if (opcion == 1) {
|
||||
$get(rowtxt).value = $get(txt).value == '' ? '' : FormatNumber(ToDouble($get(txt).value), 2, true, true, true);
|
||||
debugger;
|
||||
if ($get('ChkAbonoCuenta')) {
|
||||
$get('ChkAbonoCuenta').checked = ($get(txt).value > 2000);
|
||||
}
|
||||
FormatoMoneda($get(txt));
|
||||
} else {
|
||||
$get(txt).value = $get(rowtxt).value == '' ? '' : FormatNumber(ToDouble($get(rowtxt).value), 2, true, true, true);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function FncImporteCuenta(txt) {
|
||||
|
||||
if ($get('ChkAbonoCuenta')) {
|
||||
$get('ChkAbonoCuenta').checked = (parseFloat(txt.value.replace(/,/g, '')) > 2000);
|
||||
}
|
||||
FormatoMoneda(txt);
|
||||
}
|
||||
|
||||
function SumaValores() {
|
||||
var Importe = 0;
|
||||
var topLevelElem = document.getElementById("form1");
|
||||
var textBoxes = topLevelElem.getElementsByTagName("input");
|
||||
for (var i = 0; i < textBoxes.length; i++) {
|
||||
if (textBoxes[i].type == "text") {
|
||||
if (textBoxes[i].id.indexOf('C_GvMov_TxtAbono') >= 0) {
|
||||
if (textBoxes[i].value != '') {
|
||||
Importe = parseFloat(Importe) + parseFloat(textBoxes[i].value.split(',').join(''));
|
||||
alert(Importe);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
return Importe;
|
||||
|
||||
}
|
||||
|
||||
function FnCambia(chk, txt) {
|
||||
|
||||
if (txt.value != '') {
|
||||
chk.checked = true;
|
||||
} else {
|
||||
chk.checked = false;
|
||||
}
|
||||
$get('TxtImporte').value = FormatNumber(SumaValores(), 2, true, true, true);
|
||||
}
|
||||
function getCuenta(pId) {
|
||||
|
||||
$get('HdnCveCuenta').value = pId;
|
||||
|
||||
PageMethods.wsGetNombreCuenta(pId, OnSucceeded);
|
||||
|
||||
}
|
||||
|
||||
function OnSucceeded(result, userContext, methodName) {
|
||||
|
||||
if (methodName == 'wsGetNombreCuenta') {
|
||||
$get('TxtCuentaContable').value = result;
|
||||
}
|
||||
}
|
||||
|
||||
function myItemSelectedHandler(source, eventArgs) {
|
||||
|
||||
//debugger;
|
||||
var CC = $get('HdnCveCuenta');
|
||||
CC.value = eventArgs.get_value();
|
||||
|
||||
// var b = $get('C_Tabs_TabConyuge_BtnTruco');
|
||||
// b.Click;
|
||||
var aTargetElement = 'BtnSelCuenta';
|
||||
__doPostBack(aTargetElement, eventArgs.get_value());
|
||||
|
||||
//alert(" Key : " + eventArgs.get_text() + " Value : " + eventArgs.get_value());
|
||||
|
||||
}
|
||||
|
||||
function LimpiaImporte(t, txt) {
|
||||
|
||||
if (t.value != '' && $get(txt)) {
|
||||
$get(txt).value = '';
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(
|
||||
function () {
|
||||
CargaTxtFunciones();
|
||||
|
||||
Sys.Application.add_load(function (s, e) {
|
||||
CargaTxtFunciones();
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
function CargaTxtFunciones() {
|
||||
|
||||
$(".txtcargo").each(function () {
|
||||
|
||||
$(this).keyup(function () {
|
||||
calculateCargo();
|
||||
comparar();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$(".txtabono").each(function () {
|
||||
|
||||
$(this).keyup(function () {
|
||||
calculateAbono();
|
||||
comparar();
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function comparar() {
|
||||
|
||||
var TextoCargos = document.getElementById('<%= TxtTotalCargos.ClientID %>');
|
||||
var TextoAbonos = document.getElementById('<%= TxtTotalAbonos.ClientID %>');
|
||||
|
||||
|
||||
if (TextoCargos.value == TextoAbonos.value) {
|
||||
|
||||
document.getElementById('<%= TxtTotalCargos.ClientID %>').style.border = "2px solid #04B431";
|
||||
document.getElementById('<%= TxtTotalAbonos.ClientID %>').style.border = "2px solid #04B431";
|
||||
document.getElementById('<%= TxtTotalCargos.ClientID %>').style.color = "";
|
||||
document.getElementById('<%= TxtTotalAbonos.ClientID %>').style.color = "";
|
||||
}
|
||||
else {
|
||||
|
||||
document.getElementById('<%= TxtTotalCargos.ClientID %>').style.border = "2px solid #ff0000";
|
||||
document.getElementById('<%= TxtTotalAbonos.ClientID %>').style.border = "2px solid #ff0000";
|
||||
|
||||
document.getElementById('<%= TxtTotalCargos.ClientID %>').style.color = "#ff0000";
|
||||
document.getElementById('<%= TxtTotalAbonos.ClientID %>').style.color = "#ff0000";
|
||||
}
|
||||
|
||||
}
|
||||
function calculateCargo() {
|
||||
var sum = 0;
|
||||
$(".txtcargo").each(function () {
|
||||
if (!isNaN(this.value.split(',').join('')) && this.value.length != 0) {
|
||||
sum += parseFloat(this.value.split(',').join(''));
|
||||
}
|
||||
});
|
||||
$('#<%= TxtTotalCargos.ClientID %>').val(sum.toFixed(2));
|
||||
}
|
||||
|
||||
function calculateAbono() {
|
||||
var sum = 0;
|
||||
|
||||
$(".txtabono").each(function () {
|
||||
if (!isNaN(this.value.split(',').join('')) && this.value.length != 0) {
|
||||
sum += parseFloat(this.value.split(',').join(''));
|
||||
}
|
||||
});
|
||||
$('#<%= TxtTotalAbonos.ClientID %>').val(sum.toFixed(2));
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
<style type="text/css">
|
||||
.AutoExtender {
|
||||
font-family: Verdana, Helvetica, sans-serif;
|
||||
font-size: .9em;
|
||||
font-weight: normal;
|
||||
border: solid 1px #006699;
|
||||
line-height: 20px;
|
||||
padding: 2px;
|
||||
background-color: White;
|
||||
margin-left: 2px;
|
||||
overflow: auto;
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
.AutoExtenderList {
|
||||
cursor: pointer;
|
||||
color: darkgray;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.AutoExtenderHighlight {
|
||||
color: White;
|
||||
background-color: #084784;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#divwidth {
|
||||
width: 150px !important;
|
||||
}
|
||||
|
||||
#divwidth div {
|
||||
width: 150px !important;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
@@ -1,560 +0,0 @@
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports System.Linq
|
||||
Imports System.Web.Services
|
||||
|
||||
Partial Class Contabilidad_RegPrePoliza
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
#Region "Propiedades"
|
||||
|
||||
|
||||
Public Property ArregloMovs As ArrayList
|
||||
Get
|
||||
Return CType(ViewState("ArregloMovs"), ArrayList)
|
||||
End Get
|
||||
Set(value As ArrayList)
|
||||
ViewState("ArregloMovs") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property DtMovimientos As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtMovimientos"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtMovimientos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property DtCuentasContables As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtCuentasContables"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtCuentasContables") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property TipoPlantilla As Integer
|
||||
Get
|
||||
Return CType(ViewState("TipoPlantilla"), Integer)
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("TipoPlantilla") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property CveMoneda As Integer
|
||||
Get
|
||||
Return CType(ViewState("CveMoneda"), Integer)
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveMoneda") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private ReadOnly Property CvePrePoliza As Integer
|
||||
Get
|
||||
Return ViewState("CvePrePoliza").ToString.ToEntero
|
||||
End Get
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
CveMoneda = 1
|
||||
ViewState("CvePrePoliza") = 0
|
||||
|
||||
Dim dt As DataTable = Nothing
|
||||
Dim Conta As New ClsContabilidad
|
||||
|
||||
If Conta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||
dt = Conta.DtResultados
|
||||
DtCuentasContables = Conta.DtResultados
|
||||
Session("DtCuentas") = Conta.DtResultados
|
||||
End If
|
||||
Conta.Dispose()
|
||||
|
||||
If Request("CvePrePoliza") IsNot Nothing AndAlso IsNumeric(Request("CvePrePoliza")) AndAlso Request("CvePrePoliza").ToEntero > 0 Then
|
||||
ViewState("CvePrePoliza") = Request("CvePrePoliza").ToEntero
|
||||
CargaPrePoliza()
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
TipoPlantilla = 0
|
||||
If IfNull(Request("Tipo"), "").ToString = "Ing" Then
|
||||
TipoPlantilla = 1
|
||||
LblEncabezado.Text = "Otros Ingresos"
|
||||
Else
|
||||
|
||||
|
||||
End If
|
||||
|
||||
CargaPlantillas(TipoPlantilla)
|
||||
|
||||
If UsuarioActual.CveEmpresa = 66 Then trNotificar.Visible = True
|
||||
|
||||
CargaConceptos()
|
||||
CargaSubProyectos()
|
||||
CargaCuentasContables()
|
||||
|
||||
'crea tabla temporal
|
||||
ArregloMovs = New ArrayList
|
||||
DtMovimientos = New DataTable("Movimientos")
|
||||
Dim IDMov As DataColumn = DtMovimientos.Columns.Add("IdMov", Type.GetType("System.Int32")) : IDMov.AutoIncrement = True
|
||||
With DtMovimientos.Columns
|
||||
.Add("IdCuenta", Type.GetType("System.Int32"))
|
||||
.Add("CodigoCuenta", Type.GetType("System.String"))
|
||||
.Add("Cuenta", Type.GetType("System.String"))
|
||||
.Add("Referencia", Type.GetType("System.String"))
|
||||
.Add("Concepto", Type.GetType("System.String"))
|
||||
.Add("Cargo", Type.GetType("System.Double"))
|
||||
.Add("Abono", Type.GetType("System.Double"))
|
||||
.Add("TipoMovto", Type.GetType("System.Int32"))
|
||||
.Add("EsComodin", Type.GetType("System.Int32"))
|
||||
.Add("CveConcepto", Type.GetType("System.Int32"))
|
||||
.Add("CveSubProyecto", Type.GetType("System.Int32"))
|
||||
.Add("Descripcion", Type.GetType("System.String"))
|
||||
.Add("CveProveedor", Type.GetType("System.Int32"))
|
||||
.Add("CvePersonal", Type.GetType("System.Int32"))
|
||||
End With
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaPrePoliza()
|
||||
|
||||
LblEncabezado.Text = "Edicion de Póliza"
|
||||
|
||||
Dim ObjContabilidad As New ClsContabilidad
|
||||
ObjContabilidad.GetContabilizacionDiarioDetalle(CvePrePoliza)
|
||||
|
||||
GvPrePoliza.DataSource = ObjContabilidad.DtResultados.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}")
|
||||
GvPrePoliza.DataBind()
|
||||
|
||||
DivConceptoPrePoliza.Visible = False
|
||||
UPMovs.Visible = False
|
||||
UPMovs.Update()
|
||||
UPPDocumento.Update()
|
||||
UpPrePoliza.Update()
|
||||
|
||||
RegistraScript("comparar();")
|
||||
|
||||
If Request("Tipo") IsNot Nothing AndAlso IsNumeric(Request("Tipo")) AndAlso Request("Tipo").ToEntero = 1 AndAlso UsuarioActual.CveUsuario <> 100 Then
|
||||
For Each row As GridViewRow In GvPrePoliza.Rows
|
||||
row.FCTextBox("TxtCargo").Enabled = False
|
||||
row.FCTextBox("TxtAbono").Enabled = False
|
||||
Next
|
||||
End If
|
||||
|
||||
ObjContabilidad.Dispose()
|
||||
End Sub
|
||||
|
||||
Private Sub GvPrePoliza_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvPrePoliza.RowDataBound
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
'Asignamos los Subproyectos
|
||||
e.Row.FCDropDownList("DdlSubProyecto").DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
e.Row.FCDropDownList("DdlSubProyecto").DataBind()
|
||||
e.Row.FCDropDownList("DdlSubProyecto").Items.Insert(0, New ListItem(" - ", "-1"))
|
||||
e.Row.FCDropDownList("DdlSubProyecto").SelectedValueExist(e.Row.DataKey("CveSubProyecto"))
|
||||
|
||||
'ASignamos las CuentasContables
|
||||
e.Row.FCDropDownList("DdlCtaContable").DataSource = Session("DtCuentas")
|
||||
e.Row.FCDropDownList("DdlCtaContable").DataBind()
|
||||
e.Row.FCDropDownList("DdlCtaContable").Items.Insert(0, New ListItem("Sin Asignar", "0"))
|
||||
e.Row.FCDropDownList("DdlCtaContable").SelectedValueExist(e.Row.DataKey("IdCtaContable"))
|
||||
|
||||
TxtTotalCargos.Text = (TxtTotalCargos.Text.ToDouble + e.Row.FCTextBox("TxtCargo").Text.ToDouble)
|
||||
TxtTotalAbonos.Text = (TxtTotalAbonos.Text.ToDouble + e.Row.FCTextBox("TxtAbono").Text.ToDouble)
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaPlantillas(TipoPlantilla As Integer)
|
||||
|
||||
'GvPlantillas.DataSource = GlobalDTContaPlantillasPolizas(UsuarioActual.CveEmpresa, TipoPlantilla)
|
||||
'GvPlantillas.DataBind()
|
||||
|
||||
DdlPlantilla.DataSource = GlobalDTContaPlantillasPolizas(UsuarioActual.CveEmpresa, TipoPlantilla)
|
||||
DdlPlantilla.DataBind()
|
||||
DdlPlantilla.Items.Insert(0, New ListItem("Plantilla Personalizada", "53"))
|
||||
End Sub
|
||||
|
||||
Private Sub CargaConceptos()
|
||||
DdlConceptosContables.DataSource = GlobalDTContaConceptosContables(-1)
|
||||
DdlConceptosContables.DataBind()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaSubProyectos()
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
DdlSubProyecto.DataBind()
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem(" - ", "-1"))
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCuentasContables()
|
||||
DdlCtaContable.DataSource = Session("DtCuentas")
|
||||
DdlCtaContable.DataBind()
|
||||
DdlCtaContable.Items.Insert(0, New ListItem("Sin Asignar", "0"))
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlPlantilla_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlPlantilla.SelectedIndexChanged
|
||||
|
||||
TxtTotalAbonos.Text = ""
|
||||
TxtTotalCargos.Text = ""
|
||||
|
||||
If DdlPlantilla.SelectedValue.ToEntero <= 0 Then
|
||||
Alert("Seleccione un Movimiento Válido", TipoMensaje.MsgAdvertencia)
|
||||
DdlPlantilla.SelectedValue = "-1"
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If DdlPlantilla.SelectedValue.ToEntero = 53 Then 'Plantilla Personalizada
|
||||
DivAgregarConceptos.Visible = True
|
||||
Else
|
||||
DivAgregarConceptos.Visible = False
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Dim CvePlantilla As Integer = DdlPlantilla.SelectedValue.ToEntero
|
||||
|
||||
Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(CvePlantilla).FiltraParametros(String.Format("CveEmpresa={0}", UsuarioActual.CveEmpresa), "Orden")
|
||||
Dim Cuenta As String = ""
|
||||
Dim IdCuenta As Integer = 0
|
||||
Dim CodigoCuenta As String = ""
|
||||
Dim NombreCuenta As String = ""
|
||||
Dim EsComodin As Integer = 0
|
||||
DtMovimientos.Clear()
|
||||
|
||||
For Each drt As DataRow In Dt.Rows
|
||||
|
||||
Cuenta = drt("ConceptoContable").ToString
|
||||
IdCuenta = 0
|
||||
CodigoCuenta = ""
|
||||
NombreCuenta = ""
|
||||
If drt("IdCtaContable").ToString.ToEntero > 0 Then 'DtCuentasContables
|
||||
Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("Id={0}", drt("IdCtaContable").ToString))
|
||||
If drr IsNot Nothing Then
|
||||
IdCuenta = drt("IdCtaContable").ToString.ToEntero
|
||||
CodigoCuenta = drr("CuentaFormato").ToString()
|
||||
NombreCuenta = drr("Nombre").ToString()
|
||||
'Cuenta = drr("Nombre").ToString()
|
||||
End If
|
||||
EsComodin = 0
|
||||
End If
|
||||
|
||||
Dim dr As DataRow = DtMovimientos.NewRow
|
||||
dr("IdCuenta") = IdCuenta
|
||||
dr("CodigoCuenta") = CodigoCuenta & "<br>" & NombreCuenta
|
||||
dr("Cuenta") = Cuenta 'TxtCuentaContable.Text
|
||||
dr("Referencia") = If(drt("CveConcepto").ToString.Contiene("29", "130"), drt("Personal"), drt("RazonSocial"))
|
||||
dr("Concepto") = TxtObservaciones.Text
|
||||
dr("TipoMovto") = If(drt("TipoMovto").ToString = "False", 0, 1)
|
||||
dr("EsComodin") = EsComodin
|
||||
dr("CveConcepto") = drt("CveConcepto")
|
||||
dr("CveSubProyecto") = drt("CveSubProyectoNegativo")
|
||||
dr("Cargo") = TxtCargo.Text.ToDouble
|
||||
dr("Abono") = TxtAbono.Text.ToDouble
|
||||
dr("CveProveedor") = drt("CveProveedor")
|
||||
dr("CvePersonal") = drt("CvePersonal")
|
||||
DtMovimientos.Rows.Add(dr)
|
||||
Next
|
||||
|
||||
|
||||
GvMov.DataSource = DtMovimientos
|
||||
GvMov.DataBind()
|
||||
UPMovs.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub GvMov_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvMov.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||
e.Row.Height = Unit.Pixel(1)
|
||||
e.Row.Cells(0).ToolTip = e.Row.DBCampo("IdCuenta")
|
||||
If e.Row.DBCampo("TipoMovto") = "1" Then
|
||||
e.Row.FCTextBox("TxtAbono").Visible = True
|
||||
Else
|
||||
e.Row.FCTextBox("TxtCargo").Visible = True
|
||||
End If
|
||||
|
||||
e.Row.FCTextBox("TxtAbono").Text = If(e.Row.DBCampo("Abono") = 0, "", e.Row.DBCampo("Abono"))
|
||||
e.Row.FCTextBox("TxtCargo").Text = If(e.Row.DBCampo("Cargo") = 0, "", e.Row.DBCampo("Cargo"))
|
||||
e.Row.FCTextBox("TxtConcepto").Text = e.Row.DBCampo("Descripcion")
|
||||
|
||||
e.Row.FCDropDownList("DdlSubProyecto").DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
e.Row.FCDropDownList("DdlSubProyecto").DataBind()
|
||||
e.Row.FCDropDownList("DdlSubProyecto").Items.Insert(0, New ListItem(" - ", "-1"))
|
||||
e.Row.FCDropDownList("DdlSubProyecto").SelectedValue = e.Row.DBCampo("CveSubProyecto")
|
||||
|
||||
If DdlPlantilla.SelectedValue.ToEntero = 53 Then
|
||||
e.Row.FCDropDownList("DdlSubProyecto").Enabled = True
|
||||
Else
|
||||
e.Row.FCDropDownList("DdlSubProyecto").Enabled = False
|
||||
End If
|
||||
|
||||
'Agregamos la opcion para vincular los movimientos bancarios
|
||||
If e.Row.DataKey("CveConcepto").ToEntero.Contiene(41) Then
|
||||
Dim ObjMovimientos As New ClsMovimientos
|
||||
Dim DdlSaldos As DropDownList = e.Row.FCDropDownList("DdlSaldos")
|
||||
|
||||
Select Case e.Row.DataKey("CveConcepto").ToEntero
|
||||
|
||||
'Acreedores
|
||||
Case 41
|
||||
If (ObjMovimientos.GetAcreedoresSaldosDetalles(-1,-1, UsuarioActual.CveEmpresa)) Then
|
||||
DdlSaldos.Visible = True
|
||||
DdlSaldos.DataSource = ObjMovimientos.DtResultados.FiltraParametros($"CveIE > 0 AND CveProveedor = {e.Row.DataKey("CveProveedor").ToEntero}")
|
||||
DdlSaldos.DataBind()
|
||||
DdlSaldos.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End If
|
||||
|
||||
End Select
|
||||
|
||||
ObjMovimientos.Dispose()
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnIEGuardar_Click(sender As Object, e As EventArgs) Handles BtnIEGuardar.Click
|
||||
|
||||
Dim TotalCargos, TotalAbonos As Decimal
|
||||
|
||||
If CvePrePoliza > 0 Then
|
||||
TotalCargos = TxtTotalCargos.Text.ToDouble
|
||||
TotalAbonos = TxtTotalAbonos.Text.ToDouble
|
||||
Else
|
||||
For Each Gvr As GridViewRow In GvMov.Rows
|
||||
TotalCargos += Gvr.FCTextBox("TxtCargo").Text.ToDecimal
|
||||
TotalAbonos += Gvr.FCTextBox("TxtAbono").Text.ToDecimal
|
||||
Next
|
||||
End If
|
||||
|
||||
If TotalCargos = TotalAbonos AndAlso TotalCargos <> 0 Then
|
||||
|
||||
If CvePrePoliza > 0 Then
|
||||
|
||||
'Nuevo Modulo Charlie
|
||||
ActualizarPrePoliza()
|
||||
|
||||
Else
|
||||
Dim MensajeAlert = New StringBuilder
|
||||
Dim ObjIE As New ClsBancos()
|
||||
Dim ObjMov As New ClsContabilidad(ObjIE.IniciaTransacSQL)
|
||||
'Dim Conta As ClsContPAQi = Nothing
|
||||
Dim IDPoliza As Integer = 0
|
||||
Dim MsgError As String = ""
|
||||
|
||||
|
||||
If MsgError = "" Then
|
||||
|
||||
|
||||
Try
|
||||
Dim CvePrePoliza As Integer
|
||||
Dim ConceptoPoliza As String = TxtObservaciones.Text
|
||||
CvePrePoliza = ObjMov.AddPrePolizas("Contabilidad/RegPrePoliza", DdlPlantilla.SelectedValue.ToEntero, TotalCargos, TotalAbonos, 1, TxtFecha.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
|
||||
If CvePrePoliza > 0 Then
|
||||
Dim alertaContabilizacion As String = "Se enviaron correctamente las siguientes pólizas:<br><br>"
|
||||
Dim idCuentaContabilizacion As Long = 1
|
||||
Dim Importe As Double = 0
|
||||
Dim TipoMovto As Boolean = False
|
||||
Dim IdCtaContable As Integer = 0
|
||||
'inserto las compras que voy a pagar
|
||||
For Each gvr As GridViewRow In GvMov.Rows
|
||||
|
||||
If gvr.DataKey("IDCuenta").ToEntero > 0 Then
|
||||
IdCtaContable = gvr.DataKey("IDCuenta")
|
||||
End If
|
||||
|
||||
If gvr.DataKey("TipoMovto").ToDouble > 0 Then
|
||||
Importe = gvr.FCTextBox("TxtAbono").Text.ToDouble
|
||||
TipoMovto = True
|
||||
Else
|
||||
Importe = gvr.FCTextBox("TxtCargo").Text.ToDouble
|
||||
TipoMovto = False
|
||||
End If
|
||||
|
||||
|
||||
If MsgError = "" Then
|
||||
|
||||
If idCuentaContabilizacion = 1 AndAlso (IdCtaContable = 0) Then
|
||||
idCuentaContabilizacion = 0
|
||||
End If
|
||||
If Importe > 0 Then
|
||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, gvr.FCLiteral("LtlReferencia").Text, gvr.DataKey("CveConcepto").ToEntero, gvr.FCTextBox("TxtConcepto").Text, TxtFecha.Text.ToDate, IdCtaContable, -1, CveSubProyecto:=gvr.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero, CveIE:=gvr.FCDropDownList("DdlSaldos").SelectedValue.ToEntero, CveProveedor:=gvr.DataKey("CveProveedor").ToEntero, CvePersonal:=gvr.DataKey("CvePersonal").ToEntero, ImporteMX:=Importe) Then
|
||||
|
||||
Else
|
||||
MsgError = "No se pudo insertar el detalle de la póliza2"
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
Next
|
||||
|
||||
'El movimiento 2 es el de Pago
|
||||
If ChkAutoConta.Checked AndAlso UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError = "" Then
|
||||
If idCuentaContabilizacion > 0 Then
|
||||
If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
||||
|
||||
'MENSAJE PRINCIPAL
|
||||
MensajeAlert.AppendFormat("<br/><br/>Folio de Salida: <b><a href = ""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"" class=""texto"" target=""_blank"" >{1}</a></b>", ObjMov.ContaIdPoliza, ObjMov.ContaFolio)
|
||||
Alert(MensajeAlert.ToString, ModExtensiones.TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico")
|
||||
End If
|
||||
Else
|
||||
Alert("No se puede contabilizar la Prepoliza debido a que una o mas cuentas son inválidas")
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
Else
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
MsgError = "Error"
|
||||
End Try
|
||||
|
||||
If MsgError = "" Then
|
||||
ObjIE.Commit()
|
||||
|
||||
|
||||
Alert("El movimiento se guardó correctamente.")
|
||||
|
||||
'If Conta IsNot Nothing Then Conta.Commit()
|
||||
|
||||
UPPDocumento.Update()
|
||||
|
||||
|
||||
TxtObservaciones.Text = ""
|
||||
GvMov.DataBind()
|
||||
TxtFecha.Text = ""
|
||||
TxtObservaciones.Text = ""
|
||||
|
||||
RegistraScript("window.location.reload()")
|
||||
Else
|
||||
ObjIE.RollBack()
|
||||
'If Conta IsNot Nothing Then Conta.RollBack()
|
||||
End If
|
||||
|
||||
|
||||
Else
|
||||
'If Conta IsNot Nothing Then Conta.RollBack()
|
||||
End If
|
||||
|
||||
ObjIE.Dispose()
|
||||
ObjMov.Dispose()
|
||||
'If Conta IsNot Nothing Then Conta.Dispose()
|
||||
End If
|
||||
Else
|
||||
Alert("La suma de los movimientos no son iguales", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub ActualizarPrePoliza()
|
||||
|
||||
Dim OcurrioError As Boolean = False
|
||||
Dim ObjContabilidad As New ClsContabilidad
|
||||
ObjContabilidad.IniciaTransacSQL()
|
||||
|
||||
For Each row As GridViewRow In GvPrePoliza.Rows
|
||||
If Not ObjContabilidad.UpdatePrepolizasDetalle(row.DataKey("CvePrePolizaDetalle").ToEntero, row.FCTextBox("TxtConcepto").Text, row.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero,
|
||||
row.FCDropDownList("DdlCtaContable").SelectedValue.ToEntero, If(row.FCTextBox("TxtCargo").Text.ToDecimal <> 0, False, True), If(row.FCTextBox("TxtCargo").Text.ToDecimal <> 0,
|
||||
row.FCTextBox("TxtCargo").Text.ToDecimal, row.FCTextBox("TxtAbono").Text.ToDecimal), CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
Next
|
||||
|
||||
If Not OcurrioError Then
|
||||
ObjContabilidad.Commit()
|
||||
Alert("La PrePoliza se actualizó correctamente.", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
ObjContabilidad.RollBack()
|
||||
Alert("Ocurrio un error al actualizar la PrePoliza.", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjContabilidad.Dispose()
|
||||
End Sub
|
||||
|
||||
Protected Sub GvMov_RowDeleting(sender As Object, e As GridViewDeleteEventArgs) Handles GvMov.RowDeleting
|
||||
|
||||
Dim idMov As Integer = GvMov.DataKeys(e.RowIndex).Value.ToString.ToEntero
|
||||
|
||||
Dim Rows As DataRow() = DtMovimientos.Select("IDMov = " & idMov)
|
||||
If Rows.Count > 0 Then
|
||||
DtMovimientos.Rows.Remove(Rows(0))
|
||||
DtMovimientos.AcceptChanges()
|
||||
End If
|
||||
GvMov.DataSource = DtMovimientos
|
||||
GvMov.DataBind()
|
||||
|
||||
TxtTotalAbonos.Text = DtMovimientos.SUM("Abono").FormatoNumero
|
||||
TxtTotalCargos.Text = DtMovimientos.SUM("Cargo").FormatoNumero
|
||||
|
||||
'saco de la póliza el importe del cheque, que coincida la cuenta contable con la bancaria
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub LbAgregar_Click(sender As Object, e As EventArgs) Handles LbAgregar.Click
|
||||
|
||||
Dim dr As DataRow = DtMovimientos.NewRow
|
||||
Dim CodigoCuenta As String = ""
|
||||
Dim NombreCuenta As String = ""
|
||||
|
||||
dr("IdCuenta") = DdlCtaContable.SelectedValue
|
||||
|
||||
If DdlCtaContable.SelectedValue.ToEntero > 0 Then
|
||||
Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("Id={0}", DdlCtaContable.SelectedValue))
|
||||
If drr IsNot Nothing Then
|
||||
CodigoCuenta = drr("CuentaFormato").ToString()
|
||||
NombreCuenta = drr("Nombre").ToString()
|
||||
End If
|
||||
End If
|
||||
|
||||
dr("CodigoCuenta") = CodigoCuenta & "<br>" & NombreCuenta
|
||||
dr("Cuenta") = DdlConceptosContables.SelectedItem
|
||||
dr("Referencia") = TxtReferencia.Text
|
||||
dr("Concepto") = TxtObservaciones.Text
|
||||
dr("TipoMovto") = If(TxtCargo.Text.ToDouble > 0, 0, 1)
|
||||
dr("EsComodin") = 0
|
||||
dr("CveConcepto") = DdlConceptosContables.SelectedValue
|
||||
dr("Cargo") = TxtCargo.Text.ToDouble
|
||||
dr("Abono") = TxtAbono.Text.ToDouble
|
||||
dr("Descripcion") = TxtDescripcion.Text
|
||||
dr("CveSubProyecto") = DdlSubProyecto.SelectedValue
|
||||
|
||||
TxtTotalAbonos.Text = (TxtTotalAbonos.Text.ToDouble + TxtAbono.Text.ToDouble).ToString.FormatoNumero
|
||||
TxtTotalCargos.Text = (TxtTotalCargos.Text.ToDouble + TxtCargo.Text.ToDouble).ToString.FormatoNumero
|
||||
|
||||
DtMovimientos.Rows.Add(dr)
|
||||
GvMov.DataSource = DtMovimientos
|
||||
GvMov.DataBind()
|
||||
UPMovs.Update()
|
||||
|
||||
TxtCargo.Text = ""
|
||||
TxtAbono.Text = ""
|
||||
TxtReferencia.Text = ""
|
||||
TxtDescripcion.Text = ""
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -1,115 +0,0 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="TiposPoliza.aspx.vb" Inherits="Contabilidad_TiposPoliza" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Tipos de Póliza
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table class="table table-striped ">
|
||||
<thead>
|
||||
<tr class="Titulos">
|
||||
<th width="256px">
|
||||
<asp:LinkButton ID="LbTipoPoliza" runat="server" CausesValidation="false" Text="" CommandArgument="TipoPoliza" OnClick="LbOrden_Click">
|
||||
Tipo de Póliza
|
||||
<asp:Literal ID="ImgTipoPoliza" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton></th>
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbEstatus" runat="server" CausesValidation="false" Text="" CommandArgument="Estatus" OnClick="LbOrden_Click">
|
||||
Estatus
|
||||
<asp:Literal ID="ImgEstatus" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton></th>
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbFechaIng" runat="server" CausesValidation="false" Text="" CommandArgument="FechaIng" OnClick="LbOrden_Click">
|
||||
Fecha Ing
|
||||
<asp:Literal ID="ImgFechaIng" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton></th>
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbUsuario" runat="server" CausesValidation="false" Text="" CommandArgument="Usuario" OnClick="LbOrden_Click">
|
||||
Usuario
|
||||
<asp:Literal ID="ImgUsuario" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton></th>
|
||||
<th width="161px">Comandos</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<td style="text-align: center;">
|
||||
<asp:TextBox ID="TxtTipoPoliza" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="234px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTipoPoliza" runat="server" ControlToValidate="TxtTipoPoliza" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Póliza''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCTipoPoliza" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoPoliza" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td style="text-align: center;">
|
||||
<asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton></td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveTipoPoliza, CveEmpresa" EmptyDataText="No se encontraron Estatus de Ingresos y Egresos Registrados" ToolTip="Listado de Estatus de Ingresos y Egresos" CssClass="table table-striped table-advance table-hover" Style=" text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTipoPoliza" runat="server" Text='<%# Eval("TipoPoliza", " {0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtTipoPoliza" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("TipoPoliza") %>' ValidationGroup="GrpGV" Width="234px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTipoPoliza" runat="server" ControlToValidate="TxtTipoPoliza" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Póliza''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCTipoPoliza" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoPoliza" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" Checked='<%# If (Eval("Estatus").ToString = "Activo", True, False) %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaIng" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Editar">
|
||||
<EditItemTemplate>
|
||||
<center>
|
||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGV" />
|
||||
<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
|
||||
</center>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
@@ -1,175 +0,0 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class Contabilidad_TiposPoliza
|
||||
Inherits ClsPaginas
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
ViewState("Orden") = ""
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjTipoPoliza As New ClsContabilidad
|
||||
If ObjTipoPoliza.GetConta_TiposPoliza(UsuarioActual.CveEmpresa) Then
|
||||
ViewState("DTTipoPoliza") = ObjTipoPoliza.DtResultados
|
||||
'GlobalDTTipoPoliza = ObjTipoPoliza.DtResultados
|
||||
Else
|
||||
Me.GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjTipoPoliza.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
Dim ObjTipoPoliza As New ClsContabilidad
|
||||
If ObjTipoPoliza.AddConta_TiposPoliza(TxtTipoPoliza.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
TxtTipoPoliza.Text = ""
|
||||
Alert("El Tipo de Póliza se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpTitulos.Update()
|
||||
ViewState("DTTipoPoliza") = ObjTipoPoliza.DtResultados
|
||||
'GlobalDTTipoPoliza = ObjTipoPoliza.DtResultados
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End If
|
||||
ObjTipoPoliza.Dispose()
|
||||
End Sub
|
||||
|
||||
#Region "G V D A T O S"
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.Cells(0).Width = Unit.Pixel(256)
|
||||
e.Row.Cells(1).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(2).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(3).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(4).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(5).Width = Unit.Pixel(61)
|
||||
End If
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||
Dim ObjTipoPoliza As New ClsContabilidad
|
||||
Dim CveTipoPoliza As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero
|
||||
Dim CveEmpresa As Integer = GvDatos.Rows(e.RowIndex).DataKey("CveEmpresa").ToEntero
|
||||
|
||||
If CveEmpresa = UsuarioActual.CveEmpresa Then
|
||||
If ObjTipoPoliza.RemoveConta_TipoPoliza(CveTipoPoliza) Then
|
||||
TxtTipoPoliza.Text = ""
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTTipoPoliza") = ObjTipoPoliza.DtResultados
|
||||
'GlobalDTTipoPoliza = ObjTipoPoliza.DtResultados
|
||||
Alert("El Tipo de Póliza se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
Else
|
||||
Alert("Los Tipos de Póliza principales no pueden ser eliminados.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
ObjTipoPoliza.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowCancelingEdit(sender As Object, e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvDatos.RowCancelingEdit
|
||||
GvDatos.EditIndex = -1
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvDatos.RowUpdating
|
||||
|
||||
Dim ObjTipoPoliza As New ClsContabilidad
|
||||
|
||||
Dim TipoPoliza As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtTipoPoliza"), TextBox).Text.Trim
|
||||
Dim Estatus As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked
|
||||
Dim CveTipoPoliza As Integer = GvDatos.Rows(e.RowIndex).DataKey("CveTipoPoliza").ToEntero
|
||||
|
||||
If ObjTipoPoliza.UpdateConta_TiposPoliza(TipoPoliza, Estatus, CveTipoPoliza) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTTipoPoliza") = ObjTipoPoliza.DtResultados
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjTipoPoliza.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvDatos.RowEditing
|
||||
GvDatos.EditIndex = e.NewEditIndex
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "O R D E N A M I E N T O"
|
||||
Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim Orden As String = ""
|
||||
Dim Campo As String = ""
|
||||
Dim Literal As Literal = Nothing
|
||||
Const OrdenInicial As String = ""
|
||||
Dim Arg(2) As String
|
||||
|
||||
Arg = CType(sender, LinkButton).CommandArgument().ToString.Split(";"c)
|
||||
Campo = Arg(0)
|
||||
Literal = CType(CType(sender, LinkButton).NamingContainer.FindControl("Img" & Campo.Replace(",", "_")), Literal)
|
||||
|
||||
If ViewState(String.Format("O{0}", Campo)) IsNot Nothing AndAlso ViewState(String.Format("O{0}", Campo)).ToString = String.Format("{0} DESC", Campo) Then
|
||||
ViewState(String.Format("O{0}", Campo)) = String.Format("{0} ASC", Campo)
|
||||
Literal.Text = String.Format("<i class='fa fa-sort-asc' style='color:#999' ></i>")
|
||||
Else
|
||||
ViewState(String.Format("O{0}", Campo)) = String.Format("{0} DESC", Campo)
|
||||
Literal.Text = String.Format("<i class='fa fa-sort-desc' style='color:#999' ></i>")
|
||||
End If
|
||||
Orden = OrdenInicial & ViewState(String.Format("O{0}", Campo)).ToString
|
||||
ViewState("Orden") = Orden
|
||||
CargaGrid(Orden)
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGrid(Orden As String)
|
||||
If Orden <> String.Empty Then
|
||||
Dim DV As New DataView(CType(ViewState("DTTipoPoliza"), DataTable), "", Orden, DataViewRowState.CurrentRows)
|
||||
GvDatos.DataSource = DV.ToTable()
|
||||
DV.Dispose()
|
||||
Else
|
||||
GvDatos.DataSource = CType(ViewState("DTTipoPoliza"), DataTable)
|
||||
End If
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
End Class
|
||||
Binary file not shown.
@@ -1,248 +0,0 @@
|
||||
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="RegistroEmpresa.aspx.vb" Inherits="Sistemas_RegistroEmpresa" %>
|
||||
|
||||
<%@ Import Namespace="System.Web.Optimization" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta charset="utf-8" />
|
||||
<title>SIG | Sistema de Información Gerencial</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
|
||||
|
||||
<!-- BEGIN STYLES -->
|
||||
<%: Scripts.Render("~/bundles/modernizr") %>
|
||||
<%: Styles.Render("~/Content/AjaxControlToolkit/Styles/Bundle") %>
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" type="text/css" />
|
||||
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700&subset=all" rel="stylesheet" type="text/css" />
|
||||
<%: Styles.Render("~/Metronic/assets/global/css/css") %>
|
||||
|
||||
<!-- BEGIN THEME STYLES -->
|
||||
<link href="/Metronic/assets/admin/layout/css/themes/darkblue.css" rel="stylesheet" type="text/css" id="style_color" />
|
||||
<link href="/Metronic/assets/admin/layout/css/custom.css" rel="stylesheet" type="text/css" />
|
||||
<link href="/Metronic/assets/admin/layout4/css/profile.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<style>
|
||||
body {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.row{
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<link rel="shortcut icon" href="/Imagenes/favicon.ico" />
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
|
||||
<asp:ScriptManager ID="TSM" runat="server" EnableHistory="true" EnableSecureHistoryState="true" ScriptMode="Release" EnableScriptGlobalization="true" AsyncPostBackTimeout="600">
|
||||
<Scripts>
|
||||
<asp:ScriptReference Name="MsAjaxBundle" />
|
||||
<asp:ScriptReference Name="jquery" />
|
||||
<asp:ScriptReference Name="respond" />
|
||||
<asp:ScriptReference Name="WebForms.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebForms.js" />
|
||||
<asp:ScriptReference Name="WebUIValidation.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebUIValidation.js" />
|
||||
<asp:ScriptReference Name="MenuStandards.js" Assembly="System.Web" Path="~/Scripts/WebForms/MenuStandards.js" />
|
||||
<asp:ScriptReference Name="GridView.js" Assembly="System.Web" Path="~/Scripts/WebForms/GridView.js" />
|
||||
<asp:ScriptReference Name="DetailsView.js" Assembly="System.Web" Path="~/Scripts/WebForms/DetailsView.js" />
|
||||
<asp:ScriptReference Name="TreeView.js" Assembly="System.Web" Path="~/Scripts/WebForms/TreeView.js" />
|
||||
<asp:ScriptReference Name="WebParts.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebParts.js" />
|
||||
<asp:ScriptReference Name="Focus.js" Assembly="System.Web" Path="~/Scripts/WebForms/Focus.js" />
|
||||
<asp:ScriptReference Name="WebFormsBundle" />
|
||||
<%--Site Scripts--%>
|
||||
<asp:ScriptReference Path="~/Scripts/AjaxControlToolkit/Bundle" />
|
||||
</Scripts>
|
||||
</asp:ScriptManager>
|
||||
<%: Scripts.Render("~/bundles/scripts") %>
|
||||
<%: Scripts.Render("~/Metronic/assets/global/scripts/JS") %>
|
||||
|
||||
|
||||
<div class="page-container" runat="server" id="divpagecontainer">
|
||||
<div class="page-content">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h1 runat="server" id="h1" style="text-align: center">Registra tu empresa</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<div class="profile-content">
|
||||
<div class="row" id="DivRegistro" runat="server">
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="portlet light portlet-fit portlet-form">
|
||||
<div class="portlet-body">
|
||||
<div class="form-body">
|
||||
<h3 style="text-align: center">Tenga el control de su empresa con una sola herramienta</h3>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<center>
|
||||
<img id="imagen" style="max-width: 600px !important; max-height:400px !important; margin-left:40px;margin-bottom:40px; margin-right:40px;margin-top:40px;" />
|
||||
</center>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpRegistro" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="col-md-5" style="margin-left:25px;">
|
||||
<div class="portlet light portlet-fit portlet-form bordered" style="min-height: 300px" id="form_wizard_1">
|
||||
<div class="portlet-body">
|
||||
<div class="form-body">
|
||||
<div class="row">
|
||||
<div class="col-md-10" style="margin-left: 45px; margin-right: 40px;">
|
||||
<div class="form-group">
|
||||
<label>
|
||||
Nombre
|
||||
<label style="color: red">*</label>
|
||||
</label>
|
||||
<div class="input-icon">
|
||||
<i class="fa fa-user" aria-hidden="true"></i>
|
||||
<asp:TextBox CssClass="form-control" CausesValidation="true" placeholder="EMPRESA" Style="text-transform: uppercase" ID="txtNombre" runat="server"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVNombre" runat="server" ControlToValidate="txtNombre" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="RFVNombre" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<span class="help-block" style="color: #45b6af;">Nombre o Razón Social de la empresa</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-10" style="margin-left: 45px; margin-right: 40px;">
|
||||
<div class="form-group">
|
||||
<label>
|
||||
RFC
|
||||
<label style="color: red">*</label>
|
||||
</label>
|
||||
<asp:TextBox CssClass="form-control" vplaceholder="RFC" MaxLength="13" ID="TxtRFC" runat="server" Style="text-transform: uppercase"></asp:TextBox>
|
||||
<asp:RegularExpressionValidator ID="REVRFC" runat="server" Display="Dynamic" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''RFC''</b> es incorrecto, por favor ingréselo." ValidationGroup="GrpGuardar" ControlToValidate="TxtRFC" ValidationExpression="^[a-zA-Z.)(/\\&-]{3,4}(\d{6})((\D|\d){2})((\D|\d){1})$"></asp:RegularExpressionValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEREVRFC" runat="server" HighlightCssClass="vco" TargetControlID="REVRFC" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVRFC" runat="server" ControlToValidate="TxtRFC" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''RFC''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="RFVRFC" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<span class="help-block" style="color: #45b6af;">RFC de la empresa</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-10" style="margin-left: 45px; margin-right: 40px;">
|
||||
<div class="form-group" id="FirstEmail">
|
||||
<label>
|
||||
Correo Electrónico
|
||||
<label style="color: red">*</label>
|
||||
</label>
|
||||
<div class="input-icon">
|
||||
<i class="fa fa-envelope" aria-hidden="true"></i>
|
||||
<asp:TextBox CssClass="form-control" CausesValidation="true" Style="text-transform: lowercase" ID="TxtEmail" placeholder="E-Mail" runat="server"></asp:TextBox>
|
||||
<asp:RegularExpressionValidator ID="REVContactoEmail" OnDataBinding="REVContactoEmail_Load" runat="server" Display="None" ValidationExpression="(([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)(\s*;\s*|\s*$))*" ControlToValidate="TxtEmail" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Contacto - Email''</b> no es válido, por favor ingrése uno correcto." ValidationGroup="GrpGuardar"></asp:RegularExpressionValidator>
|
||||
<asp:RequiredFieldValidator ID="RFVMail" runat="server" ControlToValidate="TxtEmail" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Correo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOIVA1" runat="server" HighlightCssClass="vco" TargetControlID="RFVMail" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOMail" runat="server" HighlightCssClass="vco" TargetControlID="REVContactoEmail" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<span id="helpMail" class="help-block" style="color: white;">El correo que ingresó es inválido</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-10" style="margin-left: 45px; margin-right: 40px;">
|
||||
<div class="form-group">
|
||||
<label>
|
||||
Confirmar Correo
|
||||
<label style="color: red">*</label>
|
||||
</label>
|
||||
<div class="input-icon">
|
||||
<i class="fa fa-info-circle" aria-hidden="true"></i>
|
||||
<asp:TextBox CssClass="form-control" CausesValidation="true" ID="TxtEmail2" Style="text-transform: lowercase" placeholder="Confirmar E-Mail" runat="server"></asp:TextBox>
|
||||
<asp:CompareValidator ID="cvEmail" runat="server"
|
||||
ControlToValidate="TxtEmail2" ControlToCompare="TxtEmail"
|
||||
Operator="Equal" ValidationGroup="GrpGuardar" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Los correos ingresados son diferentes" Style="display: none">
|
||||
</asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOConfirma" runat="server" HighlightCssClass="vco" TargetControlID="cvEmail" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-10" style="margin-left: 45px; margin-right: 40px;">
|
||||
<div class="form-group">
|
||||
<label>
|
||||
Método de pago
|
||||
<label style="color: red">*</label>
|
||||
</label>
|
||||
<asp:DropDownList CausesValidation="true" CssClass="form-control input-sm select2me" ID="DdlMetodoPago" placeholder="Metodo de pago" runat="server">
|
||||
<asp:ListItem Selected="True" Value="-1" Text="Seleccione"></asp:ListItem>
|
||||
<asp:ListItem Value="1" Text="Efectivo"></asp:ListItem>
|
||||
<asp:ListItem Value="2" Text="Tarjeta"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<asp:RequiredFieldValidator ID="rfv1" runat="server" InitialValue="-1" ControlToValidate="DdlMetodoPago" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Metodo de Pago''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar" />
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="server" HighlightCssClass="vco" TargetControlID="rfv1" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-md-10" style="margin-left: 45px; margin-right: 40px;">
|
||||
<div class="form-group" style="align-self: flex-end; text-align: center;">
|
||||
<asp:Button ID="BtnGuardar" OnClick="BtnGuardar_Click" ValidationGroup="GrpGuardar" Text="Registrar Empresa" runat="server" CssClass="btn btn-primary" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div runat="server" style="display: none" id="DvFinalizado">
|
||||
<h4>¡Gracias! Se han enviado a su correo una liga en donde se completara el registro de su empresa</h4>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
//ARREGLO CON IMAGENES
|
||||
var imagenes = new Array(
|
||||
'http://sig.adsistemas.mx/Imagenes/PresentacionSIG1.png',
|
||||
'http://sig.adsistemas.mx/Imagenes/PresentacionSIG2.png',
|
||||
'http://sig.adsistemas.mx/Imagenes/PresentacionSIG3.png',
|
||||
'http://sig.adsistemas.mx/Imagenes/PresentacionSIG4.png',
|
||||
'http://sig.adsistemas.mx/Imagenes/PresentacionSIG5.png',
|
||||
'http://sig.adsistemas.mx/Imagenes/PresentacionSIG6.png',
|
||||
'http://sig.adsistemas.mx/Imagenes/PresentacionSIG7.png'
|
||||
);
|
||||
|
||||
|
||||
// FUNCION PARA MOSTRAR IMAGENES
|
||||
function rotarImagenes() {
|
||||
//AGARRAMOS IMAGEN ALEATORIAMENTE
|
||||
var index = Math.floor((Math.random() * imagenes.length));
|
||||
//CAMBIAMOS IMAGEN
|
||||
document.getElementById("imagen").src = imagenes[index];
|
||||
}
|
||||
|
||||
onload = function () {
|
||||
rotarImagenes();
|
||||
setInterval(rotarImagenes, 2000);
|
||||
}
|
||||
</script>
|
||||
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,180 +0,0 @@
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class Sistemas_RegistroEmpresa
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property Nombre As String
|
||||
Get
|
||||
Nombre = ViewState("Nombre").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("Nombre") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property RFC As String
|
||||
Get
|
||||
RFC = ViewState("RFC").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("RFC") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property Email As String
|
||||
Get
|
||||
Email = ViewState("Email").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("Email") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property MetodoPago As String
|
||||
Get
|
||||
MetodoPago = ViewState("MetodoPago").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("MetodoPago") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private Property Liga As String
|
||||
Get
|
||||
Liga = ViewState("Liga").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("Liga") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region " GUARDAR "
|
||||
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
|
||||
Nombre = txtNombre.Text.ToUpper()
|
||||
RFC = TxtRFC.Text.ToUpper()
|
||||
Email = TxtEmail.Text
|
||||
MetodoPago = DdlMetodoPago.SelectedValue
|
||||
|
||||
Dim objEmpresa As New ClsSisEmpresas()
|
||||
Try
|
||||
If objEmpresa.AddEmpresa(-1, Nombre, "", "", "", "", "", "", RFC, 0, "", "", Email, "CFDi", "", "", "", "", "", "", "", 100, False, False, False, "", False, "", "", "", 0, False, False, False, False, False, False, False, False, False, False,
|
||||
"", "", "", "", "", "", 0, False, "", "", "", "", "", 0, False, "", "", "", 0, 0, 0, 0, 0, 0, 0, 0, "", "", 0, 0, "", "", -1, 0.0D, "", 2, False, 0.0D, "", "", 0, False, 0, 0, False, 0, 0, False, 0,
|
||||
CveMetodoPago:=MetodoPago.ToEntero, CvePAC:=1) Then
|
||||
Alert("Su solicitud ha sido procesada correctamente, en breve recibira un correo para completar el registro.", TipoMensaje.MsgInformacion)
|
||||
Liga = String.Format("sig.adsistemas.mx/PyME/Sistemas/WizardRegistro.aspx?P={0}", Encripta(String.Format("CveEmpresa={0}", objEmpresa.CveEmpresa)))
|
||||
EnviaCorreo()
|
||||
RegistraScript("$('#C_DivRegistro').css('display', 'none');$('#C_DvFinalizado').css('display', '');")
|
||||
UpRegistro.Update()
|
||||
RecargaGlobal()
|
||||
|
||||
|
||||
Else
|
||||
Alert("OCurrió un error al guardar la empresa", TipoMensaje.MsgError)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al guardar la emrpresa desde registro basico.", ex)
|
||||
Finally
|
||||
objEmpresa.Dispose()
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Private Sub RecargaGlobal()
|
||||
Dim ObjEmpresa As New ClsSisEmpresas
|
||||
If ObjEmpresa.GetEmpresas(-1, "-1", "-1", "-1", "-1") Then
|
||||
GlobalDTEmpresas(-1) = ObjEmpresa.DtResultados
|
||||
End If
|
||||
ObjEmpresa.Dispose()
|
||||
End Sub
|
||||
|
||||
#Region " ENVIAR CORREO "
|
||||
Protected Sub REVContactoEmail_Load(sender As Object, e As EventArgs)
|
||||
RegistraScript("$('#FirstEmail').addClass('has-error');$('#helpMail').css('color', 'red')")
|
||||
End Sub
|
||||
Protected Sub EnviaCorreo()
|
||||
Dim objMail As New ClsSisMail()
|
||||
Dim body = GeneraCorreo(Nombre)
|
||||
objMail.SendMail(ClsPaginas.EmpresaNotificaciones, Email, "Activación de empresa", body, "")
|
||||
End Sub
|
||||
Private Function GeneraCorreo(Nombre As String) As String
|
||||
Dim strBody As New StringBuilder
|
||||
strBody.Append("<!DOCTYPE html>")
|
||||
strBody.Append("<html lang=""en""> ")
|
||||
strBody.Append("<body class=""page-header-fixed page-quick-sidebar-over-content "">")
|
||||
strBody.Append("<style>")
|
||||
strBody.Append(".portlet {margin-top: 0px;margin-bottom: 25px;padding: 0px;-webkit-border-radius: 4px;-moz-border-radius: 4px;-ms-border-radius: 4px;-o-border-radius: 4px;border-radius: 4px;padding: 0px !important;border: 1px solid #d78184;border-top: 0;background-color: #cb5a5e;}")
|
||||
strBody.Append(".portlet > div {font-family: Helvetica, sans-serif;}")
|
||||
strBody.Append(".portlet > .portlet-title {border-bottom: 0px solid #eee;padding: 0 10px;margin-bottom: 0px;min-height: 41px;-webkit-border-radius: 4px 4px 0 0;-moz-border-radius: 4px 4px 0 0;-ms-border-radius: 4px 4px 0 0;-o-border-radius: 4px 4px 0 0;border-radius: 4px 4px 0 0;color: #fff;}")
|
||||
strBody.Append(".portlet > .portlet-title {background-color: #cb5a5e;}")
|
||||
strBody.Append(".portlet > .portlet-title > div {padding: 11px 0 9px 0;}")
|
||||
strBody.Append(".portlet > .portlet-title > div {float: left;display: inline-block;font-size: 24px;line-height: 18px;padding: 10px 0;}")
|
||||
strBody.Append(".portlet > .portlet-body {background-color: #fff;padding: 10px;} ")
|
||||
strBody.Append(".portlet > .portlet-body {clear: both;-webkit-border-radius: 0 0 4px 4px;-moz-border-radius: 0 0 4px 4px;-ms-border-radius: 0 0 4px 4px;-o-border-radius: 0 0 4px 4px;border-radius: 0 0 4px 4px;}")
|
||||
strBody.Append(".mitablita td:nth-child(1){width: 100px; font-weight:700;}")
|
||||
strBody.Append("a{ color: #666;padding: 3px 9px; line-height: 1.5;background-color: #fff;border: 1px solid #ccc; text-decoration: none;}a:hover{background-color: #ededed;}")
|
||||
strBody.Append(".mitablita tr:nth-child(5) td{ text-align: right;}td{min-width:100px; }")
|
||||
strBody.Append("</style>")
|
||||
strBody.Append(" <div style=""Width:100%;"">")
|
||||
strBody.Append("<div style='text-align:center; font-family: Helvetica, sans-serif;'><table><tr><td style='text-align:center'> <h1> <img src='http://sig.adsistemas.mx/Imagenes/LogoSinFondo.png' width='46' height='61'/> AD Sistemas Soluciones en TI</h1> </td></tr></table> </div> ")
|
||||
strBody.Append(" <div class=""portlet box red "" style=""margin-top: 0px;margin-bottom: 25px;padding: 0px;-webkit-border-radius: 4px;-moz-border-radius: 4px;-ms-border-radius: 4px;-o-border-radius: 4px;border-radius: 4px;padding: 0px !important;border: 1px solid #d78184;border-top: 0;background-color: #cb5a5e;"">")
|
||||
strBody.Append(" <div class=""portlet-title"" style="" font-family: Helvetica, sans-serif; background-color: #cb5a5e;border-bottom: 0px solid #eee;padding: 0 10px;margin-bottom: 0px;min-height: 41px;-webkit-border-radius: 4px 4px 0 0;-moz-border-radius: 4px 4px 0 0;-ms-border-radius: 4px 4px 0 0;-o-border-radius: 4px 4px 0 0;border-radius: 4px 4px 0 0;color: #fff;"">")
|
||||
strBody.Append(" <div class=""caption"" style=""padding: 11px 0 9px 0;float: left;display: inline-block;font-size: 24px;line-height: 18px;padding: 10px 0;"">")
|
||||
strBody.Append(" <i class=""fa fa-cart-plus""></i>Completar Registro")
|
||||
strBody.Append(" </div>")
|
||||
strBody.Append(" </div>")
|
||||
strBody.Append(" <div class=""portlet-body "" style=""font-family: Helvetica, sans-serif; clear: both;-webkit-border-radius: 0 0 4px 4px;-moz-border-radius: 0 0 4px 4px;-ms-border-radius: 0 0 4px 4px;-o-border-radius: 0 0 4px 4px;border-radius: 0 0 4px 4px;background-color: #fff;padding: 10px;"" >")
|
||||
strBody.Append(" <table class=""mitablita"" style=""font-family: Helvetica, sans-serif;"">")
|
||||
strBody.Append(" <tr>")
|
||||
strBody.Append(" <td>Fecha: ")
|
||||
strBody.Append(DateTime.Now.ToString("dd/MM/yy"))
|
||||
strBody.Append(" </td> <td>")
|
||||
strBody.Append("</td> </tr>")
|
||||
strBody.Append(" <tr>")
|
||||
strBody.AppendFormat(" <td><b>{0}<br/></b> <br/> </td>", Nombre)
|
||||
strBody.Append(" <td>")
|
||||
strBody.Append("</td> </tr>")
|
||||
strBody.Append(" <tr></tr> ")
|
||||
strBody.Append(" <tr>")
|
||||
strBody.Append(" <td>Para continuar con el proceso de registro y activación, por favor haga click en la siguiente liga: </td>")
|
||||
strBody.Append("<tr><td colspan=""4"" >")
|
||||
strBody.AppendFormat("<a href='{0}'>Continuar </a> <br/> <br/> </td></tr>", Liga)
|
||||
strBody.Append("<tr> <td> Le recomendamos tener la siguiente información a la mano: </td> </tr>")
|
||||
strBody.Append("<tr> <td> ")
|
||||
strBody.Append("<ul>")
|
||||
strBody.Append("<li>Datos Fiscales (Direccion, Contacto, Regimen, Certificados digitales, etc. ) </li> ")
|
||||
strBody.Append("<li> Roles/Puestos, Permisos y Usuarios que usaran el SIG )</li> ")
|
||||
strBody.Append("<li>Correos para envío de notificaciones y Para recepción de facturas (si no cuenta con un correo, se le proporcionará uno)</li> ")
|
||||
strBody.Append("<li>Formatos de factura, plantillas de correo y logo </li> ")
|
||||
strBody.Append("<li>Clasificaciones contables, Productos / Servicios y las unidades de medida de éstos</li> ")
|
||||
strBody.Append("<li>Almacenes que se utilizand, y el método de salida de inventario</li> ")
|
||||
strBody.Append("<li>Proveedores, clientes y proyectos de la empresa</li> ")
|
||||
strBody.Append("</ul>")
|
||||
strBody.Append(" </td> </tr>")
|
||||
strBody.Append(" </table>")
|
||||
strBody.Append(" </div>")
|
||||
strBody.Append(" </div>")
|
||||
strBody.Append(" </div>")
|
||||
strBody.Append(" </div>")
|
||||
strBody.Append("</body>")
|
||||
strBody.Append("</html>")
|
||||
Return strBody.ToString
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -90,7 +90,7 @@ function FiltrarTabla(idtxt, idtable, idcontador) {
|
||||
}
|
||||
|
||||
function FiltrarTablaStr(str, idtable, idcontador) {
|
||||
if (str == '' || str == 'Todos') { $('table#' + idtable + ' tr').css('display', ''); }
|
||||
if (str == '' || str == "-1" || str == 'Todos') { $('table#' + idtable + ' tr').css('display', ''); }
|
||||
else {
|
||||
$('table#' + idtable + ' tr:not(.ADtr)').css('display', 'none');
|
||||
$('table#' + idtable + ' tr:contains("' + str + '")').css('display', '');
|
||||
@@ -106,7 +106,7 @@ function FiltrarTablaStrMulti(idtable, idcontador /*, str1, str2, str3...*/ ) {
|
||||
let strc = '';
|
||||
for (let i = 2 /*a partir del 3er argumento obtiene los str*/; i < arguments.length; i++) {
|
||||
let str = arguments[i];
|
||||
if (str != '' && str != 'Todos') {
|
||||
if (str != '' && str != "-1" && str != 'Todos') {
|
||||
strc += ':contains("' + str + '")';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,6 +61,7 @@
|
||||
<asp:ListItem Text="GlobalDTInvPSSeccionesAlmacen" Value="GlobalDTInvPSSeccionesAlmacen"></asp:ListItem>
|
||||
<asp:ListItem Text="GlobalDTTipoTransacciones" Value="GlobalDTTipoTransacciones"></asp:ListItem>
|
||||
<asp:ListItem Text="GlobalSATGenerales" Value="GlobalSATGenerales"></asp:ListItem>
|
||||
<asp:ListItem Text="GlobalDTActivoFijos" Value="GlobalDTActivoFijos"></asp:ListItem>
|
||||
|
||||
</asp:DropDownList>
|
||||
|
||||
|
||||
@@ -101,12 +101,18 @@ Partial Class Sistemas_CatSesiones
|
||||
CargaGlobalDTTipoTransacciones()
|
||||
ElseIf DdlVariable.SelectedItem.Value = "GlobalSATGenerales" Then
|
||||
CargaSATGenerales()
|
||||
ElseIf DdlVariable.SelectedItem.Value = "GlobalDTActivoFijos" Then
|
||||
CargaActivoFijos()
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaActivoFijos()
|
||||
GlobalDTActivoFijos(UsuarioActual.CveEmpresa) = Nothing
|
||||
GlobalDTModeloActivoFijo(UsuarioActual.CveEmpresa, -1) = Nothing
|
||||
End Sub
|
||||
|
||||
Private Sub CargaSATGenerales()
|
||||
Using ObjGrales As New ClsGenerales
|
||||
If ObjGrales.GetSATUsosCFDI Then Application("GlobalDTSATUsosCFDI") = ObjGrales.DtResultados
|
||||
@@ -489,9 +495,10 @@ Partial Class Sistemas_CatSesiones
|
||||
End Sub
|
||||
|
||||
Private Sub CargaOCEstatus()
|
||||
Dim ObjOC As New ClsOC
|
||||
If ObjOC.GetEstatus() Then Application("GlobalDTOCEstatus") = ObjOC.DtResultados Else Application("GlobalDTOCEstatus") = Nothing
|
||||
ObjOC.Dispose()
|
||||
'Dim ObjOC As New ClsOC
|
||||
'If ObjOC.GetEstatus() Then Application("GlobalDTOCEstatus") = ObjOC.DtResultados Else Application("GlobalDTOCEstatus") = Nothing
|
||||
'ObjOC.Dispose()
|
||||
GlobalDTOCEstatus(UsuarioActual.CveEmpresa) = Nothing
|
||||
End Sub
|
||||
|
||||
Private Sub CargaOCEstatusUsuarios()
|
||||
|
||||
@@ -473,17 +473,9 @@ Partial Class Sistemas_UsuarioDetalle
|
||||
CargaEmpresasAsignaciones()
|
||||
CreaDtAsignacionesMultiEmpresa()
|
||||
CveEmpresaAnterior = DdlEmpresaAsignaciones.SelectedValue.ToEntero
|
||||
|
||||
Using ObjOc As New ClsOC
|
||||
|
||||
If ObjOc.GetEstatus() Then
|
||||
DTOCEstatus = ObjOc.DtResultados
|
||||
Else
|
||||
DTOCEstatus = New DataTable
|
||||
End If
|
||||
|
||||
End Using
|
||||
|
||||
DTOCEstatus = GlobalDTOCEstatus(UsuarioActual.CveEmpresa)
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -1371,12 +1363,10 @@ Partial Class Sistemas_UsuarioDetalle
|
||||
|
||||
'RECARGA GLOBAL BANCOS
|
||||
'If ObjBancos.GetBancosCuentasUsuarios(-1) Then
|
||||
GlobalDTBancosCuentas(-1, CveEmpresa:=UsuarioActual.CveEmpresa) = Nothing 'ObjBancos.DtResultados
|
||||
' End If
|
||||
|
||||
'RECARGA GLOBAL ESTATUS
|
||||
If ObjOC.GetEstatus() Then Application("GlobalDTOCEstatus") = ObjOC.DtResultados Else Application("GlobalDTOCEstatus") = Nothing
|
||||
|
||||
GlobalDTBancosCuentas(-1, CveEmpresa:=UsuarioActual.CveEmpresa) = Nothing 'ObjBancos.DtResultados
|
||||
' End If
|
||||
|
||||
'RECARGA GLOBAL ESTATUS
|
||||
GlobalDTOCEstatusUsuarios(UsuarioActual.CveEmpresa) = Nothing
|
||||
|
||||
'If ObjOC.GetEstatusUsuarios(-1, -1, -1, -1, -1) Then Application("GlobalDTOCEstatusUsuarios") = ObjOC.DtResultados Else Application("GlobalDTOCEstatusUsuarios") = Nothing
|
||||
|
||||
@@ -4276,16 +4276,15 @@
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<asp:Label ID="LblProyecto" runat="server" class="col-md-1 truncate" style="width: 120px">Proyecto:</asp:Label>
|
||||
<div runat="server" id="DivProyecto" class="col-md-2" style="width: 120px">
|
||||
<asp:DropDownList ID="DdlProyecto" runat="server" AutoPostBack="true" AppendDataBoundItems="true" DataTextField="Proyecto" DataValueField="CveProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||
<asp:Label ID="LblProyectoFiltro" runat="server" class="col-md-1 truncate" style="width: 120px">Proyecto:</asp:Label>
|
||||
<div runat="server" id="DivProyectoFiltro" class="col-md-2" style="width: 120px">
|
||||
<asp:DropDownList ID="DdlProyectoFiltro" runat="server" AutoPostBack="true" AppendDataBoundItems="true" DataTextField="Proyecto" DataValueField="CveProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<asp:Label ID="LblSubProyecto" runat="server" class="col-md-1 truncate" style="width: 120px; text-align: right">SubProyecto:</asp:Label>
|
||||
<div runat="server" id="DivSubProyecto" class="col-md-2" style="width: 120px">
|
||||
<asp:DropDownList ID="DdlSubProyectoFiltro" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
<asp:Label ID="LblSubProyectoFiltro" runat="server" class="col-md-1 truncate" style="width: 120px; text-align: right">SubProyecto:</asp:Label>
|
||||
<div runat="server" id="DivSubProyectoFiltro" class="col-md-2" style="width: 120px">
|
||||
<asp:DropDownList ID="DdlSubProyectoFiltro" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1302,6 +1302,7 @@ Partial Class Clientes
|
||||
|
||||
|
||||
Private Sub CargaCombos()
|
||||
CargaSubProyectos()
|
||||
CargaMetodosPago()
|
||||
CargaPrecioLista()
|
||||
CargaVendedores()
|
||||
@@ -1321,6 +1322,11 @@ Partial Class Clientes
|
||||
|
||||
CargaCombosComercioExterior()
|
||||
|
||||
End Sub
|
||||
Private Sub CargaSubProyectos()
|
||||
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, Nothing, AplicaTodos:="Seleccione")
|
||||
'DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
'DdlSubProyecto.DataBind()
|
||||
End Sub
|
||||
Private Sub CargaMetodosPago()
|
||||
'DdlMetodoPago.DataSource = GlobalDTMetodosPago.FiltraParametros("Estatus = 'Activo'", "ClaveSAT") '.FiltraParametros("CveMetodoPago > 0 ")
|
||||
@@ -1576,8 +1582,11 @@ Partial Class Clientes
|
||||
DdlTipoRetencion_SelectedIndexChanged(DdlTipoRetencion, EventArgs.Empty)
|
||||
TxtRetIVA.Text = ObjClientes.RetIVA.ToString()
|
||||
TxtRetISR.Text = ObjClientes.RetISR.ToString()
|
||||
ChkRetIVAFletesAcarreos.Checked = ObjClientes.RetieneIVAFletes
|
||||
DdlSubProyecto.SelectedValue = ObjClientes.CveSubProyecto.ToString()
|
||||
ChkRetIVAFletesAcarreos.Checked = ObjClientes.RetieneIVAFletes
|
||||
If ObjClientes.CveSubProyecto > 0 Then
|
||||
DdlSubProyecto.SelectedValueExistInsert(ObjClientes.CveSubProyecto.ToString(), GlobalDTSubProyectos(-1, CveSubProyecto:=ObjClientes.CveSubProyecto, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto"))
|
||||
End If
|
||||
|
||||
DdlZonaHoraria.SelectedValueExist(ObjClientes.DtResultados(0)("CveZonaHoraria").ToString())
|
||||
ChkEstado.Checked = ObjClientes.Estatus
|
||||
EstatusAnteriorCliente = ObjClientes.Estatus
|
||||
@@ -8428,7 +8437,7 @@ Partial Class Clientes
|
||||
|
||||
Private Sub CargaFiltros()
|
||||
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, Nothing, LblSubProyecto)
|
||||
CargarCentrosDeCosto(DdlProyectoFiltro, DdlSubProyectoFiltro, LblProyectoFiltro, LblSubProyectoFiltro)
|
||||
|
||||
'Cargo Clasificaciones
|
||||
DdlClasificacionFilto.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
|
||||
@@ -8465,8 +8474,8 @@ Partial Class Clientes
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProyecto.SelectedIndexChanged
|
||||
CargarSubProyecto(DdlSubProyecto, DdlProyecto.SelectedValue)
|
||||
Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProyectoFiltro.SelectedIndexChanged
|
||||
CargarSubProyecto(DdlSubProyecto, DdlProyectoFiltro.SelectedValue)
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlClasificacionFilto_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
@@ -8509,7 +8518,7 @@ Partial Class Clientes
|
||||
FechaI = If(IsDate(TxtFechaIFiltro.Text.Trim()), TxtFechaIFiltro.Text.ToDate(), MinFecha)
|
||||
FechaF = If(IsDate(TxtFechaFFiltro.Text.Trim()), TxtFechaFFiltro.Text.ToDate(), MaxFecha)
|
||||
|
||||
If ObjVentas.GetRepProductosServiciosDetalle(DdlProyecto.SelectedValue.ToEntero(), DdlSubProyectoFiltro.SelectedValue.ToEntero(), -1, DdlClasificacionFilto.SelectedValue.ToEntero(),
|
||||
If ObjVentas.GetRepProductosServiciosDetalle(DdlProyectoFiltro.SelectedValue.ToEntero(), DdlSubProyectoFiltro.SelectedValue.ToEntero(), -1, DdlClasificacionFilto.SelectedValue.ToEntero(),
|
||||
DdlPSFiltro.SelectedValue.ToEntero(), FechaI, FechaF, -1, MinFecha, MaxFecha, -1,
|
||||
CveCliente, -1, DdlVendedorFiltro.SelectedValue.ToEntero(), DdlUsuario.SelectedValue.ToEntero(), -1,
|
||||
UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:="Ing", GPO:=DdlGrupo.SelectedValue.ToEntero()) Then
|
||||
|
||||
@@ -201,7 +201,7 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
}
|
||||
|
||||
|
||||
if (CveVenta > 0 && Uuid != "")
|
||||
if (CveVenta > 0)
|
||||
{
|
||||
var respCancelacion = CancelarDocumento(CveVenta, -1, CveCliente, Folio, Uuid, "", DateTime.Now, TipoDocto, Total.ToDouble(), UsuarioActual.Empresa.CvePAC, EsRefacturacion: true, FolioSustitucion: FolioSustitucion, CveEstatusRefacturacion: CveEstatusRefacturacion);
|
||||
|
||||
@@ -258,14 +258,17 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
}
|
||||
else
|
||||
{
|
||||
var resp = Timbrado.VerificarVigenciaSAT(Uuid, UsuarioActual.Empresa.RFC, RFCReceptor, Total, true);
|
||||
if (resp != null)
|
||||
if (!string.IsNullOrEmpty(Uuid))
|
||||
{
|
||||
sb.AppendFormat("Folio Fiscal: {0} <br/>", Uuid);
|
||||
sb.AppendFormat("Código Estado: {0} <br/>", resp.CodigoEstatus);
|
||||
sb.AppendFormat("Estado: {0} <br/>", resp.Estado);
|
||||
sb.AppendFormat("Es Cancelable: {0} <br/>", string.IsNullOrEmpty(resp.EsCancelable) ? "Desconocido" : resp.EsCancelable);
|
||||
sb.AppendFormat("Estatus de Cancelación: {0} <br/><br/>", string.IsNullOrEmpty(resp.EsCancelable) ? "Desconocido" : resp.EstatusCancelacion);
|
||||
var resp = Timbrado.VerificarVigenciaSAT(Uuid, UsuarioActual.Empresa.RFC, RFCReceptor, Total, true);
|
||||
if (resp != null)
|
||||
{
|
||||
sb.AppendFormat("Folio Fiscal: {0} <br/>", Uuid);
|
||||
sb.AppendFormat("Código Estado: {0} <br/>", resp.CodigoEstatus);
|
||||
sb.AppendFormat("Estado: {0} <br/>", resp.Estado);
|
||||
sb.AppendFormat("Es Cancelable: {0} <br/>", string.IsNullOrEmpty(resp.EsCancelable) ? "Desconocido" : resp.EsCancelable);
|
||||
sb.AppendFormat("Estatus de Cancelación: {0} <br/><br/>", string.IsNullOrEmpty(resp.EsCancelable) ? "Desconocido" : resp.EstatusCancelacion);
|
||||
}
|
||||
}
|
||||
|
||||
sb.Append(respCancelacion.Mensaje);
|
||||
@@ -288,6 +291,7 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
|
||||
CargaDatos();
|
||||
}
|
||||
|
||||
UPDatos.Update();
|
||||
|
||||
}
|
||||
@@ -610,6 +614,11 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
// if (e.Row.FCLinkButton("LnkCancelarFolioSustitucion") != null) e.Row.FCLinkButton("LnkCancelarFolioSustitucion").Visible = true;
|
||||
//}
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(e.Row.DBCampo("FolioFiscal")))
|
||||
{
|
||||
e.Row.FCLinkButton("LnkValidarRefac").Visible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
public void BtnEnviarMailCancelacion_Click(object sender, EventArgs e)
|
||||
|
||||
@@ -158,7 +158,7 @@ Partial Class Ventas_RepProductosServicios
|
||||
DdlClienteClasificacion.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
CargaGrupo()
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, Nothing, LblSubProyecto)
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto)
|
||||
CargarCentrosDeCosto(Nothing, DdlSubProyectoEjecucion, Nothing, Nothing)
|
||||
|
||||
TipoCambio = 1
|
||||
|
||||
@@ -189,7 +189,7 @@ Partial Class Ventas_RepProductosServiciosDetalle
|
||||
DdlTipoPSDes.DataBind()
|
||||
|
||||
CargaGrupo()
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, Nothing, LblSubProyecto)
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto)
|
||||
CargarCentrosDeCosto(Nothing, DdlSubProyectoEjecucion, Nothing, Nothing)
|
||||
|
||||
TCEspecifico = 0
|
||||
@@ -406,7 +406,6 @@ Partial Class Ventas_RepProductosServiciosDetalle
|
||||
|
||||
CveMoneda = If(Request("CveMoneda") IsNot Nothing AndAlso Request("CveMoneda").ToEntero() > 0, Request("CveMoneda").ToEntero(), -1).ToEntero
|
||||
DdlProyecto.SelectedValueExist(CveProyecto)
|
||||
If DivProyecto.Visible Then CargaSubProyecto()
|
||||
DdlSubProyecto.SelectedValueExist(CveSubProyecto)
|
||||
DdlCategoria.SelectedValueExist(CveCategoria)
|
||||
DdlClasificacion.SelectedValueExist(CveClasificacion)
|
||||
|
||||
@@ -288,7 +288,7 @@ Partial Class RepVentaDetalle
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCombos()
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, Nothing, LblSubProyecto)
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto)
|
||||
CargaClientes()
|
||||
'DdlClientes.setEsWebService(False)
|
||||
|
||||
|
||||
@@ -135,6 +135,7 @@ Partial Class Ventas_RepVentas
|
||||
DdlGrupo.Items.Insert(2, New ListItem("Año/Mes", "3"))
|
||||
DdlGrupo.Items.Insert(3, New ListItem("Fecha", "4"))
|
||||
DdlGrupo.Items.Insert(4, New ListItem("Cliente", "5"))
|
||||
DdlGrupo.Items.Insert(4, New ListItem("SubProyecto", "6"))
|
||||
DdlGrupo.Items.Insert(5, New ListItem("Corte", "16"))
|
||||
DdlGrupo.Items.Insert(6, New ListItem("Vendedor", "7"))
|
||||
DdlGrupo.Items.Insert(7, New ListItem("Usuario", "8"))
|
||||
@@ -158,7 +159,7 @@ Partial Class Ventas_RepVentas
|
||||
|
||||
Private Sub CargaCombos()
|
||||
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, Nothing, LblSubProyecto)
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto)
|
||||
|
||||
'CargaClientes
|
||||
Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
|
||||
|
||||
@@ -14057,7 +14057,13 @@ Partial Class Ventas
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, Importe91, Referencia, 91, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=Dr("CveVenta").ToString().ToEntero(), ImporteMX:=ImporteMN91, ImporteME:=If(tipoCambio = 1, 0, Importe91), CveSubProyecto:=CveSubProyectoContabilizar, TipoCambio:=tipoCambio) Then
|
||||
Dim CveConceptoAplicacionNC As Integer = 91
|
||||
'SI LA NOTA DE CREDITO ES EN MONEDA EXTRANGERA UTILIZAR EL CONCEPTO DE APLICACION ME
|
||||
If ConceptoContable = 293 Then
|
||||
CveConceptoAplicacionNC = 294
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, Importe91, Referencia, CveConceptoAplicacionNC, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=Dr("CveVenta").ToString().ToEntero(), ImporteMX:=ImporteMN91, ImporteME:=If(tipoCambio = 1, 0, Importe91), CveSubProyecto:=CveSubProyectoContabilizar, TipoCambio:=tipoCambio) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user