Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
3083
AC/Reportes/NoIncluir.rdlc
Normal file
3083
AC/Reportes/NoIncluir.rdlc
Normal file
File diff suppressed because it is too large
Load Diff
@@ -789,7 +789,6 @@ Public Class ClsContabilidad
|
|||||||
#Region " C O N T A B I L I D A D - P R E P O L I Z A - D E T A L L E "
|
#Region " C O N T A B I L I D A D - P R E P O L I Z A - D E T A L L E "
|
||||||
|
|
||||||
Public Function GetPlantillaConceptos(CveEmpresa As Integer, CvePlantillaPoliza As Integer) As Boolean
|
Public Function GetPlantillaConceptos(CveEmpresa As Integer, CvePlantillaPoliza As Integer) As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Conta_GetPlantilla")
|
DataAdapter("PA_Conta_GetPlantilla")
|
||||||
@@ -812,7 +811,6 @@ Public Class ClsContabilidad
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function GetPrePolizaOriginal(TipoMovimiento As Integer, CveMovimiento As Integer) As Boolean 'Editado por charlie
|
Public Function GetPrePolizaOriginal(TipoMovimiento As Integer, CveMovimiento As Integer) As Boolean 'Editado por charlie
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Conta_GetPrePolizaOriginal")
|
DataAdapter("PA_Conta_GetPrePolizaOriginal")
|
||||||
@@ -835,7 +833,6 @@ Public Class ClsContabilidad
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function PrePolizaUnificacion(CvePrePoliza As Integer, CvePrePolizaVieja As Integer) As Boolean 'Editado por charlie
|
Public Function PrePolizaUnificacion(CvePrePoliza As Integer, CvePrePolizaVieja As Integer) As Boolean 'Editado por charlie
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
SeUnifico = False
|
SeUnifico = False
|
||||||
@@ -873,9 +870,7 @@ Public Class ClsContabilidad
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function PrePolizaSimplificacion(CvePrePoliza As Integer, CveEmpresa As Integer) As Boolean
|
Public Function PrePolizaSimplificacion(CvePrePoliza As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Conta_PrePolizasSimplificacion")
|
DataAdapter("PA_Conta_PrePolizasSimplificacion")
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
@@ -896,7 +891,6 @@ Public Class ClsContabilidad
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function GetCuentaPrePoliza(Concepto As Integer, CveEmpresa As Integer, CvePlantillaPoliza As Integer) As Boolean
|
Public Function GetCuentaPrePoliza(Concepto As Integer, CveEmpresa As Integer, CvePlantillaPoliza As Integer) As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Conta_IdCuentaPrePolizaGet")
|
DataAdapter("PA_Conta_IdCuentaPrePolizaGet")
|
||||||
@@ -920,7 +914,6 @@ Public Class ClsContabilidad
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function GetRetCuenta(Concepto As Integer, CveGeneral As Integer, Optional CveSubProyecto As Integer = -1) As Boolean
|
Public Function GetRetCuenta(Concepto As Integer, CveGeneral As Integer, Optional CveSubProyecto As Integer = -1) As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Conta_RetCuentaGet")
|
DataAdapter("PA_Conta_RetCuentaGet")
|
||||||
@@ -1233,7 +1226,6 @@ Public Class ClsContabilidad
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function UpdatePrePolizasDetalleBloquear(CvePrePoliza As Integer, Bloquear As Boolean) As Boolean
|
Public Function UpdatePrePolizasDetalleBloquear(CvePrePoliza As Integer, Bloquear As Boolean) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Conta_PrePolizasDetalleBloquearUpdate")
|
DataAdapter("PA_Conta_PrePolizasDetalleBloquearUpdate")
|
||||||
@@ -1572,7 +1564,6 @@ Public Class ClsContabilidad
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function GetCuentaDobleConta(IdCtaContable As Integer, CveEmpresa As Integer) As Boolean
|
Public Function GetCuentaDobleConta(IdCtaContable As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Conta_CuentaDobleContaGet")
|
DataAdapter("PA_Conta_CuentaDobleContaGet")
|
||||||
@@ -1613,7 +1604,6 @@ Public Class ClsContabilidad
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function GetEncabezadoPrePoliza(CvePrePoliza As Integer, CveEmpresa As Integer) As Boolean
|
Public Function GetEncabezadoPrePoliza(CvePrePoliza As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Conta_PrePolizaEncabezadoGet")
|
DataAdapter("PA_Conta_PrePolizaEncabezadoGet")
|
||||||
@@ -1654,7 +1644,6 @@ Public Class ClsContabilidad
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function GetCausacionesValores(CvePrePoliza As Integer) As Boolean 'Editado por charlie
|
Public Function GetCausacionesValores(CvePrePoliza As Integer) As Boolean 'Editado por charlie
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Conta_CausacionesValoresGet")
|
DataAdapter("PA_Conta_CausacionesValoresGet")
|
||||||
@@ -3766,7 +3755,7 @@ Public Class ClsContabilidad
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
Public Function GetAnexoCatalogo(IdCuenta As Integer, FechaI As Date, FechaF As Date, OpcionCuentas As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Optional TipoMovtos As Integer = -1, Optional SAT As Integer = 0) As Boolean
|
Public Function GetAnexoCatalogo(CveCuenta As Integer, FechaI As Date, FechaF As Date, OpcionCuentas As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Optional TipoMovtos As Integer = -1, Optional SAT As Integer = 0) As Boolean
|
||||||
Dim Retorno = False
|
Dim Retorno = False
|
||||||
|
|
||||||
DataAdapter("PA_Conta_AnexoCatalogoGet")
|
DataAdapter("PA_Conta_AnexoCatalogoGet")
|
||||||
@@ -3774,7 +3763,7 @@ Public Class ClsContabilidad
|
|||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
||||||
.Add("@FechaF", SqlDbType.Date).Value = FechaF
|
.Add("@FechaF", SqlDbType.Date).Value = FechaF
|
||||||
.Add("@IdCuentaPadre", SqlDbType.Int).Value = IdCuenta
|
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
|
||||||
.Add("@Tipo", SqlDbType.Int).Value = TipoMovtos
|
.Add("@Tipo", SqlDbType.Int).Value = TipoMovtos
|
||||||
.Add("@OpcionCuentas", SqlDbType.Int).Value = OpcionCuentas
|
.Add("@OpcionCuentas", SqlDbType.Int).Value = OpcionCuentas
|
||||||
.Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto
|
.Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto
|
||||||
@@ -3793,8 +3782,7 @@ Public Class ClsContabilidad
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Function GetMovimientosAuxiliaresCatalogo(CveCuenta As Integer, FechaI As Date, FechaF As Date, CveMoneda As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, TipoReporte As String, OpcionCuentas As Integer) As Boolean
|
||||||
Public Function GetMovimientosAuxiliaresCatalogo(IdCuenta As Integer, FechaI As Date, FechaF As Date, CveMoneda As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, TipoReporte As String, OpcionCuentas As Integer) As Boolean
|
|
||||||
Dim Retorno = False
|
Dim Retorno = False
|
||||||
|
|
||||||
DataAdapter("PA_Conta_MovimientosAuxiliaresCatalogoGet")
|
DataAdapter("PA_Conta_MovimientosAuxiliaresCatalogoGet")
|
||||||
@@ -3802,7 +3790,7 @@ Public Class ClsContabilidad
|
|||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
||||||
.Add("@FechaF", SqlDbType.Date).Value = FechaF
|
.Add("@FechaF", SqlDbType.Date).Value = FechaF
|
||||||
.Add("@IdCuentaPadre", SqlDbType.Int).Value = IdCuenta
|
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
|
||||||
.Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto
|
.Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto
|
||||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
@@ -3841,7 +3829,6 @@ Public Class ClsContabilidad
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
'Public Function GetEstadoActividades(FechaI As Date, FechaF As Date, TipoMovtos As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Optional SAT As Integer = 0) As Boolean
|
|
||||||
Public Function GetEstadoActividades(FechaI As Date, FechaF As Date, TipoMovtos As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Optional SAT As Integer = 0, Optional Opcion As Integer = 1) As Boolean
|
Public Function GetEstadoActividades(FechaI As Date, FechaF As Date, TipoMovtos As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Optional SAT As Integer = 0, Optional Opcion As Integer = 1) As Boolean
|
||||||
Dim Retorno = False
|
Dim Retorno = False
|
||||||
|
|
||||||
@@ -3947,7 +3934,6 @@ Public Class ClsContabilidad
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
Public Function GetFlujoEfectivo2(FechaF As Date, Tipo As Integer, CveEmpresa As Integer) As Boolean
|
Public Function GetFlujoEfectivo2(FechaF As Date, Tipo As Integer, CveEmpresa As Integer) As Boolean
|
||||||
Dim Retorno = False
|
Dim Retorno = False
|
||||||
|
|
||||||
@@ -3969,7 +3955,6 @@ Public Class ClsContabilidad
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function GetOrigenAplicacion(FechaI As String, FechaF As String, TipoReporte As Integer, CveSubProyecto As String, CveEmpresa As Integer) As Boolean
|
Public Function GetOrigenAplicacion(FechaI As String, FechaF As String, TipoReporte As Integer, CveSubProyecto As String, CveEmpresa As Integer) As Boolean
|
||||||
Dim Retorno = False
|
Dim Retorno = False
|
||||||
|
|
||||||
@@ -4482,20 +4467,19 @@ Public Class ClsContabilidad
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function GetAnexoCatalagoCC(CveCuenta As Integer, Ejercicio As Integer, CveSubproyecto As Integer, CveEmpresa As Integer, Divisor As Integer, Periodo As Integer, CveUsuario As Integer) As Boolean
|
Public Function GetAnexoCatalagoCC(CveCuenta As Integer, FechaI As Date, FechaF As Date, CveSubProyecto As Integer, CveEmpresa As Integer, Divisor As Integer, CveUsuario As Integer) As Boolean
|
||||||
Dim Retorno = False
|
Dim Retorno = False
|
||||||
|
|
||||||
DataAdapter("PA_Conta_AnexoCatalogoCCGet")
|
DataAdapter("PA_Conta_AnexoCatalogoCCGet")
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
|
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
|
||||||
.Add("@Ejercicio", SqlDbType.Int).Value = Ejercicio
|
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
||||||
.Add("@CveSubproyecto", SqlDbType.Int).Value = CveSubproyecto
|
.Add("@FechaF", SqlDbType.Date).Value = FechaF
|
||||||
|
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
.Add("@Divisor", SqlDbType.Int).Value = Divisor
|
.Add("@Divisor", SqlDbType.Int).Value = Divisor
|
||||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
.Add("@Periodo", SqlDbType.Int).Value = Periodo
|
|
||||||
|
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
@@ -4936,25 +4920,6 @@ Public Class ClsContabilidad
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
'Public Function GetSaldoCuenta(IdCuenta As Integer, TipoMovto As Integer, Ejercicio As Integer) As Boolean
|
|
||||||
' Dim Retorno As Boolean
|
|
||||||
|
|
||||||
' If TipoMovto = 0 Then
|
|
||||||
' DataAdapter(String.Format("SELECT SUM(CASE WHEN TipoMovto = 1 THEN -1 ELSE 1 END * Importe) AS Saldo from Conta_PolizasDetalle CD inner join Conta_Polizas CP on CP.CvePoliza=CD.CvePoliza and year(CP.Fecha)={1} WHERE CveCuenta = {0}", IdCuenta, Ejercicio), CommandType.Text)
|
|
||||||
' Else
|
|
||||||
' DataAdapter(String.Format("SELECT SUM(CASE WHEN TipoMovto = 0 THEN -1 ELSE 1 END * Importe) AS Saldo from Conta_PolizasDetalle CD inner join Conta_Polizas CP on CP.CvePoliza=CD.CvePoliza and year(CP.Fecha)={1} WHERE CveCuenta = {0} ", IdCuenta, Ejercicio), CommandType.Text)
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' Try
|
|
||||||
' SqlAdapter.Fill(Data)
|
|
||||||
' 'Retorno = Math.Round(SqlCommand.ExecuteScalar.ToString.ToDouble, 2)
|
|
||||||
' Retorno = True
|
|
||||||
' Catch ex As Exception
|
|
||||||
' Me.OnError("Ocurrió un error al obtener eL saldo de la cuenta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
|
||||||
' End Try
|
|
||||||
|
|
||||||
' Return Retorno
|
|
||||||
'End Function
|
|
||||||
Public Function GetRepPresupuestosEgresosSaldos(Ejercicio As Integer, Fecha As Date, Capitulo As String, CveClasificacion As Integer, CveFuenteFinanciamiento As Integer, CveProgramaOperativo As Integer, CveUnidadAdministrativa As Integer, CveTipoGasto As Integer, Gpo As Integer, CveEmpresa As Integer) As Boolean
|
Public Function GetRepPresupuestosEgresosSaldos(Ejercicio As Integer, Fecha As Date, Capitulo As String, CveClasificacion As Integer, CveFuenteFinanciamiento As Integer, CveProgramaOperativo As Integer, CveUnidadAdministrativa As Integer, CveTipoGasto As Integer, Gpo As Integer, CveEmpresa As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_PresupuestosEgresosSaldosRep")
|
DataAdapter("PA_PresupuestosEgresosSaldosRep")
|
||||||
@@ -5603,7 +5568,7 @@ Public Class ClsContabilidad
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "A N E X O - D E L - C A T A L O G O"
|
#Region "A N E X O - D E L - C A T A L O G O"
|
||||||
Public Function GetAnexoCatalogo(IdCuenta As Integer, FechaI As Date, FechaF As Date, OpcionCuentas As Integer, CveEmpresa As Integer, Optional TipoMovtos As Integer = -1) As Boolean
|
Public Function GetAnexoCatalogo(CveCuenta As Integer, FechaI As Date, FechaF As Date, OpcionCuentas As Integer, CveEmpresa As Integer, Optional TipoMovtos As Integer = -1) As Boolean
|
||||||
Dim Retorno = False
|
Dim Retorno = False
|
||||||
|
|
||||||
DataAdapter("PA_Conta_AnexoCatalogo")
|
DataAdapter("PA_Conta_AnexoCatalogo")
|
||||||
@@ -5611,7 +5576,7 @@ Public Class ClsContabilidad
|
|||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
||||||
.Add("@FechaF", SqlDbType.Date).Value = FechaF
|
.Add("@FechaF", SqlDbType.Date).Value = FechaF
|
||||||
.Add("@IdCuentaPadre", SqlDbType.Int).Value = IdCuenta
|
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
|
||||||
.Add("@OpcionCuentas", SqlDbType.Int).Value = OpcionCuentas
|
.Add("@OpcionCuentas", SqlDbType.Int).Value = OpcionCuentas
|
||||||
.Add("@Tipo", SqlDbType.Int).Value = TipoMovtos
|
.Add("@Tipo", SqlDbType.Int).Value = TipoMovtos
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
@@ -5627,7 +5592,7 @@ Public Class ClsContabilidad
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function GetMovimientosAuxiliaresCatalogo(IdCuenta As Integer, FechaI As Date, FechaF As Date, CveMoneda As Integer, CveEmpresa As Integer) As Boolean
|
Public Function GetMovimientosAuxiliaresCatalogo(CveCuenta As Integer, FechaI As Date, FechaF As Date, CveMoneda As Integer, CveEmpresa As Integer) As Boolean
|
||||||
Dim Retorno = False
|
Dim Retorno = False
|
||||||
|
|
||||||
DataAdapter("PA_Conta_AuxiliarCatalogo")
|
DataAdapter("PA_Conta_AuxiliarCatalogo")
|
||||||
@@ -5635,7 +5600,7 @@ Public Class ClsContabilidad
|
|||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
||||||
.Add("@FechaF", SqlDbType.Date).Value = FechaF
|
.Add("@FechaF", SqlDbType.Date).Value = FechaF
|
||||||
.Add("@IdCuentaPadre", SqlDbType.Int).Value = IdCuenta
|
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
|
||||||
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
|
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
End With
|
End With
|
||||||
@@ -5677,12 +5642,12 @@ Public Class ClsContabilidad
|
|||||||
End Function
|
End Function
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Public Function AddSiguienteCuentaHijo(IdCuentaPadre As Integer, NombreCuenta As String, CveEmpresa As Integer, Optional Tipo As String = "A", Optional CuentaMayor As Integer = 2, Optional IdMoneda As Integer = 1, Optional IdAgrupadorSAT As Integer = -1) As Integer
|
Public Function AddSiguienteCuentaHijo(CveCuentaPadre As Integer, NombreCuenta As String, CveEmpresa As Integer, Optional Tipo As String = "A", Optional CuentaMayor As Integer = 2, Optional IdMoneda As Integer = 1, Optional IdAgrupadorSAT As Integer = -1) As Integer
|
||||||
Dim CodigoCuenta As New StringBuilder
|
Dim CodigoCuenta As New StringBuilder
|
||||||
Dim Retorno As Integer = -1
|
Dim Retorno As Integer = -1
|
||||||
Dim Segmentos() As String = Nothing
|
Dim Segmentos() As String = Nothing
|
||||||
|
|
||||||
If GetCuentas(-1, "-1", -1, CveEmpresa, CvePadre:=IdCuentaPadre) Then
|
If GetCuentas(-1, "-1", -1, CveEmpresa, CvePadre:=CveCuentaPadre) Then
|
||||||
|
|
||||||
If DtResultados.Rows.Count > 0 Then
|
If DtResultados.Rows.Count > 0 Then
|
||||||
'Cuando ya tiene cuentas hijas
|
'Cuando ya tiene cuentas hijas
|
||||||
@@ -5699,7 +5664,7 @@ Public Class ClsContabilidad
|
|||||||
Else
|
Else
|
||||||
'Cuando es el primero hijo de la cuenta
|
'Cuando es el primero hijo de la cuenta
|
||||||
'obtengo el codigo del padre
|
'obtengo el codigo del padre
|
||||||
If GetCuentas(IdCuentaPadre, "-1", -1, CveEmpresa) Then
|
If GetCuentas(CveCuentaPadre, "-1", -1, CveEmpresa) Then
|
||||||
Segmentos = Split(DtResultados.MAX("CuentaFormato"), "-")
|
Segmentos = Split(DtResultados.MAX("CuentaFormato"), "-")
|
||||||
'recorro para poner el primer digito en el siguiente segmento al que halla tenido valor > 0
|
'recorro para poner el primer digito en el siguiente segmento al que halla tenido valor > 0
|
||||||
For i As Integer = 0 To Segmentos.Length - 1 Step 1
|
For i As Integer = 0 To Segmentos.Length - 1 Step 1
|
||||||
@@ -5718,7 +5683,7 @@ Public Class ClsContabilidad
|
|||||||
CodigoCuenta.Append(Segmentos(i)) 'une tokens
|
CodigoCuenta.Append(Segmentos(i)) 'une tokens
|
||||||
Next
|
Next
|
||||||
|
|
||||||
Retorno = AddCuenta(IdCuentaPadre, CodigoCuenta.ToString, NombreCuenta, Tipo, CuentaMayor, 0, IdMoneda, CveAgrupadorSAT:=IdAgrupadorSAT)
|
Retorno = AddCuenta(CveCuentaPadre, CodigoCuenta.ToString, NombreCuenta, Tipo, CuentaMayor, 0, IdMoneda, CveAgrupadorSAT:=IdAgrupadorSAT)
|
||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
@@ -6678,32 +6643,6 @@ Public Class ClsContabilidad
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Public Function GetAnexoCatalogoMensualHorizontal(IdCuenta As Integer, FechaI As Date, FechaF As Date, OpcionCuentas As Integer, CveSubProyecto As String, CveEmpresa As Integer, Optional TipoMovtos As Integer = -1, Optional SAT As Integer = 0) As Boolean
|
|
||||||
Dim Retorno = False
|
|
||||||
|
|
||||||
DataAdapter("PA_Conta2_AnexoCatalogoMensualHorizontalGet")
|
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
|
||||||
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
|
||||||
.Add("@FechaF", SqlDbType.Date).Value = FechaF
|
|
||||||
.Add("@IdCuentaPadre", SqlDbType.Int).Value = IdCuenta
|
|
||||||
.Add("@Tipo", SqlDbType.Int).Value = TipoMovtos
|
|
||||||
.Add("@OpcionCuentas", SqlDbType.Int).Value = OpcionCuentas
|
|
||||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
|
||||||
.Add("@SAT", SqlDbType.Int).Value = SAT
|
|
||||||
End With
|
|
||||||
|
|
||||||
Try
|
|
||||||
SqlAdapter.Fill(Data)
|
|
||||||
Retorno = True
|
|
||||||
Catch ex As Exception
|
|
||||||
Me.OnError("Ocurrió un error al obtener el Anexo del Catalogo", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
|
||||||
End Try
|
|
||||||
|
|
||||||
Return Retorno
|
|
||||||
End Function
|
|
||||||
|
|
||||||
|
|
||||||
Public Function GetEstadosAnualHorizontal(FechaI As Date, FechaF As Date, CveProyecto As Integer, CveSubProyecto As Integer, Divisor As Integer, CveEmpresa As Integer, CveUsuario As Integer, Optional Tipo As Integer = 1, Optional Periodo As Integer = 12) As Boolean
|
Public Function GetEstadosAnualHorizontal(FechaI As Date, FechaF As Date, CveProyecto As Integer, CveSubProyecto As Integer, Divisor As Integer, CveEmpresa As Integer, CveUsuario As Integer, Optional Tipo As Integer = 1, Optional Periodo As Integer = 12) As Boolean
|
||||||
Dim Retorno = False
|
Dim Retorno = False
|
||||||
|
|||||||
@@ -116,23 +116,6 @@ Public Class ClsMovimientos
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#Region "CxC"
|
#Region "CxC"
|
||||||
'Public Function GetCxCCliente(CveCliente As Integer) As Boolean
|
|
||||||
' Dim Retorno As Boolean = False
|
|
||||||
' 'Data = New DataTable
|
|
||||||
' 'SqlAdapter = New SqlDataAdapter("PA_ClienteCxC", SqlConexion)
|
|
||||||
' 'SqlAdapter.SelectCommand.CommandType = CommandType.StoredProcedure
|
|
||||||
' DataAdapter("PA_ClienteCxC")
|
|
||||||
' SqlAdapter.SelectCommand.Parameters.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
|
||||||
|
|
||||||
' Try
|
|
||||||
' SqlAdapter.Fill(Data)
|
|
||||||
' Retorno = True
|
|
||||||
' Catch ex As SqlException
|
|
||||||
' OnError("Ocurrió un error al consultar las CxC del Cliente.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
|
||||||
' End Try
|
|
||||||
|
|
||||||
' Return Retorno
|
|
||||||
'End Function
|
|
||||||
|
|
||||||
Public Function GetCxCClienteDetalle(CveCliente As Integer, FechaI As String, FechaF As String, CveMoneda As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, CveClienteSucursal As Integer, Optional TipoDocto As String = "-1", Optional FechaCorte As Date = MaxFecha, Optional FechaVencimientoI As Date = MinFecha, Optional FechaVencimientoF As Date = MaxFecha) As Boolean
|
Public Function GetCxCClienteDetalle(CveCliente As Integer, FechaI As String, FechaF As String, CveMoneda As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, CveClienteSucursal As Integer, Optional TipoDocto As String = "-1", Optional FechaCorte As Date = MaxFecha, Optional FechaVencimientoI As Date = MinFecha, Optional FechaVencimientoF As Date = MaxFecha) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|||||||
@@ -333,13 +333,14 @@ Public Class ClsRH
|
|||||||
|
|
||||||
Public Function AddAsistenciasInasistencias(Tipo As String, AplicaFalta As Boolean, AplicaAsistencia As Boolean, CveUsuario As Integer, CveEmpresa As Integer,
|
Public Function AddAsistenciasInasistencias(Tipo As String, AplicaFalta As Boolean, AplicaAsistencia As Boolean, CveUsuario As Integer, CveEmpresa As Integer,
|
||||||
chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo As Boolean, chkAplicaAguinaldo As Boolean,
|
chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo As Boolean, chkAplicaAguinaldo As Boolean,
|
||||||
chkAplicaUtilidades As Boolean, aplicaPago As Integer, aplicaPagoDoble As Integer, aplicaPrimaVac As Integer) As Boolean
|
chkAplicaUtilidades As Boolean, aplicaPago As Integer, aplicaPagoDoble As Integer, aplicaPrimaVac As Integer, Optional TipoCorto As String = "-1") As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_RH_AsistenciasInasistenciasAdd")
|
DataAdapter("PA_RH_AsistenciasInasistenciasAdd")
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@Tipo", SqlDbType.VarChar).Value = Tipo
|
.Add("@Tipo", SqlDbType.VarChar).Value = Tipo
|
||||||
|
.Add("@TipoCorto", SqlDbType.VarChar).Value = TipoCorto
|
||||||
.Add("@AplicaFalta", SqlDbType.Bit).Value = AplicaFalta
|
.Add("@AplicaFalta", SqlDbType.Bit).Value = AplicaFalta
|
||||||
.Add("@AplicaAsistencia", SqlDbType.Bit).Value = AplicaAsistencia
|
.Add("@AplicaAsistencia", SqlDbType.Bit).Value = AplicaAsistencia
|
||||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
@@ -374,13 +375,14 @@ Public Class ClsRH
|
|||||||
|
|
||||||
Public Function UpdateAsistenciasInasistencias(Tipo As String, AplicaFalta As Boolean, AplicaAsistencia As Boolean, Estatus As Boolean, CveAI As Integer,
|
Public Function UpdateAsistenciasInasistencias(Tipo As String, AplicaFalta As Boolean, AplicaAsistencia As Boolean, Estatus As Boolean, CveAI As Integer,
|
||||||
chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo As Boolean, chkAplicaAguinaldo As Boolean, chkAplicaUtilidades As Boolean,
|
chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo As Boolean, chkAplicaAguinaldo As Boolean, chkAplicaUtilidades As Boolean,
|
||||||
aplicaPago As Integer, aplicaPagoDoble As Integer, aplicaPrimaVac As Integer) As Boolean
|
aplicaPago As Integer, aplicaPagoDoble As Integer, aplicaPrimaVac As Integer, Optional TipoCorto As String = "-1") As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_RH_AsistenciasInasistenciasUpdate")
|
DataAdapter("PA_RH_AsistenciasInasistenciasUpdate")
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@Tipo", SqlDbType.VarChar).Value = Tipo
|
.Add("@Tipo", SqlDbType.VarChar).Value = Tipo
|
||||||
|
.Add("@TipoCorto", SqlDbType.VarChar).Value = TipoCorto
|
||||||
.Add("@AplicaFalta", SqlDbType.Bit).Value = AplicaFalta
|
.Add("@AplicaFalta", SqlDbType.Bit).Value = AplicaFalta
|
||||||
.Add("@AplicaAsistencia", SqlDbType.Bit).Value = AplicaAsistencia
|
.Add("@AplicaAsistencia", SqlDbType.Bit).Value = AplicaAsistencia
|
||||||
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
||||||
|
|||||||
@@ -5016,10 +5016,14 @@ Partial Class Bancos_IE
|
|||||||
|
|
||||||
If ObjIE.UpdateComprobanteIE(Comprobante.Replace("."c, ""), CveIE) Then
|
If ObjIE.UpdateComprobanteIE(Comprobante.Replace("."c, ""), CveIE) Then
|
||||||
Alert("El Comprobante se guardo exitosamente.", TipoMensaje.MsgInformacion)
|
Alert("El Comprobante se guardo exitosamente.", TipoMensaje.MsgInformacion)
|
||||||
|
HplComprobante.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta($"OP=IEComprobante&Comprobante={CveIE}.{Comprobante}"))
|
||||||
|
UpDatos.Update()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ObjIE.Dispose()
|
ObjIE.Dispose()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|||||||
@@ -98,18 +98,36 @@
|
|||||||
|
|
||||||
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="portlet solid grey-cascade portlet-filter" style="">
|
<div class="portlet solid grey-cascade portlet-filter" style="" id="porletBusqueda">
|
||||||
<div class="portlet-title portlet-filterT" style="">
|
<div class="portlet-title portlet-filterT smalltitle" >
|
||||||
<div class="titlefiltros caption ">
|
|
||||||
<ul class="list-inline text-size-12">
|
<div class="tools">
|
||||||
<li>Folio:
|
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" Width="95px" />
|
||||||
<asp:TextBox ID="TxtFolio" runat="server" MaxLength="50" Width="70px"></asp:TextBox>
|
<a href="javascript:;" class="expand"></a>
|
||||||
</li>
|
</div>
|
||||||
<li>Proveedor:
|
|
||||||
<asp:TextBox ID="TxtProveedor" runat="server" MaxLength="50" Width="110px"></asp:TextBox>
|
<div class="titlefiltros ">
|
||||||
</li>
|
|
||||||
<li>Fecha I.:
|
<div class="row" style="padding-top: 10px;">
|
||||||
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy" style="display: inline-block;">
|
<div class="col-md-1 input-sm truncate" style="text-align:right" >
|
||||||
|
Folio:
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1">
|
||||||
|
<asp:TextBox ID="TxtFolio" runat="server" MaxLength="50" CssClass="form-control input-sm"></asp:TextBox>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-1 input-sm truncate" style="text-align:right" >
|
||||||
|
Proveedor:
|
||||||
|
</div>
|
||||||
|
<div class="col-md-2 ">
|
||||||
|
<asp:TextBox ID="TxtProveedor" runat="server" MaxLength="50" CssClass="form-control input-sm"></asp:TextBox>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-1 input-sm truncate" style="text-align:right" >
|
||||||
|
Fecha I.:
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1">
|
||||||
|
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy" style="display: inline-block;margin-top:-7px">
|
||||||
<asp:TextBox ID="txtFechaI" runat="server" CssClass="form-control input-sm" CausesValidation="true" MaxLength="10" Width="82px "></asp:TextBox>
|
<asp:TextBox ID="txtFechaI" runat="server" CssClass="form-control input-sm" CausesValidation="true" MaxLength="10" Width="82px "></asp:TextBox>
|
||||||
<span class="input-group-btn ">
|
<span class="input-group-btn ">
|
||||||
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
@@ -121,9 +139,13 @@
|
|||||||
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
</li>
|
</div>
|
||||||
<li>Fecha F.:
|
|
||||||
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy" style="display: inline-block;">
|
<div class="col-md-1 input-sm truncate" style="text-align:right" >
|
||||||
|
Fecha F.:
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1">
|
||||||
|
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy" style="display: inline-block;margin-top:-7px"">
|
||||||
<asp:TextBox ID="txtFechaF" runat="server" CssClass="form-control input-sm" CausesValidation="true" MaxLength="10" Width="82px "></asp:TextBox>
|
<asp:TextBox ID="txtFechaF" runat="server" CssClass="form-control input-sm" CausesValidation="true" MaxLength="10" Width="82px "></asp:TextBox>
|
||||||
<span class="input-group-btn ">
|
<span class="input-group-btn ">
|
||||||
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
@@ -135,9 +157,13 @@
|
|||||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
</li>
|
</div>
|
||||||
<li>Estatus:
|
|
||||||
<asp:DropDownList ID="DdlValidado" runat="server" Width="100px" Class="table-group-action-input form-control input-inline input-small input-sm">
|
<div class="col-md-1 input-sm truncate" style="text-align:right" >
|
||||||
|
Estatus:
|
||||||
|
</div>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<asp:DropDownList ID="DdlValidado" runat="server" Width="100px" Class="select2me input-sm">
|
||||||
<asp:ListItem Text="No Registradas - Todas" Value="-2" Selected="True"></asp:ListItem>
|
<asp:ListItem Text="No Registradas - Todas" Value="-2" Selected="True"></asp:ListItem>
|
||||||
<asp:ListItem Text="No Registradas - Por validar" Value="0"></asp:ListItem>
|
<asp:ListItem Text="No Registradas - Por validar" Value="0"></asp:ListItem>
|
||||||
<asp:ListItem Text="No Registradas - Validadas" Value="1"></asp:ListItem>
|
<asp:ListItem Text="No Registradas - Validadas" Value="1"></asp:ListItem>
|
||||||
@@ -147,40 +173,61 @@
|
|||||||
<asp:ListItem Text="Omitidas" Value="5"></asp:ListItem>
|
<asp:ListItem Text="Omitidas" Value="5"></asp:ListItem>
|
||||||
<asp:ListItem Text="Todas" Value="-1"></asp:ListItem>
|
<asp:ListItem Text="Todas" Value="-1"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</li>
|
</div>
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="tools">
|
|
||||||
|
|
||||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
|
|
||||||
<a href="javascript:;" class="expand"></a>
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-body" style="display: none;">
|
<div class="portlet-body" style="display: none;">
|
||||||
<ul class="list-inline">
|
|
||||||
<li>Responsable:
|
<div class="row">
|
||||||
<asp:DropDownList ID="DdlResponsable" runat="server" DataTextField="Nombre" DataValueField="CveUsuario" MaxLength="50" Class="table-group-action-input form-control input-inline input-small input-sm"></asp:DropDownList>
|
<div class="col-md-1 input-sm truncate" style="text-align:right" >
|
||||||
</li>
|
Responsable:
|
||||||
<li>Clasificación:
|
</div>
|
||||||
<asp:DropDownList ID="DdlClasificacionProv" runat="server" DataTextField="ProveedorClasificacion" DataValueField="CveProveedorClasificacion" MaxLength="50" Class="table-group-action-input form-control input-inline input-small input-sm"></asp:DropDownList>
|
<div class="col-md-1">
|
||||||
</li>
|
<asp:DropDownList ID="DdlResponsable" runat="server" DataTextField="Nombre" DataValueField="CveUsuario" Width="100%"
|
||||||
<li>Tipo Prov:
|
Class="form-control select2me input-sm"></asp:DropDownList>
|
||||||
<asp:DropDownList ID="DdlCveTipoProveedor" runat="server" CssClass="form-control select2me input-sm" Width="150px">
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-1 input-sm truncate" style="text-align:right" >
|
||||||
|
Clasificación:
|
||||||
|
</div>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<asp:DropDownList ID="DdlClasificacionProv" runat="server" DataTextField="ProveedorClasificacion" DataValueField="CveProveedorClasificacion" Width="100%"
|
||||||
|
Class="form-control select2me input-sm"></asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-1 input-sm truncate" style="text-align:right" >
|
||||||
|
Tipo Prov:
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1">
|
||||||
|
<asp:DropDownList ID="DdlCveTipoProveedor" runat="server" CssClass="form-control select2me input-sm" Width="100%">
|
||||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||||
<asp:ListItem Selected="False" Text="Proveedor" Value="1"></asp:ListItem>
|
<asp:ListItem Selected="False" Text="Proveedor" Value="1"></asp:ListItem>
|
||||||
<asp:ListItem Selected="False" Text="Acreedor" Value="2"></asp:ListItem>
|
<asp:ListItem Selected="False" Text="Acreedor" Value="2"></asp:ListItem>
|
||||||
<asp:ListItem Selected="False" Text="Ambos" Value="3"></asp:ListItem>
|
<asp:ListItem Selected="False" Text="Ambos" Value="3"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</li>
|
</div>
|
||||||
<li>Tipo Comprobante
|
|
||||||
<asp:DropDownList ID="DdlTipoComprobante" runat="server" CssClass="form-control select2me input-sm" Width="150px">
|
<div class="col-md-1 input-sm truncate" style="text-align:right" >
|
||||||
|
Tipo Comprobante:
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1">
|
||||||
|
<asp:DropDownList ID="DdlTipoComprobante" runat="server" CssClass="form-control select2me input-sm" Width="100%">
|
||||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||||
<asp:ListItem Selected="False" Text="Ingresos" Value="I"></asp:ListItem>
|
<asp:ListItem Selected="False" Text="Ingresos" Value="I"></asp:ListItem>
|
||||||
<asp:ListItem Selected="False" Text="Egresos" Value="E"></asp:ListItem>
|
<asp:ListItem Selected="False" Text="Egresos" Value="E"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</li>
|
</div>
|
||||||
</ul>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
@@ -213,11 +260,13 @@
|
|||||||
|
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:HiddenField runat="server" ID="HdnTipoPS" Value="-1" />
|
|
||||||
<asp:DropDownList ID="DdlClasificacion" runat="server" CssClass=" form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="100%">
|
<asp:TextBox runat="server" ID="TxtDescripcionCompra" CssClass="form-control" MaxLength="50" Width="100%" ></asp:TextBox>
|
||||||
<asp:ListItem Selected="True" Text="Seleccione la Clasificación (Todas)" Value="-1"></asp:ListItem>
|
<label runat="server" id="Label1" for="<%= TxtDescripcionCompra.ClientID.ToString()%>">Descripción:</label>
|
||||||
</asp:DropDownList>
|
|
||||||
<label for="<%= DdlClasificacion.ClientID.ToString()%>">Clasificación:</label>
|
<asp:RequiredFieldValidator ID="RfvTxtDescripcionCompra" runat="server" ControlToValidate="TxtDescripcionCompra" InitialValue="" Display="Dynamic"
|
||||||
|
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripción''</b> es necesario, por favor ingreselo." ValidationGroup="GrpRegistraCompra">
|
||||||
|
</asp:RequiredFieldValidator>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -262,7 +311,7 @@
|
|||||||
<asp:TextBox ID="TxtNumeroReembolso" runat="server" Width="100%" CssClass=" form-control input-sm " />
|
<asp:TextBox ID="TxtNumeroReembolso" runat="server" Width="100%" CssClass=" form-control input-sm " />
|
||||||
<label runat="server" id="LblNumeroReembolso" for="<%= TxtNumeroReembolso.ClientID.ToString()%>">Número de Reembolso:</label>
|
<label runat="server" id="LblNumeroReembolso" for="<%= TxtNumeroReembolso.ClientID.ToString()%>">Número de Reembolso:</label>
|
||||||
<asp:RequiredFieldValidator ID="RfvTxtNumeroReembolso" runat="server" ControlToValidate="TxtNumeroReembolso" InitialValue="" Display="Dynamic"
|
<asp:RequiredFieldValidator ID="RfvTxtNumeroReembolso" runat="server" ControlToValidate="TxtNumeroReembolso" InitialValue="" Display="Dynamic"
|
||||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Num. Reembolso''</b> es necesario, por favor ingreselo." ValidationGroup="GrpRegistroFactura">
|
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Num. Reembolso''</b> es necesario, por favor ingreselo." ValidationGroup="GrpRegistraCompra">
|
||||||
</asp:RequiredFieldValidator>
|
</asp:RequiredFieldValidator>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -287,6 +336,10 @@
|
|||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
<label runat="server" id="LblSubProyecto" for="<%= DdlSubProyecto.ClientID.ToString()%>">SubProyecto:</label>
|
<label runat="server" id="LblSubProyecto" for="<%= DdlSubProyecto.ClientID.ToString()%>">SubProyecto:</label>
|
||||||
|
|
||||||
|
<asp:RequiredFieldValidator ID="RfvDdlSubProyecto" runat="server" ControlToValidate="DdlSubProyecto" InitialValue="-1" Display="Dynamic"
|
||||||
|
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor ingreselo." ValidationGroup="GrpRegistraCompra">
|
||||||
|
</asp:RequiredFieldValidator>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -299,6 +352,9 @@
|
|||||||
<asp:ListItem Selected="True" Text="Seleccione cuenta" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Seleccione cuenta" Value="-1"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
<label runat="server" id="LblCuentaCajaChicaReembolso" for="<%= DdlCuentaCajaChicaReembolso.ClientID.ToString()%>">Caja Chica:</label>
|
<label runat="server" id="LblCuentaCajaChicaReembolso" for="<%= DdlCuentaCajaChicaReembolso.ClientID.ToString()%>">Caja Chica:</label>
|
||||||
|
<asp:RequiredFieldValidator ID="RfvDdlCuentaCajaChicaReembolso" runat="server" ControlToValidate="DdlCuentaCajaChicaReembolso" InitialValue="-1" Display="Dynamic"
|
||||||
|
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>Caja Chica</b> es necesario, por favor ingreselo." ValidationGroup="GrpRegistraCompra">
|
||||||
|
</asp:RequiredFieldValidator>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -308,6 +364,9 @@
|
|||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
<label runat="server" id="LblPersonalReembolso" for="<%= DdlPersonalReembolso.ClientID.ToString()%>">Viáticos:</label>
|
<label runat="server" id="LblPersonalReembolso" for="<%= DdlPersonalReembolso.ClientID.ToString()%>">Viáticos:</label>
|
||||||
|
<asp:RequiredFieldValidator ID="RfvDdlPersonalReembolso" runat="server" ControlToValidate="DdlPersonalReembolso" InitialValue="-1" Display="Dynamic"
|
||||||
|
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>Viáticos</b> es necesario, por favor ingreselo." ValidationGroup="GrpRegistraCompra">
|
||||||
|
</asp:RequiredFieldValidator>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -318,9 +377,10 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-4" style="text-align:center; " >
|
<div class="col-md-4" style="text-align: center;">
|
||||||
<asp:Button ID="BtnGuardarFacturas" runat="server" Text="Guardar" class="btn btn-primary" OnClick="BtnGuardarFacturas_Click" style="margin: 0; position: absolute; top: 50%; transform: translateY(30%);" />
|
<asp:Button ID="BtnGuardarFacturas" runat="server" Text="Guardar" class="btn btn-primary" OnClick="BtnGuardarFacturas_Click" ValidationGroup="GrpRegistraCompra"
|
||||||
</div>
|
Style="margin: 0; position: absolute; top: 50%; transform: translateY(30%);" />
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
Option Explicit On
|
Option Explicit On
|
||||||
|
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
|
Imports System.Data.SqlClient
|
||||||
Imports System.Diagnostics
|
Imports System.Diagnostics
|
||||||
Imports System.Globalization
|
Imports System.Globalization
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
@@ -10,17 +11,17 @@ Imports System.Net.Http
|
|||||||
Imports System.Net.Http.Headers
|
Imports System.Net.Http.Headers
|
||||||
Imports System.Threading
|
Imports System.Threading
|
||||||
Imports System.Threading.Tasks
|
Imports System.Threading.Tasks
|
||||||
|
Imports System.Windows.Forms.VisualStyles.VisualStyleElement
|
||||||
Imports System.Xml
|
Imports System.Xml
|
||||||
Imports ADSistemaLibrary.SatXml
|
Imports ADSistemaLibrary.SatXml
|
||||||
Imports ADSistemaLibrary.SatXml.XmlSatCFDI
|
Imports ADSistemaLibrary.SatXml.XmlSatCFDI
|
||||||
'Imports ADSNetLibrary.SIGAPI.Helpers
|
|
||||||
Imports ClsPaginas
|
Imports ClsPaginas
|
||||||
'Imports DocumentFormat.OpenXml.Spreadsheet
|
|
||||||
'Imports DocumentFormat.OpenXml.Wordprocessing
|
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
|
Imports HigLabo
|
||||||
|
Imports Microsoft.Owin.Security.Provider
|
||||||
Imports Microsoft.Reporting.WebForms
|
Imports Microsoft.Reporting.WebForms
|
||||||
Imports Newtonsoft.Json.Linq
|
Imports Newtonsoft.Json.Linq
|
||||||
Imports Telerik.Web.Apoc
|
|
||||||
|
|
||||||
|
|
||||||
Partial Class Compras_eFacturas
|
Partial Class Compras_eFacturas
|
||||||
@@ -5172,8 +5173,8 @@ Partial Class Compras_eFacturas
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaClasificaciones()
|
Private Sub CargaClasificaciones()
|
||||||
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros("", Orderby:="Clasificacion")
|
'DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros("", Orderby:="Clasificacion")
|
||||||
DdlClasificacion.DataBind()
|
'DdlClasificacion.DataBind()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaPS(CveClasificacion As Integer)
|
Private Sub CargaPS(CveClasificacion As Integer)
|
||||||
@@ -5181,7 +5182,8 @@ Partial Class Compras_eFacturas
|
|||||||
DdlPS.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
|
DdlPS.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
|
||||||
DdlPS.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacion.SelectedValue)
|
'DdlPS.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacion.SelectedValue)
|
||||||
|
DdlPS.ddlWS.Attributes.Add("data-cveclasificacion", "-1")
|
||||||
DdlPS.SelectedText = ""
|
DdlPS.SelectedText = ""
|
||||||
DdlPS.SelectedValue = "-1"
|
DdlPS.SelectedValue = "-1"
|
||||||
Else
|
Else
|
||||||
@@ -5244,11 +5246,11 @@ Partial Class Compras_eFacturas
|
|||||||
Case "2" ' F y E
|
Case "2" ' F y E
|
||||||
DivPersonalReembolso.Visible = True
|
DivPersonalReembolso.Visible = True
|
||||||
RfvTxtNumeroReembolso.Enabled = True
|
RfvTxtNumeroReembolso.Enabled = True
|
||||||
TxtNumeroReembolso.Text = ""
|
|
||||||
Case "6" ' Caja Chica
|
Case "6" ' Caja Chica
|
||||||
DivCuentaCajaChicaReembolso.Visible = True
|
DivCuentaCajaChicaReembolso.Visible = True
|
||||||
RfvTxtNumeroReembolso.Enabled = True
|
RfvTxtNumeroReembolso.Enabled = True
|
||||||
TxtNumeroReembolso.Text = ""
|
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
UpRegistroFacturas.Update()
|
UpRegistroFacturas.Update()
|
||||||
@@ -5317,86 +5319,74 @@ Partial Class Compras_eFacturas
|
|||||||
|
|
||||||
Protected Sub BtnGuardarFacturas_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnGuardarFacturas_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
Dim ErrorProceso As Boolean = False
|
||||||
|
Dim Contador As Integer = 0
|
||||||
|
Dim ErrorProcesoStr As String = ""
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
If Not DdlPS.SelectedValue.ToEntero > 0 Then
|
||||||
|
Alert("Debe seleccionar un producto", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
For Each GvRow As GridViewRow In GvD.Rows
|
For Each GvRow As GridViewRow In GvD.Rows
|
||||||
If GvRow.FCCheckBox("").Checked Then
|
If GvRow.FCCheckBox("chkRegistraFactura").Checked Then
|
||||||
|
|
||||||
Dim CFDIXmlPath As String = $"{UsuarioActual.Empresa.Ruta}Compras\{GvRow.DataKey("RFCDe")}\{GvRow.DataKey("XML")}"
|
Dim CFDIXmlPath As String = $"{UsuarioActual.Empresa.Ruta}Compras\{GvRow.DataKey("RFCDe")}\{GvRow.DataKey("XML")}"
|
||||||
If Not File.Exists(CFDIXmlPath) Then
|
If Not File.Exists(CFDIXmlPath) Then
|
||||||
|
ErrorProceso = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim CompraActual As New Compra2(CFDIXmlPath, Compra2.EnumCargaCompra.DesdeArchivo, GlobalDTTiposGastos(UsuarioActual.CveEmpresa), UsuarioActual)
|
Dim CompraActual As New Compra2(CFDIXmlPath, Compra2.EnumCargaCompra.DesdeArchivo, GlobalDTTiposGastos(UsuarioActual.CveEmpresa), UsuarioActual)
|
||||||
|
|
||||||
|
CompraActual.CveFactura = GvRow.DataKey("CveFactura").ToEntero
|
||||||
CompraActual.CveProveedor = GvRow.DataKey("CveProveedor").ToEntero
|
CompraActual.CveProveedor = GvRow.DataKey("CveProveedor").ToEntero
|
||||||
CompraActual.CveTipoProveedor = GvRow.DataKey("CveTipoProveedor").ToEntero
|
CompraActual.CveTipoProveedor = GvRow.DataKey("CveTipoProveedor").ToEntero
|
||||||
CompraActual.CveEstatusFactura = -1
|
CompraActual.CveTipoConceptoProveedor = GvRow.DataKey("CveTipoProveedor").ToEntero
|
||||||
CompraActual.CvePrePoliza = -1
|
|
||||||
CompraActual.TipoCompra = Compra2.EnumTipoCompra.Sin_definir
|
CompraActual.TipoCompra = Compra2.EnumTipoCompra.Sin_definir
|
||||||
CompraActual.IEPSGasto = True
|
CompraActual.IEPSGasto = True
|
||||||
|
CompraActual.Descripcion = TxtDescripcionCompra.Text.Trim
|
||||||
|
CompraActual.NombreProveedor = GvRow.DataKey("NombreProveedor")
|
||||||
|
|
||||||
|
|
||||||
|
Dim CvePersonal As Integer = -1 'DdlPersonalReembolso.SelectedValue.ToEntero
|
||||||
|
Dim CveCajachica As Integer = -1 'DdlCuentaCajaChicaReembolso.SelectedValue.ToEntero
|
||||||
|
|
||||||
Dim ObjCompras As New ClsCompras
|
If RBLContado.SelectedValue.ToEntero = 6 Then
|
||||||
Dim ObjConta As New ClsContabilidad(ObjCompras.IniciaTransacSQL)
|
CveCajachica = DdlCuentaCajaChicaReembolso.SelectedValue.ToEntero
|
||||||
|
Else
|
||||||
|
CvePersonal = DdlPersonalReembolso.SelectedValue.ToEntero
|
||||||
|
End If
|
||||||
|
|
||||||
Dim ConceptoPoliza As String = String.Format("{0} - {1} - {2}", GvRow.DataKey("NombreProveedor"), GvRow.DataKey("SerieFolio"), "")
|
CompraActual.ConfiguraRegistroRapidoReembolso(DdlPS.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, CveCajachica, CvePersonal,
|
||||||
|
DdlRetIVAConcepto.SelectedValue.ToEntero, DdlRetISRConcepto.SelectedValue.ToEntero, NumeroReembolso:=TxtNumeroReembolso.Text)
|
||||||
CompraActual.CvePrePoliza = ObjConta.AddPrePolizas("eFacturas/Registrar", 1, CompraActual.Total, CompraActual.Total, CompraActual.CveMoneda, CompraActual.Fecha, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0, "", CveTipoPoliza:=3)
|
If CompraActual.AddCompra() Then
|
||||||
|
Contador = Contador + 1
|
||||||
CompraActual.ConfiguraRegistroRapidoReembolso(DdlPS.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlCuentaCajaChicaReembolso.SelectedValue.ToEntero, DdlPersonalReembolso.SelectedValue.ToEntero,
|
Else
|
||||||
DdlRetIVAConcepto.SelectedValue.ToEntero, DdlRetISRConcepto.SelectedValue.ToEntero)
|
ErrorProceso = True
|
||||||
|
ErrorProcesoStr = CompraActual.MSG_Error
|
||||||
'CompraActual.AddCompra()
|
Exit For
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'If ObjCompras.AddCompra"Fac", TxtDescripcion.Text.Trim, CompraActual.SerieFolio, CompraActual.Folio, CompraActual.FolioSecundario, CompraActual.CveProveedor, CompraActual.SubTotal, CompraActual.Descuentos,
|
|
||||||
' CompraActual.Amortizacion, CompraActual.IVA, CompraActual.RetIVA, CompraActual.RetISR, CompraActual.IEPS, CompraActual.OtrosImpuestos,
|
|
||||||
' CompraActual.Redondeo, CompraActual.Total, CompraActual.Fecha, CompraActual.CveMoneda, CompraActual.TipoCambio, If(CompraActual.FechaPago = Nothing, CompraActual.Fecha, CompraActual.FechaPago), CompraActual.AplicaNotaCredito, CompraActual.Observaciones, CompraActual.CveEstatusFactura,
|
|
||||||
' CompraActual.CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CompraActual.IdPoliza, CveCajaChica:=CompraActual.CveCajaChica, CvePersonal:=CompraActual.CvePersonal, NumeroReembolso:=CompraActual.NumeroReembolso, CveProveedorSucursal:=CompraActual.CveProveedorSucursal,
|
|
||||||
' AplicoPromocion:=CompraActual.AplicoPromocion, PorcentajeIVA:=CompraActual.PorcentajeIVA, CveMetodoPago:=CompraActual.CveMetodoPago, CveRetIVAConcepto:=CompraActual.CveRetIVAConcepto,
|
|
||||||
' CveConceptoContableAlmacen:=CompraActual.CveConceptoContableAlmacen,
|
|
||||||
' CveRetISRConcepto:=CompraActual.CveRetISRConcepto, NoDeducible:=CompraActual.NoDeducible, CveTipoCompra:=CompraActual.CveTipoCompra, TotalOriginal:=CompraActual.TotalOriginal, CveTipoConcepto:=CompraActual.CveTipoConcepto,
|
|
||||||
' EsImportacion:=CompraActual.EsImportacion, CveFactura:=CompraActual.CveFactura, CveSubProyecto:=CompraActual.CveSubProyectoPrincipal, DoctosRelacionados:=CompraActual.DocumentosRelacionadosUUIDSString, CveFolioGarantia:=CompraActual.CveFolioGarantia) Then
|
|
||||||
|
|
||||||
|
|
||||||
' CompraActual.CveCompra = ObjCompras.CveCompra
|
|
||||||
|
|
||||||
' If CompraActual.CveCompra > 0 Then
|
|
||||||
|
|
||||||
|
|
||||||
' 'For Each Row As DataRow In CompraActual.TmpDT.Rows
|
|
||||||
' ' If Not ObjCompras.AddCompraDetalle(CompraActual.CveCompra, Row("CveUM").ToString.ToEntero, Row("CvePS").ToString.ToEntero, Row("CveSubProyecto").ToString.ToEntero, -1, CveAF,
|
|
||||||
' ' Row("Cantidad").ToString.ToDecimal, Row("PU").ToString.ToDecimal, Row("IVA").ToString.ToDecimal, Row("Total").ToString.ToDecimal, Row("Descuento").ToString.ToDecimal,
|
|
||||||
' ' Row("Obs").ToString, Row("CveOrdenCompraDetalle").ToString.ToEntero, TipoRecepcion, Row("CveContrato").ToString.ToEntero, Row("CvePresupuestoEgreso").ToString.ToEntero,
|
|
||||||
' ' AplicaCostoIndirecto:=Row("AplicaCostoIndirecto").ToString.ToEntero, EstatusAlmacen:=Row("EntregaDirecta").ToString.ToEntero, CvePersonal:=CvePersonal,
|
|
||||||
' ' CveTipoGasto:=Row("CveTipoGasto").ToString.ToEntero, AF_Medida:=Row("AFMedida").ToString.ToEntero, AF_TipoMantenimiento:=Row("AFTipoMantenimiento").ToString.ToEntero, Referencia:=Referencia, OtrosGastos:=Row("OtrosGastos").ToString.ToDecimal,
|
|
||||||
' ' RetIVA:=Row("RetIVA").ToString.ToDecimal, RetISR:=Row("RetISR").ToString.ToDecimal, IEPSPS:=Row("IEPSPS").ToString.ToDecimal.RoundSQL, IEPSPSIVA:=Row("IEPSPSIVA").ToString.ToDecimal,
|
|
||||||
' ' IVAPorcentaje:=Row("IVAPorcentaje").ToString.ToDecimal, RetIVAPorcentaje:=Row("RetIVAPorcentaje").ToString.ToDecimal, RetISRPorcentaje:=Row("RetISRPorcentaje").ToString.ToDecimal,
|
|
||||||
' ' IEPSPSPorcentaje:=Row("IEPSPSPorcentaje").ToString.ToDecimal, IEPSPSIVAPorcentaje:=Row("IEPSPSIVAPorcentaje").ToString.ToDecimal, NoDeducible:=If((Row("NoDeducible").ToString().ToUpper().Contiene("TRUE", "1")) AndAlso EsNoDeducible, True, False),
|
|
||||||
' ' CveContratoDetalle:=Row("CveContratoDetalle").ToString.ToEntero, CveCultivoCuadroDetalle:=Row("CveCultivoCuadroDetalle").ToString.ToEntero, CveActivoFijoCompra:=CveAFC) Then
|
|
||||||
|
|
||||||
' ' ErrorDetalles = True
|
|
||||||
' ' Exit For
|
|
||||||
' ' End If
|
|
||||||
' 'Next
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
' End If
|
|
||||||
|
|
||||||
|
|
||||||
'End If
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ObjCompras.RollBack()
|
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
|
||||||
|
If Not ErrorProceso Then
|
||||||
|
CargaDatos()
|
||||||
|
If Contador > 0 Then
|
||||||
|
Alert($"Se registraron {Contador} Compras")
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
Alert($"Se registraron {Contador} Compras. error {ErrorProcesoStr}", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
@@ -5458,7 +5448,7 @@ Public Class Compra2
|
|||||||
Public Property TC As Decimal = 1
|
Public Property TC As Decimal = 1
|
||||||
Public Property SubTotal As Decimal = 0D
|
Public Property SubTotal As Decimal = 0D
|
||||||
Public Property SubTotal2 As Decimal = 0D
|
Public Property SubTotal2 As Decimal = 0D
|
||||||
Public Property Descuentos As Decimal = 0D
|
Public Property Descuento As Decimal = 0D
|
||||||
Public Property Total As Decimal = 0D
|
Public Property Total As Decimal = 0D
|
||||||
Public Property Moneda As String = ""
|
Public Property Moneda As String = ""
|
||||||
Public Property TipoComprobante As String
|
Public Property TipoComprobante As String
|
||||||
@@ -5584,14 +5574,14 @@ Public Class Compra2
|
|||||||
|
|
||||||
Public Property CveMetodoPago As Integer
|
Public Property CveMetodoPago As Integer
|
||||||
Public Property MetodoPago As String
|
Public Property MetodoPago As String
|
||||||
Public Property DocumentosRelacionadosUUIDSList As List(Of String)
|
Public Property DocumentosRelacionadosUUIDSList As List(Of String) = New List(Of String)
|
||||||
Public ReadOnly Property DocumentosRelacionadosUUIDSString As String
|
Public ReadOnly Property DocumentosRelacionadosUUIDSString As String
|
||||||
Get
|
Get
|
||||||
Return GeneraStringDoctosRelacionados()
|
Return GeneraStringDoctosRelacionados()
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public Property DocumentosRelacionadosAnticiposUUIDList As List(Of String)
|
Public Property DocumentosRelacionadosAnticiposUUIDList As List(Of String) = New List(Of String)
|
||||||
Public Property TieneAnticiposXML As Boolean = False
|
Public Property TieneAnticiposXML As Boolean = False
|
||||||
Public Property EmisorRFC As String
|
Public Property EmisorRFC As String
|
||||||
Public Property ReceptorRFC As String
|
Public Property ReceptorRFC As String
|
||||||
@@ -5636,7 +5626,7 @@ Public Class Compra2
|
|||||||
Public Property TmpDT As DataTable = New DataTable
|
Public Property TmpDT As DataTable = New DataTable
|
||||||
Public Property SubTotalConceptos As Decimal = 0D
|
Public Property SubTotalConceptos As Decimal = 0D
|
||||||
|
|
||||||
Private Errores As StringBuilder
|
Private Errores As StringBuilder = New StringBuilder
|
||||||
|
|
||||||
Public ReadOnly Property MSG_Error As String
|
Public ReadOnly Property MSG_Error As String
|
||||||
Get
|
Get
|
||||||
@@ -5660,6 +5650,11 @@ Public Class Compra2
|
|||||||
Public Property OtrosImpuestosGasto As Boolean = False
|
Public Property OtrosImpuestosGasto As Boolean = False
|
||||||
Public Property OCVinculada As Boolean = False
|
Public Property OCVinculada As Boolean = False
|
||||||
Public Property NumNoDed As Integer = 0
|
Public Property NumNoDed As Integer = 0
|
||||||
|
Public Property CveTipoPoliza As Integer = -1
|
||||||
|
Public Property NombreProveedor As Object
|
||||||
|
Public Property CveCreditoDetalle As Integer = -1
|
||||||
|
Public Property CveIE As Integer = -1
|
||||||
|
Public Property CveCompraAmortizacion As Integer = -1
|
||||||
|
|
||||||
Public Sub New(XmlFuente As String, OpcionCarga As EnumCargaCompra, DTTiposGastos As DataTable, UsuarioActual As Usuario)
|
Public Sub New(XmlFuente As String, OpcionCarga As EnumCargaCompra, DTTiposGastos As DataTable, UsuarioActual As Usuario)
|
||||||
|
|
||||||
@@ -5752,7 +5747,7 @@ Public Class Compra2
|
|||||||
Fecha = ValorXML(nodo, "fecha").ToDate
|
Fecha = ValorXML(nodo, "fecha").ToDate
|
||||||
SubTotal = ValorXML(nodo, "subTotal").ToDecimal
|
SubTotal = ValorXML(nodo, "subTotal").ToDecimal
|
||||||
Total = ValorXML(nodo, "total").ToDecimal
|
Total = ValorXML(nodo, "total").ToDecimal
|
||||||
Descuentos = ValorXML(nodo, "descuento").ToDecimal
|
Descuento = ValorXML(nodo, "descuento").ToDecimal
|
||||||
Moneda = ValorXML(nodo, "Moneda")
|
Moneda = ValorXML(nodo, "Moneda")
|
||||||
|
|
||||||
CveMoneda = GlobalDTMonedas().FiltroPrimeroValor("CveMoneda", $" AbreviaturaSAT = '{Moneda}' ").ToEntero
|
CveMoneda = GlobalDTMonedas().FiltroPrimeroValor("CveMoneda", $" AbreviaturaSAT = '{Moneda}' ").ToEntero
|
||||||
@@ -5955,8 +5950,8 @@ Public Class Compra2
|
|||||||
Next
|
Next
|
||||||
|
|
||||||
If ProductosCodigoSATNoPermitidos.ToString.Length > 0 Then
|
If ProductosCodigoSATNoPermitidos.ToString.Length > 0 Then
|
||||||
Dim mensajeAdvertencia As String = String.Format("El comprobante contiene productos con código SAT '01010101', revise los productos:</br></br>{0}", ProductosCodigoSATNoPermitidos.ToString)
|
Errores.AppendLine($"El comprobante contiene productos con código SAT '01010101', revise los productos:</br></br>{ProductosCodigoSATNoPermitidos.ToString}")
|
||||||
Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia)
|
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
GuardaLog($"Error al cargar detalles GetFacturasComparacionXML.")
|
GuardaLog($"Error al cargar detalles GetFacturasComparacionXML.")
|
||||||
@@ -5977,19 +5972,22 @@ Public Class Compra2
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
Me.PorcentajeIVA = TmpDT.MAX("IVAPorcentaje").ToDecimal
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Function ConfiguraRegistroRapidoReembolso(CvePS As Integer, CveSubProyecto As Integer, CveCajaChica As Integer, CvePersonal As Integer, CveRetIVAConcepto As Integer, CveRetISRConcepto As Integer) As Boolean
|
Public Function ConfiguraRegistroRapidoReembolso(CvePS As Integer, CveSubProyecto As Integer, CveCajaChica As Integer, CvePersonal As Integer, CveRetIVAConcepto As Integer, CveRetISRConcepto As Integer, NumeroReembolso As String) As Boolean
|
||||||
|
|
||||||
Dim respuesta As Boolean = True
|
Dim respuesta As Boolean = True
|
||||||
Me.CveSubProyecto = CveSubProyecto
|
Me.CveSubProyecto = CveSubProyecto
|
||||||
|
Me.CveSubProyectoPrincipal = CveSubProyecto
|
||||||
Me.CveCajaChica = CveCajaChica
|
Me.CveCajaChica = CveCajaChica
|
||||||
Me.CvePersonal = CvePersonal
|
Me.CvePersonal = CvePersonal
|
||||||
Me.CveRetIVAConcepto = CveRetIVAConcepto
|
Me.CveRetIVAConcepto = CveRetIVAConcepto
|
||||||
Me.CveRetISRConcepto = CveRetISRConcepto
|
Me.CveRetISRConcepto = CveRetISRConcepto
|
||||||
|
Me.CveTipoPoliza = 3
|
||||||
|
Me.NumeroReembolso = NumeroReembolso
|
||||||
|
|
||||||
Dim dRowSubProyecto As DataRow = GlobalDTSubProyectos(-1, CveSubProyecto, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("")
|
Dim dRowSubProyecto As DataRow = GlobalDTSubProyectos(-1, CveSubProyecto, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("")
|
||||||
|
|
||||||
@@ -6015,32 +6013,40 @@ Public Class Compra2
|
|||||||
If respuesta AndAlso IEPS > 0 Then
|
If respuesta AndAlso IEPS > 0 Then
|
||||||
If Not AgregaIEPSReembolso(CvePS:=CvePS) Then
|
If Not AgregaIEPSReembolso(CvePS:=CvePS) Then
|
||||||
respuesta = False
|
respuesta = False
|
||||||
|
Else
|
||||||
|
IEPS = 0
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If respuesta Then
|
If Not AjustesValidacion() Then
|
||||||
|
respuesta = False
|
||||||
|
End If
|
||||||
|
|
||||||
'VALIDA IMPORTES
|
Return respuesta
|
||||||
If Not ValidaTotalesGuardar() Then
|
|
||||||
respuesta = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
If Not AjustaCombustibles() Then
|
End Function
|
||||||
respuesta = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
If Not AjustaIVA() Then
|
Private Function AjustesValidacion() As Boolean
|
||||||
respuesta = False
|
Dim respuesta = True
|
||||||
End If
|
'VALIDA IMPORTES
|
||||||
|
If Not ValidaTotalesGuardar() Then
|
||||||
|
respuesta = False
|
||||||
|
End If
|
||||||
|
|
||||||
If Not AjustaRetIVA() Then
|
If Not AjustaCombustibles() Then
|
||||||
respuesta = False
|
respuesta = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not AjustaRetISR() Then
|
If Not AjustaIVA() Then
|
||||||
respuesta = False
|
respuesta = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Not AjustaRetIVA() Then
|
||||||
|
respuesta = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not AjustaRetISR() Then
|
||||||
|
respuesta = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Return respuesta
|
Return respuesta
|
||||||
@@ -6074,7 +6080,7 @@ Public Class Compra2
|
|||||||
TempSubTotal = SubTotal
|
TempSubTotal = SubTotal
|
||||||
SubTotalOriginal = SubTotal
|
SubTotalOriginal = SubTotal
|
||||||
SubTotal2Original = SubTotal2
|
SubTotal2Original = SubTotal2
|
||||||
TempDescuentos = Descuentos + Amortizacion
|
TempDescuentos = Descuento + Amortizacion
|
||||||
TempSubTotal2 = TempSubTotal - TempDescuentos
|
TempSubTotal2 = TempSubTotal - TempDescuentos
|
||||||
TempIVA = IVA
|
TempIVA = IVA
|
||||||
TempIEPS = IEPS
|
TempIEPS = IEPS
|
||||||
@@ -6108,7 +6114,7 @@ Public Class Compra2
|
|||||||
DiferenciaSubtotales = SubTotal2Original.ToString.ToDecimal - TmpDT.SUM("Total").ToString.ToDecimal
|
DiferenciaSubtotales = SubTotal2Original.ToString.ToDecimal - TmpDT.SUM("Total").ToString.ToDecimal
|
||||||
'[IPP] PARCHE: Factura TELMEX para APH 12/ENERO/2018
|
'[IPP] PARCHE: Factura TELMEX para APH 12/ENERO/2018
|
||||||
If CveFactura = 286290 Then
|
If CveFactura = 286290 Then
|
||||||
DiferenciaSubtotales += Descuentos
|
DiferenciaSubtotales += Descuento
|
||||||
End If
|
End If
|
||||||
If Math.Abs(DiferenciaSubtotales) > 1 And Not CompraNoDeducible = 1 Then 'EsNoDeducible
|
If Math.Abs(DiferenciaSubtotales) > 1 And Not CompraNoDeducible = 1 Then 'EsNoDeducible
|
||||||
Errores.AppendLine("Los importes de los conceptos (Productos/Servicios) no cuadran con el total. Por favor verifique y vuelva a intentar.")
|
Errores.AppendLine("Los importes de los conceptos (Productos/Servicios) no cuadran con el total. Por favor verifique y vuelva a intentar.")
|
||||||
@@ -6563,6 +6569,9 @@ Public Class Compra2
|
|||||||
Errores.AppendLine("Debe seleccionar al menos un impuesto. ")
|
Errores.AppendLine("Debe seleccionar al menos un impuesto. ")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
CalculaTotales()
|
||||||
|
|
||||||
Return respuesta
|
Return respuesta
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
@@ -6635,10 +6644,7 @@ Public Class Compra2
|
|||||||
Me.SubTotal = Math.Round(SubTotalIEPS, 2)
|
Me.SubTotal = Math.Round(SubTotalIEPS, 2)
|
||||||
Me.SubTotalConceptos = Math.Round(SubTotalIEPS, 2)
|
Me.SubTotalConceptos = Math.Round(SubTotalIEPS, 2)
|
||||||
|
|
||||||
'If SubTotalR <> SubTotalIEPS Then
|
|
||||||
' Dim IA As Decimal = SubTotalR - SubTotalIEPS
|
|
||||||
' AjustaImporteUltimoConcepto(IA)
|
|
||||||
'End If
|
|
||||||
|
|
||||||
PSS.Dispose()
|
PSS.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
@@ -6747,7 +6753,7 @@ Public Class Compra2
|
|||||||
Row("TipoAF") = -1
|
Row("TipoAF") = -1
|
||||||
Row("CveOrdenCompraDetalle") = CveOrdenCompraDetalle
|
Row("CveOrdenCompraDetalle") = CveOrdenCompraDetalle
|
||||||
Row("EntregaDirecta") = EntregaDirecta
|
Row("EntregaDirecta") = EntregaDirecta
|
||||||
'If GlobalDTProductosServiciosEquivalencias(CvePS, CveUM).Rows.Count = 0 Then Row("CveEq") = 1 Else Row("CveEq") = 0
|
|
||||||
Row("NoDeducible") = NoDeducible
|
Row("NoDeducible") = NoDeducible
|
||||||
|
|
||||||
|
|
||||||
@@ -6814,7 +6820,6 @@ Public Class Compra2
|
|||||||
Row("CveClasificacionOG") = CveClasificacionOG
|
Row("CveClasificacionOG") = CveClasificacionOG
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' CveProgramaOperativo AS Integer = -1, Optional CveUnidadAdministrativa, Optional CveUnidadAdministrativa AS Integer = -1,, Optional CveFuenteFinanciamiento AS Integer = -1, Optional CveTipoGastoAC AS Integer = -1, Optional CveClasificacionOG AS Integer = -1,
|
|
||||||
|
|
||||||
'Esta parte es para validar cuando la factura tenga ieps en o se asignara el ieps como una partida ya no se considere
|
'Esta parte es para validar cuando la factura tenga ieps en o se asignara el ieps como una partida ya no se considere
|
||||||
If (CveFactura > 0 Or CveCompra > 0) And IEPS = 0 Then
|
If (CveFactura > 0 Or CveCompra > 0) And IEPS = 0 Then
|
||||||
@@ -6852,11 +6857,8 @@ Public Class Compra2
|
|||||||
LocalIVA = If(TmpDT.SUM("IVA") > 0, LocalSubTotalIVA + LocalSubTotalIEPSIVA, 0)
|
LocalIVA = If(TmpDT.SUM("IVA") > 0, LocalSubTotalIVA + LocalSubTotalIEPSIVA, 0)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
'If CalculaIVA Then IVA = TxtIVA.Text.ToDouble
|
|
||||||
LocalDescuentos = TmpDT.SUMD("Descuento")
|
LocalDescuentos = TmpDT.SUMD("Descuento")
|
||||||
|
|
||||||
'[IPP] SI YA ES COMPRA REGISTRADA NO CONSIDERA LA AMORTIZACIÓN PARA EL CALCULO DE TOTAL
|
|
||||||
If Not CveCompra > 0 Then
|
If Not CveCompra > 0 Then
|
||||||
LocalAmortizacion = Me.Amortizacion
|
LocalAmortizacion = Me.Amortizacion
|
||||||
End If
|
End If
|
||||||
@@ -6867,14 +6869,14 @@ Public Class Compra2
|
|||||||
Retenciones += LocalRetISR
|
Retenciones += LocalRetISR
|
||||||
|
|
||||||
|
|
||||||
LocalSubTotal2 = LocalSubTotal - LocalDescuentos ' - Amortizacion '[IPP] COMENTADO CASO JAM 12653 CON NC 27122 | 23/MAYO/2018
|
LocalSubTotal2 = LocalSubTotal - LocalDescuentos
|
||||||
LocalTotal = LocalSubTotal2 + LocalIVA + LocalIEPSPS - Retenciones
|
LocalTotal = LocalSubTotal2 + LocalIVA + LocalIEPSPS - Retenciones
|
||||||
|
|
||||||
'ASIGNAMOS VALORES A VISTA
|
'ASIGNAMOS VALORES A VISTA
|
||||||
If CveCompra > 0 Or CveFactura > 0 Or Me.OCVinculada Then
|
If CveCompra > 0 Or CveFactura > 0 Or Me.OCVinculada Then
|
||||||
SubTotal = LocalSubTotal
|
SubTotal = LocalSubTotal
|
||||||
SubTotal2 = LocalSubTotal2
|
SubTotal2 = LocalSubTotal2
|
||||||
Descuentos = LocalDescuentos
|
Descuento = LocalDescuentos
|
||||||
|
|
||||||
If EsNoDeducible Then
|
If EsNoDeducible Then
|
||||||
IVA = LocalIVA
|
IVA = LocalIVA
|
||||||
@@ -6888,7 +6890,7 @@ Public Class Compra2
|
|||||||
SubTotal = LocalSubTotal
|
SubTotal = LocalSubTotal
|
||||||
SubTotal2 = LocalSubTotal2
|
SubTotal2 = LocalSubTotal2
|
||||||
IVA = LocalIVA
|
IVA = LocalIVA
|
||||||
Descuentos = LocalDescuentos
|
Descuento = LocalDescuentos
|
||||||
RetIVA = LocalRetIVA
|
RetIVA = LocalRetIVA
|
||||||
RetISR = LocalRetISR
|
RetISR = LocalRetISR
|
||||||
IEPS = LocalIEPSPS
|
IEPS = LocalIEPSPS
|
||||||
@@ -6898,39 +6900,10 @@ Public Class Compra2
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'CUANDO SEA COMPRA, FACTURA O VENGA DE VINCULACIÓN OC NO SE MODIFICAN VALORES
|
|
||||||
'SE VERIFICA SI ALGUN DATO ES DIFERENTE PARA MOSTRAR COLUMNA CON VALORES ORIGINALES
|
|
||||||
'If (CveCompra > 0 Or CveFactura > 0 Or OCVinculada) And Not EsNoDeducible Then
|
|
||||||
' If LocalSubTotal <> SubTotalOriginal Then
|
|
||||||
' OriginalesVisible(True)
|
|
||||||
' LbSubTotalOriginal.Text = SubTotalOriginal.ToString.FormatoNumero(2)
|
|
||||||
' Else
|
|
||||||
' OriginalesVisible(False)
|
|
||||||
' End If
|
|
||||||
'End If
|
|
||||||
|
|
||||||
'If Not CveCompra > 0 Then 'cuando se está registrando manualmente y se va amortizar
|
|
||||||
' LblSaldoFactura.Text = TxtTotal.Text.FormatoNumero
|
|
||||||
' UpAnticipos.Update()
|
|
||||||
'End If
|
|
||||||
|
|
||||||
'LblRetIVA.Text = If(TxtRetIVA.Text.ToDecimal > 0, (TmpDT.MAX("RetIVAPorcentaje").ToDecimal() * 100).FormatoNumero(4), "")
|
|
||||||
'LblRetISR.Text = If(TxtRetISR.Text.ToDecimal > 0, (TmpDT.MAX("RetISRPorcentaje").ToDecimal() * 100).FormatoNumero(4), "")
|
|
||||||
|
|
||||||
'IMPORTES DE RESTRICCION
|
|
||||||
'TxtDocumentoImporteFE.Text = LocalTotal.ToString.FormatoNumero(2)
|
|
||||||
'RVDocumentoImporte.MaximumValue = LocalTotal.ToString.FormatoNumero(2)
|
|
||||||
'RVDocumentoImporteFE.MaximumValue = RVDocumentoImporte.MaximumValue
|
|
||||||
'RVDocumentoImporteCaja.MaximumValue = RVDocumentoImporte.MaximumValue
|
|
||||||
|
|
||||||
'CargaRetIVAConcepto()
|
|
||||||
'CargaRetISRConcepto()
|
|
||||||
|
|
||||||
Me.NumNoDed = TmpDT.COUNT("CvePS", "NoDeducible = True ")
|
Me.NumNoDed = TmpDT.COUNT("CvePS", "NoDeducible = True ")
|
||||||
|
|
||||||
'If DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") And CveFactura <= 0 Then
|
|
||||||
' InicializaAplicaNCFact()
|
|
||||||
'End If
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -6951,8 +6924,7 @@ Public Class Compra2
|
|||||||
End Try
|
End Try
|
||||||
|
|
||||||
|
|
||||||
'BANDERA
|
|
||||||
'Dim AplicaCalculaTotales = False
|
|
||||||
|
|
||||||
'DATOS GENERALES
|
'DATOS GENERALES
|
||||||
DrPS("Obs") = ""
|
DrPS("Obs") = ""
|
||||||
@@ -7000,73 +6972,14 @@ Public Class Compra2
|
|||||||
DrPS("CveCultivoCuadroDetalle") = -1
|
DrPS("CveCultivoCuadroDetalle") = -1
|
||||||
DrPS("TemporadaCuadro") = ""
|
DrPS("TemporadaCuadro") = ""
|
||||||
|
|
||||||
'RESPETAR VALORES DE LA PANTALLA
|
|
||||||
'IVA = PSRow("IVA").ToString.ToDouble
|
|
||||||
'If IVA = -1 Then
|
|
||||||
' IVA = GlobalDTSubProyectos(-1, DdlSubProyecto.SelectedValue.ToEntero()).FiltroPrimeroValor("IVA").ToDouble
|
|
||||||
'End If
|
|
||||||
'RetIVA = If(PSRow("RetIVA").ToString = "-1", ViewState("RetIVA"), PSRow("RetIVA").ToString).ToString.ToDouble
|
|
||||||
'RetISR = If(PSRow("RetISR").ToString = "-1", ViewState("RetISR"), PSRow("RetISR").ToString).ToString.ToDouble
|
|
||||||
'IEPSPS = If(PSRow("IEPSPorcentaje").ToString = "-1", ViewState("IEPSPS"), PSRow("IEPSPorcentaje").ToString).ToString.ToDouble
|
|
||||||
'IEPSPSIVA = If(PSRow("IEPSGrabaIVA").ToString = "True", PSRow("IEPSPorcentaje").ToString.ToDouble, 0)
|
|
||||||
Else
|
Else
|
||||||
Errores.AppendLine($"No se encontrol el producto con CvePS {CvePS}")
|
Errores.AppendLine($"No se encontrol el producto con CvePS {CvePS}")
|
||||||
Respuesta = False
|
Respuesta = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
'UM
|
|
||||||
|
|
||||||
|
|
||||||
'TIPO DE GASTO
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'IMPUESTOS: SI ES COMPRA, FACUTRA O CON OC, NO MODIFICA IMPUESTOS!!
|
|
||||||
'Dim IVA = (TxtIVAModal.Text.ToDouble / 100)
|
|
||||||
'Dim IVA = Math.Round(DdlIVA.SelectedValue.ToDecimal - 1, 2)
|
|
||||||
'Dim RetISR = (TxtRetISRModal.Text.ToDecimal / 100)
|
|
||||||
'Dim RetIVA = (TxtRetIVAModal.Text.ToDecimal / 100)
|
|
||||||
'Dim IEPSPS = (TxtIEPSModal.Text.ToDecimal / 100)
|
|
||||||
'Dim IEPSPSIVA = 0
|
|
||||||
|
|
||||||
'I f Not (CveCompra > 0 Or CveFactura > 0 Or OCVinculada) Then
|
|
||||||
'If DdlIVA.SelectedValue.ToDouble = 0 Then DrPS("IVA") = 0 Else DrPS("IVA") = IVA * Total
|
|
||||||
|
|
||||||
'If CveFactura > 0 And TxtIVA.Text.ToDecimal = 0 Then
|
|
||||||
' DrPS("IVA") = 0
|
|
||||||
' DrPS("IVAPorcentaje") = 0
|
|
||||||
'Else
|
|
||||||
|
|
||||||
' If ActualizarIva Then
|
|
||||||
' DrPS("IVA") = (IVA * Total).RoundSQL
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' DrPS("IVAPorcentaje") = IVA
|
|
||||||
'End If
|
|
||||||
|
|
||||||
'DrPS("RetIVA") = (RetIVA * Total).RoundSQL
|
|
||||||
'DrPS("RetIVAPorcentaje") = RetIVA
|
|
||||||
'DrPS("RetISR") = RetISR * Total
|
|
||||||
'DrPS("RetISRPorcentaje") = RetISR
|
|
||||||
'DrPS("IEPSPS") = (IEPSPS * Total).RoundSQL
|
|
||||||
'DrPS("IEPSPSPorcentaje") = IEPSPS
|
|
||||||
'DrPS("IEPSPSIVA") = (IEPSPSIVA * Total).RoundSQL
|
|
||||||
'DrPS("IEPSPSIVAPorcentaje") = IEPSPSIVA
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'Esta parte es para validar cuando la factura tenga ieps en o se asignara el ieps como una partida ya no se considere
|
|
||||||
'If (CveFactura > 0 Or CveCompra > 0) And TxtIEPS.Text.ToDecimal = 0 Then
|
|
||||||
' DrPS("IEPSPS") = 0
|
|
||||||
' DrPS("IEPSPSPorcentaje") = 0
|
|
||||||
'End If
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'AplicaCalculaTotales = True
|
|
||||||
TmpDT.AcceptChanges()
|
TmpDT.AcceptChanges()
|
||||||
Return Respuesta
|
Return Respuesta
|
||||||
End Function
|
End Function
|
||||||
@@ -7074,19 +6987,6 @@ Public Class Compra2
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
'Private Function AsignarPSReembolso(CvePS As Integer) As Boolean
|
|
||||||
|
|
||||||
' Dim respuesta As Boolean
|
|
||||||
|
|
||||||
' If Not CvePS > 0 Then
|
|
||||||
' Errores.AppendLine("AsignarPSReembolso el CvePS debe de ser matoy a 0,")
|
|
||||||
' Return False
|
|
||||||
' End If
|
|
||||||
|
|
||||||
|
|
||||||
' Return respuesta
|
|
||||||
|
|
||||||
'End Function
|
|
||||||
|
|
||||||
|
|
||||||
Private Sub ValidacionesTotalesXml()
|
Private Sub ValidacionesTotalesXml()
|
||||||
@@ -7106,7 +7006,7 @@ Public Class Compra2
|
|||||||
Dim TotalTemp As Decimal = Subtotal2Temp - RetIVATemp - RetISRTemp + Math.Round(IVATemp, 6) + IEPSTemp + OtrosImpuestos - OtrosImpuestosRetenciones
|
Dim TotalTemp As Decimal = Subtotal2Temp - RetIVATemp - RetISRTemp + Math.Round(IVATemp, 6) + IEPSTemp + OtrosImpuestos - OtrosImpuestosRetenciones
|
||||||
|
|
||||||
|
|
||||||
If Math.Abs(Math.Round(DescuentosTemp, 6) - Math.Round(Descuentos, 6)) > 0.01 Then
|
If Math.Abs(Math.Round(DescuentosTemp, 6) - Math.Round(Descuento, 6)) > 0.01 Then
|
||||||
Msg &= String.Format("- Los descuentos del detalle no coinciden con el descuento general <br>")
|
Msg &= String.Format("- Los descuentos del detalle no coinciden con el descuento general <br>")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -7133,8 +7033,8 @@ Public Class Compra2
|
|||||||
If Msg <> "" Then
|
If Msg <> "" Then
|
||||||
Errores.AppendLine($" El comprobante XML presenta las siguientes inconsistencias:{Msg}. ")
|
Errores.AppendLine($" El comprobante XML presenta las siguientes inconsistencias:{Msg}. ")
|
||||||
Else
|
Else
|
||||||
'[IPP] IGUALAMOS VALORES PARA RESPETAR LOS DEL XML EN CASO DE DIF DE 0.01
|
|
||||||
DescuentosTemp = Descuentos
|
DescuentosTemp = Descuento
|
||||||
IVATemp = TrasladoIVA
|
IVATemp = TrasladoIVA
|
||||||
TotalTemp = Total
|
TotalTemp = Total
|
||||||
RetIVATemp = RetencionIVA
|
RetIVATemp = RetencionIVA
|
||||||
@@ -7142,87 +7042,20 @@ Public Class Compra2
|
|||||||
IEPSTemp = TrasladoIEPS
|
IEPSTemp = TrasladoIEPS
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If TrasladoIEPS > 0 Or OtrosImpuestos > 0 Then
|
Me.SubTotal = SubtotalTemp
|
||||||
|
Me.Descuento = DescuentosTemp
|
||||||
If OtrosImpuestos > 0 Or TrasladoIEPS > 0 Then
|
Me.SubTotal2 = Subtotal2Temp
|
||||||
|
Me.IVA = IVATemp
|
||||||
'If UsuarioActual.Empresa.Funcionalidad(713) = "1" Then
|
Me.Total = TotalTemp
|
||||||
' 'Si tiene funcionalidad y es Acreedor se muestra modal
|
Me.RetIVA = RetIVATemp
|
||||||
' If CveTipoProveedor.Contiene(2, 3) Then ' Acreedor
|
Me.RetISR = RetISRTemp
|
||||||
' RegistraScript("$('#ModalIEPS').modal({ backdrop: 'static', keyboard: false },'show');")
|
Me.IEPS = IEPSTemp
|
||||||
' End If
|
|
||||||
'Else
|
|
||||||
' 'Si no tiene funcionalidad y es proveedor se muestra
|
|
||||||
' RegistraScript("$('#ModalIEPS').modal({ backdrop: 'static', keyboard: false },'show');")
|
|
||||||
|
|
||||||
'End If
|
|
||||||
|
|
||||||
'Else
|
|
||||||
' RegistraScript("$('#ModalIEPS').modal('show');")
|
|
||||||
'BtnCancelarotrosImpuestos.Visible = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
If TrasladoIEPS > 0 Then
|
|
||||||
'ChkIEPS.Visible = True
|
|
||||||
'ChkIEPS.Checked = True
|
|
||||||
'DdlConceptoIEPS.Visible = True
|
|
||||||
'CargaProductos(DdlConceptoIEPS, If(UsuarioActual.Empresa.Funcionalidad(112).ToString.ToEntero > 0, UsuarioActual.Empresa.Funcionalidad(112).ToString.ToEntero, -1))
|
|
||||||
'LbImporte.Text = "$" + TrasladoIEPS.ToString
|
|
||||||
End If
|
|
||||||
If OtrosImpuestos > 0 Then
|
|
||||||
'ChkOtrosI.Visible = True
|
|
||||||
'ChkOtrosI.Checked = True
|
|
||||||
'DdlConceptoOI.Visible = True
|
|
||||||
'CargaProductos(DdlConceptoOI, If(UsuarioActual.Empresa.Funcionalidad(305).ToString.ToEntero > 0, UsuarioActual.Empresa.Funcionalidad(305).ToString.ToEntero, -1))
|
|
||||||
'LbImporte2.Text = "$" + OtrosImpuestos.ToString
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
'TxtSubTotal.Text = SubtotalTemp.FormatoNumero
|
|
||||||
'TxtDescuento.Text = DescuentosTemp.FormatoNumero
|
|
||||||
'TxtSubTotal2.Text = Subtotal2Temp.FormatoNumero
|
|
||||||
'TxtIVA.Text = IVATemp.FormatoNumero
|
|
||||||
'TxtTotal.Text = TotalTemp.FormatoNumero
|
|
||||||
'TxtRetIVA.Text = RetIVATemp.FormatoNumero
|
|
||||||
'TxtRetISR.Text = RetISRTemp.FormatoNumero
|
|
||||||
'TxtIEPS.Text = IEPSTemp.FormatoNumero
|
|
||||||
|
|
||||||
'TrDescuento.Visible = DescuentosTemp > 0
|
|
||||||
'TrIEPS.Visible = IEPSTemp > 0
|
|
||||||
'TrRetIVA.Visible = RetIVATemp > 0
|
|
||||||
'TrRetISR.Visible = RetISRTemp > 0
|
|
||||||
|
|
||||||
'TxtSubTotal.Enabled = False
|
|
||||||
'TxtDescuento.Enabled = False
|
|
||||||
'TxtSubTotal2.Enabled = False
|
|
||||||
'TxtIVA.Enabled = False
|
|
||||||
'TxtTotal.Enabled = False
|
|
||||||
'TxtRetIVA.Enabled = False
|
|
||||||
'TxtRetISR.Enabled = False
|
|
||||||
'TxtIEPS.Enabled = False
|
|
||||||
|
|
||||||
'HfTotalCompra.Value = TotalTemp.ToString
|
|
||||||
'CompraSaldo = TotalTemp
|
|
||||||
'CalculaTotalPorDevengar()
|
|
||||||
'TxtDocumentoImporteFE.Text = TotalTemp.ToString
|
|
||||||
'RVDocumentoImporte.MaximumValue = Math.Round(TotalTemp, 2).ToString
|
|
||||||
'RVDocumentoImporteFE.MaximumValue = RVDocumentoImporte.MaximumValue
|
|
||||||
'RVDocumentoImporteCaja.MaximumValue = RVDocumentoImporte.MaximumValue
|
|
||||||
'TxtDocumentoImporte.Text = TotalTemp.FormatoNumero
|
|
||||||
'TxtDocumentoImporteCaja.Text = TotalTemp.FormatoNumero
|
|
||||||
'TxtOtrosImpuestos.Text = OtrosImpuestos.FormatoNumero
|
|
||||||
'If OtrosImpuestos > 0 Then TrOtrosImpuestos.Visible = True
|
|
||||||
'If OtrosImpuestosRetenciones > 0 Then TrOtrosImpuestos.Visible = True : TxtOtrosImpuestos.Text = (-OtrosImpuestosRetenciones).FormatoNumero
|
|
||||||
'HFDiferenciaCompra.Value = TxtTotal.Text
|
|
||||||
'HdnCompraSaldo.Value = TotalTemp.ToString
|
|
||||||
|
|
||||||
CompraSaldo = TotalTemp
|
CompraSaldo = TotalTemp
|
||||||
|
|
||||||
'LblRetIVA.Text = If(RetIVATemp > 0, (TmpDT.MAX("RetIVAPorcentaje").ToDecimal() * 100).FormatoNumero(4), "")
|
|
||||||
'LblRetISR.Text = If(RetISRTemp > 0, (TmpDT.MAX("RetISRPorcentaje").ToDecimal() * 100).FormatoNumero(4), "")
|
|
||||||
|
|
||||||
'ASIGNA VALORES ORIGINALES PARA GUARDAR
|
|
||||||
AsignaValoresOriginales(SubtotalTemp, Subtotal2Temp, IVATemp, RetIVATemp, RetISRTemp, Total)
|
AsignaValoresOriginales(SubtotalTemp, Subtotal2Temp, IVATemp, RetIVATemp, RetISRTemp, Total)
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -7241,9 +7074,7 @@ Public Class Compra2
|
|||||||
If ImporteAjuste = 0 Then Exit Sub
|
If ImporteAjuste = 0 Then Exit Sub
|
||||||
|
|
||||||
Dim Amortizacion As Decimal = 0
|
Dim Amortizacion As Decimal = 0
|
||||||
'If ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 Then
|
|
||||||
' Amortizacion = LblAmortizacion.Text.ToDecimal
|
|
||||||
'End If
|
|
||||||
|
|
||||||
If TmpDT.Rows.Count > 0 Then ' si hay movimientos y si esta afectando al total, que se haga el ajuste
|
If TmpDT.Rows.Count > 0 Then ' si hay movimientos y si esta afectando al total, que se haga el ajuste
|
||||||
Dim Indice As Integer = If(TmpDT.Rows(TmpDT.Rows.Count - 1)("CvePS").ToString = UsuarioActual.Empresa.Funcionalidad(112).ToString, TmpDT.Rows.Count - 2, TmpDT.Rows.Count - 1)
|
Dim Indice As Integer = If(TmpDT.Rows(TmpDT.Rows.Count - 1)("CvePS").ToString = UsuarioActual.Empresa.Funcionalidad(112).ToString, TmpDT.Rows.Count - 2, TmpDT.Rows.Count - 1)
|
||||||
@@ -7267,16 +7098,13 @@ Public Class Compra2
|
|||||||
TmpDT.Rows(Indice)("PU") = TmpDT.Rows(Indice)("PU").ToString.ToDecimal + tPU
|
TmpDT.Rows(Indice)("PU") = TmpDT.Rows(Indice)("PU").ToString.ToDecimal + tPU
|
||||||
TmpDT.Rows(Indice)("Total") = TmpDT.Rows(Indice)("Total").ToString.ToDecimal + ImporteAjuste
|
TmpDT.Rows(Indice)("Total") = TmpDT.Rows(Indice)("Total").ToString.ToDecimal + ImporteAjuste
|
||||||
TmpDT.Rows(Indice)("IEPSPS") = (TmpDT.Rows(Indice)("Total").ToString.ToDecimal() * TmpDT.Rows(Indice)("IEPSPSPorcentaje").ToString.ToDecimal()).RoundAD(2)
|
TmpDT.Rows(Indice)("IEPSPS") = (TmpDT.Rows(Indice)("Total").ToString.ToDecimal() * TmpDT.Rows(Indice)("IEPSPSPorcentaje").ToString.ToDecimal()).RoundAD(2)
|
||||||
'TmpDT.Rows(Indice)("IVA") = TmpDT.Rows(Indice)("PU").ToString.ToDecimal * TmpDT.Rows(Indice)("Cantidad").ToString.ToDecimal * TmpDT.Rows(Indice)("IVAPorcentaje").ToString.ToDecimal
|
|
||||||
TmpDT.Rows(Indice)("IVA") = (TmpDT.Rows(Indice)("PU").ToString.ToDecimal * TmpDT.Rows(Indice)("Cantidad").ToString.ToDecimal - TmpDT.Rows(Indice)("Descuento").ToString.ToDecimal) * TmpDT.Rows(Indice)("IVAPorcentaje").ToString.ToDecimal
|
TmpDT.Rows(Indice)("IVA") = (TmpDT.Rows(Indice)("PU").ToString.ToDecimal * TmpDT.Rows(Indice)("Cantidad").ToString.ToDecimal - TmpDT.Rows(Indice)("Descuento").ToString.ToDecimal) * TmpDT.Rows(Indice)("IVAPorcentaje").ToString.ToDecimal
|
||||||
'Row("IEPSPS") = Math.Round(IEPSPS, DecimalesPermitidos)
|
|
||||||
'Row("IEPSPSPorcentaje") = PorcentajeIEPS
|
|
||||||
TmpDT.AcceptChanges()
|
TmpDT.AcceptChanges()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
SubTotal = TmpDT.SUMD("Total")
|
SubTotal = TmpDT.SUMD("Total")
|
||||||
If Not EsCarga Then
|
If Not EsCarga Then
|
||||||
Descuentos = TmpDT.SUMD("Descuento")
|
Descuento = TmpDT.SUMD("Descuento")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
SubTotalConceptos = SubTotal
|
SubTotalConceptos = SubTotal
|
||||||
@@ -7321,6 +7149,262 @@ Public Class Compra2
|
|||||||
End If
|
End If
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Public Function AddCompra() As Boolean
|
||||||
|
|
||||||
|
If Not AjustesValidacion() Then
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim respuesta As Boolean = True
|
||||||
|
|
||||||
|
|
||||||
|
Dim ObjCompras As New ClsCompras
|
||||||
|
ObjCompras.IniciaTransacSQL()
|
||||||
|
|
||||||
|
If Not AddPrepolizaCabecera(ObjCompras.IniciaTransacSQL()) Then
|
||||||
|
respuesta = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
If respuesta And ObjCompras.AddCompra("Fac", Me.Descripcion, Me.Serie, Me.Folio, Me.FolioSecundario, Me.CveProveedor, Me.SubTotal, Me.Descuento,
|
||||||
|
Me.Amortizacion, Me.IVA, Me.RetIVA, Me.RetISR, Me.IEPS, Me.OtrosImpuestos,
|
||||||
|
Me.Redondeo, Me.Total, Me.Fecha, Me.CveMoneda, Me.TipoCambio, If(Me.FechaPago = Nothing, Me.Fecha, Me.FechaPago), Me.AplicaNotaCredito, Me.Observaciones, Me.CveEstatusFactura,
|
||||||
|
Me.CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Me.IdPoliza, CveCajaChica:=Me.CveCajaChica, CvePersonal:=Me.CvePersonal, NumeroReembolso:=Me.NumeroReembolso, CveProveedorSucursal:=Me.CveProveedorSucursal,
|
||||||
|
AplicoPromocion:=Me.AplicoPromocion, PorcentajeIVA:=Me.PorcentajeIVA, CveMetodoPago:=Me.CveMetodoPago, CveRetIVAConcepto:=Me.CveRetIVAConcepto,
|
||||||
|
CveConceptoContableAlmacen:=Me.CveConceptoContableAlmacen,
|
||||||
|
CveRetISRConcepto:=Me.CveRetISRConcepto, NoDeducible:=Me.NoDeducible, CveTipoCompra:=Me.CveTipoCompra, TotalOriginal:=Me.TotalOriginal, CveTipoConcepto:=Me.CveTipoConcepto,
|
||||||
|
EsImportacion:=Me.EsImportacion, CveFactura:=Me.CveFactura, CveSubProyecto:=Me.CveSubProyectoPrincipal, DoctosRelacionados:=Me.DocumentosRelacionadosUUIDSString, CveFolioGarantia:=Me.CveFolioGarantia) Then
|
||||||
|
Me.CveCompra = ObjCompras.CveCompra
|
||||||
|
Else
|
||||||
|
respuesta = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If respuesta AndAlso Me.CveCompra > 0 Then
|
||||||
|
|
||||||
|
For Each Row As DataRow In Me.TmpDT.Rows
|
||||||
|
|
||||||
|
Dim TipoRecepcion As Integer = -1
|
||||||
|
Dim Referencia = ""
|
||||||
|
Dim EsNoDeducible As Boolean = False
|
||||||
|
Dim CveAF = If(Row("CveActivoFijo").ToString.ToEntero > 0 AndAlso Row("TipoAF").ToString.ToEntero = 1, Row("CveActivoFijo").ToString.ToEntero, -1)
|
||||||
|
Dim CveAFC = If(Row("CveActivoFijo").ToString.ToEntero > 0 AndAlso Row("TipoAF").ToString.ToEntero = 2, Row("CveActivoFijo").ToString.ToEntero, -1)
|
||||||
|
|
||||||
|
If Not ObjCompras.AddCompraDetalle(Me.CveCompra, Row("CveUM").ToString.ToEntero, Row("CvePS").ToString.ToEntero, Row("CveSubProyecto").ToString.ToEntero, -1, CveAF,
|
||||||
|
Row("Cantidad").ToString.ToDecimal, Row("PU").ToString.ToDecimal, Row("IVA").ToString.ToDecimal, Row("Total").ToString.ToDecimal, Row("Descuento").ToString.ToDecimal,
|
||||||
|
Row("Obs").ToString, Row("CveOrdenCompraDetalle").ToString.ToEntero, TipoRecepcion, Row("CveContrato").ToString.ToEntero, Row("CvePresupuestoEgreso").ToString.ToEntero,
|
||||||
|
AplicaCostoIndirecto:=Row("AplicaCostoIndirecto").ToString.ToEntero, EstatusAlmacen:=Row("EntregaDirecta").ToString.ToEntero, CvePersonal:=CvePersonal,
|
||||||
|
CveTipoGasto:=Row("CveTipoGasto").ToString.ToEntero, AF_Medida:=Row("AFMedida").ToString.ToEntero, AF_TipoMantenimiento:=Row("AFTipoMantenimiento").ToString.ToEntero, Referencia:=Referencia, OtrosGastos:=Row("OtrosGastos").ToString.ToDecimal,
|
||||||
|
RetIVA:=Row("RetIVA").ToString.ToDecimal, RetISR:=Row("RetISR").ToString.ToDecimal, IEPSPS:=Row("IEPSPS").ToString.ToDecimal.RoundSQL, IEPSPSIVA:=Row("IEPSPSIVA").ToString.ToDecimal,
|
||||||
|
IVAPorcentaje:=Row("IVAPorcentaje").ToString.ToDecimal, RetIVAPorcentaje:=Row("RetIVAPorcentaje").ToString.ToDecimal, RetISRPorcentaje:=Row("RetISRPorcentaje").ToString.ToDecimal,
|
||||||
|
IEPSPSPorcentaje:=Row("IEPSPSPorcentaje").ToString.ToDecimal, IEPSPSIVAPorcentaje:=Row("IEPSPSIVAPorcentaje").ToString.ToDecimal, NoDeducible:=If((Row("NoDeducible").ToString().ToUpper().Contiene("TRUE", "1")) AndAlso EsNoDeducible, True, False),
|
||||||
|
CveContratoDetalle:=Row("CveContratoDetalle").ToString.ToEntero, CveCultivoCuadroDetalle:=Row("CveCultivoCuadroDetalle").ToString.ToEntero, CveActivoFijoCompra:=CveAFC) Then
|
||||||
|
|
||||||
|
respuesta = False
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
|
If respuesta Then
|
||||||
|
If Not AddPrepolizaDetalles(transaccion:=ObjCompras.IniciaTransacSQL()) Then
|
||||||
|
respuesta = False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
Dim ObjConta As New ClsContabilidad(ObjCompras.IniciaTransacSQL())
|
||||||
|
If respuesta AndAlso ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 4) Then
|
||||||
|
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||||
|
Errores.AppendLine($"eFacturas/Compras-Guardar | Error{ObjConta.MensajePolizaDescuadre} Diferencia{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}.")
|
||||||
|
GuardaLogAD($"eFacturas/Compras-Guardar | Error{ObjConta.MensajePolizaDescuadre} Diferencia{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||||
|
respuesta = False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
If respuesta Then
|
||||||
|
If Not ObjCompras.UpdateCompraFactura(Me.CveCompra, Me.CveFactura, Me.Serie, Me.Folio) Then
|
||||||
|
respuesta = False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If respuesta Then
|
||||||
|
ObjCompras.Commit()
|
||||||
|
Else
|
||||||
|
ObjCompras.RollBack()
|
||||||
|
End If
|
||||||
|
|
||||||
|
ObjCompras.Dispose()
|
||||||
|
|
||||||
|
|
||||||
|
Return respuesta
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Private Function AddPrepolizaCabecera(Optional transaccion As SqlTransaction = Nothing) As Boolean
|
||||||
|
|
||||||
|
Dim respuesta As Boolean = False
|
||||||
|
|
||||||
|
Dim ObjConta As ClsContabilidad
|
||||||
|
Dim DisposeClases As Boolean
|
||||||
|
|
||||||
|
|
||||||
|
If transaccion IsNot Nothing Then
|
||||||
|
ObjConta = New ClsContabilidad(transaccion)
|
||||||
|
DisposeClases = False
|
||||||
|
Else
|
||||||
|
ObjConta = New ClsContabilidad
|
||||||
|
DisposeClases = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
Dim ConceptoPoliza As String = String.Format("{0} - {1} - {2}", NombreProveedor, SerieFolio, "")
|
||||||
|
Me.CvePrePoliza = ObjConta.AddPrePolizas("eFacturas/Registrar", 1, Me.Total, Me.Total, Me.CveMoneda, Me.Fecha, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0, "", CveTipoPoliza:=Me.CveTipoPoliza)
|
||||||
|
respuesta = If(Me.CvePrePoliza > 0, True, False)
|
||||||
|
|
||||||
|
|
||||||
|
If DisposeClases Then
|
||||||
|
ObjConta.Dispose()
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
Return respuesta
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function AddPrepolizaDetalles(transaccion As SqlTransaction) As Boolean
|
||||||
|
Dim respuesta As Boolean = True
|
||||||
|
|
||||||
|
Dim ObjConta As ClsContabilidad
|
||||||
|
Dim DisposeClases As Boolean
|
||||||
|
|
||||||
|
|
||||||
|
If transaccion IsNot Nothing Then
|
||||||
|
ObjConta = New ClsContabilidad(transaccion)
|
||||||
|
DisposeClases = False
|
||||||
|
Else
|
||||||
|
ObjConta = New ClsContabilidad
|
||||||
|
DisposeClases = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim Concepto As String = $"{Me.NombreProveedor} {Me.SerieFolio}"
|
||||||
|
Dim Referencia As String = Me.SerieFolio
|
||||||
|
|
||||||
|
'TC del xml
|
||||||
|
|
||||||
|
'6
|
||||||
|
For Each RowDetalle As DataRow In TmpDT.FiltraParametros("ISNULL(TipoAF,0) <> 2", "", {"CveClasificacion", "CveSubProyecto"}).Rows
|
||||||
|
|
||||||
|
Dim importe = TmpDT.SUMD("Total", $" CveClasificacion = {RowDetalle("CveClasificacion").ToString} AND CveSubProyecto = {RowDetalle("CveSubProyecto").ToString}")
|
||||||
|
Dim importeMN = importe * Me.TipoCambio
|
||||||
|
|
||||||
|
|
||||||
|
If importeMN <> 0 Then
|
||||||
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, Referencia, 6, Concepto, Me.Fecha, -1, -1, CveCompra:=CveCompra, CveProveedor:=Me.CveProveedor, CveIE:=Me.CveIE, CvePersonal:=CvePersonal, CveCreditoDetalle:=Me.CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(TipoCambio = 1, 0, importe), TipoCambio:=TipoCambio,
|
||||||
|
CveClasificacion:=RowDetalle("CveClasificacion").ToString().ToEntero(), CveSubProyecto:=RowDetalle("CveSubProyecto").ToString().ToEntero(), Contabilizable:=True) Then
|
||||||
|
respuesta = False
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
Next
|
||||||
|
|
||||||
|
'14
|
||||||
|
If Me.IVA > 0 Then
|
||||||
|
Dim importeMovimiento As Decimal = Me.IVA
|
||||||
|
Dim importeMN As Decimal = importeMovimiento * Me.TipoCambio
|
||||||
|
|
||||||
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimiento, Referencia, 14, Concepto, Me.Fecha, -1, -1, CveCompra:=CveCompra, CveSubProyecto:=Me.CveSubProyectoPrincipal, CveProveedor:=Me.CveProveedor, CveIE:=Me.CveIE, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=Math.Round(importeMN, 2, MidpointRounding.AwayFromZero), ImporteME:=If(Me.TipoCambio = 1, 0, importeMovimiento), TipoCambio:=Me.TipoCambio, PorcentajeImpuesto:=Me.PorcentajeIVA, Contabilizable:=True) Then
|
||||||
|
respuesta = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
'25
|
||||||
|
If Me.IEPS > 0 Then
|
||||||
|
Dim importeMovimiento As Decimal = Me.IEPS
|
||||||
|
Dim importeMN As Decimal = importeMovimiento * Me.TipoCambio
|
||||||
|
|
||||||
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimiento, Referencia, 25, Concepto, Me.Fecha, -1, -1, CveCompra:=CveCompra, CveSubProyecto:=Me.CveSubProyectoPrincipal, CveProveedor:=Me.CveProveedor, CveIE:=Me.CveIE, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=Math.Round(importeMN, 2, MidpointRounding.AwayFromZero), ImporteME:=If(Me.TipoCambio = 1, 0, importeMovimiento), TipoCambio:=Me.TipoCambio, PorcentajeImpuesto:=0, Contabilizable:=True) Then
|
||||||
|
respuesta = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If Me.RetIVA > 0 Then
|
||||||
|
Dim importeMovimiento As Decimal = Me.RetIVA
|
||||||
|
Dim importeMN As Decimal = importeMovimiento * Me.TipoCambio
|
||||||
|
Dim ret As ConceptosRetenciones = ConceptoPrePolizaRetIVA
|
||||||
|
|
||||||
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimiento, Referencia, ret.CveConceptoxAcreditar, Concepto, Me.Fecha, -1, -1, CveCompra:=CveCompra, CveSubProyecto:=Me.CveSubProyectoPrincipal, CveProveedor:=Me.CveProveedor, CveIE:=Me.CveIE, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=Math.Round(importeMN, 2, MidpointRounding.AwayFromZero), ImporteME:=If(Me.TipoCambio = 1, 0, importeMovimiento), TipoCambio:=Me.TipoCambio, PorcentajeImpuesto:=0, Contabilizable:=True) Then
|
||||||
|
respuesta = False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Me.RetISR > 0 Then
|
||||||
|
Dim importeMovimiento As Decimal = Me.RetISR
|
||||||
|
Dim importeMN As Decimal = importeMovimiento * Me.TipoCambio
|
||||||
|
Dim ret As ConceptosRetenciones = ConceptoPrePolizaRetISR
|
||||||
|
|
||||||
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimiento, Referencia, ret.CveConceptoxAcreditar, Concepto, Me.Fecha, -1, -1, CveCompra:=CveCompra, CveSubProyecto:=Me.CveSubProyectoPrincipal, CveProveedor:=Me.CveProveedor, CveIE:=Me.CveIE, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=Math.Round(importeMN, 2, MidpointRounding.AwayFromZero), ImporteME:=If(Me.TipoCambio = 1, 0, importeMovimiento), TipoCambio:=Me.TipoCambio, PorcentajeImpuesto:=0, Contabilizable:=True) Then
|
||||||
|
respuesta = False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
'5
|
||||||
|
If respuesta Then
|
||||||
|
|
||||||
|
|
||||||
|
Dim importeMovimiento As Decimal = Me.Total
|
||||||
|
Dim importeMN As Decimal = importeMovimiento * Me.TipoCambio
|
||||||
|
Dim ConPreP As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(1, Me.CveMoneda, False, Me.CveTipoConceptoProveedor)
|
||||||
|
Dim ImporteME = importeMovimiento
|
||||||
|
|
||||||
|
Dim UsaComplementaria As Boolean = True
|
||||||
|
If Me.CveMoneda > 1 Then ImporteME = importeMovimiento
|
||||||
|
|
||||||
|
If UsuarioActual.CveEmpresa.Contiene(13, 83) Then 'caso excepcional de complementarias
|
||||||
|
UsaComplementaria = False
|
||||||
|
importeMN = importeMovimiento * Me.TipoCambio
|
||||||
|
Else
|
||||||
|
importeMN = importeMovimiento
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If respuesta AndAlso Me.CveMoneda > 1 AndAlso UsaComplementaria Then
|
||||||
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, 0, (importeMovimiento * TipoCambio - importeMovimiento).RoundSQL, ConPreP.CveConceptoComplementario, Referencia, Concepto, -1, CveCompra:=Me.CveCompra, CveProveedor:=Me.CveProveedor, CveIE:=Me.CveIE, CvePersonal:=Me.CvePersonal, CveCompraAmortizacion:=Me.CveCompraAmortizacion, TipoCambio:=Me.TipoCambio, TipoCambioPago:=1, ImporteME:=ImporteME, CveSubProyecto:=Me.CveSubProyecto) Then
|
||||||
|
respuesta = False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimiento, Referencia, ConPreP.CveConcepto, Concepto, Me.Fecha, -1, -1, CveCompra:=CveCompra, CveSubProyecto:=Me.CveSubProyectoPrincipal, CveProveedor:=Me.CveProveedor, CveIE:=Me.CveIE, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=Math.Round(importeMN, 2, MidpointRounding.AwayFromZero), ImporteME:=If(Me.TipoCambio = 1, 0, importeMovimiento), TipoCambio:=Me.TipoCambio, PorcentajeImpuesto:=0, Contabilizable:=True) Then
|
||||||
|
respuesta = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If DisposeClases Then
|
||||||
|
If respuesta Then
|
||||||
|
ObjConta.Commit()
|
||||||
|
Else
|
||||||
|
ObjConta.RollBack()
|
||||||
|
End If
|
||||||
|
|
||||||
|
ObjConta.Dispose()
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
Return respuesta
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -63,52 +63,62 @@
|
|||||||
<asp:RequiredFieldValidator ID="RFVDdlCuentas" runat="server" InitialValue="-1" ControlToValidate="DdlCuentas" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVDdlCuentas" runat="server" InitialValue="-1" ControlToValidate="DdlCuentas" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="CERFVDdlCuentas" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlCuentas" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="CERFVDdlCuentas" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlCuentas" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-1 truncate">
|
<div class="col-md-1 truncate">
|
||||||
Ejercicio:
|
Fecha Inicio:
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1" style="min-width: 115px">
|
||||||
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||||
|
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||||
|
<span class="input-group-btn ">
|
||||||
|
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-1" style="min-width: 105px">
|
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
<asp:DropDownList ID="DdlEjercicio" runat="server" DataTextField="Ejercicio" DataValueField="Ejercicio" CssClass="form-control input-sm select2me" Style="width: 80px !important;" ValidationGroup="GrpCargaAsignados"></asp:DropDownList>
|
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
</div>
|
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||||
<div class="col-md-1 truncate">
|
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||||
Periodo:
|
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
</div>
|
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
<div class="col-md-1" style="min-width: 105px">
|
</div>
|
||||||
<asp:DropDownList ID="DdlPeriodo" runat="server" Width="100px" CssClass="select2me">
|
<div class="col-md-1 truncate">
|
||||||
<asp:ListItem Text="Enero" Value="1"></asp:ListItem>
|
Fecha Fin:
|
||||||
<asp:ListItem Text="Febrero" Value="2"></asp:ListItem>
|
</div>
|
||||||
<asp:ListItem Text="Marzo" Value="3"></asp:ListItem>
|
<div class="col-md-1" style="min-width: 115px">
|
||||||
<asp:ListItem Text="Abril" Value="4"></asp:ListItem>
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||||
<asp:ListItem Text="Mayo" Value="5"></asp:ListItem>
|
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||||
<asp:ListItem Text="Junio" Value="6"></asp:ListItem>
|
<span class="input-group-btn ">
|
||||||
<asp:ListItem Text="Julio" Value="7"></asp:ListItem>
|
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
<asp:ListItem Text="Agosto" Value="8"></asp:ListItem>
|
</span>
|
||||||
<asp:ListItem Text="Septiembre" Value="9"></asp:ListItem>
|
|
||||||
<asp:ListItem Text="Octubre" Value="10"></asp:ListItem>
|
|
||||||
<asp:ListItem Text="Noviembre" Value="11"></asp:ListItem>
|
|
||||||
<asp:ListItem Text="Diciembre" Value="12"></asp:ListItem>
|
|
||||||
</asp:DropDownList>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-1 truncate">
|
|
||||||
<asp:Label ID="LblSubProyecto" runat="server" Text="Label"></asp:Label>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-1" style="min-width: 115px">
|
|
||||||
<asp:DropDownList ID="DdlSubProyecto" Width="200px" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
|
||||||
</div>
|
</div>
|
||||||
|
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
|
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
|
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||||
|
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
<div class="col-md-1 truncate">
|
||||||
|
<asp:Label ID="LblSubProyecto" runat="server" Text="Label"></asp:Label>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1" style="min-width: 115px">
|
||||||
|
<asp:DropDownList ID="DdlSubProyecto" Width="100%" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||||
|
</div>
|
||||||
<div class="col-md-1 truncate">
|
<div class="col-md-1 truncate">
|
||||||
Divisor:
|
Divisor:
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2 truncate">
|
<div class="col-md-2 truncate">
|
||||||
<asp:DropDownList ID="DdlDivisor" Width="80px" runat="server" CssClass="form-control input-sm select2me">
|
<asp:DropDownList ID="DdlDivisor" Width="80px" runat="server" CssClass="form-control input-sm select2me">
|
||||||
<asp:ListItem Text="1" Value="1" Selected="True"></asp:ListItem>
|
<asp:ListItem Text="1" Value="1" Selected="True"></asp:ListItem>
|
||||||
<asp:ListItem Text="1,000" Value="1000"></asp:ListItem>
|
<asp:ListItem Text="1,000" Value="1000"></asp:ListItem>
|
||||||
<asp:ListItem Text="1,000,000" Value="1000000"></asp:ListItem>
|
<asp:ListItem Text="1,000,000" Value="1000000"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -95,12 +95,10 @@ Partial Class Contabilidad2_RepAnexoCatalogoCC
|
|||||||
|
|
||||||
InicializaValores()
|
InicializaValores()
|
||||||
|
|
||||||
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto)
|
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto)
|
||||||
|
|
||||||
DdlEjercicio.SelectedValueExist(EjercicioParametro.ToString)
|
|
||||||
DdlSubProyecto.SelectedValueExist(SubProyectoParametro.ToString)
|
DdlSubProyecto.SelectedValueExist(SubProyectoParametro.ToString)
|
||||||
DdlDivisor.SelectedValueExist(DivisorParametro.ToString)
|
DdlDivisor.SelectedValueExist(DivisorParametro.ToString)
|
||||||
DdlPeriodo.SelectedValueExist(Periodo)
|
|
||||||
|
|
||||||
|
|
||||||
If CveCuenta > 0 Then
|
If CveCuenta > 0 Then
|
||||||
@@ -117,46 +115,17 @@ Partial Class Contabilidad2_RepAnexoCatalogoCC
|
|||||||
#Region " INICIALIZA VALORES "
|
#Region " INICIALIZA VALORES "
|
||||||
Private Sub InicializaValores()
|
Private Sub InicializaValores()
|
||||||
CargaCombos()
|
CargaCombos()
|
||||||
|
txtFechaI.Text = Now.FirstDayOfMonth.ToShortDateString
|
||||||
|
txtFechaF.Text = Now.LastDayOfMonth.ToShortDateString
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaCombos()
|
Private Sub CargaCombos()
|
||||||
|
|
||||||
Dim Conta As New ClsContabilidad
|
|
||||||
If Conta.GetEjercicios(UsuarioActual.CveEmpresa) Then
|
|
||||||
DdlEjercicio.DataSource = Conta.DtResultados
|
|
||||||
Else
|
|
||||||
DdlEjercicio.DataSource = Nothing
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim strGlobal As String = ""
|
|
||||||
|
|
||||||
If Conta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
|
|
||||||
Dim dr As DataRow = Conta.DtResultados.FiltroPrimero("Codigo IN ('_GLOBAL')")
|
|
||||||
If dr IsNot Nothing Then strGlobal = dr.Item(0).ToString
|
|
||||||
DdlCuentas.DataSource = Conta.DtResultados
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
Conta.Dispose()
|
|
||||||
|
|
||||||
DdlEjercicio.DataBind()
|
|
||||||
DdlEjercicio.SelectedValueExist(Now.Year.ToString)
|
|
||||||
|
|
||||||
|
DdlCuentas.DataSource = GlobalDTContaCuentasContables(UsuarioActual.CveEmpresa).FiltraParametros("Codigo NOT IN ('_ACTIVO', '_PASIVO', '_CAPITAL', '_CUADRE', '_ESTADISTICAS', '_ORDEN', '_RACREEDOR', '_RDEUDOR', '_UTILIDAD')")
|
||||||
DdlCuentas.DataBind()
|
DdlCuentas.DataBind()
|
||||||
|
|
||||||
'DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa)
|
|
||||||
'DdlSubProyecto.DataBind()
|
|
||||||
'DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
|
|
||||||
'DdlSubProyecto.SelectedValue = "-1"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
@@ -177,7 +146,7 @@ Partial Class Contabilidad2_RepAnexoCatalogoCC
|
|||||||
DTDatos = New DataTable
|
DTDatos = New DataTable
|
||||||
Dim Conta As New ClsContabilidad
|
Dim Conta As New ClsContabilidad
|
||||||
|
|
||||||
If Conta.GetAnexoCatalagoCC(DdlCuentas.SelectedValue.ToEntero, DdlEjercicio.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlDivisor.SelectedValue.ToEntero, DdlPeriodo.SelectedValue.ToEntero, UsuarioActual.CveUsuario) Then
|
If Conta.GetAnexoCatalagoCC(DdlCuentas.SelectedValue.ToEntero, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlDivisor.SelectedValue.ToEntero, UsuarioActual.CveUsuario) Then
|
||||||
|
|
||||||
DTHeaders = Conta.DSResultados.Tables(0)
|
DTHeaders = Conta.DSResultados.Tables(0)
|
||||||
DTDatos = Conta.DSResultados.Tables(1)
|
DTDatos = Conta.DSResultados.Tables(1)
|
||||||
@@ -279,7 +248,7 @@ Partial Class Contabilidad2_RepAnexoCatalogoCC
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If Importe <> 0 Then
|
If Importe <> 0 Then
|
||||||
e.Row.Cells(Index).Text = $"<a { If(Importe < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF=31/12/{DdlEjercicio.SelectedValue}&FI=01/01/{DdlEjercicio.SelectedValue}&ER=1&CveSubProyecto={ If(DRow("CveSubProyecto").ToString.ToEntero > 0, DRow("CveSubProyecto").ToString, "-1")}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Importe.ToString("###,###,##0"), Importe.ToString("###,###,###.00")) }</a>"
|
'' pendiente.. ' e.Row.Cells(Index).Text = $"<a { If(Importe < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF=31/12/{DdlEjercicio.SelectedValue}&FI=01/01/{DdlEjercicio.SelectedValue}&ER=1&CveSubProyecto={ If(DRow("CveSubProyecto").ToString.ToEntero > 0, DRow("CveSubProyecto").ToString, "-1")}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Importe.ToString("###,###,##0"), Importe.ToString("###,###,###.00")) }</a>"
|
||||||
End If
|
End If
|
||||||
Index += 1
|
Index += 1
|
||||||
|
|
||||||
@@ -309,7 +278,7 @@ Partial Class Contabilidad2_RepAnexoCatalogoCC
|
|||||||
'SbFiltros.AppendFormat("Fecha Inicio: {0} Fecha Fin: {1}|", $"01/01/{DdlEjercicio.SelectedValue}", $"31/12/{DdlEjercicio.SelectedValue}")
|
'SbFiltros.AppendFormat("Fecha Inicio: {0} Fecha Fin: {1}|", $"01/01/{DdlEjercicio.SelectedValue}", $"31/12/{DdlEjercicio.SelectedValue}")
|
||||||
SbFiltros.AppendFormat("SubProyecto : {0}|", DdlSubProyecto.SelectedItem.Text)
|
SbFiltros.AppendFormat("SubProyecto : {0}|", DdlSubProyecto.SelectedItem.Text)
|
||||||
If DdlDivisor.SelectedValue <> "1" Then SbFiltros.AppendFormat("Divisor : {0}|", DdlDivisor.SelectedItem.Text)
|
If DdlDivisor.SelectedValue <> "1" Then SbFiltros.AppendFormat("Divisor : {0}|", DdlDivisor.SelectedItem.Text)
|
||||||
SbFiltros.AppendFormat("Ejercicio : {0} Periodo : {1}|", DdlEjercicio.SelectedItem.Text, DdlPeriodo.SelectedItem.Text)
|
'SbFiltros.AppendFormat("Ejercicio : {0} Periodo : {1}|", DdlEjercicio.SelectedItem.Text, DdlPeriodo.SelectedItem.Text)
|
||||||
|
|
||||||
|
|
||||||
GvCC.ExportToExcelGembox("AnexoCatálogoMensual", UsuarioActual, $"Estado de Resultados Horizontal por {LblSubProyecto.Text}", DatoTituloExtra:="", DatosFiltros:=SbFiltros.ToString())
|
GvCC.ExportToExcelGembox("AnexoCatálogoMensual", UsuarioActual, $"Estado de Resultados Horizontal por {LblSubProyecto.Text}", DatoTituloExtra:="", DatosFiltros:=SbFiltros.ToString())
|
||||||
|
|||||||
Binary file not shown.
13
OC/OC.aspx
13
OC/OC.aspx
@@ -1240,12 +1240,12 @@
|
|||||||
<asp:TextBox ID="TxtIEPS" Enabled="false" ClientIDMode="Static" onkeyup="FormatoMoneda(this);SumaTotal();" Width="100px" Font-Size="10.5" BackColor="#eeeeee" runat="server" BorderStyle="None" Style="text-align: right;" Text="0.00" />
|
<asp:TextBox ID="TxtIEPS" Enabled="false" ClientIDMode="Static" onkeyup="FormatoMoneda(this);SumaTotal();" Width="100px" Font-Size="10.5" BackColor="#eeeeee" runat="server" BorderStyle="None" Style="text-align: right;" Text="0.00" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr runat="server" id="TrRetIVA" class="text-right" visible="false">
|
|
||||||
|
|
||||||
|
<tr runat="server" id="TrRetIVA" class="text-right" visible="false">
|
||||||
<td><b>Ret IVA:</b></td>
|
<td><b>Ret IVA:</b></td>
|
||||||
<td>
|
<td>
|
||||||
|
<asp:TextBox ID="TxtRetIVA" ClientIDMode="Static" onkeyup="FormatoMoneda(this);SumaTotal();" Width="100px" onblur="AplicaRetIVAGeneral();" Font-Size="10.5" BackColor="#f7f7f7" runat="server" BorderStyle="None" Style="text-align: right;" Text="0.00" />
|
||||||
<asp:TextBox ID="TxtRetIVA" ClientIDMode="Static" Width="100px" Enabled="false"
|
|
||||||
Font-Size="10.5" BackColor="#eeeeee" runat="server" BorderStyle="None" Style="text-align: right;" Text="0.00" />
|
|
||||||
<asp:Button Text="" Style="display: none" ClientIDMode="Static" ID="BtnLimpiarRetIVA" OnClick="BtnLimpiarRetIVA_Click" runat="server" />
|
<asp:Button Text="" Style="display: none" ClientIDMode="Static" ID="BtnLimpiarRetIVA" OnClick="BtnLimpiarRetIVA_Click" runat="server" />
|
||||||
<asp:Button Text="" Style="display: none" ClientIDMode="Static" ID="BtnAplicarRetIVA" OnClick="BtnAplicarRetIVA_Click" runat="server" />
|
<asp:Button Text="" Style="display: none" ClientIDMode="Static" ID="BtnAplicarRetIVA" OnClick="BtnAplicarRetIVA_Click" runat="server" />
|
||||||
<asp:HiddenField ClientIDMode="Static" Value="0" runat="server" ID="HdnRetIVA" />
|
<asp:HiddenField ClientIDMode="Static" Value="0" runat="server" ID="HdnRetIVA" />
|
||||||
@@ -1254,12 +1254,13 @@
|
|||||||
<tr runat="server" id="TrRetISR" class="text-right" visible="false">
|
<tr runat="server" id="TrRetISR" class="text-right" visible="false">
|
||||||
<td><b>Ret ISR:</b></td>
|
<td><b>Ret ISR:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<asp:TextBox ID="TxtRetISR" ClientIDMode="Static" Width="100px" Enabled="false"
|
<asp:TextBox ID="TxtRetISR" ClientIDMode="Static" onkeyup="FormatoMoneda(this);SumaTotal();" Width="100px" onblur="AplicaRetISRGeneral();" Font-Size="10.5" BackColor="#f7f7f7" runat="server" BorderStyle="None" Style="text-align: right;" Text="0.00" />
|
||||||
Font-Size="10.5" BackColor="#eeeeee" runat="server" BorderStyle="None" Style="text-align: right;" Text="0.00" />
|
|
||||||
<asp:Button Text="" Style="display: none" ClientIDMode="Static" ID="BtnAplicarRetISR" OnClick="BtnAplicarRetISR_Click" runat="server" />
|
<asp:Button Text="" Style="display: none" ClientIDMode="Static" ID="BtnAplicarRetISR" OnClick="BtnAplicarRetISR_Click" runat="server" />
|
||||||
<asp:HiddenField ClientIDMode="Static" Value="0" runat="server" ID="HdnRetISR" />
|
<asp:HiddenField ClientIDMode="Static" Value="0" runat="server" ID="HdnRetISR" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
<tr align="right">
|
<tr align="right">
|
||||||
<td><b>Total:</b></td>
|
<td><b>Total:</b></td>
|
||||||
<td style="text-align: right;">
|
<td style="text-align: right;">
|
||||||
|
|||||||
@@ -73,8 +73,8 @@
|
|||||||
<ajax:TabPanel ID="TabCxP" runat="server" HeaderText="<i class='fa fa-list-alt'></i> Cuentas x Cobrar" Visible="False">
|
<ajax:TabPanel ID="TabCxP" runat="server" HeaderText="<i class='fa fa-list-alt'></i> Cuentas x Cobrar" Visible="False">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
<asp:Button ID="BtnRecargaCxP" ClientIDMode="Static" runat="server" Style="display: none;" Text="ConsultarCxP" class="btn btn-primary" />
|
<asp:Button ID="BtnRecargaCxP" ClientIDMode="Static" runat="server" Style="display: none;" Text="ConsultarCxP" class="btn btn-primary xspadding" />
|
||||||
<table border="0" class="contenido, Widthall " style="font-size: larger">
|
<table border="0" class="contenido, Widthall input-sm" >
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -103,8 +103,7 @@
|
|||||||
</table>
|
</table>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-4">
|
||||||
|
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend><b>Resumen de Cuentas x Pagar</b>
|
<legend><b>Resumen de Cuentas x Pagar</b>
|
||||||
</legend>
|
</legend>
|
||||||
@@ -155,10 +154,7 @@
|
|||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
@@ -179,9 +175,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<asp:UpdatePanel ID="UPPCxP" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UPPCxP" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:GridView ID="GvCxP" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas X Cobrar Pendientes" CssClass="ScrollAD table table-striped table-advance table-hover Widthall" Style="text-align: center;" GridLines="None">
|
<asp:GridView ID="GvCxP" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas X Cobrar Pendientes" CssClass="ScrollAD table table-striped table-advance table-hover Widthall input-sm" Style="text-align: center;" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
|
|
||||||
<asp:BoundField DataField="SerieFolio" HeaderText="Factura" />
|
<asp:BoundField DataField="SerieFolio" HeaderText="Factura" />
|
||||||
<asp:BoundField DataField="Fecha" DataFormatString="{0:d}" HeaderText="Fecha Venta" />
|
<asp:BoundField DataField="Fecha" DataFormatString="{0:d}" HeaderText="Fecha Venta" />
|
||||||
<asp:BoundField DataField="FechaVencimiento" DataFormatString="{0:d}" HeaderText="Fecha Vencimiento" />
|
<asp:BoundField DataField="FechaVencimiento" DataFormatString="{0:d}" HeaderText="Fecha Vencimiento" />
|
||||||
@@ -201,13 +196,11 @@
|
|||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
<br />
|
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
||||||
<td colspan="2"> </td>
|
<td colspan="2"> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -222,7 +215,7 @@
|
|||||||
</legend>
|
</legend>
|
||||||
<asp:UpdatePanel ID="UPGvCxPHistorial" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UPGvCxPHistorial" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:GridView ID="GvCxPHistorial" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró Historial de Cuentas X Cobrar" CssClass="ScrollAD table table-striped table-advance table-hover Widthall" Style="text-align: center;" GridLines="None">
|
<asp:GridView ID="GvCxPHistorial" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró Historial de Cuentas X Cobrar" CssClass="ScrollAD table table-striped table-advance table-hover Widthall input-sm" Style="text-align: center;" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
|
|
||||||
<asp:BoundField DataField="SerieFolio" HeaderText="Factura" />
|
<asp:BoundField DataField="SerieFolio" HeaderText="Factura" />
|
||||||
@@ -262,7 +255,7 @@
|
|||||||
|
|
||||||
<ajax:TabPanel ID="TabBancos" runat="server" HeaderText="<i class='fa fa-bank'></i> Bancos" Visible="False">
|
<ajax:TabPanel ID="TabBancos" runat="server" HeaderText="<i class='fa fa-bank'></i> Bancos" Visible="False">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<table border="0" class="contenido, Widthall" style="font-size: larger;">
|
<table border="0" class="contenido, Widthall input-sm" >
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
|
||||||
@@ -276,7 +269,7 @@
|
|||||||
</legend>
|
</legend>
|
||||||
<asp:UpdatePanel ID="UpCuentasBancos" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpCuentasBancos" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:GridView ID="GvBancosCuentas" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" ToolTip="Listado de Cuentas Bancarias" CssClass="ScrollAD table table-striped table-advance table-hover Widthall" Style="text-align: center;" GridLines="None">
|
<asp:GridView ID="GvBancosCuentas" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" ToolTip="Listado de Cuentas Bancarias" CssClass="ScrollAD table table-striped table-advance table-hover Widthall input-sm" Style="text-align: center;" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField DataField="BancoNombre" HeaderText="NombreBanco" />
|
<asp:BoundField DataField="BancoNombre" HeaderText="NombreBanco" />
|
||||||
<asp:BoundField DataField="Sucursal" HeaderText="Num Sucursal" />
|
<asp:BoundField DataField="Sucursal" HeaderText="Num Sucursal" />
|
||||||
@@ -307,7 +300,7 @@
|
|||||||
</legend>
|
</legend>
|
||||||
<asp:UpdatePanel runat="server" ID="UpGvBancos" UpdateMode="Conditional">
|
<asp:UpdatePanel runat="server" ID="UpGvBancos" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:GridView ID="GvBancos" ViewStateMode="Enabled" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró Historial" CssClass="ScrollAD table table-striped table-advance table-hover Widthall"
|
<asp:GridView ID="GvBancos" ViewStateMode="Enabled" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró Historial" CssClass="ScrollAD table table-striped table-advance table-hover Widthall input-sm"
|
||||||
Style="text-align: center;" GridLines="None" DataKeyNames="Comprobante">
|
Style="text-align: center;" GridLines="None" DataKeyNames="Comprobante">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField DataField="SerieFolio" HeaderText="Factura" />
|
<asp:BoundField DataField="SerieFolio" HeaderText="Factura" />
|
||||||
@@ -346,11 +339,8 @@
|
|||||||
</ajax:TabPanel>
|
</ajax:TabPanel>
|
||||||
|
|
||||||
<ajax:TabPanel ID="TabAnticipos" runat="server" HeaderText="<i class='fa fa-dollar'></i> Anticipos / NC" Visible="False">
|
<ajax:TabPanel ID="TabAnticipos" runat="server" HeaderText="<i class='fa fa-dollar'></i> Anticipos / NC" Visible="False">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
<table border="0" class="contenido, Widthall input-sm" >
|
||||||
|
|
||||||
|
|
||||||
<table border="0" class="contenido, Widthall " style="font-size: larger;">
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<div>
|
<div>
|
||||||
@@ -367,7 +357,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<asp:UpdatePanel runat="server" ID="UpAnticipos" UpdateMode="Conditional">
|
<asp:UpdatePanel runat="server" ID="UpAnticipos" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:GridView ID="GvA" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Anticipos" CssClass="ScrollAD table table-striped table-advance table-hover Widthall " Style="text-align: center;" GridLines="None">
|
<asp:GridView ID="GvA" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Anticipos" CssClass="ScrollAD table table-striped table-advance table-hover Widthall input-sm " Style="text-align: center;" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
|
|
||||||
<asp:BoundField DataField="SerieFolio" HeaderText="NC/Anticipo" />
|
<asp:BoundField DataField="SerieFolio" HeaderText="NC/Anticipo" />
|
||||||
@@ -379,7 +369,6 @@
|
|||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -400,7 +389,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<asp:UpdatePanel ID="UPGvAH" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UPGvAH" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:GridView ID="GvAH" runat="server" AutoGenerateColumns="False" EmptyDataText="" CssClass="ScrollAD table table-striped table-advance table-hover Widthall" Style="text-align: center;" GridLines="None">
|
<asp:GridView ID="GvAH" runat="server" AutoGenerateColumns="False" EmptyDataText="" CssClass="ScrollAD table table-striped table-advance table-hover Widthall input-sm" Style="text-align: center;" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
|
|
||||||
<asp:BoundField DataField="SerieFolio" HeaderText="NC/Anticipo" />
|
<asp:BoundField DataField="SerieFolio" HeaderText="NC/Anticipo" />
|
||||||
@@ -439,7 +428,7 @@
|
|||||||
|
|
||||||
<ajax:TabPanel ID="TabHistorial" runat="server" HeaderText="<i class='fa fa-book'></i> Historial de Ventas" Visible="False">
|
<ajax:TabPanel ID="TabHistorial" runat="server" HeaderText="<i class='fa fa-book'></i> Historial de Ventas" Visible="False">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<table border="0" class="contenido, Widthall " style="font-size: larger;">
|
<table border="0" class="contenido, Widthall input-sm" >
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<fieldset>
|
<fieldset>
|
||||||
@@ -489,7 +478,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<asp:UpdatePanel ID="UpnHistorial" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpnHistorial" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:GridView ID="GVHistorial" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron ventas del proveedor" ToolTip="Listado de Historial de Ventas" CssClass="ScrollAD table table-striped table-advance table-hover Widthall" Style="text-align: center;" GridLines="None">
|
<asp:GridView ID="GVHistorial" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron ventas del proveedor" ToolTip="Listado de Historial de Ventas" CssClass="ScrollAD table table-striped table-advance table-hover Widthall input-sm" Style="text-align: center;" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField DataField="SerieFolio" DataFormatString="" HeaderText="Factura" />
|
<asp:BoundField DataField="SerieFolio" DataFormatString="" HeaderText="Factura" />
|
||||||
<asp:BoundField DataField="Descripcion" DataFormatString="" ItemStyle-HorizontalAlign="left" HeaderText="Descripción" />
|
<asp:BoundField DataField="Descripcion" DataFormatString="" ItemStyle-HorizontalAlign="left" HeaderText="Descripción" />
|
||||||
@@ -527,7 +516,7 @@
|
|||||||
|
|
||||||
<ajax:TabPanel ID="TabSistema" runat="server" HeaderText="<i class='fa fa-tasks'></i> Sistema" Visible="False">
|
<ajax:TabPanel ID="TabSistema" runat="server" HeaderText="<i class='fa fa-tasks'></i> Sistema" Visible="False">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<table border="0" class="contenido, Widthall " style="font-size: larger;">
|
<table border="0" class="contenido, Widthall input-sm" >
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
|
||||||
|
|||||||
@@ -379,7 +379,10 @@ Partial Class Portal_PortalProveedor
|
|||||||
|
|
||||||
'= ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Hist'").
|
'= ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Hist'").
|
||||||
DTGvCxPHistorial = ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Hist'")
|
DTGvCxPHistorial = ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Hist'")
|
||||||
GvCxPHistorial.DataSource = DTGvCxPHistorial.AsEnumerable().Take(11).CopyToDataTable()
|
If DTGvCxPHistorial.Rows.Count > 11 Then
|
||||||
|
GvCxPHistorial.DataSource = DTGvCxPHistorial.AsEnumerable().Take(11).CopyToDataTable()
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
|
|||||||
@@ -152,12 +152,12 @@
|
|||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TipoTxt" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
|
<asp:TextBox ID="TipoTxt" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="RfvTxtTiposD" runat="server" ControlToValidate="TipoTxt" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RfvTxtTiposD" runat="server" ControlToValidate="TipoTxt" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
||||||
<label for="TipoTxt">Tipo:</label>
|
<label for="TipoTxt">Tipo:</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtTipoCorto" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
|
<asp:TextBox ID="TxtTipoCorto" CssClass="form-control " runat="server" MaxLength="3" CausesValidation="true"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtTipoCorto" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Corto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtTipoCorto" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Corto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
||||||
<label for="TipoTxt">TipoCorto:</label>
|
<label for="TipoTxt">TipoCorto:</label>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ Partial Class RH_CatAsistenciasInasistencias
|
|||||||
AplicaAguinaldo.Checked = False
|
AplicaAguinaldo.Checked = False
|
||||||
AplicaUtilidades.Checked = False
|
AplicaUtilidades.Checked = False
|
||||||
TipoTxt.Text = ""
|
TipoTxt.Text = ""
|
||||||
|
TxtTipoCorto.Text = ""
|
||||||
UpModalTiposD.Update()
|
UpModalTiposD.Update()
|
||||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposD"))
|
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposD"))
|
||||||
|
|
||||||
@@ -90,7 +91,7 @@ Partial Class RH_CatAsistenciasInasistencias
|
|||||||
|
|
||||||
|
|
||||||
If ObjAsistenciasInasistencias.AddAsistenciasInasistencias(TipoTxt.Text.Trim, chkAplicaFalta, chkAplicaNoAplica, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
|
If ObjAsistenciasInasistencias.AddAsistenciasInasistencias(TipoTxt.Text.Trim, chkAplicaFalta, chkAplicaNoAplica, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
|
||||||
chkAplicaVacacion, chkAplicaIncapacidad, chkAplicaRetardo, chkAplicaAguinaldo, chkAplicaUtilidades, aplicaPago, aplicaPagoDoble, aplicaPrimaVac) Then
|
chkAplicaVacacion, chkAplicaIncapacidad, chkAplicaRetardo, chkAplicaAguinaldo, chkAplicaUtilidades, aplicaPago, aplicaPagoDoble, aplicaPrimaVac, TxtTipoCorto.Text) Then
|
||||||
TipoTxt.Text = ""
|
TipoTxt.Text = ""
|
||||||
Alert("El nuevo Tipo Asistencias/Inasistencias se guardó correctamente.", TipoMensaje.MsgInformacion)
|
Alert("El nuevo Tipo Asistencias/Inasistencias se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||||
UpTitulos.Update()
|
UpTitulos.Update()
|
||||||
@@ -151,6 +152,7 @@ chkAplicaVacacion, chkAplicaIncapacidad, chkAplicaRetardo, chkAplicaAguinaldo, c
|
|||||||
Protected Sub GvDatos_RowUpdating(sender As Object, e As EventArgs) Handles BtnEditarTiposDModal.Click '(Leer primero "GvDatos_RowEditing")Se manda la informacion a un procedmiento que hace la actualizacion
|
Protected Sub GvDatos_RowUpdating(sender As Object, e As EventArgs) Handles BtnEditarTiposDModal.Click '(Leer primero "GvDatos_RowEditing")Se manda la informacion a un procedmiento que hace la actualizacion
|
||||||
Dim ObjAsistenciasInasistencias As New ClsRH
|
Dim ObjAsistenciasInasistencias As New ClsRH
|
||||||
Dim Tipo As String = TipoTxt.Text.Trim
|
Dim Tipo As String = TipoTxt.Text.Trim
|
||||||
|
Dim TipoCorto As String = TxtTipoCorto.Text.Trim
|
||||||
Dim Estatus As Boolean = ChkEstatus.Checked
|
Dim Estatus As Boolean = ChkEstatus.Checked
|
||||||
Dim ckAplicaFalta As Boolean = Not AplicaFalta.Checked
|
Dim ckAplicaFalta As Boolean = Not AplicaFalta.Checked
|
||||||
Dim AplicaAsistencia As Boolean = AplicaNoAplica.Checked
|
Dim AplicaAsistencia As Boolean = AplicaNoAplica.Checked
|
||||||
@@ -173,7 +175,7 @@ chkAplicaVacacion, chkAplicaIncapacidad, chkAplicaRetardo, chkAplicaAguinaldo, c
|
|||||||
|
|
||||||
If ObjAsistenciasInasistencias.UpdateAsistenciasInasistencias(Tipo, ckAplicaFalta, AplicaAsistencia, Estatus, CveAsistenciasInasistencias,
|
If ObjAsistenciasInasistencias.UpdateAsistenciasInasistencias(Tipo, ckAplicaFalta, AplicaAsistencia, Estatus, CveAsistenciasInasistencias,
|
||||||
chkAplicaVacacion, chkAplicaIncapacidad, chkAplicaRetardo, chkAplicaAguinaldo, chkAplicaUtilidades, aplicaPago, aplicaPagoDoble,
|
chkAplicaVacacion, chkAplicaIncapacidad, chkAplicaRetardo, chkAplicaAguinaldo, chkAplicaUtilidades, aplicaPago, aplicaPagoDoble,
|
||||||
aplicaPrimaVac) Then
|
aplicaPrimaVac, TxtTipoCorto.Text) Then
|
||||||
GvDatos.EditIndex = -1
|
GvDatos.EditIndex = -1
|
||||||
ViewState("DTAsistenciasInasistencias") = ObjAsistenciasInasistencias.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
ViewState("DTAsistenciasInasistencias") = ObjAsistenciasInasistencias.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||||
GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa) = Nothing
|
GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa) = Nothing
|
||||||
|
|||||||
@@ -3093,7 +3093,7 @@
|
|||||||
</asp:Panel>
|
</asp:Panel>
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-6">
|
<div class="col-md-3">
|
||||||
<div class="form-group form-md-line-input input-iconright " style="width: 100px !important">
|
<div class="form-group form-md-line-input input-iconright " style="width: 100px !important">
|
||||||
<div class="input-group input-sm date date-picker" data-date-format="dd/mm/yyyy" style="width: 160px;">
|
<div class="input-group input-sm date date-picker" data-date-format="dd/mm/yyyy" style="width: 160px;">
|
||||||
<asp:TextBox ID="TxtFechaFinVac" runat="server" CausesValidation="true" CssClass="form-control input-sm" ClientIDMode="Static"></asp:TextBox>
|
<asp:TextBox ID="TxtFechaFinVac" runat="server" CausesValidation="true" CssClass="form-control input-sm" ClientIDMode="Static"></asp:TextBox>
|
||||||
@@ -3107,23 +3107,20 @@
|
|||||||
<br />
|
<br />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="form-group form-md-line-input input-iconright calendarlinealinput form-small">
|
||||||
|
<asp:TextBox ID="Txtdiasinabiles" runat="server" TextMode="Number" CausesValidation="true" CssClass="form-control input-sm form-small" ClientIDMode="Static" style="margin-top:20px!important" ></asp:TextBox>
|
||||||
|
<asp:Label runat="server" AssociatedControlID="Txtdiasinabiles" style="margin-top:10px!important" >Días feriados</asp:Label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</asp:Panel>
|
</asp:Panel>
|
||||||
<asp:Panel runat="server" ID="PnlVacDias" CssClass="row">
|
<asp:Panel runat="server" ID="PnlVacDias" CssClass="row">
|
||||||
<div class="col-md-6">
|
|
||||||
<div class="form-group form-md-line-input input-iconright calendarlinealinput form-small">
|
<div class="col-md-6">
|
||||||
<asp:TextBox ID="Txtdiasinabiles" runat="server" TextMode="Number" CausesValidation="true" CssClass="form-control input-sm form-small" ClientIDMode="Static"></asp:TextBox>
|
|
||||||
<asp:Label runat="server" AssociatedControlID="Txtdiasinabiles">Días feriados</asp:Label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-6">
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
|
||||||
<asp:TextBox ID="TxtVacDiasExtra" CssClass="form-control input-sm form-small" runat="server"></asp:TextBox>
|
|
||||||
<asp:Label runat="server" AssociatedControlID="TxtVacDiasExtra">Días extras</asp:Label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</asp:Panel>
|
|
||||||
<asp:Panel runat="server" ID="PnlVacFechapago" CssClass="row">
|
|
||||||
<div class="col-md-6">
|
|
||||||
<div class="form-group form-md-line-input input-iconright calendarlinealinput" style="width: 100px !important">
|
<div class="form-group form-md-line-input input-iconright calendarlinealinput" style="width: 100px !important">
|
||||||
|
|
||||||
<div class="input-group input-sm date date-picker" data-date-format="dd/mm/yyyy" style="width: 160px;">
|
<div class="input-group input-sm date date-picker" data-date-format="dd/mm/yyyy" style="width: 160px;">
|
||||||
@@ -3138,6 +3135,16 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtVacDiasExtra" CssClass="form-control input-sm form-small" runat="server" style="margin-top:20px!important"></asp:TextBox>
|
||||||
|
<asp:Label runat="server" AssociatedControlID="TxtVacDiasExtra" style="margin-top:10px!important" >Días extras</asp:Label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</asp:Panel>
|
||||||
|
<asp:Panel runat="server" ID="PnlVacFechapago" CssClass="row">
|
||||||
|
|
||||||
|
|
||||||
</asp:Panel>
|
</asp:Panel>
|
||||||
|
|
||||||
<asp:Panel runat="server" ID="PnlVacChecks" CssClass="row">
|
<asp:Panel runat="server" ID="PnlVacChecks" CssClass="row">
|
||||||
|
|||||||
@@ -106,18 +106,18 @@
|
|||||||
|
|
||||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:GridView ID="GVRegDatos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron registros" ToolTip="Listado de Personal" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
<asp:GridView ID="GVRegDatos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron registros" ToolTip="Listado de Personal" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField HeaderText ="Proyecto" DataField="Proyecto" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField HeaderText ="Proyecto" DataField="Proyecto" />
|
||||||
<asp:BoundField HeaderText ="Subproyecto" DataField="SubProyecto" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField HeaderText ="Subproyecto" DataField="SubProyecto" />
|
||||||
<asp:BoundField HeaderText="Turno" DataField="Turno" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField HeaderText="Turno" DataField="Turno"/>
|
||||||
<asp:TemplateField HeaderText="Faltas">
|
<asp:TemplateField HeaderText="Faltas" ItemStyle-HorizontalAlign="right" >
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID ="lblFaltas" runat ="server" Width="70" Text='<%# If(Eval("Faltas").ToString = "0", "-", Eval("FALTAS")) %>'></asp:Label>
|
<asp:Label ID ="lblFaltas" runat ="server" Width="70" Text='<%# If(Eval("Faltas").ToString = "0.0", "-", Eval("FALTAS", "{0:#,###}")) %>'></asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:BoundField HeaderText="Días laborales" DataField="DIAS" />
|
<asp:BoundField HeaderText="Días laborales" DataField="DIAS" ItemStyle-HorizontalAlign="right" DataFormatString="{0:#,###}" />
|
||||||
<asp:TemplateField HeaderText= "AUSENTISMO" ItemStyle-HorizontalAlign="Center">
|
<asp:TemplateField HeaderText= "AUSENTISMO">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lblAusentismo" runat="server" Width ="70" Text='<%# Eval("AUSENTISMO")%>'> </asp:Label>
|
<asp:Label ID="lblAusentismo" runat="server" Width ="70" Text='<%# Eval("AUSENTISMO")%>'> </asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
|
|||||||
@@ -64,9 +64,8 @@ Partial Class RH_RepAusentismoLaboral
|
|||||||
Dim FechaInicio As Date = Date.Now.AddDays(-30)
|
Dim FechaInicio As Date = Date.Now.AddDays(-30)
|
||||||
Dim FechaFin As Date = Date.Now
|
Dim FechaFin As Date = Date.Now
|
||||||
|
|
||||||
Try
|
|
||||||
|
|
||||||
FechaInicio = Date.Parse(txtInicio.Text)
|
FechaInicio = Date.Parse(txtInicio.Text)
|
||||||
FechaFin = Date.Parse(txtFin.Text)
|
FechaFin = Date.Parse(txtFin.Text)
|
||||||
|
|
||||||
If DdlProyecto.SelectedIndex <> 0 Then
|
If DdlProyecto.SelectedIndex <> 0 Then
|
||||||
@@ -88,9 +87,7 @@ Partial Class RH_RepAusentismoLaboral
|
|||||||
GVRegDatos.DataSource = dTable
|
GVRegDatos.DataSource = dTable
|
||||||
GVRegDatos.DataBind()
|
GVRegDatos.DataBind()
|
||||||
|
|
||||||
Catch ex As Exception
|
|
||||||
Dim exe As String = ex.Message
|
|
||||||
End Try
|
|
||||||
rh.Dispose()
|
rh.Dispose()
|
||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
|
|
||||||
@@ -106,25 +103,28 @@ Partial Class RH_RepAusentismoLaboral
|
|||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
If Not (e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5) Then
|
If Not (e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5) Then
|
||||||
|
|
||||||
Dim sPorcentaje As String = e.Row.DBCampo("AUSENTISMO").Trim
|
Dim porcentaje As Decimal = e.Row.DBCampo("AUSENTISMO").ToDecimal
|
||||||
Dim porcentaje As Double = Convert.ToDouble(sPorcentaje)
|
|
||||||
|
|
||||||
e.Row.FCLabel("lblAusentismo").CssClass = "label label-danger"
|
e.Row.FCLabel("lblAusentismo").CssClass = "label label-danger"
|
||||||
e.Row.FCLabel("lblAusentismo").Font.Bold = True
|
e.Row.FCLabel("lblAusentismo").Font.Bold = True
|
||||||
e.Row.FCLabel("lblAusentismo").Attributes.Add("dir", "rtl")
|
e.Row.FCLabel("lblAusentismo").Attributes.Add("dir", "rtl")
|
||||||
|
|
||||||
e.Row.FCLabel("lblAusentismo").Text = sPorcentaje & "%"
|
e.Row.FCLabel("lblAusentismo").Text = porcentaje.RoundSQL & "%"
|
||||||
|
|
||||||
If porcentaje <= 15.0 Then
|
If porcentaje <= 15.0 Then
|
||||||
e.Row.FCLabel("lblAusentismo").CssClass = "label label-success"
|
e.Row.FCLabel("lblAusentismo").CssClass = "label label-success"
|
||||||
ElseIf (porcentaje > 15.0 And porcentaje <= 30.0) Then
|
ElseIf (porcentaje > 15.0 And porcentaje <= 30.0) Then
|
||||||
e.Row.FCLabel("lblAusentismo").CssClass = "label label-warning"
|
e.Row.FCLabel("lblAusentismo").CssClass = "label label-warning"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
If e.Row.DBCampo("SubProyecto").ToString.Trim = "" Then
|
||||||
|
e.Row.CssClass = "SubTotales2"
|
||||||
|
Else
|
||||||
|
If e.Row.DBCampo("Turno").ToString.Trim = "" Then
|
||||||
|
e.Row.CssClass = "SubTotales"
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -124,7 +124,7 @@
|
|||||||
|
|
||||||
<asp:TemplateField HeaderText= "Inicio" ItemStyle-HorizontalAlign="Center">
|
<asp:TemplateField HeaderText= "Inicio" ItemStyle-HorizontalAlign="Center">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lblInicio" runat="server" Width ="70" Text='<%# If(Eval("PINICIO").ToString = "0", "-", Eval("PINICIO"))%>'> </asp:Label>
|
<asp:Label ID="lblInicio" runat="server" Width ="70" Text='<%# If(Eval("PerINICIO").ToString = "0", "-", Eval("PerINICIO"))%>'> </asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
@@ -142,13 +142,13 @@
|
|||||||
|
|
||||||
<asp:TemplateField HeaderText="Fin" ItemStyle-HorizontalAlign="Center" >
|
<asp:TemplateField HeaderText="Fin" ItemStyle-HorizontalAlign="Center" >
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lblFin" runat="server" Width="70" Text='<%# If(Eval("PFIN").ToString = "0", "-", Eval("PFIN")) %>'></asp:Label>
|
<asp:Label ID="lblFin" runat="server" Width="70" Text='<%# If(Eval("PerFIN").ToString = "0", "-", Eval("PerFIN")) %>'></asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
<asp:TemplateField HeaderText= "IRP" ItemStyle-HorizontalAlign="Center">
|
<asp:TemplateField HeaderText= "IRP" ItemStyle-HorizontalAlign="Center">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lblIrp" runat="server" Width ="70" Text='<%# Eval("IRP")%>'> </asp:Label>
|
<asp:Label ID="lblIrp" runat="server" Width ="70" Text='<%# Eval("IRP", "###.00%")%>'> </asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
</Columns>
|
</Columns>
|
||||||
|
|||||||
@@ -76,11 +76,10 @@ Partial Class Ventas_RepIndiceRotacionPersonal
|
|||||||
Dim CveTurno As Integer = -1
|
Dim CveTurno As Integer = -1
|
||||||
|
|
||||||
Dim FechaInicio As Date = Date.Now.AddDays(-30)
|
Dim FechaInicio As Date = Date.Now.AddDays(-30)
|
||||||
Dim FechaFin As Date = Date.Now
|
Dim FechaFin As Date = Date.Now
|
||||||
|
|
||||||
Try
|
|
||||||
|
FechaInicio = Date.Parse(txtInicio.Text)
|
||||||
FechaInicio = Date.Parse(txtInicio.Text)
|
|
||||||
FechaFin = Date.Parse(txtFin.Text)
|
FechaFin = Date.Parse(txtFin.Text)
|
||||||
|
|
||||||
If DdlProyecto.SelectedIndex <> 0 Then
|
If DdlProyecto.SelectedIndex <> 0 Then
|
||||||
@@ -100,16 +99,9 @@ Partial Class Ventas_RepIndiceRotacionPersonal
|
|||||||
End If
|
End If
|
||||||
DTGvDatos = dTable
|
DTGvDatos = dTable
|
||||||
GVRegDatos.DataSource = dTable
|
GVRegDatos.DataSource = dTable
|
||||||
GVRegDatos.DataBind()
|
GVRegDatos.DataBind()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Catch ex As Exception
|
|
||||||
Dim exe As String = ex.Message
|
|
||||||
End Try
|
|
||||||
|
|
||||||
rh.Dispose()
|
rh.Dispose()
|
||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
|
|
||||||
@@ -124,28 +116,32 @@ Partial Class Ventas_RepIndiceRotacionPersonal
|
|||||||
|
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
|
||||||
If Not (e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5) Then
|
If Not (e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5) Then
|
||||||
|
|
||||||
Dim sPorcentaje As String = e.Row.DBCampo("IRP").Trim
|
Dim porcentaje As Decimal = e.Row.DBCampo("IRP").ToDecimal
|
||||||
Dim porcentaje As Double = Convert.ToDouble(sPorcentaje)
|
|
||||||
|
|
||||||
e.Row.FCLabel("LblIrp").CssClass = "label label-danger"
|
e.Row.FCLabel("LblIrp").CssClass = "label label-danger"
|
||||||
e.Row.FCLabel("LblIrp").Font.Bold = True
|
e.Row.FCLabel("LblIrp").Font.Bold = True
|
||||||
e.Row.FCLabel("lblIrp").Attributes.Add("dir", "rtl")
|
e.Row.FCLabel("lblIrp").Attributes.Add("dir", "rtl")
|
||||||
|
e.Row.FCLabel("LblIrp").Text = porcentaje.ToString("0.00") & "%"
|
||||||
e.Row.FCLabel("LblIrp").Text = sPorcentaje & "%"
|
|
||||||
|
|
||||||
If porcentaje <= 15.0 Then
|
If porcentaje <= 15.0 Then
|
||||||
e.Row.FCLabel("LblIrp").CssClass = "label label-success"
|
e.Row.FCLabel("LblIrp").CssClass = "label label-success"
|
||||||
ElseIf (porcentaje > 15.0 And porcentaje <= 30.0) Then
|
ElseIf (porcentaje > 15.0 And porcentaje <= 30.0) Then
|
||||||
e.Row.FCLabel("LblIrp").CssClass = "label label-warning"
|
e.Row.FCLabel("LblIrp").CssClass = "label label-warning"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If e.Row.DataKey("SubProyecto").ToString.Trim = "" Then
|
If e.Row.DBCampo("SubProyecto").ToString.Trim = "" Then
|
||||||
e.Row.CssClass = "SubTotales"
|
e.Row.CssClass = "SubTotales2"
|
||||||
' e.Row.Attributes.Add("class", "SubTotales")
|
Else
|
||||||
|
If e.Row.DBCampo("Turno").ToString.Trim = "" Then
|
||||||
|
e.Row.CssClass = "SubTotales"
|
||||||
|
Else
|
||||||
|
If e.Row.DBCampo("Turno").ToString.Trim = "" Then
|
||||||
|
e.Row.CssClass = "SubTotales3"
|
||||||
|
End If
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|||||||
Reference in New Issue
Block a user