diff --git a/App_Code/ClsContPAQi.vb b/App_Code/ClsContPAQi.vb
index 860bd5889..aaa18df7f 100644
--- a/App_Code/ClsContPAQi.vb
+++ b/App_Code/ClsContPAQi.vb
@@ -6231,7 +6231,7 @@ Public Class ClsContPAQi
With SqlAdapter.SelectCommand.Parameters
.Add("@FechaI", SqlDbType.Date).Value = FechaI
- .Add("@FechaF", SqlDbType.Date).Value = FechaF
+ .Add("@FechaF", SqlDbType.DateTime).Value = String.Format("{0} 23:59:59", FechaF.ToShortDateString).ToDateTime
.Add("@IdCuentaPadre", SqlDbType.Int).Value = IdCuenta
.Add("@OpcionCuentas", SqlDbType.Int).Value = OpcionCuentas
.Add("@Tipo", SqlDbType.Int).Value = TipoMovtos
@@ -10585,7 +10585,7 @@ Public Class ClsContPAQi
StrSQL.Append(" ( ")
StrSQL.Append(" @IdCtaSup INT, ")
StrSQL.Append(" @FechaI DATE, ")
- StrSQL.Append(" @FechaF DATE, ")
+ StrSQL.Append(" @FechaF DATETIME, ")
StrSQL.Append(" @Tipo INT, ")
StrSQL.Append(" @SegmentoNegocio INT = -1 ")
StrSQL.Append(" ) ")
@@ -10776,7 +10776,7 @@ Public Class ClsContPAQi
StrSQL.Append(" ( ")
StrSQL.Append(" @IdCtaSup INT, ")
StrSQL.Append(" @FechaI DATE, ")
- StrSQL.Append(" @FechaF DATE, ")
+ StrSQL.Append(" @FechaF DATETIME, ")
StrSQL.Append(" @Tipo INT, ")
StrSQL.Append(" @SegmentoNegocio INT = -1 ")
StrSQL.Append(" ) ")
@@ -10883,7 +10883,7 @@ Public Class ClsContPAQi
StrSQL.Append(" ( ")
StrSQL.Append(" @IdCtaSup INT, ")
StrSQL.Append(" @FechaI DATE, ")
- StrSQL.Append(" @FechaF DATE, ")
+ StrSQL.Append(" @FechaF DATETIME, ")
StrSQL.Append(" @Tipo INT, ")
StrSQL.Append(" @SegmentoNegocio INT = -1 ")
StrSQL.Append(" ) ")
@@ -11140,7 +11140,7 @@ Public Class ClsContPAQi
StrSQL.Append(" ( ")
StrSQL.Append(" @IdCtaSup INT, ")
StrSQL.Append(" @FechaI DATE, ")
- StrSQL.Append(" @FechaF DATE, ")
+ StrSQL.Append(" @FechaF DATETIME, ")
StrSQL.Append(" @CveMoneda INT = 1 ")
StrSQL.Append(" ) ")
StrSQL.Append(" RETURNS FLOAT ")
diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb
index 02e5ca963..911f89a07 100644
--- a/App_Code/ClsContabilidad.vb
+++ b/App_Code/ClsContabilidad.vb
@@ -5542,6 +5542,27 @@ Public Class ClsContabilidad
Return Retorno
End Function
+
+ Public Function GetRepIVAComparativo(FechaInicio As Date, FechaFin As Date, CveUsuarioConsulta As Integer, Conciliado As Integer, CveEmpresa As Integer) As Boolean
+ Dim Retorno As Boolean = False
+ DataAdapter("PA_Conta_ImpuestosComparativo")
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
+ .Add("@FechaFin", SqlDbType.Date).Value = FechaFin
+ .Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
+ .Add("@Conciliado", SqlDbType.Int).Value = Conciliado
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+
+ End With
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al obtener el reporte de IVA Comparativo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+ Return Retorno
+ End Function
+
Public Function GetRepIVAAcumulado(FechaInicio As Date, FechaFin As Date, Conciliado As Integer, TipoImpuesto As Integer, CveUsuarioConsulta As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Conta_IVAAcumulado")
diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb
index 632aa983b..e124244e4 100644
--- a/App_Code/ClsPaginas.vb
+++ b/App_Code/ClsPaginas.vb
@@ -192,20 +192,34 @@ Public Class ClsPaginas
Application("GlobalDTNomConceptos") = value
End Set
End Property
- Property GlobalDTTiposGastos(CveEmpresa As Integer) As DataTable
+ Property GlobalDTTiposGastos(CveEmpresa As Integer, Optional Estatus As Integer = 1) As DataTable
Get
+ Dim AppNombre As String = String.Format("GlobalDTTiposGastos-{0}", CveEmpresa)
+ 'sino existe, recarga los datos
+ If Application(AppNombre) Is Nothing Then
+ Dim ObjCompra As New ClsCompras()
+ If ObjCompra.GetTipoGasto(-1, -1) Then Application(AppNombre) = ObjCompra.DtResultados Else Application(AppNombre) = Nothing
+ ObjCompra.Dispose()
+ End If
+
If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(Application("GlobalDTTiposGastos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
+
+ Dim StrSQL As New StringBuilder
+ StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa)
+ If Estatus >= 0 Then StrSQL.AppendFormat(" AND CveEstatus = {0} ", Estatus)
+
+ Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
GlobalDTTiposGastos = Dv.ToTable
Dv.Dispose()
Else
- GlobalDTTiposGastos = DirectCast(Application("GlobalDTTiposGastos"), DataTable)
+ GlobalDTTiposGastos = DirectCast(Application(AppNombre), DataTable)
End If
-
End Get
Set(value As DataTable)
- Application("GlobalDTTiposGastos") = value
+ Dim AppNombre As String = String.Format("GlobalDTTiposGastos-{0}", CveEmpresa)
+ Application(AppNombre) = value
End Set
+
End Property
Property GlobalDTMFActividad(CveEmpresa As Integer, Optional Estatus As Integer = -1, Optional CveActividad As Integer = -1) As DataTable
Get
diff --git a/Ashx/SIGWeb.ashx b/Ashx/SIGWeb.ashx
index e53a90a5f..af213df24 100644
--- a/Ashx/SIGWeb.ashx
+++ b/Ashx/SIGWeb.ashx
@@ -620,7 +620,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
'verifica existencias
- If Pagina.Contiene("ventas/ventas", "oc/oc", "inv/traspaso") AndAlso CveEmpresa.Contiene(72, 80, 119, 140, 141, 152) Then
+ If Pagina.Contiene("ventas/ventas", "oc/oc", "inv/traspaso") AndAlso CveEmpresa.Contiene(72, 80, 119, 140, 141, 152, 153) Then
UsaGlobal = False
Dim objInv As New ClsInventarios
diff --git a/Bancos/PopIECompras.aspx.vb b/Bancos/PopIECompras.aspx.vb
index b305df95f..a2dc11030 100644
--- a/Bancos/PopIECompras.aspx.vb
+++ b/Bancos/PopIECompras.aspx.vb
@@ -1415,6 +1415,12 @@ Partial Class Bancos_PopIECompras
CveConcepto2 = 41
CveProveedor2 = DdlAcreedor.SelectedValue.ToEntero
CveIE = -1
+ 'verifica que se halla selccionado algun acreedor
+ If DdlAcreedor.SelectedValue.ToEntero <= 0 Then
+ Inserta = False
+ Alert("Debe especificar el Acreedor.", TipoMensaje.MsgAdvertencia)
+ Exit Sub
+ End If
Case "6" 'Ventas
ImportePagado = TxtImporte.Text.Trim.ToDecimal
CveProveedor2 = CveProveedor
@@ -3312,18 +3318,18 @@ Partial Class Bancos_PopIECompras
ImporteMovimiento = 0
End Select
- If ImporteMovimiento <> 0 Then
+ If ImporteMovimiento <> 0 AndAlso MsgError = "" Then
'Conta ContPAQ
If IdCtaContable = 0 Then
CuentasContablesInvalidas.Append("
" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
idCuentaContabilizacion = 0
End If
- 'Conta SIG
- If CveCuenta = 0 Then
- CuentasContablesInvalidasSIG.Append("
" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
- CveCuentaContabilizacion = 0
- End If
+ ''Conta SIG
+ 'If CveCuenta = 0 Then
+ ' CuentasContablesInvalidasSIG.Append("
" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
+ ' CveCuentaContabilizacion = 0
+ 'End If
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, If(ConceptoContable = 30, TxtFolio.Text.Trim, TxtObservaciones.Text), ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, -1, CveCompra, -1, CveProveedor:=CveProveedor2, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=TimpocambioGeneral, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeImpuesto) Then
MsgError = "No se pudo insertar la póliza"
@@ -3333,7 +3339,7 @@ Partial Class Bancos_PopIECompras
Next
- If ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 5) Then
+ If MsgError = "" AndAlso ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 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/Compras/CatTipoGasto.aspx.cs b/Compras/CatTipoGasto.aspx.cs
index 4ffb4c9b7..a30f0486c 100644
--- a/Compras/CatTipoGasto.aspx.cs
+++ b/Compras/CatTipoGasto.aspx.cs
@@ -33,7 +33,7 @@ public partial class Compras_CatTipoGasto : ClsPaginas
private void CargaDatos()
{
ClsCompras ObjCompras = new ClsCompras();
- if (ObjCompras.GetTipoGasto(-1,UsuarioActual.CveEmpresa))
+ if (ObjCompras.GetTipoGasto(-1, UsuarioActual.CveEmpresa))
{
GvDatos.DataSource = ObjCompras.DtResultados;
GvDatos.DataBind();
@@ -41,6 +41,16 @@ public partial class Compras_CatTipoGasto : ClsPaginas
ObjCompras.Dispose();
}
+ private void RecargarGlobal()
+ {
+ ClsCompras ObjCompras = new ClsCompras();
+ if (ObjCompras.GetTipoGasto(-1, -1))
+ {
+ set_GlobalDTTiposGastos(UsuarioActual.CveEmpresa, ObjCompras.DtResultados);
+ }
+ ObjCompras.Dispose();
+ }
+
protected void BtnAgregarTipoGastoD_Click(object sender, EventArgs e)
{
BtnAgregarTipoGasto.Text = "Agregar";
@@ -74,6 +84,7 @@ public partial class Compras_CatTipoGasto : ClsPaginas
Alert("Se eliminó el Tipo de Gasto correctamente");
}
ObjCompras.Dispose();
+ RecargarGlobal();
}
protected void BtnAgregarTipoGasto_Click(object sender, EventArgs e)
@@ -82,22 +93,21 @@ public partial class Compras_CatTipoGasto : ClsPaginas
if (BtnAgregarTipoGasto.Text == "Agregar")
{
if (ObjCompras.AddTipoGasto(TxtTipoGasto.Text,ChkEstatus.Checked,DateTime.Now.ToString(),UsuarioActual.CveUsuario,UsuarioActual.CveEmpresa))
- {
- CargaDatos();
- UpDatos.Update();
- RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposD"));
+ {
Alert("Se agregó el Tipo de Gasto correctamente");
}
- }else
+ }
+ else
{
- if (ObjCompras.UpdateTipoGasto(CveTipoGasto,TxtTipoGasto.Text,ChkEstatus.Checked,-1,-1))
+ if (ObjCompras.UpdateTipoGasto(CveTipoGasto, TxtTipoGasto.Text, ChkEstatus.Checked, -1, -1))
{
- CargaDatos();
- UpDatos.Update();
- RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposD"));
Alert("Se actualizó el Tipo de Gasto correctamente");
}
}
ObjCompras.Dispose();
+ CargaDatos();
+ RecargarGlobal();
+ UpDatos.Update();
+ RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposD"));
}
}
\ No newline at end of file
diff --git a/Compras/Proveedores.aspx b/Compras/Proveedores.aspx
index 7cd807988..9cfbdc5f5 100644
--- a/Compras/Proveedores.aspx
+++ b/Compras/Proveedores.aspx
@@ -824,6 +824,17 @@
| @@ -1149,7 +1160,7 @@ |