From 0b29a2e57f2d602f7172c348b4a4baff787ff161 Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 1 Jul 2024 12:05:39 -0700 Subject: [PATCH 1/9] =?UTF-8?q?--=20mejora=20al=20agregar=20partidas=20de?= =?UTF-8?q?=20uja=20cotizaci=C3=B3n=20ya=20registrada?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/Ventas.aspx.vb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 7d910641f..5284b0677 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -9333,7 +9333,8 @@ Partial Class Ventas e.Row.CssClass = "SubTotales" End If Else - e.Row.FCLiteral("LtlPS").Text = String.Format(" {4}", e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveAlmacen"), e.Row.DBCampo("Fecha").ToDate.AddDays(-7).ToShortDateString, e.Row.DBCampo("Fecha").ToDate.AddDays(7).ToShortDateString, e.Row.DBCampo("PS")) + Dim tFecha As Date = If(e.Row.DBCampo("Fecha") <> "", e.Row.DBCampo("Fecha").ToDate, NowADS()) + e.Row.FCLiteral("LtlPS").Text = String.Format(" {4}", e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveAlmacen"), tFecha.AddDays(-7).ToShortDateString, tFecha.AddDays(7).ToShortDateString, e.Row.DBCampo("PS")) e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Left e.Row.FCCheckBox("cbInv").Visible = True From 8c3bd8c289906c270c324f8931b579a8a468e275 Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 1 Jul 2024 17:28:23 -0700 Subject: [PATCH 2/9] -- mejora en saldar --- Ventas/ClientesAbonar.aspx.vb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb index eecbe080e..5e3d9e961 100644 --- a/Ventas/ClientesAbonar.aspx.vb +++ b/Ventas/ClientesAbonar.aspx.vb @@ -2309,6 +2309,7 @@ Partial Class Ventas_ClientesAbonar If gr.FCCheckBox("Chk").Checked Then Dim PorcentajePago As Decimal = gr.DataKey("Saldo").ToDecimal / gr.DataKey("Original").ToDecimal Dim Saldo As Decimal = gr.DataKey("Saldo").ToDecimal + Dim SaldoMN As Decimal = gr.DataKey("Saldo").ToDecimal Dim RETIVA As Decimal = gr.DataKey("RetIVA").ToDecimal Dim SubTotal As Decimal = PorcentajePago * (gr.DataKey("SubTotal").ToDecimal.RoundSQL - gr.DataKey("Descuento").ToDecimal.RoundSQL).RoundSQL Dim IVA As Decimal = PorcentajePago * gr.DataKey("IVA").ToDecimal.RoundSQL @@ -2339,9 +2340,9 @@ Partial Class Ventas_ClientesAbonar 'If CveConceptoDeduccion = 263 Then IdCuentaContableNoDeducible = UsuarioActual.Empresa.Funcionalidad(537).ToEntero 'If CveConceptoDeduccion = 252 Then IdCuentaContableNoDeducible = UsuarioActual.Empresa.Funcionalidad(581).ToEntero - If UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12, 122) Then + If UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12, 122, 145) Then - ClienteMovto = False : Saldo = Saldo * -1 + ClienteMovto = False : SaldoMN = Saldo : Saldo = Saldo * -1 ImpuestosMovto = True : IVA = IVA * -1 RETIVA = ((SubTotal * RETIVA / gr.DataKey("SubTotal").ToDecimal.RoundSQL) * -1).RoundSQL(2) CveConceptoCliente = 1 @@ -2356,7 +2357,7 @@ Partial Class Ventas_ClientesAbonar If MsgError = "" Then Dim ConPreP As ConceptosTipoSaldo = ClsPaginas.ObtenerCveConceptoPrePoliza(6, tCveMoneda, True, 1) 'normal - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ClienteMovto, Saldo, Saldo, ConPreP.CveConcepto, gr.DataKey("SerieFolio").ToString, ConceptoPartida, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ClienteMovto, SaldoMN, Saldo, ConPreP.CveConcepto, gr.DataKey("SerieFolio").ToString, ConceptoPartida, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then MsgError = "Ocurrio un error al saldar el movimiento" End If From 1ec803786e91dd05ab75fee6580abb7813c2c285 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Mon, 1 Jul 2024 19:30:03 -0700 Subject: [PATCH 3/9] Ventas Correcion sucursales - Almacenes, auxiliar correciones UI --- Contabilidad/PopUpAuxiliar.aspx | 205 +++++++++++++++-------------- Contabilidad/PopUpAuxiliar.aspx.vb | 3 +- Ventas/Ventas.aspx.vb | 46 ++++++- 3 files changed, 150 insertions(+), 104 deletions(-) diff --git a/Contabilidad/PopUpAuxiliar.aspx b/Contabilidad/PopUpAuxiliar.aspx index 9b3616a1b..c93a408c6 100644 --- a/Contabilidad/PopUpAuxiliar.aspx +++ b/Contabilidad/PopUpAuxiliar.aspx @@ -79,99 +79,109 @@ - - - - - - Fecha - - - - - - Concepto - - - - - - Cargo - - - - - - Abono - - - - - - Folio (Ref.) - -   - - - - Contabilizado - - - - - - Póliza - - - - - - Fecha Conta. - - - - - - Referencia - - - - - - Usuario - - - - - - + + + + + <%--0--%> + + Fecha + + + + + <%--1--%> + + Concepto + + + + + <%--2--%> + + Cargo + + + + + <%--3--%> + + Abono + + + + + <%--4--%> + + Folio (Ref.) + +   + + + <%--5--%> + + Contabilizado + + + + + <%--6--%> + + Póliza + + + + + <%--7--%> + + Fecha Conta. + + + + + <%--8--%> + + Referencia + + + + + <%--9--%> + + Usuario + + + + + + + <%--10--%> + + + + + + + <%--11--%> + + + + + + <%--12--%> + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + @@ -201,10 +211,11 @@
- F.F.: + F.Fin.:
From 7e075d40153327628183614916300dccc91e41ab Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 1 Jul 2024 22:08:32 -0700 Subject: [PATCH 5/9] -nuevo global --- App_Code/ClsPaginas.vb | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 6e721d930..4ebbbfb54 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -2344,6 +2344,31 @@ Public Class ClsPaginas HttpContext.Current.Application(AppNombre) = value End Set End Property + + Public Shared Property GlobalDTClientesTodosSucursales(CveEmpresa As Integer, Optional CveCliente As Integer = -1) As DataTable + Get + Dim AppNombre As String = $"GlobalDTClientesTodosSucursales-{CveEmpresa}" + If HttpContext.Current.Application(AppNombre) Is Nothing Then + Dim ObjClientes As New ClsClientes + If ObjClientes.GetClienteSucursales(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjClientes.DtResultados.Copy() + ObjClientes.Dispose() + End If + Dim filtros As New List(Of String) + + If CveCliente >= 0 Then filtros.Add($"CveCliente = {CveCliente}") + If filtros.Count > 0 Then + Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Join(" AND ", filtros), "", DataViewRowState.CurrentRows) + GlobalDTClientesTodosSucursales = Dv.ToTable + Dv.Dispose() + Else + GlobalDTClientesTodosSucursales = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) + End If + End Get + Set(value As DataTable) + Dim AppNombre As String = $"GlobalDTClientesTodosSucursales-{CveEmpresa}" + HttpContext.Current.Application(AppNombre) = value + End Set + End Property Public Shared Property GlobalDTEstatusOrdenServicios(CveEmpresa As Integer) As DataTable Get Dim AppNombre As String = $"GlobalDTEstatusOrdenServicios-{CveEmpresa}" From 4f662737a8cf885989b45edf5b33b21538824c8e Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 1 Jul 2024 22:08:56 -0700 Subject: [PATCH 6/9] -uso nuevo globaldt --- Ventas/Ventas.aspx.vb | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 5284b0677..ba5f658a8 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -37628,32 +37628,27 @@ Partial Class Ventas End Sub - Private Sub CargaDdlClientesSucursal() - DdlClienteSucursal.DataSource = GlobalDTClientesSucursales(UsuarioActual.CveEmpresa) + DdlClienteSucursal.DataSource = GlobalDTClientesTodosSucursales(UsuarioActual.CveEmpresa) DdlClienteSucursal.DataBind() DdlClienteSucursal.Items.Insert(0, New ListItem("Seleccione uno", "-1")) Dim EsWS As Boolean = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False) If EsWS Then DdlClientesModal.setEsWebService(True) - Else DdlClientesModal.setEsWebService(False) DdlClientesModal.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1) DdlClientesModal.DataBind() DdlClientesModal.ddl.Items.Insert(0, New ListItem("Seleccione Uno", "-1")) End If - End Sub Protected Sub ChkRequiereTecnico_CheckedChanged(sender As Object, e As EventArgs) - TdFechaOS1.Visible = ChkRequiereTecnico.Checked - UpCliente.Update() End Sub @@ -37669,7 +37664,6 @@ Partial Class Ventas ChkRequiereTecnicoModal.Checked = True ChkRequiereTecnicoModal.Enabled = True DvModalRequiereOSFecha.Visible = True - 'If CveCliente > 0 Then ' CargaSucursalesModal(CveCliente) 'End If From f93a5d2ffd11ad03e6895df94342f3425c7e8bac Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 1 Jul 2024 22:22:49 -0700 Subject: [PATCH 7/9] Revert "Ventas Correcion sucursales - Almacenes, auxiliar correciones UI" This reverts commit 1ec803786e91dd05ab75fee6580abb7813c2c285. --- Contabilidad/PopUpAuxiliar.aspx | 205 ++++++++++++++--------------- Contabilidad/PopUpAuxiliar.aspx.vb | 3 +- Ventas/Ventas.aspx.vb | 35 +---- 3 files changed, 102 insertions(+), 141 deletions(-) diff --git a/Contabilidad/PopUpAuxiliar.aspx b/Contabilidad/PopUpAuxiliar.aspx index c93a408c6..9b3616a1b 100644 --- a/Contabilidad/PopUpAuxiliar.aspx +++ b/Contabilidad/PopUpAuxiliar.aspx @@ -79,109 +79,99 @@ - - - - - <%--0--%> - - Fecha - - - - - <%--1--%> - - Concepto - - - - - <%--2--%> - - Cargo - - - - - <%--3--%> - - Abono - - - - - <%--4--%> - - Folio (Ref.) - -   - - - <%--5--%> - - Contabilizado - - - - - <%--6--%> - - Póliza - - - - - <%--7--%> - - Fecha Conta. - - - - - <%--8--%> - - Referencia - - - - - <%--9--%> - - Usuario - - - - - - - <%--10--%> - - - - - - - <%--11--%> - - - - - - <%--12--%> - - - - - + + + + + + Fecha + + + + + + Concepto + + + + + + Cargo + + + + + + Abono + + + + + + Folio (Ref.) + +   + + + + Contabilizado + + + + + + Póliza + + + + + + Fecha Conta. + + + + + + Referencia + + + + + + Usuario + + + + + + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -211,11 +201,10 @@