This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2019-11-11 16:53:54 -07:00
50 changed files with 6892 additions and 4988 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -192,7 +192,7 @@ Public Class ClsClasificaciones
End Function
Public Function AddClasificaciones(Clasificacion As String, Codigo As String, IdCuentaGasto As Integer, CuentaGasto As String, IdCuentaCostos As Integer, CuentaCostos As String, IdCuentaIngreso As Integer, CuentaIngreso As String, CveCategoria As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional RequiereSerieLote As Integer = 0, Optional UsoClasificacion As Integer = -1, Optional CveSATPS As Integer = -1, Optional RequiereAFCompra As Boolean = True, Optional RequiereAFInsumo As Boolean = True, Optional RequierePersonal As Boolean = True,
Optional EsAcumulador As Boolean = False, Optional TopVentas As Boolean = False, Optional TopCompras As Boolean = False) As Boolean
Optional EsAcumulador As Boolean = False, Optional TopVentas As Boolean = False, Optional TopCompras As Boolean = False, Optional PrecioBaseCosto As Decimal = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_ClasificacionesAdd")
@@ -227,6 +227,7 @@ Public Class ClsClasificaciones
.Add("@EsAcumulador", SqlDbType.Bit).Value = EsAcumulador
.Add("@TopCompras", SqlDbType.Bit).Value = TopCompras
.Add("@TopVentas", SqlDbType.Bit).Value = TopVentas
.Add("@PrecioBaseCosto", SqlDbType.Money).Value = PrecioBaseCosto
End With
@@ -300,7 +301,7 @@ Public Class ClsClasificaciones
End Function
Public Function UpdateClasificacion(Clasificacion As String, Codigo As String, IdCuentaGasto As Integer, CuentaGasto As String, IdCuentaCostos As Integer, CuentaCostos As String, IdCuentaIngresos As Integer, CuentaIngresos As String, Estatus As Boolean, Afectable As Boolean, CveCategoria As Integer, CveUsuario As Integer, CveClasificacion As Integer, Optional RequiereSerieLote As Integer = 0, Optional UsoClasificacion As Integer = -1, Optional CveSATPS As Integer = -1, Optional RequiereAFCompra As Boolean = True, Optional RequiereAFInsumo As Boolean = True, Optional RequierePersonal As Boolean = True,
Optional EsAcumulador As Boolean = False, Optional TopVentas As Boolean = False, Optional TopCompras As Boolean = False) As Boolean
Optional EsAcumulador As Boolean = False, Optional TopVentas As Boolean = False, Optional TopCompras As Boolean = False, Optional PrecioBaseCosto As Decimal = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_ClasificacionesUpdate")
@@ -335,6 +336,7 @@ Public Class ClsClasificaciones
.Add("@EsAcumulador", SqlDbType.Bit).Value = EsAcumulador
.Add("@TopCompras", SqlDbType.Bit).Value = TopCompras
.Add("@TopVentas", SqlDbType.Bit).Value = TopVentas
.Add("@PrecioBaseCosto", SqlDbType.Money).Value = PrecioBaseCosto
End With

View File

