From 4a48860d4ab5ca6e14fdab3159f44ea259549c76 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 21 Jun 2024 13:38:07 -0700 Subject: [PATCH 01/13] - modificaciones --- Bancos/DepositosCaja.aspx | 2 +- Bancos/DepositosCaja.aspx.vb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Bancos/DepositosCaja.aspx b/Bancos/DepositosCaja.aspx index b24b9059c..1b258fe1f 100644 --- a/Bancos/DepositosCaja.aspx +++ b/Bancos/DepositosCaja.aspx @@ -330,7 +330,7 @@
-
+
diff --git a/Bancos/DepositosCaja.aspx.vb b/Bancos/DepositosCaja.aspx.vb index e94b3853b..faeecc9df 100644 --- a/Bancos/DepositosCaja.aspx.vb +++ b/Bancos/DepositosCaja.aspx.vb @@ -194,8 +194,8 @@ Partial Class Bancos_DepositosCaja TotalImporte = TotalImporte + Comision 'Comision = -(Comision) ' se inverte el valor, va cargada 'Descuento = -(Descuento) ' se inverte el valor, va cargada - If DdlSubProyectoDeposito.SelectedValue.ToEntero = -1 Or DdlClasificacion.SelectedValue.ToEntero = -1 Then - Alert("Debes Seleccionar un Subproyecto y una Clasificación", TipoMensaje.MsgAdvertencia) + If DdlSubProyectoDeposito.SelectedValue.ToEntero = -1 Then + Alert("Debes Seleccionar un Subproyecto ", TipoMensaje.MsgAdvertencia) Exit Sub End If End If @@ -344,7 +344,7 @@ Partial Class Bancos_DepositosCaja CveSubProyectoComision = DdlSubProyectoDeposito.SelectedValue.ToEntero CveClasificacionComision = DdlClasificacion.SelectedValue.ToEntero If Comision <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Comision, Comision * TipoCambio, 78, DdlClasificacion.SelectedItem.Text, DdlClasificacion.SelectedItem.Text, CveClasificacion:=CveClasificacionComision, CveSubProyecto:=CveSubProyectoComision) Then + If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Comision, Comision * TipoCambio, 78, "Depósito Bancario", "Depósito Bancario", CveClasificacion:=CveClasificacionComision, CveSubProyecto:=CveSubProyectoComision) Then OcurrioError = True End If End If From ae0e3b53933a1eb70a0a628bb95d58bddfb6e5aa Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 21 Jun 2024 14:18:28 -0700 Subject: [PATCH 02/13] --activar autorizaciones para GDiaz --- Sistemas/UsuarioDetalle.aspx.vb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Sistemas/UsuarioDetalle.aspx.vb b/Sistemas/UsuarioDetalle.aspx.vb index 2ba7e488a..e84d997fe 100644 --- a/Sistemas/UsuarioDetalle.aspx.vb +++ b/Sistemas/UsuarioDetalle.aspx.vb @@ -456,12 +456,12 @@ Partial Class Sistemas_UsuarioDetalle TabAsignar.Visible = False End If - If UsuarioActual.Empresa.Funcionalidad(531).ToString = "1" Then + If UsuarioActual.Empresa.Funcionalidad(531).ToString = "1" OrElse UsuarioActual.Empresa.Funcionalidad(382).ToString = "1" Then TrDescuentoAutorizado.Visible = True TrLimiteAutorizacion.Visible = True DivDatosAutorizacion.Visible = True - End If - + End If + If UsuarioActual.Empresa.Funcionalidad(109).ToString = "1" Then TrDescuentoAutorizado.Visible = True End If From b7d6f056b7c17d5a2202392c5bd18c39aee87f75 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 21 Jun 2024 14:18:44 -0700 Subject: [PATCH 03/13] =?UTF-8?q?-=20activar=20cancelaci=C3=B3n=20con=20pa?= =?UTF-8?q?gos.=20GDiaz?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/RepCancelacionesPorRespuesta.aspx.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Ventas/RepCancelacionesPorRespuesta.aspx.cs b/Ventas/RepCancelacionesPorRespuesta.aspx.cs index b4907ecf4..80134a3fd 100644 --- a/Ventas/RepCancelacionesPorRespuesta.aspx.cs +++ b/Ventas/RepCancelacionesPorRespuesta.aspx.cs @@ -571,7 +571,12 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas { factura.RealizarDevolucionAlmacen = true; } - retorno = factura.EjecutarCancelacionPendiente(CveEstatus, CancelacionFecha, CancelacionAcuse); + bool AplicaCancelacionConPagos = false; + if (UsuarioActual.Empresa.Funcionalidad(382) == "1") + { + AplicaCancelacionConPagos = true; + } + retorno = factura.EjecutarCancelacionPendiente(CveEstatus, CancelacionFecha, CancelacionAcuse,AplicaCancelacionConPagos: AplicaCancelacionConPagos); } From 7239c3319830cc8b4cd02c1f0ef5b1e1ddd1fceb Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 21 Jun 2024 14:19:18 -0700 Subject: [PATCH 04/13] -- que tome el cvecorte de la compra, si el usuario no lo tiene activado -- que tome la fecha del pago en base a la venta --- Ventas/PVCobranza.aspx.vb | 123 +++++++++++++++++++------------------- 1 file changed, 61 insertions(+), 62 deletions(-) diff --git a/Ventas/PVCobranza.aspx.vb b/Ventas/PVCobranza.aspx.vb index f7939e85d..b71acda4a 100644 --- a/Ventas/PVCobranza.aspx.vb +++ b/Ventas/PVCobranza.aspx.vb @@ -2,7 +2,7 @@ Option Strict On Imports System.Data -Imports System.IO +Imports System.IO Imports Extensiones Partial Class Ventas_PVCobranza @@ -17,8 +17,6 @@ Partial Class Ventas_PVCobranza End Set End Property - - Private Property DineroCaja As Double Get Return If(IsNothing(ViewState("DineroCaja")), 0, ViewState("DineroCaja").ToString().ToDecimal()) @@ -183,7 +181,7 @@ Partial Class Ventas_PVCobranza If ObjPVenta.GetVta_Cortes("-1", "-1", UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, 0) Then If ObjPVenta.DtResultados.Rows.Count > 0 Then - Total = ObjPVenta.DtResultados(0)("ImporteInicial").ToString().ToDouble + ObjPVenta.DtResultados(0)("VentasEfectivo").ToString().ToDouble + ObjPVenta.DtResultados(0)("Ingresado").ToString().ToDouble - ObjPVenta.DtResultados(0)("Retirado").ToString().ToDouble - ObjPVenta.DtResultados(0)("Devoluciones").ToString().ToDouble + Total = ObjPVenta.DtResultados(0)("ImporteInicial").ToString.ToDouble + ObjPVenta.DtResultados(0)("VentasEfectivo").ToString().ToDouble + ObjPVenta.DtResultados(0)("Ingresado").ToString().ToDouble - ObjPVenta.DtResultados(0)("Retirado").ToString().ToDouble - ObjPVenta.DtResultados(0)("Devoluciones").ToString().ToDouble DineroCaja = Total LblEfectivoEsperado.Text = Total.FormatoNumero(2) LblEfectivoBloqueo.Text = Total.FormatoNumero(2) @@ -388,6 +386,7 @@ Partial Class Ventas_PVCobranza End If Dim PagadoSinEfectivo As Decimal = Pagado - TxtImporteEfectivo.Text.ToDecimal + Dim tCveCorte As Integer = CveCorte If PagadoSinEfectivo > LtlSaldo.Text.ToDecimal() Then Alert("El pago con los metodos de pago actuales no puede ser mayor al importe de la venta", TipoMensaje.MsgAdvertencia) @@ -422,9 +421,10 @@ Partial Class Ventas_PVCobranza VentaActual.PorcentajeIVA = DbRowVenta("PorcentajeIVA").ToString.ToDecimal VentaActual.UsuarioActual = UsuarioActual VentaActual.CveSubProyecto = DbRowVenta("CveSubProyecto").ToString.ToEntero + If tCveCorte <= 0 AndAlso DbRowVenta("CveCorte").ToString.ToEntero > 0 Then tCveCorte = DbRowVenta("CveCorte").ToString.ToEntero Dim CvePrePoliza As Integer - Dim Fecha As Date = NowADS() + Dim Fecha As Date = DbRowVenta("Fecha").ToString.ToDate 'NowADS() Dim MsgError As String = "" Dim SaldoPendiente As Decimal = DbRowVenta("Saldo").ToString.ToDecimal @@ -440,75 +440,76 @@ Partial Class Ventas_PVCobranza Try 'FACTURAR LA REMISION PARA HACER EL PAGO - If UsuarioActual.CveEmpresa = 189 AndAlso VentaActual.TipoDocto = "Rem" Then + If UsuarioActual.CveEmpresa.Contiene(189, 197) AndAlso VentaActual.TipoDocto = "Rem" Then respFactura = GenerarFactura(VentaActual, ObjVentas2, ObjClientes) If respFactura Is Nothing Then - MsgError = "Ocurrío un error al generar la factura" + MsgError = "Ocurrió un error al generar la factura" ElseIf (respFactura IsNot Nothing AndAlso respFactura.Mensajes.Count > 0) AndAlso respFactura.TieneError Then MsgError = respFactura.Mensajes(0) End If - 'REALIZAR EL PAGO EN LA FACTURA If respFactura IsNot Nothing AndAlso Not respFactura.TieneError Then CveVenta = respFactura.CveVenta End If End If - CvePrePoliza = ObjConta.AddPrePolizas("PVCobranza", 11, 0, 0, 1, Fecha, $"Pago {VentaActual.SerieFolio}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=3) + If MsgError = "" Then + CvePrePoliza = ObjConta.AddPrePolizas("PVCobranza", 11, 0, 0, 1, Fecha, $"Pago {VentaActual.SerieFolio}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=3) - If CvePrePoliza > 0 Then + If CvePrePoliza > 0 Then - If MsgError = "" AndAlso SaldoPendiente > 0 AndAlso TxtImporteCredito.Text.ToDecimal > 0 Then - MsgError = RegistraIE(12, DdlCuentaTarjetaCredito.SelectedValue.ToEntero, TxtImporteCredito.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2) - SaldoPendiente -= TxtImporteCredito.Text.ToDecimal - PagoAplicado += TxtImporteCredito.Text.ToDecimal - End If - - If MsgError = "" AndAlso SaldoPendiente > 0 AndAlso TxtImporteDebito.Text.ToDecimal > 0 Then - MsgError = RegistraIE(11, DdlCuentaTarjetaDebito.SelectedValue.ToEntero, TxtImporteDebito.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2) - SaldoPendiente -= TxtImporteDebito.Text.ToDecimal - PagoAplicado += TxtImporteDebito.Text.ToDecimal - End If - - If SaldoPendiente > 0 AndAlso TxtImporteCheque.Text.ToDecimal > 0 Then - MsgError = RegistraIE(3, DdlCuentaCheque.SelectedValue.ToEntero, TxtImporteCheque.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2) - SaldoPendiente -= TxtImporteCheque.Text.ToDecimal - PagoAplicado += TxtImporteCheque.Text.ToDecimal - End If - - If MsgError = "" AndAlso SaldoPendiente > 0 AndAlso TxtImporteTransferencia.Text.ToDecimal > 0 Then - MsgError = RegistraIE(8, DdlCuentaTransferencia.SelectedValue.ToEntero, TxtImporteTransferencia.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2) - SaldoPendiente -= TxtImporteTransferencia.Text.ToDecimal - PagoAplicado += TxtImporteTransferencia.Text.ToDecimal - End If - - If MsgError = "" AndAlso SaldoPendiente > 0 AndAlso TxtImporteEfectivo.Text.ToDecimal > 0 Then - Dim PagoEfectivo As Decimal = TxtImporteEfectivo.Text.ToDecimal - - PagoAplicado += PagoEfectivo - If PagoAplicado >= SaldoTotalInicial Then - TxtCambio.Text = (PagoAplicado - SaldoTotalInicial).FormatoNumero - PagoEfectivo = SaldoPendiente + If MsgError = "" AndAlso SaldoPendiente > 0 AndAlso TxtImporteCredito.Text.ToDecimal > 0 Then + MsgError = RegistraIE(12, DdlCuentaTarjetaCredito.SelectedValue.ToEntero, TxtImporteCredito.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte) + SaldoPendiente -= TxtImporteCredito.Text.ToDecimal + PagoAplicado += TxtImporteCredito.Text.ToDecimal End If - MsgError = RegistraIE(13, DdlCuentaEfectivo.SelectedValue.ToEntero, PagoEfectivo, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2) - SaldoPendiente -= PagoEfectivo - End If - If SaldoPendiente > 0 Then - MsgError = "Tiene saldo pendiente por aplicar" - End If + If MsgError = "" AndAlso SaldoPendiente > 0 AndAlso TxtImporteDebito.Text.ToDecimal > 0 Then + MsgError = RegistraIE(11, DdlCuentaTarjetaDebito.SelectedValue.ToEntero, TxtImporteDebito.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte) + SaldoPendiente -= TxtImporteDebito.Text.ToDecimal + PagoAplicado += TxtImporteDebito.Text.ToDecimal + End If - If MsgError = "" AndAlso Not ObjVentas2.UpdateVentaCorte(CveVenta, UsuarioActual.CveEmpresa, CveCorte) Then - MsgError = "Error al aplicar el corte" - End If + If SaldoPendiente > 0 AndAlso TxtImporteCheque.Text.ToDecimal > 0 Then + MsgError = RegistraIE(3, DdlCuentaCheque.SelectedValue.ToEntero, TxtImporteCheque.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte) + SaldoPendiente -= TxtImporteCheque.Text.ToDecimal + PagoAplicado += TxtImporteCheque.Text.ToDecimal + End If - If MsgError = "" AndAlso Not ObjVentas2.UpdateVentaTicketImpreso(CveVenta, 0) Then - MsgError = "No se pudo desmarcar la impresión" - End If + If MsgError = "" AndAlso SaldoPendiente > 0 AndAlso TxtImporteTransferencia.Text.ToDecimal > 0 Then + MsgError = RegistraIE(8, DdlCuentaTransferencia.SelectedValue.ToEntero, TxtImporteTransferencia.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte) + SaldoPendiente -= TxtImporteTransferencia.Text.ToDecimal + PagoAplicado += TxtImporteTransferencia.Text.ToDecimal + End If - Else - MsgError = "Error al registrar prepólizas" + If MsgError = "" AndAlso SaldoPendiente > 0 AndAlso TxtImporteEfectivo.Text.ToDecimal > 0 Then + Dim PagoEfectivo As Decimal = TxtImporteEfectivo.Text.ToDecimal + + PagoAplicado += PagoEfectivo + If PagoAplicado >= SaldoTotalInicial Then + TxtCambio.Text = (PagoAplicado - SaldoTotalInicial).FormatoNumero + PagoEfectivo = SaldoPendiente + End If + MsgError = RegistraIE(13, DdlCuentaEfectivo.SelectedValue.ToEntero, PagoEfectivo, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte) + SaldoPendiente -= PagoEfectivo + End If + + If SaldoPendiente > 0 Then + MsgError = "Tiene saldo pendiente por aplicar" + End If + + If MsgError = "" AndAlso Not ObjVentas2.UpdateVentaCorte(CveVenta, UsuarioActual.CveEmpresa, tCveCorte) Then + MsgError = "Error al aplicar el corte" + End If + + If MsgError = "" AndAlso Not ObjVentas2.UpdateVentaTicketImpreso(CveVenta, 0) Then + MsgError = "No se pudo desmarcar la impresión" + End If + + Else + MsgError = "Error al registrar prepólizas" + End If End If Catch ex As Exception MsgError = "Error al registrar el pago" @@ -517,16 +518,14 @@ Partial Class Ventas_PVCobranza If MsgError = "" Then ObjVentas2.Commit() - + Dim msBuild As New StringBuilder() 'SI SE GENERO FACTURA DE INGRESO, TIMBRARLA DESPUES DE REALIZAR EL PAGO If respFactura IsNot Nothing Then If Not respFactura.Factura.TimbrarFactura() Then - Alert("La factura no se pudo timbrar", TipoMensaje.MsgAdvertencia) + msBuild.Append("La factura no se pudo timbrar
") End If End If - Dim msBuild As New StringBuilder() - If respFactura IsNot Nothing Then msBuild.Append($"Pago Registrado correctamente.") For Each m In respFactura.Mensajes @@ -632,7 +631,7 @@ Partial Class Ventas_PVCobranza ObjFactura.GenerarSalidaAlmacen = True ObjFactura.DtInventario = ObjFactura.DtDetalle.FiltraParametros("CveTipoPS = 2").Copy() - ObjFactura.CveAlmacen = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $"CveTipoAlmacen = 1 AND CveSubProyecto = {VentaRemision.CveSubProyecto}").ToString().ToEntero() + ObjFactura.CveAlmacen = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $"CveTipoAlmacen = 1 AND CveSubProyecto = {VentaRemision.CveSubProyecto}", "Orden").ToString().ToEntero() ObjFactura.CalculaTotales() ObjFactura.PreparaTimbre() @@ -706,11 +705,11 @@ Partial Class Ventas_PVCobranza Return Retorno End Function - Private Function RegistraIE(Metodo As Integer, CveBancoCuenta As Integer, ImportePago As Decimal, Fecha As Date, CvePrePoliza As Integer, VentaActual As Venta, ByRef ObjIE As ClsBancos, ByRef ObjConta As ClsContabilidad, ByRef ObjVentas As ClsVentas) As String + Private Function RegistraIE(Metodo As Integer, CveBancoCuenta As Integer, ImportePago As Decimal, Fecha As Date, CvePrePoliza As Integer, VentaActual As Venta, ByRef ObjIE As ClsBancos, ByRef ObjConta As ClsContabilidad, ByRef ObjVentas As ClsVentas, tCveCorte As Integer) As String Dim Retorno As String = "" Dim CveIEPago As Integer = 0 Dim ErrorConta As Boolean - CveIEPago = ObjIE.AddBancos_IE(CveBancoCuenta, Metodo, Fecha, "-1", VentaActual.ClienteNombre, ImportePago, 1, 1, VentaActual.SerieFolio, "", False, True, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCorte:=CveCorte) + CveIEPago = ObjIE.AddBancos_IE(CveBancoCuenta, Metodo, Fecha, "-1", VentaActual.ClienteNombre, ImportePago, 1, 1, VentaActual.SerieFolio, "", False, True, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCorte:=tCveCorte) If CveIEPago > 0 Then Dim Pago As New VentaPago Pago.ImportePagoVenta = ImportePago From 875d1e4f4fd58a34c439d800acf78da1f74ffd1c Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 21 Jun 2024 14:47:42 -0700 Subject: [PATCH 05/13] =?UTF-8?q?--=20cambio=20content-type=20de=20pdf,=20?= =?UTF-8?q?para=20correcci=C3=B3n=20de=20descarga=20sobre=20ipad?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/ClsPaginas.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index c57311bfb..70cba6b84 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -5426,12 +5426,12 @@ Public Class ClsPaginas bytes = bytes Response.Buffer = True Response.Clear() + Response.ClearHeaders() If Formato = "PDF" Then Response.ContentType = "application/pdf" Else Response.ContentType = mimeType End If - Response.ClearHeaders() Dim fileExtension As String = "" If Not String.IsNullOrEmpty(Extension) Then fileExtension = Extension From aa46522d5f0b064632236c55342d5373243cb453 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 21 Jun 2024 15:02:11 -0700 Subject: [PATCH 06/13] =?UTF-8?q?--=20activaci=C3=B3n=20de=20liga=20a=20ka?= =?UTF-8?q?rdex.=20en=20grid,=20para=20pesta=C3=B1a=20de=20almacen.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/Ventas.aspx.vb | 1 + 1 file changed, 1 insertion(+) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index d4001e38b..7f71e50f0 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -9330,6 +9330,7 @@ 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")) e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Left e.Row.FCCheckBox("cbInv").Visible = True From ec753bf3dcb32b269eea8d1564887ff10e4e8639 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Sat, 22 Jun 2024 12:07:26 -0700 Subject: [PATCH 07/13] =?UTF-8?q?Saldos=20Menores,=20=20EMD=20-=20impresi?= =?UTF-8?q?=C3=B3n=20de=20presupuestos,=20en=20base=20a=20OC=20autorizadas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Compras/Compras.aspx.vb | 4 ++-- Contratos/RepPresupuestos.aspx.vb | 14 ++++++++++++-- Empresas/Grales/Formatos/RepPresupuestoAnual.rdlc | 6 +++++- General/SaldosMenores.aspx.vb | 6 +++--- OC/OC.aspx.vb | 10 +++++----- 5 files changed, 27 insertions(+), 13 deletions(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index d945f314e..6b13d5b35 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -17096,7 +17096,7 @@ Partial Class Compras_Compras Dim Total As Decimal = (TxtCantidad.Text.ToDecimal * TxtPrecio.Text.ToDecimal) - TxtDescuentoModal.Text.ToDecimal - 'If UsuarioActual.Empresa.Funcionalidad(532) = "1" Then + 'If UsuarioActual.Empresa.Funcionalidad(532).Contiene( "1","2") Then ' Dim ObjCon As New ClsContratos ' Dim CvePresupuesto As Integer = 0 ' Dim Autorizado As Double = 0 @@ -20760,7 +20760,7 @@ Partial Class Compras_Compras Dim respuesta As Boolean = False - If UsuarioActual.Empresa.Funcionalidad(532) = "1" Then + If UsuarioActual.Empresa.Funcionalidad(532).Contiene("1", "2") Then If Opcion = 1 Or OCVinculada Or DdlTipoComprobante.SelectedValue <> "Fac" Then Return True diff --git a/Contratos/RepPresupuestos.aspx.vb b/Contratos/RepPresupuestos.aspx.vb index 7995872cd..88b7becb7 100644 --- a/Contratos/RepPresupuestos.aspx.vb +++ b/Contratos/RepPresupuestos.aspx.vb @@ -602,11 +602,21 @@ Partial Class Contratos_RepPresupuestos params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("AgrupadoPor", $"{FechaIn}{FechaFn}{Agrupador}{Proyecto}{SubProyecto}{Clasificacion}{TipoGasto}")) - params.Add(New ReportParameter("Autorizado", LtlAutorizado.Text.FormatoNumero())) - params.Add(New ReportParameter("Ejercido", LtlEjercido.Text.FormatoNumero())) + params.Add(New ReportParameter("Autorizado", LtlAutorizado.Text.FormatoNumero())) + params.Add(New ReportParameter("PorEjercer", LtlPorEjercer.Text.FormatoNumero())) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) + If UsuarioActual.Empresa.Funcionalidad(532) = "2" Then + Dim DrPresupuesto = DtPresupuestos.FiltroPrimero("Tipo = 0 AND CveAgrupador IS NULL") + Dim Comprometido = DrPresupuesto("Comprometido").ToString.ToDecimal + params.Add(New ReportParameter("Ejercido", Comprometido.ToString.FormatoNumero())) + Else + params.Add(New ReportParameter("Ejercido", LtlEjercido.Text.FormatoNumero())) + End If + + + params.Add(New ReportParameter("PresupuestoRestrictivo", UsuarioActual.Empresa.Funcionalidad(532))) diff --git a/Empresas/Grales/Formatos/RepPresupuestoAnual.rdlc b/Empresas/Grales/Formatos/RepPresupuestoAnual.rdlc index 446a7587f..210c0ed97 100644 --- a/Empresas/Grales/Formatos/RepPresupuestoAnual.rdlc +++ b/Empresas/Grales/Formatos/RepPresupuestoAnual.rdlc @@ -25,6 +25,10 @@ Autorizado System.Double + + Comprometido + System.Double + Ejercido System.Double @@ -245,7 +249,7 @@ - = IIF( Parameters!PresupuestoRestrictivo.Value = "2", IIF(CDec(Fields!Autorizado.Value)=0,"-",Fields!Autorizado.Value),IIF(CDec(Fields!Ejercido.Value)=0,"-",Fields!Ejercido.Value)) + = IIF( Parameters!PresupuestoRestrictivo.Value = "2", iif(CDec(Fields!Comprometido.Value)=0,"-",Fields!Comprometido.Value), iif(CDec(Fields!Ejercido.Value)=0,"-",Fields!Ejercido.Value)) + + + Reporte + + +<%--
  • + Generar PDF +
  • +
  • + Generar Excel +
  • --%> +
  • + Ver Dlls en pesos +
  • +<%-- + +
  • + Ver Grafica +
  • +
    +
    --%> +
    + + + + + +
    + <%-- --%> +
    +
    +
    +
    + + + +
    +
    +
    + + +
    +
    +
    + Proyecto: +
    + +
    + SubProyecto: +
    + + <%-- + + --%> +
    + + +
    + + <%-- + + --%> +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + diff --git a/Ventas/RepPedidosSTF.aspx.vb b/Ventas/RepPedidosSTF.aspx.vb new file mode 100644 index 000000000..0cc39de45 --- /dev/null +++ b/Ventas/RepPedidosSTF.aspx.vb @@ -0,0 +1,50 @@ +Option Explicit On +Option Strict On + +Imports Extensiones +Partial Class Ventas_RepPedidosSTF + Inherits ClsPaginas + + Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load + If Not IsPostBack Then + CargaCombos() + End If + End Sub + + Private Sub CargaCombos() + + CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto) + + 'Vendedor + DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa, VendedorTipo:=-1).FiltraParametros("VendedorTipo in (1,4)") 'vendedores y vendedores de piso + DdlVendedor.DataBind() + DdlVendedor.Items.Insert(0, New ListItem("Todos", "-1")) + DdlVendedor.Items.Insert(1, New ListItem("Sin Vendedor", "-2")) + End Sub + + Protected Sub CargaDatos() + + Dim ObjVentas As New ClsVentas + If ObjVentas.GetRepPedidosSTF(DdlSubProyecto.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then + GvDatos.DataSource = ObjVentas.DtResultados + End If + ObjVentas.Dispose() + GvDatos.DataBind() + End Sub + Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound + If e.Row.RowType = DataControlRowType.DataRow Then + Select Case e.Row.DBCampo("TipoFila") + Case "1" + e.Row.CssClass = "Totales" + Case "2" + e.Row.CssClass = "SubTotales" + Case "3" + e.Row.CssClass = "Texto" + End Select + End If + End Sub + Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) + CargaDatos() + UPDatos.Update() + End Sub +End Class