Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -301,7 +301,8 @@ Public Class ClsInventarios
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function GetRepAlmacenes(FechaInicio As String, FechaFin As String, CveEmpresa As Integer, CveTipoAlmacen As String, Contabilizable As Integer, Inventariable As Boolean,
|
||||
Optional SoloMovimientosContables As Boolean = False, Optional Almacenes As String = "-1", Optional CveSubProyecto As Integer = -1) As Boolean
|
||||
Optional SoloMovimientosContables As Boolean = False, Optional Almacenes As String = "-1", Optional CveSubProyecto As Integer = -1,
|
||||
Optional CveUsuarioConsulta As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Inv_AlmacenesRepGet")
|
||||
|
||||
@@ -315,6 +316,7 @@ Public Class ClsInventarios
|
||||
.Add("@Modalidad", SqlDbType.Int).Value = Contabilizable
|
||||
.Add("@Almacenes", SqlDbType.VarChar).Value = Almacenes
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
@@ -325,7 +327,8 @@ Public Class ClsInventarios
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function GetRepAlmacenesPeriodo(FechaCorte As Date, CveEmpresa As Integer, CveTipoAlmacen As String, Contabilizable As Integer, Inventariable As Boolean, VerEn As Integer) As Boolean
|
||||
Public Function GetRepAlmacenesPeriodo(FechaCorte As Date, CveEmpresa As Integer, CveTipoAlmacen As String, Contabilizable As Integer, Inventariable As Boolean, VerEn As Integer,
|
||||
Optional Almacenes As String = "-1", Optional CveSubProyecto As Integer = -1, Optional CveUsuarioConsulta As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Inv_AlmacenesPeriodoRepGet")
|
||||
|
||||
@@ -336,6 +339,9 @@ Public Class ClsInventarios
|
||||
.Add("@Inventariable", SqlDbType.Bit).Value = Inventariable
|
||||
.Add("@Modalidad", SqlDbType.Int).Value = Contabilizable
|
||||
.Add("@VerEn", SqlDbType.Int).Value = VerEn
|
||||
.Add("@Almacenes", SqlDbType.VarChar).Value = Almacenes
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
@@ -131,6 +131,25 @@ Public Class ClsTSoft
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function GetInfoEventosPenske(FechaI As DateTime, FechaF As DateTime) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
SqlDataAdapter("PA_GPS_GetInfoEventosPenske")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@FechaInicio", SqlDbType.DateTime).Value = FechaI
|
||||
.Add("@FechaFin", SqlDbType.DateTime).Value = FechaF
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un Error al obtener la información para PENSKE.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function RemoveRemisiones(CveRemision As Integer) As Boolean
|
||||
Dim strSQL As New StringBuilder()
|
||||
|
||||
@@ -5042,6 +5042,20 @@ Namespace Modelos
|
||||
Public Property Inv_EstatusEntrega As String
|
||||
Public Property Inv_ValorInventario As Decimal
|
||||
Public Property Fecha As DateTime
|
||||
<ComponentModel.DataAnnotations.Schema.NotMapped>
|
||||
Public ReadOnly Property FechaCP As DateTime
|
||||
Get
|
||||
If Me.SubProyecto IsNot Nothing Then
|
||||
If Now.EsHorarioVerano Then
|
||||
Return DateTime.UtcNow.AddHours(Me.SubProyecto.UTCOffsetVerano)
|
||||
Else
|
||||
Return DateTime.UtcNow.AddHours(Me.SubProyecto.UTCOffsetInvierno)
|
||||
End If
|
||||
Else
|
||||
Return Fecha
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
Public Property FechaVencimiento As DateTime
|
||||
Public Property EstatusFactura As String
|
||||
Public Property SeTimbro As String
|
||||
@@ -8486,6 +8500,8 @@ Namespace Modelos
|
||||
FormatoFactura = ""
|
||||
SubProyecto = ""
|
||||
Correo = ""
|
||||
UTCOffsetVerano = -7
|
||||
UTCOffsetInvierno = -7
|
||||
End Sub
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
@@ -8503,8 +8519,10 @@ Namespace Modelos
|
||||
Pais = Row("Pais").ToString
|
||||
CP = Row("CP").ToString
|
||||
SubProyecto = Row("SubProyecto").ToString
|
||||
UTCOffsetVerano = Row("UTCOffsetVerano").ToString.ToEntero()
|
||||
UTCOffsetInvierno = Row("UTCOffsetInvierno").ToString.ToEntero()
|
||||
End If
|
||||
'SetValues(Row)
|
||||
|
||||
End Sub
|
||||
|
||||
Public ReadOnly Property LugarExp As String
|
||||
@@ -8532,6 +8550,8 @@ Namespace Modelos
|
||||
Public Property Correo As String
|
||||
Public Property Telefono As String
|
||||
Public Property ImprimeNombre As String
|
||||
Public Property UTCOffsetVerano As Integer
|
||||
Public Property UTCOffsetInvierno As Integer
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
@@ -1,245 +0,0 @@
|
||||
Imports System.Web
|
||||
Imports System.Web.Services
|
||||
Imports System.Web.Services.Protocols
|
||||
Imports System.Collections.Generic
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
Imports Newtonsoft.Json
|
||||
|
||||
' To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
|
||||
' <System.Web.Script.Services.ScriptService()> _
|
||||
<WebService(Namespace:="http://TractoSoft.org/")>
|
||||
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)>
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
|
||||
Public Class WsTSoft
|
||||
Inherits System.Web.Services.WebService
|
||||
|
||||
<WebMethod()>
|
||||
Public Function AddRemision(FolioRemision As String, NoEconomico As String, CveEstatus As Integer, GeoInicial As String, GeoCarga As String, GeoEntrega As String, Fecha As String) As String
|
||||
Dim retorno As String = ""
|
||||
Dim objTsoft As New ClsTSoft
|
||||
objTsoft.IniciaTransacSQL()
|
||||
Dim Continuar As Boolean = objTsoft.AddRemisiones(FolioRemision, NoEconomico, CveEstatus, GeoInicial, GeoCarga, GeoEntrega, Fecha)
|
||||
Dim objRem As New addRemisionObj
|
||||
If Continuar Then
|
||||
objTsoft.Commit()
|
||||
objRem.CveRemision = objTsoft.DtResultados.Rows(0)("CveRemision").ToString().ToEntero()
|
||||
objRem.CurrentError = ""
|
||||
Else
|
||||
objTsoft.RollBack()
|
||||
objRem.CveRemision = 0
|
||||
objRem.CurrentError = objTsoft.MyCurrentError
|
||||
End If
|
||||
objTsoft.Dispose()
|
||||
retorno = JsonConvert.SerializeObject(objRem)
|
||||
Return retorno.ToString
|
||||
End Function
|
||||
|
||||
<WebMethod()>
|
||||
Public Function UpEstatusRemision(FolioRemision As String, CveEstatus As String) As String
|
||||
Dim retorno As String = ""
|
||||
Dim objTsoft As New ClsTSoft
|
||||
Dim Continuar As Boolean = objTsoft.UpEstatusRemision(FolioRemision, CveEstatus)
|
||||
Dim objRem As New upEstatusRemisionObj
|
||||
If Continuar Then
|
||||
objRem.SeActualizo = 1
|
||||
objRem.CurrentError = ""
|
||||
Else
|
||||
objRem.SeActualizo = 0
|
||||
objRem.CurrentError = objTsoft.MyCurrentError
|
||||
End If
|
||||
objTsoft.Dispose()
|
||||
retorno = JsonConvert.SerializeObject(objRem)
|
||||
Return retorno.ToString
|
||||
End Function
|
||||
<WebMethod()>
|
||||
Public Function GetUltimaPosicion(DevID As String) As String
|
||||
Dim retorno As String = ""
|
||||
Dim ObjGPS As New ClsGPS
|
||||
Dim Continuar As Boolean = ObjGPS.UltimaPosicionEquipoGetWS(DevID)
|
||||
Dim ObjPos As New LatLng
|
||||
If Continuar Then
|
||||
ObjPos.Lat = ObjGPS.DtResultados.Rows("0")("Lat").ToString
|
||||
ObjPos.Lng = ObjGPS.DtResultados.Rows("0")("Lng").ToString
|
||||
Else
|
||||
ObjPos.CurrentError = "No se pudo obtener la posición."
|
||||
End If
|
||||
ObjGPS.Dispose()
|
||||
retorno = JsonConvert.SerializeObject(ObjPos)
|
||||
Return retorno.ToString
|
||||
End Function
|
||||
<WebMethod()>
|
||||
Public Function TerminoRemision(FolioRemision As String, NoEconomico As String) As String
|
||||
Dim retorno As String = ""
|
||||
Dim objTsoft As New ClsTSoft
|
||||
Dim Continuar As Boolean = objTsoft.UpEstatusRemision(FolioRemision, 6)
|
||||
Dim objRem As New upEstatusRemisionObj
|
||||
If Continuar Then
|
||||
objRem.SeActualizo = 1
|
||||
objRem.CurrentError = ""
|
||||
Else
|
||||
objRem.SeActualizo = 0
|
||||
objRem.CurrentError = objTsoft.MyCurrentError
|
||||
End If
|
||||
objTsoft.Dispose()
|
||||
retorno = JsonConvert.SerializeObject(objRem)
|
||||
Return retorno.ToString
|
||||
End Function
|
||||
<WebMethod()>
|
||||
Public Function GetRemisionHistorial(FolioRemision As String, NoEconomico As String) As String
|
||||
Dim retorno As String = ""
|
||||
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)
|
||||
objRem.CurrentError = ""
|
||||
Else
|
||||
objRem.Historial = New List(Of GetRemisionHistorialsObj)
|
||||
objRem.CurrentError = objTsoft.MyCurrentError
|
||||
End If
|
||||
objTsoft.Dispose()
|
||||
retorno = JsonConvert.SerializeObject(objRem)
|
||||
Return retorno.ToString
|
||||
End Function
|
||||
<WebMethod()>
|
||||
Public Function TieneRemisionesActivas(NoEconomico As String) As String
|
||||
Dim retorno As String = ""
|
||||
Dim Continuar As Boolean = False
|
||||
|
||||
Dim ObjTSoft As New ClsTSoft
|
||||
Continuar = ObjTSoft.TieneRemisionesActivas(NoEconomico)
|
||||
|
||||
Dim objRem As New MTieneRemisiones With
|
||||
{
|
||||
.TieneRemisiones = Continuar,
|
||||
.CurrentError = ObjTSoft.MyCurrentError
|
||||
}
|
||||
ObjTSoft.Dispose()
|
||||
retorno = JsonConvert.SerializeObject(objRem)
|
||||
Return retorno
|
||||
End Function
|
||||
<Serializable>
|
||||
Public Class addRemisionObj
|
||||
Public CveRemision As Integer
|
||||
Public CurrentError As String
|
||||
End Class
|
||||
<Serializable>
|
||||
Public Class upEstatusRemisionObj
|
||||
Public SeActualizo As Integer
|
||||
Public CurrentError As String
|
||||
End Class
|
||||
<Serializable>
|
||||
Public Class MTieneRemisiones
|
||||
Public TieneRemisiones As Boolean
|
||||
Public CurrentError As String
|
||||
End Class
|
||||
<Serializable>
|
||||
Public Class LatLng
|
||||
Public Lat As String
|
||||
Public Lng As String
|
||||
Public CurrentError As String
|
||||
End Class
|
||||
<Serializable>
|
||||
Public Class GetRemisionHistorialsObj
|
||||
Public Property Fecha As DateTime
|
||||
Public Property FolioRemision As String
|
||||
Public Property NoEconomico As String
|
||||
Public Property Lat As String
|
||||
Public Property Lon As String
|
||||
Public Property Distancia As String
|
||||
Public Property TrackingNumber As String
|
||||
Public Property CveEstatus As Integer
|
||||
End Class
|
||||
<Serializable>
|
||||
Public Class GetRemisionHistorialesObj
|
||||
Public Historial As List(Of GetRemisionHistorialsObj)
|
||||
Public CurrentError As String
|
||||
End Class
|
||||
|
||||
<Serializable>
|
||||
Public Class ObjRemisiones
|
||||
|
||||
Public Property cveRemisiones() As Integer
|
||||
Get
|
||||
Return m_cveRemisiones
|
||||
End Get
|
||||
Set
|
||||
m_cveRemisiones = Value
|
||||
End Set
|
||||
End Property
|
||||
Private m_cveRemisiones As Integer
|
||||
Public Property folioRemision() As String
|
||||
Get
|
||||
Return m_folioRemision
|
||||
End Get
|
||||
Set
|
||||
m_folioRemision = Value
|
||||
End Set
|
||||
End Property
|
||||
Private m_folioRemision As String
|
||||
Public Property cveDispositivo() As Integer
|
||||
Get
|
||||
Return m_cveDispositivo
|
||||
End Get
|
||||
Set
|
||||
m_cveDispositivo = Value
|
||||
End Set
|
||||
End Property
|
||||
Private m_cveDispositivo As Integer
|
||||
Public Property iMEI() As String
|
||||
Get
|
||||
Return m_iMEI
|
||||
End Get
|
||||
Set
|
||||
m_iMEI = Value
|
||||
End Set
|
||||
End Property
|
||||
Private m_iMEI As String
|
||||
Public Property cveEstatus() As Integer
|
||||
Get
|
||||
Return m_cveEstatus
|
||||
End Get
|
||||
Set
|
||||
m_cveEstatus = Value
|
||||
End Set
|
||||
End Property
|
||||
Private m_cveEstatus As Integer
|
||||
Public Property geoInicio() As String
|
||||
Get
|
||||
Return m_geoInicio
|
||||
End Get
|
||||
Set
|
||||
m_geoInicio = Value
|
||||
End Set
|
||||
End Property
|
||||
Private m_geoInicio As String
|
||||
Public Property geoFin() As String
|
||||
Get
|
||||
Return m_geoFin
|
||||
End Get
|
||||
Set
|
||||
m_geoFin = Value
|
||||
End Set
|
||||
End Property
|
||||
Private m_geoFin As String
|
||||
Public Property lat() As String
|
||||
Get
|
||||
Return m_lat
|
||||
End Get
|
||||
Set
|
||||
m_lat = Value
|
||||
End Set
|
||||
End Property
|
||||
Private m_lat As String
|
||||
Public Property lon() As String
|
||||
Get
|
||||
Return m_lon
|
||||
End Get
|
||||
Set
|
||||
m_lon = Value
|
||||
End Set
|
||||
End Property
|
||||
Private m_lon As String
|
||||
End Class
|
||||
End Class
|
||||
@@ -434,7 +434,7 @@ Namespace Extensiones
|
||||
Return retorno
|
||||
End Function
|
||||
<Runtime.CompilerServices.Extension()>
|
||||
Public Function FilesMove(oldName As String, newName As String, newDirectorio As String) As Boolean
|
||||
Public Function FilesMove(oldName As String, newName As String, newDirectorio As String, Optional Sobreescribir As Boolean = False) As Boolean
|
||||
Dim retorno As Boolean = True
|
||||
Dim directorioOld As New StringBuilder
|
||||
Dim directorioNew As New StringBuilder
|
||||
@@ -451,7 +451,7 @@ Namespace Extensiones
|
||||
|
||||
directorioNew.Append(newName)
|
||||
Try
|
||||
My.Computer.FileSystem.MoveFile(directorioOld.ToString, directorioNew.ToString)
|
||||
My.Computer.FileSystem.MoveFile(directorioOld.ToString, directorioNew.ToString, Sobreescribir)
|
||||
Catch ex As Exception
|
||||
Alert("", String.Format("{0} code[FilesMove]", ex.Message), TipoMensaje.MsgAdvertencia)
|
||||
retorno = False
|
||||
@@ -3100,6 +3100,31 @@ Namespace Extensiones
|
||||
Dim origin As DateTime = New DateTime(1970, 1, 1, 0, 0, 0, 0)
|
||||
Return origin.AddSeconds(timestamp)
|
||||
End Function
|
||||
<Runtime.CompilerServices.Extension()>
|
||||
Public Function GetLastWeekdayOfMonth(ByVal fecha As DateTime, day As DayOfWeek) As DateTime
|
||||
Dim lastDayOfMonth As DateTime = New DateTime(fecha.Year, fecha.Month, 1).AddMonths(1).AddDays(-1)
|
||||
Dim wantedDay As Integer = CInt(day)
|
||||
Dim lastDay As Integer = CInt(lastDayOfMonth.DayOfWeek)
|
||||
Return lastDayOfMonth.AddDays(If(lastDay >= wantedDay, wantedDay - lastDay, wantedDay - lastDay - 7))
|
||||
End Function
|
||||
<Runtime.CompilerServices.Extension()>
|
||||
Public Function GetFirstWeekdayOfMonth(ByVal fecha As DateTime, day As DayOfWeek) As DateTime
|
||||
Dim result As DateTime = New DateTime(fecha.Year, fecha.Month, 1)
|
||||
|
||||
While result.DayOfWeek <> day
|
||||
result = result.AddDays(1)
|
||||
End While
|
||||
|
||||
Return result
|
||||
End Function
|
||||
<Runtime.CompilerServices.Extension()>
|
||||
Public Function EsHorarioVerano(ByVal fecha As DateTime) As Boolean
|
||||
Dim Year As Integer = fecha.Year
|
||||
Dim FechaI As DateTime = New DateTime(Year, 4, 1, 0, 0, 0).GetFirstWeekdayOfMonth(DayOfWeek.Sunday) 'PRIMER DOMINGO DE ABRIL
|
||||
Dim FechaF As DateTime = New DateTime(Year, 10, 1, 23, 59, 59).GetLastWeekdayOfMonth(DayOfWeek.Sunday) 'ULTIMO DOMINGO DE OCTUBRE
|
||||
|
||||
Return fecha >= FechaI AndAlso fecha <= FechaF
|
||||
End Function
|
||||
End Module
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -416,7 +416,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", ""))
|
||||
Timbre.Comprobante.Folio = Obj.Folio.ToString
|
||||
Timbre.Comprobante.Serie = Obj.Serie
|
||||
Timbre.Comprobante.Fecha = Obj.Fecha
|
||||
Timbre.Comprobante.Fecha = Obj.FechaCP
|
||||
Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
|
||||
Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
|
||||
Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
|
||||
|
||||
@@ -4884,7 +4884,7 @@ Partial Class Bancos_IE
|
||||
|
||||
GvComplementoPagos.DataSource = ObjBancos.DtResultados
|
||||
|
||||
If ObjBancos.DtResultados.FiltraParametros(" Estatus IN (1,3) ").Rows.Count = 0 And Tipo.ToUpper = "CARGO" And CveCliente > 0 And UsuarioActual.CveRol = 1 And CveEstatusIE <> 2 Then
|
||||
If ObjBancos.DtResultados.FiltraParametros(" Estatus IN (1,3) ").Rows.Count = 0 And Tipo.ToUpper = "CARGO" And CveCliente > 0 And CveEstatusIE <> 2 Then
|
||||
DVGenerarComplementoModal.Visible = True
|
||||
End If
|
||||
Else
|
||||
|
||||
@@ -668,7 +668,7 @@ Partial Class Contratos_FacturacionMasiva
|
||||
Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", ""))
|
||||
Timbre.Comprobante.Folio = Obj.Folio.ToString
|
||||
Timbre.Comprobante.Serie = Obj.Serie
|
||||
Timbre.Comprobante.Fecha = Obj.Fecha
|
||||
Timbre.Comprobante.Fecha = Obj.FechaCP
|
||||
Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
|
||||
Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
|
||||
Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
|
||||
|
||||
@@ -61,7 +61,7 @@ Partial Class Inventarios_RepAlmacen
|
||||
Dim CveSubProyecto As Integer = DdlSucursal.SelectedValue.ToEntero()
|
||||
|
||||
If objInv.GetRepAlmacenes(FechaI, FechaF, UsuarioActual.CveEmpresa, TipoAlmacen, DdlModalidadFiltro.SelectedValue.ToEntero, ChkInventariable.Checked,
|
||||
Almacenes:=Almacenes, CveSubProyecto:=CveSubProyecto) Then
|
||||
Almacenes:=Almacenes, CveSubProyecto:=CveSubProyecto, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
|
||||
GVAlmacen.DataSource = objInv.DtResultados
|
||||
TmpDT = objInv.DtResultados
|
||||
End If
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
border: none;
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
#chartdiv {
|
||||
width: 100%;
|
||||
height: 800px;
|
||||
@@ -70,12 +71,11 @@
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="portlet solid grey-cascade portlet-filter" style="" id="filtros">
|
||||
<div class="portlet-title portlet-filterT smalltitle" style="">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" OnClick="BtnConsultar_Click" class="btn btn-primary" />
|
||||
<a href="javascript;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
|
||||
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
@@ -102,8 +102,25 @@
|
||||
<asp:ListItem Text="No Contable" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<asp:CheckBox ID="ChkInventariable" CssClass="md-checksd" runat="server" Text="Aplica Inventario" />
|
||||
</div>
|
||||
<div class="col-md-1 truncate v-center" style="text-align: right!important">Almacen:</div>
|
||||
<div class="col-md-3 v-center">
|
||||
<asp:ListBox ID="DdlAlmacen" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" DataTextField="Almacen" DataValueField="CveAlmacen" Style="width: 100%;" runat="server"></asp:ListBox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none;">
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate" style="text-align: right!important">Sucursal:</div>
|
||||
<div class="col-md-3">
|
||||
<asp:DropDownList ID="DdlSucursal" runat="server" CssClass="input-small input-sm select2me" Width="100%" DataTextField="SubProyecto" DataValueField="CveSubProyecto">
|
||||
<asp:ListItem Text="Todas" Value="-1" Selected="True"> </asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="cold-md-8"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -39,6 +39,15 @@ Partial Class Inventarios_RepAlmacenPeriodo
|
||||
DdlTipoAlmacen.DataSource = GlobalDTTipoAlmacen(1)
|
||||
DdlTipoAlmacen.DataBind()
|
||||
DdlTipoAlmacen.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
DdlAlmacen.DataBind()
|
||||
DdlAlmacen.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
DdlSucursal.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, CveEstatus:=1)
|
||||
DdlSucursal.DataBind()
|
||||
DdlSucursal.Items.Insert(0, New ListItem("Todas", "-1"))
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
@@ -46,11 +55,14 @@ Partial Class Inventarios_RepAlmacenPeriodo
|
||||
Dim FechaCorte As Date
|
||||
FechaCorte = If(IsDate(TxtFechaCorte.Text.Trim()), TxtFechaCorte.Text.ToDate, MaxFecha)
|
||||
Dim TipoAlmacen As String = If(DdlTipoAlmacen.GetSelectedValuesM = "", "-1", DdlTipoAlmacen.GetSelectedValuesM)
|
||||
Dim Almacenes As String = If(DdlAlmacen.GetSelectedValuesM = "", "-1", DdlAlmacen.GetSelectedValuesM)
|
||||
Dim CveSubProyecto As Integer = DdlSucursal.SelectedValue.ToEntero()
|
||||
|
||||
If RblTotal.Checked Then Ver = 1
|
||||
If RblExistencia.Checked Then Ver = 2
|
||||
|
||||
If objInv.GetRepAlmacenesPeriodo(FechaCorte, UsuarioActual.CveEmpresa, TipoAlmacen, DdlModalidadFiltro.SelectedValue.ToEntero, ChkInventariable.Checked, Ver) Then
|
||||
If objInv.GetRepAlmacenesPeriodo(FechaCorte, UsuarioActual.CveEmpresa, TipoAlmacen, DdlModalidadFiltro.SelectedValue.ToEntero, ChkInventariable.Checked, Ver,
|
||||
Almacenes:=Almacenes, CveSubProyecto:=CveSubProyecto, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
|
||||
GVAlmacen.DataSource = objInv.DtResultados
|
||||
TmpDT = objInv.DtResultados
|
||||
End If
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -13,26 +13,16 @@
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<table style="width: 797px!important">
|
||||
<tr>
|
||||
<th class="Titulos" colspan="4">Carga de Cotizaciones</th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
|
||||
<div class="row" style="vertical-align: top">
|
||||
|
||||
<div class="col-sm-6">
|
||||
<div class="row">
|
||||
|
||||
<%--PROVEEDORES--%>
|
||||
<div class="col-sm-12 rowpadding">
|
||||
<div class="col-sm-6 rowpadding">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="portlet light smmallpadding bordered">
|
||||
|
||||
<div class="portlet-title">
|
||||
@@ -78,36 +68,32 @@
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%--ARCHIVO--%>
|
||||
<div class="col-sm-12 rowpadding" style="text-align:center;">
|
||||
Archivo:
|
||||
<asp:HyperLink ID="HplArchivo" runat="server" ToolTip="Descargar" Visible="false" Height="20px">[HplArchivo]</asp:HyperLink>
|
||||
|
||||
<div class="btn-file btn green">
|
||||
<i class="fa fa-plus"></i>
|
||||
<span>Seleccionar Archivo</span>
|
||||
<asp:FileUpload ID="FUArchivo" runat="server" onchange="$('#FUTxtt').text(this.value);" />
|
||||
</div>
|
||||
<span id="FUTxtt"></span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%--DATOS DE COTIZACION--%>
|
||||
<div class="col-sm-6 rowpadding">
|
||||
|
||||
<div class="portlet light smmallpadding bordered">
|
||||
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-file"></i><span class="caption-subject bold uppercase">Archivo</span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<div style="display: inline-block">
|
||||
<asp:LinkButton ID="LnkArchivo" Visible="false" runat="server" OnClick="LnkArchivo_Click" Text="<i class='fa fa-download' aria-hidden='true'></i> Descargar"></asp:LinkButton>
|
||||
</div>
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<asp:TextBox ID="TxtArchivo" CssClass="ADSdropzone hidden" data-maxFile="1" Text="" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkArchivo" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="col-sm-6 rowpadding">
|
||||
<div class="portlet light smmallpadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-money"></i><span class="caption-subject bold uppercase">Datos contización</span>
|
||||
@@ -118,10 +104,7 @@
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="portlet-body">
|
||||
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
@@ -185,11 +168,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<hr />
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<asp:GridView ID="GvDC" runat="server" AutoGenerateColumns="False" DataKeyNames="CveOrdenCompra, CvePS, Cantidad, CveUnidadMedida,CveOrdenCompraDetalle"
|
||||
@@ -301,20 +283,15 @@
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="text-align: center">
|
||||
<asp:Button ID="BtnGuardar" runat="server" Text="Guardar" Visible="false" ValidationGroup="GrpEditGuardar" class="btn btn-primary" CausesValidation="true" />
|
||||
<asp:Button ID="BtnEliminar" runat="server" Text="Eliminar" Visible="false" ValidationGroup="GrpEliminar" CssClass="btn btn-danger" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
Option Explicit On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Net
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class PopOCCotizacionesDetalle
|
||||
@@ -44,6 +45,15 @@ Partial Class PopOCCotizacionesDetalle
|
||||
ViewState("DtDetalle") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property Adjunto As String
|
||||
Get
|
||||
Adjunto = ViewState("Adjunto").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("Adjunto") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -129,11 +139,10 @@ Partial Class PopOCCotizacionesDetalle
|
||||
TxtFecha.Text = objCotizacion.Fecha.ToShortDateString
|
||||
ddlMoneda.SelectedValue = objCotizacion.CveMoneda.ToString
|
||||
TxtDiasCredito.Text = objCotizacion.DiasCredito.ToString
|
||||
|
||||
Adjunto = objCotizacion.Adjunto
|
||||
If objCotizacion.Adjunto <> "" Then
|
||||
HplArchivo.NavigateUrl = String.Format("/Empresas/{0}/Cotizaciones/{1}", UsuarioActual.CveEmpresa, objCotizacion.Adjunto)
|
||||
HplArchivo.Text = String.Format("<img targer='_blank' src='/Imagenes/{0}.png' border='0' width='18px' alt='Descargar'/>", IO.Path.GetExtension(objCotizacion.Adjunto).Replace("."c, "")) 'ImageUrl = String.Format("/Imagenes/{0}.png", IO.Path.GetExtension(Cot.NombreArchivo).Replace("."c, ""))
|
||||
HplArchivo.Visible = True
|
||||
'HplArchivo.NavigateUrl = String.Format("/Empresas/{0}/Cotizaciones/{1}", UsuarioActual.CveEmpresa, objCotizacion.Adjunto)
|
||||
LnkArchivo.Visible = True
|
||||
End If
|
||||
|
||||
If objCotizacion.GetCotizacionesDetalle(pCveCotizacion) Then
|
||||
@@ -155,7 +164,7 @@ Partial Class PopOCCotizacionesDetalle
|
||||
TxtDiasCredito.Enabled = False
|
||||
TxtFecha.Enabled = False
|
||||
TxtFolio.Enabled = False
|
||||
FUArchivo.Enabled = False
|
||||
'FUArchivo.Enabled = False
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(146) Then
|
||||
GvDC.Enabled = True
|
||||
@@ -175,50 +184,60 @@ Partial Class PopOCCotizacionesDetalle
|
||||
objCotizacion.IniciaTransacSQL()
|
||||
Dim TieneError = False
|
||||
|
||||
Dim FileExtension As String = ""
|
||||
Dim Filesgral As List(Of Archivo) = TxtArchivo.getfiles().Archivos
|
||||
Dim Filename As String = ""
|
||||
For Each fileItem As Archivo In Filesgral
|
||||
FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)) '.Replace(".", "")
|
||||
Filename = fileItem.filename
|
||||
Next
|
||||
|
||||
|
||||
Try
|
||||
If EsNuevo Then
|
||||
If objCotizacion.AddCotizacion(CveOrdenCompra, CboProveedores.SelectedValue.ToEntero, -1, TxtFolio.Text, TxtFecha.Text, IO.Path.GetExtension(FUArchivo.FileName), ddlMoneda.SelectedValue.ToEntero, TxtDiasCredito.Text.ToEntero, UsuarioActual.CveUsuario) Then
|
||||
If FUArchivo.HasFile Then
|
||||
If objCotizacion.AddCotizacion(CveOrdenCompra, CboProveedores.SelectedValue.ToEntero, -1, TxtFolio.Text, TxtFecha.Text, FileExtension, ddlMoneda.SelectedValue.ToEntero,
|
||||
TxtDiasCredito.Text.ToEntero, UsuarioActual.CveUsuario) Then
|
||||
|
||||
'verificar que exista el directorio
|
||||
If Not System.IO.Directory.Exists(String.Format("{0}/Empresas/{1}/Cotizaciones/", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa)) Then
|
||||
System.IO.Directory.CreateDirectory(String.Format("{0}/Empresas/{1}/Cotizaciones/", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa))
|
||||
End If
|
||||
FUArchivo.SaveAs(String.Format("{0}/Empresas/{1}/Cotizaciones/{2}{3}", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa, objCotizacion.CveCotizacion, IO.Path.GetExtension(FUArchivo.FileName)))
|
||||
|
||||
If Filename <> "" Then
|
||||
Filename.FilesMove(objCotizacion.CveCotizacion.ToString(), String.Format("Empresas\{0}\Cotizaciones", UsuarioActual.CveEmpresa))
|
||||
End If
|
||||
|
||||
For Each dr As GridViewRow In GvDC.Rows
|
||||
TieneError = Not objCotizacion.AddCotizacionDetalle(objCotizacion.CveCotizacion, dr.DataKey("CvePS").ToEntero, dr.FCTextBox("TxtPU").Text.ToDouble, dr.DataKey("Cantidad").ToDouble, dr.DataKey("CveUnidadMedida").ToEntero, dr.FCTextBox("txtCantidadSurtir").Text.ToDouble, If(dr.FCTextBox("txtFechaEntrega").Text.Trim = "" Or dr.FCTextBox("txtFechaEntrega").Text = "__/__/____", "-1", dr.FCTextBox("txtFechaEntrega").Text), dr.FCTextBox("txtObservacion").Text.ToString, dr.DataKey("CveOrdenCompraDetalle").ToString.ToEntero)
|
||||
TieneError = Not objCotizacion.AddCotizacionDetalle(objCotizacion.CveCotizacion, dr.DataKey("CvePS").ToEntero, dr.FCTextBox("TxtPU").Text.ToDouble, dr.DataKey("Cantidad").ToDouble,
|
||||
dr.DataKey("CveUnidadMedida").ToEntero, dr.FCTextBox("txtCantidadSurtir").Text.ToDouble,
|
||||
If(dr.FCTextBox("txtFechaEntrega").Text.Trim = "" Or dr.FCTextBox("txtFechaEntrega").Text = "__/__/____", "-1",
|
||||
dr.FCTextBox("txtFechaEntrega").Text), dr.FCTextBox("txtObservacion").Text.ToString, dr.DataKey("CveOrdenCompraDetalle").ToString.ToEntero)
|
||||
If TieneError = True Then Exit For
|
||||
Next
|
||||
End If
|
||||
Else
|
||||
|
||||
Dim NombreArchivo As String = ""
|
||||
If objCotizacion.UpdateCotizacion(CboProveedores.SelectedValue.ToEntero, -1, TxtFolio.Text, TxtFecha.Text, FileExtension, ddlMoneda.SelectedValue.ToEntero, TxtDiasCredito.Text.ToEntero, UsuarioActual.CveUsuario, CveCotizacion) Then
|
||||
|
||||
If objCotizacion.UpdateCotizacion(CboProveedores.SelectedValue.ToEntero, -1, TxtFolio.Text, TxtFecha.Text, IO.Path.GetExtension(FUArchivo.FileName), ddlMoneda.SelectedValue.ToEntero, TxtDiasCredito.Text.ToEntero, UsuarioActual.CveUsuario, CveCotizacion) Then
|
||||
|
||||
If FUArchivo.HasFile Then
|
||||
'verificar que exista el directorio
|
||||
If Not System.IO.Directory.Exists(String.Format("{0}/Empresas/{1}/Cotizaciones/", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa)) Then
|
||||
System.IO.Directory.CreateDirectory(String.Format("{0}/Empresas/{1}/Cotizaciones/", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa))
|
||||
End If
|
||||
FUArchivo.SaveAs(String.Format("{0}/Empresas/{1}/Cotizaciones/{2}{3}", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa, CveCotizacion, IO.Path.GetExtension(FUArchivo.FileName)))
|
||||
NombreArchivo = CveCotizacion & IO.Path.GetExtension(FUArchivo.FileName)
|
||||
|
||||
If Filename <> "" Then
|
||||
Filename.FilesMove(CveCotizacion.ToString(), String.Format("Empresas\{0}\Cotizaciones", UsuarioActual.CveEmpresa))
|
||||
End If
|
||||
|
||||
For Each dr As GridViewRow In GvDC.Rows
|
||||
If dr.DataKey("CveCotizacionDetalle").ToEntero > 0 Then
|
||||
TieneError = Not objCotizacion.UpdateCotizacionDetalle(dr.DataKey("CveCotizacionDetalle").ToEntero, dr.FCTextBox("TxtPU").Text.ToDouble, dr.FCTextBox("txtCantidadSurtir").Text.ToDouble, dr.FCTextBox("txtFechaEntrega").Text, dr.FCTextBox("txtObservacion").Text.ToString)
|
||||
Else
|
||||
|
||||
Dim strTemp = dr.DataKey("CveOrdenCompraDetalle").ToString
|
||||
|
||||
If dr.FCTextBox("txtCantidadSurtir").Text.ToString.ToDouble > 0 Then
|
||||
If dr.FCTextBox("TxtPU").Text.ToDouble > 0 Then TieneError = Not objCotizacion.AddCotizacionDetalle(CveCotizacion, dr.DataKey("CvePS").ToEntero, dr.FCTextBox("TxtPU").Text.ToDouble, dr.DataKey("Cantidad").ToDouble, dr.DataKey("CveUnidadMedida").ToEntero, dr.FCTextBox("txtCantidadSurtir").Text.ToString.ToDouble, If(dr.FCTextBox("txtFechaEntrega").Text.Trim = "" Or dr.FCTextBox("txtFechaEntrega").Text = "__/__/____", "-1", dr.FCTextBox("txtFechaEntrega").Text), dr.FCTextBox("txtObservacion").Text.ToString, dr.DataKey("CveOrdenCompraDetalle").ToEntero)
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
If TieneError = True Then Exit For
|
||||
Next
|
||||
@@ -229,27 +248,14 @@ Partial Class PopOCCotizacionesDetalle
|
||||
End If
|
||||
Catch ex As Exception
|
||||
TieneError = True
|
||||
objCotizacion.RollBack()
|
||||
OnError("Se presento un error al guardar la cotización", ex)
|
||||
|
||||
End Try
|
||||
|
||||
|
||||
|
||||
If Not TieneError Then
|
||||
|
||||
objCotizacion.Commit()
|
||||
Alert(If(EsNuevo, "Cotización Guardada.", "Cotización Actualizada."), TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Try
|
||||
objCotizacion.RollBack()
|
||||
Catch ex As Exception
|
||||
OnError("Error al intetar hace RollBack", ex)
|
||||
End Try
|
||||
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
objCotizacion.Dispose()
|
||||
@@ -371,4 +377,24 @@ Partial Class PopOCCotizacionesDetalle
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub LnkArchivo_Click(sender As Object, e As EventArgs)
|
||||
If Not String.IsNullOrEmpty(Adjunto) Then
|
||||
Dim filePath As String = String.Format("{0}{1}", UsuarioActual.Empresa.Ruta, "Cotizaciones\" & Adjunto)
|
||||
Dim Archivo As New System.IO.FileInfo(filePath)
|
||||
|
||||
If Archivo.Exists Then
|
||||
HttpContext.Current.Response.Clear()
|
||||
HttpContext.Current.Response.ClearContent()
|
||||
HttpContext.Current.Response.ContentType = "application/octet-stream"
|
||||
HttpContext.Current.Response.AppendHeader("Content-disposition", "attachment; filename=" + System.IO.Path.GetFileName(filePath))
|
||||
HttpContext.Current.Response.AddHeader("Content-Length", Archivo.Length.ToString())
|
||||
HttpContext.Current.Response.TransmitFile(filePath)
|
||||
HttpContext.Current.Response.Flush()
|
||||
HttpContext.Current.Response.End()
|
||||
|
||||
Archivo = Nothing
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -495,7 +495,7 @@
|
||||
if (this.checked) {
|
||||
total = total + 1;
|
||||
}
|
||||
if (total == 5) {
|
||||
if (total == 7) {
|
||||
alert("Ya tiene el maximo numero de comandos favoritos para asignar.");
|
||||
this.checked = false;
|
||||
return false;
|
||||
@@ -513,9 +513,22 @@
|
||||
}
|
||||
for (let i = thantes; i < thclick; i++) {
|
||||
let th = $('<th></th>');
|
||||
let input = $('<input type="checkbox" class="chkAll">')
|
||||
let input = $('<input type="checkbox" class="chkAll" onclick="verficaFavoritos();">')
|
||||
th.append(input);
|
||||
var total = 0;
|
||||
input.click(function () {
|
||||
var total = 0;
|
||||
$(".ChecaFavoritos > input").each(function () {
|
||||
|
||||
if (this.checked) {
|
||||
total = total + 1;
|
||||
}
|
||||
if (total == 7) {
|
||||
alert("Ya tiene el maximo numero de comandos favoritos para asignar.");
|
||||
this.checked = false;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
$('#' + gv + ' tr td:nth-child(' + i + ') input[type="checkbox"]:not([disabled="disabled"])').prop("checked", input.is(":checked"))
|
||||
});
|
||||
tr.append(th);
|
||||
|
||||
@@ -9409,7 +9409,7 @@ Partial Class Clientes
|
||||
Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", ""))
|
||||
Timbre.Comprobante.Folio = Obj.Folio.ToString
|
||||
Timbre.Comprobante.Serie = Obj.Serie
|
||||
Timbre.Comprobante.Fecha = Obj.Fecha
|
||||
Timbre.Comprobante.Fecha = Obj.FechaCP
|
||||
Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
|
||||
Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
|
||||
Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
|
||||
|
||||
@@ -8354,7 +8354,7 @@ Partial Class Ventas
|
||||
Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", ""))
|
||||
Timbre.Comprobante.Folio = Obj.Folio.ToString
|
||||
Timbre.Comprobante.Serie = Obj.Serie
|
||||
Timbre.Comprobante.Fecha = Obj.Fecha
|
||||
Timbre.Comprobante.Fecha = Obj.FechaCP
|
||||
Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
|
||||
Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
|
||||
Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
|
||||
|
||||
@@ -803,7 +803,7 @@ Public Class WSApp
|
||||
Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", ""))
|
||||
Timbre.Comprobante.Folio = Obj.Folio.ToString
|
||||
Timbre.Comprobante.Serie = Obj.Serie
|
||||
Timbre.Comprobante.Fecha = Obj.Fecha
|
||||
Timbre.Comprobante.Fecha = Obj.FechaCP
|
||||
Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
|
||||
Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
|
||||
Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
|
||||
|
||||
@@ -2142,7 +2142,7 @@ Public Class WSSIGApp
|
||||
Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", ""))
|
||||
Timbre.Comprobante.Folio = Obj.Folio.ToString
|
||||
Timbre.Comprobante.Serie = Obj.Serie
|
||||
Timbre.Comprobante.Fecha = Obj.Fecha
|
||||
Timbre.Comprobante.Fecha = Obj.FechaCP
|
||||
Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
|
||||
Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
|
||||
Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
|
||||
|
||||
@@ -1 +1,302 @@
|
||||
<%@ WebService Language="VB" CodeBehind="~/App_Code/WsTSoft.vb" Class="WsTSoft" %>
|
||||
<%@ WebService Language="VB" Class="WsTSoft" %>
|
||||
Imports System.Web
|
||||
Imports System.Net.Http
|
||||
Imports System.Web.Services
|
||||
Imports System.Data
|
||||
Imports System.Web.Services.Protocols
|
||||
Imports System.Collections.Generic
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
Imports Newtonsoft.Json
|
||||
Imports Newtonsoft.Json.Linq
|
||||
|
||||
' To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
|
||||
' <System.Web.Script.Services.ScriptService()> _
|
||||
<WebService(Namespace:="http://TractoSoft.org/")>
|
||||
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)>
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
|
||||
Public Class WsTSoft
|
||||
Inherits System.Web.Services.WebService
|
||||
|
||||
<WebMethod()>
|
||||
Public Function AddRemision(FolioRemision As String, NoEconomico As String, CveEstatus As Integer, GeoInicial As String, GeoCarga As String, GeoEntrega As String, Fecha As String) As String
|
||||
Dim retorno As String = ""
|
||||
Dim objTsoft As New ClsTSoft
|
||||
objTsoft.IniciaTransacSQL()
|
||||
Dim Continuar As Boolean = objTsoft.AddRemisiones(FolioRemision, NoEconomico, CveEstatus, GeoInicial, GeoCarga, GeoEntrega, Fecha)
|
||||
Dim objRem As New addRemisionObj
|
||||
If Continuar Then
|
||||
objTsoft.Commit()
|
||||
objRem.CveRemision = objTsoft.DtResultados.Rows(0)("CveRemision").ToString().ToEntero()
|
||||
objRem.CurrentError = ""
|
||||
Else
|
||||
objTsoft.RollBack()
|
||||
objRem.CveRemision = 0
|
||||
objRem.CurrentError = objTsoft.MyCurrentError
|
||||
End If
|
||||
objTsoft.Dispose()
|
||||
retorno = JsonConvert.SerializeObject(objRem)
|
||||
Return retorno.ToString
|
||||
End Function
|
||||
|
||||
<WebMethod()>
|
||||
Public Function UpEstatusRemision(FolioRemision As String, CveEstatus As String) As String
|
||||
Dim retorno As String = ""
|
||||
Dim objTsoft As New ClsTSoft
|
||||
Dim Continuar As Boolean = objTsoft.UpEstatusRemision(FolioRemision, CveEstatus)
|
||||
Dim objRem As New upEstatusRemisionObj
|
||||
If Continuar Then
|
||||
objRem.SeActualizo = 1
|
||||
objRem.CurrentError = ""
|
||||
Else
|
||||
objRem.SeActualizo = 0
|
||||
objRem.CurrentError = objTsoft.MyCurrentError
|
||||
End If
|
||||
objTsoft.Dispose()
|
||||
retorno = JsonConvert.SerializeObject(objRem)
|
||||
Return retorno.ToString
|
||||
End Function
|
||||
<WebMethod()>
|
||||
Public Function GetUltimaPosicion(DevID As String) As String
|
||||
Dim retorno As String = ""
|
||||
Dim ObjGPS As New ClsGPS
|
||||
Dim Continuar As Boolean = ObjGPS.UltimaPosicionEquipoGetWS(DevID)
|
||||
Dim ObjPos As New LatLng
|
||||
If Continuar Then
|
||||
ObjPos.Lat = ObjGPS.DtResultados.Rows("0")("Lat").ToString
|
||||
ObjPos.Lng = ObjGPS.DtResultados.Rows("0")("Lng").ToString
|
||||
Else
|
||||
ObjPos.CurrentError = "No se pudo obtener la posición."
|
||||
End If
|
||||
ObjGPS.Dispose()
|
||||
retorno = JsonConvert.SerializeObject(ObjPos)
|
||||
Return retorno.ToString
|
||||
End Function
|
||||
<WebMethod()>
|
||||
Public Function TerminoRemision(FolioRemision As String, NoEconomico As String) As String
|
||||
Dim retorno As String = ""
|
||||
Dim objTsoft As New ClsTSoft
|
||||
Dim Continuar As Boolean = objTsoft.UpEstatusRemision(FolioRemision, 6)
|
||||
Dim objRem As New upEstatusRemisionObj
|
||||
If Continuar Then
|
||||
objRem.SeActualizo = 1
|
||||
objRem.CurrentError = ""
|
||||
Else
|
||||
objRem.SeActualizo = 0
|
||||
objRem.CurrentError = objTsoft.MyCurrentError
|
||||
End If
|
||||
objTsoft.Dispose()
|
||||
retorno = JsonConvert.SerializeObject(objRem)
|
||||
Return retorno.ToString
|
||||
End Function
|
||||
<WebMethod()>
|
||||
Public Function GetRemisionHistorial(FolioRemision As String, NoEconomico As String) As String
|
||||
Dim retorno As String = ""
|
||||
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)
|
||||
objRem.CurrentError = ""
|
||||
Else
|
||||
objRem.Historial = New List(Of GetRemisionHistorialsObj)
|
||||
objRem.CurrentError = objTsoft.MyCurrentError
|
||||
End If
|
||||
objTsoft.Dispose()
|
||||
retorno = JsonConvert.SerializeObject(objRem)
|
||||
Return retorno.ToString
|
||||
End Function
|
||||
<WebMethod()>
|
||||
Public Function GetInfoEventos(FechaInicio As String, FechaFin As String) As String
|
||||
Dim retorno As String = "[]"
|
||||
|
||||
Dim objTsoft As New ClsTSoft
|
||||
If objTsoft.GetInfoEventosPenske(FechaInicio.ToDateTime(), FechaFin.ToDateTime()) Then
|
||||
If objTsoft.DtResultados.Rows.Count > 0 Then
|
||||
'CONSULTA DIRECCIONES
|
||||
Dim Direcciones As JArray = ConsultarDirecciones(objTsoft.DtResultados)
|
||||
For Each Dir As JObject In Direcciones
|
||||
objTsoft.DtResultados.Rows(Dir("Indice").ToEntero())("Direccion") = Dir("Direccion").ToString()
|
||||
Next
|
||||
|
||||
retorno = objTsoft.DtResultados.DataTableToJSONIPP()
|
||||
Else
|
||||
retorno = Newtonsoft.Json.JsonConvert.SerializeObject(New With {.Mensaje = "No se encontraron resultados"})
|
||||
End If
|
||||
Else
|
||||
retorno = Newtonsoft.Json.JsonConvert.SerializeObject(New With {.Mensaje = "Ocurrío un error al consultar los datos"})
|
||||
End If
|
||||
objTsoft.Dispose()
|
||||
|
||||
Return retorno.ToString
|
||||
End Function
|
||||
<WebMethod()>
|
||||
Public Function TieneRemisionesActivas(NoEconomico As String) As String
|
||||
Dim retorno As String = ""
|
||||
Dim Continuar As Boolean = False
|
||||
|
||||
Dim ObjTSoft As New ClsTSoft
|
||||
Continuar = ObjTSoft.TieneRemisionesActivas(NoEconomico)
|
||||
|
||||
Dim objRem As New MTieneRemisiones With
|
||||
{
|
||||
.TieneRemisiones = Continuar,
|
||||
.CurrentError = ObjTSoft.MyCurrentError
|
||||
}
|
||||
ObjTSoft.Dispose()
|
||||
retorno = JsonConvert.SerializeObject(objRem)
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ConsultarDirecciones(Dt As DataTable) 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)
|
||||
))
|
||||
|
||||
Dim Base64array = Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(posicionesArray.ToString()))
|
||||
|
||||
Using wc As New HttpClient()
|
||||
Try
|
||||
Dim Url = New Uri($"{ClsPaginas.UrlDirecciones}nominatim/reverseMultiple.php")
|
||||
Dim FormStuff = String.Format("formato=json&posiciones={0}", Base64array)
|
||||
Dim content = New StringContent(FormStuff, Encoding.UTF8, "application/x-www-form-urlencoded")
|
||||
Dim response = wc.PostAsync(Url, content).Result
|
||||
Dim result = response.Content.ReadAsStringAsync().Result
|
||||
retorno = JArray.Parse(result)
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener las direcciones", ex)
|
||||
End Try
|
||||
End Using
|
||||
Return retorno
|
||||
End Function
|
||||
<Serializable>
|
||||
Public Class addRemisionObj
|
||||
Public CveRemision As Integer
|
||||
Public CurrentError As String
|
||||
End Class
|
||||
<Serializable>
|
||||
Public Class upEstatusRemisionObj
|
||||
Public SeActualizo As Integer
|
||||
Public CurrentError As String
|
||||
End Class
|
||||
<Serializable>
|
||||
Public Class MTieneRemisiones
|
||||
Public TieneRemisiones As Boolean
|
||||
Public CurrentError As String
|
||||
End Class
|
||||
<Serializable>
|
||||
Public Class LatLng
|
||||
Public Lat As String
|
||||
Public Lng As String
|
||||
Public CurrentError As String
|
||||
End Class
|
||||
<Serializable>
|
||||
Public Class GetRemisionHistorialsObj
|
||||
Public Property Fecha As DateTime
|
||||
Public Property FolioRemision As String
|
||||
Public Property NoEconomico As String
|
||||
Public Property Lat As String
|
||||
Public Property Lon As String
|
||||
Public Property Distancia As String
|
||||
Public Property TrackingNumber As String
|
||||
Public Property CveEstatus As Integer
|
||||
End Class
|
||||
<Serializable>
|
||||
Public Class GetRemisionHistorialesObj
|
||||
Public Historial As List(Of GetRemisionHistorialsObj)
|
||||
Public CurrentError As String
|
||||
End Class
|
||||
|
||||
<Serializable>
|
||||
Public Class ObjRemisiones
|
||||
|
||||
Public Property cveRemisiones() As Integer
|
||||
Get
|
||||
Return m_cveRemisiones
|
||||
End Get
|
||||
Set
|
||||
m_cveRemisiones = Value
|
||||
End Set
|
||||
End Property
|
||||
Private m_cveRemisiones As Integer
|
||||
Public Property folioRemision() As String
|
||||
Get
|
||||
Return m_folioRemision
|
||||
End Get
|
||||
Set
|
||||
m_folioRemision = Value
|
||||
End Set
|
||||
End Property
|
||||
Private m_folioRemision As String
|
||||
Public Property cveDispositivo() As Integer
|
||||
Get
|
||||
Return m_cveDispositivo
|
||||
End Get
|
||||
Set
|
||||
m_cveDispositivo = Value
|
||||
End Set
|
||||
End Property
|
||||
Private m_cveDispositivo As Integer
|
||||
Public Property iMEI() As String
|
||||
Get
|
||||
Return m_iMEI
|
||||
End Get
|
||||
Set
|
||||
m_iMEI = Value
|
||||
End Set
|
||||
End Property
|
||||
Private m_iMEI As String
|
||||
Public Property cveEstatus() As Integer
|
||||
Get
|
||||
Return m_cveEstatus
|
||||
End Get
|
||||
Set
|
||||
m_cveEstatus = Value
|
||||
End Set
|
||||
End Property
|
||||
Private m_cveEstatus As Integer
|
||||
Public Property geoInicio() As String
|
||||
Get
|
||||
Return m_geoInicio
|
||||
End Get
|
||||
Set
|
||||
m_geoInicio = Value
|
||||
End Set
|
||||
End Property
|
||||
Private m_geoInicio As String
|
||||
Public Property geoFin() As String
|
||||
Get
|
||||
Return m_geoFin
|
||||
End Get
|
||||
Set
|
||||
m_geoFin = Value
|
||||
End Set
|
||||
End Property
|
||||
Private m_geoFin As String
|
||||
Public Property lat() As String
|
||||
Get
|
||||
Return m_lat
|
||||
End Get
|
||||
Set
|
||||
m_lat = Value
|
||||
End Set
|
||||
End Property
|
||||
Private m_lat As String
|
||||
Public Property lon() As String
|
||||
Get
|
||||
Return m_lon
|
||||
End Get
|
||||
Set
|
||||
m_lon = Value
|
||||
End Set
|
||||
End Property
|
||||
Private m_lon As String
|
||||
End Class
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user