From 4c33118d35299bf373e643e27f4e22f920dcb428 Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Thu, 12 Dec 2019 18:49:34 -0700 Subject: [PATCH 01/22] correcion funcion rep indicadores diarios --- Acumuladores/RepIndicadorDiario.aspx | 396 ++++++++++++++++++++++++ Acumuladores/RepIndicadorDiario.aspx.vb | 371 ++++++++++++++++++++++ App_Code/ClsAcumuladores.vb | 4 +- 3 files changed, 769 insertions(+), 2 deletions(-) create mode 100644 Acumuladores/RepIndicadorDiario.aspx create mode 100644 Acumuladores/RepIndicadorDiario.aspx.vb diff --git a/Acumuladores/RepIndicadorDiario.aspx b/Acumuladores/RepIndicadorDiario.aspx new file mode 100644 index 000000000..d8060715c --- /dev/null +++ b/Acumuladores/RepIndicadorDiario.aspx @@ -0,0 +1,396 @@ +<%@ Page Title="Reporte de Compras Clasificación" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepIndicadorDiario.aspx.vb" Inherits="ACumuladores_RepIndicadorDiario" %> + +<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> + + +
  • + Generar PDF +
  • +
  • + + Exportar Excel + +
  • + + +
    + + Reporte Indicador Diario + + + + + + + + + + +
    +
    +
    + + +
    +
    +
    + + + + + +
    + Fecha Inicio: +
    +
    +
    + + + + +
    + + + + + + +
    +
    + Fecha Fin: +
    +
    +
    + + + + +
    + + + + + + +
    + + SubProyecto: +
    + <%-- + + --%> + +
    + + +
    +
    +
    + + + +
    +
    +
    +
    + + + + + + + Concepto + + + + + + + + Acumulado + + + + + + + + Importe Acumulado + + + + + + + + Venta Diaria + + + + + + + + Importe Al Día + + + + + + + + + Cantidad Total + + + + + + + + + Total + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + diff --git a/Acumuladores/RepIndicadorDiario.aspx.vb b/Acumuladores/RepIndicadorDiario.aspx.vb new file mode 100644 index 000000000..b890c1481 --- /dev/null +++ b/Acumuladores/RepIndicadorDiario.aspx.vb @@ -0,0 +1,371 @@ +Option Explicit On +Option Strict On + +Imports Extensiones +Imports Microsoft.Reporting.WebForms +Imports System.Data + +Partial Class ACumuladores_RepIndicadorDiario + Inherits ClsPaginas + +#Region " PROPIEDADES " + Private Property DtDatos As DataTable + Get + DtDatos = DirectCast(ViewState("DtDatos"), DataTable) + End Get + + Set(ByVal value As DataTable) + ViewState("DtDatos") = value + End Set + End Property + + Private Property NumeroRemesa As String + Get + NumeroRemesa = ViewState("NumeroRemesa").ToString + End Get + Set(value As String) + ViewState("NumeroRemesa") = value + End Set + End Property + + Private Property TCEspecifico As Double + Get + If ViewState("TCEspecifico") Is Nothing Then + Return -1 + Else + Return DirectCast(ViewState("TCEspecifico"), Double) + End If + End Get + Set(value As Double) + ViewState("TCEspecifico") = value + End Set + End Property + Private Property DtColor As DataTable + Get + Return DirectCast(ViewState("DtColor"), DataTable) + End Get + Set(value As DataTable) + ViewState("DtColor") = value + End Set + End Property + Private Property Agrupador As String + Get + Return ViewState("Agrupador").ToString + End Get + + Set(value As String) + ViewState("Agrupador") = value + End Set + End Property + Private Property CveMoneda As Integer + Get + CveMoneda = ViewState("CveMoneda").ToString.ToEntero + End Get + Set(value As Integer) + ViewState("CveMoneda") = value + End Set + End Property + +#End Region + + Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load + If Not IsPostBack Then + + txtFechaI.Text = Now.AddMonths(-1).ToString("dd/MM/yyyy") + txtFechaF.Text = Now.ToString("dd/MM/yyyy") + + CargaCombos() + + CargaDatos() + End If + End Sub + +#Region "CARGAS" + + + + + Private Sub CargaCombos() + + DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa) + DdlSubProyecto.DataBind() + DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1")) + DdlSubProyecto.SelectedValuesIfExist("-1") + + End Sub + + + + Private Sub CargaDatos() + + Dim ObjAcum As New ClsAcumuladores() + + Dim FechaI, FechaF As Date + FechaI = txtFechaI.Text.ToDate + FechaF = txtFechaF.Text.ToDate + + If RblTipoCambio.SelectedValue.ToEntero = 3 And TxtEspecifico.Text <> "" Then + TCEspecifico = TxtEspecifico.Text.ToDouble + Else + TCEspecifico = -1 + End If + + If ObjAcum.GetRepInicadorDiario(FechaI, FechaF, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then + GvDatos.DataSource = ObjAcum.DtResultados + DtDatos = ObjAcum.DtResultados + Else + GvDatos.DataSource = Nothing + End If + + ObjAcum.Dispose() + GvDatos.DataBind() + + + + + + End Sub + +#End Region + +#Region "SELECTED INDEX CHANGE" + + + + Private Sub RblTipoCambio_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RblTipoCambio.SelectedIndexChanged + If RblTipoCambio.SelectedValue.ToEntero = 3 Then + Dim TipoCambio As Double + LiEspecifico.Visible = True + TipoCambio = GlobalTipoCambio(Now) + TxtEspecifico.Text = TipoCambio.ToString + Else + LiEspecifico.Visible = False + End If + UpBodyTipoCambio.Update() + End Sub + +#End Region + +#Region "CONSULTAR" + + Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click + CargaDatos() + UPDatos.Update() + End Sub + +#End Region + +#Region "GRIDVIEW" + + Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound + + If e.Row.RowType = DataControlRowType.DataRow Then + + If e.Row.DataKey("Ordernador2").ToEntero = 100 Or e.Row.DataKey("Seccion").ToEntero = 3 And (e.Row.DataKey("TipoCategoria").ToEntero = 6 Or e.Row.DataKey("TipoCategoria").ToEntero = 7) Then + e.Row.Font.Bold = True + + End If + + + End If + End Sub + +#End Region + +#Region " IMPRIMIR " + + Protected Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click + 'GvDatos.ExportToExcel("ReporteComprasClasificacion" & Now.ToShortDateString) + GenerarPDF("EXCEL") + End Sub + + Protected Sub LnkPdf_Click(sender As Object, e As EventArgs) + GenerarPDF("PDF") + End Sub + Private Sub GenerarPDF(Opcion As String) + Dim FechaI = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", "-1", txtFechaI.Text) + Dim FechaF = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", "-1", txtFechaF.Text) + + + + Dim FechaIn As String = $" Fecha Inicio: {txtFechaI.Text}" + Dim FechaFn As String = $" Fecha Fin: {txtFechaF.Text}" + If txtFechaI.Text = "" Then FechaIn = "" + If txtFechaF.Text = "" Then FechaFn = "" + + + Dim SubProyecto = If(DdlSubProyecto.GetSelectedText = "", "", $" SubProyecto: {DdlSubProyecto.GetSelectedText}") + + + Dim FechaIF, FechaFF As String + FechaIF = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1") + FechaFF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1") + + + + If DtDatos IsNot Nothing AndAlso DtDatos.Rows.Count > 0 Then + For Each Dr As DataRow In DtDatos.Rows + Dr("Fecha") = Dr("Fecha").ToString.ToDate.ToShortDateString + Next + Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) + Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + Dim params As New List(Of ReportParameter) + params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) + params.Add(New ReportParameter("FechaInicio", FechaI)) + params.Add(New ReportParameter("FechaFin", FechaF)) + params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) + params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) + params.Add(New ReportParameter("FechaImpresion", Now.ToString)) + params.Add(New ReportParameter("AgrupadoPor", $"Filtros Por: {FechaIn} {FechaFn} {SubProyecto} ")) + If Imagen.Exists Then + params.Add(New ReportParameter("LogoPath", logouri)) + Else + params.Add(New ReportParameter("LogoPath", "")) + End If + ImprimirPDF("Empresas/Grales/Formatos/RepIndicadorDiario.rdlc", DtDatos, params, $"RepIndicadorDiario_{Now.ToString("yyyyMMddhhmmss")}", Opcion) + Else + Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia) + End If + + End Sub +#End Region + +#Region "GRAFICA" + + Protected Sub LnkVerGrafica_Click(sender As Object, e As EventArgs) + If Not DtDatos IsNot Nothing AndAlso DtDatos.Rows.Count > 0 Then + Alert("No hay datos disponibles", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + + LblTituloGrafica.Text = $"Agrupado por: {Agrupador}" + RegistraScript("$('#DivModalGrafica').modal('show')") + CambioGrafica() + End Sub + Private Sub CreaDataTableColor() + DtColor = New DataTable + DtColor.Columns.Add("Color") + Dim RowColor As DataRow = Nothing + RowColor = DtColor.NewRow() + RowColor("Color") = "#FF0F00" + DtColor.Rows.Add(RowColor) + RowColor = Nothing + RowColor = DtColor.NewRow() + RowColor("Color") = "#FF6600" + DtColor.Rows.Add(RowColor) + RowColor = Nothing + RowColor = DtColor.NewRow() + RowColor("Color") = "#FF9E01" + DtColor.Rows.Add(RowColor) + RowColor = Nothing + RowColor = DtColor.NewRow() + RowColor("Color") = "#FCD202" + DtColor.Rows.Add(RowColor) + RowColor = Nothing + RowColor = DtColor.NewRow() + RowColor("Color") = "#F8FF01" + DtColor.Rows.Add(RowColor) + RowColor = Nothing + RowColor = DtColor.NewRow() + RowColor("Color") = "#B0DE09" + DtColor.Rows.Add(RowColor) + RowColor = Nothing + RowColor = DtColor.NewRow() + RowColor("Color") = "#04D215" + DtColor.Rows.Add(RowColor) + RowColor = Nothing + RowColor = DtColor.NewRow() + RowColor("Color") = "#0D8ECF" + DtColor.Rows.Add(RowColor) + RowColor = Nothing + RowColor = DtColor.NewRow() + RowColor("Color") = "#0D52D1" + DtColor.Rows.Add(RowColor) + RowColor = Nothing + RowColor = DtColor.NewRow() + RowColor("Color") = "#2A0CD0" + DtColor.Rows.Add(RowColor) + RowColor = Nothing + RowColor = DtColor.NewRow() + RowColor("Color") = "#8A0CCF" + DtColor.Rows.Add(RowColor) + RowColor = Nothing + RowColor = DtColor.NewRow() + RowColor("Color") = "#CD0D74" + DtColor.Rows.Add(RowColor) + RowColor = Nothing + RowColor = DtColor.NewRow() + RowColor("Color") = "#754DEB" + DtColor.Rows.Add(RowColor) + RowColor = Nothing + RowColor = DtColor.NewRow() + RowColor("Color") = "#DDDDDD" + DtColor.Rows.Add(RowColor) + RowColor = Nothing + RowColor = DtColor.NewRow() + RowColor("Color") = "#999999" + DtColor.Rows.Add(RowColor) + RowColor = Nothing + RowColor = DtColor.NewRow() + RowColor("Color") = "#333333" + DtColor.Rows.Add(RowColor) + RowColor = Nothing + RowColor = DtColor.NewRow() + RowColor("Color") = "#000000" + DtColor.Rows.Add(RowColor) + End Sub + + Private Sub CambioGrafica() + Dim Dt As New DataTable() + Dt.Columns.Add("Texto") + Dt.Columns.Add("Valor") + Dt.Columns.Add("Color") + Dt.Columns.Add("Moneda") + Dim RowColorIndex As Integer = 0 + For Each Dr As DataRow In DtDatos.Rows + If Not Dr("CveCompra").ToString.ToEntero > 0 Then + Dim Row As DataRow = Nothing + Row = Dt.NewRow() + Row("Texto") = $"{Dr("GPO").ToString} {GlobalDTMonedas().FiltraParametros($"CveMoneda = {CveMoneda}").Rows(0)("Abreviatura").ToString}" + Select Case DdlVer.SelectedValue.ToEntero + Case 1 + Row("Valor") = Dr("Total").ToString.FormatoNumero + Case 2 + Row("Valor") = Dr("SubTotal").ToString.FormatoNumero + Case 3 + Row("Valor") = Dr("IVA").ToString.FormatoNumero + End Select + Row("Color") = DtColor.Rows(RowColorIndex)("Color").ToString + Row("Moneda") = GlobalDTMonedas().FiltraParametros($"CveMoneda = {CveMoneda}").Rows(0)("Moneda").ToString + Dt.Rows.Add(Row) + RowColorIndex += 1 + If RowColorIndex = 17 Then + RowColorIndex = 0 + End If + End If + Next + + Dim query = From s In Dt.AsEnumerable() Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()} + Dim json As String = Newtonsoft.Json.JsonConvert.SerializeObject(query) + Select Case DdlGrafica.SelectedValue.ToEntero + Case 1 + RegistraScript($"CargaGraficaBarras({json})", "22") + Case 2 + RegistraScript($"CargaGraficaPastel({json})", "22") + End Select + UPModalProd.Update() + End Sub + Protected Sub DdlGrafica_SelectedIndexChanged(sender As Object, e As EventArgs) + CambioGrafica() + End Sub + + Protected Sub DdlVer_SelectedIndexChanged(sender As Object, e As EventArgs) + CambioGrafica() + End Sub + +#End Region + + + +End Class + diff --git a/App_Code/ClsAcumuladores.vb b/App_Code/ClsAcumuladores.vb index 1980df4a1..ee525f979 100644 --- a/App_Code/ClsAcumuladores.vb +++ b/App_Code/ClsAcumuladores.vb @@ -898,12 +898,12 @@ Public Class ClsAcumuladores Dim Retorno As Boolean = False - SqlDataAdapter("PA_Acum_RepInicadorDiarioGet") + SqlDataAdapter("PA_Acum_RepIndicadorDiarioGet") With SqlAdapter.SelectCommand.Parameters .Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio .Add("@FechaFin", SqlDbType.Date).Value = FechaFin - .Add("@CveSubProeycto", SqlDbType.Int).Value = CveSubProeycto + .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProeycto .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa End With From 97349a7d35e41ff50b7e7bdf84f9a5c72fc7c0ab Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Fri, 13 Dec 2019 00:59:01 -0700 Subject: [PATCH 02/22] FechaAjuste en garantias detalle --- App_Code/ClsAcumuladores.vb | 5 +++-- App_Code/Modelos.vb | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/App_Code/ClsAcumuladores.vb b/App_Code/ClsAcumuladores.vb index 870e809fa..04351a044 100644 --- a/App_Code/ClsAcumuladores.vb +++ b/App_Code/ClsAcumuladores.vb @@ -703,7 +703,7 @@ Public Class ClsAcumuladores Public Function AddGarantiasDetalle(CveVentaDetalle As Integer, CvePS As Integer, CveFolioGarantia As Integer, CveTipoUso As Integer, CodigoEnsamble As String, CodigoLinea As String, CodigoInspeccion As String, CveTipoDefecto As Integer, NumPoliza As String, Importe As Double, - Consecutivo As String) As Boolean + Consecutivo As String, FechaAjuste As DateTime) As Boolean Dim Retorno As Boolean = False SqlDataAdapter("PA_Acum_GarantiasDetalleAdd") With SqlAdapter.SelectCommand.Parameters @@ -717,7 +717,8 @@ Public Class ClsAcumuladores .Add("@CveTipoDefecto", SqlDbType.Int).Value = CveTipoDefecto .Add("@NumPoliza", SqlDbType.VarChar).Value = NumPoliza .Add("@Importe", SqlDbType.Float).Value = Importe - .Add("@Consecutivo", SqlDbType.VarChar).Value = Consecutivo + .Add("@Consecutivo", SqlDbType.VarChar).Value = Consecutivo + .Add("@FechaAjuste", SqlDbType.DateTime).Value = FechaAjuste End With Try SqlAdapter.Fill(Data) diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index e4cdc187b..4e15fb81d 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -1349,7 +1349,7 @@ Namespace Modelos For Each Dr As DataRow In DtAjustes.Rows If Not ObjAcum.AddGarantiasDetalle(Dr("CveVentaDetalle").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("CveFolioGarantia").ToString.ToEntero, Dr("CveTipoUso").ToString.ToEntero, Dr("CodigoEnsamble").ToString, Dr("CodigoLinea").ToString, Dr("CodigoInspeccion").ToString, Dr("CveTipoDefecto").ToString.ToEntero, - Dr("NumPoliza").ToString, Dr("Importe").ToString.ToDouble, Dr("Consecutivo").ToString) Then + Dr("NumPoliza").ToString, Dr("Importe").ToString.ToDouble, Dr("Consecutivo").ToString, Dr("FechaAjuste").ToString.ToDateTime()) Then ErrorList.Add("Ocurrió un error al agregar la garantia detalle.") End If Next From 2e1f6ef80be9e380d65a8a379176b29714b8e184 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Fri, 13 Dec 2019 01:00:14 -0700 Subject: [PATCH 03/22] poliza virtual --- Ashx/SIGPolizaVirtual.ashx | 2 +- Ventas/Ventas.aspx.vb | 92 +++++++++++++++++++++----------------- 2 files changed, 53 insertions(+), 41 deletions(-) diff --git a/Ashx/SIGPolizaVirtual.ashx b/Ashx/SIGPolizaVirtual.ashx index 6ba9db938..10eab84ae 100644 --- a/Ashx/SIGPolizaVirtual.ashx +++ b/Ashx/SIGPolizaVirtual.ashx @@ -93,7 +93,7 @@ Public Class SIGPolizaVirtual : Implements IHttpHandler, IRequiresSessionState obj.sale_type = "01" 'PISO obj.sale_type_service = "01" 'PARTICULAR obj.sale_total = ObjFactura.Total - obj.sale_discount = ObjFactura.SubTotal + obj.sale_discount = 0 'ObjFactura.SubTotal obj.sale_id = GuidGenerator.GenerateTimeBasedGuid().ToString() 'Dim PS = ObjFactura.DtDetalle.Rows(0) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index aff09fb81..9a55104d1 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -6735,7 +6735,9 @@ Partial Class Ventas 'ENVIAR POLIZA VIRTUAL If ErrorList.Count = 0 Then If UsuarioActual.Empresa.Funcionalidad(576) = "1" Then - GeneraPolizaVentaWS(ObjFactura) + If Not GeneraPolizaVentaWS(ObjVentas, ObjFactura) Then + ErrorList.Add("Ocurrió un error al registrar los movimientos de almacén del contrato de consignación") + End If End If End If @@ -23812,49 +23814,61 @@ Partial Class Ventas CargaRNC() RegistraScript("$('#ModalAplicarRemisionesNC').modal({backdrop: 'static', keyboard: false });") End Sub - Protected Function GeneraPolizaVentaWS(ObjFactura As Modelos.Factura) As Boolean - Dim obj As New Modelos.MPolizaVentaWS - 'DATOS DEL CLIENTE - obj.customer_name = ObjFactura.Cliente.Nombre - obj.customer_last_name1 = "" - obj.customer_last_name2 = "" - obj.customer_birthday = Nothing - obj.customer_phone = ObjFactura.Cliente.Telefono - obj.customer_email = ObjFactura.Cliente.Mail - obj.customer_gender = "03" 'OTRO GENERO - obj.customer_advertising = False - obj.customer_car_brand = "00" - obj.customer_car_model = "00" - obj.customer_car_year = ObjFactura.Fecha.Year + Protected Function GeneraPolizaVentaWS(ByRef ObjVentas As ClsVentas, ObjFactura As Modelos.Factura) As Boolean + Dim DtUsados As DataTable = Nothing - 'DATOS DE VENTA - obj.sale_date = Now - obj.sale_paidby = "01" - obj.sale_type = "01" 'PISO - obj.sale_type_service = "01" 'PARTICULAR - obj.sale_total = ObjFactura.Total - obj.sale_discount = ObjFactura.SubTotal - obj.sale_id = ObjFactura.CveVenta.ToString() + If ObjVentas.GetVentasUsadosDetalle(ObjFactura.CveVenta) Then + DtUsados = ObjVentas.DtResultados.Copy() + End If - 'DATOS DEL PRODUCTO - obj.product_code = "174925" - obj.product_unique_code = "65047187" - obj.product_sale_type = "02" 'AJUSTE + For Each Row As DataRow In DtUsados.Rows + Dim obj As New Modelos.MPolizaVentaWS + 'DATOS DEL CLIENTE + obj.customer_name = ObjFactura.Cliente.Nombre + obj.customer_last_name1 = "" + obj.customer_last_name2 = "" + obj.customer_birthday = Nothing + obj.customer_phone = ObjFactura.Cliente.Telefono + obj.customer_email = ObjFactura.Cliente.Mail + obj.customer_gender = "03" 'OTRO GENERO + obj.customer_advertising = False + obj.customer_car_brand = "00" + obj.customer_car_model = "00" + obj.customer_car_year = ObjFactura.Fecha.Year - 'DATOS DE USADO - obj.used_product = True - obj.used_brand = "01" - obj.used_bci = "25" - obj.used_month = 1 - obj.used_year = 2015 - obj.used_sale_date = ObjFactura.Fecha + 'DATOS DE VENTA + obj.sale_date = ObjFactura.Fecha + obj.sale_paidby = "01" + obj.sale_type = "01" 'PISO + obj.sale_type_service = "02" 'COMERCIAL + obj.sale_total = ObjFactura.Total + obj.sale_discount = ObjFactura.Descuento + obj.sale_id = String.Format("{0}{1}{2}", ObjFactura.Serie, ObjFactura.Folio, ObjFactura.CveVenta) - Return False - 'EnviarPolizaVentaWS(obj) + 'DATOS DEL PRODUCTO + obj.product_code = Row("Codigo").ToString() + obj.product_unique_code = "" 'se indique el código único de la batería. + obj.product_sale_type = "01 " 'VENTA + + Dim FechaUsado As DateTime = Row("FechaAjuste").ToString().ToDateTime() + + 'DATOS DE USADO + obj.used_product = True + obj.used_brand = Row("IdModelo").ToString() 'MARCAR DEL USADO + obj.used_bci = Row("CveBCIUsado").ToString() 'VALOR DEL BCI + obj.used_month = FechaUsado.Month + obj.used_year = FechaUsado.Year + obj.used_sale_date = FechaUsado + + EnviarPolizaVentaWS(obj) + Next + + Return True End Function Protected Sub EnviarPolizaVentaWS(obj As Modelos.MPolizaVentaWS) - Dim Retorno As String = "[]" + + Dim Respuesta As String = "[]" Dim User As String = "cslth.2809@jcilink.com" Dim Password As String = "ff31580a95f36b51ad27f970428b77a5a9245076" @@ -23898,14 +23912,12 @@ Partial Class Ventas Dim content As New FormUrlEncodedContent(Parametros) Dim response = wc.PostAsync(Url, content).Result - Retorno = response.Content.ReadAsStringAsync().Result + Respuesta = response.Content.ReadAsStringAsync().Result End Using Catch ex As Exception ex.GuardaLog(ex.Message) End Try - - End Sub End Class \ No newline at end of file From 63d9cafc3bc0ec0255d23e373d987e3602791d03 Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Fri, 13 Dec 2019 13:33:19 -0700 Subject: [PATCH 04/22] =?UTF-8?q?Reconfirmaci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Acumuladores/RepIndicadorDiario.aspx.vb | 27 ++++++++++--------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/Acumuladores/RepIndicadorDiario.aspx.vb b/Acumuladores/RepIndicadorDiario.aspx.vb index b890c1481..3a4dbfc10 100644 --- a/Acumuladores/RepIndicadorDiario.aspx.vb +++ b/Acumuladores/RepIndicadorDiario.aspx.vb @@ -71,7 +71,7 @@ Partial Class ACumuladores_RepIndicadorDiario Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not IsPostBack Then - txtFechaI.Text = Now.AddMonths(-1).ToString("dd/MM/yyyy") + txtFechaI.Text = Now.FirstDayOfMonth().ToString("dd/MM/yyyy") txtFechaF.Text = Now.ToString("dd/MM/yyyy") CargaCombos() @@ -80,10 +80,7 @@ Partial Class ACumuladores_RepIndicadorDiario End If End Sub -#Region "CARGAS" - - - +#Region "CARGAS" Private Sub CargaCombos() @@ -121,9 +118,6 @@ Partial Class ACumuladores_RepIndicadorDiario GvDatos.DataBind() - - - End Sub #End Region @@ -203,20 +197,21 @@ Partial Class ACumuladores_RepIndicadorDiario - If DtDatos IsNot Nothing AndAlso DtDatos.Rows.Count > 0 Then - For Each Dr As DataRow In DtDatos.Rows - Dr("Fecha") = Dr("Fecha").ToString.ToDate.ToShortDateString - Next + If DtDatos IsNot Nothing AndAlso DtDatos.Rows.Count > 0 Then + + + Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) - Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("FechaInicio", FechaI)) - params.Add(New ReportParameter("FechaFin", FechaF)) - params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) + params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("FechaImpresion", Now.ToString)) - params.Add(New ReportParameter("AgrupadoPor", $"Filtros Por: {FechaIn} {FechaFn} {SubProyecto} ")) + params.Add(New ReportParameter("AgrupadoPor", $"Filtros Por: {FechaIn} {FechaFn} {SubProyecto} ")) + If Imagen.Exists Then params.Add(New ReportParameter("LogoPath", logouri)) Else From 9219bbef16f470c2e8bdf964f8a81cf0cf7c5e21 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Fri, 13 Dec 2019 14:18:34 -0700 Subject: [PATCH 05/22] nuevo reporte en el modulo en cuestion --- RH/RepIndiceRotacionPersonal.aspx | 10 +++++++ RH/RepIndiceRotacionPersonal.aspx.vb | 41 +++++++++++++++++++++++++++- 2 files changed, 50 insertions(+), 1 deletion(-) diff --git a/RH/RepIndiceRotacionPersonal.aspx b/RH/RepIndiceRotacionPersonal.aspx index 7427349f3..cf45a956a 100644 --- a/RH/RepIndiceRotacionPersonal.aspx +++ b/RH/RepIndiceRotacionPersonal.aspx @@ -31,6 +31,16 @@ Reporte Indice Rotación de Personal + + +
  • + +
  • +
    + + + +
    diff --git a/RH/RepIndiceRotacionPersonal.aspx.vb b/RH/RepIndiceRotacionPersonal.aspx.vb index 080918e61..10605fe33 100644 --- a/RH/RepIndiceRotacionPersonal.aspx.vb +++ b/RH/RepIndiceRotacionPersonal.aspx.vb @@ -3,10 +3,24 @@ Option Explicit On Imports Extensiones Imports System.Data +Imports Microsoft.Reporting.WebForms Partial Class Ventas_RepIndiceRotacionPersonal Inherits ClsPaginas + Private Property DTGvDatos As DataTable + Get + If ViewState("DTGvDatos") Is Nothing Then + Return New DataTable + Else + Return DirectCast(ViewState("DTGvDatos"), DataTable) + End If + End Get + Set(value As DataTable) + ViewState("DTGvDatos") = value + End Set + End Property + Private Sub Ventas_RepIndiceRotacionPersonal_Load(sender As Object, e As EventArgs) Handles Me.Load If Not IsPostBack Then txtInicio.Text = Date.Now.AddDays(-30).ToString("dd/MM/yyyy") @@ -84,7 +98,7 @@ Partial Class Ventas_RepIndiceRotacionPersonal If rh.GetReporteRotacionPersonal(FechaInicio, FechaFin, CveTurno, CveProyecto, CveSubproyecto, UsuarioActual.Empresa.CveEmpresa) Then dTable = rh.DtResultados End If - + DTGvDatos = dTable GVRegDatos.DataSource = dTable GVRegDatos.DataBind() @@ -138,4 +152,29 @@ Partial Class Ventas_RepIndiceRotacionPersonal End Sub + + Protected Sub BtnImprimir_Click(sender As Object, e As EventArgs) + '"Empresas/Grales/Formatos/ClienteHistorial.rdlc" + If GVRegDatos.Rows.Count > 0 Then + + Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) + Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + + Dim params As New List(Of ReportParameter) + params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) + params.Add(New ReportParameter("FechaInicial", txtInicio.Text)) + params.Add(New ReportParameter("FechaFinal", txtFin.Text)) + params.Add(New ReportParameter("FechaRealizado", Date.Now().ToString())) + params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) + + If Imagen.Exists Then + params.Add(New ReportParameter("LogoPath", logouri)) + Else + params.Add(New ReportParameter("LogoPath", "")) + End If + + ImprimirPDF("Empresas/Grales/Formatos/RepIndiceRotacionPersonal.rdlc", DTGvDatos, params, "Reporte de Historial", "PDF") + + End If + End Sub End Class From 6eebd4abd1336cfc3950c87540e1361e8cb5a33e Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Fri, 13 Dec 2019 16:17:56 -0700 Subject: [PATCH 06/22] El reporte era el soporte a realizar con la columna de subproyecto y habia que actualizar en git el aspx --- .../RepMovimientosAuxiliaresCatalogo.aspx | 4 + .../RepMovimientosAuxiliaresCatalogo.rdlc | 128 +++++++++++++++++- 2 files changed, 125 insertions(+), 7 deletions(-) diff --git a/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx b/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx index 3719f257d..5d76ce0f0 100644 --- a/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx +++ b/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx @@ -151,6 +151,7 @@ Número Concepto Referencia + SubProyecto Cargos Abonos Saldo @@ -194,6 +195,9 @@ + + + diff --git a/Contabilidad2/Reportes/RepMovimientosAuxiliaresCatalogo.rdlc b/Contabilidad2/Reportes/RepMovimientosAuxiliaresCatalogo.rdlc index 4629da5f0..330f53bdd 100644 --- a/Contabilidad2/Reportes/RepMovimientosAuxiliaresCatalogo.rdlc +++ b/Contabilidad2/Reportes/RepMovimientosAuxiliaresCatalogo.rdlc @@ -15,11 +15,14 @@ 1.49458cm - 7.13431cm + 4.81952cm 1.99729cm + + 2.3148cm + 2.10313cm @@ -149,11 +152,12 @@ 2pt - 3 + 4 + @@ -387,6 +391,44 @@ + + + + true + true + + + + + Subproyecto + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + @@ -605,10 +647,11 @@ 2pt - 2 + 3 + @@ -844,6 +887,38 @@ + + + + true + true + + + + + =Fields!SubProyecto.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + @@ -1053,6 +1128,40 @@ + + + + true + true + + + + + + + + + + + + Textbox12 + + + 2pt + 2pt + 2pt + 2pt + + + + @@ -1172,6 +1281,7 @@ + @@ -1208,9 +1318,9 @@ true DataSet1 - 0.06348cm + 0.06346cm 3cm - 20.37043cm + 20.37044cm @@ -1221,7 +1331,7 @@ 1.2061in - - - - - 2pt - 2pt - 2pt - 2pt - - - - 0.84237cm - 0.20849cm - 0cm - 27.38607cm - 1 - - - - - - - - - 5.86021cm - - - 1.40551cm - - - 1.83854cm - - - 11.45172cm - - - 2.34042cm - - - 2.91042cm - - - 1.70625cm - - - - - 0.6cm - - - - - true - true - - - - - Nombre Completo - - - - - - - Textbox4 - - - - Silver - - - Silver - - - Silver - - - Silver - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Folio - - - - - - - Textbox15 - - - - Silver - - - Silver - - - Silver - - - Silver - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Fecha - - - - - - - Textbox17 - - - - Silver - - - Silver - - - Silver - - - Silver - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Descripción - - - - - - - Textbox3 - - - - Silver - - - Silver - - - Silver - - - Silver - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Sucursal - - - - - - - Textbox5 - - - - Silver - - - Silver - - - Silver - - - Silver - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Departamento - - - - - - - Textbox13 - - - - Silver - - - Silver - - - Silver - - - Silver - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Cantidad - - - - - - - Textbox14 - - - - Silver - - - Silver - - - Silver - - - Silver - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - =Fields!NombreCompleto.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Folio.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!FechaMovto.Value - - - - - - - FechaMovto - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!CodigoPS.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!SubProyecto.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Departamento.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Cantidad.Value - - - - - - - Surtir - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - - - - After - - - - - - - DataSet1 - 1.10695cm - 0.08149cm - 1.2cm - 27.51307cm - 2 - - - - - - 0.94992in - - - - - - - Textbox1 - 0.18521cm - 6.07218cm - 0.6cm - 14.02238cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - REPORTE UNIFORMES - - - - - - - - - - - - - - - - Textbox2 - 1.10271cm - 6.07218cm - 0.52945cm - 14.02238cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - External - =Parameters!LogoPath.Value - FitProportional - 0.06614cm - 2.22362cm - 2.33715cm - 2 - - - - - - - - - - - 0.76376cm - true - true - - - true - true - - - - - ="Página " & Globals.PageNumber & " de " & Globals.TotalPages - - - - - - - Textbox3 - 0.08291cm - 25.20741cm - 0.68085cm - 2.09233cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Usuario: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!UsuarioImprimio.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Impresión: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!FechaImpresion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 21cm - 29.7cm - 1cm - 1cm - 0.25cm - 0.25cm - 0.13cm - + + + + + 2pt + 2pt + 2pt + 2pt + + + + 0.84237cm + 0.20849cm + 0cm + 27.38607cm + 1 + + + + + + + + + 5.86021cm + + + 1.40551cm + + + 1.83854cm + + + 9.56026cm + + + 2.34042cm + + + 2.91042cm + + + 1.70625cm + + + 1.89146cm + + + + + 0.6cm + + + + + true + true + + + + + Nombre Completo + + + + + + + Textbox4 + + + + Silver + + + Silver + + + Silver + + + Silver + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Folio + + + + + + + Textbox15 + + + + Silver + + + Silver + + + Silver + + + Silver + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Fecha + + + + + + + Textbox17 + + + + Silver + + + Silver + + + Silver + + + Silver + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Descripción + + + + + + + Textbox3 + + + + Silver + + + Silver + + + Silver + + + Silver + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Sucursal + + + + + + + Textbox5 + + + + Silver + + + Silver + + + Silver + + + Silver + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Departamento + + + + + + + Textbox13 + + + + Silver + + + Silver + + + Silver + + + Silver + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Cantidad + + + + + + + Textbox14 + + + + Silver + + + Silver + + + Silver + + + Silver + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Total + + + + + + + Textbox18 + + + + Silver + + + Silver + + + Silver + + + Silver + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + =Fields!NombreCompleto.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Folio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!FechaMovto.Value + + + + + + + FechaMovto + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!CodigoPS.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!SubProyecto.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Departamento.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Cantidad.Value + + + + + + + Surtir + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Precio.Value + + + + + + + Precio + + + 2pt + 2pt + 2pt + 2pt + + + true + + + + + + + + + + + + + + + + + + + + + + After + + + + + + + DataSet1 + 1.10695cm + 0.08149cm + 1.2cm + 27.51307cm + 2 + + + + + + 0.94992in + + + + + + + Textbox1 + 0.18521cm + 6.07218cm + 0.6cm + 14.02238cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + REPORTE UNIFORMES + + + + + + + + + + + + + + + + Textbox2 + 1.10271cm + 6.07218cm + 0.52945cm + 14.02238cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + External + =Parameters!LogoPath.Value + FitProportional + 0.06614cm + 2.22362cm + 2.33715cm + 2 + + + + + + + + + + + 0.76376cm + true + true + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox3 + 0.08291cm + 25.20741cm + 0.68085cm + 2.09233cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Usuario: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!FechaImpresion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 21cm + 29.7cm + 1cm + 1cm + 0.25cm + 0.25cm + 0.13cm + + Textbox15 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Código Producto/Servicio + + + + + + Textbox22 - true @@ -616,6 +654,40 @@ + + + + true + true + + + + + =Fields!PS.Value + + + + + + =iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","#67809F","#cccccc"), "Transparent") + 2pt + 2pt + 2pt + 2pt + + + + @@ -851,6 +923,7 @@ + @@ -866,7 +939,7 @@ DataSet1 0.06614cm 0.90467cm - 28.36649cm + 27.51879cm @@ -877,7 +950,7 @@ 0.59228in