Merge branch 'master' of http://oirigoyen@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -5887,21 +5887,21 @@ Public Class ClsContabilidad
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function AddContaEjercicio(FechaIng As String, CveUsuario As Integer, CveEmpresa As Integer, Optional Ejercicio As Integer = -1, Optional PeriodoActual As Integer = -1,
|
||||
Public Function AddContaEjercicio(FechaIng As String, CveUsuario As Integer, CveEmpresa As Integer, Optional Ejercicio As Integer = -1, Optional PeriodoActual As Integer = 0,
|
||||
Optional CveCuentaCierre As Integer = -1, Optional CvePoliza As Integer = -1, Optional CvePrePoliza As Integer = -1,
|
||||
Optional Estatus As Integer = -1) As Boolean
|
||||
Optional Estatus As Boolean = False) As Boolean
|
||||
Dim Retorno = False
|
||||
|
||||
DataAdapter("PA_Conta_ContaEjerciciosAdd")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Ejercicio", SqlDbType.Int).Value = Ejercicio
|
||||
.Add("@PeriodoActual", SqlDbType.Int).Value = PeriodoActual
|
||||
.Add("@PeriodoActual", SqlDbType.TinyInt).Value = PeriodoActual
|
||||
.Add("@CveCuentaCierre", SqlDbType.Int).Value = CveCuentaCierre
|
||||
.Add("@CvePoliza", SqlDbType.Int).Value = CvePoliza
|
||||
.Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza
|
||||
.Add("@Estatus", SqlDbType.Int).Value = Estatus
|
||||
.Add("@FechaIng", SqlDbType.Int).Value = FechaIng
|
||||
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
||||
.Add("@FechaIng", SqlDbType.DateTime).Value = FechaIng
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
@@ -5916,20 +5916,20 @@ Public Class ClsContabilidad
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateContaEjercicio(CveEjercicio As Integer, Optional Ejercicio As Integer = -1, Optional PeriodoActual As Integer = -1, Optional CveCuentaCierre As Integer = -1,
|
||||
Optional CvePoliza As Integer = -1, Optional CvePrePoliza As Integer = -1, Optional Estatus As Integer = -1) As Boolean
|
||||
Public Function UpdateContaEjercicio(CveEjercicio As Integer, Optional Ejercicio As Integer = -1, Optional PeriodoActual As Integer = 0, Optional CveCuentaCierre As Integer = -1,
|
||||
Optional CvePoliza As Integer = -1, Optional CvePrePoliza As Integer = -1, Optional Estatus As Boolean = False) As Boolean
|
||||
Dim Retorno = False
|
||||
|
||||
DataAdapter("PA_Conta_ContaEjerciciosAdd")
|
||||
DataAdapter("PA_Conta_ContaEjerciciosUpdate")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEjercicio", SqlDbType.Int).Value = CveEjercicio
|
||||
.Add("@Ejercicio", SqlDbType.Int).Value = Ejercicio
|
||||
.Add("@PeriodoActual", SqlDbType.Int).Value = PeriodoActual
|
||||
.Add("@PeriodoActual", SqlDbType.TinyInt).Value = PeriodoActual
|
||||
.Add("@CveCuentaCierre", SqlDbType.Int).Value = CveCuentaCierre
|
||||
.Add("@CvePoliza", SqlDbType.Int).Value = CvePoliza
|
||||
.Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza
|
||||
.Add("@Estatus", SqlDbType.Int).Value = Estatus
|
||||
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -5942,13 +5942,13 @@ Public Class ClsContabilidad
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function RemoveContaEjercicio(CveEmpresa As Integer) As Boolean
|
||||
Public Function RemoveContaEjercicio(CveEjercicio As Integer) As Boolean
|
||||
Dim Retorno = False
|
||||
|
||||
DataAdapter("PA_Conta_ContaEjerciciosDelete")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveEjercicio", SqlDbType.Int).Value = CveEjercicio
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -5961,6 +5961,31 @@ Public Class ClsContabilidad
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function CierreEjercicio(CveEmpresa As Integer, Ejercicio As Integer, CveCuentaCierre As Integer, FechaI As String, FechaF As String, CveUsuario As Integer) As Integer
|
||||
Dim Retorno As Integer = -1
|
||||
|
||||
DataAdapter("PA_Conta_CierreEjercicio")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@Ejercicio", SqlDbType.Int).Value = Ejercicio
|
||||
.Add("@CveCuentaCierre", SqlDbType.Int).Value = CveCuentaCierre
|
||||
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
||||
.Add("@FechaF", SqlDbType.DateTime).Value = FechaF
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CvePrePoliza", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = SqlAdapter.SelectCommand.Parameters("@CvePrePoliza").Value.ToString.ToEntero
|
||||
Catch ex As Exception
|
||||
Me.OnError("Ocurrió un error al eliminar el catálogo de Conta Ejercicios", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
#Region " RECONSTRUCCION DE PREPOLIZAS "
|
||||
Public Function ReconstruirPP_PagoCompra(CvePrePoliza As Integer) As Boolean
|
||||
Dim Retorno = False
|
||||
|
||||
@@ -3514,7 +3514,7 @@ Public Class ClsPaginas
|
||||
End If
|
||||
|
||||
'ADSSession.ADSSessionConfig.SessionManager(ADSSession.OpcionSession.SetAspSig, ASPSIG:=Request.Cookies[".ASPXSIG"].ToString())
|
||||
ADSSession.ADSSessionConfig.SessionManager(ADSSession.OpcionSession.CambiarModulo, Nothing, -1, "", Request.Url.ToString())
|
||||
ADSSession.ADSSessionConfig.SessionManager(ADSSession.OpcionSession.CambiarModulo, Nothing, -1, "", Request.Url.PathAndQuery.ToString())
|
||||
'If Me.Request.ServerVariables("http_user_agent").ToLower.Contains("safari") AndAlso Page.ClientTarget <> "uplevel" Then Page.ClientTarget = "uplevel" 'Código agregado para que muestre bién el menu, en chrome
|
||||
End If
|
||||
End Sub
|
||||
@@ -4072,6 +4072,7 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Contabilidad2/RepBalanceGeneral.aspx".ToUpper(), 530)
|
||||
PaginaDict.Add("/Contabilidad2/CatCuentasAsignaciones.aspx".ToUpper(), 724)
|
||||
PaginaDict.Add("/Contabilidad2/CatContaEjercicios.aspx".ToUpper(), 725)
|
||||
PaginaDict.Add("/Contabilidad2/PolizasImpresion.aspx".ToUpper(), 726)
|
||||
#End Region
|
||||
'CONTRATOS
|
||||
#Region "Contratos"
|
||||
@@ -5138,55 +5139,44 @@ Public Class ClsPaginas
|
||||
'limpio ReportViwer
|
||||
Dim sw As New System.Diagnostics.Stopwatch()
|
||||
sw.Start()
|
||||
'Dim Bytes As Byte() = Nothing
|
||||
'Try
|
||||
' Dim fllreport As New ADSReportLib.FullTrustReportviewer()
|
||||
' fllreport.Initialize("DisplayName", RutaReporte, Parametros, New List(Of String()), True)
|
||||
' For Each RDS As ReportDataSource In DataSource
|
||||
' fllreport.AddDataSources(RDS)
|
||||
' Next
|
||||
' Dim Warnings As Warning() = Nothing
|
||||
' Dim StreamIds As String() = Nothing
|
||||
' Dim MimeType As String = Nothing
|
||||
' Dim Encoding As String = Nothing
|
||||
' Dim Extension As String = Nothing
|
||||
' Bytes = fllreport.Render(Formato, Nothing, MimeType, Encoding, Extension, StreamIds, Warnings)
|
||||
' fllreport = Nothing
|
||||
'Catch ex As Microsoft.Reporting.WebForms.ScriptManagerNotFoundException
|
||||
' GuardaLog($"Error: { If(ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, ex.Message) } | Descripcion: {If(ex.InnerException IsNot Nothing AndAlso ex.InnerException.InnerException IsNot Nothing AndAlso ex.InnerException.InnerException.Message IsNot Nothing, ex.InnerException.InnerException.Message, If(ex.InnerException IsNot Nothing AndAlso ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, "Sin descripcion"))} - Ruta {RutaReporte}")
|
||||
' 'HAY QUE VALIDAR QUE LOS OBJETOS QUE SE USAN PARA GUARDAR LOG EXISTEN!!! IPP 14 AGOSTO 2017
|
||||
' 'GuardaLog($"Error: {ex.InnerException.Message} | Descripcion: {If(ex.InnerException.InnerException IsNot Nothing, ex.InnerException.InnerException.Message, "Sin descripcion")} - Ruta {RutaReporte}")
|
||||
'Catch ex As Exception
|
||||
' GuardaLog($"Error: { If(ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, ex.Message) } | Descripcion: {If(ex.InnerException IsNot Nothing AndAlso ex.InnerException.InnerException IsNot Nothing AndAlso ex.InnerException.InnerException.Message IsNot Nothing, ex.InnerException.InnerException.Message, If(ex.InnerException IsNot Nothing AndAlso ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, "Sin descripcion"))} - Ruta {RutaReporte}")
|
||||
''HAY QUE VALIDAR QUE LOS OBJETOS QUE SE USAN PARA GUARDAR LOG EXISTEN!!! IPP 14 AGOSTO 2017
|
||||
''GuardaLog($"Error {ex.InnerException.Message} | Descripcion: {If(ex.InnerException.InnerException IsNot Nothing, ex.InnerException.InnerException.Message, "Sin descripcion")} - Ruta {RutaReporte}")
|
||||
'End Try
|
||||
|
||||
If IsNothing(MR) Then MR = New ReportViewer
|
||||
|
||||
Dim Bytes As Byte() = Nothing
|
||||
|
||||
|
||||
Dim setup As AppDomainSetup = New AppDomainSetup
|
||||
With setup
|
||||
.ApplicationBase = Environment.CurrentDirectory
|
||||
.LoaderOptimization = LoaderOptimization.MultiDomainHost
|
||||
End With
|
||||
setup.SetCompatibilitySwitches({"NetFx40_LegacySecurityPolicy"})
|
||||
Dim _casPolicyEnabledDomain As AppDomain = AppDomain.CreateDomain("Full Trust", Nothing, setup)
|
||||
Dim fllreport As ADSReportLib.FullTrustReportviewer = Nothing
|
||||
Try
|
||||
'Dim rvNextgenReport2 As WebReportviewer.FullTrustReportviewer = CType(_casPolicyEnabledDomain.CreateInstanceFromAndUnwrap(GetType(WebReportviewer.FullTrustReportviewer).Assembly.CodeBase, GetType(WebReportviewer.FullTrustReportviewer).FullName), WebReportviewer.FullTrustReportviewer)
|
||||
'rvNextgenReport2.Initialize(DisplayName, ReportPath, Visible, reportParam, reportRenderFormat, DeviceInfo, repMainContent, repSubContent)
|
||||
|
||||
'For Each _ReportDataSource As ReportDataSource In DataSources
|
||||
' rvNextgenReport2.AddDataSources(_ReportDataSource.Name, CType(_ReportDataSource.Value, DataTable))
|
||||
'Next
|
||||
|
||||
'Return rvNextgenReport2.Render(reportRenderFormat, DeviceInfo)
|
||||
fllreport = CType(_casPolicyEnabledDomain.CreateInstanceFromAndUnwrap(GetType(ADSReportLib.FullTrustReportviewer).Assembly.CodeBase, GetType(ADSReportLib.FullTrustReportviewer).FullName), ADSReportLib.FullTrustReportviewer)
|
||||
|
||||
Dim bdir As String = AppDomain.CurrentDomain.BaseDirectory
|
||||
RutaReporte.Replace("/", "\")
|
||||
If Not RutaReporte.ToUpper().StartsWith(bdir.ToUpper()) Then
|
||||
RutaReporte = String.Format("{0}{1}", bdir, RutaReporte)
|
||||
End If
|
||||
fllreport.Initialize("DisplayName", RutaReporte, Parametros.AsEnumerable(), New List(Of String()), True)
|
||||
For Each RDS As ReportDataSource In DataSource
|
||||
MR.LocalReport.DataSources.Add(RDS)
|
||||
fllreport.AddDataSources(RDS.Name, DirectCast(RDS.Value, DataTable))
|
||||
Next
|
||||
'Dim permissions As New Security.PermissionSet(Security.Permissions.PermissionState.None)
|
||||
'permissions.AddPermission(New Security.Permissions.FileIOPermission(Security.Permissions.PermissionState.Unrestricted))
|
||||
'permissions.AddPermission(New Security.Permissions.SecurityPermission(Security.Permissions.SecurityPermissionFlag.Execution))
|
||||
'MR.LocalReport.SetBasePermissionsForSandboxAppDomain(permissions)
|
||||
|
||||
MR.LocalReport.ReportPath = RutaReporte
|
||||
MR.ProcessingMode = ProcessingMode.Local
|
||||
MR.LocalReport.EnableExternalImages = True
|
||||
MR.LocalReport.SetParameters(Parametros)
|
||||
MR.LocalReport.Refresh()
|
||||
Dim Warnings As Warning() = Nothing
|
||||
Dim StreamIds As String() = Nothing
|
||||
Dim MimeType As String = Nothing
|
||||
Dim Encoding As String = Nothing
|
||||
Dim Extension As String = Nothing
|
||||
Bytes = MR.LocalReport.Render(Formato, Nothing, MimeType, Encoding, Extension, StreamIds, Warnings)
|
||||
|
||||
Bytes = fllreport.Render(Formato, Nothing, MimeType, Encoding, Extension, StreamIds)
|
||||
fllreport = Nothing
|
||||
Catch ex As Microsoft.Reporting.WebForms.ScriptManagerNotFoundException
|
||||
GuardaLog($"Error: { If(ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, ex.Message) } | Descripcion: {If(ex.InnerException IsNot Nothing AndAlso ex.InnerException.InnerException IsNot Nothing AndAlso ex.InnerException.InnerException.Message IsNot Nothing, ex.InnerException.InnerException.Message, If(ex.InnerException IsNot Nothing AndAlso ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, "Sin descripcion"))} - Ruta {RutaReporte}")
|
||||
'HAY QUE VALIDAR QUE LOS OBJETOS QUE SE USAN PARA GUARDAR LOG EXISTEN!!! IPP 14 AGOSTO 2017
|
||||
@@ -5195,9 +5185,10 @@ Public Class ClsPaginas
|
||||
GuardaLog($"Error: { If(ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, ex.Message) } | Descripcion: {If(ex.InnerException IsNot Nothing AndAlso ex.InnerException.InnerException IsNot Nothing AndAlso ex.InnerException.InnerException.Message IsNot Nothing, ex.InnerException.InnerException.Message, If(ex.InnerException IsNot Nothing AndAlso ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, "Sin descripcion"))} - Ruta {RutaReporte}")
|
||||
'HAY QUE VALIDAR QUE LOS OBJETOS QUE SE USAN PARA GUARDAR LOG EXISTEN!!! IPP 14 AGOSTO 2017
|
||||
'GuardaLog($"Error {ex.InnerException.Message} | Descripcion: {If(ex.InnerException.InnerException IsNot Nothing, ex.InnerException.InnerException.Message, "Sin descripcion")} - Ruta {RutaReporte}")
|
||||
Finally
|
||||
AppDomain.Unload(_casPolicyEnabledDomain)
|
||||
End Try
|
||||
MR.LocalReport.ReleaseSandboxAppDomain()
|
||||
MR.Dispose()
|
||||
If fllreport IsNot Nothing Then fllreport.liberarecursos()
|
||||
|
||||
sw.Stop()
|
||||
If sw.Elapsed.TotalSeconds > 10 Then
|
||||
|
||||
@@ -2986,8 +2986,6 @@ Namespace Modelos
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
'Conta ContPAQ
|
||||
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
|
||||
'Conta SIG
|
||||
CveCuenta = ObjConta.DtResultados.Rows(0)("IdCtaContableSIG").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
BIN
Bin/Microsoft.ReportViewer.WebForms.dll
Normal file
BIN
Bin/Microsoft.ReportViewer.WebForms.dll
Normal file
Binary file not shown.
@@ -1295,80 +1295,83 @@ Partial Class Compras_Compras
|
||||
ViewState("CveFactura") = Request("CveFactura").ToEntero
|
||||
|
||||
Dim RFC As String = CargaFactura(CveFactura)
|
||||
DdlProveedor.Visible = False
|
||||
HplProveedor.Visible = True
|
||||
GvInv.Visible = True
|
||||
CargaProveedor(-1, RFC)
|
||||
If RFC.Trim <> String.Empty Then
|
||||
DdlProveedor.Visible = False
|
||||
HplProveedor.Visible = True
|
||||
GvInv.Visible = True
|
||||
CargaProveedor(-1, RFC)
|
||||
|
||||
If Not DdlTipoComprobante.SelectedValue = "NC" Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(128) = "1" And Not UsuarioActual.TienePermisoProceso(213) Then
|
||||
If TmpDT.MAX("CvePS").ToEntero > 0 Then
|
||||
BtnGuardar.Enabled = False
|
||||
RegistraScript("$('#ImgBtnBuscarOC').click()")
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If DdlTipoComprobante.SelectedValue = "NC" Then
|
||||
paneldevolucion.Visible = True
|
||||
Pnlalmaceninventarios.Visible = False
|
||||
cargaddldevoluciones(CveProveedor, TxtSubTotal.Text.ToDouble)
|
||||
InicializaAplicaNCFact()
|
||||
DivReembolso.Visible = False
|
||||
RBLPago.Items(2).Enabled = False
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
CambiaEjercicioAC()
|
||||
End If
|
||||
|
||||
' ''Fecha limite para ingreso de facturas
|
||||
''Dim DtEmpresa As DataTable = GlobalDTEmpresas(UsuarioActual.CveEmpresa)
|
||||
''If DtEmpresa.Rows.Count > 0 Then
|
||||
'' Dim FechaLimite = DateSerial(DtEmpresa.Rows(0)("EjercicioActual").ToString.ToEntero, DtEmpresa.Rows(0)("PeriodoActual").ToString.ToEntero, DtEmpresa.Rows(0)("DiasPermitidos").ToString.ToEntero)
|
||||
'' If Month(TxtFecha.Text.ToDate) < (Month(FechaLimite) - 1) Or (Month(TxtFecha.Text.ToDate) = (Month(FechaLimite) - 1) And Day(Date.Now) > Day(FechaLimite)) Then
|
||||
'' Alert("La factura actual ya no aplica para ingresarse al sístema.", TipoMensaje.MsgAdvertencia)
|
||||
'' BtnGuardar.Enabled = False
|
||||
'' Else
|
||||
'' Alert("En tiempo")
|
||||
'' End If
|
||||
''Else
|
||||
'' Alert("No se pudieron cargar los datos de la empresa", TipoMensaje.MsgAdvertencia)
|
||||
''End If
|
||||
'Carga Compra
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(123).ToEntero > 0 And Not UsuarioActual.TienePermisoProceso(156) Then
|
||||
If Not ValidaCierrePeriodo() Then
|
||||
Alert("El periodo de la compra actual ya se encuentra cerrado. No podra registrar la compra.", TipoMensaje.MsgAdvertencia)
|
||||
BtnGuardar.Visible = False
|
||||
TxtOC.Enabled = False
|
||||
ImgBtnBuscarOC.Enabled = False
|
||||
CierrePeriodo = True
|
||||
DivRestriccionAdvertencia.Visible = True
|
||||
LtRestriccionAdvertencia.Text = "El periodo de la compra actual ya se encuentra cerrado."
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim HayDifIEPS As Boolean = False
|
||||
For Each Gvr As GridViewRow In GvPS.Rows
|
||||
If Gvr.DataKey("CvePS").ToEntero > 0 AndAlso Gvr.DataKey("IEPSPSPorcentaje").ToDouble > 0 Then
|
||||
If GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=Gvr.DataKey("CvePS").ToEntero).Rows.Count > 0 Then
|
||||
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=Gvr.DataKey("CvePS").ToEntero).Rows(0)
|
||||
If DrPS IsNot Nothing Then
|
||||
If DrPS("IEPSPorcentaje").ToString.ToDouble <> Gvr.DataKey("IEPSPSPorcentaje").ToDouble Then
|
||||
HayDifIEPS = True
|
||||
End If
|
||||
If Not DdlTipoComprobante.SelectedValue = "NC" Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(128) = "1" And Not UsuarioActual.TienePermisoProceso(213) Then
|
||||
If TmpDT.MAX("CvePS").ToEntero > 0 Then
|
||||
BtnGuardar.Enabled = False
|
||||
RegistraScript("$('#ImgBtnBuscarOC').click()")
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
If HayDifIEPS Then Alert("El porcentaje de IEPS del producto no coincide con el especificado.", TipoMensaje.MsgAdvertencia)
|
||||
If DdlTipoComprobante.SelectedValue = "NC" Then
|
||||
paneldevolucion.Visible = True
|
||||
Pnlalmaceninventarios.Visible = False
|
||||
cargaddldevoluciones(CveProveedor, TxtSubTotal.Text.ToDouble)
|
||||
InicializaAplicaNCFact()
|
||||
DivReembolso.Visible = False
|
||||
RBLPago.Items(2).Enabled = False
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(562).ToEntero > 0 Then CargaGastosServicios(UsuarioActual.Empresa.Funcionalidad(562).ToEntero)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
CambiaEjercicioAC()
|
||||
End If
|
||||
|
||||
' ''Fecha limite para ingreso de facturas
|
||||
''Dim DtEmpresa As DataTable = GlobalDTEmpresas(UsuarioActual.CveEmpresa)
|
||||
''If DtEmpresa.Rows.Count > 0 Then
|
||||
'' Dim FechaLimite = DateSerial(DtEmpresa.Rows(0)("EjercicioActual").ToString.ToEntero, DtEmpresa.Rows(0)("PeriodoActual").ToString.ToEntero, DtEmpresa.Rows(0)("DiasPermitidos").ToString.ToEntero)
|
||||
'' If Month(TxtFecha.Text.ToDate) < (Month(FechaLimite) - 1) Or (Month(TxtFecha.Text.ToDate) = (Month(FechaLimite) - 1) And Day(Date.Now) > Day(FechaLimite)) Then
|
||||
'' Alert("La factura actual ya no aplica para ingresarse al sístema.", TipoMensaje.MsgAdvertencia)
|
||||
'' BtnGuardar.Enabled = False
|
||||
'' Else
|
||||
'' Alert("En tiempo")
|
||||
'' End If
|
||||
''Else
|
||||
'' Alert("No se pudieron cargar los datos de la empresa", TipoMensaje.MsgAdvertencia)
|
||||
''End If
|
||||
'Carga Compra
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(123).ToEntero > 0 And Not UsuarioActual.TienePermisoProceso(156) Then
|
||||
If Not ValidaCierrePeriodo() Then
|
||||
Alert("El periodo de la compra actual ya se encuentra cerrado. No podra registrar la compra.", TipoMensaje.MsgAdvertencia)
|
||||
BtnGuardar.Visible = False
|
||||
TxtOC.Enabled = False
|
||||
ImgBtnBuscarOC.Enabled = False
|
||||
CierrePeriodo = True
|
||||
DivRestriccionAdvertencia.Visible = True
|
||||
LtRestriccionAdvertencia.Text = "El periodo de la compra actual ya se encuentra cerrado."
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim HayDifIEPS As Boolean = False
|
||||
For Each Gvr As GridViewRow In GvPS.Rows
|
||||
If Gvr.DataKey("CvePS").ToEntero > 0 AndAlso Gvr.DataKey("IEPSPSPorcentaje").ToDouble > 0 Then
|
||||
If GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=Gvr.DataKey("CvePS").ToEntero).Rows.Count > 0 Then
|
||||
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=Gvr.DataKey("CvePS").ToEntero).Rows(0)
|
||||
If DrPS IsNot Nothing Then
|
||||
If DrPS("IEPSPorcentaje").ToString.ToDouble <> Gvr.DataKey("IEPSPSPorcentaje").ToDouble Then
|
||||
HayDifIEPS = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
If HayDifIEPS Then Alert("El porcentaje de IEPS del producto no coincide con el especificado.", TipoMensaje.MsgAdvertencia)
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(562).ToEntero > 0 Then CargaGastosServicios(UsuarioActual.Empresa.Funcionalidad(562).ToEntero)
|
||||
|
||||
End If
|
||||
|
||||
ElseIf Request("CveCompra") IsNot Nothing AndAlso IsNumeric(Request("CveCompra")) AndAlso Request("CveCompra").ToEntero > 0 Then
|
||||
|
||||
@@ -1741,10 +1744,14 @@ Partial Class Compras_Compras
|
||||
|
||||
XMLDoc.Load(Archivo)
|
||||
Catch ex As Exception
|
||||
Try
|
||||
Dim oReader = New StreamReader(Archivo, Encoding.GetEncoding("ISO-8859-1"))
|
||||
XMLDoc.Load(oReader)
|
||||
oReader.Dispose()
|
||||
Catch ex2 As Exception
|
||||
GuardaLog("Error al intentar leer el XML del SAT. Error:" & ex2.ToString())
|
||||
End Try
|
||||
|
||||
Dim oReader = New StreamReader(Archivo, Encoding.GetEncoding("ISO-8859-1"))
|
||||
XMLDoc.Load(oReader)
|
||||
oReader.Dispose()
|
||||
|
||||
End Try
|
||||
|
||||
@@ -2083,19 +2090,22 @@ Partial Class Compras_Compras
|
||||
|
||||
ObjeFacturas.Dispose()
|
||||
|
||||
Dim ObjSAT As New ClsSAT
|
||||
Dim RFCRequest As String = Request("RFC").ToString
|
||||
If ObjSAT.GetListado69B(2, UsuarioActual.CveEmpresa, RFCRequest) Then
|
||||
If ObjSAT.DtResultados.Rows.Count > 0 Then
|
||||
Dim Estatus As String = ObjSAT.DtResultados.Rows(0)("Situacion").ToString
|
||||
BtnGuardar.Enabled = False
|
||||
UpParametros.Update()
|
||||
If RFC <> "" Then
|
||||
Dim ObjSAT As New ClsSAT
|
||||
|
||||
Alert($"El RFC del proveedor se encuentra en estado <b>{Estatus}</b> en el Listado EFOS (69B) del SAT", TipoMensaje.MsgAdvertencia)
|
||||
System.Threading.Thread.Sleep(5)
|
||||
If ObjSAT.GetListado69B(2, UsuarioActual.CveEmpresa, RFC) Then
|
||||
If ObjSAT.DtResultados.Rows.Count > 0 Then
|
||||
Dim Estatus As String = ObjSAT.DtResultados.Rows(0)("Situacion").ToString
|
||||
BtnGuardar.Enabled = False
|
||||
UpParametros.Update()
|
||||
|
||||
Alert($"El RFC del proveedor se encuentra en estado <b>{Estatus}</b> en el Listado EFOS (69B) del SAT", TipoMensaje.MsgAdvertencia)
|
||||
System.Threading.Thread.Sleep(5)
|
||||
End If
|
||||
End If
|
||||
ObjSAT.Dispose()
|
||||
End If
|
||||
ObjSAT.Dispose()
|
||||
|
||||
|
||||
|
||||
Return RFC
|
||||
@@ -2942,9 +2952,10 @@ Partial Class Compras_Compras
|
||||
|
||||
'TIENE AMORTIZACIÓN
|
||||
If GvAnticiposSel.Rows.Count > 0 Then
|
||||
BtnEliminarCompra.Visible = False
|
||||
|
||||
If Not DdlTipoComprobante.SelectedValue.Contiene("NC") Then
|
||||
BtnCancelarCompra.Visible = False
|
||||
BtnEliminarCompra.Visible = False
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -5074,8 +5085,8 @@ Partial Class Compras_Compras
|
||||
|
||||
For Each dr As DataRow In DtInv.Rows
|
||||
If dr("cvealmacen").ToString.ToEntero = tcvealmacen Then
|
||||
|
||||
importeconcepto = If(DdlMoneda.SelectedValue.ToEntero = 1, dr("pu").ToString.ToDouble, dr("pu").ToString.ToDouble * TipoCambioGuardar)
|
||||
'hay que restarle descuento
|
||||
importeconcepto = If(DdlMoneda.SelectedValue.ToEntero = 1, dr("pu").ToString.ToDouble, dr("pu").ToString.ToDouble * TipoCambioGuardar) - (If(DdlMoneda.SelectedValue.ToEntero = 1, dr("descuento").ToString.ToDouble, dr("descuento").ToString.ToDouble * TipoCambioGuardar) / dr("cantidad").ToString.ToDouble)
|
||||
If Not ObjInventario.AddMovimientoDetalle(cvemovimientoentrada, dr("cantidad").ToString.ToDouble, dr("cveum").ToString.ToEntero, dr("cveps").ToString.ToEntero, importeconcepto, -1, PUTC:=If(DdlMoneda.SelectedValue.ToEntero = 1, -1, dr("pu").ToString.ToDouble), CveCompraDetalle:=dr("CveCompraDetalle").ToString.ToEntero) Then
|
||||
|
||||
ErrorMovInv = True
|
||||
@@ -5158,6 +5169,7 @@ Partial Class Compras_Compras
|
||||
Dim PUInv As Double
|
||||
Dim CveUnidad As Integer
|
||||
Dim CostoIndirecto As Double
|
||||
Dim tDescuento As Decimal = 0
|
||||
|
||||
ListaMovimientosAlmacen.Add(CveMovimientoInventario)
|
||||
|
||||
@@ -5168,6 +5180,7 @@ Partial Class Compras_Compras
|
||||
CveUnidad = Dr("CveUM").ToString.ToEntero
|
||||
CantidadInv = Dr("Cantidad").ToString.ToDouble
|
||||
PUInv = Dr("PU").ToString.ToDouble
|
||||
tDescuento = Dr("Descuento").ToString.ToDecimal / CantidadInv.ToDecimal
|
||||
CostoIndirecto = Dr("CostoIndirectoAlmacen").ToString.ToDouble
|
||||
|
||||
If Dr("CveMetodoInventario").ToString.ToEntero = 5 Then
|
||||
@@ -5202,7 +5215,7 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
|
||||
'si no es por serie lote
|
||||
ImporteConcepto = If(DdlMoneda.SelectedValue.ToEntero = 1, PUInv, PUInv * TipoCambioGuardar)
|
||||
ImporteConcepto = If(DdlMoneda.SelectedValue.ToEntero = 1, PUInv, PUInv * TipoCambioGuardar) - If(DdlMoneda.SelectedValue.ToEntero = 1, tDescuento, tDescuento * TipoCambioGuardar)
|
||||
ImporteConcepto = If(UsuarioActual.Empresa.UsaAC, ImporteConcepto * IVA, ImporteConcepto)
|
||||
If Dr("CveAlmacen").ToString.ToEntero = tCveAlmacen Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, CantidadInv, CveUnidad, Dr("CvePS").ToString.ToEntero, ImporteConcepto, -1, PUTC:=If(DdlMoneda.SelectedValue.ToEntero = 1, -1, Dr("PU").ToString.ToDouble), CostoIndirecto:=CostoIndirecto, CveCompraDetalle:=Dr("CveCompraDetalle").ToString.ToEntero, CveOrdenCompraDetalle:=Dr("CveOrdenCompraDetalle").ToString.ToEntero) Then
|
||||
@@ -6843,21 +6856,21 @@ Partial Class Compras_Compras
|
||||
'AMORTIZACIÓN EN EL REGISTRO
|
||||
For Each Gvr As GridViewRow In GvFacturaNC.Rows
|
||||
If Gvr.FCCheckBox("ChkFacturaNC").Checked Then
|
||||
Dim CvePrePolizaTemp = ObjConta.AddPrePolizas("Compras/Registrar-NC", If(EsContado And CvePlantillaPrePoliza = 1, 2, CvePlantillaPrePoliza), ImporteCompra, TxtTotal.Text.ToDouble, DdlMoneda.SelectedValue.ToEntero, TxtFecha.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo:=FolioFijo, ReglaFolioPoliza:=ObjCompras.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, DdlTipoTransaccionCaja.SelectedValue, UsuarioActual.CveEmpresa), CveTipoPoliza:=ObjConta.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, DdlTipoTransaccionCaja.SelectedValue, UsuarioActual.CveEmpresa))
|
||||
'Dim CvePrePolizaTemp = ObjConta.AddPrePolizas("Compras/Registrar-NC", If(EsContado And CvePlantillaPrePoliza = 1, 2, CvePlantillaPrePoliza), ImporteCompra, TxtTotal.Text.ToDouble, DdlMoneda.SelectedValue.ToEntero, TxtFecha.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo:=FolioFijo, ReglaFolioPoliza:=ObjCompras.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, DdlTipoTransaccionCaja.SelectedValue, UsuarioActual.CveEmpresa), CveTipoPoliza:=ObjConta.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, DdlTipoTransaccionCaja.SelectedValue, UsuarioActual.CveEmpresa))
|
||||
Dim importeMovimientoNC = Gvr.FCTextBox("TxtImporte").Text.ToDecimal
|
||||
Dim TipoCambioFactura = Gvr.DataKey("TipoCambio").ToDecimal
|
||||
Dim importeMNNC = importeMovimientoNC * TipoCambioFactura * Multiplicador
|
||||
|
||||
IdCtaContable = CtaProveedorExtranjera
|
||||
CveCuenta = CveCuentaProveedorExtranjera
|
||||
If ObjConta.AddPrePolizasDetalle(CvePrePolizaTemp, False, importeMovimientoNC, Referencia, 272, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=TipoCambioFactura, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza, CveCompraAmortizacion:=CveCompra) Then
|
||||
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimientoNC, Referencia, 272, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=TipoCambioFactura, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza, CveCompraAmortizacion:=CveCompra) Then
|
||||
|
||||
Dim CveConceptoContableComplementaria As Integer = 206
|
||||
If Gvr.DataKey("CveTipoConcepto").ToEntero = 2 Then CveConceptoContableComplementaria = 310 'cuando es acreedor
|
||||
|
||||
IdCtaContable = CtaProveedorComplementaria
|
||||
CveCuenta = CveCuentaProveedorComplementaria
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaTemp, False, importeMNNC - importeMovimientoNC, Referencia, CveConceptoContableComplementaria, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC - importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=TipoCambioFactura, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza, CveCompraAmortizacion:=CveCompra) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMNNC - importeMovimientoNC, Referencia, CveConceptoContableComplementaria, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC - importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=TipoCambioFactura, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza, CveCompraAmortizacion:=CveCompra) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -6870,10 +6883,10 @@ Partial Class Compras_Compras
|
||||
importeMNNC = importeMovimientoNC * tipoCambioActual * Multiplicador
|
||||
IdCtaContable = CtaProveedorExtranjera
|
||||
CveCuenta = CveCuentaProveedorExtranjera
|
||||
If ObjConta.AddPrePolizasDetalle(CvePrePolizaTemp, True, importeMovimientoNC, Referencia, 60, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=tipoCambioActual, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
|
||||
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimientoNC, Referencia, 60, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=tipoCambioActual, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
|
||||
IdCtaContable = CtaProveedorComplementaria
|
||||
CveCuenta = CveCuentaProveedorComplementaria
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaTemp, True, importeMNNC - importeMovimientoNC, Referencia, 235, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC - importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=tipoCambioActual, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMNNC - importeMovimientoNC, Referencia, 235, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC - importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=tipoCambioActual, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -6902,7 +6915,7 @@ Partial Class Compras_Compras
|
||||
importeMovimiento = importeMovimiento.Abs.RoundSQL()
|
||||
importeMN = importeMovimiento
|
||||
If importeMovimiento <> 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaTemp, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -6910,7 +6923,7 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
|
||||
|
||||
ObjConta.PrePolizaUnificacion(CvePrePoliza, CvePrePolizaTemp)
|
||||
'ObjConta.PrePolizaUnificacion(CvePrePoliza, CvePrePolizaTemp)
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Cuentas Asignación.
|
||||
Catálogo de Contabilidad Ejercicio.
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarMotivoD" data-toggle="tooltip" data-placement="left" title="Agregar un Defecto" Text="<i class='fa fa-plus'></i>Agregar Motivo Baja"></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarMotivoD" data-toggle="tooltip" data-placement="left" title="Agregar un Defecto" Text="<i class='fa fa-plus'></i>Agregar Contabilidad Ejercicio"></asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
@@ -23,8 +23,91 @@
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpDatos" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView runat="server" ID="GvDatos" EmptyDataText="No se encontraron Motivo de Baja Registrados" ToolTip="Listado de Motivo de Baja" CssClass="table table-striped table-advance table-hover ScrollAD"
|
||||
DataKeyNames="CveEjercicio,Ejercicio,PeriodoActualNumero,CuentaNombre,CveCuentaCierre,PolizoFolio,PrePolizaCierreFolio,Estatus" AutoGenerateColumns="False"
|
||||
Style="text-align: center; width: 100%" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Ejercicio" HeaderText="Ejercicio" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="PeriodoActual" HeaderText="Periodo Actual" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="CuentaNombre" HeaderText="Cuenta Nombre" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="PolizoFolio" HeaderText="Póliza Folio" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="PrePolizaCierreFolio" HeaderText="PrePóliza Cierre Folio" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Estatus" HeaderText="Estatus" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField ItemStyle-Width="80px">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="ImgC" runat="server" AlternateText="Editar" CausesValidation="False" OnClick="PolizaCierre" CssClass="btn btn-circle btn-sm blue" Text="<i class='glyphicon glyphicon-ok'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="80px">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="ImgE" runat="server" AlternateText="Editar" CausesValidation="False" OnClick="ActualizaModulo" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="80px">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="ImgEE" runat="server" AlternateText="Eliminar" CausesValidation="False" OnClick="EliminarRow" 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>
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpModal">
|
||||
<ContentTemplate>
|
||||
<div id="ModalCat" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 150px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalModulos" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModalTiposD" runat="server">Conta Ejercicios</asp:Literal>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body" style="text-align: left">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlCuentas" runat="server" CssClass="form-control input-sm select2me" DataValueField="CveCuenta" DataTextField="CtaCodigo" Style="width: 50%">
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlCuentas.ClientID.ToString()%>">Cuenta:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtEjercicio" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true" Style="width: 100%"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVClave" runat="server" ControlToValidate="TxtEjercicio" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>'¨Ejercicio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModulo"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtEjercicio.ClientID.ToString()%>">Ejercicio:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlPeriodoActual" runat="server" CssClass="form-control input-sm select2me" Style="width: 50%">
|
||||
<asp:ListItem Value="0" Text="seleccione"/>
|
||||
<asp:ListItem Value="1" Text="Enero"/>
|
||||
<asp:ListItem Value="2" Text="Febrero"/>
|
||||
<asp:ListItem Value="3" Text="Marzo"/>
|
||||
<asp:ListItem Value="4" Text="Abril"/>
|
||||
<asp:ListItem Value="5" Text="Mayo"/>
|
||||
<asp:ListItem Value="6" Text="Junio"/>
|
||||
<asp:ListItem Value="7" Text="Julio"/>
|
||||
<asp:ListItem Value="8" Text="Agosto"/>
|
||||
<asp:ListItem Value="9" Text="Septiembre"/>
|
||||
<asp:ListItem Value="10" Text="Octubre"/>
|
||||
<asp:ListItem Value="11" Text="Noviembre"/>
|
||||
<asp:ListItem Value="12" Text="Diciembre"/>
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlPeriodoActual.ClientID.ToString()%>">Periodo Actual:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" data-toggle="toggle"/>
|
||||
<label for="<%= ChkEstatus.ClientID.ToString()%>">Estatus:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:LinkButton ID="LbAgregar" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpModulo" />
|
||||
<button id="BtnCancelarProyecto" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
</asp:Content>
|
||||
|
||||
@@ -5,9 +5,109 @@ Imports Extensiones
|
||||
Partial Class Contabilidad2_CatContaEjercicios
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Property CveEjercicio() As Integer 'Guardamos el ID de registro para saber cual registro Editar
|
||||
Get
|
||||
Return If(IsNothing(ViewState("CveEjercicio")), -1, CInt(ViewState("CveEjercicio")))
|
||||
End Get
|
||||
Set
|
||||
ViewState("CveEjercicio") = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
If ObjConta.GetContaEjercicio(UsuarioActual.CveEmpresa) Then
|
||||
GvDatos.DataSource = ObjConta.DtResultados
|
||||
End If
|
||||
|
||||
If ObjConta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||
DdlCuentas.DataSource = ObjConta.DtResultados
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
GvDatos.DataBind()
|
||||
DdlCuentas.DataBind()
|
||||
DdlCuentas.Items.Insert(0, New ListItem("seleccione", "-1"))
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnAgregarMotivoD_Click(sender As Object, e As EventArgs) Handles BtnAgregarMotivoD.Click
|
||||
TxtEjercicio.Text = ""
|
||||
ChkEstatus.Checked = 0
|
||||
DdlPeriodoActual.SelectedValue = 0
|
||||
UpModalModulos.Update()
|
||||
RegistraScript("$('#ModalCat').modal();")
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As EventArgs) Handles LbAgregar.Click
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
Dim errorString As String = ""
|
||||
If LbAgregar.Text = "Agregar" Then
|
||||
If Not ObjConta.AddContaEjercicio(DateTime.Today, UsuarioActual.CvePersonal, UsuarioActual.CveEmpresa, Ejercicio:=TxtEjercicio.Text,
|
||||
PeriodoActual:=DdlPeriodoActual.SelectedValue.ToEntero, CveCuentaCierre:=DdlCuentas.SelectedValue.ToEntero, Estatus:=ChkEstatus.Checked) Then
|
||||
errorString = "Error al agregar"
|
||||
End If
|
||||
ElseIf LbAgregar.Text = "Actualizar" Then
|
||||
If Not ObjConta.UpdateContaEjercicio(CveEjercicio, Ejercicio:=TxtEjercicio.Text, PeriodoActual:=DdlPeriodoActual.SelectedValue.ToEntero,
|
||||
CveCuentaCierre:=DdlCuentas.SelectedValue.ToEntero, Estatus:=ChkEstatus.Checked) Then
|
||||
errorString = "Error al actualizar"
|
||||
End If
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
RegistraScript("$('#ModalCat').modal('hide');")
|
||||
CargaDatos()
|
||||
UpDatos.Update()
|
||||
If errorString.Length > 0 Then
|
||||
Alert(errorString)
|
||||
Else
|
||||
If LbAgregar.Text = "Agregar" Then
|
||||
Alert("Agregado correctamente")
|
||||
ElseIf LbAgregar.Text = "Actualizar" Then
|
||||
Alert("Actualizado correctamente")
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub ActualizaModulo(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
CveEjercicio = GvRow.DataKey("CveEjercicio").ToEntero
|
||||
TxtEjercicio.Text = GvRow.DataKey("Ejercicio")
|
||||
ChkEstatus.Checked = GvRow.DataKey("Estatus")
|
||||
DdlPeriodoActual.SelectedValue = GvRow.DataKey("PeriodoActualNumero")
|
||||
DdlCuentas.SelectedValue = GvRow.DataKey("CveCuentaCierre")
|
||||
LbAgregar.Text = "Actualizar"
|
||||
UpModalModulos.Update()
|
||||
RegistraScript("$('#ModalCat').modal();")
|
||||
End Sub
|
||||
|
||||
Protected Sub EliminarRow(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
If ObjConta.RemoveContaEjercicio(GvRow.DataKey("CveEjercicio").ToEntero) Then
|
||||
Alert("eliminado correctamente")
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
CargaDatos()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub PolizaCierre(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
Dim FechaI As String = $"01/01/{DateTime.Now.Year}"
|
||||
Dim FechaF As String = $"{DateTime.DaysInMonth(DateTime.Now.Year, 12)}/12/{DateTime.Now.Year}"
|
||||
Dim CvePrePolizaCierre As Integer = -1
|
||||
CvePrePolizaCierre = ObjConta.CierreEjercicio(UsuarioActual.CveEmpresa, GvRow.DataKey("Ejercicio").ToEntero, GvRow.DataKey("CveCuentaCierre").ToEntero, FechaI, FechaF, UsuarioActual.CvePersonal)
|
||||
If CvePrePolizaCierre > 0 Then
|
||||
If ObjConta.UpdateContaEjercicio(CveEjercicio, Ejercicio:=GvRow.DataKey("Ejercicio").ToEntero, PeriodoActual:=GvRow.DataKey("PeriodoActualNumero").ToEntero,
|
||||
CveCuentaCierre:=GvRow.DataKey("CveCuentaCierre").ToEntero, CvePrePoliza:=CvePrePolizaCierre, Estatus:=GvRow.DataKey("Estatus")) Then
|
||||
Alert("Cierre de ejercicio correcto")
|
||||
End If
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarMotivoD" data-toggle="tooltip" data-placement="left" title="Agregar un Defecto" Text="<i class='fa fa-plus'></i>Agregar Motivo Baja"></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarMotivoD" data-toggle="tooltip" data-placement="left" title="Agregar un Defecto" Text="<i class='fa fa-plus'></i>Agregar Cuenta Asignación"></asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
|
||||
2135
Inicio.aspx.vb
2135
Inicio.aspx.vb
File diff suppressed because it is too large
Load Diff
@@ -260,6 +260,15 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property EsDevolucionDirecta As Boolean
|
||||
Get
|
||||
Return CBool(If(ViewState("EsDevolucionDirecta") Is Nothing, 0, ViewState("EsDevolucionDirecta")))
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("EsDevolucionDirecta") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
@@ -639,6 +648,19 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
Alert("La Venta original de la Devolución no tiene salida de Almacén.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
If TipoDocto.Contiene("Ing") AndAlso TipoMovimiento = 2 Then
|
||||
Dim DtMov As DataTable = DtExistencias.FiltraParametros("CveConcepto = 40", "", {"CveAlmacen"})
|
||||
If DtMov.Rows.Count > 0 Then
|
||||
Dim CveAlmacenDev As Integer = DtMov.Rows(0)("CveAlmacen").ToString().ToEntero()
|
||||
DdlAlmacen.Items.Clear()
|
||||
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros($"CveAlmacen = {CveAlmacenDev}")
|
||||
DdlAlmacen.DataBind()
|
||||
|
||||
DdlAlmacen.SelectedValueExist(CveAlmacenDev)
|
||||
EsDevolucionDirecta = True
|
||||
End If
|
||||
End If
|
||||
|
||||
Else
|
||||
Alert("Ocurrió un error al cargar los datos de devolución. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
End If
|
||||
@@ -1896,6 +1918,11 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
CveAlmacenTraspasoDestino = DdlAlmacen.SelectedValue.ToEntero
|
||||
End If
|
||||
|
||||
'DEVOLUCION DIRECTA A ENTREGA POR ADELANTADO
|
||||
If TipoMovimiento = 2 And ConceptoMovimiento = 18 AndAlso EsDevolucionDirecta Then
|
||||
ConceptoMovimiento = 41
|
||||
End If
|
||||
|
||||
CveMovimiento = ObjInventario.AddMovimiento(Almacen1, ConceptoMovimiento, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text,
|
||||
CveContrato:=CveContrato, CveAlmacenDestino:=CveAlmacenTraspasoDestino, Modulo:="RE/G7")
|
||||
Folio = ObjInventario.Folio
|
||||
|
||||
@@ -83,7 +83,6 @@ Partial Class SessionesActivas
|
||||
row("RemoteIpAddres") = user.IpAddres
|
||||
row("LastPostback") = user.LastPostback
|
||||
row("Modulo") = user.Modulo
|
||||
row("Modulo") = user.SessionID
|
||||
dtF.Rows.Add(row.ItemArray())
|
||||
End If
|
||||
Next
|
||||
|
||||
@@ -10902,7 +10902,7 @@ Partial Class Ventas
|
||||
|
||||
End Select
|
||||
|
||||
If importeMovimiento <> 0 And Not ErrorPrepoliza Then
|
||||
If (importeMovimiento <> 0 OrElse (importeMovimiento = 0 AndAlso ObjFactura.Total = 0 AndAlso ConceptoContable = 1)) And Not ErrorPrepoliza Then
|
||||
|
||||
If IdCtaContable <= 0 Then
|
||||
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
|
||||
@@ -10930,7 +10930,7 @@ Partial Class Ventas
|
||||
|
||||
End If
|
||||
|
||||
'TRASPASA PAGADO
|
||||
'TRASPASA PAGADO (ObjFacturaNC.Pagado > 0) AndAlso
|
||||
If ObjFactura.TipoDocto.Contiene("Ing", "Ant") AndAlso ObjFactura.NuevaFactura = 1 Then
|
||||
If Not ObjConta.TraspasarSaldosPrePolizasRefacturacion(ObjFacturaNC.CveVenta, ObjFactura.CveVenta, ObjFactura.CvePrePoliza, CvePlantilaPoliza, UsuarioActual.CveEmpresa) Then
|
||||
ErrorList.Add("Ocurrió un error al agregar la bitacora de Póliza Virtual.")
|
||||
@@ -22252,7 +22252,13 @@ Partial Class Ventas
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
LBAplicaDevolucion.Visible = True
|
||||
'SOLO APLICA DEVOLUCION SI TIENE MOVIMIENTOS DE ALMACEN
|
||||
If VentaSaldoAlmacen < 0 Then
|
||||
LBAplicaDevolucion.Visible = True
|
||||
ElseIf VentaSaldoAlmacen >= 0 Then
|
||||
LBAplicaDevolucion.Visible = False
|
||||
End If
|
||||
|
||||
Dim SeEsconde As Boolean = False
|
||||
|
||||
If DtDetalle IsNot Nothing AndAlso DtDetalle.Rows.Count > 0 Then
|
||||
|
||||
@@ -44,6 +44,8 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user