@@ -97,7 +97,7 @@
-
+
@@ -203,7 +203,7 @@
diff --git a/AF/RepDepreciacion.aspx.vb b/AF/RepDepreciacion.aspx.vb
index 3a0e849b6..00cdc75ca 100644
--- a/AF/RepDepreciacion.aspx.vb
+++ b/AF/RepDepreciacion.aspx.vb
@@ -30,17 +30,15 @@ Partial Class AF_RepDepreciacion
Dim ObjInventario As New ClsInventarios
Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL())
Dim ErrorMovInv As Boolean = False
- Dim ConceptoPoliza As String = String.Format("Depreciacion - {0}", txtFechaI.Text)
+ Dim ConceptoPoliza As String = String.Format("Depreciación - {0}", txtFechaI.Text)
Dim CveSubProyecto As Integer = DdlSubProyecto.SelectedValue.ToEntero
Dim CvePrePoliza = ObjConta.AddPrePolizas("Depreciacion", 74, 0, 0, 1, txtFechaI.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
-
-
For Each RowsDt As GridViewRow In GvDatos.Rows
CveActivoFijo = RowsDt.DataKey("CveActivoFijo").ToEntero
Dim MontoDepreciacion As Decimal = RowsDt.FCLiteral("LtlDepreciacionMensual").Text.ToDecimal
If MontoDepreciacion > 0 And CveActivoFijo <> 0 Then
- Dim ConceptoPolizaDetalle As String = String.Format("Depreciacion - {0} - {1}", txtFechaI.Text, RowsDt.FCLiteral("LtlDescripcion").Text)
+ Dim ConceptoPolizaDetalle As String = String.Format("Depreciación - {0} - {1}", txtFechaI.Text, RowsDt.FCLiteral("LtlDescripcion").Text)
If CvePrePoliza > 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, -MontoDepreciacion, -MontoDepreciacion, 270, ConceptoPolizaDetalle, ConceptoPolizaDetalle, 0, CveActivoFijo:=CveActivoFijo, CveSubProyecto:=CveSubProyecto) Then
diff --git a/Acumuladores/RepAcumuladoresVigencia.aspx b/Acumuladores/RepAcumuladoresVigencia.aspx
index 2ec474f82..1fdbabe12 100644
--- a/Acumuladores/RepAcumuladoresVigencia.aspx
+++ b/Acumuladores/RepAcumuladoresVigencia.aspx
@@ -30,12 +30,16 @@
+
+
+
+
-
+
-
+
@@ -92,7 +96,7 @@
-
+
diff --git a/Acumuladores/RepAcumuladoresVigencia.aspx.cs b/Acumuladores/RepAcumuladoresVigencia.aspx.cs
index 1d388aa4c..da9ed60da 100644
--- a/Acumuladores/RepAcumuladoresVigencia.aspx.cs
+++ b/Acumuladores/RepAcumuladoresVigencia.aspx.cs
@@ -61,10 +61,14 @@ public partial class Acumuladores_RepAcumuladoresVigencia : ClsPaginas
private void CargaCombos()
{
CargarCentrosDeCosto(null, DdlSubProyecto, null, LblSubProyecto);
- DdlClasificaciones.DataSource = get_GlobalDTClasificaciones(UsuarioActual.CveEmpresa);
+ DdlClasificaciones.DataSource = get_GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros("Categoria = 'ACUMULADORES'");
DdlClasificaciones.DataBind();
DdlClasificaciones.Items.Insert(0, new ListItem("Todos", "-1"));
- }
+
+ DdlMarcas.DataSource = get_GlobalDTGralMarcas(UsuarioActual.CveEmpresa);
+ DdlMarcas.DataBind();
+ DdlMarcas.Items.Insert(0, new ListItem("Todas", "-1"));
+ }
protected void BtnConsultar_Click(object sender, EventArgs e)
{
@@ -76,7 +80,7 @@ public partial class Acumuladores_RepAcumuladoresVigencia : ClsPaginas
{
ClsAcumuladores ObjAcum = new ClsAcumuladores();
- if (ObjAcum.GetVigencias(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), DdlClasificaciones.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa, DdlSubProyecto.SelectedValue.ToEntero()))
+ if (ObjAcum.GetVigencias(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), DdlMarcas.SelectedValue.ToEntero(), DdlClasificaciones.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa, DdlSubProyecto.SelectedValue.ToEntero()))
{
GvAcum.DataSource = ObjAcum.DtResultados;
}
diff --git a/App_Code/ClsAcumuladores.vb b/App_Code/ClsAcumuladores.vb
index 354172fa2..8c9eb613c 100644
--- a/App_Code/ClsAcumuladores.vb
+++ b/App_Code/ClsAcumuladores.vb
@@ -1315,11 +1315,12 @@ Public Class ClsAcumuladores
End Function
#Region "VIGENCIA ACUMULADORES"
- Public Function GetVigencias(FechaInicio As Date, FechaFin As Date, CveClasificacion As Integer, CveEmpresa As Integer, CveSubProyecto As Integer) As Boolean
+ Public Function GetVigencias(FechaInicio As Date, FechaFin As Date, CveMarca As Integer, CveClasificacion As Integer, CveEmpresa As Integer, CveSubProyecto As Integer) As Boolean
Dim Retorno As Boolean = False
SqlDataAdapter("PA_Inv_ProductosFechasComprasSerie")
With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveMarca", SqlDbType.Int).Value = CveMarca
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@FechaIni", SqlDbType.Date).Value = FechaInicio
diff --git a/App_Code/ClsCompras.vb b/App_Code/ClsCompras.vb
index 70baf2423..912ad3e9f 100644
--- a/App_Code/ClsCompras.vb
+++ b/App_Code/ClsCompras.vb
@@ -197,7 +197,7 @@ Public Class ClsCompras
Optional CveOC As Integer = -1, Optional CveCajaChica As Integer = -1, Optional CvePersonal As Integer = -1, Optional NumeroReembolso As String = "-1", Optional CveProveedorSucursal As Integer = -1,
Optional AplicoPromocion As Boolean = False, Optional PorcentajeIVA As Double = 0, Optional CveMetodoPago As Integer = -1, Optional CveRetIVAConcepto As Integer = -1, Optional CveConceptoContableAlmacen As Integer = -1,
Optional CveRetISRConcepto As Integer = -1, Optional NoDeducible As Boolean = False, Optional CveTipoCompra As Integer = -1, Optional TotalOriginal As Double = 0, Optional CveTipoConcepto As Integer = 1, Optional CveFactura As Integer = -1,
- Optional CveContrato As Integer = -1, Optional EsImportacion As Boolean = False) As Boolean
+ Optional CveContrato As Integer = -1, Optional EsImportacion As Boolean = False, Optional CveSubProyecto As Integer = -1) As Boolean
Dim Retorno As Boolean = False
@@ -250,6 +250,7 @@ Public Class ClsCompras
.Add("@CveFactura", SqlDbType.Int).Value = CveFactura
.Add("@CveContrato", SqlDbType.Int).Value = CveContrato
.Add("@EsImportacion", SqlDbType.Bit).Value = EsImportacion
+ .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
End With
@@ -274,7 +275,7 @@ Public Class ClsCompras
Public Function UpdateCompra(Descripcion As String, FolioSecundario As String, FechaVencimiento As Date, AplicaNotaCredito As Boolean, Observaciones As String, CveEstatusCompra As Integer,
Descuento As Double, SubTotal As Double, IVA As Double, Total As Double, CveUsuario As Integer, CveCompra As Integer, Optional CveCajaChica As Integer = -1, Optional CvePersonal As Integer = -1,
Optional CveProveedorSucursal As Integer = -1, Optional PorcentajeIVA As Double = 0, Optional NumeroReembolso As String = "", Optional CveTipoCompra As Integer = -1, Optional NoDeducible As Boolean = False,
- Optional CveFactura As Integer = -1, Optional CveContrato As Integer = -1, Optional CveRetIVAConcepto As Integer = -1, Optional CveRetISRConcepto As Integer = -1) As Boolean
+ Optional CveFactura As Integer = -1, Optional CveContrato As Integer = -1, Optional CveRetIVAConcepto As Integer = -1, Optional CveRetISRConcepto As Integer = -1, Optional CveSubProyecto As Integer = -1) As Boolean
Dim Retorno As Boolean = False
@@ -307,6 +308,8 @@ Public Class ClsCompras
.Add("@CveRetIVAConcepto", SqlDbType.Int).Value = CveRetIVAConcepto
.Add("@CveRetISRConcepto", SqlDbType.Int).Value = CveRetISRConcepto
+
+ .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
End With
Try
@@ -3273,3 +3276,4 @@ Public Class ClsCompras
End Class
+
diff --git a/App_Code/ClsGenerales.vb b/App_Code/ClsGenerales.vb
index 10c90cc59..d24033dfe 100644
--- a/App_Code/ClsGenerales.vb
+++ b/App_Code/ClsGenerales.vb
@@ -1576,7 +1576,7 @@ Public Class ClsGenerales
Return Retorno
End Function
- Public Function AddCuentasDepositos(BancoNombre As String, Plaza As String, Sucursal As String, Cuenta As String, CLABE As String, CIE As String, SWIFT As String, Referencia As String, RefCrediProveedor As String, CveUsuario As Integer, CveMoneda As Integer,
+ Public Function AddCuentasDepositos(BancoNombre As String, Plaza As String, Sucursal As String, Cuenta As String, CLABE As String, CIE As String, SWIFT As String, Referencia As String, RefCrediProveedor As String, CveUsuario As Integer, CveMoneda As Integer, CveEmpresa As Integer,
Optional CveProveedor As Integer = -1, Optional CveCliente As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveColectiva As Integer = -1, Optional CveUsuarioModifico As Integer = -1,
Optional Correo As String = "", Optional BBVAAlias As String = "-1", Optional EstatusPagoElectronico As Boolean = False, Optional EstatusPagoElectronicoGrupos As Boolean = False, Optional CveSATBanco As Integer = -1,
Optional ConceptoCIE As String = "-1") As Boolean
@@ -1585,6 +1585,7 @@ Public Class ClsGenerales
DataAdapter("PA_Gral_CuentasDepositosAdd")
With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
.Add("@CveColectiva", SqlDbType.Int).Value = CveColectiva
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
@@ -1626,14 +1627,16 @@ Public Class ClsGenerales
Return Retorno
End Function
- Public Function RemoveCuentasDepositos(CveCuentaDeposito As Integer, Optional CveUsuarioModifico As Integer = -1) As Boolean
+ Public Function RemoveCuentasDepositos(CveCuentaDeposito As Integer, CveEmpresa As Integer, CveUsuarioModifico As Integer) As Boolean
Dim Retorno As Boolean = False
- DataAdapter("PA_Gral_CuentasDepositosRemove")
-
- SqlAdapter.SelectCommand.Parameters.Add("@CveCuentaDeposito", SqlDbType.Int).Value = CveCuentaDeposito
- SqlAdapter.SelectCommand.Parameters.Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico
-
+ DataAdapter("PA_Gral_CuentasDepositosRemove")
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveCuentaDeposito", SqlDbType.Int).Value = CveCuentaDeposito
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ .Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico
+ End With
+
Try
SqlAdapter.Fill(Data)
Retorno = True
@@ -1655,8 +1658,9 @@ Public Class ClsGenerales
DataAdapter("PA_Gral_CuentasDepositosPersonalUpdate")
- With SqlAdapter.SelectCommand.Parameters
- .Add("@CveCuentaDeposito", SqlDbType.Int).Value = CveCuentaDeposito
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveCuentaDeposito", SqlDbType.Int).Value = CveCuentaDeposito
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@BancoNombre", SqlDbType.VarChar).Value = BancoNombre
.Add("@Cuenta", SqlDbType.VarChar).Value = Cuenta
.Add("@CLABE", SqlDbType.VarChar).Value = CLABE
@@ -1685,14 +1689,15 @@ Public Class ClsGenerales
End Function
Public Function UpdateCuentasDepositos(CveCuentaDeposito As Integer, BancoNombre As String, Plaza As String, Sucursal As String, Cuenta As String, CLABE As String, CIE As String, SWIFT As String, Referencia As String,
- RefCrediProveedor As String, Predeterminada As Boolean, Estatus As Boolean, CveMoneda As Integer, Optional CveUsuarioModifico As Integer = -1, Optional Correo As String = "",
+ RefCrediProveedor As String, Predeterminada As Boolean, Estatus As Boolean, CveMoneda As Integer, CveEmpresa As Integer, Optional CveUsuarioModifico As Integer = -1, Optional Correo As String = "",
Optional BBVAAlias As String = "-1", Optional EstatusPagoElectronico As Boolean = False, Optional EstatusPagoElectronicoGrupos As Boolean = False, Optional CveSATBanco As Integer = -1,
Optional ConceptoCIE As String = "-1") As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Gral_CuentasDepositosUpdate")
- With SqlAdapter.SelectCommand.Parameters
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@BancoNombre", SqlDbType.VarChar).Value = BancoNombre
.Add("@Plaza", SqlDbType.VarChar).Value = Plaza
.Add("@Sucursal", SqlDbType.VarChar).Value = Sucursal
diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb
index 0ff33a38c..a86c1393f 100644
--- a/App_Code/ClsInventarios.vb
+++ b/App_Code/ClsInventarios.vb
@@ -136,6 +136,7 @@ Public Class ClsInventarios
Public Property Modulo As String
Public Property ConAplicacion As Boolean
Public Property CveInventarioFisicoPadre As Integer
+ Public Property CveFolioGarantia As Integer
@@ -875,7 +876,7 @@ Public Class ClsInventarios
ResponsableCarga = dr("ResponsableCarga").ToString
ResponsableRecibio = dr("ResponsableRecibio").ToString
Modulo = dr("Modulo").ToString
-
+ CveFolioGarantia = dr("CveFolioGarantia").ToString.ToEntero
Retorno = True
End If
@@ -985,7 +986,7 @@ Public Class ClsInventarios
Optional CveMovimientoRelacionado As Integer = -1, Optional TipoCambio As Double = -1, Optional CveVendedor As Integer = -1, Optional CveCliente As Integer = -1, Optional MovimientoFijo As Boolean = False, Optional CveContrato As Integer = -1,
Optional CveProveedor As Integer = -1, Optional Remision As String = "", Optional CveClienteSucursal As Integer = -1, Optional DepartamentoEntrega As String = "", Optional PedidoContrato As String = "", Optional GastoIndirecto As Double = -1, Optional CveChofer As Integer = -1, Optional CveCamion As Integer = -1, Optional Placa As String = "",
Optional FechaEntrega As String = "", Optional EspecifUnidad As String = "", Optional ResponsableCarga As String = "", Optional ResponsableRecibio As String = "", Optional Identificacion As String = "", Optional Domicilio As String = "",
- Optional Telefono As String = "", Optional Ciudad As String = "", Optional Licencia As String = "", Optional Modulo As String = "", Optional CveOP As Integer = -1) As Integer
+ Optional Telefono As String = "", Optional Ciudad As String = "", Optional Licencia As String = "", Optional Modulo As String = "", Optional CveOP As Integer = -1, Optional CveFolioGarantia As Integer = -1) As Integer
Dim Retorno As Integer = -1
@@ -1045,6 +1046,7 @@ Public Class ClsInventarios
.Add("@Licencia", SqlDbType.VarChar).Value = Licencia
.Add("@Modulo", SqlDbType.VarChar).Value = Modulo
.Add("@CveOP", SqlDbType.Int).Value = CveOP
+ .Add("@CveFolioGarantia", SqlDbType.Int).Value = CveFolioGarantia
End With
Try
diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb
index 1ece45ca0..3360ec10d 100644
--- a/App_Code/ClsPaginas.vb
+++ b/App_Code/ClsPaginas.vb
@@ -577,7 +577,7 @@ Public Class ClsPaginas
Dim AppNombre As String = $"GlobalDTProveedoresCuentas-{CveEmpresa}"
If HttpContext.Current.Application(AppNombre) Is Nothing Then
Using ObjProveedoresBancos As New ClsGenerales
- If ObjProveedoresBancos.GetCuentasDepositos(CveEmpresa:=CveEmpresa, CveProveedor:=-1, CveCliente:=-2, CvePersonal:=-2) Then Application(AppNombre) = ObjProveedoresBancos.DtResultados
+ If ObjProveedoresBancos.GetCuentasDepositos(CveEmpresa:=CveEmpresa, CveProveedor:=-2) Then Application(AppNombre) = ObjProveedoresBancos.DtResultados
End Using
End If
Dim filtros As New List(Of String)
@@ -602,7 +602,7 @@ Public Class ClsPaginas
Dim AppNombre As String = $"GlobalDTCuentasDepositosClientes-{CveEmpresa}"
If Application(AppNombre) Is Nothing Then
Dim P As New ClsGenerales
- If P.GetCuentasDepositos(CveEmpresa:=CveEmpresa, CveCliente:=-1, CveProveedor:=-2, CvePersonal:=-2) Then Application(AppNombre) = P.DtResultados
+ If P.GetCuentasDepositos(CveEmpresa:=CveEmpresa, CveCliente:=-2) Then Application(AppNombre) = P.DtResultados
P.Dispose()
End If
Dim Str As New StringBuilder
@@ -834,7 +834,7 @@ Public Class ClsPaginas
End If
Dim filtros As New List(Of String)
If CveCategoria <> -1 Then filtros.Add($"CveCategoria = {CveCategoria}")
- If UsoClasificacion <> -1 Then filtros.Add($"UsoClasificacion = {UsoClasificacion}")
+ If UsoClasificacion <> -1 Then filtros.Add($"UsoClasificacion IN ({UsoClasificacion},3) ")
If CveClasificacion <> -1 Then filtros.Add($"CveClasificacion = {CveClasificacion}")
If filtros.Count > 0 Then
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Join(" AND ", filtros), "", DataViewRowState.CurrentRows)
diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb
index d2b1a1088..7b28e1a9d 100644
--- a/Bancos/IE.aspx.vb
+++ b/Bancos/IE.aspx.vb
@@ -1146,20 +1146,17 @@ Partial Class Bancos_IE
Else
If DdlTipoTransaccion.SelectedValue = "9" Then
- Dim Dep As New ClsGenerales
- If Dep.GetCuentasDepositos(CveProveedor:=ObjIE.CveProveedor) Then
- DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros(" Estatus = 'True' ")
- If Dep.DtResultados.Rows.Count > 0 Then
+ Dim dtc As DataTable = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor)
+
+ If dtc IsNot Nothing Then
+ DdlCuentaDeposito.DataSource = dtc.FiltraParametros(" Estatus = 'True' ")
+ If dtc.Rows.Count > 0 Then
trCuentaDeposito.Visible = True
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
- 'ElseIf Dep.DtResultados.Rows.Count = 1 Then
- ' TrCuentaDepositado.Visible = True
- ' LitTextoDepositado.Text = "Cuenta Depósito"
- ' LitDepositado.Text = Dep.DtResultados.Rows(0)("CuentaDeposito").ToString
- 'End If
+
End If
End If
- Dep.Dispose()
+
DdlCuentaDeposito.DataBind()
UpCuentaDeposito.Update()
End If
@@ -1167,9 +1164,6 @@ Partial Class Bancos_IE
End If
LnkComplementoPago.Visible = True
-
-
-
If ObjIE.CveEstatusIE = 1 AndAlso ObjIE.CveIECancelado > 0 Then
'cuando es cheque devuelto
TabCancelacion.Visible = True
@@ -1185,8 +1179,6 @@ Partial Class Bancos_IE
End If
-
-
'DATOS DE CANCELACION
If ObjIE.CveEstatusIE = 2 OrElse (ObjIE.CveEstatusIE = 1 AndAlso ObjIE.CveIECancelacion > 0) Then
TabCancelacion.Visible = True
@@ -1327,8 +1319,6 @@ Partial Class Bancos_IE
End If
-
- RecargaGlobalCuentasBancarias()
ObjIE.Dispose()
ObjIE2.Dispose()
UPPP.Update()
@@ -3968,7 +3958,6 @@ Partial Class Bancos_IE
End If
Msg.Clear()
- RecargaGlobalCuentasBancarias()
ObjIE.Dispose()
ObjMov.Dispose()
If ObjComp IsNot Nothing Then ObjComp.Dispose()
@@ -5206,15 +5195,23 @@ Partial Class Bancos_IE
'If DdlTipoTransaccion.SelectedValue.Contiene("2", "9") Then ' transferencias y layout
trCuentaDeposito.Visible = False
+ Dim dtc As DataTable = Nothing
- Dim Dep As New ClsGenerales
- If Dep.GetCuentasDepositos(CveProveedor:=CveProveedor, CveCliente:=CveCliente, CvePersonal:=CvePersonal) Then
+ If CveProveedor > 0 Then
+ dtc = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor)
+ ElseIf CveCliente > 0 Then
+ dtc = GlobalDTCuentasDepositosClientes(UsuarioActual.CveEmpresa, CveCliente:=CveCliente)
+ End If
+
+
+ ' If Dep.GetCuentasDepositos(CveProveedor:=CveProveedor, CveCliente:=CveCliente, CvePersonal:=CvePersonal) Then
+ If dtc IsNot Nothing Then
If DdlTipoTransaccion.SelectedValue = "9" And CveIE <= -1 Then
- DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'")
+ DdlCuentaDeposito.DataSource = dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'")
- If Dep.DtResultados.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'").Rows.Count > 0 Then
+ If dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'").Rows.Count > 0 Then
trCuentaDeposito.Visible = True
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
Else
@@ -5223,10 +5220,9 @@ Partial Class Bancos_IE
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
ElseIf DdlTipoTransaccion.SelectedValue = "17" And CveIE <= -1 Then
+ If dtc.Rows.Count > 0 Then
- If Dep.DtResultados.Rows.Count > 0 Then
-
- DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros(" Estatus = 'True' ")
+ DdlCuentaDeposito.DataSource = dtc.FiltraParametros(" Estatus = 'True' ")
trCuentaDeposito.Visible = True
BtnGuardar.ToolTip = ""
@@ -5242,15 +5238,14 @@ Partial Class Bancos_IE
UpGuardar.Update()
Else
- DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros("Estatus ='True'")
- If Dep.DtResultados.Rows.Count > 0 Then
+ DdlCuentaDeposito.DataSource = dtc.FiltraParametros("Estatus ='True'")
+ If dtc.Rows.Count > 0 Then
trCuentaDeposito.Visible = True
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
End If
End If
-
Else
If DdlTipoTransaccion.SelectedValue.Contiene("9", "17") And CveIE <= -1 Then
@@ -5265,9 +5260,8 @@ Partial Class Bancos_IE
UpGuardar.Update()
-
End If
- Dep.Dispose()
+
'If DdlTipoTransaccion.SelectedValue = "9" AndAlso DdlCuentaDeposito.Items.Count = 0 Then
' BtnIEGuardar.Enabled = False
@@ -5280,7 +5274,7 @@ Partial Class Bancos_IE
' trCuentaDeposito.Visible = False
' DdlCuentaDeposito.Items.Clear()
'End If
- RecargaGlobalCuentasBancarias()
+
UpCuentaDeposito.Update()
UpDatos.Update()
End Sub
@@ -5305,18 +5299,6 @@ Partial Class Bancos_IE
End Sub
- 'Recaga CuentasBancarias de Proveedor
- Private Sub RecargaGlobalCuentasBancarias(Optional ByVal CveCuenta As Integer = -1)
- If CveProveedor > 0 Then
- GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, -1) = Nothing
- 'Dim ObjCuentasBancos As New ClsGenerales
-
- 'If ObjCuentasBancos.GetCuentasDepositos(CveEmpresa:=UsuarioActual.CveEmpresa) Then
- ' GlobalDTProveedoresCuentas(-1, True) = ObjCuentasBancos.DtResultados
- 'End If
- 'ObjCuentasBancos.Dispose()
- End If
- End Sub
Protected Sub DdlCuentaDeposito_SelectedIndexChanged(sender As Object, e As EventArgs)
Dim Dep As New ClsGenerales
@@ -6640,7 +6622,6 @@ Partial Class Bancos_IE
trCuentaDeposito.Visible = True
DdlCuentaDeposito.Enabled = True
-
Dim Dep As New ClsGenerales
If Dep.GetCuentasDepositos(CveCliente:=CveCliente) Then
@@ -6651,15 +6632,12 @@ Partial Class Bancos_IE
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
End If
-
End If
Dep.Dispose()
DdlCuentaDeposito.DataBind()
UpCuentaDeposito.Update()
-
-
End If
End Sub
diff --git a/Bancos/PagoAcreedor.aspx.cs b/Bancos/PagoAcreedor.aspx.cs
index 7079468f1..ca0559b4b 100644
--- a/Bancos/PagoAcreedor.aspx.cs
+++ b/Bancos/PagoAcreedor.aspx.cs
@@ -277,7 +277,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
int CveConceptoContablePago = 42;
int CveConceptoContableBancoComplementario = 204;
int CveConceptoContablePrestamoComplementario = 202;
- int CvePlantillaPoliza = 21;
+ int CvePlantillaPoliza = 43;
int CvePrePoliza = 0;
int CveMonedaPago = get_GlobalDTBancosCuentas(-1, CveEmpresa: UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda", $"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveCuenta = {DdlCuenta.SelectedValue.ToEntero()}").ToEntero();
int FolioFijo = 0;
@@ -704,7 +704,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
int CveConceptoContablePrestamo = 41;
int CveConceptoContableBancoComplementario = 204;
int CveConceptoContablePrestamoComplementario = 202;
- int CvePlantillaPoliza = 45;
+ int CvePlantillaPoliza = 44;
int CvePrePoliza = 0;
int CveMoneda = get_GlobalDTBancosCuentas(-1, CveEmpresa: UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda", $"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveCuenta = {DdlCuentaPrestamo.SelectedValue.ToEntero()}").ToEntero();
int FolioFijo = 0;
diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb
index 660e1a514..d96237c96 100644
--- a/Bancos/ProveedoresAbonar.aspx.vb
+++ b/Bancos/ProveedoresAbonar.aspx.vb
@@ -650,16 +650,14 @@ Partial Class Bancos_ProveedoresAbonar
Exit Sub
End If
- Dim Dep As New ClsGenerales
- If Dep.GetCuentasDepositos(CveProveedor:=CveProveedor) Then
- Dim Row = Dep.DtResultados.FiltroPrimero(String.Format("CveCuentaDeposito = {0}", DdlCuentaDeposito.SelectedValue.ToEntero))
+ Dim dtc As DataTable = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor)
+ If dtc IsNot Nothing Then
+ Dim Row = dtc.FiltroPrimero(String.Format("CveCuentaDeposito = {0}", DdlCuentaDeposito.SelectedValue.ToEntero))
If Row IsNot Nothing AndAlso Row("Estatus").ToString = "False" Then
Alert("La cuenta depósito del proveedor esta inactiva.", TipoMensaje.MsgAdvertencia)
- Dep.Dispose()
Exit Sub
End If
End If
- Dep.Dispose()
'proceso que restringue solo el pago de apartir del dia de hoy y como limite fin de mes
If UsuarioActual.TienePermisoProceso(105) AndAlso (TxtFechaDocumento.Text.ToDate < Now.Date Or TxtFechaDocumento.Text.ToDate > Now.LastDayOfMonth) Then
@@ -1310,22 +1308,22 @@ Partial Class Bancos_ProveedoresAbonar
#Region " CUENTAS DEPOSITOS"
Private Sub CargaCuentasDepositos()
DdlCuentaDeposito.Items.Clear()
- ' If DdlTipoTransaccion.SelectedValue.Contiene("2", "9") Then ' transferencias y layout
+
trCuentaDeposito.Visible = False
- Dim Dep As New ClsGenerales
- If Dep.GetCuentasDepositos(CveProveedor:=CveProveedor) Then
+ Dim dtc As DataTable = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor)
+ If dtc IsNot Nothing Then
- If Dep.DtResultados.FiltraParametros("Estatus ='True'").Rows.Count > 0 Then
+ If dtc.FiltraParametros("Estatus ='True'").Rows.Count > 0 Then
If DdlTipoTransaccion.SelectedValue = "9" Then
- If Dep.DtResultados.Rows.Count > 0 Then
- DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'")
+ If dtc.Rows.Count > 0 Then
+ DdlCuentaDeposito.DataSource = dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'")
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
End If
- If Dep.DtResultados.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'").Rows.Count > 0 Then
+ If dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'").Rows.Count > 0 Then
trCuentaDeposito.Visible = True
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
Else
@@ -1335,45 +1333,28 @@ Partial Class Bancos_ProveedoresAbonar
ElseIf DdlTipoTransaccion.SelectedValue = "17" Then
-
- If Dep.DtResultados.Rows.Count > 0 Then
-
- DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros(" Estatus ='True'")
+ If dtc.Rows.Count > 0 Then
+ DdlCuentaDeposito.DataSource = dtc.FiltraParametros(" Estatus ='True'")
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
-
trCuentaDeposito.Visible = True
BtnIEGuardar.ToolTip = ""
Else
-
BtnIEGuardar.Enabled = False
BtnIEGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
Alert("El proveedor no tiene cuentas deposito.", TipoMensaje.MsgAdvertencia)
-
End If
-
-
UpGuardar.Update()
Else
- DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros("Estatus ='True'")
- If Dep.DtResultados.Rows.Count > 0 Then
+ DdlCuentaDeposito.DataSource = dtc.FiltraParametros("Estatus ='True'")
+ If dtc.Rows.Count > 0 Then
trCuentaDeposito.Visible = True
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
End If
End If
-
DdlCuentaDeposito.DataBind()
-
-
- 'If DdlCuentaDeposito.Items.Count > 1 Then
- ' DdlCuentaDeposito.SelectedIndex = 1
- 'End If
-
-
Else
-
If DdlTipoTransaccion.SelectedValue.Contiene("9", "17") Then
-
BtnIEGuardar.Enabled = False
BtnIEGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
Alert("El proveedor no tiene cuentas deposito.", TipoMensaje.MsgAdvertencia)
@@ -1382,17 +1363,11 @@ Partial Class Bancos_ProveedoresAbonar
BtnIEGuardar.Enabled = True
BtnIEGuardar.ToolTip = ""
End If
-
UpGuardar.Update()
-
End If
-
-
Else
-
If DdlTipoTransaccion.SelectedValue = "17" Then
-
BtnIEGuardar.Enabled = False
BtnIEGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
Else
@@ -1402,11 +1377,8 @@ Partial Class Bancos_ProveedoresAbonar
End If
UpGuardar.Update()
-
-
End If
- Dep.Dispose()
'Else
' trCuentaDeposito.Visible = False
' DdlCuentaDeposito.Items.Clear()
@@ -1428,28 +1400,27 @@ Partial Class Bancos_ProveedoresAbonar
Protected Sub DdlCuentaDeposito_SelectedIndexChanged(sender As Object, e As EventArgs)
- Dim Dep As New ClsGenerales
+ Dim dtc As DataTable = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor)
+ If dtc IsNot Nothing AndAlso dtc.Rows.Count = 1 Then
- If Dep.GetCuentasDepositos(CveProveedor:=CveProveedor, CveCuentaDeposito:=DdlCuentaDeposito.SelectedValue.ToEntero) AndAlso Dep.DtResultados.Rows.Count = 1 Then
+ If dtc.Rows.Count > 0 Then
- If Dep.DtResultados.Rows.Count > 0 Then
-
- If Dep.DtResultados.Rows(0)("TieneCIE").ToString.ToEntero = 1 Then
+ If dtc.Rows(0)("TieneCIE").ToString.ToEntero = 1 Then
TrReferenciaCIE.Visible = True
- TxtReferenciaCIE.Text = Dep.DtResultados.Rows(0)("Referencia").ToString
- TxtConceptoCIE.Text = Dep.DtResultados.Rows(0)("ConceptoCIE").ToString
+ TxtReferenciaCIE.Text = dtc.Rows(0)("Referencia").ToString
+ TxtConceptoCIE.Text = dtc.Rows(0)("ConceptoCIE").ToString
- OriReferenciaCIE = Dep.DtResultados.Rows(0)("Referencia").ToString
- OriConceptoCIE = Dep.DtResultados.Rows(0)("ConceptoCIE").ToString
+ OriReferenciaCIE = dtc.Rows(0)("Referencia").ToString
+ OriConceptoCIE = dtc.Rows(0)("ConceptoCIE").ToString
Else
TrReferenciaCIE.Visible = False
End If
- If Boolean.Parse(Dep.DtResultados.Rows(0)("EstatusPagoElectronicoGrupos").ToString) = True AndAlso Dep.DtResultados.Rows(0)("CveSATBanco").ToString.ToEntero <= 0 Then
+ If Boolean.Parse(dtc.Rows(0)("EstatusPagoElectronicoGrupos").ToString) = True AndAlso dtc.Rows(0)("CveSATBanco").ToString.ToEntero <= 0 Then
Alert("Es necesario establecer el banco de la cuenta deposito", TipoMensaje.MsgAdvertencia)
BtnIEGuardar.Enabled = False
@@ -1466,7 +1437,6 @@ Partial Class Bancos_ProveedoresAbonar
TrReferenciaCIE.Visible = False
End If
- Dep.Dispose()
UpCuentaDeposito.Update()
UpGuardar.Update()
End Sub
diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx
index c7021722e..02dc29703 100644
--- a/Compras/Compras.aspx
+++ b/Compras/Compras.aspx
@@ -5521,6 +5521,7 @@
+
@@ -6789,6 +6790,9 @@
$('#TxtDeudoresOtrosGastosIngresos').val(txtOtrIngEgs.value);
}
+
+
+
diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb
index 81769821a..397c6ebd3 100644
--- a/Compras/Compras.aspx.vb
+++ b/Compras/Compras.aspx.vb
@@ -11,6 +11,7 @@ Imports Newtonsoft.Json
Imports Extensiones
Imports System.Activities.Expressions
Imports iText.Barcodes.Dmcode
+Imports Microsoft.Reporting.WebForms
Partial Class Compras_Compras
Inherits ClsPaginas
@@ -3199,10 +3200,10 @@ Partial Class Compras_Compras
'Tiene Importacion
If dr("EsImportacion").ToString = "True" Then
- chkImportacion.Checked = True
- Else
- chkImportacion.Checked = False
- End If
+ chkImportacion.Checked = True
+ Else
+ chkImportacion.Checked = False
+ End If
CargaComplementosPago()
CargaGvBitacora()
InventarioMov()
@@ -7415,7 +7416,7 @@ Partial Class Compras_Compras
Else
Dim usacomplementariaAnticipo As Boolean = False
- usacomplementariaAnticipo = If(Ant.TCCompra > 1 And not UsuarioActual.CveEmpresa.Contiene(13,83), True, False)
+ usacomplementariaAnticipo = If(Ant.TCCompra > 1 And Not UsuarioActual.CveEmpresa.Contiene(13, 83), True, False)
Dim TipoCambioAnt As Decimal = Ant.TCCompra
Dim ImporteAnt As Decimal = importeMovimiento
@@ -8116,7 +8117,12 @@ Partial Class Compras_Compras
End If
If UsuarioActual.TienePermisoProceso(354) Then 'visualizar la póliza al registros
- Msg.AppendFormat("
Ver Póliza. ", CvePrePoliza)
+ Dim TempParametros = Encripta(String.Format("OP=PREPO&CvePrePoliza={0}", CvePrePoliza))
+ Msg.Append($" Descargar PDF ")
+
+
+
End If
If CveMovimientoInventario > 0 Then
@@ -8125,8 +8131,10 @@ Partial Class Compras_Compras
Msg.AppendFormat("Imprimir Entrada Almacen", TempParametros)
End If
- If Not ObjCompras.UpdateCompraPrePoliza(TxtFecha.Text.ToDate, PolizaFolio.ToString, IdPoliza, CvePrePoliza, CveCompra, 0) Then
- TieneError = True
+ If UsuarioActual.Empresa.TipoContabilidad = 2 Then
+ If Not ObjCompras.UpdateCompraPrePoliza(TxtFecha.Text.ToDate, PolizaFolio.ToString, IdPoliza, CvePrePoliza, CveCompra, 0) Then
+ TieneError = True
+ End If
End If
If EntregaDirecta Then
@@ -13503,10 +13511,10 @@ Partial Class Compras_Compras
For Each Dr As GridViewRow In GVDevolucion.Rows
'CveAlmacen = Dr.DataKey("CveAlmacen").ToString.ToEntero
- cantidad = Dr.FCTextBox("TxtCantidad").Text.ToDecimal
- If cantidad > 0 Then
+ Cantidad = Dr.FCTextBox("TxtCantidad").Text.ToDecimal
+ If Cantidad > 0 Then
realizadevolucion = True
- subtotaldevolucion += Dr.DataKey("PU").ToString.ToDecimal * cantidad
+ subtotaldevolucion += Dr.DataKey("PU").ToString.ToDecimal * Cantidad
End If
Next
'si no esta vinculado a nc simplemente me lo brinco
@@ -20600,6 +20608,9 @@ Partial Class Compras_Compras
'End Function
+
+
+
End Class
diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb
index 2480da969..870d9223e 100644
--- a/Compras/PopUpVerFactura.aspx.vb
+++ b/Compras/PopUpVerFactura.aspx.vb
@@ -1442,6 +1442,16 @@ Partial Class PopUpVerFactura
End If
End If
+
+
+
+ 'IMPRIME VALE
+ If UrlParametros("OP").ToString = "PREPO" Then
+ If UrlParametros("CVEPREPOLIZA") IsNot Nothing AndAlso UrlParametros("CVEPREPOLIZA").ToString.ToEntero > 0 Then
+ ImprimeImPrimePrePolizaS(UrlParametros("CVEPREPOLIZA").ToString.ToEntero)
+ End If
+ End If
+
End Sub
Private Function Parametros(Cadena As String) As Hashtable
@@ -6866,4 +6876,177 @@ Partial Class PopUpVerFactura
End Sub
#End Region
+
+#Region "OP PREPO"
+
+
+ Public Sub ImprimeImPrimePrePolizaS(CvePrePoliza As Integer)
+
+
+
+
+ If Not CvePrePoliza > 0 Then
+ Exit Sub
+ End If
+
+
+ 'ObjContabilidad.Dispose()
+
+ Dim rutaArchivo As String = ""
+ Dim params As New List(Of ReportParameter)
+ Dim Bytes As Byte() = Nothing
+ Dim DtDetalle As New DataTable
+ Dim CveTipoPolizaImp As Integer = 0
+ Dim FolioPoliza As String = ""
+ Dim ConceptoPolizaImp As String = ""
+ Dim CveMonedaImp As Integer = 0
+ Dim TipoPolizaString = ""
+
+ Dim ObjContabilidad As New ClsContabilidad
+
+ Dim TipoPolImp As String = ""
+
+
+ If ObjContabilidad.GetPrePoliza(CvePrePoliza, UsuarioActual.CveEmpresa) Then
+
+ Dim dr As DataRow = ObjContabilidad.DtResultados.FiltroPrimero("")
+
+ If dr IsNot Nothing Then
+
+ TipoPolImp = If(dr("CveTipoPoliza").ToString.ToEntero = 1, "Ingreso", If(dr("CveTipoPoliza").ToString.ToEntero = 2, "Egreso", "Diario"))
+ CveTipoPolizaImp = dr("CveTipoPoliza").ToString.ToEntero
+ ConceptoPolizaImp = dr("Concepto").ToString
+ FolioPoliza = dr("FolioPoliza").ToString
+ CveMonedaImp = dr("CveMoneda").ToString.ToEntero
+
+ Else
+ Alert("El documento solicitado no existe, favor de revisar su búsqueda.", TipoMensaje.MsgAdvertencia)
+ End If
+
+ End If
+
+ ObjContabilidad.Dispose()
+
+ Select Case CveTipoPolizaImp
+ Case 1
+ TipoPolizaString = "I"
+ Exit Select
+ Case 2
+ TipoPolizaString = "E"
+ Exit Select
+ Case Else
+ TipoPolizaString = "D"
+ Exit Select
+ End Select
+
+ If UsuarioActual.Empresa.Funcionalidad(282).ToEntero = 1 Then
+
+
+ Dim Archivo As System.IO.FileInfo
+
+ Dim ImpresionPersonalizada As Integer = UsuarioActual.Empresa.Funcionalidad(282).ToEntero
+
+ Archivo = New System.IO.FileInfo(String.Format("{0}Formatos/PolizasResumen.rdlc", UsuarioActual.Empresa.Ruta))
+ Dim Logo As New System.IO.FileInfo(String.Format("{0}Logo.png", UsuarioActual.Empresa.Ruta))
+
+ Dim ObjConta As New ClsContabilidad
+
+ If ObjConta.GetPrePolizasDetalleResumen(CvePrePoliza, UsuarioActual.CveEmpresa, ImpresionPersonalizada) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
+
+ Dim dr As DataRow
+ DtDetalle = ObjConta.DtResultados '.FiltraParametros("Contabilizable = 1", "Orden")
+ dr = DtDetalle.Rows(0)
+
+ params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
+ params.Add(New ReportParameter("TipoPoliza", TipoPolImp))
+ params.Add(New ReportParameter("Finicio", dr("Fecha").ToString.ToDate().ToString("dd/MM/yyyy")))
+ params.Add(New ReportParameter("FFin", dr("Fecha").ToString.ToDate().ToString("dd/MM/yyyy")))
+
+ params.Add(New ReportParameter("Fecha", dr("Fecha").ToString.ToDate().ToString("dd/MM/yyyy")))
+
+ params.Add(New ReportParameter("Numero", FolioPoliza))
+ params.Add(New ReportParameter("Moneda", If(CveMonedaImp = 2, "Dolar", "Peso Mexicano")))
+ params.Add(New ReportParameter("CodigoPostal", ""))
+
+ params.Add(New ReportParameter("UsuarioRegistro", UsuarioActual.Usuario))
+ params.Add(New ReportParameter("ConceptoPoliza", ConceptoPolizaImp))
+
+ params.Add(New ReportParameter("Folio", FolioPoliza))
+
+
+ If Logo.Exists Then
+ params.Add(New ReportParameter("pImg", $"file://{Logo.FullName}"))
+ Else
+ params.Add(New ReportParameter("pImg", ""))
+ End If
+
+
+ If Archivo.Exists Then
+ rutaArchivo = Archivo.FullName
+ Else
+ rutaArchivo = $"{DirectorioEmpresas}Grales\Formatos\PolizasResumen.rdlc"
+ End If
+
+
+ End If
+ ObjConta.Dispose()
+
+
+ Else
+
+ Dim Archivo = New System.IO.FileInfo(String.Format("{0}Formatos/Polizas.rdlc", UsuarioActual.Empresa.Ruta))
+ params = New List(Of ReportParameter)
+
+ Dim ObjConta As New ClsContabilidad
+ 'If ObjPoliza.GetPoliza(IdPoliza, -1, -1, -1, -1) AndAlso ObjPoliza.DtResultados.Rows.Count > 0 Then
+ If ObjConta.GetPrePolizasDetalle(CvePrePoliza, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
+
+ Dim dr As DataRow
+ DtDetalle = ObjConta.DtResultados.FiltraParametros("Contabilizable = 1", "Orden")
+ dr = DtDetalle.Rows(0)
+ Dim ruta As String = ""
+
+ 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))
+
+ If UsuarioActual.CveEmpresa.Contiene(141) Then
+ params.Add(New ReportParameter("Fecha", dr("Fecha").ToString.ToDate.ToString("dd/MM/yyyy hh:mm:ss")))
+ Else
+ params.Add(New ReportParameter("Fecha", dr("Fecha").ToString.ToDate.ToShortDateString))
+ End If
+
+ FolioPoliza = dr("FolioPoliza").ToString
+ params.Add(New ReportParameter("Numero", dr("FolioPoliza").ToString))
+ params.Add(New ReportParameter("Moneda", If(CveMonedaImp = 2, "Dolar", "Peso Mexicano")))
+ params.Add(New ReportParameter("CodigoPostal", ""))
+
+ If UsuarioActual.CveEmpresa.Contiene(119, 141) Then
+ params.Add(New ReportParameter("UsuarioRegistro", GlobalDTUsuarios(dr("CveUsuario").ToString.ToEntero).FiltroPrimeroValor("Nombre")))
+ End If
+ If UsuarioActual.CveEmpresa.Contiene(140, 141) Then
+ params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
+ End If
+
+ If Archivo.Exists Then
+ rutaArchivo = UsuarioActual.Empresa.Ruta & "Formatos/Polizas.rdlc"
+ Else
+ rutaArchivo = "Empresas/Grales/Formatos/Polizas.rdlc"
+ End If
+ End If
+ ObjConta.Dispose()
+ End If
+
+
+ ImprimirPDF(rutaArchivo, DtDetalle, params, $"P{TipoPolizaString}{FolioPoliza}", Formato:="PDF")
+
+
+
+
+ End Sub
+
+
+#End Region
+
End Class
diff --git a/Compras/Proveedores.aspx b/Compras/Proveedores.aspx
index 5f998a8ad..4596c2638 100644
--- a/Compras/Proveedores.aspx
+++ b/Compras/Proveedores.aspx
@@ -3629,67 +3629,97 @@
Cuenta Bancaria
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<%----%>
-
+
+
-
+
+
+
+
-
+
+
+
+
+
-
+
+
-
+
+
diff --git a/Compras/Proveedores.aspx.vb b/Compras/Proveedores.aspx.vb
index fe3667f6a..7ae3fd769 100644
--- a/Compras/Proveedores.aspx.vb
+++ b/Compras/Proveedores.aspx.vb
@@ -506,6 +506,7 @@ Partial Class Compras_Proveedores
CargaAnticipos(CveProveedorSucursal)
CargaBancos(CveProveedorSucursal)
CargaProveedorSucursales()
+ CargaCuentasBancarias()
CargaOC()
CargaDocs()
@@ -1729,7 +1730,7 @@ Partial Class Compras_Proveedores
''Agregar Cuentas Bancarias
If TempDTCuentasBancos.Rows.Count > 0 Then
For Each row As DataRow In TempDTCuentasBancos.Rows
- If Not ObjCuentasDeposito.AddCuentasDepositos(row("BancoNombre").ToString, row("Plaza").ToString, row("Sucursal").ToString, row("Cuenta").ToString, row("CLABE").ToString, row("CIE").ToString, row("SWIFT").ToString, row("Referencia").ToString, row("RefCrediProveedor").ToString, UsuarioActual.CveUsuario, row("CveMoneda").ToString.ToEntero,
+ If Not ObjCuentasDeposito.AddCuentasDepositos(row("BancoNombre").ToString, row("Plaza").ToString, row("Sucursal").ToString, row("Cuenta").ToString, row("CLABE").ToString, row("CIE").ToString, row("SWIFT").ToString, row("Referencia").ToString, row("RefCrediProveedor").ToString, UsuarioActual.CveUsuario, row("CveMoneda").ToString.ToEntero, UsuarioActual.CveEmpresa,
CveProveedor:=NuevoCveProveedor, Correo:=row("Correo").ToString, BBVAAlias:=row("BBVAAlias").ToString,
EstatusPagoElectronico:=Boolean.Parse(row("EstatusPagoElectronico").ToString), EstatusPagoElectronicoGrupos:=Boolean.Parse(row("EstatusPagoElectronicoGrupos").ToString), CveSATBanco:=row("CveSATBanco").ToString.ToEntero) Then
ErrorBancos = True
@@ -3091,37 +3092,30 @@ Partial Class Compras_Proveedores
' CargaCuentasBancarias()
'End Sub
Private Sub CargaCuentasBancarias()
- Dim ObjCuentasBancos As New ClsGenerales
+
ViewState("OrdenCuentasBancos") = ""
DTCuentasBancos = New DataTable
TempDTCuentasBancos = New DataTable
- If ObjCuentasBancos.GetCuentasDepositos(CveProveedor) Then
- DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados)
- Else
- Alert("No se pudieron cargar las cuentas bancarias. Por favor intente nuevamente.", TipoMensaje.MsgAdvertencia)
+ If CveProveedor > 0 Then
+ Dim ObjCuentasBancos As New ClsGenerales
+ If ObjCuentasBancos.GetCuentasDepositos(CveProveedor, CveEmpresa:=UsuarioActual.CveEmpresa) Then
+ DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados)
+ Else
+ Alert("No se pudieron cargar las cuentas bancarias. Por favor intente nuevamente.", TipoMensaje.MsgAdvertencia)
+ End If
+ ObjCuentasBancos.Dispose()
End If
+
If CveProveedor < 0 Then
'Alert("No hay proveedor", TipoMensaje.MsgInformacion)
TempDTCuentasBancos = DTCuentasBancos.Clone
- 'Esconde columna estatus
- 'THEstatus.Visible = False
- 'THEstatusTexto.Visible = False
- 'GvBancosCuentas.Columns(11).Visible = False 'Es la columna estatus CheckBox
-
- 'Mexicanada para acomadar las columnas'
- 'TDEstatusLayout.Visible = False
- 'TDEstatusTexto.Visible = False
-
End If
- ObjCuentasBancos.Dispose()
CargaPSGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString)
- RecargaGlobalCuentasBancarias()
-
End Sub
Protected Sub LbAgregarCuentaBanco_Click(sender As Object, e As EventArgs)
@@ -3213,21 +3207,22 @@ Partial Class Compras_Proveedores
CveMoneda As Integer, Moneda As String, Estatus As Boolean, Correo As String, BBVAAlias As String, EstatusPagoElectronico As Boolean, EstatusPagoElectronicoGrupos As Boolean, CveSATBanco As Integer,
ConceptoCIE As String)
- Dim ObjCuentasBancos As New ClsGenerales
+
If Modalidad = "A" Then
If CveProveedor > 0 Then
-
- If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor, UsuarioActual.CveUsuario, CveMoneda, CveProveedor:=CveProveedor,
+ Dim ObjCuentasBancos As New ClsGenerales
+ If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor, UsuarioActual.CveUsuario, CveMoneda, UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor,
Correo:=Correo, BBVAAlias:=BBVAAlias, EstatusPagoElectronico:=EstatusPagoElectronico, EstatusPagoElectronicoGrupos:=EstatusPagoElectronicoGrupos, CveSATBanco:=CveSATBanco, ConceptoCIE:=ConceptoCIE) Then
DTCuentasBancos.Clear()
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveProveedor = {0}", CveProveedor)))
Alert("Cuenta Bancaria agregada con éxito.", TipoMensaje.MsgInformacion)
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAddCuentasBancarias"))
+ CargaCuentasBancarias()
Else
Alert("Error al registrar la cuenta bancaria. Por favor intente nuevamente", TipoMensaje.MsgError)
End If
-
+ ObjCuentasBancos.Dispose()
Else
Dim Row As DataRow
Row = TempDTCuentasBancos.NewRow
@@ -3261,17 +3256,19 @@ Partial Class Compras_Proveedores
If CveProveedor > 0 Then
-
+ Dim ObjCuentasBancos As New ClsGenerales
If ObjCuentasBancos.UpdateCuentasDepositos(GvBancosCuentas.DataKeys(CveCuentaBancaria)("CveCuentaDeposito").ToString.ToEntero, NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor,
- False, Estatus, CveMoneda, Correo:=Correo, BBVAAlias:=BBVAAlias, EstatusPagoElectronico:=EstatusPagoElectronico, EstatusPagoElectronicoGrupos:=EstatusPagoElectronicoGrupos, CveSATBanco:=CveSATBanco,
+ False, Estatus, CveMoneda, UsuarioActual.CveEmpresa, Correo:=Correo, BBVAAlias:=BBVAAlias, EstatusPagoElectronico:=EstatusPagoElectronico, EstatusPagoElectronicoGrupos:=EstatusPagoElectronicoGrupos, CveSATBanco:=CveSATBanco,
ConceptoCIE:=ConceptoCIE) Then
DTCuentasBancos.Clear()
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveProveedor = {0}", CveProveedor)))
Alert("Cuenta actualizada con éxito.", TipoMensaje.MsgInformacion)
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAddCuentasBancarias"))
+ CargaCuentasBancarias()
Else
Alert("Error al actualizar la cuenta bancaria. Por favor intente nuevamente.", TipoMensaje.MsgError)
End If
+ ObjCuentasBancos.Dispose()
Else
@@ -3301,7 +3298,7 @@ Partial Class Compras_Proveedores
End If
End If
- ObjCuentasBancos.Dispose()
+
LimpiaCuentasBancarias()
CargaPSGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString)
RecargaGlobalCuentasBancarias()
@@ -3387,166 +3384,12 @@ Partial Class Compras_Proveedores
End If
End Sub
- ''Protected Sub GvBancosCuentas_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvBancosCuentas.RowEditing
- '' Dim id As Integer = e.NewEditIndex
- '' GvBancosCuentas.EditIndex = id
- '' CargaPSGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString)
-
- '' 'Dim x As String = GvBancosCuentas.SelectedRowStyle("EstatusPagoElectronico")
-
- '' 'If CBool(e.Row.DBCampo("EstatusPagoElectronico")) AndAlso e.Row.DBCampo("Referencia").ToString <> "" Then
-
- '' 'End If
-
- ''End Sub
- 'Protected Sub GvBancosCuentas_RowCancelingEdit(sender As Object, e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvBancosCuentas.RowCancelingEdit
- ' GvBancosCuentas.EditIndex = -1
- ' CargaPSGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString)
- 'End Sub
- 'Protected Sub GvBancosCuentas_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvBancosCuentas.RowUpdating
-
- ' Dim NombreBanco = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtNombreBanco").Text.Trim
- ' Dim NumeroSucursal = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtNumeroSucursal").Text.Trim
- ' Dim CLABE = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtCLABE").Text.Trim
- ' Dim SWIFT = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtSWIFT").Text.Trim
- ' Dim Plaza = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtPlaza").Text.Trim
- ' Dim NumeroCuenta = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtNumeroCuenta").Text.Trim
- ' Dim ConvenioCIE = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtConvenioCIE").Text.Trim
- ' Dim Referencia = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtReferencia").Text.Trim
- ' Dim RefCrediProveedor = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtRefCrediProveedor").Text.Trim
- ' Dim CveMoneda = GvBancosCuentas.Rows(e.RowIndex).FCDropDownList("DdlMoneda").SelectedValue.ToString.ToEntero
- ' Dim Moneda = GvBancosCuentas.Rows(e.RowIndex).FCDropDownList("DdlMoneda").SelectedItem.Text
- ' Dim Estatus = GvBancosCuentas.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked
-
- ' Dim EsBancomer = False
-
- ' If NombreBanco.ToUpper.Contains("BBVA") Or NombreBanco.ToUpper.Contains("BANCOMER") Or (CLABE.Length = 18 AndAlso CLABE.Substring(0, 3) = "012") Then
- ' EsBancomer = True
- ' End If
-
- ' ''COMENTADO PARA PERMITIR ENTRADA DE UNA CUENTA A PROVEEDOR, 22 DE SEPTIEMBRE, ISRAEL PIÑA
- ' 'If EsBancomer AndAlso (CLABE.Length <> 18 AndAlso Not CLABE.Substring(0, 3) = "012") Then
- ' ' Alert("La CLABE ingresada no pertenece a BANCOMER.", TipoMensaje.MsgAdvertencia)
- ' ' Exit Sub
- ' 'End If
-
- ' ''CLABE SIEMPRE OBLIGATORIA CUANDO NO ES BANCOMER CON CIE
- ' 'If (CLABE.Trim.Length <> 18 And Not EsBancomer) Or (EsBancomer And ConvenioCIE.Trim.Length <> 6 And CLABE.Trim.Length <> 18) Then
- ' ' Alert("La CLABE es obligatoria y debe tener una longitud de 18 dígitos. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
- ' ' Exit Sub
- ' 'End If
-
- ' 'QUE TENGA ALGUN DATO DE TIPO DE CUENTA
- ' If NumeroCuenta.Length = 0 AndAlso CLABE.Length = 0 AndAlso SWIFT.Length = 0 AndAlso ConvenioCIE.Length = 0 Then
- ' Alert("Debe especificar al menos un numero de cuenta.", TipoMensaje.MsgAdvertencia)
- ' Exit Sub
- ' End If
-
- ' 'SI CLABE TIENE ALGO DEBE TENER UNA LOGITUD EXACTA DE 18
- ' If CLABE.Trim.Length <> 0 AndAlso CLABE.Trim.Length <> 18 Then
- ' Alert("La CLABE debe tener una longitud de 18 dígitos. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
- ' Exit Sub
- ' End If
-
- ' If UsuarioActual.CveEmpresa = 66 Then
- ' 'CLABE SIEMPRE OBLIGATORIA SI NO ES BANCOMER
- ' If CLABE.Trim.Length <> 18 And CLABE.Trim.Length = 0 And Not EsBancomer And SWIFT.Length = 0 Then
- ' Alert("La CLABE es obligatoria y debe tener una longitud de 18 dígitos. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
- ' Exit Sub
- ' End If
-
- ' 'SI CUENTA TIENE ALGO Y BANCO BANCOMER DEBE TENER UNA LOGITUD EXACTA DE 10
- ' If NumeroCuenta.Trim.Length <> 0 AndAlso NumeroCuenta.Trim.Length <> 10 AndAlso EsBancomer Then
- ' Alert("El número de cuenta debe tener una longitud de 10 dígitos. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
- ' Exit Sub
- ' End If
-
- ' 'SI CIE TIENE ALGO REFERENCIA OBLIGATORIA
- ' If ConvenioCIE.Trim.Length <> 0 And Referencia.Trim.Length < 3 Then
- ' Alert("Cuando se ingresa Convenio CIE se debe especificar una referencia. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
- ' Exit Sub
- ' End If
-
- ' 'CUANDO SEA "BBVA" O "BANCOMER" DEBE TENER "CIE" O "CUENTA"
- ' If EsBancomer AndAlso Not (NumeroCuenta.Trim.Length = 10 Or ConvenioCIE.Trim.Length <> 0) Then
- ' Alert("Para cuentas BBVA BANCOMER es obligatorio el Número de Cuenta o CIE.", TipoMensaje.MsgAdvertencia)
- ' Exit Sub
- ' End If
- ' Else
- ' 'SI CIE TIENE ALGO DEBE TENER UNA LOGITUD MINIMA DE 5
- ' If ConvenioCIE.Trim.Length <> 0 And ConvenioCIE.Trim.Length < 5 Then
- ' Alert("El Convenio CIE debe tener una longitud de al menos 5 dígitos. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
- ' Exit Sub
- ' End If
- ' End If
-
-
-
- ' Dim ObjCuentasBancos As New ClsGenerales
- ' If CveProveedor > 0 Then
- ' If ObjCuentasBancos.UpdateCuentasDepositos(GvBancosCuentas.DataKeys(e.RowIndex)("CveCuentaDeposito").ToString.ToEntero, NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor, False, Estatus, CveMoneda) Then
- ' DTCuentasBancos.Clear()
- ' DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveProveedor = {0}", CveProveedor)))
- ' Alert("Cuenta actualizada con éxito.", TipoMensaje.MsgInformacion)
- ' Else
- ' Alert("Error al actualizar la cuenta bancaria. Por favor intente nuevamente.", TipoMensaje.MsgError)
- ' End If
- ' Else
- ' Dim index = GvBancosCuentas.Rows(e.RowIndex).DataKey("CveCuentaDeposito").ToString.ToEntero - 1
- ' Dim Row As DataRow = TempDTCuentasBancos.Rows(index)
- ' Row("BancoNombre") = NombreBanco
- ' Row("Sucursal") = NumeroSucursal
- ' Row("CLABE") = CLABE
- ' Row("SWIFT") = SWIFT
- ' Row("Plaza") = Plaza
- ' Row("Cuenta") = NumeroCuenta
- ' Row("CIE") = ConvenioCIE
- ' Row("Referencia") = Referencia
- ' Row("RefCrediProveedor") = RefCrediProveedor
- ' Row("CveMoneda") = CveMoneda
- ' Row("Moneda") = Moneda
- ' Row("Estatus") = Estatus
- ' TempDTCuentasBancos.AcceptChanges()
- ' End If
-
- ' ObjCuentasBancos.Dispose()
-
- ' GvBancosCuentas.EditIndex = -1
- ' CargaPSGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString)
- ' RecargaGlobalCuentasBancarias()
- 'End Sub
- 'Protected Sub GvBancosCuentas_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvBancosCuentas.RowDeleting
- ' Dim ObjCuentasBancos As New ClsGenerales
-
- ' If CveProveedor > 0 Then
- ' If ObjCuentasBancos.RemoveCuentasDepositos(GvBancosCuentas.DataKeys(e.RowIndex)("CveCuentaDeposito").ToString.ToEntero) Then
- ' DTCuentasBancos.Clear()
- ' DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveProveedor = {0}", CveProveedor)))
-
- ' Alert("Cuenta Bancaria borrada con éxito.", TipoMensaje.MsgInformacion)
- ' Else
- ' Alert("No se pudo borrar la Cuenta Bancaria. Por favor intente nuevamente.", TipoMensaje.MsgError)
- ' End If
- ' Else
- ' Dim index = GvBancosCuentas.Rows(e.RowIndex).DataKey("CveCuentaDeposito").ToString.ToEntero - 1
- ' TempDTCuentasBancos.Rows.RemoveAt(index)
- ' End If
-
- ' If ObjCuentasBancos.GetCuentasDepositos Then
- ' GlobalDTProveedoresCuentas(CveProveedor, True) = ObjCuentasBancos.DtResultados
- ' End If
-
- ' CargaPSGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString)
- ' ObjCuentasBancos.Dispose()
- ' RecargaGlobalCuentasBancarias()
- 'End Sub
-
Public Sub Delete_Click(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
Dim ObjCuentasBancos As New ClsGenerales
If CveProveedor > 0 Then
- If ObjCuentasBancos.RemoveCuentasDepositos(GvRow.DataKey("CveCuentaDeposito").ToEntero) Then
+ If ObjCuentasBancos.RemoveCuentasDepositos(GvRow.DataKey("CveCuentaDeposito").ToEntero, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
DTCuentasBancos.Clear()
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveProveedor = {0}", CveProveedor)))
@@ -3567,12 +3410,7 @@ Partial Class Compras_Proveedores
Private Sub RecargaGlobalCuentasBancarias(Optional ByVal CveCuenta As Integer = -1)
If CveProveedor > 0 Then
GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, -1) = Nothing
- 'Dim ObjCuentasBancos As New ClsGenerales
- 'If ObjCuentasBancos.GetCuentasDepositos() Then
- ' GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, -1, True) = ObjCuentasBancos.DtResultados
- 'End If
- 'ObjCuentasBancos.Dispose()
End If
End Sub
@@ -6277,7 +6115,7 @@ Partial Class Compras_Proveedores
Protected Sub ChkPagoElectronico_CheckedChanged(sender As Object, e As EventArgs)
If ChkPagoElectronico.Checked Then
- Alert("Se está activando manualmente el pago por Layout BBVA. Recuerde que la alta se realiza directo en la platoforma", TipoMensaje.MsgAdvertencia)
+ Alert("Se está activando manualmente el pago por Layout BBVA. Recuerde que la alta se realiza directo en la plataforma", TipoMensaje.MsgAdvertencia)
End If
End Sub
diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb
index d8eee866b..2cf6d06aa 100644
--- a/Contabilidad/RegPrePolizaS.aspx.vb
+++ b/Contabilidad/RegPrePolizaS.aspx.vb
@@ -1,6 +1,7 @@
Imports System.Data
Imports System.Net.NetworkInformation
+Imports ADSNetLibrary.SIGAPI.Models.OC.Response
'Imports DocumentFormat.OpenXml
Imports Extensiones
Imports GemBox.Spreadsheet
@@ -309,6 +310,7 @@ Partial Class ContabilidadC_RegPrePolizaS
End If
+ ImprimeImPrimePrePolizaS(CvePrePoliza)
Exit Sub
@@ -2734,8 +2736,8 @@ Partial Class ContabilidadC_RegPrePolizaS
End If
-
End Sub
+
Private Sub ImprimirPolizaPDF(IdPoliza As Integer)
'Dim ObjPoliza As New ClsContPAQi(UsuarioActual.Empresa)
@@ -2787,12 +2789,6 @@ Partial Class ContabilidadC_RegPrePolizaS
End If
-
-
-
-
-
-
'Return String.Format("{0}\{1}\{2}.pdf", AppDomain.CurrentDomain.BaseDirectory, Tick, IdPoliza.ToString)
ObjConta.Dispose()
@@ -3246,8 +3242,6 @@ Partial Class ContabilidadC_RegPrePolizaS
Dim Logo As New System.IO.FileInfo(String.Format("{0}Logo.png", UsuarioActual.Empresa.Ruta))
-
-
Dim ObjConta As New ClsContabilidad
'If ObjPoliza.GetPoliza(IdPoliza, -1, -1, -1, -1) AndAlso ObjPoliza.DtResultados.Rows.Count > 0 Then
If ObjConta.GetPrePolizasDetalleResumen(CvePrePoliza, UsuarioActual.CveEmpresa, ImpresionPersonalizada) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
@@ -3327,5 +3321,172 @@ Partial Class ContabilidadC_RegPrePolizaS
'End Sub
+ Public Sub ImprimeImPrimePrePolizaS(CvePrePoliza As Integer)
+
+
+
+
+ If Not CvePrePoliza > 0 Then
+ Exit Sub
+ End If
+
+
+ 'ObjContabilidad.Dispose()
+
+ Dim rutaArchivo As String = ""
+ Dim params As New List(Of ReportParameter)
+ Dim Bytes As Byte() = Nothing
+ Dim DtDetalle As New DataTable
+ Dim CveTipoPolizaImp As Integer = 0
+ Dim FolioPoliza As String = ""
+ Dim ConceptoPolizaImp As String = ""
+ Dim CveMonedaImp As Integer = 0
+ Dim TipoPolizaString = ""
+
+ Dim ObjContabilidad As New ClsContabilidad
+
+ Dim TipoPolImp As String = ""
+
+
+ If ObjContabilidad.GetPrePoliza(CvePrePoliza, UsuarioActual.CveEmpresa) Then
+
+ Dim dr As DataRow = ObjContabilidad.DtResultados.FiltroPrimero("")
+
+ If dr IsNot Nothing Then
+
+ TipoPolImp = If(dr("CveTipoPoliza").ToString.ToEntero = 1, "Ingreso", If(dr("CveTipoPoliza").ToString.ToEntero = 2, "Egreso", "Diario"))
+ CveTipoPolizaImp = dr("CveTipoPoliza").ToString.ToEntero
+ ConceptoPolizaImp = dr("Concepto")
+ FolioPoliza = dr("FolioPoliza").ToString
+ CveMonedaImp = dr("CveMoneda").ToString.ToEntero
+
+ Else
+ Alert("El documento solicitado no existe, favor de revisar su búsqueda.", TipoMensaje.MsgAdvertencia)
+ End If
+
+ End If
+
+ ObjContabilidad.Dispose()
+
+ Select Case CveTipoPolizaImp
+ Case 1
+ TipoPolizaString = "I"
+ Exit Select
+ Case 2
+ TipoPolizaString = "E"
+ Exit Select
+ Case Else
+ TipoPolizaString = "D"
+ Exit Select
+ End Select
+
+ If UsuarioActual.Empresa.Funcionalidad(282).ToEntero = 1 Then
+
+
+ Dim Archivo As System.IO.FileInfo
+
+ Dim ImpresionPersonalizada As Integer = UsuarioActual.Empresa.Funcionalidad(282).ToEntero
+
+ Archivo = New System.IO.FileInfo(String.Format("{0}Formatos/PolizasResumen.rdlc", UsuarioActual.Empresa.Ruta))
+ Dim Logo As New System.IO.FileInfo(String.Format("{0}Logo.png", UsuarioActual.Empresa.Ruta))
+
+ Dim ObjConta As New ClsContabilidad
+
+ If ObjConta.GetPrePolizasDetalleResumen(CvePrePoliza, UsuarioActual.CveEmpresa, ImpresionPersonalizada) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
+
+ Dim dr As DataRow
+ DtDetalle = ObjConta.DtResultados '.FiltraParametros("Contabilizable = 1", "Orden")
+ dr = DtDetalle.Rows(0)
+
+ params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
+ params.Add(New ReportParameter("TipoPoliza", TipoPolImp))
+ params.Add(New ReportParameter("Finicio", dr("Fecha").ToString.ToDate().ToString("dd/MM/yyyy")))
+ params.Add(New ReportParameter("FFin", dr("Fecha").ToString.ToDate().ToString("dd/MM/yyyy")))
+
+ params.Add(New ReportParameter("Fecha", dr("Fecha").ToString.ToDate().ToString("dd/MM/yyyy")))
+
+ params.Add(New ReportParameter("Numero", FolioPoliza))
+ params.Add(New ReportParameter("Moneda", If(CveMonedaImp = 2, "Dolar", "Peso Mexicano")))
+ params.Add(New ReportParameter("CodigoPostal", ""))
+
+ params.Add(New ReportParameter("UsuarioRegistro", UsuarioActual.Usuario))
+ params.Add(New ReportParameter("ConceptoPoliza", ConceptoPolizaImp))
+
+ params.Add(New ReportParameter("Folio", FolioPoliza))
+
+
+ If Logo.Exists Then
+ params.Add(New ReportParameter("pImg", $"file://{Logo.FullName}"))
+ Else
+ params.Add(New ReportParameter("pImg", ""))
+ End If
+
+
+ If Archivo.Exists Then
+ rutaArchivo = Archivo.FullName
+ Else
+ rutaArchivo = $"{DirectorioEmpresas}Grales\Formatos\PolizasResumen.rdlc"
+ End If
+
+
+ End If
+ ObjConta.Dispose()
+
+
+ Else
+
+ Dim Archivo = New System.IO.FileInfo(String.Format("{0}Formatos/Polizas.rdlc", UsuarioActual.Empresa.Ruta))
+ params = New List(Of ReportParameter)
+
+ Dim ObjConta As New ClsContabilidad
+ 'If ObjPoliza.GetPoliza(IdPoliza, -1, -1, -1, -1) AndAlso ObjPoliza.DtResultados.Rows.Count > 0 Then
+ If ObjConta.GetPrePolizasDetalle(CvePrePoliza, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
+
+ Dim dr As DataRow
+ DtDetalle = ObjConta.DtResultados.FiltraParametros("Contabilizable = 1", "Orden")
+ dr = DtDetalle.Rows(0)
+ Dim ruta As String = ""
+
+ 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))
+
+ If UsuarioActual.CveEmpresa.Contiene(141) Then
+ params.Add(New ReportParameter("Fecha", dr("Fecha").ToString.ToDate.ToString("dd/MM/yyyy hh:mm:ss")))
+ Else
+ params.Add(New ReportParameter("Fecha", dr("Fecha").ToString.ToDate.ToShortDateString))
+ End If
+
+ FolioPoliza = dr("FolioPoliza").ToString
+ params.Add(New ReportParameter("Numero", dr("FolioPoliza").ToString))
+ params.Add(New ReportParameter("Moneda", If(CveMonedaImp = 2, "Dolar", "Peso Mexicano")))
+ params.Add(New ReportParameter("CodigoPostal", ""))
+
+ If UsuarioActual.CveEmpresa.Contiene(119, 141) Then
+ params.Add(New ReportParameter("UsuarioRegistro", GlobalDTUsuarios(dr("CveUsuario").ToString.ToEntero).FiltroPrimeroValor("Nombre")))
+ End If
+ If UsuarioActual.CveEmpresa.Contiene(140, 141) Then
+ params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
+ End If
+
+ If Archivo.Exists Then
+ rutaArchivo = UsuarioActual.Empresa.Ruta & "Formatos/Polizas.rdlc"
+ Else
+ rutaArchivo = "Empresas/Grales/Formatos/Polizas.rdlc"
+ End If
+ End If
+ ObjConta.Dispose()
+ End If
+
+
+ ImprimirPDF(rutaArchivo, DtDetalle, params, $"P{TipoPolizaString}{FolioPoliza}", Formato:="PDF")
+
+
+
+
+ End Sub
+
+
End Class
diff --git a/Contabilidad/RepIVA.aspx.cs b/Contabilidad/RepIVA.aspx.cs
index b3f6be587..4c8bbe71f 100644
--- a/Contabilidad/RepIVA.aspx.cs
+++ b/Contabilidad/RepIVA.aspx.cs
@@ -201,17 +201,17 @@ public partial class Contabilidad_RepIVA : ClsPaginas
if (GvT.Rows.Count > 0 || GvA.Rows.Count > 0)
{
System.IO.FileInfo Imagen;
- String logouri = "";
+ // String logouri = "";
if (UsuarioActual.CveEmpresa.Contiene(119))
{
Imagen = new System.IO.FileInfo(String.Format("{0}/Logo.jpg", UsuarioActual.Empresa.Ruta));
- logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa);
+ //logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa);
}
else
{
Imagen = new System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png");
- logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa);
+ //logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa);
}
List para = new List();
@@ -220,7 +220,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas
para.Add(new CrystalParametro("Filtros", $"Filtros: {FechaI}{FechaF}{TipoMov}"));
if (Imagen.Exists)
{
- para.Add(new CrystalParametro("LogoPath", logouri));
+ para.Add(new CrystalParametro("LogoPath", Imagen.FullName));
}
else
{
diff --git a/Contabilidad2/RepEstadoResultadosHorizontal.aspx b/Contabilidad2/RepEstadoResultadosHorizontal.aspx
index e86df99c4..2062aebd0 100644
--- a/Contabilidad2/RepEstadoResultadosHorizontal.aspx
+++ b/Contabilidad2/RepEstadoResultadosHorizontal.aspx
@@ -159,7 +159,10 @@
-
+
+
+
+
@@ -1413,6 +1416,11 @@
+
+
+
+
+
diff --git a/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb b/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb
index a5a1825d9..fc4e90480 100644
--- a/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb
+++ b/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb
@@ -458,8 +458,8 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
LblTri.Visible = False
DVTri.Visible = False
- LiPeriodoDdl.Visible = False
- LiPeriodoLbl.Visible = False
+ LiPeriodoDdl.Visible = True
+ LiPeriodoLbl.Visible = True
DdlPeriodo.SelectedValueExist(12)
End If
@@ -1655,7 +1655,12 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
IndexData = 13
For IndexData = 13 To IndexMax
Row.Item(IndexData) = DtIngresosAnualH.SUM($"[{DtIngresosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)")
- Row.Item($"Porcentaje{DtIngresosAnualH.Columns(IndexData).ColumnName}") = DtIngresosAnualH.SUM($"[{DtIngresosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)") * 100 / DtIngresosAnualH.SUM("ImporteAcumulado", "NOT CtaMayor in (3,4)")
+ If DtIngresosAnualH.SUM($"[{DtIngresosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)") > 0 Then
+ Row.Item($"Porcentaje{DtIngresosAnualH.Columns(IndexData).ColumnName}") = DtIngresosAnualH.SUM($"[{DtIngresosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)") * 100 / DtIngresosAnualH.SUM("ImporteAcumulado", "NOT CtaMayor in (3,4)")
+ Else
+ Row.Item($"Porcentaje{DtIngresosAnualH.Columns(IndexData).ColumnName}") = "0"
+ End If
+
Next
@@ -1730,7 +1735,16 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
IndexData = 13
For IndexData = 13 To IndexMax
Row.Item(IndexData) = DtGastosAnualH.SUM($"[{DtGastosAnualH.Columns(IndexData).ColumnName}]", "Not CtaMayor In (3,4)")
- Row.Item($"Porcentaje{DtGastosAnualH.Columns(IndexData).ColumnName}") = DtGastosAnualH.SUM($"[{DtGastosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)") * 100 / DtGastosAnualH.SUM("ImporteAcumulado", "NOT CtaMayor in (3,4)")
+
+
+ If DtGastosAnualH.SUM($"[{DtGastosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)") > 0 Then
+ Row.Item($"Porcentaje{DtGastosAnualH.Columns(IndexData).ColumnName}") = DtGastosAnualH.SUM($"[{DtGastosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)") * 100 / DtGastosAnualH.SUM("ImporteAcumulado", "NOT CtaMayor in (3,4)")
+ Else
+ Row.Item($"Porcentaje{DtGastosAnualH.Columns(IndexData).ColumnName}") = "0"
+ End If
+
+
+
Next
Row.Item("Nombre") = "TOTAL GASTOS"
@@ -1757,7 +1771,16 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
IndexData = 13
For IndexData = 13 To IndexMax
Row.Item(IndexData) = DtIngresosAnualH.SUM($"[{DtIngresosAnualH.Columns(IndexData).ColumnName}]", "Not CtaMayor In (-1,3,4)") - DtGastosAnualH.SUM($"[{DtGastosAnualH.Columns(IndexData).ColumnName}]", "Not CtaMayor In (-1,3,4)")
- Row.Item($"Porcentaje{DtIngresosAnualH.Columns(IndexData).ColumnName}") = DtIngresosAnualH.SUM($"[{DtIngresosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (-1,3,4)") * 100 / DtIngresosAnualH.SUM("ImporteAcumulado", "NOT CtaMayor in (-1,3,4)")
+
+
+ If DtIngresosAnualH.SUM($"[{DtIngresosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (-1,3,4)") > 0 Then
+ Row.Item($"Porcentaje{DtIngresosAnualH.Columns(IndexData).ColumnName}") = DtIngresosAnualH.SUM($"[{DtIngresosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (-1,3,4)") * 100 / DtIngresosAnualH.SUM("ImporteAcumulado", "NOT CtaMayor in (-1,3,4)")
+ Else
+ Row.Item($"Porcentaje{DtIngresosAnualH.Columns(IndexData).ColumnName}") = "0"
+ End If
+
+
+
Next
Row.Item("Nombre") = "Resultados del Ejercicio"
@@ -2131,11 +2154,6 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
Row.Item("CtaMayor") = -1
DtIngresosSubProyectoH.Rows.Add(Row)
- Row.Item("Nombre") = "TOTAL INGRESOS "
- Row.Item("ImporteActual") = "0.00"
- Row.Item("ImporteAcumulado") = "0.00"
- Row.Item("CtaMayor") = -1
- DtIngresosSubProyectoH.Rows.Add(Row)
End If
Dim T1 = TotalActual, T2 = TotalAnterior
diff --git a/Empresas/119/Formatos/RepIVAAcreditable.rpt b/Empresas/119/Formatos/RepIVAAcreditable.rpt
index 2874e9072..a1124d4e7 100644
Binary files a/Empresas/119/Formatos/RepIVAAcreditable.rpt and b/Empresas/119/Formatos/RepIVAAcreditable.rpt differ
diff --git a/General/ColectivasDetalle.aspx.vb b/General/ColectivasDetalle.aspx.vb
index 2141cb428..33d300abc 100644
--- a/General/ColectivasDetalle.aspx.vb
+++ b/General/ColectivasDetalle.aspx.vb
@@ -112,7 +112,7 @@ Partial Class General_ColectivasDetalle
If TempDTCuentasBancos.Rows.Count > 0 Then
For Each row As DataRow In TempDTCuentasBancos.Rows
- If Not ObjCuentasDeposito.AddCuentasDepositos(row("BancoNombre").ToString, row("Plaza").ToString, row("Sucursal").ToString, row("Cuenta").ToString, row("CLABE").ToString, row("CIE").ToString, row("SWIFT").ToString, row("Referencia").ToString, "", UsuarioActual.CveUsuario, 1, CveColectiva:=NuevoCveColectiva) Then
+ If Not ObjCuentasDeposito.AddCuentasDepositos(row("BancoNombre").ToString, row("Plaza").ToString, row("Sucursal").ToString, row("Cuenta").ToString, row("CLABE").ToString, row("CIE").ToString, row("SWIFT").ToString, row("Referencia").ToString, "", UsuarioActual.CveUsuario, 1, UsuarioActual.CveEmpresa, CveColectiva:=NuevoCveColectiva) Then
ErrorBancos = True
End If
Next
@@ -205,7 +205,7 @@ Partial Class General_ColectivasDetalle
Dim Row As DataRow
If CveColectiva > 0 Then
- If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, "", UsuarioActual.CveUsuario, 1, CveColectiva:=CveColectiva) Then
+ If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, "", UsuarioActual.CveUsuario, 1, UsuarioActual.CveEmpresa, CveColectiva:=CveColectiva) Then
DTCuentasBancos.Clear()
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveColectiva = {0}", CveColectiva)))
@@ -294,7 +294,7 @@ Partial Class General_ColectivasDetalle
Dim ObjCuentasBancos As New ClsGenerales
If CveColectiva > 0 Then
- If ObjCuentasBancos.UpdateCuentasDepositos(GvBancosCuentas.DataKeys(e.RowIndex)("CveCuentaDeposito").ToString.ToEntero, NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, "", False, True, 1) Then
+ If ObjCuentasBancos.UpdateCuentasDepositos(GvBancosCuentas.DataKeys(e.RowIndex)("CveCuentaDeposito").ToString.ToEntero, NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, "", False, True, 1, UsuarioActual.CveEmpresa) Then
DTCuentasBancos.Clear()
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveColectiva = {0}", CveColectiva)))
Alert("Cuenta actualizada con éxito.", TipoMensaje.MsgInformacion)
@@ -322,7 +322,7 @@ Partial Class General_ColectivasDetalle
Dim ObjCuentasBancos As New ClsGenerales
If CveColectiva > 0 Then
- If ObjCuentasBancos.RemoveCuentasDepositos(GvBancosCuentas.DataKeys(e.RowIndex)("CveCuentaDeposito").ToString.ToEntero) Then
+ If ObjCuentasBancos.RemoveCuentasDepositos(GvBancosCuentas.DataKeys(e.RowIndex)("CveCuentaDeposito").ToString.ToEntero, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
DTCuentasBancos.Clear()
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveColectiva = {0}", CveColectiva)))
Alert("Cuenta Bancaria borrada con éxito.", TipoMensaje.MsgInformacion)
diff --git a/General/SaldosIniciales.aspx.vb b/General/SaldosIniciales.aspx.vb
index 2d3778ac7..67d851a82 100644
--- a/General/SaldosIniciales.aspx.vb
+++ b/General/SaldosIniciales.aspx.vb
@@ -1170,7 +1170,7 @@ Partial Class General_SaldosIniciales
If Not ErrorCuentaDeposito Then
Dim ObjGrales As New ClsGenerales(ObjProv.IniciaTransacSQL)
- If Not ObjGrales.AddCuentasDepositos(Banco, "-1", "-1", NumeroCuenta, ClabeInter, "-1", "-1", "-1", "-1", UsuarioActual.CveUsuario, 1, CveProveedor:=ObjProv.CveProveedor) Then
+ If Not ObjGrales.AddCuentasDepositos(Banco, "-1", "-1", NumeroCuenta, ClabeInter, "-1", "-1", "-1", "-1", UsuarioActual.CveUsuario, 1, UsuarioActual.CveEmpresa, CveProveedor:=ObjProv.CveProveedor) Then
'ErrorProv = True
End If
End If
@@ -1811,6 +1811,9 @@ Partial Class General_SaldosIniciales
If Not dt.Columns.Contains("CveCuentaContable") Then
dt.Columns.Add("CveCuentaContable", GetType(Integer))
End If
+ If Not dt.Columns.Contains("CveCuentaContableDepreciacion") Then
+ dt.Columns.Add("CveCuentaContableDepreciacion", GetType(Integer))
+ End If
Dim sbErrores As New StringBuilder
For Each Row As DataRow In dt.Rows
@@ -1830,6 +1833,18 @@ Partial Class General_SaldosIniciales
ErrorAF = True
End If
End If
+ CuentaContable = Row("Cuenta Depreciación").ToString().Trim.Replace("-", "").Replace(" ", "")
+
+ If CuentaContable.Length > 0 Then
+ Dim CveCuentaContable As Integer = DTCuentasContables.FiltroPrimeroValor("CveCuenta", $"Codigo ='{CuentaContable}'").ToEntero()
+
+ If CveCuentaContable > 0 Then
+ Row("CveCuentaContableDepreciacion") = CveCuentaContable
+ Else
+ sbErrores.AppendLine($"Activo Fijo {Codigo} {Descripcion} cuenta {CuentaContable} no encontrada. ")
+ ErrorAF = True
+ End If
+ End If
Next
If Not ErrorAF Then
@@ -1840,9 +1855,11 @@ Partial Class General_SaldosIniciales
End If
Dim ObjAF As New ClsAF
+ ObjAF.IniciaTransacSQL()
+ Dim ObjConta As New ClsContabilidad(ObjAF.IniciaTransacSQL)
Try
- ObjAF.IniciaTransacSQL()
+
Dim Contador As Integer = 0
Dim NumRow As Integer = 0
@@ -1872,7 +1889,7 @@ Partial Class General_SaldosIniciales
Dim CveEstadoActivoFijo As Integer = GlobalDTEstadoActivoFijo().FiltroPrimeroValor("CveEstadoActivoFijo", $"EstadoActivoFijo = '{Estado}'").ToString().ToEntero()
Dim CveCliente As Integer = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveCliente", $"Nombre = '{Cliente}'").ToString().ToEntero()
Dim CveCuentaContable As Integer = Row("CveCuentaContable").ToString().ToEntero()
-
+ Dim CveCuentaContableDepreciacion As Integer = Row("CveCuentaContable").ToString().ToEntero()
'VALIDACIONES
If Not CveSubTipoAF > 0 Then Alert($"No se encontró el SubTipo: {TipoAF} Descripcion: {Descripcion} Renglón: {NumRow}: ", TipoMensaje.MsgAdvertencia) : ErrorAF = True : Exit For
@@ -1890,27 +1907,27 @@ Partial Class General_SaldosIniciales
If CveAF > 0 Then
If CveCuentaContable > 0 Then
-
- Dim ObjConta As New ClsContabilidad(ObjAF.IniciaTransacSQL)
-
If Not ObjConta.AddCuentasAsignaciones(49, UsuarioActual.CveEmpresa, CveCuentaContable, -1,
-1, -1, -1, -1, -1, 0, CveBancoCuenta:=-1, CveConceptoNomina:=-1, CveSubProyecto:=-1, CveActivoFijo:=CveAF,
CveTipoGasto:=-1, RegeneraCuenta:=False) Then
ErrorAF = True
End If
-
+ End If
+ If CveCuentaContableDepreciacion > 0 Then
+ If Not ObjConta.AddCuentasAsignaciones(101, UsuarioActual.CveEmpresa, CveCuentaContableDepreciacion, -1,
+ -1, -1, -1, -1, -1, 0, CveBancoCuenta:=-1, CveConceptoNomina:=-1, CveSubProyecto:=-1, CveActivoFijo:=CveAF,
+ CveTipoGasto:=-1, RegeneraCuenta:=False) Then
+ ErrorAF = True
+ End If
End If
Else
ErrorAF = True
Exit For
End If
End If
-
-
NumRow = NumRow + 1
Next
-
If Not ErrorAF Then
If Contador > 0 Then
Alert(String.Format("Se agregaron: {0} Activos Fijos correctamente. Se Omitieron: {1} Activos Fijos ya que ya se encontraban registrados.", NumRows - Contador, Contador), TipoMensaje.MsgInformacion)
@@ -1933,19 +1950,17 @@ Partial Class General_SaldosIniciales
Finally
ObjAF.Dispose()
+ ObjConta.Dispose()
End Try
#End Region
-
-
' C U E N T A S C O N T A B L E S
ElseIf RblFormato.SelectedValue = "8" Then
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
ObjConta.IniciaTransacSQL()
Try
-
Dim TieneError As Boolean = False
Dim ContadorUpdate As Integer = 0
Dim ContadorError As Integer = 0
diff --git a/Inventarios/PopUpExistenciasAlmacen.aspx.vb b/Inventarios/PopUpExistenciasAlmacen.aspx.vb
index 029c3cf8a..06de2d38f 100644
--- a/Inventarios/PopUpExistenciasAlmacen.aspx.vb
+++ b/Inventarios/PopUpExistenciasAlmacen.aspx.vb
@@ -77,7 +77,7 @@ Partial Class Inventarios_Default
DivEquivalentes.Visible = True
DivPS.Visible = False
End If
- If UsuarioActual.CveEmpresa = 119 AndAlso UsuarioActual.CveUsuario.Contiene(1703, 100) Then
+ If UsuarioActual.CveEmpresa = 119 Then
TrCompuesto.Visible = True
End If
Dim Txt As String = IfNull(Request("Txt"), "").ToString
@@ -98,7 +98,7 @@ Partial Class Inventarios_Default
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
CargarDatosMedRin()
CargaEquivalencia()
- ElseIf UsuarioActual.CveEmpresa = 119 AndAlso UsuarioActual.CveUsuario.Contiene(1703, 100) Then
+ ElseIf UsuarioActual.CveEmpresa = 119 Then
CargaDatosCompuesto()
Else
CargaDatos(DDlPS.SelectedValue.ToEntero, 1)
diff --git a/Inventarios/TraspasoAlmacen.aspx.vb b/Inventarios/TraspasoAlmacen.aspx.vb
index 2394c7a2c..39c126845 100644
--- a/Inventarios/TraspasoAlmacen.aspx.vb
+++ b/Inventarios/TraspasoAlmacen.aspx.vb
@@ -1006,13 +1006,15 @@ Partial Class Inventarios_TraspasoAlmacen
Dim CveConceptoEntrada As Integer = 27
If Not ChkTransitorio.Checked Then CveConceptoEntrada = 27 Else CveConceptoEntrada = 9
+ Dim CveFolioGarantia As Integer = Request.QueryString("CveFolioGarantia").ToEntero
+
'AGREGAMOS LA SALIDA DEL ALMACEN ORIGEN
CveMovimientoSalida = ObjInventario.AddMovimiento(DdlAlmacenOrigen.SelectedValue.ToEntero, TipoMovimientoSalida, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1,
Observaciones:=TxtObservaciones.Text.Trim, Recibio:=If(ChkTransitorio.Checked, TxtResponsable.Text.Trim, "-1"),
CveAlmacenDestino:=DdlAlmacenDestino.SelectedValue.ToEntero, GastoIndirecto:=If(ChkTransitorio.Checked And TxtGastoIndirecto.Text.ToDouble > 0, TxtGastoIndirecto.Text, "-1").ToDouble,
CveChofer:=If(ChkTransitorio.Checked, DdlChofer.SelectedValue.ToEntero, -1), Placa:="", FechaEntrega:=If(ChkTransitorio.Checked, TxtFechaEntrega.Text.Trim.ToDateTime.ToString("dd/MM/yyyy"), "-1"), EspecifUnidad:="",
ResponsableCarga:="", ResponsableRecibio:="", Identificacion:="", Domicilio:="",
- Telefono:="", Ciudad:="", Licencia:="", Modulo:="TA/G2")
+ Telefono:="", Ciudad:="", Licencia:="", Modulo:="TA/G2", CveFolioGarantia:=If(CveFolioGarantia > 0, CveFolioGarantia, -1))
FolioSalida = ObjInventario.Folio
Folio = ObjInventario.Folio
If CveMovimientoSalida <= 0 Then
@@ -1033,7 +1035,7 @@ Partial Class Inventarios_TraspasoAlmacen
'ENTRADA
CveMovimientoEntrada = ObjInventario.AddMovimiento(CveAlmacenEntrada, CveConceptoEntrada, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, -1, -1,
Observaciones:=TxtObservaciones.Text.Trim, Recibio:=If(ChkTransitorio.Checked, TxtResponsable.Text.Trim, "-1"),
- CveAlmacenDestino:=If(ChkTransitorio.Checked, DdlAlmacenDestino.SelectedValue.ToEntero, -1), CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="TA/G3")
+ CveAlmacenDestino:=If(ChkTransitorio.Checked, DdlAlmacenDestino.SelectedValue.ToEntero, -1), CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="TA/G3", CveFolioGarantia:=If(CveFolioGarantia > 0, CveFolioGarantia, -1))
FolioEntrada = ObjInventario.Folio
If CveMovimientoEntrada <= 0 Then
TextoError = "Ocurrió un error al generar el movimiento de entrada"
diff --git a/OC/RepOCSinFactura.aspx b/OC/RepOCSinFactura.aspx
index 026109788..d42dba4b3 100644
--- a/OC/RepOCSinFactura.aspx
+++ b/OC/RepOCSinFactura.aspx
@@ -69,7 +69,7 @@
-
+
diff --git a/OC/RepOCSinFactura.aspx.vb b/OC/RepOCSinFactura.aspx.vb
index ef5494c07..508f7bf7c 100644
--- a/OC/RepOCSinFactura.aspx.vb
+++ b/OC/RepOCSinFactura.aspx.vb
@@ -17,7 +17,7 @@ Partial Class OC_RepOCSinFactura
Private Sub CargaCombos()
'CargaSucursales
- DdlSucursal.DataSource = GlobalDTSubProyectos(UsuarioActual.CveEmpresa)
+ DdlSucursal.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
DdlSucursal.DataBind()
'Vendedor
diff --git a/RH/Personal.aspx.vb b/RH/Personal.aspx.vb
index 077c0520a..3825b4499 100644
--- a/RH/Personal.aspx.vb
+++ b/RH/Personal.aspx.vb
@@ -1999,7 +1999,7 @@ Partial Class RH_Personal
If TempDTCuentasBancos.Rows.Count > 0 Then
For Each row As DataRow In TempDTCuentasBancos.Rows
- If Not ObjCuentasDeposito.AddCuentasDepositos(row("BancoNombre").ToString(), row("Plaza").ToString(), row("Sucursal").ToString(), row("Cuenta").ToString(), row("CLABE").ToString(), row("CIE").ToString(), row("SWIFT").ToString(), row("Referencia").ToString(), "", UsuarioActual.CveUsuario, row("CveMoneda").ToString().ToEntero(), CvePersonal:=CvePersonal, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=row("BBVAAlias").ToString()) Then
+ If Not ObjCuentasDeposito.AddCuentasDepositos(row("BancoNombre").ToString(), row("Plaza").ToString(), row("Sucursal").ToString(), row("Cuenta").ToString(), row("CLABE").ToString(), row("CIE").ToString(), row("SWIFT").ToString(), row("Referencia").ToString(), "", UsuarioActual.CveUsuario, row("CveMoneda").ToString().ToEntero(), UsuarioActual.CveEmpresa, CvePersonal:=CvePersonal, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=row("BBVAAlias").ToString()) Then
TieneError = True
Exit For
End If
@@ -3353,7 +3353,7 @@ Partial Class RH_Personal
If CvePersonal > 0 Then
Dim ObjCuentasBancos As New ClsGenerales
- If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, "", UsuarioActual.CveUsuario, CveMoneda, CvePersonal:=CvePersonal, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=BBVAAlias, CveSATBanco:=CveSATBanco, EstatusPagoElectronico:=EstatusPagoElectronico) Then
+ If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, "", UsuarioActual.CveUsuario, CveMoneda, UsuarioActual.CveEmpresa, CvePersonal:=CvePersonal, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=BBVAAlias, CveSATBanco:=CveSATBanco, EstatusPagoElectronico:=EstatusPagoElectronico) Then
DTCuentasBancos.Clear()
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CvePersonal = {0}", CvePersonal)))
@@ -3539,7 +3539,7 @@ Partial Class RH_Personal
End If
Dim ObjCuentasBancos As New ClsGenerales
If CvePersonal > 0 Then
- If ObjCuentasBancos.UpdateCuentasDepositos(GvBancosCuentas.DataKeys(e.RowIndex)("CveCuentaDeposito").ToString().ToEntero(), NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor, False, Estatus, CveMoneda, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=BBVAAlias, EstatusPagoElectronico:=EstatusPagoElectronico) Then
+ If ObjCuentasBancos.UpdateCuentasDepositos(GvBancosCuentas.DataKeys(e.RowIndex)("CveCuentaDeposito").ToString().ToEntero(), NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor, False, Estatus, CveMoneda, UsuarioActual.CveEmpresa, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=BBVAAlias, EstatusPagoElectronico:=EstatusPagoElectronico) Then
DTCuentasBancos.Clear()
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CvePersonal = {0}", CvePersonal)))
Alert("Cuenta actualizada con exito.", TipoMensaje.MsgInformacion)
@@ -3570,7 +3570,7 @@ Partial Class RH_Personal
Dim ObjCuentasBancos As New ClsGenerales
If CvePersonal > 0 Then
- If ObjCuentasBancos.RemoveCuentasDepositos(GvBancosCuentas.DataKeys(e.RowIndex)("CveCuentaDeposito").ToString().ToEntero(), CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
+ If ObjCuentasBancos.RemoveCuentasDepositos(GvBancosCuentas.DataKeys(e.RowIndex)("CveCuentaDeposito").ToString().ToEntero(), UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
DTCuentasBancos.Clear()
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CvePersonal = {0}", CvePersonal)))
Alert("Cuenta Bancaria borrada con exito.", TipoMensaje.MsgInformacion)
diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb
index 1d0794060..f5de6760a 100644
--- a/Ventas/Clientes.aspx.vb
+++ b/Ventas/Clientes.aspx.vb
@@ -6615,7 +6615,7 @@ Partial Class Clientes
If CveCliente > 0 Then
- If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor, UsuarioActual.CveUsuario, CveMoneda, CveCliente:=CveCliente) Then
+ If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor, UsuarioActual.CveUsuario, CveMoneda, UsuarioActual.CveEmpresa, CveCliente:=CveCliente) Then
DTCuentasBancos.Clear()
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveCliente = {0}", CveCliente)))
Alert("Cuenta Bancaria agregada con éxito.", TipoMensaje.MsgInformacion)
@@ -6645,14 +6645,13 @@ Partial Class Clientes
Alert("Cuenta Bancaria agregada con éxito.", TipoMensaje.MsgInformacion)
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAddCuentasBancarias"))
- End If
-
+ End If
+
Else
-
If CveCliente > 0 Then
- If ObjCuentasBancos.UpdateCuentasDepositos(GvBancosCuentas.DataKeys(CveCuentaBancaria)("CveCuentaDeposito").ToString().ToEntero(), NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, "", False, Estatus, CveMoneda) Then
+ If ObjCuentasBancos.UpdateCuentasDepositos(GvBancosCuentas.DataKeys(CveCuentaBancaria)("CveCuentaDeposito").ToString().ToEntero(), NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, "", False, Estatus, CveMoneda, UsuarioActual.CveEmpresa) Then
DTCuentasBancos.Clear()
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveCliente = {0}", CveCliente)))
Alert("Cuenta actualizada con éxito.", TipoMensaje.MsgInformacion)
@@ -6725,7 +6724,7 @@ Partial Class Clientes
Dim ObjCuentasBancos As New ClsGenerales
If CveCliente > 0 Then
- If ObjCuentasBancos.RemoveCuentasDepositos(GvRow.DataKey("CveCuentaDeposito").ToEntero()) Then
+ If ObjCuentasBancos.RemoveCuentasDepositos(GvRow.DataKey("CveCuentaDeposito").ToEntero(), UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
DTCuentasBancos.Clear()
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveCliente = {0}", CveCliente)))
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb
index 2662b079d..9b857f9fc 100644
--- a/Ventas/Ventas.aspx.vb
+++ b/Ventas/Ventas.aspx.vb
@@ -7685,7 +7685,7 @@ Partial Class Ventas
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=1).FiltraParametros(" Codigo = '' OR Codigo IS NULL ", Orderby:="Clasificacion")
DdlClasificacionPyME.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=1).FiltraParametros(" Codigo = '' OR Codigo IS NULL ", Orderby:="Clasificacion")
Else
- DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=1).FiltraParametros("Estado = 1", Orderby:="Clasificacion")
+ DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros("UsoClasificacion IN (1,3) and Estado = 1", Orderby:="Clasificacion")
DdlClasificacionPyME.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=1).FiltraParametros("", Orderby:="Clasificacion")
End If
'DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)