From fec50f52f96e342296f86ec06e4c855503886512 Mon Sep 17 00:00:00 2001 From: HECTOR JAVIER RODRIGUEZ FLORES Date: Thu, 4 Feb 2021 13:04:49 -0700 Subject: [PATCH 01/24] Modulo generar depreciacion --- AF/RepDepreciacion.aspx | 38 ++++++++++++++++- AF/RepDepreciacion.aspx.vb | 83 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 120 insertions(+), 1 deletion(-) diff --git a/AF/RepDepreciacion.aspx b/AF/RepDepreciacion.aspx index 9d4588dd0..a6faf68bf 100644 --- a/AF/RepDepreciacion.aspx +++ b/AF/RepDepreciacion.aspx @@ -42,6 +42,9 @@
  • Personalizar
  • +
  • + +
  • @@ -94,7 +97,7 @@
    - + @@ -172,7 +175,40 @@ +
    - + + + diff --git a/GPS/RepPuntosDeInteres.aspx.vb b/GPS/RepPuntosDeInteres.aspx.vb index 0886eacb8..3b818619e 100644 --- a/GPS/RepPuntosDeInteres.aspx.vb +++ b/GPS/RepPuntosDeInteres.aspx.vb @@ -2,9 +2,11 @@ Imports Extensiones Imports System.Data +Imports Microsoft.Reporting.WebForms + Partial Class GPS_RepPuntosDeInteres - Inherits ClsPaginas - + Inherits ClsPaginas + #Region "P R O P I E D A D E S " Private Property DispositivosLista As List(Of String) Get @@ -13,29 +15,34 @@ Partial Class GPS_RepPuntosDeInteres Set(value As List(Of String)) ViewState("DispositivosLista") = value End Set - End Property + End Property + Private Property DtDatosReporte As DataTable + Get + Return If(IsNothing(ViewState("DtDatosReporte")), Nothing, CType(ViewState("DtDatosReporte"), DataTable)) + End Get + Set(value As DataTable) + ViewState("DtDatosReporte") = value + End Set + End Property #End Region - + Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If Not Page.IsPostBack Then CargaDatos() End If End Sub Private Sub CargaDatos() + txtFechaF.Text = Now.ToString("dd/MM/yyyy") + txtFechaI.Text = Now.AddDays(-7).ToString("dd/MM/yyyy") + CargaDispositivos() - Dim gps As New ClsGPS - 'If gps.PuntoDeInteresGrupoGet(-1, 1) Then - ' GvGrupos.DataSource = gps.DtResultados - 'Else - ' GvGrupos.DataSource = Nothing - 'End If - If gps.PuntoDeInteresGet(-1, UsuarioActual.CveCliente, 1, -1) Then - GvPuntos.DataSource = gps.DtResultados + Dim ObjGPS As New ClsGPS + If ObjGPS.PuntoDeInteresGet(-1, UsuarioActual.CveCliente, 1, -1) Then + GvPuntos.DataSource = ObjGPS.DtResultados Else GvPuntos.DataSource = Nothing End If - gps.Dispose() - 'GvGrupos.DataBind() + ObjGPS.Dispose() GvPuntos.DataBind() End Sub @@ -58,8 +65,8 @@ Partial Class GPS_RepPuntosDeInteres RegistraScript("$('#dvConsulta').modal('hide');", "00") End Sub - Private Sub ReportePuntos(Dispositivos As String) - Dim GPS As New ClsGPS + Private Sub ReportePuntos(Dispositivos As String) + Dim FechaI, FechaF As Date Dim SBBody As New StringBuilder Dim CoordsPoligono = "" @@ -70,35 +77,48 @@ Partial Class GPS_RepPuntosDeInteres Dim GeoCercas = "" Dim Color = "" FechaI = If(txtFechaI.Text.Trim = "", MinFecha, txtFechaI.Text.Trim.ToDate) - FechaF = If(txtFechaF.Text.Trim = "", MaxFecha, txtFechaF.Text.Trim.ToDate) - For Each row As GridViewRow In GvPuntos.Rows - SBBody.Clear() - If row.FCCheckBox("chkGR").Checked Then - If GPS.RepPuntosGet(row.DataKey("CvePuntoDeInteres").ToEntero, Dispositivos, txtFechaI.Text.ToDateTime, txtFechaF.Text.ToDateTime, UsuarioActual.CveCliente) Then - Coords = SQLToGmaps(row.DataKey("Punto").ToString, "POINT") - SBBody.Append($"
    ") - SBBody.Append($"
    Punto: {row.DataKey("PuntoDeInteres")}
    ") + FechaF = If(txtFechaF.Text.Trim = "", MaxFecha, txtFechaF.Text.Trim.ToDate) + + Dim ObjGPS As New ClsGPS + Try + For Each row As GridViewRow In GvPuntos.Rows + SBBody.Clear() + If row.FCCheckBox("chkGR").Checked Then + If ObjGPS.RepPuntosGet(row.DataKey("CvePuntoDeInteres").ToEntero, Dispositivos, txtFechaI.Text.ToDateTime, txtFechaF.Text.ToDateTime, UsuarioActual.CveCliente) Then + + DtDatosReporte = ObjGPS.DtResultados.Copy() + GvBarra.DataSource = DtDatosReporte + + Coords = SQLToGmaps(row.DataKey("Punto").ToString, "POINT") + SBBody.Append($"
    ") + SBBody.Append($"
    Punto: {row.DataKey("PuntoDeInteres")}
    ") + + If ObjGPS.DtResultados.Rows.Count > 0 Then + Color = "#26C281" + SBBody.Append($"
    ") + For Each Cve As String In DispositivosLista + If ObjGPS.DtResultados.FiltraParametros($"CveDispositivo = {Cve} ").Rows.Count > 0 Then + SBBody.Append($"") + SBBody.Append($"") + End If + Next + SBBody.Append($"
    {ObjGPS.DtResultados.FiltroPrimeroValor("Vehiculo", $"CveDispositivo = {Cve}")}: {ObjGPS.DtResultados.FiltroPrimeroValor("Visitas", $"CveDispositivo = {Cve}")} visitas
    Última Visita: {ObjGPS.DtResultados.FiltroPrimeroValor("UltimaVisita", $"CveDispositivo = {Cve}")}
    ") + Else + Color = "#e82929" + SBBody.Append($"Este punto de interés no fue visitado en las fechas seleccionadas.") + End If + SBBody.Append($"
    ") + RegistraScript($"CreaCirculo({Coords},'{Color}');CreaMarcador({Coords},'{row.DataKey("PuntoDeInteres")}','{SBBody.ToString}');", row.DataKey("CvePuntoDeInteres")) + End If + End If + Next + Catch ex As Exception + OnError("Ocurrió un error al consultar los puntos de interes", ex) + End Try - If GPS.DtResultados.Rows.Count > 0 Then - Color = "#26C281" - SBBody.Append($"
    ") - For Each Cve As String In DispositivosLista - If GPS.DtResultados.FiltraParametros($"CveDispositivo = {Cve} ").Rows.Count > 0 Then - SBBody.Append($"") - SBBody.Append($"") - End If - Next - SBBody.Append($"
    {GPS.DtResultados.FiltroPrimeroValor("Vehiculo", $"CveDispositivo = {Cve}")}: {GPS.DtResultados.FiltroPrimeroValor("Visitas", $"CveDispositivo = {Cve}")} visitas
    Última Visita: {GPS.DtResultados.FiltroPrimeroValor("UltimaVisita", $"CveDispositivo = {Cve}")}
    ") - Else - Color = "#e82929" - SBBody.Append($"Este punto de interés no fue visitado en las fechas seleccionadas.") - End If - SBBody.Append($"
    ") - RegistraScript($"CreaCirculo({Coords},'{Color}');CreaMarcador({Coords},'{row.DataKey("PuntoDeInteres")}','{SBBody.ToString}');", row.DataKey("CvePuntoDeInteres")) - End If - End If - Next - GPS.Dispose() + ObjGPS.Dispose() + GvBarra.DataBind() + UPGV.Update() End Sub 'If GPS.GeoReferenciasEntradasSalidas(GVRow.DataKey("CveDispositivo").ToString.ToEntero, row.DataKey("CveGeoReferencia").ToString.ToEntero, FechaI, FechaF) Then @@ -152,5 +172,41 @@ Partial Class GPS_RepPuntosDeInteres GVHistorico.DataBind() UpdatePanel3.Update() RegistraScript("$('#dvHistorico').modal()") + End Sub + + 'Protected Sub GvBarra_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvBarra.RowDataBound + ' If e.Row.RowType = DataControlRowType.DataRow Then + ' Dim RowID As String = $"row{e.Row.RowIndex}" + ' e.Row.Attributes("id") = RowID + ' Dim IndexGvBarra As Integer = If(String.IsNullOrEmpty(HdnIndexGvBarra.Value), -1, HdnIndexGvBarra.Value.ToEntero) + + ' RegistraScript($"GetDireccionesGV({e.Row.DBCampo("Posicion").ToString}, {e.Row.RowIndex}, 1);", $"{RowID}") + + ' End If + 'End Sub + + Protected Sub btnImprimir_Click(sender As Object, e As EventArgs) + Dim Btn As Button = CType(sender, Button) + Dim Format = Btn.CommandArgument + EnviarReporteProgramado(Format) + + End Sub + Public Sub EnviarReporteProgramado(Format As String) + Dim RutaReporte = "Empresas/Grales/ReportesProgramados/RPTPuntosInteres.rdlc" + Dim NombreReporte = "ReportePuntosInteres" + + Try + Dim RptParametro As New List(Of ReportParameter) + RptParametro.Add(New ReportParameter("FechaInicio", txtFechaI.Text)) + RptParametro.Add(New ReportParameter("FechaFin", txtFechaF.Text)) + RptParametro.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario)) + RptParametro.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToShortDateString)) + + Dim retorno = StreamPDF(RutaReporte, DtDatosReporte, RptParametro, $"{NombreReporte}{Date.Now.ToShortDateString}", Format, MR:=Nothing, RDSName:="DsOC") + + ImprimirbytesPDF(retorno, $"{NombreReporte}{Date.Now.ToShortDateString}", Format) + Catch ex As Exception + GuardaLog(String.Format("Ocurrio un error al generar el reporte RLDC {0}", ex)) + End Try End Sub End Class From ed419a3a046eb46dd1a6ab6393caa4f95c622f05 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Wed, 10 Feb 2021 12:54:37 -0700 Subject: [PATCH 21/24] Facturacion de usados de cotizaciones --- Ventas/Ventas.aspx | 4 +- Ventas/Ventas.aspx.vb | 88 +++++++++++++++++++++++++++++++++++++++---- 2 files changed, 84 insertions(+), 8 deletions(-) diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index 3ea56173b..0bc461505 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -3493,7 +3493,9 @@ Kilometraje  - + + + Correo Notificación Usuario Final:   diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 119df860e..fe76a8aab 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -1290,6 +1290,15 @@ Partial Class Ventas End Set End Property + Private Property CveVentaUsadoDevolucionEfectivo As Integer + Get + Return If(IsNothing(ViewState("CveVentaUsadoDevolucionEfectivo")), 0, CType(ViewState("CveVentaUsadoDevolucionEfectivo"), Integer)) + End Get + Set(value As Integer) + ViewState("CveVentaUsadoDevolucionEfectivo") = value + End Set + End Property + #End Region #Region "Propiedades PuntoVenta" @@ -7236,6 +7245,13 @@ Partial Class Ventas End If End If + If UsuarioActual.Empresa.Funcionalidad(558).ToEntero() = 1 AndAlso TrKilometraje.Visible Then + If TxtKilometraje.Text.Length < 6 Then + Alert("El kilometraje debe tener 6 digitos.", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + End If + 'CUANDO ES COTIZACION Y SE VA A FACTURAR SE HACE INGRESO If DdlTipoComprobante.SelectedValue = "Cot" AndAlso BtnEmitirImprimir.Text = "Facturar" Then DdlTipoComprobante.SelectedValue = "Ing" @@ -10774,6 +10790,13 @@ Partial Class Ventas Me.AplicaRelacionManual = False End If + 'SI SE SELECCIONO UNA FACTURA PARA DEVOLUCION DE EFECTIVO DEBE ASOCIARLA A LA NOTA DE CREDITO + If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso factura.TipoDocto = "Egs" AndAlso Me.CveVentaUsadoDevolucionEfectivo > 0 Then + If Not ObjVentas.AddVentasRelacionadas(ObjVentas.CveVenta, CveVentaUsadoDevolucionEfectivo) Then + ErrorList.Add("Ocurrió un error al relacionar la venta de devolución de efectivo entre si.") + End If + End If + If UsuarioActual.Empresa.Funcionalidad(280) = "1" And RblPaqueteria.SelectedValue = "1" And Not factura.TipoDocto.Contiene("Rem", "Ped") Then NotificarPaqueteria() End If @@ -19123,7 +19146,7 @@ Partial Class Ventas If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Dev", "Egs") Then Dim sb As New StringBuilder() - If Not String.IsNullOrEmpty(FolioFiscal) Then + If Not String.IsNullOrEmpty(FolioFiscal) AndAlso Not (UsuarioActual.Empresa.Funcionalidad(529) = "1") Then sb.Append("La factura se encuentra en el siguiente estatus del SAT:
    ") Dim TotalT As Decimal = TxtTotal.Text.ToDecimal @@ -24675,9 +24698,14 @@ Partial Class Ventas End If 'SOLO APLICA SI NO HAY DOCUMENTOS QUE SELECCIONAR - If UsuarioActual.CveEmpresa = 140 Then + If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then If GvCxC.Rows.Count = 0 OrElse GvCxC.Rows.Cast(Of GridViewRow)().Count(Function(gvr) gvr.FCCheckBox("ChkCxC").Checked) = 0 Then - Alert("No se ha seleccionado ninguna factura, en caso de no seleccionar ninguna se creará una nueva nota de crédito. ¿Está seguro de realizar esta acción?", TipoMensaje.MsgConfirmacion, JSBtnAceptar:="BtnAplicaNuevaNC();", TextoConfirmacion:="    Si    ", TextoCancelacion:="    No    ") + If ClienteEsDistribuidor AndAlso TxtImportesRemisionesNC.Text.ToDecimal() > 0 Then + Alert("No se puede generar una nota de crédito para devolución de efectivo si el cliente es distribuidor.", TipoMensaje.MsgAdvertencia) + Else + Alert("No se ha seleccionado ninguna factura, en caso de no seleccionar ninguna se creará una nueva nota de crédito. ¿Está seguro de realizar esta acción?", TipoMensaje.MsgConfirmacion, JSBtnAceptar:="BtnAplicaNuevaNC();", TextoConfirmacion:="    Si    ", TextoCancelacion:="    No    ") + End If + Else AplicarNotaCreditoDesdeVenta() End If @@ -24694,6 +24722,8 @@ Partial Class Ventas Private Sub AplicarNotaCreditoDesdeVenta(Optional AplicaNuevoDocumento As Boolean = False) RegistraScript("$('#ModalAplicarNC').modal('hide');", "EscondeModalNC") + CveVentaUsadoDevolucionEfectivo = -1 + DdlTipoComprobante.SelectedValue = "Egs" Dim AplicaImpuestosLocales As Boolean = False @@ -24722,6 +24752,11 @@ Partial Class Ventas End If ObjVentas.Dispose() + 'SI SE SELECCIONO UNA FACTURA PARA DEVOLUCION DE EFECTIVO DEBE ASOCIARLA A LA NOTA DE CREDITO + If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso AplicaNuevoDocumento AndAlso DdlVentaUsado.SelectedValue.ToEntero() > 0 AndAlso TxtImportesRemisionesNC.Text.ToDecimal() > 0 Then + CveVentaUsadoDevolucionEfectivo = DdlVentaUsado.SelectedValue.ToEntero() + End If + AplicarNC(DdlNCPS.SelectedValue.ToEntero(), EsNCAmortizacion:=ChkAplicaNCAnticipo.Checked, AplicaImpuestosLocales:=AplicaImpuestosLocales, AplicaNuevoDocumento:=AplicaNuevoDocumento, AplicoNCFacturaActual:=True) End Sub @@ -26688,6 +26723,9 @@ Partial Class Ventas Dim Cves As New StringBuilder Dim CveMetodoPago As Integer = -1 Dim MetodoPagoDif As Boolean = False + + Dim ListaVentaDetalleCotizacion As List(Of MVentaDetalleCotizacion) = Nothing + If ChkCotProductos.Checked Then For Each row As DataRow In DTSeleccionadas.Rows If CveMetodoPago <> -1 And row("CveMetodoPago33").ToString().ToEntero() <> CveMetodoPago Then @@ -26702,7 +26740,7 @@ Partial Class Ventas 'CARGA LOS USADOS RELACIONADOS A LOS PRODUCTOS SELECCIONADOS DE LA COTIZACION If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then - CalculaUsadosCotizacion(Cves, DTSeleccionadas, DtCotizaciones) + ListaVentaDetalleCotizacion = CalculaUsadosCotizacion(Cves, DTSeleccionadas, DtCotizaciones) End If Else @@ -26728,6 +26766,18 @@ Partial Class Ventas ObjClientes.Dispose() Cves.Clear() + 'SI SE CALCULARON USADOS LA CANTIDAD DEBE ASIGNARSE A PARTIR DEL CALCULO + If ListaVentaDetalleCotizacion IsNot Nothing AndAlso ListaVentaDetalleCotizacion.Count > 0 Then + + For Each Dr As DataRow In DtCotizacionesPS.Rows + Dim VentaDetalle = ListaVentaDetalleCotizacion.FirstOrDefault(Function(cot) cot.CveVentaDetalle = Dr("CveVentaDetalle").ToString().ToEntero()) + If VentaDetalle IsNot Nothing Then + Dr("Cantidad") = VentaDetalle.Cantidad + End If + Next + + End If + If Not AgregaPSCotizacion() Then Alert("Ocurrió un error validar las partidas de las cotizaciones seleccionadas. Por favor verifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia) Exit Sub @@ -26749,14 +26799,29 @@ Partial Class Ventas UpPS.Update() UpParametros.Update() End Sub + Private Class MVentaDetalleCotizacion + Public Property CveVentaDetalle As Integer + Public Property Cantidad As Decimal + End Class + + Private Function CalculaUsadosCotizacion(ByRef SbVentasDetalle As StringBuilder, ByVal DTSeleccionadas As DataTable, ByVal DtCotizaciones As DataTable) As List(Of MVentaDetalleCotizacion) + Dim Retorno As New List(Of MVentaDetalleCotizacion) - Private Sub CalculaUsadosCotizacion(ByRef SbVentasDetalle As StringBuilder, ByVal DTSeleccionadas As DataTable, ByVal DtCotizaciones As DataTable) If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Cot", "Dev") Then Dim DTTamanios As DataTable = GlobalDTAcumTamaños() Dim DTCvePSCostos As DataTable = DTTamanios.FiltraParametros("", "", {"CvePSCargo"}) + + For Each Dr As DataRow In DTSeleccionadas.Rows + Dim tCantidad = If(ChkCotProductos.Checked, GvCotPS.Rows(IndiceGVCotDataKey(GvCotPS, Dr("CveVentaDetalle").ToString())).FCTextBox("TxtCantidadCot").Text.ToDecimal, Dr("Cantidad")).ToString().ToDecimal + Dr("Cantidad") = tCantidad + + Retorno.Add(New MVentaDetalleCotizacion() With {.CveVentaDetalle = Dr("CveVentaDetalle").ToString().ToEntero(), .Cantidad = tCantidad}) + + Next + Dim TmpDTCalculo As DataRow() = DTSeleccionadas.Rows.Cast(Of DataRow).ToArray() Dim DTPSTemp As New DataTable '= TmpDT.Clone @@ -26812,11 +26877,15 @@ Partial Class Ventas Dim CveVentaDetalleUsado = DtCotizaciones.FiltroPrimeroValor("CveVentaDetalle", $"CveVenta = {drowPsTamaños("CveVenta")} AND CvePS = {drowPsTamaños("CvePS")}").ToEntero() SbVentasDetalle.AppendFormat("{0},", CveVentaDetalleUsado) + Retorno.Add(New MVentaDetalleCotizacion() With {.CveVentaDetalle = CveVentaDetalleUsado, .Cantidad = drowPsTamaños("Cantidad").ToString().ToDecimal()}) + End If Next End If - End Sub + + Return Retorno + End Function Private Sub VerificaCotizaciones(ByRef dt As DataTable) If ChkCotProductos.Checked Then For Each Gvr As GridViewRow In GvCotPS.Rows @@ -26862,7 +26931,12 @@ Partial Class Ventas If DtCotizacionesPS IsNot Nothing Then Dim tCantidad As Decimal = 0 For Each Dr As DataRow In DtCotizacionesPS.Select() - tCantidad = If(ChkCotProductos.Checked, GvCotPS.Rows(IndiceGVCotDataKey(GvCotPS, Dr("CveVentaDetalle").ToString())).FCTextBox("TxtCantidadCot").Text.ToDecimal, Dr("Cantidad")).ToString().ToDecimal + If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then + tCantidad = Dr("Cantidad").ToString().ToDecimal() + Else + tCantidad = If(ChkCotProductos.Checked, GvCotPS.Rows(IndiceGVCotDataKey(GvCotPS, Dr("CveVentaDetalle").ToString())).FCTextBox("TxtCantidadCot").Text.ToDecimal, Dr("Cantidad")).ToString().ToDecimal + End If + AgregarProductoServicio(tCantidad, Dr("CveUM").ToString().ToEntero(), Dr("UM").ToString(), Dr("CveClasificacion").ToString().ToEntero(), Dr("Clasificacion").ToString(), Dr("CvePS").ToString().ToEntero(), Dr("PS").ToString(), Dr("Obs").ToString(), Dr("PU").ToString().ToDecimal, Dr("Descuento").ToString().ToDecimal, Dr("CveProyecto").ToString().ToEntero(), Dr("Proyecto").ToString(), Dr("CveSubProyecto").ToString().ToEntero(), Dr("SubProyecto").ToString(), From ced240737ac3720110751f4e6fe65e8eea775d98 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Wed, 10 Feb 2021 12:54:56 -0700 Subject: [PATCH 22/24] Movimientos virtuales --- Inventarios/TraspasoAlmacen.aspx.vb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Inventarios/TraspasoAlmacen.aspx.vb b/Inventarios/TraspasoAlmacen.aspx.vb index 021418dfa..6f5438acc 100644 --- a/Inventarios/TraspasoAlmacen.aspx.vb +++ b/Inventarios/TraspasoAlmacen.aspx.vb @@ -934,7 +934,7 @@ Partial Class Inventarios_TraspasoAlmacen If Not ErrorMovInv Then 'VIRTUAL ENTRADA - If RealizarMovimientoVirtual Then + If RealizarMovimientoVirtual AndAlso CveAlmacenVirtualEntrada > 0 Then Dim dtvirtual As DataTable = Nothing @@ -963,6 +963,7 @@ Partial Class Inventarios_TraspasoAlmacen ErrorMovInv = True End If End If + Dim Concepto As String = TxtObservaciones.Text If Concepto = "" Then Concepto = "Traspaso" 'AGREGAMOS PREPOLIZAS TRASPASO DIRECTO: @@ -1743,13 +1744,13 @@ Partial Class Inventarios_TraspasoAlmacen If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteDecimal, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=ImporteDecimal) Then ErrorMovInv = True - TextoError = "Ocurrió un erro al cancelar el traspaso" + TextoError = "Ocurrió un error al cancelar el traspaso" End If If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteDecimal, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=ImporteDecimal) Then ErrorMovInv = True - TextoError = "Ocurrió un erro al cancelar el traspaso" + TextoError = "Ocurrió un error al cancelar el traspaso" End If End If @@ -2967,7 +2968,7 @@ Partial Class Inventarios_TraspasoAlmacen Else Str = String.Format(" AND CveSubProyecto = {0} ", DrAlmO("CveSubProyecto")) End If - DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros(String.Format(" CveTipoAlmacen NOT IN (3,4,9,10,11,24,27,28) AND Estatus = 'Activo' {0} ", Str)) + DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros(String.Format(" CveTipoAlmacen NOT IN (3,4,9,10,11,24,25,28) AND Estatus = 'Activo' {0} ", Str)) DdlAlmacenDestino.DataBind() DdlAlmacenDestino.Items.Insert(0, New ListItem("Seleccione", "-1")) From f867104d5d40e30d94b961d81a3bd57a82d73736 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Wed, 10 Feb 2021 12:55:13 -0700 Subject: [PATCH 23/24] Descuentos de efectivo por NC en reporte de cortes --- Bancos/RepCortes.aspx | 9 +++++++++ Compras/PopUpVerFactura.aspx.vb | 6 +++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Bancos/RepCortes.aspx b/Bancos/RepCortes.aspx index e76a349bd..c1a194e31 100644 --- a/Bancos/RepCortes.aspx +++ b/Bancos/RepCortes.aspx @@ -231,6 +231,15 @@ + + + + + + + + + diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 1cd5bf0c5..94dc00a5d 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -1327,7 +1327,7 @@ Partial Class PopUpVerFactura Dim CveTipoAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTipoAlmacen", $"CveAlmacen = {CveAlmacen}").ToString.ToEntero 'VERIFICA SI TIENE MOVIMIENTO VIRTUAL RELACIONADO - If UsuarioActual.CveEmpresa = 140 AndAlso ObjInventarios.DtResultados.Rows.Count > 0 Then + If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso ObjInventarios.DtResultados.Rows.Count > 0 Then CveMovimientoRelacionado = ObjInventarios.DtResultados.Rows(0)("CveMtoRel").ToString().ToEntero() If CveConcepto.Contiene(2, 3, 26, 27) AndAlso ObjInventarios.DtResultados.FiltroPrimeroValor("CveMovimientoVirtual").ToEntero() > 0 Then FolioRelacionado = ObjInventarios.DtResultados.FiltroPrimeroValor("FolioVirtual") @@ -1361,7 +1361,7 @@ Partial Class PopUpVerFactura If ObjInventarios.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then DtMovimientos = ObjInventarios.DtResultados.Copy() CantidadProductos = DtMovimientos.SUM("Cantidad").ToDecimal() - If UsuarioActual.CveEmpresa = 140 AndAlso CveMovimientoRelacionado > 0 Then + If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso CveMovimientoRelacionado > 0 Then If ObjInventarios.GetMovimientos(CveMovimientoRelacionado, -1, -1, UsuarioActual.CveEmpresa) Then Dim CveAlmacenRelacionado As Integer = ObjInventarios.CveAlmacen Dim CveTipoAlmacenRelacionado As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTipoAlmacen", $"CveAlmacen = {CveAlmacenRelacionado}").ToString.ToEntero @@ -1393,7 +1393,7 @@ Partial Class PopUpVerFactura End If End If - If UsuarioActual.CveEmpresa = 140 AndAlso CveCompra > 0 Then + If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso CveCompra > 0 Then If ObjInventarios.RecepcionAlmacenGet(CveCompra, -1, UsuarioActual.CveEmpresa) AndAlso ObjInventarios.DtResultados.Rows.Count > 0 Then Dim DtFaltante As DataTable = ObjInventarios.DtResultados.FiltraParametros("CantidadF > 0") If DtFaltante.Rows.Count > 0 Then From b29d81b472305a5db745f549e8abde6b437e3804 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Wed, 10 Feb 2021 12:55:45 -0700 Subject: [PATCH 24/24] BDH ScoreCard --- Ventas/CatMetasVendedores.aspx | 2 +- Ventas/CatMetasVendedores.aspx.vb | 15 +++++++++------ Ventas/MetasVendedores.aspx | 23 +++++++++++++++++++---- Ventas/MetasVendedores.aspx.vb | 8 +++++--- 4 files changed, 34 insertions(+), 14 deletions(-) diff --git a/Ventas/CatMetasVendedores.aspx b/Ventas/CatMetasVendedores.aspx index 366e385c0..98b8d61e6 100644 --- a/Ventas/CatMetasVendedores.aspx +++ b/Ventas/CatMetasVendedores.aspx @@ -22,7 +22,7 @@ - + diff --git a/Ventas/CatMetasVendedores.aspx.vb b/Ventas/CatMetasVendedores.aspx.vb index 0f1e9f8f5..5a956cdb6 100644 --- a/Ventas/CatMetasVendedores.aspx.vb +++ b/Ventas/CatMetasVendedores.aspx.vb @@ -42,13 +42,14 @@ Partial Class CatMetasVendedores DdlMarcas.DataBind() DdlMarcas.Items.Insert(0, New ListItem("Todos", "-1")) - DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa) + DdlClasificacionSup.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa) + DdlClasificacionSup.DataBind() + DdlClasificacionSup.Items.Insert(0, New ListItem("Todos", "-1")) + + DdlClasificacion.DataSource = GlobalDTClasificaciones2(UsuarioActual.CveEmpresa) DdlClasificacion.DataBind() DdlClasificacion.Items.Insert(0, New ListItem("Todos", "-1")) - DdlClasificacionSup.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa) - DdlClasificacionSup.DataBind() - DdlClasificacionSup.Items.Insert(0, New ListItem("Todos", "-1")) End Sub Protected Sub LnkAgregar_Click() Handles LnkAgregar.Click @@ -100,8 +101,10 @@ Partial Class CatMetasVendedores CveMetaVendedor = GvRow.DataKey("CveMeta").ToEntero DdlVendedores.SelectedValue = GvRow.DataKey("CveVendedor") TxtFechaI.Text = GvRow.DataKey("MesAño") - DdlClasificacionSup.SelectedValue = GvRow.DataKey("CveClasificacionSup") - DdlClasificacion.SelectedValue = GvRow.DataKey("CveClasificacion") + + DdlClasificacionSup.SelectedValueExist(GvRow.DataKey("CveClasificacionSup")) + DdlClasificacion.SelectedValueExist(GvRow.DataKey("CveClasificacion")) + DdlMarcas.SelectedValue = GvRow.DataKey("CveMarca") TxtMetaCantidad.Text = GvRow.DataKey("MetaCantidad") TxtMetaImporte.Text = GvRow.DataKey("MetaImporte") diff --git a/Ventas/MetasVendedores.aspx b/Ventas/MetasVendedores.aspx index efb1b7674..54b52aa47 100644 --- a/Ventas/MetasVendedores.aspx +++ b/Ventas/MetasVendedores.aspx @@ -154,6 +154,11 @@ + + + + + @@ -164,14 +169,24 @@ + + + + + + + + + + - + - + @@ -184,11 +199,11 @@ - +<%-- - + --%> diff --git a/Ventas/MetasVendedores.aspx.vb b/Ventas/MetasVendedores.aspx.vb index 41c71e9c0..458f35336 100644 --- a/Ventas/MetasVendedores.aspx.vb +++ b/Ventas/MetasVendedores.aspx.vb @@ -47,7 +47,7 @@ Partial Class MetasVendedores DdlClasificaciones.DataBind() DdlClasificaciones.Items.Insert(0, New ListItem("Todos", "-1")) - DdlClasificacion2.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa) + DdlClasificacion2.DataSource = GlobalDTClasificaciones2(UsuarioActual.CveEmpresa) DdlClasificacion2.DataBind() DdlClasificacion2.Items.Insert(0, New ListItem("Todos", "-1")) @@ -75,8 +75,10 @@ Partial Class MetasVendedores Protected Sub GV_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GV.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then - e.Row.FCLabel("lblRealMesPorcentaje").Text = String.Format("{0}{1}", e.Row.FCLabel("lblRealMesPorcentaje").Text, "%") - e.Row.FCLabel("lblVarVSAAPerc").Text = String.Format("{0}{1}", e.Row.FCLabel("lblVarVSAAPerc").Text, "%") + e.Row.FCLabel("lblRealMesPorcentaje").Text = String.Format("{0}{1}", e.Row.FCLabel("lblRealMesPorcentaje").Text, "%") + e.Row.FCLabel("lblRealAcumuladoPorcentaje").Text = String.Format("{0}{1}", e.Row.FCLabel("lblRealAcumuladoPorcentaje").Text, "%") + 'e.Row.FCLabel("lblVarVSAAPerc").Text = String.Format("{0}{1}", e.Row.FCLabel("lblVarVSAAPerc").Text, "%") + Select Case e.Row.DataKey("Etiqueta") Case "GrupoSuperior" e.Row.CssClass = "GrupoSuperior"