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
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function GetRepAlmacenes(FechaInicio As String, FechaFin As String, CveEmpresa As Integer, CveTipoAlmacen As String, Contabilizable As Integer, Inventariable As Boolean,
|
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
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Inv_AlmacenesRepGet")
|
DataAdapter("PA_Inv_AlmacenesRepGet")
|
||||||
|
|
||||||
@@ -314,7 +315,8 @@ Public Class ClsInventarios
|
|||||||
.Add("@SoloMovimientosContables", SqlDbType.Bit).Value = SoloMovimientosContables
|
.Add("@SoloMovimientosContables", SqlDbType.Bit).Value = SoloMovimientosContables
|
||||||
.Add("@Modalidad", SqlDbType.Int).Value = Contabilizable
|
.Add("@Modalidad", SqlDbType.Int).Value = Contabilizable
|
||||||
.Add("@Almacenes", SqlDbType.VarChar).Value = Almacenes
|
.Add("@Almacenes", SqlDbType.VarChar).Value = Almacenes
|
||||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||||
|
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
@@ -325,7 +327,8 @@ Public Class ClsInventarios
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
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
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Inv_AlmacenesPeriodoRepGet")
|
DataAdapter("PA_Inv_AlmacenesPeriodoRepGet")
|
||||||
|
|
||||||
@@ -336,6 +339,9 @@ Public Class ClsInventarios
|
|||||||
.Add("@Inventariable", SqlDbType.Bit).Value = Inventariable
|
.Add("@Inventariable", SqlDbType.Bit).Value = Inventariable
|
||||||
.Add("@Modalidad", SqlDbType.Int).Value = Contabilizable
|
.Add("@Modalidad", SqlDbType.Int).Value = Contabilizable
|
||||||
.Add("@VerEn", SqlDbType.Int).Value = VerEn
|
.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
|
End With
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
|
|||||||
@@ -129,6 +129,25 @@ Public Class ClsTSoft
|
|||||||
OnError("Ocurrió un Error al obtener la información para PENSKE.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
OnError("Ocurrió un Error al obtener la información para PENSKE.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
|
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
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|||||||
@@ -5041,7 +5041,21 @@ Namespace Modelos
|
|||||||
Public Property Inv_CveEstatusEntrega As Integer
|
Public Property Inv_CveEstatusEntrega As Integer
|
||||||
Public Property Inv_EstatusEntrega As String
|
Public Property Inv_EstatusEntrega As String
|
||||||
Public Property Inv_ValorInventario As Decimal
|
Public Property Inv_ValorInventario As Decimal
|
||||||
Public Property Fecha As DateTime
|
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 FechaVencimiento As DateTime
|
||||||
Public Property EstatusFactura As String
|
Public Property EstatusFactura As String
|
||||||
Public Property SeTimbro As String
|
Public Property SeTimbro As String
|
||||||
@@ -8486,6 +8500,8 @@ Namespace Modelos
|
|||||||
FormatoFactura = ""
|
FormatoFactura = ""
|
||||||
SubProyecto = ""
|
SubProyecto = ""
|
||||||
Correo = ""
|
Correo = ""
|
||||||
|
UTCOffsetVerano = -7
|
||||||
|
UTCOffsetInvierno = -7
|
||||||
End Sub
|
End Sub
|
||||||
Public Sub New()
|
Public Sub New()
|
||||||
MyBase.New()
|
MyBase.New()
|
||||||
@@ -8502,9 +8518,11 @@ Namespace Modelos
|
|||||||
Estado = Row("Estado").ToString
|
Estado = Row("Estado").ToString
|
||||||
Pais = Row("Pais").ToString
|
Pais = Row("Pais").ToString
|
||||||
CP = Row("CP").ToString
|
CP = Row("CP").ToString
|
||||||
SubProyecto = Row("SubProyecto").ToString
|
SubProyecto = Row("SubProyecto").ToString
|
||||||
|
UTCOffsetVerano = Row("UTCOffsetVerano").ToString.ToEntero()
|
||||||
|
UTCOffsetInvierno = Row("UTCOffsetInvierno").ToString.ToEntero()
|
||||||
End If
|
End If
|
||||||
'SetValues(Row)
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public ReadOnly Property LugarExp As String
|
Public ReadOnly Property LugarExp As String
|
||||||
@@ -8531,7 +8549,9 @@ Namespace Modelos
|
|||||||
Public Property SubProyecto As String
|
Public Property SubProyecto As String
|
||||||
Public Property Correo As String
|
Public Property Correo As String
|
||||||
Public Property Telefono As String
|
Public Property Telefono As String
|
||||||
Public Property ImprimeNombre As String
|
Public Property ImprimeNombre As String
|
||||||
|
Public Property UTCOffsetVerano As Integer
|
||||||
|
Public Property UTCOffsetInvierno As Integer
|
||||||
|
|
||||||
End Class
|
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
|
Return retorno
|
||||||
End Function
|
End Function
|
||||||
<Runtime.CompilerServices.Extension()>
|
<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 retorno As Boolean = True
|
||||||
Dim directorioOld As New StringBuilder
|
Dim directorioOld As New StringBuilder
|
||||||
Dim directorioNew As New StringBuilder
|
Dim directorioNew As New StringBuilder
|
||||||
@@ -451,7 +451,7 @@ Namespace Extensiones
|
|||||||
|
|
||||||
directorioNew.Append(newName)
|
directorioNew.Append(newName)
|
||||||
Try
|
Try
|
||||||
My.Computer.FileSystem.MoveFile(directorioOld.ToString, directorioNew.ToString)
|
My.Computer.FileSystem.MoveFile(directorioOld.ToString, directorioNew.ToString, Sobreescribir)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Alert("", String.Format("{0} code[FilesMove]", ex.Message), TipoMensaje.MsgAdvertencia)
|
Alert("", String.Format("{0} code[FilesMove]", ex.Message), TipoMensaje.MsgAdvertencia)
|
||||||
retorno = False
|
retorno = False
|
||||||
@@ -3100,6 +3100,31 @@ Namespace Extensiones
|
|||||||
Dim origin As DateTime = New DateTime(1970, 1, 1, 0, 0, 0, 0)
|
Dim origin As DateTime = New DateTime(1970, 1, 1, 0, 0, 0, 0)
|
||||||
Return origin.AddSeconds(timestamp)
|
Return origin.AddSeconds(timestamp)
|
||||||
End Function
|
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 Module
|
||||||
#End Region
|
#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.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", ""))
|
||||||
Timbre.Comprobante.Folio = Obj.Folio.ToString
|
Timbre.Comprobante.Folio = Obj.Folio.ToString
|
||||||
Timbre.Comprobante.Serie = Obj.Serie
|
Timbre.Comprobante.Serie = Obj.Serie
|
||||||
Timbre.Comprobante.Fecha = Obj.Fecha
|
Timbre.Comprobante.Fecha = Obj.FechaCP
|
||||||
Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
|
Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
|
||||||
Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
|
Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
|
||||||
Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
|
Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
|
||||||
|
|||||||
@@ -4884,7 +4884,7 @@ Partial Class Bancos_IE
|
|||||||
|
|
||||||
GvComplementoPagos.DataSource = ObjBancos.DtResultados
|
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
|
DVGenerarComplementoModal.Visible = True
|
||||||
End If
|
End If
|
||||||
Else
|
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.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", ""))
|
||||||
Timbre.Comprobante.Folio = Obj.Folio.ToString
|
Timbre.Comprobante.Folio = Obj.Folio.ToString
|
||||||
Timbre.Comprobante.Serie = Obj.Serie
|
Timbre.Comprobante.Serie = Obj.Serie
|
||||||
Timbre.Comprobante.Fecha = Obj.Fecha
|
Timbre.Comprobante.Fecha = Obj.FechaCP
|
||||||
Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
|
Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
|
||||||
Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
|
Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
|
||||||
Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
|
Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ Partial Class Inventarios_RepAlmacen
|
|||||||
Dim CveSubProyecto As Integer = DdlSucursal.SelectedValue.ToEntero()
|
Dim CveSubProyecto As Integer = DdlSucursal.SelectedValue.ToEntero()
|
||||||
|
|
||||||
If objInv.GetRepAlmacenes(FechaI, FechaF, UsuarioActual.CveEmpresa, TipoAlmacen, DdlModalidadFiltro.SelectedValue.ToEntero, ChkInventariable.Checked,
|
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
|
GVAlmacen.DataSource = objInv.DtResultados
|
||||||
TmpDT = objInv.DtResultados
|
TmpDT = objInv.DtResultados
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -1,233 +1,250 @@
|
|||||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepAlmacenPeriodo.aspx.vb" Inherits="Inventarios_RepAlmacenPeriodo" %>
|
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepAlmacenPeriodo.aspx.vb" Inherits="Inventarios_RepAlmacenPeriodo" %>
|
||||||
|
|
||||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||||
<style>
|
<style>
|
||||||
.select2 .select2-selection__rendered {
|
.select2 .select2-selection__rendered {
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
color: #111;
|
color: #111;
|
||||||
}
|
}
|
||||||
|
|
||||||
.select2 .select2-selection--multiple {
|
.select2 .select2-selection--multiple {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
display: block;
|
display: block;
|
||||||
min-height: 20px;
|
min-height: 20px;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
-webkit-user-select: none;
|
-webkit-user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.select2-container--default .select2-selection--multiple .select2-selection__choice {
|
.select2-container--default .select2-selection--multiple .select2-selection__choice {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.select2-selection__rendered {
|
.select2-selection__rendered {
|
||||||
margin-top: 0px;
|
margin-top: 0px;
|
||||||
height: 25px;
|
height: 25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.select2-selection {
|
.select2-selection {
|
||||||
margin-top: 0px;
|
margin-top: 0px;
|
||||||
height: 31px;
|
height: 31px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.select2-container--default.select2-container--focus .select2-selection--multiple {
|
.select2-container--default.select2-container--focus .select2-selection--multiple {
|
||||||
border: none;
|
border: none;
|
||||||
outline: 0;
|
outline: 0;
|
||||||
}
|
}
|
||||||
#chartdiv {
|
|
||||||
width: 100%;
|
#chartdiv {
|
||||||
height: 800px;
|
width: 100%;
|
||||||
}
|
height: 800px;
|
||||||
</style>
|
}
|
||||||
</asp:Content>
|
</style>
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
</asp:Content>
|
||||||
Reporte de Almacen Periodo
|
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||||
</asp:Content>
|
Reporte de Almacen Periodo
|
||||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
</asp:Content>
|
||||||
<li>
|
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||||
<asp:HyperLink NavigateUrl="#" data-toggle="modal" data-target="#DivVerEn" ID="VerEn" runat="server"> <i class="fa fa-pencil"></i> Ver En</asp:HyperLink>
|
<li>
|
||||||
</li>
|
<asp:HyperLink NavigateUrl="#" data-toggle="modal" data-target="#DivVerEn" ID="VerEn" runat="server"> <i class="fa fa-pencil"></i> Ver En</asp:HyperLink>
|
||||||
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
|
</li>
|
||||||
<ContentTemplate>
|
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
|
||||||
<li>
|
<ContentTemplate>
|
||||||
<asp:LinkButton ID="LnkVerGrafica" OnClick="LnkVerGrafica_Click" runat="server">Ver Grafica</asp:LinkButton>
|
<li>
|
||||||
</li>
|
<asp:LinkButton ID="LnkVerGrafica" OnClick="LnkVerGrafica_Click" runat="server">Ver Grafica</asp:LinkButton>
|
||||||
</ContentTemplate>
|
</li>
|
||||||
</asp:UpdatePanel>
|
</ContentTemplate>
|
||||||
<li>
|
</asp:UpdatePanel>
|
||||||
<asp:LinkButton ID="LnkPdf" OnClick="LnkPdf_Click" runat="server"><i class="fa fa-ad-pdf"></i> Genera PDF</asp:LinkButton>
|
<li>
|
||||||
</li>
|
<asp:LinkButton ID="LnkPdf" OnClick="LnkPdf_Click" runat="server"><i class="fa fa-ad-pdf"></i> Genera PDF</asp:LinkButton>
|
||||||
<li>
|
</li>
|
||||||
<asp:LinkButton ID="LnkEXCEL" OnClick="LnkEXCEL_Click" runat="server"><i class="fa fa-ad-excel"></i> Genera Excel</asp:LinkButton>
|
<li>
|
||||||
</li>
|
<asp:LinkButton ID="LnkEXCEL" OnClick="LnkEXCEL_Click" runat="server"><i class="fa fa-ad-excel"></i> Genera Excel</asp:LinkButton>
|
||||||
</asp:Content>
|
</li>
|
||||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
</asp:Content>
|
||||||
</asp:Content>
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
</asp:Content>
|
||||||
</asp:Content>
|
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
</asp:Content>
|
||||||
<asp:UpdatePanel ID="UpFiltros" runat="server" UpdateMode="Conditional">
|
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||||
<ContentTemplate>
|
<asp:UpdatePanel ID="UpFiltros" runat="server" UpdateMode="Conditional">
|
||||||
<div class="portlet solid grey-cascade portlet-filter">
|
<ContentTemplate>
|
||||||
<div class="portlet-title portlet-filterT smalltitle">
|
<div class="portlet solid grey-cascade portlet-filter" style="" id="filtros">
|
||||||
<div class="tools">
|
<div class="portlet-title portlet-filterT smalltitle" style="">
|
||||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" OnClick="BtnConsultar_Click" class="btn btn-primary" />
|
<div class="tools">
|
||||||
<a href="javascript;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
|
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" OnClick="BtnConsultar_Click" class="btn btn-primary" />
|
||||||
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
<a href="javascript:;" class="expand"></a>
|
||||||
</div>
|
</div>
|
||||||
<div class="titlefiltros caption">
|
<div class="titlefiltros caption">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-1 truncate" style="text-align: right!important">Fecha Corte:</div>
|
<div class="col-md-1 truncate" style="text-align: right!important">Fecha Corte:</div>
|
||||||
<div class="col-md-1 col-sm-1">
|
<div class="col-md-1 col-sm-1">
|
||||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 95px !important; padding: 0px;">
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 95px !important; padding: 0px;">
|
||||||
<asp:TextBox Style="width: 80px !important;" ID="TxtFechaCorte" runat="server" CssClass="form-control" MaxLength="10"></asp:TextBox>
|
<asp:TextBox Style="width: 80px !important;" ID="TxtFechaCorte" runat="server" CssClass="form-control" MaxLength="10"></asp:TextBox>
|
||||||
<span class="input-group-btn ">
|
<span class="input-group-btn ">
|
||||||
<asp:LinkButton ID="LnkFechaCorte" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
<asp:LinkButton ID="LnkFechaCorte" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<ajax:MaskedEditExtender ID="MEEFechaCorte" runat="server" TargetControlID="TxtFechaCorte" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
<ajax:MaskedEditExtender ID="MEEFechaCorte" runat="server" TargetControlID="TxtFechaCorte" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
<ajax:CalendarExtender runat="server" ID="CECorte" TargetControlID="TxtFechaCorte" PopupButtonID="LnkFechaCorte" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
<ajax:CalendarExtender runat="server" ID="CECorte" TargetControlID="TxtFechaCorte" PopupButtonID="LnkFechaCorte" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-1 truncate" style="text-align: right!important">Tipo Almacen:</div>
|
<div class="col-md-1 truncate" style="text-align: right!important">Tipo Almacen:</div>
|
||||||
<div class="col-md-1">
|
<div class="col-md-1">
|
||||||
<asp:ListBox ID="DdlTipoAlmacen" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" DataTextField="TipoAlmacen" DataValueField="CveTipoAlmacen" Style="width: 100%;" runat="server"></asp:ListBox>
|
<asp:ListBox ID="DdlTipoAlmacen" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" DataTextField="TipoAlmacen" DataValueField="CveTipoAlmacen" Style="width: 100%;" runat="server"></asp:ListBox>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-1 truncate" style="text-align: right!important">Modalidad:</div>
|
<div class="col-md-1 truncate" style="text-align: right!important">Modalidad:</div>
|
||||||
<div class="col-md-1">
|
<div class="col-md-1">
|
||||||
<asp:DropDownList ID="DdlModalidadFiltro" runat="server" CssClass="input-small input-sm select2me" Width="100%">
|
<asp:DropDownList ID="DdlModalidadFiltro" runat="server" CssClass="input-small input-sm select2me" Width="100%">
|
||||||
<asp:ListItem Text="Todas" Value="-1" Selected="True"> </asp:ListItem>
|
<asp:ListItem Text="Todas" Value="-1" Selected="True"> </asp:ListItem>
|
||||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||||
<asp:ListItem Text="No Contable" Value="0"></asp:ListItem>
|
<asp:ListItem Text="No Contable" Value="0"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
<asp:CheckBox ID="ChkInventariable" CssClass="md-checksd" runat="server" Text="Aplica Inventario" />
|
<div class="col-md-1">
|
||||||
</div>
|
<asp:CheckBox ID="ChkInventariable" CssClass="md-checksd" runat="server" Text="Aplica Inventario" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="col-md-1 truncate v-center" style="text-align: right!important">Almacen:</div>
|
||||||
</div>
|
<div class="col-md-3 v-center">
|
||||||
</ContentTemplate>
|
<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>
|
||||||
</asp:UpdatePanel>
|
</div>
|
||||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
</div>
|
||||||
<ContentTemplate>
|
</div>
|
||||||
<div class="row" style="margin-left: 0px; margin-top: 15px; margin-bottom: 5px; text-align: right; margin-right: 5px;" align="left">
|
</div>
|
||||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVAlmacen.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
<div class="portlet-body" style="display: none;">
|
||||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVAlmacen.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
<div class="row">
|
||||||
</div>
|
<div class="col-md-1 truncate" style="text-align: right!important">Sucursal:</div>
|
||||||
<asp:GridView ID="GVAlmacen" runat="server" AutoGenerateColumns="False" OnRowDataBound="GVAlmacen_RowDataBound" data-sort="true" EmptyDataText="No se encontraron Almacenes"
|
<div class="col-md-3">
|
||||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None" Width="99%" >
|
<asp:DropDownList ID="DdlSucursal" runat="server" CssClass="input-small input-sm select2me" Width="100%" DataTextField="SubProyecto" DataValueField="CveSubProyecto">
|
||||||
<Columns>
|
<asp:ListItem Text="Todas" Value="-1" Selected="True"> </asp:ListItem>
|
||||||
<asp:HyperLinkField HeaderText="Almacen" DataTextField="Almacen" DataNavigateUrlFields="CveAlmacen" DataNavigateUrlFormatString="/Inventarios/RepEntradasSalidas.aspx?CveAlmacen={0}" Target="_blank" ItemStyle-HorizontalAlign="Left" />
|
</asp:DropDownList>
|
||||||
<asp:BoundField HeaderText="Enero" DataField="Enero" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
</div>
|
||||||
<asp:BoundField HeaderText="Febrero" DataField="Febrero" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
<div class="cold-md-8"></div>
|
||||||
<asp:BoundField HeaderText="Marzo" DataField="Marzo" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
</div>
|
||||||
<asp:BoundField HeaderText="Abril" DataField="Abril" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
</div>
|
||||||
<asp:BoundField HeaderText="Mayo" DataField="Mayo" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
</div>
|
||||||
<asp:BoundField HeaderText="Junio" DataField="Junio" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
</ContentTemplate>
|
||||||
<asp:BoundField HeaderText="Julio" DataField="Julio" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
</asp:UpdatePanel>
|
||||||
<asp:BoundField HeaderText="Agosto" DataField="Agosto" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||||
<asp:BoundField HeaderText="Septiembre" DataField="Septiembre" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
<ContentTemplate>
|
||||||
<asp:BoundField HeaderText="Octubre" DataField="Octubre" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
<div class="row" style="margin-left: 0px; margin-top: 15px; margin-bottom: 5px; text-align: right; margin-right: 5px;" align="left">
|
||||||
<asp:BoundField HeaderText="Noviembre" DataField="Noviembre" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVAlmacen.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||||
<asp:BoundField HeaderText="Diciembre" DataField="Diciembre" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVAlmacen.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
<asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
</div>
|
||||||
</Columns>
|
<asp:GridView ID="GVAlmacen" runat="server" AutoGenerateColumns="False" OnRowDataBound="GVAlmacen_RowDataBound" data-sort="true" EmptyDataText="No se encontraron Almacenes"
|
||||||
</asp:GridView>
|
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None" Width="99%">
|
||||||
</ContentTemplate>
|
<Columns>
|
||||||
</asp:UpdatePanel>
|
<asp:HyperLinkField HeaderText="Almacen" DataTextField="Almacen" DataNavigateUrlFields="CveAlmacen" DataNavigateUrlFormatString="/Inventarios/RepEntradasSalidas.aspx?CveAlmacen={0}" Target="_blank" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:UpdatePanel runat="server" ID="UpVerEn" UpdateMode="Conditional">
|
<asp:BoundField HeaderText="Enero" DataField="Enero" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<ContentTemplate>
|
<asp:BoundField HeaderText="Febrero" DataField="Febrero" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<div id="DivVerEn" class="modal fade" role="dialog">
|
<asp:BoundField HeaderText="Marzo" DataField="Marzo" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<div class="modal-dialog">
|
<asp:BoundField HeaderText="Abril" DataField="Abril" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<div class="modal-content">
|
<asp:BoundField HeaderText="Mayo" DataField="Mayo" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<div class="modal-header">
|
<asp:BoundField HeaderText="Junio" DataField="Junio" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
<asp:BoundField HeaderText="Julio" DataField="Julio" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<h4 class="modal-title">
|
<asp:BoundField HeaderText="Agosto" DataField="Agosto" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:Label ID="Label2" runat="server" ClientIDMode="Static" Text="Ver En:"></asp:Label></h4>
|
<asp:BoundField HeaderText="Septiembre" DataField="Septiembre" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||||
</div>
|
<asp:BoundField HeaderText="Octubre" DataField="Octubre" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<div class="modal-body">
|
<asp:BoundField HeaderText="Noviembre" DataField="Noviembre" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<table style="width: 335px;" class="table table-striped table-advance table-hover">
|
<asp:BoundField HeaderText="Diciembre" DataField="Diciembre" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<tbody>
|
<asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<tr>
|
</Columns>
|
||||||
<td style="text-align: left;">
|
</asp:GridView>
|
||||||
<asp:RadioButton ID="RblTotal" Checked="true" GroupName="GnVerEn" Text="Total" runat="server" /></td>
|
</ContentTemplate>
|
||||||
<td style="text-align: left;">
|
</asp:UpdatePanel>
|
||||||
<asp:RadioButton ID="RblExistencia" GroupName="GnVerEn" Text="Existencia" runat="server" /></td>
|
<asp:UpdatePanel runat="server" ID="UpVerEn" UpdateMode="Conditional">
|
||||||
</tr>
|
<ContentTemplate>
|
||||||
</tbody>
|
<div id="DivVerEn" class="modal fade" role="dialog">
|
||||||
</table>
|
<div class="modal-dialog">
|
||||||
</div>
|
<div class="modal-content">
|
||||||
<div class="modal-footer">
|
<div class="modal-header">
|
||||||
<asp:Button ID="BtnVerEn" ClientIDMode="Static" runat="server" Text="Cargar" class="btn btn-success" OnClick="BtnVerEn_Click" />
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
<h4 class="modal-title">
|
||||||
</div>
|
<asp:Label ID="Label2" runat="server" ClientIDMode="Static" Text="Ver En:"></asp:Label></h4>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="modal-body">
|
||||||
</div>
|
<table style="width: 335px;" class="table table-striped table-advance table-hover">
|
||||||
</ContentTemplate>
|
<tbody>
|
||||||
</asp:UpdatePanel>
|
<tr>
|
||||||
<div id="DivModalGrafica" class="modal ADS fade" role="dialog">
|
<td style="text-align: left;">
|
||||||
<asp:UpdatePanel class="modal-dialog modal-lg" runat="server" ID="UpGrafica" UpdateMode="Conditional">
|
<asp:RadioButton ID="RblTotal" Checked="true" GroupName="GnVerEn" Text="Total" runat="server" /></td>
|
||||||
<ContentTemplate>
|
<td style="text-align: left;">
|
||||||
<div class="modal-content">
|
<asp:RadioButton ID="RblExistencia" GroupName="GnVerEn" Text="Existencia" runat="server" /></td>
|
||||||
<div class="modal-header">
|
</tr>
|
||||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
</tbody>
|
||||||
<h4 class="modal-title">
|
</table>
|
||||||
<asp:Label ID="LblTituloGrafica" runat="server" ClientIDMode="Static" Text="Almacenes"></asp:Label>
|
</div>
|
||||||
</h4>
|
<div class="modal-footer">
|
||||||
</div>
|
<asp:Button ID="BtnVerEn" ClientIDMode="Static" runat="server" Text="Cargar" class="btn btn-success" OnClick="BtnVerEn_Click" />
|
||||||
<div class="modal-body">
|
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||||
<div id="chartdiv"></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
</div>
|
||||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
|
</div>
|
||||||
</div>
|
</ContentTemplate>
|
||||||
</div>
|
</asp:UpdatePanel>
|
||||||
</ContentTemplate>
|
<div id="DivModalGrafica" class="modal ADS fade" role="dialog">
|
||||||
</asp:UpdatePanel>
|
<asp:UpdatePanel class="modal-dialog modal-lg" runat="server" ID="UpGrafica" UpdateMode="Conditional">
|
||||||
</div>
|
<ContentTemplate>
|
||||||
</asp:Content>
|
<div class="modal-content">
|
||||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
<div class="modal-header">
|
||||||
<script src="https://www.amcharts.com/lib/3/amcharts.js"></script>
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
<script src="https://www.amcharts.com/lib/3/serial.js"></script>
|
<h4 class="modal-title">
|
||||||
<script src="https://www.amcharts.com/lib/3/plugins/export/export.min.js"></script>
|
<asp:Label ID="LblTituloGrafica" runat="server" ClientIDMode="Static" Text="Almacenes"></asp:Label>
|
||||||
<link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />
|
</h4>
|
||||||
<script src="https://www.amcharts.com/lib/3/themes/light.js"></script>
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div id="chartdiv"></div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||||
|
<script src="https://www.amcharts.com/lib/3/amcharts.js"></script>
|
||||||
|
<script src="https://www.amcharts.com/lib/3/serial.js"></script>
|
||||||
|
<script src="https://www.amcharts.com/lib/3/plugins/export/export.min.js"></script>
|
||||||
|
<link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />
|
||||||
|
<script src="https://www.amcharts.com/lib/3/themes/light.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
function CargaGraficaLineas(data, graph) {
|
function CargaGraficaLineas(data, graph) {
|
||||||
var chart = AmCharts.makeChart("chartdiv", {
|
var chart = AmCharts.makeChart("chartdiv", {
|
||||||
"type": "serial",
|
"type": "serial",
|
||||||
"theme": "light",
|
"theme": "light",
|
||||||
"legend": {
|
"legend": {
|
||||||
"useGraphSettings": true,
|
"useGraphSettings": true,
|
||||||
"valueWidth": 150
|
"valueWidth": 150
|
||||||
},
|
},
|
||||||
"dataProvider": data,
|
"dataProvider": data,
|
||||||
"startDuration": 0.5,
|
"startDuration": 0.5,
|
||||||
"graphs": graph,
|
"graphs": graph,
|
||||||
"chartCursor": {
|
"chartCursor": {
|
||||||
"cursorAlpha": 0,
|
"cursorAlpha": 0,
|
||||||
"zoomable": false
|
"zoomable": false
|
||||||
},
|
},
|
||||||
"categoryField": "mes",
|
"categoryField": "mes",
|
||||||
"categoryAxis": {
|
"categoryAxis": {
|
||||||
"gridPosition": "start",
|
"gridPosition": "start",
|
||||||
"axisAlpha": 0,
|
"axisAlpha": 0,
|
||||||
"fillAlpha": 0.05,
|
"fillAlpha": 0.05,
|
||||||
"fillColor": "#000000",
|
"fillColor": "#000000",
|
||||||
"gridAlpha": 0,
|
"gridAlpha": 0,
|
||||||
"position": "top"
|
"position": "top"
|
||||||
},
|
},
|
||||||
"export": {
|
"export": {
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"position": "bottom-right"
|
"position": "bottom-right"
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
|
|||||||
@@ -39,18 +39,30 @@ Partial Class Inventarios_RepAlmacenPeriodo
|
|||||||
DdlTipoAlmacen.DataSource = GlobalDTTipoAlmacen(1)
|
DdlTipoAlmacen.DataSource = GlobalDTTipoAlmacen(1)
|
||||||
DdlTipoAlmacen.DataBind()
|
DdlTipoAlmacen.DataBind()
|
||||||
DdlTipoAlmacen.Items.Insert(0, New ListItem("Todos", "-1"))
|
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
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaDatos()
|
Private Sub CargaDatos()
|
||||||
Dim objInv As New ClsInventarios
|
Dim objInv As New ClsInventarios
|
||||||
Dim FechaCorte As Date
|
Dim FechaCorte As Date
|
||||||
FechaCorte = If(IsDate(TxtFechaCorte.Text.Trim()), TxtFechaCorte.Text.ToDate, MaxFecha)
|
FechaCorte = If(IsDate(TxtFechaCorte.Text.Trim()), TxtFechaCorte.Text.ToDate, MaxFecha)
|
||||||
Dim TipoAlmacen As String = If(DdlTipoAlmacen.GetSelectedValuesM = "", "-1", DdlTipoAlmacen.GetSelectedValuesM)
|
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 RblTotal.Checked Then Ver = 1
|
||||||
If RblExistencia.Checked Then Ver = 2
|
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
|
GVAlmacen.DataSource = objInv.DtResultados
|
||||||
TmpDT = objInv.DtResultados
|
TmpDT = objInv.DtResultados
|
||||||
End If
|
End If
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -1,374 +1,351 @@
|
|||||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepCotizacionesDetalle.aspx.vb" Inherits="PopOCCotizacionesDetalle" %>
|
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepCotizacionesDetalle.aspx.vb" Inherits="PopOCCotizacionesDetalle" %>
|
||||||
|
|
||||||
<%--<%@ MasterType VirtualPath="~/Site.master" %>--%>
|
<%--<%@ MasterType VirtualPath="~/Site.master" %>--%>
|
||||||
|
|
||||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||||
|
<table style="width: 797px!important">
|
||||||
<asp:UpdatePanel runat="server">
|
<tr>
|
||||||
<ContentTemplate>
|
<th class="Titulos" colspan="4">Carga de Cotizaciones</th>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
<table style="width: 797px!important">
|
<br />
|
||||||
<tr>
|
<div class="row">
|
||||||
<th class="Titulos" colspan="4">Carga de Cotizaciones</th>
|
<div class="col-sm-6 rowpadding">
|
||||||
</tr>
|
<asp:UpdatePanel runat="server">
|
||||||
</table>
|
<ContentTemplate>
|
||||||
|
<div class="portlet light smmallpadding bordered">
|
||||||
<br />
|
|
||||||
|
<div class="portlet-title">
|
||||||
<div class="row" style="vertical-align: top">
|
<div class="caption">
|
||||||
|
<i class="fa fa-truck"></i><span class="caption-subject bold uppercase">Proveedores</span>
|
||||||
<div class="col-sm-6">
|
</div>
|
||||||
<div class="row">
|
<div class="tools">
|
||||||
|
<div style="display: inline-block">
|
||||||
<%--PROVEEDORES--%>
|
</div>
|
||||||
<div class="col-sm-12 rowpadding">
|
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||||
<div class="portlet light smmallpadding bordered">
|
</div>
|
||||||
|
</div>
|
||||||
<div class="portlet-title">
|
|
||||||
<div class="caption">
|
<div class="portlet-body">
|
||||||
<i class="fa fa-truck"></i><span class="caption-subject bold uppercase">Proveedores</span>
|
<table>
|
||||||
</div>
|
<tr>
|
||||||
<div class="tools">
|
<td>
|
||||||
<div style="display: inline-block">
|
<label>Clasificación:</label></td>
|
||||||
</div>
|
<td>
|
||||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
<div>
|
||||||
</div>
|
<asp:DropDownList ID="CboClasificacionProveedor" CssClass="select2me" runat="server" AutoPostBack="true" DataTextField="ProveedorClasificacion" DataValueField="CveProveedorClasificacion"
|
||||||
</div>
|
Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 200px !important;">
|
||||||
|
</asp:DropDownList>
|
||||||
<div class="portlet-body">
|
</div>
|
||||||
<table>
|
</td>
|
||||||
<tr>
|
</tr>
|
||||||
<td>
|
<tr>
|
||||||
<label>Clasificación:</label></td>
|
<td>
|
||||||
<td>
|
<label>Proveedor:</label>
|
||||||
<div>
|
</td>
|
||||||
<asp:DropDownList ID="CboClasificacionProveedor" CssClass="select2me" runat="server" AutoPostBack="true" DataTextField="ProveedorClasificacion" DataValueField="CveProveedorClasificacion"
|
<td>
|
||||||
Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 200px !important;">
|
<div>
|
||||||
</asp:DropDownList>
|
<asp:DropDownList ID="CboProveedores" CssClass="select2me" runat="server" DataTextField="RazonSocial" DataValueField="CveProveedor"
|
||||||
</div>
|
Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 200px !important;">
|
||||||
</td>
|
</asp:DropDownList>
|
||||||
</tr>
|
<asp:RequiredFieldValidator ID="RFVProveedor" runat="server" ControlToValidate="CboProveedores"
|
||||||
<tr>
|
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Proveedor''</b> es necesario, por favor ingréselo."
|
||||||
<td>
|
ValidationGroup="GrpDetalleGuardar"></asp:RequiredFieldValidator>
|
||||||
<label>Proveedor:</label>
|
<ajax:ValidatorCalloutExtender ID="VCEProveedor" runat="server" HighlightCssClass="vco"
|
||||||
</td>
|
TargetControlID="RFVProveedor" Width="300px">
|
||||||
<td>
|
</ajax:ValidatorCalloutExtender>
|
||||||
<div>
|
</div>
|
||||||
<asp:DropDownList ID="CboProveedores" CssClass="select2me" runat="server" DataTextField="RazonSocial" DataValueField="CveProveedor"
|
</td>
|
||||||
Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 200px !important;">
|
</tr>
|
||||||
</asp:DropDownList>
|
</table>
|
||||||
<asp:RequiredFieldValidator ID="RFVProveedor" runat="server" ControlToValidate="CboProveedores"
|
</div>
|
||||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Proveedor''</b> es necesario, por favor ingréselo."
|
</div>
|
||||||
ValidationGroup="GrpDetalleGuardar"></asp:RequiredFieldValidator>
|
<div class="portlet light smmallpadding bordered">
|
||||||
<ajax:ValidatorCalloutExtender ID="VCEProveedor" runat="server" HighlightCssClass="vco"
|
<div class="portlet-title">
|
||||||
TargetControlID="RFVProveedor" Width="300px">
|
<div class="caption">
|
||||||
</ajax:ValidatorCalloutExtender>
|
<i class="fa fa-file"></i><span class="caption-subject bold uppercase">Archivo</span>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
<div class="tools">
|
||||||
</tr>
|
<div style="display: inline-block">
|
||||||
</table>
|
<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>
|
||||||
|
<div class="portlet-body">
|
||||||
|
<asp:TextBox ID="TxtArchivo" CssClass="ADSdropzone hidden" data-maxFile="1" Text="" runat="server"></asp:TextBox>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
<%--ARCHIVO--%>
|
<Triggers>
|
||||||
<div class="col-sm-12 rowpadding" style="text-align:center;">
|
<asp:PostBackTrigger ControlID="LnkArchivo" />
|
||||||
Archivo:
|
</Triggers>
|
||||||
<asp:HyperLink ID="HplArchivo" runat="server" ToolTip="Descargar" Visible="false" Height="20px">[HplArchivo]</asp:HyperLink>
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
<div class="btn-file btn green">
|
<div class="col-sm-6 rowpadding">
|
||||||
<i class="fa fa-plus"></i>
|
<div class="portlet light smmallpadding bordered">
|
||||||
<span>Seleccionar Archivo</span>
|
<div class="portlet-title">
|
||||||
<asp:FileUpload ID="FUArchivo" runat="server" onchange="$('#FUTxtt').text(this.value);" />
|
<div class="caption">
|
||||||
</div>
|
<i class="fa fa-money"></i><span class="caption-subject bold uppercase">Datos contización</span>
|
||||||
<span id="FUTxtt"></span>
|
</div>
|
||||||
</div>
|
<div class="tools">
|
||||||
|
<div style="display: inline-block">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||||
|
</div>
|
||||||
<%--DATOS DE COTIZACION--%>
|
</div>
|
||||||
<div class="col-sm-6 rowpadding">
|
<div class="portlet-body">
|
||||||
|
<table>
|
||||||
<div class="portlet light smmallpadding bordered">
|
<tr>
|
||||||
|
<td>
|
||||||
<div class="portlet-title">
|
<label>Folio:</label></td>
|
||||||
<div class="caption">
|
<td>
|
||||||
<i class="fa fa-money"></i><span class="caption-subject bold uppercase">Datos contización</span>
|
<div>
|
||||||
</div>
|
<asp:TextBox AutoComplete="off" ID="TxtFolio" runat="server" Style="width: 200px !important;"></asp:TextBox>
|
||||||
<div class="tools">
|
<asp:RequiredFieldValidator ID="RFVFolio" runat="server" ControlToValidate="TxtFolio"
|
||||||
<div style="display: inline-block">
|
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> es necesario, por favor ingréselo."
|
||||||
</div>
|
ValidationGroup="GrpDetalleGuardar"></asp:RequiredFieldValidator>
|
||||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
<ajax:ValidatorCalloutExtender ID="VCOFolio" runat="server" HighlightCssClass="vco"
|
||||||
</div>
|
TargetControlID="RFVFolio" Width="300px">
|
||||||
</div>
|
</ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
<div class="portlet-body">
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<table>
|
<tr>
|
||||||
<tr>
|
<td>
|
||||||
<td>
|
<label>Fecha Cotización:</label></td>
|
||||||
<label>Folio:</label></td>
|
<td>
|
||||||
<td>
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||||
<div>
|
<asp:TextBox AutoComplete="off" ID="TxtFecha" runat="server" CausesValidation="true" MaxLength="10" ValidationGroup="GrpGuardar" Style="width: 183px !important;"></asp:TextBox>
|
||||||
<asp:TextBox AutoComplete="off" ID="TxtFolio" runat="server" Style="width: 200px !important;"></asp:TextBox>
|
<span class="input-group-btn ">
|
||||||
<asp:RequiredFieldValidator ID="RFVFolio" runat="server" ControlToValidate="TxtFolio"
|
<asp:LinkButton ID="imgFecha" Style="margin-left: -10px!important" class="btn default" Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> es necesario, por favor ingréselo."
|
</span>
|
||||||
ValidationGroup="GrpDetalleGuardar"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VCOFolio" runat="server" HighlightCssClass="vco"
|
|
||||||
TargetControlID="RFVFolio" Width="300px">
|
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" AcceptNegative="Left" CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" CultureDateFormat="" CultureDatePlaceholder=""
|
||||||
</ajax:ValidatorCalloutExtender>
|
CultureDecimalPlaceholder="" CultureThousandsPlaceholder="" CultureTimePlaceholder=""
|
||||||
</div>
|
DisplayMoney="Left" Enabled="True" ErrorTooltipEnabled="True" Mask="99/99/9999"
|
||||||
|
MaskType="Date" TargetControlID="TxtFecha" />
|
||||||
</td>
|
<ajax:MaskedEditValidator ID="MEVFecha" runat="server" ControlExtender="MEEFecha"
|
||||||
</tr>
|
ControlToValidate="TxtFecha" Display="None" EmptyValueBlurredText="*" EmptyValueMessage="Fecha de Inicio de pagos Requerida"
|
||||||
<tr>
|
ErrorMessage="" InvalidValueBlurredMessage="*" InvalidValueMessage="Fecha Inválida"
|
||||||
<td>
|
IsValidEmpty="False" TooltipMessage="Ingrese Fecha" ValidationGroup="GrpGuardar" />
|
||||||
<label>Fecha Cotización:</label></td>
|
<ajax:CalendarExtender ID="CEFecha" runat="server" Enabled="True" PopupButtonID="imgFecha" PopupPosition="Left" TargetControlID="TxtFecha"></ajax:CalendarExtender>
|
||||||
<td>
|
<ajax:ValidatorCalloutExtender ID="VcoFechaI" runat="server" HighlightCssClass="vco" TargetControlID="MEVFecha" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
</div>
|
||||||
<asp:TextBox AutoComplete="off" ID="TxtFecha" runat="server" CausesValidation="true" MaxLength="10" ValidationGroup="GrpGuardar" Style="width: 183px !important;"></asp:TextBox>
|
</td>
|
||||||
<span class="input-group-btn ">
|
</tr>
|
||||||
<asp:LinkButton ID="imgFecha" Style="margin-left: -10px!important" class="btn default" Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
<tr>
|
||||||
</span>
|
<td>
|
||||||
|
<label>Moneda:</label></td>
|
||||||
|
<td>
|
||||||
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" AcceptNegative="Left" CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" CultureDateFormat="" CultureDatePlaceholder=""
|
<div>
|
||||||
CultureDecimalPlaceholder="" CultureThousandsPlaceholder="" CultureTimePlaceholder=""
|
<asp:DropDownList ID="ddlMoneda" DataValueField="CveMoneda" DataTextField="Moneda" Class="table-group-action-input form-control input-inline input-small input-sm select2me" Style="width: 200px !important;" runat="server"></asp:DropDownList>
|
||||||
DisplayMoney="Left" Enabled="True" ErrorTooltipEnabled="True" Mask="99/99/9999"
|
</div>
|
||||||
MaskType="Date" TargetControlID="TxtFecha" />
|
</td>
|
||||||
<ajax:MaskedEditValidator ID="MEVFecha" runat="server" ControlExtender="MEEFecha"
|
</tr>
|
||||||
ControlToValidate="TxtFecha" Display="None" EmptyValueBlurredText="*" EmptyValueMessage="Fecha de Inicio de pagos Requerida"
|
<tr>
|
||||||
ErrorMessage="" InvalidValueBlurredMessage="*" InvalidValueMessage="Fecha Inválida"
|
<td>
|
||||||
IsValidEmpty="False" TooltipMessage="Ingrese Fecha" ValidationGroup="GrpGuardar" />
|
<label>Días de Crédito:</label></td>
|
||||||
<ajax:CalendarExtender ID="CEFecha" runat="server" Enabled="True" PopupButtonID="imgFecha" PopupPosition="Left" TargetControlID="TxtFecha"></ajax:CalendarExtender>
|
<td>
|
||||||
<ajax:ValidatorCalloutExtender ID="VcoFechaI" runat="server" HighlightCssClass="vco" TargetControlID="MEVFecha" Width="300px"></ajax:ValidatorCalloutExtender>
|
<div>
|
||||||
</div>
|
<asp:TextBox AutoComplete="off" runat="server" ID="TxtDiasCredito" Style="width: 200px !important;"></asp:TextBox>
|
||||||
</td>
|
</div>
|
||||||
</tr>
|
</td>
|
||||||
<tr>
|
</tr>
|
||||||
<td>
|
</table>
|
||||||
<label>Moneda:</label></td>
|
</div>
|
||||||
<td>
|
</div>
|
||||||
<div>
|
</div>
|
||||||
<asp:DropDownList ID="ddlMoneda" DataValueField="CveMoneda" DataTextField="Moneda" Class="table-group-action-input form-control input-inline input-small input-sm select2me" Style="width: 200px !important;" runat="server"></asp:DropDownList>
|
</div>
|
||||||
</div>
|
<asp:UpdatePanel runat="server">
|
||||||
</td>
|
<ContentTemplate>
|
||||||
</tr>
|
<hr />
|
||||||
<tr>
|
<div class="row">
|
||||||
<td>
|
<div class="col-sm-12">
|
||||||
<label>Días de Crédito:</label></td>
|
<asp:GridView ID="GvDC" runat="server" AutoGenerateColumns="False" DataKeyNames="CveOrdenCompra, CvePS, Cantidad, CveUnidadMedida,CveOrdenCompraDetalle"
|
||||||
<td>
|
ShowHeader="True" CssClass="table table-striped table-hover Widthall" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||||
<div>
|
<Columns>
|
||||||
<asp:TextBox AutoComplete="off" runat="server" ID="TxtDiasCredito" Style="width: 200px !important;"></asp:TextBox>
|
<asp:TemplateField HeaderText="Cant.">
|
||||||
</div>
|
<ItemTemplate>
|
||||||
</td>
|
<asp:TextBox AutoComplete="off" ID="TxtCant" runat="server" Width="35" ReadOnly="True" Style="text-align: right; border: none; background-color: #fff; background: transparent;" Text='<%# Eval("Cantidad", "{0:N2}") %>'></asp:TextBox>
|
||||||
</tr>
|
</ItemTemplate>
|
||||||
</table>
|
<ItemStyle Width="40" />
|
||||||
</div>
|
</asp:TemplateField>
|
||||||
</div>
|
|
||||||
</div>
|
<asp:TemplateField HeaderText="Unidad">
|
||||||
|
<EditItemTemplate>
|
||||||
</div>
|
<asp:DropDownList ID="CboUnidadMedidaEdit" runat="server" DataTextField="Abreviatura"
|
||||||
|
DataValueField="CveUnidadMedida" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 70px !important;">
|
||||||
<hr />
|
</asp:DropDownList>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVUnidadMedida" runat="server" ControlToValidate="CboUnidadMedidaEdit"
|
||||||
<div class="row">
|
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Unidad de Medida''</b> es necesario, por favor ingréselo."
|
||||||
<div class="col-sm-12">
|
ValidationGroup="GrpEditGuardar"></asp:RequiredFieldValidator>
|
||||||
<asp:GridView ID="GvDC" runat="server" AutoGenerateColumns="False" DataKeyNames="CveOrdenCompra, CvePS, Cantidad, CveUnidadMedida,CveOrdenCompraDetalle"
|
</EditItemTemplate>
|
||||||
ShowHeader="True" CssClass="table table-striped table-hover Widthall" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
<ItemTemplate>
|
||||||
<Columns>
|
<asp:Literal ID="LA" runat="server" Text='<%# Bind("Abreviatura") %>'></asp:Literal>
|
||||||
<asp:TemplateField HeaderText="Cant.">
|
</ItemTemplate>
|
||||||
<ItemTemplate>
|
<ItemStyle Width="50px" />
|
||||||
<asp:TextBox AutoComplete="off" ID="TxtCant" runat="server" Width="35" ReadOnly="True" Style="text-align: right; border: none; background-color: #fff; background: transparent;" Text='<%# Eval("Cantidad", "{0:N2}") %>'></asp:TextBox>
|
</asp:TemplateField>
|
||||||
</ItemTemplate>
|
|
||||||
<ItemStyle Width="40" />
|
<asp:TemplateField HeaderText="Descripción">
|
||||||
</asp:TemplateField>
|
<EditItemTemplate>
|
||||||
|
<asp:TextBox AutoComplete="off" ID="TxtDescripDetalleEdit" runat="server" Text='<%# Bind("Descripcion") %>'
|
||||||
<asp:TemplateField HeaderText="Unidad">
|
Width="345px"></asp:TextBox>
|
||||||
<EditItemTemplate>
|
<asp:RequiredFieldValidator ID="RFVDescripcion" runat="server" ControlToValidate="TxtDescripDetalleEdit"
|
||||||
<asp:DropDownList ID="CboUnidadMedidaEdit" runat="server" DataTextField="Abreviatura"
|
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripción''</b> es necesario, por favor ingréselo."
|
||||||
DataValueField="CveUnidadMedida" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 70px !important;">
|
ValidationGroup="GrpEditGuardar"></asp:RequiredFieldValidator>
|
||||||
</asp:DropDownList>
|
<ajax:ValidatorCalloutExtender ID="VCOEmpresa" runat="server" HighlightCssClass="vco"
|
||||||
<asp:RequiredFieldValidator ID="RFVUnidadMedida" runat="server" ControlToValidate="CboUnidadMedidaEdit"
|
TargetControlID="RFVDescripcion" Width="300px">
|
||||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Unidad de Medida''</b> es necesario, por favor ingréselo."
|
</ajax:ValidatorCalloutExtender>
|
||||||
ValidationGroup="GrpEditGuardar"></asp:RequiredFieldValidator>
|
</EditItemTemplate>
|
||||||
</EditItemTemplate>
|
<ItemTemplate>
|
||||||
<ItemTemplate>
|
<asp:Literal ID="LDescrip" runat="server" Text='<%# Bind("PS") %>'></asp:Literal>
|
||||||
<asp:Literal ID="LA" runat="server" Text='<%# Bind("Abreviatura") %>'></asp:Literal>
|
</ItemTemplate>
|
||||||
</ItemTemplate>
|
<ItemStyle Width="250px" HorizontalAlign="Left" />
|
||||||
<ItemStyle Width="50px" />
|
</asp:TemplateField>
|
||||||
</asp:TemplateField>
|
|
||||||
|
<asp:BoundField DataField="Observacion" HeaderText="Observación" />
|
||||||
<asp:TemplateField HeaderText="Descripción">
|
<asp:TemplateField ShowHeader="False" HeaderText="Cantidad Surtir">
|
||||||
<EditItemTemplate>
|
<EditItemTemplate>
|
||||||
<asp:TextBox AutoComplete="off" ID="TxtDescripDetalleEdit" runat="server" Text='<%# Bind("Descripcion") %>'
|
</EditItemTemplate>
|
||||||
Width="345px"></asp:TextBox>
|
<ItemTemplate>
|
||||||
<asp:RequiredFieldValidator ID="RFVDescripcion" runat="server" ControlToValidate="TxtDescripDetalleEdit"
|
<asp:TextBox AutoComplete="off" ID="TxtCantidadSurtir" runat="server" Width="55px" Style="text-align: right" Text="" CausesValidation="true"></asp:TextBox>
|
||||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripción''</b> es necesario, por favor ingréselo."
|
<asp:RequiredFieldValidator ID="RFVCantidadSurtir" runat="server" ControlToValidate="TxtCantidadSurtir" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad a Surtir''</b> es necesario, por favor ingréselo." ValidationGroup="GrpEditGuardar" Enabled="false"></asp:RequiredFieldValidator>
|
||||||
ValidationGroup="GrpEditGuardar"></asp:RequiredFieldValidator>
|
<ajax:ValidatorCalloutExtender ID="VCECantidadSurtir" runat="server" HighlightCssClass="vco" TargetControlID="RFVCantidadSurtir" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCOEmpresa" runat="server" HighlightCssClass="vco"
|
<asp:RangeValidator ID="RVCantidad" runat="server" ControlToValidate="TxtCantidadSurtir" Display="None" Type="Double" MinimumValue="0.01" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad Surtir''</b> debe ser mayor a cero y menor que la cantidad solicitada" ValidationGroup="GrpEditGuardar" Enabled="false"></asp:RangeValidator>
|
||||||
TargetControlID="RFVDescripcion" Width="300px">
|
<ajax:ValidatorCalloutExtender ID="VCECantidad" runat="server" HighlightCssClass="vco" TargetControlID="RVCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
</ajax:ValidatorCalloutExtender>
|
<ajax:FilteredTextBoxExtender ID="FilCantidadSurtir" runat="server" TargetControlID="TxtCantidadSurtir" FilterType="Custom, Numbers" ValidChars="." />
|
||||||
</EditItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemTemplate>
|
<ItemStyle Width="55px" />
|
||||||
<asp:Literal ID="LDescrip" runat="server" Text='<%# Bind("PS") %>'></asp:Literal>
|
</asp:TemplateField>
|
||||||
</ItemTemplate>
|
<asp:TemplateField ShowHeader="False" HeaderText="Fecha Entrega">
|
||||||
<ItemStyle Width="250px" HorizontalAlign="Left" />
|
<EditItemTemplate>
|
||||||
</asp:TemplateField>
|
</EditItemTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
<asp:BoundField DataField="Observacion" HeaderText="Observación" />
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||||
<asp:TemplateField ShowHeader="False" HeaderText="Cantidad Surtir">
|
<asp:TextBox ID="txtFechaEntrega" runat="server" CssClass="form-control" CausesValidation="true" Style="width: 87px" MaxLength="10"></asp:TextBox>
|
||||||
<EditItemTemplate>
|
<span class="input-group-btn ">
|
||||||
</EditItemTemplate>
|
<asp:LinkButton ID="ImgFechaFinContrato" Style="margin-left: -10px!important" class="btn default" Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
<ItemTemplate>
|
</span>
|
||||||
<asp:TextBox AutoComplete="off" ID="TxtCantidadSurtir" runat="server" Width="55px" Style="text-align: right" Text="" CausesValidation="true"></asp:TextBox>
|
<ajax:MaskedEditExtender ID="MEEFechaEntrega" runat="server" TargetControlID="txtFechaEntrega" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
<asp:RequiredFieldValidator ID="RFVCantidadSurtir" runat="server" ControlToValidate="TxtCantidadSurtir" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad a Surtir''</b> es necesario, por favor ingréselo." ValidationGroup="GrpEditGuardar" Enabled="false"></asp:RequiredFieldValidator>
|
<ajax:CalendarExtender runat="server" ID="CEFechaEntrega" TargetControlID="txtFechaEntrega" PopupButtonID="ImgFechaFinContrato" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCECantidadSurtir" runat="server" HighlightCssClass="vco" TargetControlID="RFVCantidadSurtir" Width="300px"></ajax:ValidatorCalloutExtender>
|
<asp:CompareValidator ID="CVImgFechaEntrega" runat="server" Format="dd/MM/yyyy" ControlToValidate="txtFechaEntrega" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpEditGuardar" Enabled="false"></asp:CompareValidator>
|
||||||
<asp:RangeValidator ID="RVCantidad" runat="server" ControlToValidate="TxtCantidadSurtir" Display="None" Type="Double" MinimumValue="0.01" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad Surtir''</b> debe ser mayor a cero y menor que la cantidad solicitada" ValidationGroup="GrpEditGuardar" Enabled="false"></asp:RangeValidator>
|
<ajax:ValidatorCalloutExtender ID="VCOImgFechaEntrega" runat="server" HighlightCssClass="vco" TargetControlID="CVImgFechaEntrega" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCECantidad" runat="server" HighlightCssClass="vco" TargetControlID="RVCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
|
|
||||||
<ajax:FilteredTextBoxExtender ID="FilCantidadSurtir" runat="server" TargetControlID="TxtCantidadSurtir" FilterType="Custom, Numbers" ValidChars="." />
|
<asp:RequiredFieldValidator ID="RFVtxtFechaEntrega" runat="server" ControlToValidate="txtFechaEntrega" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha entrega''</b> es necesario, por favor ingréselo." ValidationGroup="GrpEditGuardar" Enabled="false"></asp:RequiredFieldValidator>
|
||||||
</ItemTemplate>
|
<ajax:ValidatorCalloutExtender ID="VCtxtFechaEntrega" runat="server" HighlightCssClass="vco" TargetControlID="RFVtxtFechaEntrega" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
<ItemStyle Width="55px" />
|
</div>
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField ShowHeader="False" HeaderText="Fecha Entrega">
|
</ItemTemplate>
|
||||||
<EditItemTemplate>
|
<ItemStyle Width="100px" />
|
||||||
</EditItemTemplate>
|
</asp:TemplateField>
|
||||||
<ItemTemplate>
|
<asp:TemplateField ShowHeader="False" HeaderText="Precio Unitario">
|
||||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
<EditItemTemplate>
|
||||||
<asp:TextBox ID="txtFechaEntrega" runat="server" CssClass="form-control" CausesValidation="true" Style="width: 87px" MaxLength="10"></asp:TextBox>
|
</EditItemTemplate>
|
||||||
<span class="input-group-btn ">
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="ImgFechaFinContrato" Style="margin-left: -10px!important" class="btn default" Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
<asp:TextBox AutoComplete="off" ID="TxtPU" runat="server" Width="70px" Style="text-align: right" Text='<%# If(Not EsNuevo, Eval("PU", "{0:###,###,###.##}"), "") %>'></asp:TextBox>
|
||||||
</span>
|
<asp:RequiredFieldValidator ID="RFVTxtPU" runat="server" ControlToValidate="TxtPU" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Precio unitario''</b> es necesario, por favor ingréselo." ValidationGroup="GrpEditGuardar" Enabled="false"></asp:RequiredFieldValidator>
|
||||||
<ajax:MaskedEditExtender ID="MEEFechaEntrega" runat="server" TargetControlID="txtFechaEntrega" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
<ajax:ValidatorCalloutExtender ID="VCEPU" runat="server" HighlightCssClass="vco" TargetControlID="RFVTxtPU" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
<ajax:CalendarExtender runat="server" ID="CEFechaEntrega" TargetControlID="txtFechaEntrega" PopupButtonID="ImgFechaFinContrato" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
<ajax:FilteredTextBoxExtender ID="FilTxtPU" runat="server" TargetControlID="TxtPU" FilterType="Custom, Numbers" ValidChars="." />
|
||||||
<asp:CompareValidator ID="CVImgFechaEntrega" runat="server" Format="dd/MM/yyyy" ControlToValidate="txtFechaEntrega" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpEditGuardar" Enabled="false"></asp:CompareValidator>
|
</ItemTemplate>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCOImgFechaEntrega" runat="server" HighlightCssClass="vco" TargetControlID="CVImgFechaEntrega" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ItemStyle Width="70px" />
|
||||||
|
</asp:TemplateField>
|
||||||
<asp:RequiredFieldValidator ID="RFVtxtFechaEntrega" runat="server" ControlToValidate="txtFechaEntrega" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha entrega''</b> es necesario, por favor ingréselo." ValidationGroup="GrpEditGuardar" Enabled="false"></asp:RequiredFieldValidator>
|
<asp:TemplateField ShowHeader="False" HeaderText="Importe">
|
||||||
<ajax:ValidatorCalloutExtender ID="VCtxtFechaEntrega" runat="server" HighlightCssClass="vco" TargetControlID="RFVtxtFechaEntrega" Width="300px"></ajax:ValidatorCalloutExtender>
|
<EditItemTemplate>
|
||||||
</div>
|
</EditItemTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
</ItemTemplate>
|
<asp:TextBox AutoComplete="off" ID="TxtImporte" runat="server" Width="75px" ReadOnly="True" Style="text-align: right; border: none; background-color: #fff; background: transparent;" Text='<%# If(Not EsNuevo, Eval("Importe", "{0:###,###,###.##}"), "") %>'></asp:TextBox>
|
||||||
<ItemStyle Width="100px" />
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
<ItemStyle Width="75px" />
|
||||||
<asp:TemplateField ShowHeader="False" HeaderText="Precio Unitario">
|
</asp:TemplateField>
|
||||||
<EditItemTemplate>
|
<asp:TemplateField ShowHeader="False" HeaderText="Observación">
|
||||||
</EditItemTemplate>
|
<EditItemTemplate>
|
||||||
<ItemTemplate>
|
</EditItemTemplate>
|
||||||
<asp:TextBox AutoComplete="off" ID="TxtPU" runat="server" Width="70px" Style="text-align: right" Text='<%# If(Not EsNuevo, Eval("PU", "{0:###,###,###.##}"), "") %>'></asp:TextBox>
|
<ItemTemplate>
|
||||||
<asp:RequiredFieldValidator ID="RFVTxtPU" runat="server" ControlToValidate="TxtPU" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Precio unitario''</b> es necesario, por favor ingréselo." ValidationGroup="GrpEditGuardar" Enabled="false"></asp:RequiredFieldValidator>
|
<asp:TextBox AutoComplete="off" ID="TxtObservacion" runat="server" Width="75px" Style="text-align: right" Text=""></asp:TextBox>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCEPU" runat="server" HighlightCssClass="vco" TargetControlID="RFVTxtPU" Width="300px"></ajax:ValidatorCalloutExtender>
|
</ItemTemplate>
|
||||||
<ajax:FilteredTextBoxExtender ID="FilTxtPU" runat="server" TargetControlID="TxtPU" FilterType="Custom, Numbers" ValidChars="." />
|
<ItemStyle Width="100px" />
|
||||||
</ItemTemplate>
|
</asp:TemplateField>
|
||||||
<ItemStyle Width="70px" />
|
<%--<asp:BoundField DataField="Happy" HeaderText="Happy" />--%>
|
||||||
</asp:TemplateField>
|
</Columns>
|
||||||
<asp:TemplateField ShowHeader="False" HeaderText="Importe">
|
</asp:GridView>
|
||||||
<EditItemTemplate>
|
</div>
|
||||||
</EditItemTemplate>
|
</div>
|
||||||
<ItemTemplate>
|
<hr />
|
||||||
<asp:TextBox AutoComplete="off" ID="TxtImporte" runat="server" Width="75px" ReadOnly="True" Style="text-align: right; border: none; background-color: #fff; background: transparent;" Text='<%# If(Not EsNuevo, Eval("Importe", "{0:###,###,###.##}"), "") %>'></asp:TextBox>
|
<div class="row">
|
||||||
</ItemTemplate>
|
<div class="col-md-12" style="text-align: center">
|
||||||
<ItemStyle Width="75px" />
|
<asp:Button ID="BtnGuardar" runat="server" Text="Guardar" Visible="false" ValidationGroup="GrpEditGuardar" class="btn btn-primary" CausesValidation="true" />
|
||||||
</asp:TemplateField>
|
<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" />
|
||||||
<asp:TemplateField ShowHeader="False" HeaderText="Observación">
|
</div>
|
||||||
<EditItemTemplate>
|
</div>
|
||||||
</EditItemTemplate>
|
</ContentTemplate>
|
||||||
<ItemTemplate>
|
</asp:UpdatePanel>
|
||||||
<asp:TextBox AutoComplete="off" ID="TxtObservacion" runat="server" Width="75px" Style="text-align: right" Text=""></asp:TextBox>
|
</asp:Content>
|
||||||
</ItemTemplate>
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||||
<ItemStyle Width="100px" />
|
|
||||||
</asp:TemplateField>
|
|
||||||
<%--<asp:BoundField DataField="Happy" HeaderText="Happy" />--%>
|
|
||||||
</Columns>
|
|
||||||
</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>
|
<script>
|
||||||
function Ir() {
|
function Ir() {
|
||||||
try {
|
try {
|
||||||
parent.CargaDatosCotizaciones();
|
parent.CargaDatosCotizaciones();
|
||||||
parent.tb_remove();
|
parent.tb_remove();
|
||||||
|
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
console.log(ex.message);
|
console.log(ex.message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function ClientValidateFechaEntrega(source, arguments) {
|
function ClientValidateFechaEntrega(source, arguments) {
|
||||||
var txtCantidadSurtir = document.getElementById(source.txtCantidadSurtir);
|
var txtCantidadSurtir = document.getElementById(source.txtCantidadSurtir);
|
||||||
|
|
||||||
if (txtCantidadSurtir.value == 0) {
|
if (txtCantidadSurtir.value == 0) {
|
||||||
arguments.IsValid = false;
|
arguments.IsValid = false;
|
||||||
} else {
|
} else {
|
||||||
if (arguments.Value == "" || arguments.Value == "__/__/____")
|
if (arguments.Value == "" || arguments.Value == "__/__/____")
|
||||||
{ arguments.IsValid = false; }
|
{ arguments.IsValid = false; }
|
||||||
else
|
else
|
||||||
{ arguments.IsValid = true; }
|
{ arguments.IsValid = true; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function ClientValidatePU(source, arguments) {
|
function ClientValidatePU(source, arguments) {
|
||||||
|
|
||||||
arguments.IsValid = true
|
arguments.IsValid = true
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function isNumeric(n) {
|
function isNumeric(n) {
|
||||||
return !isNaN(parseFloat(n)) && isFinite(n);
|
return !isNaN(parseFloat(n)) && isFinite(n);
|
||||||
}
|
}
|
||||||
|
|
||||||
function CalculaImporte(Cant, tPU, Imp) {
|
function CalculaImporte(Cant, tPU, Imp) {
|
||||||
var Cantidad = ToDouble(Cant.value);
|
var Cantidad = ToDouble(Cant.value);
|
||||||
var PU = ToDouble(tPU.value);
|
var PU = ToDouble(tPU.value);
|
||||||
var Importe = Cantidad * PU;
|
var Importe = Cantidad * PU;
|
||||||
|
|
||||||
Imp.value = ToDouble(Importe);
|
Imp.value = ToDouble(Importe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function validacionRow(objControl, tipo) {
|
function validacionRow(objControl, tipo) {
|
||||||
|
|
||||||
var eRow;
|
var eRow;
|
||||||
|
|
||||||
if (tipo == 1) {
|
if (tipo == 1) {
|
||||||
eRow = $(objControl).parent().parent();
|
eRow = $(objControl).parent().parent();
|
||||||
} else if (tipo == 2) {
|
} else if (tipo == 2) {
|
||||||
eRow = $(objControl).parent().parent().parent();
|
eRow = $(objControl).parent().parent().parent();
|
||||||
}
|
}
|
||||||
|
|
||||||
var arregloControles = $(eRow).attr("data-controles").split(',');
|
var arregloControles = $(eRow).attr("data-controles").split(',');
|
||||||
@@ -379,55 +356,55 @@
|
|||||||
var controleslen = arregloControles.length;
|
var controleslen = arregloControles.length;
|
||||||
var validadoreslen = arregloValidadores.length;
|
var validadoreslen = arregloValidadores.length;
|
||||||
|
|
||||||
for (var i = 0; i < controleslen; i++) {
|
for (var i = 0; i < controleslen; i++) {
|
||||||
|
|
||||||
var controlName = String.format("{0}{1}", "#", arregloControles[i]);
|
var controlName = String.format("{0}{1}", "#", arregloControles[i]);
|
||||||
|
|
||||||
controlName = controlName.replace("'", "")
|
controlName = controlName.replace("'", "")
|
||||||
|
|
||||||
if ($(controlName).val().length > 0) {
|
if ($(controlName).val().length > 0) {
|
||||||
|
|
||||||
activarValidadores = true;
|
activarValidadores = true;
|
||||||
$(controlName).IsValid = false;
|
$(controlName).IsValid = false;
|
||||||
console.log('control con valor ' + $(controlName).val() + ' ' + $(controlName).val().length + ' ' + controlName);
|
console.log('control con valor ' + $(controlName).val() + ' ' + $(controlName).val().length + ' ' + controlName);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$(controlName).IsValid = true;
|
$(controlName).IsValid = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (activarValidadores) {
|
if (activarValidadores) {
|
||||||
|
|
||||||
for (var v = 0; v < validadoreslen; v++) {
|
for (var v = 0; v < validadoreslen; v++) {
|
||||||
|
|
||||||
var ValidatorName = arregloValidadores[v];
|
var ValidatorName = arregloValidadores[v];
|
||||||
var procesoCorrecto = true;
|
var procesoCorrecto = true;
|
||||||
|
|
||||||
ValidatorName = ValidatorName.replace("'", "");
|
ValidatorName = ValidatorName.replace("'", "");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
document.getElementById(ValidatorName).disabled = false;
|
document.getElementById(ValidatorName).disabled = false;
|
||||||
ValidatorEnable($get(ValidatorName), true);
|
ValidatorEnable($get(ValidatorName), true);
|
||||||
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|
||||||
console.log(ValidatorName + " - " + err.message);
|
console.log(ValidatorName + " - " + err.message);
|
||||||
procesoCorrecto = false;
|
procesoCorrecto = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (procesoCorrecto) {
|
if (procesoCorrecto) {
|
||||||
console.log('validadores activados');
|
console.log('validadores activados');
|
||||||
} else {
|
} else {
|
||||||
console.log('Error al activar validadores');
|
console.log('Error al activar validadores');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
for (var v = 0; v < validadoreslen; v++) {
|
for (var v = 0; v < validadoreslen; v++) {
|
||||||
|
|
||||||
var ValidatorName = arregloValidadores[v];
|
var ValidatorName = arregloValidadores[v];
|
||||||
var procesoCorrecto = true;
|
var procesoCorrecto = true;
|
||||||
@@ -435,40 +412,40 @@
|
|||||||
ValidatorName = ValidatorName.replace("'", "");
|
ValidatorName = ValidatorName.replace("'", "");
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
document.getElementById(ValidatorName).disabled = true;
|
document.getElementById(ValidatorName).disabled = true;
|
||||||
ValidatorEnable($get(ValidatorName), false);
|
ValidatorEnable($get(ValidatorName), false);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(ValidatorName + " - " + err.message);
|
console.log(ValidatorName + " - " + err.message);
|
||||||
procesoCorrecto = false;
|
procesoCorrecto = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (procesoCorrecto) {
|
if (procesoCorrecto) {
|
||||||
console.log('Validadores desactivados');
|
console.log('Validadores desactivados');
|
||||||
} else {
|
} else {
|
||||||
console.log('Error al desactivar validadores');
|
console.log('Error al desactivar validadores');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function FechaActualddMMyyy() {
|
function FechaActualddMMyyy() {
|
||||||
var today = new Date();
|
var today = new Date();
|
||||||
var dd = today.getDate();
|
var dd = today.getDate();
|
||||||
var mm = today.getMonth() + 1;
|
var mm = today.getMonth() + 1;
|
||||||
var yyyy = today.getFullYear();
|
var yyyy = today.getFullYear();
|
||||||
if (dd < 10) {
|
if (dd < 10) {
|
||||||
dd = '0' + dd;
|
dd = '0' + dd;
|
||||||
}
|
}
|
||||||
if (mm < 10) {
|
if (mm < 10) {
|
||||||
mm = '0' + mm;
|
mm = '0' + mm;
|
||||||
}
|
}
|
||||||
return today = dd + '/' + mm + '/' + yyyy;
|
return today = dd + '/' + mm + '/' + yyyy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|||||||
@@ -2,13 +2,14 @@
|
|||||||
Option Explicit On
|
Option Explicit On
|
||||||
|
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
|
Imports System.Net
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
|
|
||||||
Partial Class PopOCCotizacionesDetalle
|
Partial Class PopOCCotizacionesDetalle
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
|
|
||||||
#Region "Propiedades"
|
#Region "Propiedades"
|
||||||
|
|
||||||
Friend Property EsNuevo As Boolean
|
Friend Property EsNuevo As Boolean
|
||||||
Get
|
Get
|
||||||
EsNuevo = DirectCast(ViewState("EsNuevo"), Boolean)
|
EsNuevo = DirectCast(ViewState("EsNuevo"), Boolean)
|
||||||
@@ -43,11 +44,20 @@ Partial Class PopOCCotizacionesDetalle
|
|||||||
Set(ByVal value As DataTable)
|
Set(ByVal value As DataTable)
|
||||||
ViewState("DtDetalle") = value
|
ViewState("DtDetalle") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
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
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
|
|
||||||
If Not Page.IsPostBack Then
|
If Not Page.IsPostBack Then
|
||||||
@@ -76,9 +86,9 @@ Partial Class PopOCCotizacionesDetalle
|
|||||||
BtnEliminar.Visible = True
|
BtnEliminar.Visible = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
#Region " INICIALIZA VALORES - CARGA COMBOS "
|
#Region " INICIALIZA VALORES - CARGA COMBOS "
|
||||||
Protected Sub CargaProveedoresClasificaciones()
|
Protected Sub CargaProveedoresClasificaciones()
|
||||||
CboClasificacionProveedor.DataSource = GlobalDTProveedorClasificacion(UsuarioActual.CveEmpresa)
|
CboClasificacionProveedor.DataSource = GlobalDTProveedorClasificacion(UsuarioActual.CveEmpresa)
|
||||||
@@ -97,11 +107,11 @@ Partial Class PopOCCotizacionesDetalle
|
|||||||
Protected Sub CargaMonedas()
|
Protected Sub CargaMonedas()
|
||||||
ddlMoneda.DataSource = GlobalDTMonedas()
|
ddlMoneda.DataSource = GlobalDTMonedas()
|
||||||
ddlMoneda.DataBind()
|
ddlMoneda.DataBind()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
#Region "C A R G A D A T O S "
|
#Region "C A R G A D A T O S "
|
||||||
Private Sub CargaOCDetalle(pCveOrden As Integer)
|
Private Sub CargaOCDetalle(pCveOrden As Integer)
|
||||||
Dim objOC As New ClsOC
|
Dim objOC As New ClsOC
|
||||||
@@ -129,11 +139,10 @@ Partial Class PopOCCotizacionesDetalle
|
|||||||
TxtFecha.Text = objCotizacion.Fecha.ToShortDateString
|
TxtFecha.Text = objCotizacion.Fecha.ToShortDateString
|
||||||
ddlMoneda.SelectedValue = objCotizacion.CveMoneda.ToString
|
ddlMoneda.SelectedValue = objCotizacion.CveMoneda.ToString
|
||||||
TxtDiasCredito.Text = objCotizacion.DiasCredito.ToString
|
TxtDiasCredito.Text = objCotizacion.DiasCredito.ToString
|
||||||
|
Adjunto = objCotizacion.Adjunto
|
||||||
If objCotizacion.Adjunto <> "" Then
|
If objCotizacion.Adjunto <> "" Then
|
||||||
HplArchivo.NavigateUrl = String.Format("/Empresas/{0}/Cotizaciones/{1}", UsuarioActual.CveEmpresa, objCotizacion.Adjunto)
|
'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, ""))
|
LnkArchivo.Visible = True
|
||||||
HplArchivo.Visible = True
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If objCotizacion.GetCotizacionesDetalle(pCveCotizacion) Then
|
If objCotizacion.GetCotizacionesDetalle(pCveCotizacion) Then
|
||||||
@@ -155,7 +164,7 @@ Partial Class PopOCCotizacionesDetalle
|
|||||||
TxtDiasCredito.Enabled = False
|
TxtDiasCredito.Enabled = False
|
||||||
TxtFecha.Enabled = False
|
TxtFecha.Enabled = False
|
||||||
TxtFolio.Enabled = False
|
TxtFolio.Enabled = False
|
||||||
FUArchivo.Enabled = False
|
'FUArchivo.Enabled = False
|
||||||
|
|
||||||
If UsuarioActual.TienePermisoProceso(146) Then
|
If UsuarioActual.TienePermisoProceso(146) Then
|
||||||
GvDC.Enabled = True
|
GvDC.Enabled = True
|
||||||
@@ -164,61 +173,71 @@ Partial Class PopOCCotizacionesDetalle
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
BtnGuardar.Enabled = False
|
BtnGuardar.Enabled = False
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
#Region " GUARDAR "
|
#Region " GUARDAR "
|
||||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
|
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
|
||||||
|
|
||||||
Dim objCotizacion As New ClsOC
|
Dim objCotizacion As New ClsOC
|
||||||
objCotizacion.IniciaTransacSQL()
|
objCotizacion.IniciaTransacSQL()
|
||||||
Dim TieneError = False
|
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
|
Try
|
||||||
If EsNuevo Then
|
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 objCotizacion.AddCotizacion(CveOrdenCompra, CboProveedores.SelectedValue.ToEntero, -1, TxtFolio.Text, TxtFecha.Text, FileExtension, ddlMoneda.SelectedValue.ToEntero,
|
||||||
If FUArchivo.HasFile Then
|
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
|
'verificar que exista el directorio
|
||||||
System.IO.Directory.CreateDirectory(String.Format("{0}/Empresas/{1}/Cotizaciones/", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa))
|
If Not System.IO.Directory.Exists(String.Format("{0}/Empresas/{1}/Cotizaciones/", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa)) Then
|
||||||
End If
|
System.IO.Directory.CreateDirectory(String.Format("{0}/Empresas/{1}/Cotizaciones/", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa))
|
||||||
FUArchivo.SaveAs(String.Format("{0}/Empresas/{1}/Cotizaciones/{2}{3}", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa, objCotizacion.CveCotizacion, IO.Path.GetExtension(FUArchivo.FileName)))
|
End If
|
||||||
|
|
||||||
|
If Filename <> "" Then
|
||||||
|
Filename.FilesMove(objCotizacion.CveCotizacion.ToString(), String.Format("Empresas\{0}\Cotizaciones", UsuarioActual.CveEmpresa))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
For Each dr As GridViewRow In GvDC.Rows
|
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
|
If TieneError = True Then Exit For
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
Else
|
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
|
'verificar que exista el directorio
|
||||||
|
If Not System.IO.Directory.Exists(String.Format("{0}/Empresas/{1}/Cotizaciones/", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa)) Then
|
||||||
If FUArchivo.HasFile Then
|
System.IO.Directory.CreateDirectory(String.Format("{0}/Empresas/{1}/Cotizaciones/", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa))
|
||||||
'verificar que exista el directorio
|
End If
|
||||||
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))
|
If Filename <> "" Then
|
||||||
End If
|
Filename.FilesMove(CveCotizacion.ToString(), String.Format("Empresas\{0}\Cotizaciones", UsuarioActual.CveEmpresa))
|
||||||
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)
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
For Each dr As GridViewRow In GvDC.Rows
|
For Each dr As GridViewRow In GvDC.Rows
|
||||||
If dr.DataKey("CveCotizacionDetalle").ToEntero > 0 Then
|
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)
|
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
|
Else
|
||||||
|
|
||||||
Dim strTemp = dr.DataKey("CveOrdenCompraDetalle").ToString
|
Dim strTemp = dr.DataKey("CveOrdenCompraDetalle").ToString
|
||||||
|
|
||||||
If dr.FCTextBox("txtCantidadSurtir").Text.ToString.ToDouble > 0 Then
|
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)
|
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
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
If TieneError = True Then Exit For
|
If TieneError = True Then Exit For
|
||||||
Next
|
Next
|
||||||
@@ -229,38 +248,25 @@ Partial Class PopOCCotizacionesDetalle
|
|||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
TieneError = True
|
TieneError = True
|
||||||
objCotizacion.RollBack()
|
|
||||||
OnError("Se presento un error al guardar la cotización", ex)
|
OnError("Se presento un error al guardar la cotización", ex)
|
||||||
|
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If Not TieneError Then
|
If Not TieneError Then
|
||||||
|
|
||||||
objCotizacion.Commit()
|
objCotizacion.Commit()
|
||||||
Alert(If(EsNuevo, "Cotización Guardada.", "Cotización Actualizada."), TipoMensaje.MsgInformacion)
|
Alert(If(EsNuevo, "Cotización Guardada.", "Cotización Actualizada."), TipoMensaje.MsgInformacion)
|
||||||
Else
|
Else
|
||||||
Try
|
objCotizacion.RollBack()
|
||||||
objCotizacion.RollBack()
|
|
||||||
Catch ex As Exception
|
|
||||||
OnError("Error al intetar hace RollBack", ex)
|
|
||||||
End Try
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
objCotizacion.Dispose()
|
objCotizacion.Dispose()
|
||||||
RegistraScript("Ir();")
|
RegistraScript("Ir();")
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#Region " ELIMINAR "
|
#Region " ELIMINAR "
|
||||||
Private Sub BtnEliminar_Click(sender As Object, e As EventArgs) Handles BtnEliminar.Click
|
Private Sub BtnEliminar_Click(sender As Object, e As EventArgs) Handles BtnEliminar.Click
|
||||||
Dim objCotizacion As New ClsOC
|
Dim objCotizacion As New ClsOC
|
||||||
@@ -274,10 +280,10 @@ Partial Class PopOCCotizacionesDetalle
|
|||||||
|
|
||||||
objCotizacion.Dispose()
|
objCotizacion.Dispose()
|
||||||
RegistraScript("Ir();")
|
RegistraScript("Ir();")
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
#Region " G V D "
|
#Region " G V D "
|
||||||
Protected Sub GvD_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDC.RowDataBound
|
Protected Sub GvD_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDC.RowDataBound
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
@@ -365,10 +371,30 @@ Partial Class PopOCCotizacionesDetalle
|
|||||||
'e.Row.Attributes.Add("data-validadores", ValidadoresId)
|
'e.Row.Attributes.Add("data-validadores", ValidadoresId)
|
||||||
|
|
||||||
|
|
||||||
Dim asdasdasd As String = ""
|
Dim asdasdasd As String = ""
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#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
|
End Class
|
||||||
|
|||||||
@@ -495,7 +495,7 @@
|
|||||||
if (this.checked) {
|
if (this.checked) {
|
||||||
total = total + 1;
|
total = total + 1;
|
||||||
}
|
}
|
||||||
if (total == 5) {
|
if (total == 7) {
|
||||||
alert("Ya tiene el maximo numero de comandos favoritos para asignar.");
|
alert("Ya tiene el maximo numero de comandos favoritos para asignar.");
|
||||||
this.checked = false;
|
this.checked = false;
|
||||||
return false;
|
return false;
|
||||||
@@ -513,9 +513,22 @@
|
|||||||
}
|
}
|
||||||
for (let i = thantes; i < thclick; i++) {
|
for (let i = thantes; i < thclick; i++) {
|
||||||
let th = $('<th></th>');
|
let th = $('<th></th>');
|
||||||
let input = $('<input type="checkbox" class="chkAll">')
|
let input = $('<input type="checkbox" class="chkAll" onclick="verficaFavoritos();">')
|
||||||
th.append(input);
|
th.append(input);
|
||||||
|
var total = 0;
|
||||||
input.click(function () {
|
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"))
|
$('#' + gv + ' tr td:nth-child(' + i + ') input[type="checkbox"]:not([disabled="disabled"])').prop("checked", input.is(":checked"))
|
||||||
});
|
});
|
||||||
tr.append(th);
|
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.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", ""))
|
||||||
Timbre.Comprobante.Folio = Obj.Folio.ToString
|
Timbre.Comprobante.Folio = Obj.Folio.ToString
|
||||||
Timbre.Comprobante.Serie = Obj.Serie
|
Timbre.Comprobante.Serie = Obj.Serie
|
||||||
Timbre.Comprobante.Fecha = Obj.Fecha
|
Timbre.Comprobante.Fecha = Obj.FechaCP
|
||||||
Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
|
Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
|
||||||
Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
|
Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
|
||||||
Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
|
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.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", ""))
|
||||||
Timbre.Comprobante.Folio = Obj.Folio.ToString
|
Timbre.Comprobante.Folio = Obj.Folio.ToString
|
||||||
Timbre.Comprobante.Serie = Obj.Serie
|
Timbre.Comprobante.Serie = Obj.Serie
|
||||||
Timbre.Comprobante.Fecha = Obj.Fecha
|
Timbre.Comprobante.Fecha = Obj.FechaCP
|
||||||
Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
|
Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
|
||||||
Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
|
Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
|
||||||
Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
|
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.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", ""))
|
||||||
Timbre.Comprobante.Folio = Obj.Folio.ToString
|
Timbre.Comprobante.Folio = Obj.Folio.ToString
|
||||||
Timbre.Comprobante.Serie = Obj.Serie
|
Timbre.Comprobante.Serie = Obj.Serie
|
||||||
Timbre.Comprobante.Fecha = Obj.Fecha
|
Timbre.Comprobante.Fecha = Obj.FechaCP
|
||||||
Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
|
Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
|
||||||
Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
|
Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
|
||||||
Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
|
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.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", ""))
|
||||||
Timbre.Comprobante.Folio = Obj.Folio.ToString
|
Timbre.Comprobante.Folio = Obj.Folio.ToString
|
||||||
Timbre.Comprobante.Serie = Obj.Serie
|
Timbre.Comprobante.Serie = Obj.Serie
|
||||||
Timbre.Comprobante.Fecha = Obj.Fecha
|
Timbre.Comprobante.Fecha = Obj.FechaCP
|
||||||
Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
|
Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
|
||||||
Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
|
Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
|
||||||
Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
|
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