diff --git a/App_Code/ClsBancos.vb b/App_Code/ClsBancos.vb
index 254b0477c..81d76146e 100644
--- a/App_Code/ClsBancos.vb
+++ b/App_Code/ClsBancos.vb
@@ -2966,6 +2966,7 @@ Public Class ClsBancos
SqlAdapter.SelectCommand.Parameters.Add("@CveCredito", SqlDbType.Int).Value = CveCredito
Try
+ SqlAdapter.SelectCommand.CommandTimeout = 0
SqlAdapter.Fill(Data)
Retorno = True
Catch Ex1 As SqlException
diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb
index 69145f2ca..18b04303a 100644
--- a/App_Code/ClsContabilidad.vb
+++ b/App_Code/ClsContabilidad.vb
@@ -1350,7 +1350,7 @@ Public Class ClsContabilidad
ContaFolio = ObjConta.Folio.ToString
End If
- If tIdPoliza > 0 AndAlso GetContabilizacionDiarioDetalle(CvePrePoliza) Then
+ If tIdPoliza > 0 AndAlso GetContabilizacionDiarioDetalle(CvePrePoliza, Empresa.CveEmpresa) Then
Dim tipoMovimiento As Boolean = False
Dim CveConceptoContable As Integer
Dim SigReferencia As String = ""
@@ -2007,12 +2007,13 @@ Public Class ClsContabilidad
Return Retorno
End Function
- Public Function GetContabilizacionDiarioDetalle(CvePrePoliza As Integer) As Boolean 'Editado por charlie
+ Public Function GetContabilizacionDiarioDetalle(CvePrePoliza As Integer, CveEmpresa As Integer) As Boolean 'Editado por charlie
Dim Retorno As Boolean = False
DataAdapter("PA_Conta_ContabilizacionDiariosDetalleGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
@@ -6375,7 +6376,9 @@ Public Class ClsContabilidad
Return Retorno
End Function
- Public Function ValidacionesPrePoliza(CvePrePoliza As Integer, Opcion As Integer, ByRef UsuarioActual As Usuario, Optional CveVenta As Integer = -1, Optional AutoConta As Boolean = True) As Boolean
+ Public Function ValidacionesPrePoliza(CvePrePoliza As Integer, ByRef UsuarioActual As Usuario, Optional Opcion As Integer = 1,
+ Optional CveVenta As Integer = -1, Optional AutoConta As Boolean = True,
+ Optional ObjConta As ClsContPAQi = Nothing) As Boolean
Dim Retorno = False
DataAdapter("PA_Conta_PrePolizasValidacion")
@@ -6402,10 +6405,13 @@ Public Class ClsContabilidad
If MensajePolizaDescuadre = "" AndAlso AutoConta Then
If UsuarioActual.Empresa.TipoContabilidad = 2 Then ' el tipocontabilidad deberá activarse en el PA
- If Not ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
+ If Not ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjConta) Then
MensajePolizaDescuadre = Mensaje.ToString ' regresa el mensaje de contabilización
+ Retorno = False
End If
End If
+ Else
+ Retorno = False
End If
Catch ex As Exception
diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb
index 984ed624c..f1f164ec2 100644
--- a/App_Code/ClsPaginas.vb
+++ b/App_Code/ClsPaginas.vb
@@ -4306,15 +4306,15 @@ Public Class ClsPaginas
End If
Else
LocalStopwatch.Value.Restart()
+ If EsProduccion Then
+ If UsuarioActual.CveEmpresa.Contiene(141, 152, 159, 160, 161, 162, 166) Then System.Threading.Thread.Sleep(750)
+ End If
If Not Page.IsPostBack Then
'If Not CType(Session("UsuarioSIG"), Usuario).SeleccionoEmpresa AndAlso Request.ServerVariables("URL") <> "/Sistemas/PopUpSeleccionarEmpresa.aspx" Then
' Response.Redirect("/Sistemas/PopUpSeleccionarEmpresa.aspx")
' 'Alert(Request.ServerVariables("URL"))
'End If
''codigo temporal
- If EsProduccion Then
- If UsuarioActual.CveEmpresa.Contiene(141, 152, 159, 160, 161, 162, 166) Then System.Threading.Thread.Sleep(750)
- End If
Dim i As Integer = Obt_ClavePagina(Request.ServerVariables("URL"))
Dim FailURL As String = $"{FormsAuthentication.DefaultUrl}?ADCod={Encripta($"CveModulo={i}")}"
diff --git a/App_Code/ClsProductosServicios.vb b/App_Code/ClsProductosServicios.vb
index f3ae17edc..1e8338e20 100644
--- a/App_Code/ClsProductosServicios.vb
+++ b/App_Code/ClsProductosServicios.vb
@@ -103,8 +103,6 @@ Public Class ClsProductosServicios
Public Property ClaveImpuestoEmpaque As String
Public Property ClaveImpuestoUnidadMedida As String
Public Property ClaveCategoriaToxicidad As String
-
- Public Property EsOutSourcing As Boolean
Public Property PrecioLibre As Boolean
Public ReadOnly Property DtResultados() As DataTable
@@ -314,7 +312,6 @@ Public Class ClsProductosServicios
ClaveImpuestoEmpaque = Data.Rows(0)("ClaveImpuestoEmpaque").ToString
ClaveImpuestoUnidadMedida = Data.Rows(0)("ClaveImpuestoUM").ToString
ClaveCategoriaToxicidad = Data.Rows(0)("ClaveCategoriaToxicidad").ToString
- EsOutSourcing = Data.Rows(0)("EsOutSourcing").ToString = "True"
PrecioLibre = Data.Rows(0)("PrecioLibre").ToString = "True"
End If
@@ -410,11 +407,11 @@ Public Class ClsProductosServicios
AplicaParaConcepto As Boolean, AplicaParaVenta As Boolean, CveUsuario As Integer, CveEmpresa As Integer, CveMetodoInventario As Integer, EsPaquete As Integer,
Optional CveTipoPS As Integer = -1, Optional FuePorXML As Boolean = True, Optional TipoServicio As Integer = -1, Optional CveClasificacion2 As Integer = -1,
Optional CveMarca As Integer = -1, Optional AlmacenSeccion As String = "", Optional AplicaIEPS As Boolean = False, Optional IEPSPorcentaje As Decimal = -1,
- Optional CveConceptoContable As Integer = -1, Optional CveCompuesto As Integer = -1, Optional CveSATPS As Integer = -1, Optional IEPSGrabaIVA As Boolean = False, Optional VentaMinima As Decimal = 0,
+ Optional CveCompuesto As Integer = -1, Optional CveSATPS As Integer = -1, Optional IEPSGrabaIVA As Boolean = False, Optional VentaMinima As Decimal = 0,
Optional CveMoneda As Integer = 1, Optional RetISR As Double = 0, Optional PrecioMinimo As Decimal = Nothing, Optional CveTipoFactor As Integer = 1,
Optional CveFraccionArancelaria As Integer = -1, Optional CveClasificacionDetalle As Integer = -1, Optional CveTamaño As Integer = -1,
Optional CveModelo As Integer = -1, Optional CveMedida As Integer = -1, Optional CveRinTamaño As Integer = -1, Optional ClaveImpuestoEmpaque As String = "", Optional ClaveImpuestoUM As String = "",
- Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1, Optional EsOutSourcing As Boolean = False, Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False,
+ Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1, Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False,
Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False, Optional TiempoCaducidad As Integer = -1, Optional CvePSAdicionalVigencia As Integer = -1, Optional PrecioLibre As Boolean = False,
Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "", Optional CveObjetoImpuesto As Integer = 0,
Optional RegistroRSCO As String = "-1", Optional FechaVigenciaRSCO As Date = MinFecha, Optional VigenciaIndeterminadaRSCO As Boolean = False, Optional CveTipoEmpacado As Integer = -1, Optional CveTipoOrganico As Integer = -1) As Integer
@@ -492,7 +489,6 @@ Public Class ClsProductosServicios
.Add("@ClaveImpuestoUM", SqlDbType.VarChar).Value = ClaveImpuestoUM
.Add("@ClaveCategoriaToxicidad", SqlDbType.VarChar).Value = ClaveCategoriaToxicidad
.Add("@Litraje", SqlDbType.Float).Value = Litraje
- .Add("@EsOutSourcing", SqlDbType.Bit).Value = EsOutSourcing
.Add("@AplicaSerie", SqlDbType.Bit).Value = AplicaSerie
.Add("@AplicaLote", SqlDbType.Bit).Value = AplicaLote
@@ -569,35 +565,20 @@ Public Class ClsProductosServicios
.Add("@AplicaIEPS", SqlDbType.Bit).Value = PS.AplicaIEPS
.Add("@IEPSGrabaIVA", SqlDbType.Bit).Value = PS.IEPSGrabaIVA
.Add("@IEPSPorcentaje", SqlDbType.SmallMoney).Value = PS.IEPSPorcentaje
- .Add("@CveConceptoContable", SqlDbType.Int).Value = PS.CveConceptoContable
.Add("@CveCompuesto", SqlDbType.Int).Value = PS.CveCompuesto
.Add("@CveSATPS", SqlDbType.Int).Value = PS.CveSATPS
-
'Nuevo R: 26/09/2017'
.Add("@Inventariable", SqlDbType.Bit).Value = PS.Inventariable
.Add("@CveProveedorCompra", SqlDbType.Int).Value = PS.CveProveedorCompra
.Add("@VentaMinima", SqlDbType.Decimal).Value = PS.VentaMinima
-
'Nuevo R: 08/11/2017'
.Add("@CveMoneda", SqlDbType.Int).Value = PS.CveMoneda
-
'Nuevo R: 30/11/2017
.Add("@RetISR", SqlDbType.Float).Value = PS.RetISR
-
-
'Nuevo Oscar 29/12/2017
.Add("@PrecioMinimo", SqlDbType.Money).Value = PS.PrecioMinimo
-
- 'Nuevo Rigo 12/01/2018
- .Add("@CveTipoFactor", SqlDbType.Int).Value = PS.CveTipoFactor
-
- 'Nuevo Raul 08/03/2018
.Add("@CveFraccionArancelaria", SqlDbType.Int).Value = PS.CveFraccionArancelaria
-
- 'Nuevo Raul 11/09/2018
.Add("@CveClasificacionDetalle", SqlDbType.Int).Value = PS.CveClasificacionDetalle
-
- 'Nuevo Oscar 31/10/2018
.Add("@CveTamaño", SqlDbType.Int).Value = PS.CveTamaño
End With
@@ -658,11 +639,11 @@ Public Class ClsProductosServicios
Public Function UpdatePS(CveClasificacion As Integer, CveClasificacionCosto As Integer, CveUnidadMedida As Integer, Codigo As String, Codigo2 As String, CodigoBarras As String, PS As String, Precio As Double, IVA As Double, RetIVA As Double, Inventariable As Boolean, CveProveedorCompra As Integer,
AplicaParaConcepto As Boolean, AplicaParaVenta As Boolean, Estado As Boolean, CveUsuario As Integer, CvePS As Integer, CveMetodoInventario As Integer, EsPaquete As Integer, CveSATPS As Integer, Optional CveTipoPS As Integer = -1, Optional TipoServicio As Integer = -1,
Optional CveClasificacion2 As Integer = -1, Optional CveMarca As Integer = -1, Optional AlmacenSeccion As String = "", Optional AplicaIEPS As Boolean = False, Optional IEPSPorcentaje As Decimal = -1,
- Optional CveConceptoContable As Integer = -1, Optional CveCompuesto As Integer = -1, Optional IEPSGrabaIVA As Boolean = False, Optional VentaMinima As Decimal = 0,
+ Optional CveCompuesto As Integer = -1, Optional IEPSGrabaIVA As Boolean = False, Optional VentaMinima As Decimal = 0,
Optional CveMoneda As Integer = 1, Optional RetISR As Double = 0, Optional PrecioMinimo As Decimal = Nothing, Optional CveTipoFactor As Integer = 1,
Optional CveFraccionArancelaria As Integer = -1, Optional CveUsuarioModifico As Integer = -1,
Optional CveClasificacionDetalle As Integer = -1, Optional CveTamaño As Integer = -1, Optional CveModelo As Integer = -1, Optional CveMedida As Integer = -1, Optional CveRinTamaño As Integer = -1, Optional ClaveImpuestoEmpaque As String = "", Optional ClaveImpuestoUM As String = "",
- Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1, Optional EsOutSourcing As Boolean = False,
+ Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1,
Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False, Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False, Optional TiempoCaducidad As Integer = -1, Optional CvePSAdicionalVigencia As Integer = -1, Optional PrecioLibre As Boolean = False,
Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "", Optional CveObjetoImpuesto As Integer = 0,
Optional RegistroRSCO As String = "-1", Optional FechaVigenciaRSCO As Date = MinFecha, Optional VigenciaIndeterminadaRSCO As Boolean = False, Optional CveTipoEmpacado As Integer = -1, Optional CveTipoOrganico As Integer = -1) As Boolean
@@ -697,7 +678,6 @@ Public Class ClsProductosServicios
.Add("@AplicaIEPS", SqlDbType.Bit).Value = AplicaIEPS
.Add("@IEPSGrabaIVA", SqlDbType.Bit).Value = IEPSGrabaIVA
.Add("@IEPSPorcentaje", SqlDbType.SmallMoney).Value = IEPSPorcentaje
- .Add("@CveConceptoContable", SqlDbType.Int).Value = CveConceptoContable
.Add("@CveCompuesto", SqlDbType.Int).Value = CveCompuesto
.Add("@CveSATPS", SqlDbType.Int).Value = CveSATPS
@@ -740,7 +720,6 @@ Public Class ClsProductosServicios
.Add("@ClaveImpuestoUM", SqlDbType.VarChar).Value = ClaveImpuestoUM
.Add("@ClaveCategoriaToxicidad", SqlDbType.VarChar).Value = ClaveCategoriaToxicidad
.Add("@Litraje", SqlDbType.Float).Value = Litraje
- .Add("@EsOutSourcing", SqlDbType.Bit).Value = EsOutSourcing
.Add("@AplicaSerie", SqlDbType.Bit).Value = AplicaSerie
.Add("@AplicaLote", SqlDbType.Bit).Value = AplicaLote
diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb
index 83f46e6bd..df54b086e 100644
--- a/App_Code/Modelos.vb
+++ b/App_Code/Modelos.vb
@@ -2404,7 +2404,7 @@ Namespace Modelos
' Verificar si la fecha es del mes anterior a la fecha actual
Dim esMesAnterior As Boolean = False
- If ObjFactura.TipoDocto = "Egs" AndAlso ValorMultiplicador = -1 AndAlso FechaCancelacion > MinFecha AndAlso tipoCambio > 1 AndAlso UsuarioActual.Empresa.Funcionalidad(703) = "1" Then
+ If ValorMultiplicador = -1 AndAlso FechaCancelacion > MinFecha AndAlso tipoCambio > 1 AndAlso UsuarioActual.Empresa.Funcionalidad(703) = "1" Then
' Obtener el mes y año de la fecha actual
Dim mesActual As Integer = FechaCancelacion.Month
Dim añoActual As Integer = FechaCancelacion.Year
@@ -2480,11 +2480,11 @@ Namespace Modelos
Dim TCCliente As Decimal = tipoCambio
Dim TCFluctuacion As Decimal = tipoCambio
'TOMA EL TC DE LA ULTIMA FLUCTUACION
- If ValorMultiplicador = -1 AndAlso UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso ObjFactura.CveMoneda = 2 Then
+ If ValorMultiplicador = -1 AndAlso esMesAnterior AndAlso UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso ObjFactura.CveMoneda = 2 Then
Dim UltimaFluctuacion As ClsPaginas.MTipoCambioFluctuacion = ClsPaginas.GlobalTipoCambioUltimaFluctuacion(Now)
If UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso UltimaFluctuacion IsNot Nothing Then
- If UltimaFluctuacion.FechaFluctuacion <= Now Then
+ If UltimaFluctuacion.FechaFluctuacion <= FechaCancelacion Then
TCCliente = UltimaFluctuacion.TCFluctuacion
TCFluctuacion = UltimaFluctuacion.TCFluctuacion
End If
diff --git a/Bancos/FluctuacionCambiaria.aspx.vb b/Bancos/FluctuacionCambiaria.aspx.vb
index 48bb923cc..47361b78d 100644
--- a/Bancos/FluctuacionCambiaria.aspx.vb
+++ b/Bancos/FluctuacionCambiaria.aspx.vb
@@ -451,7 +451,13 @@ Partial Class Bancos_FluctuacionCambiaria
End If
Next
- Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 1, CveBitacora, UsuarioActual.CveEmpresa)
+ If Not ErrorRegistrar AndAlso Not Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 1, CveBitacora, UsuarioActual.CveEmpresa) Then
+ ErrorRegistrar = True
+ End If
+
+ If Not ErrorRegistrar AndAlso Not Conta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual) Then
+ ErrorRegistrar = True
+ End If
End If
@@ -529,10 +535,11 @@ Partial Class Bancos_FluctuacionCambiaria
End If
Next
- If Not ErrorRegistrar Then
- If Not Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 2, CveBitacora, UsuarioActual.CveEmpresa) Then
- ErrorRegistrar = True
- End If
+ If Not ErrorRegistrar AndAlso Not Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 2, CveBitacora, UsuarioActual.CveEmpresa) Then
+ ErrorRegistrar = True
+ End If
+ If Not ErrorRegistrar AndAlso Not Conta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual) Then
+ ErrorRegistrar = True
End If
End If
@@ -631,7 +638,10 @@ Partial Class Bancos_FluctuacionCambiaria
Next
- If Not Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 3, HdnCveFluctuacionBitacora.Value.ToEntero, UsuarioActual.CveEmpresa) Then
+ If Not ErrorRegistrar AndAlso Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 3, HdnCveFluctuacionBitacora.Value.ToEntero, UsuarioActual.CveEmpresa) Then
+ ErrorRegistrar = True
+ End If
+ If Not ErrorRegistrar AndAlso Not Conta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual) Then
ErrorRegistrar = True
End If
@@ -723,10 +733,12 @@ Partial Class Bancos_FluctuacionCambiaria
ErrorRegistrar = True
Exit For
End If
-
Next
- If Not Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 4, HdnCveFluctuacionBitacora.Value.ToEntero, UsuarioActual.CveEmpresa) Then
+ If Not ErrorRegistrar AndAlso Not Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 4, HdnCveFluctuacionBitacora.Value.ToEntero, UsuarioActual.CveEmpresa) Then
+ ErrorRegistrar = True
+ End If
+ If Not ErrorRegistrar AndAlso Not Conta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual) Then
ErrorRegistrar = True
End If
@@ -809,22 +821,13 @@ Partial Class Bancos_FluctuacionCambiaria
End If
Next
- Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 5, CveBitacora, UsuarioActual.CveEmpresa)
+ If Not ErrorRegistrar AndAlso Not Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 5, CveBitacora, UsuarioActual.CveEmpresa) Then
+ ErrorRegistrar = True
+ End If
+ If Not ErrorRegistrar AndAlso Not Conta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual) Then
+ ErrorRegistrar = True
+ End If
-
- If Not ErrorRegistrar Then
-
- If Conta.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then
- If Conta.ValorPolizaDescuadre > 0 Then
- ErrorRegistrar = True
- GuardaLogAD($"Banc/FluctuaA | Error:{Conta.MensajePolizaDescuadre} Diferencia:{Conta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
- End If
- Else
- Alert("No se pudo validar la prepoliza de cuadre.", TipoMensaje.MsgAdvertencia)
- End If
-
- End If
-
If Not ErrorRegistrar Then
Conta.Commit()
BtnGeneraAcreedores.Visible = False
@@ -896,7 +899,12 @@ Partial Class Bancos_FluctuacionCambiaria
End If
Next
- Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 6, CveBitacora, UsuarioActual.CveEmpresa)
+ If Not ErrorRegistrar AndAlso Not Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 6, CveBitacora, UsuarioActual.CveEmpresa) Then
+ ErrorRegistrar = True
+ End If
+ If Not ErrorRegistrar AndAlso Not Conta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual) Then
+ ErrorRegistrar = True
+ End If
If Not ErrorRegistrar Then
Conta.Commit()
@@ -981,32 +989,21 @@ Partial Class Bancos_FluctuacionCambiaria
ErrorRegistrar = True
End If
End If
- Next
-
- Dim SeContabilizo As Boolean = False
-
- Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
- If AutoConta Then
- If Conta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
- SeContabilizo = True
- Else
- ErrorRegistrar = True
- Alert("Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError)
- End If
+ Next
+
+ If Not ErrorRegistrar AndAlso Not Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 7, HdnCveFluctuacionBitacora.Value.ToEntero, UsuarioActual.CveEmpresa) Then
+ ErrorRegistrar = True
+ End If
+ If Not ErrorRegistrar AndAlso Not Conta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual) Then
+ ErrorRegistrar = True
End If
- If Not ErrorRegistrar Then
-
- If Not Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 7, HdnCveFluctuacionBitacora.Value.ToEntero, UsuarioActual.CveEmpresa) Then
- ErrorRegistrar = True
- End If
-
- If Not ErrorRegistrar Then
- Conta.Commit()
- ' ObjContPaq.Commit()
- Alert(String.Format("La Fluctuación se ha generado Ver PrePóliza", CvePrePoliza), TipoMensaje.MsgInformacion)
- CargaDatosBancosCuentas()
- End If
+ If Not ErrorRegistrar Then
+ Conta.Commit()
+ ' ObjContPaq.Commit()
+ Alert(String.Format("La Fluctuación se ha generado Ver PrePóliza", CvePrePoliza), TipoMensaje.MsgInformacion)
+ CargaDatosBancosCuentas()
+
Else
Conta.RollBack()
' ObjContPaq.Dispose()
@@ -1145,27 +1142,17 @@ Partial Class Bancos_FluctuacionCambiaria
End If
Else
'actualizar el TC del IE, al nuevo TC de la fluctuación
- Banco.UpdateBancosTipoCambioValuacion(TCCierreFluctuacion, gvr.DataKey("CveIE").ToEntero, UsuarioActual.CveEmpresa)
-
+ Banco.UpdateBancosTipoCambioValuacion(TCCierreFluctuacion, gvr.DataKey("CveIE").ToEntero, UsuarioActual.CveEmpresa)
+
End If
Next
- If Not ErrorRegistrar Then
-
- 'Inicio auto conta
- Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
- If AutoConta Then
-
- If Conta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
- Else
- Alert("Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError)
- End If
- End If
-
- ' If ObjContPaq IsNot Nothing Then ObjContPaq.Commit()
- 'Fin autoconta
- Conta.Commit()
+ If Not ErrorRegistrar AndAlso Not Conta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual) Then
+ ErrorRegistrar = True
+ End If
+ If Not ErrorRegistrar Then
+ Conta.Commit()
Alert(String.Format("La Fluctuación se ha generado Ver Póliza", CvePrePoliza), TipoMensaje.MsgInformacion)
Else
Conta.RollBack()
diff --git a/Bancos/PopIECompras.aspx.vb b/Bancos/PopIECompras.aspx.vb
index 9c608cf81..835763b90 100644
--- a/Bancos/PopIECompras.aspx.vb
+++ b/Bancos/PopIECompras.aspx.vb
@@ -1607,7 +1607,7 @@ Partial Class Bancos_PopIECompras
End Select
Dim ObjConta As ClsContPAQi = Nothing
- If MsgError = "" AndAlso ObjMov.ValidacionesPrePoliza(CvePrePoliza, 5, UsuarioActual) Then
+ If MsgError = "" AndAlso ObjMov.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=5) Then
If ObjMov.ValorPolizaDescuadre > 0 Then
MsgError = ObjMov.MensajePolizaDescuadre
GuardaLogAD($"Bancos/PopIECompras | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
diff --git a/Bancos/ProveedoresAbonar.aspx b/Bancos/ProveedoresAbonar.aspx
index ea7236cd2..d097419c2 100644
--- a/Bancos/ProveedoresAbonar.aspx
+++ b/Bancos/ProveedoresAbonar.aspx
@@ -348,6 +348,7 @@
+
diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb
index 152534d86..79c04fe66 100644
--- a/Bancos/ProveedoresAbonar.aspx.vb
+++ b/Bancos/ProveedoresAbonar.aspx.vb
@@ -264,6 +264,10 @@ Partial Class Bancos_ProveedoresAbonar
ViewState("IdCtaContRetISR") = 0
End If
+ 'temporal
+ If UsuarioActual.CveUsuario.Contiene(1803, 100) Then
+ ChkNoValidaSAT.Visible = True
+ End If
IdCuenta = 0
PermiteModificarImporte = True
@@ -666,7 +670,10 @@ Partial Class Bancos_ProveedoresAbonar
End If
Dim ImporteSeleccionado As Decimal = 0
- If Not UsuarioActual.Empresa.Funcionalidad(529) = "1" Then
+ Dim ValidaSAT As Boolean = True
+ If UsuarioActual.Empresa.Funcionalidad(529) = "1" OrElse ChkNoValidaSAT.Checked Then ValidaSAT = False
+
+ If ValidaSAT Then
Dim Validada As Boolean = False
Dim MsgValidadas As New StringBuilder
Dim Valida As New ClsValidaCFDi()
@@ -965,16 +972,14 @@ Partial Class Bancos_ProveedoresAbonar
'Conta ContPAQ
If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError = "" Then
- If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjConta) Then
- ' Alert(alertaContabilizacion, ModExtensiones.TipoMensaje.MsgInformacion)
+ 'If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjConta) Then
+ If ObjMov.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, ObjConta:=ObjConta) Then
IDPoliza = ObjMov.ContaIdPoliza
Else
Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError)
MsgError = "Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico"
End If
-
End If
-
Else
MsgError = "No se pudo insertar la póliza"
End If
@@ -1692,7 +1697,7 @@ Partial Class Bancos_ProveedoresAbonar
Next
If MsgError.Trim.Length = 0 AndAlso CvePrePoliza > 0 Then
- If MsgError = "" AndAlso ObjConta.ValidacionesPrePoliza(CvePrePoliza, 5, UsuarioActual) Then
+ If MsgError = "" AndAlso ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, 5) Then
If ObjConta.ValorPolizaDescuadre > 0 Then
MsgError = ObjConta.MensajePolizaDescuadre + " " + ObjConta.ValorDiferencia
GuardaLogAD($"Bancos/ProveedoresAbonar | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
diff --git a/Bancos/RepEgresosSinComprobante.aspx b/Bancos/RepEgresosSinComprobante.aspx
index e8ca5c719..7091a53bf 100644
--- a/Bancos/RepEgresosSinComprobante.aspx
+++ b/Bancos/RepEgresosSinComprobante.aspx
@@ -46,70 +46,57 @@
-
-
-
-
-
-
-
-
-
Proveedor:
-
-
-
-
-
-
Personal:
-
-
-
-
-
-
-
-
F.I.:
-
-
+
+
+
+
+
+
+
+
+
+
Proveedor:
+
+
+
+
+ Fecha Inicio:
+
+
+
+
-
-
-
-
-
-
-
-
F.F.:
-
-
+
+
+
+
+
+
+
+
+ Fecha Fin:
+
+
+
+
-
-
-
-
-
-
-
-
Con Saldo:
-
-
-
Movimiento:
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
@@ -142,7 +129,16 @@
+
Con Saldo:
+
+
+
Movimiento.:
+
+
+
+
+
diff --git a/Bancos/RepEgresosSinComprobante.aspx.vb b/Bancos/RepEgresosSinComprobante.aspx.vb
index 411c89859..4b23ae67d 100644
--- a/Bancos/RepEgresosSinComprobante.aspx.vb
+++ b/Bancos/RepEgresosSinComprobante.aspx.vb
@@ -52,9 +52,14 @@ Partial Class Bancos_RepEgresosSinComprobante
DdlTipoTransaccion.DataSource = GlobalDTTipoTransacciones.FiltraParametros("Tipo='Egs'")
DdlTipoTransaccion.DataBind()
- DdlUsuarioSolicito.DataSource = GlobalDTUsuarios.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa), "Nombre")
+ DdlUsuarioSolicito.DataSource = GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("", "Nombre")
DdlUsuarioSolicito.DataBind()
+ DdlProveedores.setEsWebService(True)
+ DdlProveedores.Attributes.Add("data-metodo", "getproveedores")
+ DdlProveedores.SelectedText = "Todos"
+ DdlProveedores.SelectedValue = "-1"
+
CargaDatos()
End If
@@ -67,7 +72,7 @@ Partial Class Bancos_RepEgresosSinComprobante
If txtFechaI.Text <> "" Then FechaI = txtFechaI.Text Else FechaI = "-1"
If txtFechaF.Text <> "" Then FechaF = txtFechaF.Text Else FechaF = "-1"
- If Mov.GetEgresosSinComprobar(FechaI, FechaF, DdlProveedores.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero, DdlProveedoresClasificaciones.SelectedValue.ToEntero, DdlUsuarioRegistro.SelectedValue.ToEntero, DdlUsuarioResponsable.SelectedValue.ToEntero, DdlMoneda.SelectedValue.ToEntero, If(ChkSaldo.Checked, 1, 0), UsuarioActual.CveEmpresa, DdlTipoTransaccion.SelectedValue.ToEntero, DdlUsuarioSolicito.SelectedValue.ToEntero) Then
+ If Mov.GetEgresosSinComprobar(FechaI, FechaF, DdlProveedores.SelectedValue.ToEntero, -1, DdlProveedoresClasificaciones.SelectedValue.ToEntero, DdlUsuarioRegistro.SelectedValue.ToEntero, DdlUsuarioResponsable.SelectedValue.ToEntero, DdlMoneda.SelectedValue.ToEntero, If(ChkSaldo.Checked, 1, 0), UsuarioActual.CveEmpresa, DdlTipoTransaccion.SelectedValue.ToEntero, DdlUsuarioSolicito.SelectedValue.ToEntero) Then
DtDatos = Mov.DtResultados
CargaGrid("")
CargaGridPersonal("")
@@ -77,18 +82,9 @@ Partial Class Bancos_RepEgresosSinComprobante
Mov.Dispose()
- End Sub
- Protected Sub BtnCargarProveedores_Click(sender As Object, e As System.EventArgs) Handles BtnCargarProveedores.Click
- DdlProveedores.CssClass += " select2me"
- DdlProveedores.Items.Clear()
- DdlProveedores.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
-
- DdlProveedores.DataBind()
- DdlProveedores.Items.Insert(0, New ListItem("Todos", "-1"))
- DdlProveedores.Attributes.Remove("onclick")
-
- End Sub
-
+ End Sub
+
+
Protected Sub GvESC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvESC.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
@@ -209,8 +205,8 @@ Partial Class Bancos_RepEgresosSinComprobante
For Each gr As GridViewRow In GvESC.Rows
If gr.FCCheckBox("Chk").Checked Then
Dim IdCtaContable As Integer = 0
- Dim TipoMovtoOtIngresos As Boolean = True
- Dim TipoMovtoConcepto As Boolean = False
+ Dim TipoMovtoOtIngresos As Boolean = False
+ Dim TipoMovtoConcepto As Boolean = True
Dim CveConceptoContable As Integer
Select Case gr.DataKey("CveConceptoContable").ToEntero
diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx
index 8ff5dbd78..7fd632990 100644
--- a/Compras/Compras.aspx
+++ b/Compras/Compras.aspx
@@ -1045,7 +1045,7 @@
- %
+
@@ -4429,7 +4429,7 @@
-
+
<%----%>
<%--
@@ -4439,7 +4439,7 @@
-
+
<%--
@@ -4485,15 +4485,7 @@
-
-
-
-
-
-
-
-
-
+
@@ -4534,7 +4526,7 @@
-
+
diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb
index dc0f5f61a..226448db9 100644
--- a/Compras/Compras.aspx.vb
+++ b/Compras/Compras.aspx.vb
@@ -1149,7 +1149,6 @@ Partial Class Compras_Compras
End Set
End Property
-
Private Property UUIDSList As List(Of String)
Get
If ViewState("UUIDSList") Is Nothing Then
@@ -1163,8 +1162,6 @@ Partial Class Compras_Compras
ViewState("UUIDSList") = value
End Set
End Property
-
-
Private Property NumeroReembolsoOriginal As String
Get
If ViewState("NumeroReembolsoOriginal") Is Nothing Then
@@ -1227,6 +1224,9 @@ Partial Class Compras_Compras
If UsuarioActual.Empresa.Funcionalidad(117) <> "" Then
btnProrateo.Visible = True
End If
+ If UsuarioActual.Empresa.Funcionalidad(713) = "1" Then
+ divIEPSModal.Visible = True
+ End If
If UsuarioActual.Empresa.Funcionalidad(303) <> "" Then
btnProrateo2.Visible = True
@@ -2344,7 +2344,7 @@ Partial Class Compras_Compras
If OtrosImpuestos > 0 Or TrasladoIEPS > 0 Then
- If UsuarioActual.Empresa.Funcionalidad(713).ToEntero = 1 Then
+ If UsuarioActual.Empresa.Funcionalidad(713) = "1" Then
'Si tiene funcionalidad y es Acreedor se muestra modal
If CveTipoProveedor.Contiene(2, 3) Then ' Acreedor
RegistraScript("$('#ModalIEPS').modal({ backdrop: 'static', keyboard: false },'show');")
@@ -2416,8 +2416,8 @@ Partial Class Compras_Compras
HdnCompraSaldo.Value = TotalTemp.ToString
CompraSaldo = TotalTemp
- LblRetIVA.Text = If(RetIVATemp > 0, (TmpDT.MAX("RetIVAPorcentaje").ToDecimal() * 100).FormatoNumero(3), "")
- LblRetISR.Text = If(RetISRTemp > 0, (TmpDT.MAX("RetISRPorcentaje").ToDecimal() * 100).FormatoNumero(3), "")
+ 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)
@@ -2626,8 +2626,8 @@ Partial Class Compras_Compras
LblUsuarioCaptura.Text = dr("Usuario").ToString
LitFechCaptura.Text = dr("FechaIng").ToString.ToDate.ToShortDateString
LitFechCaptura.ToolTip = dr("FechaIng").ToString
- LblRetIVA.Text = If(dr("RetIVA").ToString.ToDecimal > 0, TmpDT.MAX("RetIVAPorcentaje").ToDecimal * 100, 0).ToString.FormatoNumero(3) '(If(SubTotal2 > 0, (RetencionIVA / SubTotal2), 0) * 100).FormatoNumero(3) + "%"
- LblRetISR.Text = If(dr("RetISR").ToString.ToDecimal > 0, TmpDT.MAX("RetISRPorcentaje").ToDecimal * 100, 0).ToString.FormatoNumero(3) '(If(SubTotal2 > 0, (RetencionISR / SubTotal2), 0) * 100).FormatoNumero(3)
+ LblRetIVA.Text = If(dr("RetIVA").ToString.ToDecimal > 0, TmpDT.MAX("RetIVAPorcentaje").ToDecimal * 100, 0).ToString.FormatoNumero(4) '(If(SubTotal2 > 0, (RetencionIVA / SubTotal2), 0) * 100).FormatoNumero(3) + "%"
+ LblRetISR.Text = If(dr("RetISR").ToString.ToDecimal > 0, TmpDT.MAX("RetISRPorcentaje").ToDecimal * 100, 0).ToString.FormatoNumero(4) '(If(SubTotal2 > 0, (RetencionISR / SubTotal2), 0) * 100).FormatoNumero(3)
If dr("TipoFactura").ToString <> "CFDi" Then LblTipoFact.Text = dr("TipoFactura").ToString : divTipoFactura.Visible = True
ViewState("CveFactura") = dr("CveFactura").ToString.ToEntero
ViewState("IdPoliza") = dr("IdPoliza").ToString.ToEntero
@@ -8080,7 +8080,7 @@ Partial Class Compras_Compras
End If
Else
- Alert("existe una diferencia de más de 0.05 entre el IVA de la compra y los detalles.", TipoMensaje.MsgAdvertencia)
+ Alert($"existe una diferencia de {DiferenciaIVas} entre el IVA de la compra y los detalles.", TipoMensaje.MsgAdvertencia)
Respuesta = False
End If
Else
@@ -8167,7 +8167,7 @@ Partial Class Compras_Compras
End If
Else
- Alert("existe una diferencia de más de 0.05 entre el RetIVA de la compra y los detalles.", TipoMensaje.MsgAdvertencia)
+ Alert($"existe una diferencia de {DiferenciaRetIVA} entre el RetIVA de la compra y los detalles.", TipoMensaje.MsgAdvertencia)
Respuesta = False
End If
Else
@@ -8257,7 +8257,7 @@ Partial Class Compras_Compras
End If
Else
- Alert("existe una diferencia de más de 0.05 entre el RetISR de la compra y los detalles.", TipoMensaje.MsgAdvertencia)
+ Alert($"existe una diferencia de {DiferenciaRetISR} entre el RetISR de la compra y los detalles.", TipoMensaje.MsgAdvertencia)
Respuesta = False
End If
Else
@@ -10561,7 +10561,7 @@ Partial Class Compras_Compras
TxtPrecio.Attributes.Add("onKeyUp ", "Recalcula();")
TxtCantidad.Attributes.Add("onKeyUp ", "Recalcula();")
TxtDescuentoModal.Attributes.Add("onKeyUp ", "Recalcula();")
- TxtOtrosGastos.Attributes.Add("onKeyUp ", "Recalcula();")
+
'ImgAmort.Attributes.Add("onclick", "javascript:$('#DivDescP').show(1000); PosicionaObjeto(this.id,'DivDescP');") ' $get('LblTitulo1').style.display = 'none'; $get('LblTituloTipo1').style.display = 'none'; $get('LblTituloTipo2').style.display = ''; $get('LblPrecio1').style.display = 'none'; $get('LblTotalPS1').style.display = 'none'; $get('LblSubTotal1').style.display = 'none'; $get('LblAmort').style.display = ''; $get('BtnAplicarDescP').style.display = 'none'; $get('BtnAplicarDescG').style.display = ''; $get('TrMotivoDescuento').style.display = 'none';")
'If um.GetUnidadesMedida() Then
@@ -16286,8 +16286,8 @@ Partial Class Compras_Compras
UpAnticipos.Update()
End If
- LblRetIVA.Text = TmpDT.MAX("RetIVAPorcentaje").ToString '(If(SubTotal2 > 0, (RetencionIVA / SubTotal2), 0) * 100).FormatoNumero(3) + "%"
- LblRetISR.Text = TmpDT.MAX("RetISRPorcentaje").ToString '(If(SubTotal2 > 0, (RetencionISR / SubTotal2), 0) * 100).FormatoNumero(3)
+ 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 = Total.ToString.FormatoNumero(2)
@@ -16569,7 +16569,6 @@ Partial Class Compras_Compras
TxtRetISRModal.Text = ""
TxtIEPSModal.Text = ""
TxtDescuentoModal.Text = ""
- TxtOtrosGastos.Text = ""
DivAddProductoAliasPS.Visible = False
@@ -16642,12 +16641,7 @@ Partial Class Compras_Compras
DdlProyecto.SelectedValueExist("-1")
End If
-
CargaSubProyecto()
-
-
- 'DdlProyecto.SelectedValueExist(GvRow.DataKey("CveProyecto"))
-
DdlSubProyecto.SelectedValueExist(GvRow.DataKey("CveSubProyecto"))
DdlSubProyecto_SelectedIndexChanged(Nothing, Nothing)
@@ -16662,7 +16656,6 @@ Partial Class Compras_Compras
If PS("IVA").ToString.ToEntero() <> -1 Then
' DdlIVA.Enabled = False
Else
-
'DdlIVA.Enabled = If(CveCompra > 0 Or CveFactura > 0 Or OCVinculada, False, True)
End If
End If
@@ -16682,19 +16675,15 @@ Partial Class Compras_Compras
- TxtRetIVAModal.Text = FormatoNumero(GvRow.DataKey("RetIVAPorcentaje").ToDouble * 100, 2)
- TxtRetISRModal.Text = FormatoNumero(GvRow.DataKey("RetISRPorcentaje").ToDouble * 100, 2)
- TxtIEPSModal.Text = FormatoNumero(GvRow.DataKey("IEPSPSPorcentaje").ToDouble * 100, 2)
+ TxtRetIVAModal.Text = FormatoNumero(GvRow.DataKey("RetIVAPorcentaje").ToDouble * 100, 6)
+ TxtRetISRModal.Text = FormatoNumero(GvRow.DataKey("RetISRPorcentaje").ToDouble * 100, 6)
+ TxtIEPSModal.Text = FormatoNumero(GvRow.DataKey("IEPSPSPorcentaje").ToDouble * 100, 6)
ViewState("RetIVA") = GvRow.DataKey("RetIVAPorcentaje").ToDouble
ViewState("RetISR") = GvRow.DataKey("RetISRPorcentaje").ToDouble
- 'TxtRetIVAModal.Text = FormatoNumero(ViewState("RetIVA").ToString().ToDouble * 100, 0)
- 'TxtRetISRModal.Text = FormatoNumero(ViewState("RetISR").ToString().ToDouble * 100, 0)
-
- TxtPrecio.Text = GvRow.DataKey("PU").FormatoNumero(6)
- TxtDescuentoModal.Text = GvRow.DataKey("Descuento").FormatoNumero(6)
- TxtOtrosGastos.Text = GvRow.DataKey("OtrosGastos").FormatoNumero
+ TxtPrecio.Text = GvRow.DataKey("PU").ToDecimal.ToString("#,##0.00####")
+ TxtDescuentoModal.Text = GvRow.DataKey("Descuento").ToDecimal.ToString("#,##0.00####")
LblTotalPS.Text = GvRow.DataKey("Total").FormatoNumero
'FUNCIONALIDAD DE SEGUIR AGREGANDO (NO CERRAR MODAL)
@@ -16887,14 +16876,14 @@ Partial Class Compras_Compras
End If
If TxtIEPSModal.Text = "" Then
- TxtIEPSModal.Text = FormatoNumero(PS("IEPSPorcentaje").ToString.ToDecimal * 100, 2)
+ TxtIEPSModal.Text = FormatoNumero(PS("IEPSPorcentaje").ToString.ToDecimal * 100, 6)
End If
ViewState("IEPSPSIVA") = If(PS("IEPSGrabaIVA").ToString = "True", PS("IEPSPorcentaje").ToString.ToDouble, 0)
'TxtIVAModal.Text = FormatoNumero(ViewState("IVAPS").ToString().ToDouble * 100, 0)
- TxtRetIVAModal.Text = FormatoNumero(ViewState("RetIVA").ToString().ToDouble * 100, 2)
- TxtRetISRModal.Text = FormatoNumero(ViewState("RetISR").ToString().ToDouble * 100, 2)
+ TxtRetIVAModal.Text = FormatoNumero(ViewState("RetIVA").ToString().ToDouble * 100, 6)
+ TxtRetISRModal.Text = FormatoNumero(ViewState("RetISR").ToString().ToDouble * 100, 6)
If (CveFactura > 0 Or CveCompra > 0) And TxtIEPS.Text.ToDecimal = 0 And PS("IEPSPorcentaje").ToString.ToDecimal > 0 Then
@@ -16988,7 +16977,7 @@ Partial Class Compras_Compras
End Select
- Dim Total As Decimal = (TxtCantidad.Text.ToDecimal * TxtPrecio.Text.ToDecimal) - TxtDescuentoModal.Text.ToDecimal + TxtOtrosGastos.Text.ToDecimal
+ Dim Total As Decimal = (TxtCantidad.Text.ToDecimal * TxtPrecio.Text.ToDecimal) - TxtDescuentoModal.Text.ToDecimal
If UsuarioActual.Empresa.Funcionalidad(532) = "1" Then
Dim ObjCon As New ClsContratos
@@ -17115,7 +17104,7 @@ Partial Class Compras_Compras
End If
AddPS(TxtCantidad.Text.Trim.ToDecimal, ddlUM.SelectedValue.ToEntero, ddlUM.SelectedItem.Text, DdlClasificacion.SelectedValue.ToEntero, DdlClasificacion.SelectedItem.Text, DdlPS.SelectedValue.ToEntero, DdlPS.SelectedText, HdnTipoPS.Value.ToEntero,
DdlSubProyecto.SelectedValue.ToString, DdlSubProyecto.SelectedItem.Text, DdlProyecto.SelectedItem.Text, DdlProyecto.SelectedValue.ToString, TxtObsPS.Text.Trim, TxtPrecio.Text.Trim.ToDecimal, Total, IVA,
- TxtRetIVAModal.Text.ToDecimal / 100, TxtRetISRModal.Text.ToDecimal / 100, TxtIEPSModal.Text.ToDecimal / 100, 0, TxtDescuentoModal.Text.ToDecimal, OtrosGastos:=TxtOtrosGastos.Text.ToDecimal, CveTipoGasto:=DdlTipoGasto.SelectedValue.ToEntero, TipoGasto:=DdlTipoGasto.SelectedItem.Text,
+ TxtRetIVAModal.Text.ToDecimal / 100, TxtRetISRModal.Text.ToDecimal / 100, TxtIEPSModal.Text.ToDecimal / 100, 0, TxtDescuentoModal.Text.ToDecimal, OtrosGastos:=0, CveTipoGasto:=DdlTipoGasto.SelectedValue.ToEntero, TipoGasto:=DdlTipoGasto.SelectedItem.Text,
NoDeducible:=ChkEsNoDeduciblePS.Checked, CveSATPS:=SATClavePS, CveContratoDetalle:=CveContratoDetalle,
CveCultivoCuadroDetalle:=If(DdlCultivosCuadro.SelectedValue.ToEntero > 0, DdlCultivosCuadro.SelectedValue.ToEntero, -1), TemporadaCuadro:=If(DdlCultivosCuadro.SelectedValue.ToEntero > 0, DdlCultivosCuadro.SelectedItem.Text, ""))
@@ -17426,8 +17415,7 @@ Partial Class Compras_Compras
Dim Cantidad = DrPS("Cantidad").ToString.ToDouble
Dim PU = DrPS("PU").ToString.ToDouble
Dim Descuento = DrPS("Descuento").ToString.ToDouble
- Dim OtrosGastos = DrPS("OtrosGastos").ToString.ToDouble
- Dim Total = (Cantidad * PU) - Descuento + OtrosGastos
+ Dim Total = (Cantidad * PU) - Descuento
DrPS("NoDeducible") = ChkEsNoDeduciblePS.Checked
Dim ActualizarIva As Boolean = False
@@ -17435,25 +17423,20 @@ Partial Class Compras_Compras
ActualizarIva = True
End If
-
- If Cantidad <> TxtCantidad.Text.Trim.ToDouble OrElse PU <> TxtPrecio.Text.Trim.ToDouble OrElse Descuento <> TxtDescuentoModal.Text.ToDouble OrElse OtrosGastos <> TxtOtrosGastos.Text.ToDouble Then
+ If Cantidad <> TxtCantidad.Text.Trim.ToDouble OrElse PU <> TxtPrecio.Text.Trim.ToDouble OrElse Descuento <> TxtDescuentoModal.Text.ToDouble Then
Cantidad = TxtCantidad.Text.Trim.ToDouble
PU = TxtPrecio.Text.Trim.ToDouble
Descuento = TxtDescuentoModal.Text.ToDouble
- OtrosGastos = TxtOtrosGastos.Text.ToDouble
- Total = (Cantidad * PU) - Descuento + OtrosGastos
+ Total = (Cantidad * PU) - Descuento
DrPS("Cantidad") = Cantidad
DrPS("PU") = PU
DrPS("Descuento") = Descuento
- DrPS("OtrosGastos") = OtrosGastos
+ DrPS("OtrosGastos") = 0
DrPS("Total") = Total
AplicaCalculaTotales = True
End If
-
-
-
'PS - CLASIFICACION
If DdlPS.SelectedValue.ToEntero > 0 Then
@@ -17532,10 +17515,6 @@ Partial Class Compras_Compras
DrPS("CveCultivoCuadroDetalle") = If(DdlCultivosCuadro.SelectedValue.ToEntero > 0, DdlCultivosCuadro.SelectedValue.ToEntero, -1)
DrPS("TemporadaCuadro") = If(DdlCultivosCuadro.SelectedValue.ToEntero > 0, DdlCultivosCuadro.SelectedItem.Text, "")
-
-
-
-
'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
diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb
index fd381693d..931cf3ea0 100644
--- a/Compras/PopUpVerFactura.aspx.vb
+++ b/Compras/PopUpVerFactura.aspx.vb
@@ -13,7 +13,6 @@ Imports Stimulsoft.Report.Web
Partial Class PopUpVerFactura
Inherits ClsPaginas
- Private Shared missing As Object = System.Reflection.Missing.Value
#Region " PROPIEDADES "
Public Property DtMovimientos() As DataTable
@@ -6818,6 +6817,7 @@ Partial Class PopUpVerFactura
Dim DtDetalle As New DataTable
Dim CveTipoPolizaImp As Integer
Dim FolioPoliza As String
+ Dim Fecha As Date
Dim ConceptoPolizaImp As String
Dim CveMonedaImp As Integer
Dim TipoPolImp As String
@@ -6828,6 +6828,7 @@ Partial Class PopUpVerFactura
CveTipoPolizaImp = drp("CveTipoPoliza").ToString.ToEntero
ConceptoPolizaImp = drp("Concepto").ToString
FolioPoliza = drp("FolioPoliza").ToString
+ Fecha = drp("Fecha").ToString.ToDate
CveMonedaImp = drp("CveMoneda").ToString.ToEntero
Dim TipoPolizaString As String = If(CveTipoPolizaImp = 1, "I", If(CveTipoPolizaImp = 2, "E", "D")).ToString
@@ -6856,35 +6857,37 @@ Partial Class PopUpVerFactura
ObjConta.Dispose()
Else
RutaReporte = RutaFormatoReporte("Polizas.rdlc")
+ 'If ObjConta.GetPrePolizasImpresion(UsuarioActual.CveEmpresa, Fecha, Fecha, CVePrePoliza:=CvePrePoliza) Then
If ObjConta.GetPrePolizasDetalle(CvePrePoliza, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
- Dim dr As DataRow
+ 'DtDetalle = ObjConta.DtResultados
+ 'Dim dr As DataRow
DtDetalle = ObjConta.DtResultados.FiltraParametros("Contabilizable = 1", "Orden")
- dr = DtDetalle.Rows(0)
+ 'dr = DtDetalle.Rows(0)
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
- params.Add(New ReportParameter("TipoPoliza", dr("TipoPoliza").ToString))
- params.Add(New ReportParameter("Finicio", dr("Fecha").ToString.ToDate.ToShortDateString))
- params.Add(New ReportParameter("FFin", dr("Fecha").ToString.ToDate.ToShortDateString))
- params.Add(New ReportParameter("Numero", dr("FolioPoliza").ToString))
+ params.Add(New ReportParameter("TipoPoliza", TipoPolImp))
+ params.Add(New ReportParameter("Finicio", Fecha.ToShortDateString))
+ params.Add(New ReportParameter("FFin", Fecha.ToShortDateString))
+ params.Add(New ReportParameter("Numero", FolioPoliza))
params.Add(New ReportParameter("Moneda", If(CveMonedaImp = 2, "Dolar", "Peso Mexicano")))
params.Add(New ReportParameter("CodigoPostal", ""))
If UsuarioActual.CveEmpresa.Contiene(141) Then
- params.Add(New ReportParameter("Fecha", dr("Fecha").ToString.ToDate.ToString("dd/MM/yyyy hh:mm:ss")))
+ params.Add(New ReportParameter("Fecha", Fecha.ToString("dd/MM/yyyy hh:mm:ss")))
Else
- params.Add(New ReportParameter("Fecha", dr("Fecha").ToString.ToDate.ToShortDateString))
+ params.Add(New ReportParameter("Fecha", Fecha.ToShortDateString))
End If
If UsuarioActual.CveEmpresa.Contiene(119, 141) Then
- params.Add(New ReportParameter("UsuarioRegistro", GlobalDTUsuarios(dr("CveUsuario").ToString.ToEntero).FiltroPrimeroValor("Nombre")))
+ params.Add(New ReportParameter("UsuarioRegistro", GlobalDTUsuarios(drp("CveUsuario").ToString.ToEntero).FiltroPrimeroValor("Nombre")))
End If
If UsuarioActual.CveEmpresa.Contiene(140, 141) Then
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
End If
End If
ObjConta.Dispose()
- End If
+ End If
- ImprimirPDF(RutaReporte, DtDetalle, params, $"P{TipoPolizaString}{FolioPoliza}", Formato:="PDF")
+ ImprimirPDF(RutaReporte, DtDetalle, params, $"P{TipoPolizaString}{FolioPoliza}", Formato:="PDF")
Else
Alert("El documento solicitado no existe, favor de revisar su búsqueda.", TipoMensaje.MsgAdvertencia)
diff --git a/Contabilidad/CatCuentas.aspx.vb b/Contabilidad/CatCuentas.aspx.vb
index e29f87d00..04346da23 100644
--- a/Contabilidad/CatCuentas.aspx.vb
+++ b/Contabilidad/CatCuentas.aspx.vb
@@ -29,7 +29,8 @@ Partial Class Contabilidad_CatCuentas
If Not Page.IsPostBack Then
If Not UsuarioActual.CveEmpresa.Contiene(13, 83) Then
- Server.Transfer("/Contabilidad2/CatCuentas.aspx")
+ Response.Redirect("/Contabilidad2/CatCuentas.aspx")
+ Exit Sub
End If
If UsuarioActual.Empresa.UsaContabilidad Then
diff --git a/Contabilidad/RegPrePolizaS.aspx b/Contabilidad/RegPrePolizaS.aspx
index 4ba7be742..26240fae6 100644
--- a/Contabilidad/RegPrePolizaS.aspx
+++ b/Contabilidad/RegPrePolizaS.aspx
@@ -107,14 +107,11 @@
-
-
-
-
+
@@ -127,13 +124,8 @@
-
-
-
-
-
@@ -147,9 +139,7 @@
-
-
@@ -168,16 +158,10 @@
-
-
-
-
-
-
@@ -188,13 +172,10 @@
-
-
-
-
+
@@ -232,17 +213,13 @@
-
-
-
Si
-
@@ -258,11 +235,8 @@
-
-
-
-
+
@@ -290,7 +264,6 @@
-
@@ -526,8 +499,9 @@
TC
-
+
+ Cargo
@@ -555,17 +529,11 @@
-
-
-
-
-
-
-
+
-
+
diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb
index 90208a628..169028c41 100644
--- a/Contabilidad/RegPrePolizaS.aspx.vb
+++ b/Contabilidad/RegPrePolizaS.aspx.vb
@@ -475,7 +475,7 @@ Partial Class ContabilidadC_RegPrePolizaS
CargaCuentasContables()
End If
- ObjContabilidad.GetContabilizacionDiarioDetalle(CvePrePoliza)
+ ObjContabilidad.GetContabilizacionDiarioDetalle(CvePrePoliza, UsuarioActual.CveEmpresa)
DtMovimientos = ObjContabilidad.DtResultados.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}")
If dr("Modulo").ToString.Contiene("Banc/FluctuaA", "Banc/FluctuaC", "Banc/FluctuaV", "Banc/FluctuaFilial", "Banc/FluctuaAD") Then
@@ -1181,7 +1181,6 @@ Partial Class ContabilidadC_RegPrePolizaS
Try
-
Dim Retorno As Boolean = ObjContabilidad.UpdatePrePoliza(MinFecha, -1, DdlTipoPoliza.SelectedValue.ToEntero, -1, CvePrePoliza, UsuarioActual.CveEmpresa, Concepto:=TxtConcepto.Text, FechaPoliza:=TxtFechaDocumento.Text.ToDate, CveUsuarioModifico:=UsuarioActual.CveUsuario)
If Retorno Then
@@ -1846,8 +1845,6 @@ Partial Class ContabilidadC_RegPrePolizaS
GvPrePoliza.DataBind()
UpPrePoliza.Update()
GvPrePoliza.Visible = True
-
- GvPrePoliza.Columns(11).Visible = True
GvPrePoliza.Rows(IndiceGrid).FCCheckBox("chkModificado").Checked = True
TxtTotalCargos.Text = DtMovimientos.SUMD("Cargo").ToString.FormatoNumero
@@ -2770,7 +2767,7 @@ Partial Class ContabilidadC_RegPrePolizaS
CargaCuentasContables()
End If
- ObjContabilidad.GetContabilizacionDiarioDetalle(CvePrePolizaOrigen)
+ ObjContabilidad.GetContabilizacionDiarioDetalle(CvePrePolizaOrigen, UsuarioActual.CveEmpresa)
DtMovimientos = ObjContabilidad.DtResultados.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}")
diff --git a/Contabilidad/RepIVA.aspx.cs b/Contabilidad/RepIVA.aspx.cs
index f8c0f1cde..87d51dbeb 100644
--- a/Contabilidad/RepIVA.aspx.cs
+++ b/Contabilidad/RepIVA.aspx.cs
@@ -85,10 +85,14 @@ public partial class Contabilidad_RepIVA : ClsPaginas
{
GvT.DataSource = ObjCont.DtResultados;
DtIVATrasladado = ObjCont.DtResultados;
- if (ObjCont.GetRepIVAAcumulado(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), Conciliado, 1, DdlCuenta.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
- {
- GvIEPSA.DataSource = ObjCont.DtResultados;
- DtIEPSA = ObjCont.DtResultados;
+
+ if (UsuarioActual.Empresa.Funcionalidad(713) == "1")
+ {
+ if (ObjCont.GetRepIVAAcumulado(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), Conciliado, 1, DdlCuenta.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
+ {
+ GvIEPSA.DataSource = ObjCont.DtResultados;
+ DtIEPSA = ObjCont.DtResultados;
+ }
}
if (ObjCont.GetRepIVAAcumulado(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), Conciliado, 2, DdlCuenta.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
diff --git a/General/SaldosIniciales.aspx.vb b/General/SaldosIniciales.aspx.vb
index 90bf0620b..864c9de7e 100644
--- a/General/SaldosIniciales.aspx.vb
+++ b/General/SaldosIniciales.aspx.vb
@@ -1605,6 +1605,15 @@ Partial Class General_SaldosIniciales
#Region "C L I E N T E S - F A C T U R A S"
+
+ Dim NoEncontrados As Integer = 0
+ Dim Encontrados As Integer = 0
+ Dim StrRFCNoencontrados As New StringBuilder
+ Dim drr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero("AplicaParaVenta = 1")
+ If drr Is Nothing Then
+ Alert("No existen productos para venta. favor de crear uno e intentar de nuevo", TipoMensaje.MsgAdvertencia)
+ Exit Sub
+ End If
Dim ObjVentas As New ClsVentas
Dim ObjConta As New ClsContabilidad(ObjVentas.IniciaTransacSQL())
Dim ObjIE As New ClsBancos(ObjVentas.IniciaTransacSQL())
@@ -1614,10 +1623,6 @@ Partial Class General_SaldosIniciales
'Dim ExisteVenta As Boolean = False
'Dim Contador As Integer = 0
DtClientes = GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1)
- Dim NoEncontrados As Integer = 0
- Dim Encontrados As Integer = 0
- Dim StrRFCNoencontrados As New StringBuilder
- Dim drr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero("AplicaParaVenta = 1")
Dim CvePS As Integer = drr("CvePS").ToString().ToEntero()
Dim CveUnidadMedida As Integer = drr("CveUnidadMedida").ToString().ToEntero()
Dim CveClasificacion As Integer = drr("CveClasificacion").ToString().ToEntero()
@@ -1712,7 +1717,7 @@ Partial Class General_SaldosIniciales
End If
CveVenta = ObjVentas.CveVenta
- If Not ObjVentas.AddVentaDetalle(CveVenta, CvePS, 1, CveUnidadMedida, SubTotal, IVA, SubTotal * PorcentajeIVA, "Saldo Inicial", 0, 0, Sucursal.ToEntero(), 0, PorcentajeIVA:=PorcentajeIVA, PorcentajeRetIVA:=PorcentajeRetIVA, ImporteRetIVA:=RetIVA) Then
+ If Not ObjVentas.AddVentaDetalle(CveVenta, CvePS, 1, CveUnidadMedida, SubTotal, IVA, SubTotal * PorcentajeIVA, "Saldo Inicial", 0, 0, Sucursal.ToEntero(), 0, PorcentajeIVA:=PorcentajeIVA, PorcentajeRetIVA:=PorcentajeRetIVA, ImporteRetIVA:=RetIVA, IEPS:=0) Then
ErrorVentas = True
Exit For
End If
diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb
index aebc628f5..79d6dd7ab 100644
--- a/Inventarios/EntregaAlmacen.aspx.vb
+++ b/Inventarios/EntregaAlmacen.aspx.vb
@@ -3128,13 +3128,11 @@ Partial Class Inventarios_EntregaAlmacen
cont += 1
Next
-
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ValorMultiplicador * TotalCosto, Serie, 68, Serie, Fecha, IdCtaContableAlmacen, -1, CveVenta:=CveVentaSurtir, CveCliente:=CveCliente, CveMovimientoAlmacen:=CveMovimiento, CveSubProyecto:=CveSubProyecto, ImporteMX:=ValorMultiplicador * TotalCosto) Then
+ Dim tCveSubProyectoAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacen.SelectedValue.ToEntero).FiltroPrimeroValor("CveSubProyecto").ToEntero()
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ValorMultiplicador * TotalCosto, Serie, 68, Serie, Fecha, IdCtaContableAlmacen, -1, CveVenta:=CveVentaSurtir, CveCliente:=CveCliente, CveMovimientoAlmacen:=CveMovimiento, CveSubProyecto:=tCveSubProyectoAlmacen, ImporteMX:=ValorMultiplicador * TotalCosto) Then
ErrorMovInv = True
End If
-
-
If Not ErrorMovInv AndAlso ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then
If ObjConta.ValorPolizaDescuadre > 0 Then
GuardaLogAD($"Inventario/EntregaAlmacen | Error{ObjConta.MensajePolizaDescuadre} Diferencia{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
@@ -3142,8 +3140,6 @@ Partial Class Inventarios_EntregaAlmacen
End If
End If
-
-
Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
If AutoConta And Not ErrorMovInv Then
diff --git a/Inventarios/InventarioFisico.aspx b/Inventarios/InventarioFisico.aspx
index 25fb1c7ac..ab41787cf 100644
--- a/Inventarios/InventarioFisico.aspx
+++ b/Inventarios/InventarioFisico.aspx
@@ -155,13 +155,13 @@