Merge branch 'master' of http://oirigoyen@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -6599,26 +6599,6 @@ Public Class ClsContabilidad
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function UpdateCompraTCValuacion(CveCompra As Integer, TCValuacion As Decimal) As Boolean
|
|
||||||
Dim Retorno = False
|
|
||||||
|
|
||||||
DataAdapter("PA_Conta_ComprasTCValuacionUpdate")
|
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
|
||||||
.Add("@CveCompra", SqlDbType.Int).Value = CveCompra
|
|
||||||
.Add("@TCValuacion", SqlDbType.Decimal).Value = TCValuacion
|
|
||||||
End With
|
|
||||||
|
|
||||||
Try
|
|
||||||
SqlAdapter.Fill(Data)
|
|
||||||
Retorno = True
|
|
||||||
Catch ex As Exception
|
|
||||||
Me.OnError("Ocurrió un error al actualizar el tipo de cambio", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
|
||||||
End Try
|
|
||||||
|
|
||||||
Return Retorno
|
|
||||||
End Function
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "IDisposable Support"
|
#Region "IDisposable Support"
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
Option Strict On
|
Option Strict On
|
||||||
Option Explicit On
|
Option Explicit On
|
||||||
|
|
||||||
|
Imports System
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports System.Data.SqlClient
|
Imports System.Data.SqlClient
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
@@ -4111,6 +4112,32 @@ Public Class ClsGenerales
|
|||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
Public Function GetMediosTransporte(CveOrigen As Integer, Estatus As Boolean, CveEmpresa As Integer, CveTipoNomina As Integer, CveSubProyecto As Integer, Tipo As Integer, GPO As Integer) As Boolean
|
||||||
|
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Agro_OrigenGet")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveOrigen", SqlDbType.Int).Value = CveOrigen
|
||||||
|
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@CveTipoNomina", SqlDbType.Int).Value = CveTipoNomina
|
||||||
|
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||||
|
.Add("@Tipo", SqlDbType.Int).Value = Tipo
|
||||||
|
.Add("@GPO", SqlDbType.Int).Value = GPO
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError($"Ocurrió un error al obtener los medios de transporte.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3052,6 +3052,27 @@ Public Class ClsNominas
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
Public Function GetAsistenciabetweendate(CveEmpresa As Integer, FechaInicio As DateTime, FechaFin As DateTime) As Boolean
|
||||||
|
Dim retorno As Boolean = False
|
||||||
|
Try
|
||||||
|
DTSet = New DataSet()
|
||||||
|
DataAdapter("PA_RH_AsistenciaBetweenDates", CommandType.StoredProcedure)
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@FechaInicio", SqlDbType.DateTime).Value = FechaInicio
|
||||||
|
.Add("@FechaFin", SqlDbType.DateTime).Value = FechaFin
|
||||||
|
End With
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
retorno = True
|
||||||
|
Catch sqEx As SqlException
|
||||||
|
retorno = False
|
||||||
|
OnError("Ocurrió un error al obtener la asistencia de nomina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
Catch ex As Exception
|
||||||
|
retorno = False
|
||||||
|
OnError("Ocurrió un error al obtener la asistencia de nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
Return retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
Public Sub addParameters(varsql As String, sqltipe As SqlDbType, valor As Object)
|
Public Sub addParameters(varsql As String, sqltipe As SqlDbType, valor As Object)
|
||||||
SqlAdapter.SelectCommand.Parameters.Add(varsql, sqltipe).Value = valor
|
SqlAdapter.SelectCommand.Parameters.Add(varsql, sqltipe).Value = valor
|
||||||
|
|||||||
@@ -1091,13 +1091,17 @@ Public Class ClsPaginas
|
|||||||
' Application("GlobalDTSucursales") = value
|
' Application("GlobalDTSucursales") = value
|
||||||
' End Set
|
' End Set
|
||||||
'End Property
|
'End Property
|
||||||
Property GlobalDTSATUsosCFDI(Optional EsPersonaFisica As Integer = -1) As DataTable
|
Property GlobalDTSATUsosCFDI(Optional EsPersonaFisica As Integer = -1, Optional RegimenFiscalReceptor As String = "-1") As DataTable
|
||||||
Get
|
Get
|
||||||
If EsPersonaFisica <> -1 Then
|
If EsPersonaFisica <> -1 Then
|
||||||
Dim Tipo As String = ""
|
Dim Tipo As New StringBuilder
|
||||||
If EsPersonaFisica = 1 Then Tipo = "AplicaPersonaFisica = 1" Else Tipo = "AplicaPersonaMoral = 1"
|
If EsPersonaFisica = 1 Then Tipo.Append("AplicaPersonaFisica = 1") Else Tipo.Append("AplicaPersonaMoral = 1")
|
||||||
|
|
||||||
Dim Dv As New DataView(DirectCast(Application("GlobalDTSATUsosCFDI"), DataTable), Tipo, " UsoCFDIDescripcion", DataViewRowState.CurrentRows)
|
If RegimenFiscalReceptor <> "-1" Then
|
||||||
|
Tipo.AppendFormat("AND RegimenFiscalReceptor LIKE '%{0}%'", RegimenFiscalReceptor)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim Dv As New DataView(DirectCast(Application("GlobalDTSATUsosCFDI"), DataTable), Tipo.ToString(), " UsoCFDIDescripcion", DataViewRowState.CurrentRows)
|
||||||
GlobalDTSATUsosCFDI = Dv.ToTable
|
GlobalDTSATUsosCFDI = Dv.ToTable
|
||||||
Dv.Dispose()
|
Dv.Dispose()
|
||||||
Else
|
Else
|
||||||
|
|||||||
@@ -7180,6 +7180,31 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Public Function UpPersonalSupervisorMasiva(CveEmpresa As Integer, CveUsuario As Integer, registros As List(Of RequestUpSupervisorMasiva)) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
Dim xmlProductos As System.Xml.Linq.XDocument = Nothing
|
||||||
|
If registros IsNot Nothing AndAlso registros.Count > 0 Then
|
||||||
|
xmlProductos = New System.Xml.Linq.XDocument(New System.Xml.Linq.XElement("registros", From x In registros Select New System.Xml.Linq.XElement("registro", New System.Xml.Linq.XElement("CvePersonal", x.CvePersonal), New System.Xml.Linq.XElement("CveUsuario", x.CveUsuario), New System.Xml.Linq.XElement("CveCliente", x.CveCliente))))
|
||||||
|
End If
|
||||||
|
Data = New DataTable
|
||||||
|
SqlDataAdapter("PA_RH_PersonalSupervisorMasivaUP")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
|
.Add("@xmlRegistros", SqlDbType.Xml).Value = xmlProductos.ToString()
|
||||||
|
End With
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch Ex1 As SqlException
|
||||||
|
Me.OnError("Ocurrió un error al guardar los supervisores.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al guardar los supervisores.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End Try
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
'Public msgsError As New StringBuilder()
|
'Public msgsError As New StringBuilder()
|
||||||
'Public Sub OnError(Mensaje As String, Exeption As Exception, Optional InfoAdicional As String = "")
|
'Public Sub OnError(Mensaje As String, Exeption As Exception, Optional InfoAdicional As String = "")
|
||||||
' GuardaLog(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", Mensaje, Exeption.ToString, vbCrLf, InfoAdicional))
|
' GuardaLog(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", Mensaje, Exeption.ToString, vbCrLf, InfoAdicional))
|
||||||
@@ -7236,3 +7261,8 @@ Public Class RequestUpAsistenciaDetalle
|
|||||||
Public Property CveSubProyecto As Integer
|
Public Property CveSubProyecto As Integer
|
||||||
Public Property Motivo As String
|
Public Property Motivo As String
|
||||||
End Class
|
End Class
|
||||||
|
Public Class RequestUpSupervisorMasiva
|
||||||
|
Public Property CvePersonal As Integer
|
||||||
|
Public Property CveUsuario As Integer
|
||||||
|
Public Property CveCliente As Integer
|
||||||
|
End Class
|
||||||
@@ -745,7 +745,8 @@ Public Class ClsVentas
|
|||||||
Public Function UpdateEstatusFactura(Estatus As Integer, FolioFiscal As String, SelloSAT As String, FechaCancelacion As DateTime, CveVenta As Integer,
|
Public Function UpdateEstatusFactura(Estatus As Integer, FolioFiscal As String, SelloSAT As String, FechaCancelacion As DateTime, CveVenta As Integer,
|
||||||
Optional IdPolizaCancelacion As Integer = -1, Optional CvePAC As Integer = -1, Optional CveEstatusRefacturacion As Integer = 0,
|
Optional IdPolizaCancelacion As Integer = -1, Optional CvePAC As Integer = -1, Optional CveEstatusRefacturacion As Integer = 0,
|
||||||
Optional CveUsuarioCambiaEstatus As Integer = -1, Optional FechaCambioEstatus As String = "-1", Optional RFCReceptor As String = "-1",
|
Optional CveUsuarioCambiaEstatus As Integer = -1, Optional FechaCambioEstatus As String = "-1", Optional RFCReceptor As String = "-1",
|
||||||
Optional CveMotivoCancelacion As Integer = -1, Optional MotivoCancelacion As String = "", Optional EstadoCancelacion As String = "") As Boolean
|
Optional CveMotivoCancelacion As Integer = -1, Optional MotivoCancelacion As String = "", Optional EstadoCancelacion As String = "",
|
||||||
|
Optional CveEstadoCancelacion As Integer = 0) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_VentasUpdateEstatus")
|
DataAdapter("PA_VentasUpdateEstatus")
|
||||||
@@ -765,6 +766,7 @@ Public Class ClsVentas
|
|||||||
.Add("@CveMotivoCancelacion", SqlDbType.Int).Value = CveMotivoCancelacion
|
.Add("@CveMotivoCancelacion", SqlDbType.Int).Value = CveMotivoCancelacion
|
||||||
.Add("@MotivoCancelacion", SqlDbType.VarChar).Value = MotivoCancelacion
|
.Add("@MotivoCancelacion", SqlDbType.VarChar).Value = MotivoCancelacion
|
||||||
.Add("@EstadoCancelacion", SqlDbType.VarChar).Value = EstadoCancelacion
|
.Add("@EstadoCancelacion", SqlDbType.VarChar).Value = EstadoCancelacion
|
||||||
|
.Add("@CveEstadoCancelacion", SqlDbType.TinyInt).Value = CveEstadoCancelacion
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
@@ -855,7 +857,7 @@ Public Class ClsVentas
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function UpdateCancelaVenta(CveVenta As Integer, FechaCancelacion As DateTime, SelloCancelacionSAT As String, CveEmpresa As Integer, Optional CvePAC As Integer = -1, Optional CveEstatusRefacturacion As Integer = 0, Optional EstadoCancelacion As String = "") As Boolean
|
Public Function UpdateCancelaVenta(CveVenta As Integer, FechaCancelacion As DateTime, SelloCancelacionSAT As String, CveEmpresa As Integer, Optional CvePAC As Integer = -1, Optional CveEstatusRefacturacion As Integer = 0, Optional EstadoCancelacion As String = "", Optional CveEstadoCancelacion As Integer = 0) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Vta_VentasCancelacion")
|
DataAdapter("PA_Vta_VentasCancelacion")
|
||||||
@@ -868,6 +870,7 @@ Public Class ClsVentas
|
|||||||
.Add("@CvePAC", SqlDbType.SmallInt).Value = CvePAC
|
.Add("@CvePAC", SqlDbType.SmallInt).Value = CvePAC
|
||||||
.Add("@CveEstatusRefacturacion", SqlDbType.TinyInt).Value = CveEstatusRefacturacion
|
.Add("@CveEstatusRefacturacion", SqlDbType.TinyInt).Value = CveEstatusRefacturacion
|
||||||
.Add("@EstadoCancelacion", SqlDbType.VarChar).Value = EstadoCancelacion
|
.Add("@EstadoCancelacion", SqlDbType.VarChar).Value = EstadoCancelacion
|
||||||
|
.Add("@CveEstadoCancelacion", SqlDbType.TinyInt).Value = CveEstadoCancelacion
|
||||||
.Add("@Cancelada", SqlDbType.SmallInt).Direction = ParameterDirection.Output
|
.Add("@Cancelada", SqlDbType.SmallInt).Direction = ParameterDirection.Output
|
||||||
End With
|
End With
|
||||||
|
|
||||||
|
|||||||
@@ -4636,8 +4636,8 @@ Namespace Modelos
|
|||||||
''' Cancela la factura para poder realizar la refacturacion
|
''' Cancela la factura para poder realizar la refacturacion
|
||||||
''' </summary>
|
''' </summary>
|
||||||
''' <returns></returns>
|
''' <returns></returns>
|
||||||
Public Function CancelarPorRefacturacion(CveMotivoCancelacion As Integer, Motivo As String, Optional FolioSustitucion As String = "", Optional ValidarSAT As Boolean = False) As MCancelacionVentaMensaje
|
Public Function CancelarPorRefacturacion(CveMotivoCancelacion As Integer, Motivo As String, Optional FolioSustitucion As String = "", Optional ValidarSAT As Boolean = False, Optional CveEstadoCancelacion As Integer = 0) As MCancelacionVentaMensaje
|
||||||
Return CancelarVenta(Me, Me.UsuarioActual, EsRefacturacion:=True, CveMotivoCancelacion:=CveMotivoCancelacion, MotivoCancelacion:=Motivo, FolioSustitucion:=FolioSustitucion, ValidarSAT:=ValidarSAT)
|
Return CancelarVenta(Me, Me.UsuarioActual, EsRefacturacion:=True, CveMotivoCancelacion:=CveMotivoCancelacion, MotivoCancelacion:=Motivo, FolioSustitucion:=FolioSustitucion, ValidarSAT:=ValidarSAT, CveEstadoCancelacion:=CveEstadoCancelacion)
|
||||||
End Function
|
End Function
|
||||||
''' <summary>
|
''' <summary>
|
||||||
''' Cancela la factura y realiza las operaciones correspondientes
|
''' Cancela la factura y realiza las operaciones correspondientes
|
||||||
@@ -4645,15 +4645,15 @@ Namespace Modelos
|
|||||||
''' <param name="RealizarDevolucionAlmacen"></param>
|
''' <param name="RealizarDevolucionAlmacen"></param>
|
||||||
''' <param name="ListaRemisionesCancelar"></param>
|
''' <param name="ListaRemisionesCancelar"></param>
|
||||||
''' <returns></returns>
|
''' <returns></returns>
|
||||||
Public Function CancelarFactura(RealizarDevolucionAlmacen As Boolean, Optional ListaRemisionesCancelar As List(Of Integer) = Nothing, Optional CveMotivoCancelacion As Integer = -1, Optional Motivo As String = "", Optional ValidarSAT As Boolean = True) As MCancelacionVentaMensaje
|
Public Function CancelarFactura(RealizarDevolucionAlmacen As Boolean, Optional ListaRemisionesCancelar As List(Of Integer) = Nothing, Optional CveMotivoCancelacion As Integer = -1, Optional Motivo As String = "", Optional ValidarSAT As Boolean = True, Optional CveEstadoCancelacion As Integer = 0) As MCancelacionVentaMensaje
|
||||||
'Comprobante emitido con errores sin relación
|
'Comprobante emitido con errores sin relación
|
||||||
Return CancelarVenta(Me, Me.UsuarioActual, RealizarDevolucionAlmacen:=RealizarDevolucionAlmacen, ListaRemisionesCancelar:=ListaRemisionesCancelar, CveMotivoCancelacion:=CveMotivoCancelacion, MotivoCancelacion:=Motivo)
|
Return CancelarVenta(Me, Me.UsuarioActual, RealizarDevolucionAlmacen:=RealizarDevolucionAlmacen, ListaRemisionesCancelar:=ListaRemisionesCancelar, CveMotivoCancelacion:=CveMotivoCancelacion, MotivoCancelacion:=Motivo, CveEstadoCancelacion:=CveEstadoCancelacion)
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function CancelarVenta(ObjFactura As Modelos.Factura, UsuarioActual As Usuario, Optional EsRefacturacion As Boolean = False, Optional RealizarDevolucionAlmacen As Boolean = False,
|
Private Function CancelarVenta(ObjFactura As Modelos.Factura, UsuarioActual As Usuario, Optional EsRefacturacion As Boolean = False, Optional RealizarDevolucionAlmacen As Boolean = False,
|
||||||
Optional ListaRemisionesCancelar As List(Of Integer) = Nothing, Optional CveEstatusFacturaAsignado As Integer = -1,
|
Optional ListaRemisionesCancelar As List(Of Integer) = Nothing, Optional CveEstatusFacturaAsignado As Integer = -1, Optional FechaCancelacion As String = "-1",
|
||||||
Optional FechaCancelacion As String = "-1", Optional AcuseCancelacion As String = "",
|
Optional AcuseCancelacion As String = "", Optional CveMotivoCancelacion As Integer = -1, Optional MotivoCancelacion As String = "",
|
||||||
Optional CveMotivoCancelacion As Integer = -1, Optional MotivoCancelacion As String = "", Optional FolioSustitucion As String = "", Optional ValidarSAT As Boolean = True) As MCancelacionVentaMensaje
|
Optional FolioSustitucion As String = "", Optional ValidarSAT As Boolean = True, Optional CveEstadoCancelacion As Integer = 0) As MCancelacionVentaMensaje
|
||||||
Dim Retorno As New MCancelacionVentaMensaje()
|
Dim Retorno As New MCancelacionVentaMensaje()
|
||||||
Dim ErrorList As New List(Of String)
|
Dim ErrorList As New List(Of String)
|
||||||
|
|
||||||
@@ -4801,6 +4801,7 @@ Namespace Modelos
|
|||||||
|
|
||||||
Dim CveEstatusRefacturacion As Integer = If(ObjFactura.CveEstatusRefacturacion <= 0, 0, ObjFactura.CveEstatusRefacturacion)
|
Dim CveEstatusRefacturacion As Integer = If(ObjFactura.CveEstatusRefacturacion <= 0, 0, ObjFactura.CveEstatusRefacturacion)
|
||||||
|
|
||||||
|
|
||||||
If Not EsRefacturacion Then
|
If Not EsRefacturacion Then
|
||||||
CveEstatusRefacturacion = 0
|
CveEstatusRefacturacion = 0
|
||||||
End If
|
End If
|
||||||
@@ -4828,7 +4829,7 @@ Namespace Modelos
|
|||||||
Dim Continuar As Boolean = False
|
Dim Continuar As Boolean = False
|
||||||
Dim ContinuarCancelacion As Boolean = False
|
Dim ContinuarCancelacion As Boolean = False
|
||||||
Dim ObtenerAcuse As Boolean = False
|
Dim ObtenerAcuse As Boolean = False
|
||||||
Dim RequiereAceptacion As Boolean = False
|
Dim RequiereAceptacion As Boolean = True
|
||||||
Dim Mensaje As String = ""
|
Dim Mensaje As String = ""
|
||||||
|
|
||||||
Dim CveSATMotivoCancelacion As Integer = -1
|
Dim CveSATMotivoCancelacion As Integer = -1
|
||||||
@@ -4845,6 +4846,14 @@ Namespace Modelos
|
|||||||
CveEstatusFacturaAsignado = 23
|
CveEstatusFacturaAsignado = 23
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'SI NO SE ASIGNA EL ESTATUS DE CANCELACION, TOMA EL GUARADO DE LA FACTURA
|
||||||
|
CveEstadoCancelacion = If(CveEstadoCancelacion <= 0, ObjFactura.CveEstadoCancelacion, CveEstadoCancelacion)
|
||||||
|
|
||||||
|
'SI YA SE CONOCE EL ESTADO DE CANCELACION, NO LO VERIFICA ANTE EL SAT
|
||||||
|
If CveEstadoCancelacion > 0 Then
|
||||||
|
ValidarSAT = False
|
||||||
|
End If
|
||||||
|
|
||||||
If CveEstatusFacturaAsignado <= 0 Then
|
If CveEstatusFacturaAsignado <= 0 Then
|
||||||
Try
|
Try
|
||||||
If ObjFactura.FolioFiscal <> "" AndAlso (UsuarioActual.Empresa.FacturaProduccion OrElse UsuarioActual.CveEmpresa = 1) Then
|
If ObjFactura.FolioFiscal <> "" AndAlso (UsuarioActual.Empresa.FacturaProduccion OrElse UsuarioActual.CveEmpresa = 1) Then
|
||||||
@@ -4919,22 +4928,26 @@ Namespace Modelos
|
|||||||
If Vigencia.EstatusCancelacion.ToUpper() = "EN PROCESO" Then
|
If Vigencia.EstatusCancelacion.ToUpper() = "EN PROCESO" Then
|
||||||
CveEstatus = 20
|
CveEstatus = 20
|
||||||
ContinuarCancelacion = False
|
ContinuarCancelacion = False
|
||||||
|
RequiereAceptacion = True
|
||||||
ElseIf Vigencia.EsCancelable.ToUpper() = "CANCELABLE CON ACEPTACIÓN" Then
|
ElseIf Vigencia.EsCancelable.ToUpper() = "CANCELABLE CON ACEPTACIÓN" Then
|
||||||
CveEstatus = 20
|
CveEstatus = 20
|
||||||
ContinuarCancelacion = True
|
ContinuarCancelacion = True
|
||||||
RequiereAceptacion = True
|
RequiereAceptacion = True
|
||||||
ElseIf Vigencia.EsCancelable.ToUpper() = "CANCELABLE SIN ACEPTACIÓN" Then
|
ElseIf Vigencia.EsCancelable.ToUpper() = "CANCELABLE SIN ACEPTACIÓN" Then
|
||||||
ContinuarCancelacion = True
|
ContinuarCancelacion = True
|
||||||
|
RequiereAceptacion = False
|
||||||
CveEstatus = 5
|
CveEstatus = 5
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
If Vigencia.EsCancelable.ToUpper() = "CANCELABLE SIN ACEPTACIÓN" Then
|
If Vigencia.EsCancelable.ToUpper() = "CANCELABLE SIN ACEPTACIÓN" Then
|
||||||
ContinuarCancelacion = True
|
ContinuarCancelacion = True
|
||||||
|
RequiereAceptacion = False
|
||||||
CveEstatus = 5
|
CveEstatus = 5
|
||||||
Else
|
Else
|
||||||
CveEstatus = 20
|
CveEstatus = 20
|
||||||
ContinuarCancelacion = False
|
ContinuarCancelacion = False
|
||||||
|
RequiereAceptacion = True
|
||||||
CancelacionFecha = Now.Date
|
CancelacionFecha = Now.Date
|
||||||
CancelacionAcuse = ""
|
CancelacionAcuse = ""
|
||||||
End If
|
End If
|
||||||
@@ -4951,11 +4964,20 @@ Namespace Modelos
|
|||||||
CancelacionFecha = Now.Date
|
CancelacionFecha = Now.Date
|
||||||
CancelacionAcuse = ""
|
CancelacionAcuse = ""
|
||||||
|
|
||||||
|
'VERICA SI YA SE TIENE EL ESTADO DE CANCELACION, PARA SABER SI REQUIERE ACEPTACION
|
||||||
|
If CveEstadoCancelacion > 0 Then
|
||||||
|
If CveEstadoCancelacion = 1 Then
|
||||||
|
RequiereAceptacion = False
|
||||||
|
ElseIf CveEstadoCancelacion = 2 Then
|
||||||
|
RequiereAceptacion = True
|
||||||
|
End If
|
||||||
|
Else
|
||||||
Dim diasTimbrado As Decimal = DateDiff(DateInterval.Day, ObjFactura.FechaCP, Now)
|
Dim diasTimbrado As Decimal = DateDiff(DateInterval.Day, ObjFactura.FechaCP, Now)
|
||||||
|
|
||||||
If ObjFactura.Total < 5000D OrElse diasTimbrado <= 3 OrElse ObjFactura.Cliente.RFC.Contiene("XAXX010101000", "XEXX010101000") Then
|
If ObjFactura.Total < 1000D OrElse diasTimbrado <= 1 OrElse ObjFactura.Cliente.RFC.Contiene("XAXX010101000", "XEXX010101000") Then
|
||||||
RequiereAceptacion = False
|
RequiereAceptacion = False
|
||||||
End If
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -5596,13 +5618,14 @@ Namespace Modelos
|
|||||||
|
|
||||||
|
|
||||||
If CveEstatus.Contiene(4, 5) Then
|
If CveEstatus.Contiene(4, 5) Then
|
||||||
If Not ObjVentas.UpdateCancelaVenta(CveVenta, CancelacionFecha, CancelacionAcuse, UsuarioActual.CveEmpresa, CvePACCancelacion, CveEstatusRefacturacion, EstadoCancelacion:=EstadoCancelacion) Then
|
If Not ObjVentas.UpdateCancelaVenta(CveVenta, CancelacionFecha, CancelacionAcuse, UsuarioActual.CveEmpresa, CvePACCancelacion, CveEstatusRefacturacion, EstadoCancelacion:=EstadoCancelacion, CveEstadoCancelacion:=CveEstadoCancelacion) Then
|
||||||
ErrorCancelar = True
|
ErrorCancelar = True
|
||||||
MensajeError = "Ocurrió un error al guardar el estatus de cancelación."
|
MensajeError = "Ocurrió un error al guardar el estatus de cancelación."
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If Not ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, CancelacionAcuse, CancelacionFecha, CveVenta, IDPoliza, CvePAC:=CvePACCancelacion, CveEstatusRefacturacion:=CveEstatusRefacturacion,
|
If Not ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, CancelacionAcuse, CancelacionFecha, CveVenta, IDPoliza, CvePAC:=CvePACCancelacion, CveEstatusRefacturacion:=CveEstatusRefacturacion,
|
||||||
CveUsuarioCambiaEstatus:=UsuarioActual.CveUsuario, FechaCambioEstatus:=Now.ToString("yyyy-MM-dd HH:mm:ss.mmm"), CveMotivoCancelacion:=CveMotivoCancelacion, MotivoCancelacion:=MotivoCancelacion, EstadoCancelacion:=EstadoCancelacion) Then
|
CveUsuarioCambiaEstatus:=UsuarioActual.CveUsuario, FechaCambioEstatus:=Now.ToString("yyyy-MM-dd HH:mm:ss.mmm"), CveMotivoCancelacion:=CveMotivoCancelacion,
|
||||||
|
MotivoCancelacion:=MotivoCancelacion, EstadoCancelacion:=EstadoCancelacion, CveEstadoCancelacion:=CveEstadoCancelacion) Then
|
||||||
ErrorCancelar = True
|
ErrorCancelar = True
|
||||||
MensajeError = "Ocurrió un error al guardar el estatus de cancelación."
|
MensajeError = "Ocurrió un error al guardar el estatus de cancelación."
|
||||||
End If
|
End If
|
||||||
@@ -6257,6 +6280,7 @@ Namespace Modelos
|
|||||||
Public Property RFCReceptor As String = ""
|
Public Property RFCReceptor As String = ""
|
||||||
Public Property ServicioDomicilio As Boolean
|
Public Property ServicioDomicilio As Boolean
|
||||||
Public Property CveEstatusRefacturacion As Integer = 0
|
Public Property CveEstatusRefacturacion As Integer = 0
|
||||||
|
Public Property CveEstadoCancelacion As Integer = 0
|
||||||
Public Property NuevaFactura As Integer
|
Public Property NuevaFactura As Integer
|
||||||
Public Property EnviarCorreo As Boolean = False
|
Public Property EnviarCorreo As Boolean = False
|
||||||
Public Property ErrorList As List(Of String)
|
Public Property ErrorList As List(Of String)
|
||||||
|
|||||||
@@ -242,9 +242,9 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-2" style="text-align: right!important">
|
<div class="col-md-2" style="text-align: right!important">
|
||||||
<asp:Button Text="Generar Proveedores" runat="server" ID="BtnGeneraCompras" OnClick="BtnGeneraCompras_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarCompras" />
|
<asp:Button Text="Generar Proveedores" runat="server" ID="BtnGeneraCompras" Visible="false" OnClick="BtnGeneraCompras_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarCompras" />
|
||||||
<asp:HiddenField ID="HdnProveedorCvePrePoliza" runat="server" />
|
<asp:HiddenField ID="HdnProveedorCvePrePoliza" runat="server" />
|
||||||
<asp:Button ID="BtnProveedoresRemove" runat="server" Text="Eliminar" OnClick="BtnProveedoresRemove_Click" class="btn btn-primary" /></div>
|
<asp:Button ID="BtnProveedoresRemove" runat="server" Text="Eliminar" Visible="false" OnClick="BtnProveedoresRemove_Click" class="btn btn-primary" /></div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -335,7 +335,7 @@
|
|||||||
<asp:TextBox ID="TxtConceptoVentas" Style="text-transform: uppercase;" runat="server" MaxLength="100" CssClass="form-control " Width="90%"></asp:TextBox>
|
<asp:TextBox ID="TxtConceptoVentas" Style="text-transform: uppercase;" runat="server" MaxLength="100" CssClass="form-control " Width="90%"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="RFVTxtConceptoVentas" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtConceptoVentas"
|
<asp:RequiredFieldValidator ID="RFVTxtConceptoVentas" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtConceptoVentas"
|
||||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarVentas"></asp:RequiredFieldValidator>
|
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarVentas"></asp:RequiredFieldValidator>
|
||||||
<label for="<%= TxtConceptoCompras.ClientID.ToString()%>">Concepto:</label>
|
<label for="<%= TxtConceptoVentas.ClientID.ToString()%>">Concepto:</label>
|
||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -349,20 +349,17 @@
|
|||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-6" style="text-align: right!important">
|
<div class="col-md-6" style="text-align: right!important">
|
||||||
<asp:Button Text="Generar Clientes" runat="server" ID="BtnGeneraVentas" OnClick="BtnGeneraVentas_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarVentas" />
|
<asp:Button Text="Generar Ventas" runat="server" ID="BtnGeneraVentas" Visible="false" OnClick="BtnGeneraVentas_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarVentas" />
|
||||||
</div>
|
<asp:HiddenField ID="HdnClienteCvePrePoliza" runat="server" />
|
||||||
|
<asp:Button ID="BtnClientesRemove" runat="server" Text="Eliminar" Visible="false" OnClick="BtnClientesRemove_Click" class="btn btn-primary" /></div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<asp:GridView ID="GvVentas" Width="99%" runat="server" AutoGenerateColumns="False"
|
<asp:GridView ID="GvVentas" Width="99%" runat="server" AutoGenerateColumns="False"
|
||||||
DataKeyNames="TipoCambio,Fluctuacion,CveVenta,SerieFolio,CveIE,IdCtaContComplementaria,TipoDocto,CveIE" EmptyDataText="No se Encontraron Cuentas Bancarias."
|
DataKeyNames="TipoCambio,Fluctuacion,CveVenta,SerieFolio,CveIE,IdCtaContComplementaria,TipoDocto" EmptyDataText="No se Encontraron Cuentas Bancarias."
|
||||||
ToolTip="Listado de Cuentas Bancarias" CssClass="table table-hover table-striped ScrollAD mysmallbtn" GridLines="None">
|
ToolTip="Listado de Cuentas Bancarias" CssClass="table table-hover table-striped ScrollAD mysmallbtn" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:HyperLinkField DataTextField="Nombre" HeaderText="Cliente" Target="_blank" DataNavigateUrlFormatString="/Ventas/Clientes.aspx?CveCliente={0}" DataNavigateUrlFields="CveCliente" />
|
<asp:HyperLinkField DataTextField="Nombre" HeaderText="Cliente" Target="_blank" DataNavigateUrlFormatString="/Ventas/Clientes.aspx?CveCliente={0}" DataNavigateUrlFields="CveCliente" />
|
||||||
@@ -381,11 +378,9 @@
|
|||||||
</ajax:TabPanel>
|
</ajax:TabPanel>
|
||||||
<ajax:TabPanel runat="server" ID="TabCuentasBancarias" HeaderText="Cuentas Bancarias">
|
<ajax:TabPanel runat="server" ID="TabCuentasBancarias" HeaderText="Cuentas Bancarias">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-5 form-group form-md-line-input input-iconright">
|
<div class="col-md-5 form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtConceptoBancos" Style="text-transform: uppercase;" runat="server" MaxLength="100" CssClass="form-control " Width="90%"></asp:TextBox>
|
<asp:TextBox ID="TxtConceptoBancos" Style="text-transform: uppercase;" runat="server" MaxLength="100" CssClass="form-control " Width="90%"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="RFVTxtConceptoBancos" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtConceptoBancos"
|
<asp:RequiredFieldValidator ID="RFVTxtConceptoBancos" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtConceptoBancos"
|
||||||
@@ -403,17 +398,12 @@
|
|||||||
<asp:RequiredFieldValidator ID="RFVDdlSubproyectoBancos" runat="server" CssClass="help-block errorimput" InitialValue="-1" ControlToValidate="DdlSubproyectoBancos" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor ingréselo." ValidationGroup="GrpGuardarBancos"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVDdlSubproyectoBancos" runat="server" CssClass="help-block errorimput" InitialValue="-1" ControlToValidate="DdlSubproyectoBancos" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor ingréselo." ValidationGroup="GrpGuardarBancos"></asp:RequiredFieldValidator>
|
||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-6" style="text-align: right!important">
|
<div class="col-md-6" style="text-align: right!important">
|
||||||
<asp:Button Text="Generar Bancos" runat="server" ID="BtnGeneraBancos" OnClick="BtnGeneraBancos_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarBancos" />
|
<asp:Button Text="Generar Bancos" runat="server" ID="BtnGeneraBancos" OnClick="BtnGeneraBancos_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarBancos" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
<asp:GridView ID="GvCuentas" Width="99%" runat="server" AutoGenerateColumns="False"
|
<asp:GridView ID="GvCuentas" Width="99%" runat="server" AutoGenerateColumns="False"
|
||||||
DataKeyNames="IdCtaAfectable,IdCtaContable,IdCtaContableComplementaria,TipoCambio,Fluctuacion,
|
DataKeyNames="IdCtaAfectable,IdCtaContable,IdCtaContableComplementaria,TipoCambio,Fluctuacion,
|
||||||
@@ -439,11 +429,6 @@
|
|||||||
<ajax:TabPanel runat="server" ID="TabDeudores" HeaderText="Deudores">
|
<ajax:TabPanel runat="server" ID="TabDeudores" HeaderText="Deudores">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<br />
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="col-md-5 form-group form-md-line-input input-iconright">
|
<div class="col-md-5 form-group form-md-line-input input-iconright">
|
||||||
@@ -464,7 +449,6 @@
|
|||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-6" style="text-align: right!important">
|
<div class="col-md-6" style="text-align: right!important">
|
||||||
<asp:Button Text="Generar Deudores" runat="server" ID="BtnGeneraDedudores" OnClick="BtnGeneraDedudores_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarDeudores" />
|
<asp:Button Text="Generar Deudores" runat="server" ID="BtnGeneraDedudores" OnClick="BtnGeneraDedudores_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarDeudores" />
|
||||||
</div>
|
</div>
|
||||||
@@ -514,20 +498,23 @@
|
|||||||
<asp:RequiredFieldValidator ID="RFVDdlSubProyectoAcreedores" runat="server" CssClass="help-block errorimput" InitialValue="-1" ControlToValidate="DdlSubProyectoAcreedores" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor ingréselo." ValidationGroup="GrpGuardarAcreedores"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVDdlSubProyectoAcreedores" runat="server" CssClass="help-block errorimput" InitialValue="-1" ControlToValidate="DdlSubProyectoAcreedores" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor ingréselo." ValidationGroup="GrpGuardarAcreedores"></asp:RequiredFieldValidator>
|
||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6" style="text-align: right!important">
|
<div class="col-md-3" style="text-align: right!important">
|
||||||
<asp:Button Text="Generar Acreedores" runat="server" ID="BtnGeneraAcreedores" OnClick="BtnGeneraAcreedores_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarAcreedores" />
|
<asp:Button Text="Generar Acreedores" runat="server" ID="BtnGeneraAcreedores" Visible="false" OnClick="BtnGeneraAcreedores_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarAcreedores" />
|
||||||
|
<asp:HiddenField ID="HdnAcreedorCvePrePoliza" runat="server" />
|
||||||
|
<asp:Button ID="BtnAcreedoresRemove" runat="server" Text="Eliminar" Visible="false" OnClick="BtnAcreedoresRemove_Click" class="btn btn-primary" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
|
|
||||||
<asp:GridView ID="GvAcreedores" Width="99%" runat="server" AutoGenerateColumns="False"
|
<asp:GridView ID="GvAcreedores" Width="99%" runat="server" AutoGenerateColumns="False"
|
||||||
DataKeyNames="CveCompra,CveProveedor,Fluctuacion,SerieFolio,IdCtaContComplementaria,CveIE"
|
DataKeyNames="CveCompra,CveProveedor,TipoCambio,Fluctuacion,SerieFolio,IdCtaContComplementaria,CveIE"
|
||||||
EmptyDataText="No se Encontraron compras pendientes de pagar." ToolTip="Listado de Compras"
|
EmptyDataText="No se Encontraron compras pendientes de pagar." ToolTip="Listado de Compras"
|
||||||
CssClass="table table-hover table-striped ScrollAD mysmallbtn" GridLines="None">
|
CssClass="table table-hover table-striped ScrollAD mysmallbtn" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:HyperLinkField HeaderText="Proveedor" DataTextField="NombreComercial" Target="_blank" ItemStyle-HorizontalAlign="Left" DataNavigateUrlFormatString="/Compras/Proveedores.aspx?CveProveedor={0}" DataNavigateUrlFields="CveProveedor" />
|
<asp:HyperLinkField HeaderText="Proveedor" DataTextField="NombreComercial" Target="_blank" ItemStyle-HorizontalAlign="Left" DataNavigateUrlFormatString="/Compras/Proveedores.aspx?CveProveedor={0}" DataNavigateUrlFields="CveProveedor" />
|
||||||
<asp:BoundField HeaderText="# Facturas" DataField="SerieFolio" ItemStyle-HorizontalAlign="Left" />
|
<asp:HyperLinkField HeaderText="# Facturas" DataTextField="SerieFolio" Target="_blank" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" DataNavigateUrlFields="CveCompra"/>
|
||||||
<asp:BoundField DataField="TipoCambio" HeaderText="TipoCambio" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField DataField="TipoCambio" HeaderText="TipoCambio" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="Saldo USD" DataField="Saldo" DataFormatString="{0:N2}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="Saldo USD" DataField="Saldo" DataFormatString="{0:N2}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="Fluctuación Pesos" DataField="Fluctuacion" DataFormatString="{0:N2}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="Fluctuación Pesos" DataField="Fluctuacion" DataFormatString="{0:N2}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Right" />
|
||||||
@@ -535,6 +522,7 @@
|
|||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
<asp:Label ID="LblTotalAcreedores" runat="server" Text=""></asp:Label>
|
<asp:Label ID="LblTotalAcreedores" runat="server" Text=""></asp:Label>
|
||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</ajax:TabPanel>
|
</ajax:TabPanel>
|
||||||
<ajax:TabPanel runat="server" ID="TabFilial" HeaderText="Filial">
|
<ajax:TabPanel runat="server" ID="TabFilial" HeaderText="Filial">
|
||||||
@@ -561,7 +549,6 @@
|
|||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-6" style="text-align: right!important">
|
<div class="col-md-6" style="text-align: right!important">
|
||||||
<asp:Button Text="Generar Filiales" runat="server" ID="BtnGeneraFiliales" OnClick="BtnGeneraFiliales_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarFiliales" />
|
<asp:Button Text="Generar Filiales" runat="server" ID="BtnGeneraFiliales" OnClick="BtnGeneraFiliales_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarFiliales" />
|
||||||
</div>
|
</div>
|
||||||
@@ -569,11 +556,9 @@
|
|||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
|
|
||||||
<div style="float: right; margin-right: 50px;">
|
<div style="float: right; margin-right: 50px;">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<asp:GridView ID="GvFiliales" Width="99%" runat="server" AutoGenerateColumns="False"
|
<asp:GridView ID="GvFiliales" Width="99%" runat="server" AutoGenerateColumns="False"
|
||||||
DataKeyNames="IdCtaAfectable,TipoCambio,Fluctuacion,RazonSocial,CveIE,Folio"
|
DataKeyNames="IdCtaAfectable,TipoCambio,Fluctuacion,RazonSocial,CveIE,Folio"
|
||||||
EmptyDataText="No se Encontraron Cuentas Bancarias." ToolTip="Listado de Cuentas Bancarias"
|
EmptyDataText="No se Encontraron Cuentas Bancarias." ToolTip="Listado de Cuentas Bancarias"
|
||||||
|
|||||||
@@ -169,6 +169,10 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
Dim GanaciaAux As Double = Ganancias.SUM("Fluctuacion", "Fluctuacion > 0")
|
Dim GanaciaAux As Double = Ganancias.SUM("Fluctuacion", "Fluctuacion > 0")
|
||||||
|
|
||||||
Dim Final As Double = GanaciaAux - PerdidaAux
|
Dim Final As Double = GanaciaAux - PerdidaAux
|
||||||
|
HdnClienteCvePrePoliza.Value = ObjBancos.DtResultados.MAX("CvePrePoliza").ToString
|
||||||
|
HdnCveFluctuacionBitacora.Value = ObjBancos.DtResultados.MAX("CveFluctuacionBitacora").ToString
|
||||||
|
BtnClientesRemove.Visible = HdnClienteCvePrePoliza.Value.ToEntero > 0
|
||||||
|
BtnGeneraVentas.Visible = Not HdnClienteCvePrePoliza.Value.ToEntero > 0
|
||||||
|
|
||||||
IImagenFinalVentas.Attributes("class") = If(Final > 0, "widget-thumb-icon bg-green-jungle fa fa-usd", "widget-thumb-icon bg-red fa fa-usd")
|
IImagenFinalVentas.Attributes("class") = If(Final > 0, "widget-thumb-icon bg-green-jungle fa fa-usd", "widget-thumb-icon bg-red fa fa-usd")
|
||||||
|
|
||||||
@@ -255,6 +259,11 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
If ObjBancos.GetFluctuaciones(FechaUltimoDiaMes, 6, UsuarioActual.CveEmpresa) Then
|
If ObjBancos.GetFluctuaciones(FechaUltimoDiaMes, 6, UsuarioActual.CveEmpresa) Then
|
||||||
GvAcreedores.DataSource = ObjBancos.DtResultados
|
GvAcreedores.DataSource = ObjBancos.DtResultados
|
||||||
LblTotalAcreedores.Text = ObjBancos.DtResultados.SUM("Fluctuacion").FormatoNumero
|
LblTotalAcreedores.Text = ObjBancos.DtResultados.SUM("Fluctuacion").FormatoNumero
|
||||||
|
HdnAcreedorCvePrePoliza.Value = ObjBancos.DtResultados.MAX("CvePrePoliza").ToString
|
||||||
|
HdnCveFluctuacionBitacora.Value = ObjBancos.DtResultados.MAX("CveFluctuacionBitacora").ToString
|
||||||
|
BtnAcreedoresRemove.Visible = HdnAcreedorCvePrePoliza.Value.ToEntero > 0
|
||||||
|
BtnGeneraAcreedores.Visible = Not HdnAcreedorCvePrePoliza.Value.ToEntero > 0
|
||||||
|
|
||||||
Else
|
Else
|
||||||
GvAcreedores.DataSource = Nothing
|
GvAcreedores.DataSource = Nothing
|
||||||
Alert("Ocurrio un error al cargar los acreedores", TipoMensaje.MsgAdvertencia)
|
Alert("Ocurrio un error al cargar los acreedores", TipoMensaje.MsgAdvertencia)
|
||||||
@@ -344,7 +353,6 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
ErrorRegistrar = True
|
ErrorRegistrar = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 1, CveBitacora, UsuarioActual.CveEmpresa)
|
Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 1, CveBitacora, UsuarioActual.CveEmpresa)
|
||||||
@@ -353,9 +361,11 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
|
|
||||||
If Not ErrorRegistrar Then
|
If Not ErrorRegistrar Then
|
||||||
Conta.Commit()
|
Conta.Commit()
|
||||||
|
BtnGeneraCompras.Visible = False
|
||||||
Alert(String.Format("La Fluctuación se ha generado <br/> <a href='/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}'>Ver PrePóliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
|
Alert(String.Format("La Fluctuación se ha generado <br/> <a href='/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}'>Ver PrePóliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
|
||||||
Else
|
Else
|
||||||
Conta.RollBack()
|
Conta.RollBack()
|
||||||
|
Alert("Error al generar la fluctuación", TipoMensaje.MsgError)
|
||||||
End If
|
End If
|
||||||
Conta.Dispose()
|
Conta.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
@@ -448,13 +458,14 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
ErrorRegistrar = True
|
ErrorRegistrar = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If Not ErrorRegistrar Then
|
If Not ErrorRegistrar Then
|
||||||
Conta.Commit()
|
Conta.Commit()
|
||||||
|
BtnGeneraVentas.Visible = False
|
||||||
Alert(String.Format("La Fluctuación se ha generado <br/> <a href='/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}'>Ver PrePóliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
|
Alert(String.Format("La Fluctuación se ha generado <br/> <a href='/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}'>Ver PrePóliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
|
||||||
|
|
||||||
Else
|
Else
|
||||||
Conta.RollBack()
|
Conta.RollBack()
|
||||||
|
Alert("Error al generar la fluctuación", TipoMensaje.MsgError)
|
||||||
End If
|
End If
|
||||||
Conta.Dispose()
|
Conta.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
@@ -731,7 +742,6 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
Dim Banco As New ClsBancos(Conta.IniciaTransacSQL())
|
Dim Banco As New ClsBancos(Conta.IniciaTransacSQL())
|
||||||
Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaA", 1, 0, 0, 1, FechaUltimoDiaMes, TxtConceptoAcreedores.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaA", 1, 0, 0, 1, FechaUltimoDiaMes, TxtConceptoAcreedores.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
Dim idCta As Integer = 0
|
Dim idCta As Integer = 0
|
||||||
Dim CveCuenta As Integer = 0
|
|
||||||
Dim CveCuentaPerdida, CveCuentaGanancia As Integer
|
Dim CveCuentaPerdida, CveCuentaGanancia As Integer
|
||||||
Dim idCtaPerdida, IdCtaGanancia As Integer
|
Dim idCtaPerdida, IdCtaGanancia As Integer
|
||||||
Dim TipoMovto As Boolean = False
|
Dim TipoMovto As Boolean = False
|
||||||
@@ -750,23 +760,21 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
Total = LblTotalAcreedores.Text.ToDecimal
|
Total = LblTotalAcreedores.Text.ToDecimal
|
||||||
If Total > 0 Then
|
If Total > 0 Then
|
||||||
CveConceptoContable = 64
|
CveConceptoContable = 64
|
||||||
CveCuenta = CveCuentaGanancia
|
|
||||||
idCta = IdCtaGanancia
|
idCta = IdCtaGanancia
|
||||||
TipoMovto = True
|
TipoMovto = True
|
||||||
Else
|
Else
|
||||||
CveConceptoContable = 65
|
CveConceptoContable = 65
|
||||||
CveCuenta = CveCuentaPerdida
|
|
||||||
idCta = idCtaPerdida
|
idCta = idCtaPerdida
|
||||||
TipoMovto = False
|
TipoMovto = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim TCUltimaFluctuacion As Decimal = GlobalTipoCambio(FechaUltimoDiaMes).ToDecimal()
|
Dim TCUltimaFluctuacion As Decimal = GlobalTipoCambio(FechaUltimoDiaMes).ToDecimal()
|
||||||
|
|
||||||
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), "Fluctuación Acreedores", CveConceptoContable, "Fluctuación Acreedores", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta, CveSubProyecto:=DdlSubProyectoAcreedores.SelectedValue.ToEntero) Then
|
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), "Fluctuación Acreedores", CveConceptoContable, "Fluctuación Acreedores", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveSubProyecto:=DdlSubProyectoAcreedores.SelectedValue.ToEntero) Then
|
||||||
ErrorRegistrar = True
|
ErrorRegistrar = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim CveBitacora As Integer = Banco.AddFluctuacionesBitacora(-1, FechaUltimoDiaMes, 1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
Dim CveBitacora As Integer = Banco.AddFluctuacionesBitacora(-1, FechaUltimoDiaMes, 6, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
If CveBitacora <= 0 Then
|
If CveBitacora <= 0 Then
|
||||||
ErrorRegistrar = True
|
ErrorRegistrar = True
|
||||||
End If
|
End If
|
||||||
@@ -778,26 +786,26 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
IdCtaComplementaria = gvr.DataKey("IdCtaContComplementaria").ToString().ToEntero()
|
IdCtaComplementaria = gvr.DataKey("IdCtaContComplementaria").ToString().ToEntero()
|
||||||
|
|
||||||
'movimiento de complementaria
|
'movimiento de complementaria
|
||||||
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, False, Total, gvr.DataKey("SerieFolio"), 202, gvr.DataKey("SerieFolio"), Now, IdCtaComplementaria, 0, CveCompra:=gvr.DataKey("CveCompra").ToEntero, TipoCambio:=TC, ImporteMX:=Total, ImporteME:=Total, CveCuenta:=CveCuentaComplementaria) Then
|
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, False, Total, gvr.DataKey("SerieFolio"), 202, gvr.DataKey("SerieFolio"), Now, IdCtaComplementaria, 0, CveCompra:=gvr.DataKey("CveCompra").ToEntero, TipoCambio:=TC, TipoCambioPago:=gvr.DataKey("TipoCambio").ToDecimal, ImporteMX:=Total, ImporteME:=Total, CveIE:=gvr.DataKey("CveIE").ToEntero) Then
|
||||||
ErrorRegistrar = True
|
ErrorRegistrar = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'If Not Conta.UpdateCompraTCValuacion(gvr.DataKey("CveCompra").ToEntero, TCValuacion:=TCUltimaFluctuacion) Then
|
If Not Conta.UpdateTCValuacion(-1, gvr.DataKey("CveCompra").ToEntero, gvr.DataKey("CveIE").ToEntero, TCUltimaFluctuacion, UsuarioActual.CveEmpresa) Then
|
||||||
' ErrorRegistrar = True
|
ErrorRegistrar = True
|
||||||
' Exit For
|
Exit For
|
||||||
'End If
|
End If
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 5, CveBitacora, UsuarioActual.CveEmpresa)
|
Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 6, CveBitacora, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
|
|
||||||
If Not ErrorRegistrar Then
|
If Not ErrorRegistrar Then
|
||||||
Conta.Commit()
|
Conta.Commit()
|
||||||
|
BtnGeneraAcreedores.Visible = False
|
||||||
Alert(String.Format("La Fluctuación se ha generado <br/> <a href='/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}'>Ver Póliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
|
Alert(String.Format("La Fluctuación se ha generado <br/> <a href='/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}'>Ver Póliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
|
||||||
Else
|
Else
|
||||||
Conta.RollBack()
|
Conta.RollBack()
|
||||||
|
Alert("Error al generar la fluctuación", TipoMensaje.MsgError)
|
||||||
End If
|
End If
|
||||||
Conta.Dispose()
|
Conta.Dispose()
|
||||||
Banco.Dispose()
|
Banco.Dispose()
|
||||||
@@ -884,4 +892,30 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
Banco.Dispose()
|
Banco.Dispose()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnClientesRemove_Click(sender As Object, e As EventArgs)
|
||||||
|
Dim Banco As New ClsBancos
|
||||||
|
Banco.IniciaTransacSQL()
|
||||||
|
|
||||||
|
If Banco.FluctuacionesBitacoraPrePolizaRemove(HdnClienteCvePrePoliza.Value.ToEntero, 2, HdnCveFluctuacionBitacora.Value.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||||
|
Banco.Commit()
|
||||||
|
Alert("Flucturación eliminada.")
|
||||||
|
Else
|
||||||
|
Banco.RollBack()
|
||||||
|
End If
|
||||||
|
Banco.Dispose()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnAcreedoresRemove_Click(sender As Object, e As EventArgs)
|
||||||
|
Dim Banco As New ClsBancos
|
||||||
|
Banco.IniciaTransacSQL()
|
||||||
|
|
||||||
|
If Banco.FluctuacionesBitacoraPrePolizaRemove(HdnAcreedorCvePrePoliza.Value.ToEntero, 6, HdnCveFluctuacionBitacora.Value.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||||
|
Banco.Commit()
|
||||||
|
Alert("Flucturación eliminada.")
|
||||||
|
Else
|
||||||
|
Banco.RollBack()
|
||||||
|
End If
|
||||||
|
Banco.Dispose()
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -1370,9 +1370,9 @@
|
|||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Motivo" Visible="true" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="15%">
|
<asp:TemplateField HeaderText="Motivo" Visible="true" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="30%">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:DropDownList runat="server" id="DdlMotivoCancelacion" DataTextField="CodigoSATDescripcion" DataValueField="CveMotivoCancelacion" CssClass="select2me" Visible ="false">
|
<asp:DropDownList runat="server" id="DdlMotivoCancelacion" DataTextField="CodigoSATDescripcion" DataValueField="CveMotivoCancelacion" CssClass="form-control input-sm select2me" Visible ="false">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
<asp:Literal runat="server" ID="LtlMotivoCancelacion" Text='<%# Eval("MotivoCancelacion") %>'> </asp:Literal>
|
<asp:Literal runat="server" ID="LtlMotivoCancelacion" Text='<%# Eval("MotivoCancelacion") %>'> </asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
|
|||||||
@@ -5902,16 +5902,20 @@ Partial Class Bancos_IE
|
|||||||
e.Row.FCDropDownList("DdlMotivoCancelacion").DataBind()
|
e.Row.FCDropDownList("DdlMotivoCancelacion").DataBind()
|
||||||
e.Row.FCDropDownList("DdlMotivoCancelacion").Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
|
e.Row.FCDropDownList("DdlMotivoCancelacion").Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
|
||||||
|
|
||||||
|
If e.Row.DataKey("Estatus").ToEntero = 1 Then
|
||||||
|
e.Row.FCLiteral("LtlMotivoCancelacion").Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
e.Row.FCLinkButton("LnkCancelarComplemetno").Visible = False
|
e.Row.FCLinkButton("LnkCancelarComplemetno").Visible = False
|
||||||
e.Row.FCDropDownList("DdlMotivoCancelacion").Visible = False
|
e.Row.FCDropDownList("DdlMotivoCancelacion").Visible = False
|
||||||
End If
|
|
||||||
|
|
||||||
If e.Row.DataKey("Estatus").ToEntero = 2 Then
|
If e.Row.DataKey("Estatus").ToEntero = 2 Then
|
||||||
e.Row.FCLiteral("LtlMotivoCancelacion").Visible = True
|
e.Row.FCLiteral("LtlMotivoCancelacion").Visible = True
|
||||||
Else
|
|
||||||
e.Row.FCDropDownList("DdlMotivoCancelacion").Visible = False
|
|
||||||
End If
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ElseIf e.Row.DataKey("Tipo") = "Egs" Then
|
ElseIf e.Row.DataKey("Tipo") = "Egs" Then
|
||||||
|
|
||||||
|
|||||||
@@ -474,6 +474,12 @@ Partial Class ContabilidadC_RegPrePoliza
|
|||||||
CargaCuentasContables()
|
CargaCuentasContables()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If dr("Modulo").ToString.Contiene("Banc/FluctuaA", "Banc/FluctuaC", "Banc/FluctuaV", "Banc/FluctuaFilial") Then
|
||||||
|
|
||||||
|
BtnEliminar.Enabled = False
|
||||||
|
BtnEliminar.ToolTip = "No se puede eliminar al prepóliza, eliminarlos desde el módulo"
|
||||||
|
End If
|
||||||
|
|
||||||
ObjContabilidad.GetContabilizacionDiarioDetalle(CvePrePoliza)
|
ObjContabilidad.GetContabilizacionDiarioDetalle(CvePrePoliza)
|
||||||
|
|
||||||
DtMovimientos = ObjContabilidad.DtResultados.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}")
|
DtMovimientos = ObjContabilidad.DtResultados.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}")
|
||||||
@@ -2114,7 +2120,7 @@ Partial Class ContabilidadC_RegPrePoliza
|
|||||||
Dim NombreArchivo As String
|
Dim NombreArchivo As String
|
||||||
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
||||||
Dim workbook As New ExcelFile()
|
Dim workbook As New ExcelFile()
|
||||||
Dim worksheet = workbook.Worksheets.Add(DdlPlantilla2.SelectedItem.Text.ToString())
|
Dim worksheet = workbook.Worksheets.Add(DdlPlantilla2.SelectedItem.Text.Substring(1, 30))
|
||||||
|
|
||||||
Dim CvePlantilla As Integer = DdlPlantilla2.SelectedValue.ToEntero()
|
Dim CvePlantilla As Integer = DdlPlantilla2.SelectedValue.ToEntero()
|
||||||
Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(CvePlantilla).FiltraParametros(String.Format("CveEmpresa={0}", UsuarioActual.CveEmpresa), "Orden")
|
Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(CvePlantilla).FiltraParametros(String.Format("CveEmpresa={0}", UsuarioActual.CveEmpresa), "Orden")
|
||||||
|
|||||||
@@ -594,7 +594,6 @@
|
|||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="TxtRef" runat="server" Text='<%# Eval("Referencia") %>'></asp:Literal><br />
|
<asp:Literal ID="TxtRef" runat="server" Text='<%# Eval("Referencia") %>'></asp:Literal><br />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle HorizontalAlign="Left" Width="280px" />
|
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
@@ -602,7 +601,6 @@
|
|||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="TxtConcepto" runat="server" Text='<%# Eval("Concepto") %>'></asp:Literal><br />
|
<asp:Literal ID="TxtConcepto" runat="server" Text='<%# Eval("Concepto") %>'></asp:Literal><br />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle HorizontalAlign="Left" Width="400px" />
|
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>
|
<HeaderTemplate>
|
||||||
@@ -635,9 +633,8 @@
|
|||||||
<asp:TemplateField Visible="false">
|
<asp:TemplateField Visible="false">
|
||||||
<HeaderTemplate>TC</HeaderTemplate>
|
<HeaderTemplate>TC</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlTC" runat="server" Text='<%# String.Format("{0}-${1}", Eval("TC"), Eval("ImporteME", "{0:N2}")) %>'></asp:Literal><br />
|
<asp:Literal ID="LtlTC" runat="server" Text='<%# String.Format("{0}-${1}", Eval("TC", "{0:#.####}"), Eval("ImporteME", "{0:N2}")) %>'></asp:Literal><br />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle HorizontalAlign="Left" Width="300px" />
|
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>Cargo</HeaderTemplate>
|
<HeaderTemplate>Cargo</HeaderTemplate>
|
||||||
@@ -666,14 +663,14 @@
|
|||||||
<asp:LinkButton ID="LnkGvPrePolizaEliminar" OnClick="LnkGvPrePolizaEliminar_Click" runat="server" AlternateText="Eliminar" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>"
|
<asp:LinkButton ID="LnkGvPrePolizaEliminar" OnClick="LnkGvPrePolizaEliminar_Click" runat="server" AlternateText="Eliminar" 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" />
|
data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle HorizontalAlign="Right" Width="80px" />
|
<ItemStyle Width="120px" />
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
<asp:TemplateField >
|
<asp:TemplateField >
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:CheckBox runat="server" ID="chkModificado" Checked="false" Visible="false"/>
|
<asp:CheckBox runat="server" ID="chkModificado" Checked="false" Visible="false"/>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle HorizontalAlign="Right" Width="0px" />
|
<ItemStyle HorizontalAlign="Right" Width="5px" />
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
</Columns>
|
</Columns>
|
||||||
|
|||||||
@@ -495,6 +495,12 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
ObjContabilidad.GetContabilizacionDiarioDetalle(CvePrePoliza)
|
ObjContabilidad.GetContabilizacionDiarioDetalle(CvePrePoliza)
|
||||||
DtMovimientos = ObjContabilidad.DtResultados.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}")
|
DtMovimientos = ObjContabilidad.DtResultados.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}")
|
||||||
|
|
||||||
|
If dr("Modulo").ToString.Contiene("Banc/FluctuaA", "Banc/FluctuaC", "Banc/FluctuaV", "Banc/FluctuaFilial") Then
|
||||||
|
|
||||||
|
BtnEliminar.Enabled = False
|
||||||
|
BtnEliminar.ToolTip = "No se puede eliminar al prepóliza, eliminarlos desde el módulo"
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
'DtMovimientos.DefaultView.Sort = "OrdenPP"
|
'DtMovimientos.DefaultView.Sort = "OrdenPP"
|
||||||
'DtMovimientos = DtMovimientos.DefaultView.ToTable
|
'DtMovimientos = DtMovimientos.DefaultView.ToTable
|
||||||
|
|||||||
@@ -3343,7 +3343,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
Dim PesoKg As Decimal = DrPS("PesoKg").ToString.ToDecimal
|
Dim PesoKg As Decimal = DrPS("PesoKg").ToString.ToDecimal
|
||||||
Dim SATClaveUnidadMedida As String = DrPS("SATClaveUnidadMedida").ToString.Trim
|
Dim SATClaveUnidadMedida As String = DrPS("SATClaveUnidadMedida").ToString.Trim
|
||||||
|
|
||||||
If CveSATPS > 0 And PesoKg > 0 And SATClaveUnidadMedida.Length > 0 Then
|
If CveSATPS > 0 AndAlso PesoKg > 0 AndAlso SATClaveUnidadMedida.Length > 0 Then
|
||||||
Respuesta = True
|
Respuesta = True
|
||||||
Else
|
Else
|
||||||
Respuesta = False
|
Respuesta = False
|
||||||
|
|||||||
@@ -22,6 +22,28 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
{
|
{
|
||||||
get { return 5; }
|
get { return 5; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private DateTime FechaInicioPeriodo
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (ViewState["FechaInicioPeriodo"] == null) { return DateTime.Now; }
|
||||||
|
else { return (DateTime)ViewState["FechaInicioPeriodo"]; }
|
||||||
|
}
|
||||||
|
|
||||||
|
set { ViewState["FechaInicioPeriodo"] = value; }
|
||||||
|
}
|
||||||
|
private DateTime FechaFinPeriodo
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (ViewState["FechaFinPeriodo"] == null) { return DateTime.Now.AddDays(1); }
|
||||||
|
else { return (DateTime)ViewState["FechaFinPeriodo"]; }
|
||||||
|
}
|
||||||
|
|
||||||
|
set { ViewState["FechaFinPeriodo"] = value; }
|
||||||
|
}
|
||||||
|
|
||||||
private DataTable dtNomConceptos
|
private DataTable dtNomConceptos
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -422,7 +444,6 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
dtempleados = null;
|
dtempleados = null;
|
||||||
dtConceptos = null;
|
dtConceptos = null;
|
||||||
DataTable dtPeriodo = new DataTable();
|
DataTable dtPeriodo = new DataTable();
|
||||||
DataTable dtasistencia = new DataTable();
|
|
||||||
LnkAutorizar.Visible = false;
|
LnkAutorizar.Visible = false;
|
||||||
Estatus = 5;
|
Estatus = 5;
|
||||||
if (FiltCvePeriodo > 0)
|
if (FiltCvePeriodo > 0)
|
||||||
@@ -438,6 +459,10 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
int CvePrePolizaProvisionAsimilados = drow["CvePrePolizaAsimilables"].ToString().ToEntero();
|
int CvePrePolizaProvisionAsimilados = drow["CvePrePolizaAsimilables"].ToString().ToEntero();
|
||||||
int CvePrePolizaProrrateo = drow["CvePrePolizaProrrateo"].ToString().ToEntero();
|
int CvePrePolizaProrrateo = drow["CvePrePolizaProrrateo"].ToString().ToEntero();
|
||||||
|
|
||||||
|
|
||||||
|
FechaInicioPeriodo = (DateTime)dtPeriodo.Rows[0]["FechaInicio"];
|
||||||
|
FechaFinPeriodo = (DateTime)dtPeriodo.Rows[0]["FechaFin"];
|
||||||
|
|
||||||
//LnkConceptoEmpleado.Visible = (Estatus == 1);
|
//LnkConceptoEmpleado.Visible = (Estatus == 1);
|
||||||
LnkRegistrarProvision.Visible = (Estatus >= 2);//&& (CvePrePolizaProvision <= 0 || UsuarioActual.CveUsuario == 100);
|
LnkRegistrarProvision.Visible = (Estatus >= 2);//&& (CvePrePolizaProvision <= 0 || UsuarioActual.CveUsuario == 100);
|
||||||
LnkRegistrarProvision.Text = CvePrePolizaProvision <= 0 ? "<i class=\"fa fa-thumbs-up\" aria-hidden=\"true\" ></i>Registrar provisión" : "<i class=\"fa fa-thumbs-up\" aria-hidden=\"true\" ></i>Regenerar provisión";
|
LnkRegistrarProvision.Text = CvePrePolizaProvision <= 0 ? "<i class=\"fa fa-thumbs-up\" aria-hidden=\"true\" ></i>Registrar provisión" : "<i class=\"fa fa-thumbs-up\" aria-hidden=\"true\" ></i>Regenerar provisión";
|
||||||
@@ -466,7 +491,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
dtempleadosConceptos = objnom.DTSetResultados.Tables[4];
|
dtempleadosConceptos = objnom.DTSetResultados.Tables[4];
|
||||||
dtConceptos = objnom.DTSetResultados.Tables[0];
|
dtConceptos = objnom.DTSetResultados.Tables[0];
|
||||||
dtPeriodo = objnom.DTSetResultados.Tables[1];
|
dtPeriodo = objnom.DTSetResultados.Tables[1];
|
||||||
dtasistencia = objnom.DTSetResultados.Tables[2];
|
//dtasistencia = objnom.DTSetResultados.Tables[2];
|
||||||
CvePeriodoSeleccionado = FiltCvePeriodo;
|
CvePeriodoSeleccionado = FiltCvePeriodo;
|
||||||
continuar = true;
|
continuar = true;
|
||||||
}
|
}
|
||||||
@@ -826,13 +851,33 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
GvNominas.DataSource = null;
|
GvNominas.DataSource = null;
|
||||||
GvNominas.DataBind();
|
GvNominas.DataBind();
|
||||||
}
|
}
|
||||||
if (cargaasistencia)
|
#endregion
|
||||||
|
|
||||||
|
if (cargaasistencia && dtPeriodo != null && dtPeriodo.Rows.Count > 0)
|
||||||
{
|
{
|
||||||
if (dtPeriodo != null && dtPeriodo.Rows.Count > 0)
|
cargarasistencia();
|
||||||
|
}
|
||||||
|
if (dtempleados != null)
|
||||||
|
{
|
||||||
|
LnkAutorizar.Visible = (dtempleados.COUNT("CvePersonal", "CvePersonal > 0 AND NomAutorizado =0") > 0) || (Estatus < 2);
|
||||||
|
LnkCancelarNomina.Visible = (dtempleados.COUNT("CvePersonal", "CvePersonal > 0 AND NomAutorizado =1 AND SeTimbro=0") > 0);
|
||||||
|
}
|
||||||
|
UpDatos.Update();
|
||||||
|
}
|
||||||
|
public void cargarasistencia()
|
||||||
{
|
{
|
||||||
|
|
||||||
DateTime FechaInicio = (DateTime)dtPeriodo.Rows[0]["FechaInicio"];
|
|
||||||
DateTime FechaFin = (DateTime)dtPeriodo.Rows[0]["FechaFin"];
|
|
||||||
|
|
||||||
|
DateTime FechaInicio = FechaInicioPeriodo;
|
||||||
|
DateTime FechaFin = FechaFinPeriodo;
|
||||||
|
DataTable dtasistencia;
|
||||||
|
using (ClsNominas objnom = new ClsNominas())
|
||||||
|
{
|
||||||
|
objnom.GetAsistenciabetweendate(UsuarioActual.CveEmpresa, FechaInicio, FechaFin);
|
||||||
|
dtasistencia = objnom.DtResultados;
|
||||||
|
}
|
||||||
StringBuilder gvasistencia = new StringBuilder();
|
StringBuilder gvasistencia = new StringBuilder();
|
||||||
gvasistencia.Append("<div><table class=\"table table-striped table-hover mysmallbtn Widthall ScrollAD gvasistencia \" data-rows=\"1\" data-heighterror=\"360\"><tbody>");
|
gvasistencia.Append("<div><table class=\"table table-striped table-hover mysmallbtn Widthall ScrollAD gvasistencia \" data-rows=\"1\" data-heighterror=\"360\"><tbody>");
|
||||||
if (true)
|
if (true)
|
||||||
@@ -885,15 +930,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
}
|
}
|
||||||
gvasistencia.Append("</tbody></table></div>");
|
gvasistencia.Append("</tbody></table></div>");
|
||||||
ltlGvAsistencia.Text = gvasistencia.ToString();
|
ltlGvAsistencia.Text = gvasistencia.ToString();
|
||||||
}
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
if (dtempleados != null)
|
|
||||||
{
|
|
||||||
LnkAutorizar.Visible = (dtempleados.COUNT("CvePersonal", "CvePersonal > 0 AND NomAutorizado =0") > 0) || (Estatus < 2);
|
|
||||||
LnkCancelarNomina.Visible = (dtempleados.COUNT("CvePersonal", "CvePersonal > 0 AND NomAutorizado =1 AND SeTimbro=0") > 0);
|
|
||||||
}
|
|
||||||
UpDatos.Update();
|
|
||||||
}
|
}
|
||||||
private void setGVNominas()
|
private void setGVNominas()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,6 +3,51 @@
|
|||||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||||
|
<style>
|
||||||
|
.Titulos2 {
|
||||||
|
background-color: #dfdfdf !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Titulos2:hover {
|
||||||
|
background-color: #dfdfdf !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Titulos3 {
|
||||||
|
background-color: #eee !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Titulos3:hover {
|
||||||
|
background-color: #eee !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.GvDatos input {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.GvDatos th:nth-child(1),
|
||||||
|
table.GvDatos th:nth-child(2),
|
||||||
|
table.GvDatos th:nth-child(3),
|
||||||
|
table.GvDatos th:nth-child(4) {
|
||||||
|
text-align: left !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.GvDatos.Columns4 th:nth-child(5) {
|
||||||
|
text-align: left !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.GvDatos tr:not(.Titulos3):not(.Titulos2) td:nth-last-child(2) {
|
||||||
|
text-align: center !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.GvDatos tr:not(.Titulos3):not(.Titulos2) td:nth-last-child(1),
|
||||||
|
table.GvDatos tr:not(.Titulos3):not(.Titulos2) th:nth-last-child(1) {
|
||||||
|
width: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.actions .btn-group .btn {
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
@@ -10,19 +55,37 @@
|
|||||||
Cargas Masivas
|
Cargas Masivas
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||||
<li><asp:HyperLink data-toggle="modal" data-target="#DModalCargaexcel" runat="server"><i class="fa fa-ad-excel" style="margin-right:5px"></i> Carga Masiva</asp:HyperLink></li>
|
<li>
|
||||||
|
<asp:HyperLink data-toggle="modal" data-target="#DModalCargaexcel" runat="server"><i class="fa fa-ad-excel" style="margin-right:5px"></i> Carga Masiva</asp:HyperLink></li>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="portlet solid grey-cascade portlet-filter" style="">
|
<div class="portlet solid grey-cascade portlet-filter">
|
||||||
<div class="portlet-title portlet-filterT" style="">
|
<div class="portlet-title portlet-filterT smalltitle">
|
||||||
<div class="tools">
|
<div class="titlefiltros caption">
|
||||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
|
|
||||||
<a href="javascript:;" class="expand"></a>
|
<div class="row">
|
||||||
<a onclick="document.getElementById('C_BtnConsultar').click();" class="reload"></a>
|
<asp:Label runat="server" CssClass="col-md-1">Turno: </asp:Label>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<asp:DropDownList ID="DdlTurno" runat="server" AppendDataBoundItems="true" DataTextField="Turno" DataValueField="CveTurno" CssClass="select2me form-control" Style="width: 100% !important;" ValidationGroup="GrpGuardar">
|
||||||
|
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<asp:Label ID="LblProyecto" CssClass="col-md-1 compoonenlabel" runat="server" Text="Proyecto:" Style="max-width: 100%"></asp:Label>
|
||||||
|
<div runat="server" id="divddlproyeto" class="col-md-2">
|
||||||
|
<asp:DropDownList ID="DdlProyecto" runat="server" AppendDataBoundItems="true" CssClass="select2me form-control" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Style="width: 100% !important;" ValidationGroup="GrpGuardar">
|
||||||
|
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
<asp:Label ID="LblSubProyeccto" CssClass="col-md-1 compoonenlabel" runat="server" Text="SubProyecto:" Style="max-width: 103px;"></asp:Label>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" CssClass="select2me form-control" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Style="width: 100% !important;" ValidationGroup="GrpGuardar">
|
||||||
|
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="titlefiltros caption " style="font-size: 120%">
|
|
||||||
<ul class="list-inline">
|
<ul class="list-inline">
|
||||||
<%--<li>Cliente:
|
<%--<li>Cliente:
|
||||||
<asp:Button ID="BtnCargarClientes" runat="server" ClientIDMode="Static" Text="CargarClientes" Style="display: none;" />
|
<asp:Button ID="BtnCargarClientes" runat="server" ClientIDMode="Static" Text="CargarClientes" Style="display: none;" />
|
||||||
@@ -30,23 +93,14 @@
|
|||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</li>--%>
|
</li>--%>
|
||||||
<li>Proyecto:
|
|
||||||
<asp:DropDownList ID="DdlProyecto" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 200px !important;" ValidationGroup="GrpGuardar">
|
|
||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
|
||||||
</asp:DropDownList>
|
|
||||||
</li>
|
|
||||||
<li>SubProyecto:
|
|
||||||
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 200px !important;" ValidationGroup="GrpGuardar">
|
|
||||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
|
||||||
</asp:DropDownList>
|
|
||||||
</li>
|
|
||||||
<li style="width: 297px;"> Turno:
|
|
||||||
<asp:DropDownList ID="DdlTurno" runat="server" AppendDataBoundItems="true" DataTextField="Turno" DataValueField="CveTurno" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;" ValidationGroup="GrpGuardar">
|
|
||||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
|
||||||
</asp:DropDownList>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="tools">
|
||||||
|
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
|
||||||
|
<a href="javascript:;" class="expand"></a>
|
||||||
|
<a onclick="document.getElementById('C_BtnConsultar').click();" class="reload"></a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-body" style="display: none; font-size: 120%">
|
<div class="portlet-body" style="display: none; font-size: 120%">
|
||||||
<ul class="list-inline">
|
<ul class="list-inline">
|
||||||
@@ -63,18 +117,44 @@
|
|||||||
<br />
|
<br />
|
||||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div style="text-align:right">
|
|
||||||
<asp:Button ID="BtnGuardar" runat="server" Text="Guardar Cambios" ValidationGroup="GrpGuardar" class="btn btn-primary" />
|
|
||||||
<br />
|
<div class="portlet light xspadding bordered " id="pnldl">
|
||||||
<br />
|
<div class="portlet-title">
|
||||||
|
<div class="caption ">
|
||||||
|
<i class="fa fa-bookmark font-yellow-gold"></i>
|
||||||
|
<span class="caption-subject font-yellow-gold bold uppercase">Información</span>
|
||||||
</div>
|
</div>
|
||||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePersonal, CveSubProyecto" EmptyDataText="No se encontraron Ventas con los filtros especificados" ToolTip="Listado de Asistencias"
|
<div class="tools">
|
||||||
CssClass="table table-striped table-advance table-hover Widthall" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||||
|
<a href="javascript:;" class="fullscreen" data-original-title="" title=""></a>
|
||||||
|
</div>
|
||||||
|
<div style="float: right;">
|
||||||
|
<asp:TextBox CssClass="TxtBusqueda form-control input-sm" runat="server" onkeyup="FiltrarTablaV2('.TxtBusqueda','.GvDatos')" Style="display: inline-block; margin-right: -20px; width: 150px;"></asp:TextBox>
|
||||||
|
<a href="javascript:;" onclick="FiltrarTablaV2('.TxtBusqueda','.GvDatos')" style="margin-top: -3px;" class="btn btn-circle btn-sm font-bold yellow-gold"><i class="icon-magnifier" style="font-weight: bold;"></i></a>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<div class="btn-group">
|
||||||
|
<asp:Button ID="BtnGuardarSupervisor" OnClick="BtnGuardarSupervisor_Click" runat="server" Text="Guardar supervisor" class="btn btn-primary" />
|
||||||
|
<asp:Button ID="BtnGuardar" OnClick="BtnGuardar_Click" runat="server" Text="Guardar salario" ValidationGroup="GrpGuardar" class="btn btn-primary" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="portlet-body ">
|
||||||
|
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePersonal, CveSubProyecto" ToolTip="Listado de Asistencias" ShowHeaderWhenEmpty="true"
|
||||||
|
CssClass="table table-striped table-advance table-hover Widthall ScrollAD GvDatos" Style="" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
|
<asp:TemplateField>
|
||||||
|
<HeaderTemplate>Codigo</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlCodigo" runat="server" Text='<%# String.Format("<a href=""/RH/Personal.aspx?CvePersonal={1}"" target=""_Blank"">{0}</a>", Eval("Codigo"), Eval("CvePersonal")) %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
<ItemStyle Width="50px" HorizontalAlign="Left" />
|
||||||
|
</asp:TemplateField>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>Nombre</HeaderTemplate>
|
<HeaderTemplate>Nombre</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlNombre" runat="server" Text='<%# String.Format("{0}-{1}", Eval("Codigo"), Eval("Nombre"))%>'></asp:Literal>
|
<asp:Literal ID="LtlNombre" runat="server" Text='<%# String.Format("<a href=""/RH/Personal.aspx?CvePersonal={1}"" target=""_Blank"">{0}</a>", Eval("Nombre"), Eval("CvePersonal"))%>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle Width="250px" HorizontalAlign="Left" />
|
<ItemStyle Width="250px" HorizontalAlign="Left" />
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
@@ -87,7 +167,6 @@
|
|||||||
<ItemStyle HorizontalAlign="Left" />
|
<ItemStyle HorizontalAlign="Left" />
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>Sub Proyecto</HeaderTemplate>
|
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal runat="server" Text='<%# Eval("SubProyecto") %>'></asp:Literal>
|
<asp:Literal runat="server" Text='<%# Eval("SubProyecto") %>'></asp:Literal>
|
||||||
<%--<asp:DropDownList ID="DdlGVSubProyecto" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 190px !important;"></asp:DropDownList>--%>
|
<%--<asp:DropDownList ID="DdlGVSubProyecto" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 190px !important;"></asp:DropDownList>--%>
|
||||||
@@ -102,19 +181,10 @@
|
|||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle HorizontalAlign="Left" />
|
<ItemStyle HorizontalAlign="Left" />
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<%--<asp:TemplateField>
|
|
||||||
<HeaderTemplate>Supervisor</HeaderTemplate>
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal runat="server" Text='<%# Eval("Proyecto") %>'></asp:Literal>
|
|
||||||
<asp:DropDownList ID="DdlSupervisor" runat="server" DataTextField="Nombre" DataValueField="CveUsuario" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 140px !important;">
|
|
||||||
</asp:DropDownList>
|
|
||||||
</ItemTemplate>
|
|
||||||
<ItemStyle HorizontalAlign="Left" />
|
|
||||||
</asp:TemplateField>--%>
|
|
||||||
<asp:TemplateField HeaderStyle-Width="80px">
|
<asp:TemplateField HeaderStyle-Width="80px">
|
||||||
<HeaderTemplate>SDD</HeaderTemplate>
|
<HeaderTemplate>SDD</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:TextBox ID="TxtSalarioDiario" runat="server" MaxLength="10" Text='<%# Eval("SalarioDiario", "{0:N2}") %>' Width="50px"></asp:TextBox>
|
<asp:TextBox ID="TxtSalarioDiario" runat="server" MaxLength="10" Text='<%# Eval("SalarioDiario", "{0:N2}") %>' Width="70px"></asp:TextBox>
|
||||||
<asp:CompareValidator ID="CVSalarioDiario" runat="server" ControlToValidate="TxtSalarioDiario" Display="None" ErrorMessage="El campo <b>''Salario Diario''</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>
|
<asp:CompareValidator ID="CVSalarioDiario" runat="server" ControlToValidate="TxtSalarioDiario" Display="None" ErrorMessage="El campo <b>''Salario Diario''</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="VCOSalarioDiario" runat="server" HighlightCssClass="vco" TargetControlID="CVSalarioDiario" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCOSalarioDiario" runat="server" HighlightCssClass="vco" TargetControlID="CVSalarioDiario" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
@@ -123,7 +193,7 @@
|
|||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>SDI</HeaderTemplate>
|
<HeaderTemplate>SDI</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:TextBox ID="TxtSDI" runat="server" MaxLength="10" Text='<%# Eval("SDI", "{0:N2}") %>' Width="50px"></asp:TextBox>
|
<asp:TextBox ID="TxtSDI" runat="server" MaxLength="10" Text='<%# Eval("SDI", "{0:N2}") %>' Width="70px"></asp:TextBox>
|
||||||
<asp:CompareValidator ID="CVSDI" runat="server" ControlToValidate="TxtSDI" Display="None" ErrorMessage="El campo <b>''SDI''</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>
|
<asp:CompareValidator ID="CVSDI" runat="server" ControlToValidate="TxtSDI" Display="None" ErrorMessage="El campo <b>''SDI''</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="VCOSDI" runat="server" HighlightCssClass="vco" TargetControlID="CVSDI" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCOSDI" runat="server" HighlightCssClass="vco" TargetControlID="CVSDI" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
@@ -132,13 +202,12 @@
|
|||||||
<asp:TemplateField HeaderStyle-Width="80px">
|
<asp:TemplateField HeaderStyle-Width="80px">
|
||||||
<HeaderTemplate>SD IMSS</HeaderTemplate>
|
<HeaderTemplate>SD IMSS</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:TextBox ID="TxtSalarioCotizado" runat="server" MaxLength="10" Text='<%# Eval("SalarioDiarioSS", "{0:N2}") %>' Width="60px"></asp:TextBox>
|
<asp:TextBox ID="TxtSalarioCotizado" runat="server" MaxLength="10" Text='<%# Eval("SalarioDiarioSS", "{0:N2}") %>' Width="70px"></asp:TextBox>
|
||||||
<asp:CompareValidator ID="CVSDT" runat="server" ControlToValidate="TxtSalarioCotizado" Display="None" ErrorMessage="El campo <b>''Salario Diario Cotizado''</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>
|
<asp:CompareValidator ID="CVSDT" runat="server" ControlToValidate="TxtSalarioCotizado" Display="None" ErrorMessage="El campo <b>''Salario Diario Cotizado''</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="VCOSDT" runat="server" HighlightCssClass="vco" TargetControlID="CVSDT" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCOSDT" runat="server" HighlightCssClass="vco" TargetControlID="CVSDT" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle HorizontalAlign="Left" />
|
<ItemStyle HorizontalAlign="Left" />
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
<asp:TemplateField HeaderStyle-Width="80px">
|
<asp:TemplateField HeaderStyle-Width="80px">
|
||||||
<HeaderTemplate>¿CALCULAR SDI?</HeaderTemplate>
|
<HeaderTemplate>¿CALCULAR SDI?</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
@@ -146,10 +215,27 @@
|
|||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle HorizontalAlign="Left" />
|
<ItemStyle HorizontalAlign="Left" />
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField>
|
||||||
|
<HeaderTemplate>Supervisor</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:DropDownList ID="DdlSupervisor" runat="server" DataTextField="Nombre" DataValueField="CveUsuario" CssClass=" select2me" Style="width: 140px !important;">
|
||||||
|
</asp:DropDownList>
|
||||||
|
</ItemTemplate>
|
||||||
|
<ItemStyle HorizontalAlign="Left" />
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField>
|
||||||
|
<HeaderTemplate>Cliente</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="140" data-metodo="getcliente" UsaWebService="true" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 140px"></ADS:Dropdownlost>
|
||||||
|
</ItemTemplate>
|
||||||
|
<ItemStyle HorizontalAlign="Left" />
|
||||||
|
</asp:TemplateField>
|
||||||
</Columns>
|
</Columns>
|
||||||
<RowStyle CssClass="Texto" />
|
<RowStyle CssClass="Texto" />
|
||||||
<HeaderStyle CssClass="Titulos" />
|
<HeaderStyle CssClass="Titulos" />
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
@@ -200,7 +286,9 @@
|
|||||||
<div class="portlet-body rowpadding ">
|
<div class="portlet-body rowpadding ">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-6">Calcular Salario Diario Integrado</div>
|
<div class="col-sm-6">Calcular Salario Diario Integrado</div>
|
||||||
<div class="col-sm-6"> <asp:CheckBox ID="ChkCalcularSDIXLS" Text=" " CssClass="chksino" runat="server" /></div>
|
<div class="col-sm-6">
|
||||||
|
<asp:CheckBox ID="ChkCalcularSDIXLS" Text=" " CssClass="chksino" runat="server" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<asp:TextBox ID="TxtArchivoNomina" CssClass="ADSdropzone hidden" runat="server"></asp:TextBox>
|
<asp:TextBox ID="TxtArchivoNomina" CssClass="ADSdropzone hidden" runat="server"></asp:TextBox>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -12,7 +12,15 @@ Partial Class RH_ActualizacionMasiva
|
|||||||
SetPermisos()
|
SetPermisos()
|
||||||
|
|
||||||
'DdlCliente.Attributes.Add("onclick", "CargaClientes();")
|
'DdlCliente.Attributes.Add("onclick", "CargaClientes();")
|
||||||
CargaProyecto()
|
'CargaProyecto()
|
||||||
|
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyeccto)
|
||||||
|
divddlproyeto.Visible = DdlProyecto.Visible
|
||||||
|
GvDatos.Columns(2).Visible = DdlProyecto.Visible
|
||||||
|
GvDatos.Columns(3).HeaderText = LblSubProyeccto.Text
|
||||||
|
GvDatos.DataSource = New DataTable()
|
||||||
|
GvDatos.DataBind()
|
||||||
|
|
||||||
|
GvDatos.CssClass = String.Format("{0} {1}", GvDatos.CssClass, If(DdlProyecto.Visible, "Columns4", ""))
|
||||||
CargaTurnos()
|
CargaTurnos()
|
||||||
CargaSupervisores()
|
CargaSupervisores()
|
||||||
End If
|
End If
|
||||||
@@ -70,16 +78,6 @@ Partial Class RH_ActualizacionMasiva
|
|||||||
' DdlCliente.Attributes.Remove("onclick")
|
' DdlCliente.Attributes.Remove("onclick")
|
||||||
'End Sub
|
'End Sub
|
||||||
|
|
||||||
Private Sub CargaProyecto()
|
|
||||||
ViewState("DTProyectos") = GlobalDTProyectos(UsuarioActual.Empresa.CveEmpresa)
|
|
||||||
|
|
||||||
Dim Row As DataRow = DirectCast(ViewState("DTProyectos"), DataTable).NewRow()
|
|
||||||
Row("CveProyecto") = -1 : Row("Proyecto") = "Sin Proyecto asignado"
|
|
||||||
DirectCast(ViewState("DTProyectos"), DataTable).Rows.InsertAt(Row, 0)
|
|
||||||
|
|
||||||
DdlProyecto.DataSource = GlobalDTProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, 1)
|
|
||||||
DdlProyecto.DataBind()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub CargaSubProyecto()
|
Private Sub CargaSubProyecto()
|
||||||
ViewState("DTSubProyectos") = GlobalDTSubProyectos(DdlProyecto.SelectedValue.ToEntero)
|
ViewState("DTSubProyectos") = GlobalDTSubProyectos(DdlProyecto.SelectedValue.ToEntero)
|
||||||
@@ -90,20 +88,18 @@ Partial Class RH_ActualizacionMasiva
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaTurnos()
|
Private Sub CargaTurnos()
|
||||||
ViewState("DTTurno") = GlobalDTTurno.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
ViewState("DTTurno") = GlobalDTTurno.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa))
|
||||||
DdlTurno.DataSource = GlobalDTTurno.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
DdlTurno.DataSource = GlobalDTTurno.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa))
|
||||||
DdlTurno.DataBind()
|
DdlTurno.DataBind()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaSupervisores()
|
Private Sub CargaSupervisores()
|
||||||
ViewState("DTUsuarios") = GlobalDTUsuarios.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa & " AND EsSupervisorRH = 1 ")
|
ViewState("DTUsuarios") = GlobalDTUsuarios.FiltraParametros(String.Format("CveEmpresa = {0} AND EsSupervisorRH = 1 ", UsuarioActual.CveEmpresa))
|
||||||
|
|
||||||
Dim Row As DataRow = DirectCast(ViewState("DTUsuarios"), DataTable).NewRow()
|
Dim Row As DataRow = DirectCast(ViewState("DTUsuarios"), DataTable).NewRow()
|
||||||
Row("CveUsuario") = -1 : Row("Nombre") = "Sin Supervisor Asignado"
|
Row("CveUsuario") = -1 : Row("Nombre") = "Sin Supervisor Asignado"
|
||||||
DirectCast(ViewState("DTUsuarios"), DataTable).Rows.InsertAt(Row, 0)
|
DirectCast(ViewState("DTUsuarios"), DataTable).Rows.InsertAt(Row, 0)
|
||||||
|
|
||||||
'DdlSupervisor.DataSource = GlobalDTUsuarios.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa & " AND EsSupervisorRH = 1 ")
|
|
||||||
'DdlSupervisor.DataBind()
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
@@ -113,9 +109,10 @@ Partial Class RH_ActualizacionMasiva
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
|
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
|
||||||
|
consultardata()
|
||||||
Using ObjPersonal As New ClsRH
|
End Sub
|
||||||
|
Public Sub consultardata()
|
||||||
|
Using ObjPersonal As New ClsRH()
|
||||||
If ObjPersonal.GetPersonalMasivo(DdlTurno.SelectedValue.ToEntero, DdlProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa) Then
|
If ObjPersonal.GetPersonalMasivo(DdlTurno.SelectedValue.ToEntero, DdlProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa) Then
|
||||||
GvDatos.DataSource = ObjPersonal.DtResultados
|
GvDatos.DataSource = ObjPersonal.DtResultados
|
||||||
Else
|
Else
|
||||||
@@ -123,7 +120,6 @@ Partial Class RH_ActualizacionMasiva
|
|||||||
End If
|
End If
|
||||||
End Using
|
End Using
|
||||||
|
|
||||||
|
|
||||||
GvDatos.DataBind()
|
GvDatos.DataBind()
|
||||||
UPDatos.Update()
|
UPDatos.Update()
|
||||||
End Sub
|
End Sub
|
||||||
@@ -154,18 +150,21 @@ Partial Class RH_ActualizacionMasiva
|
|||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
|
||||||
If e.Row.DBCampo("Turno") = "" AndAlso e.Row.DBCampo("Nombre") = "" Then
|
If e.Row.DBCampo("Turno") = "" AndAlso e.Row.DBCampo("Nombre") = "" Then
|
||||||
e.Row.FCLiteral("LtlNombre").Text = "<b>Sub Proyecto:</b> " & If(e.Row.DBCampo("SubProyecto") = String.Empty, "Sin Proyecto Asignado", e.Row.DBCampo("SubProyecto"))
|
e.Row.FCLiteral("LtlCodigo").Text = String.Format("<b>{0}:</b> {1}", LblSubProyeccto.Text, If(e.Row.DBCampo("SubProyecto") = String.Empty, "Sin Proyecto Asignado", e.Row.DBCampo("SubProyecto")))
|
||||||
e.Row.Cells(0).ColumnSpan = 7
|
|
||||||
For i As Integer = 1 To 6
|
e.Row.Cells(0).ColumnSpan = 11
|
||||||
|
For i As Integer = 1 To 10
|
||||||
e.Row.Cells(i).Visible = False
|
e.Row.Cells(i).Visible = False
|
||||||
Next
|
Next
|
||||||
|
e.Row.CssClass = "Titulos2"
|
||||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||||
ElseIf e.Row.DBCampo("Turno") <> "" AndAlso e.Row.DBCampo("Nombre") = "" Then
|
ElseIf e.Row.DBCampo("Turno") <> "" AndAlso e.Row.DBCampo("Nombre") = "" Then
|
||||||
e.Row.FCLiteral("LtlNombre").Text = "<b>Turno:</b> " & e.Row.DBCampo("Turno")
|
e.Row.FCLiteral("LtlCodigo").Text = String.Format("<b>Turno:</b> {0}", e.Row.DBCampo("Turno"))
|
||||||
e.Row.Cells(0).ColumnSpan = 7
|
e.Row.Cells(0).ColumnSpan = 11
|
||||||
For i As Integer = 1 To 6
|
For i As Integer = 1 To 10
|
||||||
e.Row.Cells(i).Visible = False
|
e.Row.Cells(i).Visible = False
|
||||||
Next
|
Next
|
||||||
|
e.Row.CssClass = "Titulos3"
|
||||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||||
Else
|
Else
|
||||||
'If e.Row.DBCampo("CveProyecto") <> String.Empty Then e.Row.FCDropDownList("DdlGVProyecto").SelectedValue = e.Row.DBCampo("CveProyecto")
|
'If e.Row.DBCampo("CveProyecto") <> String.Empty Then e.Row.FCDropDownList("DdlGVProyecto").SelectedValue = e.Row.DBCampo("CveProyecto")
|
||||||
@@ -177,6 +176,14 @@ Partial Class RH_ActualizacionMasiva
|
|||||||
|
|
||||||
e.Row.FCTextBox("TxtSalarioCotizado").Text = e.Row.FCTextBox("TxtSalarioCotizado").Text.Replace(",", "")
|
e.Row.FCTextBox("TxtSalarioCotizado").Text = e.Row.FCTextBox("TxtSalarioCotizado").Text.Replace(",", "")
|
||||||
|
|
||||||
|
e.Row.FCDropDownList("DdlSupervisor").DataSource = DTUsuarios
|
||||||
|
e.Row.FCDropDownList("DdlSupervisor").DataBind()
|
||||||
|
e.Row.FCDropDownList("DdlSupervisor").Items.Insert(0, New ListItem("Sin Supervisor Asignado", "-1"))
|
||||||
|
e.Row.FCDropDownList("DdlSupervisor").SelectedValueExist(e.Row.DBCampo("CveSupervisor").ToString())
|
||||||
|
|
||||||
|
e.Row.FCDropDownLost("DdlClientes").SelectedValue = e.Row.DBCampo("CveCliente")
|
||||||
|
e.Row.FCDropDownLost("DdlClientes").SelectedText = e.Row.DBCampo("Cliente")
|
||||||
|
|
||||||
''Deshabilita todo
|
''Deshabilita todo
|
||||||
'e.Row.Cells(1).Enabled = True : e.Row.Cells(2).Enabled = True : e.Row.Cells(3).Enabled = True : e.Row.Cells(4).Enabled = True
|
'e.Row.Cells(1).Enabled = True : e.Row.Cells(2).Enabled = True : e.Row.Cells(3).Enabled = True : e.Row.Cells(4).Enabled = True
|
||||||
'e.Row.Cells(5).Enabled = True : e.Row.Cells(6).Enabled = True : e.Row.Cells(7).Enabled = True
|
'e.Row.Cells(5).Enabled = True : e.Row.Cells(6).Enabled = True : e.Row.Cells(7).Enabled = True
|
||||||
@@ -188,7 +195,7 @@ Partial Class RH_ActualizacionMasiva
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub BtnGuardar_Click(sender As Object, e As System.EventArgs) Handles BtnGuardar.Click
|
Protected Sub BtnGuardar_Click(sender As Object, e As System.EventArgs)
|
||||||
'Dim ObjPersonal As New ClsRH
|
'Dim ObjPersonal As New ClsRH
|
||||||
'ObjPersonal.IniciaTransacSQL()
|
'ObjPersonal.IniciaTransacSQL()
|
||||||
|
|
||||||
@@ -309,7 +316,7 @@ Partial Class RH_ActualizacionMasiva
|
|||||||
Response.BinaryWrite(memoryStream.ToArray())
|
Response.BinaryWrite(memoryStream.ToArray())
|
||||||
Response.[End]()
|
Response.[End]()
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Alert("Ocurrio un error al generar el Formato de salario" & ex.ToString())
|
Alert(String.Format("Ocurrio un error al generar el Formato de salario {0}", ex.ToString()))
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub LnkCargarSalarios_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkCargarSalarios_Click(sender As Object, e As EventArgs)
|
||||||
@@ -344,8 +351,7 @@ Partial Class RH_ActualizacionMasiva
|
|||||||
DTEXcel = Extensiones.ModExtensiones.ReadExcelFile(fileItem.FileUrl, True).FiltraParametros(" LEN(Codigo)>0 ")
|
DTEXcel = Extensiones.ModExtensiones.ReadExcelFile(fileItem.FileUrl, True).FiltraParametros(" LEN(Codigo)>0 ")
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
continuar = False
|
continuar = False
|
||||||
stringError = "Ocurrio un Error al procesar el excel "
|
String.Format("Ocurrio un Error al procesar el excel {0}{1}", vbCrLf, ex.ToString()).GuardaLog()
|
||||||
String.Format("{0} " & vbCrLf & "{0}", stringError, ex.ToString()).GuardaLog()
|
|
||||||
End Try
|
End Try
|
||||||
End If
|
End If
|
||||||
If continuar Then
|
If continuar Then
|
||||||
@@ -386,4 +392,30 @@ Partial Class RH_ActualizacionMasiva
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnGuardarSupervisor_Click(sender As Object, e As EventArgs)
|
||||||
|
Dim CvePersonal As Integer = 0
|
||||||
|
Dim listpersonal As New List(Of RequestUpSupervisorMasiva)
|
||||||
|
For Each Row As GridViewRow In GvDatos.Rows
|
||||||
|
CvePersonal = Row.DataKey("CvePersonal").ToEntero()
|
||||||
|
If CvePersonal > 0 Then
|
||||||
|
listpersonal.Add(New RequestUpSupervisorMasiva() With {.CvePersonal = CvePersonal, .CveUsuario = Row.FCDropDownList("DdlSupervisor").SelectedValue.ToEntero(),
|
||||||
|
.CveCliente = Row.FCDropDownLost("DdlClientes").SelectedValue.ToEntero()})
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Dim continuar As Boolean = False
|
||||||
|
Using ObjPersonal As ClsRH = New ClsRH()
|
||||||
|
ObjPersonal.IniciaTransacSQL()
|
||||||
|
If ObjPersonal.UpPersonalSupervisorMasiva(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, listpersonal) Then
|
||||||
|
ObjPersonal.Commit()
|
||||||
|
continuar = True
|
||||||
|
Alert("La información se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||||
|
Else
|
||||||
|
ObjPersonal.RollBack()
|
||||||
|
End If
|
||||||
|
End Using
|
||||||
|
If continuar Then
|
||||||
|
consultardata()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -1141,7 +1141,10 @@
|
|||||||
|
|
||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:DropDownList Width="100%" ID="DdlMedioTransporte" CssClass="form-control input-sm select2me" runat="server" DataTextField="MedioTransporte" DataValueField="CveMedioTransporte" ValidationGroup="GrpGuardar">
|
<asp:DropDownList Width="100%" ID="DdlMedioTransporte" CssClass="form-control input-sm select2me" runat="server" AutoPostBack="true"
|
||||||
|
DataTextField="Nombre" DataValueField="CveOrigen" ValidationGroup="GrpGuardar">
|
||||||
|
</asp:DropDownList>
|
||||||
|
<%-- <asp:DropDownList Width="100%" ID="DdlMedioTransporte" CssClass="form-control input-sm select2me" runat="server" DataTextField="MedioTransporte" DataValueField="CveMedioTransporte" ValidationGroup="GrpGuardar">
|
||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||||
<asp:ListItem Value="1" Text="Hermosillo"></asp:ListItem>
|
<asp:ListItem Value="1" Text="Hermosillo"></asp:ListItem>
|
||||||
<asp:ListItem Value="2" Text="Taxi-1"></asp:ListItem>
|
<asp:ListItem Value="2" Text="Taxi-1"></asp:ListItem>
|
||||||
@@ -1151,7 +1154,7 @@
|
|||||||
<asp:ListItem Value="7" Text="Taxi-5"></asp:ListItem>
|
<asp:ListItem Value="7" Text="Taxi-5"></asp:ListItem>
|
||||||
<asp:ListItem Value="6" Text="Taxi-6"></asp:ListItem>
|
<asp:ListItem Value="6" Text="Taxi-6"></asp:ListItem>
|
||||||
<asp:ListItem Value="8" Text="Costa"></asp:ListItem>
|
<asp:ListItem Value="8" Text="Costa"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>--%>
|
||||||
<asp:Label AssociatedControlID="DdlMedioTransporte" runat="server" Text="Medio transporte:"></asp:Label>
|
<asp:Label AssociatedControlID="DdlMedioTransporte" runat="server" Text="Medio transporte:"></asp:Label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ Partial Class RH_CatPersonal
|
|||||||
CargaJornada()
|
CargaJornada()
|
||||||
CargaEstados()
|
CargaEstados()
|
||||||
CargaSatRiesgoPuesto()
|
CargaSatRiesgoPuesto()
|
||||||
|
CargaMedioTransporte()
|
||||||
LoadDefaultValues()
|
LoadDefaultValues()
|
||||||
|
|
||||||
|
|
||||||
@@ -288,6 +288,18 @@ Partial Class RH_CatPersonal
|
|||||||
'End If
|
'End If
|
||||||
UpSubProyecto.Update()
|
UpSubProyecto.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
Private Sub CargaMedioTransporte()
|
||||||
|
Dim objgenerales As New ClsGenerales()
|
||||||
|
objgenerales.GetMediosTransporte(-1, True, UsuarioActual.CveEmpresa, -1, -1, -1, -1)
|
||||||
|
DdlMedioTransporte.Items.Clear()
|
||||||
|
DdlMedioTransporte.DataSource = objgenerales.DtResultados
|
||||||
|
DdlMedioTransporte.DataBind()
|
||||||
|
'filtro por usuario subproyecto/sucursal vsh
|
||||||
|
'If UsuarioActual.CveEmpresa = 7 Then
|
||||||
|
' DdlSubProyectoAsignado.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1).FiltraParametros($"CveSubProyecto = { UsuarioActual.CveSubProyecto }")
|
||||||
|
'End If
|
||||||
|
'UpSubProyecto.Update()
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaTipoCentroCosto()
|
Private Sub CargaTipoCentroCosto()
|
||||||
|
|
||||||
|
|||||||
@@ -71,15 +71,21 @@ function log(mensaje) {
|
|||||||
}
|
}
|
||||||
function FiltrarTabla(idtxt, idtable, idcontador) {
|
function FiltrarTabla(idtxt, idtable, idcontador) {
|
||||||
if ($('#' + idtxt).val() == '') { $('table#' + idtable + ' tr').css('display', 'table-row'); }
|
if ($('#' + idtxt).val() == '') { $('table#' + idtable + ' tr').css('display', 'table-row'); }
|
||||||
else { $('table#' + idtable + ' tr:not(.ADtr)').css('display', 'none'); $('table#' + idtable + ' tr:contains("' + $('#' + idtxt).val() + '")').css('display', 'table-row'); }
|
else {
|
||||||
|
$('table#' + idtable + ' tr:not(.ADtr)').css('display', 'none'); $('table#' + idtable + ' tr:contains("' + $('#' + idtxt).val() + '")').css('display', 'table-row');
|
||||||
|
$('div.ADScroller .ADScroller-header table#' + idtable + ' tr:not(.ADtr)').css('display', '');
|
||||||
|
}
|
||||||
if ($('#' + idcontador).length > 0) {
|
if ($('#' + idcontador).length > 0) {
|
||||||
$('#' + idcontador).html($('#' + idtable + ' tr:visible').length);
|
$('#' + idcontador).html($('#' + idtable + ' tr:visible').length);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function FiltrarTablaV2(idtxt, idtable, idcontador) {
|
function FiltrarTablaV2(idtxt, idtable, idcontador) {
|
||||||
if ($(idtxt).val() == '') { $(idtable + ' tr').css('display', 'table-row'); }
|
if ($(idtxt).val() == '') { $(idtable + ' tr').css('display', ''); }
|
||||||
else { $(idtable + ' tr:not(.ADtr)').css('display', 'none'); $(idtable + ' tr:contains("' + $(idtxt).val() + '")').css('display', 'table-row'); }
|
else {
|
||||||
|
$(idtable + ' tr:not(.ADtr)').css('display', 'none'); $(idtable + ' tr:contains("' + $(idtxt).val() + '")').css('display', '');
|
||||||
|
$('div.ADScroller .ADScroller-header '+idtable + ' tr:not(.ADtr)').css('display', '');
|
||||||
|
}
|
||||||
if ($('#' + idcontador).length > 0) {
|
if ($('#' + idcontador).length > 0) {
|
||||||
$('#' + idcontador).html($(idtable + ' tr:visible').length);
|
$('#' + idcontador).html($(idtable + ' tr:visible').length);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -215,7 +215,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group form-md-line-input form-md-floating-label input-iconright">
|
<div class="form-group form-md-line-input form-md-floating-label input-iconright">
|
||||||
<asp:Label runat="server" Text="Clasificación" AssociatedControlID="DdlClasificacion"></asp:Label>
|
<asp:Label runat="server" Text="Clasificación" AssociatedControlID="DdlClasificacion"></asp:Label>
|
||||||
<asp:DropDownList ID="DdlClasificacion" CssClass="form-control input-sm select2me" runat="server" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="100%">
|
<asp:DropDownList ID="DdlClasificacion" CssClass="form-control input-sm select2me" runat="server" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="100%" OnSelectedIndexChanged="DdlClasificacion_SelectedIndexChanged" >
|
||||||
<asp:ListItem Selected="True" Text="Seleccione la Clasificación (Todas)" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Seleccione la Clasificación (Todas)" Value="-1"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -224,13 +224,14 @@ public partial class Ventas_RepConciliacionEmitidosSat : ClsPaginas
|
|||||||
ClsCGame ObjCGame = new ClsCGame(ObjVentas.IniciaTransacSQL());
|
ClsCGame ObjCGame = new ClsCGame(ObjVentas.IniciaTransacSQL());
|
||||||
ClsEdocumentacion ObjDocCliente = new ClsEdocumentacion(ObjVentas.IniciaTransacSQL());
|
ClsEdocumentacion ObjDocCliente = new ClsEdocumentacion(ObjVentas.IniciaTransacSQL());
|
||||||
ClsAcumuladores ObjAcum = new ClsAcumuladores(ObjVentas.IniciaTransacSQL());
|
ClsAcumuladores ObjAcum = new ClsAcumuladores(ObjVentas.IniciaTransacSQL());
|
||||||
//ClsContPAQi ObjContPaq = null;
|
ClsContPAQi ObjContPaq = null;
|
||||||
//StringBuilder MensajeAlert = new StringBuilder() ;
|
//StringBuilder MensajeAlert = new StringBuilder() ;
|
||||||
Modelos.Factura.MMensajeFactura Resp = new Modelos.Factura.MMensajeFactura();
|
Modelos.Factura.MMensajeFactura Resp = new Modelos.Factura.MMensajeFactura();
|
||||||
DataTable DtDetalle = objfact.DtDetalle;
|
DataTable DtDetalle = objfact.DtDetalle;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// objfact.GuardarVenta(ref objfact, ref ObjVentas, ref ObjConta, ref ObjInventario, ref ObjContr, ref DtDetalle, objfact.CveNCaVincular, ref ObjContPaq, ref ObjBancos, ref ObjOS, ref ObjEventos, ref ObjCGame, ref ObjClientes, ref Resp, ObjAcum: ObjAcum);
|
objfact.GuardarVenta(ref objfact, ref ObjVentas, ref ObjConta, ref ObjInventario, ref ObjContr, ref DtDetalle, objfact.CveNCaVincular, ref ObjContPaq,
|
||||||
|
ref ObjBancos, ref ObjOS, ref ObjEventos, ref ObjCGame, ref ObjClientes, false, ObjAcum,ref Resp);
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
@@ -803,6 +804,28 @@ public partial class Ventas_RepConciliacionEmitidosSat : ClsPaginas
|
|||||||
}
|
}
|
||||||
//String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", CveVenta, "XML", DbRowVenta("SerieFolio"), DbRowVenta("TipoDocto"))))
|
//String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", CveVenta, "XML", DbRowVenta("SerieFolio"), DbRowVenta("TipoDocto"))))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void DdlClasificacion_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
int CveClasificacion = DdlClasificacion.SelectedValue.ToEntero();
|
||||||
|
if (UsuarioActual.Empresa.Funcionalidad(141).ToString() == "1")
|
||||||
|
{
|
||||||
|
|
||||||
|
DdlPS.setEsWebService(true);
|
||||||
|
DdlPS.ddlWS.Attributes.Add("data-cveclasificacion", CveClasificacion.ToString());
|
||||||
|
DdlPS.ddlWS.Attributes.Add("data-pagina", "ventas/ventas");
|
||||||
|
DdlPS.ddlWS.Attributes.Add("data-Estatus", "1");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
DdlPS.setEsWebService(false);
|
||||||
|
DdlPS.ddl.DataSource = get_GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion: CveClasificacion, Estatus: 1, AplicaParaVenta: 1);
|
||||||
|
DdlPS.ddl.DataBind();
|
||||||
|
}
|
||||||
|
UpModalDefaults.Update();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
namespace ADSistemaLibrary2.SatXml
|
namespace ADSistemaLibrary2.SatXml
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1267,6 +1267,15 @@ Partial Class Ventas
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private Property CveEstadoCancelacion As Integer
|
||||||
|
Get
|
||||||
|
Return If(IsNothing(ViewState("CveEstadoCancelacion")), 0, CType(ViewState("CveEstadoCancelacion"), Integer))
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
ViewState("CveEstadoCancelacion") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Private Property PermiteCredito As Boolean
|
Private Property PermiteCredito As Boolean
|
||||||
Get
|
Get
|
||||||
Return If(IsNothing(ViewState("PermiteCredito")), False, CBool(ViewState("PermiteCredito")))
|
Return If(IsNothing(ViewState("PermiteCredito")), False, CBool(ViewState("PermiteCredito")))
|
||||||
@@ -1321,6 +1330,14 @@ Partial Class Ventas
|
|||||||
ViewState("RFCReceptorVenta") = value
|
ViewState("RFCReceptorVenta") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
Private Property RegimenFiscalCliente As String
|
||||||
|
Get
|
||||||
|
Return IfNull(ViewState("RegimenFiscalCliente"), "").ToString()
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
ViewState("RegimenFiscalCliente") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
Private Property Adjunto As String
|
Private Property Adjunto As String
|
||||||
Get
|
Get
|
||||||
Return If(IsNothing(ViewState("Adjunto")), "", ViewState("Adjunto").ToString())
|
Return If(IsNothing(ViewState("Adjunto")), "", ViewState("Adjunto").ToString())
|
||||||
@@ -2245,6 +2262,7 @@ Partial Class Ventas
|
|||||||
SeCancelaRemisionProceso = False
|
SeCancelaRemisionProceso = False
|
||||||
TotalOriginal = 0
|
TotalOriginal = 0
|
||||||
CveAlmacenDevolucion = 0
|
CveAlmacenDevolucion = 0
|
||||||
|
Me.CveEstadoCancelacion = 0
|
||||||
|
|
||||||
txtFechaICot.Text = Now.AddMonths(-3).ToShortDateString
|
txtFechaICot.Text = Now.AddMonths(-3).ToShortDateString
|
||||||
TxtFechaIRem.Text = Now.AddMonths(-3).ToShortDateString
|
TxtFechaIRem.Text = Now.AddMonths(-3).ToShortDateString
|
||||||
@@ -2478,6 +2496,25 @@ Partial Class Ventas
|
|||||||
HlFacturasRelaciondas.Visible = True
|
HlFacturasRelaciondas.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Request("CveOrdenProduccion") IsNot Nothing AndAlso IsNumeric(Request("CveOrdenProduccion")) AndAlso Request("CveOrdenProduccion").ToEntero() > 0 Then
|
||||||
|
DdlSubProyectoDatos.SelectedValueExist(11954)
|
||||||
|
Using ObjVentas As New ClsNominas
|
||||||
|
|
||||||
|
If ObjVentas.ManifiestoForVtaGet(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, "", -Request("CveOrdenProduccion").ToEntero()) Then
|
||||||
|
TmpDT = ObjVentas.DtResultados
|
||||||
|
TmpDT.Columns.Add("EntregaDirecta", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("CveMovimientoDetallePedido", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("CveVentaDetalleRNC", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("TieneProntoPago", GetType(String))
|
||||||
|
TmpDT.Columns.Add("ImporteProntoPago", GetType(Decimal))
|
||||||
|
GvPS.DataSource = ObjVentas.DtResultados
|
||||||
|
GvPS.DataBind()
|
||||||
|
|
||||||
|
'IEPS A NIVEL DETALLE
|
||||||
|
'TxtIEPS.Text = If(TmpDT.SUM("IEPS") > 0, TmpDT.SUM("IEPS").FormatoNumero, TxtIEPS.Text)
|
||||||
|
End If
|
||||||
|
End Using
|
||||||
|
End If
|
||||||
If Request("CveEmbarqueManifiesto") IsNot Nothing AndAlso IsNumeric(Request("CveEmbarqueManifiesto")) AndAlso Request("CveEmbarqueManifiesto").ToEntero() > 0 Then
|
If Request("CveEmbarqueManifiesto") IsNot Nothing AndAlso IsNumeric(Request("CveEmbarqueManifiesto")) AndAlso Request("CveEmbarqueManifiesto").ToEntero() > 0 Then
|
||||||
DdlMoneda.SelectedValueExist(2)
|
DdlMoneda.SelectedValueExist(2)
|
||||||
Using ObjVentas As New ClsNominas
|
Using ObjVentas As New ClsNominas
|
||||||
@@ -5662,8 +5699,12 @@ Partial Class Ventas
|
|||||||
'End If
|
'End If
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaUsoCFDI()
|
Private Sub CargaUsoCFDI()
|
||||||
DdlUsoCFDI.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica)
|
If UsuarioActual.Empresa.Funcionalidad(350) <> "1" Then
|
||||||
DdlSucursalUsoCFDI.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica)
|
RegimenFiscalCliente = "-1"
|
||||||
|
End If
|
||||||
|
|
||||||
|
DdlUsoCFDI.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica, RegimenFiscalReceptor:=RegimenFiscalCliente)
|
||||||
|
DdlSucursalUsoCFDI.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica, RegimenFiscalReceptor:=RegimenFiscalCliente)
|
||||||
|
|
||||||
DdlUsoCFDI.DataBind()
|
DdlUsoCFDI.DataBind()
|
||||||
DdlSucursalUsoCFDI.DataBind()
|
DdlSucursalUsoCFDI.DataBind()
|
||||||
@@ -5945,6 +5986,10 @@ Partial Class Ventas
|
|||||||
ViewState("CliLocalidad") = If(ObjCliente.Localidad.Trim.Length = 0, ObjCliente.Ciudad.Trim, ObjCliente.Localidad.Trim)
|
ViewState("CliLocalidad") = If(ObjCliente.Localidad.Trim.Length = 0, ObjCliente.Ciudad.Trim, ObjCliente.Localidad.Trim)
|
||||||
ViewState("CliPais") = ObjCliente.Pais
|
ViewState("CliPais") = ObjCliente.Pais
|
||||||
ImprimeNombreSucursal = ObjCliente.ImprimeNombreSucursal
|
ImprimeNombreSucursal = ObjCliente.ImprimeNombreSucursal
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
||||||
|
RegimenFiscalCliente = ObjCliente.DtResultados(0)("CodigoRegimenFiscal").ToString()
|
||||||
|
CargaUsoCFDI()
|
||||||
|
End If
|
||||||
'ViewState("NumCtaPago") = ObjCliente.NumCtaPago
|
'ViewState("NumCtaPago") = ObjCliente.NumCtaPago
|
||||||
ViewState("ClienteDesglosaIEPS") = ObjCliente.DesglosaIEPS
|
ViewState("ClienteDesglosaIEPS") = ObjCliente.DesglosaIEPS
|
||||||
If Not ClienteDesglosaIEPS Then
|
If Not ClienteDesglosaIEPS Then
|
||||||
@@ -10092,8 +10137,8 @@ Partial Class Ventas
|
|||||||
'si es cancelacion, debe de conservar el folio actual
|
'si es cancelacion, debe de conservar el folio actual
|
||||||
If Not EsCancelacion Then ObjFactura.Folio = If(EstablecioFolio Or VistaPrevia Or (CveVenta > 0 And (NuevaFactura.Contiene(0, 2))), TxtFolio.Text.Trim.ToEntero(), -1)
|
If Not EsCancelacion Then ObjFactura.Folio = If(EstablecioFolio Or VistaPrevia Or (CveVenta > 0 And (NuevaFactura.Contiene(0, 2))), TxtFolio.Text.Trim.ToEntero(), -1)
|
||||||
|
|
||||||
'SI ES FACTURACION DE REMISION O COTIZACION NO TOMAR EL FOLIO QUE SE MUESTRA
|
'SI NO ESTABLECIO UN FOLIO FIJO Y SI ES FACTURACION DE REMISION O COTIZACION NO TOMAR EL FOLIO QUE SE MUESTRA
|
||||||
If Not EsCancelacion AndAlso ObjFactura.Folio > 0 AndAlso TipoDoctoViejo.Contiene("Rem", "Cot") Then
|
If Not EstablecioFolio AndAlso (Not EsCancelacion AndAlso ObjFactura.Folio > 0 AndAlso TipoDoctoViejo.Contiene("Rem", "Cot")) Then
|
||||||
ObjFactura.Folio = -1
|
ObjFactura.Folio = -1
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -19239,6 +19284,7 @@ Partial Class Ventas
|
|||||||
End Sub
|
End Sub
|
||||||
Protected Sub TxtFolio_TextChanged(sender As Object, e As System.EventArgs) Handles TxtFolio.TextChanged
|
Protected Sub TxtFolio_TextChanged(sender As Object, e As System.EventArgs) Handles TxtFolio.TextChanged
|
||||||
ViewState("EstablecioFolio") = True
|
ViewState("EstablecioFolio") = True
|
||||||
|
Alert("Se estableció el Folio Fijo para el nuevo documento.")
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub HabilitarFacturacionSucursal()
|
Private Sub HabilitarFacturacionSucursal()
|
||||||
trsucursalciente.Visible = True
|
trsucursalciente.Visible = True
|
||||||
@@ -20716,12 +20762,14 @@ Partial Class Ventas
|
|||||||
|
|
||||||
If Vigencia.EsCancelable = "Cancelable sin aceptación" Then
|
If Vigencia.EsCancelable = "Cancelable sin aceptación" Then
|
||||||
'script = "BtnRefacturacionConfirmarAceptacion();"
|
'script = "BtnRefacturacionConfirmarAceptacion();"
|
||||||
|
Me.CveEstadoCancelacion = 1
|
||||||
sb.AppendFormat("<b>{0}</b> <br/>", Vigencia.EsCancelable)
|
sb.AppendFormat("<b>{0}</b> <br/>", Vigencia.EsCancelable)
|
||||||
sb.Append("Está seguro de realizar la refacturación?.")
|
sb.Append("Está seguro de realizar la refacturación?.")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Vigencia.EsCancelable = "Cancelable con aceptación" OrElse String.IsNullOrEmpty(Vigencia.EsCancelable) Then
|
If Vigencia.EsCancelable = "Cancelable con aceptación" OrElse String.IsNullOrEmpty(Vigencia.EsCancelable) Then
|
||||||
'script = "BtnRefacturacionConfirmar();"
|
'script = "BtnRefacturacionConfirmar();"
|
||||||
|
Me.CveEstadoCancelacion = 2
|
||||||
sb.AppendFormat("<b>{0}</b> <br/>", "Cancelable con aceptación")
|
sb.AppendFormat("<b>{0}</b> <br/>", "Cancelable con aceptación")
|
||||||
sb.Append("Está seguro de cancelar el documento para realizar la refacturación?.")
|
sb.Append("Está seguro de cancelar el documento para realizar la refacturación?.")
|
||||||
End If
|
End If
|
||||||
@@ -23441,6 +23489,13 @@ Partial Class Ventas
|
|||||||
sb.Append("<b>No encontrado</b> <br/>")
|
sb.Append("<b>No encontrado</b> <br/>")
|
||||||
sb.Append("Está seguro de cancelar el documento?.")
|
sb.Append("Está seguro de cancelar el documento?.")
|
||||||
Else
|
Else
|
||||||
|
'GUARDA EL ESTADO DE CANCELACION
|
||||||
|
If Vigencia.EsCancelable.ToUpper() = "CANCELABLE CON ACEPTACIÓN" Then
|
||||||
|
Me.CveEstadoCancelacion = 2
|
||||||
|
ElseIf Vigencia.EsCancelable.ToUpper() = "CANCELABLE SIN ACEPTACIÓN" Then
|
||||||
|
Me.CveEstadoCancelacion = 1
|
||||||
|
End If
|
||||||
|
|
||||||
sb.AppendFormat("<b>{0}</b> <br/>", Vigencia.EsCancelable)
|
sb.AppendFormat("<b>{0}</b> <br/>", Vigencia.EsCancelable)
|
||||||
If Vigencia.EsCancelable.ToUpper() <> "NO CANCELABLE" Then
|
If Vigencia.EsCancelable.ToUpper() <> "NO CANCELABLE" Then
|
||||||
sb.Append("Está seguro de cancelar el documento?.")
|
sb.Append("Está seguro de cancelar el documento?.")
|
||||||
@@ -23628,7 +23683,7 @@ Partial Class Ventas
|
|||||||
'ObjE.AddEventoBitacora(msgBitacora, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVenta:=CveVenta)
|
'ObjE.AddEventoBitacora(msgBitacora, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVenta:=CveVenta)
|
||||||
'ObjE.Dispose()
|
'ObjE.Dispose()
|
||||||
|
|
||||||
resp = ObjFacturaCancelacion.CancelarPorRefacturacion(DdlMotivoRefacturacion.SelectedValue.ToEntero(), TxtMotivoRefac.Text.Trim())
|
resp = ObjFacturaCancelacion.CancelarPorRefacturacion(DdlMotivoRefacturacion.SelectedValue.ToEntero(), TxtMotivoRefac.Text.Trim(), CveEstadoCancelacion:=Me.CveEstadoCancelacion)
|
||||||
Else
|
Else
|
||||||
Dim ListaRemisionesCancelar As New List(Of Integer)
|
Dim ListaRemisionesCancelar As New List(Of Integer)
|
||||||
If ChkCanRem.Checked Then
|
If ChkCanRem.Checked Then
|
||||||
@@ -23641,7 +23696,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
ObjFacturaCancelacion.CveAlmacenDevolucion = CveAlmacenDevolucion
|
ObjFacturaCancelacion.CveAlmacenDevolucion = CveAlmacenDevolucion
|
||||||
|
|
||||||
resp = ObjFacturaCancelacion.CancelarFactura(ChkDevAlm.Checked, ListaRemisionesCancelar, CveMotivoCancelacion:=DdlMotivoCancelacion.SelectedValue.ToEntero(), Motivo:=TxtMotivoCancelacion.Text.Trim())
|
resp = ObjFacturaCancelacion.CancelarFactura(ChkDevAlm.Checked, ListaRemisionesCancelar, CveMotivoCancelacion:=DdlMotivoCancelacion.SelectedValue.ToEntero(), Motivo:=TxtMotivoCancelacion.Text.Trim(), CveEstadoCancelacion:=Me.CveEstadoCancelacion)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
SWatch.Stop()
|
SWatch.Stop()
|
||||||
@@ -30543,7 +30598,11 @@ Partial Class Ventas
|
|||||||
|
|
||||||
BtnEmitirImprimir.Text = "Facturar"
|
BtnEmitirImprimir.Text = "Facturar"
|
||||||
DdlTipoComprobante.SelectedValue = "Ing"
|
DdlTipoComprobante.SelectedValue = "Ing"
|
||||||
|
|
||||||
|
If Not (EstablecioFolio AndAlso UsuarioActual.TienePermisoProceso(130)) Then
|
||||||
TxtFecha.Text = Now.ToShortDateString()
|
TxtFecha.Text = Now.ToShortDateString()
|
||||||
|
End If
|
||||||
|
|
||||||
UpPS.Update()
|
UpPS.Update()
|
||||||
UpFacturar.Update()
|
UpFacturar.Update()
|
||||||
|
|
||||||
@@ -31261,7 +31320,9 @@ Partial Class Ventas
|
|||||||
|
|
||||||
Dim TipoDoctoViejo As String = DdlTipoComprobante.SelectedValue
|
Dim TipoDoctoViejo As String = DdlTipoComprobante.SelectedValue
|
||||||
DdlTipoComprobante.SelectedValue = TipoDoctoNuevo
|
DdlTipoComprobante.SelectedValue = TipoDoctoNuevo
|
||||||
|
If Not (EstablecioFolio AndAlso UsuarioActual.TienePermisoProceso(130)) Then
|
||||||
TxtFecha.Text = Now.ToString()
|
TxtFecha.Text = Now.ToString()
|
||||||
|
End If
|
||||||
TxtFechaPago.Text = If(TipoDoctoViejo = "Rem" AndAlso EsDiasCreditoFijo, Now.AddDays(DiasCredito), If(DdlTipoComprobante.SelectedValue = "Rem", Now.AddDays(PlazoCobranzaRemision), Now.AddDays(PlazoCobranza))).ToShortDateString
|
TxtFechaPago.Text = If(TipoDoctoViejo = "Rem" AndAlso EsDiasCreditoFijo, Now.AddDays(DiasCredito), If(DdlTipoComprobante.SelectedValue = "Rem", Now.AddDays(PlazoCobranzaRemision), Now.AddDays(PlazoCobranza))).ToShortDateString
|
||||||
TxtFechaEjecucion.Text = Now.ToString()
|
TxtFechaEjecucion.Text = Now.ToString()
|
||||||
|
|
||||||
|
|||||||
@@ -412,6 +412,8 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user