From bad06bab6528e68260021304c645872979a25ab1 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Fri, 21 Oct 2022 09:56:09 -0700 Subject: [PATCH 01/15] Folio no se mostraba complemetamente --- Empresas/140/Formatos/Salidas.rdlc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Empresas/140/Formatos/Salidas.rdlc b/Empresas/140/Formatos/Salidas.rdlc index f9f790b59..22fc05b6c 100644 --- a/Empresas/140/Formatos/Salidas.rdlc +++ b/Empresas/140/Formatos/Salidas.rdlc @@ -768,7 +768,7 @@ 0.22328cm 13.63291cm 0.89103cm - 4.09693cm + 3.51794cm 5 - - - - -
  • - PDF -
  • -
  • - Excel -
  • -
  • - Excel -
  • -
  • - Excel Personalizado -
  • -
  • - Personalizar Columnas -
  • -
  • - Descarga PDFs -
  • -
  • - Descargar XML -
  • -
  • - Ver Grafica -
  • -
    - - - - - - - - -
    -
    - - +<%@ Page Title="Reporte de Ventas - Detalle" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepVentaDetalle.aspx.vb" Inherits="RepVentaDetalle" EnableEventValidation="false" %> + + + + + + + + + + +
  • + PDF +
  • +
  • + Excel +
  • +
  • + Excel +
  • +
  • + Excel Personalizado +
  • +
  • + Personalizar Columnas +
  • +
  • + Descarga PDFs +
  • +
  • + Descargar XML +
  • +
  • + Ver Grafica +
  • +
    + + + + + + + + +
    +
    + + <%--
    @@ -94,35 +94,35 @@
    -
    --%> -
    - - Reporte de Ventas - Detalle - - - - - - -
    -
    -
    - - -
    -
    -
    - -
    - - - - - - - - - + --%> + + + Reporte de Ventas - Detalle + + + + + + +
    +
    +
    + + +
    +
    +
    + +
    + + + + + + + + + <%-- @@ -132,46 +132,48 @@ - --%> -
    - -
    + --%> +
    + +
    Fecha Inicio: -
    -
    -
    - - - - -
    - - - - - - -
    -
    + +
    +
    +
    + + + + +
    + + + + + + +
    +
    Fecha Fin: -
    -
    -
    - - - - -
    - - - - - - -
    - -
    - + +
    +
    +
    + + + + +
    + + + + + + +
    + +
    + <%-- @@ -190,123 +192,122 @@ - --%> - -
    -
    -
    -
    - +
    + + +
    + + + +
    + +
    +
    + + + + + + + + + + +
    +
    + +
    +
    + + + + + + + + + + +
    +
    +
    - -
    - + +
    + + + +
    + +
    + +
    + + +
    + + + + + +
    + + +
    + + + + + +
    + +
    +
    + +
    +
    @@ -314,489 +315,490 @@
    - Servicio Domicilio: -
    - - Todos - Si - No + Servicio Domicilio: +
    + + Todos + Si + No
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + diff --git a/Ventas/RepVentas.aspx b/Ventas/RepVentas.aspx index 73b10d77b..78134bf6e 100644 --- a/Ventas/RepVentas.aspx +++ b/Ventas/RepVentas.aspx @@ -328,7 +328,7 @@ Servicio Domicilio: -
    +
    Todos Si From fb48ca3917aa7d8426e217c6907091247760dac4 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Mon, 31 Oct 2022 12:41:32 -0700 Subject: [PATCH 10/15] parametros nuevos en cliente no frecuente --- App_Code/ClsClientes.vb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/App_Code/ClsClientes.vb b/App_Code/ClsClientes.vb index 2422f98ee..2fa90b6e1 100644 --- a/App_Code/ClsClientes.vb +++ b/App_Code/ClsClientes.vb @@ -1676,7 +1676,8 @@ Public Class ClsClientes End Function Public Function AgregarClienteNoFrecuente(Nombre As String, Direccion As String, NoExt As String, NoInt As String, Colonia As String, Localidad As String, Ciudad As String, CveEstado As Integer, RFC As String, CP As String, Telefono As String, Mail As String, CveSubProyecto As Integer, CveUsuario As Integer, CveEmpresa As Integer, - NumCuentaPago As String, CveMetodoPago33 As Integer, CveFormaPago33 As Integer, Optional CvePrecioLista As Integer = -1, Optional RegimenSociedad As String = "-1", Optional TipoPersona As Boolean = False) As Boolean + NumCuentaPago As String, CveMetodoPago33 As Integer, CveFormaPago33 As Integer, Optional CvePrecioLista As Integer = -1, Optional RegimenSociedad As String = "-1", + Optional TipoPersona As Boolean = False, Optional CveRegimenFiscal As Integer = -1, Optional CveUsoCFDI As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_ClientesNoFrecuenteAdd") @@ -1703,6 +1704,8 @@ Public Class ClsClientes .Add("@CvePrecioLista", SqlDbType.Int).Value = CvePrecioLista .Add("@RegimenSociedad", SqlDbType.VarChar).Value = RegimenSociedad .Add("@TipoPersona", SqlDbType.Bit).Value = TipoPersona + .Add("@CveRegimenFiscal", SqlDbType.Int).Value = CveRegimenFiscal + .Add("@CveUsoCFDI", SqlDbType.Int).Value = CveUsoCFDI End With From 98c3c24cbb5608afc3ffd7f7084d0dfc6cab5fbe Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Mon, 31 Oct 2022 12:41:49 -0700 Subject: [PATCH 11/15] Formato de traslado en stimulsoft --- Compras/PopUpVerFactura.aspx.vb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 6f85e1f3f..ab7a1ba29 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -4274,7 +4274,12 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) - ImprimirPDF(String.Format("Empresas/Grales/Formatos/Traslado.rdlc", UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Aviso de Traslado - {0}", Folio), RDSName:="DsInventarios") + If UsuarioActual.CveEmpresa.Contiene(172, 173) Then + ImprimirPDFStimulsoft(String.Format("Empresas/Grales/Formatos/Traslado.mrt", UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Aviso de Traslado - {0}", Folio), RDSName:="DsInventarios") + Else + ImprimirPDF(String.Format("Empresas/Grales/Formatos/Traslado.rdlc", UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Aviso de Traslado - {0}", Folio), RDSName:="DsInventarios") + End If + End If From 7e99988fa17d69fd50581332996f51242461e1f6 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Mon, 31 Oct 2022 12:42:17 -0700 Subject: [PATCH 12/15] Correcion en saldos iniciales de ventas --- General/SaldosIniciales.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/General/SaldosIniciales.aspx.vb b/General/SaldosIniciales.aspx.vb index 394cd44e1..0c112d085 100644 --- a/General/SaldosIniciales.aspx.vb +++ b/General/SaldosIniciales.aspx.vb @@ -1703,7 +1703,7 @@ Partial Class General_SaldosIniciales If TipoDocto.Contiene("Ing", "Egs", "Rem") Then GuardaLog(Serie & "-" & Folio) If Not ObjVentas.AddVenta(TipoDocto, Folio, CveCliente.ToEntero, CveClienteSucursal, SubTotal, 0, Amortizacion, IVA, RetIVA, RetISR, Total, CveMoneda, TipoCambio.ToDouble, - 0, 0, 0, FechaVencimiento, Fecha, "", "", Fecha, CveVendedor, Folio2, "", "", 0, 0, 0, "-1".ToDate, "-1".ToDate, "-1".ToDate, -1, -1, 0, CvePrePoliza, + 0, 0, 0, FechaVencimiento, Fecha, "", "", Fecha, CveVendedor, Folio2, "", "", 0, 0, 0, "-1".ToDate, "-1".ToDate, "-1".ToDate, -1, 0, CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Serie:=Serie, CveSubProyecto:=Sucursal.ToEntero, CveSubProyectoEjecucion:=Sucursal.ToEntero, CveSubProyectoCobranza:=Sucursal.ToEntero, IEPS:=IEPS, ObservacionesAlmacen:=Transaccion, Entrega:=CodCliente, ImpuestoLocal:=ImpuestoLocal, PedidoContrato:=PedidoContrato) Then From 2f28a20f2ca44aa10e2262e69c1c3b7800b1e09b Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Mon, 31 Oct 2022 12:42:33 -0700 Subject: [PATCH 13/15] Validaciones de OC --- OC/OC.aspx.vb | 5 ++ OC/RepOC.aspx | 3 ++ OC/RepOC.aspx.vb | 110 ++++++++++++++++++++++++++++----------- OC/RepRequisiciones.aspx | 1 + 4 files changed, 89 insertions(+), 30 deletions(-) diff --git a/OC/OC.aspx.vb b/OC/OC.aspx.vb index 2080c454b..76c7c54c1 100644 --- a/OC/OC.aspx.vb +++ b/OC/OC.aspx.vb @@ -2356,6 +2356,11 @@ Partial Class OC_OC Private Function ValidaGuardar() As Boolean Dim TieneError = False + If CboE.SelectedValue.ToEntero = 0 AndAlso TipoOC = "OC" Then + Alert("Las ordenes de compra no puede tener el estatus 'Pre Solicitud'. Debe ser una requisición", TipoMensaje.MsgAdvertencia) + Return True + End If + 'Entrega Directa requiere Cliente y Vendedor If ChkEntregaDirecta.Checked And Ddlcliente.txtValue.Value.ToEntero <= 0 Then Alert("Al ser una Entrega Directa es necesario seleccionar un cliente, por favor seleccione uno.") diff --git a/OC/RepOC.aspx b/OC/RepOC.aspx index e2c7a8874..7a1acc1b7 100644 --- a/OC/RepOC.aspx +++ b/OC/RepOC.aspx @@ -348,6 +348,7 @@ + @@ -385,6 +386,7 @@ + @@ -424,6 +426,7 @@ + diff --git a/OC/RepOC.aspx.vb b/OC/RepOC.aspx.vb index fdf6a6880..ed9c0d721 100644 --- a/OC/RepOC.aspx.vb +++ b/OC/RepOC.aspx.vb @@ -22,7 +22,7 @@ Partial Class RepOC Set(value As DataTable) ViewState("DtPorAtender") = value End Set - End Property + End Property Private Property DtPendiente As DataTable Get Return DirectCast(ViewState("DtPendiente"), DataTable) @@ -30,9 +30,9 @@ Partial Class RepOC Set(value As DataTable) ViewState("DtPendiente") = value End Set - End Property + End Property #End Region - + Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If Not Page.IsPostBack Then txtFechaI.Text = Now.AddMonths(-3).ToShortDateString @@ -108,12 +108,12 @@ Partial Class RepOC Protected Sub CargaUsuarios() ddlUsuario.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa).FiltraParametros("", "Nombre", {"CveUsuario", "Nombre"}) ddlUsuario.DataBind() - ddlUsuario.Items.Insert(0, New ListItem("Todos", "-1")) - + ddlUsuario.Items.Insert(0, New ListItem("Todos", "-1")) + DdlUsuarioAsignado.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 1", "Nombre", {"CveUsuario", "Nombre"}) DdlUsuarioAsignado.DataBind() - DdlUsuarioAsignado.Items.Insert(0, New ListItem("Todos", "-1")) - + DdlUsuarioAsignado.Items.Insert(0, New ListItem("Todos", "-1")) + DdlUsuarioAutorizo.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa).FiltraParametros("", "Nombre", {"CveUsuario", "Nombre"}) DdlUsuarioAutorizo.DataBind() DdlUsuarioAutorizo.Items.Insert(0, New ListItem("Todos", "-1")) @@ -137,7 +137,7 @@ Partial Class RepOC End Sub Protected Sub CargaEstatus() - DdlEstatus.DataSource = GlobalDTOCEstatus(UsuarioActual.CveEmpresa).FiltraParametros(String.Format(" (Tipo = '{0}' OR '{0}' = '-1')", DdlTipo.SelectedValue.ToString)) + DdlEstatus.DataSource = GlobalDTOCEstatus(UsuarioActual.CveEmpresa).FiltraParametros(String.Format(" (Tipo = '{0}' OR '{0}' = '-1')", DdlTipo.SelectedValue.ToString)) DdlEstatus.DataBind() If DdlTipo.SelectedValue = "-1" Or DdlTipo.SelectedValue = "REQ" Then DdlEstatus.Items.Insert(0, New ListItem("Pre Requisicion", "0")) DdlEstatus.Items.Insert(0, New ListItem("Todos", "-1")) @@ -205,34 +205,64 @@ Partial Class RepOC Dim OC As New ClsOC If OC.GetOrdenesPendientes(DdlTipo.SelectedValue.ToString, 0, UsuarioActual.CveEmpresa, DdlProyectos.SelectedValue.ToEntero, DdlSubProyectos.SelectedValue.ToEntero, - DdlEstatus.SelectedValue.ToEntero, UsuarioActual.CveUsuario, ddlcliente.SelectedValue.ToEntero, SoloSubProyectosConPermiso:=If(UsuarioActual.Empresa.Funcionalidad(530) = "1", True, False), + DdlEstatus.SelectedValue.ToEntero, UsuarioActual.CveUsuario, ddlcliente.SelectedValue.ToEntero, SoloSubProyectosConPermiso:=If(UsuarioActual.Empresa.Funcionalidad(530) = "1", True, False), CveUsuarioAsignado:=DdlUsuarioAsignado.SelectedValue.ToEntero(), EntregaDirecta:=DdlEntregaDirecta.SelectedValue.ToEntero()) Then DtPorAtender = OC.DtResultados GvPorAtender.DataSource = DtPorAtender 'OC.DtResultados GvPorAtender.DataBind() - 'If (GvPorAtender.Rows.Count > 0) Then - ' GvPorAtender.UseAccessibleHeader = True - ' GvPorAtender.HeaderRow.TableSection = TableRowSection.TableHeader - ' RegistraScript("AddScrollGvPorAtender();") - 'End If + 'SI NO TIENE DATOS, NO MOSTRAR LA COLUMNA + If OC.DtResultados.FiltraParametros("", DistinctColumns:={"UsuarioAsignado"}).FiltroPrimeroValor("UsuarioAsignado") = "" Then + GvPorAtender.Columns(10).Visible = False + End If + 'SI NO TIENE DATOS, NO MOSTRAR LA COLUMNA + If OC.DtResultados.FiltraParametros("", DistinctColumns:={"Cliente"}).FiltroPrimeroValor("Cliente") = "" Then + GvPorAtender.Columns(12).Visible = False + End If + + 'SI NO TIENE DATOS, NO MOSTRAR LA COLUMNA + If OC.DtResultados.FiltraParametros("", DistinctColumns:={"CodigoAF"}).FiltroPrimeroValor("CodigoAF") = "" Then + GvPorAtender.Columns(13).Visible = False + End If + + 'SI NO TIENE DATOS, NO MOSTRAR LA COLUMNA + If OC.DtResultados.FiltraParametros("", DistinctColumns:={"EntregaDirectaFormat"}).FiltroPrimeroValor("EntregaDirectaFormat") = "" Then + GvPorAtender.Columns(15).Visible = False + End If End If If OC.GetOrdenesPendientes(DdlTipo.SelectedValue.ToString, 1, UsuarioActual.CveEmpresa, DdlProyectos.SelectedValue.ToEntero, DdlSubProyectos.SelectedValue.ToEntero, - DdlEstatus.SelectedValue.ToEntero, UsuarioActual.CveUsuario, ddlcliente.SelectedValue.ToEntero, SoloSubProyectosConPermiso:=If(UsuarioActual.Empresa.Funcionalidad(530) = "1", True, False), + DdlEstatus.SelectedValue.ToEntero, UsuarioActual.CveUsuario, ddlcliente.SelectedValue.ToEntero, SoloSubProyectosConPermiso:=If(UsuarioActual.Empresa.Funcionalidad(530) = "1", True, False), CveUsuarioAsignado:=DdlUsuarioAsignado.SelectedValue.ToEntero(), EntregaDirecta:=DdlEntregaDirecta.SelectedValue.ToEntero()) Then GvPendientes.DataSource = OC.DtResultados - DtPendiente = OC.DtResultados + DtPendiente = OC.DtResultados GvPendientes.DataBind() - 'If (GvPendientes.Rows.Count > 0) Then - ' GvPendientes.UseAccessibleHeader = True - ' GvPendientes.HeaderRow.TableSection = TableRowSection.TableHeader - ' RegistraScript("AddScrollGvPendientes();") - 'End If + + 'SI NO TIENE DATOS, NO MOSTRAR LA COLUMNA + If OC.DtResultados.FiltraParametros("", DistinctColumns:={"UsuarioAsignado"}).FiltroPrimeroValor("UsuarioAsignado") = "" Then + GvPendientes.Columns(10).Visible = False + End If + + 'SI NO TIENE DATOS, NO MOSTRAR LA COLUMNA + If OC.DtResultados.FiltraParametros("", DistinctColumns:={"Cliente"}).FiltroPrimeroValor("Cliente") = "" Then + GvPendientes.Columns(12).Visible = False + End If + + 'SI NO TIENE DATOS, NO MOSTRAR LA COLUMNA + If OC.DtResultados.FiltraParametros("", DistinctColumns:={"CodigoAF"}).FiltroPrimeroValor("CodigoAF") = "" Then + GvPendientes.Columns(13).Visible = False + End If + + 'SI NO TIENE DATOS, NO MOSTRAR LA COLUMNA + If OC.DtResultados.FiltraParametros("", DistinctColumns:={"EntregaDirectaFormat"}).FiltroPrimeroValor("EntregaDirectaFormat") = "" Then + GvPendientes.Columns(15).Visible = False + End If + End If OC.Dispose() + End Sub Protected Sub GVPendientes_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvPendientes.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then @@ -337,19 +367,39 @@ Partial Class RepOC Dim OC As New ClsOC If OC.GetOrdenesCompraRep(DdlTipo.SelectedValue.ToString, DdlProyectos.SelectedValue.ToEntero, DdlSubProyectos.SelectedValue.ToEntero, DDlClasificacion.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, FI, FF, -1, ddlProveedor.SelectedValue.ToEntero, If(txtFolio.Text.ToEntero = 0, -1, txtFolio.Text.ToEntero), ddlUsuario.SelectedValue.ToEntero, - If(CheckNoCompleta.Checked, -1, UsuarioActual.CveUsuario), UsuarioActual.Empresa.CveEmpresa, If(DDlPS.SelectedValue = "", -1, DDlPS.SelectedValue.ToEntero), If(CheckNoCompleta.Checked, True, False), - ddlcliente.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero, SoloSubProyectosConPermiso:=If(UsuarioActual.Empresa.Funcionalidad(530) = "1", True, False), + If(CheckNoCompleta.Checked, -1, UsuarioActual.CveUsuario), UsuarioActual.Empresa.CveEmpresa, If(DDlPS.SelectedValue = "", -1, DDlPS.SelectedValue.ToEntero), If(CheckNoCompleta.Checked, True, False), + ddlcliente.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero, SoloSubProyectosConPermiso:=If(UsuarioActual.Empresa.Funcionalidad(530) = "1", True, False), CveUsuarioAutorizo:=DdlUsuarioAutorizo.SelectedValue.ToEntero(), CveUsuarioAsignado:=DdlUsuarioAsignado.SelectedValue.ToEntero(), EntregaDirecta:=DdlEntregaDirecta.SelectedValue.ToEntero()) Then GvConsultar.DataSource = OC.DtResultados - DtOC = OC.DtResultados - DtPorAtender = OC.DtResultados + DtOC = OC.DtResultados + DtPorAtender = OC.DtResultados LblTotal.Text = OC.DtResultados.SUM("Total").FormatoNumero If UsuarioActual.TienePermisoProceso(227) Then DivTotalOC.Visible = True End If + 'SI NO TIENE DATOS, NO MOSTRAR LA COLUMNA + If OC.DtResultados.FiltraParametros("", DistinctColumns:={"UsuarioAsignado"}).FiltroPrimeroValor("UsuarioAsignado") = "" Then + GvConsultar.Columns(10).Visible = False + End If + + 'SI NO TIENE DATOS, NO MOSTRAR LA COLUMNA + If OC.DtResultados.FiltraParametros("", DistinctColumns:={"Cliente"}).FiltroPrimeroValor("Cliente") = "" Then + GvConsultar.Columns(12).Visible = False + End If + + 'SI NO TIENE DATOS, NO MOSTRAR LA COLUMNA + If OC.DtResultados.FiltraParametros("", DistinctColumns:={"CodigoAF"}).FiltroPrimeroValor("CodigoAF") = "" Then + GvConsultar.Columns(13).Visible = False + End If + + 'SI NO TIENE DATOS, NO MOSTRAR LA COLUMNA + If OC.DtResultados.FiltraParametros("", DistinctColumns:={"EntregaDirectaFormat"}).FiltroPrimeroValor("EntregaDirectaFormat") = "" Then + GvConsultar.Columns(15).Visible = False + End If + End If OC.Dispose() GvConsultar.DataBind() @@ -382,7 +432,7 @@ Partial Class RepOC Case "2" 'Rechazada e.Row.Cells(7).CssClass = "label label-sm label-danger" 'Rojo Case "3" 'Solicitada - e.Row.Cells(7).CssClass = "label label-sm label-Default" 'Gris + e.Row.Cells(7).CssClass = "label label-sm label-default" 'Gris End Select If e.Row.DBCampo("Tipo") = "OC" Then @@ -497,11 +547,11 @@ Partial Class RepOC 'GvPendientes.ExportToExcel("OrdenesCompraPendientes" & Now.ToShortDateString) ImprimirPendientes("EXCEL") End Sub - Protected Sub LbPendientesPDF_Click(sender As Object, e As System.EventArgs) Handles LbPendientesPDF.Click - ImprimirPendientes("PDF") + Protected Sub LbPendientesPDF_Click(sender As Object, e As System.EventArgs) Handles LbPendientesPDF.Click + ImprimirPendientes("PDF") End Sub - Private Sub ImprimirPendientes(format As String) + Private Sub ImprimirPendientes(format As String) If UsuarioActual.CveEmpresa.Contiene(72) Then Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) @@ -514,7 +564,7 @@ Partial Class RepOC ImprimirPDF(String.Format(UsuarioActual.Empresa.Ruta & "/Formatos/RepRequisicionesOC.rdlc", UsuarioActual.Empresa.Ruta), DtPendiente, params, Formato:=format) Else GvConsultar.ExportToExcel("OrdenesCompra" & Now.ToShortDateString) - End If + End If End Sub Protected Sub LbConsultar_Click(sender As Object, e As System.EventArgs) Handles LbConsultar.Click If UsuarioActual.CveEmpresa.Contiene(72) Then diff --git a/OC/RepRequisiciones.aspx b/OC/RepRequisiciones.aspx index f89f57f3c..d3b8778f7 100644 --- a/OC/RepRequisiciones.aspx +++ b/OC/RepRequisiciones.aspx @@ -240,6 +240,7 @@ + From 7d550da50b6fbb547f279c755b9dac72f8d3ae59 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Mon, 31 Oct 2022 12:42:56 -0700 Subject: [PATCH 14/15] Sub Proyectos en CxP --- Compras/RepCxP.aspx | 1468 +++++++++++++++++---------------- Compras/RepCxP.aspx.vb | 14 +- Compras/RepCxPDetalle.aspx | 35 +- Compras/RepCxPDetalle.aspx.vb | 22 +- 4 files changed, 793 insertions(+), 746 deletions(-) diff --git a/Compras/RepCxP.aspx b/Compras/RepCxP.aspx index 118bd0604..643599192 100644 --- a/Compras/RepCxP.aspx +++ b/Compras/RepCxP.aspx @@ -1,777 +1,797 @@ -<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepCxP.aspx.vb" Inherits="Compras_RepCxP" %> - -<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> - - - - - - -
  • - PDF -
  • -
  • - Excel +<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepCxP.aspx.vb" Inherits="Compras_RepCxP" %> + +<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> + + + + + + +
  • + PDF +
  • +
  • + Excel <%----%> -
  • - -
  • - Ver Dlls en pesos -
  • -
  • - Personalizar Rango de Columnas -
  • - - -
  • - Ver Grafica -
  • -
    -
    -
    - - Cuentas Por Pagar - - - - - - -
    -
    -
    - - -
    -
    -
    -
    Proveedor:
    -
    - -
    -
    Clasificación:
    -
    - - - -
    -
    Fecha Inicio:
    -
    -
    - <%--width: 120px !important;--%> - - - - - - - - - - -
    -
    -
    Fecha Fin:
    -
    -
    - <%--width: 120px !important;--%> - - - - - - - - - - -
    -
    -
    Grupo:
    - -
    - - - - - - - - - - - - - -
    -
    -
    - -
    - +
    +
    +
    + + + + + + + + + + + Saldo - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Total - - - - - - - - + + + + + + + + + Ventas - - - - - - - + + + + + + + + Saldo - - - - - - - + + + + + + + + Resta - - - - - - - + + + + + + + + % Recup. - - - - - - - + + + + + + + + % X Recup. - - - - - - - - - - - - - - - - -
    :
    -
    - - - + +
    + + + +
    + + +
    + + +
    Comprobación:
    @@ -230,14 +237,7 @@
    -
    Aplica NC:
    -
    - - - - - -
    +
    @@ -246,7 +246,14 @@
    - +
    Aplica NC:
    +
    + + + + + +
    diff --git a/Compras/RepCxPDetalle.aspx.vb b/Compras/RepCxPDetalle.aspx.vb index 7538bb0e3..e5e5ed763 100644 --- a/Compras/RepCxPDetalle.aspx.vb +++ b/Compras/RepCxPDetalle.aspx.vb @@ -267,12 +267,16 @@ Partial Class RepCxPDetalle DdlUsuarioRegistro.SelectedValueExist(UsuarioRegistro) - Dim CveSucursal As Integer = IfNull(Request("CveSubProyecto"), -1).ToString.ToEntero - DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) - DdlSubProyecto.DataBind() + Dim CveSucursal As Integer = IfNull(Request("CveSubProyecto"), -1).ToString.ToEntero + + 'DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) + 'DdlSubProyecto.DataBind() + 'DdlSubProyecto.Items.Insert(1, New ListItem("Sin Sucursal", "0")) + 'DdlSubProyecto.SelectedValueExist(CveSucursal) + + CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyectofiltro) DdlSubProyecto.Items.Insert(1, New ListItem("Sin Sucursal", "0")) - DdlSubProyecto.SelectedValueExist(CveSucursal) - CargarCentrosDeCosto(Nothing, Nothing, Nothing, LblSubProyectofiltro) + 'CargarCentrosDeCosto(Nothing, Nothing, Nothing, LblSubProyectofiltro) Dim TipoMoneda As Integer = IfNull(Request("TipoMoneda"), 1).ToString.ToEntero RblTipoCambio.SelectedValue = TipoMoneda.ToString @@ -344,6 +348,14 @@ Partial Class RepCxPDetalle Next + End Sub + + Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlProyecto.SelectedIndexChanged + DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, DdlProyecto.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa, CveEstatus:=1) + DdlSubProyecto.DataBind() + DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1")) + + UPFiltros.Update() End Sub Private Function CargaCuentasContables(DT As DataTable) As DataTable From 8f178e82e7b8b4b1d025d4872d487f53b2ced297 Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 31 Oct 2022 12:46:19 -0700 Subject: [PATCH 15/15] =?UTF-8?q?--=20limpieza,=20para=20que=20no=20se=20e?= =?UTF-8?q?nv=C3=ADe=20valor=20en=20prepolizadetalle,=20cvecuenta?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/Ventas.aspx.vb | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index f29d85d84..47cafa9cd 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -14995,7 +14995,7 @@ Partial Class Ventas TotalCosto = DtCostos.SUMD("Total").RoundSQL Dim tmpCostos As DataTable = DtCostos.FiltraParametros("", "", {"CveClasificacion"}) Dim IdCtaContable As Integer = 0 - Dim CveCuenta As Integer = 0 + If tmpCostos.Rows.Count > 0 Then Dim TotalCostoAcumulado As Decimal = 0 Dim cont As Integer = 1 @@ -15008,23 +15008,19 @@ Partial Class Ventas If cont = tmpCostos.Rows.Count AndAlso TotalCosto <> TotalCostoAcumulado Then ValorInventario = ValorInventario + (TotalCosto - TotalCostoAcumulado) End If - - 'Concepto = String.Format("{0} - {1}", Row2("Clasificacion").ToString(), Row2("SubProyecto").ToString()) IdCtaContable = GlobalDTClasificaciones(factura.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero() - 'CveCuenta = GlobalDTClasificaciones(factura.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero() - 'If ValorInventario <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto69, ValorInventario, factura.SerieFolio, 69, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveSubProyecto:=factura.CveSubProyecto, CveClasificacion:=RowInv("CveClasificacion").ToString().ToEntero(), CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario, CveCuenta:=CveCuenta) Then + If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto69, ValorInventario, factura.SerieFolio, 69, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveSubProyecto:=factura.CveSubProyecto, CveClasificacion:=RowInv("CveClasificacion").ToString().ToEntero(), CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario) Then OcurrioError = True End If - 'End If + cont += 1 Next End If IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero() 'If TotalCosto <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto68, TotalCosto, factura.SerieFolio, 68, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=TotalCosto, CveCuenta:=CveCuenta, CveSubProyecto:=factura.CveSubProyecto) Then + If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto68, TotalCosto, factura.SerieFolio, 68, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=TotalCosto, CveSubProyecto:=factura.CveSubProyecto) Then OcurrioError = True ErrorList.Add("Ocurrió un error al guardar movimiento de almacen.
    Revise su factura y cualquier detalle comuníquese a Soporte Técnico") End If @@ -20151,7 +20147,6 @@ Partial Class Ventas Dim DtCostos As DataTable = Nothing Dim DtCostosDistinct As DataTable = Nothing Dim IdCtaContable As Integer = 0 - Dim CveCuenta As Integer = 0 Dim ValorInventario As Decimal = 0D Dim TotalCostoAcumulado As Decimal = 0D Dim Cont As Integer = 1 @@ -20183,7 +20178,6 @@ 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() TotalCostoAcumulado += ValorInventario 'cuando es el último movimiento y hay diferencias en los importes @@ -20193,7 +20187,7 @@ Partial Class Ventas Try 'If ValorInventario <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ValorInventario, ObjFactura.SerieFolio, 69, ObjFactura.SerieFolio, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=ObjFactura.CveCliente, CveClasificacion:=RowInv("CveClasificacion").ToString().ToEntero(), CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario, CveCuenta:=CveCuenta, CveSubProyecto:=ObjFactura.CveSubProyecto) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ValorInventario, ObjFactura.SerieFolio, 69, ObjFactura.SerieFolio, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=ObjFactura.CveCliente, CveClasificacion:=RowInv("CveClasificacion").ToString().ToEntero(), CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario, CveSubProyecto:=ObjFactura.CveSubProyecto) Then OcurrioError = True Exit For End If @@ -20207,7 +20201,7 @@ Partial Class Ventas If Not OcurrioError Then IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero() - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, TotalCosto, ObjFactura.SerieFolio, 68, ObjFactura.SerieFolio, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=ObjFactura.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=TotalCosto, CveCuenta:=CveCuenta, CveSubProyecto:=ObjFactura.CveSubProyecto) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, TotalCosto, ObjFactura.SerieFolio, 68, ObjFactura.SerieFolio, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=ObjFactura.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=TotalCosto, CveSubProyecto:=ObjFactura.CveSubProyecto) Then OcurrioError = True End If End If @@ -20413,7 +20407,6 @@ 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 ValorInventario As Decimal Dim TotalCostoAcumulado As Decimal = 0D Dim Cont As Integer = 1 @@ -20422,7 +20415,6 @@ 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() TotalCostoAcumulado += ValorInventario 'cuando es el último movimiento y hay diferencias en los importes @@ -20432,7 +20424,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 @@ -20446,7 +20438,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