Merge branch 'master' of http://192.168.10.111:8383/SIG
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
|
||||||
@@ -1275,7 +1258,7 @@ Public Class ClsMovimientos
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function GetAcreedoresSaldos(CveProveedor As Integer, CveEmpresa As Integer) As Boolean
|
Public Function GetAcreedoresSaldos(CveProveedor As Integer, CveMoneda As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
@@ -1283,7 +1266,8 @@ Public Class ClsMovimientos
|
|||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -4375,7 +4375,7 @@ Public Class ClsPaginas
|
|||||||
Else
|
Else
|
||||||
LocalStopwatch.Value.Restart()
|
LocalStopwatch.Value.Restart()
|
||||||
If EsProduccion Then
|
If EsProduccion Then
|
||||||
If UsuarioActual.CveEmpresa.Contiene(141, 152, 159, 160, 161, 162, 166) Then System.Threading.Thread.Sleep(750)
|
If UsuarioActual.CveEmpresa.Contiene(141, 152, 159, 160, 161, 162, 166) Then System.Threading.Thread.Sleep(1100)
|
||||||
End If
|
End If
|
||||||
If Not Page.IsPostBack Then
|
If Not Page.IsPostBack Then
|
||||||
'If Not CType(Session("UsuarioSIG"), Usuario).SeleccionoEmpresa AndAlso Request.ServerVariables("URL") <> "/Sistemas/PopUpSeleccionarEmpresa.aspx" Then
|
'If Not CType(Session("UsuarioSIG"), Usuario).SeleccionoEmpresa AndAlso Request.ServerVariables("URL") <> "/Sistemas/PopUpSeleccionarEmpresa.aspx" Then
|
||||||
@@ -9325,6 +9325,7 @@ Public Class ClsPaginas
|
|||||||
PaginaDict.Add("/Ventas/RepCancelacionesVentas.aspx".ToUpper(), 1325)
|
PaginaDict.Add("/Ventas/RepCancelacionesVentas.aspx".ToUpper(), 1325)
|
||||||
PaginaDict.Add("/Ventas/RepLineasAdicionales.aspx".ToUpper(), 1331)
|
PaginaDict.Add("/Ventas/RepLineasAdicionales.aspx".ToUpper(), 1331)
|
||||||
PaginaDict.Add("/Ventas/RepLineasAdicionales.aspx?OP=OP".ToUpper(), 1332)
|
PaginaDict.Add("/Ventas/RepLineasAdicionales.aspx?OP=OP".ToUpper(), 1332)
|
||||||
|
PaginaDict.Add("/Ventas/FacturacionAcarreos.aspx".ToUpper(), 774)
|
||||||
#End Region
|
#End Region
|
||||||
#Region "Varios"
|
#Region "Varios"
|
||||||
'Portal Cliente/Proveedor
|
'Portal Cliente/Proveedor
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -382,6 +382,8 @@ Public Class ClsSubProyectos
|
|||||||
Catch Ex1 As SqlException
|
Catch Ex1 As SqlException
|
||||||
If Ex1.Message.Contains("Número: 2627;") Then
|
If Ex1.Message.Contains("Número: 2627;") Then
|
||||||
Alert("Ya existe un SubProyecto con el mismo nombre: " & SubProyecto & ".", TipoMensaje.MsgAdvertencia)
|
Alert("Ya existe un SubProyecto con el mismo nombre: " & SubProyecto & ".", TipoMensaje.MsgAdvertencia)
|
||||||
|
ElseIf Ex1.Message.Contains("UN_SubProyectos_Empresa_TipoSucursal") Then
|
||||||
|
Alert("Solo puede existir una sucursal 'Matriz'", TipoMensaje.MsgAdvertencia)
|
||||||
Else
|
Else
|
||||||
Me.OnError("Ocurrió un error al Guardar el SubProyecto.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
Me.OnError("Ocurrió un error al Guardar el SubProyecto.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -5715,7 +5715,13 @@ Public Class ClsVentas
|
|||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
Retorno = True
|
Retorno = True
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OnError("Ocurrió un error agregar la linea adicional.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
If ex.Message.Contains("Número: 2627;") And ex.Message.Contains("UK_Vta_LineasAdicionales_Comercializador_Linea") Then
|
||||||
|
Alert(String.Format("La Linea Adicional '{0}' ya se encuentra registrada", LineaAdicional), TipoMensaje.MsgAdvertencia)
|
||||||
|
GuardaLogAD(String.Format("El folio ya se encuentra registrado {0} {1}", ex.Message, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()))
|
||||||
|
Else
|
||||||
|
OnError("Ocurrió un error agregar la linea adicional.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End If
|
||||||
|
|
||||||
End Try
|
End Try
|
||||||
Return Retorno
|
Return Retorno
|
||||||
|
|
||||||
@@ -5823,6 +5829,115 @@ Public Class ClsVentas
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Function AddFacturacionAcarreos(Sucursal As String, RFCCliente As String, Cantidad As Decimal, PSGeneral As String, DireccionOrigen As String, DireccionDestino As String, FechaSalida As DateTime, FechaLlegada As DateTime,
|
||||||
|
Camion As String, Chofer As String, ConfigAutoTransporte As String, CamionRemolque1 As String, CamionRemolque2 As String, Distancia As Decimal, CveEmpresa As Integer) As String
|
||||||
|
Dim Retorno As String = ""
|
||||||
|
DataAdapter("PA_Vta_FacturacionAcarreosAdd")
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@SubProyecto", SqlDbType.VarChar).Value = Sucursal
|
||||||
|
.Add("@RFCCliente", SqlDbType.VarChar).Value = RFCCliente
|
||||||
|
.Add("@Cantidad", SqlDbType.Decimal).Value = Cantidad
|
||||||
|
.Add("@PSGeneral", SqlDbType.VarChar).Value = PSGeneral
|
||||||
|
.Add("@DireccionOrigen", SqlDbType.VarChar).Value = DireccionOrigen
|
||||||
|
.Add("@DireccionDestino", SqlDbType.VarChar).Value = DireccionDestino
|
||||||
|
.Add("@FechaSalida", SqlDbType.DateTime).Value = FechaSalida
|
||||||
|
.Add("@FechaLlegada", SqlDbType.DateTime).Value = FechaLlegada
|
||||||
|
.Add("@Camion", SqlDbType.VarChar).Value = Camion
|
||||||
|
.Add("@Chofer", SqlDbType.VarChar).Value = Chofer
|
||||||
|
.Add("@ConfigAutoTransporte", SqlDbType.VarChar).Value = ConfigAutoTransporte
|
||||||
|
.Add("@CamionRemolque1", SqlDbType.VarChar).Value = CamionRemolque1
|
||||||
|
.Add("@CamionRemolque2", SqlDbType.VarChar).Value = CamionRemolque2
|
||||||
|
.Add("@Distancia", SqlDbType.Decimal).Value = Distancia
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@ErrorMSG", SqlDbType.VarChar, 300).Direction = ParameterDirection.Output
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = SqlAdapter.SelectCommand.Parameters("@ErrorMSG").Value.ToString
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al guardar los datos de facturación.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
Public Function GetFacturacionAcarreos(CveFacturacionAcarreo As Integer, CveCliente As Integer, CveSubProyecto As Integer, Estatus As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Vta_FacturacionAcarreosGet")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveFacturacionAcarreo", SqlDbType.Int).Value = CveFacturacionAcarreo
|
||||||
|
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||||
|
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||||
|
.Add("@Estatus", SqlDbType.Int).Value = Estatus
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
End With
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al obtener los datos de facturación.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
Return Retorno
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function UpdateFacturacionAcarreo(CveFacturacionAcarreo As Integer, CveVenta As Integer) As Boolean
|
||||||
|
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Vta_FacturacionAcarreosUpdate")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveFacturacionAcarreo", SqlDbType.Int).Value = CveFacturacionAcarreo
|
||||||
|
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||||
|
End With
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al obtener los actualizar los datos de facturación.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
Return Retorno
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function RemoveFacturacionAcarreo(CveFacturacionAcarreo As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Vta_FacturacionAcarreosRemove")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveFacturacionAcarreo", SqlDbType.Int).Value = CveFacturacionAcarreo
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
End With
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al obtener los eliminar los datos de facturación.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
Return Retorno
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function RemoveFacturacionAcarreos(CveFacturacionAcarreo As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Vta_FacturacionAcarreosRemove")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveFacturacionAcarreo", SqlDbType.Int).Value = CveFacturacionAcarreo
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
End With
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al eliminar los datos de facturación.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
Return Retorno
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#Region "IDisposable Support"
|
#Region "IDisposable Support"
|
||||||
|
|
||||||
|
|||||||
@@ -811,6 +811,13 @@ Namespace Modelos
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'VALIDA QUE EL PRECIO DEBA SER MAYOR A CERO
|
||||||
|
If Me.CveFacturacionAcarreo > 0 AndAlso Me.DtDetalle.SUMD("PU") <= 0 Then
|
||||||
|
ErrorList.Add("El precio unitario debe ser mayor a cero.")
|
||||||
|
Retorno.Mensajes = ErrorList
|
||||||
|
Return Retorno
|
||||||
|
End If
|
||||||
|
|
||||||
If Me.CveCliente > 0 Or Me.CveEmpresaCRM > 0 Then
|
If Me.CveCliente > 0 Or Me.CveEmpresaCRM > 0 Then
|
||||||
If DtDetalle.Rows.Count > 0 Then
|
If DtDetalle.Rows.Count > 0 Then
|
||||||
|
|
||||||
@@ -831,6 +838,7 @@ Namespace Modelos
|
|||||||
Dim ObjEventos As New ClsOIEventos(ObjVentas.IniciaTransacSQL())
|
Dim ObjEventos As New ClsOIEventos(ObjVentas.IniciaTransacSQL())
|
||||||
Dim ObjCGame As New ClsCGame(ObjVentas.IniciaTransacSQL())
|
Dim ObjCGame As New ClsCGame(ObjVentas.IniciaTransacSQL())
|
||||||
Dim ObjDocCliente As New ClsEdocumentacion(ObjVentas.IniciaTransacSQL())
|
Dim ObjDocCliente As New ClsEdocumentacion(ObjVentas.IniciaTransacSQL())
|
||||||
|
Dim ObjGeneral As New ClsGenerales(ObjVentas.IniciaTransacSQL())
|
||||||
Dim ObjAcum As New ClsAcumuladores(ObjVentas.IniciaTransacSQL())
|
Dim ObjAcum As New ClsAcumuladores(ObjVentas.IniciaTransacSQL())
|
||||||
Dim ObjContPaq As ClsContPAQi = Nothing
|
Dim ObjContPaq As ClsContPAQi = Nothing
|
||||||
Dim MensajeAlert = New StringBuilder
|
Dim MensajeAlert = New StringBuilder
|
||||||
@@ -863,8 +871,17 @@ Namespace Modelos
|
|||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Dim CveTimbreCartaPorte As Integer = -1
|
||||||
|
|
||||||
GuardarVenta(Me, ObjVentas, ObjConta, ObjInventario, ObjContr, DtDetalle, Me.CveNCaVincular, ObjContPaq, ObjBancos, ObjOS, ObjEventos, ObjCGame, ObjClientes, ObjAcum:=ObjAcum, Resp:=Retorno, Modulo:=Modulo)
|
GuardarVenta(Me, ObjVentas, ObjConta, ObjInventario, ObjContr, DtDetalle, Me.CveNCaVincular, ObjContPaq, ObjBancos, ObjOS, ObjEventos, ObjCGame, ObjClientes, ObjAcum:=ObjAcum, Resp:=Retorno, Modulo:=Modulo)
|
||||||
|
|
||||||
|
If ErrorList.Count = 0 AndAlso Me.EmitirCartaPorte AndAlso Me.TipoDocto = "Ing" Then
|
||||||
|
CveTimbreCartaPorte = GuardarCartaPorte(Me, ObjGeneral, ObjVentas)
|
||||||
|
If CveTimbreCartaPorte <= 0 Then
|
||||||
|
ErrorList.Add("Ocurrió un error al registrar la carta porte")
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
'SI ES REFACTURACION
|
'SI ES REFACTURACION
|
||||||
Dim ObjNC As List(Of Object) = Nothing
|
Dim ObjNC As List(Of Object) = Nothing
|
||||||
If ErrorList.Count = 0 Then
|
If ErrorList.Count = 0 Then
|
||||||
@@ -1016,6 +1033,12 @@ Namespace Modelos
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If CveFacturacionAcarreo > 0 AndAlso ErrorList.Count = 0 Then
|
||||||
|
If Not ObjVentas.UpdateFacturacionAcarreo(Me.CveFacturacionAcarreo, CveVenta) Then
|
||||||
|
ErrorList.Add("No se pudo actualizar los datos de facturación de acarreo")
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
If ErrorList.Count = 0 AndAlso Me.CveVenta > 0 AndAlso DtDocumentacionCliente IsNot Nothing Then
|
If ErrorList.Count = 0 AndAlso Me.CveVenta > 0 AndAlso DtDocumentacionCliente IsNot Nothing Then
|
||||||
' si se cargó algun documento
|
' si se cargó algun documento
|
||||||
If DtDocumentacionCliente.FiltraParametros("RutaArchivo <> ''").Rows.Count > 0 Then
|
If DtDocumentacionCliente.FiltraParametros("RutaArchivo <> ''").Rows.Count > 0 Then
|
||||||
@@ -1064,6 +1087,16 @@ Namespace Modelos
|
|||||||
Dim ObjTimbrado As New Timbrado
|
Dim ObjTimbrado As New Timbrado
|
||||||
'DOCUMENTO ACTUAL
|
'DOCUMENTO ACTUAL
|
||||||
If DebeTimbrar Then
|
If DebeTimbrar Then
|
||||||
|
If Me.EmitirCartaPorte AndAlso CveTimbreCartaPorte > 0 Then
|
||||||
|
Dim RespCartaPorte = Timbres.PreParaCartaPorteFactura(CveTimbreCartaPorte, UsuarioActual)
|
||||||
|
If Not RespCartaPorte.TieneError Then
|
||||||
|
Me.Timbre.Complementos.CartaPorte = RespCartaPorte.CartaPorte
|
||||||
|
Else
|
||||||
|
DebeTimbrar = False
|
||||||
|
Retorno.Mensajes.Add(RespCartaPorte.Mensaje)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
SeTimbro = ObjTimbrado.TimbrarFactura(UsuarioActual, Me)
|
SeTimbro = ObjTimbrado.TimbrarFactura(UsuarioActual, Me)
|
||||||
|
|
||||||
'NOTA DE CREDITO - REFACTURADA - CASO ESPECIAL, TIMBRADO E IMPRESION
|
'NOTA DE CREDITO - REFACTURADA - CASO ESPECIAL, TIMBRADO E IMPRESION
|
||||||
@@ -1132,7 +1165,7 @@ Namespace Modelos
|
|||||||
If SeTimbro Then
|
If SeTimbro Then
|
||||||
Dim ArchivoXML = String.Format("{0}/XML/{1}/{2}.xml", UsuarioActual.Empresa.Ruta, Me.TipoDocto, Me.SerieFolio)
|
Dim ArchivoXML = String.Format("{0}/XML/{1}/{2}.xml", UsuarioActual.Empresa.Ruta, Me.TipoDocto, Me.SerieFolio)
|
||||||
If File.Exists(ArchivoXML) Then
|
If File.Exists(ArchivoXML) Then
|
||||||
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar XML</a></li></ul>", Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", CveVenta, "XML", Me.SerieFolio, Me.TipoDocto)))
|
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" target=""_blank"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar XML</a></li></ul>", Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", CveVenta, "XML", Me.SerieFolio, Me.TipoDocto)))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -1204,6 +1237,10 @@ Namespace Modelos
|
|||||||
MensajeAlert.AppendFormat("<br/><br/><b> Se generó una Nota de crédito Folio: {0} amortizando el anticipo </b><br/>", FacturaDevolucion.Folio)
|
MensajeAlert.AppendFormat("<br/><br/><b> Se generó una Nota de crédito Folio: {0} amortizando el anticipo </b><br/>", FacturaDevolucion.Folio)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If SeTimbro AndAlso CveFacturacionAcarreo > 0 Then
|
||||||
|
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" target=""_blank"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar PDF</a></li></ul><br/>", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1", CveVenta)))
|
||||||
|
End If
|
||||||
|
|
||||||
If TipoMensajeRespuesta = TipoMensajeRespuesta.HTML Then
|
If TipoMensajeRespuesta = TipoMensajeRespuesta.HTML Then
|
||||||
ListaMensajes.Add(MensajeAlert.ToString)
|
ListaMensajes.Add(MensajeAlert.ToString)
|
||||||
Retorno.LigaCliente = $"document.location.href=""/Ventas/Clientes.aspx?CveCliente={Me.CveCliente}&Opt=3"";"
|
Retorno.LigaCliente = $"document.location.href=""/Ventas/Clientes.aspx?CveCliente={Me.CveCliente}&Opt=3"";"
|
||||||
@@ -1286,6 +1323,575 @@ Namespace Modelos
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function CrearVentaNueva(UsuarioActual As Usuario, CveSubProyecto As Integer, CveCliente As Integer, CveMoneda As Integer) As Modelos.Factura
|
||||||
|
Dim ObjFactura = New Modelos.Factura(UsuarioActual)
|
||||||
|
Try
|
||||||
|
ObjFactura.DirectorioServidor = HttpContext.Current.Server.MapPath("/")
|
||||||
|
|
||||||
|
Dim CveProyecto As String = ""
|
||||||
|
Dim Proyecto As String = ""
|
||||||
|
Dim SubProyecto As String = ""
|
||||||
|
|
||||||
|
ObjFactura.Version = "4.0"
|
||||||
|
ObjFactura.CveUsuario = UsuarioActual.CveUsuario
|
||||||
|
ObjFactura.CveEmpresa = UsuarioActual.CveEmpresa
|
||||||
|
ObjFactura.ConvertirPesos = False
|
||||||
|
ObjFactura.CveMoneda = CveMoneda
|
||||||
|
ObjFactura.Moneda = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("Moneda", $"CveMoneda = {ObjFactura.CveMoneda} ")
|
||||||
|
ObjFactura.MonedaSAT = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {ObjFactura.CveMoneda}")
|
||||||
|
ObjFactura.TipoCambio = If(ObjFactura.CveMoneda = 1, 1, ClsPaginas.GlobalTipoCambio(Now).ToDecimal())
|
||||||
|
ObjFactura.TipoDocto = "Ing"
|
||||||
|
ObjFactura.RefDocto = ""
|
||||||
|
ObjFactura.Folio = -1
|
||||||
|
ObjFactura.Serie = "-1"
|
||||||
|
ObjFactura.Fecha = Now
|
||||||
|
ObjFactura.CvePrePoliza = -1
|
||||||
|
ObjFactura.CveMetodoPago = 1
|
||||||
|
ObjFactura.MetodoPago = "Efectivo"
|
||||||
|
ObjFactura.FechaPago = DateTime.Today
|
||||||
|
ObjFactura.MotivoDescuento = ""
|
||||||
|
ObjFactura.Observaciones = ""
|
||||||
|
ObjFactura.FechaEjecucion = DateTime.Today
|
||||||
|
ObjFactura.UsuarioCreo = UsuarioActual.Usuario
|
||||||
|
ObjFactura.CveCondicionEntrega = -1
|
||||||
|
ObjFactura.CondicionEntrega = ""
|
||||||
|
ObjFactura.NumeroCuenta = ""
|
||||||
|
ObjFactura.CondicionesPago = 0
|
||||||
|
ObjFactura.FormaPago = 0
|
||||||
|
ObjFactura.PedidoContrato = ""
|
||||||
|
ObjFactura.NumeroContrato = ""
|
||||||
|
ObjFactura.DescripcionContrato = ""
|
||||||
|
ObjFactura.CveCorte = -1
|
||||||
|
ObjFactura.TipoDocumento = "Factura"
|
||||||
|
ObjFactura.Alfa1 = ""
|
||||||
|
ObjFactura.Alfa2 = ""
|
||||||
|
ObjFactura.Alfa3 = ""
|
||||||
|
'Totales, Y se llena TmpDTImpuestos
|
||||||
|
ObjFactura.Descuento = 0
|
||||||
|
ObjFactura.Amortizacion = 0
|
||||||
|
ObjFactura.CveContrato = -1
|
||||||
|
'CLIENTE
|
||||||
|
ObjFactura.CveCliente = CveCliente
|
||||||
|
ObjFactura.SetCliente()
|
||||||
|
|
||||||
|
Dim ObjCliente As New ClsClientes
|
||||||
|
If ObjCliente.GetClientes(ObjFactura.CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1, TipoCliente:=-1) Then
|
||||||
|
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||||
|
ObjFactura.CveFormaPago33 = ObjCliente.CveFormaPago33
|
||||||
|
ObjFactura.FormaPago33 = ClsPaginas.GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPago", String.Format("CveFormaPago = {0}", ObjCliente.CveFormaPago33))
|
||||||
|
ObjFactura.FormaPagoSAT33 = ClsPaginas.GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", String.Format("CveFormaPago = {0}", ObjCliente.CveFormaPago33))
|
||||||
|
|
||||||
|
ObjFactura.CveMetodoPago33 = ObjCliente.CveMetodoPago33
|
||||||
|
ObjFactura.MetodoPago33 = ClsPaginas.GlobalDTVtaMetodoPago.FiltroPrimeroValor("MetodoPago", String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago33))
|
||||||
|
ObjFactura.ClaveMetodoPagoSAT = ClsPaginas.GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago33))
|
||||||
|
|
||||||
|
ObjFactura.CveUsoCFDI = ObjCliente.CveUsoCFDI
|
||||||
|
ObjFactura.UsoCFDI = ClsPaginas.GlobalDTSATUsosCFDI.FiltroPrimeroValor("Descripcion", String.Format("CveUsoCFDI = {0}", ObjCliente.CveUsoCFDI))
|
||||||
|
ObjFactura.ClaveUsoCFDI = ClsPaginas.GlobalDTSATUsosCFDI.FiltroPrimeroValor("UsoCFDI", String.Format("CveUsoCFDI = {0}", ObjCliente.CveUsoCFDI))
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ObjCliente.GetSucursales(ObjFactura.CveCliente) Then
|
||||||
|
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||||
|
ObjFactura.CveClienteSucursal = If(String.IsNullOrEmpty(ObjCliente.DtResultados.FiltroPrimeroValor("CveClienteSucursal", "Estatus = 'Activo'")), -1, ObjCliente.DtResultados.FiltroPrimeroValor("CveClienteSucursal", "Estatus = 'Activo'").ToEntero())
|
||||||
|
Else
|
||||||
|
ObjFactura.CveClienteSucursal = -1
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
ObjCliente.Dispose()
|
||||||
|
|
||||||
|
ObjFactura.CveSubProyecto = CveSubProyecto.ToEntero
|
||||||
|
|
||||||
|
ObjFactura.SetSubProyecto()
|
||||||
|
ObjFactura.SetSubProyectoMatriz()
|
||||||
|
|
||||||
|
ObjFactura.CveSubProyectoCobranza = CveSubProyecto.ToEntero
|
||||||
|
ObjFactura.CveSubProyectoEjecucion = CveSubProyecto.ToEntero
|
||||||
|
'DETALLES
|
||||||
|
ObjFactura.DtDetalle = CreaDTFactura()
|
||||||
|
|
||||||
|
ObjFactura.SubTotal = ObjFactura.DtDetalle.SUMD("Total")
|
||||||
|
ObjFactura.IVA = ObjFactura.DtDetalle.SUMD("ImporteIVA")
|
||||||
|
ObjFactura.RetIVA = ObjFactura.DtDetalle.SUMD("ImporteRetIVA")
|
||||||
|
ObjFactura.RetISR = ObjFactura.DtDetalle.SUMD("ImporteRetISR")
|
||||||
|
ObjFactura.IEPS = ObjFactura.DtDetalle.SUMD("ImporteIEPS")
|
||||||
|
|
||||||
|
ObjFactura.Total = ObjFactura.SubTotal + ObjFactura.IVA + ObjFactura.IEPS - (ObjFactura.RetIVA + ObjFactura.RetISR)
|
||||||
|
|
||||||
|
'SUBPROYECTO
|
||||||
|
Catch ex As Exception
|
||||||
|
ObjFactura = Nothing
|
||||||
|
End Try
|
||||||
|
|
||||||
|
|
||||||
|
Return ObjFactura
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Shared Function CreaDTFactura() As DataTable
|
||||||
|
Dim TmpDT = New DataTable
|
||||||
|
TmpDT.Columns.Add("CveVenta", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("Consec", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("Cantidad", GetType(Decimal))
|
||||||
|
TmpDT.Columns.Add("Codigo", GetType(String))
|
||||||
|
TmpDT.Columns.Add("CveUM", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("UM", GetType(String))
|
||||||
|
TmpDT.Columns.Add("SATClaveUM", GetType(String))
|
||||||
|
TmpDT.Columns.Add("CveClasificacion", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("Clasificacion", GetType(String))
|
||||||
|
TmpDT.Columns.Add("CvePS", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("PS", GetType(String))
|
||||||
|
TmpDT.Columns.Add("CodigoPS", GetType(String))
|
||||||
|
TmpDT.Columns.Add("SATClaveProdServ", GetType(String))
|
||||||
|
TmpDT.Columns.Add("NoIdentificacion", GetType(String))
|
||||||
|
TmpDT.Columns.Add("CveTipoPS", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("CveTipoInvPS", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("Serie", GetType(String))
|
||||||
|
TmpDT.Columns.Add("CuentaPredial", GetType(String))
|
||||||
|
TmpDT.Columns.Add("Obs", GetType(String))
|
||||||
|
TmpDT.Columns.Add("TiempoEntrega", GetType(String))
|
||||||
|
TmpDT.Columns.Add("PU", GetType(Decimal))
|
||||||
|
TmpDT.Columns.Add("IVA", GetType(Decimal))
|
||||||
|
TmpDT.Columns.Add("ImporteIVA", GetType(Decimal))
|
||||||
|
TmpDT.Columns.Add("PorcentajeIVA", GetType(Decimal))
|
||||||
|
TmpDT.Columns.Add("ImporteRetIVA", GetType(Decimal))
|
||||||
|
TmpDT.Columns.Add("ImporteRetISR", GetType(Decimal))
|
||||||
|
TmpDT.Columns.Add("PorcentajeRetIVA", GetType(Decimal))
|
||||||
|
TmpDT.Columns.Add("PorcentajeRetISR", GetType(Decimal))
|
||||||
|
TmpDT.Columns.Add("ImporteIEPS", GetType(Decimal))
|
||||||
|
TmpDT.Columns.Add("IEPS", GetType(Decimal))
|
||||||
|
TmpDT.Columns.Add("PorcentajeIEPS", GetType(Decimal))
|
||||||
|
TmpDT.Columns.Add("Descuento", GetType(Decimal))
|
||||||
|
TmpDT.Columns.Add("TipoDescuento", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("TotalImporte", GetType(Decimal))
|
||||||
|
TmpDT.Columns.Add("Total", GetType(Decimal))
|
||||||
|
TmpDT.Columns.Add("RetIVA", GetType(Decimal))
|
||||||
|
TmpDT.Columns.Add("RetISR", GetType(Decimal))
|
||||||
|
'Para uso del módulo contable
|
||||||
|
TmpDT.Columns.Add("AsientoContableVentas", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("IdCtaContVentas", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("AplicaParaConcepto", GetType(Boolean))
|
||||||
|
TmpDT.Columns.Add("CveProyecto", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("Proyecto", GetType(String))
|
||||||
|
TmpDT.Columns.Add("CveSubProyecto", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("SubProyecto", GetType(String))
|
||||||
|
TmpDT.Columns.Add("CveVentaDetallePadre", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("CvePromocionDetalle", GetType(Integer))
|
||||||
|
|
||||||
|
'TipoDescuento: 1 = Descuento * PU; 2 = Descuento por Total del concepto
|
||||||
|
TmpDT.Columns.Add("CvePresupuestoIngreso", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("CveFuenteRecaudacion", GetType(Integer))
|
||||||
|
'Contratos
|
||||||
|
TmpDT.Columns.Add("CveContratoDetalle", GetType(Integer))
|
||||||
|
'Remisiones a Facturas
|
||||||
|
TmpDT.Columns.Add("CveVentaDetalle", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("CveVentaDetalleRemision", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("CveVentaDetalleCotizacion", GetType(Integer))
|
||||||
|
|
||||||
|
'Pedido2 a Facturas
|
||||||
|
TmpDT.Columns.Add("CveVentaDetallePedido2", GetType(Integer))
|
||||||
|
|
||||||
|
TmpDT.Columns.Add("Origen", GetType(Integer))
|
||||||
|
'Ordenes Servicio
|
||||||
|
TmpDT.Columns.Add("CveOS", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("CveOSDetalle", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("SeFacturara", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("Folio", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("Estatus", GetType(String))
|
||||||
|
'Ordenamiento
|
||||||
|
TmpDT.Columns.Add("Orden", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("TipoDocto", GetType(String))
|
||||||
|
'OC
|
||||||
|
TmpDT.Columns.Add("CveOrdenCompraDetalle", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("EntregaDirecta", GetType(Integer))
|
||||||
|
|
||||||
|
TmpDT.Columns.Add("CveMovimientoDetallePedido", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("CantidadFacturadaRem", GetType(Decimal))
|
||||||
|
TmpDT.Columns.Add("CantidadFacturadaCot", GetType(Decimal))
|
||||||
|
TmpDT.Columns.Add("CantidadFacturadaPed2", GetType(Decimal))
|
||||||
|
TmpDT.Columns.Add("CantidadInventario", GetType(Decimal))
|
||||||
|
|
||||||
|
TmpDT.Columns.Add("ClaveSATFraccionArancelaria", GetType(String))
|
||||||
|
TmpDT.Columns.Add("ClaveSATUnidadAduana", GetType(String))
|
||||||
|
TmpDT.Columns.Add("ClaveSATFraccionArancelariaDescripcion", GetType(String))
|
||||||
|
TmpDT.Columns.Add("ClaveSATUnidadAduanaDescripcion", GetType(String))
|
||||||
|
|
||||||
|
TmpDT.Columns.Add("CveTamaño", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("CveConcepto", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("EsCargo", GetType(Boolean))
|
||||||
|
TmpDT.Columns.Add("CveVentaDetalleRNC", GetType(Integer))
|
||||||
|
|
||||||
|
TmpDT.Columns.Add("TieneProntoPago", GetType(String))
|
||||||
|
TmpDT.Columns.Add("ImporteProntoPago", GetType(Decimal))
|
||||||
|
TmpDT.Columns.Add("CodigoObjetoImpuesto", GetType(String))
|
||||||
|
TmpDT.Columns.Add("CveMarca", GetType(Integer))
|
||||||
|
|
||||||
|
TmpDT.Columns.Add("CvePrecioLista", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("PrecioLista", GetType(String))
|
||||||
|
|
||||||
|
TmpDT.Columns.Add("CveActivoFijo", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("AFDepreciacion", GetType(Decimal))
|
||||||
|
TmpDT.Columns.Add("AFValorInicial", GetType(Decimal))
|
||||||
|
TmpDT.Columns("EsCargo").DefaultValue = False
|
||||||
|
|
||||||
|
TmpDT.Columns("TieneProntoPago").DefaultValue = "No"
|
||||||
|
TmpDT.Columns("ImporteProntoPago").DefaultValue = 0
|
||||||
|
|
||||||
|
TmpDT.Columns.Add("NumTurnos", GetType(Decimal))
|
||||||
|
TmpDT.Columns("NumTurnos").DefaultValue = 0
|
||||||
|
|
||||||
|
Return TmpDT
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function AgregarPS(CvePS As Integer, Cantidad As Decimal, PU As Decimal, Descuento As Decimal, Obs As String,
|
||||||
|
Optional CveUM As Integer = -1, Optional CveProyecto As Integer = -1, Optional Proyecto As String = "", Optional CveSubProyecto As Integer = -1,
|
||||||
|
Optional SubProyecto As String = "", Optional PorcentajeIVA As Decimal = -1, Optional CuentaPredial As String = "") As Boolean
|
||||||
|
|
||||||
|
If Not CvePS > 0 Then
|
||||||
|
Alert("Ocurrió un error al cargar la información del producto a agregar. Por favor verifique y vuelva a intentar.", TipoMensaje.MsgError)
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim DrPS As DataRow = ClsPaginas.GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("") ' Estado = -1
|
||||||
|
|
||||||
|
If DrPS Is Nothing Then
|
||||||
|
Alert("Ocurrió un error al cargar la información del Producto. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
|
||||||
|
If PU = -1 Then
|
||||||
|
PU = DrPS("Precio").ToString().ToDecimal()
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim NumeroDecimales As Integer = 2
|
||||||
|
|
||||||
|
Dim Row As DataRow = Nothing
|
||||||
|
Dim TotalCalculableImpuestos As Decimal = 0
|
||||||
|
Dim TotalCalculableImpuestosIVA As Decimal = 0
|
||||||
|
PU = PU.RoundSQL(6) ' el precio unitario puede llevar hasta 6 decimales permitidos
|
||||||
|
Descuento = Descuento.RoundSQL(NumeroDecimales)
|
||||||
|
|
||||||
|
If Not Me.DtDetalle.Columns.Contains("RetIVA") Then
|
||||||
|
Me.DtDetalle.Columns.Add("RetIVA", GetType(Decimal))
|
||||||
|
End If
|
||||||
|
|
||||||
|
'SI NO TIENE SUBPROYECTO ASIGNADO TOMA EL DE LA FACTURA
|
||||||
|
If CveSubProyecto = -1 Then
|
||||||
|
CveSubProyecto = Me.CveSubProyecto
|
||||||
|
End If
|
||||||
|
|
||||||
|
Row = Me.DtDetalle.NewRow()
|
||||||
|
Row("CveProyecto") = CveProyecto
|
||||||
|
Row("Proyecto") = Proyecto
|
||||||
|
Row("CveSubProyecto") = CveSubProyecto
|
||||||
|
Row("SubProyecto") = SubProyecto
|
||||||
|
Row("Serie") = ""
|
||||||
|
Row("TiempoEntrega") = ""
|
||||||
|
|
||||||
|
Dim ConsecutivoActual As Integer = Me.DtDetalle.MAX("Consec").ToEntero()
|
||||||
|
If ConsecutivoActual < 0 Then
|
||||||
|
ConsecutivoActual = 0
|
||||||
|
End If
|
||||||
|
Row("Orden") = ConsecutivoActual + 1
|
||||||
|
Row("Consec") = ConsecutivoActual + 1
|
||||||
|
|
||||||
|
|
||||||
|
Dim ClienteRetIVA = Me.Cliente.RetIVA
|
||||||
|
Dim ClienteRetISR = Me.Cliente.RetISR
|
||||||
|
|
||||||
|
If ClienteRetIVA <= 0 AndAlso DrPS("RetIVA").ToString.ToDecimal > 0 Then
|
||||||
|
ClienteRetIVA = DrPS("RetIVA").ToString.ToDecimal
|
||||||
|
End If
|
||||||
|
|
||||||
|
'If ClienteRetIVA <= 0 Then
|
||||||
|
' If DdlTipoRetencion.SelectedValue.Contiene("1", "2") Then
|
||||||
|
' ClienteRetIVA = 0.106667D
|
||||||
|
' ElseIf DdlTipoRetencion.SelectedValue.Contiene("3") Then
|
||||||
|
' ClienteRetIVA = 0.04D
|
||||||
|
' End If
|
||||||
|
'End If
|
||||||
|
|
||||||
|
'SI NO ES REFACTURACION verifica si tiene ventaminima
|
||||||
|
If Me.NuevaFactura <> 1 Then
|
||||||
|
If Cantidad > 0 AndAlso DrPS("VentaMinima").ToString().ToDecimal > 0 Then
|
||||||
|
'verifico que la cantidad sea multiplo de venta minima, es decir ventaminima =5, solo puede vender 5,10,15...
|
||||||
|
If Cantidad Mod DrPS("VentaMinima").ToString().ToDecimal <> 0 Then
|
||||||
|
Alert(String.Format("El producto se vende solo en cantidades de {0}", DrPS("VentaMinima").ToString()), TipoMensaje.MsgInformacion)
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
If CveUM <= 0 Then
|
||||||
|
CveUM = DrPS("CveUnidadMedida").ToString().ToEntero()
|
||||||
|
End If
|
||||||
|
|
||||||
|
Row("Cantidad") = Cantidad
|
||||||
|
Row("CveUM") = CveUM
|
||||||
|
Row("UM") = DrPS("UnidadMedida")
|
||||||
|
Row("CveClasificacion") = DrPS("CveClasificacion")
|
||||||
|
Row("Clasificacion") = DrPS("Clasificacion")
|
||||||
|
Row("CvePS") = CvePS
|
||||||
|
Row("Obs") = Obs
|
||||||
|
|
||||||
|
'VERIFICA SI EN LA FACTURA PADRE SE DESGLOSO EL IEPS
|
||||||
|
'Dim FacturaDesglosoIEPS As Boolean = ((CveDevolucion > 0 AndAlso NuevaFactura = 1) AndAlso (Me.ObjFacturaNC IsNot Nothing AndAlso Not Me.ObjFacturaNC.VentaDesglosaIEPS))
|
||||||
|
|
||||||
|
'If Not ClienteDesglosaIEPS Then
|
||||||
|
' If Not RegeneraIEPS AndAlso Not FacturaDesglosoIEPS Then
|
||||||
|
' PU = PU * (1 + DrPS("IEPSPorcentaje").ToString().ToDecimal)
|
||||||
|
' VentaDesglosaIEPS = True
|
||||||
|
' End If
|
||||||
|
' DrPS("IEPSPorcentaje") = 0
|
||||||
|
'End If
|
||||||
|
''SI YA SE DESGLOSO EL IEPS SE GUARDA LA BANDERA EN ESTA FACTURA
|
||||||
|
'If FacturaDesglosoIEPS Then
|
||||||
|
' VentaDesglosaIEPS = True
|
||||||
|
'End If
|
||||||
|
|
||||||
|
'SI NO HAY IVA ASIGNADO TOMA EL DEL SUBPROYECTO
|
||||||
|
If PorcentajeIVA = -1 Then
|
||||||
|
PorcentajeIVA = Me.SubProyecto.IVA
|
||||||
|
End If
|
||||||
|
|
||||||
|
If DrPS("IVA").ToString().Contiene("-1", "") Then
|
||||||
|
Row("PorcentajeIVA") = PorcentajeIVA
|
||||||
|
Else
|
||||||
|
Row("PorcentajeIVA") = DrPS("IVA")
|
||||||
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(373) = "1" AndAlso Me.Cliente.RFC = "XEXX010101000" Then
|
||||||
|
DrPS("IVA") = 0
|
||||||
|
Row("PorcentajeIVA") = 0
|
||||||
|
End If
|
||||||
|
|
||||||
|
'If ClienteNODesglosaIVA Then
|
||||||
|
' 'If Not RegeneraIEPS AndAlso Not FacturaDesglosoIEPS Then
|
||||||
|
' PU = PU * (1 + Row("PorcentajeIVA").ToString().ToDecimal)
|
||||||
|
' VentaNODesglosaIVA = True
|
||||||
|
' 'End If
|
||||||
|
' DrPS("IVA") = 0
|
||||||
|
' Row("PorcentajeIVA") = 0
|
||||||
|
'End If
|
||||||
|
|
||||||
|
TotalCalculableImpuestos = ((Cantidad * (PU)) - Descuento)
|
||||||
|
TotalCalculableImpuestosIVA = TotalCalculableImpuestos * (1 + DrPS("IEPSPorcentaje").ToString().ToDecimal)
|
||||||
|
|
||||||
|
Row("PU") = PU
|
||||||
|
Row("Codigo") = DrPS("Codigo")
|
||||||
|
Row("NoIdentificacion") = DrPS("Codigo")
|
||||||
|
Row("ClaveSATFraccionArancelaria") = DrPS("ClaveSATFraccionArancelaria")
|
||||||
|
Row("ClaveSATUnidadAduana") = DrPS("ClaveSATUnidadAduana")
|
||||||
|
Row("ClaveSATFraccionArancelariaDescripcion") = DrPS("ClaveSATFraccionArancelariaDescripcion")
|
||||||
|
Row("ClaveSATUnidadAduanaDescripcion") = DrPS("ClaveSATUnidadAduanaDescripcion")
|
||||||
|
Row("PS") = DrPS("PS")
|
||||||
|
Row("CodigoPS") = DrPS("PSCodigo").ToString()
|
||||||
|
Row("CveTipoPS") = DrPS("CveTipoPS")
|
||||||
|
Row("CveTipoInvPS") = DrPS("Inv_CveMetodoInventario")
|
||||||
|
Row("CveTamaño") = DrPS("CveTamaño")
|
||||||
|
Row("CodigoObjetoImpuesto") = DrPS("CodigoObjetoImpuesto")
|
||||||
|
|
||||||
|
Row("CveClasificacion") = DrPS("CveClasificacion")
|
||||||
|
Row("Clasificacion") = DrPS("Clasificacion")
|
||||||
|
|
||||||
|
Row("IVA") = Row("PorcentajeIVA")
|
||||||
|
Row("ImporteIVA") = (Row("PorcentajeIVA").ToString().ToDecimal * TotalCalculableImpuestosIVA).RoundSQL(NumeroDecimales)
|
||||||
|
Row("ImporteRetIVA") = (ClienteRetIVA * TotalCalculableImpuestos).RoundSQL(NumeroDecimales)
|
||||||
|
|
||||||
|
Row("RetIVA") = (ClienteRetIVA * TotalCalculableImpuestos).RoundSQL(NumeroDecimales)
|
||||||
|
|
||||||
|
Row("ImporteRetISR") = (ClienteRetISR * TotalCalculableImpuestos).RoundSQL(NumeroDecimales)
|
||||||
|
Row("PorcentajeRetIVA") = ClienteRetIVA
|
||||||
|
Row("PorcentajeRetISR") = ClienteRetISR
|
||||||
|
Row("PorcentajeIEPS") = DrPS("IEPSPorcentaje")
|
||||||
|
Row("ImporteIEPS") = (DrPS("IEPSPorcentaje").ToString().ToDecimal * TotalCalculableImpuestos).RoundSQL(NumeroDecimales)
|
||||||
|
Row("IEPS") = Row("ImporteIEPS")
|
||||||
|
Row("Descuento") = (Descuento).RoundSQL(NumeroDecimales)
|
||||||
|
Row("TipoDescuento") = -1
|
||||||
|
Row("CvePromocionDetalle") = -1
|
||||||
|
Row("Total") = (Cantidad * PU)
|
||||||
|
Row("TotalImporte") = (Cantidad * PU).RoundSQL(NumeroDecimales)
|
||||||
|
|
||||||
|
'Row("AsientoContableVentas") = DrPS("AsientoContableVentas")
|
||||||
|
' Row("IdCtaContVentas") = IdCtaContable
|
||||||
|
' Row("AplicaParaConcepto") = AplicaParaConcepto
|
||||||
|
|
||||||
|
Row("SATClaveProdServ") = DrPS("SATClavePS")
|
||||||
|
Row("SATClaveUM") = DrPS("SATClaveUnidadMedida")
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC Then
|
||||||
|
Row("CvePresupuestoIngreso") = -1
|
||||||
|
End If
|
||||||
|
|
||||||
|
Row("EntregaDirecta") = 0
|
||||||
|
'Contratos
|
||||||
|
Row("CveContratoDetalle") = -1
|
||||||
|
Row("CveVentaDetalle") = -1
|
||||||
|
Row("CveMovimientoDetallePedido") = -1
|
||||||
|
Row("CveOrdenCompraDetalle") = -1
|
||||||
|
Row("CveVentaDetalleRemision") = -1
|
||||||
|
Row("CveVentaDetalleCotizacion") = -1
|
||||||
|
Row("CveVentaDetallePedido2") = -1
|
||||||
|
Row("CuentaPredial") = CuentaPredial
|
||||||
|
Row("EsCargo") = 0
|
||||||
|
|
||||||
|
If Me.DtDetalle.Columns.Contains("CveMarca") Then
|
||||||
|
Row("CveMarca") = DrPS("CveMarca")
|
||||||
|
End If
|
||||||
|
|
||||||
|
Row("CvePrecioLista") = -1
|
||||||
|
Row("PrecioLista") = ""
|
||||||
|
|
||||||
|
Row("CveActivoFijo") = -1
|
||||||
|
Row("AFDepreciacion") = 0
|
||||||
|
Row("AFValorInicial") = 0
|
||||||
|
|
||||||
|
Row("NumTurnos") = 0
|
||||||
|
|
||||||
|
Me.DtDetalle.Rows.Add(Row)
|
||||||
|
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Sub CalculaTotales()
|
||||||
|
Me.SubTotal = Me.DtDetalle.SUMD("Total")
|
||||||
|
Me.IVA = Me.DtDetalle.SUMD("ImporteIVA")
|
||||||
|
Me.RetIVA = Me.DtDetalle.SUMD("ImporteRetIVA")
|
||||||
|
Me.RetISR = Me.DtDetalle.SUMD("ImporteRetISR")
|
||||||
|
Me.IEPS = Me.DtDetalle.SUMD("ImporteIEPS")
|
||||||
|
|
||||||
|
Me.Total = Me.SubTotal + Me.IVA + Me.IEPS - (Me.RetIVA + Me.RetISR)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub PreparaTimbre()
|
||||||
|
Dim Timbre As New CFDITimbre
|
||||||
|
Timbre.Comprobante.Version = "4.0"
|
||||||
|
|
||||||
|
Timbre.Comprobante.TipoComprobante = If(Me.TipoDocto.Contiene("Ing", "Ant"), "I", If(Me.TipoDocto.Contiene("Egs", "Dev"), "E", ""))
|
||||||
|
Timbre.Comprobante.Folio = Me.Folio.ToString()
|
||||||
|
Timbre.Comprobante.Serie = Me.Serie
|
||||||
|
Timbre.Comprobante.Fecha = Me.FechaCP
|
||||||
|
Timbre.Comprobante.FormadePago = Me.FormaPagoSAT33
|
||||||
|
Timbre.Comprobante.CondicionesdePago = Me.FormaPago33
|
||||||
|
Timbre.Comprobante.MetodoPago = Me.ClaveMetodoPagoSAT
|
||||||
|
Timbre.Comprobante.SubTotal = Me.SubTotal
|
||||||
|
Timbre.Comprobante.Descuentos = Me.Descuento
|
||||||
|
Timbre.Comprobante.Moneda = Me.MonedaSAT
|
||||||
|
Timbre.Comprobante.TipoCambio = If(Me.CveMoneda = 1, "1", Me.TipoCambio.ToString())
|
||||||
|
Timbre.Comprobante.Total = Me.Total
|
||||||
|
|
||||||
|
Timbre.Comprobante.LugarExpedicion = Me.SubProyecto.CP
|
||||||
|
If Timbre.Comprobante.LugarExpedicion = "" Then
|
||||||
|
Dim aa As String = "no se guardo lugar de expedicion"
|
||||||
|
aa.GuardaLog()
|
||||||
|
End If
|
||||||
|
|
||||||
|
Timbre.Comprobante.Confirmacion = ""
|
||||||
|
|
||||||
|
If Me.FacturarSucursal Then
|
||||||
|
Timbre.Receptor.RFC = Me.ClienteSucursal.RFC
|
||||||
|
Timbre.Receptor.Nombre = Me.ClienteSucursal.Nombre
|
||||||
|
Timbre.Receptor.DomicilioFiscalReceptor = Me.ClienteSucursal.CP
|
||||||
|
Else
|
||||||
|
Timbre.Receptor.RFC = Me.Cliente.RFC
|
||||||
|
Timbre.Receptor.Nombre = Me.Cliente.Nombre
|
||||||
|
Timbre.Receptor.DomicilioFiscalReceptor = Me.Cliente.CP
|
||||||
|
End If
|
||||||
|
|
||||||
|
Timbre.Receptor.RegimenFiscalReceptor = Me.Cliente.CodigoRegimenFiscal
|
||||||
|
|
||||||
|
Timbre.Receptor.ResidenciaFiscal = ""
|
||||||
|
Timbre.Receptor.NumeroRegistroTributario = ""
|
||||||
|
Timbre.Receptor.UsoCFDI = Me.ClaveUsoCFDI
|
||||||
|
|
||||||
|
Dim totSubTotal As Decimal = Me.SubTotal
|
||||||
|
Dim totIVA As Decimal = Me.IVA
|
||||||
|
Dim totRetIVA As Decimal = Me.RetIVA
|
||||||
|
Dim totRetISR As Decimal = Me.RetISR
|
||||||
|
|
||||||
|
Dim i As Integer = 1
|
||||||
|
|
||||||
|
'detalles
|
||||||
|
Dim tPS As String = ""
|
||||||
|
|
||||||
|
For Each drr As DataRow In Me.DtDetalle.Rows
|
||||||
|
If drr("PS").ToString().Length = 1 Then
|
||||||
|
tPS = drr("Obs").ToString()
|
||||||
|
Else
|
||||||
|
If drr("PS").ToString().Length = 0 Then
|
||||||
|
tPS = ""
|
||||||
|
Else
|
||||||
|
tPS = String.Format("{0} {1}", drr("PS"), drr("Obs"))
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
tPS = tPS.Replace("|", " ")
|
||||||
|
|
||||||
|
If tPS.Length >= 1000 Then
|
||||||
|
Dim tPSRecortado = tPS.Remove(999, tPS.Length - 999)
|
||||||
|
tPS = tPSRecortado
|
||||||
|
End If
|
||||||
|
|
||||||
|
'condicionante, especial
|
||||||
|
If UsuarioActual.CveEmpresa = 15 Then drr("UM") = "" ' les comentan que no debe de ir la etiqueta de "unidad" en el producto
|
||||||
|
|
||||||
|
Dim concepto As New CFDIConceptos With {.Cantidad = drr("Cantidad").ToString().ToDecimal,
|
||||||
|
.Descripcion = tPS,
|
||||||
|
.ValorUnitario = drr("PU").ToString().ToDecimal,
|
||||||
|
.Importe = drr("TotalImporte").ToString().ToDecimal,
|
||||||
|
.Descuento = drr("Descuento").ToString().ToDecimal.RoundSQL(2),
|
||||||
|
.Unidad = drr("UM").ToString(),
|
||||||
|
.ClaveUnidad = drr("SATClaveUM").ToString(),
|
||||||
|
.ClaveProdServ = drr("SATClaveProdServ").ToString(),
|
||||||
|
.Noidentificacion = drr("Noidentificacion").ToString(),
|
||||||
|
.CuentaPredial = drr("CuentaPredial").ToString(),
|
||||||
|
.ImporteGravaIVAAdicional = drr("ImporteIEPS").ToString().ToDecimal,
|
||||||
|
.ObjetoImpuesto = drr("CodigoObjetoImpuesto").ToString()}
|
||||||
|
'verifica suma subtotales
|
||||||
|
If i = Me.DtDetalle.Rows.Count AndAlso totSubTotal.RoundSQL(2) <> concepto.Importe.RoundSQL(2) AndAlso Math.Abs(totSubTotal.RoundSQL(2) - concepto.Importe.RoundSQL(2)) <= 0.01 Then 'proceso de ajusta de decimales
|
||||||
|
concepto.Importe = totSubTotal
|
||||||
|
'concepto.ValorUnitario = totSubTotal / concepto.Cantidad
|
||||||
|
End If
|
||||||
|
totSubTotal = totSubTotal - concepto.Importe
|
||||||
|
|
||||||
|
'siempre estaremos agregando el iva, auqnue sea en importe cero o tasa cero, para que se emita la factura
|
||||||
|
' If drr("ImporteIVA").ToString().ToDouble > 0 Then
|
||||||
|
|
||||||
|
'si es ingreso amortizado por la totalidad, y arroja el valor total de cero, no debe de impuestos, y si la BASE de calculo es mayor a cero
|
||||||
|
' si es objimp = 01, significa que no lleva desglose de impuesto, está exento
|
||||||
|
If concepto.ObjetoImpuesto <> "01" AndAlso Timbre.Comprobante.Total > 0 AndAlso (concepto.Importe - concepto.Descuento + concepto.ImporteGravaIVAAdicional > 0) Then
|
||||||
|
concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = (concepto.Importe - concepto.Descuento + concepto.ImporteGravaIVAAdicional).RoundSQL(6), .TasaOCuota = drr("PorcentajeIVA").ToString().ToDecimal, .Impuesto = "002", .Importe = drr("ImporteIVA").ToString().ToDecimal})
|
||||||
|
End If
|
||||||
|
|
||||||
|
If concepto.ObjetoImpuesto <> "01" AndAlso drr("ImporteIEPS").ToString().ToDouble > 0 Then
|
||||||
|
concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = (concepto.Importe - concepto.Descuento).RoundSQL(6), .TasaOCuota = drr("PorcentajeIEPS").ToString().ToDecimal, .Impuesto = "003", .Importe = drr("ImporteIEPS").ToString().ToDecimal})
|
||||||
|
End If
|
||||||
|
|
||||||
|
If concepto.ObjetoImpuesto <> "01" AndAlso drr("ImporteRetIVA").ToString().ToDouble > 0 Then 'si hay retenciones
|
||||||
|
concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "R", .Base = (concepto.Importe - concepto.Descuento).RoundSQL(6), .TasaOCuota = drr("PorcentajeRetIVA").ToString().ToDecimal, .Impuesto = "002", .Importe = drr("ImporteRetIVA").ToString().ToDecimal})
|
||||||
|
End If
|
||||||
|
|
||||||
|
If concepto.ObjetoImpuesto <> "01" AndAlso drr("ImporteRetISR").ToString().ToDouble > 0 Then 'retención de ISR
|
||||||
|
concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "R", .Base = (concepto.Importe - concepto.Descuento).RoundSQL(6), .TasaOCuota = drr("PorcentajeRetISR").ToString().ToDecimal, .Impuesto = "001", .Importe = drr("ImporteRetISR").ToString().ToDecimal})
|
||||||
|
End If
|
||||||
|
|
||||||
|
'si el codigo objeto impuesto es 02 y no tiene desglose de impuestos por el descuento, debe asignar el valor 04 - Si objeto de impuesto y no causa impuesto
|
||||||
|
If concepto.Impuestos.Count = 0 AndAlso concepto.ObjetoImpuesto = "02" AndAlso (concepto.Importe - concepto.Descuento + concepto.ImporteGravaIVAAdicional).RoundSQL(2) = 0.00D Then
|
||||||
|
concepto.ObjetoImpuesto = "04"
|
||||||
|
End If
|
||||||
|
|
||||||
|
Timbre.Conceptos.Add(concepto)
|
||||||
|
i += 1
|
||||||
|
Next
|
||||||
|
|
||||||
|
Dim AplicaComercioExteriorSubProyecto As Boolean = True
|
||||||
|
|
||||||
|
Timbre.Complementos.ComercioExterior11.AplicaComercioExteriorSubProyecto = False
|
||||||
|
|
||||||
|
Me.FemsaFactura = New Modelos.FemsaFactura
|
||||||
|
Me.Timbre = Timbre
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Function DescargarFactura(CveVenta As Integer, CveEmpresa As Integer, Optional GetBytes As Boolean = True) As Byte()
|
Private Function DescargarFactura(CveVenta As Integer, CveEmpresa As Integer, Optional GetBytes As Boolean = True) As Byte()
|
||||||
Dim Url = New Uri(String.Format("http://{0}:{1}/Compras/PopUpVerFactura.aspx?P={2}", HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port, Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", CveVenta))))
|
Dim Url = New Uri(String.Format("http://{0}:{1}/Compras/PopUpVerFactura.aspx?P={2}", HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port, Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", CveVenta))))
|
||||||
Dim File As Byte() = Nothing
|
Dim File As Byte() = Nothing
|
||||||
@@ -1534,6 +2140,79 @@ Namespace Modelos
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
Private Function GuardarCartaPorte(ByRef ObjFactura As Modelos.Factura, ByRef ObjGral As ClsGenerales, ByRef ObjVentas As ClsVentas) As Integer
|
||||||
|
Dim ErrorProceso As Boolean = False
|
||||||
|
Dim CveTimbre As Integer = -1
|
||||||
|
Try
|
||||||
|
Dim CveDireccionOrigen As Integer = -1
|
||||||
|
Dim CveDireccionDestino As Integer = -1
|
||||||
|
Dim Fechallegada As DateTime = MinFecha
|
||||||
|
Dim FechaEntrega As DateTime = MinFecha
|
||||||
|
Dim Distancia As Integer = 0
|
||||||
|
Dim CveChofer As Integer = -1
|
||||||
|
Dim CveCamion As Integer = -1
|
||||||
|
Dim CveConfigAutoTransporte As Integer = -1
|
||||||
|
Dim CveCamionRemolque1 As Integer = -1
|
||||||
|
Dim CveCamionRemolque2 As Integer = -1
|
||||||
|
|
||||||
|
If ObjVentas.GetFacturacionAcarreos(ObjFactura.CveFacturacionAcarreo, -1, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||||
|
Dim Row = ObjVentas.DtResultados.Rows(0)
|
||||||
|
|
||||||
|
If Row IsNot Nothing Then
|
||||||
|
CveDireccionOrigen = Row("CveDireccionOrigen").ToString().ToEntero()
|
||||||
|
CveDireccionDestino = Row("CveDireccionDestino").ToString().ToEntero()
|
||||||
|
|
||||||
|
Fechallegada = Row("Fechallegada").ToString().ToDateTime()
|
||||||
|
FechaEntrega = Row("FechaSalida").ToString().ToDateTime()
|
||||||
|
|
||||||
|
Distancia = Row("Distancia").ToString().ToEntero()
|
||||||
|
CveChofer = Row("CveChofer").ToString().ToEntero()
|
||||||
|
CveCamion = Row("CveCamion").ToString().ToEntero()
|
||||||
|
|
||||||
|
CveConfigAutoTransporte = Row("CveConfigAutoTransporte").ToString().ToEntero()
|
||||||
|
CveCamionRemolque1 = Row("CveCamionRemolque1").ToString().ToEntero()
|
||||||
|
CveCamionRemolque2 = Row("CveCamionRemolque2").ToString().ToEntero()
|
||||||
|
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not (CveDireccionOrigen > 0 And CveDireccionDestino > 0) Then
|
||||||
|
ErrorProceso = True
|
||||||
|
Return -1
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
Dim CveEntregaAlmacen As Integer = ObjGral.AddInvEntregaAlmacenRuta(ObjFactura.CveSubProyecto, CveDireccionOrigen, CveDireccionDestino, -1, CveChofer, CveCamion, FechaEntrega, Fechallegada, "I", "-1", "-1", Fechallegada, 1, 1, Distancia,
|
||||||
|
CveConfigAutoTransporte:=CveConfigAutoTransporte, CveCamionRemolque1:=CveCamionRemolque1, CveCamionRemolque2:=CveCamionRemolque2)
|
||||||
|
If CveEntregaAlmacen > 0 Then
|
||||||
|
|
||||||
|
For Each RowPS As DataRow In ObjFactura.DtMercancias.Rows
|
||||||
|
If Not ObjGral.AddEntregaAlmacenRutaDetalle(CveEntregaAlmacen, RowPS("CvePS").ToString().ToEntero, RowPS("Cantidad").ToString().ToDecimal, RowPS("CveUnidadMedida").ToString().ToEntero, UsuarioActual.CveUsuario) Then
|
||||||
|
ErrorProceso = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
CveTimbre = ObjGral.AddGralTimbre("Ing", ObjFactura.CveSubProyecto, ObjFactura.Fecha, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEntregaAlmacen:=CveEntregaAlmacen, AplicaCP:=True, CveVenta:=ObjFactura.CveVenta)
|
||||||
|
|
||||||
|
If Not CveTimbre > 0 Then
|
||||||
|
ErrorProceso = True
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
ErrorProceso = True
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
ErrorProceso = True
|
||||||
|
OnError("Ocurrió un error al guardar los datos de la carta porte", ex)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
If Not ErrorProceso Then
|
||||||
|
Return CveTimbre
|
||||||
|
Else
|
||||||
|
Return -1
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Function
|
||||||
Public Sub GuardarVenta(ByRef factura As Modelos.Factura, ByRef ObjVentas As ClsVentas, ByRef ObjConta As ClsContabilidad, ByRef ObjInventario As ClsInventarios, ByRef ObjContr As ClsContratos, ByRef TmpDTDetalle As DataTable, CveNCaVincular As Integer, ByRef objContPaqi As ClsContPAQi, Optional ByRef ObjBancos As ClsBancos = Nothing, Optional ByRef ObjOS As ClsOS = Nothing, ByRef Optional ObjEventos As ClsOIEventos = Nothing, ByRef Optional ObjCGame As ClsCGame = Nothing, ByRef Optional ObjCliente As ClsClientes = Nothing, Optional EsNotaCredito As Boolean = False, Optional ObjAcum As ClsAcumuladores = Nothing, ByRef Optional Resp As MMensajeFactura = Nothing, Optional Modulo As String = "Modelos/GuardarVentaM")
|
Public Sub GuardarVenta(ByRef factura As Modelos.Factura, ByRef ObjVentas As ClsVentas, ByRef ObjConta As ClsContabilidad, ByRef ObjInventario As ClsInventarios, ByRef ObjContr As ClsContratos, ByRef TmpDTDetalle As DataTable, CveNCaVincular As Integer, ByRef objContPaqi As ClsContPAQi, Optional ByRef ObjBancos As ClsBancos = Nothing, Optional ByRef ObjOS As ClsOS = Nothing, ByRef Optional ObjEventos As ClsOIEventos = Nothing, ByRef Optional ObjCGame As ClsCGame = Nothing, ByRef Optional ObjCliente As ClsClientes = Nothing, Optional EsNotaCredito As Boolean = False, Optional ObjAcum As ClsAcumuladores = Nothing, ByRef Optional Resp As MMensajeFactura = Nothing, Optional Modulo As String = "Modelos/GuardarVentaM")
|
||||||
Dim Msgok As New StringBuilder
|
Dim Msgok As New StringBuilder
|
||||||
|
|
||||||
@@ -3885,9 +4564,10 @@ Namespace Modelos
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If factura.TipoDocto = "Rem" AndAlso factura.ServicioDomicilio Then
|
If factura.TipoDocto = "Rem" AndAlso factura.ServicioDomicilio Then
|
||||||
Dim CveMovimientoSalida As Integer = GenerarMovimientoAlmacenServicioDomicilio(ObjInventario, factura, DtInventario, factura.CveAlmacenServicioDomicilio, 8, factura.CveMoneda, factura.CveVenta, "Modelos/SD1", True, ObjConta)
|
'debe de hacerse un traspaso entre almacenes, no contabilizable. .RMF pdte
|
||||||
|
Dim CveMovimientoSalida As Integer = GenerarMovimientoAlmacenServicioDomicilio(ObjInventario, factura, DtInventario, factura.CveAlmacenServicioDomicilio, 8, factura.CveMoneda, factura.CveVenta, "Modelos/SD1", True, ObjConta, GeneraCosto:=False, Contabilizable:=False)
|
||||||
If CveMovimientoSalida > 0 Then
|
If CveMovimientoSalida > 0 Then
|
||||||
If Not (GenerarMovimientoAlmacenServicioDomicilio(ObjInventario, factura, DtInventario, factura.CveAlmacenTraspasoDestino, 9, factura.CveMoneda, factura.CveVenta, "Modelos/SD2", True, ObjConta, CveMovimientoRelacionado:=CveMovimientoSalida) > 0) Then
|
If Not (GenerarMovimientoAlmacenServicioDomicilio(ObjInventario, factura, DtInventario, factura.CveAlmacenTraspasoDestino, 9, factura.CveMoneda, factura.CveVenta, "Modelos/SD2", True, ObjConta, CveMovimientoRelacionado:=CveMovimientoSalida, GeneraCosto:=False, Contabilizable:=False) > 0) Then
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -3979,11 +4659,11 @@ Namespace Modelos
|
|||||||
TipoMovto = True
|
TipoMovto = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaGarantia, TipoMovto, TotalGarantia, "MOVIMIENTO DE GARANTIA", 68, "MOVIMIENTO DE GARANTIA", factura.Fecha, -1, -1, CveMovimientoAlmacen:=CveMovimientoGarantia, Contabilizable:=True, ImporteMX:=TotalGarantia) Then
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaGarantia, TipoMovto, TotalGarantia, "MOVIMIENTO DE GARANTIA", 68, "MOVIMIENTO DE GARANTIA", factura.Fecha, -1, -1, CveMovimientoAlmacen:=CveMovimientoGarantia, Contabilizable:=False, ImporteMX:=TotalGarantia) Then
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not OcurrioError AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePolizaGarantia, Not TipoMovto, TotalGarantia, "MOVIMIENTO DE GARANTIA", 331, "MOVIMIENTO DE GARANTIA", factura.Fecha, -1, -1, CveMovimientoAlmacen:=CveMovimientoGarantia, Contabilizable:=True, ImporteMX:=TotalGarantia) Then
|
If Not OcurrioError AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePolizaGarantia, Not TipoMovto, TotalGarantia, "MOVIMIENTO DE GARANTIA", 331, "MOVIMIENTO DE GARANTIA", factura.Fecha, -1, -1, CveMovimientoAlmacen:=CveMovimientoGarantia, Contabilizable:=False, ImporteMX:=TotalGarantia) Then
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
@@ -4258,7 +4938,7 @@ Namespace Modelos
|
|||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function GenerarMovimientoAlmacenServicioDomicilio(ByRef ObjInventario As ClsInventarios, ByRef factura As Modelos.Factura, DtInventario As DataTable, CveAlmacen As Integer, CveConcepto As Integer, CveMoneda As Integer, CveVenta As Integer, Modulo As String, Optional MovimientoPrePoliza As Boolean = False, Optional ByRef ObjConta As ClsContabilidad = Nothing, Optional CveMovimientoRelacionado As Integer = -1) As Integer
|
Private Function GenerarMovimientoAlmacenServicioDomicilio(ByRef ObjInventario As ClsInventarios, ByRef factura As Modelos.Factura, DtInventario As DataTable, CveAlmacen As Integer, CveConcepto As Integer, CveMoneda As Integer, CveVenta As Integer, Modulo As String, Optional MovimientoPrePoliza As Boolean = False, Optional ByRef ObjConta As ClsContabilidad = Nothing, Optional CveMovimientoRelacionado As Integer = -1, Optional GeneraCosto As Boolean = True, Optional Contabilizable As Boolean = True) As Integer
|
||||||
Dim OcurrioError As Boolean = False
|
Dim OcurrioError As Boolean = False
|
||||||
|
|
||||||
Dim CveMovimientoInventario As Integer = ObjInventario.AddMovimiento(CveAlmacen, CveConcepto, factura.CveMoneda, factura.Fecha, -1, factura.CveUsuario, factura.CveEmpresa, -1, factura.CveVenta, -1, -1, Modulo:=Modulo, CveMovimientoRelacionado:=CveMovimientoRelacionado)
|
Dim CveMovimientoInventario As Integer = ObjInventario.AddMovimiento(CveAlmacen, CveConcepto, factura.CveMoneda, factura.Fecha, -1, factura.CveUsuario, factura.CveEmpresa, -1, factura.CveVenta, -1, -1, Modulo:=Modulo, CveMovimientoRelacionado:=CveMovimientoRelacionado)
|
||||||
@@ -4358,39 +5038,40 @@ Namespace Modelos
|
|||||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoInventario, UsuarioActual.CveEmpresa) Then
|
If ObjInventario.GetMovimientosDetalle(CveMovimientoInventario, UsuarioActual.CveEmpresa) Then
|
||||||
DtCostos = ObjInventario.DtResultados
|
DtCostos = ObjInventario.DtResultados
|
||||||
TotalCosto = DtCostos.SUMD("Total").RoundSQL
|
TotalCosto = DtCostos.SUMD("Total").RoundSQL
|
||||||
Dim tmpCostos As DataTable = DtCostos.FiltraParametros("", "", {"CveClasificacion"})
|
|
||||||
Dim IdCtaContable As Integer = 0
|
Dim IdCtaContable As Integer = 0
|
||||||
If tmpCostos.Rows.Count > 0 Then
|
If GeneraCosto Then
|
||||||
Dim TotalCostoAcumulado As Decimal = 0
|
Dim tmpCostos As DataTable = DtCostos.FiltraParametros("", "", {"CveClasificacion"})
|
||||||
Dim cont As Integer = 1
|
If tmpCostos.Rows.Count > 0 Then
|
||||||
'Se agrega movimiento separado por la cuenta de ventas (ER)
|
Dim TotalCostoAcumulado As Decimal = 0
|
||||||
For Each RowInv As DataRow In tmpCostos.Rows
|
Dim cont As Integer = 1
|
||||||
ValorInventario = DtCostos.SUMD("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").RoundSQL
|
'Se agrega movimiento separado por la cuenta de ventas (ER)
|
||||||
TotalCostoAcumulado += ValorInventario
|
For Each RowInv As DataRow In tmpCostos.Rows
|
||||||
|
ValorInventario = DtCostos.SUMD("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").RoundSQL
|
||||||
|
TotalCostoAcumulado += ValorInventario
|
||||||
|
|
||||||
'cuando es el último movimiento y hay diferencias en los importes
|
'cuando es el último movimiento y hay diferencias en los importes
|
||||||
If cont = tmpCostos.Rows.Count AndAlso TotalCosto <> TotalCostoAcumulado Then
|
If cont = tmpCostos.Rows.Count AndAlso TotalCosto <> TotalCostoAcumulado Then
|
||||||
ValorInventario = ValorInventario + (TotalCosto - TotalCostoAcumulado)
|
ValorInventario = ValorInventario + (TotalCosto - TotalCostoAcumulado)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Concepto = String.Format("{0} - {1}", Row2("Clasificacion").ToString(), Row2("SubProyecto").ToString())
|
'Concepto = String.Format("{0} - {1}", Row2("Clasificacion").ToString(), Row2("SubProyecto").ToString())
|
||||||
IdCtaContable = ClsPaginas.GlobalDTClasificaciones(factura.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
|
IdCtaContable = ClsPaginas.GlobalDTClasificaciones(factura.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
|
||||||
'If ValorInventario <> 0 Then
|
'If ValorInventario <> 0 Then
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto69, ValorInventario, factura.SerieFolio, 69, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveSubProyecto:=factura.CveSubProyecto, CveClasificacion:=RowInv("CveClasificacion").ToString().ToEntero(), CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario) Then
|
If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto69, ValorInventario, factura.SerieFolio, 69, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveSubProyecto:=factura.CveSubProyecto, CveClasificacion:=RowInv("CveClasificacion").ToString().ToEntero(), CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario, Contabilizable:=Contabilizable) Then
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
End If
|
End If
|
||||||
'End If
|
'End If
|
||||||
cont += 1
|
cont += 1
|
||||||
Next
|
Next
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
IdCtaContable = ClsPaginas.GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero()
|
IdCtaContable = ClsPaginas.GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero()
|
||||||
|
|
||||||
'If TotalCosto <> 0 Then
|
If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto68, TotalCosto, factura.SerieFolio, 68, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=TotalCosto, CveSubProyecto:=factura.CveSubProyecto, Contabilizable:=Contabilizable) Then
|
||||||
If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto68, TotalCosto, factura.SerieFolio, 68, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=TotalCosto, CveSubProyecto:=factura.CveSubProyecto) Then
|
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
End If
|
End If
|
||||||
'End If
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
@@ -6408,22 +7089,17 @@ Namespace Modelos
|
|||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ValorInventario, Concepto, 68, Concepto, Fecha, 0, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoEntradaDevRem, ImporteMX:=ValorInventario, Contabilizable:=EsContabilizable) Then
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ValorInventario, Concepto, 68, Concepto, Fecha, 0, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoEntradaDevRem, ImporteMX:=ValorInventario, Contabilizable:=EsContabilizable) Then
|
||||||
ErrorCancelar = True
|
ErrorCancelar = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
ErrorCancelar = True
|
ErrorCancelar = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If Not ErrorCancelar Then
|
If Not ErrorCancelar Then
|
||||||
If Not ObjVentas.UpdateVentasDevolucionAlmacen(2, CveRemision) Then
|
If Not ObjVentas.UpdateVentasDevolucionAlmacen(2, CveRemision) Then
|
||||||
ErrorCancelar = True
|
ErrorCancelar = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Return Not ErrorCancelar
|
Return Not ErrorCancelar
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
@@ -6774,6 +7450,8 @@ Namespace Modelos
|
|||||||
Public Property DevPed As Integer = -1
|
Public Property DevPed As Integer = -1
|
||||||
Public Property CveFactura As Integer
|
Public Property CveFactura As Integer
|
||||||
Public Property CveCicloComercial As Integer
|
Public Property CveCicloComercial As Integer
|
||||||
|
Public Property CveFacturacionAcarreo As Integer = -1
|
||||||
|
Public Property EmitirCartaPorte As Boolean = False
|
||||||
Public Property TipoDoctoDevolucion As String
|
Public Property TipoDoctoDevolucion As String
|
||||||
Public Property SeGuardoPrePoliza As Boolean
|
Public Property SeGuardoPrePoliza As Boolean
|
||||||
Public Property DirectorioServidor As String
|
Public Property DirectorioServidor As String
|
||||||
|
|||||||
@@ -590,11 +590,11 @@ Public Class Timbrado
|
|||||||
CancelacionFecha = xmlDoc.SelectSingleNode("Acuse").Attributes("Fecha").Value.ToDate
|
CancelacionFecha = xmlDoc.SelectSingleNode("Acuse").Attributes("Fecha").Value.ToDate
|
||||||
Retorno.CancelacionAcuse = CancelacionAcuse
|
Retorno.CancelacionAcuse = CancelacionAcuse
|
||||||
Retorno.CancelacionFecha = CancelacionFecha
|
Retorno.CancelacionFecha = CancelacionFecha
|
||||||
|
Retorno.Verificado = True
|
||||||
Else
|
Else
|
||||||
CancelacionFecha = Now
|
Retorno.Verificado = False
|
||||||
End If
|
End If
|
||||||
Retorno.Verificado = True
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
MsgCancelacion.AppendFormat("-3.5")
|
MsgCancelacion.AppendFormat("-3.5")
|
||||||
@@ -3261,6 +3261,8 @@ Public Class Timbrado
|
|||||||
If cfdi.Xml <> "" Then cfdi.EscribirXml(RutaArchivo & NombreArchivoXML & ".xml")
|
If cfdi.Xml <> "" Then cfdi.EscribirXml(RutaArchivo & NombreArchivoXML & ".xml")
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
Else
|
||||||
|
Retorno = "XML No generado "
|
||||||
End If
|
End If
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|||||||
@@ -29,11 +29,6 @@
|
|||||||
<li>
|
<li>
|
||||||
<asp:HyperLink ID="HpLPrePoliza" NavigateUrl="#" runat="server" Visible="false" Style="color: #686868;"><i class="" style="color:#686868;"></i> PrePoliza</asp:HyperLink>
|
<asp:HyperLink ID="HpLPrePoliza" NavigateUrl="#" runat="server" Visible="false" Style="color: #686868;"><i class="" style="color:#686868;"></i> PrePoliza</asp:HyperLink>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<%-- <li>
|
|
||||||
<asp:LinkButton ID="LnkEmitirComplemento" runat="server" Style="color: #686868;" Visible="false"><i class="fa fa-file-text-o" style="color:#686868;"></i> Emitir Complemento de Pago</asp:LinkButton>
|
|
||||||
</li>--%>
|
|
||||||
|
|
||||||
<asp:UpdatePanel ID="UppEliminarIE" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UppEliminarIE" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<li>
|
<li>
|
||||||
@@ -45,20 +40,8 @@
|
|||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="LnkEliminar" runat="server" Visible="false" OnClientClick="return confirm('¿Está seguro de eliminar el documento?');" Style="color: #686868;"><i class="fa fa-minus" style="color: #686868;"></i> Eliminar Movimiento</asp:LinkButton>
|
<asp:LinkButton ID="LnkEliminar" runat="server" Visible="false" OnClientClick="return confirm('¿Está seguro de eliminar el documento?');" Style="color: #686868;"><i class="fa fa-minus" style="color: #686868;"></i> Eliminar Movimiento</asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<%--<li>
|
|
||||||
<asp:LinkButton ID="LnkCancelarComplemento" OnClick="LnkCancelarComplemento_Click" runat="server" Visible="false" Style="color: #686868;"><i class="fa fa-ban" style="color: #686868;"></i> Refacturar Complemento</asp:LinkButton>
|
|
||||||
</li>--%>
|
|
||||||
|
|
||||||
<li>
|
|
||||||
<%--<asp:LinkButton ID="LnkCancelarComplementoImporte" OnClick="LnkCancelarComplementoImporte_Click" runat="server" Visible="false" data-btn-ok-label="si" Style="color: #686868;" data-toggle="tooltip" data-placement="left" title="Cancelar Movimiento y Complemento" > <i class="fa fa-pencil"></i> Cancelar Movimiento y Complemento</asp:LinkButton>--%>
|
|
||||||
|
|
||||||
<%-- data-original-title="¿Está seguro que desea cancelar el documento?" data-btn-ok-label="si" Style="color: #686868;"><i class="fa fa-pencil"--%>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
<asp:UpdatePanel ID="UPPDesContabilizar" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UPPDesContabilizar" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
@@ -179,8 +162,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="chequesie2" id="checkesie2">
|
<div class="chequesie2" id="checkesie2">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
@@ -222,9 +203,6 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2"></div>
|
<div class="col-md-2"></div>
|
||||||
<label class="col-md-1 control-label text-right">Importe:</label>
|
<label class="col-md-1 control-label text-right">Importe:</label>
|
||||||
|
|||||||
@@ -631,12 +631,6 @@ Partial Class Bancos_IE
|
|||||||
|
|
||||||
If Not IsPostBack Then
|
If Not IsPostBack Then
|
||||||
|
|
||||||
'PDFReciboDePagos(-1, 1336198, 87212, False) '--pago20
|
|
||||||
'PDFReciboDePagos(-1, 1361624, 87916, False) '--pago20
|
|
||||||
|
|
||||||
''PDFReciboDePagos(-1, 1304037, 87219, False)
|
|
||||||
'Exit Sub
|
|
||||||
|
|
||||||
Me.CveCorte = -1
|
Me.CveCorte = -1
|
||||||
Folio = ""
|
Folio = ""
|
||||||
IDCtaBeneficiario = 0
|
IDCtaBeneficiario = 0
|
||||||
@@ -5016,10 +5010,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
|
||||||
|
|||||||
@@ -798,7 +798,7 @@ Partial Class Bancos_PopIECompras
|
|||||||
Protected Sub CargaAcreedores(Optional CveMoneda As Integer = 1)
|
Protected Sub CargaAcreedores(Optional CveMoneda As Integer = 1)
|
||||||
Dim ObjMov As New ClsMovimientos
|
Dim ObjMov As New ClsMovimientos
|
||||||
|
|
||||||
If ObjMov.GetAcreedoresSaldos(-1, UsuarioActual.CveEmpresa) Then
|
If ObjMov.GetAcreedoresSaldos(-1, CveMoneda, UsuarioActual.CveEmpresa) Then
|
||||||
DtAcreedores = ObjMov.DtResultados.FiltraParametros($"CveProveedor > 0 AND CveMoneda = {CveMoneda}")
|
DtAcreedores = ObjMov.DtResultados.FiltraParametros($"CveProveedor > 0 AND CveMoneda = {CveMoneda}")
|
||||||
DdlAcreedor.DataSource = DtAcreedores
|
DdlAcreedor.DataSource = DtAcreedores
|
||||||
DdlAcreedor.DataBind()
|
DdlAcreedor.DataBind()
|
||||||
|
|||||||
BIN
Bin/GoCfdi.dll
BIN
Bin/GoCfdi.dll
Binary file not shown.
@@ -2557,6 +2557,7 @@ Partial Class Compras_Compras
|
|||||||
TipoCompraOriginal = dr("CveTipoCompra").ToString.ToEntero
|
TipoCompraOriginal = dr("CveTipoCompra").ToString.ToEntero
|
||||||
CveTipoConcepto = dr("CveTipoConcepto").ToString.ToEntero
|
CveTipoConcepto = dr("CveTipoConcepto").ToString.ToEntero
|
||||||
ChkEsNoDeducible.Checked = dr("NoDeducible").ToString.ToEntero > 0
|
ChkEsNoDeducible.Checked = dr("NoDeducible").ToString.ToEntero > 0
|
||||||
|
If ChkEsNoDeducible.Checked Then AplicarNoDeducible()
|
||||||
LblMetodoPago.Text = dr("MetodoPagoSAT").ToString
|
LblMetodoPago.Text = dr("MetodoPagoSAT").ToString
|
||||||
|
|
||||||
If UsuarioActual.Empresa.UsaAC Then
|
If UsuarioActual.Empresa.UsaAC Then
|
||||||
@@ -3279,7 +3280,7 @@ Partial Class Compras_Compras
|
|||||||
Protected Sub CargaAcreedores()
|
Protected Sub CargaAcreedores()
|
||||||
Dim ObjMov As New ClsMovimientos
|
Dim ObjMov As New ClsMovimientos
|
||||||
|
|
||||||
If ObjMov.GetAcreedoresSaldos(-1, UsuarioActual.CveEmpresa) Then
|
If ObjMov.GetAcreedoresSaldos(-1, -1, UsuarioActual.CveEmpresa) Then
|
||||||
DtAcreedores = ObjMov.DtResultados.FiltraParametros("CveProveedor > 0")
|
DtAcreedores = ObjMov.DtResultados.FiltraParametros("CveProveedor > 0")
|
||||||
DdlAcreedor.DataSource = DtAcreedores
|
DdlAcreedor.DataSource = DtAcreedores
|
||||||
DdlAcreedor.DataBind()
|
DdlAcreedor.DataBind()
|
||||||
|
|||||||
@@ -81,7 +81,7 @@
|
|||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="LnkRegistarFactura" runat="server" OnClick="LnkRegistarFactura_Click" ><i class="fa fa-plus-square-o"></i> Registar Compras</asp:LinkButton>
|
<asp:LinkButton ID="LnkRegistarFactura" runat="server" OnClick="LnkRegistarFactura_Click" Visible="false" ><i class="fa fa-plus-square-o"></i> Registar Compras</asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
@@ -98,21 +98,41 @@
|
|||||||
|
|
||||||
<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;max-width:80px!important" >
|
||||||
|
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;max-width:80px!important" >
|
||||||
|
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;max-width:80px!important" >
|
||||||
|
Fecha I.:
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1" style="min-width:125px!important;margin-left:-9px!important">
|
||||||
|
|
||||||
|
|
||||||
|
<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>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
@@ -121,9 +141,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;max-width:80px!important" >
|
||||||
|
Fecha F.:
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1" style="min-width:120px!important;margin-left:-1px!important">
|
||||||
|
<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 +159,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;max-width:80px!important" >
|
||||||
|
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 +175,52 @@
|
|||||||
<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>
|
</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 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;max-width:80px!important" >
|
||||||
</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;max-width:80px!important" >
|
||||||
|
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;max-width:80px!important" >
|
||||||
|
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;max-width:80px!important" >
|
||||||
|
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 +253,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>
|
||||||
|
|
||||||
@@ -228,20 +270,24 @@
|
|||||||
<asp:ListItem Value="6" Selected="True" >Caja Chica</asp:ListItem>
|
<asp:ListItem Value="6" Selected="True" >Caja Chica</asp:ListItem>
|
||||||
<asp:ListItem Value="2">Viáticos</asp:ListItem>
|
<asp:ListItem Value="2">Viáticos</asp:ListItem>
|
||||||
</asp:RadioButtonList>
|
</asp:RadioButtonList>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<div class="form-group form-md-line-input input-iconright" >
|
<div>
|
||||||
|
<div class="form-group form-md-line-input input-iconright col-md-6" >
|
||||||
<asp:DropDownList ID="DdlRetIVAConcepto" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" Style="width: 100%;" runat="server"></asp:DropDownList>
|
<asp:DropDownList ID="DdlRetIVAConcepto" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" Style="width: 100%;" runat="server"></asp:DropDownList>
|
||||||
<label runat="server" id="LblRetIVAConcepto" for="<%= DdlRetIVAConcepto.ClientID.ToString()%>">Ret. IVA:</label>
|
<label runat="server" id="LblRetIVAConcepto" for="<%= DdlRetIVAConcepto.ClientID.ToString()%>">Ret. IVA:</label>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="form-group form-md-line-input input-iconright col-md-6" >
|
||||||
|
|
||||||
|
<asp:DropDownList ID="DdlRetISRConcepto" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" Style="width: 100%;" runat="server"></asp:DropDownList>
|
||||||
|
<label runat="server" id="LblRetISRConcepto" for="<%= DdlRetISRConcepto.ClientID.ToString()%>">Ret. ISR:</label>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@@ -262,18 +308,13 @@
|
|||||||
<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>
|
||||||
|
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<div class="form-group form-md-line-input input-iconright" >
|
|
||||||
|
|
||||||
<asp:DropDownList ID="DdlRetISRConcepto" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" Style="width: 100%;" runat="server"></asp:DropDownList>
|
|
||||||
<label runat="server" id="LblRetISRConcepto" for="<%= DdlRetISRConcepto.ClientID.ToString()%>">Ret. ISR:</label>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@@ -287,6 +328,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 +344,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 +356,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 +369,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
|
||||||
@@ -5085,7 +5086,6 @@ Partial Class Compras_eFacturas
|
|||||||
cargasolicitudes()
|
cargasolicitudes()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
@@ -5172,8 +5172,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 +5181,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 +5245,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()
|
||||||
@@ -5304,9 +5305,6 @@ Partial Class Compras_eFacturas
|
|||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Protected Sub LnkRegistarFactura_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkRegistarFactura_Click(sender As Object, e As EventArgs)
|
||||||
DVRegistraFacturas.Visible = True
|
DVRegistraFacturas.Visible = True
|
||||||
GvD.Columns(0).Visible = True
|
GvD.Columns(0).Visible = True
|
||||||
@@ -5317,87 +5315,67 @@ 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
|
||||||
|
|
||||||
|
If RBLContado.SelectedValue.ToEntero = 6 Then
|
||||||
|
CveCajachica = DdlCuentaCajaChicaReembolso.SelectedValue.ToEntero
|
||||||
|
Else
|
||||||
|
CvePersonal = DdlPersonalReembolso.SelectedValue.ToEntero
|
||||||
|
End If
|
||||||
|
|
||||||
Dim ObjCompras As New ClsCompras
|
CompraActual.ConfiguraRegistroRapidoReembolso(DdlPS.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, CveCajachica, CvePersonal,
|
||||||
Dim ObjConta As New ClsContabilidad(ObjCompras.IniciaTransacSQL)
|
DdlRetIVAConcepto.SelectedValue.ToEntero, DdlRetISRConcepto.SelectedValue.ToEntero, NumeroReembolso:=TxtNumeroReembolso.Text)
|
||||||
|
If CompraActual.AddCompra() Then
|
||||||
Dim ConceptoPoliza As String = String.Format("{0} - {1} - {2}", GvRow.DataKey("NombreProveedor"), GvRow.DataKey("SerieFolio"), "")
|
Contador = Contador + 1
|
||||||
|
Else
|
||||||
CompraActual.CvePrePoliza = ObjConta.AddPrePolizas("eFacturas/Registrar", 1, CompraActual.Total, CompraActual.Total, CompraActual.CveMoneda, CompraActual.Fecha, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0, "", CveTipoPoliza:=3)
|
ErrorProceso = True
|
||||||
|
ErrorProcesoStr = CompraActual.MensajeError
|
||||||
CompraActual.ConfiguraRegistroRapidoReembolso(DdlPS.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlCuentaCajaChicaReembolso.SelectedValue.ToEntero, DdlPersonalReembolso.SelectedValue.ToEntero,
|
Exit For
|
||||||
DdlRetIVAConcepto.SelectedValue.ToEntero, DdlRetISRConcepto.SelectedValue.ToEntero)
|
End If
|
||||||
|
|
||||||
'CompraActual.AddCompra()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'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
|
||||||
|
|
||||||
Public Class Compra2
|
Public Class Compra2
|
||||||
@@ -5458,7 +5436,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 +5562,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
|
||||||
@@ -5603,7 +5581,6 @@ Public Class Compra2
|
|||||||
Public Property TotalTraslados As Decimal = 0D
|
Public Property TotalTraslados As Decimal = 0D
|
||||||
Public Property TrasladoIVA As Decimal = 0D
|
Public Property TrasladoIVA As Decimal = 0D
|
||||||
Public Property TrasladoIEPS As Decimal = 0D
|
Public Property TrasladoIEPS As Decimal = 0D
|
||||||
Public Property TrasladoIEP As Decimal = 0D
|
|
||||||
Public Property SumaTotalTraslados As Decimal = 0D
|
Public Property SumaTotalTraslados As Decimal = 0D
|
||||||
Public Property OtrosImpuestos As Decimal = 0D
|
Public Property OtrosImpuestos As Decimal = 0D
|
||||||
Private Property OtrosImpuestosRetenciones As Decimal = 0D
|
Private Property OtrosImpuestosRetenciones As Decimal = 0D
|
||||||
@@ -5614,9 +5591,8 @@ Public Class Compra2
|
|||||||
Public Property XMlStr As String
|
Public Property XMlStr As String
|
||||||
Public Property XMLCargaExistosa As Boolean = True
|
Public Property XMLCargaExistosa As Boolean = True
|
||||||
|
|
||||||
|
|
||||||
Public Property Observaciones As String = ""
|
Public Property Observaciones As String = ""
|
||||||
Public Property CveEstatusFactura As Integer = -1
|
Public Property CveEstatusFactura As Integer = 1
|
||||||
Public Property CvePrePoliza As Integer = -1
|
Public Property CvePrePoliza As Integer = -1
|
||||||
Public Property Redondeo As Decimal = 0
|
Public Property Redondeo As Decimal = 0
|
||||||
Public Property IdPoliza As Integer = -1
|
Public Property IdPoliza As Integer = -1
|
||||||
@@ -5636,9 +5612,9 @@ 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 MensajeError As String
|
||||||
Get
|
Get
|
||||||
Return Errores.ToString()
|
Return Errores.ToString()
|
||||||
End Get
|
End Get
|
||||||
@@ -5660,6 +5636,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)
|
||||||
|
|
||||||
@@ -5704,7 +5685,6 @@ Public Class Compra2
|
|||||||
CargaComprobanteXML(XMLDoc)
|
CargaComprobanteXML(XMLDoc)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaDesdeString(XmlFuente As String)
|
Private Sub CargaDesdeString(XmlFuente As String)
|
||||||
XMlStr = XmlFuente.Replace("<br>", "").Replace("<", "").Replace("o;?", "")
|
XMlStr = XmlFuente.Replace("<br>", "").Replace("<", "").Replace("o;?", "")
|
||||||
@@ -5722,10 +5702,8 @@ Public Class Compra2
|
|||||||
CargaComprobanteXML(XMLDoc)
|
CargaComprobanteXML(XMLDoc)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
Private Sub CargaComprobanteXML(XMLDoc As XmlDocument)
|
Private Sub CargaComprobanteXML(XMLDoc As XmlDocument)
|
||||||
Dim nodo As XmlNode = XMLDoc.DocumentElement
|
Dim nodo As XmlNode = XMLDoc.DocumentElement
|
||||||
|
|
||||||
@@ -5733,7 +5711,6 @@ Public Class Compra2
|
|||||||
|
|
||||||
Dim StrCFDIVerion As String = ValorXML(nodo, "version")
|
Dim StrCFDIVerion As String = ValorXML(nodo, "version")
|
||||||
|
|
||||||
|
|
||||||
If StrCFDIVerion = "3.2" Then
|
If StrCFDIVerion = "3.2" Then
|
||||||
CFDIVersion = EnumCFDIVersion.v32
|
CFDIVersion = EnumCFDIVersion.v32
|
||||||
ElseIf StrCFDIVerion = "3.3" Then
|
ElseIf StrCFDIVerion = "3.3" Then
|
||||||
@@ -5752,7 +5729,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
|
||||||
@@ -5921,7 +5898,6 @@ Public Class Compra2
|
|||||||
|
|
||||||
#Region "DETALLES"
|
#Region "DETALLES"
|
||||||
|
|
||||||
|
|
||||||
Dim ObjeFacturas As New ClsCompras
|
Dim ObjeFacturas As New ClsCompras
|
||||||
Dim AjustaUltimoConcepto = False
|
Dim AjustaUltimoConcepto = False
|
||||||
|
|
||||||
@@ -5955,8 +5931,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.")
|
||||||
@@ -5972,24 +5948,24 @@ Public Class Compra2
|
|||||||
End If
|
End If
|
||||||
TmpDT.AcceptChanges()
|
TmpDT.AcceptChanges()
|
||||||
ValidacionesTotalesXml()
|
ValidacionesTotalesXml()
|
||||||
|
|
||||||
|
|
||||||
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 +5991,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 +6058,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 +6092,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 +6547,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 +6622,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 +6731,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
|
||||||
|
|
||||||
|
|
||||||
@@ -6780,7 +6764,6 @@ Public Class Compra2
|
|||||||
Row("IVAPorcentaje") = IVA
|
Row("IVAPorcentaje") = IVA
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Row("RetIVA") = (RetIVA * Total).RoundSQL
|
Row("RetIVA") = (RetIVA * Total).RoundSQL
|
||||||
Row("RetIVAPorcentaje") = RetIVA
|
Row("RetIVAPorcentaje") = RetIVA
|
||||||
Row("RetISR") = (RetISR * Total).RoundSQL
|
Row("RetISR") = (RetISR * Total).RoundSQL
|
||||||
@@ -6813,17 +6796,11 @@ Public Class Compra2
|
|||||||
Row("CveTipoGastoAC") = CveTipoGastoAC
|
Row("CveTipoGastoAC") = CveTipoGastoAC
|
||||||
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
|
||||||
Row("IEPSPS") = 0
|
Row("IEPSPS") = 0
|
||||||
Row("IEPSPSPorcentaje") = 0
|
Row("IEPSPSPorcentaje") = 0
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
TmpDT.Rows.Add(Row)
|
TmpDT.Rows.Add(Row)
|
||||||
TmpDT.Rows.IndexOf(Row)
|
TmpDT.Rows.IndexOf(Row)
|
||||||
|
|
||||||
@@ -6852,11 +6829,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 +6841,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 +6862,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
|
||||||
@@ -6897,40 +6871,8 @@ Public Class Compra2
|
|||||||
CompraSaldo = LocalTotal
|
CompraSaldo = LocalTotal
|
||||||
|
|
||||||
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
|
||||||
|
|
||||||
@@ -6950,10 +6892,6 @@ Public Class Compra2
|
|||||||
Return False
|
Return False
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
|
|
||||||
'BANDERA
|
|
||||||
'Dim AplicaCalculaTotales = False
|
|
||||||
|
|
||||||
'DATOS GENERALES
|
'DATOS GENERALES
|
||||||
DrPS("Obs") = ""
|
DrPS("Obs") = ""
|
||||||
DrPS("Proyecto") = Proyecto
|
DrPS("Proyecto") = Proyecto
|
||||||
@@ -7000,95 +6938,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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'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()
|
||||||
|
|
||||||
If Not TmpDT.Columns.Contains("Amortizacion") Then
|
If Not TmpDT.Columns.Contains("Amortizacion") Then
|
||||||
@@ -7105,8 +6962,7 @@ Public Class Compra2
|
|||||||
Dim RetISRTemp = TmpDT.SUMD("RetISR")
|
Dim RetISRTemp = TmpDT.SUMD("RetISR")
|
||||||
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(Descuento, 6)) > 0.01 Then
|
||||||
If Math.Abs(Math.Round(DescuentosTemp, 6) - Math.Round(Descuentos, 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 +6989,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 +6998,16 @@ 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 +7026,6 @@ 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,25 +7049,19 @@ 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
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Public Function ValidateUUID(ByVal uuid As String) As Boolean
|
Public Function ValidateUUID(ByVal uuid As String) As Boolean
|
||||||
Dim pattern As String = "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
|
Dim pattern As String = "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
|
||||||
Dim regex As New Regex(pattern)
|
Dim regex As New Regex(pattern)
|
||||||
@@ -7321,6 +7097,177 @@ Public Class Compra2
|
|||||||
End If
|
End If
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Function AddCompra() As Boolean
|
||||||
|
|
||||||
|
If Not AjustesValidacion() Then Return False
|
||||||
|
|
||||||
|
Dim respuesta As Boolean = True
|
||||||
|
Dim ObjCompras As New ClsCompras
|
||||||
|
Dim ObjConta As New ClsContabilidad(ObjCompras.IniciaTransacSQL())
|
||||||
|
|
||||||
|
If Not AddPrepolizaCabecera(ObjConta) Then
|
||||||
|
respuesta = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
If respuesta AndAlso ObjCompras.AddCompra(If(Me.TipoComprobante = "I", "Fac", "NC"), 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(ObjConta) Then respuesta = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
If respuesta AndAlso ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, 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
|
||||||
|
|
||||||
|
If respuesta Then
|
||||||
|
ObjCompras.Commit()
|
||||||
|
Else
|
||||||
|
ObjCompras.RollBack()
|
||||||
|
End If
|
||||||
|
|
||||||
|
ObjCompras.Dispose()
|
||||||
|
ObjConta.Dispose()
|
||||||
|
|
||||||
|
Return respuesta
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function AddPrepolizaCabecera(ByRef ObjConta As ClsContabilidad) As Boolean
|
||||||
|
|
||||||
|
Dim respuesta As Boolean = False
|
||||||
|
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)
|
||||||
|
|
||||||
|
Return respuesta
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function AddPrepolizaDetalles(ByRef ObjConta As ClsContabilidad) As Boolean
|
||||||
|
Dim respuesta As Boolean = True
|
||||||
|
Dim Concepto As String = $"{Me.NombreProveedor} {Me.SerieFolio}"
|
||||||
|
Dim Referencia As String = Me.SerieFolio
|
||||||
|
Dim importeMovimiento As Decimal
|
||||||
|
Dim importeMN As Decimal
|
||||||
|
'6
|
||||||
|
For Each RowDetalle As DataRow In TmpDT.FiltraParametros("ISNULL(TipoAF,0) <> 2", "", {"CveClasificacion", "CveSubProyecto"}).Rows
|
||||||
|
|
||||||
|
importeMovimiento = TmpDT.SUMD("Total", $" CveClasificacion = {RowDetalle("CveClasificacion").ToString} AND CveSubProyecto = {RowDetalle("CveSubProyecto").ToString}")
|
||||||
|
importeMN = (importeMovimiento * Me.TipoCambio).RoundSQL
|
||||||
|
|
||||||
|
If importeMN <> 0 Then
|
||||||
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimiento, importeMN, 6, Referencia, Concepto, -1, CveCompra:=CveCompra, CveProveedor:=Me.CveProveedor, CveIE:=Me.CveIE, CvePersonal:=CvePersonal, CveCreditoDetalle:=Me.CveCreditoDetalle, ImporteME:=If(TipoCambio = 1, 0, importeMovimiento), 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 respuesta AndAlso Me.IVA > 0 Then
|
||||||
|
importeMovimiento = Me.IVA
|
||||||
|
importeMN = (importeMovimiento * Me.TipoCambio).RoundSQL
|
||||||
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimiento, importeMN, 14, Referencia, Concepto, -1, CveCompra:=CveCompra, CveSubProyecto:=Me.CveSubProyectoPrincipal, CveProveedor:=Me.CveProveedor, CveIE:=Me.CveIE, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteME:=If(Me.TipoCambio = 1, 0, importeMovimiento), TipoCambio:=Me.TipoCambio, PorcentajeImpuesto:=Me.PorcentajeIVA, Contabilizable:=True) Then
|
||||||
|
respuesta = False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
'25
|
||||||
|
If respuesta AndAlso Me.IEPS > 0 Then
|
||||||
|
importeMovimiento = Me.IEPS
|
||||||
|
importeMN = (importeMovimiento * Me.TipoCambio).RoundSQL
|
||||||
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimiento, importeMN, 25, Referencia, Concepto, -1, CveCompra:=CveCompra, CveSubProyecto:=Me.CveSubProyectoPrincipal, CveProveedor:=Me.CveProveedor, CveIE:=Me.CveIE, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteME:=If(Me.TipoCambio = 1, 0, importeMovimiento), TipoCambio:=Me.TipoCambio, PorcentajeImpuesto:=0, Contabilizable:=True) Then
|
||||||
|
respuesta = False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
'
|
||||||
|
If respuesta AndAlso Me.RetIVA > 0 Then
|
||||||
|
importeMovimiento = Me.RetIVA
|
||||||
|
importeMN = (importeMovimiento * Me.TipoCambio).RoundSQL
|
||||||
|
Dim ret As ConceptosRetenciones = ConceptoPrePolizaRetIVA
|
||||||
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimiento, importeMN, ret.CveConceptoxAcreditar, Referencia, Concepto, -1, CveCompra:=CveCompra, CveSubProyecto:=Me.CveSubProyectoPrincipal, CveProveedor:=Me.CveProveedor, CveIE:=Me.CveIE, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteME:=If(Me.TipoCambio = 1, 0, importeMovimiento), TipoCambio:=Me.TipoCambio, PorcentajeImpuesto:=0, Contabilizable:=True) Then
|
||||||
|
respuesta = False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
'
|
||||||
|
If respuesta AndAlso Me.RetISR > 0 Then
|
||||||
|
importeMovimiento = Me.RetISR
|
||||||
|
importeMN = (importeMovimiento * Me.TipoCambio).RoundSQL
|
||||||
|
Dim ret As ConceptosRetenciones = ConceptoPrePolizaRetISR
|
||||||
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimiento, importeMN, ret.CveConceptoxAcreditar, Referencia, Concepto, -1, CveCompra:=CveCompra, CveSubProyecto:=Me.CveSubProyectoPrincipal, CveProveedor:=Me.CveProveedor, CveIE:=Me.CveIE, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, 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
|
||||||
|
importeMovimiento = Me.Total
|
||||||
|
importeMN = (importeMovimiento * Me.TipoCambio).RoundSQL
|
||||||
|
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 Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimiento, importeMN, ConPreP.CveConcepto, Referencia, Concepto, -1, CveCompra:=CveCompra, CveSubProyecto:=Me.CveSubProyectoPrincipal, CveProveedor:=Me.CveProveedor, CveIE:=Me.CveIE, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteME:=If(Me.TipoCambio = 1, 0, importeMovimiento), TipoCambio:=Me.TipoCambio, PorcentajeImpuesto:=0, Contabilizable:=True) Then
|
||||||
|
respuesta = False
|
||||||
|
End If
|
||||||
|
If respuesta AndAlso Me.CveMoneda > 1 AndAlso UsaComplementaria Then
|
||||||
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimiento, (importeMovimiento * Me.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
|
||||||
|
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())
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<div class="portlet light smmallpadding bordered">
|
<div class="portlet light xspadding bordered">
|
||||||
<div class="portlet-title">
|
<div class="portlet-title">
|
||||||
<div class="caption">
|
<div class="caption">
|
||||||
<i class="fa fa-info-circle"></i>Datos Generales
|
<i class="fa fa-info-circle"></i>Datos Generales
|
||||||
@@ -72,7 +72,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<div class="portlet light smmallpadding bordered">
|
<div class="portlet light xspadding bordered">
|
||||||
<div class="portlet-title">
|
<div class="portlet-title">
|
||||||
<div class="caption">
|
<div class="caption">
|
||||||
<i class="fa fa-info-circle"></i>Configuración
|
<i class="fa fa-info-circle"></i>Configuración
|
||||||
@@ -109,8 +109,8 @@
|
|||||||
<label class="col-md-4 truncate">Fecha Inicio:</label>
|
<label class="col-md-4 truncate">Fecha Inicio:</label>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<div style="display: inline-block; vertical-align: text-bottom;">
|
<div style="display: inline-block; vertical-align: text-bottom;">
|
||||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
<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 ID="TxtFechaI" runat="server" CssClass="form-control" CausesValidation="true" Style="width: 118px" MaxLength="10"></asp:TextBox>
|
<asp:TextBox ID="TxtFechaI" runat="server" CssClass="form-control" CausesValidation="true" Style="width: 78px" MaxLength="10"></asp:TextBox>
|
||||||
<span class="input-group-btn ">
|
<span class="input-group-btn ">
|
||||||
<asp:LinkButton ID="ImgFechaI" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
<asp:LinkButton ID="ImgFechaI" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
</span>
|
</span>
|
||||||
@@ -130,8 +130,8 @@
|
|||||||
<label class="col-md-4 truncate">Fecha Fin:</label>
|
<label class="col-md-4 truncate">Fecha Fin:</label>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<div style="display: inline-block; vertical-align: text-bottom;">
|
<div style="display: inline-block; vertical-align: text-bottom;">
|
||||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
<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 ID="TxtFechaF" runat="server" CssClass="form-control" CausesValidation="true" Style="width: 118px" MaxLength="10"></asp:TextBox>
|
<asp:TextBox ID="TxtFechaF" runat="server" CssClass="form-control" CausesValidation="true" Style="width: 78px" MaxLength="10"></asp:TextBox>
|
||||||
<span class="input-group-btn ">
|
<span class="input-group-btn ">
|
||||||
<asp:LinkButton ID="ImgFechaF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
<asp:LinkButton ID="ImgFechaF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
</span>
|
</span>
|
||||||
@@ -252,7 +252,7 @@
|
|||||||
<br />
|
<br />
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="portlet light smmallpadding bordered">
|
<div class="portlet light xspadding bordered">
|
||||||
<div class="portlet-title">
|
<div class="portlet-title">
|
||||||
<div class="caption" style="align-items: center">
|
<div class="caption" style="align-items: center">
|
||||||
<i class="fa fa-info-circle"></i>Presupuestos
|
<i class="fa fa-info-circle"></i>Presupuestos
|
||||||
@@ -271,10 +271,10 @@
|
|||||||
DataKeyNames="CvePresupuestoDetalle,CveAgrupador,CveTipoGasto,Tipo">
|
DataKeyNames="CvePresupuestoDetalle,CveAgrupador,CveTipoGasto,Tipo">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField HeaderText="Clasificación" DataField="Agrupador" />
|
<asp:BoundField HeaderText="Clasificación" DataField="Agrupador" />
|
||||||
<asp:TemplateField HeaderText="Importe" HeaderStyle-HorizontalAlign="Left" FooterStyle-HorizontalAlign="Right">
|
<asp:TemplateField HeaderText="Importe" ItemStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign="Right" FooterStyle-HorizontalAlign="Right">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="LblImporteClasiTotal" runat="server" Visible="false"></asp:Label>
|
<asp:Label ID="LblImporteClasiTotal" runat="server" Visible="false"></asp:Label>
|
||||||
<asp:TextBox ID="TxtImporteClasi" runat="server" Text='<%#Eval("Importe") %>' CssClass="form-control input-sm"></asp:TextBox>
|
<asp:TextBox ID="TxtImporteClasi" runat="server" Text='<%#Eval("Importe") %>' CssClass="form-control input-sm" Width="125px" style="text-align:right;"></asp:TextBox>
|
||||||
<ajax:FilteredTextBoxExtender ID="SoloNumerosCantidad" runat="server" TargetControlID="TxtImporteClasi" FilterType="Custom, Numbers" ValidChars=".," />
|
<ajax:FilteredTextBoxExtender ID="SoloNumerosCantidad" runat="server" TargetControlID="TxtImporteClasi" FilterType="Custom, Numbers" ValidChars=".," />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<FooterTemplate>
|
<FooterTemplate>
|
||||||
@@ -337,14 +337,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-body rowpadding ">
|
<div class="portlet-body rowpadding ">
|
||||||
<!--<div class=" row">
|
|
||||||
<div class="col-md-3">Concepto</div>
|
|
||||||
<div class="col-md-6">
|
|
||||||
<asp:DropDownList ID="ddlConceptocomisionNeto" runat="server" DataTextField="CodigoConcepto" DataValueField="CveConcepto" Class="form-control input-sm select2me" Width="100%" ValidationGroup="GrpGuardar"></asp:DropDownList>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
-->
|
|
||||||
<asp:TextBox ID="TxtCargarPresup" CssClass="ADSdropzone hidden" runat="server"></asp:TextBox>
|
<asp:TextBox ID="TxtCargarPresup" CssClass="ADSdropzone hidden" runat="server"></asp:TextBox>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -147,16 +147,8 @@ Partial Class Contratos_Presupuestos
|
|||||||
Dim DrContrato = ObjContrato.DtResultados.Copy(0)
|
Dim DrContrato = ObjContrato.DtResultados.Copy(0)
|
||||||
If DrContrato IsNot Nothing Then
|
If DrContrato IsNot Nothing Then
|
||||||
|
|
||||||
Dim ImporteOriginal = DrContrato("Importe").ToString.ToDecimal
|
Dim ImporteOriginal = DrContrato("Importe").ToString.ToDecimal
|
||||||
'Dim ImporteVigente = DrContrato("ImporteVigente").ToString.ToDecimal
|
|
||||||
'Dim CveMoneda = DrContrato("CveMoneda").ToString.ToEntero
|
|
||||||
|
|
||||||
'DdlMoneda.SelectedValueExist(CveMoneda)
|
|
||||||
|
|
||||||
'HdnTotal.Value = ImporteVigente.FormatoNumero
|
|
||||||
|
|
||||||
|
|
||||||
'LblTotal.Text = String.Format("{0:C}", ImporteVigente)
|
|
||||||
TxtPresupuesto.Text = DrContrato("Nombre").ToString
|
TxtPresupuesto.Text = DrContrato("Nombre").ToString
|
||||||
TxtDescripcion.Text = DrContrato("Observacion").ToString
|
TxtDescripcion.Text = DrContrato("Observacion").ToString
|
||||||
|
|
||||||
@@ -471,34 +463,8 @@ Partial Class Contratos_Presupuestos
|
|||||||
ObjPres.IniciaTransacSQL()
|
ObjPres.IniciaTransacSQL()
|
||||||
Dim TieneError As Boolean = False
|
Dim TieneError As Boolean = False
|
||||||
|
|
||||||
TieneError = Not ObjPres.UpdateEstatusPresupuesto(CvePresupuesto, EstatusFinal)
|
TieneError = Not ObjPres.UpdateEstatusPresupuesto(CvePresupuesto, EstatusFinal)
|
||||||
'If ObjPres.UpdateEstatusPresupuesto(CvePresupuesto, EstatusFinal) Then
|
|
||||||
' If ObjPres.GetPresupuestosDetalle(CvePresupuesto, -1, UsuarioActual.CveEmpresa) Then
|
|
||||||
' DtClasificaciones = ObjPres.DtResultados
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' If DtClasificaciones IsNot Nothing Then
|
|
||||||
' Dim DtDetalle = DtClasificaciones.FiltraParametros("CvePresupuestoDetalle > 0", DistinctColumns:={"CvePresupuestoDetalle", "ImporteVigente"})
|
|
||||||
' If DtDetalle.Rows.Count > 0 Then
|
|
||||||
|
|
||||||
' For Each Dr As DataRow In DtDetalle.Rows
|
|
||||||
' Dim CvePresupuestoDetalle As Integer = Dr("CvePresupuestoDetalle").ToString.ToEntero
|
|
||||||
' Dim Importe As Decimal = Dr("ImporteVigente").ToString.ToDecimal
|
|
||||||
' Dim Fecha = Now
|
|
||||||
' Dim Tipo = 1
|
|
||||||
' Dim CveCompra As Integer = -1
|
|
||||||
' Dim Justificacion = "-1"
|
|
||||||
' TieneError = Not ObjPres.AddPresupuestoMovimiento(CvePresupuesto, CveCompra, Tipo, Importe, Fecha, Justificacion)
|
|
||||||
' If TieneError Then
|
|
||||||
' Exit For
|
|
||||||
' End If
|
|
||||||
' Next
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
'Else
|
|
||||||
' TieneError = True
|
|
||||||
'End If
|
|
||||||
|
|
||||||
If TieneError Then
|
If TieneError Then
|
||||||
ObjPres.RollBack()
|
ObjPres.RollBack()
|
||||||
Alert("Ocurrió un error al autorizar el presupuesto.", TipoMensaje.MsgError)
|
Alert("Ocurrió un error al autorizar el presupuesto.", TipoMensaje.MsgError)
|
||||||
@@ -552,7 +518,6 @@ Partial Class Contratos_Presupuestos
|
|||||||
Dim DTExcel As New DataTable
|
Dim DTExcel As New DataTable
|
||||||
Dim ErrorArchivo = False
|
Dim ErrorArchivo = False
|
||||||
Dim ErrorExcel = False
|
Dim ErrorExcel = False
|
||||||
|
|
||||||
DTExcel = ReadExcelFile(Ruta + FileName, True)
|
DTExcel = ReadExcelFile(Ruta + FileName, True)
|
||||||
|
|
||||||
If Not ErrorArchivo Then
|
If Not ErrorArchivo Then
|
||||||
@@ -574,16 +539,13 @@ Partial Class Contratos_Presupuestos
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Try
|
Try
|
||||||
Dim txtImporte As TextBox = Nothing
|
|
||||||
Dim txtObservacion As TextBox = Nothing
|
|
||||||
Dim i As Integer = 0
|
Dim i As Integer = 0
|
||||||
For Each row As GridViewRow In GvPresupuestos.Rows
|
For Each row As GridViewRow In GvPresupuestos.Rows
|
||||||
If (i < DTExcel.Rows.Count) Then
|
If (i < DTExcel.Rows.Count) Then
|
||||||
txtImporte = row.FCTextBox("TxtImporteClasi")
|
If DTExcel.Rows(i)("Importe").ToString.Trim <> "" Then row.FCTextBox("TxtImporteClasi").Text = DTExcel.Rows(i)("Importe").ToString.FormatoNumero
|
||||||
txtObservacion = row.FCTextBox("TxtObservacion")
|
row.FCTextBox("TxtObservacion").Text = DTExcel.Rows(i)("Observaciones").ToString
|
||||||
txtImporte.Text = DTExcel.Rows(i).Field(Of String)(1).ToString
|
|
||||||
txtObservacion.Text = DTExcel.Rows(i).Field(Of String)(2).ToString
|
|
||||||
i += 1
|
i += 1
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|||||||
@@ -180,9 +180,9 @@
|
|||||||
<div class="titlefiltros caption ">
|
<div class="titlefiltros caption ">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-1" style="max-width: 90px">Fecha Inicio:</div>
|
<div class="col-md-1" style="max-width: 90px">Fecha Inicio:</div>
|
||||||
<div class="col-md-2" style="max-width: 130px">
|
<div class="col-md-2" style="max-width: 120px">
|
||||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 90px !important; padding: 0px;">
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 90px !important; padding: 0px;">
|
||||||
<asp:TextBox ID="TxtFiltrosFechaInicio" CssClass="form-control input-sm ADSMaskDate" Style="width: 88px" runat="server"></asp:TextBox>
|
<asp:TextBox ID="TxtFiltrosFechaInicio" CssClass="form-control input-sm ADSMaskDate" Style="width: 78px" runat="server"></asp:TextBox>
|
||||||
<span class="input-group-btn ">
|
<span class="input-group-btn ">
|
||||||
<asp:LinkButton ID="LnkFechaI" class="btn default " Text=" <i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
<asp:LinkButton ID="LnkFechaI" class="btn default " Text=" <i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
</span>
|
</span>
|
||||||
@@ -193,9 +193,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-1" style="max-width: 75px">Fecha Fin:</div>
|
<div class="col-md-1" style="max-width: 75px">Fecha Fin:</div>
|
||||||
<div class="col-md-2" style="max-width: 130px">
|
<div class="col-md-2" style="max-width: 120px">
|
||||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 90px !important; padding: 0px;">
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 90px !important; padding: 0px;">
|
||||||
<asp:TextBox ID="TxtFiltrosFechaFin" CssClass="form-control input-sm ADSMaskDate" Style="width: 88px" runat="server"></asp:TextBox>
|
<asp:TextBox ID="TxtFiltrosFechaFin" CssClass="form-control input-sm ADSMaskDate" Style="width: 78px" runat="server"></asp:TextBox>
|
||||||
<span class="input-group-btn ">
|
<span class="input-group-btn ">
|
||||||
<asp:LinkButton ID="LnkFechaF" class="btn default " Text=" <i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
<asp:LinkButton ID="LnkFechaF" class="btn default " Text=" <i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -30,8 +30,8 @@ Partial Class Contratos_RepPresupuestos
|
|||||||
#Region " INICIALIZA VALORES "
|
#Region " INICIALIZA VALORES "
|
||||||
Private Sub InicializaValores()
|
Private Sub InicializaValores()
|
||||||
|
|
||||||
TxtFiltrosFechaInicio.Text = $"01/09/{Now.Year - 1}"
|
TxtFiltrosFechaInicio.Text = $"01/08/{Now.Year - 1}"
|
||||||
TxtFiltrosFechaFin.Text = $"31/08/{Now.Year}"
|
TxtFiltrosFechaFin.Text = $"31/07/{Now.Year}"
|
||||||
|
|
||||||
DdlTipoGasto.DataSource = GlobalDTTiposGastos(UsuarioActual.CveEmpresa)
|
DdlTipoGasto.DataSource = GlobalDTTiposGastos(UsuarioActual.CveEmpresa)
|
||||||
DdlTipoGasto.DataBind()
|
DdlTipoGasto.DataBind()
|
||||||
|
|||||||
Binary file not shown.
@@ -2437,11 +2437,11 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
If CvePrePolizaTraspaso > 0 Then
|
If CvePrePolizaTraspaso > 0 Then
|
||||||
|
|
||||||
Dim TotalGarantiaValor As Decimal = 0 ' el valor en almacen es cero, por tema contable
|
Dim TotalGarantiaValor As Decimal = 0 ' el valor en almacen es cero, por tema contable
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaTraspaso, False, TotalGarantiaValor, TxtObservaciones.Text, 68, TxtObservaciones.Text, TxtFecha.Text.ToDate, -1, -1, CveMovimientoAlmacen:=CveMovimientoGarantia, Contabilizable:=True, ImporteMX:=TotalGarantia) Then
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaTraspaso, False, TotalGarantiaValor, TxtObservaciones.Text, 68, TxtObservaciones.Text, TxtFecha.Text.ToDate, -1, -1, CveMovimientoAlmacen:=CveMovimientoGarantia, Contabilizable:=False, ImporteMX:=TotalGarantia) Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ErrorMovInv AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePolizaTraspaso, True, TotalGarantiaValor, TxtObservaciones.Text, 331, TxtObservaciones.Text, TxtFecha.Text.ToDate, -1, -1, CveMovimientoAlmacen:=CveMovimientoGarantia, Contabilizable:=True, ImporteMX:=TotalGarantia) Then
|
If Not ErrorMovInv AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePolizaTraspaso, True, TotalGarantiaValor, TxtObservaciones.Text, 331, TxtObservaciones.Text, TxtFecha.Text.ToDate, -1, -1, CveMovimientoAlmacen:=CveMovimientoGarantia, Contabilizable:=False, ImporteMX:=TotalGarantia) Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
@@ -3137,30 +3137,30 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ErrorMovInv AndAlso ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then
|
If Not ErrorMovInv AndAlso ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual) Then
|
||||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||||
GuardaLogAD($"Inventario/EntregaAlmacen | Error{ObjConta.MensajePolizaDescuadre} Diferencia{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
GuardaLogAD($"Inventario/EntregaAlmacen | Error{ObjConta.MensajePolizaDescuadre} Diferencia{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
|
'Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
|
||||||
|
|
||||||
If AutoConta And Not ErrorMovInv Then
|
'If AutoConta And Not ErrorMovInv Then
|
||||||
Dim ObjContPaq = New ClsContPAQi(UsuarioActual.Empresa)
|
' Dim ObjContPaq = New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
|
|
||||||
If IdCtaContable > 0 Then
|
' If IdCtaContable > 0 Then
|
||||||
If Not ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContPaq) Then
|
' If Not ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContPaq) Then
|
||||||
Alert("Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico")
|
' Alert("Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico")
|
||||||
ErrorMovInv = True
|
' ErrorMovInv = True
|
||||||
TextoError.AppendFormat("Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico")
|
' TextoError.AppendFormat("Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico")
|
||||||
End If
|
' End If
|
||||||
Else
|
' Else
|
||||||
Alert(String.Format("No se puede contabilizar ya que falta asignación de las cuentas contables"), TipoMensaje.MsgAdvertencia)
|
' Alert(String.Format("No se puede contabilizar ya que falta asignación de las cuentas contables"), TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
ObjContPaq.Dispose()
|
' ObjContPaq.Dispose()
|
||||||
End If
|
'End If
|
||||||
Else
|
Else
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
TextoError.AppendFormat("Ocurrió un Error al ingresar la prepoliza.1")
|
TextoError.AppendFormat("Ocurrió un Error al ingresar la prepoliza.1")
|
||||||
|
|||||||
14
OC/OC.aspx
14
OC/OC.aspx
@@ -15,7 +15,6 @@
|
|||||||
<li>
|
<li>
|
||||||
<asp:HyperLink ID="generarAnticipo" Style="width: 170px;" Visible="false" Target="_blank" runat="server"><i class="fa fa-plus"></i> Generar Anticipo</asp:HyperLink>
|
<asp:HyperLink ID="generarAnticipo" Style="width: 170px;" Visible="false" Target="_blank" runat="server"><i class="fa fa-plus"></i> Generar Anticipo</asp:HyperLink>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<asp:HyperLink ID="HLGenerarVenta" Visible="false" Target="_blank" runat="server"><i class="fa fa-money"></i> Generar Venta</asp:HyperLink>
|
<asp:HyperLink ID="HLGenerarVenta" Visible="false" Target="_blank" runat="server"><i class="fa fa-money"></i> Generar Venta</asp:HyperLink>
|
||||||
</li>
|
</li>
|
||||||
@@ -1240,12 +1239,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 +1253,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;">
|
||||||
|
|||||||
@@ -235,18 +235,18 @@
|
|||||||
<ajax:TabPanel ID="TabDatosFiscales" runat="server" HeaderText="Datos Fiscales">
|
<ajax:TabPanel ID="TabDatosFiscales" runat="server" HeaderText="Datos Fiscales">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
<div class="row" style="height: 80px">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtSerie" runat="server" CssClass="form-control" MaxLength="15"></asp:TextBox>
|
<asp:TextBox ID="TxtSerie" runat="server" CssClass="form-control" MaxLength="15"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator Visible="false" ID="RFVSerie" runat="server" Enabled="false" CssClass="help-block errorimput miclase" ControlToValidate="TxtSerie" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Serie''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator Visible="false" ID="RFVSerie" runat="server" Enabled="false" CssClass="help-block errorimput miclase" ControlToValidate="TxtSerie" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Serie''</b> es necesario, por favor ingréselo." Display="Dynamic" ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||||
<label for="<%= TxtSerie.ClientID.ToString()%>">Serie:</label>
|
<label for="<%= TxtSerie.ClientID.ToString()%>">Serie:</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtIVA" runat="server" CssClass="form-control" MaxLength="15"></asp:TextBox>
|
<asp:TextBox ID="TxtIVA" runat="server" CssClass="form-control" MaxLength="15"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator Visible="false" ID="RFVIVA" runat="server" Enabled="false" CssClass="help-block errorimput miclase" ControlToValidate="TxtIVA" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''IVA''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator Visible="false" ID="RFVIVA" runat="server" Enabled="false" CssClass="help-block errorimput miclase" ControlToValidate="TxtIVA" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''IVA''</b> es necesario, por favor ingréselo." Display="Dynamic" ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||||
<label for="<%= TxtIVA.ClientID.ToString()%>">IVA:</label>
|
<label for="<%= TxtIVA.ClientID.ToString()%>">IVA:</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -275,12 +275,25 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="row">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="col-md-6">
|
||||||
<asp:TextBox ID="TxtColonia" runat="server" CssClass="form-control" MaxLength="50"></asp:TextBox>
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:RequiredFieldValidator Visible="false" ID="RFVColonia" runat="server" Enabled="false" CssClass="help-block errorimput miclase" ControlToValidate="TxtColonia" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Colonia''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
<asp:TextBox ID="TxtColonia" runat="server" CssClass="form-control" MaxLength="50"></asp:TextBox>
|
||||||
<label for="<%= TxtColonia.ClientID.ToString()%>">Colonia:</label>
|
<asp:RequiredFieldValidator Visible="false" ID="RFVColonia" runat="server" Enabled="false" CssClass="help-block errorimput miclase" ControlToValidate="TxtColonia" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Colonia''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||||
|
<label for="<%= TxtColonia.ClientID.ToString()%>">Colonia:</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtCP" runat="server" CssClass="form-control" MaxLength="5" onblur="ValidaCodigoPostal()" onkeypress="if(event.key === 'Enter'){return false;}" ></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator Visible="false" ID="RFVCP" runat="server" Enabled="false" CssClass="help-block errorimput miclase" ControlToValidate="TxtCP" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''CP''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtCP" FilterType="Custom" ValidChars="0123456789"></ajax:FilteredTextBoxExtender>
|
||||||
|
<label for="<%= TxtCP.ClientID.ToString()%>">CP:</label>
|
||||||
|
<i></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
@@ -315,18 +328,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
|
||||||
<asp:TextBox ID="TxtCP" runat="server" CssClass="form-control" MaxLength="5" onblur="ValidaCodigoPostal()" onkeypress="if(event.key === 'Enter'){return false;}" ></asp:TextBox>
|
|
||||||
<asp:RequiredFieldValidator Visible="false" ID="RFVCP" runat="server" Enabled="false" CssClass="help-block errorimput miclase" ControlToValidate="TxtCP" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''CP''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtCP" FilterType="Custom" ValidChars="0123456789"></ajax:FilteredTextBoxExtender>
|
|
||||||
<label for="<%= TxtCP.ClientID.ToString()%>">CP:</label>
|
|
||||||
<i></i>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
@@ -386,17 +388,20 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="col-md-6">
|
||||||
<asp:TextBox ID="TxtTelefono" runat="server" CssClass="form-control" MaxLength="15"></asp:TextBox>
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<label for="<%= TxtTelefono.ClientID.ToString()%>">Telefono:</label>
|
<asp:TextBox ID="TxtTelefono" runat="server" CssClass="form-control" MaxLength="15"></asp:TextBox>
|
||||||
</div>
|
<label for="<%= TxtTelefono.ClientID.ToString()%>">Telefono:</label>
|
||||||
|
</div>
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
</div>
|
||||||
<asp:TextBox ID="TxtCorreo" runat="server" CssClass="form-control" MaxLength="50"></asp:TextBox>
|
<div class="col-md-6">
|
||||||
<label for="<%= TxtCorreo.ClientID.ToString()%>">Correo:</label>
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
</div>
|
<asp:TextBox ID="TxtCorreo" runat="server" CssClass="form-control" MaxLength="50"></asp:TextBox>
|
||||||
|
<label for="<%= TxtCorreo.ClientID.ToString()%>">Correo:</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="form-group form-md-line-input input-iconright" runat="server">
|
<div class="form-group form-md-line-input input-iconright" runat="server">
|
||||||
<asp:DropDownList ID="DdlPrecioLista" runat="server" AppendDataBoundItems="true" DataTextField="PrecioLista" DataValueField="CvePrecioLista" CssClass="form-control select2me" Width="100%"></asp:DropDownList>
|
<asp:DropDownList ID="DdlPrecioLista" runat="server" AppendDataBoundItems="true" DataTextField="PrecioLista" DataValueField="CvePrecioLista" CssClass="form-control select2me" Width="100%"></asp:DropDownList>
|
||||||
<label for="<%= DdlPrecioLista.ClientID.ToString()%>">Lista de Precio:</label>
|
<label for="<%= DdlPrecioLista.ClientID.ToString()%>">Lista de Precio:</label>
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ Partial Class CatSubProyectos
|
|||||||
|
|
||||||
Dim ObjSub As New ClsSubProyectos
|
Dim ObjSub As New ClsSubProyectos
|
||||||
If ObjSub.GetSubProyectos(UsuarioActual.CveEmpresa) Then
|
If ObjSub.GetSubProyectos(UsuarioActual.CveEmpresa) Then
|
||||||
GvDatos.DataSource = ObjSub.DtResultados.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}")
|
GvDatos.DataSource = ObjSub.DtResultados
|
||||||
GvDatos.DataBind()
|
GvDatos.DataBind()
|
||||||
End If
|
End If
|
||||||
ObjSub.Dispose()
|
ObjSub.Dispose()
|
||||||
@@ -445,11 +445,8 @@ Partial Class CatSubProyectos
|
|||||||
Alert("Los valores de horario no deben ser superiores a '12' o menor a '-12'", TipoMensaje.MsgAdvertencia)
|
Alert("Los valores de horario no deben ser superiores a '12' o menor a '-12'", TipoMensaje.MsgAdvertencia)
|
||||||
TieneError = True
|
TieneError = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If Not TieneError Then
|
If Not TieneError Then
|
||||||
ObjSubproyectos.Commit()
|
ObjSubproyectos.Commit()
|
||||||
If HdnModalidad.Value = "I" Then
|
If HdnModalidad.Value = "I" Then
|
||||||
@@ -464,25 +461,14 @@ Partial Class CatSubProyectos
|
|||||||
Else
|
Else
|
||||||
ObjSubproyectos.RollBack()
|
ObjSubproyectos.RollBack()
|
||||||
RecargaGlobal()
|
RecargaGlobal()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'se regeneran los subproyectos
|
|
||||||
'If Not TieneError Then
|
|
||||||
' If UsuarioActual.Empresa.GralSoloProyecto Then
|
|
||||||
' If ObjSubproyectos.GetSubProyectos() Then
|
|
||||||
' GlobalDTSubProyectos(-1) = ObjSubproyectos.DtResultados
|
|
||||||
' UpDatos.Update()
|
|
||||||
' Else
|
|
||||||
' TieneError = True
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
'End If
|
|
||||||
If DdlSegmentoNegocio.Visible = True Then
|
If DdlSegmentoNegocio.Visible = True Then
|
||||||
CargaSegmentosNegocio()
|
CargaSegmentosNegocio()
|
||||||
End If
|
End If
|
||||||
ObjSubproyectos.Dispose()
|
ObjSubproyectos.Dispose()
|
||||||
|
|
||||||
If HdnModalidad.Value = "I" Then
|
If HdnModalidad.Value = "I" AndAlso Not TieneError Then
|
||||||
If UsuarioActual.Empresa.Funcionalidad(523) <> "" Then
|
If UsuarioActual.Empresa.Funcionalidad(523) <> "" Then
|
||||||
Dim ObjOC As New ClsOC
|
Dim ObjOC As New ClsOC
|
||||||
ObjOC.IniciaTransacSQL()
|
ObjOC.IniciaTransacSQL()
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
114
RH/Personal.aspx
114
RH/Personal.aspx
@@ -3030,12 +3030,21 @@
|
|||||||
<br />
|
<br />
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
|
|
||||||
<div id="ModalAddVacaciones" class="modal ADS fade" role="dialog">
|
<div id="ModalAddVacaciones" class="modal ADS fade" role="dialog">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content" style="width: 700px;">
|
<div class="modal-content" style="width: 700px;">
|
||||||
<div class="modal-header ">
|
<div class="modal-header ">
|
||||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
<h4 class="modal-title">Agregar Vacaciones</h4>
|
<h4 class="modal-title">
|
||||||
|
<asp:UpdatePanel runat="server" ID="UpModalAddVacacionesTitulo" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:Label ID="LblModalAddVacacionesTitulo" runat="server" Text="Agregar Vacaciones"></asp:Label>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
</h4>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
@@ -3058,72 +3067,75 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="">
|
<div class="">
|
||||||
<asp:Label runat="server" AssociatedControlID="DdlVacPeriodo" Style="padding-bottom: 0px; margin-bottom: 0px; font-size: 12px; color: #888; font-weight: 400;">Periodo</asp:Label><br />
|
<asp:Label runat="server" AssociatedControlID="DdlVacPeriodo" Style="padding-bottom: 0px; margin-bottom: 0px; font-size: 12px; color: #888; font-weight: 400;" >Periodo</asp:Label><br />
|
||||||
<asp:DropDownList ID="DdlVacPeriodo" DataValueField="Ejercicio" DataTextField="PeriodoText" Width="100%" CssClass="form-control select2me " runat="server"></asp:DropDownList>
|
<asp:DropDownList ID="DdlVacPeriodo" DataValueField="Ejercicio" DataTextField="PeriodoText" Width="100%" CssClass="form-control select2me " runat="server" AutoPostBack="true"
|
||||||
|
OnSelectedIndexChanged="DdlVacPeriodo_SelectedIndexChanged">
|
||||||
|
</asp:DropDownList>
|
||||||
<%-- <asp:TextBox ID="TxtVacEjercicio" CssClass="form-control input-sm form-small" Text="2021" runat="server"></asp:TextBox>
|
<%-- <asp:TextBox ID="TxtVacEjercicio" CssClass="form-control input-sm form-small" Text="2021" runat="server"></asp:TextBox>
|
||||||
<asp:Label runat="server" AssociatedControlID="TxtVacEjercicio">Ejercicio</asp:Label>--%>
|
<asp:Label runat="server" AssociatedControlID="TxtVacEjercicio">Ejercicio</asp:Label>--%>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<asp:Panel runat="server" ID="PnlVacfechas" CssClass="row">
|
<asp:Panel runat="server" ID="PnlVacfechas" CssClass="row">
|
||||||
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
|
|
||||||
|
|
||||||
<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;">
|
||||||
<asp:TextBox ID="TxtFechaInicioVac" runat="server" CausesValidation="true" CssClass="form-control input-sm" onblur="calculaFechasVacaciones();" ></asp:TextBox>
|
<asp:TextBox ID="TxtFechaInicioVac" runat="server" CausesValidation="true" CssClass="form-control input-sm" onblur="calculaFechasVacaciones();"></asp:TextBox>
|
||||||
<span class="input-group-btn ">
|
<span class="input-group-btn ">
|
||||||
<asp:LinkButton ID="ImgTxtFechaInicioVac" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
<asp:LinkButton ID="ImgTxtFechaInicioVac" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
</span>
|
</span>
|
||||||
<ajax:MaskedEditExtender ID="MEETxtFechaInicioVac" runat="server" TargetControlID="TxtFechaInicioVac" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
<ajax:MaskedEditExtender ID="MEETxtFechaInicioVac" runat="server" TargetControlID="TxtFechaInicioVac" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
<ajax:CalendarExtender runat="server" ID="CETxtFechaInicioVac" TargetControlID="TxtFechaInicioVac" PopupButtonID="ImgTxtFechaInicioVac" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
<ajax:CalendarExtender runat="server" ID="CETxtFechaInicioVac" TargetControlID="TxtFechaInicioVac" PopupButtonID="ImgTxtFechaInicioVac" PopupPosition="BottomRight" Enabled="True" OnClientHidden="calculaFechasVacaciones"></ajax:CalendarExtender>
|
||||||
<label>Fecha Inicial</label>
|
<label>Fecha Inicial</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<asp:Panel runat="server" ID="PnlVacDiasPago" CssClass="col-md-3">
|
<asp:Panel runat="server" ID="PnlVacDiasPago" CssClass="col-md-3">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtVacDiasPago" CssClass="form-control input-sm form-small" type="number" runat="server" style="margin-top:20px!important" onblur="calculaFechasVacaciones();" ></asp:TextBox>
|
<asp:TextBox ID="TxtVacDiasPago" CssClass="form-control input-sm form-small" type="number" runat="server" Style="margin-top: 20px!important" onblur="calculaFechasVacaciones();"></asp:TextBox>
|
||||||
<asp:Label runat="server" AssociatedControlID="TxtVacDiasPago" style="margin-top:10px!important">Días pago</asp:Label>
|
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtVacDiasPago" ValidChars="0123456789" />
|
||||||
|
<asp:Label runat="server" AssociatedControlID="TxtVacDiasPago" Style="margin-top: 10px!important">Días pago</asp:Label>
|
||||||
</div>
|
</div>
|
||||||
</asp:Panel>
|
</asp:Panel>
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-6">
|
<div class="col-md-3" style="max-height:58px!important">
|
||||||
<div class="form-group form-md-line-input input-iconright " 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;">
|
||||||
<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" onblur="calculaFechasVacacionesFechaFin()"></asp:TextBox>
|
||||||
<span class="input-group-btn " >
|
<span class="input-group-btn ">
|
||||||
<asp:LinkButton ID="ImgTxtFechaFinVac" class="btn default " Text="<i class='fa fa-calendar'></i>" style="display:none!important" runat="server"></asp:LinkButton>
|
<asp:LinkButton ID="ImgTxtFechaFinVac" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
</span>
|
</span>
|
||||||
<ajax:MaskedEditExtender ID="MEETxtFechaFinVac" runat="server" TargetControlID="TxtFechaFinVac" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
<ajax:MaskedEditExtender ID="MEETxtFechaFinVac" runat="server" TargetControlID="TxtFechaFinVac" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
<ajax:CalendarExtender runat="server" ID="CETxtFechaFinVac" TargetControlID="TxtFechaFinVac" PopupButtonID="ImgTxtFechaFinVac" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
<ajax:CalendarExtender runat="server" ID="CETxtFechaFinVac" TargetControlID="TxtFechaFinVac" PopupButtonID="ImgTxtFechaFinVac" PopupPosition="BottomRight" Enabled="True" OnClientHidden="calculaFechasVacacionesFechaFin" ></ajax:CalendarExtender>
|
||||||
<label>Fecha Final</label>
|
<label>Fecha Final</label>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</asp:Panel>
|
|
||||||
<asp:Panel runat="server" ID="PnlVacDias" CssClass="row">
|
|
||||||
<div class="col-md-6">
|
<div class="col-md-3">
|
||||||
<div class="form-group form-md-line-input input-iconright calendarlinealinput form-small">
|
<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"></asp:TextBox>
|
<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">Días feriados</asp:Label>
|
<asp:Label runat="server" AssociatedControlID="Txtdiasinabiles" Style="margin-top: 10px!important">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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</asp:Panel>
|
</asp:Panel>
|
||||||
<asp:Panel runat="server" ID="PnlVacFechapago" CssClass="row">
|
|
||||||
<div class="col-md-6">
|
|
||||||
|
<asp:Panel runat="server" ID="PnlVacDias" 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,7 +3150,14 @@
|
|||||||
</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>
|
||||||
|
|
||||||
|
|
||||||
<asp:Panel runat="server" ID="PnlVacChecks" CssClass="row">
|
<asp:Panel runat="server" ID="PnlVacChecks" CssClass="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
@@ -3157,6 +3176,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<asp:Button runat="server" ClientIDMode="Static" ID="LnkCalculaFechasVacaciones" OnClick="LnkCalculaFechasVacaciones_Click" style="display:none!important" ></asp:Button>
|
<asp:Button runat="server" ClientIDMode="Static" ID="LnkCalculaFechasVacaciones" OnClick="LnkCalculaFechasVacaciones_Click" style="display:none!important" ></asp:Button>
|
||||||
|
<asp:Button runat="server" ClientIDMode="Static" ID="LnkCalculaFechasVacacionesFechaFin" OnClick="LnkCalculaFechasVacacionesFechaFin_Click" style="display:none!important" ></asp:Button>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
@@ -3173,6 +3193,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div id="DvPermisosMotivos2" runat="server" visible="false">
|
<div id="DvPermisosMotivos2" runat="server" visible="false">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox CssClass="form-control" ID="TxtPermisoMotivo" runat="server" MaxLength="200"></asp:TextBox>
|
<asp:TextBox CssClass="form-control" ID="TxtPermisoMotivo" runat="server" MaxLength="200"></asp:TextBox>
|
||||||
@@ -5789,16 +5814,18 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$("#TxtFechaFinVac").prop("readonly", true);
|
|
||||||
$("#TxtFechaFinVac").on("paste", function (event) {
|
//$("#TxtFechaFinVac").prop("readonly", true);
|
||||||
event.preventDefault();
|
//$("#TxtFechaFinVac").on("paste", function (event) {
|
||||||
});
|
// event.preventDefault();
|
||||||
$("#TxtFechaFinVac").on("contextmenu", function (event) {
|
//});
|
||||||
if (event.which === 3) {
|
//$("#TxtFechaFinVac").on("contextmenu", function (event) {
|
||||||
event.preventDefault();
|
// if (event.which === 3) {
|
||||||
}
|
// event.preventDefault();
|
||||||
});
|
// }
|
||||||
|
//});
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -7316,9 +7343,20 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function calculaFechasVacaciones(){
|
function calculaFechasVacaciones(sender, e){
|
||||||
$('#LnkCalculaFechasVacaciones').click();
|
$('#LnkCalculaFechasVacaciones').click();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function calculaFechasVacacionesFechaFin(sender, e) {
|
||||||
|
$('#LnkCalculaFechasVacacionesFechaFin').click();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|||||||
@@ -4837,13 +4837,16 @@ Partial Class RH_Personal
|
|||||||
Dim dtosvac As DataTable
|
Dim dtosvac As DataTable
|
||||||
Private Sub CargaVacacionesResumenPeriodoActual()
|
Private Sub CargaVacacionesResumenPeriodoActual()
|
||||||
Using objnom As New ClsNominas
|
Using objnom As New ClsNominas
|
||||||
|
|
||||||
If objnom.GETPersonalVacResumen(UsuarioActual.Empresa.CveEmpresa, CvePersonal) Then
|
If objnom.GETPersonalVacResumen(UsuarioActual.Empresa.CveEmpresa, CvePersonal) Then
|
||||||
RPTVacacionesResumen.DataSource = objnom.DtResultados
|
RPTVacacionesResumen.DataSource = objnom.DtResultados
|
||||||
DdlVacPeriodo.DataSource = objnom.DtResultados
|
DdlVacPeriodo.DataSource = objnom.DtResultados.FiltraParametros("DiasDisponibles > 0", "Ejercicio")
|
||||||
DdlVacPeriodo.DataBind()
|
DdlVacPeriodo.DataBind()
|
||||||
|
DTVacResumen = objnom.DtResultados
|
||||||
Dim drow As DataRow = objnom.DtResultados.FiltroPrimero("Selected =1")
|
Dim drow As DataRow = objnom.DtResultados.FiltroPrimero("Selected =1")
|
||||||
If Not IsNothing(drow) Then
|
If Not IsNothing(drow) Then
|
||||||
DdlVacPeriodo.SelectedValueExist(drow("Ejercicio"))
|
DdlVacPeriodo.SelectedValueExist(drow("Ejercicio"))
|
||||||
|
DdlVacPeriodo_SelectedIndexChanged(Nothing, Nothing)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
If objnom.GETPersonalVacaciones(UsuarioActual.Empresa.CveEmpresa, CvePersonal) Then
|
If objnom.GETPersonalVacaciones(UsuarioActual.Empresa.CveEmpresa, CvePersonal) Then
|
||||||
@@ -5455,7 +5458,7 @@ Partial Class RH_Personal
|
|||||||
Protected Sub DdlFormapagovacaciones_SelectedIndexChanged(sender As Object, e As EventArgs)
|
Protected Sub DdlFormapagovacaciones_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
PnlVacfechas.Visible = False
|
PnlVacfechas.Visible = False
|
||||||
PnlVacDias.Visible = False
|
PnlVacDias.Visible = False
|
||||||
PnlVacFechapago.Visible = False
|
'PnlVacFechapago.Visible = False
|
||||||
PnlVacDiasPago.Visible = False
|
PnlVacDiasPago.Visible = False
|
||||||
PnlVacChecks.Visible = False
|
PnlVacChecks.Visible = False
|
||||||
TxtVacDiasPago.Text = "0"
|
TxtVacDiasPago.Text = "0"
|
||||||
@@ -5464,7 +5467,7 @@ Partial Class RH_Personal
|
|||||||
Case 1
|
Case 1
|
||||||
PnlVacfechas.Visible = True
|
PnlVacfechas.Visible = True
|
||||||
PnlVacDias.Visible = True
|
PnlVacDias.Visible = True
|
||||||
PnlVacFechapago.Visible = True
|
'PnlVacFechapago.Visible = True
|
||||||
PnlVacDiasPago.Visible = True
|
PnlVacDiasPago.Visible = True
|
||||||
PnlVacChecks.Visible = True
|
PnlVacChecks.Visible = True
|
||||||
Case 2
|
Case 2
|
||||||
@@ -5475,15 +5478,15 @@ Partial Class RH_Personal
|
|||||||
PnlVacfechas.Visible = True
|
PnlVacfechas.Visible = True
|
||||||
PnlVacDias.Visible = True
|
PnlVacDias.Visible = True
|
||||||
PnlVacDiasPago.Visible = False
|
PnlVacDiasPago.Visible = False
|
||||||
PnlVacFechapago.Visible = True
|
'PnlVacFechapago.Visible = True
|
||||||
Case 4
|
Case 4
|
||||||
PnlVacFechapago.Visible = True
|
' PnlVacFechapago.Visible = True
|
||||||
PnlVacDiasPago.Visible = True
|
PnlVacDiasPago.Visible = True
|
||||||
PnlVacChecks.Visible = True
|
PnlVacChecks.Visible = True
|
||||||
Case 5
|
Case 5
|
||||||
PnlVacfechas.Visible = True
|
PnlVacfechas.Visible = True
|
||||||
Case 6
|
Case 6
|
||||||
PnlVacFechapago.Visible = True
|
'PnlVacFechapago.Visible = True
|
||||||
PnlVacDiasPago.Visible = True
|
PnlVacDiasPago.Visible = True
|
||||||
End Select
|
End Select
|
||||||
End Sub
|
End Sub
|
||||||
@@ -7320,6 +7323,33 @@ Partial Class RH_Personal
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public Property DTVacResumen As DataTable
|
||||||
|
Get
|
||||||
|
If ViewState("DTVacResumen") Is Nothing Then
|
||||||
|
ViewState("DTVacResumen") = New DataTable
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return DirectCast(ViewState("DTVacResumen"), DataTable)
|
||||||
|
End Get
|
||||||
|
Set(value As DataTable)
|
||||||
|
ViewState("DTVacResumen") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property DiasDisponibles As Integer
|
||||||
|
Get
|
||||||
|
If ViewState("DiasDisponibles") Is Nothing Then
|
||||||
|
ViewState("DiasDisponibles") = 0
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return ViewState("DiasDisponibles").ToString.ToEntero
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
ViewState("DiasDisponibles") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
Protected Sub CargaPersonalIncapacidad()
|
Protected Sub CargaPersonalIncapacidad()
|
||||||
LimpiaPersonalIncapacidad()
|
LimpiaPersonalIncapacidad()
|
||||||
LnkAgregarIncapacidad.Visible = False
|
LnkAgregarIncapacidad.Visible = False
|
||||||
@@ -7817,12 +7847,16 @@ Partial Class RH_Personal
|
|||||||
|
|
||||||
Protected Sub LnkSolicitarVacaciones_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkSolicitarVacaciones_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
TxtVacDiasPago.Text = VacDiasDisponibles.ToString
|
TxtVacDiasPago.Text = DiasDisponibles.ToString
|
||||||
|
|
||||||
Dim diaDescanso As Integer = GlobalDTTurno(UsuarioActual.CveEmpresa).FiltroPrimeroValor("DiaDescanso", $" CveTurno = {DdlTurno.SelectedValue.ToEntero}").ToEntero
|
Dim diaDescanso As Integer = GlobalDTTurno(UsuarioActual.CveEmpresa).FiltroPrimeroValor("DiaDescanso", $" CveTurno = {DdlTurno.SelectedValue.ToEntero}").ToEntero
|
||||||
diaDescanso = If(diaDescanso <= 0, 1, diaDescanso)
|
diaDescanso = If(diaDescanso <= 0, 1, diaDescanso)
|
||||||
|
|
||||||
ContarDiasDeLaSemana(TxtFechaInicioVac.Text.ToDate, TxtVacDiasPago.Text.ToEntero)
|
LblModalAddVacacionesTitulo.Text = $"Agregar Vacaciones - días disponibles <b>{DiasDisponibles}</b>"
|
||||||
|
|
||||||
|
UpModalAddVacacionesTitulo.Update()
|
||||||
|
|
||||||
|
CalculaDiasVacaciones(TxtFechaInicioVac.Text.ToDate, TxtVacDiasPago.Text.ToEntero)
|
||||||
|
|
||||||
If Not diaDescanso > 0 Then
|
If Not diaDescanso > 0 Then
|
||||||
Alert("El turno no tiene día de descanso, provisionalmente se tomara el domingo.", TipoMensaje.MsgAdvertencia)
|
Alert("El turno no tiene día de descanso, provisionalmente se tomara el domingo.", TipoMensaje.MsgAdvertencia)
|
||||||
@@ -7832,18 +7866,62 @@ Partial Class RH_Personal
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
Private Sub ContarDiasDeLaSemana(fechaInicio As Date, diasVacaciones As Integer)
|
Private Sub CalculaDiasVacaciones(fechaInicioParametro As Date, diasVacaciones As Integer, Optional fechaFinParametro As Date = Nothing)
|
||||||
|
|
||||||
|
|
||||||
If TxtVacDiasPago.Text.ToEntero > VacDiasDisponibles Then
|
|
||||||
TxtVacDiasPago.Text = VacDiasDisponibles.ToString
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim diaDescanso As Integer = GlobalDTTurno(UsuarioActual.CveEmpresa).FiltroPrimeroValor("DiaDescanso", $" CveTurno = {DdlTurno.SelectedValue.ToEntero}").ToEntero
|
Dim diaDescanso As Integer = GlobalDTTurno(UsuarioActual.CveEmpresa).FiltroPrimeroValor("DiaDescanso", $" CveTurno = {DdlTurno.SelectedValue.ToEntero}").ToEntero
|
||||||
diaDescanso = If(diaDescanso <= 0, 1, diaDescanso)
|
diaDescanso = If(diaDescanso <= 0, 1, diaDescanso)
|
||||||
|
|
||||||
|
If fechaFinParametro <> Nothing Then
|
||||||
|
If fechaInicioParametro > fechaFinParametro Then
|
||||||
|
Alert("La fecha fin no puede ser mayor a la fecha inicial", TipoMensaje.MsgAdvertencia)
|
||||||
|
fechaFinParametro = Nothing
|
||||||
|
TxtVacDiasPago.Text = DiasDisponibles.ToString
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
If fechaFinParametro <> Nothing Then
|
||||||
|
|
||||||
|
Dim DiferenciaEntreFechas As Integer = (fechaFinParametro - fechaInicioParametro).Days + 1
|
||||||
|
Dim DiasNolavorales As Integer = 0
|
||||||
|
Dim FechaTemp As Date = fechaInicioParametro
|
||||||
|
|
||||||
|
For x = 1 To DiferenciaEntreFechas
|
||||||
|
Dim day_of_week = CType(FechaTemp.DayOfWeek, Integer) + 1
|
||||||
|
|
||||||
|
If day_of_week = diaDescanso Then
|
||||||
|
DiasNolavorales = DiasNolavorales + 1
|
||||||
|
End If
|
||||||
|
|
||||||
|
FechaTemp = FechaTemp.AddDays(1)
|
||||||
|
|
||||||
|
If 1 = DiferenciaEntreFechas Then
|
||||||
|
If day_of_week = diaDescanso Then
|
||||||
|
DiasNolavorales = DiasNolavorales + 1
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next x
|
||||||
|
|
||||||
|
|
||||||
|
If (DiferenciaEntreFechas - DiasNolavorales) >= DiasDisponibles Then
|
||||||
|
diasVacaciones = DiasDisponibles
|
||||||
|
Else
|
||||||
|
diasVacaciones = DiferenciaEntreFechas - DiasNolavorales
|
||||||
|
End If
|
||||||
|
|
||||||
|
TxtVacDiasPago.Text = diasVacaciones.ToString
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
If TxtVacDiasPago.Text.ToEntero > DiasDisponibles Then
|
||||||
|
TxtVacDiasPago.Text = DiasDisponibles.ToString
|
||||||
|
diasVacaciones = DiasDisponibles
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
Dim DiasAgregados As Integer = 0
|
Dim DiasAgregados As Integer = 0
|
||||||
Dim FechaFin As Date = fechaInicio
|
Dim FechaFin As Date = fechaInicioParametro
|
||||||
Dim Contador As Integer = 0
|
Dim Contador As Integer = 0
|
||||||
For x = 2 To diasVacaciones
|
For x = 2 To diasVacaciones
|
||||||
Dim day_of_week = CType(FechaFin.DayOfWeek, Integer) + 1
|
Dim day_of_week = CType(FechaFin.DayOfWeek, Integer) + 1
|
||||||
@@ -7862,6 +7940,15 @@ Partial Class RH_Personal
|
|||||||
Contador = Contador + 1
|
Contador = Contador + 1
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Dim UltimoDiamasUno As Integer = CType(FechaFin.AddDays(1).DayOfWeek, Integer) + 1
|
||||||
|
|
||||||
|
If UltimoDiamasUno = diaDescanso Then
|
||||||
|
FechaFin = FechaFin.AddDays(1)
|
||||||
|
DiasAgregados = DiasAgregados + 1
|
||||||
|
End If
|
||||||
|
|
||||||
TxtFechaFinVac.Text = FechaFin.ToString
|
TxtFechaFinVac.Text = FechaFin.ToString
|
||||||
Txtdiasinabiles.Text = DiasAgregados.ToString
|
Txtdiasinabiles.Text = DiasAgregados.ToString
|
||||||
|
|
||||||
@@ -7871,7 +7958,53 @@ Partial Class RH_Personal
|
|||||||
|
|
||||||
Protected Sub LnkCalculaFechasVacaciones_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkCalculaFechasVacaciones_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
ContarDiasDeLaSemana(TxtFechaInicioVac.Text.ToDate, TxtVacDiasPago.Text.ToEntero)
|
CalculaDiasVacaciones(TxtFechaInicioVac.Text.ToDate, TxtVacDiasPago.Text.ToEntero)
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub LnkCalculaFechasVacacionesFechaFin_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
If Not validaFechasVaciones() Then
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
CalculaDiasVacaciones(TxtFechaInicioVac.Text.ToDate, TxtVacDiasPago.Text.ToEntero, TxtFechaFinVac.Text.ToDate)
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function validaFechasVaciones() As Boolean
|
||||||
|
|
||||||
|
If Not IsDate(TxtFechaFinVac.Text) Then
|
||||||
|
Alert("Fecha fin invalida", TipoMensaje.MsgAdvertencia)
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not IsDate(TxtFechaInicioVac.Text) Then
|
||||||
|
Alert("Fecha de inicio invalida", TipoMensaje.MsgAdvertencia)
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
Protected Sub DdlVacPeriodo_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
Dim Ejercicio As Integer = DdlVacPeriodo.SelectedValue.ToEntero
|
||||||
|
|
||||||
|
If Ejercicio > 0 Then
|
||||||
|
DiasDisponibles = DTVacResumen.FiltroPrimeroValor("DiasDisponibles", $"Ejercicio = {Ejercicio}").ToEntero
|
||||||
|
|
||||||
|
TxtVacDiasPago.Text = DiasDisponibles.ToString
|
||||||
|
LblModalAddVacacionesTitulo.Text = $"Agregar Vacaciones - días disponibles <b>{DiasDisponibles}</b>"
|
||||||
|
|
||||||
|
CalculaDiasVacaciones(TxtFechaInicioVac.Text.ToDate, TxtVacDiasPago.Text.ToEntero)
|
||||||
|
UpModalAddVacacionesTitulo.Update()
|
||||||
|
UpSolicitarVacaciones.Update()
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="portlet light smmallpadding bordered ">
|
<div class="portlet light xspadding bordered ">
|
||||||
<div class="portlet-title">
|
<div class="portlet-title">
|
||||||
<div class="caption font-green">
|
<div class="caption font-green">
|
||||||
<i class="icon-pin font-green"></i>
|
<i class="icon-pin font-green"></i>
|
||||||
@@ -69,35 +69,68 @@
|
|||||||
</ajax:TabPanel>
|
</ajax:TabPanel>
|
||||||
|
|
||||||
|
|
||||||
|
<ajax:TabPanel ID="TabPanelPermisos" runat="server" HeaderText="Módulos">
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:UpdatePanel ID="UPPAltaRep" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
|
||||||
|
<div class="row" align="right">
|
||||||
|
<input type="text" id="TxtBusqueda2" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvPermisos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||||
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvPermisos.ClientID) %>" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
|
||||||
|
<asp:GridView ID="GvPermisos" runat="server" CssClass="table table-striped table-hover Widthall ScrollAD" data-sort="true" AutoGenerateColumns="False" Width="100%" DataKeyNames="CveRol,CveModulo" GridLines="None">
|
||||||
|
<Columns>
|
||||||
|
<asp:BoundField DataField="Padres" HeaderText="Módulo Padre">
|
||||||
|
<ControlStyle Width="175px" />
|
||||||
|
<ItemStyle HorizontalAlign="Left" />
|
||||||
|
</asp:BoundField>
|
||||||
|
<asp:BoundField DataField="Modulo" HeaderText="Módulo">
|
||||||
|
<ControlStyle Width="175px" />
|
||||||
|
<ItemStyle HorizontalAlign="Left" />
|
||||||
|
</asp:BoundField>
|
||||||
|
<asp:TemplateField>
|
||||||
|
<HeaderTemplate><span title="Permitir">P</span></HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:CheckBox runat="server" ID="ChkP"></asp:CheckBox>
|
||||||
|
</ItemTemplate>
|
||||||
|
<ControlStyle Width="25px" />
|
||||||
|
<ItemStyle HorizontalAlign="Center"></ItemStyle>
|
||||||
|
</asp:TemplateField>
|
||||||
|
</Columns>
|
||||||
|
<HeaderStyle CssClass="Titulos" Height="15px"></HeaderStyle>
|
||||||
|
</asp:GridView>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</ContentTemplate>
|
||||||
|
</ajax:TabPanel>
|
||||||
|
|
||||||
|
|
||||||
<ajax:TabPanel ID="TabPanelProcesos" runat="server" HeaderText="Procesos">
|
<ajax:TabPanel ID="TabPanelProcesos" runat="server" HeaderText="Procesos">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:UpdatePanel ID="UPPAltaProcesos" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UPPAltaProcesos" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
<div class="portlet light smmallpadding bordered ">
|
<div class="row" align="right">
|
||||||
<div class="portlet-title">
|
|
||||||
<div class="caption font-green">
|
|
||||||
<i class="icon-pin font-green"></i>
|
|
||||||
<span class="caption-subject bold uppercase">Procesos</span>
|
|
||||||
</div>
|
|
||||||
<div class="actions">
|
|
||||||
<div class="btn-group">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="tools">
|
|
||||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="portlet-body">
|
|
||||||
<div class="row" align="right">
|
|
||||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvProcesos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvProcesos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvProcesos.ClientID) %>" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvProcesos.ClientID) %>" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div>
|
<div class="col-md-12">
|
||||||
<asp:GridView ID="GvProcesos" runat="server" CssClass="table table-striped table-hover Widthall ScrollAD" data-sort="true" AutoGenerateColumns="False" Width="100%" DataKeyNames="CveRol,CveModulo,CveProceso" GridLines="None">
|
|
||||||
|
<asp:GridView ID="GvProcesos" runat="server" CssClass="table table-striped table-hover Widthall ScrollAD" data-sort="true" AutoGenerateColumns="False" Width="100%" DataKeyNames="CveRol,CveModulo,CveProceso" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField DataField="Modulo" HeaderText="Módulo">
|
<asp:BoundField DataField="Modulo" HeaderText="Módulo">
|
||||||
<ControlStyle Width="150px" />
|
<ControlStyle Width="150px" />
|
||||||
@@ -118,10 +151,8 @@
|
|||||||
</Columns>
|
</Columns>
|
||||||
<HeaderStyle CssClass="Titulos" Height="15px"></HeaderStyle>
|
<HeaderStyle CssClass="Titulos" Height="15px"></HeaderStyle>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
@@ -130,65 +161,7 @@
|
|||||||
</ajax:TabPanel>
|
</ajax:TabPanel>
|
||||||
|
|
||||||
|
|
||||||
<ajax:TabPanel ID="TabPanelPermisos" runat="server" HeaderText="Módulos">
|
|
||||||
<ContentTemplate>
|
|
||||||
<asp:UpdatePanel ID="UPPAltaRep" runat="server" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
<div class="portlet light smmallpadding bordered ">
|
|
||||||
<div class="portlet-title">
|
|
||||||
<div class="caption font-green">
|
|
||||||
<i class="icon-pin font-green"></i>
|
|
||||||
<span class="caption-subject bold uppercase">Módulos</span>
|
|
||||||
</div>
|
|
||||||
<div class="actions">
|
|
||||||
<div class="btn-group">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="tools">
|
|
||||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="portlet-body">
|
|
||||||
<div class="row" align="right">
|
|
||||||
<input type="text" id="TxtBusqueda2" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvPermisos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
|
||||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvPermisos.ClientID) %>" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
<div class="row">
|
|
||||||
<div>
|
|
||||||
<asp:GridView ID="GvPermisos" runat="server" CssClass="table table-striped table-hover Widthall ScrollAD" data-sort="true" AutoGenerateColumns="False" Width="100%" DataKeyNames="CveRol,CveModulo" GridLines="None">
|
|
||||||
<Columns>
|
|
||||||
<asp:BoundField DataField="Padres" HeaderText="Módulo Padre">
|
|
||||||
<ControlStyle Width="175px" />
|
|
||||||
<ItemStyle HorizontalAlign="Left" />
|
|
||||||
</asp:BoundField>
|
|
||||||
<asp:BoundField DataField="Modulo" HeaderText="Módulo">
|
|
||||||
<ControlStyle Width="175px" />
|
|
||||||
<ItemStyle HorizontalAlign="Left" />
|
|
||||||
</asp:BoundField>
|
|
||||||
<asp:TemplateField>
|
|
||||||
<HeaderTemplate><span title="Permitir">P</span></HeaderTemplate>
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:CheckBox runat="server" ID="ChkP"></asp:CheckBox>
|
|
||||||
</ItemTemplate>
|
|
||||||
<ControlStyle Width="25px" />
|
|
||||||
<ItemStyle HorizontalAlign="Center"></ItemStyle>
|
|
||||||
</asp:TemplateField>
|
|
||||||
</Columns>
|
|
||||||
<HeaderStyle CssClass="Titulos" Height="15px"></HeaderStyle>
|
|
||||||
</asp:GridView>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</ContentTemplate>
|
|
||||||
</ajax:TabPanel>
|
|
||||||
|
|
||||||
|
|
||||||
<ajax:TabPanel ID="TabPanelIndicadores" runat="server" HeaderText="Indicadores">
|
<ajax:TabPanel ID="TabPanelIndicadores" runat="server" HeaderText="Indicadores">
|
||||||
@@ -197,7 +170,7 @@
|
|||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="portlet light smmallpadding bordered ">
|
<div class="portlet light xspadding bordered ">
|
||||||
<div class="portlet-title">
|
<div class="portlet-title">
|
||||||
<div class="caption font-green">
|
<div class="caption font-green">
|
||||||
<i class="icon-pin font-green"></i>
|
<i class="icon-pin font-green"></i>
|
||||||
@@ -205,10 +178,16 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
|
<div class="row ">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<input type="text" id="TxtBusquedaIndicador" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaIndicador','{0}')", GvIndicadores.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||||
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaIndicador','{0}')", GvIndicadores.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tools">
|
<div class="tools">
|
||||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
@@ -234,6 +213,53 @@
|
|||||||
</ajax:TabPanel>
|
</ajax:TabPanel>
|
||||||
|
|
||||||
|
|
||||||
|
<ajax:TabPanel ID="TabPanelUsuarios" runat="server" HeaderText="Usuarios">
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:UpdatePanel ID="UpUsuarios" UpdateMode="Conditional" runat="server">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
|
||||||
|
<div class="portlet light xspadding bordered ">
|
||||||
|
<div class="portlet-title">
|
||||||
|
<div class="caption font-green">
|
||||||
|
<i class="icon-pin font-green"></i>
|
||||||
|
<span class="caption-subject bold uppercase">Usuarios</span>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<div class="btn-group">
|
||||||
|
<div class="row ">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<input type="text" id="TxtBusquedaUsuario" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaUsuario','{0}')", GvUsurios.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||||
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaUsuario','{0}')", GvUsurios.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="tools">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="portlet-body">
|
||||||
|
<asp:GridView ID="GvUsurios" DataKeyNames="CveUsuario" data-sort="true" CssClass="table table-striped table-hover Widthall ScrollAD"
|
||||||
|
DataKey="CveUsuario" AutoGenerateColumns="false" GridLines="None" EmptyDataText="Aun no se usuarios" runat="server">
|
||||||
|
<Columns>
|
||||||
|
<asp:BoundField DataField="Usuario" HeaderText="Usuario" />
|
||||||
|
<asp:BoundField DataField="Nombre" HeaderText="Nombre" />
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</ContentTemplate>
|
||||||
|
</ajax:TabPanel>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</ajax:TabContainer>
|
</ajax:TabContainer>
|
||||||
<br />
|
<br />
|
||||||
|
|||||||
@@ -30,6 +30,8 @@ Partial Class Sistemas_RolesDetalle
|
|||||||
CargaGridIndicadores()
|
CargaGridIndicadores()
|
||||||
CargaGridPermisos()
|
CargaGridPermisos()
|
||||||
CargaGridProcesos()
|
CargaGridProcesos()
|
||||||
|
CargaUsuarios()
|
||||||
|
|
||||||
DdlModulo.DataSource = GlobalDTModulos()
|
DdlModulo.DataSource = GlobalDTModulos()
|
||||||
DdlModulo.DataBind()
|
DdlModulo.DataBind()
|
||||||
|
|
||||||
@@ -60,6 +62,19 @@ Partial Class Sistemas_RolesDetalle
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaUsuarios()
|
||||||
|
|
||||||
|
Dim ObjUsuarios As New ClsSisUsuarios()
|
||||||
|
If ObjUsuarios.GetUsuarios(-1, CveRol) Then
|
||||||
|
GvUsurios.DataSource = ObjUsuarios.DtResultados.FiltraParametros("", "", {"CveUsuario", "Usuario", "Nombre"})
|
||||||
|
Else
|
||||||
|
GvUsurios.DataSource = Nothing
|
||||||
|
End If
|
||||||
|
ObjUsuarios.Dispose()
|
||||||
|
GvUsurios.DataBind()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
#Region "I N D I C A D O R E S"
|
#Region "I N D I C A D O R E S"
|
||||||
Private Sub CargaGridIndicadores()
|
Private Sub CargaGridIndicadores()
|
||||||
|
|||||||
@@ -3950,7 +3950,7 @@ Partial Class Clientes
|
|||||||
|
|
||||||
If Not TieneError Then
|
If Not TieneError Then
|
||||||
ObjContaAC.Commit()
|
ObjContaAC.Commit()
|
||||||
Alert(String.Format("Se registo la Cuenta Contable: {0}", CtaCodigo, TipoMensaje.MsgInformacion))
|
'Alert(String.Format("Se registo la Cuenta Contable: {0}", CtaCodigo, TipoMensaje.MsgInformacion))
|
||||||
ddl.Items.Add(New ListItem(CtaCodigo, IdCuentaContable.ToString())) : ddl.SelectedValueExist(IdCuentaContable.ToString())
|
ddl.Items.Add(New ListItem(CtaCodigo, IdCuentaContable.ToString())) : ddl.SelectedValueExist(IdCuentaContable.ToString())
|
||||||
btn.Visible = False
|
btn.Visible = False
|
||||||
ddl.Width = 206
|
ddl.Width = 206
|
||||||
@@ -3984,11 +3984,11 @@ Partial Class Clientes
|
|||||||
DisposeClases = False
|
DisposeClases = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa.Contiene(7, 11, 145, 122) Then
|
If UsuarioActual.CveEmpresa.Contiene(7, 11, 145, 122) Then
|
||||||
|
Dim CvePadre As Integer = GlobalDTContaCuentasContables(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveCuenta", $"IdCompaq = {UsuarioActual.Empresa.Funcionalidad(211).ToEntero()}").ToEntero
|
||||||
If ObjContabilidad.GetCuentasGlobales(UsuarioActual.CveEmpresa, 1) Then
|
'If ObjContabilidad.GetCuentasGlobales(UsuarioActual.CveEmpresa, 1) Then
|
||||||
Dim CvePadre As Integer = ObjContabilidad.DtResultados.FiltroPrimeroValor("CveCuenta").ToEntero
|
' Dim CvePadre As Integer = ObjContabilidad.DtResultados.FiltroPrimeroValor("CveCuenta").ToEntero
|
||||||
If CvePadre > 0 Then
|
If CvePadre > 0 Then
|
||||||
|
|
||||||
Dim CvecuentaNueva As Integer = ObjContabilidad.AddCuenta(CvePadre, CodigoCuentaAltaCompaq, NombreCuentaCuentaAltaCompaq, "A", 2, 1, CveCliente:=CveCliente, IdCompaq:=IdCuentaAltaCompaq)
|
Dim CvecuentaNueva As Integer = ObjContabilidad.AddCuenta(CvePadre, CodigoCuentaAltaCompaq, NombreCuentaCuentaAltaCompaq, "A", 2, 1, CveCliente:=CveCliente, IdCompaq:=IdCuentaAltaCompaq)
|
||||||
|
|
||||||
@@ -3998,7 +3998,7 @@ Partial Class Clientes
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
'End If
|
||||||
Else
|
Else
|
||||||
Respuesta = True
|
Respuesta = True
|
||||||
End If
|
End If
|
||||||
|
|||||||
181
Ventas/FacturacionAcarreos.aspx
Normal file
181
Ventas/FacturacionAcarreos.aspx
Normal file
@@ -0,0 +1,181 @@
|
|||||||
|
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="FacturacionAcarreos.aspx.vb" Inherits="Ventas_FacturacionAcarreos" %>
|
||||||
|
|
||||||
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||||
|
Facturación masiva de acarreos
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||||
|
<li>
|
||||||
|
<asp:HyperLink ID="HlAgregarExcel" NavigateUrl="#" data-toggle="modal" data-target="#DivCargaExcel" runat="server"><i class='fa fa-server'></i> Importar listado</asp:HyperLink>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LnkFacturarSeleccionados" runat="server" OnClick="LnkFacturarSeleccionados_Click"><i class='fa fa-upload' style="color:green"></i> Facturar seleccionados</asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LnkEliminarSeleccionados" runat="server" OnClick="LnkEliminarSeleccionados_Click"><i class='fa fa-trash' style="color:red"></i> Eliminar seleccionados</asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||||
|
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
|
||||||
|
<div class="portlet solid grey-cascade portlet-filter" style="" id="DivFiltros">
|
||||||
|
<div class="portlet-title portlet-filterT smalltitle " style="">
|
||||||
|
<div class="tools">
|
||||||
|
<asp:Button ID="BtnConsultar" runat="server" OnClick="BtnConsultar_Click" Text="Consultar" class="btn btn-primary" />
|
||||||
|
<a href="javascript:;" class="expand"></a>
|
||||||
|
</div>
|
||||||
|
<div class="titlefiltros caption">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-1 truncate">Estatus:</div>
|
||||||
|
<div class="col-md-2 ">
|
||||||
|
<asp:DropDownList runat="server" ID="DdlEstatus" CssClass="select2me" Width="100%">
|
||||||
|
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Pendiente" Value="1" Selected="True"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="No timbrado" Value="2"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Facturado y Timbrado" Value="3"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1 truncate">Cliente:</div>
|
||||||
|
<div class="col-md-2 ">
|
||||||
|
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente" UsaWebService="true" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"></ADS:Dropdownlost>
|
||||||
|
</div>
|
||||||
|
<%--<div class="col-md-1 truncate">Sucursal:</div>
|
||||||
|
<div class="col-md-2 ">
|
||||||
|
<asp:DropDownList runat="server" ID="DdlSucursal" CssClass="select2me" Width="100%">
|
||||||
|
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Pendiente" Value="1" Selected="True"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Facturado" Value="2"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Facturado y Timbrado" Value="3"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>--%>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="portlet-body" style="display: none;">
|
||||||
|
<div class="row">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="portlet light smmallpadding traspasorow bordered">
|
||||||
|
<div class="portlet-title">
|
||||||
|
<div class="caption font-green">
|
||||||
|
<span class="caption-subject bold uppercase" style="line-height: 1;">Solicitudes de facturación de acarreos
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="actions">
|
||||||
|
<div class="btn-group">
|
||||||
|
<div class="row" style="margin-left: 0px; text-align: right" align="left">
|
||||||
|
<div style="margin-right: 15px">
|
||||||
|
<input type="text" id="TxtBusqueda1" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda1','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||||
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="portlet-body rowpadding">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron solicitudes de facturación" OnRowDataBound="GvDatos_RowDataBound"
|
||||||
|
DataKeyNames="CveFacturacionAcarreo,CvePSGeneral,Cantidad,CveCliente,CveSubProyecto,CvePSRelacionado" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" data-sort="true" GridLines="None" Width="99%">
|
||||||
|
<Columns>
|
||||||
|
<asp:TemplateField ItemStyle-HorizontalAlign="center" ItemStyle-Width="20px" HeaderStyle-Width="20px" ItemStyle-CssClass="NoClick">
|
||||||
|
<HeaderTemplate>
|
||||||
|
<asp:CheckBox runat="server" ID="chkSelectAll" CssClass="ChkAllClick" />
|
||||||
|
</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:CheckBox runat="server" ID="chk" CssClass="ChkAllEvt" />
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:BoundField HeaderText="Cliente" DataField="Nombre" ItemStyle-Width="200px" />
|
||||||
|
<asp:BoundField HeaderText="Servicio" DataField="Servicio" ItemStyle-Width="15%" />
|
||||||
|
<asp:BoundField HeaderText="Mercancia" DataField="Mercancia" ItemStyle-Width="15%" />
|
||||||
|
<asp:BoundField HeaderText="Fecha Salida" DataField="FechaSalida" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="80px" />
|
||||||
|
<asp:BoundField HeaderText="Fecha Llegada" DataField="FechaLlegada" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="80px" />
|
||||||
|
<asp:BoundField HeaderText="Cant." DataField="Cantidad" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<asp:BoundField HeaderText="Origen" DataField="DireccionOrigen" ItemStyle-Width="200px" />
|
||||||
|
<asp:BoundField HeaderText="Destino" DataField="DireccionDestino" ItemStyle-Width="200px" />
|
||||||
|
<asp:HyperLinkField HeaderText="Serie Folio" DataTextField="SerieFolio" DataNavigateUrlFields="CveVenta" ItemStyle-Width="100px" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
|
||||||
|
<asp:BoundField HeaderText="Folio Fiscal" DataField="FolioFiscal" ItemStyle-Width="265px" />
|
||||||
|
</Columns>
|
||||||
|
<RowStyle CssClass="Texto" />
|
||||||
|
<HeaderStyle CssClass="Titulos" />
|
||||||
|
</asp:GridView>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
<%--CARGA EXCEL--%>
|
||||||
|
<div id="DivCargaExcel" class="modal ADS fade" role="dialog">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<!-- Modal content-->
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header ">
|
||||||
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
|
<h4 class="modal-title">Agregar Excel</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<h3>Arraste o haga click para subir el archivo Excel</h3>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-11" style="margin-left: 30px; margin-right: 30px;">
|
||||||
|
<asp:TextBox ID="TxtExcel" CssClass="ADSdropzone hidden" Text="" data-maxFile="1" runat="server"></asp:TextBox>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-2" style="text-align: left">
|
||||||
|
<asp:UpdatePanel ID="UpDescargar" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:Button ID="BtnDescargarFormato" runat="server" CssClass="btn btn-warning" Text="Descargar Formato" />
|
||||||
|
</ContentTemplate>
|
||||||
|
<Triggers>
|
||||||
|
<asp:PostBackTrigger ControlID="BtnDescargarFormato" />
|
||||||
|
</Triggers>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-10" style="text-align: right">
|
||||||
|
<asp:Button ID="BtnCargaExcel" runat="server" CssClass="btn btn-success" Text="Aceptar" ValidationGroup="GrpCargarExcel"></asp:Button>
|
||||||
|
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||||
|
<script type="text/javascript">
|
||||||
|
function loadpage() {
|
||||||
|
$('body').on('click', '.ChkAllClick input', function () { $(".ChkAllEvt input").not(this).prop('checked', $('.ChkAllClick input').is(':checked')); });
|
||||||
|
}
|
||||||
|
|
||||||
|
jQuery(document).ready(function () {
|
||||||
|
loadpage();
|
||||||
|
Sys.Application.add_load(function (s, e) {
|
||||||
|
loadpage();
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</asp:Content>
|
||||||
|
|
||||||
350
Ventas/FacturacionAcarreos.aspx.vb
Normal file
350
Ventas/FacturacionAcarreos.aspx.vb
Normal file
@@ -0,0 +1,350 @@
|
|||||||
|
|
||||||
|
Option Explicit On
|
||||||
|
Option Strict On
|
||||||
|
|
||||||
|
Imports System.Data
|
||||||
|
Imports System.IO
|
||||||
|
Imports Extensiones
|
||||||
|
Imports GemBox.Spreadsheet
|
||||||
|
|
||||||
|
Partial Class Ventas_FacturacionAcarreos
|
||||||
|
Inherits ClsPaginas
|
||||||
|
|
||||||
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
|
If Not Page.IsPostBack Then
|
||||||
|
CargaDatos()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaDatos()
|
||||||
|
Dim CveCliente As Integer = -1
|
||||||
|
If DdlClientes.SelectedValue.ToEntero() > 0 Then
|
||||||
|
CveCliente = DdlClientes.SelectedValue.ToEntero()
|
||||||
|
End If
|
||||||
|
Using ObjVentas As New ClsVentas
|
||||||
|
If ObjVentas.GetFacturacionAcarreos(-1, CveCliente, -1, DdlEstatus.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa) Then
|
||||||
|
GvDatos.DataSource = ObjVentas.DtResultados
|
||||||
|
End If
|
||||||
|
End Using
|
||||||
|
GvDatos.DataBind()
|
||||||
|
|
||||||
|
UPDatos.Update()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
#Region "C A R G A R E X C E L "
|
||||||
|
Private Sub BtnDescargarFormato_Click(sender As Object, e As EventArgs) Handles BtnDescargarFormato.Click
|
||||||
|
|
||||||
|
Dim DtExcel As DataTable = New DataTable("Facturas")
|
||||||
|
With DtExcel.Columns
|
||||||
|
.Add(New DataColumn("Sucursal", GetType(String)))
|
||||||
|
.Add(New DataColumn("RFC", GetType(String)))
|
||||||
|
.Add(New DataColumn("Cantidad", GetType(Decimal)))
|
||||||
|
.Add(New DataColumn("ProductoGeneral", GetType(String)))
|
||||||
|
.Add(New DataColumn("Origen", GetType(String)))
|
||||||
|
.Add(New DataColumn("Destino", GetType(String)))
|
||||||
|
.Add(New DataColumn("FechaSalida", GetType(DateTime)))
|
||||||
|
.Add(New DataColumn("FechaLlegada", GetType(DateTime)))
|
||||||
|
.Add(New DataColumn("Unidad", GetType(String)))
|
||||||
|
.Add(New DataColumn("Chofer", GetType(String)))
|
||||||
|
.Add(New DataColumn("Configuración", GetType(String)))
|
||||||
|
.Add(New DataColumn("Remolque1", GetType(String)))
|
||||||
|
.Add(New DataColumn("Remolque2", GetType(String)))
|
||||||
|
.Add(New DataColumn("Distancia", GetType(Decimal)))
|
||||||
|
End With
|
||||||
|
|
||||||
|
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
||||||
|
|
||||||
|
Dim FileExcel As New ExcelFile()
|
||||||
|
|
||||||
|
Dim worksheet = FileExcel.Worksheets.Add(DtExcel.TableName)
|
||||||
|
worksheet.InsertDataTable(DtExcel, New InsertDataTableOptions() With
|
||||||
|
{
|
||||||
|
.ColumnHeaders = True,
|
||||||
|
.StartRow = 0,
|
||||||
|
.StartColumn = 0
|
||||||
|
})
|
||||||
|
worksheet.Rows(0).Style.FillPattern.SetPattern(FillPatternStyle.Solid, SpreadsheetColor.FromArgb(75, 119, 190), SpreadsheetColor.FromArgb(255, 255, 255))
|
||||||
|
worksheet.Rows(0).Style.Font.Color = SpreadsheetColor.FromArgb(255, 255, 255)
|
||||||
|
|
||||||
|
Dim columnCount = worksheet.CalculateMaxUsedColumns()
|
||||||
|
For i = 0 To columnCount
|
||||||
|
worksheet.Columns(i).AutoFit(1, worksheet.Rows(0), worksheet.Rows(worksheet.Rows.Count - 1))
|
||||||
|
Next
|
||||||
|
|
||||||
|
FileExcel.Save(Response, "FormatoFacturas.xlsx", SaveOptions.XlsxDefault)
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
Private Sub BtnCargaExcel_Click(sender As Object, e As EventArgs) Handles BtnCargaExcel.Click
|
||||||
|
|
||||||
|
If TxtExcel.getfiles().Archivos.Count > 0 Then
|
||||||
|
Dim file As Archivo = TxtExcel.getfiles().Archivos(0)
|
||||||
|
Dim Directorio As String = AppDomain.CurrentDomain.BaseDirectory & file.path
|
||||||
|
CargarArchivo(Directorio, file.filename)
|
||||||
|
Else
|
||||||
|
Alert("No existe el archivo. Favor de subir un archivo excel a la plataforma.", TipoMensaje.MsgError)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
Private Sub CargarArchivo(Ruta As String, FileName As String)
|
||||||
|
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
||||||
|
Dim dt As DataTable = Nothing
|
||||||
|
Dim ErrorArchivo = False
|
||||||
|
|
||||||
|
Try
|
||||||
|
dt = ReadExcelFile(Ruta + FileName, True)
|
||||||
|
Catch ex As Exception
|
||||||
|
ErrorArchivo = True
|
||||||
|
OnError("Ocurrio un error al leer el archivo <br/>" & ex.Message, ex)
|
||||||
|
End Try
|
||||||
|
If Not ErrorArchivo AndAlso dt IsNot Nothing Then
|
||||||
|
|
||||||
|
dt.TableName = "Datos"
|
||||||
|
Dim MsgFacturacionAcarreos As New StringBuilder()
|
||||||
|
Dim RowsCargados As Integer = 0
|
||||||
|
Dim RowsNoCargados As Integer = 0
|
||||||
|
|
||||||
|
Dim ObjVentas As New ClsVentas
|
||||||
|
ObjVentas.IniciaTransacSQL()
|
||||||
|
Dim TieneError As Boolean = False
|
||||||
|
Try
|
||||||
|
Dim DtPS As DataTable = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
|
||||||
|
For Each row As DataRow In dt.Rows
|
||||||
|
Dim msg As String = ObjVentas.AddFacturacionAcarreos(row("Sucursal").ToString(), row("RFC").ToString(), row("Cantidad").ToString().ToDecimal(), row("ProductoGeneral").ToString(),
|
||||||
|
row("Origen").ToString(), row("Destino").ToString(), row("FechaSalida").ToString().ToDateTime(), row("FechaLlegada").ToString().ToDateTime(),
|
||||||
|
row("Unidad").ToString(), row("Chofer").ToString(), row("Configuración").ToString(), row("Remolque1").ToString(), row("Remolque2").ToString(),
|
||||||
|
row("Distancia").ToString().ToDecimal(), UsuarioActual.CveEmpresa)
|
||||||
|
If msg = "Correcto" Then
|
||||||
|
RowsCargados += 1
|
||||||
|
Else
|
||||||
|
TieneError = True
|
||||||
|
MsgFacturacionAcarreos.AppendFormat("{0}", msg)
|
||||||
|
RowsNoCargados += 1
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al cargar los precios.", ex)
|
||||||
|
Finally
|
||||||
|
Dim MensajeFinal As New StringBuilder()
|
||||||
|
If RowsNoCargados = 0 AndAlso RowsCargados > 0 Then
|
||||||
|
MensajeFinal.Append("Los datos se cargaron correctamente. <br/><br/>")
|
||||||
|
End If
|
||||||
|
|
||||||
|
If RowsNoCargados > 0 Then
|
||||||
|
MensajeFinal.Append(MsgFacturacionAcarreos.ToString())
|
||||||
|
End If
|
||||||
|
|
||||||
|
If TieneError Then
|
||||||
|
ObjVentas.RollBack()
|
||||||
|
Alert(MensajeFinal.ToString(), TipoMensaje.MsgError)
|
||||||
|
Else
|
||||||
|
ObjVentas.Commit()
|
||||||
|
Alert(MensajeFinal.ToString())
|
||||||
|
End If
|
||||||
|
ObjVentas.Dispose()
|
||||||
|
|
||||||
|
End Try
|
||||||
|
|
||||||
|
CargaDatos()
|
||||||
|
|
||||||
|
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function ReadExcelFile(ByVal flatFilePath As String, ByVal firstRowHasHeaders As Boolean) As DataTable
|
||||||
|
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
||||||
|
Dim excelFile As ExcelFile = ExcelFile.Load(flatFilePath)
|
||||||
|
|
||||||
|
Dim unnamed As Integer = 0
|
||||||
|
Dim cols As Integer
|
||||||
|
Dim columns As String()
|
||||||
|
Dim curRow As Integer = 0
|
||||||
|
Dim curCol As Integer = 0
|
||||||
|
Dim dataTable As DataTable = New DataTable()
|
||||||
|
Dim worksheet As ExcelWorksheet = excelFile.Worksheets(0)
|
||||||
|
|
||||||
|
For cols = 0 To worksheet.Rows(0).AllocatedCells.Count - 1
|
||||||
|
|
||||||
|
If firstRowHasHeaders Then
|
||||||
|
|
||||||
|
If worksheet.Rows(0).Cells(cols).Value IsNot Nothing Then
|
||||||
|
dataTable.Columns.Add(worksheet.Rows(0).Cells(cols).Value.ToString())
|
||||||
|
Else
|
||||||
|
dataTable.Columns.Add("Unnamed Column " & (System.Threading.Interlocked.Increment(unnamed)))
|
||||||
|
End If
|
||||||
|
|
||||||
|
curRow = 1
|
||||||
|
Else
|
||||||
|
dataTable.Columns.Add("Column " & (cols + 1))
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
While curRow < worksheet.Rows.Count
|
||||||
|
columns = New String(cols - 1) {}
|
||||||
|
|
||||||
|
For curCol = 0 To cols - 1
|
||||||
|
|
||||||
|
If worksheet.Rows(curRow).Cells(curCol).Value Is Nothing Then
|
||||||
|
columns(curCol) = ""
|
||||||
|
Else
|
||||||
|
columns(curCol) = worksheet.Rows(curRow).Cells(curCol).Value.ToString()
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
dataTable.Rows.Add(columns)
|
||||||
|
curRow += 1
|
||||||
|
End While
|
||||||
|
|
||||||
|
Return dataTable
|
||||||
|
End Function
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||||
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
If e.Row.DBCampo("SerieFolio").Length > 0 Then
|
||||||
|
e.Row.FCCheckBox("chk").Visible = False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Protected Sub LnkFacturarSeleccionados_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
If GvDatos.Rows.Cast(Of GridViewRow)().Count(Function(gvr) gvr.FCCheckBox("chk").Checked) <= 0 Then
|
||||||
|
Alert($"Debe seleccionar un acarreo para facturar", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim msg As New StringBuilder()
|
||||||
|
|
||||||
|
Dim NumFacturasGeneradas As Integer = 0
|
||||||
|
Dim NumFacturasTimbradas As Integer = 0
|
||||||
|
|
||||||
|
For Each GvRow As GridViewRow In GvDatos.Rows
|
||||||
|
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||||
|
If GvRow.FCCheckBox("chk").Checked Then
|
||||||
|
|
||||||
|
Dim CveCliente As Integer = GvRow.DataKey("CveCliente").ToEntero()
|
||||||
|
Dim CveSubProyecto As Integer = GvRow.DataKey("CveSubProyecto").ToEntero()
|
||||||
|
Dim CveMoneda As Integer = 1
|
||||||
|
|
||||||
|
Dim CvePS As Integer = GvRow.DataKey("CvePSGeneral").ToEntero()
|
||||||
|
Dim Cantidad As Decimal = GvRow.DataKey("Cantidad").ToEntero()
|
||||||
|
Dim PU As Decimal = -1
|
||||||
|
Dim Descuento As Decimal = 0
|
||||||
|
Dim Obs As String = ""
|
||||||
|
|
||||||
|
Dim CvePSMercancia As Integer = GvRow.DataKey("CvePSRelacionado").ToEntero()
|
||||||
|
|
||||||
|
Dim ObjFactura = Modelos.Factura.CrearVentaNueva(UsuarioActual, CveSubProyecto, CveCliente, CveMoneda)
|
||||||
|
ObjFactura.EmitirCartaPorte = True
|
||||||
|
ObjFactura.CveFacturacionAcarreo = GvRow.DataKey("CveFacturacionAcarreo").ToEntero()
|
||||||
|
|
||||||
|
ObjFactura.AgregarPS(CvePS, Cantidad, PU, Descuento, Obs)
|
||||||
|
|
||||||
|
ObjFactura.DtMercancias = CreaDTMercancias(CvePSMercancia, Cantidad)
|
||||||
|
ObjFactura.CalculaTotales()
|
||||||
|
ObjFactura.PreparaTimbre()
|
||||||
|
|
||||||
|
Dim resp = ObjFactura.EmitirFactura(Timbrar:=True, Modulo:="FacturacionAcarreos")
|
||||||
|
|
||||||
|
For Each m As String In resp.Mensajes
|
||||||
|
msg.AppendFormat("{0}<br/>", m)
|
||||||
|
Next
|
||||||
|
|
||||||
|
If resp.TieneError AndAlso resp.Mensajes.Count = 0 Then
|
||||||
|
msg.Append("Ocurrió un error al generar la factura.<br/>")
|
||||||
|
End If
|
||||||
|
|
||||||
|
If resp.CveVenta > 0 AndAlso Not resp.TieneError Then
|
||||||
|
NumFacturasGeneradas += 1
|
||||||
|
If resp.SeTimbro Then
|
||||||
|
NumFacturasTimbradas += 1
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
If NumFacturasGeneradas > 0 Then
|
||||||
|
Alert($"Se generaron {NumFacturasGeneradas} y se timbraron {NumFacturasTimbradas} facturas. <br/>" + msg.ToString(), TipoMensaje.MsgInformacion)
|
||||||
|
Else
|
||||||
|
Alert($"No se pudieron generar facturas. <br/>" + msg.ToString(), TipoMensaje.MsgError)
|
||||||
|
End If
|
||||||
|
|
||||||
|
CargaDatos()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub LnkEliminarSeleccionados_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
If GvDatos.Rows.Cast(Of GridViewRow)().Count(Function(gvr) gvr.FCCheckBox("chk").Checked) <= 0 Then
|
||||||
|
Alert($"Debe seleccionar un acarreo para eliminar", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim msg As New StringBuilder()
|
||||||
|
Dim TieneError As Boolean = False
|
||||||
|
Dim ObjVentas As New ClsVentas
|
||||||
|
ObjVentas.IniciaTransacSQL()
|
||||||
|
|
||||||
|
Try
|
||||||
|
For Each GvRow As GridViewRow In GvDatos.Rows
|
||||||
|
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||||
|
If GvRow.FCCheckBox("chk").Checked Then
|
||||||
|
|
||||||
|
If Not ObjVentas.RemoveFacturacionAcarreo(GvRow.DataKey("CveFacturacionAcarreo").ToEntero(), UsuarioActual.CveEmpresa) Then
|
||||||
|
TieneError = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Catch ex As Exception
|
||||||
|
TieneError = True
|
||||||
|
End Try
|
||||||
|
|
||||||
|
If TieneError Then
|
||||||
|
ObjVentas.RollBack()
|
||||||
|
Alert("Ocurrió un error al eliminar los registros.", TipoMensaje.MsgError)
|
||||||
|
Else
|
||||||
|
ObjVentas.Commit()
|
||||||
|
Alert("Los registros se eliminaron correctamente.", TipoMensaje.MsgInformacion)
|
||||||
|
End If
|
||||||
|
ObjVentas.Dispose()
|
||||||
|
|
||||||
|
CargaDatos()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function CreaDTMercancias(CvePS As Integer, Cantidad As Decimal) As DataTable
|
||||||
|
Dim DtMercancias = New DataTable()
|
||||||
|
DtMercancias.Columns.Add(New DataColumn("Consec", GetType(Integer)))
|
||||||
|
DtMercancias.Columns.Add(New DataColumn("Cantidad", GetType(Decimal)))
|
||||||
|
DtMercancias.Columns.Add(New DataColumn("CvePS", GetType(Integer)))
|
||||||
|
DtMercancias.Columns.Add(New DataColumn("CveUnidadMedida", GetType(Integer)))
|
||||||
|
DtMercancias.Columns.Add(New DataColumn("CodigoPS", GetType(String)))
|
||||||
|
|
||||||
|
Dim DrPS As DataRow = GlobalDTPSSimplificado(CveEmpresa:=UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
|
||||||
|
If DrPS Is Nothing Then
|
||||||
|
Alert("No se encontró la mercancía", TipoMensaje.MsgAdvertencia)
|
||||||
|
Return Nothing
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim NewRow As DataRow = DtMercancias.NewRow
|
||||||
|
NewRow("Consec") = DtMercancias.MAX("Consec").ToEntero() + 1
|
||||||
|
NewRow("Cantidad") = Cantidad
|
||||||
|
NewRow("CvePS") = DrPS("CvePS")
|
||||||
|
NewRow("CveUnidadMedida") = DrPS("CveUnidadMedida")
|
||||||
|
NewRow("CodigoPS") = DrPS("PSCodigo")
|
||||||
|
|
||||||
|
DtMercancias.Rows.Add(NewRow)
|
||||||
|
|
||||||
|
Return DtMercancias
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||||
|
CargaDatos()
|
||||||
|
End Sub
|
||||||
|
End Class
|
||||||
@@ -365,11 +365,15 @@ Partial Class ProductosyServicios
|
|||||||
|
|
||||||
divPrecio.Visible = UsuarioActual.Empresa.Funcionalidad(404) = "" ' si tiene lista de precio, se oculta el precio por ps
|
divPrecio.Visible = UsuarioActual.Empresa.Funcionalidad(404) = "" ' si tiene lista de precio, se oculta el precio por ps
|
||||||
|
|
||||||
|
If UsuarioActual.CveEmpresa = 1 Then
|
||||||
|
divPrecio.Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(713) = "1" Then '' empresa deduce IEPS
|
If UsuarioActual.Empresa.Funcionalidad(713) = "1" Then '' empresa deduce IEPS
|
||||||
divIEPS.Visible = True
|
divIEPS.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa = 13 Then
|
If UsuarioActual.CveEmpresa.Contiene(1, 13) Then
|
||||||
DivPSAdicionalVigencia.Visible = True
|
DivPSAdicionalVigencia.Visible = True
|
||||||
LtlPSAdicionalVigencia.Text = "Producto Relacionado:"
|
LtlPSAdicionalVigencia.Text = "Producto Relacionado:"
|
||||||
CargaPSAdicionalesVigencias()
|
CargaPSAdicionalesVigencias()
|
||||||
|
|||||||
@@ -17939,21 +17939,23 @@ Partial Class Ventas
|
|||||||
TabAlmacen.Enabled = DdlTipoComprobante.SelectedValue <> "Ant"
|
TabAlmacen.Enabled = DdlTipoComprobante.SelectedValue <> "Ant"
|
||||||
|
|
||||||
'VALIDA ESTATUS CLIENTE - SOLO SE PUEDE USAR EL CLIENTE PARA COTIZAR EN CASO DE ESTAR INACTIVO
|
'VALIDA ESTATUS CLIENTE - SOLO SE PUEDE USAR EL CLIENTE PARA COTIZAR EN CASO DE ESTAR INACTIVO
|
||||||
If DdlTipoComprobante.SelectedValue.Contiene("Cot", "DPe") Or TipoContrato >= 0 Then 'SI VIENE DE PEDIDO DE AF DESDE CONTRATO NO BLOQUEA CUANDO EL CLIENTE ESTA INACTIVO
|
If EsCreaApartirDe OrElse ModalidadEdicion OrElse CveVenta <= 0 Then
|
||||||
BtnEmitirImprimir.Visible = True
|
If DdlTipoComprobante.SelectedValue.Contiene("Cot", "DPe") Or TipoContrato >= 0 Then 'SI VIENE DE PEDIDO DE AF DESDE CONTRATO NO BLOQUEA CUANDO EL CLIENTE ESTA INACTIVO
|
||||||
TrVistaPrevia.Visible = True
|
|
||||||
Else
|
|
||||||
If LblCliente.Text <> "Cliente" And Not EstatusCliente Then
|
|
||||||
Alert("El Cliente seleccionado no esta activo", TipoMensaje.MsgAdvertencia)
|
|
||||||
End If
|
|
||||||
If Not CveEmpresaCRM > 0 Then
|
|
||||||
BtnEmitirImprimir.Visible = EstatusCliente
|
|
||||||
TrVistaPrevia.Visible = EstatusCliente
|
|
||||||
Else
|
|
||||||
BtnEmitirImprimir.Visible = True
|
BtnEmitirImprimir.Visible = True
|
||||||
TrVistaPrevia.Visible = True
|
TrVistaPrevia.Visible = True
|
||||||
End If
|
Else
|
||||||
|
If LblCliente.Text <> "Cliente" And Not EstatusCliente Then
|
||||||
|
Alert("El Cliente seleccionado no esta activo", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
If Not CveEmpresaCRM > 0 Then
|
||||||
|
BtnEmitirImprimir.Visible = EstatusCliente
|
||||||
|
TrVistaPrevia.Visible = EstatusCliente
|
||||||
|
Else
|
||||||
|
BtnEmitirImprimir.Visible = True
|
||||||
|
TrVistaPrevia.Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If DdlTipoComprobante.SelectedValue = "Ing" Then
|
If DdlTipoComprobante.SelectedValue = "Ing" Then
|
||||||
@@ -20406,8 +20408,10 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub TxtFolio_TextChanged(sender As Object, e As System.EventArgs) Handles TxtFolio.TextChanged
|
Protected Sub TxtFolio_TextChanged(sender As Object, e As System.EventArgs) Handles TxtFolio.TextChanged
|
||||||
ViewState("EstablecioFolio") = True
|
If EsCreaApartirDe OrElse ModalidadEdicion OrElse CveVenta <= 0 Then
|
||||||
Alert("Se estableció el Folio Fijo para el nuevo documento.")
|
ViewState("EstablecioFolio") = True
|
||||||
|
Alert("Se estableció el Folio Fijo para el nuevo documento.")
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub HabilitarFacturacionSucursal()
|
Private Sub HabilitarFacturacionSucursal()
|
||||||
trsucursalciente.Visible = True
|
trsucursalciente.Visible = True
|
||||||
@@ -24893,7 +24897,7 @@ Partial Class Ventas
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If SaldoVenta <> 0 Then
|
If SaldoAlmacen <> 0 Then
|
||||||
|
|
||||||
If UsuarioActual.TienePermisoProceso(269) Then
|
If UsuarioActual.TienePermisoProceso(269) Then
|
||||||
DivDevAlm.Visible = True
|
DivDevAlm.Visible = True
|
||||||
@@ -34786,7 +34790,7 @@ Partial Class Ventas
|
|||||||
DdlUsoCFDI.Enabled = True
|
DdlUsoCFDI.Enabled = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not UsuarioActual.TienePermisoProceso(289) Then
|
If UsuarioActual.TienePermisoProceso(289) Then
|
||||||
If LblSeTimbro.Text = "No" Then
|
If LblSeTimbro.Text = "No" Then
|
||||||
DdlUsoCFDI.Enabled = False
|
DdlUsoCFDI.Enabled = False
|
||||||
DdlMetodoPago33.Enabled = False
|
DdlMetodoPago33.Enabled = False
|
||||||
|
|||||||
Reference in New Issue
Block a user