From 86481c478bc829bb2ec0c58d0806d16d84413946 Mon Sep 17 00:00:00 2001 From: Rene Molina Date: Thu, 27 Feb 2020 08:33:22 -0700 Subject: [PATCH 01/16] inventarios --- App_Code/ClsInventarios.vb | 3 +- Inventarios/KardexAlmacenHorizontal.aspx | 49 +++++++++++++++++---- Inventarios/KardexAlmacenHorizontal.aspx.vb | 4 +- vwd.webinfo | 2 + 4 files changed, 46 insertions(+), 12 deletions(-) diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index 7b8d53ecf..32297767a 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -1472,7 +1472,7 @@ Public Class ClsInventarios Return Retorno End Function - Public Function GetKardexAlmacenHorizontal(CvePS As Integer, FechaFin As Date, CveAlmacen As Integer, CveUnidadMedida As Integer, CveProveedor As Integer, CveTipoAlmacen As Integer, IncluyeTransitorios As Integer, CveClasificacion As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional CondicionExistencias As Integer = 0) As Boolean + Public Function GetKardexAlmacenHorizontal(CvePS As Integer, FechaFin As Date, CveAlmacen As Integer, CveUnidadMedida As Integer, CveProveedor As Integer, CveTipoAlmacen As Integer, IncluyeTransitorios As Integer, CveClasificacion As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional CondicionExistencias As Integer = 0, Optional Orden As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Inv_KardexAlmacenHorizontalGet") @@ -1490,6 +1490,7 @@ Public Class ClsInventarios .Add("@CveProveedorCompra", SqlDbType.Int).Value = CveProveedor .Add("@CveTipoAlmacen", SqlDbType.Int).Value = CveTipoAlmacen .Add("@ExistenciasCondicion", SqlDbType.Int).Value = CondicionExistencias + .Add("@Orden", SqlDbType.Int).Value = Orden End With Try diff --git a/Inventarios/KardexAlmacenHorizontal.aspx b/Inventarios/KardexAlmacenHorizontal.aspx index 397af66ab..b0c469f31 100644 --- a/Inventarios/KardexAlmacenHorizontal.aspx +++ b/Inventarios/KardexAlmacenHorizontal.aspx @@ -58,6 +58,26 @@ .psagregar > div.codigo > input[type="submit"] { display: none; } + + @media (min-width: 991px) { + .textfilter { + max-width: 80px; + } + + .textfilter2 { + max-width: 70px; + } + + .dateFilter { + min-width: 115px; + } + } + + @media (min-width: 991px) and (max-width: 1400px) { + .titlefiltrosmedia .col-md-3 { + width: 22%; + } + } @@ -87,18 +107,18 @@ "> -
+
-
Proveedor
+
Proveedor
- -
- + +
+
- -
+ +
@@ -110,7 +130,7 @@
- +
@@ -146,7 +166,7 @@
- + @@ -154,6 +174,17 @@ <%----%>
+ + +
+ + + + + + +
+
diff --git a/Inventarios/KardexAlmacenHorizontal.aspx.vb b/Inventarios/KardexAlmacenHorizontal.aspx.vb index b8c30dfb3..92b34df1c 100644 --- a/Inventarios/KardexAlmacenHorizontal.aspx.vb +++ b/Inventarios/KardexAlmacenHorizontal.aspx.vb @@ -13,7 +13,7 @@ Partial Class Inventarios_KardexAlmacen TxtFechaF.Text = Now.ToShortDateString CargaCombos() ddlAlmacen.Items.Insert(0, New ListItem("Todos", "-1")) - + pnlOrden.Visible = UsuarioActual.CveEmpresa = 141 If IfNull(Request("CvePS"), "-1").ToString.ToEntero > 0 Then CargarKardex(Request("CvePS").ToString.ToEntero) ddlProducto2.SelectedValue = If(Request("CvePS") IsNot Nothing, Request("CvePS").ToString, "-1") End If @@ -128,7 +128,7 @@ Partial Class Inventarios_KardexAlmacen Dim CveAlmacen As Integer = ddlAlmacen.SelectedValue.ToEntero Dim CveProveedorCompra As Integer = If(DdlProveedor.SelectedValue.ToEntero > 0, DdlProveedor.SelectedValue.ToEntero, -1) - If ObjMovimientos.GetKardexAlmacenHorizontal(CvePS, FechaF, CveAlmacen, DdlUnidadMedida.SelectedValue.ToEntero, CveProveedorCompra, DdlTipoAlmacen.SelectedValue.ToEntero(), DdlIncluyeTransitorios.SelectedValue.ToEntero(), DdlClasificacion.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CondicionExistencias:=DdlExistencia.SelectedValue) Then + If ObjMovimientos.GetKardexAlmacenHorizontal(CvePS, FechaF, CveAlmacen, DdlUnidadMedida.SelectedValue.ToEntero, CveProveedorCompra, DdlTipoAlmacen.SelectedValue.ToEntero(), DdlIncluyeTransitorios.SelectedValue.ToEntero(), DdlClasificacion.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CondicionExistencias:=DdlExistencia.SelectedValue, Orden:=DdlOrden.SelectedValue.ToEntero()) Then If ObjMovimientos.DtResultados IsNot Nothing AndAlso ObjMovimientos.DtResultados.Rows.Count > 0 Then dt = ObjMovimientos.DtResultados Dim ListaBorrar As New List(Of DataColumn) diff --git a/vwd.webinfo b/vwd.webinfo index 2515705b1..bfda47f43 100644 --- a/vwd.webinfo +++ b/vwd.webinfo @@ -21,6 +21,8 @@ + + \ No newline at end of file From 89f91642942c4ff85ba5532afda8dd55001a98f5 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Mon, 2 Mar 2020 12:28:44 -0700 Subject: [PATCH 02/16] Asignacion de valores a objeto de subproyecto --- App_Code/ClsPaginas.vb | 3 ++- App_Code/EntityModel.vb | 6 +++++- App_Code/Modelos.vb | 15 ++------------- 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 24f10f87e..91ecec956 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -5926,7 +5926,8 @@ Public Class ClsPaginas If Vta.SubProyecto.Colonia.Length > 0 Then SBDomicilioSucursal.AppendFormat(", Col: {0}", Vta.SubProyecto.Colonia) If Vta.SubProyecto.CP.ToEntero > 0 Then SBDomicilioSucursal.AppendFormat(", CP: {0}", Vta.SubProyecto.CP) If CiudadSucursal.Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", CiudadSucursal) - If Vta.SubProyecto.Pais.Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", Vta.SubProyecto.Pais) + If Vta.SubProyecto.Pais.Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", Vta.SubProyecto.Pais) + If Not String.IsNullOrEmpty(Vta.SubProyecto.Telefono) AndAlso UsuarioActual.CveEmpresa = 141 Then SBDomicilioSucursal.AppendFormat(", Tel: {0}", Vta.SubProyecto.Telefono) DomicilioSucursal = SBDomicilioSucursal.ToString diff --git a/App_Code/EntityModel.vb b/App_Code/EntityModel.vb index 1476e9da8..193688795 100644 --- a/App_Code/EntityModel.vb +++ b/App_Code/EntityModel.vb @@ -49,7 +49,11 @@ Namespace Modelos Case "Single" prop.SetValue(Me, CSng(row(prop.Name))) Case "String" - prop.SetValue(Me, CStr(row(prop.Name))) + If String.IsNullOrEmpty(row(prop.Name)) Then + prop.SetValue(Me, "") + Else + prop.SetValue(Me, CStr(row(prop.Name))) + End If Case "UInt32" prop.SetValue(Me, CUInt(row(prop.Name))) Case "UInt64" diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index 08036f1b9..c23e6aa8a 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -8729,6 +8729,7 @@ Namespace Modelos FormatoFactura = "" SubProyecto = "" Correo = "" + Telefono = "" UTCOffsetVerano = -7 UTCOffsetInvierno = -7 End Sub @@ -8738,20 +8739,8 @@ Namespace Modelos Public Sub New(Row As System.Data.DataRow) SetDefaultValues() If Row IsNot Nothing Then - Calle = Row("Calle").ToString - NoExt = Row("NoExt").ToString - NoInt = Row("NoInt").ToString - Colonia = Row("Colonia").ToString - Localidad = Row("Localidad").ToString - Municipio = Row("Municipio").ToString - Estado = Row("Estado").ToString - Pais = Row("Pais").ToString - CP = Row("CP").ToString - SubProyecto = Row("SubProyecto").ToString - UTCOffsetVerano = Row("UTCOffsetVerano").ToString.ToEntero() - UTCOffsetInvierno = Row("UTCOffsetInvierno").ToString.ToEntero() + Me.setValues(Row) End If - End Sub Public ReadOnly Property LugarExp As String From bf649b3e57840baa581c679f7b2fd416e7f87913 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Mon, 2 Mar 2020 13:33:53 -0700 Subject: [PATCH 03/16] Nombre comerciales desde dropdownlost --- OC/OC.aspx.vb | 2 ++ Scripts/custom.js | 1 + 2 files changed, 3 insertions(+) diff --git a/OC/OC.aspx.vb b/OC/OC.aspx.vb index 4bd97ce3b..0c66a6a86 100644 --- a/OC/OC.aspx.vb +++ b/OC/OC.aspx.vb @@ -744,6 +744,8 @@ Partial Class OC BtnSolicitudAnticipo.Visible = False End If + Ddlcliente.ddlWS.Attributes.Add("data-coltexto", "N") + 'Nuevo Proceso que permite modificar detalles If Not UsuarioActual.TienePermisoProceso(131) Then If GlobalDTOCEstatus(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveEstatus = {0}", CveEstatus)).Rows.Count > 0 Then diff --git a/Scripts/custom.js b/Scripts/custom.js index 39e2ae95b..42864abad 100644 --- a/Scripts/custom.js +++ b/Scripts/custom.js @@ -1084,6 +1084,7 @@ function setwebservice(idDdlWS, idhdValue, idhdText, btn) { CveSubProyecto: (!(DdlWS.data('cvesubproyecto')) || DdlWS.data('cvesubproyecto') == '') ? ((!(DdlWS.parent().data('cvesubproyecto')) || DdlWS.parent().data('cvesubproyecto') == '') ? -1 : DdlWS.parent().data('cvesubproyecto')) : DdlWS.data('cvesubproyecto'), metodo: (!(DdlWS.data('metodo')) || DdlWS.data('metodo') == 'getps') ? ((!(DdlWS.parent().data('metodo')) || DdlWS.parent().data('metodo') == 'getps') ? 'getps' : DdlWS.parent().data('metodo')) : DdlWS.data('metodo'), Pagina: (!(DdlWS.data('pagina')) || DdlWS.data('pagina') == '') ? '-2' : DdlWS.data('pagina'), + ColTexto: (!(DdlWS.data('coltexto')) || DdlWS.data('coltexto') == '') ? 'NC' : DdlWS.data('coltexto') //Metodo: metodo }; }, From a271feba19447a85365642941613dcb2c46b3226 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Mon, 2 Mar 2020 15:33:53 -0700 Subject: [PATCH 04/16] modificaciones --- Empresas/141/Formatos/Factura.rdlc | 60 ++----------------- .../Formatos/RepClientesPagosBancos.rdlc | 5 +- 2 files changed, 6 insertions(+), 59 deletions(-) diff --git a/Empresas/141/Formatos/Factura.rdlc b/Empresas/141/Formatos/Factura.rdlc index ee1a0f96c..fe9d24568 100644 --- a/Empresas/141/Formatos/Factura.rdlc +++ b/Empresas/141/Formatos/Factura.rdlc @@ -1498,62 +1498,10 @@ - VERACRUZ Y CUERNAVACA 148 SAN + =Parameters!DomicilioSucursal.Value - - - - - - - - - - - - @@ -1566,7 +1514,7 @@ @@ -2889,7 +2837,7 @@ - IVA (16%): + IVA: @@ -373,7 +373,7 @@ = IIF( IsNothing(Fields!CveVenta.Value), Fields!FechaDocumento.Value,Fields!FechaVencimiento.Value) @@ -498,7 +498,6 @@ 2pt - true From 5e36beeffc8870fd9a26c866115bd7168fdf6cbb Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Mon, 2 Mar 2020 15:34:20 -0700 Subject: [PATCH 05/16] agregando el nuevo modulo --- App_Code/ClsPaginas.vb | 1 + App_Code/ClsVentas.vb | 18 ++++++ Ventas/MetasVendedores.aspx | 115 +++++++++++++++++++++++++++++++++ Ventas/MetasVendedores.aspx.vb | 56 ++++++++++++++++ 4 files changed, 190 insertions(+) create mode 100644 Ventas/MetasVendedores.aspx create mode 100644 Ventas/MetasVendedores.aspx.vb diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 24f10f87e..78ac82410 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -4665,6 +4665,7 @@ Public Class ClsPaginas PaginaDict.Add("/Ventas/CatCobranzaEstatusTurno.aspx".ToUpper(), 7004) PaginaDict.Add("/Ventas/RepVentasMensuales.aspx".ToUpper(), 720) PaginaDict.Add("/Ventas/RepVentasMensualesDetalle.aspx".ToUpper(), 721) + PaginaDict.Add("/Ventas/MetasVendedores.aspx".ToUpper(), 722) #End Region diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 11ddf58d4..cfddc9043 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -4259,6 +4259,24 @@ Public Class ClsVentas End Try Return retorno End Function + Public Function AddMetasVendedores(CveVendedor As Integer, MesAño As Date, CveMarca As Integer, MetaCantidad As Integer, MetaImporte As Decimal) As Boolean + Dim retorno As Boolean = False + DataAdapter("PA_Vta_MetasVendedoresAdd", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor + .Add("@MesAño", SqlDbType.DateTime).Value = MesAño + .Add("@CveMarca", SqlDbType.Int).Value = CveMarca + .Add("@MetaCantidad", SqlDbType.Int).Value = MetaCantidad + .Add("@MetaImporte", SqlDbType.Decimal).Value = MetaImporte + End With + Try + SqlAdapter.Fill(Data) + retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener el reporte de ventas mensuales", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + Return retorno + End Function #Region "Conciliación emitidas SAT" Public Function ConciliacionemitidasSATGet(cveEmpresa As Int32) As Boolean diff --git a/Ventas/MetasVendedores.aspx b/Ventas/MetasVendedores.aspx new file mode 100644 index 000000000..6fe34dd38 --- /dev/null +++ b/Ventas/MetasVendedores.aspx @@ -0,0 +1,115 @@ +<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="MetasVendedores.aspx.vb" Inherits="MetasVendedores" %> + + + + + + + + + + Metas de Vendedores + + +
  • + Agregar Meta +
  • +
  • + PDF +
  • +
  • + Excel +
  • +
    + + + + + + + diff --git a/Ventas/MetasVendedores.aspx.vb b/Ventas/MetasVendedores.aspx.vb new file mode 100644 index 000000000..9a5ca2ede --- /dev/null +++ b/Ventas/MetasVendedores.aspx.vb @@ -0,0 +1,56 @@ +Imports System.Data +Imports Extensiones +Imports Microsoft.Reporting.WebForms + +Partial Class MetasVendedores + Inherits ClsPaginas + + Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load + If Not IsPostBack Then + CargaDatosModal() + End If + End Sub + + Private Sub CargaDatosModal() + DdlVendedores.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa) + DdlVendedores.DataBind() + DdlVendedores.Items.Insert(0, New ListItem("Seleccionar", "-1")) + + Dim ObjPS As New ClsProductosServicios + If ObjPS.GetMarcas(UsuarioActual.CveEmpresa) Then + DdlMarcas.DataSource = ObjPS.DtResultados + End If + ObjPS.Dispose() + DdlMarcas.DataBind() + DdlMarcas.Items.Insert(0, New ListItem("Todos", "-1")) + End Sub + + Private Sub ResetDatosSeleccionadosModal() + DdlVendedores.SelectedValue = "-1" + TxtFechaI.Text = "" + DdlMarcas.SelectedValue = "-1" + TxtMetaCantidad.Text = "" + TxtMetaImporte.Text = "" + UpModalTiposD.Update() + End Sub + + Protected Sub LnkAgregar_Click() Handles LnkAgregar.Click + RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposD")) + End Sub + + Protected Sub BtnAgregarMetaVendedor_Click(sender As Object, e As EventArgs) Handles BtnAgregarMetaVendedor.Click + + If DdlVendedores.SelectedValue.ToEntero > 0 AndAlso TxtFechaI.Text <> "" AndAlso DdlMarcas.SelectedValue.ToEntero > 0 Then + Dim ObjVentas As New ClsVentas + If ObjVentas.AddMetasVendedores(DdlVendedores.SelectedValue.ToEntero, TxtFechaI.Text, DdlMarcas.SelectedValue.ToEntero, TxtMetaCantidad.Text.ToEntero, TxtMetaImporte.Text.ToDecimal) Then + Alert("Se agregó la meta al vendedor") + Else + Alert("No se pudo agregar la meta al vendedor", TipoMensaje.MsgError) + End If + Else + Alert(String.Format("Falta Seleccionar {0}{1}{2}", If(DdlVendedores.SelectedValue.ToEntero > 0, "", "Vendedor, "), If(DdlMarcas.SelectedValue.ToEntero > 0, "", "Marca, "), If(TxtFechaI.Text <> "", "", "Fecha, "))) + End If + RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposD")) + ResetDatosSeleccionadosModal() + End Sub +End Class From e37f192ffa7d5f088e68ec156ef6bcfea20e646c Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Tue, 3 Mar 2020 10:34:35 -0700 Subject: [PATCH 06/16] Cantidad debe ser mayor que 0 --- Ventas/Ventas.aspx.vb | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 9ecd8ab82..3c79eea5e 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -5835,6 +5835,11 @@ Partial Class Ventas Descuento = (GvPS.Rows(e.RowIndex).FCTextBox("TxtDescuento").Text.ToDecimal).RoundSQL(NumeroDecimales) CuentaPredial = GvPS.Rows(e.RowIndex).FCTextBox("TxtPredial").Text.Trim + If PU <= 0 AndAlso UsuarioActual.CveEmpresa = 141 Then + Alert("El precio debe ser mayor a 0", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + If UsuarioActual.CveEmpresa = 140 Then Descuento = CalcularDescuentos(TmpDT.Rows(e.RowIndex)("CvePS").ToString.ToEntero, Cantidad, PU) End If @@ -8803,8 +8808,8 @@ Partial Class Ventas 'siempre estaremos agregando el iva, auqnue sea en importe cero o tasa cero, para que se emita la factura ' If drr("ImporteIVA").ToString.ToDouble > 0 Then - 'si es ingreso amortizado por la totalidad, y arroja el valor total de cero, no debe de impuestos - If Timbre.Comprobante.Total > 0 Then + 'si es ingreso amortizado por la totalidad, y arroja el valor total de cero, no debe de impuestos, y si la BASE de calculo es mayor a cero + If Timbre.Comprobante.Total > 0 AndAlso concepto.Importe - concepto.Descuento + concepto.ImporteGravaIVAAdicional > 0 Then concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = concepto.Importe - concepto.Descuento + concepto.ImporteGravaIVAAdicional, .TasaOCuota = drr("PorcentajeIVA").ToString.ToDecimal, .Impuesto = "002", .Importe = drr("ImporteIVA").ToString.ToDecimal}) End If @@ -13920,6 +13925,11 @@ Partial Class Ventas Return False End If + If PU <= 0 AndAlso UsuarioActual.CveEmpresa = 141 Then + Alert("El precio debe ser mayor a 0", TipoMensaje.MsgAdvertencia) + Return False + End If + 'VALIDA PROMOCIONES Dim ObjVentas As New ClsVentas If ObjVentas.GetPromocionesPS(-1, TxtFecha.Text.ToDateTime, DdlSubProyectoDatos.SelectedValue.ToEntero, CveCliente, DdlVendedor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then From e2c17160ce5367784107dd2bac38b6deeeca54a7 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Tue, 3 Mar 2020 10:34:52 -0700 Subject: [PATCH 07/16] Quitar timer de notificaciones de campana --- SiteGPS.master | 31 ++++++++++++++++--------------- vwd.webinfo | 2 ++ 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/SiteGPS.master b/SiteGPS.master index f1aa06e3e..657d03977 100644 --- a/SiteGPS.master +++ b/SiteGPS.master @@ -847,22 +847,23 @@ CveBitacora: -1 } } - var json = JSON.stringify(request); - $.ajax({ - data: json, - url: '/Ashx/SIGGPS.ashx', - type: 'post', - beforeSend: function () { - console.log("procesando....."); - }, - success: function (response) { - console.log("notificacion actualizada...."); - var datos = JSON.parse(response); - UpdateNotificacionesCampana(datos); - } - }); - setTimeout(startTimer, 60000); // callback + //var json = JSON.stringify(request); + //$.ajax({ + // data: json, + // url: '/Ashx/SIGGPS.ashx', + // type: 'post', + // beforeSend: function () { + // console.log("procesando....."); + // }, + // success: function (response) { + // console.log("notificacion actualizada...."); + // var datos = JSON.parse(response); + // UpdateNotificacionesCampana(datos); + // } + //}); + + //setTimeout(startTimer, 60000); // callback } // diff --git a/vwd.webinfo b/vwd.webinfo index a280964b8..2f273a97f 100644 --- a/vwd.webinfo +++ b/vwd.webinfo @@ -23,6 +23,8 @@ + + From d9966fba4f5f712faaa1cc8649c7817d14f024e0 Mon Sep 17 00:00:00 2001 From: JORGE LUIS CAUDILLO ESPARZA Date: Tue, 3 Mar 2020 17:48:23 -0700 Subject: [PATCH 08/16] --- Compras/Compras.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 134e806e2..055ef4dc0 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -6235,7 +6235,7 @@ Partial Class Compras_Compras End If Case 6 'Compra - Dim AgregaMercanciaInventario As Boolean = UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 119, 140) AndAlso UsuarioActual.Empresa.UsaInventarios AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1" + Dim AgregaMercanciaInventario As Boolean = UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 119, 140, 141) AndAlso UsuarioActual.Empresa.UsaInventarios AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1" Dim RegistraConcepto225 As Boolean = UsuarioActual.Empresa.UsaInventarios AndAlso DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1" If RBLPago.SelectedValue.ToEntero = 4 Then From ea3ae05358acb75cb64ab8e08398fcc720fbbf34 Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Wed, 4 Mar 2020 08:25:48 -0700 Subject: [PATCH 09/16] Documentos Proveedor(No es auditoria, son los documentos de la pagia de cliente, detro de los tipos de documento le corresponde el modulo 4) --- Compras/Proveedores.aspx | 73 ++++- Compras/Proveedores.aspx.vb | 429 ++++++++++++++++++++++++++++-- General/CatDocumentacionTipo.aspx | 2 +- vwd.webinfo | 6 + 4 files changed, 474 insertions(+), 36 deletions(-) diff --git a/Compras/Proveedores.aspx b/Compras/Proveedores.aspx index ae72b0047..234b68236 100644 --- a/Compras/Proveedores.aspx +++ b/Compras/Proveedores.aspx @@ -2286,7 +2286,12 @@ - + + + + + @@ -2300,7 +2305,7 @@ - + @@ -2308,7 +2313,7 @@ - + @@ -2322,7 +2327,7 @@ - @@ -2331,15 +2336,22 @@ - + - + + + + + + + @@ -3997,6 +4009,55 @@
    + + + + + diff --git a/Compras/Proveedores.aspx.vb b/Compras/Proveedores.aspx.vb index b32464910..b419978cb 100644 --- a/Compras/Proveedores.aspx.vb +++ b/Compras/Proveedores.aspx.vb @@ -323,6 +323,159 @@ Partial Class Compras_Proveedores End Property #End Region + +#Region " D O C U M E N T A C I O N" + + + + Property CveDocumentacionElectronica As Integer + Get + If ViewState("CvePersonalClienteDocumentacion") Is Nothing Then + Return -1 + Else + Return DirectCast(ViewState("CvePersonalClienteDocumentacion"), Integer) + End If + End Get + Set(value As Integer) + ViewState("CvePersonalClienteDocumentacion") = value + End Set + End Property + + Property CveDocumentacion As Integer + Get + If ViewState("CveDocumentacion") Is Nothing Then + Return -1 + Else + Return DirectCast(ViewState("CveDocumentacion"), Integer) + End If + End Get + Set(value As Integer) + ViewState("CveDocumentacion") = value + End Set + End Property + + Property Documentacion As String + Get + If ViewState("Documentacion") Is Nothing Then + Return "-1" + Else + Return ViewState("Documentacion").ToString + End If + End Get + Set(value As String) + ViewState("Documentacion") = value + End Set + End Property + + Property AdjuntoDocumentacion As String + Get + If ViewState("AdjuntoDocumentacion") Is Nothing Then + Return "" + Else + Return ViewState("AdjuntoDocumentacion").ToString + End If + End Get + Set(value As String) + ViewState("AdjuntoDocumentacion") = value + End Set + End Property + + + + Property DiasVigencia As Integer + Get + If ViewState("DiasVigencia") Is Nothing Then + Return 0 + Else + Return DirectCast(ViewState("DiasVigencia"), Integer) + End If + End Get + Set(value As Integer) + ViewState("DiasVigencia") = value + End Set + End Property + + Property AplicaFechaVencimiento As Boolean + Get + If ViewState("AplicaFechaVencimiento") Is Nothing Then + Return True + Else + Return DirectCast(ViewState("AplicaFechaVencimiento"), Boolean) + End If + End Get + Set(value As Boolean) + ViewState("AplicaFechaVencimiento") = value + End Set + End Property + + Private Property FechaVigencia As Date + Get + If ViewState("FechaVigencia") Is Nothing Then + Return Nothing + Else + Return ViewState("FechaVigencia").ToString.ToDate + End If + End Get + Set(value As Date) + ViewState("FechaVigencia") = value + End Set + End Property + + Property Estatus As Integer + Get + If ViewState("Estatus") Is Nothing Then + Return 0 + Else + Return DirectCast(ViewState("Estatus"), Integer) + End If + End Get + Set(value As Integer) + ViewState("Estatus") = value + End Set + End Property + + Property ObservacionDocumentacion As String + Get + If ViewState("ObservacionDocumentacion") Is Nothing Then + Return "" + Else + Return ViewState("ObservacionDocumentacion").ToString + End If + End Get + Set(value As String) + ViewState("ObservacionDocumentacion") = value + End Set + End Property + + Private Property FechaLimite As Date + Get + If ViewState("FechaLimite") Is Nothing Then + Return Date.Now.AddDays(15) + Else + Return ViewState("FechaLimite").ToString.ToDate + End If + End Get + Set(value As Date) + ViewState("FechaLimite") = value + End Set + End Property + + Property DTDocumentacion As DataTable + Get + If ViewState("DTDocumentacion") Is Nothing Then + Return New DataTable + Else + Return DirectCast(ViewState("DTDocumentacion"), DataTable) + End If + End Get + Set(value As DataTable) + + End Set + + End Property + +#End Region + Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not IsPostBack Then CountCuentasxPagar = 0 @@ -2541,9 +2694,10 @@ Partial Class Compras_Proveedores #End Region #Region "D O C U M E N T A C I O N" + Private Sub CargaDocs() Dim Edoc As New ClsEdocumentacion - If Edoc.DocumentacionElectronicaGet(-1, -1, CveProveedor, UsuarioActual.CveEmpresa, -1) Then + If Edoc.DocumentacionElectronicaGet(-1, -1, CveProveedor, UsuarioActual.CveEmpresa, -1, -1, 4) Then GvDocs.DataSource = Edoc.DtResultados Edoc.DocumentacionGet(-1, -1, 1, UsuarioActual.CveEmpresa) ' GVEDoc.DataSource = Edoc.DtResultados @@ -2561,38 +2715,253 @@ Partial Class Compras_Proveedores GvDocs.HeaderRow.TableSection = TableRowSection.TableHeader 'RegistraScript("OrdenarGV();") End If + + UpDocumentos.Update() + End Sub - Public Sub Update_ClickDocumentacion(sender As Object, e As EventArgs) + Public Sub UploadModal_ClickDocumentacion(sender As Object, e As EventArgs) + + Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) + + ' Dim chkEstatus As CheckBox + CveDocumentacionElectronica = GvRow.DataKey("CveDocumentacionElectronica").ToString.ToEntero + CveDocumentacion = GvRow.DataKey("CveDocumentacion").ToString.ToEntero + Documentacion = GvRow.DataKey("Documentacion") + AdjuntoDocumentacion = GvRow.DataKey("Adjunto") + + + 'DiasVigencia = GvRow.DataKey("DiasVigencia").ToString.ToEntero + Dim x As String = GvRow.DataKey("AplicaFechaVencimiento") + If GvRow.DataKey("AplicaFechaVencimiento") = "1" Then AplicaFechaVencimiento = True Else AplicaFechaVencimiento = False + + If GvRow.DataKey("Adjunto").ToString.Length > 0 Then + FechaVigencia = GvRow.DataKey("Adjunto").ToString.ToDate + Else + FechaVigencia = Nothing + End If + + + Estatus = GvRow.DataKey("Estatus").ToEntero + + 'If chkEstatus.Checked Then + ' Estatus = 1 + 'Else + ' Estatus = 0 + 'End If + + ObservacionDocumentacion = GvRow.FCTextBox("TxtObservaciones").Text.Trim.ToUpper + FechaLimite = GvRow.FCTextBox("TxtFechaLimite").Text.ToDate + + AdjuntoDocumentacion = GvRow.DataKey("Adjunto") + + LtlModalUploadTitulo.Text = "Subir " & Documentacion + + UpModalTitleUploadDocumento.Update() + + RegistraScript("$('#ModalUploadDoc').modal({ backdrop: 'static', keyboard: false});") + + End Sub + + Protected Sub GvDocs_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDocs.RowDataBound + + + If e.Row.RowType = DataControlRowType.DataRow Then + + Dim Adjunto As String = e.Row.DBCampo("Adjunto").ToString + + Dim ImgDownLoad As Literal = e.Row.FCLiteral("ImgDownLoad") + Dim ImgUpload As LinkButton = e.Row.FCLinkButton("ImgUpload") + Dim ImgRequired As Literal = e.Row.FCLiteral("ImgRequired") + Dim txtFechaLimite As TextBox = e.Row.FCTextBox("TxtFechaLimite") + Dim ChkEstatus As CheckBox = e.Row.FCCheckBox("chkEstatus") + ' Dim txtFechaVigencia As TextBox = e.Row.FCTextBox("TxtFechaVigencia") + Dim CveDocumentacionElectronica As String = e.Row.DataKey("CveDocumentacionElectronica") + + Dim requerido As Boolean = Boolean.Parse(e.Row.DBCampo("Requerido")) + + 'Dim chkEstatus As CheckBox = e.Row.FCCheckBox("chkEstatus") + Dim separado As Char() = ".".ToCharArray + Dim array() As String = Adjunto.Split(separado) + Dim extencion As String = "" + + Dim DiasLimite As Integer = e.Row.DataKey("DiasLimite").ToString.ToEntero + Dim AplicaDiasLimite As Boolean = If(e.Row.DataKey("AplicaDiasLimite").ToString = "1", True, False) + Dim AplicaFechaVencimiento As Boolean = If(e.Row.DataKey("AplicaFechaVencimiento").ToString = "1", True, False) + + txtFechaLimite.Visible = If(AplicaDiasLimite, True, False) + ' txtFechaVigencia.Visible = If(AplicaFechaVencimiento, True, False) + + If e.Row.DataKey("Estatus").ToEntero = 1 Then + ChkEstatus.Checked = True + Else + ChkEstatus.Checked = False + End If + + 'If e.Row.DBCampo("FechaVigencia").ToString.Length > 0 Then + ' txtFechaVigencia.Text = e.Row.DBCampo("FechaVigencia").ToString.ToDate.ToString("dd/MM/yyyy") + ' If DateTime.Today > e.Row.DBCampo("FechaVigencia").ToString.ToDateTime Then + ' txtFechaVigencia.ForeColor = Drawing.Color.Red + ' End If + 'End If + + + If array.Length > 0 Then + extencion = array(array.Length - 1) + End If + + If e.Row.DBCampo("Estatus").ToString.ToEntero.Contiene(3) Then + ' chkEstatus.Checked = True + ImgUpload.Visible = False + Else + 'chkEstatus.Checked = False + End If + + txtFechaLimite.Text = e.Row.DBCampo("FechaLimite").ToString.ToDate.ToString("dd/MM/yyyy") + + 'If e.Row.DBCampo("FechaVigencia").ToString.Length > 0 Then + ' txtFechaVigencia.Text = e.Row.DBCampo("FechaVigencia").ToString.ToDate.ToString("dd/MM/yyyy") + 'End If + + 'Dim scripMascara = "$('#" & txtFechaLimite.ClientID & "').mask('00/00/0000');$('#" & txtFechaVigencia.ClientID & "').mask('00/00/0000');" + 'RegistraScript(scripMascara, "scriptMascara") + + If Adjunto.Trim.Length > 0 Then + + Dim linkDescarga = "/Empresas/" & UsuarioActual.Empresa.CveEmpresa & "/Edoc/Proveedor/" & CveProveedor & "/" & Adjunto + Dim linkDescargaArchivo = UsuarioActual.Empresa.Ruta & "Edoc/Proveedor/" & CveProveedor & "/" & Adjunto + + If File.Exists(linkDescargaArchivo) Then + ImgDownLoad.Visible = True + + If extencion.Length > 0 Then + ImgDownLoad.Text = String.Format(" ", linkDescarga, CveDocumentacionElectronica & "." & extencion) + Else + ImgDownLoad.Text = String.Format(" ", linkDescarga, CveDocumentacionElectronica) + End If + Else + ImgDownLoad.Visible = False + End If + + Else + ImgDownLoad.Visible = False + End If + + If requerido Then + ImgRequired.Text = " " + End If + + 'chkEstatus.Checked = ImgDownLoad.Visible + + End If + End Sub + + Protected Sub BtnUploadFileDoc_Click(sender As Object, e As EventArgs) Handles btnUploadFileDoc.Click + + Dim FileExtension As String = "-1" + Dim Filesgral As List(Of Archivo) = TxtFileDocumentacion.getfiles().Archivos + Dim Filename As String = "" + Dim ErrorProceso As Boolean = False + + If AplicaFechaVencimiento And DiasVigencia > 0 Then + FechaVigencia = DateTime.Today.AddDays(DiasVigencia) + End If + + For Each fileItem As Archivo In Filesgral + + Try + + FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "") + Dim tempArray() As String + tempArray = fileItem.filename.ToString().Split("-".ToCharArray()) + + + + + Dim objEdoc As New ClsEdocumentacion + objEdoc.IniciaTransacSQL() + + If CveDocumentacionElectronica = -1 Then + + CveDocumentacionElectronica = objEdoc.DocumentacionElectronicaAdd(CveDocumentacion, -1, -1, CveProveedor, 1, ObservacionDocumentacion, "-1", UsuarioActual.CveUsuario, FechaLimite, FechaVigencia) + + If CveDocumentacionElectronica > 0 Then + + + If Not objEdoc.DocumentacionElectronicaUpdate(CveDocumentacionElectronica, CveDocumentacion, -1, -1, CveProveedor, 1, ObservacionDocumentacion, CveDocumentacionElectronica & "." & FileExtension, UsuarioActual.CveUsuario, FechaLimite, FechaVigencia) Then + ErrorProceso = True + End If + End If + + + Else + If Not objEdoc.DocumentacionElectronicaUpdate(CveDocumentacionElectronica, CveDocumentacion, -1, -1, CveProveedor, 1, ObservacionDocumentacion, CveDocumentacionElectronica & "." & FileExtension, UsuarioActual.CveUsuario, FechaLimite, FechaVigencia) Then + ErrorProceso = True + End If + End If + + + + If Not ErrorProceso = True Then + + Dim rutaDestino As String = UsuarioActual.Empresa.Ruta & "Edoc\Proveedor\" & CveProveedor & "\" & CveDocumentacionElectronica & "." & FileExtension + Dim rutaAdjuntoAnterior As String = UsuarioActual.Empresa.Ruta & "Edoc\Proveedor\" & CveProveedor & "\" & AdjuntoDocumentacion + + + + Try + If Not System.IO.Directory.Exists(UsuarioActual.Empresa.Ruta & "Edoc\Proveedor\" & CveProveedor & "\") Then + System.IO.Directory.CreateDirectory(UsuarioActual.Empresa.Ruta & "Edoc\Proveedor\" & CveProveedor & "\") + End If + + If File.Exists(rutaAdjuntoAnterior) And AdjuntoDocumentacion.Trim.Length > 0 Then + File.Delete(rutaAdjuntoAnterior) + End If + + If System.IO.File.Exists(rutaDestino) Then + System.IO.File.Delete(rutaDestino) + End If + + System.IO.File.Move(fileItem.FileUrl, rutaDestino) + Catch ex As Exception + GuardaLog($"Error al gaurdar documento (moviendo archivo digital) --> Error{ ex.StackTrace}") + ErrorProceso = True + End Try + End If + + + If Not ErrorProceso Then + objEdoc.Commit() + Alert("Documento cargado correctamente") + Else + objEdoc.RollBack() + Alert("Error al cargar archivo", TipoMensaje.MsgError) + End If + objEdoc.Dispose() + + CargaDocs() + + + TxtFileDocumentacion.Text = "" + UPModalUploadDoc.Update() + + Catch ex As Exception + OnError("Error al cargar archivo", ex) + End Try + + Next + + RegistraScript("$('#ModalUploadDoc').modal('hide')", "hidemodal3") + + + + + End Sub + + + Protected Sub LnkGVEliminar_Click(sender As Object, e As EventArgs) Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) - Dim activo As Boolean = False - - Dim _CveDocumentacion As Integer = GvRow.DataKey("CveDocumentacion").ToEntero - Dim _Adjunto As String = GvRow.DataKey("Adjunto").ToString - Dim _fechaLimite As Date = GvRow.FCTextBox("TxtFechaLimite").Text.ToDate - - Dim observaciones As String = GvRow.FCTextBox("TxtObservaciones").Text ' DirectCast(GvRow.FindControl("TxtObservaciones"), TextBox).Text - 'Dim DDLEstatus As DropDownList = DirectCast(GvRow.FindControl("DDLEstatus"), DropDownList) - Dim chkCompleto As CheckBox = DirectCast(GvRow.FindControl("chkEstatus"), CheckBox) - Dim _Estatus As Integer - - If chkCompleto.Checked Then _Estatus = 1 Else _Estatus = 0 - - - Dim objRH As New ClsEdocumentacion - - If Not GvRow.DataKey("CveDocumentacionElectronica").ToEntero = -1 Then - If objRH.DocumentacionElectronicaUpdate(GvRow.DataKey("CveDocumentacionElectronica").ToEntero, _CveDocumentacion, -1, -1, CveProveedor, _Estatus, observaciones, _Adjunto, UsuarioActual.CveUsuario, GvRow.FCTextBox("TxtFechaLimite").Text.ToDate) Then - Alert("Documento actualizado correctamente.", TipoMensaje.MsgInformacion) - End If - Else - If objRH.DocumentacionElectronicaAdd(_CveDocumentacion, -1, -1, CveProveedor, _Estatus, observaciones, _Adjunto, UsuarioActual.CveUsuario, GvRow.FCTextBox("TxtFechaLimite").Text.ToDate) > 0 Then - Alert("Documento actualizado correctamente.", TipoMensaje.MsgInformacion) - End If - End If - - objRH.Dispose() End Sub @@ -5778,6 +6147,8 @@ Partial Class Compras_Proveedores End If End Sub #End Region + + End Class diff --git a/General/CatDocumentacionTipo.aspx b/General/CatDocumentacionTipo.aspx index dba6be481..e2bcf3270 100644 --- a/General/CatDocumentacionTipo.aspx +++ b/General/CatDocumentacionTipo.aspx @@ -101,7 +101,7 @@ Catalogo Documentacion Tipo Seleccione uno Recursos Humanos Clientes - Proveedor + Proveedor <%-- Nota: EL tipo Tres es tipo Auditoria de documentos de proveedor usadon el portal prveedor y --%> diff --git a/vwd.webinfo b/vwd.webinfo index a280964b8..3f67b239f 100644 --- a/vwd.webinfo +++ b/vwd.webinfo @@ -19,6 +19,12 @@ + + + + + + From 7085c7147f14b3a17c3de8aeb8932e9182fb47dd Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Wed, 4 Mar 2020 09:27:01 -0700 Subject: [PATCH 10/16] Marcas en kardex horizontal --- App_Code/ClsInventarios.vb | 3 +- Inventarios/KardexAlmacenHorizontal.aspx | 446 +++++++++++--------- Inventarios/KardexAlmacenHorizontal.aspx.vb | 19 +- 3 files changed, 249 insertions(+), 219 deletions(-) diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index 393e72e95..e574d4783 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -1472,7 +1472,7 @@ Public Class ClsInventarios Return Retorno End Function - Public Function GetKardexAlmacenHorizontal(CvePS As Integer, FechaFin As Date, CveAlmacen As Integer, CveUnidadMedida As Integer, CveProveedor As Integer, CveTipoAlmacen As Integer, IncluyeTransitorios As Integer, CveClasificacion As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional CondicionExistencias As Integer = 0) As Boolean + Public Function GetKardexAlmacenHorizontal(CvePS As Integer, FechaFin As Date, CveAlmacen As Integer, CveUnidadMedida As Integer, CveProveedor As Integer, CveTipoAlmacen As Integer, IncluyeTransitorios As Integer, CveClasificacion As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional CondicionExistencias As Integer = 0, Optional CveMarca As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Inv_KardexAlmacenHorizontalGet") @@ -1490,6 +1490,7 @@ Public Class ClsInventarios .Add("@CveProveedorCompra", SqlDbType.Int).Value = CveProveedor .Add("@CveTipoAlmacen", SqlDbType.Int).Value = CveTipoAlmacen .Add("@ExistenciasCondicion", SqlDbType.Int).Value = CondicionExistencias + .Add("@CveMarca", SqlDbType.Int).Value = CveMarca End With Try diff --git a/Inventarios/KardexAlmacenHorizontal.aspx b/Inventarios/KardexAlmacenHorizontal.aspx index 397af66ab..fa4013eb6 100644 --- a/Inventarios/KardexAlmacenHorizontal.aspx +++ b/Inventarios/KardexAlmacenHorizontal.aspx @@ -1,213 +1,241 @@ -<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="KardexAlmacenHorizontal.aspx.vb" Inherits="Inventarios_KardexAlmacen" %> - - - - - - - - - - Kardex Almacén Horizontal - - - - - - -
  • - Generar Excel -
  • -
    - - - - - - - -
    -
    -
    - - "> - -
    -
    -
    -
    Proveedor
    -
    - -
    - -
    - -
    - -
    -
    -
    - - - - -
    - - -
    -
    - -
    - - - - -
    -
    -
    -
    -
    > -
    - -
    - - - -
    - -
    - - - -
    - -
    - -
    - -
    - - - -
    - -
    - - - - - - <%----%> -
    -
    -
    -
    -
    -
    -
    - " style="display: inline-block; margin-right: -20px; width: 150px;" /> - " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> -
    - - - - - - + +
    - - - -
    -
    - - - - - - +<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="KardexAlmacenHorizontal.aspx.vb" Inherits="Inventarios_KardexAlmacen" %> + + + + + + + + + + Kardex Almacén Horizontal + + + + + + +
  • + Generar Excel +
  • +
    + + + + + + + +
    +
    +
    + + "> + +
    +
    +
    +
    +
    +
    Proveedor
    +
    + +
    +
    +
    +
    +
    + +
    + +
    +
    +
    +
    +
    + +
    + + + +
    +
    +
    +
    +
    + +
    +
    +
    + + + + +
    + + +
    +
    +
    +
    +
    +
    + +
    + + + + +
    +
    +
    +
    +
    +
    +
    > +
    + +
    + + + +
    + +
    + + + +
    + +
    + +
    + +
    + + + +
    + +
    + + + + + + <%----%> +
    +
    +
    +
    +
    +
    +
    + " style="display: inline-block; margin-right: -20px; width: 150px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
    + + + + + + - -
    + + + +
    +
    + + + + + + Código - - -
    - -
    -
    -
    - - + + + +
    + +
    +
    +
    + + Producto - - -
    - -
    -
    -
    -
    -
    -
    -
    -
    -
    - - - + +
    + +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + diff --git a/Inventarios/KardexAlmacenHorizontal.aspx.vb b/Inventarios/KardexAlmacenHorizontal.aspx.vb index b8c30dfb3..978bba1e9 100644 --- a/Inventarios/KardexAlmacenHorizontal.aspx.vb +++ b/Inventarios/KardexAlmacenHorizontal.aspx.vb @@ -28,7 +28,14 @@ Partial Class Inventarios_KardexAlmacen ddlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1) ddlAlmacen.DataBind() - + Using ObjPS As New ClsProductosServicios + If ObjPS.GetMarcas(UsuarioActual.CveEmpresa) Then + DdlMarca.DataSource = ObjPS.DtResultados.Copy() + End If + End Using + DdlMarca.DataBind() + DdlMarca.Items.Insert(0, New ListItem("Todos", "-1")) + Dim ObjInv As New ClsInventarios() If ObjInv.GetTiposAlmacenes() Then DdlTipoAlmacen.DataSource = ObjInv.DtResultados @@ -112,12 +119,6 @@ Partial Class Inventarios_KardexAlmacen Protected Sub btConsultar_Click(sender As Object, e As EventArgs) Handles btConsultar.Click Dim CveProducto As Integer = ddlProducto2.SelectedValue.ToEntero CargarKardex(CveProducto) - 'If CveProducto > 0 Then - - 'Else - ' Alert("Seleccione un producto.", TipoMensaje.MsgAdvertencia) - 'End If - End Sub Private Sub CargarKardex(CvePS As Integer) Dim dt As DataTable = Nothing @@ -128,7 +129,8 @@ Partial Class Inventarios_KardexAlmacen Dim CveAlmacen As Integer = ddlAlmacen.SelectedValue.ToEntero Dim CveProveedorCompra As Integer = If(DdlProveedor.SelectedValue.ToEntero > 0, DdlProveedor.SelectedValue.ToEntero, -1) - If ObjMovimientos.GetKardexAlmacenHorizontal(CvePS, FechaF, CveAlmacen, DdlUnidadMedida.SelectedValue.ToEntero, CveProveedorCompra, DdlTipoAlmacen.SelectedValue.ToEntero(), DdlIncluyeTransitorios.SelectedValue.ToEntero(), DdlClasificacion.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CondicionExistencias:=DdlExistencia.SelectedValue) Then + If ObjMovimientos.GetKardexAlmacenHorizontal(CvePS, FechaF, CveAlmacen, DdlUnidadMedida.SelectedValue.ToEntero, CveProveedorCompra, DdlTipoAlmacen.SelectedValue.ToEntero(), DdlIncluyeTransitorios.SelectedValue.ToEntero(), DdlClasificacion.SelectedValue.ToEntero, + UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CondicionExistencias:=DdlExistencia.SelectedValue, CveMarca:=DdlMarca.SelectedValue.ToEntero()) Then If ObjMovimientos.DtResultados IsNot Nothing AndAlso ObjMovimientos.DtResultados.Rows.Count > 0 Then dt = ObjMovimientos.DtResultados Dim ListaBorrar As New List(Of DataColumn) @@ -231,7 +233,6 @@ Partial Class Inventarios_KardexAlmacen End Sub Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click - Imprimir("Excel") End Sub Private Sub Imprimir(Optional reporte As String = "PDF") From c2f0f246ba92fbf315a1eebf36dd16609b3588b4 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Wed, 4 Mar 2020 09:38:24 -0700 Subject: [PATCH 11/16] Reporte de ventas por producto --- App_Code/ClsPaginas.vb | 1 + App_Code/ClsVentas.vb | 28 +++++++ Ventas/RepPS.aspx | 164 +++++++++++++++++++++++++++++++++++++++++ Ventas/RepPS.aspx.vb | 102 +++++++++++++++++++++++++ 4 files changed, 295 insertions(+) create mode 100644 Ventas/RepPS.aspx create mode 100644 Ventas/RepPS.aspx.vb diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 89892002b..368d96e14 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -4595,6 +4595,7 @@ Public Class ClsPaginas PaginaDict.Add("/Ventas/CatPreciosLista.aspx".ToUpper(), 378) PaginaDict.Add("/Ventas/RepProductosServicios.aspx".ToUpper(), 352) PaginaDict.Add("/Ventas/RepProductosServiciosDetalle.aspx".ToUpper(), 352) + PaginaDict.Add("/Ventas/RepPS.aspx".ToUpper(), 701) PaginaDict.Add("/Ventas/RepABT.aspx".ToUpper(), 353) PaginaDict.Add("/Ventas/CatPromociones.aspx".ToUpper(), 123) PaginaDict.Add("/Ventas/Promociones.aspx".ToUpper(), 124) diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index cfddc9043..4519bd0b3 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -1536,6 +1536,34 @@ Public Class ClsVentas Return Retorno End Function + Public Function GetRepPSEcono(CveSubProyecto As Integer, CvePS As Integer, FechaI As Date, FechaF As Date, CveEmpresa As Integer, Optional CveUsuarioConsulta As Integer = -1, Optional GPO As Integer = -1, + Optional CveMoneda As Integer = -1, Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = 0) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Vta_RepPSEconoGet") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + .Add("@CvePS", SqlDbType.Int).Value = CvePS + .Add("@FechaI", SqlDbType.Date).Value = FechaI + .Add("@FechaF", SqlDbType.Date).Value = FechaF + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta + .Add("@GPO", SqlDbType.Int).Value = GPO + .Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda + .Add("@TipoCambio", SqlDbType.Int).Value = TipoCambio + .Add("@TCEspecifico", SqlDbType.Float).Value = TCEspecifico + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener el Reporte de Venta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function + Public Function GetRepNCxAplicar(CveClienteSucursal As Integer, CveSubProyecto As Integer, CveCliente As Integer, FechaInicio As DateTime, FechaFin As DateTime, ConSaldo As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False diff --git a/Ventas/RepPS.aspx b/Ventas/RepPS.aspx new file mode 100644 index 000000000..85d50862d --- /dev/null +++ b/Ventas/RepPS.aspx @@ -0,0 +1,164 @@ +<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepPS.aspx.vb" Inherits="Ventas_RepPS" %> + + + + + + + + Reporte de Ventas por Producto + + + + + + + + + + +
    +
    +
    + + +
    +
    +
    + +
    + + + +
    +
    + Fecha Inicio: + +
    +
    +
    + + + + +
    + + + + + + +
    +
    + Fecha Fin: + +
    +
    +
    + + + + +
    + + + + + + +
    + +
    + + + +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + diff --git a/Ventas/RepPS.aspx.vb b/Ventas/RepPS.aspx.vb new file mode 100644 index 000000000..e62b9120d --- /dev/null +++ b/Ventas/RepPS.aspx.vb @@ -0,0 +1,102 @@ +Option Explicit On +Option Strict On + +Imports Extensiones +Imports System.Data +Partial Class Ventas_RepPS + Inherits ClsPaginas + + Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load + If Not IsPostBack Then + CargaDatosIniciales() + CargaCombos() + CargaDatos() + End If + End Sub + Private Sub CargaDatosIniciales() + txtFechaI.Text = $"01/{Now.Month}/{Now.Year}" + txtFechaF.Text = Now.ToString("dd/MM/yyyy") + End Sub + Private Sub CargaCombos() + CargaTipoCentroCosto() + End Sub + + Private Sub CargaTipoCentroCosto() + + If UsuarioActual.Empresa.Tipo_CentroCosto = 1 Then + DdlSubProyecto.Items.Clear() + LblSubProyecto.InnerText = "Sucursal:" + DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) + DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1")) + DdlSubProyecto.DataBind() + + ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 2 Then + DdlSubProyecto.Items.Clear() + + LblSubProyecto.InnerText = "Proyecto:" + DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) + DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1")) + DdlSubProyecto.DataBind() + + ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 3 Then + DdlGrupo.Items.Insert(0, New ListItem("Proyecto", "1")) + DdlGrupo.Items.Insert(1, New ListItem("SubProyecto", "2")) + DdlGrupo.Items.Insert(17, New ListItem("SubProyecto Ejec.", "19")) + DdlGrupo.DataBind() + ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 4 Then + LblSubProyecto.InnerText = "Proyecto:" + DdlGrupo.Items.Insert(0, New ListItem("Proyecto", "1")) + DdlGrupo.Items.Insert(1, New ListItem("SubProyecto", "2")) + DdlGrupo.Items.Insert(17, New ListItem("SubProyecto Ejec.", "19")) + DdlGrupo.DataBind() + ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 5 Then + LblSubProyecto.InnerText = "Sucursal:" + End If + End Sub + + Private Sub CargaDatos() + + Dim CveSubProyecto As Integer = DdlSubProyecto.SelectedValue.ToEntero() + Dim Grupo As Integer = DdlGrupo.SelectedValue.ToEntero() + Dim CvePS As Integer = -1 + Dim CveMoneda As Integer = -1 + Dim TC As Integer = 1 + Dim TCEspecifico As Decimal = -1 + Dim FechaI, FechaF As DateTime + FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.ToDate, MinFecha) + FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.ToDate, MaxFecha) + + Dim ObjVentas As New ClsVentas() + If ObjVentas.GetRepPSEcono(CveSubProyecto, CvePS, FechaI, FechaF, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, GPO:=Grupo, CveMoneda:=CveMoneda, TipoCambio:=TC, TCEspecifico:=TCEspecifico) Then + GvDatos.DataSource = ObjVentas.DtResultados + Else + GvDatos.DataSource = Nothing + End If + + ObjVentas.Dispose() + GvDatos.DataBind() + + UPDatos.Update() + 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("Orden").ToString.ToEntero() + Case 4 + e.Row.CssClass = "Totales" + Case 3 + e.Row.CssClass = "SubTotales2" + Case 2 + e.Row.CssClass = "SubTotales" + Case 1 + e.Row.CssClass = "SubTotalesB" + Case 0 + e.Row.CssClass = "Texto" + End Select + End If + End Sub + Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) + CargaDatos() + End Sub +End Class From 76e6cf615442a26bf8cd230f3cb3033bcbd6ee36 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Wed, 4 Mar 2020 09:38:47 -0700 Subject: [PATCH 12/16] Validacion de cotizacion con pagos --- Ventas/Ventas.aspx.vb | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 3c79eea5e..e9235b586 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -9320,7 +9320,7 @@ Partial Class Ventas Kilometraje:=TxtKilometraje.Text.ToDouble, EsAmortizacion:=EsNCAmortizacion) Then ErrorList.Add("Ocurrió un error al Generar la Venta.
    Revise su factura y cualquier detalle comuníquese a Soporte Técnico") Else - If factura.TipoDocto.Contiene("Dev") Or DtVentasNC IsNot Nothing Then + If factura.TipoDocto.Contiene("Dev", "Egs") Or DtVentasNC IsNot Nothing Then If DtVentasNC IsNot Nothing Then For Each row As DataRow In DtVentasNC.Rows If Not ObjVentas.AddVentasRelacionadas(ObjVentas.CveVenta, row("CveVenta").ToString.ToEntero) Then @@ -23905,6 +23905,20 @@ Partial Class Ventas #End Region #Region " EMITIR DOCUMENTO NUEVO " + + Private Function ValidaFacturarCotizacion() As Boolean + Dim Retorno As Boolean = True + + If UsuarioActual.CveEmpresa = 141 Then + If Not PermiteCredito AndAlso (DtPagos Is Nothing OrElse DtPagos.Rows.Count = 0) Then + Alert("Es necesario especificar un pago.", TipoMensaje.MsgAdvertencia) + Retorno = False + Return Retorno + End If + End If + + Return Retorno + End Function Private Sub EmitirDocumentoNuevo(TipoDoctoNuevo As String) If GvPagos.Rows.Count = 0 And UsuarioActual.Empresa.Funcionalidad(558).ToEntero = 1 And RBLPago.SelectedValue.ToEntero = 2 Then Alert("No se puede facturar hasta que se haya especificado detalladamente la forma de pago", TipoMensaje.MsgAdvertencia) @@ -23913,11 +23927,17 @@ Partial Class Ventas 'CARGA LO PENDIENTE POR FACTURAR DE COTIZACION If EraCotizacion = 1 Then + + If Not ValidaFacturarCotizacion() Then + Exit Sub + End If + If Not PreparaFacturarCotizacion() Then EraCotizacion = 0 DdlTipoComprobante.SelectedValue = "Cot" Exit Sub End If + End If 'CARGA LO PENDIENTE POR FACTURAR DE REMISION From 8e7287a941d2bad27cdae95790fab16f19418358 Mon Sep 17 00:00:00 2001 From: Rene Molina Date: Wed, 4 Mar 2020 09:51:47 -0700 Subject: [PATCH 13/16] --- Inventarios/KardexAlmacenHorizontal.aspx | 2 +- Inventarios/KardexAlmacenHorizontal.aspx.vb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Inventarios/KardexAlmacenHorizontal.aspx b/Inventarios/KardexAlmacenHorizontal.aspx index b0c469f31..e0035b667 100644 --- a/Inventarios/KardexAlmacenHorizontal.aspx +++ b/Inventarios/KardexAlmacenHorizontal.aspx @@ -174,7 +174,7 @@ <%----%>
    - +
    diff --git a/Inventarios/KardexAlmacenHorizontal.aspx.vb b/Inventarios/KardexAlmacenHorizontal.aspx.vb index 92b34df1c..32a4a710e 100644 --- a/Inventarios/KardexAlmacenHorizontal.aspx.vb +++ b/Inventarios/KardexAlmacenHorizontal.aspx.vb @@ -10,7 +10,7 @@ Partial Class Inventarios_KardexAlmacen Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If Not IsPostBack Then 'TxtFechaI.Text = Now.AddMonths(-1).ToShortDateString - TxtFechaF.Text = Now.ToShortDateString + TxtFechaF.Text = Now.ToShortDateString CargaCombos() ddlAlmacen.Items.Insert(0, New ListItem("Todos", "-1")) pnlOrden.Visible = UsuarioActual.CveEmpresa = 141 From f8c3cb3d9ec5f9b8bb629f9a8779ea30754a7e45 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Wed, 4 Mar 2020 10:08:56 -0700 Subject: [PATCH 14/16] css en ventas mensuales y acomodo de Factura.rdlc --- Empresas/141/Formatos/Factura.rdlc | 214 +++++++++++++---------------- Ventas/RepVentasMensuales.aspx | 33 +++-- 2 files changed, 111 insertions(+), 136 deletions(-) diff --git a/Empresas/141/Formatos/Factura.rdlc b/Empresas/141/Formatos/Factura.rdlc index fe9d24568..8061393f9 100644 --- a/Empresas/141/Formatos/Factura.rdlc +++ b/Empresas/141/Formatos/Factura.rdlc @@ -333,10 +333,10 @@ External =Parameters!QR.Value FitProportional - 0.1632in + 0.02778in 0.02254in - 1.2939in - 1.53682in + 0.88765in + 0.97432in @@ -345,6 +345,7 @@ true + true true @@ -372,19 +373,6 @@ - - - - - - - - - - @@ -1717,7 +1679,9 @@ - @@ -1738,7 +1702,9 @@ - @@ -1751,7 +1717,9 @@ - @@ -1767,7 +1735,7 @@ Textbox4 - 3.20357cm + 2.88607cm 0.28014cm 1.09007cm 9.71199cm @@ -1784,6 +1752,7 @@ true + true true @@ -1871,7 +1840,7 @@ Textbox4 - 3.50094cm + 2.86594cm 10.06268cm 0.7927cm 9.71199cm @@ -2045,7 +2014,7 @@ Textbox4 - 4.29364cm + 3.97614cm 0.25136cm 0.74611cm 13.82025cm @@ -2078,7 +2047,7 @@ Textbox32 - 4.46621cm + 3.98996cm 14.07729cm 0.57354cm 2.90753cm @@ -2113,7 +2082,7 @@ Textbox35 - 5.09559cm + 4.77809cm 0.26772cm 0.52062cm 9.72441cm @@ -2175,7 +2144,7 @@ Textbox4 - 6.7641cm + 6.3831cm 3.33321cm 1.05328cm 17.71415cm @@ -2195,6 +2164,7 @@ true + true true @@ -2213,6 +2183,7 @@ @@ -2231,6 +2202,7 @@ @@ -2249,6 +2221,7 @@ @@ -2267,6 +2240,7 @@ @@ -2285,6 +2259,7 @@ @@ -2303,11 +2278,12 @@ Textbox4 - 9.21745cm + 8.32845cm 0.22108cm 2.03224cm 20.79751cm @@ -2337,8 +2313,8 @@ Textbox5 - 12.95331cm - 0.19009cm + 12.03609cm + 0.21585cm 0.05496cm 20.88652cm 17 @@ -2357,7 +2333,7 @@ Embedded ID5 FitProportional - 11.49964cm + 10.51539cm 0.17151cm 0.96488cm 3.75909cm @@ -2415,7 +2391,7 @@ Textbox4 - 12.51148cm + 11.55898cm 0.19008cm 0.40655cm 12.88812cm @@ -2434,7 +2410,7 @@ Embedded ID4 FitProportional - 11.49964cm + 10.51539cm 4.34941cm 0.91769cm 3.03541cm @@ -2449,7 +2425,7 @@ Embedded ID1 FitProportional - 11.49964cm + 10.51539cm 7.56121cm 0.97656cm 4.16281cm @@ -2464,9 +2440,9 @@ Embedded ID6 FitProportional - 11.49964cm + 10.51539cm 11.90634cm - 1.01184cm + 0.97656cm 3.76809cm 22 - 20.50931cm + 17.16179cm