@@ -7360,20 +7360,30 @@ Public Class ClsContPAQi
StrSQL.Append(" AND (@CveUsuario = -1 OR P.IdUsuario = @CveUsuario) ")
StrSQL.Append(" END; ")
StrSQL.Append(" DECLARE @DtProv TABLE (IdPoliza INT INDEX IX1 CLUSTERED) ")
StrSQL.Append(" IF @CveTipoProveedor > 0 ")
StrSQL.Append(" BEGIN ")
StrSQL.Append(" INSERT INTO @DtProv SELECT PP.IdPoliza
FROM SERVIDOR.Ventas.dbo.Conta_PrePolizasDetalle PPD ")
StrSQL.Append(" INNER JOIN SERVIDOR.Ventas.dbo.Conta_PrePolizas PP ON PP.CvePrePoliza = PPD.CvePrePoliza
INNER JOIN SERVIDOR.Ventas.dbo.Comp_Proveedores Prov ON Prov.CveProveedor = PPD.CveProveedor and PP.IdPoliza > 0
AND Prov.CveTipoProveedor = @CveTipoProveedor AND Prov.CveEmpresa = @CveEmpresa
AND PP.Fecha >= @Inicio AND PP.Fecha <= @Fin")
StrSQL.Append(" END; ")
StrSQL.Append(" SELECT P.Id,P.Fecha,T.Nombre as TipoPoliza, MP.IdPoliza, P.IdUsuario, P.Concepto AS ConceptoPoliza,P.Cargos,P.Abonos,P.Folio ,P.Folio AS Numero , SN.Nombre AS SegNeg, MP.Concepto, ")
StrSQL.Append(" CASE WHEN ISNUMERIC(C.CODIGO) = 1 THEN FORMAT(CAST (C.CODIGO AS FLOAT),(SELECT REPLACE(Mascarilla,'X','0') FROM Parametros)) ELSE C.CODIGO END AS CuentaFormato , MP.TipoMovto ")
StrSQL.Append(" ,C.Nombre AS Cuenta ,MP.Referencia AS Referencia, CASE WHEN MP.TipoMovto=0 THEN MP.Importe ELSE 0 END AS Cargo ")
StrSQL.Append(" , CASE WHEN MP.TipoMovto=1 THEN MP.Importe ELSE 0 END AS Abono,U.Nombre AS UsuarioRegistro ")
StrSQL.Append(" FROM Polizas P ")
StrSQL.Append(" LEFT JOIN MovimientosPoliza MP ON P.Id= MP.IdPoliza ")
StrSQL.Append(" LEFT JOIN SERVIDOR.Ventas.dbo.Conta_PrePolizasDetalle PPD ON PPD.CvePrePolizaDetalle = MP.CvePrePolizaDetalle ")
StrSQL.Append(" LEFT JOIN SERVIDOR.Ventas.dbo.Conta_PrePolizas PP ON PP.CvePrePoliza = PPD.CvePrePoliza ")
StrSQL.Append(" LEFT JOIN SERVIDOR.Ventas.dbo.Usuarios U ON U.CveUsuario = P.IdUsuario ")
StrSQL.Append(" LEFT JOIN Cuentas C ON C.Id = MP.IdCuenta ")
StrSQL.Append(" LEFT JOIN TiposPolizas T ON T.Id = P.TipoPol ")
StrSQL.Append(" LEFT JOIN SegmentosNegocio SN ON SN.Id = MP.IdSegNeg ")
StrSQL.Append(" WHERE P.Fecha >= @Inicio AND P.Fecha <= @Fin ")
StrSQL.Append(" AND (@CveTipoProveedor = -1 OR PPD.CveProveedor in (SELECT CveProveedor FROM SERVIDOR.Ventas.dbo.Comp_Proveedores POV WHERE POV.CveEmpresa = @CveEmpresa AND POV.CveTipoProveedor = @CveTipoProveedor)) ")
StrSQL.Append(" AND (@CveTipoProveedor = -1 OR ( MP.IdPoliza IN (SELECT IdPoliza FROM @DtProv))) ")
StrSQL.Append(" AND (@FolioI = -1 OR P.Folio >= @FolioI) ")
StrSQL.Append(" AND (@FolioF = -1 OR P.Folio <= @FolioF) ")
StrSQL.Append(" AND (@TipoP=-1 OR @TipoP =P.TipoPol) ")

View File

@@ -301,7 +301,8 @@ Public Class ClsInventarios
Return Retorno
End Function
Public Function GetRepAlmacenes(FechaInicio As String, FechaFin As String, CveEmpresa As Integer, CveTipoAlmacen As String, Contabilizable As Integer, Inventariable As Boolean,
Optional SoloMovimientosContables As Boolean = False, Optional Almacenes As String = "-1", Optional CveSubProyecto As Integer = -1) As Boolean
Optional SoloMovimientosContables As Boolean = False, Optional Almacenes As String = "-1", Optional CveSubProyecto As Integer = -1,
Optional CveUsuarioConsulta As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Inv_AlmacenesRepGet")
@@ -314,7 +315,8 @@ Public Class ClsInventarios
.Add("@SoloMovimientosContables", SqlDbType.Bit).Value = SoloMovimientosContables
.Add("@Modalidad", SqlDbType.Int).Value = Contabilizable
.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
Try
SqlAdapter.Fill(Data)
@@ -325,7 +327,8 @@ Public Class ClsInventarios
Return Retorno
End Function
Public Function GetRepAlmacenesPeriodo(FechaCorte As Date, CveEmpresa As Integer, CveTipoAlmacen As String, Contabilizable As Integer, Inventariable As Boolean, VerEn As Integer) As Boolean
Public Function GetRepAlmacenesPeriodo(FechaCorte As Date, CveEmpresa As Integer, CveTipoAlmacen As String, Contabilizable As Integer, Inventariable As Boolean, VerEn As Integer,
Optional Almacenes As String = "-1", Optional CveSubProyecto As Integer = -1, Optional CveUsuarioConsulta As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Inv_AlmacenesPeriodoRepGet")
@@ -336,6 +339,9 @@ Public Class ClsInventarios
.Add("@Inventariable", SqlDbType.Bit).Value = Inventariable
.Add("@Modalidad", SqlDbType.Int).Value = Contabilizable
.Add("@VerEn", SqlDbType.Int).Value = VerEn
.Add("@Almacenes", SqlDbType.VarChar).Value = Almacenes
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
End With
Try
SqlAdapter.Fill(Data)

View File

@@ -130,6 +130,25 @@ Public Class ClsTSoft
OnError("Ocurrió un Error al obtener la información para PENSKE.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
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
End Function

View File

@@ -5041,7 +5041,21 @@ Namespace Modelos
Public Property Inv_CveEstatusEntrega As Integer
Public Property Inv_EstatusEntrega As String
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 EstatusFactura As String
Public Property SeTimbro As String
@@ -8486,6 +8500,8 @@ Namespace Modelos
FormatoFactura = ""
SubProyecto = ""
Correo = ""
UTCOffsetVerano = -7
UTCOffsetInvierno = -7
End Sub
Public Sub New()
MyBase.New()
@@ -8502,9 +8518,11 @@ Namespace Modelos
Estado = Row("Estado").ToString
Pais = Row("Pais").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
'SetValues(Row)
End Sub
Public ReadOnly Property LugarExp As String
@@ -8531,7 +8549,9 @@ Namespace Modelos
Public Property SubProyecto As String
Public Property Correo 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

View File

@@ -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

View File

@@ -434,7 +434,7 @@ Namespace Extensiones
Return retorno
End Function
<Runtime.CompilerServices.Extension()>
Public Function FilesMove(oldName As String, newName As String, newDirectorio As String) As Boolean
Public Function FilesMove(oldName As String, newName As String, newDirectorio As String, Optional Sobreescribir As Boolean = False) As Boolean
Dim retorno As Boolean = True
Dim directorioOld As New StringBuilder
Dim directorioNew As New StringBuilder
@@ -451,7 +451,7 @@ Namespace Extensiones
directorioNew.Append(newName)
Try
My.Computer.FileSystem.MoveFile(directorioOld.ToString, directorioNew.ToString)
My.Computer.FileSystem.MoveFile(directorioOld.ToString, directorioNew.ToString, Sobreescribir)
Catch ex As Exception
Alert("", String.Format("{0} code[FilesMove]", ex.Message), TipoMensaje.MsgAdvertencia)
retorno = False
@@ -3100,6 +3100,31 @@ Namespace Extensiones
Dim origin As DateTime = New DateTime(1970, 1, 1, 0, 0, 0, 0)
Return origin.AddSeconds(timestamp)
End Function
<Runtime.CompilerServices.Extension()>
Public Function GetLastWeekdayOfMonth(ByVal fecha As DateTime, day As DayOfWeek) As DateTime
Dim lastDayOfMonth As DateTime = New DateTime(fecha.Year, fecha.Month, 1).AddMonths(1).AddDays(-1)
Dim wantedDay As Integer = CInt(day)
Dim lastDay As Integer = CInt(lastDayOfMonth.DayOfWeek)
Return lastDayOfMonth.AddDays(If(lastDay >= wantedDay, wantedDay - lastDay, wantedDay - lastDay - 7))
End Function
<Runtime.CompilerServices.Extension()>
Public Function GetFirstWeekdayOfMonth(ByVal fecha As DateTime, day As DayOfWeek) As DateTime
Dim result As DateTime = New DateTime(fecha.Year, fecha.Month, 1)
While result.DayOfWeek <> day
result = result.AddDays(1)
End While
Return result
End Function
<Runtime.CompilerServices.Extension()>
Public Function EsHorarioVerano(ByVal fecha As DateTime) As Boolean
Dim Year As Integer = fecha.Year
Dim FechaI As DateTime = New DateTime(Year, 4, 1, 0, 0, 0).GetFirstWeekdayOfMonth(DayOfWeek.Sunday) 'PRIMER DOMINGO DE ABRIL
Dim FechaF As DateTime = New DateTime(Year, 10, 1, 23, 59, 59).GetLastWeekdayOfMonth(DayOfWeek.Sunday) 'ULTIMO DOMINGO DE OCTUBRE
Return fecha >= FechaI AndAlso fecha <= FechaF
End Function
End Module
#End Region

View File

@@ -416,7 +416,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", ""))
Timbre.Comprobante.Folio = Obj.Folio.ToString
Timbre.Comprobante.Serie = Obj.Serie
Timbre.Comprobante.Fecha = Obj.Fecha
Timbre.Comprobante.Fecha = Obj.FechaCP
Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT

View File

@@ -1,5 +1,6 @@
<%@ WebHandler Language="VB" Class="SIGPolizaVirtual" %>
Imports Fluent
Imports System
Imports System.Web
Imports System.Net.Http
@@ -9,61 +10,187 @@ Imports Newtonsoft.Json
Imports Newtonsoft.Json.Linq
Imports Extensiones
Imports System.IO
Imports System.Runtime.CompilerServices
Public Class SIGPolizaVirtual : Implements IHttpHandler, IRequiresSessionState
Protected ReadOnly Property User As String = "cslth.2809@jcilink.com"
Protected ReadOnly Property Password As String = "ff31580a95f36b51ad27f970428b77a5a9245076"
#Region "U S U A R I O - T O K E N"
Private Function ValidaUsuarioSistema(CveEmpresa As Integer, Optional CveUsuario As Integer = 100) As Usuario
Dim UsuarioToken As Usuario = Nothing
Dim ObjUsuarios As New ClsSisUsuarios
If ObjUsuarios.GetUsuarios(CveUsuario) Then
If ObjUsuarios.DtResultados.Rows.Count > 0 Then
Dim Usuario = ObjUsuarios.DtResultados.Rows(0)("Usuario").ToString()
Dim Contrasenia = ObjUsuarios.DtResultados.Rows(0)("Contraseña").ToString()
UsuarioToken = ObjUsuarios.ValidaUsuario(Usuario, Contrasenia, IMEI, CveEmpresa)
UsuarioToken.CveEmpresa = CveEmpresa
CreaObjetoEmpresa(UsuarioToken)
End If
End If
ObjUsuarios.Dispose()
Return UsuarioToken
End Function
Private Sub CreaObjetoEmpresa(ByRef UsuarioToken As Usuario)
Dim ObjEmpresa As New ClsSisEmpresas()
If ObjEmpresa.GetEmpresas(UsuarioToken.CveEmpresa, "-1", "-1", "-1", "-1") Then
If ObjEmpresa.GetEmpresasFuncionalidades(UsuarioToken.CveEmpresa) Then
Dim dttmp As Data.DataTable = ObjEmpresa.DtResultados
Dim EmpresasFuncionalidades As New HybridDictionary
For Each Row As Data.DataRow In dttmp.Rows
EmpresasFuncionalidades.Add(Convert.ToInt32(Row("CveFuncionalidad")), Row("Valor").ToString)
Next
ObjEmpresa.Empresa.SetFuncionalidades(EmpresasFuncionalidades)
End If
UsuarioToken.Empresa = ObjEmpresa.Empresa
End If
ObjEmpresa.Dispose()
End Sub
#End Region
Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
context.Response.ContentType = "application/json"
EnviarPolizaVentaWS(context)
EnviarPolizaVentaLTHWSD(context)
EnviarPolizaIndicadores(context)
Dim usuario = ValidaUsuarioSistema(140, 100)
Dim ObjFactura As New Modelos.Factura(usuario, 898028, 140)
GeneraPolizaVentaWS(context, ObjFactura)
'GeneraPolizaVentaLTHWSD(context)
'GeneraIndicadores(context)
End Sub
Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable
Get
Return False
End Get
End Property
Private Sub EnviarPolizaVentaLTHWSD(ByVal context As HttpContext)
Protected Sub GeneraPolizaVentaWS(ByVal context As HttpContext, ObjFactura As Modelos.Factura)
Dim obj As New MPolizaVentaWS
'DATOS DEL CLIENTE
obj.customer_name = ObjFactura.Cliente.Nombre
obj.customer_last_name1 = ""
obj.customer_last_name2 = ""
obj.customer_birthday = Nothing
obj.customer_phone = ObjFactura.Cliente.Telefono
obj.customer_email = ObjFactura.Cliente.Mail
obj.customer_gender = "03" 'OTRO GENERO
obj.customer_advertising = False
obj.customer_car_brand = "00"
obj.customer_car_model = "00"
obj.customer_car_year = ObjFactura.Fecha.Year
'DATOS DE VENTA
obj.sale_date = Now
obj.sale_paidby = "01"
obj.sale_type = "01" 'PISO
obj.sale_type_service = "01" 'PARTICULAR
obj.sale_total = ObjFactura.Total
obj.sale_discount = ObjFactura.SubTotal
obj.sale_id = GuidGenerator.GenerateTimeBasedGuid().ToString()
'Dim PS = ObjFactura.DtDetalle.Rows(0)
'DATOS DEL PRODUCTO
obj.product_code = "174925"
obj.product_unique_code = "65047187"
obj.product_sale_type = "02" 'AJUSTE
'DATOS DE USADO
obj.used_product = True
obj.used_brand = "01"
obj.used_bci = "25"
obj.used_month = 1
obj.used_year = 2015
obj.used_sale_date = ObjFactura.Fecha
EnviarPolizaVentaWS(context, obj)
End Sub
Protected Sub GeneraPolizaVentaLTHWSD(ByVal context As HttpContext, ObjFactura As Modelos.Factura)
Dim obj As New MPolizaVentaLTHWSD
'DATOS DEL CLIENTE
obj.customer_name = "JOSE ENRIQUE"
obj.customer_last_name1 = "VIZCARA"
obj.customer_last_name2 = "RENDON"
obj.customer_birthday = Now
obj.customer_phone = "8186545256"
obj.customer_email = "mail@mail.com"
obj.customer_gender = "02"
obj.customer_advertising = False
obj.customer_car_brand = "02"
obj.customer_car_model = "741"
obj.customer_car_year = 2015
'DATOS DE VENTA
obj.sale_date = Now
obj.sale_paidby = "01"
obj.sale_type = "01"
obj.sale_type_service = "01"
obj.sale_discount = 0
obj.sale_id = GuidGenerator.GenerateTimeBasedGuid().ToString()
'DATOS DEL PRODUCTO
obj.product_code = "174925"
obj.product_unique_code = "65047187"
obj.product_sale_type = "01"
'DATOS DE USADO
obj.used_product = True
obj.used_brand = "01"
obj.used_bci = "25"
obj.used_month = 1
obj.used_year = 2015
obj.used_sale_date = Now
EnviarPolizaVentaLTHWSD(context, obj)
End Sub
Protected Sub GeneraIndicadores(ByVal context As HttpContext)
Dim obj As New MIndicador(True)
EnviarPolizaIndicadores(context, obj)
End Sub
Protected Sub EnviarPolizaVentaLTHWSD(ByVal context As HttpContext, obj As MPolizaVentaLTHWSD)
Dim Retorno As String = "[]"
Try
Using wc As New HttpClient()
Dim Url = New Uri("http://polizavirtual.com.mx/lthwsd/api/Venta")
Dim Parametros = New List(Of KeyValuePair(Of String, String))
Parametros.Add(New KeyValuePair(Of String, String)("User", User))
Parametros.Add(New KeyValuePair(Of String, String)("password", Password))
Parametros.Add(New KeyValuePair(Of String, String)("customer_name", "JOSE ENRIQUE VIZCARA RENDON"))
Parametros.Add(New KeyValuePair(Of String, String)("customer_last_name1", "Prueba"))
Parametros.Add(New KeyValuePair(Of String, String)("customer_last_name2", "Prueba"))
Parametros.Add(New KeyValuePair(Of String, String)("customer_birthday", "1900-01-01 00:00:00"))
Parametros.Add(New KeyValuePair(Of String, String)("customer_phone", "5417543010"))
Parametros.Add(New KeyValuePair(Of String, String)("customer_email", "elunap@gmail.com"))
Parametros.Add(New KeyValuePair(Of String, String)("customer_gender", "02"))
Parametros.Add(New KeyValuePair(Of String, String)("customer_advertising", "False"))
Parametros.Add(New KeyValuePair(Of String, String)("sale_date", "2018-07-24 00:00:00"))
Parametros.Add(New KeyValuePair(Of String, String)("sale_paidby", "01"))
Parametros.Add(New KeyValuePair(Of String, String)("sale_type", "01"))
Parametros.Add(New KeyValuePair(Of String, String)("sale_type_service", "01"))
Parametros.Add(New KeyValuePair(Of String, String)("product_code", "174200"))
Parametros.Add(New KeyValuePair(Of String, String)("product_unique_code", "65047187"))
Parametros.Add(New KeyValuePair(Of String, String)("product_sale_type", "01"))
Parametros.Add(New KeyValuePair(Of String, String)("used_product", "True"))
Parametros.Add(New KeyValuePair(Of String, String)("used_brand", "01"))
Parametros.Add(New KeyValuePair(Of String, String)("used_bci", "25"))
Parametros.Add(New KeyValuePair(Of String, String)("used_month", "1"))
Parametros.Add(New KeyValuePair(Of String, String)("used_year", "2015"))
Parametros.Add(New KeyValuePair(Of String, String)("used_sale_date", "2018-07-24 00:00:00"))
Parametros.Add(New KeyValuePair(Of String, String)("customer_car_brand", "36"))
Parametros.Add(New KeyValuePair(Of String, String)("customer_car_model", "741"))
Parametros.Add(New KeyValuePair(Of String, String)("customer_car_year", "2015"))
Parametros.Add(New KeyValuePair(Of String, String)("sale_discount", "0"))
Parametros.Add(New KeyValuePair(Of String, String)("sale_id", "32860"))
Parametros.Add(New KeyValuePair(Of String, String)("customer_name", obj.customer_name))
Parametros.Add(New KeyValuePair(Of String, String)("customer_last_name1", obj.customer_last_name1))
Parametros.Add(New KeyValuePair(Of String, String)("customer_last_name2", obj.customer_last_name1))
Parametros.Add(New KeyValuePair(Of String, String)("customer_birthday", obj.customer_birthday.ToString("yyyy-MM-dd HH:mm:ss")))
Parametros.Add(New KeyValuePair(Of String, String)("customer_phone", obj.customer_phone))
Parametros.Add(New KeyValuePair(Of String, String)("customer_email", obj.customer_email))
Parametros.Add(New KeyValuePair(Of String, String)("customer_gender", obj.customer_gender))
Parametros.Add(New KeyValuePair(Of String, String)("customer_advertising", obj.customer_advertising.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("sale_date", obj.sale_date.ToString("yyyy-MM-dd HH:mm:ss")))
Parametros.Add(New KeyValuePair(Of String, String)("sale_paidby", obj.sale_paidby))
Parametros.Add(New KeyValuePair(Of String, String)("sale_type", obj.sale_type))
Parametros.Add(New KeyValuePair(Of String, String)("sale_type_service", obj.sale_type_service))
Parametros.Add(New KeyValuePair(Of String, String)("product_code", obj.product_code))
Parametros.Add(New KeyValuePair(Of String, String)("product_unique_code", obj.product_unique_code))
Parametros.Add(New KeyValuePair(Of String, String)("product_sale_type", obj.product_sale_type))
Parametros.Add(New KeyValuePair(Of String, String)("used_product", obj.used_product.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("used_brand", obj.used_brand))
Parametros.Add(New KeyValuePair(Of String, String)("used_bci", obj.used_bci))
Parametros.Add(New KeyValuePair(Of String, String)("used_month", obj.used_month.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("used_year", obj.used_year.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("used_sale_date", obj.used_sale_date.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("customer_car_brand", obj.customer_car_brand.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("customer_car_model", obj.customer_car_model.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("customer_car_year", obj.customer_car_year.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("sale_discount", obj.sale_discount.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("sale_id", obj.sale_id.ToString()))
Dim content As New FormUrlEncodedContent(Parametros)
Dim response = wc.PostAsync(Url, content).Result
@@ -78,7 +205,7 @@ Public Class SIGPolizaVirtual : Implements IHttpHandler, IRequiresSessionState
context.Response.Write(Retorno)
End Sub
Private Sub EnviarPolizaVentaWS(ByVal context As HttpContext)
Protected Sub EnviarPolizaVentaWS(ByVal context As HttpContext, obj As MPolizaVentaWS)
Dim Retorno As String = "[]"
Try
Using wc As New HttpClient()
@@ -88,33 +215,33 @@ Public Class SIGPolizaVirtual : Implements IHttpHandler, IRequiresSessionState
Parametros.Add(New KeyValuePair(Of String, String)("User", User))
Parametros.Add(New KeyValuePair(Of String, String)("password", Password))
Parametros.Add(New KeyValuePair(Of String, String)("customer_name", "JOSE ENRIQUE "))
Parametros.Add(New KeyValuePair(Of String, String)("customer_last_name1", "VIZCARA"))
Parametros.Add(New KeyValuePair(Of String, String)("customer_last_name2", "RENDON"))
Parametros.Add(New KeyValuePair(Of String, String)("customer_birthday", "1900-01-01 00:00:00"))
Parametros.Add(New KeyValuePair(Of String, String)("customer_phone", "8186545256"))
Parametros.Add(New KeyValuePair(Of String, String)("customer_email", "mail@mail.com"))
Parametros.Add(New KeyValuePair(Of String, String)("customer_gender", "02"))
Parametros.Add(New KeyValuePair(Of String, String)("customer_advertising", "False"))
Parametros.Add(New KeyValuePair(Of String, String)("sale_date", "2018-07-24 00:00:00"))
Parametros.Add(New KeyValuePair(Of String, String)("sale_paidby", "01"))
Parametros.Add(New KeyValuePair(Of String, String)("sale_type", "01"))
Parametros.Add(New KeyValuePair(Of String, String)("sale_type_service", "01"))
Parametros.Add(New KeyValuePair(Of String, String)("product_code", "174925"))
Parametros.Add(New KeyValuePair(Of String, String)("product_unique_code", "65047187"))
Parametros.Add(New KeyValuePair(Of String, String)("product_sale_type", "01"))
Parametros.Add(New KeyValuePair(Of String, String)("sale_total", "0"))
Parametros.Add(New KeyValuePair(Of String, String)("used_product", "True"))
Parametros.Add(New KeyValuePair(Of String, String)("used_brand", "01"))
Parametros.Add(New KeyValuePair(Of String, String)("used_bci", "25"))
Parametros.Add(New KeyValuePair(Of String, String)("used_month", "1"))
Parametros.Add(New KeyValuePair(Of String, String)("used_year", "2015"))
Parametros.Add(New KeyValuePair(Of String, String)("used_sale_date", "2018-07-24 00:00:00"))
Parametros.Add(New KeyValuePair(Of String, String)("customer_car_brand", "36"))
Parametros.Add(New KeyValuePair(Of String, String)("customer_car_model", "741"))
Parametros.Add(New KeyValuePair(Of String, String)("customer_car_year", "2015"))
Parametros.Add(New KeyValuePair(Of String, String)("sale_discount", "0"))
Parametros.Add(New KeyValuePair(Of String, String)("sale_id", "32860"))
Parametros.Add(New KeyValuePair(Of String, String)("customer_name", obj.customer_name))
Parametros.Add(New KeyValuePair(Of String, String)("customer_last_name1", obj.customer_last_name1))
Parametros.Add(New KeyValuePair(Of String, String)("customer_last_name2", obj.customer_last_name1))
Parametros.Add(New KeyValuePair(Of String, String)("customer_birthday", obj.customer_birthday.ToString("yyyy-MM-dd HH:mm:ss")))
Parametros.Add(New KeyValuePair(Of String, String)("customer_phone", obj.customer_phone))
Parametros.Add(New KeyValuePair(Of String, String)("customer_email", obj.customer_email))
Parametros.Add(New KeyValuePair(Of String, String)("customer_gender", obj.customer_gender))
Parametros.Add(New KeyValuePair(Of String, String)("customer_advertising", obj.customer_advertising.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("sale_date", obj.sale_date.ToString("yyyy-MM-dd HH:mm:ss")))
Parametros.Add(New KeyValuePair(Of String, String)("sale_paidby", obj.sale_paidby))
Parametros.Add(New KeyValuePair(Of String, String)("sale_type", obj.sale_type))
Parametros.Add(New KeyValuePair(Of String, String)("sale_type_service", obj.sale_type_service))
Parametros.Add(New KeyValuePair(Of String, String)("product_code", obj.product_code))
Parametros.Add(New KeyValuePair(Of String, String)("product_unique_code", obj.product_unique_code))
Parametros.Add(New KeyValuePair(Of String, String)("product_sale_type", obj.product_sale_type))
Parametros.Add(New KeyValuePair(Of String, String)("sale_total", obj.sale_total.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("used_product", obj.used_product.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("used_brand", obj.used_brand))
Parametros.Add(New KeyValuePair(Of String, String)("used_bci", obj.used_bci))
Parametros.Add(New KeyValuePair(Of String, String)("used_month", obj.used_month.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("used_year", obj.used_year.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("used_sale_date", obj.used_sale_date.ToString("yyyy-MM-dd HH:mm:ss")))
Parametros.Add(New KeyValuePair(Of String, String)("customer_car_brand", obj.customer_car_brand.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("customer_car_model", obj.customer_car_model.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("customer_car_year", obj.customer_car_year.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("sale_discount", obj.sale_discount.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("sale_id", obj.sale_id.ToString()))
Dim content As New FormUrlEncodedContent(Parametros)
Dim response = wc.PostAsync(Url, content).Result
@@ -129,7 +256,7 @@ Public Class SIGPolizaVirtual : Implements IHttpHandler, IRequiresSessionState
context.Response.Write(Retorno)
End Sub
Private Sub EnviarPolizaIndicadores(ByVal context As HttpContext)
Protected Sub EnviarPolizaIndicadores(ByVal context As HttpContext, obj As MIndicador)
Dim Retorno As String = "[]"
Try
Using wc As New HttpClient()
@@ -139,47 +266,47 @@ Public Class SIGPolizaVirtual : Implements IHttpHandler, IRequiresSessionState
Parametros.Add(New KeyValuePair(Of String, String)("User", User))
Parametros.Add(New KeyValuePair(Of String, String)("password", Password))
Parametros.Add(New KeyValuePair(Of String, String)("v_b_optima", "1"))
Parametros.Add(New KeyValuePair(Of String, String)("v_b_fullpower", "2"))
Parametros.Add(New KeyValuePair(Of String, String)("v_b_hitec", "3"))
Parametros.Add(New KeyValuePair(Of String, String)("v_b_agm", "4"))
Parametros.Add(New KeyValuePair(Of String, String)("v_b_suv", "5"))
Parametros.Add(New KeyValuePair(Of String, String)("v_b_taxi", "6"))
Parametros.Add(New KeyValuePair(Of String, String)("v_b_america", "7"))
Parametros.Add(New KeyValuePair(Of String, String)("v_b_lth", "8"))
Parametros.Add(New KeyValuePair(Of String, String)("v_b_cronos", "9"))
Parametros.Add(New KeyValuePair(Of String, String)("v_b_diener", "10"))
Parametros.Add(New KeyValuePair(Of String, String)("v_b_heavyduty", "11"))
Parametros.Add(New KeyValuePair(Of String, String)("v_m_lth", "12"))
Parametros.Add(New KeyValuePair(Of String, String)("v_o_filtros", "13"))
Parametros.Add(New KeyValuePair(Of String, String)("v_o_lub1", "14"))
Parametros.Add(New KeyValuePair(Of String, String)("v_o_lubgalon", "15"))
Parametros.Add(New KeyValuePair(Of String, String)("v_o_lub5", "16"))
Parametros.Add(New KeyValuePair(Of String, String)("v_o_aa", "17"))
Parametros.Add(New KeyValuePair(Of String, String)("v_o_aaa", "18"))
Parametros.Add(New KeyValuePair(Of String, String)("g_b_optima", "19"))
Parametros.Add(New KeyValuePair(Of String, String)("g_b_fullpower", "20"))
Parametros.Add(New KeyValuePair(Of String, String)("g_b_hitec", "21"))
Parametros.Add(New KeyValuePair(Of String, String)("g_b_agm", "22"))
Parametros.Add(New KeyValuePair(Of String, String)("g_b_suv", "23"))
Parametros.Add(New KeyValuePair(Of String, String)("g_b_taxi", "24"))
Parametros.Add(New KeyValuePair(Of String, String)("g_b_america", "25"))
Parametros.Add(New KeyValuePair(Of String, String)("g_b_lth", "26"))
Parametros.Add(New KeyValuePair(Of String, String)("g_b_cronos", "27"))
Parametros.Add(New KeyValuePair(Of String, String)("g_b_diener", "28"))
Parametros.Add(New KeyValuePair(Of String, String)("g_b_heavyduty", "29"))
Parametros.Add(New KeyValuePair(Of String, String)("g_m_lth", "30"))
Parametros.Add(New KeyValuePair(Of String, String)("a_b_optima", "31"))
Parametros.Add(New KeyValuePair(Of String, String)("a_b_fullpower", "32"))
Parametros.Add(New KeyValuePair(Of String, String)("a_b_hitec", "33"))
Parametros.Add(New KeyValuePair(Of String, String)("a_b_agm", "34"))
Parametros.Add(New KeyValuePair(Of String, String)("a_b_suv", "35"))
Parametros.Add(New KeyValuePair(Of String, String)("a_b_taxi", "36"))
Parametros.Add(New KeyValuePair(Of String, String)("a_b_america", "37"))
Parametros.Add(New KeyValuePair(Of String, String)("a_b_lth", "38"))
Parametros.Add(New KeyValuePair(Of String, String)("a_b_cronos", "39"))
Parametros.Add(New KeyValuePair(Of String, String)("a_b_diener", "40"))
Parametros.Add(New KeyValuePair(Of String, String)("a_b_heavyduty", "41"))
Parametros.Add(New KeyValuePair(Of String, String)("v_b_optima", obj.v_b_optima.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("v_b_fullpower", obj.v_b_fullpower.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("v_b_hitec", obj.v_b_hitec.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("v_b_agm", obj.v_b_agm.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("v_b_suv", obj.v_b_suv.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("v_b_taxi", obj.v_b_taxi.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("v_b_america", obj.v_b_america.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("v_b_lth", obj.v_b_lth.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("v_b_cronos", obj.v_b_cronos.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("v_b_diener", obj.v_b_diener.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("v_b_heavyduty", obj.v_b_heavyduty.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("v_m_lth", obj.v_m_lth.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("v_o_filtros", obj.v_o_filtros.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("v_o_lub1", obj.v_o_lub1.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("v_o_lubgalon", obj.v_o_lubgalon.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("v_o_lub5", obj.v_o_lub5.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("v_o_aa", obj.v_o_aa.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("v_o_aaa", obj.v_o_aaa.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("g_b_optima", obj.g_b_optima.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("g_b_fullpower", obj.g_b_fullpower.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("g_b_hitec", obj.g_b_hitec.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("g_b_agm", obj.g_b_agm.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("g_b_suv", obj.g_b_suv.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("g_b_taxi", obj.g_b_taxi.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("g_b_america", obj.g_b_america.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("g_b_lth", obj.g_b_lth.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("g_b_cronos", obj.g_b_cronos.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("g_b_diener", obj.g_b_diener.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("g_b_heavyduty", obj.g_b_heavyduty.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("g_m_lth", obj.g_m_lth.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("a_b_optima", obj.a_b_optima.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("a_b_fullpower", obj.a_b_fullpower.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("a_b_hitec", obj.a_b_hitec.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("a_b_agm", obj.a_b_agm.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("a_b_suv", obj.a_b_suv.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("a_b_taxi", obj.a_b_taxi.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("a_b_america", obj.a_b_america.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("a_b_lth", obj.a_b_lth.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("a_b_cronos", obj.a_b_cronos.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("a_b_diener", obj.a_b_diener.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("a_b_heavyduty", obj.a_b_heavyduty.ToString()))
Dim content As New FormUrlEncodedContent(Parametros)
Dim response = wc.PostAsync(Url, content).Result
@@ -194,4 +321,217 @@ Public Class SIGPolizaVirtual : Implements IHttpHandler, IRequiresSessionState
context.Response.Write(Retorno)
End Sub
End Class
End Class
Public Class MPolizaVentaLTHWSD
Public Property customer_name As String
Public Property customer_last_name1 As String
Public Property customer_last_name2 As String
Public Property customer_birthday As DateTime
Public Property customer_phone As String
Public Property customer_email As String
Public Property customer_gender As String
Public Property customer_advertising As Boolean
Public Property sale_date As DateTime
Public Property sale_paidby As String
Public Property sale_type As String
Public Property sale_type_service As String
Public Property product_code As String
Public Property product_unique_code As String
Public Property product_sale_type As String
Public Property used_product As Boolean
Public Property used_brand As String
Public Property used_bci As String
Public Property used_month As Integer
Public Property used_year As Integer
Public Property used_sale_date As DateTime
Public Property customer_car_brand As String
Public Property customer_car_model As String
Public Property customer_car_year As Integer
Public Property sale_discount As Decimal
Public Property sale_id As String
End Class
Public Class MPolizaVentaWS
Public Property customer_name As String
Public Property customer_last_name1 As String
Public Property customer_last_name2 As String
Public Property customer_birthday As DateTime
Public Property customer_phone As String
Public Property customer_email As String
Public Property customer_gender As String
Public Property customer_advertising As Boolean
Public Property sale_date As DateTime
Public Property sale_paidby As String
Public Property sale_type As String
Public Property sale_type_service As String
Public Property sale_total As Decimal
Public Property product_code As String
Public Property product_unique_code As String
Public Property product_sale_type As String
Public Property used_product As Boolean
Public Property used_brand As String
Public Property used_bci As String
Public Property used_month As Integer
Public Property used_year As Integer
Public Property used_sale_date As DateTime
Public Property customer_car_brand As String
Public Property customer_car_model As String
Public Property customer_car_year As Integer
Public Property sale_discount As Decimal
Public Property sale_id As String
End Class
Public Class MIndicador
Sub New(Optional UsaValoresPrueba As Boolean = False)
If UsaValoresPrueba Then
Dim Index As Integer = 0
For Each p As Reflection.PropertyInfo In Me.GetType().GetProperties()
Index = Index + 1
p.SetValue(Me, Convert.ChangeType(Index, p.PropertyType), Nothing)
Next
End If
End Sub
Public Property v_b_optima As Integer
Public Property v_b_fullpower As Integer
Public Property v_b_hitec As Integer
Public Property v_b_agm As Integer
Public Property v_b_suv As Integer
Public Property v_b_taxi As Integer
Public Property v_b_america As Integer
Public Property v_b_lth As Integer
Public Property v_b_cronos As Integer
Public Property v_b_diener As Integer
Public Property v_b_heavyduty As Integer
Public Property v_m_lth As Integer
Public Property v_o_filtros As Integer
Public Property v_o_lub1 As Integer
Public Property v_o_lubgalon As Integer
Public Property v_o_lub5 As Integer
Public Property v_o_aa As Integer
Public Property v_o_aaa As Integer
Public Property g_b_optima As Integer
Public Property g_b_fullpower As Integer
Public Property g_b_hitec As Integer
Public Property g_b_agm As Integer
Public Property g_b_suv As Integer
Public Property g_b_taxi As Integer
Public Property g_b_america As Integer
Public Property g_b_lth As Integer
Public Property g_b_cronos As Integer
Public Property g_b_diener As Integer
Public Property g_b_heavyduty As Integer
Public Property g_m_lth As Integer
Public Property a_b_optima As Integer
Public Property a_b_fullpower As Integer
Public Property a_b_hitec As Integer
Public Property a_b_agm As Integer
Public Property a_b_suv As Integer
Public Property a_b_taxi As Integer
Public Property a_b_america As Integer
Public Property a_b_lth As Integer
Public Property a_b_cronos As Integer
Public Property a_b_diener As Integer
Public Property a_b_heavyduty As Integer
End Class
Namespace Fluent
Public Enum GuidVersion
TimeBased = &H1
Reserved = &H2
NameBased = &H3
Random = &H4
End Enum
Partial Public Module GuidGenerator
Public Const ByteArraySize = 16
Public Const VariantByte = 8
Public Const VariantByteMask = &H3F
Public Const VariantByteShift = &H80
Public Const VersionByte = 7
Public Const VersionByteMask = &HF
Public Const VersionByteShift = 4
Private Const TimestampByte As Byte = 0
Private Const GuidClockSequenceByte As Byte = 8
Private Const NodeByte As Byte = 10
Private ReadOnly GregorianCalendarStart As DateTimeOffset = New DateTimeOffset(1582, 10, 15, 0, 0, 0, TimeSpan.Zero)
Public Property DefaultClockSequence As Byte()
Public Property DefaultNode As Byte()
Sub New()
DefaultClockSequence = New Byte(1) {}
DefaultNode = New Byte(5) {}
Dim random = New Random
random.NextBytes(DefaultClockSequence)
random.NextBytes(DefaultNode)
End Sub
<Extension()>
Function GetVersion(ByVal guid As Guid) As GuidVersion
Dim bytes = guid.ToByteArray
Return ((bytes(VersionByte) And &HFF) >> VersionByteShift)
End Function
Function GetDateTimeOffset(ByVal guid As Guid) As DateTimeOffset
Dim bytes As Byte() = guid.ToByteArray
bytes(VersionByte) = bytes(VersionByte) And CByte(VersionByteMask)
bytes(VersionByte) = bytes(VersionByte) Or (CByte(GuidVersion.TimeBased) >> VersionByteShift)
Dim timestampBytes = New Byte(7) {}
Array.Copy(bytes, TimestampByte, timestampBytes, 0, 8)
Dim timestamp As Long = BitConverter.ToInt64(timestampBytes, 0)
Dim ticks As Long = timestamp + GregorianCalendarStart.Ticks
Return New DateTimeOffset(ticks, TimeSpan.Zero)
End Function
Function GetDateTime(ByVal guid As Guid) As Date
Return GetDateTimeOffset(guid).DateTime
End Function
Function GetLocalDateTime(ByVal guid As Guid) As Date
Return GetDateTimeOffset(guid).LocalDateTime
End Function
Function GetUtcDateTime(ByVal guid As Guid) As Date
Return GetDateTimeOffset(guid).UtcDateTime
End Function
Function GenerateTimeBasedGuid() As Guid
Return GenerateTimeBasedGuid(DateTimeOffset.UtcNow, DefaultClockSequence, DefaultNode)
End Function
Function GenerateTimeBasedGuid(ByVal dateTime As Date) As Guid
Return GenerateTimeBasedGuid(dateTime, DefaultClockSequence, DefaultNode)
End Function
Function GenerateTimeBasedGuid(ByVal dateTime As DateTimeOffset) As Guid
Return GenerateTimeBasedGuid(dateTime, DefaultClockSequence, DefaultNode)
End Function
Function GenerateTimeBasedGuid(ByVal dateTime As Date, ByVal clockSequence As Byte(), ByVal node As Byte()) As Guid
Return GenerateTimeBasedGuid(New DateTimeOffset(dateTime), clockSequence, node)
End Function
Function GenerateTimeBasedGuid(ByVal dateTime As DateTimeOffset, ByVal clockSequence As Byte(), ByVal node As Byte()) As Guid
If clockSequence Is Nothing Then Throw New ArgumentNullException("clockSequence")
If node Is Nothing Then Throw New ArgumentNullException("node")
If clockSequence.Length <> 2 Then Throw New ArgumentOutOfRangeException("clockSequence", "The clockSequence must be 2 bytes.")
If node.Length <> 6 Then Throw New ArgumentOutOfRangeException("node", "The node must be 6 bytes.")
Dim ticks = (dateTime - GregorianCalendarStart).Ticks
Dim guid = New Byte(15) {}
Dim timestamp = BitConverter.GetBytes(ticks)
Array.Copy(node, 0, guid, NodeByte, Math.Min(6, node.Length))
Array.Copy(clockSequence, 0, guid, GuidClockSequenceByte, Math.Min(2, clockSequence.Length))
Array.Copy(timestamp, 0, guid, TimestampByte, Math.Min(8, timestamp.Length))
guid(VariantByte) = guid(VariantByte) And CByte(VariantByteMask)
guid(VariantByte) = guid(VariantByte) Or CByte(VariantByteShift)
guid(VersionByte) = guid(VersionByte) And CByte(VersionByteMask)
guid(VersionByte) = guid(VersionByte) Or (CByte(GuidVersion.TimeBased) << VersionByteShift)
Return New Guid(guid)
End Function
End Module
End Namespace

View File

@@ -2457,6 +2457,8 @@ Partial Class Bancos_IE
If CveIE > 0 Then
If DdlTipoTransaccion.SelectedValue = "1" Then FolioFijo = ObjIE.Folio.ToEntero 'cheque
If UsuarioActual.CveEmpresa = 119 Then FolioFijo = 0
CvePrePoliza = ObjMov.AddPrePolizas("Bancos/IE " + If(Request("Opcion") IsNot Nothing, Request("Opcion").ToString, "") + " " + RBL.SelectedValue, CvePlantillaPoliza, TxtImporte.Text.Trim.ToDouble, TxtImporte.Text.Trim.ToDouble, tCveMoneda, TxtFechaDocumento.Text.ToDate, PagueseA, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo:=FolioFijo, ReglaFolioPoliza:=ObjComp.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, Nothing, UsuarioActual.CveEmpresa), CveTipoPoliza:=ObjMov.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, "-1", UsuarioActual.CveEmpresa))
'valida prepoliza
@@ -4882,7 +4884,7 @@ Partial Class Bancos_IE
GvComplementoPagos.DataSource = ObjBancos.DtResultados
If ObjBancos.DtResultados.FiltraParametros(" Estatus IN (1,3) ").Rows.Count = 0 And Tipo.ToUpper = "CARGO" And CveCliente > 0 And UsuarioActual.CveRol = 1 And CveEstatusIE <> 2 Then
If ObjBancos.DtResultados.FiltraParametros(" Estatus IN (1,3) ").Rows.Count = 0 And Tipo.ToUpper = "CARGO" And CveCliente > 0 And CveEstatusIE <> 2 Then
DVGenerarComplementoModal.Visible = True
End If
Else

View File

@@ -844,7 +844,7 @@ public partial class Bancos_PagoDeudor : ClsPaginas
}
}
bool AutoConta = UsuarioActual.Empresa.Funcionalidad(200).Equals("1");
if (UsuarioActual.CveEmpresa == 119) AutoConta = false;
//if (UsuarioActual.CveEmpresa == 119) AutoConta = false;
if (AutoConta && MsgError.Equals(""))
{

View File

@@ -798,9 +798,14 @@ Partial Class Bancos_PagoElectronico
'''''' LLENADO HEADER
Dim convenio As String = DTPendienteActual(0)("ConvenioPagoElectronico").ToString
'Campos #1-4 del Header
HeaderTexto = String.Format("H{0}{1}GRUPO01 ", convenio.PadLeft(9, PadCeros), DateTime.Now().ToString("yyyy-MM-dd"))
'Campo #5 del Header
HeaderTexto &= String.Format("{0}{1}", UsuarioActual.Usuario, DateTime.Now().ToString("yyyyMMdd")).PadRight(20)
HeaderTexto = String.Format("H{0}{1}GRUPO01 ", convenio.PadLeft(9, PadCeros), DateTime.Now().ToString("yyyy-MM-dd"))
'Campo #5 del Header
Dim IdentificadoUsuario As String = UsuarioActual.Usuario.Replace(" ", "").Replace(".", "").Replace("@", "").Replace("/", "").ToUpper.Trim
IdentificadoUsuario = If(IdentificadoUsuario.Length > 12, IdentificadoUsuario.Substring(0, 12), IdentificadoUsuario)
' Dim Identificado As String = String.Format("{0}{1}", UsuarioActual.Usuario, DateTime.Now().ToString("yyyyMMdd")))
HeaderTexto &= String.Format("{0}{1}", IdentificadoUsuario, DateTime.Now().ToString("yyyyMMdd")).PadRight(20)
'Campos #6-8 del Header
HeaderTexto &= String.Format("00").PadRight(586)
Dim HeaderLength = HeaderTexto.Length

View File

@@ -504,8 +504,9 @@ Partial Class Bancos_ProveedoresAbonar
End If
CargaDatos() '(tCveProveedor, CveMoneda, FechaI, FechaF, CveUsuarioRegistro, CveUsuarioProgramo, Serie)
'CUANDO VIENE PROGRAMADO LLENA EL TEXTO OBSERVACIONES
CargaCuentasDepositos()
'CUANDO VIENE PROGRAMADO LLENA EL TEXTO OBSERVACIONES
If CveUsuarioProgramo <> -1 Then RegistraScript("SumaValores();")
Else
@@ -2298,7 +2299,12 @@ Partial Class Bancos_ProveedoresAbonar
End If
DdlCuentaDeposito.DataBind()
DdlCuentaDeposito.SelectedIndex = 1
If DdlCuentaDeposito.Items.Count > 1 Then
DdlCuentaDeposito.SelectedIndex = 1
End If
End If
End If
@@ -2812,12 +2818,13 @@ Partial Class Bancos_ProveedoresAbonar
If DtDatos.Rows.Count > 0 Then
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
Dim StrImporte As String = DtDatos.Rows(0)("Saldo").ToString.FormatoNumero
Dim params As New List(Of ReportParameter)
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString))
params.Add(New ReportParameter("Sucursal", DtDatos.Rows(1)("SubProyecto").ToString))
params.Add(New ReportParameter("Importe", $"${DtDatos.Rows(0)("Saldo").ToString.FormatoNumero}"))
params.Add(New ReportParameter("Importe", $"${StrImporte}"))
params.Add(New ReportParameter("RazonSocial", TxtPagueseA.Text))
params.Add(New ReportParameter("Fecha", TxtFechaDocumento.Text))
Dim Transferencia = "", Banco = "", CLABE = "", Cuenta = "", Correo = ""
@@ -2839,13 +2846,14 @@ Partial Class Bancos_ProveedoresAbonar
params.Add(New ReportParameter("CLABE", CLABE))
params.Add(New ReportParameter("Cuenta", Cuenta))
params.Add(New ReportParameter("Correo", Correo))
If Imagen.Exists Then
params.Add(New ReportParameter("LogoPath", logouri))
Else
params.Add(New ReportParameter("LogoPath", ""))
End If
ImprimirPDF("Empresas/Grales/Formatos/Solicitud.rdlc", DtDatos, params, "Solicitud", Opcion)
Else
If Imagen.Exists Then
params.Add(New ReportParameter("LogoPath", logouri))
Else
params.Add(New ReportParameter("LogoPath", ""))
End If
Dim NombreArchivo As String = "SolicitudPago" ''String.Format("SolicitudPago{0}.pdf", TxtPagueseA.Text).Replace(" ", "")
ImprimirPDF("Empresas/Grales/Formatos/Solicitud.rdlc", DtDatos, params, NombreArchivo, Opcion)
Else
Alert("No se encontraron datos.", TipoMensaje.MsgAdvertencia)
End If
End Sub

View File

@@ -16,7 +16,13 @@
<asp:LinkButton ID="LnkHabilitarSaldar" runat="server"><i class="fa fa-money"></i> Otros Egresos</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkSaldar" Visible="false" OnClick="LnkSaldar_Click" runat="server"><i class="fa fa-money"></i> Saldar</asp:LinkButton>
<asp:LinkButton ID="LnkHabilitarSaldarFyE" runat="server"><i class="fa fa-money"></i> Viaticos-Personal</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkSaldar" Visible="false" OnClick="LnkSaldar_Click" runat="server"><i class="fa fa-money"></i> Saldar Proveedores</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkSaldarFyE" Visible="false" OnClick="LnkSaldarFyE_Click" runat="server"><i class="fa fa-money"></i> Saldar FyE</asp:LinkButton>
</li>
</ContentTemplate>
</asp:UpdatePanel>
@@ -153,7 +159,7 @@
<asp:GridView ID="GvESC" runat="server" DataKeyNames="CveIE, Saldo, CveMoneda, CveConceptoContable, CveProveedor, CvePersonal" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros de Egresos sin Comprobar de Proveedores" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" Style="text-align: center;" GridLines="None">
<Columns>
<asp:TemplateField>
<asp:TemplateField ItemStyle-Width="10%">
<ItemTemplate>
<asp:CheckBox ID="chk" Checked="false" Visible="false" runat="server" />
</ItemTemplate>
@@ -212,8 +218,14 @@
<asp:UpdatePanel ID="upDatosPersonal" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvPersonal" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros de Egresos sin Comprobar de Funcionarios Empleados" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" GridLines="None">
<asp:GridView ID="GvPersonal" runat="server" AutoGenerateColumns="False" DataKeyNames="CveIE, Saldo, CveMoneda, CveConceptoContable, CveProveedor, CvePersonal"
EmptyDataText="No se encontraron registros de Egresos sin Comprobar de Funcionarios Empleados" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" GridLines="None">
<Columns>
<asp:TemplateField ItemStyle-Width="10%">
<ItemTemplate>
<asp:CheckBox ID="chk" Checked="false" Visible="false" runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Personal">
<ItemTemplate>
<asp:HyperLink ID="Hpl" runat="server" NavigateUrl='<%# String.Format("/RH/Personal.aspx?CvePersonal={0}&Opt=10", Eval("CvePersonal"))%>' Text='<%# Eval("NombreCompleto")%>'></asp:HyperLink>

View File

@@ -180,53 +180,88 @@ Partial Class Bancos_RepEgresosSinComprobante
gr.FCCheckBox("Chk").Visible = True
LnkSaldar.Visible = True
LnkHabilitarSaldar.Visible = False
'portletBody.Attributes.Remove("style")
'portletBody.Attributes.Add("style", "display: block;")
'HExtensorFiltro.Attributes.Remove("class")
'HExtensorFiltro.Attributes.Add("class", "collapse")
'UPFiltros.Update()
UPDatos.Update()
End If
Next
End Sub
Private Sub LnkHabilitarSaldoFyE_Click(sender As Object, e As EventArgs) Handles LnkHabilitarSaldarFyE.Click
For Each gr As GridViewRow In GvPersonal.Rows
If gr.DataKey("CvePersonal") <> "" Then
gr.FCCheckBox("Chk").Visible = True
LnkSaldarFyE.Visible = True
LnkHabilitarSaldarFyE.Visible = False
upDatosPersonal.Update()
End If
Next
End Sub
Protected Sub LnkSaldar_Click(sender As Object, e As EventArgs)
Dim ObjConta As New ClsContabilidad
ObjConta.IniciaTransacSQL()
Dim ObjProveedor As New ClsCompProveedores(ObjConta.IniciaTransacSQL())
Dim CvePrePoliza As Integer = 0
Dim MsgError As String = ""
Try
For Each gr As GridViewRow In GvESC.Rows
If gr.FCCheckBox("Chk").Checked Then
Dim CveCuenta As Integer = 0
Dim IdCtaContable As Integer = 0
Dim CveConceptoContable As Integer
Select Case gr.DataKey("CveConceptoContable").ToEntero
Case 10
CveConceptoContable = 21
Case 28
CveConceptoContable = 29
Case 37
CveConceptoContable = 43
Case 42
CveConceptoContable = 41
Case 43
CveConceptoContable = 37
End Select
If ObjProveedor.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, gr.DataKey("CveProveedor").ToEntero, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
If ObjProveedor.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjProveedor.IdCtaContProveedores
End If
End If
If ObjConta.GetCuentaDobleConta(IdCtaContable, UsuarioActual.CveEmpresa) Then
If ObjConta.DtResultados.Rows.Count > 0 Then
CveCuenta = ObjConta.DtResultados.Rows(0)("CveCuenta").ToString.ToEntero
End If
End If
CvePrePoliza = ObjConta.AddPrePolizas("Bancos/RepEgresosSinComprobante", 6, gr.DataKey("Saldo").ToDecimal, gr.DataKey("Saldo").ToDecimal, gr.DataKey("CveMoneda").ToEntero, Now,
"Saldo de ExC por Sistema", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, gr.DataKey("Saldo").ToDecimal, "", CveConceptoContable, "Saldo de ExC por Sistema", Now, -1, -1,
gr.DataKey("CveIE").ToEntero, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CvePersonal:=gr.DataKey("CvePersonal").ToEntero,
ImporteMX:=gr.DataKey("Saldo").ToDecimal, CveCuenta:=CveCuenta) Then
MsgError = "Ocurrio un error al saldar el movimiento"
Exit For
End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, gr.DataKey("Saldo").ToDecimal, "", 78, "Saldo de ExC por Sistema", Now, -1, -1, gr.DataKey("CveIE").ToEntero,
ImporteMX:=gr.DataKey("Saldo").ToDecimal, CveCuenta:=CveCuenta) Then
MsgError = "Ocurrio un error al saldar el movimiento"
Exit For
End If
If UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
If Not ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
Alert("Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError)
End If
End If
End If
Next
Catch ex As Exception
MsgError = "Ocurrió un error al generar la prepoliza"
OnError(MsgError, ex)
End Try
For Each gr As GridViewRow In GvESC.Rows
If gr.FCCheckBox("Chk").Checked Then
Dim CveCuenta As Integer = 0
Dim CveConceptoContable As Integer
Select Case gr.DataKey("CveConceptoContable").ToEntero
Case 10
CveConceptoContable = 21
Case 28
CveConceptoContable = 29
Case 37
CveConceptoContable = 43
Case 42
CveConceptoContable = 41
Case 43
CveConceptoContable = 37
End Select
CvePrePoliza = ObjConta.AddPrePolizas("Bancos/RepEgresosSinComprobante", 6, gr.DataKey("Saldo").ToDecimal, gr.DataKey("Saldo").ToDecimal, gr.DataKey("CveMoneda").ToEntero, Now, "Saldo de ExC por Sistema", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, gr.DataKey("Saldo").ToDecimal, "", CveConceptoContable, "Saldo de ExC por Sistema", Now, -1, -1, gr.DataKey("CveIE").ToEntero, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CvePersonal:=gr.DataKey("CvePersonal").ToEntero, ImporteMX:=gr.DataKey("Saldo").ToDecimal, CveCuenta:=CveCuenta) Then
MsgError = "Ocurrio un error al saldar el movimiento"
End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, gr.DataKey("Saldo").ToDecimal, "", 78, "Saldo de ExC por Sistema", Now, -1, -1, gr.DataKey("CveIE").ToEntero, ImporteMX:=gr.DataKey("Saldo").ToDecimal, CveCuenta:=-1) Then
MsgError = "Ocurrio un error al saldar el movimiento"
End If
End If
Next
If MsgError = "" Then
ObjConta.Commit()
@@ -239,11 +274,96 @@ Partial Class Bancos_RepEgresosSinComprobante
LnkSaldar.Visible = False
LnkHabilitarSaldar.Visible = True
ObjConta.Dispose()
End Sub
ObjProveedor.Dispose()
End Sub
Protected Sub LnkSaldarFyE_Click(sender As Object, e As EventArgs)
Dim ObjConta As New ClsContabilidad
ObjConta.IniciaTransacSQL()
Dim CvePrePoliza As Integer = 0
Dim MsgError As String = ""
Try
For Each gr As GridViewRow In GvPersonal.Rows
If gr.FCCheckBox("Chk").Checked Then
Dim CveCuenta As Integer = 0
Dim IdCtaContPersonal As Integer = 0
Dim CveConceptoContable As Integer
Select Case gr.DataKey("CveConceptoContable").ToEntero
Case 10
CveConceptoContable = 21
Case 28
CveConceptoContable = 29
Case 37
CveConceptoContable = 43
Case 42
CveConceptoContable = 41
Case 43
CveConceptoContable = 37
End Select
If ObjConta.GetRetCuenta(CveConceptoContable, gr.DataKey("CvePersonal").ToEntero) Then
If ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContPersonal = ObjConta.DtResultados.Rows(0)("IdCtaContPersonal").ToString.ToEntero
End If
End If
If ObjConta.GetCuentaDobleConta(IdCtaContPersonal, UsuarioActual.CveEmpresa) Then
If ObjConta.DtResultados.Rows.Count > 0 Then
CveCuenta = ObjConta.DtResultados.Rows(0)("CveCuenta").ToString.ToEntero
End If
End If
CvePrePoliza = ObjConta.AddPrePolizas("Bancos/RepEgresosSinComprobante", 6, gr.DataKey("Saldo").ToDecimal, gr.DataKey("Saldo").ToDecimal, gr.DataKey("CveMoneda").ToEntero, Now,
"Saldo de ExC por Sistema", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, gr.DataKey("Saldo").ToDecimal, "", CveConceptoContable, "Saldo de ExC por Sistema", Now, -1, -1,
gr.DataKey("CveIE").ToEntero, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CvePersonal:=gr.DataKey("CvePersonal").ToEntero,
ImporteMX:=gr.DataKey("Saldo").ToDecimal, CveCuenta:=CveCuenta) Then
MsgError = "Ocurrio un error al saldar el movimiento"
Exit For
End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, gr.DataKey("Saldo").ToDecimal, "", 78, "Saldo de ExC por Sistema", Now, -1, -1, gr.DataKey("CveIE").ToEntero,
ImporteMX:=gr.DataKey("Saldo").ToDecimal, CveCuenta:=CveCuenta) Then
MsgError = "Ocurrio un error al saldar el movimiento"
Exit For
End If
If UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
If Not ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
Alert("Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError)
End If
End If
End If
Next
Catch ex As Exception
MsgError = "Ocurrió un error al generar la prepoliza"
OnError(MsgError, ex)
End Try
If MsgError = "" Then
ObjConta.Commit()
CargaDatos()
Alert("Los movimientos se saldaron correctamente.")
Else
ObjConta.RollBack()
Alert(MsgError, TipoMensaje.MsgError)
End If
LnkSaldarFyE.Visible = False
LnkHabilitarSaldarFyE.Visible = True
ObjConta.Dispose()
End Sub
#Region "IMPRESIONES"
Private Sub ImprimirReportePdf(Archivo As String, DtDatos As DataTable, Optional Formato As String = "PDF")
If DtDatos.Rows.Count > 0 Then
Dim StrFiltro As New StringBuilder

View File

@@ -117,6 +117,8 @@
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="CompareValidator1" Width="350px"></ajax:ValidatorCalloutExtender>
<asp:CheckBox runat="server" ID="ChkReembolsarSinBancos" OnCheckedChanged="ChkReembolsarSinBancos_CheckedChanged" AutoPostBack="true" Text="Comprobación sin bancos" Visible="false" Checked="false" />
<asp:CheckBox ID="ChkOtrosIngresosCheque" runat="server" Text="Otros Ingresos" AutoPostBack="true" OnCheckedChanged="ChkOtrosIngresosCheque_CheckedChanged" />
</div>
</asp:Panel>
@@ -420,7 +422,7 @@
<asp:TemplateField>
<HeaderTemplate>Cheque</HeaderTemplate>
<ItemTemplate>
<asp:HyperLink ID="HLCheque" Target="_blank" CssClass="Texto" Text='<%# Eval("Folio")%>' runat="server"></asp:HyperLink>
<asp:HyperLink ID="HyperLink1" Target="_blank" CssClass="Texto" Text='<%# Eval("Folio")%>' runat="server"></asp:HyperLink>
</ItemTemplate>
<ItemStyle Width="80px" />
</asp:TemplateField>
@@ -511,7 +513,12 @@
}
}
}
}
if (textBoxes[i].id.indexOf('C_GvCxP_TxtComision') >= 0) {
if (textBoxes[i].value != '') {
Comision = parseFloat(Comision) + parseFloat(textBoxes[i].value.split(',').join(''));
}
}
}
}
@@ -544,7 +551,7 @@
}
$get('TxtImporteVinculado').value = FormatoNumero(Importe, 2);
$get('TxtImporteVinculado').value = FormatoNumero(Importe + Comision, 2);
} else {
$get('TxtImporte').value = FormatoNumero(Importe, 2);

View File

@@ -263,6 +263,26 @@ Partial Class Compras_ReembolsosComprobaciones
UPCompras.Update()
End Sub
Protected Sub ChkOtrosIngresosCheque_CheckedChanged(sender As Object, e As EventArgs)
If ChkOtrosIngresosCheque.Checked Then
TxtOtrosImportes.Visible = True
TxtTotal.Visible = True
GvCxP.Columns(15).Visible = True
Else
TxtOtrosImportes.Visible = False
TxtTotal.Visible = False
GvCxP.Columns(15).Visible = False
TxtOtrosImportes.Text = ""
TxtTotal.Text = ""
RegistraScript("$get('TxtImporte').value = FormatoNumero(SumaValores(), 2);")
End If
UpDatos.Update()
UPCompras.Update()
End Sub
#End Region
#Region " SELECTED INDEX CHANGED "
@@ -301,6 +321,8 @@ Partial Class Compras_ReembolsosComprobaciones
PnlChequeInfo.Visible = True
ChkOtrosIngresosCheque.Visible = True
If UsuarioActual.TienePermisoProceso(113) Then TrChequeExcedente.Visible = True
CargaDatos(DDlCheques.SelectedValue.ToEntero)
@@ -315,6 +337,8 @@ Partial Class Compras_ReembolsosComprobaciones
HdnCheque.Value = "-1"
ChkOtrosIngresosCheque.Visible = False
If UsuarioActual.TienePermisoProceso(113) Then TableExpedirCheque.Visible = True
LimpiaDatos()
@@ -410,9 +434,9 @@ Partial Class Compras_ReembolsosComprobaciones
End If
End If
Dim FolioIENew = ObjIE.GetNextFolio(If(CveCajaChica > 0, CveCajaChica, CvePersonal), 8).ToString
CveIECajaChica = ObjIE.AddBancos_IE(CveCajaChica, 8, TxtFechaDocumento.Text.Trim.ToDate, FolioIENew, String.Format("Transferencia Cta: {0}", DdlCajaChica.SelectedItem), TxtImporte.Text.ToDecimal, CveMoneda, 0, TxtObservaciones.Text.Trim, "", False, False, -1, CvePrePolizaIERegistrado, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FueConciliado:=If(ChkReembolsarSinBancos.Checked Or CveCajaChica > 0, True, False))
CveIECajaChica = ObjIE.AddBancos_IE(CveCajaChica, 8, TxtFechaDocumento.Text.Trim.ToDate, FolioIENew, String.Format("Transferencia Cta: {0}", DdlCajaChica.SelectedItem), TxtImporteVinculado.Text.ToDecimal, CveMoneda, 0, TxtObservaciones.Text.Trim, "", False, False, -1, CvePrePolizaIERegistrado, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FueConciliado:=If(ChkReembolsarSinBancos.Checked Or CveCajaChica > 0, True, False))
'AGREGO PREPOLIZA IE BANCOS
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaIERegistrado, True, TxtImporte.Text.ToDecimal, String.Format("Transferencia Cta: {0}", DdlCajaChica.SelectedItem), 30, TxtObservaciones.Text, TxtFechaDocumento.Text.ToDate, IdCuentaBancaria, -1, CveIE:=CveIECajaChica, ImporteME:=If(tipoCambio = 1, 0, TxtImporte.Text.ToDecimal), ImporteMX:=TxtImporte.Text.ToDecimal * tipoCambio) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaIERegistrado, True, TxtImporteVinculado.Text.ToDecimal, String.Format("Transferencia Cta: {0}", DdlCajaChica.SelectedItem), 30, TxtObservaciones.Text, TxtFechaDocumento.Text.ToDate, IdCuentaBancaria, -1, CveIE:=CveIECajaChica, ImporteME:=If(tipoCambio = 1, 0, TxtImporteVinculado.Text.ToDecimal), ImporteMX:=TxtImporteVinculado.Text.ToDecimal * tipoCambio) Then
MsgError = "Error al registrar detalle de concepto bancario"
End If
Else
@@ -620,11 +644,12 @@ Partial Class Compras_ReembolsosComprobaciones
End If
'Otros Ingresos
If ChkAjusteOI.Checked AndAlso gvr.FCTextBox("TxtComision").Text.ToDecimal > 0 Then
If (ChkAjusteOI.Checked Or ChkOtrosIngresosCheque.Checked) AndAlso gvr.FCTextBox("TxtComision").Text.ToDecimal > 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, False, gvr.FCTextBox("TxtComision").Text.ToDecimal, Referencia, 211, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaProveedor, -1, CveIE:=CveIERegistrado, CvePersonal:=CvePersonal, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.FCTextBox("TxtComision").Text.ToDecimal), ImporteMX:=gvr.FCTextBox("TxtComision").Text.ToDecimal * tipoCambio, CveCuenta:=CveCuentaProveedor) Then
MsgError = "no se pudo insertar el detalle de la poliza de otros ingresos"
End If
If CveCajaChica > 0 Then
If CveCajaChica > 0 AndAlso Not HdnCheque.Value.ToEntero > 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, gvr.FCTextBox("TxtComision").Text.ToDecimal, Referencia, 211, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaProveedor, -1, CveIE:=CveIERegistrado, CvePersonal:=CvePersonal, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.FCTextBox("TxtComision").Text.ToDecimal), ImporteMX:=gvr.FCTextBox("TxtComision").Text.ToDecimal * tipoCambio, CveCuenta:=CveCuentaProveedor, Contabilizable:=False) Then
MsgError = "no se pudo insertar el detalle de la poliza de otros ingresos"
End If
@@ -1919,4 +1944,5 @@ Partial Class Compras_ReembolsosComprobaciones
#End Region
End Class

View File

@@ -109,7 +109,7 @@
</div>
</div>
</asp:Panel>
<rvweb:ReportViewer ID="ReportViewer1" Width="100%" runat="server"></rvweb:ReportViewer>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
</asp:Content>

View File

@@ -668,7 +668,7 @@ Partial Class Contratos_FacturacionMasiva
Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", ""))
Timbre.Comprobante.Folio = Obj.Folio.ToString
Timbre.Comprobante.Serie = Obj.Serie
Timbre.Comprobante.Fecha = Obj.Fecha
Timbre.Comprobante.Fecha = Obj.FechaCP
Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT

View File

@@ -795,8 +795,11 @@ Partial Class RepCxCDetalle
For index = 0 To GvDatos.Columns.Count - 1
If GvDatos.Columns(index).Visible Then
If TypeOf GvDatos.Columns(index) Is HyperLinkField Then
If TypeOf GvDatos.Columns(index) Is TemplateField Then
If GvDatos.Columns(index).HeaderText = "Folio" Then
dr(GvDatos.Columns(index).HeaderText) = fila.FCHyperLink("HlFolio").Text.Replace("&nbsp;", "")
End If
ElseIf TypeOf GvDatos.Columns(index) Is HyperLinkField Then
dr(GvDatos.Columns(index).HeaderText) = DirectCast(fila.Cells(index).Controls(0), HyperLink).Text.Replace("&nbsp;", "")
Else
dr(GvDatos.Columns(index).HeaderText) = fila.Cells(index).Text.Replace("&nbsp;", "")

View File

@@ -1776,10 +1776,10 @@
<Height>1.16692in</Height>
<Style />
</Body>
<Width>8.23098in</Width>
<Width>8.2362in</Width>
<Page>
<PageHeader>
<Height>3.33515cm</Height>
<Height>4.57869cm</Height>
<PrintOnFirstPage>true</PrintOnFirstPage>
<PrintOnLastPage>true</PrintOnLastPage>
<ReportItems>
@@ -1896,7 +1896,7 @@
<rd:DefaultName>Textbox15</rd:DefaultName>
<Top>2.40001cm</Top>
<Left>0.01325cm</Left>
<Height>0.6cm</Height>
<Height>1.8259cm</Height>
<Width>20.89344cm</Width>
<ZIndex>3</ZIndex>
<Style>
@@ -1910,7 +1910,8 @@
</Style>
</Textbox>
<Line Name="Line1">
<Top>3.1764cm</Top>
<Top>4.4023cm</Top>
<Left>0.01325cm</Left>
<Height>0cm</Height>
<Width>20.90669cm</Width>
<ZIndex>4</ZIndex>
@@ -2107,6 +2108,7 @@
</Textbox>
<Line Name="Line2">
<Top>0.127cm</Top>
<Left>0cm</Left>
<Height>0cm</Height>
<Width>20.90669cm</Width>
<ZIndex>5</ZIndex>

View File

@@ -0,0 +1,969 @@
<?xml version="1.0" encoding="utf-8"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<Body>
<ReportItems>
<Tablix Name="Tablix2">
<TablixCorner>
<TablixCornerRows>
<TablixCornerRow>
<TablixCornerCell>
<CellContents>
<Textbox Name="Textbox28">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>OC</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
<Color>White</Color>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox28</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<BackgroundColor>Gray</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCornerCell>
</TablixCornerRow>
</TablixCornerRows>
</TablixCorner>
<TablixBody>
<TablixColumns>
<TablixColumn>
<Width>7.36287cm</Width>
</TablixColumn>
<TablixColumn>
<Width>3.6966cm</Width>
</TablixColumn>
<TablixColumn>
<Width>2.91394cm</Width>
</TablixColumn>
<TablixColumn>
<Width>1.65333cm</Width>
</TablixColumn>
<TablixColumn>
<Width>2.5cm</Width>
</TablixColumn>
</TablixColumns>
<TablixRows>
<TablixRow>
<Height>0.46771cm</Height>
<TablixCells>
<TablixCell>
<CellContents>
<Textbox Name="RazonSocial">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!RazonSocial.Value</Value>
<Style>
<FontSize>7pt</FontSize>
<Format>#,0.00</Format>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>RazonSocial</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Nombre">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!Nombre.Value</Value>
<Style>
<FontSize>7pt</FontSize>
<Format>#,0.00</Format>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Nombre</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="ImporteSol">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!ImporteSol.Value</Value>
<Style>
<FontSize>7pt</FontSize>
<Format>'$'#,0.00</Format>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Right</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>ImporteSol</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
<rd:FormatSymbolCulture>es-MX</rd:FormatSymbolCulture>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="FolioMov">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!FolioMov.Value</Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>FolioMov</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Importe">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!Importe.Value</Value>
<Style>
<FontSize>7pt</FontSize>
<Format>#,0.00</Format>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Right</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Importe</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<rd:Selected>true</rd:Selected>
</CellContents>
</TablixCell>
</TablixCells>
</TablixRow>
</TablixRows>
</TablixBody>
<TablixColumnHierarchy>
<TablixMembers>
<TablixMember>
<TablixHeader>
<Size>0.46771cm</Size>
<CellContents>
<Textbox Name="Textbox6">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Proveedor</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
<Color>White</Color>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox6</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<BackgroundColor>Gray</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixHeader>
</TablixMember>
<TablixMember>
<TablixHeader>
<Size>0.46771cm</Size>
<CellContents>
<Textbox Name="Textbox4">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Usuario Solicitó</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
<Color>White</Color>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox4</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<BackgroundColor>Gray</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixHeader>
</TablixMember>
<TablixMember>
<TablixHeader>
<Size>0.46771cm</Size>
<CellContents>
<Textbox Name="Textbox40">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Importe Solicitud</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
<Color>White</Color>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox40</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<BackgroundColor>Gray</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixHeader>
</TablixMember>
<TablixMember>
<TablixHeader>
<Size>0.46771cm</Size>
<CellContents>
<Textbox Name="Textbox5">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Mov. Banc.</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
<Color>White</Color>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox5</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<BackgroundColor>Gray</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixHeader>
<Visibility>
<Hidden>=IIf(Parameters!Estatus.Value = "3",False,True)</Hidden>
</Visibility>
</TablixMember>
<TablixMember>
<TablixHeader>
<Size>0.46771cm</Size>
<CellContents>
<Textbox Name="Textbox18">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Importe</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
<Color>White</Color>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox18</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<BackgroundColor>Gray</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixHeader>
<Visibility>
<Hidden>=IIf(Parameters!Estatus.Value = "3",False,True)</Hidden>
</Visibility>
</TablixMember>
</TablixMembers>
</TablixColumnHierarchy>
<TablixRowHierarchy>
<TablixMembers>
<TablixMember>
<Group Name="GPO" />
<TablixHeader>
<Size>1.60042cm</Size>
<CellContents>
<Textbox Name="Folio">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!Folio.Value</Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Folio</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixHeader>
</TablixMember>
</TablixMembers>
</TablixRowHierarchy>
<RepeatColumnHeaders>true</RepeatColumnHeaders>
<FixedColumnHeaders>true</FixedColumnHeaders>
<DataSetName>DataSet1</DataSetName>
<Top>0.82931cm</Top>
<Left>0.06614cm</Left>
<Height>0.93542cm</Height>
<Width>19.72716cm</Width>
<Style>
<Border>
<Style>None</Style>
</Border>
</Style>
</Tablix>
<Textbox Name="Textbox3">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Parameters!AgrupadoPor.Value</Value>
<MarkupType>HTML</MarkupType>
<Style>
<FontSize>9pt</FontSize>
<FontWeight>Normal</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox1</rd:DefaultName>
<Top>0.07056cm</Top>
<Left>0.06614cm</Left>
<Height>0.58236cm</Height>
<Width>19.58715cm</Width>
<ZIndex>1</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</ReportItems>
<Height>0.79506in</Height>
<Style />
</Body>
<Width>7.79264in</Width>
<Page>
<PageHeader>
<Height>2.22362cm</Height>
<PrintOnFirstPage>true</PrintOnFirstPage>
<ReportItems>
<Textbox Name="Textbox1">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Parameters!NombreEmpresa.Value</Value>
<Style>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox1</rd:DefaultName>
<Left>2.43857cm</Left>
<Height>0.6cm</Height>
<Width>14.68354cm</Width>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox2">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>REPORTE DE SOLICITUDES DE ANTICIPO</Value>
<Style>
<FontSize>10.5pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style>
<FontSize>10.5pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox2</rd:DefaultName>
<Top>0.63528cm</Top>
<Left>2.40329cm</Left>
<Height>0.52945cm</Height>
<Width>14.68354cm</Width>
<ZIndex>1</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Image Name="Logo">
<Source>External</Source>
<Value>=Parameters!LogoPath.Value</Value>
<Sizing>FitProportional</Sizing>
<Left>0.06614cm</Left>
<Height>2.22362cm</Height>
<Width>2.33715cm</Width>
<ZIndex>2</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
</Style>
</Image>
</ReportItems>
<Style>
<Border>
<Style>None</Style>
</Border>
</Style>
</PageHeader>
<PageFooter>
<Height>1.61043cm</Height>
<PrintOnFirstPage>true</PrintOnFirstPage>
<PrintOnLastPage>true</PrintOnLastPage>
<ReportItems>
<Textbox Name="Textbox7">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>="Página " &amp; Globals.PageNumber &amp; " de " &amp; Globals.TotalPages</Value>
<Style>
<FontStyle>Italic</FontStyle>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Right</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName>
<Top>0.40041cm</Top>
<Left>16.97887cm</Left>
<Height>0.68085cm</Height>
<Width>2.06587cm</Width>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox8">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value EvaluationMode="Constant">Usuario:</Value>
<Style>
<FontSize>9pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox8</rd:DefaultName>
<Top>0.40041cm</Top>
<Left>0.06614cm</Left>
<Height>0.68085cm</Height>
<Width>1.60042cm</Width>
<ZIndex>1</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox9">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Parameters!UsuarioImprimio.Value</Value>
<Style>
<FontSize>9pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox9</rd:DefaultName>
<Top>0.40041cm</Top>
<Left>1.61047cm</Left>
<Height>0.68085cm</Height>
<Width>5.14936cm</Width>
<ZIndex>2</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox10">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value EvaluationMode="Constant">Fecha Impresión:</Value>
<Style>
<FontSize>9pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox10</rd:DefaultName>
<Top>0.40041cm</Top>
<Left>6.93622cm</Left>
<Height>0.68085cm</Height>
<Width>2.92333cm</Width>
<ZIndex>3</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox11">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Globals!ExecutionTime</Value>
<Style>
<FontSize>9pt</FontSize>
<Format>g</Format>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox11</rd:DefaultName>
<Top>0.40041cm</Top>
<Left>9.84544cm</Left>
<Height>0.68085cm</Height>
<Width>4.32745cm</Width>
<ZIndex>4</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox12">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>IMPRESO EN SIG, Rep. Solicitudes Anticipo</Value>
<Style>
<FontSize>9pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox9</rd:DefaultName>
<Top>0.92958cm</Top>
<Left>0.06614cm</Left>
<Height>0.68085cm</Height>
<Width>6.87008cm</Width>
<ZIndex>5</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Line Name="Line1">
<Top>0.40041cm</Top>
<Left>0.06614cm</Left>
<Height>0cm</Height>
<Width>19.58715cm</Width>
<ZIndex>6</ZIndex>
<Style>
<Border>
<Style>Solid</Style>
</Border>
</Style>
</Line>
</ReportItems>
<Style>
<Border>
<Style>None</Style>
</Border>
</Style>
</PageFooter>
<PageHeight>29.7cm</PageHeight>
<PageWidth>21cm</PageWidth>
<LeftMargin>0.5cm</LeftMargin>
<RightMargin>0.5cm</RightMargin>
<TopMargin>1cm</TopMargin>
<BottomMargin>1cm</BottomMargin>
<ColumnSpacing>0.13cm</ColumnSpacing>
<Style />
</Page>
<AutoRefresh>0</AutoRefresh>
<DataSources>
<DataSource Name="DataSet">
<ConnectionProperties>
<DataProvider>System.Data.DataSet</DataProvider>
<ConnectString>/* Local Connection */</ConnectString>
</ConnectionProperties>
<rd:DataSourceID>f55ecc33-47ff-4fc5-a233-35ea9bb1f578</rd:DataSourceID>
</DataSource>
</DataSources>
<DataSets>
<DataSet Name="DataSet1">
<Query>
<DataSourceName>DataSet</DataSourceName>
<CommandText>/* Local Query */</CommandText>
</Query>
<Fields>
<Field Name="Folio">
<DataField>Folio</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="RazonSocial">
<DataField>RazonSocial</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="Nombre">
<DataField>Nombre</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="ImporteSol">
<DataField>ImporteSol</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="FolioMov">
<DataField>FolioMov</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="Importe">
<DataField>Importe</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
</Fields>
<rd:DataSetInfo>
<rd:DataSetName>DataSet</rd:DataSetName>
<rd:SchemaPath>C:\Users\Caudillo\Documents\Visual Studio 2013\WebSites\WebSite9\App_Code\DataSet.xsd</rd:SchemaPath>
<rd:TableName>DataTable1</rd:TableName>
<rd:TableAdapterFillMethod />
<rd:TableAdapterGetDataMethod />
<rd:TableAdapterName />
</rd:DataSetInfo>
</DataSet>
</DataSets>
<ReportParameters>
<ReportParameter Name="NombreEmpresa">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="UsuarioImprimio">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="LogoPath">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="AgrupadoPor">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="Estatus">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
</ReportParameters>
<Language>es-MX</Language>
<rd:ReportUnitType>Cm</rd:ReportUnitType>
<rd:ReportID>40c94aad-a12a-44fb-ab0d-ea36a9656792</rd:ReportID>
</Report>

View File

@@ -147,11 +147,11 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
DdlPaqueteDesarmado.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlAlmacenArmado.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen IN (1,9)")
DdlAlmacenArmado.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen = 1")
DdlAlmacenArmado.DataBind()
DdlAlmacenArmado.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlAlmacenDesarmado.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen IN (1,9)")
DdlAlmacenDesarmado.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen = 1")
DdlAlmacenDesarmado.DataBind()
DdlAlmacenDesarmado.Items.Insert(0, New ListItem("Seleccione", "-1"))

View File

@@ -324,6 +324,8 @@
<asp:Label runat="server" ID="LblFolio" Text='<%# Eval("SerieFolio")%>' />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="NombreComercial" HeaderText="Cliente"/>
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton Text="Recibir" ID="BtnRecibir" CommandArgument="-1" OnClick="BtnRecibir_Click" CssClass="btn btn-primary btn-xs" runat="server" />

View File

@@ -1096,6 +1096,7 @@ Partial Class Inventarios_RecepcionUsados
EnvioCorreo()
CargaPendientesRecibir()
UPDatos.Update()
Else
@@ -1923,6 +1924,10 @@ Partial Class Inventarios_RecepcionUsados
End Sub
Protected Sub BtnConsultarPendientes_Click(sender As Object, e As EventArgs)
CargaPendientesRecibir()
End Sub
Private Sub CargaPendientesRecibir()
Dim ObjVentas As New ClsVentas
If ObjVentas.GetVentasUsados(-1, DdlSubProyectos.SelectedValue.ToEntero(), TxtFechaPendientes.Text.ToDateTime(), UsuarioActual.CveEmpresa) Then
GVPendientes.DataSource = ObjVentas.DtResultados

View File

@@ -61,7 +61,7 @@ Partial Class Inventarios_RepAlmacen
Dim CveSubProyecto As Integer = DdlSucursal.SelectedValue.ToEntero()
If objInv.GetRepAlmacenes(FechaI, FechaF, UsuarioActual.CveEmpresa, TipoAlmacen, DdlModalidadFiltro.SelectedValue.ToEntero, ChkInventariable.Checked,
Almacenes:=Almacenes, CveSubProyecto:=CveSubProyecto) Then
Almacenes:=Almacenes, CveSubProyecto:=CveSubProyecto, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
GVAlmacen.DataSource = objInv.DtResultados
TmpDT = objInv.DtResultados
End If

View File

@@ -1,233 +1,250 @@
<%@ 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>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style>
.select2 .select2-selection__rendered {
line-height: 1;
color: #111;
}
.select2 .select2-selection--multiple {
box-sizing: border-box;
cursor: pointer;
display: block;
min-height: 20px;
user-select: none;
-webkit-user-select: none;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice {
margin-top: 10px;
}
.select2-selection__rendered {
margin-top: 0px;
height: 25px;
}
.select2-selection {
margin-top: 0px;
height: 31px;
}
.select2-container--default.select2-container--focus .select2-selection--multiple {
border: none;
outline: 0;
}
#chartdiv {
width: 100%;
height: 800px;
}
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
Reporte de Almacen Periodo
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
<li>
<asp:HyperLink NavigateUrl="#" data-toggle="modal" data-target="#DivVerEn" ID="VerEn" runat="server"> <i class="fa fa-pencil"></i> Ver En</asp:HyperLink>
</li>
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<li>
<asp:LinkButton ID="LnkVerGrafica" OnClick="LnkVerGrafica_Click" runat="server">Ver Grafica</asp:LinkButton>
</li>
</ContentTemplate>
</asp:UpdatePanel>
<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>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UpFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle">
<div class="tools">
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" OnClick="BtnConsultar_Click" class="btn btn-primary" />
<a href="javascript;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
</div>
<div class="titlefiltros caption">
<div class="row">
<div class="col-md-1 truncate" style="text-align: right!important">Fecha Corte:</div>
<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;">
<asp:TextBox Style="width: 80px !important;" ID="TxtFechaCorte" runat="server" CssClass="form-control" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="LnkFechaCorte" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<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>
</div>
<div class="col-md-1 truncate" style="text-align: right!important">Tipo Almacen:</div>
<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>
</div>
<div class="col-md-1 truncate" style="text-align: right!important">Modalidad:</div>
<div class="col-md-1">
<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="Contable" Value="1"></asp:ListItem>
<asp:ListItem Text="No Contable" Value="0"></asp:ListItem>
</asp:DropDownList>
</div>
<asp:CheckBox ID="ChkInventariable" CssClass="md-checksd" runat="server" Text="Aplica Inventario" />
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="row" style="margin-left: 0px; margin-top: 15px; margin-bottom: 5px; text-align: right; margin-right: 5px;" align="left">
<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;" />
<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>
<asp:GridView ID="GVAlmacen" runat="server" AutoGenerateColumns="False" OnRowDataBound="GVAlmacen_RowDataBound" data-sort="true" EmptyDataText="No se encontraron Almacenes"
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None" Width="99%" >
<Columns>
<asp:HyperLinkField HeaderText="Almacen" DataTextField="Almacen" DataNavigateUrlFields="CveAlmacen" DataNavigateUrlFormatString="/Inventarios/RepEntradasSalidas.aspx?CveAlmacen={0}" Target="_blank" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Enero" DataField="Enero" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Febrero" DataField="Febrero" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Marzo" DataField="Marzo" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Abril" DataField="Abril" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Mayo" DataField="Mayo" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Junio" DataField="Junio" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Julio" DataField="Julio" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Agosto" DataField="Agosto" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Septiembre" DataField="Septiembre" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Octubre" DataField="Octubre" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Noviembre" DataField="Noviembre" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Diciembre" DataField="Diciembre" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel runat="server" ID="UpVerEn" UpdateMode="Conditional">
<ContentTemplate>
<div id="DivVerEn" class="modal fade" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">
<asp:Label ID="Label2" runat="server" ClientIDMode="Static" Text="Ver En:"></asp:Label></h4>
</div>
<div class="modal-body">
<table style="width: 335px;" class="table table-striped table-advance table-hover">
<tbody>
<tr>
<td style="text-align: left;">
<asp:RadioButton ID="RblTotal" Checked="true" GroupName="GnVerEn" Text="Total" runat="server" /></td>
<td style="text-align: left;">
<asp:RadioButton ID="RblExistencia" GroupName="GnVerEn" Text="Existencia" runat="server" /></td>
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
<asp:Button ID="BtnVerEn" ClientIDMode="Static" runat="server" Text="Cargar" class="btn btn-success" OnClick="BtnVerEn_Click" />
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<div id="DivModalGrafica" class="modal ADS fade" role="dialog">
<asp:UpdatePanel class="modal-dialog modal-lg" runat="server" ID="UpGrafica" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">
<asp:Label ID="LblTituloGrafica" runat="server" ClientIDMode="Static" Text="Almacenes"></asp:Label>
</h4>
</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>
<%@ 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>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style>
.select2 .select2-selection__rendered {
line-height: 1;
color: #111;
}
.select2 .select2-selection--multiple {
box-sizing: border-box;
cursor: pointer;
display: block;
min-height: 20px;
user-select: none;
-webkit-user-select: none;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice {
margin-top: 10px;
}
.select2-selection__rendered {
margin-top: 0px;
height: 25px;
}
.select2-selection {
margin-top: 0px;
height: 31px;
}
.select2-container--default.select2-container--focus .select2-selection--multiple {
border: none;
outline: 0;
}
#chartdiv {
width: 100%;
height: 800px;
}
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
Reporte de Almacen Periodo
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
<li>
<asp:HyperLink NavigateUrl="#" data-toggle="modal" data-target="#DivVerEn" ID="VerEn" runat="server"> <i class="fa fa-pencil"></i> Ver En</asp:HyperLink>
</li>
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<li>
<asp:LinkButton ID="LnkVerGrafica" OnClick="LnkVerGrafica_Click" runat="server">Ver Grafica</asp:LinkButton>
</li>
</ContentTemplate>
</asp:UpdatePanel>
<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>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UpFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter" style="" id="filtros">
<div class="portlet-title portlet-filterT smalltitle" style="">
<div class="tools">
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" OnClick="BtnConsultar_Click" class="btn btn-primary" />
<a href="javascript:;" class="expand"></a>
</div>
<div class="titlefiltros caption">
<div class="row">
<div class="col-md-1 truncate" style="text-align: right!important">Fecha Corte:</div>
<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;">
<asp:TextBox Style="width: 80px !important;" ID="TxtFechaCorte" runat="server" CssClass="form-control" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="LnkFechaCorte" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<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>
</div>
<div class="col-md-1 truncate" style="text-align: right!important">Tipo Almacen:</div>
<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>
</div>
<div class="col-md-1 truncate" style="text-align: right!important">Modalidad:</div>
<div class="col-md-1">
<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="Contable" Value="1"></asp:ListItem>
<asp:ListItem Text="No Contable" Value="0"></asp:ListItem>
</asp:DropDownList>
</div>
<div class="col-md-1">
<asp:CheckBox ID="ChkInventariable" CssClass="md-checksd" runat="server" Text="Aplica Inventario" />
</div>
<div class="col-md-1 truncate v-center" style="text-align: right!important">Almacen:</div>
<div class="col-md-3 v-center">
<asp:ListBox ID="DdlAlmacen" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" DataTextField="Almacen" DataValueField="CveAlmacen" Style="width: 100%;" runat="server"></asp:ListBox>
</div>
</div>
</div>
</div>
<div class="portlet-body" style="display: none;">
<div class="row">
<div class="col-md-1 truncate" style="text-align: right!important">Sucursal:</div>
<div class="col-md-3">
<asp:DropDownList ID="DdlSucursal" runat="server" CssClass="input-small input-sm select2me" Width="100%" DataTextField="SubProyecto" DataValueField="CveSubProyecto">
<asp:ListItem Text="Todas" Value="-1" Selected="True"> </asp:ListItem>
</asp:DropDownList>
</div>
<div class="cold-md-8"></div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="row" style="margin-left: 0px; margin-top: 15px; margin-bottom: 5px; text-align: right; margin-right: 5px;" align="left">
<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;" />
<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>
<asp:GridView ID="GVAlmacen" runat="server" AutoGenerateColumns="False" OnRowDataBound="GVAlmacen_RowDataBound" data-sort="true" EmptyDataText="No se encontraron Almacenes"
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None" Width="99%">
<Columns>
<asp:HyperLinkField HeaderText="Almacen" DataTextField="Almacen" DataNavigateUrlFields="CveAlmacen" DataNavigateUrlFormatString="/Inventarios/RepEntradasSalidas.aspx?CveAlmacen={0}" Target="_blank" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Enero" DataField="Enero" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Febrero" DataField="Febrero" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Marzo" DataField="Marzo" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Abril" DataField="Abril" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Mayo" DataField="Mayo" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Junio" DataField="Junio" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Julio" DataField="Julio" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Agosto" DataField="Agosto" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Septiembre" DataField="Septiembre" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Octubre" DataField="Octubre" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Noviembre" DataField="Noviembre" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Diciembre" DataField="Diciembre" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel runat="server" ID="UpVerEn" UpdateMode="Conditional">
<ContentTemplate>
<div id="DivVerEn" class="modal fade" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">
<asp:Label ID="Label2" runat="server" ClientIDMode="Static" Text="Ver En:"></asp:Label></h4>
</div>
<div class="modal-body">
<table style="width: 335px;" class="table table-striped table-advance table-hover">
<tbody>
<tr>
<td style="text-align: left;">
<asp:RadioButton ID="RblTotal" Checked="true" GroupName="GnVerEn" Text="Total" runat="server" /></td>
<td style="text-align: left;">
<asp:RadioButton ID="RblExistencia" GroupName="GnVerEn" Text="Existencia" runat="server" /></td>
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
<asp:Button ID="BtnVerEn" ClientIDMode="Static" runat="server" Text="Cargar" class="btn btn-success" OnClick="BtnVerEn_Click" />
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<div id="DivModalGrafica" class="modal ADS fade" role="dialog">
<asp:UpdatePanel class="modal-dialog modal-lg" runat="server" ID="UpGrafica" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">
<asp:Label ID="LblTituloGrafica" runat="server" ClientIDMode="Static" Text="Almacenes"></asp:Label>
</h4>
</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">
function CargaGraficaLineas(data, graph) {
var chart = AmCharts.makeChart("chartdiv", {
function CargaGraficaLineas(data, graph) {
var chart = AmCharts.makeChart("chartdiv", {
"type": "serial",
"theme": "light",
"legend": {
"legend": {
"useGraphSettings": true,
"valueWidth": 150
"valueWidth": 150
},
"dataProvider": data,
"startDuration": 0.5,
"graphs": graph,
"chartCursor": {
"chartCursor": {
"cursorAlpha": 0,
"zoomable": false
"zoomable": false
},
"categoryField": "mes",
"categoryAxis": {
"categoryAxis": {
"gridPosition": "start",
"axisAlpha": 0,
"fillAlpha": 0.05,
"fillColor": "#000000",
"gridAlpha": 0,
"position": "top"
"position": "top"
},
"export": {
"export": {
"enabled": true,
"position": "bottom-right"
}
});
"position": "bottom-right"
}
});
}
</script>
</asp:Content>
</script>
</asp:Content>

View File

@@ -39,18 +39,30 @@ Partial Class Inventarios_RepAlmacenPeriodo
DdlTipoAlmacen.DataSource = GlobalDTTipoAlmacen(1)
DdlTipoAlmacen.DataBind()
DdlTipoAlmacen.Items.Insert(0, New ListItem("Todos", "-1"))
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
DdlAlmacen.DataBind()
DdlAlmacen.Items.Insert(0, New ListItem("Todos", "-1"))
DdlSucursal.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, CveEstatus:=1)
DdlSucursal.DataBind()
DdlSucursal.Items.Insert(0, New ListItem("Todas", "-1"))
End Sub
Private Sub CargaDatos()
Dim objInv As New ClsInventarios
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 Almacenes As String = If(DdlAlmacen.GetSelectedValuesM = "", "-1", DdlAlmacen.GetSelectedValuesM)
Dim CveSubProyecto As Integer = DdlSucursal.SelectedValue.ToEntero()
If RblTotal.Checked Then Ver = 1
If RblExistencia.Checked Then Ver = 2
If objInv.GetRepAlmacenesPeriodo(FechaCorte, UsuarioActual.CveEmpresa, TipoAlmacen, DdlModalidadFiltro.SelectedValue.ToEntero, ChkInventariable.Checked, Ver) Then
If objInv.GetRepAlmacenesPeriodo(FechaCorte, UsuarioActual.CveEmpresa, TipoAlmacen, DdlModalidadFiltro.SelectedValue.ToEntero, ChkInventariable.Checked, Ver,
Almacenes:=Almacenes, CveSubProyecto:=CveSubProyecto, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
GVAlmacen.DataSource = objInv.DtResultados
TmpDT = objInv.DtResultados
End If

File diff suppressed because one or more lines are too long

View File

@@ -16,3 +16,7 @@
.. PAC: 4 - Verificado : (6) 6 Certificado : (384) 390 Armado: (27) 417 Genera: (390) 807 Timbrado: (2271) 3078 Guardado: (219) 3297 Actualizado: (902) 4199 ..01/10/2019:12:27 a. m.
.. PAC: 4 - Verificado : (0) 0 Certificado : (204) 204 Armado: (1) 205 Genera: (249) 454 Timbrado: (431) 885 ..01/10/2019:12:27 a. m.
.. PAC: 2 - Verificado : (32764) 32764 Armado: (660) 33424 Guardado: (445) 33869 Timbrado: (156762) 190631 ..06/11/2019:09:39 a. m.
.. PAC: 2 - Verificado : (2018) 2018 Armado: (96902) 98920 Guardado: (312) 99232 Timbrado: (1201) 100433 ..06/11/2019:09:41 a. m.

View File

@@ -2889,7 +2889,7 @@ Partial Class OC
If ChkCotizacion.Checked AndAlso NoProveedoresCot > 0 AndAlso (NumCotizacionesGanadoras > 0 OrElse Not (NumCotizacionesGanadoras <= 0 AndAlso CveConfianzaProveedor = 1)) Then
Dim CveProveedor = -1
Dim TotalCot = 0.0, IVACot = 0D, RetIVA = 0.0, RetISR = 0.0, PorIVA = 0.0, Porcentaje = 0.0
Dim TotalCot = 0.0, IVACot = 0D, RetIVA = 0.0, RetISR = 0.0, PorIVA = 0.0
Dim IdPoliza = -1
@@ -2900,11 +2900,10 @@ Partial Class OC
CveProveedor = dr("CveProveedor").ToString.ToEntero
Porcentaje = DtDetalle.SUM("Total", String.Format("CveProveedor = {0}", CveProveedor)) / DtDetalle.SUM("Total")
PorIVA = GlobalDTCompProveedores(CveEmpresaActual).FiltraParametros(String.Format("CveProveedor = {0}", CveProveedor)).Rows(0)("IVA").ToString.ToDouble
IVACot = (DtDetalle.SUM("Total", String.Format("CveProveedor = {0}", CveProveedor)) * PorIVA).ToString.ToDecimal
RetIVA = TxtRetIVA.Text.ToDecimal * Porcentaje
RetISR = TxtRetISR.Text.ToDecimal * Porcentaje
PorIVA = Math.Round(DdlIVA.SelectedValue.ToDouble - 1, 2) 'GlobalDTCompProveedores(CveEmpresaActual).FiltraParametros(String.Format("CveProveedor = {0}", CveProveedor)).Rows(0)("IVA").ToString.ToDouble
IVACot = IVA '(DtDetalle.SUM("Total", String.Format("CveProveedor = {0}", CveProveedor)) * PorIVA).ToString.ToDecimal
RetIVA = TxtRetIVA.Text.ToDecimal
RetISR = TxtRetISR.Text.ToDecimal
If objOrdenCompra.AddOrdenCompra("OC", -1, TxtDescrip.Text, TxtJustificacion.Text, DdlPrioridad.SelectedValue.ToEntero, TxtFecha.Text.ToDate, DdlMoneda.SelectedValue.ToEntero, CveEstatusInicialOC, TxtFechaEstimadaEntrega.Text, LugarEntrega,
CveUsuario, CveEmpresaActual, 0, pCveProveedor:=CveProveedor, CveCliente:=Ddlcliente.SelectedValue.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, PrioridadObservacion:=txtobsprioridad.Text,
@@ -2945,7 +2944,15 @@ Partial Class OC
End If
'AGREGA DETALLES
If Not objOrdenCompra.AddOrdenCompraDetalle(objOrdenCompra.CveOrdenCompra, dr("Cantidad").ToString.ToDouble(), dr("CveUnidadMedida").ToString.ToEntero, dr("CvePS").ToString.ToEntero, dr("Importe").ToString.ToDouble, dr("CveSubProyecto").ToString.ToEntero(), dr("CveActivoFijo").ToString.ToEntero, dr("Observacion").ToString, UsuarioActual.CveUsuario, CveOrdenCompra, CvePresupuestoEgreso:=dr("CvePresupuestoEgreso").ToString.ToEntero, Descuento:=dr("Descuento").ToString.ToDouble, IEPSPS:=dr("IEPSPS").ToString.ToDouble, IEPSPSIVA:=dr("IEPSPSIVA").ToString.ToDouble, IVA:=dr("IVA").ToString.ToDouble, RetIVA:=dr("RetIVA").ToString.ToDouble, RetISR:=dr("RetISR").ToString.ToDouble, Total:=dr("Total").ToString.ToDouble, CveContratoDetalle:=dr("CveContratoDetalle").ToString.ToEntero, IVAPorcentaje:=dr("IVAPorcentaje").ToString.ToDouble, RetIVAPorcentaje:=dr("RetIVAPorcentaje").ToString.ToDouble, RetISRPorcentaje:=dr("RetISRPorcentaje").ToString.ToDouble, IEPSPSPorcentaje:=dr("IEPSPSPorcentaje").ToString.ToDouble, IEPSPSIVAPorcentaje:=dr("IEPSPSIVAPorcentaje").ToString.ToDouble) Then
If Not objOrdenCompra.AddOrdenCompraDetalle(objOrdenCompra.CveOrdenCompra, dr("Cantidad").ToString.ToDouble(), dr("CveUnidadMedida").ToString.ToEntero,
dr("CvePS").ToString.ToEntero, dr("Importe").ToString.ToDouble, dr("CveSubProyecto").ToString.ToEntero(),
dr("CveActivoFijo").ToString.ToEntero, dr("Observacion").ToString, UsuarioActual.CveUsuario, CveOrdenCompra,
CvePresupuestoEgreso:=dr("CvePresupuestoEgreso").ToString.ToEntero, Descuento:=dr("Descuento").ToString.ToDouble,
IEPSPS:=dr("IEPSPS").ToString.ToDouble, IEPSPSIVA:=dr("IEPSPSIVA").ToString.ToDouble, IVA:=dr("IVA").ToString.ToDouble,
RetIVA:=dr("RetIVA").ToString.ToDouble, RetISR:=dr("RetISR").ToString.ToDouble, Total:=dr("Total").ToString.ToDouble,
CveContratoDetalle:=dr("CveContratoDetalle").ToString.ToEntero, IVAPorcentaje:=dr("IVAPorcentaje").ToString.ToDouble,
RetIVAPorcentaje:=dr("RetIVAPorcentaje").ToString.ToDouble, RetISRPorcentaje:=dr("RetISRPorcentaje").ToString.ToDouble,
IEPSPSPorcentaje:=dr("IEPSPSPorcentaje").ToString.ToDouble, IEPSPSIVAPorcentaje:=dr("IEPSPSIVAPorcentaje").ToString.ToDouble) Then
HuboError = True
Exit For
End If
@@ -2968,7 +2975,7 @@ Partial Class OC
If objOrdenCompra.AddOrdenCompra("OC", -1, TxtDescrip.Text, TxtJustificacion.Text, DdlPrioridad.SelectedValue.ToEntero, TxtFecha.Text.ToDate, DdlMoneda.SelectedValue.ToEntero, CveEstatusInicialOC, TxtFechaEstimadaEntrega.Text, LugarEntrega,
CveUsuario, CveEmpresaActual, 0, pCveProveedor:=DdlProveedores.SelectedValue.ToEntero, pCveProveedorSucursal:=DdlProveedorSucursal.SelectedValue.ToEntero, CveCliente:=Ddlcliente.SelectedValue.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, PrioridadObservacion:=txtobsprioridad.Text,
PorcentajeIVA:=Math.Round(DdlIVA.SelectedValue.ToDouble - 1, 2), IVA:=IVA, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, IDPoliza:=IDPolizaPresupuestal, CveCotizacion:=CveCotizacion, FolioAdicional:=TxtFolioAdicional.Text,
EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1), IEPS:=TxtIEPS.Text.ToDecimal, CveIEAnticipo:=CveIEAnticipo, ImporteAnticipo:=LtImporteIEAnticipo.Text.ToDouble, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero,
EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1), IEPS:=TxtIEPS.Text.ToDecimal, CveIEAnticipo:=CveIEAnticipo, ImporteAnticipo:=LtImporteIEAnticipo.Text.ToDouble, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero,
Promocion:=Promocion) Then

View File

@@ -1,374 +1,351 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepCotizacionesDetalle.aspx.vb" Inherits="PopOCCotizacionesDetalle" %>
<%--<%@ MasterType VirtualPath="~/Site.master" %>--%>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel runat="server">
<ContentTemplate>
<table style="width: 797px!important">
<tr>
<th class="Titulos" colspan="4">Carga de Cotizaciones</th>
</tr>
</table>
<br />
<div class="row" style="vertical-align: top">
<div class="col-sm-6">
<div class="row">
<%--PROVEEDORES--%>
<div class="col-sm-12 rowpadding">
<div class="portlet light smmallpadding bordered">
<div class="portlet-title">
<div class="caption">
<i class="fa fa-truck"></i><span class="caption-subject bold uppercase">Proveedores</span>
</div>
<div class="tools">
<div style="display: inline-block">
</div>
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
</div>
</div>
<div class="portlet-body">
<table>
<tr>
<td>
<label>Clasificación:</label></td>
<td>
<div>
<asp:DropDownList ID="CboClasificacionProveedor" CssClass="select2me" runat="server" AutoPostBack="true" DataTextField="ProveedorClasificacion" DataValueField="CveProveedorClasificacion"
Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 200px !important;">
</asp:DropDownList>
</div>
</td>
</tr>
<tr>
<td>
<label>Proveedor:</label>
</td>
<td>
<div>
<asp:DropDownList ID="CboProveedores" CssClass="select2me" runat="server" DataTextField="RazonSocial" DataValueField="CveProveedor"
Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 200px !important;">
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVProveedor" runat="server" ControlToValidate="CboProveedores"
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Proveedor''</b> es necesario, por favor ingréselo."
ValidationGroup="GrpDetalleGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEProveedor" runat="server" HighlightCssClass="vco"
TargetControlID="RFVProveedor" Width="300px">
</ajax:ValidatorCalloutExtender>
</div>
</td>
</tr>
</table>
</div>
</div>
</div>
<%--ARCHIVO--%>
<div class="col-sm-12 rowpadding" style="text-align:center;">
Archivo:
<asp:HyperLink ID="HplArchivo" runat="server" ToolTip="Descargar" Visible="false" Height="20px">[HplArchivo]</asp:HyperLink>
&nbsp;
<div class="btn-file btn green">
<i class="fa fa-plus"></i>
<span>Seleccionar Archivo</span>
<asp:FileUpload ID="FUArchivo" runat="server" onchange="$('#FUTxtt').text(this.value);" />
</div>
<span id="FUTxtt"></span>
</div>
</div>
</div>
<%--DATOS DE COTIZACION--%>
<div class="col-sm-6 rowpadding">
<div class="portlet light smmallpadding bordered">
<div class="portlet-title">
<div class="caption">
<i class="fa fa-money"></i><span class="caption-subject bold uppercase">Datos contización</span>
</div>
<div class="tools">
<div style="display: inline-block">
</div>
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
</div>
</div>
<div class="portlet-body">
<table>
<tr>
<td>
<label>Folio:</label></td>
<td>
<div>
<asp:TextBox AutoComplete="off" ID="TxtFolio" runat="server" Style="width: 200px !important;"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVFolio" runat="server" ControlToValidate="TxtFolio"
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> es necesario, por favor ingréselo."
ValidationGroup="GrpDetalleGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCOFolio" runat="server" HighlightCssClass="vco"
TargetControlID="RFVFolio" Width="300px">
</ajax:ValidatorCalloutExtender>
</div>
</td>
</tr>
<tr>
<td>
<label>Fecha Cotización:</label></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;">
<asp:TextBox AutoComplete="off" ID="TxtFecha" runat="server" CausesValidation="true" MaxLength="10" ValidationGroup="GrpGuardar" Style="width: 183px !important;"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="imgFecha" Style="margin-left: -10px!important" class="btn default" Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" AcceptNegative="Left" CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" CultureDateFormat="" CultureDatePlaceholder=""
CultureDecimalPlaceholder="" CultureThousandsPlaceholder="" CultureTimePlaceholder=""
DisplayMoney="Left" Enabled="True" ErrorTooltipEnabled="True" Mask="99/99/9999"
MaskType="Date" TargetControlID="TxtFecha" />
<ajax:MaskedEditValidator ID="MEVFecha" runat="server" ControlExtender="MEEFecha"
ControlToValidate="TxtFecha" Display="None" EmptyValueBlurredText="*" EmptyValueMessage="Fecha de Inicio de pagos Requerida"
ErrorMessage="" InvalidValueBlurredMessage="*" InvalidValueMessage="Fecha Inválida"
IsValidEmpty="False" TooltipMessage="Ingrese Fecha" ValidationGroup="GrpGuardar" />
<ajax:CalendarExtender ID="CEFecha" runat="server" Enabled="True" PopupButtonID="imgFecha" PopupPosition="Left" TargetControlID="TxtFecha"></ajax:CalendarExtender>
<ajax:ValidatorCalloutExtender ID="VcoFechaI" runat="server" HighlightCssClass="vco" TargetControlID="MEVFecha" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
</td>
</tr>
<tr>
<td>
<label>Moneda:</label></td>
<td>
<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>
</td>
</tr>
<tr>
<td>
<label>Días de Crédito:</label></td>
<td>
<div>
<asp:TextBox AutoComplete="off" runat="server" ID="TxtDiasCredito" Style="width: 200px !important;"></asp:TextBox>
</div>
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
<hr />
<div class="row">
<div class="col-sm-12">
<asp:GridView ID="GvDC" runat="server" AutoGenerateColumns="False" DataKeyNames="CveOrdenCompra, CvePS, Cantidad, CveUnidadMedida,CveOrdenCompraDetalle"
ShowHeader="True" CssClass="table table-striped table-hover Widthall" Style="margin-top: -10px; text-align: center;" GridLines="None">
<Columns>
<asp:TemplateField HeaderText="Cant.">
<ItemTemplate>
<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>
</ItemTemplate>
<ItemStyle Width="40" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Unidad">
<EditItemTemplate>
<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;">
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVUnidadMedida" runat="server" ControlToValidate="CboUnidadMedidaEdit"
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."
ValidationGroup="GrpEditGuardar"></asp:RequiredFieldValidator>
</EditItemTemplate>
<ItemTemplate>
<asp:Literal ID="LA" runat="server" Text='<%# Bind("Abreviatura") %>'></asp:Literal>
</ItemTemplate>
<ItemStyle Width="50px" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Descripción">
<EditItemTemplate>
<asp:TextBox AutoComplete="off" ID="TxtDescripDetalleEdit" runat="server" Text='<%# Bind("Descripcion") %>'
Width="345px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVDescripcion" runat="server" ControlToValidate="TxtDescripDetalleEdit"
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."
ValidationGroup="GrpEditGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCOEmpresa" runat="server" HighlightCssClass="vco"
TargetControlID="RFVDescripcion" Width="300px">
</ajax:ValidatorCalloutExtender>
</EditItemTemplate>
<ItemTemplate>
<asp:Literal ID="LDescrip" runat="server" Text='<%# Bind("PS") %>'></asp:Literal>
</ItemTemplate>
<ItemStyle Width="250px" HorizontalAlign="Left" />
</asp:TemplateField>
<asp:BoundField DataField="Observacion" HeaderText="Observación" />
<asp:TemplateField ShowHeader="False" HeaderText="Cantidad Surtir">
<EditItemTemplate>
</EditItemTemplate>
<ItemTemplate>
<asp:TextBox AutoComplete="off" ID="TxtCantidadSurtir" runat="server" Width="55px" Style="text-align: right" Text="" CausesValidation="true"></asp:TextBox>
<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:ValidatorCalloutExtender ID="VCECantidadSurtir" runat="server" HighlightCssClass="vco" TargetControlID="RFVCantidadSurtir" Width="300px"></ajax:ValidatorCalloutExtender>
<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="VCECantidad" runat="server" HighlightCssClass="vco" TargetControlID="RVCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
<ajax:FilteredTextBoxExtender ID="FilCantidadSurtir" runat="server" TargetControlID="TxtCantidadSurtir" FilterType="Custom, Numbers" ValidChars="." />
</ItemTemplate>
<ItemStyle Width="55px" />
</asp:TemplateField>
<asp:TemplateField ShowHeader="False" HeaderText="Fecha Entrega">
<EditItemTemplate>
</EditItemTemplate>
<ItemTemplate>
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
<asp:TextBox ID="txtFechaEntrega" runat="server" CssClass="form-control" CausesValidation="true" Style="width: 87px" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="ImgFechaFinContrato" Style="margin-left: -10px!important" class="btn default" Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MEEFechaEntrega" runat="server" TargetControlID="txtFechaEntrega" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEFechaEntrega" TargetControlID="txtFechaEntrega" PopupButtonID="ImgFechaFinContrato" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<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>
<ajax:ValidatorCalloutExtender ID="VCOImgFechaEntrega" runat="server" HighlightCssClass="vco" TargetControlID="CVImgFechaEntrega" Width="350px"></ajax:ValidatorCalloutExtender>
<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>
<ajax:ValidatorCalloutExtender ID="VCtxtFechaEntrega" runat="server" HighlightCssClass="vco" TargetControlID="RFVtxtFechaEntrega" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
</ItemTemplate>
<ItemStyle Width="100px" />
</asp:TemplateField>
<asp:TemplateField ShowHeader="False" HeaderText="Precio Unitario">
<EditItemTemplate>
</EditItemTemplate>
<ItemTemplate>
<asp:TextBox AutoComplete="off" ID="TxtPU" runat="server" Width="70px" Style="text-align: right" Text='<%# If(Not EsNuevo, Eval("PU", "{0:###,###,###.##}"), "") %>'></asp:TextBox>
<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:ValidatorCalloutExtender ID="VCEPU" runat="server" HighlightCssClass="vco" TargetControlID="RFVTxtPU" Width="300px"></ajax:ValidatorCalloutExtender>
<ajax:FilteredTextBoxExtender ID="FilTxtPU" runat="server" TargetControlID="TxtPU" FilterType="Custom, Numbers" ValidChars="." />
</ItemTemplate>
<ItemStyle Width="70px" />
</asp:TemplateField>
<asp:TemplateField ShowHeader="False" HeaderText="Importe">
<EditItemTemplate>
</EditItemTemplate>
<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>
</ItemTemplate>
<ItemStyle Width="75px" />
</asp:TemplateField>
<asp:TemplateField ShowHeader="False" HeaderText="Observación">
<EditItemTemplate>
</EditItemTemplate>
<ItemTemplate>
<asp:TextBox AutoComplete="off" ID="TxtObservacion" runat="server" Width="75px" Style="text-align: right" Text=""></asp:TextBox>
</ItemTemplate>
<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">
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepCotizacionesDetalle.aspx.vb" Inherits="PopOCCotizacionesDetalle" %>
<%--<%@ MasterType VirtualPath="~/Site.master" %>--%>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<table style="width: 797px!important">
<tr>
<th class="Titulos" colspan="4">Carga de Cotizaciones</th>
</tr>
</table>
<br />
<div class="row">
<div class="col-sm-6 rowpadding">
<asp:UpdatePanel runat="server">
<ContentTemplate>
<div class="portlet light smmallpadding bordered">
<div class="portlet-title">
<div class="caption">
<i class="fa fa-truck"></i><span class="caption-subject bold uppercase">Proveedores</span>
</div>
<div class="tools">
<div style="display: inline-block">
</div>
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
</div>
</div>
<div class="portlet-body">
<table>
<tr>
<td>
<label>Clasificación:</label></td>
<td>
<div>
<asp:DropDownList ID="CboClasificacionProveedor" CssClass="select2me" runat="server" AutoPostBack="true" DataTextField="ProveedorClasificacion" DataValueField="CveProveedorClasificacion"
Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 200px !important;">
</asp:DropDownList>
</div>
</td>
</tr>
<tr>
<td>
<label>Proveedor:</label>
</td>
<td>
<div>
<asp:DropDownList ID="CboProveedores" CssClass="select2me" runat="server" DataTextField="RazonSocial" DataValueField="CveProveedor"
Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 200px !important;">
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVProveedor" runat="server" ControlToValidate="CboProveedores"
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Proveedor''</b> es necesario, por favor ingréselo."
ValidationGroup="GrpDetalleGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEProveedor" runat="server" HighlightCssClass="vco"
TargetControlID="RFVProveedor" Width="300px">
</ajax:ValidatorCalloutExtender>
</div>
</td>
</tr>
</table>
</div>
</div>
<div class="portlet light smmallpadding bordered">
<div class="portlet-title">
<div class="caption">
<i class="fa fa-file"></i><span class="caption-subject bold uppercase">Archivo</span>
</div>
<div class="tools">
<div style="display: inline-block">
<asp:LinkButton ID="LnkArchivo" Visible="false" runat="server" OnClick="LnkArchivo_Click" Text="<i class='fa fa-download' aria-hidden='true'></i> Descargar"></asp:LinkButton>
</div>
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
</div>
</div>
<div class="portlet-body">
<asp:TextBox ID="TxtArchivo" CssClass="ADSdropzone hidden" data-maxFile="1" Text="" runat="server"></asp:TextBox>
</div>
</div>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LnkArchivo" />
</Triggers>
</asp:UpdatePanel>
</div>
<div class="col-sm-6 rowpadding">
<div class="portlet light smmallpadding bordered">
<div class="portlet-title">
<div class="caption">
<i class="fa fa-money"></i><span class="caption-subject bold uppercase">Datos contización</span>
</div>
<div class="tools">
<div style="display: inline-block">
</div>
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
</div>
</div>
<div class="portlet-body">
<table>
<tr>
<td>
<label>Folio:</label></td>
<td>
<div>
<asp:TextBox AutoComplete="off" ID="TxtFolio" runat="server" Style="width: 200px !important;"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVFolio" runat="server" ControlToValidate="TxtFolio"
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> es necesario, por favor ingréselo."
ValidationGroup="GrpDetalleGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCOFolio" runat="server" HighlightCssClass="vco"
TargetControlID="RFVFolio" Width="300px">
</ajax:ValidatorCalloutExtender>
</div>
</td>
</tr>
<tr>
<td>
<label>Fecha Cotización:</label></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;">
<asp:TextBox AutoComplete="off" ID="TxtFecha" runat="server" CausesValidation="true" MaxLength="10" ValidationGroup="GrpGuardar" Style="width: 183px !important;"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="imgFecha" Style="margin-left: -10px!important" class="btn default" Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" AcceptNegative="Left" CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" CultureDateFormat="" CultureDatePlaceholder=""
CultureDecimalPlaceholder="" CultureThousandsPlaceholder="" CultureTimePlaceholder=""
DisplayMoney="Left" Enabled="True" ErrorTooltipEnabled="True" Mask="99/99/9999"
MaskType="Date" TargetControlID="TxtFecha" />
<ajax:MaskedEditValidator ID="MEVFecha" runat="server" ControlExtender="MEEFecha"
ControlToValidate="TxtFecha" Display="None" EmptyValueBlurredText="*" EmptyValueMessage="Fecha de Inicio de pagos Requerida"
ErrorMessage="" InvalidValueBlurredMessage="*" InvalidValueMessage="Fecha Inválida"
IsValidEmpty="False" TooltipMessage="Ingrese Fecha" ValidationGroup="GrpGuardar" />
<ajax:CalendarExtender ID="CEFecha" runat="server" Enabled="True" PopupButtonID="imgFecha" PopupPosition="Left" TargetControlID="TxtFecha"></ajax:CalendarExtender>
<ajax:ValidatorCalloutExtender ID="VcoFechaI" runat="server" HighlightCssClass="vco" TargetControlID="MEVFecha" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
</td>
</tr>
<tr>
<td>
<label>Moneda:</label></td>
<td>
<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>
</td>
</tr>
<tr>
<td>
<label>Días de Crédito:</label></td>
<td>
<div>
<asp:TextBox AutoComplete="off" runat="server" ID="TxtDiasCredito" Style="width: 200px !important;"></asp:TextBox>
</div>
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
<asp:UpdatePanel runat="server">
<ContentTemplate>
<hr />
<div class="row">
<div class="col-sm-12">
<asp:GridView ID="GvDC" runat="server" AutoGenerateColumns="False" DataKeyNames="CveOrdenCompra, CvePS, Cantidad, CveUnidadMedida,CveOrdenCompraDetalle"
ShowHeader="True" CssClass="table table-striped table-hover Widthall" Style="margin-top: -10px; text-align: center;" GridLines="None">
<Columns>
<asp:TemplateField HeaderText="Cant.">
<ItemTemplate>
<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>
</ItemTemplate>
<ItemStyle Width="40" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Unidad">
<EditItemTemplate>
<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;">
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVUnidadMedida" runat="server" ControlToValidate="CboUnidadMedidaEdit"
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."
ValidationGroup="GrpEditGuardar"></asp:RequiredFieldValidator>
</EditItemTemplate>
<ItemTemplate>
<asp:Literal ID="LA" runat="server" Text='<%# Bind("Abreviatura") %>'></asp:Literal>
</ItemTemplate>
<ItemStyle Width="50px" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Descripción">
<EditItemTemplate>
<asp:TextBox AutoComplete="off" ID="TxtDescripDetalleEdit" runat="server" Text='<%# Bind("Descripcion") %>'
Width="345px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVDescripcion" runat="server" ControlToValidate="TxtDescripDetalleEdit"
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."
ValidationGroup="GrpEditGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCOEmpresa" runat="server" HighlightCssClass="vco"
TargetControlID="RFVDescripcion" Width="300px">
</ajax:ValidatorCalloutExtender>
</EditItemTemplate>
<ItemTemplate>
<asp:Literal ID="LDescrip" runat="server" Text='<%# Bind("PS") %>'></asp:Literal>
</ItemTemplate>
<ItemStyle Width="250px" HorizontalAlign="Left" />
</asp:TemplateField>
<asp:BoundField DataField="Observacion" HeaderText="Observación" />
<asp:TemplateField ShowHeader="False" HeaderText="Cantidad Surtir">
<EditItemTemplate>
</EditItemTemplate>
<ItemTemplate>
<asp:TextBox AutoComplete="off" ID="TxtCantidadSurtir" runat="server" Width="55px" Style="text-align: right" Text="" CausesValidation="true"></asp:TextBox>
<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:ValidatorCalloutExtender ID="VCECantidadSurtir" runat="server" HighlightCssClass="vco" TargetControlID="RFVCantidadSurtir" Width="300px"></ajax:ValidatorCalloutExtender>
<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="VCECantidad" runat="server" HighlightCssClass="vco" TargetControlID="RVCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
<ajax:FilteredTextBoxExtender ID="FilCantidadSurtir" runat="server" TargetControlID="TxtCantidadSurtir" FilterType="Custom, Numbers" ValidChars="." />
</ItemTemplate>
<ItemStyle Width="55px" />
</asp:TemplateField>
<asp:TemplateField ShowHeader="False" HeaderText="Fecha Entrega">
<EditItemTemplate>
</EditItemTemplate>
<ItemTemplate>
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
<asp:TextBox ID="txtFechaEntrega" runat="server" CssClass="form-control" CausesValidation="true" Style="width: 87px" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="ImgFechaFinContrato" Style="margin-left: -10px!important" class="btn default" Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MEEFechaEntrega" runat="server" TargetControlID="txtFechaEntrega" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEFechaEntrega" TargetControlID="txtFechaEntrega" PopupButtonID="ImgFechaFinContrato" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<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>
<ajax:ValidatorCalloutExtender ID="VCOImgFechaEntrega" runat="server" HighlightCssClass="vco" TargetControlID="CVImgFechaEntrega" Width="350px"></ajax:ValidatorCalloutExtender>
<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>
<ajax:ValidatorCalloutExtender ID="VCtxtFechaEntrega" runat="server" HighlightCssClass="vco" TargetControlID="RFVtxtFechaEntrega" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
</ItemTemplate>
<ItemStyle Width="100px" />
</asp:TemplateField>
<asp:TemplateField ShowHeader="False" HeaderText="Precio Unitario">
<EditItemTemplate>
</EditItemTemplate>
<ItemTemplate>
<asp:TextBox AutoComplete="off" ID="TxtPU" runat="server" Width="70px" Style="text-align: right" Text='<%# If(Not EsNuevo, Eval("PU", "{0:###,###,###.##}"), "") %>'></asp:TextBox>
<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:ValidatorCalloutExtender ID="VCEPU" runat="server" HighlightCssClass="vco" TargetControlID="RFVTxtPU" Width="300px"></ajax:ValidatorCalloutExtender>
<ajax:FilteredTextBoxExtender ID="FilTxtPU" runat="server" TargetControlID="TxtPU" FilterType="Custom, Numbers" ValidChars="." />
</ItemTemplate>
<ItemStyle Width="70px" />
</asp:TemplateField>
<asp:TemplateField ShowHeader="False" HeaderText="Importe">
<EditItemTemplate>
</EditItemTemplate>
<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>
</ItemTemplate>
<ItemStyle Width="75px" />
</asp:TemplateField>
<asp:TemplateField ShowHeader="False" HeaderText="Observación">
<EditItemTemplate>
</EditItemTemplate>
<ItemTemplate>
<asp:TextBox AutoComplete="off" ID="TxtObservacion" runat="server" Width="75px" Style="text-align: right" Text=""></asp:TextBox>
</ItemTemplate>
<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>
function Ir() {
try {
function Ir() {
try {
parent.CargaDatosCotizaciones();
parent.tb_remove();
parent.tb_remove();
} catch (ex) {
console.log(ex.message);
}
} catch (ex) {
console.log(ex.message);
}
}
function ClientValidateFechaEntrega(source, arguments) {
function ClientValidateFechaEntrega(source, arguments) {
var txtCantidadSurtir = document.getElementById(source.txtCantidadSurtir);
if (txtCantidadSurtir.value == 0) {
arguments.IsValid = false;
} else {
if (txtCantidadSurtir.value == 0) {
arguments.IsValid = false;
} else {
if (arguments.Value == "" || arguments.Value == "__/__/____")
{ arguments.IsValid = false; }
else
{ arguments.IsValid = true; }
}
{ arguments.IsValid = true; }
}
}
function ClientValidatePU(source, arguments) {
function ClientValidatePU(source, arguments) {
arguments.IsValid = true
arguments.IsValid = true
}
function isNumeric(n) {
return !isNaN(parseFloat(n)) && isFinite(n);
function isNumeric(n) {
return !isNaN(parseFloat(n)) && isFinite(n);
}
function CalculaImporte(Cant, tPU, Imp) {
function CalculaImporte(Cant, tPU, Imp) {
var Cantidad = ToDouble(Cant.value);
var PU = ToDouble(tPU.value);
var Importe = Cantidad * PU;
Imp.value = ToDouble(Importe);
Imp.value = ToDouble(Importe);
}
function validacionRow(objControl, tipo) {
function validacionRow(objControl, tipo) {
var eRow;
if (tipo == 1) {
eRow = $(objControl).parent().parent();
} else if (tipo == 2) {
eRow = $(objControl).parent().parent().parent();
if (tipo == 1) {
eRow = $(objControl).parent().parent();
} else if (tipo == 2) {
eRow = $(objControl).parent().parent().parent();
}
var arregloControles = $(eRow).attr("data-controles").split(',');
@@ -379,55 +356,55 @@
var controleslen = arregloControles.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]);
controlName = controlName.replace("'", "")
if ($(controlName).val().length > 0) {
if ($(controlName).val().length > 0) {
activarValidadores = true;
$(controlName).IsValid = false;
console.log('control con valor ' + $(controlName).val() + ' ' + $(controlName).val().length + ' ' + controlName);
break;
break;
} else {
$(controlName).IsValid = true;
}
} else {
$(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 procesoCorrecto = true;
ValidatorName = ValidatorName.replace("'", "");
try {
try {
document.getElementById(ValidatorName).disabled = false;
ValidatorEnable($get(ValidatorName), true);
ValidatorEnable($get(ValidatorName), true);
} catch (err) {
} catch (err) {
console.log(ValidatorName + " - " + err.message);
procesoCorrecto = false;
procesoCorrecto = false;
}
if (procesoCorrecto) {
console.log('validadores activados');
} else {
console.log('Error al activar validadores');
}
if (procesoCorrecto) {
console.log('validadores activados');
} else {
console.log('Error al activar validadores');
}
}
}
} else {
for (var v = 0; v < validadoreslen; v++) {
} else {
for (var v = 0; v < validadoreslen; v++) {
var ValidatorName = arregloValidadores[v];
var procesoCorrecto = true;
@@ -435,40 +412,40 @@
ValidatorName = ValidatorName.replace("'", "");
try {
try {
document.getElementById(ValidatorName).disabled = true;
ValidatorEnable($get(ValidatorName), false);
} catch (err) {
ValidatorEnable($get(ValidatorName), false);
} catch (err) {
console.log(ValidatorName + " - " + err.message);
procesoCorrecto = false;
procesoCorrecto = false;
}
if (procesoCorrecto) {
console.log('Validadores desactivados');
} else {
console.log('Error al desactivar validadores');
}
if (procesoCorrecto) {
console.log('Validadores desactivados');
} else {
console.log('Error al desactivar validadores');
}
}
}
}
}
}
function FechaActualddMMyyy() {
function FechaActualddMMyyy() {
var today = new Date();
var dd = today.getDate();
var mm = today.getMonth() + 1;
var yyyy = today.getFullYear();
if (dd < 10) {
dd = '0' + dd;
if (dd < 10) {
dd = '0' + dd;
}
if (mm < 10) {
mm = '0' + mm;
if (mm < 10) {
mm = '0' + mm;
}
return today = dd + '/' + mm + '/' + yyyy;
return today = dd + '/' + mm + '/' + yyyy;
}
</script>
</asp:Content>
</script>
</asp:Content>

View File

@@ -2,13 +2,14 @@
Option Explicit On
Imports System.Data
Imports System.Net
Imports Extensiones
Partial Class PopOCCotizacionesDetalle
Inherits ClsPaginas
Inherits ClsPaginas
#Region "Propiedades"
Friend Property EsNuevo As Boolean
Get
EsNuevo = DirectCast(ViewState("EsNuevo"), Boolean)
@@ -43,11 +44,20 @@ Partial Class PopOCCotizacionesDetalle
Set(ByVal value As DataTable)
ViewState("DtDetalle") = value
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
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
@@ -76,9 +86,9 @@ Partial Class PopOCCotizacionesDetalle
BtnEliminar.Visible = True
End If
End If
End Sub
End Sub
#Region " INICIALIZA VALORES - CARGA COMBOS "
Protected Sub CargaProveedoresClasificaciones()
CboClasificacionProveedor.DataSource = GlobalDTProveedorClasificacion(UsuarioActual.CveEmpresa)
@@ -97,11 +107,11 @@ Partial Class PopOCCotizacionesDetalle
Protected Sub CargaMonedas()
ddlMoneda.DataSource = GlobalDTMonedas()
ddlMoneda.DataBind()
End Sub
End Sub
#End Region
#Region "C A R G A D A T O S "
Private Sub CargaOCDetalle(pCveOrden As Integer)
Dim objOC As New ClsOC
@@ -129,11 +139,10 @@ Partial Class PopOCCotizacionesDetalle
TxtFecha.Text = objCotizacion.Fecha.ToShortDateString
ddlMoneda.SelectedValue = objCotizacion.CveMoneda.ToString
TxtDiasCredito.Text = objCotizacion.DiasCredito.ToString
Adjunto = objCotizacion.Adjunto
If objCotizacion.Adjunto <> "" Then
HplArchivo.NavigateUrl = String.Format("/Empresas/{0}/Cotizaciones/{1}", UsuarioActual.CveEmpresa, objCotizacion.Adjunto)
HplArchivo.Text = String.Format("<img targer='_blank' src='/Imagenes/{0}.png' border='0' width='18px' alt='Descargar'/>", IO.Path.GetExtension(objCotizacion.Adjunto).Replace("."c, "")) 'ImageUrl = String.Format("/Imagenes/{0}.png", IO.Path.GetExtension(Cot.NombreArchivo).Replace("."c, ""))
HplArchivo.Visible = True
'HplArchivo.NavigateUrl = String.Format("/Empresas/{0}/Cotizaciones/{1}", UsuarioActual.CveEmpresa, objCotizacion.Adjunto)
LnkArchivo.Visible = True
End If
If objCotizacion.GetCotizacionesDetalle(pCveCotizacion) Then
@@ -155,7 +164,7 @@ Partial Class PopOCCotizacionesDetalle
TxtDiasCredito.Enabled = False
TxtFecha.Enabled = False
TxtFolio.Enabled = False
FUArchivo.Enabled = False
'FUArchivo.Enabled = False
If UsuarioActual.TienePermisoProceso(146) Then
GvDC.Enabled = True
@@ -164,61 +173,71 @@ Partial Class PopOCCotizacionesDetalle
End If
BtnGuardar.Enabled = False
End Sub
End Sub
#End Region
#Region " GUARDAR "
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
Dim objCotizacion As New ClsOC
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
If EsNuevo Then
If objCotizacion.AddCotizacion(CveOrdenCompra, CboProveedores.SelectedValue.ToEntero, -1, TxtFolio.Text, TxtFecha.Text, IO.Path.GetExtension(FUArchivo.FileName), ddlMoneda.SelectedValue.ToEntero, TxtDiasCredito.Text.ToEntero, UsuarioActual.CveUsuario) Then
If FUArchivo.HasFile Then
'verificar que exista el directorio
If Not System.IO.Directory.Exists(String.Format("{0}/Empresas/{1}/Cotizaciones/", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa)) Then
System.IO.Directory.CreateDirectory(String.Format("{0}/Empresas/{1}/Cotizaciones/", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa))
End If
FUArchivo.SaveAs(String.Format("{0}/Empresas/{1}/Cotizaciones/{2}{3}", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa, objCotizacion.CveCotizacion, IO.Path.GetExtension(FUArchivo.FileName)))
If objCotizacion.AddCotizacion(CveOrdenCompra, CboProveedores.SelectedValue.ToEntero, -1, TxtFolio.Text, TxtFecha.Text, FileExtension, ddlMoneda.SelectedValue.ToEntero,
TxtDiasCredito.Text.ToEntero, UsuarioActual.CveUsuario) Then
'verificar que exista el directorio
If Not System.IO.Directory.Exists(String.Format("{0}/Empresas/{1}/Cotizaciones/", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa)) Then
System.IO.Directory.CreateDirectory(String.Format("{0}/Empresas/{1}/Cotizaciones/", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa))
End If
If Filename <> "" Then
Filename.FilesMove(objCotizacion.CveCotizacion.ToString(), String.Format("Empresas\{0}\Cotizaciones", UsuarioActual.CveEmpresa))
End If
For Each dr As GridViewRow In GvDC.Rows
TieneError = Not objCotizacion.AddCotizacionDetalle(objCotizacion.CveCotizacion, dr.DataKey("CvePS").ToEntero, dr.FCTextBox("TxtPU").Text.ToDouble, dr.DataKey("Cantidad").ToDouble, dr.DataKey("CveUnidadMedida").ToEntero, dr.FCTextBox("txtCantidadSurtir").Text.ToDouble, If(dr.FCTextBox("txtFechaEntrega").Text.Trim = "" Or dr.FCTextBox("txtFechaEntrega").Text = "__/__/____", "-1", dr.FCTextBox("txtFechaEntrega").Text), dr.FCTextBox("txtObservacion").Text.ToString, dr.DataKey("CveOrdenCompraDetalle").ToString.ToEntero)
TieneError = Not objCotizacion.AddCotizacionDetalle(objCotizacion.CveCotizacion, dr.DataKey("CvePS").ToEntero, dr.FCTextBox("TxtPU").Text.ToDouble, dr.DataKey("Cantidad").ToDouble,
dr.DataKey("CveUnidadMedida").ToEntero, dr.FCTextBox("txtCantidadSurtir").Text.ToDouble,
If(dr.FCTextBox("txtFechaEntrega").Text.Trim = "" Or dr.FCTextBox("txtFechaEntrega").Text = "__/__/____", "-1",
dr.FCTextBox("txtFechaEntrega").Text), dr.FCTextBox("txtObservacion").Text.ToString, dr.DataKey("CveOrdenCompraDetalle").ToString.ToEntero)
If TieneError = True Then Exit For
Next
End If
Else
Dim NombreArchivo As String = ""
If objCotizacion.UpdateCotizacion(CboProveedores.SelectedValue.ToEntero, -1, TxtFolio.Text, TxtFecha.Text, IO.Path.GetExtension(FUArchivo.FileName), ddlMoneda.SelectedValue.ToEntero, TxtDiasCredito.Text.ToEntero, UsuarioActual.CveUsuario, CveCotizacion) Then
If FUArchivo.HasFile Then
'verificar que exista el directorio
If Not System.IO.Directory.Exists(String.Format("{0}/Empresas/{1}/Cotizaciones/", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa)) Then
System.IO.Directory.CreateDirectory(String.Format("{0}/Empresas/{1}/Cotizaciones/", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa))
End If
FUArchivo.SaveAs(String.Format("{0}/Empresas/{1}/Cotizaciones/{2}{3}", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa, CveCotizacion, IO.Path.GetExtension(FUArchivo.FileName)))
NombreArchivo = CveCotizacion & IO.Path.GetExtension(FUArchivo.FileName)
If objCotizacion.UpdateCotizacion(CboProveedores.SelectedValue.ToEntero, -1, TxtFolio.Text, TxtFecha.Text, FileExtension, 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
System.IO.Directory.CreateDirectory(String.Format("{0}/Empresas/{1}/Cotizaciones/", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa))
End If
If Filename <> "" Then
Filename.FilesMove(CveCotizacion.ToString(), String.Format("Empresas\{0}\Cotizaciones", UsuarioActual.CveEmpresa))
End If
For Each dr As GridViewRow In GvDC.Rows
If dr.DataKey("CveCotizacionDetalle").ToEntero > 0 Then
TieneError = Not objCotizacion.UpdateCotizacionDetalle(dr.DataKey("CveCotizacionDetalle").ToEntero, dr.FCTextBox("TxtPU").Text.ToDouble, dr.FCTextBox("txtCantidadSurtir").Text.ToDouble, dr.FCTextBox("txtFechaEntrega").Text, dr.FCTextBox("txtObservacion").Text.ToString)
Else
Dim strTemp = dr.DataKey("CveOrdenCompraDetalle").ToString
If dr.FCTextBox("txtCantidadSurtir").Text.ToString.ToDouble > 0 Then
If dr.FCTextBox("TxtPU").Text.ToDouble > 0 Then TieneError = Not objCotizacion.AddCotizacionDetalle(CveCotizacion, dr.DataKey("CvePS").ToEntero, dr.FCTextBox("TxtPU").Text.ToDouble, dr.DataKey("Cantidad").ToDouble, dr.DataKey("CveUnidadMedida").ToEntero, dr.FCTextBox("txtCantidadSurtir").Text.ToString.ToDouble, If(dr.FCTextBox("txtFechaEntrega").Text.Trim = "" Or dr.FCTextBox("txtFechaEntrega").Text = "__/__/____", "-1", dr.FCTextBox("txtFechaEntrega").Text), dr.FCTextBox("txtObservacion").Text.ToString, dr.DataKey("CveOrdenCompraDetalle").ToEntero)
End If
End If
If TieneError = True Then Exit For
Next
@@ -229,38 +248,25 @@ Partial Class PopOCCotizacionesDetalle
End If
Catch ex As Exception
TieneError = True
objCotizacion.RollBack()
OnError("Se presento un error al guardar la cotización", ex)
End Try
If Not TieneError Then
objCotizacion.Commit()
Alert(If(EsNuevo, "Cotización Guardada.", "Cotización Actualizada."), TipoMensaje.MsgInformacion)
Else
Try
objCotizacion.RollBack()
Catch ex As Exception
OnError("Error al intetar hace RollBack", ex)
End Try
Else
objCotizacion.RollBack()
End If
objCotizacion.Dispose()
RegistraScript("Ir();")
End Sub
End Sub
#End Region
#Region " ELIMINAR "
Private Sub BtnEliminar_Click(sender As Object, e As EventArgs) Handles BtnEliminar.Click
Dim objCotizacion As New ClsOC
@@ -274,10 +280,10 @@ Partial Class PopOCCotizacionesDetalle
objCotizacion.Dispose()
RegistraScript("Ir();")
End Sub
End Sub
#End Region
#Region " G V D "
Protected Sub GvD_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDC.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
@@ -365,10 +371,30 @@ Partial Class PopOCCotizacionesDetalle
'e.Row.Attributes.Add("data-validadores", ValidadoresId)
Dim asdasdasd As String = ""
End If
End Sub
Dim asdasdasd As String = ""
End If
End Sub
#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

View File

@@ -10,14 +10,12 @@
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
<%-- <asp:UpdatePanel ID="UpLnkAcciones" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<li>
<asp:LinkButton ID="LnkAgregarConcepto" PostBackUrl="/Nomina/ConceptoNomina.aspx" CommandArgument="-1" runat="server" >
<i class="fa fa-plus"></i><span style="padding: 10px">Generar PDF </span></asp:LinkButton>
</li>
</ContentTemplate>
</asp:UpdatePanel>--%>
<li>
<asp:LinkButton ID="LnkPdf" OnClick="LnkPdf_Click" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> Generar PDF</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkExcel" OnClick="LnkExcel_Click" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Exporta Excel</asp:LinkButton>
</li>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" Runat="Server">
</asp:Content>

View File

@@ -1,11 +1,13 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Extensiones;
using Microsoft.Reporting.WebForms;
using static Extensiones.ModExtensiones;
public partial class OC_RepSolicitudesAnticipo : ClsPaginas
@@ -47,6 +49,11 @@ public partial class OC_RepSolicitudesAnticipo : ClsPaginas
ViewState["FechaF"] = value;
}
}
private DataTable DtDatos
{
get { return DtDatos = (DataTable)ViewState["DtDatos"]; }
set { ViewState["DtDatos"] = value; }
}
#endregion
protected void Page_Load(object sender, EventArgs e)
@@ -82,7 +89,8 @@ public partial class OC_RepSolicitudesAnticipo : ClsPaginas
if (ObjOC.GetRepSolicitudAnticipos(UsuarioActual.CveEmpresa, CveProveedor, FechaI, FechaF, DdlEstatus.SelectedValue.ToEntero()))
{
GvSolicitudes.DataSource = ObjOC.DtResultados;
DtDatos = ObjOC.DtResultados;
GvSolicitudes.DataSource = DtDatos;
}
ObjOC.Dispose();
@@ -106,4 +114,51 @@ public partial class OC_RepSolicitudesAnticipo : ClsPaginas
}
CargaDatos();
}
protected void LnkExcel_Click(object sender, EventArgs e)
{
GenerarPDF("EXCEL");
}
protected void LnkPdf_Click(object sender, EventArgs e)
{
GenerarPDF("PDF");
}
protected void GenerarPDF(String Opcion)
{
String FechaI;
if (txtFechaI.Text == "" || txtFechaI.Text == "__/__/____") { FechaI = ""; } else { FechaI = $"&emsp;<b>Fecha Inicial:</b> {txtFechaI.Text}"; }
String FechaF;
if (txtFechaF.Text == "" || txtFechaF.Text == "__/__/____") { FechaF = ""; } else { FechaF = $"&emsp;<b>Fecha Final:</b> {txtFechaF.Text}"; }
String Proveedor;
if (DdlProveedor.SelectedValue != "-1") { Proveedor = $"&emsp;<b>Proveedor:</b> {DdlProveedor.SelectedItem.Text}"; } else { Proveedor = ""; }
String Estatus;
if (DdlEstatus.SelectedValue != "1") { Estatus = $"&emsp;<b>Estatus:</b> {DdlEstatus.SelectedItem.Text}"; } else { Estatus = ""; }
if (DtDatos.Rows.Count > 0)
{
System.IO.FileInfo Imagen = new System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta));
String logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa);
List<ReportParameter> para = new List<ReportParameter>();
para.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa));
para.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre));
para.Add(new ReportParameter("Estatus", DdlEstatus.SelectedValue));
String Agrupadores = $"{Proveedor}{FechaI}{FechaF}{Estatus}";
para.Add(new ReportParameter("AgrupadoPor", (Agrupadores == "" ? "": $"<b>Agrupado Por:</b> {Agrupadores}")));
if (Imagen.Exists)
{
para.Add(new ReportParameter("LogoPath", logouri));
}
else
{
para.Add(new ReportParameter("LogoPath", ""));
}
ImprimirPDF("Empresas/Grales/Formatos/RepSolicitudAnticipo.rdlc", DtDatos, para, "Reporte de Solicitudes de Anticipos", Opcion);
}
else
{
Alert("No hay datos consultados", ModExtensiones.TipoMensaje.MsgAdvertencia);
}
}
}

View File

@@ -373,16 +373,16 @@ Partial Class OS_OrdenesServicios
End If
UpDetalleOS.Update()
End Sub
Protected Sub DdlCCEdit_SelectedIndexChanged(sender As Object, e As System.EventArgs)
Dim gvr As GridViewRow = DirectCast(DirectCast(sender, DropDownList).BindingContainer, GridViewRow)
Dim CveProyecto As String = DirectCast(sender, DropDownList).SelectedValue
'Protected Sub DdlCCEdit_SelectedIndexChanged(sender As Object, e As System.EventArgs)
' Dim gvr As GridViewRow = DirectCast(DirectCast(sender, DropDownList).BindingContainer, GridViewRow)
' Dim CveProyecto As String = DirectCast(sender, DropDownList).SelectedValue
gvr.FCDropDownList("DDlSubProyecto").Items.Clear()
gvr.FCDropDownList("DDlSubProyecto").DataSource = GlobalDTSubProyectos(CveProyecto.ToEntero)
gvr.FCDropDownList("DDlSubProyecto").DataBind()
gvr.FCDropDownList("DDlSubProyecto").Items.Insert(0, New ListItem("Sin SubProyecto Asignado", "-1"))
' gvr.FCDropDownList("DDlSubProyecto").Items.Clear()
' gvr.FCDropDownList("DDlSubProyecto").DataSource = GlobalDTSubProyectos(CveProyecto.ToEntero)
' gvr.FCDropDownList("DDlSubProyecto").DataBind()
' gvr.FCDropDownList("DDlSubProyecto").Items.Insert(0, New ListItem("Sin SubProyecto Asignado", "-1"))
End Sub
'End Sub
Protected Sub DdlFR_SelectedIndexChanged(sender As Object, e As EventArgs)
Dim DdlFR_Gv As DropDownList = CType(sender, DropDownList)
Dim index As Integer = CType(DdlFR_Gv.NamingContainer, GridViewRow).FCLiteral("LtlConsecutivo").Text.ToString.ToEntero
@@ -1037,7 +1037,7 @@ Partial Class OS_OrdenesServicios
Dim Cantidad As Integer = Row("Cantidad").ToString.ToEntero
Dim Archivo As New System.IO.FileInfo(String.Format("{0}OS\Temp\{1}", UsuarioActual.Empresa.Ruta, Row("Archivo").ToString))
CveOsDetalle = ObjOrdenServicio.AddOrdenesServiciosDetalle(ObjOrdenServicio.CveOS, CvePS, Cantidad, -1, -1, Observaciones, False, SeFacturara, False, CveCuentaEquipo, "-1", "-1", "-1", ComentarioTecnico, UsuarioActual.CveUsuario, Archivo:=Archivo.Name)
CveOsDetalle = ObjOrdenServicio.AddOrdenesServiciosDetalle(ObjOrdenServicio.CveOS, CvePS, Cantidad, -1, -1, Observaciones, False, True, False, CveCuentaEquipo, "-1", "-1", "-1", ComentarioTecnico, UsuarioActual.CveUsuario, Archivo:=Archivo.Name)
If CveOsDetalle > 0 Then
If Archivo.Name <> "-1" AndAlso Archivo.Exists Then
@@ -1300,9 +1300,10 @@ Partial Class OS_OrdenesServicios
Row.FCLinkButton("imgEstatus").CssClass = "btn btn-circle btn-sm green"
Else
Row.FCLinkButton("imgEstatus").Enabled = False
'TmpDT.Rows(Row.RowIndex)("Estatus") = "False"
'Row.FCLinkButton("imgEstatus").CssClass = "btn btn-circle btn-sm red"
TmpDT.Rows(Row.RowIndex)("Estatus") = "False"
Row.FCLinkButton("imgEstatus").CssClass = "btn btn-circle btn-sm red"
End If
UpDetalleOS.Update()
End Sub
Private Sub BtnAddGvDetalle_Click(sender As Object, e As EventArgs) Handles BtnAddGvDetalle.Click
Dim ObjOS As New ClsOS
@@ -2265,9 +2266,16 @@ Partial Class OS_OrdenesServicios
TieneError = True
End If
'SI OCURRIO UN ERROR EN LA EXISTENCIA RECARGAMOS EL GRID PARA COLOREAR LOS DETALLES CON ERROR
If ErrorExistencia Then
Alert("Ocurrió un error en la existencia", TipoMensaje.MsgError)
TieneError = True
End If
If Not TieneError Then
Dim ObjOS As New ClsOS
For Each Row As DataRow In TmpDTMaterialesDetalle.Rows
Dim MaterialesDetalleNuevos As DataTable = TmpDTMaterialesDetalle.FiltraParametros("CveMaterial = -1")
For Each Row As DataRow In MaterialesDetalleNuevos.Rows
Dim CveUM As Integer = Row("CveUM").ToString.ToEntero
Dim CvePS As Integer = Row("CvePS").ToString.ToEntero
Dim Cantidad As Integer = Row("Cantidad").ToString.ToEntero
@@ -2287,13 +2295,6 @@ Partial Class OS_OrdenesServicios
ObjOS.Dispose()
End If
'SI OCURRIO UN ERROR EN LA EXISTENCIA RECARGAMOS EL GRID PARA COLOREAR LOS DETALLES CON ERROR
If ErrorExistencia Then
Alert("Ocurrió un error en la existencia", TipoMensaje.MsgError)
TieneError = True
End If
If Not TieneError Then
ObjInventario.Commit()
Alert($"El Traspaso se guardó correctamente con el folio #: <b>{Folio}</b>.", TipoMensaje.MsgInformacion, $"document.location.href=""/Inventarios/TrasladoSolicitud.aspx?CveTraspasoSolicitud={CveTraspasoSolicitud}""")

View File

@@ -495,7 +495,7 @@
if (this.checked) {
total = total + 1;
}
if (total == 5) {
if (total == 7) {
alert("Ya tiene el maximo numero de comandos favoritos para asignar.");
this.checked = false;
return false;
@@ -513,9 +513,22 @@
}
for (let i = thantes; i < thclick; i++) {
let th = $('<th></th>');
let input = $('<input type="checkbox" class="chkAll">')
let input = $('<input type="checkbox" class="chkAll" onclick="verficaFavoritos();">')
th.append(input);
var total = 0;
input.click(function () {
var total = 0;
$(".ChecaFavoritos > input").each(function () {
if (this.checked) {
total = total + 1;
}
if (total == 7) {
alert("Ya tiene el maximo numero de comandos favoritos para asignar.");
this.checked = false;
return false;
}
});
$('#' + gv + ' tr td:nth-child(' + i + ') input[type="checkbox"]:not([disabled="disabled"])').prop("checked", input.is(":checked"))
});
tr.append(th);

View File

@@ -76,7 +76,7 @@
<asp:HiddenField ID="HiddenField2" runat="server" ClientIDMode="Static" Value="0" />
<div>
<asp:GridView ID="GvDatos" runat="server" data-sort="true" AutoGenerateColumns="False"
DataKeyNames="CveClasificacion, CveCategoria, Clasificacion, UsoClasificacion, CuentaGasto, CuentaCostos, CuentaIngresos, IdCuentaGasto, IdCuentaCostos, IdCuentaIngresos,RequiereSerieLote,CveSATPS,SATClaveProductoServicio, RequiereAFCompra, RequiereAFInsumo, RequierePersonal, Estatus,EsAcumulador,TopVentas,TopCompras" EmptyDataText="No se encontraron Clasificaciones Registradas" ToolTip="Listado de Clasificaciones" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
DataKeyNames="CveClasificacion, CveCategoria, Clasificacion, UsoClasificacion, CuentaGasto, CuentaCostos, CuentaIngresos, IdCuentaGasto, IdCuentaCostos, IdCuentaIngresos,RequiereSerieLote,CveSATPS,SATClaveProductoServicio, RequiereAFCompra, RequiereAFInsumo, RequierePersonal, Estatus,EsAcumulador,TopVentas,TopCompras,PrecioBaseCosto" EmptyDataText="No se encontraron Clasificaciones Registradas" ToolTip="Listado de Clasificaciones" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
<Columns>
<asp:TemplateField HeaderText="Clasificación">
<ItemTemplate>
@@ -210,41 +210,57 @@
<label for="<%= TxtClasificacion.ClientID.ToString()%>">Clasificación:</label>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlCategoria" CssClass="form-control input-sm select2me js-cuenta-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="Categoria" DataValueField="CveCategoria" Width="340px" ValidationGroup="GrpGuardar"></asp:DropDownList>
<label for="<%= DdlCategoria.ClientID.ToString()%>">Categoría:</label>
<br />
<div class="row">
<div class="col-md-8">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlCategoria" CssClass="form-control input-sm select2me js-cuenta-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="Categoria" DataValueField="CveCategoria" Width="340px" ValidationGroup="GrpGuardar"></asp:DropDownList>
<label for="<%= DdlCategoria.ClientID.ToString()%>">Categoría:</label>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlUsoClasificacion" CssClass="form-control input-sm select2me js-cuenta-programmatic" runat="server" AppendDataBoundItems="true" Width="340px" ValidationGroup="GrpGuardar">
<asp:ListItem Text="Ingresos" Value="1"></asp:ListItem>
<asp:ListItem Text="Gasto" Value="2"></asp:ListItem>
<asp:ListItem Text="Ingresos/Gasto" Value="3"></asp:ListItem>
</asp:DropDownList>
<label for="<%= DdlUsoClasificacion.ClientID.ToString()%>">Uso Clasificación:</label>
</div>
<div class="form-group input-iconright" id="DivCuentaGasto" runat="server">
<label for="<%= DdlCuentaGasto.ClientID.ToString()%>" style="color: #888888; font-size: 13px;">Cuenta Gasto:</label>
<asp:DropDownList ID="DdlCuentaGasto" CssClass="form-control input-sm js-cuenta-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" Width="340px"></asp:DropDownList>
</div>
<div class="form-group input-iconright" id="DivCuentaCostos" runat="server">
<label for="<%= DdlCuentaCostos.ClientID.ToString()%>" style="color: #888888; font-size: 13px;">Cuenta Costos:</label>
<asp:DropDownList ID="DdlCuentaCostos" CssClass="form-control input-sm js-cuenta-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" Width="340px"></asp:DropDownList>
</div>
<div class="form-group input-iconright" id="DivCuentaIngresos" runat="server">
<label for="<%= DdlCuentaIngresos.ClientID.ToString()%>" style="color: #888888; font-size: 13px;">Cuenta Ingresos:</label>
<asp:DropDownList ID="DdlCuentaIngresos" CssClass="form-control input-sm js-cuenta-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" Width="340px"></asp:DropDownList>
</div>
<div class="form-group form-md-line-input input-iconright" runat="server" id="DivPSSAT">
<ADS:Dropdownlost runat="server" ID="DdlSATPS" CssStyle="width: 340px;" CssClass="form-control input-sm select2me" DataTextField="Descripcion" DataValueField="CveSATPS" />
<label for="<%= DdlSATPS.ClientID.ToString()%>">Producto Servicio SAT:</label>
</div>
</div>
<div class="col-md-4">
<div class="form-group form-md-line-input" runat="server">
<asp:TextBox ID="TxtPrecioBaseCosto" CssClass="form-control" Width="130px" MaxLength="5" runat="server" CausesValidation="true" Style="text-align: right!important" OnKeyup="FormatoMoneda(this);"></asp:TextBox>
<label for="<%= TxtPrecioBaseCosto.ClientID.ToString()%>" style="width: 130px;">Precio Base Costo:</label>
</div>
</div>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlUsoClasificacion" CssClass="form-control input-sm select2me js-cuenta-programmatic" runat="server" AppendDataBoundItems="true" Width="340px" ValidationGroup="GrpGuardar">
<asp:ListItem Text="Ingresos" Value="1"></asp:ListItem>
<asp:ListItem Text="Gasto" Value="2"></asp:ListItem>
<asp:ListItem Text="Ingresos/Gasto" Value="3"></asp:ListItem>
</asp:DropDownList>
<label for="<%= DdlUsoClasificacion.ClientID.ToString()%>">Uso Clasificación:</label>
</div>
<br />
<div class="form-group input-iconright" id="DivCuentaGasto" runat="server">
<label for="<%= DdlCuentaGasto.ClientID.ToString()%>" style="color: #888888; font-size: 13px;">Cuenta Gasto:</label>
<asp:DropDownList ID="DdlCuentaGasto" CssClass="form-control input-sm js-cuenta-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" Width="340px"></asp:DropDownList>
</div>
<div class="form-group input-iconright" id="DivCuentaCostos" runat="server">
<label for="<%= DdlCuentaCostos.ClientID.ToString()%>" style="color: #888888; font-size: 13px;">Cuenta Costos:</label>
<asp:DropDownList ID="DdlCuentaCostos" CssClass="form-control input-sm js-cuenta-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" Width="340px"></asp:DropDownList>
</div>
<div class="form-group input-iconright" id="DivCuentaIngresos" runat="server">
<label for="<%= DdlCuentaIngresos.ClientID.ToString()%>" style="color: #888888; font-size: 13px;">Cuenta Ingresos:</label>
<asp:DropDownList ID="DdlCuentaIngresos" CssClass="form-control input-sm js-cuenta-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" Width="340px"></asp:DropDownList>
</div>
<div class="form-group form-md-line-input input-iconright" runat="server" id="DivPSSAT">
<ADS:Dropdownlost runat="server" ID="DdlSATPS" CssStyle="width: 340px;" CssClass="form-control input-sm select2me" DataTextField="Descripcion" DataValueField="CveSATPS" />
<label for="<%= DdlSATPS.ClientID.ToString()%>">Producto Servicio SAT:</label>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">

View File

@@ -178,11 +178,12 @@ Partial Class CatClasificaciones
DdlCuentaCostos.SelectedValue.ToEntero, DdlCuentaCostos.SelectedItem.Text,
DdlCuentaIngresos.SelectedValue.ToEntero, DdlCuentaIngresos.SelectedItem.Text,
DdlCategoria.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, RequiereSerieLote:=RequireSerieLote, UsoClasificacion:=DdlUsoClasificacion.SelectedValue.ToEntero, CveSATPS:=DdlSATPS.SelectedValue.ToEntero,
RequiereAFCompra:=ChkRequiereAFCompra.Checked, RequiereAFInsumo:=ChkRequiereAFInsumo.Checked, RequierePersonal:=ChkRequierePersonal.Checked, EsAcumulador:=ChkEsAcumulador.Checked, TopVentas:=ChkTopVentas.Checked, TopCompras:=ChkTopCompras.Checked) Then
RequiereAFCompra:=ChkRequiereAFCompra.Checked, RequiereAFInsumo:=ChkRequiereAFInsumo.Checked, RequierePersonal:=ChkRequierePersonal.Checked, EsAcumulador:=ChkEsAcumulador.Checked, TopVentas:=ChkTopVentas.Checked, TopCompras:=ChkTopCompras.Checked, PrecioBaseCosto:=TxtPrecioBaseCosto.Text.ToDecimal) Then
ViewState("DTClasificaciones") = ObjClasificaciones.DtResultados.FiltraParametros($"(Codigo IS NULL OR Codigo = '') AND CveEmpresa = {UsuarioActual.CveEmpresa} AND (CveCategoria = {DdlCategoriaFiltro.SelectedValue.ToEntero} OR {DdlCategoriaFiltro.SelectedValue.ToEntero} = -1) AND (UsoClasificacion = {DdlTipoClasificacion.SelectedValue.ToEntero} OR {DdlTipoClasificacion.SelectedValue.ToEntero} = -1 ) AND (Estado = {DdlEstatus.SelectedValue.ToEntero} OR {DdlEstatus.SelectedValue.ToEntero} = -1)")
TxtClasificacion.Text = ""
TxtPrecioBaseCosto.Text = ""
DdlCuentaGasto.SelectedValueExist("0")
DdlCuentaCostos.SelectedValueExist("0")
DdlCuentaIngresos.SelectedValueExist("0")
@@ -201,7 +202,7 @@ Partial Class CatClasificaciones
If ObjClasificaciones.UpdateClasificacion(Clasificacion, "", DdlGasto.SelectedValue.ToEntero, DdlGasto.SelectedItem.Text,
DdlCosto.SelectedValue.ToEntero, DdlCosto.SelectedItem.Text, DdlIngresos.SelectedValue.ToEntero, DdlIngresos.SelectedItem.Text,
Estatus, False, DdlCategoria.SelectedValue.ToEntero, UsuarioActual.CveUsuario, CveClasificacion, RequiereSerieLote:=RequireSerieLote, UsoClasificacion:=DdlUsoClasificacion.SelectedValue.ToEntero, CveSATPS:=DdlSATPS.SelectedValue.ToEntero,
RequiereAFCompra:=ChkRequiereAFCompra.Checked, RequiereAFInsumo:=ChkRequiereAFInsumo.Checked, RequierePersonal:=ChkRequierePersonal.Checked, EsAcumulador:=ChkEsAcumulador.Checked, TopVentas:=ChkTopVentas.Checked, TopCompras:=ChkTopCompras.Checked) Then
RequiereAFCompra:=ChkRequiereAFCompra.Checked, RequiereAFInsumo:=ChkRequiereAFInsumo.Checked, RequierePersonal:=ChkRequierePersonal.Checked, EsAcumulador:=ChkEsAcumulador.Checked, TopVentas:=ChkTopVentas.Checked, TopCompras:=ChkTopCompras.Checked, PrecioBaseCosto:=TxtPrecioBaseCosto.Text.ToDecimal) Then
RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalClasificaciones"))
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
@@ -346,6 +347,7 @@ Partial Class CatClasificaciones
Limpiador()
TxtClasificacion.Text = ""
TxtPrecioBaseCosto.Text = ""
DdlCategoria.SelectedIndex = 0
DdlSATPS.SelectedValue = ""
DdlSATPS.SelectedText = ""
@@ -371,6 +373,7 @@ Partial Class CatClasificaciones
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
Dim CveClasificacion As String = GvRow.DataKey("CveClasificacion").ToString
Dim Clasificacion As String = GvRow.DataKey("Clasificacion").ToString
Dim PrecioBaseCosto As String = GvRow.DataKey("PrecioBaseCosto").ToString
Dim CveCategoria As String = GvRow.DataKey("CveCategoria").ToString
Dim CuentaGasto As String = GvRow.DataKey("CuentaGasto").ToString
Dim CuentaCostos As String = GvRow.DataKey("CuentaCostos").ToString
@@ -421,6 +424,7 @@ Partial Class CatClasificaciones
TxtClasificacion.Text = Clasificacion
TxtPrecioBaseCosto.Text = PrecioBaseCosto.FormatoNumero(2)
DdlCategoria.SelectedValueExist(CveCategoria)
DdlUsoClasificacion.SelectedValue = UsoClasificacion
HdnIDClasificacion.Value = CveClasificacion

View File

@@ -9409,7 +9409,7 @@ Partial Class Clientes
Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", ""))
Timbre.Comprobante.Folio = Obj.Folio.ToString
Timbre.Comprobante.Serie = Obj.Serie
Timbre.Comprobante.Fecha = Obj.Fecha
Timbre.Comprobante.Fecha = Obj.FechaCP
Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT

View File

@@ -2729,7 +2729,16 @@
<label for="<%= TxtPrecio.ClientID.ToString()%>">Precio:</label>
</div>
</div>
<div class="col-md-8">
<div class="col-md-3">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtDescuento" runat="server" onkeypress="setFocus(event,'LbAgregar');" onkeyup="Recalcula();" CausesValidation="true" lang="nb" ClientIDMode="Static" Text="0.00" MaxLength="12" ValidationGroup="GrpAddVenta" Width="100px" CssClass="form-control "></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender2" runat="server" TargetControlID="TxtDescuento" FilterType="Custom, Numbers" ValidChars="." />
<asp:CustomValidator ID="CVDescuento" runat="server" ClientValidationFunction="ValidaDecimal6digits" ControlToValidate="TxtDescuento" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descuento''</b> no tiene el formato correcto. Por favor rectifique y vuelva a intentar." ValidateEmptyText="True" ValidationGroup="GrpAddVenta"></asp:CustomValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender6" runat="server" HighlightCssClass="vco" TargetControlID="CVDescuento" Width="300px"></ajax:ValidatorCalloutExtender>
<label for="<%= TxtDescuento.ClientID.ToString()%>">Descuento:</label>
</div>
</div>
<div class="col-md-1">
<asp:UpdatePanel ID="UpBtnDescuento" runat="server" class="portlet-body form" UpdateMode="Conditional">
<ContentTemplate>
<asp:LinkButton ID="ImgDescPU" runat="server" Text="<i class='fa fa-tags' style='color:dimgray;'></i>" Style="cursor: pointer;" AlternateText="Agregar Descuento" />
@@ -2793,22 +2802,22 @@
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="col-md-9">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlPSAjuste" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="PSCodigo" DataValueField="CvePS" OnSelectedIndexChanged="DdlPSAjuste_selectedindexchange" Width="100%" AutoPostBack="true">
</asp:DropDownList>
<label for="<%= DdlPSAjuste.ClientID.ToString()%>">Producto/Servicio a Recibir:</label>
</div>
</div>
<%-- <div class="col-md-3">
<div class="col-md-3">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtPUFactura" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
<asp:TextBox ID="TxtPUFactura" CssClass="form-control" runat="server" MaxLength="50" Enabled="false"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVPUFactura" runat="server" ControlToValidate="TxtPUFactura" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''PU Factura''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEPUFactura" runat="server" HighlightCssClass="vco" TargetControlID="RFVPUFactura"></ajax:ValidatorCalloutExtender>
<ajax:FilteredTextBoxExtender ID="FTBEPUFactura" runat="server" TargetControlID="TxtPUFactura" FilterType="Custom, Numbers" ValidChars=".," />
<label for="<%= TxtPUFactura.ClientID.ToString()%>">P.U.:</label>
</div>
</div>--%>
</div>
</div>
<div class="row">
<div class="col-md-8">
@@ -2833,7 +2842,7 @@
<div class="col-md-8">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtCodEnsamble" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
<asp:RegularExpressionValidator ID="REVCodEnsamble" runat="server" ControlToValidate="TxtCodEnsamble" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod.Ensamble''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpAddVenta" ValidationExpression="^[0-9][A-HJ-M]([[0-2][1-9]|3[0-1])([A-Z]|X[1-9])[ACEN][A-HJ-NO-Z][A-F]$"></asp:RegularExpressionValidator>
<asp:RegularExpressionValidator ID="REVCodEnsamble" runat="server" ControlToValidate="TxtCodEnsamble" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod.Ensamble''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpAddVenta" ValidationExpression="^[0-9][A-HJ-M]([[0-2][0-9]|3[0-1])[0-9A-Z][ACEN][2-5]$"></asp:RegularExpressionValidator>
<%--<asp:RequiredFieldValidator ID="RFVCodEnsamble" runat="server" ControlToValidate="TxtCodEnsamble" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> es necesario, por favor ingréselo." ValidationGroup="VGMAjuste"></asp:RequiredFieldValidator>--%
<%--<ajax:ValidatorCalloutExtender ID="VCECodEnsamble" runat="server" HighlightCssClass="vco" TargetControlID="RFVCodEnsamble"></ajax:ValidatorCalloutExtender>--%>
<label for="<%= TxtCodEnsamble.ClientID.ToString()%>">Cod.Ensamble:</label>
@@ -2854,6 +2863,7 @@
<div class="col-md-8">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtCodLinea" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="TxtCodLinea" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod.Linea''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpAddVenta" ValidationExpression="^[*]$"></asp:RegularExpressionValidator>
<%--<asp:RequiredFieldValidator ID="RFVCodLinea" runat="server" ControlToValidate="TxtCodLinea" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod. Linea''</b> es necesario, por favor ingréselo." ValidationGroup="VGMAjuste"></asp:RequiredFieldValidator>--%>
<%--<ajax:ValidatorCalloutExtender ID="VCECodLinea" runat="server" HighlightCssClass="vco" TargetControlID="RFVCodLinea"></ajax:ValidatorCalloutExtender>--%>
<label for="<%= TxtCodLinea.ClientID.ToString()%>">Cod.Linea:</label>
@@ -2877,7 +2887,7 @@
<div class="col-md-8">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtCodInspeccion" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
<asp:RegularExpressionValidator ID="REVCodInspeccion" runat="server" ControlToValidate="TxtCodInspeccion" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod. Inspección''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpAddVenta" ValidationExpression="^[A-L][3-9][1-9A-V][A-FK-O]$"></asp:RegularExpressionValidator>
<asp:RegularExpressionValidator ID="REVCodInspeccion" runat="server" ControlToValidate="TxtCodInspeccion" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod. Inspección''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpAddVenta" ValidationExpression="^[A-L][0-9][1-9A-Z][A-HJ-M]$"></asp:RegularExpressionValidator>
<%--<asp:RequiredFieldValidator ID="RFVCodInspeccion" runat="server" ControlToValidate="TxtCodInspeccion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod. Inspeccion''</b> es necesario, por favor ingréselo." ValidationGroup="VGMAjuste"></asp:RequiredFieldValidator>--%>
<%--<ajax:ValidatorCalloutExtender ID="VCECodInspeccion" runat="server" HighlightCssClass="vco" TargetControlID="RFVCodInspeccion"></ajax:ValidatorCalloutExtender>--%>
<label for="<%= TxtCodInspeccion.ClientID.ToString()%>">Cod. Inspección:</label>
@@ -3115,15 +3125,27 @@
var Descuento = parseFloat($get("TxtPorDescP").value);
$get("LblPrecioFinal").innerText = formato_numero(Monto - ((Monto * Descuento) / 100), 2, '.', ',');
$get("TxtPrecio").value = formato_numero(parseFloat($get("LblPrecioFinal").innerText.replace(",", "").replace(",", "")), 2, '.', ',');
$get("LblTotalPS").innerText = formato_numero(parseFloat($get("LblPrecioFinal").innerText.replace(",", "").replace(",", "")), 2, '.', ',');
var Total = Monto - parseFloat($get("LblPrecioFinal").innerText.replace(",", "").replace(",", ""));
$get("LblDescuento").innerText = formato_numero(Total, 2, '.', ',');
$get("TxtDescuento").value = formato_numero(Total, 2, '.', ',');
$get("TxtDescP").value = formato_numero(0, 2, '.', ',');
$get("HdnDescuento").value = Total;
if (TipoDescuento == 2) {
$get("LblDescuentos").innerText = formato_numero(Total, 2, '.', ',');
}
}
else if ($get("TxtDescP").value != "0" && $get("TxtDescP").value) {
else {
$get("LblPrecioFinal").innerText = "0.00";
$get("LblDescuento").innerText = "0.00";
$get("HdnDescuento").value = "0.00";
}
}
function CalculaDescuentoMonto() {
if ($get("TxtDescP").value != "0" && $get("TxtDescP").value) {
var Monto = 0;
var TipoDescuento = $get("HdnTipoDescuento").value;
@@ -3141,11 +3163,12 @@
}
var Descuento = parseFloat($get("TxtDescP").value);
$get("TxtPorDescP").value = Descuento * 100 / Monto * 10
$get("TxtPorDescP").value = formato_numero((Descuento * 100 / Monto), 2, '.', ',');
$get("LblPrecioFinal").innerText = formato_numero(Monto - Descuento, 2, '.', ',');
$get("TxtPrecio").value = formato_numero(parseFloat($get("LblPrecioFinal").innerText.replace(",", "").replace(",", "")), 2, '.', ',');
$get("LblTotalPS").innerText = formato_numero(parseFloat($get("LblPrecioFinal").innerText.replace(",", "").replace(",", "")), 2, '.', ',');
var Total = Monto - parseFloat($get("LblPrecioFinal").innerText.replace(",", "").replace(",", ""));
$get("LblDescuento").innerText = formato_numero(Total, 2, '.', ',');
$get("TxtDescuento").value = formato_numero(Total, 2, '.', ',');
$get("HdnDescuento").value = Total;
if (TipoDescuento == 2) {
Monto - parseFloat($get("LblPrecioFinal").innerText.replace(",", "").replace(",", ""));
@@ -3156,7 +3179,6 @@
$get("LblDescuento").innerText = "0.00";
$get("HdnDescuento").value = "0.00";
}
}
function BorraDescuentos() {

View File

@@ -1062,7 +1062,7 @@ Partial Class PV
'ImgCerrarIE.Attributes.Add("OnClick", "$('#DivIngresoEgreso').hide();")
'ImgCerrarEstadoCaja.Attributes.Add("OnClick", "$('#DivEstadoCaja').hide();")
TxtPorDescP.Attributes.Add("onKeyUp", "CalculaDescuento();")
TxtDescP.Attributes.Add("onKeyUp", "CalculaDescuento();")
TxtDescP.Attributes.Add("onKeyUp", "CalculaDescuentoMonto();")
TxtFechaAjuste.Attributes.Add("onchange", "CalculaMesesUso();")
CreaDTmpC()
@@ -2771,6 +2771,9 @@ Partial Class PV
Exit Sub
End If
TxtDescuento.Text = FormatoNumero(0, 2)
TxtPrecio.Text = ""
If CvePSParametro > 0 Then
Dim drPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSParametro).FiltroPrimero("")
@@ -2828,6 +2831,7 @@ Partial Class PV
End If
If PrecioSugerido > 0 Then
TxtPrecio.Text = PrecioSugerido.FormatoNumero()
RegistraScript("$get('LblPrecio1').innerText = formato_numero(" + PrecioSugerido.ToString + ", 2, '.', ',');")
End If
@@ -3478,13 +3482,50 @@ Partial Class PV
Return False
End If
Dim CantidadUsados As Decimal = 0
'Validacion de Recepción de Usados
Dim Vendido As Decimal = 0
Dim Entregado As Decimal = 0
Dim UltimoEntregado As Decimal = 0
For Each Gvr As GridViewRow In GvRecepcionUsados.Rows
If Gvr.RowType = DataControlRowType.DataRow Then
CantidadUsados = CantidadUsados + Gvr.FCTextBox("TxtCantidad").Text.ToEntero()
If Gvr.FCTextBox("TxtCantidad").Text.ToEntero() > 0 Then
Entregado += (Gvr.FCTextBox("TxtCantidad").Text.ToEntero * Gvr.DataKey("Cargo").ToDecimal)
UltimoEntregado = Gvr.DataKey("Cargo").ToDecimal
End If
End If
Next
If Entregado > 0 Then
'Calcular Vendido
Dim DTTamanios As New DataTable
Dim ObjAcum As New ClsAcumuladores
If ObjAcum.TamañoGet(-1, UsuarioActual.CveEmpresa) Then
DTTamanios = ObjAcum.DtResultados
End If
ObjAcum.Dispose()
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
If DTTamanios.Rows.Count > 0 And DTTamanios IsNot Nothing And DrPS("CveTamaño").ToString.ToEntero > 0 Then
Vendido = DTTamanios.FiltroPrimeroValor("Cargo", $" CveTamaño = { DrPS("CveTamaño") }").ToDecimal
End If
If Entregado > Vendido Then
If (Entregado - Vendido) >= UltimoEntregado Then
Alert("No puede entregar un cargo mayor a lo Vendido", TipoMensaje.MsgAdvertencia)
Return False
End If
End If
End If
'Dim CantidadUsados As Decimal = 0
'For Each Gvr As GridViewRow In GvRecepcionUsados.Rows
' If Gvr.RowType = DataControlRowType.DataRow Then
' CantidadUsados = CantidadUsados + Gvr.FCTextBox("TxtCantidad").Text.ToEntero()
' End If
'Next
'If CantidadUsados > TxtCantidad.Text.ToEntero() Then
' Alert("No puede tener una cantidad mayor a la de los cargos", TipoMensaje.MsgAdvertencia)
' Return False
@@ -4294,7 +4335,7 @@ Partial Class PV
Private Sub CargaCuentas()
DdlCuentaEfectivo.Items.Clear()
'DdlCuentaEfectivo.Items.Clear()
DdlCuentaTarjetaCredito.Items.Clear()
DdlCuentaTarjetaDebito.Items.Clear()
DdlCuentaCheque.Items.Clear()
@@ -4351,6 +4392,11 @@ Partial Class PV
If total <= 0 Then Alert("No se ha ingresado importe", TipoMensaje.MsgAdvertencia) : Exit Sub
If TxtCambio.Text.ToDecimal > 0 And TxtImporteEfectivo.Text.ToDecimal < TxtCambio.Text.ToDecimal Then
Alert("Debe haber un pago en efectivo y ser mayor que el cambio. Si no, ser pago exacto.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If (DtPagos.SUM("Importe").ToString.ToDecimal + total - TxtCambio.Text.ToDecimal) > TxtTotal.Text.ToDecimal Then
Alert("El importe de los pagos no puede exceder el importe de la factura. Por favor rectifique.", TipoMensaje.MsgAdvertencia)
Exit Sub
@@ -4911,7 +4957,7 @@ Partial Class PV
TmpDTAjustes.Columns.Add("CveUM", GetType(Integer))
TmpDTAjustes.Columns.Add("CveVentaDetalle", GetType(Integer))
TmpDTAjustes.Columns.Add("CveVenta", GetType(Integer))
TmpDTAjustes.Columns.Add("PUFactura", GetType(Integer))
TmpDTAjustes.Columns.Add("PUFactura", GetType(Double))
End Sub
@@ -5085,17 +5131,21 @@ Partial Class PV
End Sub
Private Sub CalculaMesesUso()
Dim FechaI = TxtFechaAjuste.Text.ToDate.AddDays(1)
Dim FechaF = Now
'Dim NumDiasAlMes As Double = (365 / 12)
Dim FechaI As Date = TxtFechaAjuste.Text.ToDate.AddDays(1)
Dim FechaF As Date = Now
Dim FechaT As Date = String.Format("{0}/{1}/{2}", FechaI.Day, FechaF.Month, FechaF.Year).ToDate 'armo la fecha con el día del mes actual
'Dim DiasTranscurridos = DateDiff(DateInterval.Day, FechaI, FechaF)
Dim MesesTrascurridos As Integer = Math.Round(DateDiff(DateInterval.Day, FechaI, FechaT) / 30.4, 2).ToEntero 'saco los meses y lo redondeo
'Dim MesesTranscurridos As Double = DiasTranscurridos / NumDiasAlMes
If FechaT > FechaF Then
'todavía está en el mes actual.
MesesTrascurridos = MesesTrascurridos
Else
MesesTrascurridos = MesesTrascurridos + 1
End If
'Dim NoMesesTrascurridos = Math.Ceiling(MesesTranscurridos)
TxtMesesUso.Text = MesesTrascurridos.ToString
TxtMesesUso.Text = (DateDiff(DateInterval.Month, FechaI, FechaF) + 1).ToString()
CalculaPorcentajeAjuste()
End Sub
@@ -5110,11 +5160,11 @@ Partial Class PV
End If
Contador += 1
Next
'TxtPUFactura.Text = PUFactura.FormatoNumero(2)
TxtPUFactura.Text = PUFactura.FormatoNumero(2)
End If
If Not DdlPSAjuste.SelectedValue.ToEntero > 0 AndAlso DdlFacturas.SelectedValue.ToEntero > 0 Then
'TxtPUFactura.Text = ""
TxtPUFactura.Text = ""
End If
CalculaPorcentajeAjuste()
@@ -5167,6 +5217,13 @@ Partial Class PV
End If
End If
'el ajuste no puede ser mayor al precio de lo vendido de nuevo
If (TxtPrecio.Text.ToDouble - ((TxtPrecio.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoActual - CargoAnterior))) < 0 Then
TxtDescuentoAjuste.Text = TxtPrecio.Text
TxtImporteAjuste.Text = "0.00"
CargoAnterior = CargoActual
End If
TxtDescuentoAjuste.Text = ((TxtPrecio.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoActual - CargoAnterior)).FormatoNumero
TxtDescuentoAjuste.ToolTip = $"La diferencia de ajuste fue: {(TxtPrecio.Text.ToDouble - TxtImporteAjuste.Text.ToDouble).FormatoNumero()}. La diferencia de tamaños fue: {(CargoActual - CargoAnterior).FormatoNumero}."
End If
@@ -5284,6 +5341,7 @@ Partial Class PV
End If
Dr("Descuento") = Math.Round((TxtPrecio.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoActual - CargoAnterior), NumeroDecimales)
If Dr("Descuento").ToString.ToDouble > TxtPrecio.Text.ToDouble Then Dr("Descuento") = TxtPrecio.Text.ToDouble
Dim TotalCalculableImpuestos As Decimal = (Dr("Cantidad").ToString.ToDecimal * (Dr("PU").ToString.ToDecimal)) - Dr("Descuento").ToString.ToDecimal
Dr("ImporteIVA") = Math.Round(Dr("PorcentajeIVA").ToString.ToDecimal * TotalCalculableImpuestos, NumeroDecimales)
@@ -5689,7 +5747,7 @@ Partial Class PV
params.Add(New ReportParameter("PorcentajeAjuste", TxtPorcentajeAjuste.Text.Trim))
'Informacion Acumulador
params.Add(New ReportParameter("CodEnsamble", If(TxtCodEnsamble.Text.Length > 7, TxtCodEnsamble.Text.Trim.Substring(0, 7), "")))
params.Add(New ReportParameter("CodEnsamble", TxtCodEnsamble.Text.Trim))
params.Add(New ReportParameter("CodLinea", TxtCodLinea.Text.Trim))
params.Add(New ReportParameter("CodInspeccion", TxtCodInspeccion.Text.Trim))

View File

@@ -131,7 +131,7 @@
<%-- 14 --%>
<asp:BoundField DataField="CodigoPS" HeaderText="Articulo" ItemStyle-HorizontalAlign="Left" />
<%-- 15 --%>
<asp:BoundField DataField="Costo" HeaderText="Costo" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField DataField="CostoTotal" HeaderText="Costo" ItemStyle-HorizontalAlign="Right" />
<%-- 16 --%>
<asp:BoundField DataField="PLista" HeaderText="P.L." DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<%-- 17 --%>

View File

@@ -216,7 +216,9 @@ Partial Class Ventas_RepVentasUtilidad
e.Row.CssClass = "Totales"
End If
If e.Row.DBCampo("CveVenta").ToEntero > 0 AndAlso Not CBool(e.Row.DBCampo("TienePago")) Then
e.Row.Cells(15).BackColor = Drawing.Color.LightPink
End If
Dim Liga As String = String.Format("/Ventas/RepVentasUtilidadDetalle.aspx?CveVenta={0}&CveVendedor={1}&FechaI={2:d}&FechaF={3:d}&CveCliente={4}&Orden={5}&CveSubProyecto={6}&CvePS={7}&CveClasificacion={8}",

View File

@@ -3344,7 +3344,7 @@ Partial Class Ventas
Dim Cons As Integer = 1
For Each dr As DataRow In OS.DtResultados.FiltraParametros("SeFacturara = 1 ").Rows
AgregarProductoServicio(dr("Cantidad").ToString.ToDecimal, dr("CveUM").ToString.ToEntero, dr("UM").ToString, -1, "", dr("CvePS").ToString.ToEntero, "", dr("Obs").ToString, 0, 0, -1, "",
AgregarProductoServicio(dr("Cantidad").ToString.ToDecimal, dr("CveUM").ToString.ToEntero, dr("UM").ToString, -1, "", dr("CvePS").ToString.ToEntero, "", dr("Obs").ToString, dr("PU").ToString.ToDecimal, 0, -1, "",
dr("CveSubProyecto").ToString.ToEntero, dr("SubProyecto").ToString)
'Dim drt As DataRow = TmpDT.NewRow
@@ -4217,6 +4217,11 @@ Partial Class Ventas
BtnPermisoEditarCotizacion.Visible = True
End If
'SOLO LA PUEDE EDITAR USUATIOACTUAL-VENDEDOR | NO DEBE ESTAR FACTURADA
If UsuarioActual.TienePermisoProceso(281) And TmpDT.SUM("CantidadFacturadaCot") = 0 Then 'And TmpDT.SUM("CantidadFacturadaCot") < TmpDT.SUM("Cantidad")
BtnPermisoEditarCotizacion.Visible = True
End If
'ACTIVA BOTONERA | DEBE TENER CONCEPTOS PENDIENTES DE FACTURAR
If TmpDT.SUM("CantidadFacturadaCot") < TmpDT.SUM("Cantidad") AndAlso DdlTipoComprobante.SelectedValue.Contiene("Cot") Then
BtnGenerarRemision.Visible = If(CveEstatus = 10, False, True)
@@ -4279,10 +4284,21 @@ Partial Class Ventas
'CargaDetalle
If ObjVentas.GetVentaDetalle(CveVenta) Then
TmpDT = ObjVentas.DtResultados
TmpDT.Columns.Add("EntregaDirecta", GetType(Integer))
TmpDT.Columns.Add("CveMovimientoDetallePedido", GetType(Integer))
'TmpDT.Columns.Add("CantidadFacturadaRem", GetType(Decimal))
For Each dr As DataRow In ObjVentas.DtResultados.Rows
AgregarProductoServicio(dr("Cantidad").ToString.ToDecimal, dr("CveUM").ToString.ToEntero, dr("UM").ToString, dr("CveClasificacion").ToString.ToEntero, dr("Clasificacion").ToString,
dr("CvePS").ToString.ToEntero, dr("PS").ToString, dr("Obs").ToString, dr("PU").ToString.ToDecimal, dr("Descuento").ToString.ToDecimal,
dr("CveProyecto").ToString.ToEntero, dr("Proyecto").ToString, dr("CveSubProyecto").ToString.ToEntero, dr("SubProyecto").ToString,
CveContratoDetalle:=dr("CveContratoDetalle").ToString.ToEntero, CveVentaDetalleCotizacion:=dr("CveVentaDetalleCotizacion").ToString.ToEntero, RegeneraIEPS:=False, SeActualiza:=True)
Next
'TmpDT = ObjVentas.DtResultados
'TmpDT.Columns.Add("EntregaDirecta", GetType(Integer))
'TmpDT.Columns.Add("CveMovimientoDetallePedido", GetType(Integer))
''TmpDT.Columns.Add("CantidadFacturadaRem", GetType(Decimal))
GvPS.DataSource = ObjVentas.DtResultados
GvPS.DataBind()
End If
@@ -8338,7 +8354,7 @@ Partial Class Ventas
Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", ""))
Timbre.Comprobante.Folio = Obj.Folio.ToString
Timbre.Comprobante.Serie = Obj.Serie
Timbre.Comprobante.Fecha = Obj.Fecha
Timbre.Comprobante.Fecha = Obj.FechaCP
Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
@@ -9576,24 +9592,24 @@ Partial Class Ventas
TCFluctuacion = GlobalTipoCambio(TxtFecha.Text.ToDate).ToDecimal
End If
If DdlMoneda.SelectedValue.ToEntero = 2 AndAlso Not Dr("TCCambioValuacion").ToString.ToDecimal > 1 Then
ImporteMN251 = Dr("Importe").ToString.ToDecimal * TCFluctuacion
ElseIf DdlMoneda.SelectedValue.ToEntero = 2 AndAlso Dr("TCCambioValuacion").ToString.ToDecimal > 1 Then
ImporteMN251 = Dr("Importe").ToString.ToDecimal * TCFluctuacion
ElseIf DdlMoneda.SelectedValue.ToEntero = 1 AndAlso Dr("TCCambioValuacion").ToString.ToDecimal > 1 Then
Importe251 = Dr("Importe").ToString.ToDecimal / TCFluctuacion
ImporteMN251 = Dr("Importe").ToString.ToDecimal
Else
ImporteMN251 = Dr("Importe").ToString.ToDecimal
End If
If DdlMoneda.SelectedValue.ToEntero = 2 AndAlso Not Dr("TCCambioValuacion").ToString.ToDecimal > 1 Then
ImporteMN251 = Dr("Importe").ToString.ToDecimal * TCFluctuacion
ElseIf DdlMoneda.SelectedValue.ToEntero = 2 AndAlso Dr("TCCambioValuacion").ToString.ToDecimal > 1 Then
ImporteMN251 = Dr("Importe").ToString.ToDecimal * TCFluctuacion
ElseIf DdlMoneda.SelectedValue.ToEntero = 1 AndAlso Dr("TCCambioValuacion").ToString.ToDecimal > 1 Then
Importe251 = Dr("Importe").ToString.ToDecimal / TCFluctuacion
ImporteMN251 = Dr("Importe").ToString.ToDecimal
Else
ImporteMN251 = Dr("Importe").ToString.ToDecimal
End If
Importe251 = (Importe251 * Multiplicador).RoundSQL
Importe251 = Importe251.RoundSQL
Importe91 = (Importe91 * ValorMultiplicador).RoundSQL
ImporteMN91 = (ImporteMN91 * Multiplicador).RoundSQL
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${Importe91.FormatoNumero(2)}"
Importe91 = (Importe91).RoundSQL
ImporteMN91 = (ImporteMN91 * Multiplicador).RoundSQL
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${Importe91.FormatoNumero(2)}"
CveUltimaVenta = Dr("CveVenta").ToString.ToEntero
CveUltimaVenta = Dr("CveVenta").ToString.ToEntero
Dim ImporteComplementarioIngreso As Decimal = 0
If UsaComplementariaClientes = True AndAlso tipoCambio > 1 Then
@@ -10304,9 +10320,9 @@ Partial Class Ventas
Exit For
End If
If DrPago("CveTipoMovimiento").ToString.ToEntero = 8 Then '13
DrPago("Importe") = DrPago("Importe").ToString.ToDecimal - TxtCambio.Text.ToDecimal
End If
'If DrPago("CveTipoMovimiento").ToString.ToEntero = 8 Then '13
' DrPago("Importe") = DrPago("Importe").ToString.ToDecimal - TxtCambio.Text.ToDecimal
'End If
CveIEPago = ObjBancos.AddBancos_IE(DrPago("CveCuenta").ToString.ToEntero, DrPago("CveTipoMovimiento").ToString.ToEntero, Fecha, FolioIE.ToString, String.Format("PAGO: {0}", TxtFolio.Text), DrPago("Importe").ToString.ToDouble, DdlMoneda.SelectedValue.ToEntero, tipoCambio, DrPago("Observaciones").ToString, "", False, False, -1, ObjFactura.CvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCorte:=CveCorte, MesesSinIntereses:=DrPago("MesesSinIntereses").ToString.ToEntero)
@@ -12907,6 +12923,16 @@ Partial Class Ventas
DdlUnidadMedida.DataBind()
DdlUnidadMedida.SelectedValueExist(drPS("CveUnidadMedida").ToString)
If drPS("CveTipoPS").ToString = "1" Then 'Si es servicio
If UsuarioActual.Empresa.Funcionalidad(558).ToString = "1" Then 'Si es Empresa llantera
TxtPrecio.Enabled = True
Else
TxtPrecio.Enabled = False
End If
Else
TxtPrecio.Enabled = True
End If
If TmpDT IsNot Nothing AndAlso TmpDT.Rows.Count = 0 Then
DdlMoneda.SelectedValueExist(drPS("CveMoneda").ToString)
CambiaMoneda()
@@ -12963,7 +12989,16 @@ Partial Class Ventas
End If
Dim PrecioBaseCosto As Decimal = 0
Dim ObjClasificaciones As New ClsClasificaciones
If ObjClasificaciones.GetClasificaciones() Then
PrecioBaseCosto = ObjClasificaciones.DtResultados.FiltroPrimeroValor("PrecioBaseCosto", $"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveClasificacion = {drPS("CveClasificacion")}").ToDecimal
End If
If PrecioSugerido > 0 Then
If PrecioBaseCosto > 0 Then
PrecioSugerido = PrecioSugerido * ((PrecioBaseCosto / 100) + 1)
End If
TxtPrecio.Text = PrecioSugerido.ToString("#,###.####") ' que muestre hasta los 4 digitos si lo requiere
End If
@@ -16464,10 +16499,15 @@ Partial Class Ventas
If total <= 0 Then Alert("No se ha ingresado importe", TipoMensaje.MsgAdvertencia) : Exit Sub
'If DtPagos.SUM("Importe").ToString.ToDecimal + total > TxtTotal.Text.ToDecimal Then
' Alert("El importe de los pagos no puede exceder el importe de la factura. Por favor rectifique.", TipoMensaje.MsgAdvertencia)
' Exit Sub
'End If
If TxtCambio.Text.ToDecimal > 0 And TxtImporteEfectivo.Text.ToDecimal < TxtCambio.Text.ToDecimal Then
Alert("Debe haber un pago en efectivo y ser mayor que el cambio. Si no, ser pago exacto.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If (DtPagos.SUM("Importe").ToString.ToDecimal + total - TxtCambio.Text.ToDecimal) > TxtTotal.Text.ToDecimal Then
Alert("El importe de los pagos no puede exceder el importe de la factura. Por favor rectifique.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
'Pago en Efectivo
If TxtImporteEfectivo.Text.ToDecimal > 0 Then
@@ -16477,7 +16517,7 @@ Partial Class Ventas
DrEfectivo("TipoMovimiento") = "Pago en Efectivo"
DrEfectivo("CveCuenta") = DdlCuentaEfectivo.SelectedValue
DrEfectivo("Cuenta") = DdlCuentaEfectivo.SelectedItem.Text
DrEfectivo("Importe") = TxtImporteEfectivo.Text
DrEfectivo("Importe") = TxtImporteEfectivo.Text.ToDecimal - TxtCambio.Text.ToDecimal
DrEfectivo("Folio") = CargaFolioContado(DdlCuentaEfectivo.SelectedValue.ToEntero, 6)
DrEfectivo("Observaciones") = ""
DrEfectivo("Tipo") = "Caja Chica"
@@ -16674,15 +16714,15 @@ Partial Class Ventas
Private Function ValidaPagosContado() As Boolean
Dim Retorno = False
If (UsuarioActual.CveEmpresa = 140) AndAlso (Not PermiteCredito) AndAlso (DtPagos Is Nothing OrElse DtPagos.Rows.Count = 0) Then
If (UsuarioActual.CveEmpresa = 140) AndAlso (Not PermiteCredito) AndAlso (DtPagos Is Nothing OrElse DtPagos.Rows.Count = 0) And TxtTotal.Text.ToDecimal > 0 Then
Alert("Es necesario especificar un pago.", TipoMensaje.MsgAdvertencia)
Retorno = True
End If
'If DtPagos.SUM("Importe").ToString.ToDecimal > TxtTotal.Text.ToDecimal Then
' Alert("El importe de los pagos no puede exceder el importe de la factura. Por favor verifique.", TipoMensaje.MsgAdvertencia)
' Retorno = True
'End If
If (DtPagos.SUM("Importe").ToString.ToDecimal + Total - TxtCambio.Text.ToDecimal) > TxtTotal.Text.ToDecimal Then
Alert("El importe de los pagos no puede exceder el importe de la factura. Por favor verifique.", TipoMensaje.MsgAdvertencia)
Retorno = True
End If
Return Retorno
End Function

View File

@@ -803,7 +803,7 @@ Public Class WSApp
Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", ""))
Timbre.Comprobante.Folio = Obj.Folio.ToString
Timbre.Comprobante.Serie = Obj.Serie
Timbre.Comprobante.Fecha = Obj.Fecha
Timbre.Comprobante.Fecha = Obj.FechaCP
Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT

View File

@@ -2142,7 +2142,7 @@ Public Class WSSIGApp
Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", ""))
Timbre.Comprobante.Folio = Obj.Folio.ToString
Timbre.Comprobante.Serie = Obj.Serie
Timbre.Comprobante.Fecha = Obj.Fecha
Timbre.Comprobante.Fecha = Obj.FechaCP
Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT

View File

@@ -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