diff --git a/AF/AF.aspx.vb b/AF/AF.aspx.vb index be04003c1..97108838c 100644 --- a/AF/AF.aspx.vb +++ b/AF/AF.aspx.vb @@ -2492,7 +2492,8 @@ Partial Class AF_AF TxtObservaciones.Text.Trim, Ddlclientes.SelectedValue.ToEntero, CveMovimientoSalidaInv, UsuarioActual.CveUsuario, CveEmpresaActual, CveMarca:=DdlMarcas.SelectedValue.ToEntero, CveModelo:=DdlModelos.SelectedValue.ToEntero, CveGrupo:=DdlGrupo.SelectedValue.ToEntero, CveAFPadre:=DdlAFPadres.SelectedValue.ToEntero, CveDispositivo:=DdlDispositivo.SelectedValue.ToEntero, FechaBaja:=FechaBaja, Lat:=TxtLatitud.Text, Longi:=TxtLongitud.Text, AgroCuenta:=TxtAgroCuenta.Text) > 0 Then - ViewState("CveActivoFijo") = ObjAF.CveActivoFijo + ViewState("CveActivoFijo") = ObjAF.CveActivoFijo + GlobalDTActivoFijos(UsuarioActual.CveEmpresa) = Nothing Else ErrorGuardar = True End If @@ -2506,7 +2507,6 @@ Partial Class AF_AF End If Next - If Not ErrorGuardar Then For Each GvRowPlagaEnfermedad As GridViewRow In GvPlagaEnfermedad.Rows If Not ObjAF.AddPlagaEnfermedad(ObjAF.CveActivoFijo, GvRowPlagaEnfermedad.DataKey("Observaciones"), GvRowPlagaEnfermedad.DataKey("Fecha").ToDate, UsuarioActual.CveUsuario) Then @@ -2516,11 +2516,8 @@ Partial Class AF_AF Next End If - - If Not ErrorGuardar Then - For Each GvRowMantenimiento As GridViewRow In GvMantenimientos.Rows Dim CveMantenimientoTemp As Integer = ObjAF.AddMantenimientos(ObjAF.CveActivoFijo, GvRowMantenimiento.DataKey("Mantenimiento"), GvRowMantenimiento.DataKey("Observaciones"), GvRowMantenimiento.DataKey("Fecha").ToDate, UsuarioActual.CveUsuario, "") @@ -2556,7 +2553,6 @@ Partial Class AF_AF End If - Else ErrorGuardar = True Exit For @@ -2564,8 +2560,6 @@ Partial Class AF_AF Next - - End If End If @@ -2603,7 +2597,9 @@ Partial Class AF_AF 'UPHistModificaciones.Update() 'UpDatos.Update() ' GuardaValores() - ErrorGuardar = True + ErrorGuardar = True + Else + GlobalDTActivoFijos(UsuarioActual.CveEmpresa) = Nothing End If End If diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 3360ec10d..2679686e1 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -597,26 +597,48 @@ Public Class ClsPaginas Application(AppNombre) = value End Set End Property - Property GlobalDTCuentasDepositosClientes(CveEmpresa As Integer, Optional CveCliente As Integer = -1, Optional Estatus As Boolean = True) As DataTable + Property GlobalDTCuentasDepositosClientes(CveEmpresa As Integer, Optional CveCliente As Integer = -1, Optional CveCuentaDeposito As Integer = -1) As DataTable Get Dim AppNombre As String = $"GlobalDTCuentasDepositosClientes-{CveEmpresa}" - If Application(AppNombre) Is Nothing Then + If HttpContext.Current.Application(AppNombre) Is Nothing Then Dim P As New ClsGenerales - If P.GetCuentasDepositos(CveEmpresa:=CveEmpresa, CveCliente:=-2) Then Application(AppNombre) = P.DtResultados + If P.GetCuentasDepositos(CveEmpresa:=CveEmpresa, CveCliente:=-2) Then HttpContext.Current.Application(AppNombre) = P.DtResultados P.Dispose() End If - Dim Str As New StringBuilder - Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) - If CveCliente <> -1 Then Str.AppendFormat(" AND CveCliente = {0}", CveCliente) - If Estatus = True Then Str.AppendFormat(" AND Estatus = 1 ") - Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows) + Dim filtros As New List(Of String) + If CveCliente <> -1 Then filtros.Add($"CveCliente = {CveCliente}") + If CveCuentaDeposito <> -1 Then filtros.Add($"CveCuentaDeposito = {CveCuentaDeposito}") + + Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Join(" AND ", filtros), "", DataViewRowState.CurrentRows) GlobalDTCuentasDepositosClientes = Dv.ToTable Dv.Dispose() End Get Set(value As DataTable) Dim AppNombre As String = $"GlobalDTCuentasDepositosClientes-{CveEmpresa}" - Application(AppNombre) = value + HttpContext.Current.Application(AppNombre) = value + End Set + End Property + + Property GlobalDTCuentasDepositosPersonales(CveEmpresa As Integer, Optional CvePersonal As Integer = -1, Optional CveCuentaDeposito As Integer = -1) As DataTable + Get + Dim AppNombre As String = $"GlobalDTCuentasDepositosPersonales-{CveEmpresa}" + If HttpContext.Current.Application(AppNombre) Is Nothing Then + Dim P As New ClsGenerales + If P.GetCuentasDepositos(CveEmpresa:=CveEmpresa, CvePersonal:=-2) Then HttpContext.Current.Application(AppNombre) = P.DtResultados + P.Dispose() + End If + Dim filtros As New List(Of String) + If CvePersonal <> -1 Then filtros.Add($"CvePersonal = {CvePersonal}") + If CveCuentaDeposito <> -1 Then filtros.Add($"CveCuentaDeposito = {CveCuentaDeposito}") + Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Join(" AND ", filtros), "", DataViewRowState.CurrentRows) + GlobalDTCuentasDepositosPersonales = Dv.ToTable + Dv.Dispose() + + End Get + Set(value As DataTable) + Dim AppNombre As String = $"GlobalDTCuentasDepositosPersonales-{CveEmpresa}" + HttpContext.Current.Application(AppNombre) = value End Set End Property Property GlobalDTProveedorClasificacion(CveEmpresa As Integer) As DataTable @@ -5730,7 +5752,7 @@ Public Class ClsPaginas Dim VendedorMail As String = "" Dim VendedorTelefono As String = "" Dim VendedorCelular As String = "" - Dim RowVendedor As DataRow = GlobalDTVendedores(-1).FiltroPrimero(String.Format("CveVendedor = {0}", Vta.CveVendedor.ToString)) + Dim RowVendedor As DataRow = GlobalDTVendedores(Vta.CveEmpresa, VendedorTipo:=-1).FiltroPrimero(String.Format("CveVendedor = {0}", Vta.CveVendedor.ToString)) If Not IsNothing(RowVendedor) Then VendedorNombre = RowVendedor("Vendedor").ToString VendedorMail = RowVendedor("Correo").ToString @@ -7571,7 +7593,7 @@ Public Class ClsPaginas ImporteMN = (ImporteMovimiento * CompraActual.TC).RoundSQL If CompraActual.CveMoneda > 1 Then ImporteME = ImporteMovimiento Dim ContabilizableISR As Boolean = False - If UsuarioActual.CveEmpresa.Contiene(140, 7, 11, 12, 122, 145, 172, 173) Then + If UsuarioActual.CveEmpresa.Contiene(140, 7, 11, 12, 122, 145, 172, 173, 174) Then ContabilizableISR = True End If Dim Ret As ConceptosRetenciones = CompraActual.ConceptoPrePolizaRetISR diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index 7b28e1a9d..ea0fb4252 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -5201,6 +5201,8 @@ Partial Class Bancos_IE dtc = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor) ElseIf CveCliente > 0 Then dtc = GlobalDTCuentasDepositosClientes(UsuarioActual.CveEmpresa, CveCliente:=CveCliente) + ElseIf cvepersonal > 0 Then + dtc = GlobalDTCuentasDepositosPersonales(UsuarioActual.CveEmpresa, CvePersonal:=CvePersonal) End If @@ -5221,20 +5223,16 @@ Partial Class Bancos_IE ElseIf DdlTipoTransaccion.SelectedValue = "17" And CveIE <= -1 Then If dtc.Rows.Count > 0 Then - DdlCuentaDeposito.DataSource = dtc.FiltraParametros(" Estatus = 'True' ") trCuentaDeposito.Visible = True BtnGuardar.ToolTip = "" - Else - BtnGuardar.Enabled = False Alert("El proveedor no tiene cuentas deposito.", TipoMensaje.MsgAdvertencia) BtnGuardar.ToolTip = "El proveedor no tiene cuentas deposito" End If DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1")) - UpGuardar.Update() Else diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index b4fcf4384..a7dbbf152 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -8650,7 +8650,6 @@ Partial Class Compras_Compras End If Dim CveCompraNC, IdCtaContable, IdCtaContableComp As Integer - Dim PorcentajePago As Decimal Dim ConceptoPoliza As String = $"Amortización {NombreProveedor} - {TxtSerie.Text}-{TxtFolio.Text}" Try diff --git a/Contabilidad2/CatContaEjercicios.aspx b/Contabilidad2/CatContaEjercicios.aspx index a61d0f851..7410bbd41 100644 --- a/Contabilidad2/CatContaEjercicios.aspx +++ b/Contabilidad2/CatContaEjercicios.aspx @@ -24,14 +24,13 @@ - - + diff --git a/Sistemas/CatSesiones.aspx b/Sistemas/CatSesiones.aspx index 45c8d4313..d4ca5c726 100644 --- a/Sistemas/CatSesiones.aspx +++ b/Sistemas/CatSesiones.aspx @@ -62,8 +62,9 @@ + -    +      
diff --git a/Sistemas/CatSesiones.aspx.vb b/Sistemas/CatSesiones.aspx.vb index 85a382108..e7ff562d9 100644 --- a/Sistemas/CatSesiones.aspx.vb +++ b/Sistemas/CatSesiones.aspx.vb @@ -102,12 +102,28 @@ Partial Class Sistemas_CatSesiones ElseIf DdlVariable.SelectedItem.Value = "GlobalSATGenerales" Then CargaSATGenerales() ElseIf DdlVariable.SelectedItem.Value = "GlobalDTActivoFijos" Then + CargaActivoFijos() + ElseIf DdlVariable.SelectedItem.Value = "GlobalDTVendedoresOld" Then CargaActivoFijos() End If End Sub + Private Sub CargaGlobalDTVendedoresOld() + Dim AppNombre As String = $"GlobalDTVendedores-{-1}" + If HttpContext.Current.Application(AppNombre) Is Nothing Then + Dim ObjVendedores As New ClsVtaVendedores + If ObjVendedores.GetVendedores(-1) Then + For Each Row As DataRow In ObjVendedores.DtResultados.Rows + Row("VendedorTipo") = 1 + Next + HttpContext.Current.Application(AppNombre) = ObjVendedores.DtResultados.Copy() + End If + ObjVendedores.Dispose() + End If + End Sub + Private Sub CargaActivoFijos() GlobalDTActivoFijos(UsuarioActual.CveEmpresa) = Nothing GlobalDTModeloActivoFijo(UsuarioActual.CveEmpresa, -1) = Nothing diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index dcea45992..4bed83d04 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -646,57 +646,46 @@
- +
-
+
- +
- -
- - - -
- -
- - - - - -
-
- - - - - -
-
-
- -
-
+
+ + + +
+
+
+
+
+
+ + + +
+
+
+
+ +
+
+
- - - - - -
@@ -712,23 +701,23 @@
- -
- - Frecuente - Venta Mostrador - - +
+
+
+ + Frecuente + Venta Mostrador + + +
+
+
+
+ + +
+
- -
- - -
- - - -
@@ -1132,7 +1121,7 @@
+ OnSelectedIndexChanged="DdlMetodoPago33_SelectedIndexChanged"> @@ -2017,13 +2006,13 @@ Pago múltiples facturas Pagar múltiples facturas   - + " style="display: inline-block; margin-right: -20px; width: 150px;" /> " style="margin-top: -3px; float: inherit;" class="btn btn-circle btn-sm label-info"> - + @@ -2126,7 +2115,7 @@ - " style="display: inline-block; margin-right: -20px; width: 150px;" /> " @@ -4276,13 +4265,13 @@
- Proyecto: + Proyecto:
- SubProyecto: + SubProyecto:
@@ -4546,15 +4535,15 @@
- +
- - - - + + + +
@@ -6732,7 +6721,7 @@ - + diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index eee4538b8..0ee976b6b 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -910,7 +910,8 @@ Partial Class Clientes CargaDocumentacionCliente() 'TxtPais.Text = "México" - End If + End If + If UsuarioActual.Empresa.CvePlataforma = 3 Then LbAddDispositivo.Visible = True @@ -1334,7 +1335,13 @@ Partial Class Clientes DdlMetodoPagoSucursal.DataBind() 'DdlMetodoPago.DataBind() End Sub - Private Sub CargaPrecioLista() + Private Sub CargaPrecioLista() + 'SI NO TIENE LA FUNCIONALIDAD DE LISTA DE PRECIOS + If Not GlobalDTPrecioListas(UsuarioActual.CveEmpresa).Rows.Count > 0 Then + DdlSubProyecto.AutoPostBack = False + DivPrecioLista.Visible = False + End If + DdlPrecioLista.DataSource = GlobalDTPrecioListas(UsuarioActual.CveEmpresa) DdlPrecioLista.DataBind() DdlPrecioLista.Items.Insert(0, New ListItem(" - ", "-1")) @@ -5838,13 +5845,15 @@ Partial Class Clientes Protected Sub DdlSubProyecto_SelectedIndexChanged(sender As Object, e As EventArgs) If DdlSubProyecto.SelectedValue.ToEntero() > 0 Then - Dim Dr As DataRow = GlobalDTSubProyectos(-1, DdlSubProyecto.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa).Rows(0) + Dim Dr As DataRow = GlobalDTSubProyectos(-1, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0) If Dr IsNot Nothing Then If Dr("CvePrecioLista").ToString().ToEntero() > 0 Then DdlPrecioLista.SelectedValueExist(Dr("CvePrecioLista").ToString()) End If End If End If + + UpDatos.Update() End Sub #End Region @@ -8468,8 +8477,8 @@ Partial Class Clientes End Sub - Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProyectoFiltro.SelectedIndexChanged - CargarSubProyecto(DdlSubProyecto, DdlProyectoFiltro.SelectedValue) + Protected Sub DdlProyectoFiltro_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProyectoFiltro.SelectedIndexChanged + CargarSubProyecto(DdlSubProyectoFiltro, DdlProyectoFiltro.SelectedValue) End Sub Protected Sub DdlClasificacionFilto_SelectedIndexChanged(sender As Object, e As EventArgs) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 9b857f9fc..51dd9afac 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -2755,6 +2755,7 @@ Partial Class Ventas End If End Using End If + If Request("CveEmbarqueManifiesto") IsNot Nothing AndAlso IsNumeric(Request("CveEmbarqueManifiesto")) AndAlso Request("CveEmbarqueManifiesto").ToEntero() > 0 Then DdlMoneda.SelectedValueExist(2) CambiaMoneda() @@ -21090,7 +21091,7 @@ Partial Class Ventas Dim DtCostos = ObjInventario.DtResultados.Copy Dim DtCostosDistinct As DataTable = ObjInventario.DtResultados.FiltraParametros("", "", {"CveClasificacion"}) Dim IdCtaContable As Integer = 0 - Dim CveCuenta As Integer = 0 + ' Dim CveCuenta As Integer = 0 Dim ValorInventario As Decimal Dim TotalCostoAcumulado As Decimal = 0D Dim Cont As Integer = 1 @@ -21099,7 +21100,7 @@ Partial Class Ventas For Each RowInv As DataRow In DtCostosDistinct.Rows ValorInventario = DtCostos.SUMD("Total", String.Format("CveClasificacion = {0}", RowInv("CveClasificacion"))).RoundSQL IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero() - CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero() + 'CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero() TotalCostoAcumulado += ValorInventario 'cuando es el último movimiento y hay diferencias en los importes @@ -21109,7 +21110,7 @@ Partial Class Ventas Try 'If ValorInventario <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, ValorInventario, ObjFactura.SerieFolio, 69, ObjFactura.SerieFolio, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=ObjFactura.CveCliente, CveClasificacion:=RowInv("CveClasificacion").ToString().ToEntero(), CveMovimientoAlmacen:=CveMovimientoVirtual, ImporteMX:=ValorInventario, CveCuenta:=CveCuenta, CveSubProyecto:=ObjFactura.CveSubProyecto) Then + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, ValorInventario, ObjFactura.SerieFolio, 69, ObjFactura.SerieFolio, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=ObjFactura.CveCliente, CveClasificacion:=RowInv("CveClasificacion").ToString().ToEntero(), CveMovimientoAlmacen:=CveMovimientoVirtual, ImporteMX:=ValorInventario, CveSubProyecto:=ObjFactura.CveSubProyecto) Then OcurrioError = True Exit For End If @@ -21123,7 +21124,7 @@ Partial Class Ventas If Not OcurrioError Then IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacenVirtual)).ToEntero() - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, TotalCosto, ObjFactura.SerieFolio, 68, ObjFactura.SerieFolio, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=ObjFactura.CveCliente, CveMovimientoAlmacen:=CveMovimientoVirtual, ImporteMX:=TotalCosto, CveCuenta:=CveCuenta, CveSubProyecto:=ObjFactura.CveSubProyecto) Then + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, TotalCosto, ObjFactura.SerieFolio, 68, ObjFactura.SerieFolio, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=ObjFactura.CveCliente, CveMovimientoAlmacen:=CveMovimientoVirtual, ImporteMX:=TotalCosto, CveSubProyecto:=ObjFactura.CveSubProyecto) Then OcurrioError = True End If End If @@ -36398,7 +36399,7 @@ Partial Class Ventas Me.CveCategoriaLineaAdicional = 0 If CveVenta <= 0 Then - TxtFechaPago.Text = Now.ToString("dd/MM/yyyy") + TxtFechaPago.Text = Now.AddDays(PlazoCobranza).ToString("dd/MM/yyyy") TxtOrdenCompra.Text = "" 'SI SE HABILITO LA FACTURACION DESDE LA LINEA ADICIONAL DEBE QUITARLO