From dfccbed51d1b182ae2ab3b1e60cd671659ad1187 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Thu, 23 Jan 2020 12:54:30 -0700 Subject: [PATCH 1/4] Direcciones en web service --- asmx/WsTSoft.asmx | 40 +++++++++++++++++++++++++++++----------- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/asmx/WsTSoft.asmx b/asmx/WsTSoft.asmx index 94e8b0ab4..7d9e99ee5 100644 --- a/asmx/WsTSoft.asmx +++ b/asmx/WsTSoft.asmx @@ -62,9 +62,16 @@ Public Class WsTSoft Dim ObjGPS As New ClsGPS Dim Continuar As Boolean = ObjGPS.UltimaPosicionEquipoGetWS(DevID) Dim ObjPos As New LatLng - If Continuar Then + If Continuar Then + 'CONSULTA DIRECCIONES + Dim Direcciones As JArray = ConsultarDirecciones(ObjGPS.DtResultados, "Lat", "Lng") + For Each Dir As JObject In Direcciones + ObjGPS.DtResultados.Rows(Dir("Indice").ToEntero())("Direccion") = Dir("Direccion").ToString() + Next + ObjPos.Lat = ObjGPS.DtResultados.Rows("0")("Lat").ToString - ObjPos.Lng = ObjGPS.DtResultados.Rows("0")("Lng").ToString + ObjPos.Lng = ObjGPS.DtResultados.Rows("0")("Lng").ToString + ObjPos.Direccion = ObjGPS.DtResultados.Rows("0")("Direccion").ToString Else ObjPos.CurrentError = "No se pudo obtener la posición." End If @@ -95,8 +102,17 @@ Public Class WsTSoft Dim objTsoft As New ClsTSoft Dim Continuar As Boolean = objTsoft.GETRemisionesHistorial(FolioRemision, NoEconomico) Dim objRem As New GetRemisionHistorialesObj - If Continuar Then - objRem.Historial = objTsoft.DtResultados.DataTableToObject(Of GetRemisionHistorialsObj) + If Continuar Then + Dim Dt = objTsoft.DtResultados.Copy() + Dt.Columns.Add("Direccion", GetType(String)) + + 'CONSULTA DIRECCIONES + Dim Direcciones As JArray = ConsultarDirecciones(Dt, "Lat", "Lon") + For Each Dir As JObject In Direcciones + Dt.Rows(Dir("Indice").ToEntero())("Direccion") = Dir("Direccion").ToString() + Next + + objRem.Historial = Dt.DataTableToObject(Of GetRemisionHistorialsObj) objRem.CurrentError = "" Else objRem.Historial = New List(Of GetRemisionHistorialsObj) @@ -149,15 +165,15 @@ Public Class WsTSoft End Function - Public Function ConsultarDirecciones(Dt As DataTable) As JArray + Public Function ConsultarDirecciones(Dt As DataTable, Optional LatName As String = "Latitud", Optional LonName As String = "Longitud") As JArray Dim retorno As JArray = Nothing Dim posicionesArray = New JArray(From Row As DataRow In Dt Let index = Dt.Rows().IndexOf(Row) Select New JObject( New JProperty("indice", index), New JProperty("cveTrama", -1), - New JProperty("lat", Row("Latitud").ToString.ToDouble), - New JProperty("lon", Row("Longitud").ToString.ToDouble) + New JProperty("lat", Row(LatName).ToString.ToDouble), + New JProperty("lon", Row(LonName).ToString.ToDouble) )) Dim Base64array = Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(posicionesArray.ToString())) @@ -193,9 +209,10 @@ Public Class WsTSoft End Class Public Class LatLng - Public Lat As String - Public Lng As String - Public CurrentError As String + Public Property Lat As String + Public Property Lng As String + Public Property Direccion As String + Public Property CurrentError As String End Class Public Class GetRemisionHistorialsObj @@ -203,7 +220,8 @@ Public Class WsTSoft Public Property FolioRemision As String Public Property NoEconomico As String Public Property Lat As String - Public Property Lon As String + Public Property Lon As String + Public Property Direccion As String Public Property Distancia As String Public Property TrackingNumber As String Public Property CveEstatus As Integer From e104209faa405ec2da8b5d41e8e205a6b6d714b2 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Thu, 23 Jan 2020 12:55:24 -0700 Subject: [PATCH 2/4] Redondeos en ventas --- Ventas/Ventas.aspx.vb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index dffb2106e..952ba1f49 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -5745,8 +5745,8 @@ Partial Class Ventas Dim Cantidad, PU, Descuento, CantidadInventario As Decimal Dim CuentaPredial As String Cantidad = GvPS.Rows(e.RowIndex).FCTextBox("TxtCantidad").Text.ToDecimal - PU = Math.Round(GvPS.Rows(e.RowIndex).FCTextBox("TxtPrecio").Text.ToDecimal, 6) - Descuento = Math.Round(GvPS.Rows(e.RowIndex).FCTextBox("TxtDescuento").Text.ToDecimal, NumeroDecimales) + PU = (GvPS.Rows(e.RowIndex).FCTextBox("TxtPrecio").Text.ToDecimal).RoundSQL(6) + Descuento = (GvPS.Rows(e.RowIndex).FCTextBox("TxtDescuento").Text.ToDecimal).RoundSQL(NumeroDecimales) CuentaPredial = GvPS.Rows(e.RowIndex).FCTextBox("TxtPredial").Text.Trim Dim CantidadOriginal As Decimal = GvPS.Rows(e.RowIndex).DataKey("Cantidad").ToDecimal() @@ -14128,7 +14128,7 @@ Partial Class Ventas Dim Row As DataRow = Nothing Dim TotalCalculableImpuestos As Decimal = 0 Dim TotalCalculableImpuestosIVA As Decimal = 0 - PU = Math.Round(PU, 6) ' el precio unitario puede llevar hasta 6 decimales permitidos + PU = PU.RoundSQL(6) ' el precio unitario puede llevar hasta 6 decimales permitidos Row = TmpDT.NewRow() Row("CveProyecto") = CveProyecto From 839878500861869e9da931dd6b17e5108301fe2e Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Thu, 23 Jan 2020 12:56:02 -0700 Subject: [PATCH 3/4] haciendo grande el qr de de los reportes --- Empresas/146/Formatos/Factura.rdlc | 6 +++--- Empresas/146/Formatos/NotaCredito.rdlc | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Empresas/146/Formatos/Factura.rdlc b/Empresas/146/Formatos/Factura.rdlc index ed8648fc9..011fa5947 100644 --- a/Empresas/146/Formatos/Factura.rdlc +++ b/Empresas/146/Formatos/Factura.rdlc @@ -227,10 +227,10 @@ External =Parameters!QR.Value FitProportional - 5.87436in + 5.8661in 0.03915in - 0.95455in - 1.49755in + 1.31478in + 1.58997in 5