Merge branch 'master' of http://agonzalez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -5745,8 +5745,8 @@ Partial Class Ventas
|
|||||||
Dim Cantidad, PU, Descuento, CantidadInventario As Decimal
|
Dim Cantidad, PU, Descuento, CantidadInventario As Decimal
|
||||||
Dim CuentaPredial As String
|
Dim CuentaPredial As String
|
||||||
Cantidad = GvPS.Rows(e.RowIndex).FCTextBox("TxtCantidad").Text.ToDecimal
|
Cantidad = GvPS.Rows(e.RowIndex).FCTextBox("TxtCantidad").Text.ToDecimal
|
||||||
PU = Math.Round(GvPS.Rows(e.RowIndex).FCTextBox("TxtPrecio").Text.ToDecimal, 6)
|
PU = (GvPS.Rows(e.RowIndex).FCTextBox("TxtPrecio").Text.ToDecimal).RoundSQL(6)
|
||||||
Descuento = Math.Round(GvPS.Rows(e.RowIndex).FCTextBox("TxtDescuento").Text.ToDecimal, NumeroDecimales)
|
Descuento = (GvPS.Rows(e.RowIndex).FCTextBox("TxtDescuento").Text.ToDecimal).RoundSQL(NumeroDecimales)
|
||||||
CuentaPredial = GvPS.Rows(e.RowIndex).FCTextBox("TxtPredial").Text.Trim
|
CuentaPredial = GvPS.Rows(e.RowIndex).FCTextBox("TxtPredial").Text.Trim
|
||||||
|
|
||||||
Dim CantidadOriginal As Decimal = GvPS.Rows(e.RowIndex).DataKey("Cantidad").ToDecimal()
|
Dim CantidadOriginal As Decimal = GvPS.Rows(e.RowIndex).DataKey("Cantidad").ToDecimal()
|
||||||
@@ -14128,7 +14128,7 @@ Partial Class Ventas
|
|||||||
Dim Row As DataRow = Nothing
|
Dim Row As DataRow = Nothing
|
||||||
Dim TotalCalculableImpuestos As Decimal = 0
|
Dim TotalCalculableImpuestos As Decimal = 0
|
||||||
Dim TotalCalculableImpuestosIVA 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 = TmpDT.NewRow()
|
||||||
Row("CveProyecto") = CveProyecto
|
Row("CveProyecto") = CveProyecto
|
||||||
|
|||||||
@@ -63,8 +63,15 @@ Public Class WsTSoft
|
|||||||
Dim Continuar As Boolean = ObjGPS.UltimaPosicionEquipoGetWS(DevID)
|
Dim Continuar As Boolean = ObjGPS.UltimaPosicionEquipoGetWS(DevID)
|
||||||
Dim ObjPos As New LatLng
|
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.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
|
Else
|
||||||
ObjPos.CurrentError = "No se pudo obtener la posición."
|
ObjPos.CurrentError = "No se pudo obtener la posición."
|
||||||
End If
|
End If
|
||||||
@@ -96,7 +103,16 @@ Public Class WsTSoft
|
|||||||
Dim Continuar As Boolean = objTsoft.GETRemisionesHistorial(FolioRemision, NoEconomico)
|
Dim Continuar As Boolean = objTsoft.GETRemisionesHistorial(FolioRemision, NoEconomico)
|
||||||
Dim objRem As New GetRemisionHistorialesObj
|
Dim objRem As New GetRemisionHistorialesObj
|
||||||
If Continuar Then
|
If Continuar Then
|
||||||
objRem.Historial = objTsoft.DtResultados.DataTableToObject(Of GetRemisionHistorialsObj)
|
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 = ""
|
objRem.CurrentError = ""
|
||||||
Else
|
Else
|
||||||
objRem.Historial = New List(Of GetRemisionHistorialsObj)
|
objRem.Historial = New List(Of GetRemisionHistorialsObj)
|
||||||
@@ -149,15 +165,15 @@ Public Class WsTSoft
|
|||||||
End Function
|
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 retorno As JArray = Nothing
|
||||||
Dim posicionesArray = New JArray(From Row As DataRow In Dt
|
Dim posicionesArray = New JArray(From Row As DataRow In Dt
|
||||||
Let index = Dt.Rows().IndexOf(Row)
|
Let index = Dt.Rows().IndexOf(Row)
|
||||||
Select New JObject(
|
Select New JObject(
|
||||||
New JProperty("indice", index),
|
New JProperty("indice", index),
|
||||||
New JProperty("cveTrama", -1),
|
New JProperty("cveTrama", -1),
|
||||||
New JProperty("lat", Row("Latitud").ToString.ToDouble),
|
New JProperty("lat", Row(LatName).ToString.ToDouble),
|
||||||
New JProperty("lon", Row("Longitud").ToString.ToDouble)
|
New JProperty("lon", Row(LonName).ToString.ToDouble)
|
||||||
))
|
))
|
||||||
|
|
||||||
Dim Base64array = Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(posicionesArray.ToString()))
|
Dim Base64array = Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(posicionesArray.ToString()))
|
||||||
@@ -193,9 +209,10 @@ Public Class WsTSoft
|
|||||||
End Class
|
End Class
|
||||||
<Serializable>
|
<Serializable>
|
||||||
Public Class LatLng
|
Public Class LatLng
|
||||||
Public Lat As String
|
Public Property Lat As String
|
||||||
Public Lng As String
|
Public Property Lng As String
|
||||||
Public CurrentError As String
|
Public Property Direccion As String
|
||||||
|
Public Property CurrentError As String
|
||||||
End Class
|
End Class
|
||||||
<Serializable>
|
<Serializable>
|
||||||
Public Class GetRemisionHistorialsObj
|
Public Class GetRemisionHistorialsObj
|
||||||
@@ -204,6 +221,7 @@ Public Class WsTSoft
|
|||||||
Public Property NoEconomico As String
|
Public Property NoEconomico As String
|
||||||
Public Property Lat 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 Distancia As String
|
||||||
Public Property TrackingNumber As String
|
Public Property TrackingNumber As String
|
||||||
Public Property CveEstatus As Integer
|
Public Property CveEstatus As Integer
|
||||||
|
|||||||
Reference in New Issue
Block a user