Merge branch 'master' of http://oirigoyen@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -794,6 +794,69 @@ Public Class ClsAcumuladores
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "P O L I Z A - V I R T U A L"
|
||||
Public Function AddPolizaVirtual(CveVenta As Integer, CveVentaDetalle As Integer, CvePS As Integer, Cantidad As Decimal, PU As Decimal, Descuento As Decimal, Total As Decimal,
|
||||
TipoServicio As Integer, TipoPoliza As Integer, CveModeloAuto As Integer, AnioVehiculo As Integer, TieneUsado As Boolean, FechaUsado As DateTime,
|
||||
CvePSUsado As Integer, CveBCIUsado As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
SqlDataAdapter("PA_Vta_PolizaVirtualAdd")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||
.Add("@CveVentaDetalle", SqlDbType.Int).Value = CveVentaDetalle
|
||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||
.Add("@Cantidad", SqlDbType.Float).Value = Cantidad
|
||||
.Add("@PU", SqlDbType.Money).Value = PU
|
||||
.Add("@Descuento", SqlDbType.Money).Value = Descuento
|
||||
.Add("@Total", SqlDbType.Money).Value = Total
|
||||
.Add("@TipoServicio", SqlDbType.Int).Value = TipoServicio
|
||||
.Add("@TipoPoliza", SqlDbType.Int).Value = TipoPoliza
|
||||
.Add("@CveModeloAuto", SqlDbType.Int).Value = CveModeloAuto
|
||||
.Add("@AnioVehiculo", SqlDbType.Int).Value = AnioVehiculo
|
||||
.Add("@TieneUsado", SqlDbType.Bit).Value = TieneUsado
|
||||
.Add("@FechaUsado", SqlDbType.DateTime).Value = FechaUsado
|
||||
.Add("@CvePSUsado", SqlDbType.Int).Value = CvePSUsado
|
||||
.Add("@CveBCIUsado", SqlDbType.Int).Value = CveBCIUsado
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As SqlException
|
||||
OnError("Ocurrió un al agregar la poliza virtual. ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function GetPolizasVirtuales(CveVenta As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
SqlDataAdapter("PA_Vta_PolizaVirtualGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As SqlException
|
||||
OnError("Ocurrió un al obtener la poliza virtual. ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function UpdateEnvioPolizaVirutal(CvePolizaVirtual As Integer, Envio As Boolean, FechaEnvio As DateTime) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
SqlDataAdapter("PA_Vta_PolizaVirtualEnvioUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CvePolizaVirtual", SqlDbType.Int).Value = CvePolizaVirtual
|
||||
.Add("@Envio", SqlDbType.TinyInt).Value = Envio
|
||||
.Add("@FechaEnvio", SqlDbType.DateTime).Value = FechaEnvio
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As SqlException
|
||||
OnError("Ocurrió un al actualizar el envio de la poliza virtual. ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
Public Function DistribuidorMovtosAdd(CveCliente As Integer, Cantidad As Integer, CveTamaño As Integer, CveConcepto As Integer, CveVenta As Integer, CveUsuario As Integer,
|
||||
CveEmpresa As Integer, ImporteCompras As Decimal, Observaciones As String, Optional CveMovimiento As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -191,7 +191,7 @@ Public Class ClsCompras
|
||||
AplicaNotaCredito As Boolean, Observaciones As String, CveEstatusCompra As Integer, CvePrePoliza As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional IdPoliza As Integer = -1,
|
||||
Optional CveOC As Integer = -1, Optional CveCajaChica As Integer = -1, Optional CvePersonal As Integer = -1, Optional NumeroReembolso As String = "-1", Optional CveProveedorSucursal As Integer = -1,
|
||||
Optional AplicoPromocion As Boolean = False, Optional PorcentajeIVA As Double = 0, Optional CveMetodoPago As Integer = -1, Optional CveRetIVAConcepto As Integer = -1, Optional CveConceptoContableAlmacen As Integer = -1,
|
||||
Optional CveRetISRConcepto As Integer = -1, Optional NoDeducible As Boolean = False, Optional CveTipoCompra As Integer = -1, Optional TotalOriginal As Double = 0, Optional CveConceptoContable As Integer = -1) As Boolean
|
||||
Optional CveRetISRConcepto As Integer = -1, Optional NoDeducible As Boolean = False, Optional CveTipoCompra As Integer = -1, Optional TotalOriginal As Double = 0, Optional CveTipoConcepto As Integer = 1) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -240,7 +240,7 @@ Public Class ClsCompras
|
||||
.Add("@NoDeducible", SqlDbType.Bit).Value = NoDeducible
|
||||
.Add("@CveTipoCompra", SqlDbType.Int).Value = CveTipoCompra
|
||||
.Add("@TotalOriginal", SqlDbType.Money).Value = TotalOriginal
|
||||
.Add("@CveTipoConcepto", SqlDbType.Int).Value = CveConceptoContable
|
||||
.Add("@CveTipoConcepto", SqlDbType.Int).Value = CveTipoConcepto
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -1629,9 +1629,12 @@ Public Class ClsContratos
|
||||
|
||||
|
||||
#Region "T I P O S C O N T R A T O S"
|
||||
Public Function GetContratosTipos() As Boolean
|
||||
Public Function GetContratosTipos(CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Con_ContratosTiposGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
|
||||
@@ -4832,7 +4832,69 @@ Public Class ClsInventarios
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "Camiones"
|
||||
Public Function GetCamiones(CveCamion As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Inv_CamionesGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveCamion", SqlDbType.Int).Value = CveCamion
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al momento de obtener el listado de camiones", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function AddCamiones(Placa As String, Especificacion As String, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Inv_CamionesAdd")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Placa", SqlDbType.VarChar).Value = Placa
|
||||
.Add("@Especificacion", SqlDbType.VarChar).Value = Especificacion
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al momento de insertar el nuevo camion", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function RemoveCamiones(CveCamion As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Inv_CamionesRemove")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveCamion", SqlDbType.Int).Value = CveCamion
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al momento de eliminar un camion", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function UpdateCamiones(CveCamion As Integer, Placa As String, Especificacion As String) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Inv_CamionesUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveCamion", SqlDbType.Int).Value = CveCamion
|
||||
.Add("@Placa", SqlDbType.VarChar).Value = Placa
|
||||
.Add("@Especificacion", SqlDbType.VarChar).Value = Especificacion
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al momento de actualizar el camion", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
#End Region
|
||||
#Region " IDisposable Support "
|
||||
' IDisposable
|
||||
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
|
||||
|
||||
@@ -1673,12 +1673,27 @@ Public Class ClsPaginas
|
||||
Application("GlobalDTContratos") = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTContratosTipos() As DataTable
|
||||
Property GlobalDTContratosTipos(CveEmpresa As Integer) As DataTable
|
||||
Get
|
||||
GlobalDTContratosTipos = DirectCast(Application("GlobalDTContratosTipos"), DataTable)
|
||||
Dim AppNombre As String = String.Format("GlobalDTContratosTipos{0}", CveEmpresa)
|
||||
If Application(AppNombre) Is Nothing Then
|
||||
Dim ObjContratos As New ClsContratos
|
||||
If ObjContratos.GetContratosTipos(CveEmpresa) Then
|
||||
Application(AppNombre) = ObjContratos.DtResultados
|
||||
If CveEmpresa <> -1 Then
|
||||
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
|
||||
GlobalDTContratosTipos = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
Else
|
||||
GlobalDTContratosTipos = DirectCast(Application(AppNombre), DataTable)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
GlobalDTContratosTipos = DirectCast(Application("GlobalDTContratosTipos"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTContratosTipos") = value
|
||||
Dim AppNombre As String = String.Format("GlobalDTContratosTipos{0}", CveEmpresa)
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTTipoAlmacen(CveEmpresa As Integer) As DataTable
|
||||
|
||||
@@ -1347,6 +1347,13 @@ Namespace Modelos
|
||||
Dim rowInv As DataRow = DtRecepcionUsados.Select($"CvePS={Row("CvePS").ToString.ToEntero}")(0)
|
||||
rowInv("CveVentaDetalle") = ObjVentas.CveVentaDetalle
|
||||
End If
|
||||
End If
|
||||
|
||||
If DtPolizasVirtuales IsNot Nothing Then
|
||||
If DtPolizasVirtuales.Select($"CvePS={Row("CvePS").ToString.ToEntero}").Length > 0 Then
|
||||
Dim RowPoliza As DataRow = DtPolizasVirtuales.Select($"CvePS={Row("CvePS").ToString.ToEntero}")(0)
|
||||
RowPoliza("CveVentaDetalle") = ObjVentas.CveVentaDetalle
|
||||
End If
|
||||
End If
|
||||
|
||||
'Agregamos el gasto de contrato
|
||||
@@ -1376,7 +1383,7 @@ Namespace Modelos
|
||||
End If
|
||||
Next
|
||||
|
||||
'Bonificacion Usados
|
||||
'BONIFICACION USADOS
|
||||
If UsadosBonificacion IsNot Nothing AndAlso UsadosBonificacion.Count > 0 AndAlso TipoBonificacion > 0 Then
|
||||
For Each CveMovto In UsadosBonificacion
|
||||
If Not ObjAcum.DistribuidorActualizarFacturados(CveMovto, UsuarioActual.CveEmpresa, TipoBonificacion, CveVenta) Then
|
||||
@@ -1385,7 +1392,7 @@ Namespace Modelos
|
||||
Next
|
||||
End If
|
||||
|
||||
'Ajustes'
|
||||
'AJUSTES'
|
||||
If DtAjustes IsNot Nothing AndAlso DtAjustes.Rows.Count > 0 Then
|
||||
For Each Dr As DataRow In DtAjustes.Rows
|
||||
If Not ObjAcum.AddGarantiasDetalle(Dr("CveVentaDetalle").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("CveFolioGarantia").ToString.ToEntero, Dr("CveTipoUso").ToString.ToEntero,
|
||||
@@ -1396,7 +1403,14 @@ Namespace Modelos
|
||||
Next
|
||||
End If
|
||||
|
||||
'Orden Produccion'
|
||||
'POLIZA VIRTUAL
|
||||
If factura.DtPolizasVirtuales IsNot Nothing AndAlso factura.DtPolizasVirtuales.Rows.Count > 0 Then
|
||||
If Not GuardarPolizasVirtuales(ObjVentas.IniciaTransacSQL(), ObjFactura:=factura) Then
|
||||
ErrorList.Add("Ocurrió un error al actualizar el distribuidor.")
|
||||
End If
|
||||
End If
|
||||
|
||||
'ORDEN PRODUCCION'
|
||||
If UsuarioActual.CveEmpresa.Contiene(126) Then
|
||||
If ObjVentas.CveVenta > 0 And factura.CveOrdenProduccion > 0 Then
|
||||
If Not ObjCGame.UpdateOrdenProduccionVenta(factura.CveOrdenProduccion, ObjVentas.CveVenta) Then
|
||||
@@ -1861,6 +1875,27 @@ Namespace Modelos
|
||||
|
||||
Return Resultado
|
||||
|
||||
End Function
|
||||
Private Function GuardarPolizasVirtuales(SqlTransaccion As SqlClient.SqlTransaction, ObjFactura As Modelos.Factura) As Boolean
|
||||
Dim Resultado As Boolean = True
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531).ToEntero > 0 AndAlso ObjFactura.TipoDocto.Contiene("Rem") Then
|
||||
|
||||
Dim ObjAcum As New ClsAcumuladores(SqlTransaccion)
|
||||
|
||||
For Each drow As DataRow In ObjFactura.DtPolizasVirtuales.Rows
|
||||
If ObjAcum.AddPolizaVirtual(ObjFactura.CveVenta, drow("CveVentaDetalle").ToString().ToEntero(), drow("CvePS").ToString.ToEntero, drow("Cantidad").ToString.ToDecimal, drow("PU").ToString.ToDecimal, drow("Descuento").ToString.ToDecimal,
|
||||
drow("Total").ToString.ToDecimal, drow("TipoServicio").ToString.ToEntero, drow("TipoPoliza").ToString.ToEntero, drow("CveModeloAuto").ToString.ToEntero, drow("AnioVehiculo").ToString.ToEntero, CBool(drow("TieneUsado").ToString),
|
||||
drow("FechaUsado").ToString().ToDateTime, drow("CvePSUsado").ToString.ToEntero, drow("CveBCIUsado").ToString.ToEntero) Then
|
||||
Else
|
||||
Resultado = False
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
Return Resultado
|
||||
|
||||
End Function
|
||||
Private Sub GuardarVentaPrePolizas(ByRef factura As Modelos.Factura, ByRef ObjConta As ClsContabilidad, TmpDTDetalleMovimientos As DataTable, CveNCaVincular As Integer, ByRef objContPaqi As ClsContPAQi, Optional ByRef ObjBancos As ClsBancos = Nothing, ByRef Optional ObjVentas As ClsVentas = Nothing, ByRef Optional ObjEventos As ClsOIEventos = Nothing)
|
||||
|
||||
@@ -5131,7 +5166,8 @@ Namespace Modelos
|
||||
Public Property DtDetalle As Data.DataTable
|
||||
Public Property DtDetalleAC As Data.DataTable
|
||||
Public Property DtAjustes As Data.DataTable
|
||||
Public Property DtRecepcionUsados As Data.DataTable
|
||||
Public Property DtRecepcionUsados As Data.DataTable
|
||||
Public Property DtPolizasVirtuales As Data.DataTable
|
||||
Public Property DtVentasNC As Data.DataTable
|
||||
Public Property DtDeduccion As Data.DataTable
|
||||
Public Property DtFirmas As Data.DataTable
|
||||
|
||||
@@ -890,13 +890,13 @@ Namespace Extensiones
|
||||
Public Function RoundSQL(Valor As Double, Optional Decimales As Integer = 2) As Double
|
||||
'Return Math.Round(Valor, Decimales, MidpointRounding.AwayFromZero)
|
||||
'primero, se redondea a 4, para que concuerde al redondeo de sql, si se redondea a 2 decimales por ejemplo
|
||||
Return If(Decimales < 4, Math.Round(Math.Round(Valor, 4, MidpointRounding.AwayFromZero), Decimales, MidpointRounding.AwayFromZero), Math.Round(Valor, MidpointRounding.AwayFromZero))
|
||||
Return If(Decimales < 4, Math.Round(Math.Round(Valor, 4, MidpointRounding.AwayFromZero), Decimales, MidpointRounding.AwayFromZero), Math.Round(Valor, Decimales, MidpointRounding.AwayFromZero))
|
||||
End Function
|
||||
|
||||
<Runtime.CompilerServices.Extension()>
|
||||
Public Function RoundSQL(Valor As Decimal, Optional Decimales As Integer = 2) As Decimal
|
||||
'primero, se redondea a 4, para que concuerde al redondeo de sql
|
||||
Return If(Decimales < 4, Math.Round(Math.Round(Valor, 4, MidpointRounding.AwayFromZero), Decimales, MidpointRounding.AwayFromZero), Math.Round(Valor, MidpointRounding.AwayFromZero))
|
||||
Return If(Decimales < 4, Math.Round(Math.Round(Valor, 4, MidpointRounding.AwayFromZero), Decimales, MidpointRounding.AwayFromZero), Math.Round(Valor, Decimales, MidpointRounding.AwayFromZero))
|
||||
End Function
|
||||
<Runtime.CompilerServices.Extension()>
|
||||
Public Function Abs(Valor As Double) As Double
|
||||
|
||||
@@ -41,6 +41,8 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
GetUser(context)
|
||||
Case "ActualizaPreP"
|
||||
ActualizaPrePoliza(context)
|
||||
Case "getpersonal"
|
||||
getpersonal(context)
|
||||
|
||||
End Select
|
||||
Catch ex As Exception
|
||||
@@ -201,7 +203,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
|
||||
Dim dt As DataTable = DirectCast(context.Application(AppNombre), DataTable).FiltraParametros($"CveEmpresa = {CveEmpresa}")
|
||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||
DtRetorno = dt.FiltraParametros($"NombreComercial like '%{Name}%'")
|
||||
DtRetorno = dt.FiltraParametros($"NombreComercial like '%{Name}%' OR Nombre like '%{Name}%' ")
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -686,4 +688,50 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "Get Personal"
|
||||
Private Function getpersonal(ByVal context As HttpContext) As String
|
||||
Dim retorno As String = ""
|
||||
Dim DtRetorno As DataTable = Nothing
|
||||
|
||||
Dim usuario As Usuario = UsuarioActual(context)
|
||||
Dim CveEmpresa As String
|
||||
If IsNothing(usuario) Then
|
||||
context.Response.Write("")
|
||||
Else
|
||||
CveEmpresa = usuario.CveEmpresa
|
||||
Dim Name = IfNull(context.Request("Name"), "-1").ToString
|
||||
Dim AppNombre As String = String.Format("GlobalDTRHPersonal{0}", CveEmpresa)
|
||||
'sino existe, recarga los datos
|
||||
If context.Application(AppNombre) Is Nothing Then
|
||||
Dim ObjPersonal As New ClsRH
|
||||
If ObjPersonal.GetPersonal(-1, "-1", "-1", "-1", "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, CveEmpresa) Then
|
||||
context.Application(AppNombre) = ObjPersonal.DtResultados
|
||||
End If
|
||||
ObjPersonal.Dispose()
|
||||
End If
|
||||
|
||||
'Dim ObjProveedores As New ClsCompProveedores
|
||||
'If ObjProveedores.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, -1, "-1", Name, "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa) Then
|
||||
' DtRetorno = ObjProveedores.DtResultados
|
||||
'End If
|
||||
'ObjProveedores.Dispose()
|
||||
Dim dt As DataTable = DirectCast(context.Application(AppNombre), DataTable).FiltraParametros($"CveEmpresa = {CveEmpresa}")
|
||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||
DtRetorno = dt.FiltraParametros($"NombreCompleto like '%{Name}%'")
|
||||
End If
|
||||
End If
|
||||
|
||||
If DtRetorno IsNot Nothing AndAlso DtRetorno.Rows.Count > 0 Then
|
||||
DtRetorno.Columns("CvePersonal").ColumnName = "id"
|
||||
DtRetorno.Columns("NombreCompleto").ColumnName = "text"
|
||||
retorno = JsonConvert.SerializeObject(DtRetorno).ToString
|
||||
context.Response.Write(retorno)
|
||||
Else
|
||||
context.Response.Write("[]")
|
||||
End If
|
||||
|
||||
Return retorno
|
||||
End Function
|
||||
#End Region
|
||||
End Class
|
||||
@@ -7,8 +7,8 @@ Imports Microsoft.Reporting.WebForms
|
||||
Imports System.Linq
|
||||
|
||||
Partial Class Bancos_RepEgresosSinComprobante
|
||||
Inherits ClsPaginas
|
||||
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region " PROPIEDADES "
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
@@ -25,9 +25,9 @@ Partial Class Bancos_RepEgresosSinComprobante
|
||||
Set(value As DataTable)
|
||||
ViewState("DtFuncionariosEmpleados") = value
|
||||
End Set
|
||||
End Property
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
@@ -295,12 +295,16 @@ Partial Class Bancos_RepEgresosSinComprobante
|
||||
Dim CveCuenta As Integer = 0
|
||||
Dim IdCtaContPersonal As Integer = 0
|
||||
Dim CveConceptoContable As Integer
|
||||
Dim TipoMovtoOtIngresos As Boolean = True
|
||||
Dim TipoMovtoConcepto As Boolean = False
|
||||
|
||||
Select Case gr.DataKey("CveConceptoContable").ToEntero
|
||||
Case 10
|
||||
CveConceptoContable = 21
|
||||
Case 28
|
||||
CveConceptoContable = 29
|
||||
TipoMovtoOtIngresos = False
|
||||
TipoMovtoConcepto = True
|
||||
Case 37
|
||||
CveConceptoContable = 43
|
||||
Case 42
|
||||
@@ -324,14 +328,14 @@ Partial Class Bancos_RepEgresosSinComprobante
|
||||
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,
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoConcepto, 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,
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoOtIngresos, 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
|
||||
@@ -392,33 +396,33 @@ Partial Class Bancos_RepEgresosSinComprobante
|
||||
End If
|
||||
ImprimirPDF($"Empresas/Grales/Formatos/{Archivo}", DtDatos, params, String.Format("EgresosSinComprovante-{0}", Now.ToDateTime.ToShortDateString), Formato:=Formato)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#Region "PROVEEDORES"
|
||||
|
||||
|
||||
Protected Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
|
||||
ImprimirReportePdf("RepEgresosSinComprobante.rdlc", DtDatos.FiltraParametros(" RazonSocial is not null "), "EXCEL")
|
||||
End Sub
|
||||
|
||||
Private Sub LinkPDF_Click(sender As Object, e As EventArgs) Handles LinkPDF.Click
|
||||
ImprimirReportePdf("RepEgresosSinComprobante.rdlc", DtDatos.FiltraParametros(" RazonSocial is not null "))
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "FUNCIONARIOS/EMPLEADOS"
|
||||
|
||||
|
||||
Protected Sub LnkExportarFuncionarios_Click(sender As Object, e As EventArgs)
|
||||
ImprimirReportePdf("RepEgresosSinComprobanteFuncionarios.rdlc", DtFuncionariosEmpleados, "EXCEL")
|
||||
End Sub
|
||||
Protected Sub LnkPDFFuncionarios_Click(sender As Object, e As EventArgs)
|
||||
ImprimirReportePdf("RepEgresosSinComprobanteFuncionarios.rdlc", DtFuncionariosEmpleados)
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -1102,12 +1102,12 @@ Partial Class Compras_Compras
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property CveConceptoContable As Integer
|
||||
Private Property CveTipoConcepto As Integer
|
||||
Get
|
||||
Return ViewState("CveConceptoContable").ToString.ToEntero
|
||||
Return ViewState("CveTipoConcepto").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveConceptoContable") = value
|
||||
ViewState("CveTipoConcepto") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -1130,7 +1130,7 @@ Partial Class Compras_Compras
|
||||
SubTotalOriginal = 0
|
||||
CveConceptoContableAlmacen = 0
|
||||
EsNoDeducible = False
|
||||
|
||||
CveTipoConcepto = 1
|
||||
'******** Prorrateo ********************************************
|
||||
If UsuarioActual.Empresa.Funcionalidad(117) <> "" Then
|
||||
btnProrateo.Visible = True
|
||||
@@ -1595,23 +1595,20 @@ Partial Class Compras_Compras
|
||||
|
||||
HplAddClasificacion.Visible = False
|
||||
ImgClasificacion.Visible = False
|
||||
End If
|
||||
CveConceptoContable = 5
|
||||
|
||||
|
||||
|
||||
'If CargoFactura Then
|
||||
' 'If UsuarioActual.Empresa.Funcionalidad(128) = "1" Then
|
||||
' ' If TmpDT.MAX("CvePS").ToEntero > 0 Then
|
||||
' ' BtnGuardar.Enabled = False
|
||||
' ' RegistraScript($"AbrirVentana('/OC/PopUpBuscarReq.aspx?V=VOCCOMP&P={CveProveedor}&Masterimpoup=true',1000,600,'S'); return false;")
|
||||
|
||||
' ' End If
|
||||
' 'End If
|
||||
'End If
|
||||
|
||||
|
||||
'RegistraScript("ScrollVentanaAddProducto();")
|
||||
End If
|
||||
|
||||
'If CargoFactura Then
|
||||
' 'If UsuarioActual.Empresa.Funcionalidad(128) = "1" Then
|
||||
' ' If TmpDT.MAX("CvePS").ToEntero > 0 Then
|
||||
' ' BtnGuardar.Enabled = False
|
||||
' ' RegistraScript($"AbrirVentana('/OC/PopUpBuscarReq.aspx?V=VOCCOMP&P={CveProveedor}&Masterimpoup=true',1000,600,'S'); return false;")
|
||||
|
||||
' ' End If
|
||||
' 'End If
|
||||
'End If
|
||||
|
||||
|
||||
'RegistraScript("ScrollVentanaAddProducto();")
|
||||
End Sub
|
||||
|
||||
#Region "C A R G A S"
|
||||
@@ -2244,7 +2241,7 @@ Partial Class Compras_Compras
|
||||
TxtDocumentoImporteCaja.Text = TotalTemp.FormatoNumero
|
||||
TxtOtrosImpuestos.Text = OtrosImpuestos.FormatoNumero
|
||||
If OtrosImpuestos > 0 Then TrOtrosImpuestos.Visible = True
|
||||
If OtrosImpuestosRetenciones > 0 Then TrOtrosImpuestos.Visible = True : TxtOtrosImpuestos.Text = OtrosImpuestosRetenciones.FormatoNumero
|
||||
If OtrosImpuestosRetenciones > 0 Then TrOtrosImpuestos.Visible = True : TxtOtrosImpuestos.Text = (-OtrosImpuestosRetenciones).FormatoNumero
|
||||
HFDiferenciaCompra.Value = TxtTotal.Text
|
||||
HdnCompraSaldo.Value = TotalTemp.ToString
|
||||
CompraSaldo = TotalTemp
|
||||
@@ -2501,7 +2498,8 @@ Partial Class Compras_Compras
|
||||
|
||||
|
||||
DdlRetIVAConcepto.SelectedValueExist(dr("CveRetIVAConcepto").ToString)
|
||||
DdlRetISRConcepto.SelectedValueExist(dr("CveRetISRConcepto").ToString)
|
||||
DdlRetISRConcepto.SelectedValueExist(dr("CveRetISRConcepto").ToString)
|
||||
If dr("CveTipoConcepto").ToString.ToEntero = 1 Then LblProveedor.Text = "Proveedor:" Else LblProveedor.Text = "Acreedor:"
|
||||
|
||||
HdnCveEstatusFactura.Value = dr("CveEstatusFactura").ToString
|
||||
LblCompraEstatus.Text = dr("EstatusFactura").ToString
|
||||
@@ -4417,7 +4415,7 @@ Partial Class Compras_Compras
|
||||
TxtRedondeo.Text.ToDouble, TxtTotal.Text.ToDouble, TxtFecha.Text.Trim.ToDate, DdlMoneda.SelectedValue.ToEntero, TipoCambio, TxtFechaPago.Text.Trim.ToDate, ChkAplicaNotaCredito.Checked, TxtObsFact.Text.Trim, CveEstatusFactura,
|
||||
CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, IdPoliza, CveCajaChica:=CveCajaChica, CvePersonal:=CvePersonal, NumeroReembolso:=NumeroReembolso, CveProveedorSucursal:=DdlProveedorSucursal.SelectedValue.ToEntero,
|
||||
AplicoPromocion:=ChkOCPromocion.Checked, PorcentajeIVA:=PorcentajeIVA, CveMetodoPago:=CveMetodoPago, CveRetIVAConcepto:=If(DdlRetIVAConcepto.Items.Count > 0, DdlRetIVAConcepto.SelectedValue.ToEntero, -1), CveConceptoContableAlmacen:=CveConceptoContableAlmacen,
|
||||
CveRetISRConcepto:=If(DdlRetISRConcepto.Items.Count > 0, DdlRetISRConcepto.SelectedValue.ToEntero, -1), NoDeducible:=EsNoDeducible, CveTipoCompra:=DdlTipoCompra.SelectedValue.ToEntero, TotalOriginal:=TotalOriginal, CveConceptoContable:=CveConceptoContable) Then
|
||||
CveRetISRConcepto:=If(DdlRetISRConcepto.Items.Count > 0, DdlRetISRConcepto.SelectedValue.ToEntero, -1), NoDeducible:=EsNoDeducible, CveTipoCompra:=DdlTipoCompra.SelectedValue.ToEntero, TotalOriginal:=TotalOriginal, CveTipoConcepto:=CveTipoConcepto) Then
|
||||
|
||||
ViewState("CveCompra") = ObjCompras.CveCompra
|
||||
If ObjCompras.DtResultados.Rows.Count > 0 Then ViewState("CompraFolio") = ObjCompras.DtResultados.Rows(0)("vFolio").ToString
|
||||
@@ -6624,32 +6622,36 @@ Partial Class Compras_Compras
|
||||
IdCtaContable = 0
|
||||
CveCuenta = 0
|
||||
End If
|
||||
Case 5 'Proveedores
|
||||
Case 5 'Proveedores
|
||||
If CveTipoConcepto = 2 Then ConceptoContable = 305 'cuando es acreedor
|
||||
If Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") Then
|
||||
|
||||
importeMovimiento = importeProv
|
||||
importeMN = importeMovimiento * tipoCambioActual * Multiplicador
|
||||
|
||||
If tipoCambioActual > 1 Then Concepto += $" TC:{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}"
|
||||
|
||||
If tipoCambioActual = 1 Then
|
||||
IdCtaContable = CtaProveedor
|
||||
CveCuenta = CveCuentaProveedor
|
||||
Else
|
||||
IdCtaContable = CtaProveedorComplementaria
|
||||
CveCuenta = CveCuentaProveedorComplementaria
|
||||
If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or CveCuenta > 0 Or UsuarioActual.CveEmpresa = 119) Then 'Cuando tiene complementaria lo dividimos en dos Then
|
||||
importeMN = importeMovimiento
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Referencia, 201, Concepto, FechaMovimiento, IdCtaContable, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=importeMovimiento * tipoCambioActual - importeMovimiento, ImporteME:=importeMovimiento, CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
IdCtaContable = CtaProveedorExtranjera
|
||||
CveCuenta = CveCuentaProveedorExtranjera
|
||||
End If
|
||||
End If
|
||||
|
||||
Case 59 'Documentos
|
||||
Dim CveConceptoComplementario As Integer = 201
|
||||
If CveTipoConcepto = 2 Then CveConceptoComplementario = 310
|
||||
|
||||
If tipoCambioActual = 1 Then
|
||||
IdCtaContable = CtaProveedor
|
||||
CveCuenta = CveCuentaProveedor
|
||||
Else
|
||||
IdCtaContable = CtaProveedorComplementaria
|
||||
CveCuenta = CveCuentaProveedorComplementaria
|
||||
If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or CveCuenta > 0 Or UsuarioActual.CveEmpresa = 119) Then 'Cuando tiene complementaria lo dividimos en dos Then
|
||||
importeMN = importeMovimiento
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Referencia, CveConceptoComplementario, Concepto, FechaMovimiento, IdCtaContable, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=importeMovimiento * tipoCambioActual - importeMovimiento, ImporteME:=importeMovimiento, CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
IdCtaContable = CtaProveedorExtranjera
|
||||
CveCuenta = CveCuentaProveedorExtranjera
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
Case 59 'Documentos
|
||||
importeMovimiento = importeCreditos
|
||||
importeMN = importeMovimiento * tipoCambioActual * Multiplicador
|
||||
If ObjConta.GetRetCuenta(ConceptoContable, CveProveedor) Then
|
||||
@@ -7452,7 +7454,7 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
End If
|
||||
|
||||
If TxtOtrosImpuestos.Text.ToDouble > 0 Then
|
||||
If TxtOtrosImpuestos.Text.ToDouble <> 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoImpuestos, TxtOtrosImpuestos.Text.ToDecimal, " ", CveConceptoRetOtrosImpuestos, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=TxtOtrosImpuestos.Text.ToDecimal) Then
|
||||
ErrorMovtosRetISR = True
|
||||
End If
|
||||
@@ -11958,7 +11960,7 @@ Partial Class Compras_Compras
|
||||
SubTotalConceptos = SubTotal
|
||||
GvPS.DataSource = TmpDT : GvPS.DataBind()
|
||||
|
||||
If TxtOtrosImpuestos.Text.ToDouble > 0 Then TxtOtrosImpuestos.Text = "" : TrOtrosImpuestos.Visible = False
|
||||
'If TxtOtrosImpuestos.Text.ToDouble > 0 Then TxtOtrosImpuestos.Text = "" : TrOtrosImpuestos.Visible = False
|
||||
|
||||
'EN ESPERA DE ALGUN CASO QUE LO NECESITE - IPP 5 DICIEMBRE 2016
|
||||
'TempSubTotal = TempSubTotal - SubTotal
|
||||
@@ -16471,7 +16473,7 @@ Partial Class Compras_Compras
|
||||
TempIEPS = TxtIEPS.Text.ToDouble
|
||||
TempRetIVA = TxtRetIVA.Text.ToDouble
|
||||
TempRetISR = TxtRetISR.Text.ToDouble
|
||||
TempTotal = Math.Round(TempSubTotal2 + TempIVA + TempIEPS - TempRetIVA - TempRetISR + TxtOtrosImpuestos.Text.ToDouble, 2)
|
||||
TempTotal = Math.Round(TempSubTotal2 + TempIVA + TempIEPS - TempRetIVA - TempRetISR - TxtOtrosImpuestos.Text.ToDouble, 2)
|
||||
DifTotales = TxtTotal.Text.ToDouble - TempTotal
|
||||
Dim DiferenciaPermitida = 0.6
|
||||
|
||||
@@ -19367,12 +19369,12 @@ Partial Class Compras_Compras
|
||||
End Sub
|
||||
|
||||
Public Sub LblProveedor_OnClick(sender As Object, e As EventArgs) Handles LblProveedor.Click
|
||||
If LblProveedor.Text = "Proveedor:" Then
|
||||
If CveTipoConcepto = 1 Then
|
||||
LblProveedor.Text = "Acreedor:"
|
||||
CveConceptoContable = 305
|
||||
CveTipoConcepto = 2
|
||||
Else
|
||||
LblProveedor.Text = "Proveedor:"
|
||||
CveConceptoContable = 5
|
||||
CveTipoConcepto = 1
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -2422,10 +2422,15 @@ Partial Class PopUpVerFactura
|
||||
ImprimirPDF("Empresas/Grales/Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Desarmado de Paquete - {0}", Folio.ToString), RDSName:="DsInventarios")
|
||||
|
||||
|
||||
Case 21 'SALIDA POR PRESTAMO
|
||||
Case 21, 22 'SALIDA POR PRESTAMO
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim params As New List(Of ReportParameter)
|
||||
|
||||
Dim Archivo As String = $"Empresas/{UsuarioActual.CveEmpresa}/Formatos/EntradaSalida.rdlc"
|
||||
If Not File.Exists($"{Server.MapPath("~")}/{Archivo}") Then
|
||||
Archivo = "Empresas/Grales/Formatos/EntradaSalida.rdlc"
|
||||
End If
|
||||
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
@@ -2433,7 +2438,7 @@ Partial Class PopUpVerFactura
|
||||
params.Add(New ReportParameter("LogoPath", ""))
|
||||
End If
|
||||
|
||||
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
'params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("Concepto", "Salida por Prestamo"))
|
||||
params.Add(New ReportParameter("Almacen", Almacen))
|
||||
params.Add(New ReportParameter("Fecha", Fecha))
|
||||
@@ -2447,37 +2452,43 @@ Partial Class PopUpVerFactura
|
||||
params.Add(New ReportParameter("FacturadoA", NombreCliente))
|
||||
If (UsuarioActual.CveEmpresa = 72) Then
|
||||
params.Add(New ReportParameter("DomicilioFiscal", DomicilioFiscalCompu))
|
||||
End If
|
||||
ImprimirPDF("Empresas/Grales/Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Salida por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios")
|
||||
|
||||
Case 22 'ENTRADA POR PRESTAMO
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim params As New List(Of ReportParameter)
|
||||
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
Else
|
||||
params.Add(New ReportParameter("LogoPath", ""))
|
||||
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
End If
|
||||
|
||||
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("Concepto", "Entrada por Prestamo"))
|
||||
params.Add(New ReportParameter("Almacen", Almacen))
|
||||
params.Add(New ReportParameter("Fecha", Fecha))
|
||||
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
|
||||
params.Add(New ReportParameter("Folio", Folio))
|
||||
params.Add(New ReportParameter("Descuentos", ""))
|
||||
params.Add(New ReportParameter("IVA", ""))
|
||||
params.Add(New ReportParameter("Total", ""))
|
||||
'params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
|
||||
params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio)))
|
||||
params.Add(New ReportParameter("FacturadoA", NombreCliente))
|
||||
If (UsuarioActual.CveEmpresa = 72) Then
|
||||
params.Add(New ReportParameter("DomicilioFiscal", DomicilioFiscalCompu))
|
||||
End If
|
||||
ImprimirPDF("Empresas/Grales/Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Entrada por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios")
|
||||
|
||||
If CveConcepto = 21 Then
|
||||
ImprimirPDF(Archivo, DtMovimientos, params, String.Format("Salida por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios")
|
||||
ElseIf CveConcepto = 22 Then
|
||||
ImprimirPDF(Archivo, DtMovimientos, params, String.Format("Entrada por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios")
|
||||
End If
|
||||
|
||||
'Case 22 'ENTRADA POR PRESTAMO
|
||||
' Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
' Dim params As New List(Of ReportParameter)
|
||||
|
||||
' Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
' If Imagen.Exists Then
|
||||
' params.Add(New ReportParameter("LogoPath", logouri))
|
||||
' Else
|
||||
' params.Add(New ReportParameter("LogoPath", ""))
|
||||
' End If
|
||||
|
||||
' params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
' params.Add(New ReportParameter("Concepto", "Entrada por Prestamo"))
|
||||
' params.Add(New ReportParameter("Almacen", Almacen))
|
||||
' params.Add(New ReportParameter("Fecha", Fecha))
|
||||
' params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
|
||||
' params.Add(New ReportParameter("Folio", Folio))
|
||||
' params.Add(New ReportParameter("Descuentos", ""))
|
||||
' params.Add(New ReportParameter("IVA", ""))
|
||||
' params.Add(New ReportParameter("Total", ""))
|
||||
' 'params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
|
||||
' params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio)))
|
||||
' params.Add(New ReportParameter("FacturadoA", NombreCliente))
|
||||
' If (UsuarioActual.CveEmpresa = 72) Then
|
||||
' params.Add(New ReportParameter("DomicilioFiscal", DomicilioFiscalCompu))
|
||||
' End If
|
||||
' ImprimirPDF("Empresas/Grales/Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Entrada por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios")
|
||||
|
||||
Case 24 'SALIDA POR RESGUARDO
|
||||
If DtMovimientos(0)("CveTipoAlmacen").ToString.ToEntero = 20 Or DtMovimientos(0)("CveTipoAlmacen").ToString.ToEntero = 19 Then
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
|
||||
@@ -688,9 +688,10 @@ Partial Class Compras_eFacturas
|
||||
GvD.DataSource = Nothing
|
||||
End If
|
||||
End If
|
||||
ObjDatos.Dispose()
|
||||
LblRegistros.Text = String.Format("{0} Registros", ObjDatos.DtResultados.FiltraParametros("TipoComprobante <> 'P'").Rows.Count.ToString("N0"))
|
||||
LblTotalPagos.Text = String.Format("{0} Pagos", ObjDatos.DtResultados.FiltraParametros("TipoComprobante = 'P'").Rows.Count.ToString("N0"))
|
||||
ObjDatos.Dispose()
|
||||
|
||||
|
||||
If DtPagos IsNot Nothing AndAlso DtPagos.Rows.Count > 0 Then
|
||||
GvPagos.DataSource = DtPagos
|
||||
@@ -1252,16 +1253,10 @@ Partial Class Compras_eFacturas
|
||||
If txtFechaF.Text = "" Then FechaF = "-1"
|
||||
Dim Folio = If(TxtFolio.Text.Trim.Length > 0, String.Format("%{0}%", TxtFolio.Text.Trim.ToUpper), "-1")
|
||||
Dim Proveedor = If(TxtProveedor.Text.Trim.Length > 0, String.Format("%{0}%", TxtProveedor.Text.Trim.ToUpper.Replace(" ", "%")), "-1")
|
||||
Dim dt As DataTable = Nothing
|
||||
|
||||
If ObjDatos.GetFacturas(-1, Folio, txtFechaI.Text.Trim.ToDate, txtFechaF.Text.Trim.ToDate, "-1", Proveedor, DdlValidado.SelectedValue.ToEntero, DdlResponsable.SelectedValue.ToEntero, DdlClasificacionProv.SelectedValue.ToEntero, DdlCveTipoProveedor.SelectedValue.ToEntero, DdlTipoComprobante.SelectedValue.ToString, UsuarioActual.CveEmpresa) 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 dt As DataTable
|
||||
|
||||
|
||||
|
||||
If Tab.ActiveTabIndex = 0 Then
|
||||
dt = ObjDatos.DtResultados.FiltraParametros("TipoComprobante <> 'P'")
|
||||
Else
|
||||
@@ -1269,6 +1264,15 @@ Partial Class Compras_eFacturas
|
||||
End If
|
||||
|
||||
|
||||
Else
|
||||
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
ObjDatos.Dispose()
|
||||
|
||||
If DT IsNot Nothing 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 params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
@@ -1283,8 +1287,6 @@ Partial Class Compras_eFacturas
|
||||
End If
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepFacturas.rdlc", dt, params, $"FacturasBuzon_{Now.ToString("yyyyMMyyddmmss")}", Tipo)
|
||||
Else
|
||||
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -12,110 +12,110 @@
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table border="0" class="">
|
||||
<tr>
|
||||
<td>
|
||||
<table class="table table-striped table-advance table-hover Widthall">
|
||||
<thead>
|
||||
<tr class="Titulos">
|
||||
<th width="40px">
|
||||
<asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="false" Text="" CommandArgument="LimiteMaximo;0">
|
||||
Clave
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table border="0" class="" style="width: 100%">
|
||||
<tr>
|
||||
<td>
|
||||
<table class="table table-striped table-advance table-hover Widthall" style="width:100%">
|
||||
<thead>
|
||||
<tr class="Titulos">
|
||||
<th width="10%">
|
||||
<asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="false" Text="" CommandArgument="LimiteMaximo;0">
|
||||
Clave
|
||||
<asp:Literal ID="Literal1" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="200px">
|
||||
<asp:LinkButton ID="LbLimite" runat="server" CausesValidation="false" Text="" CommandArgument="LimiteMaximo;0">
|
||||
Tipo Contrato
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="200px">
|
||||
<asp:LinkButton ID="LbLimite" runat="server" CausesValidation="false" Text="" CommandArgument="LimiteMaximo;0">
|
||||
Tipo Contrato
|
||||
<asp:Literal ID="ImgLimiteMaximo" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="200px">
|
||||
<asp:LinkButton ID="LbComision" runat="server" CausesValidation="false" Text="" CommandArgument="Comision;0">
|
||||
Descripción
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="200px">
|
||||
<asp:LinkButton ID="LbComision" runat="server" CausesValidation="false" Text="" CommandArgument="Comision;0">
|
||||
Descripción
|
||||
<asp:Literal ID="ImgComision" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th></th>
|
||||
<th width="165px">Comandos</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<td style="width:40px;"></td>
|
||||
<td style="text-align: center">
|
||||
<asp:TextBox ID="TxtTipoContrato" runat="server" width="180px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVLimite" runat="server" ControlToValidate="TxtTipoContrato" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Contrato''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardarCaracteristicas"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOLimite" runat="server" HighlightCssClass="vco" TargetControlID="RFVLimite" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td style="text-align: center">
|
||||
<asp:TextBox ID="TxtDescripcion" runat="server" width="180px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVDescripcion" runat="server" ControlToValidate="TxtDescripcion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripción''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardarCaracteristicas"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEDescripcion" runat="server" HighlightCssClass="vco" TargetControlID="RFVDescripcion" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td></td>
|
||||
<td style="text-align: center">
|
||||
<asp:LinkButton ID="LbAgregarC" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardarCaracteristicas"></asp:LinkButton></td>
|
||||
</tr>
|
||||
</table>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th></th>
|
||||
<th width="165px">Comandos</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<td style="width: 15%;"></td>
|
||||
<td style="text-align: center; width: 200px">
|
||||
<asp:TextBox ID="TxtTipoContrato" runat="server" Width="180px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVLimite" runat="server" ControlToValidate="TxtTipoContrato" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Contrato''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardarCaracteristicas"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOLimite" runat="server" HighlightCssClass="vco" TargetControlID="RFVLimite" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td style="text-align: left; width: 800px">
|
||||
<asp:TextBox ID="TxtDescripcion" runat="server" Width="100%"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVDescripcion" runat="server" ControlToValidate="TxtDescripcion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripción''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardarCaracteristicas"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEDescripcion" runat="server" HighlightCssClass="vco" TargetControlID="RFVDescripcion" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td style="width:0%"></td>
|
||||
<td style="text-align: center">
|
||||
<asp:LinkButton ID="LbAgregarC" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardarCaracteristicas"></asp:LinkButton></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<asp:UpdatePanel ID="UpGVContratos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvContratos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveContratoTipo" EmptyDataText="No se encontraron Tipos de Contratos." ToolTip="Listado de tipos de Contratos." CssClass="table table-striped table-advance table-hover Widthall" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="CveContratoTipo" ReadOnly="true" />
|
||||
<asp:UpdatePanel ID="UpGVContratos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvContratos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveContratoTipo" EmptyDataText="No se encontraron Tipos de Contratos." ToolTip="Listado de tipos de Contratos." CssClass="table table-striped table-advance table-hover Widthall" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="CveContratoTipo" ItemStyle-Width="10%" ItemStyle-Wrap="false" />
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="180px" ItemStyle-HorizontalAlign="left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlContrato" runat="server" Text='<%# Eval("ContratoTipo", " {0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtTipoContrato" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("ContratoTipo")%>' Width="180px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCaracteristica" runat="server" ControlToValidate="TxtTipoContrato" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Contrato''</b> es necesario, por favor ingréselo."></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOCaracteristica" runat="server" HighlightCssClass="vco" TargetControlID="RFVCaracteristica" Width="100px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="15%" ItemStyle-HorizontalAlign="left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlContrato" runat="server" Text='<%# Eval("ContratoTipo", " {0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtTipoContrato" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("ContratoTipo")%>' Width="180px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCaracteristica" runat="server" ControlToValidate="TxtTipoContrato" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Contrato''</b> es necesario, por favor ingréselo."></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOCaracteristica" runat="server" HighlightCssClass="vco" TargetControlID="RFVCaracteristica" Width="100px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="200px">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlDescripcion" runat="server" Text='<%# Eval("Descripcion", " {0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtDescripcion" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Descripcion")%>' Width="180px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVDescripcion" runat="server" ControlToValidate="TxtDescripcion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripción''</b> es necesario, por favor ingréselo."></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCODescripcion" runat="server" HighlightCssClass="vco" TargetControlID="RFVDescripcion" Width="100px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="200px">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlDescripcion" runat="server" Text='<%# Eval("Descripcion", " {0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtDescripcion" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Descripcion")%>' Width="180px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVDescripcion" runat="server" ControlToValidate="TxtDescripcion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripción''</b> es necesario, por favor ingréselo."></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCODescripcion" runat="server" HighlightCssClass="vco" TargetControlID="RFVDescripcion" Width="100px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Editar" ItemStyle-Width="89px">
|
||||
<EditItemTemplate>
|
||||
<center>
|
||||
<asp:TemplateField HeaderText="Editar" ItemStyle-Width="1px">
|
||||
<EditItemTemplate>
|
||||
<center>
|
||||
<asp:LinkButton ID="ImageButton1" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>"/>
|
||||
<asp:LinkButton ID="ImageButton2" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
|
||||
</center>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="ImageButton3" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="ImageButton3" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Eliminar" ItemStyle-Width="83px">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="ImageButton4" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<asp:TemplateField HeaderText="Eliminar" ItemStyle-Width="1px">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="ImageButton4" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
@@ -15,9 +15,9 @@ Partial Class Contratos_CatContratosTipos
|
||||
#Region " CARGAS "
|
||||
Private Sub CargaDatos()
|
||||
Dim Objeto As New ClsContratos
|
||||
If Objeto.GetContratosTipos() Then
|
||||
If Objeto.GetContratosTipos(UsuarioActual.CveEmpresa) Then
|
||||
GvContratos.DataSource = Objeto.DtResultados
|
||||
GlobalDTContratosTipos = Objeto.DtResultados
|
||||
GlobalDTContratosTipos(UsuarioActual.CveEmpresa) = Objeto.DtResultados
|
||||
End If
|
||||
GvContratos.DataBind()
|
||||
Objeto.Dispose()
|
||||
|
||||
@@ -227,10 +227,10 @@
|
||||
<Source>External</Source>
|
||||
<Value>=Parameters!QR.Value</Value>
|
||||
<Sizing>FitProportional</Sizing>
|
||||
<Top>5.87436in</Top>
|
||||
<Top>5.8661in</Top>
|
||||
<Left>0.03915in</Left>
|
||||
<Height>0.95455in</Height>
|
||||
<Width>1.49755in</Width>
|
||||
<Height>1.10236in</Height>
|
||||
<Width>1.10236in</Width>
|
||||
<ZIndex>5</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
|
||||
@@ -1447,9 +1447,9 @@
|
||||
<Source>External</Source>
|
||||
<Value>=Parameters!QR.Value</Value>
|
||||
<Sizing>FitProportional</Sizing>
|
||||
<Top>3.15082in</Top>
|
||||
<Top>3.09526in</Top>
|
||||
<Left>0.15526in</Left>
|
||||
<Height>0.95455in</Height>
|
||||
<Height>1.13682in</Height>
|
||||
<Width>1.49755in</Width>
|
||||
<ZIndex>6</ZIndex>
|
||||
<Style>
|
||||
|
||||
@@ -992,6 +992,9 @@
|
||||
<Height>0.6cm</Height>
|
||||
<Width>1.57396cm</Width>
|
||||
<ZIndex>9</ZIndex>
|
||||
<Visibility>
|
||||
<Hidden>=IIF(Parameters!FacturaProveedor.Value<>"",False,True)</Hidden>
|
||||
</Visibility>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -1573,6 +1576,12 @@
|
||||
<DataType>String</DataType>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
<ReportParameter Name="NombreRecibio">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
</ReportParameters>
|
||||
<EmbeddedImages>
|
||||
<EmbeddedImage Name="compuproveedores">
|
||||
|
||||
@@ -481,7 +481,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>REMITENTE O EXPEDIDOR: </Value>
|
||||
<Value>REMITENTE O EXPEDIDOR: </Value>
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
@@ -661,7 +661,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>DESTINATARIO: </Value>
|
||||
<Value>DESTINATARIO: </Value>
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
@@ -1214,7 +1214,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||
<Top>7.61768cm</Top>
|
||||
<Top>8.25268cm</Top>
|
||||
<Left>0.20001cm</Left>
|
||||
<Height>0.62599cm</Height>
|
||||
<Width>19.21855cm</Width>
|
||||
@@ -1267,7 +1267,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||
<Top>8.24367cm</Top>
|
||||
<Top>8.87867cm</Top>
|
||||
<Left>0.20001cm</Left>
|
||||
<Height>1.50794cm</Height>
|
||||
<Width>19.21855cm</Width>
|
||||
@@ -1298,143 +1298,6 @@
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Rectangle Name="Rectangle1">
|
||||
<ReportItems>
|
||||
<Textbox Name="Textbox36">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>PLACA: </Value>
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Parameters!Placa.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||
<Top>0.07056cm</Top>
|
||||
<Left>6.54349cm</Left>
|
||||
<Height>0.66127cm</Height>
|
||||
<Width>4.52959cm</Width>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox39">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>CHOFER: </Value>
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Parameters!ResponsableRecibio.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||
<Top>0.07056cm</Top>
|
||||
<Left>0.22015cm</Left>
|
||||
<Height>0.66127cm</Height>
|
||||
<Width>6.32334cm</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="Textbox43">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>ESPECIFICACIÓN DE LA UNIDAD: </Value>
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Parameters!EspecifUnidad.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||
<Top>0.07056cm</Top>
|
||||
<Left>11.07308cm</Left>
|
||||
<Height>0.66127cm</Height>
|
||||
<Width>8.35555cm</Width>
|
||||
<ZIndex>2</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</ReportItems>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Top>9.85744cm</Top>
|
||||
<Left>0cm</Left>
|
||||
<Height>0.91152cm</Height>
|
||||
<Width>19.6022cm</Width>
|
||||
<ZIndex>13</ZIndex>
|
||||
<Visibility>
|
||||
<Hidden>=IIf((Parameters!Chofer.Value = "" or Parameters!Chofer.Value = "-1") And (Parameters!Placa.Value = "" Or Parameters!Placa.Value = "-1"),True,False)</Hidden>
|
||||
</Visibility>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
</Style>
|
||||
</Rectangle>
|
||||
<Textbox Name="Textbox30">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
@@ -1468,11 +1331,11 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox21</rd:DefaultName>
|
||||
<Top>13.24837cm</Top>
|
||||
<Left>2.21206cm</Left>
|
||||
<Top>13.69816cm</Top>
|
||||
<Left>2.20199cm</Left>
|
||||
<Height>1.2cm</Height>
|
||||
<Width>5.78664cm</Width>
|
||||
<ZIndex>14</ZIndex>
|
||||
<ZIndex>13</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -1503,11 +1366,11 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox22</rd:DefaultName>
|
||||
<Top>11.58471cm</Top>
|
||||
<Left>2.21206cm</Left>
|
||||
<Top>12.0345cm</Top>
|
||||
<Left>2.20199cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>5.78664cm</Width>
|
||||
<ZIndex>15</ZIndex>
|
||||
<ZIndex>14</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -1551,11 +1414,11 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox21</rd:DefaultName>
|
||||
<Top>13.24837cm</Top>
|
||||
<Left>11.60471cm</Left>
|
||||
<Top>13.69816cm</Top>
|
||||
<Left>11.59464cm</Left>
|
||||
<Height>1.2cm</Height>
|
||||
<Width>5.78664cm</Width>
|
||||
<ZIndex>16</ZIndex>
|
||||
<ZIndex>15</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -1586,11 +1449,11 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox22</rd:DefaultName>
|
||||
<Top>11.58471cm</Top>
|
||||
<Left>11.60471cm</Left>
|
||||
<Top>12.0345cm</Top>
|
||||
<Left>11.59464cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>5.78664cm</Width>
|
||||
<ZIndex>17</ZIndex>
|
||||
<ZIndex>16</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -1621,11 +1484,11 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox22</rd:DefaultName>
|
||||
<Top>12.88411cm</Top>
|
||||
<Left>2.21206cm</Left>
|
||||
<Top>13.3339cm</Top>
|
||||
<Left>2.20199cm</Left>
|
||||
<Height>0.52062cm</Height>
|
||||
<Width>5.78664cm</Width>
|
||||
<ZIndex>18</ZIndex>
|
||||
<ZIndex>17</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -1656,11 +1519,11 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox22</rd:DefaultName>
|
||||
<Top>12.88411cm</Top>
|
||||
<Left>11.60471cm</Left>
|
||||
<Top>13.3339cm</Top>
|
||||
<Left>11.59464cm</Left>
|
||||
<Height>0.52062cm</Height>
|
||||
<Width>5.78664cm</Width>
|
||||
<ZIndex>19</ZIndex>
|
||||
<ZIndex>18</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -1776,7 +1639,7 @@
|
||||
<Left>0.23022cm</Left>
|
||||
<Height>2.22232cm</Height>
|
||||
<Width>19.21855cm</Width>
|
||||
<ZIndex>20</ZIndex>
|
||||
<ZIndex>19</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
@@ -1819,7 +1682,7 @@
|
||||
<Left>0.23022cm</Left>
|
||||
<Height>0.62599cm</Height>
|
||||
<Width>19.21855cm</Width>
|
||||
<ZIndex>21</ZIndex>
|
||||
<ZIndex>20</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
@@ -1839,11 +1702,174 @@
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Tablix Name="Tablix1">
|
||||
<TablixBody>
|
||||
<TablixColumns>
|
||||
<TablixColumn>
|
||||
<Width>5.06862cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>3.10917cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>10.93493cm</Width>
|
||||
</TablixColumn>
|
||||
</TablixColumns>
|
||||
<TablixRows>
|
||||
<TablixRow>
|
||||
<Height>0.6cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox52">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>CHOFER: </Value>
|
||||
<Style>
|
||||
<FontSize>9pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Parameters!ResponsableRecibio.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox52</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox53">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>PLACA: </Value>
|
||||
<Style>
|
||||
<FontSize>9pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Parameters!Placa.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox53</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox54">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>ESPECIFICACION DE LA UNIDAD: </Value>
|
||||
<Style>
|
||||
<FontSize>9pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Parameters!EspecifUnidad.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox54</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
</TablixRows>
|
||||
</TablixBody>
|
||||
<TablixColumnHierarchy>
|
||||
<TablixMembers>
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
</TablixMembers>
|
||||
</TablixColumnHierarchy>
|
||||
<TablixRowHierarchy>
|
||||
<TablixMembers>
|
||||
<TablixMember>
|
||||
<Group Name="Details" />
|
||||
<TablixMembers>
|
||||
<TablixMember />
|
||||
</TablixMembers>
|
||||
</TablixMember>
|
||||
</TablixMembers>
|
||||
</TablixRowHierarchy>
|
||||
<Top>7.37959cm</Top>
|
||||
<Left>0.21008cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>19.11272cm</Width>
|
||||
<ZIndex>21</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
</Style>
|
||||
</Tablix>
|
||||
</ReportItems>
|
||||
<Height>8.91698in</Height>
|
||||
<Style />
|
||||
</Body>
|
||||
<Width>7.7174in</Width>
|
||||
<Width>7.657in</Width>
|
||||
<Page>
|
||||
<PageHeader>
|
||||
<Height>3.39287cm</Height>
|
||||
@@ -2084,12 +2110,12 @@
|
||||
</Style>
|
||||
</PageHeader>
|
||||
<PageFooter>
|
||||
<Height>1.23527cm</Height>
|
||||
<Height>1.23526cm</Height>
|
||||
<PrintOnFirstPage>true</PrintOnFirstPage>
|
||||
<PrintOnLastPage>true</PrintOnLastPage>
|
||||
<ReportItems>
|
||||
<Line Name="Line1">
|
||||
<Top>0.03528cm</Top>
|
||||
<Top>0.03527cm</Top>
|
||||
<Left>0.22015cm</Left>
|
||||
<Height>0cm</Height>
|
||||
<Width>19.22862cm</Width>
|
||||
@@ -2119,7 +2145,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox13</rd:DefaultName>
|
||||
<Top>0.14111cm</Top>
|
||||
<Top>0.1411cm</Top>
|
||||
<Left>0.22015cm</Left>
|
||||
<Height>0.54708cm</Height>
|
||||
<Width>1.55632cm</Width>
|
||||
@@ -2153,7 +2179,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox14</rd:DefaultName>
|
||||
<Top>0.14111cm</Top>
|
||||
<Top>0.1411cm</Top>
|
||||
<Left>1.77647cm</Left>
|
||||
<Height>0.54708cm</Height>
|
||||
<Width>4.96223cm</Width>
|
||||
@@ -2188,7 +2214,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox13</rd:DefaultName>
|
||||
<Top>0.14111cm</Top>
|
||||
<Top>0.1411cm</Top>
|
||||
<Left>6.84454cm</Left>
|
||||
<Height>0.54708cm</Height>
|
||||
<Width>2.84562cm</Width>
|
||||
@@ -2223,7 +2249,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox14</rd:DefaultName>
|
||||
<Top>0.14111cm</Top>
|
||||
<Top>0.1411cm</Top>
|
||||
<Left>9.69015cm</Left>
|
||||
<Height>0.54708cm</Height>
|
||||
<Width>4.68641cm</Width>
|
||||
@@ -2257,7 +2283,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox14</rd:DefaultName>
|
||||
<Top>0.17639cm</Top>
|
||||
<Top>0.17638cm</Top>
|
||||
<Left>14.62633cm</Left>
|
||||
<Height>0.54708cm</Height>
|
||||
<Width>4.8023cm</Width>
|
||||
@@ -2289,7 +2315,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox14</rd:DefaultName>
|
||||
<Top>0.68819cm</Top>
|
||||
<Top>0.68818cm</Top>
|
||||
<Left>0.22015cm</Left>
|
||||
<Height>0.54708cm</Height>
|
||||
<Width>6.21751cm</Width>
|
||||
|
||||
@@ -1,151 +1,151 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="RepArrastre.aspx.cs" Inherits="GPS_RepArrastre" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
#map {
|
||||
height: 450px;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Reporte de Arrastre
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkApagarvehiculo" runat="server">Apagar vehiculo</asp:LinkButton>
|
||||
</li>
|
||||
</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="">
|
||||
<div class="portlet-title portlet-filterT smalltitle" style="">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" OnClick="BtnConsultar_Click" runat="server" Text="Consultar" class="btn btn-primary" />
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate">
|
||||
Vehiculo:
|
||||
</div>
|
||||
<div class="col-md-3 ">
|
||||
<asp:DropDownList ID="DdlDispositivo" runat="server" DataTextField="NombreVehiculo" DataValueField="CveDispositivo" CssClass="form-control input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none;">
|
||||
<asp:HiddenField ID="HdfVGrafica" ClientIDMode="Static" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpInfo" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="portlet light smmallpadding traspasorow bordered" style="">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-red">
|
||||
<i class="fa fa-clock-o font-red"></i>
|
||||
<span class="caption-subject bold uppercase">datos vehiculo</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="C_bodyreportes" class="portlet-body rowpadding">
|
||||
<asp:TextBox ID="TxtFunciones" CssClass="hidden EvalRun" runat="server"></asp:TextBox>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<label style="font-weight: bold;">¿Activar funcion de arrastre?</label>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<asp:CheckBox ID="chkActivarArrastre" CssClass="chksino " AutoPostBack="true" OnCheckedChanged="chkActivarArrastre_CheckedChanged" Text=" " runat="server" />
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<label style="font-weight: bold;">Velocidad</label>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<asp:Label ID="LblVelocidad" runat="server" Text="Sin Información"></asp:Label>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<label style="font-weight: bold;">¿Encendido / Apagado?</label>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<asp:Label ID="LblEncApa" runat="server" Text="Sin Información"></asp:Label>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<label style="font-weight: bold;">Fecha ultima Conexión</label>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<asp:Label ID="LblFechaInfo" runat="server" Text="Sin Información"></asp:Label>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<asp:Panel runat="server" ID="pnlAlertaActiva" Visible="false" CssClass="col-md-6">
|
||||
<div id="pulsate-regular" class="portlet light smmallpadding traspasorow bordered" style="">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-red">
|
||||
<i class="fa fa-clock-o font-red"></i>
|
||||
<span class="caption-subject bold uppercase">Alerta el vehiculo se encuentra en arrastre</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tools">
|
||||
<%--<a href="javascript:;" class="collapse" data-original-title="" title=""></a>--%>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body rowpadding">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div id="map">
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAF7s8wwhzCVXDUYopc9mXxqaWB33cDro4&libraries=places"></script>
|
||||
<script src="/Metronic/assets/global/plugins/jquery.pulsate.min.js"></script>
|
||||
<script>
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="RepArrastre.aspx.cs" Inherits="GPS_RepArrastre" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
#map {
|
||||
height: 450px;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Reporte de Arrastre
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkApagarvehiculo" runat="server">Apagar vehiculo</asp:LinkButton>
|
||||
</li>
|
||||
</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="">
|
||||
<div class="portlet-title portlet-filterT smalltitle" style="">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" OnClick="BtnConsultar_Click" runat="server" Text="Consultar" class="btn btn-primary" />
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate">
|
||||
Vehiculo:
|
||||
</div>
|
||||
<div class="col-md-3 ">
|
||||
<asp:DropDownList ID="DdlDispositivo" runat="server" DataTextField="NombreVehiculo" DataValueField="CveDispositivo" CssClass="form-control input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none;">
|
||||
<asp:HiddenField ID="HdfVGrafica" ClientIDMode="Static" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpInfo" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="portlet light smmallpadding traspasorow bordered" style="">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-red">
|
||||
<i class="fa fa-clock-o font-red"></i>
|
||||
<span class="caption-subject bold uppercase">datos vehiculo</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="C_bodyreportes" class="portlet-body rowpadding">
|
||||
<asp:TextBox ID="TxtFunciones" CssClass="hidden EvalRun" runat="server"></asp:TextBox>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<label style="font-weight: bold;">¿Activar funcion de arrastre?</label>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<asp:CheckBox ID="chkActivarArrastre" CssClass="chksino " AutoPostBack="true" OnCheckedChanged="chkActivarArrastre_CheckedChanged" Text=" " runat="server" />
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<label style="font-weight: bold;">Velocidad</label>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<asp:Label ID="LblVelocidad" runat="server" Text="Sin Información"></asp:Label>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<label style="font-weight: bold;">¿Encendido / Apagado?</label>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<asp:Label ID="LblEncApa" runat="server" Text="Sin Información"></asp:Label>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<label style="font-weight: bold;">Fecha ultima Conexión</label>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<asp:Label ID="LblFechaInfo" runat="server" Text="Sin Información"></asp:Label>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<asp:Panel runat="server" ID="pnlAlertaActiva" Visible="false" CssClass="col-md-6">
|
||||
<div id="pulsate-regular" class="portlet light smmallpadding traspasorow bordered" style="">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-red">
|
||||
<i class="fa fa-clock-o font-red"></i>
|
||||
<span class="caption-subject bold uppercase">Alerta el vehiculo se encuentra en arrastre</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tools">
|
||||
<%--<a href="javascript:;" class="collapse" data-original-title="" title=""></a>--%>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body rowpadding">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div id="map">
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAF7s8wwhzCVXDUYopc9mXxqaWB33cDro4&libraries=places"></script>
|
||||
<script src="/Metronic/assets/global/plugins/jquery.pulsate.min.js"></script>
|
||||
<script>
|
||||
var image = '/Imagenes/rsz_11rsz_car.png';
|
||||
var geocoder;
|
||||
var map;
|
||||
@@ -156,45 +156,45 @@
|
||||
var polylinesRoute = [];
|
||||
var directionsDisplayArray = [];
|
||||
if (jQuery('#pulsate-regular')) {
|
||||
jQuery('#pulsate-regular').pulsate({
|
||||
color: "#bf1c56"
|
||||
jQuery('#pulsate-regular').pulsate({
|
||||
color: "#bf1c56"
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
var retorno;
|
||||
function setCenter(myLatLn) {
|
||||
map.setCenter(myLatLn);
|
||||
map.setCenter(myLatLn);
|
||||
}
|
||||
function addmarkerarrastre(myLatLn) {//myLatLn = { lat: -25.363, lng: 131.044 }
|
||||
if (markerArrastre) {
|
||||
markerArrastre.setMap(null);
|
||||
}
|
||||
markerArrastre = new google.maps.Marker({
|
||||
position: myLatLn,
|
||||
map: map,
|
||||
title: 'Activacion Arrastre'
|
||||
});
|
||||
if (markerArrastre) {
|
||||
markerArrastre.setMap(null);
|
||||
}
|
||||
markerArrastre = new google.maps.Marker({
|
||||
position: myLatLn,
|
||||
map: map,
|
||||
title: 'Activacion Arrastre'
|
||||
});
|
||||
}
|
||||
|
||||
function addmarkerActual(myLatLn, Encencido) {//myLatLn = { lat: -25.363, lng: 131.044 } ,addmarkerActual({ lat: -25.363, lng: 131.044 })
|
||||
|
||||
var imagen = Encencido == 1 ? '/Imagenes/rsz_11rsz_cargreen.png' : '/Imagenes/rsz_11rsz_car.png';
|
||||
var markerIcon = { url: imagen, labelOrigin: new google.maps.Point(26, 43) };
|
||||
if (markerActual) {
|
||||
markerActual.setMap(null);
|
||||
}
|
||||
markerActual = new google.maps.Marker({
|
||||
position: myLatLn,
|
||||
map: map,
|
||||
if (markerActual) {
|
||||
markerActual.setMap(null);
|
||||
}
|
||||
markerActual = new google.maps.Marker({
|
||||
position: myLatLn,
|
||||
map: map,
|
||||
title: 'Posición Actual',
|
||||
icon: markerIcon
|
||||
});
|
||||
icon: markerIcon
|
||||
});
|
||||
}
|
||||
function initMap() {
|
||||
map = new google.maps.Map(document.getElementById('map'), {
|
||||
function initMap() {
|
||||
map = new google.maps.Map(document.getElementById('map'), {
|
||||
center: { lat: 29.0628417, lng: -110.9872448 },
|
||||
zoom: 13
|
||||
|
||||
zoom: 13
|
||||
|
||||
});
|
||||
//var ShowDiv1 = document.createElement('div');
|
||||
//var ShowDivControl = new ShowDiv(ShowDiv1, map);
|
||||
@@ -219,25 +219,25 @@
|
||||
|
||||
geocoder = new google.maps.Geocoder();
|
||||
|
||||
//google.maps.event.addListener(map, "click", function (event) {
|
||||
// closeLastOpenedInfoWindow();
|
||||
//google.maps.event.addListener(map, "click", function (event) {
|
||||
// closeLastOpenedInfoWindow();
|
||||
//});
|
||||
|
||||
directionsService = new google.maps.DirectionsService;
|
||||
directionsDisplay = new google.maps.DirectionsRenderer;
|
||||
directionsDisplay.setOptions({ suppressMarkers: true });
|
||||
directionsDisplay.setMap(map);
|
||||
}
|
||||
|
||||
|
||||
function ADSBegin() {
|
||||
eval($('.EvalRun').val());
|
||||
directionsDisplay.setMap(map);
|
||||
}
|
||||
|
||||
|
||||
function ADSBegin() {
|
||||
eval($('.EvalRun').val());
|
||||
}
|
||||
initMap();
|
||||
//$(document).ready(function () {
|
||||
|
||||
// initMap();
|
||||
//});
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
// initMap();
|
||||
//});
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
@@ -1,100 +1,100 @@
|
||||
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;
|
||||
|
||||
public partial class GPS_RepArrastre : ClsPaginas
|
||||
{
|
||||
|
||||
public int CveDispositivo
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["CveDispositivo"] != null)
|
||||
{
|
||||
return ViewState["CveDispositivo"].ToString().ToEntero();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
set { ViewState["CveDispositivo"] = value; }
|
||||
}
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
// fijo borrar
|
||||
//DdlDispositivo.DataSource = get_GlobalDTDispositivosUsuarios(263965, 1928) ;
|
||||
DdlDispositivo.DataSource = get_GlobalDTDispositivosUsuarios(UsuarioActual.CveCliente, UsuarioActual.CveUsuario) ;
|
||||
DdlDispositivo.DataBind();
|
||||
getArrastre();
|
||||
}
|
||||
|
||||
}
|
||||
private void getArrastre()
|
||||
{
|
||||
CveDispositivo = DdlDispositivo.SelectedValue.ToEntero();
|
||||
using (ClsGPS objgps = new ClsGPS())
|
||||
{
|
||||
if (objgps.GPS_ArrastreGET(CveDispositivo) && objgps.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
DataRow dtrow = objgps.DtResultados.Rows[0];
|
||||
upInfo(dtrow);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
public void upInfo(DataRow dtrow)
|
||||
{
|
||||
if ( dtrow != null)
|
||||
{
|
||||
LblVelocidad.Text = $"{dtrow["Speed"]:N0}";
|
||||
LblEncApa.Text = $"{dtrow["EncendidoText"]}";
|
||||
LblFechaInfo.Text = $"{dtrow["FechaTrama"]:dd/MM/yyyy HH:mm:ss}";
|
||||
chkActivarArrastre.Checked = dtrow["ArrastreActivo"].ToString() == "1";
|
||||
pnlAlertaActiva.Visible = dtrow["AlertaArrastre"].ToString() == "1";
|
||||
//LblVelocidad.Text = $"{dtrow[""]}";
|
||||
//LblVelocidad.Text = $"{dtrow[""]}";addmarkerActual({ lat: -25.363, lng: 131.044 })
|
||||
string pVehiculo = string.Format("{{ lat: {0}, lng: {1}}}", dtrow["Lat"], dtrow["Lng"]);
|
||||
string parrastre = string.Format("{{ lat: {0}, lng: {1}}}", dtrow["LatArrastre"], dtrow["LngArrastre"]);
|
||||
TxtFunciones.Text = string.Format("addmarkerActual({0},{3}){1};setCenter({2})", pVehiculo, (dtrow["ArrastreActivo"].ToString() == "1" ? $" ;addmarkerarrastre({parrastre})" : ";addmarkerarrastre()"), (dtrow["ArrastreActivo"].ToString() == "1" ? parrastre : pVehiculo), dtrow["Encendido"].ToString().ToEntero());
|
||||
UpInfo.Update();
|
||||
}
|
||||
}
|
||||
|
||||
protected void BtnConsultar_Click(object sender, EventArgs e)
|
||||
{
|
||||
getArrastre();
|
||||
}
|
||||
|
||||
protected void chkActivarArrastre_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
using (ClsGPS objgps = new ClsGPS())
|
||||
{
|
||||
if (objgps.GPS_ArrastreActivarDesactivar(CveDispositivo, chkActivarArrastre.Checked)){
|
||||
|
||||
if (objgps.GPS_ArrastreGET(CveDispositivo) && objgps.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
DataRow dtrow = objgps.DtResultados.Rows[0];
|
||||
upInfo(dtrow);
|
||||
}
|
||||
if (chkActivarArrastre.Checked)
|
||||
{
|
||||
Alert("se ha activado la funcion de arrastre");
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert("se ha desactivado la funcion de arrastre");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
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;
|
||||
|
||||
public partial class GPS_RepArrastre : ClsPaginas
|
||||
{
|
||||
|
||||
public int CveDispositivo
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["CveDispositivo"] != null)
|
||||
{
|
||||
return ViewState["CveDispositivo"].ToString().ToEntero();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
set { ViewState["CveDispositivo"] = value; }
|
||||
}
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
// fijo borrar
|
||||
//DdlDispositivo.DataSource = get_GlobalDTDispositivosUsuarios(263965, 1928) ;
|
||||
DdlDispositivo.DataSource = get_GlobalDTDispositivosUsuarios(UsuarioActual.CveCliente, UsuarioActual.CveUsuario) ;
|
||||
DdlDispositivo.DataBind();
|
||||
getArrastre();
|
||||
}
|
||||
|
||||
}
|
||||
private void getArrastre()
|
||||
{
|
||||
CveDispositivo = DdlDispositivo.SelectedValue.ToEntero();
|
||||
using (ClsGPS objgps = new ClsGPS())
|
||||
{
|
||||
if (objgps.GPS_ArrastreGET(CveDispositivo) && objgps.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
DataRow dtrow = objgps.DtResultados.Rows[0];
|
||||
upInfo(dtrow);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
public void upInfo(DataRow dtrow)
|
||||
{
|
||||
if ( dtrow != null)
|
||||
{
|
||||
LblVelocidad.Text = $"{dtrow["Speed"]:N0}";
|
||||
LblEncApa.Text = $"{dtrow["EncendidoText"]}";
|
||||
LblFechaInfo.Text = $"{dtrow["FechaTrama"]:dd/MM/yyyy HH:mm:ss}";
|
||||
chkActivarArrastre.Checked = dtrow["ArrastreActivo"].ToString() == "1";
|
||||
pnlAlertaActiva.Visible = dtrow["AlertaArrastre"].ToString() == "1";
|
||||
//LblVelocidad.Text = $"{dtrow[""]}";
|
||||
//LblVelocidad.Text = $"{dtrow[""]}";addmarkerActual({ lat: -25.363, lng: 131.044 })
|
||||
string pVehiculo = string.Format("{{ lat: {0}, lng: {1}}}", dtrow["Lat"], dtrow["Lng"]);
|
||||
string parrastre = string.Format("{{ lat: {0}, lng: {1}}}", dtrow["LatArrastre"], dtrow["LngArrastre"]);
|
||||
TxtFunciones.Text = string.Format("addmarkerActual({0},{3}){1};setCenter({2})", pVehiculo, (dtrow["ArrastreActivo"].ToString() == "1" ? $" ;addmarkerarrastre({parrastre})" : ";addmarkerarrastre()"), (dtrow["ArrastreActivo"].ToString() == "1" ? parrastre : pVehiculo), dtrow["Encendido"].ToString().ToEntero());
|
||||
UpInfo.Update();
|
||||
}
|
||||
}
|
||||
|
||||
protected void BtnConsultar_Click(object sender, EventArgs e)
|
||||
{
|
||||
getArrastre();
|
||||
}
|
||||
|
||||
protected void chkActivarArrastre_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
using (ClsGPS objgps = new ClsGPS())
|
||||
{
|
||||
if (objgps.GPS_ArrastreActivarDesactivar(CveDispositivo, chkActivarArrastre.Checked)){
|
||||
|
||||
if (objgps.GPS_ArrastreGET(CveDispositivo) && objgps.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
DataRow dtrow = objgps.DtResultados.Rows[0];
|
||||
upInfo(dtrow);
|
||||
}
|
||||
if (chkActivarArrastre.Checked)
|
||||
{
|
||||
Alert("se ha activado la funcion de arrastre");
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert("se ha desactivado la funcion de arrastre");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
16
Global.asax
16
Global.asax
@@ -449,14 +449,14 @@
|
||||
|
||||
Dim ObjContratos As New ClsContratos
|
||||
If ObjContratos.GetContratos(-1, -1) Then Application("GlobalDTContratos") = ObjContratos.DtResultados Else Application("GlobalDTContratos") = Nothing
|
||||
If ObjContratos.GetSecciones() Then Application("GlobalDTContratosSecciones") = ObjContratos.DtResultados Else Application("GlobalDTContratosSecciones") = Nothing
|
||||
If ObjContratos.GetContratosTipos() Then Application("GlobalDTContratosTipos") = ObjContratos.DtResultados Else Application("GlobalDTContratosTipos") = Nothing
|
||||
ObjContratos.Dispose()
|
||||
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
'V E N D E D O R E S
|
||||
|
||||
If ObjContratos.GetSecciones() Then Application("GlobalDTContratosSecciones") = ObjContratos.DtResultados Else Application("GlobalDTContratosSecciones") = Nothing
|
||||
'If ObjContratos.GetContratosTipos(-1) Then Application("GlobalDTContratosTipos") = ObjContratos.DtResultados Else Application("GlobalDTContratosTipos") = Nothing
|
||||
ObjContratos.Dispose()
|
||||
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
'V E N D E D O R E S
|
||||
|
||||
Dim ObjVendedores As New ClsVtaVendedores
|
||||
If ObjVendedores.GetVendedores(-1) Then Application("GlobalDTVendedores") = ObjVendedores.DtResultados Else Application("GlobalDTVendedores") = Nothing
|
||||
ObjVendedores.Dispose()
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
</div>
|
||||
<div class="caption uppercase" style="position: relative;">
|
||||
<i class="fa fa-info-circle"></i>información del movimiento
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style='display:none;'")%>>
|
||||
@@ -79,29 +80,32 @@
|
||||
<div class="row" id="DivPersonal" runat="server">
|
||||
<label class="col-md-4 truncate" style="max-width: 155px">
|
||||
Personal/Responsable:
|
||||
|
||||
</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlPersonal" CssClass="form-control select2me" Width="100%" runat="server" DataTextField="NombreCompletoNombre" DataValueField="CvePersonal"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator InitialValue="-1" ID="RFVPersonal" Display="None" ValidationGroup="GrpGuardar" runat="server" ControlToValidate="DdlPersonal" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Es campo <b>''Personal/Responsable''</b> es necesario, por favor seleccione uno."></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEPersonal" runat="server" HighlightCssClass="vco" TargetControlID="RFVPersonal" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ADS:Dropdownlost runat="server" ID="DdlPersonal" CssStyle="width: 100%;" DataTextField="NombreCompletoNombre" DataValueField="CvePersonal" IncluyeTodos="false"></ADS:Dropdownlost>
|
||||
<%--<asp:RequiredFieldValidator InitialValue="-1" ID="RFVPersonal" Display="None" ValidationGroup="GrpGuardar" runat="server" ControlToValidate="DdlPersonal" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Es campo <b>''Personal/Responsable''</b> es necesario, por favor seleccione uno."></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEPersonal" runat="server" HighlightCssClass="vco" TargetControlID="RFVPersonal" Width="350px"></ajax:ValidatorCalloutExtender>--%>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id="DivCliente" visible="false" runat="server">
|
||||
<label class="col-md-4 truncate" style="max-width: 155px">
|
||||
Cliente:
|
||||
|
||||
</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlCliente" CssClass="form-control select2me" Width="100%" runat="server" DataTextField="Nombre" DataValueField="CveCliente"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator InitialValue="-1" ID="RFVCliente" Display="None" ValidationGroup="GrpGuardar" runat="server" ControlToValidate="DdlCliente" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Es campo <b>''Cliente''</b> es necesario, por favor seleccione uno."></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOCliente" runat="server" HighlightCssClass="vco" TargetControlID="RFVCliente" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ADS:Dropdownlost runat="server" ID="DdlCliente" CssStyle="width: 100%;" DataTextField="Nombre" DataValueField="CveCliente" IncluyeTodos="false"></ADS:Dropdownlost>
|
||||
<%--<asp:RequiredFieldValidator InitialValue="-1" ID="RFVCliente" Display="None" ValidationGroup="GrpGuardar" runat="server" ControlToValidate="DdlCliente" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Es campo <b>''Cliente''</b> es necesario, por favor seleccione uno."></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOCliente" runat="server" HighlightCssClass="vco" TargetControlID="RFVCliente" Width="350px"></ajax:ValidatorCalloutExtender>--%>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id="DivProveedor" visible="false" runat="server">
|
||||
<label class="col-md-4 truncate" style="max-width: 155px">
|
||||
Proveedor:
|
||||
|
||||
</label>
|
||||
<div class="col-md-8">
|
||||
<ADS:Dropdownlost ID="DdlProveedor" runat="server" CssStyle="width: 100%;" DataTextField="RazonSocial" DataValueField="CveProveedor"></ADS:Dropdownlost>
|
||||
<ADS:Dropdownlost ID="DdlProveedor" runat="server" CssStyle="width: 100%;" DataTextField="RazonSocial" DataValueField="CveProveedor" IncluyeTodos="false"></ADS:Dropdownlost>
|
||||
<%--<asp:RequiredFieldValidator InitialValue="-1" ID="RFVProveedor" Display="None" ValidationGroup="GrpGuardar" runat="server" ControlToValidate="DdlProveedor" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Es campo <b>''Proveedor''</b> es necesario, por favor seleccione uno."></asp:RequiredFieldValidator>--%>
|
||||
<%--<ajax:ValidatorCalloutExtender ID="VCOProveedor" runat="server" HighlightCssClass="vco" TargetControlID="RFVProveedor" Width="350px"></ajax:ValidatorCalloutExtender>--%>
|
||||
</div>
|
||||
@@ -164,6 +168,7 @@
|
||||
<div class="row">
|
||||
<label class="col-md-4 truncate" style="max-width: 155px">
|
||||
Observaciones
|
||||
|
||||
</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtObservaciones" TextMode="MultiLine" Rows="2" CssClass="form-control input-sm" runat="server" MaxLength="200"></asp:TextBox>
|
||||
@@ -306,7 +311,7 @@
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle magindate">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnVerificarExistencias" runat="server" Text="Verificar Existencias" OnClick="BtnVerificarExistencias_Click" ValidationGroup="GrpVerificarExistencias" class="btn btn-default" />
|
||||
<asp:Button ID="BtnVerificarExistencias" runat="server" Text="Consultar" OnClick="BtnVerificarExistencias_Click" ValidationGroup="GrpVerificarExistencias" class="btn btn-default" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
@@ -326,45 +331,48 @@
|
||||
<asp:RequiredFieldValidator InitialValue="-1" ID="RFVTipo" Display="None" ValidationGroup="GrpVerificarExistencias" runat="server" ControlToValidate="DdlTipo" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Es campo <b>''Tipo''</b> es necesario, por favor seleccione uno."></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOTipo" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipo" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-1" style="max-width: 100px">Fecha</div>
|
||||
<div class="col-md-2">
|
||||
<div style="display: inline-block; vertical-align: text-bottom;">
|
||||
<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="TxtFechaLiberacion" runat="server" CssClass="form-control" CausesValidation="true" Style="width: 118px" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgFechaLiberacion" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaLiberacion" runat="server" TargetControlID="TxtFechaLiberacion" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaLiberacion" TargetControlID="TxtFechaLiberacion" PopupButtonID="ImgFechaLiberacion" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaLiberacion" runat="server" ControlToValidate="TxtFechaLiberacion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaLiberacion''</b> es necesario, por favor ingréselo." ValidationGroup="GrpVerificarExistencias"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFechaLiberacion" runat="server" ControlToValidate="TxtFechaLiberacion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaLiberacion''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpVerificarExistencias"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaLiberacion1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaLiberacion" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaLiberacion2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaLiberacion" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2" id="DivPersonalLiberacion" runat="server" style="max-width: 155px">Personal/Responsable</div>
|
||||
<div class="col-md-2" id="DivPersonalLiberacion2" runat="server">
|
||||
<ADS:Dropdownlost ID="DdlPersonalLiberacion" runat="server" CssStyle="width: 100%;" Width="100%" DataTextField="NombreCompletoNombre" DataValueField="CvePersonal" IncluyeTodos="false"></ADS:Dropdownlost>
|
||||
<%--<asp:DropDownList ID="DdlPersonalLiberacion" CssClass="form-control select2me" Width="100%" runat="server" DataTextField="NombreCompletoNombre" DataValueField="CvePersonal"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator InitialValue="-1" ID="RFVPersonalLiberacion" Display="None" ValidationGroup="GrpVerificarExistencias" runat="server" ControlToValidate="DdlPersonalLiberacion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Es campo <b>''Personal/Responsable''</b> es necesario, por favor seleccione uno."></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEPersonalLiberacion" runat="server" HighlightCssClass="vco" TargetControlID="RFVPersonalLiberacion" Width="350px"></ajax:ValidatorCalloutExtender>--%>
|
||||
</div>
|
||||
<div class="col-md-2" style="max-width: 155px" id="DivClienteLiberacion" runat="server" visible="false">Cliente</div>
|
||||
<div class="col-md-2" id="DivClienteLiberacion2" runat="server" visible="false">
|
||||
<ADS:Dropdownlost ID="DdlClienteLiberacion" runat="server" CssStyle="width: 100%;" Width="100%" DataTextField="Nombre" DataValueField="CveCliente" IncluyeTodos="false"></ADS:Dropdownlost>
|
||||
<%--<asp:DropDownList ID="DdlClienteLiberacion" CssClass="form-control select2me" Width="100%" runat="server" DataTextField="Nombre" DataValueField="CveCliente"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator InitialValue="-1" ID="RFVClienteLiberacion" Display="None" ValidationGroup="GrpVerificarExistencias" runat="server" ControlToValidate="DdlClienteLiberacion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Es campo <b>''Cliente''</b> es necesario, por favor seleccione uno."></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOClienteLiberacion" runat="server" HighlightCssClass="vco" TargetControlID="RFVClienteLiberacion" Width="350px"></ajax:ValidatorCalloutExtender>--%>
|
||||
</div>
|
||||
<div class="col-md-2" style="max-width: 155px" id="DivProveedorLiberacion" runat="server" visible="false">Proveedor</div>
|
||||
<div class="col-md-2" id="DivProveedorLiberacion2" runat="server" visible="false">
|
||||
<ADS:Dropdownlost ID="DdlProveedorLiberacion" runat="server" CssStyle="width: 100%;" Width="100%" DataTextField="RazonSocial" DataValueField="CveProveedor" IncluyeTodos="false"></ADS:Dropdownlost>
|
||||
<%--<asp:RequiredFieldValidator InitialValue="-1" ID="RFVProveedorLiberacion" Display="None" ValidationGroup="GrpVerificarExistencias" runat="server" ControlToValidate="DdlProveedorLiberacion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Es campo <b>''Proveedor''</b> es necesario, por favor seleccione uno."></asp:RequiredFieldValidator>--%>
|
||||
<%--<ajax:ValidatorCalloutExtender ID="VCOProveedorLiberacion" runat="server" HighlightCssClass="vco" TargetControlID="RFVProveedorLiberacion" Width="350px"></ajax:ValidatorCalloutExtender>--%>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<div class="row">
|
||||
<div class="col-md-2" id="DivPersonalLiberacion" runat="server" style="max-width: 155px">Personal/Responsable</div>
|
||||
<div class="col-md-2" id="DivPersonalLiberacion2" runat="server">
|
||||
<asp:DropDownList ID="DdlPersonalLiberacion" CssClass="form-control select2me" Width="100%" runat="server" DataTextField="NombreCompletoNombre" DataValueField="CvePersonal"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator InitialValue="-1" ID="RFVPersonalLiberacion" Display="None" ValidationGroup="GrpVerificarExistencias" runat="server" ControlToValidate="DdlPersonalLiberacion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Es campo <b>''Personal/Responsable''</b> es necesario, por favor seleccione uno."></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEPersonalLiberacion" runat="server" HighlightCssClass="vco" TargetControlID="RFVPersonalLiberacion" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-2" style="max-width: 155px" id="DivClienteLiberacion" runat="server" visible="false">Cliente</div>
|
||||
<div class="col-md-2" id="DivClienteLiberacion2" runat="server" visible="false">
|
||||
<asp:DropDownList ID="DdlClienteLiberacion" CssClass="form-control select2me" Width="100%" runat="server" DataTextField="Nombre" DataValueField="CveCliente"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator InitialValue="-1" ID="RFVClienteLiberacion" Display="None" ValidationGroup="GrpVerificarExistencias" runat="server" ControlToValidate="DdlClienteLiberacion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Es campo <b>''Cliente''</b> es necesario, por favor seleccione uno."></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOClienteLiberacion" runat="server" HighlightCssClass="vco" TargetControlID="RFVClienteLiberacion" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-2" style="max-width: 155px" id="DivProveedorLiberacion" runat="server" visible="false">Proveedor</div>
|
||||
<div class="col-md-2" id="DivProveedorLiberacion2" runat="server" visible="false">
|
||||
<ADS:Dropdownlost ID="DdlProveedorLiberacion" runat="server" CssStyle="width: 100%;" DataTextField="RazonSocial" DataValueField="CveProveedor"></ADS:Dropdownlost>
|
||||
<%--<asp:RequiredFieldValidator InitialValue="-1" ID="RFVProveedorLiberacion" Display="None" ValidationGroup="GrpVerificarExistencias" runat="server" ControlToValidate="DdlProveedorLiberacion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Es campo <b>''Proveedor''</b> es necesario, por favor seleccione uno."></asp:RequiredFieldValidator>--%>
|
||||
<%--<ajax:ValidatorCalloutExtender ID="VCOProveedorLiberacion" runat="server" HighlightCssClass="vco" TargetControlID="RFVProveedorLiberacion" Width="350px"></ajax:ValidatorCalloutExtender>--%>
|
||||
<div class="col-md-1" style="max-width: 100px">Fecha</div>
|
||||
<div class="col-md-2">
|
||||
<div style="display: inline-block; vertical-align: text-bottom;">
|
||||
<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="TxtFechaLiberacion" runat="server" CssClass="form-control" CausesValidation="true" Style="width: 118px" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgFechaLiberacion" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaLiberacion" runat="server" TargetControlID="TxtFechaLiberacion" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaLiberacion" TargetControlID="TxtFechaLiberacion" PopupButtonID="ImgFechaLiberacion" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaLiberacion" runat="server" ControlToValidate="TxtFechaLiberacion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaLiberacion''</b> es necesario, por favor ingréselo." ValidationGroup="GrpVerificarExistencias"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFechaLiberacion" runat="server" ControlToValidate="TxtFechaLiberacion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaLiberacion''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpVerificarExistencias"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaLiberacion1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaLiberacion" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaLiberacion2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaLiberacion" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -387,6 +395,7 @@
|
||||
</div>
|
||||
<div class="caption uppercase" style="position: relative;">
|
||||
<i class="fa fa-info-circle"></i>información del movimiento
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style='display:none;'")%>>
|
||||
@@ -423,6 +432,7 @@
|
||||
<div class="row">
|
||||
<label class="col-md-4 truncate" style="max-width: 155px">
|
||||
Observaciones
|
||||
|
||||
</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtObservacionesLiberacion" TextMode="MultiLine" Rows="2" CssClass="form-control input-sm" runat="server" MaxLength="200"></asp:TextBox>
|
||||
|
||||
@@ -4,8 +4,8 @@ Option Strict On
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Partial Class Inventarios_ResguardoMaterial
|
||||
Inherits ClsPaginas
|
||||
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "Propiedades"
|
||||
Public Property DtMovimientos() As DataTable
|
||||
Get
|
||||
@@ -122,12 +122,12 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
Set(value As Integer)
|
||||
ViewState("TipoSeccionAlmacen") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
|
||||
@@ -156,11 +156,11 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
|
||||
Private Sub OcultarControles(CvePersonal As Integer)
|
||||
|
||||
DdlPersonal.SelectedValueExist(CvePersonal)
|
||||
DdlPersonal.ddl.SelectedValueExist(CvePersonal)
|
||||
DdlPersonal.Enabled = False
|
||||
DVTipo.Visible = False
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#Region " INICIALIZA VALORES "
|
||||
Private Sub InicializaValores()
|
||||
CreaDT()
|
||||
@@ -213,21 +213,25 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
End Sub
|
||||
Private Sub CargaCombos()
|
||||
|
||||
DdlPersonal.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa)
|
||||
DdlPersonal.DataBind()
|
||||
DdlPersonal.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlPersonal.setEsWebService(True)
|
||||
DdlPersonal.Attributes.Add("data-metodo", "getpersonal")
|
||||
DdlPersonal.SelectedValue = "-1"
|
||||
DdlPersonal.SelectedText = "Seleccione"
|
||||
|
||||
DdlPersonalLiberacion.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa)
|
||||
DdlPersonalLiberacion.DataBind()
|
||||
DdlPersonalLiberacion.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlPersonalLiberacion.setEsWebService(True)
|
||||
DdlPersonalLiberacion.Attributes.Add("data-metodo", "getpersonal")
|
||||
DdlPersonalLiberacion.SelectedValue = "-1"
|
||||
DdlPersonalLiberacion.SelectedText = "Seleccione"
|
||||
|
||||
DdlCliente.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa)
|
||||
DdlCliente.DataBind()
|
||||
DdlCliente.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlCliente.setEsWebService(True)
|
||||
DdlCliente.Attributes.Add("data-metodo", "getcliente")
|
||||
DdlCliente.SelectedValue = "-1"
|
||||
DdlCliente.SelectedText = "Seleccione"
|
||||
|
||||
DdlClienteLiberacion.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa)
|
||||
DdlClienteLiberacion.DataBind()
|
||||
DdlClienteLiberacion.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlClienteLiberacion.setEsWebService(True)
|
||||
DdlClienteLiberacion.Attributes.Add("data-metodo", "getcliente")
|
||||
DdlClienteLiberacion.SelectedValue = "-1"
|
||||
DdlClienteLiberacion.SelectedText = "Seleccione"
|
||||
|
||||
DdlProveedor.setEsWebService(True)
|
||||
DdlProveedor.Attributes.Add("data-metodo", "getproveedores")
|
||||
@@ -304,14 +308,14 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
End Sub
|
||||
Private Function isWhitFamily() As Boolean
|
||||
Return (UsuarioActual.CveEmpresa = 66)
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " RESGUARDO "
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " FUNCIONALIDAD 105 - CLASIFICACION PS"
|
||||
Protected Sub DdlClasificacion_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlClasificacion.SelectedIndexChanged
|
||||
CargaProductosPorClasificacion()
|
||||
@@ -371,21 +375,21 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
DdlUnidad.DataBind()
|
||||
UPDatos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " EISTENCIAS "
|
||||
Private Function GetExistencias(CvePS As Integer, CveUnidadMedida As Integer, CveEmpresa As Integer, CveAlmacen As Integer, Optional SerieLote As String = "-1") As Double
|
||||
Dim Inv As New ClsInventarios
|
||||
Dim Existencia As Double = Inv.GetExistenciasPS(CvePS, CveUnidadMedida, CveEmpresa, CveAlmacen, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), SerieLote:=SerieLote)
|
||||
Inv.Dispose()
|
||||
Return Existencia
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " AGREGAR "
|
||||
Protected Sub btnAgregar_Click(sender As Object, e As EventArgs) Handles LbAgregar.Click
|
||||
AgregaProducto()
|
||||
@@ -443,10 +447,10 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
DdlClasificacion.SelectedValue = "-1"
|
||||
txtCantidad.Text = ""
|
||||
TxtObservacionesdetalle.Text = ""
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " GvM "
|
||||
Private Sub CargaGvM()
|
||||
|
||||
@@ -483,10 +487,10 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
e.Row.FCLinkButton("lnkRemove").ToolTip = "Cuenta con sección almacen"
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " NUEVO "
|
||||
Protected Sub BtnNuevo_Click(sender As Object, e As EventArgs)
|
||||
LimpiarMovimiento()
|
||||
@@ -503,20 +507,20 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
|
||||
TxtObservaciones.Text = ""
|
||||
TxtFecha.Text = Now.ToShortDateString
|
||||
DdlPersonal.SelectedIndex = 0
|
||||
DdlPersonal.ddl.SelectedIndex = 0
|
||||
LimpiarAgregar()
|
||||
UPDatos.Update()
|
||||
UpGenerales.Update()
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " LIBERACION "
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " GV DATOS LIBERACION "
|
||||
Protected Sub GvMLiberacion_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
@@ -529,12 +533,12 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
Dim Index = e.Row.RowIndex
|
||||
e.Row.FCTextBox("TxtCantidad").Attributes.Add("onKeyUp", String.Format("ValidarCantidad({0});", Index))
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " CARGA RESGUARDOS PARA LIBERACION "
|
||||
|
||||
|
||||
Protected Sub BtnVerificarExistencias_Click(sender As Object, e As EventArgs)
|
||||
If Not DdlProveedorLiberacion.SelectedValue.ToEntero > 0 AndAlso DdlTipo.SelectedValue.ToEntero = 3 Then
|
||||
Alert("Tiene que seleccionar un proveedor.", TipoMensaje.MsgAdvertencia)
|
||||
@@ -572,7 +576,7 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
CargaGvMLiberacion()
|
||||
If DdlPersonalLiberacion.SelectedValue.ToEntero <> -1 Then
|
||||
LblTipo.InnerText = "Personal/Responsable:"
|
||||
LbTipoLiberacion.Text = DdlPersonalLiberacion.SelectedItem.Text
|
||||
LbTipoLiberacion.Text = DdlPersonalLiberacion.SelectedText
|
||||
End If
|
||||
If DdlProveedorLiberacion.SelectedValue.ToEntero <> -1 Then
|
||||
LblTipo.InnerText = "Proveedor:"
|
||||
@@ -580,7 +584,7 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
End If
|
||||
If DdlClienteLiberacion.SelectedValue.ToEntero <> -1 Then
|
||||
LblTipo.InnerText = "Cliente:"
|
||||
LbTipoLiberacion.Text = DdlClienteLiberacion.SelectedItem.Text
|
||||
LbTipoLiberacion.Text = DdlClienteLiberacion.SelectedText
|
||||
End If
|
||||
CvePersonalLiberacion = DdlPersonalLiberacion.SelectedValue.ToEntero
|
||||
CveClienteLiberacion = DdlClienteLiberacion.SelectedValue.ToEntero
|
||||
@@ -613,10 +617,10 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
GvMLiberacion.DataSource = DtMovimientosLiberacion
|
||||
GvMLiberacion.DataBind()
|
||||
UpGridLiberacion.Update()
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " LIMPIAR LIBERACION "
|
||||
Private Sub LimpiarLiberacion()
|
||||
LbTipoLiberacion.Text = ""
|
||||
@@ -638,14 +642,14 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
CargaGvMLiberacion()
|
||||
|
||||
UpGeneralesLibreacion.Update()
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " GUARDAR "
|
||||
Protected Sub BtnGuardarResguardo_Click(sender As Object, e As EventArgs) Handles BtnGuardarResguardo.Click
|
||||
|
||||
@@ -963,17 +967,26 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
DivCliente.Visible = False
|
||||
DivPersonal.Visible = False
|
||||
DivProveedor.Visible = False
|
||||
If RbTipoCliente.Checked Then DivCliente.Visible = True
|
||||
If RbTipoPersonal.Checked Then DivPersonal.Visible = True
|
||||
If RbTipoProveedor.Checked Then DivProveedor.Visible = True
|
||||
If RbTipoCliente.Checked Then
|
||||
DivCliente.Visible = True
|
||||
'DdlPersonal.Attributes.Add("data-metodo", "getcliente")
|
||||
End If
|
||||
If RbTipoPersonal.Checked Then
|
||||
DivPersonal.Visible = True
|
||||
'DdlPersonal.Attributes.Add("data-metodo", "getpersonal")
|
||||
End If
|
||||
If RbTipoProveedor.Checked Then
|
||||
DivProveedor.Visible = True
|
||||
'DdlPersonal.Attributes.Add("data-metodo", "getproveedores")
|
||||
End If
|
||||
UpGenerales.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlTipo_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
DdlPersonalLiberacion.SelectedIndex = 0
|
||||
DdlProveedorLiberacion.SelectedValue = "-1"
|
||||
DdlProveedorLiberacion.SelectedText = "Seleccione"
|
||||
DdlClienteLiberacion.SelectedIndex = 0
|
||||
'DdlPersonalLiberacion.ddl.SelectedIndex = 0
|
||||
'DdlProveedorLiberacion.SelectedValue = "-1"
|
||||
'DdlProveedorLiberacion.SelectedText = "Seleccione"
|
||||
'DdlClienteLiberacion.SelectedValue = "0"
|
||||
DivPersonalLiberacion.Visible = False
|
||||
DivPersonalLiberacion2.Visible = False
|
||||
DivClienteLiberacion.Visible = False
|
||||
@@ -993,10 +1006,10 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
DivProveedorLiberacion2.Visible = True
|
||||
End If
|
||||
UpFiltraLiberacion.Update()
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "SECCION ALMACEN"
|
||||
Private Sub CreaDtSeccionAlmacen()
|
||||
DtSeccionAlmacen = New DataTable
|
||||
@@ -1100,9 +1113,9 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
DdlAlmacen.Enabled = True
|
||||
DdlAlmacen.ToolTip = ""
|
||||
End If
|
||||
UpGenerales.Update()
|
||||
|
||||
ElseIf TipoSeccionAlmacen = 2 Then
|
||||
UpGenerales.Update()
|
||||
|
||||
ElseIf TipoSeccionAlmacen = 2 Then
|
||||
If CantidadTotalSeccion > 0 Then
|
||||
GvMLiberacion.Rows(IndexSeccionAlmacen).FCTextBox("TxtCantidad").Enabled = False
|
||||
GvMLiberacion.Rows(IndexSeccionAlmacen).FCTextBox("TxtCantidad").ToolTip = "Cuenta con sección almacen"
|
||||
@@ -1172,32 +1185,32 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
DtSeccionAlmacen.Rows.RemoveAt(Index)
|
||||
DtSeccionAlmacen.AcceptChanges()
|
||||
CargaSeccionAlmacen()
|
||||
End Sub
|
||||
|
||||
'Protected Sub LnkVerSecciones_Click(sender As Object, e As EventArgs)
|
||||
' If Not CveVentaSurtir > 0 Then
|
||||
' Alert("Tiene que seleccionar la venta a surtir", TipoMensaje.MsgAdvertencia)
|
||||
' Exit Sub
|
||||
' End If
|
||||
|
||||
' If Not DdlAlmacen.SelectedValue.ToEntero > 0 Then
|
||||
' Alert("Tiene que seleccionar el almacen", TipoMensaje.MsgAdvertencia)
|
||||
' Exit Sub
|
||||
' End If
|
||||
|
||||
' Dim ObjInv As New ClsInventarios
|
||||
' If ObjInv.GetExistenciaSeccionAlmacen(CveVentaSurtir, DdlAlmacen.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
' GvVerSeccionesAlmacen.DataSource = ObjInv.DtResultados
|
||||
' End If
|
||||
' ObjInv.Dispose()
|
||||
' GvVerSeccionesAlmacen.DataBind()
|
||||
' UpVerSeccionesAlmacen.Update()
|
||||
' RegistraScript("$('#ModalVerSeccionesAlmacen').modal()")
|
||||
'End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
'Protected Sub LnkVerSecciones_Click(sender As Object, e As EventArgs)
|
||||
' If Not CveVentaSurtir > 0 Then
|
||||
' Alert("Tiene que seleccionar la venta a surtir", TipoMensaje.MsgAdvertencia)
|
||||
' Exit Sub
|
||||
' End If
|
||||
|
||||
' If Not DdlAlmacen.SelectedValue.ToEntero > 0 Then
|
||||
' Alert("Tiene que seleccionar el almacen", TipoMensaje.MsgAdvertencia)
|
||||
' Exit Sub
|
||||
' End If
|
||||
|
||||
' Dim ObjInv As New ClsInventarios
|
||||
' If ObjInv.GetExistenciaSeccionAlmacen(CveVentaSurtir, DdlAlmacen.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
' GvVerSeccionesAlmacen.DataSource = ObjInv.DtResultados
|
||||
' End If
|
||||
' ObjInv.Dispose()
|
||||
' GvVerSeccionesAlmacen.DataBind()
|
||||
' UpVerSeccionesAlmacen.Update()
|
||||
' RegistraScript("$('#ModalVerSeccionesAlmacen').modal()")
|
||||
'End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -422,7 +422,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
SiguienteFolio(If(ChkTransitorio.Checked, 9, 8))
|
||||
|
||||
'DdlProducto.DataBind()
|
||||
|
||||
CargarCamiones()
|
||||
End Sub
|
||||
Private Sub CargaAlmacenOrigen()
|
||||
DdlAlmacenOrigen.Enabled = True
|
||||
@@ -2779,4 +2779,22 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Return dataTable
|
||||
End Function
|
||||
|
||||
Public Sub CargarCamiones()
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
If ObjInventarios.GetCamiones(-1, UsuarioActual.CveEmpresa) AndAlso ObjInventarios.DtResultados.Rows.Count > 0 Then
|
||||
DdlUnidadCamion.DataSource = ObjInventarios.DtResultados
|
||||
End If
|
||||
ObjInventarios.Dispose()
|
||||
DdlUnidadCamion.DataBind()
|
||||
End Sub
|
||||
Public Sub BtnAgregarCamion_Click(sender As Object, e As EventArgs) Handles BtnAgregarCamion.Click
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
If ObjInventarios.AddCamiones(TxtPlacaNuevo.Text, TxtEspecificacionNuevo.Text, UsuarioActual.CveEmpresa) Then
|
||||
RegistraScript("$('#DivAgregarNuevoCamion').modal('hide');")
|
||||
CargarCamiones()
|
||||
TxtPlacaNuevo.Text = ""
|
||||
TxtEspecificacionNuevo.Text = ""
|
||||
End If
|
||||
ObjInventarios.Dispose()
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -1337,14 +1337,14 @@ Partial Class OC
|
||||
ChkCotizacion.Visible = True
|
||||
DdlProveedores.SelectedValue = objOC.CveProveedor.ToString
|
||||
If DdlProveedores.SelectedValue.ToEntero > 0 Then
|
||||
DdlProveedores.SelectedText = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltraParametros($"CveProveedor = {objOC.CveProveedor}").Rows(0)("RazonSocial").ToString
|
||||
DdlProveedores.SelectedText = GlobalDTCompProveedores(CveEmpresaActual).FiltraParametros($"CveProveedor = {objOC.CveProveedor}").Rows(0)("RazonSocial").ToString
|
||||
Else
|
||||
DdlProveedores.SelectedText = "-"
|
||||
End If
|
||||
|
||||
If objOC.CveProveedorSucursal.ToEntero > 0 Then
|
||||
DivProveedorSucursal.Visible = True
|
||||
DdlProveedorSucursal.DataSource = GlobalDTProveedorSucursales(objOC.CveProveedor, UsuarioActual.CveEmpresa)
|
||||
DdlProveedorSucursal.DataSource = GlobalDTProveedorSucursales(objOC.CveProveedor, CveEmpresaActual)
|
||||
DdlProveedorSucursal.DataBind()
|
||||
DdlProveedorSucursal.SelectedValueExist(objOC.CveProveedorSucursal.ToString)
|
||||
End If
|
||||
|
||||
@@ -1894,22 +1894,22 @@ Partial Class Clientes
|
||||
|
||||
Protected Sub BtnVerMasBancos_Click(sender As Object, e As EventArgs)
|
||||
If BtnVerMasBancos.Text = "Ver Más" Then
|
||||
CargaBancos(-1)
|
||||
CargaBancos(1000000)
|
||||
BtnVerMasBancos.Text = "Ver Menos"
|
||||
Else
|
||||
CargaBancos(11)
|
||||
CargaBancos(51)
|
||||
BtnVerMasBancos.Text = "Ver Más"
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "B A N C O S"
|
||||
'CuentasxCobrar Activas (Pagos Recibidos)
|
||||
Private Sub CargaBancos(Optional SelectTop As Integer = 11, Optional CveClienteSucursal As Integer = -1)
|
||||
'CuentasxCobrar Activas (Pagos Recibidos)
|
||||
Private Sub CargaBancos(Optional SelectTop As Integer = 51, Optional CveClienteSucursal As Integer = -1)
|
||||
Dim ObjMovtos As New ClsMovimientos()
|
||||
'CxC Activas
|
||||
If ObjMovtos.GetClienteAbonos(CveCliente, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero) AndAlso ObjMovtos.DtResultados.Rows.Count > 0 Then
|
||||
If ObjMovtos.GetClienteAbonos(CveCliente, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero, SelectTop:=SelectTop) AndAlso ObjMovtos.DtResultados.Rows.Count > 0 Then
|
||||
GvBancos.DataSource = ObjMovtos.DtResultados
|
||||
DTCobrosRealizados = ObjMovtos.DtResultados
|
||||
DTCobrosRealizados.Rows.Remove(DTCobrosRealizados.Rows(0))
|
||||
@@ -9201,7 +9201,7 @@ Partial Class Clientes
|
||||
Dim Serie As String = ""
|
||||
|
||||
If FolioNotaCredito(Tipo) Then
|
||||
Folio = -1
|
||||
Folio = FolioNotaAcumulador
|
||||
Serie = SerieNotaAcumulador
|
||||
End If
|
||||
|
||||
@@ -9220,8 +9220,8 @@ Partial Class Clientes
|
||||
ObjFactura.TipoDocto = "RNC"
|
||||
|
||||
ObjFactura.Folio = Folio
|
||||
|
||||
ObjFactura.Serie = Serie
|
||||
|
||||
ObjFactura.Fecha = Now
|
||||
ObjFactura.CvePrePoliza = -1
|
||||
ObjFactura.CveMetodoPago = DdlMetodoPago.SelectedValue.ToEntero
|
||||
|
||||
@@ -3,9 +3,9 @@ Imports System.Data
|
||||
Imports System.Linq
|
||||
|
||||
Partial Class Ventas_ClientesAbonar
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
#Region "Propiedades"
|
||||
Private ReadOnly Property CveCliente As Integer
|
||||
Get
|
||||
@@ -273,9 +273,9 @@ Partial Class Ventas_ClientesAbonar
|
||||
Set(value As Date)
|
||||
ViewState("Fecha") = value
|
||||
End Set
|
||||
End Property
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
CveMonedaPago = -1
|
||||
@@ -641,8 +641,10 @@ Partial Class Ventas_ClientesAbonar
|
||||
e.Row.FCRangeValidator("RVComision").MaximumValue = e.Row.DBCampo("Saldo")
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("DescuentoProntoPago").ToDecimal() >= 0 Then
|
||||
If e.Row.DBCampo("DescuentoProntoPago").ToDecimal() > 0 Then
|
||||
e.Row.FCCheckBox("ChkGenerarNC").Visible = True
|
||||
e.Row.FCCheckBox("ChkGenerarNC").Attributes.Add("onclick", String.Format("FnSuma(this,{0},{1}); FnCambia({2},this,{1},0,{3},{4});", e.Row.FCTextBox("TxtAbonar").ClientID, e.Row.DBCampo("Saldo").ToDecimal - e.Row.DBCampo("DescuentoProntoPago").ToDecimal, e.Row.FCCheckBox("ChkGenerarNC").ClientID, CveMonedaFiltro, moneda))
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
@@ -1876,12 +1878,12 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
Dim DtVentasNC = InicializaDTVentasNC()
|
||||
|
||||
Dim TotalImporte As Decimal = ObjFacturaDevolucion.DtDetalle.SUM("TotalImporte").ToDecimal()
|
||||
Dim ImporteIVA As Decimal = ObjFacturaDevolucion.DtDetalle.SUM("ImporteIVA").ToDecimal()
|
||||
Dim ImporteRetIVA As Decimal = ObjFacturaDevolucion.DtDetalle.SUM("ImporteRetIVA").ToDecimal()
|
||||
Dim ImporteRetISR As Decimal = ObjFacturaDevolucion.DtDetalle.SUM("ImporteRetISR").ToDecimal()
|
||||
Dim ImporteIEPS As Decimal = ObjFacturaDevolucion.DtDetalle.SUM("ImporteIEPS").ToDecimal()
|
||||
Dim Descuento As Decimal = ObjFacturaDevolucion.DtDetalle.SUM("Descuento").ToDecimal()
|
||||
Dim TotalImporte As Decimal = ObjFacturaDevolucion.DtDetalle.SUMD("TotalImporte")
|
||||
Dim ImporteIVA As Decimal = ObjFacturaDevolucion.DtDetalle.SUMD("ImporteIVA")
|
||||
Dim ImporteRetIVA As Decimal = ObjFacturaDevolucion.DtDetalle.SUMD("ImporteRetIVA")
|
||||
Dim ImporteRetISR As Decimal = ObjFacturaDevolucion.DtDetalle.SUMD("ImporteRetISR")
|
||||
Dim ImporteIEPS As Decimal = ObjFacturaDevolucion.DtDetalle.SUMD("ImporteIEPS")
|
||||
Dim Descuento As Decimal = ObjFacturaDevolucion.DtDetalle.SUMD("Descuento")
|
||||
Dim Amortizacion As Decimal = 0
|
||||
|
||||
Dim Total As Decimal = (TotalImporte + ImporteIVA + ImporteIEPS) - (ImporteRetIVA + ImporteRetISR + Descuento + Amortizacion)
|
||||
@@ -1908,7 +1910,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
DtVentasNC.AcceptChanges()
|
||||
|
||||
ObjFacturaDevolucion.DtVentasNC = DtVentasNC
|
||||
|
||||
ObjFacturaDevolucion.GenerarPDFFactura = True
|
||||
Dim Resp = ObjFacturaDevolucion.EmitirFactura(False, Trasac:=Trasac, ObjContPaqTransac:=ObjConta)
|
||||
Return Resp
|
||||
|
||||
@@ -2056,21 +2058,25 @@ Partial Class Ventas_ClientesAbonar
|
||||
Dim ImporteReferencia As Decimal = Total
|
||||
Dim Porcentaje As Decimal = ((Importe * 100) / ImporteReferencia) / 100
|
||||
Dim FiltroStr As String = ""
|
||||
Dim ImporteTotalConcepto As Decimal = 0
|
||||
For Each Dr As DataRow In DtImpuestosLocal.Rows
|
||||
FiltroStr = String.Format("ISNULL(PorcentajeIVA,0) = {0} AND ISNULL(PorcentajeRetIVA,0) = {1} AND ISNULL(PorcentajeRetISR,0) = {2} AND ISNULL(PorcentajeIEPS,0) = {3} AND ISNULL(CveSubProyecto,0) = {4} ", Dr("PorcentajeIVA").ToString.ToDecimal, Dr("PorcentajeRetIVA").ToString.ToDecimal, Dr("PorcentajeRetISR").ToString.ToDecimal, Dr("PorcentajeIEPS").ToString.ToDecimal, Dr("CveSubProyecto"))
|
||||
Dr("ImporteTotal") = Math.Round(Porcentaje * (TmpDT.SUM("TotalImporte", FiltroStr) - TmpDT.SUM("Descuento", FiltroStr)), 2)
|
||||
ImporteTotalConcepto = Porcentaje * (TmpDT.SUMD("TotalImporte", FiltroStr) - TmpDT.SUMD("Descuento", FiltroStr))
|
||||
|
||||
Dr("ImporteIVA") = (Dr("ImporteTotal").ToString().ToDecimal() * Dr("PorcentajeIVA").ToString().ToDecimal()).RoundSQL(2)
|
||||
Dr("ImporteRetIVA") = (Dr("ImporteTotal").ToString().ToDecimal() * Dr("PorcentajeRetIVA").ToString().ToDecimal()).RoundSQL(2)
|
||||
Dr("ImporteRetISR") = (Dr("ImporteTotal").ToString().ToDecimal() * Dr("PorcentajeRetISR").ToString().ToDecimal()).RoundSQL(2)
|
||||
Dr("ImporteIEPS") = (Dr("ImporteTotal").ToString().ToDecimal() * Dr("PorcentajeIEPS").ToString().ToDecimal()).RoundSQL(2)
|
||||
Dr("ImportePU") = ImporteTotalConcepto.RoundSQL(6)
|
||||
Dr("ImporteTotal") = ImporteTotalConcepto.RoundSQL(2)
|
||||
|
||||
Dr("ImporteIVA") = (ImporteTotalConcepto * Dr("PorcentajeIVA").ToString().ToDecimal()).RoundSQL(2)
|
||||
Dr("ImporteRetIVA") = (ImporteTotalConcepto * Dr("PorcentajeRetIVA").ToString().ToDecimal()).RoundSQL(2)
|
||||
Dr("ImporteRetISR") = (ImporteTotalConcepto * Dr("PorcentajeRetISR").ToString().ToDecimal()).RoundSQL(2)
|
||||
Dr("ImporteIEPS") = (ImporteTotalConcepto * Dr("PorcentajeIEPS").ToString().ToDecimal()).RoundSQL(2)
|
||||
|
||||
'Dr("ImporteIVA") = Math.Round(Porcentaje * TmpDT.SUM("ImporteIVA", FiltroStr), 2)
|
||||
'Dr("ImporteRetIVA") = Math.Round(Porcentaje * TmpDT.SUM("ImporteRetIVA", FiltroStr), 2)
|
||||
'Dr("ImporteRetISR") = Math.Round(Porcentaje * TmpDT.SUM("ImporteRetISR", FiltroStr), 2)
|
||||
'Dr("ImporteIEPS") = Math.Round(Porcentaje * TmpDT.SUM("ImporteIEPS", FiltroStr), 2)
|
||||
|
||||
Dr("ImportePU") = Dr("ImporteTotal").ToString.ToDecimal '(Dr("ImporteTotal").ToString.ToDecimal - Dr("ImporteIVA").ToString.ToDecimal - Dr("ImporteRetIVA").ToString.ToDecimal - Dr("ImporteRetISR").ToString.ToDecimal - Dr("ImporteIEPS").ToString.ToDecimal)
|
||||
'(Dr("ImporteTotal").ToString.ToDecimal - Dr("ImporteIVA").ToString.ToDecimal - Dr("ImporteRetIVA").ToString.ToDecimal - Dr("ImporteRetISR").ToString.ToDecimal - Dr("ImporteIEPS").ToString.ToDecimal)
|
||||
Next
|
||||
'codigo para ajuste de centavo, si el importe total no cuadra con los totales
|
||||
Dim difTmp As Decimal = Importe - (DtImpuestosLocal.SUMD("ImporteTotal") + DtImpuestosLocal.SUMD("ImporteIVA") + DtImpuestosLocal.SUMD("ImporteIEPS") - DtImpuestosLocal.SUMD("ImporteRetIVA") - DtImpuestosLocal.SUMD("ImporteRetISR"))
|
||||
@@ -2308,8 +2314,8 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
UpDatos.Update()
|
||||
UPVentas.Update()
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#Region " PAGAR CON PESOS "
|
||||
Protected Sub ChkPagarPesos_CheckedChanged(sender As Object, e As EventArgs)
|
||||
If ChkPagarPesos.Checked Then
|
||||
@@ -2330,9 +2336,9 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
CargaDatos(2)
|
||||
RegistraScript("CambiaPesosDolares();")
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "PAGAR CON DOLARES"
|
||||
Protected Sub ChkPagarDolares_CheckedChanged(sender As Object, e As EventArgs)
|
||||
If ChkPagarDolares.Checked Then
|
||||
@@ -2353,9 +2359,9 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
CargaDatos(1)
|
||||
RegistraScript("CambiaDolaresPesos();")
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " CUENTAS DEPOSITOS"
|
||||
Private Sub CargaCuentasDepositos()
|
||||
DdlCuentaDeposito.Items.Clear()
|
||||
@@ -2422,9 +2428,9 @@ Partial Class Ventas_ClientesAbonar
|
||||
End If
|
||||
Dep.Dispose()
|
||||
UpCuentaDeposito.Update()
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " COMPLEMENTOS PAGO "
|
||||
Private Function EmitirComplementoPago(CveIE As Integer, CveVentas As List(Of Integer), Series As List(Of String)) As String
|
||||
If Not ChkComplementoPago.Checked Then
|
||||
@@ -2476,14 +2482,14 @@ Partial Class Ventas_ClientesAbonar
|
||||
' Next
|
||||
|
||||
Return Retorno.ToString
|
||||
End Function
|
||||
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "SALDAR CUENTAS"
|
||||
|
||||
|
||||
|
||||
|
||||
Private Sub BtnSaldarCuentasIncobrables_Click(sender As Object, e As EventArgs) Handles BtnSaldarCuentasIncobrables.Click
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
ObjConta.IniciaTransacSQL()
|
||||
@@ -2507,7 +2513,10 @@ Partial Class Ventas_ClientesAbonar
|
||||
End If
|
||||
End If
|
||||
|
||||
ObjIE.Dispose()
|
||||
ObjIE.Dispose()
|
||||
|
||||
CvePrePoliza = ObjConta.AddPrePolizas("Bancos/ClientesAbonar/SaldarI", 47, 0, 0, 1, TxtFechaIncobrable.Text.ToDate, TxtObsSaldarIncobrable.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
|
||||
For Each gr As GridViewRow In GvCxC.Rows
|
||||
If gr.FCCheckBox("Chk").Checked Then
|
||||
@@ -2540,6 +2549,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
Dim ImpuestosMovto As Boolean = False
|
||||
Dim IdCuentaContableNoDeducible As Integer = 0
|
||||
Dim CveSubProyecto As Integer = gr.DataKey("CveSubProyecto").ToEntero
|
||||
Dim ConceptoPartida As String = TxtObsSaldarIncobrable.Text.Trim & " " & gr.DataKey("SerieFolio").ToString
|
||||
|
||||
If CveConceptoDeduccion = 255 Then IdCuentaContableNoDeducible = UsuarioActual.Empresa.Funcionalidad(266).ToEntero
|
||||
If CveConceptoDeduccion = 211 Then IdCuentaContableNoDeducible = UsuarioActual.Empresa.Funcionalidad(559).ToEntero
|
||||
@@ -2561,9 +2571,8 @@ Partial Class Ventas_ClientesAbonar
|
||||
UsaComplementaria = True
|
||||
End If
|
||||
|
||||
If MsgError = "" Then
|
||||
CvePrePoliza = ObjConta.AddPrePolizas("Bancos/ClientesAbonar/SaldarI", 47, gr.DataKey("Saldo").ToDecimal, gr.DataKey("Saldo").ToDecimal, gr.DataKey("CveMoneda").ToEntero, TxtFechaIncobrable.Text.ToDate, TxtObsSaldarIncobrable.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
If MsgError = "" Then
|
||||
|
||||
If tCveMoneda = 2 Then
|
||||
IdCtaContable = IdCtaContMonedaExtranjera
|
||||
Else
|
||||
@@ -2572,16 +2581,16 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
If UsaComplementaria AndAlso tCveMoneda = 2 Then
|
||||
'normal
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ClienteMovto, Saldo, gr.DataKey("SerieFolio").ToString, CveConceptoCliente, TxtObsSaldarIncobrable.Text.Trim, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=IdCtaContable, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, Saldo, Saldo), CveCuenta:=CveCuenta, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ClienteMovto, Saldo, gr.DataKey("SerieFolio").ToString, CveConceptoCliente, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=IdCtaContable, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, Saldo, Saldo), CveCuenta:=CveCuenta, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
End If
|
||||
'complementaria
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ClienteMovto, 0, gr.DataKey("SerieFolio").ToString, 207, TxtObsSaldarIncobrable.Text.Trim, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=IdCtaContComplementaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, Saldo, (Saldo * TCVenta) - Saldo), ImporteME:=Saldo, CveCuenta:=CveCuenta, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ClienteMovto, 0, gr.DataKey("SerieFolio").ToString, 207, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=IdCtaContComplementaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, Saldo, (Saldo * TCVenta) - Saldo), ImporteME:=Saldo, CveCuenta:=CveCuenta, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
End If
|
||||
|
||||
Else
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ClienteMovto, Saldo, gr.DataKey("SerieFolio").ToString, CveConceptoCliente, TxtObsSaldarIncobrable.Text.Trim, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=IdCtaContable, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, Saldo, Saldo * TCVenta), CveCuenta:=CveCuenta, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ClienteMovto, Saldo, gr.DataKey("SerieFolio").ToString, CveConceptoCliente, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=IdCtaContable, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, Saldo, Saldo * TCVenta), CveCuenta:=CveCuenta, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
End If
|
||||
|
||||
@@ -2592,11 +2601,11 @@ Partial Class Ventas_ClientesAbonar
|
||||
Dim ImporteFluctuacion As Decimal = 0
|
||||
ImporteFluctuacion = Saldo * (TCPago - TCVenta)
|
||||
If TCPago > TCVenta Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 64, TxtObsSaldarIncobrable.Text.Trim, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaGananciaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), CveCuenta:=CveCuenta, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 64, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaGananciaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), CveCuenta:=CveCuenta, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
End If
|
||||
Else
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 65, TxtObsSaldarIncobrable.Text.Trim, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaPerdidaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), CveCuenta:=CveCuenta, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 65, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaPerdidaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), CveCuenta:=CveCuenta, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
End If
|
||||
End If
|
||||
@@ -2620,18 +2629,18 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
IdCtaContable = If(IdCtaIVAXTrasladar > 0, IdCtaIVAXTrasladar, UsuarioActual.Empresa.IdCuentaIVAxTrasladar)
|
||||
CveCuenta = If(CveCuentaIVAxTrasladar > 0, CveCuentaIVAxTrasladar, UsuarioActual.Empresa.CveCuentaIVAxTrasladar)
|
||||
If IVA > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ImpuestosMovto, IVA, gr.DataKey("SerieFolio").ToString, 13, TxtObsSaldarIncobrable.Text.Trim, TxtFechaIncobrable.Text.ToDate, IdCtaContable, -1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, IVA, IVA * TCVenta), CveCuenta:=CveCuenta, PorcentajeImpuesto:=PorcentajeImpuesto, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
|
||||
If IVA > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ImpuestosMovto, IVA, gr.DataKey("SerieFolio").ToString, 13, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable, -1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, IVA, IVA * TCVenta), CveCuenta:=CveCuenta, PorcentajeImpuesto:=PorcentajeImpuesto, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
End If
|
||||
|
||||
IdCtaContable = UsuarioActual.Empresa.IdCuentaIEPSxTrasladar
|
||||
CveCuenta = UsuarioActual.Empresa.CveCuentaIEPSxTrasladar
|
||||
If IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ImpuestosMovto, IEPS, gr.DataKey("SerieFolio").ToString, 38, TxtObsSaldarIncobrable.Text.Trim, TxtFechaIncobrable.Text.ToDate, IdCtaContable, -1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, IEPS, IEPS * TCVenta), CveCuenta:=CveCuenta, PorcentajeImpuesto:=PorcentajeImpuesto, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
|
||||
If IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ImpuestosMovto, IEPS, gr.DataKey("SerieFolio").ToString, 38, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable, -1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, IEPS, IEPS * TCVenta), CveCuenta:=CveCuenta, PorcentajeImpuesto:=PorcentajeImpuesto, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
End If
|
||||
|
||||
'al gasto,Subtotal
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, SubtotalMovto, SubTotal, gr.DataKey("SerieFolio").ToString, CveConceptoDeduccion, TxtObsSaldarIncobrable.Text.Trim, TxtFechaIncobrable.Text.ToDate, IdCuentaContableNoDeducible, -1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=SubTotal, CveCuenta:=-1, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, SubtotalMovto, SubTotal, gr.DataKey("SerieFolio").ToString, CveConceptoDeduccion, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCuentaContableNoDeducible, -1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=SubTotal, CveCuenta:=-1, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
End If
|
||||
|
||||
@@ -2772,10 +2781,10 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
UpGuardar.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "COMPLEMENTO DE PAGO - ELIMINAR POR SUSTITUCION"
|
||||
Protected Sub CargaIESustituir()
|
||||
Dim ObjIE As New ClsBancos()
|
||||
@@ -2952,10 +2961,10 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
Private Sub BtnVincularIntermediario_Click(sender As Object, e As EventArgs) Handles BtnVincularIntermediario.Click
|
||||
RegistraScript("$('#ModalVincularIntermediario').modal('hide')", "hidemodal")
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
Protected Sub BtnCambiaTipoMoneda_Click(sender As Object, e As EventArgs)
|
||||
CambiaTipoMoneda()
|
||||
End Sub
|
||||
|
||||
@@ -2664,12 +2664,30 @@
|
||||
<div id="DivRecepcionUsados" runat="server">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
<div class="col-md-6">
|
||||
<label>Modelo:</label>
|
||||
<br />
|
||||
<asp:DropDownList ID="DdlModeloAuto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="ModeloMarca" DataValueField="CveModeloAuto">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label>Año:</label>
|
||||
<br />
|
||||
<asp:TextBox ID="TxtAnioVehiculo" runat="server" Height="100%" Width="100%" CssClass="form-control" CausesValidation="true" MaxLength="500"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class ="row">
|
||||
<div class="col-md-6">
|
||||
<label>Tipo Servicio:</label>
|
||||
<br />
|
||||
<asp:DropDownList ID="DdlTipoServicio" CssClass="form-control input-sm select2me" runat="server" CausesValidation="true">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Particular" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Comercial" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Taxi" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-6"></div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
@@ -859,6 +859,14 @@ Partial Class PV
|
||||
ViewState("TmpDTRecepcionUsados") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TmpDTPolizaVirtual As DataTable
|
||||
Get
|
||||
Return If(IsNothing(ViewState("TmpDTPolizaVirtual")), Nothing, CType(ViewState("TmpDTPolizaVirtual"), DataTable))
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("TmpDTPolizaVirtual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TmpDTImpuestos As DataTable
|
||||
Get
|
||||
Return If(IsNothing(ViewState("TmpDTImpuestos")), Nothing, CType(ViewState("TmpDTImpuestos"), DataTable))
|
||||
@@ -2547,6 +2555,8 @@ Partial Class PV
|
||||
|
||||
ObjFactura.DtRecepcionUsados = TmpDTRecepcionUsados
|
||||
|
||||
ObjFactura.DtPolizasVirtuales = TmpDTPolizaVirtual
|
||||
|
||||
ObjFactura.GenerarPDFFactura = False
|
||||
|
||||
Dim CveTipoAlmacen As Integer = If(TmpDTAjustes IsNot Nothing AndAlso TmpDTAjustes.Rows.Count > 0, 6, 22)
|
||||
@@ -3734,13 +3744,14 @@ Partial Class PV
|
||||
ChkAgregar.Checked = False
|
||||
divagregrarotrops.Visible = False
|
||||
Ajuste()
|
||||
AddPolizaVirtual(DdlPS.SelectedValue.ToEntero())
|
||||
UpVenta.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "DivAddVenta"), "EdicionVenta")
|
||||
End Sub
|
||||
Protected Sub LnkAgregarPS_Click(sender As Object, e As EventArgs)
|
||||
If AgregarPS() Then
|
||||
If ChkAjuste.Checked Then GuardaAjuste()
|
||||
|
||||
AddPolizaVirtual(DdlPS.SelectedValue.ToEntero())
|
||||
CalculaTotalesVenta()
|
||||
|
||||
If ChkAgregar.Checked = True And Modalidad = "A" Then
|
||||
@@ -5053,6 +5064,7 @@ Partial Class PV
|
||||
|
||||
CreaDTmpDTAjustes()
|
||||
CreaDTmpDTRecepcionUsados()
|
||||
CreaDTmpDTPolizaVirtual()
|
||||
CargaBCIAjuste()
|
||||
DdlDistribuidor.setEsWebService(True)
|
||||
DivChkAjuste.Visible = True
|
||||
@@ -5478,6 +5490,101 @@ Partial Class PV
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "P O L I Z A - V I R T U A L"
|
||||
Private Sub CreaDTmpDTPolizaVirtual()
|
||||
TmpDTPolizaVirtual = New DataTable
|
||||
TmpDTPolizaVirtual.Columns.Add("CvePS", GetType(Integer))
|
||||
TmpDTPolizaVirtual.Columns.Add("Cantidad", GetType(Decimal))
|
||||
TmpDTPolizaVirtual.Columns.Add("PU", GetType(Decimal))
|
||||
TmpDTPolizaVirtual.Columns.Add("Descuento", GetType(Decimal))
|
||||
TmpDTPolizaVirtual.Columns.Add("Total", GetType(Decimal))
|
||||
TmpDTPolizaVirtual.Columns.Add("CveVentaDetalle", GetType(Integer))
|
||||
TmpDTPolizaVirtual.Columns.Add("TipoServicio", GetType(Integer))
|
||||
TmpDTPolizaVirtual.Columns.Add("TipoPoliza", GetType(Integer))
|
||||
TmpDTPolizaVirtual.Columns.Add("CveModeloAuto", GetType(Integer))
|
||||
TmpDTPolizaVirtual.Columns.Add("AnioVehiculo", GetType(Integer))
|
||||
TmpDTPolizaVirtual.Columns.Add("TieneUsado", GetType(Boolean))
|
||||
TmpDTPolizaVirtual.Columns.Add("FechaUsado", GetType(DateTime))
|
||||
TmpDTPolizaVirtual.Columns.Add("CvePSUsado", GetType(Integer))
|
||||
TmpDTPolizaVirtual.Columns.Add("CveBCIUsado", GetType(Integer))
|
||||
End Sub
|
||||
Private Function AddPolizaVirtual(CvePS As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
'Dim CvePS As Integer = DdlPS.SelectedValue.ToEntero()
|
||||
Dim Cantidad As Decimal = TxtCantidad.Text.ToDecimal()
|
||||
Dim PU As Decimal = TxtPrecio.Text.ToDecimal()
|
||||
Dim Descuento As Decimal = TxtDescuento.Text.ToDecimal()
|
||||
Dim ImporteAjuste As Decimal = TxtImporteAjuste.Text.ToDecimal().RoundSQL(2)
|
||||
|
||||
If Modalidad = "U" Then
|
||||
If TmpDTRecepcionUsados.Rows.Count > 0 Then
|
||||
Dim Elimino As Boolean = False
|
||||
For Each RowPoliza As DataRow In TmpDTPolizaVirtual.Rows
|
||||
If RowPoliza("CvePS").ToString().ToEntero() = CvePS Then
|
||||
RowPoliza.Delete()
|
||||
Elimino = True
|
||||
End If
|
||||
Next
|
||||
If Elimino Then
|
||||
TmpDTRecepcionUsados.AcceptChanges()
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim Total As Decimal = ((Cantidad * PU) - Descuento).RoundSQL(2)
|
||||
Dim TipoServicio As Integer = DdlTipoServicio.SelectedValue.ToEntero()
|
||||
Dim FechaUsado As DateTime = TxtFechaAjuste.Text.ToDateTime()
|
||||
Dim CveModeloAuto As Integer = DdlModeloAuto.SelectedValue.ToEntero()
|
||||
Dim AnioVehiculo As Integer = TxtAnioVehiculo.Text.ToEntero()
|
||||
Dim TipoPoliza As Integer = 1
|
||||
|
||||
If ChkAjuste.Checked Then
|
||||
If Total = ImporteAjuste Then
|
||||
TipoPoliza = 3
|
||||
Else
|
||||
TipoPoliza = 2
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim TieneUsado As Boolean = GvRecepcionUsados.Rows.Cast(Of GridViewRow).Any(Function(GvRow) GvRow.RowType = DataControlRowType.DataRow AndAlso GvRow.FCTextBox("TxtCantidad").Text.ToDecimal() > 0)
|
||||
Dim CvePSUsado As Integer = -1
|
||||
Dim CveBCIUsado As Integer = -1
|
||||
|
||||
If TieneUsado Then
|
||||
For Each GvRow As GridViewRow In GvRecepcionUsados.Rows
|
||||
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||
If GvRow.FCTextBox("TxtCantidad").Text.ToDecimal() > 0 Then
|
||||
CvePS = GvRow.DataKey("CvePSCargo").ToEntero()
|
||||
CveBCIUsado = GvRow.FCDropDownList("DdlBCIUsado").SelectedValue.ToEntero()
|
||||
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
Dim Row As DataRow = TmpDTPolizaVirtual.NewRow()
|
||||
Row("CvePS") = CvePS
|
||||
Row("Cantidad") = Cantidad
|
||||
Row("PU") = PU
|
||||
Row("Descuento") = Descuento
|
||||
Row("Total") = Total
|
||||
Row("CveVentaDetalle") = -1
|
||||
Row("TipoServicio") = TipoServicio
|
||||
Row("TipoPoliza") = TipoPoliza
|
||||
Row("CveModeloAuto") = CveModeloAuto
|
||||
Row("AnioVehiculo") = AnioVehiculo
|
||||
Row("TieneUsado") = TieneUsado
|
||||
Row("FechaUsado") = FechaUsado
|
||||
Row("CvePSUsado") = CvePSUsado
|
||||
Row("CveBCIUsado") = CveBCIUsado
|
||||
|
||||
TmpDTPolizaVirtual.Rows.Add(Row)
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
#End Region
|
||||
#Region "U S A D O S"
|
||||
|
||||
Private Sub CreaDTmpDTRecepcionUsados()
|
||||
@@ -5492,6 +5599,7 @@ Partial Class PV
|
||||
TmpDTRecepcionUsados.Columns.Add("CveModeloAuto", GetType(Integer))
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub BtnRecepcionUsados_Click(sender As Object, e As EventArgs)
|
||||
|
||||
'CalculaRecepcionUsados(GvRecepcionUsadosModal)
|
||||
|
||||
@@ -356,6 +356,9 @@
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="LnkImprimirFormatoCicovisa" Visible="false" OnClick="LnkImprimirFormatoCicovisa_Click">Imprimir Formato Cicovisa</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="LnkEnviarPolizaVirtual" Visible="false" OnClick="LnkEnviarPolizaVirtual_Click">Enviar Poliza Virtual</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:AsyncPostBackTrigger ControlID="LnkImprimir" EventName="Click" />
|
||||
@@ -1301,7 +1304,7 @@
|
||||
<ContentTemplate>
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="GvCodigosUnicos" runat="server" CssClass="table table-striped table-hover Widthall" AutoGenerateColumns="False"
|
||||
DataKeyNames="SerieLote,IdProductoPolizaVirtual,FechaAjuste,IdModelo,IdBCI" ClientIDMode="Static" EmptyDataText="" GridLines="None">
|
||||
DataKeyNames="CvePolizaVirtual,SerieLote,IdProductoPolizaVirtual,Total,Descuento,AnioVehiculo,FechaUsado,IdModeloAuto,IdMarcaAuto,IdBCI,TipoServicio,TipoPoliza,TieneUsado" ClientIDMode="Static" EmptyDataText="" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Código Único">
|
||||
<ItemTemplate>
|
||||
|
||||
@@ -4174,7 +4174,10 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Egs", "Dev", "Ant") Then
|
||||
If ObjVentas.GetVentasAntNC(-1, CveVenta) Then
|
||||
Dim AplicaAmortizacion As Boolean = False
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Ant") Then AplicaAmortizacion = True
|
||||
|
||||
If ObjVentas.GetVentasAntNC(-1, CveVenta, AplicaAmortizacion) Then
|
||||
GvNC.DataSource = ObjVentas.DtResultados
|
||||
TmpDTNCVinculadas = ObjVentas.DtResultados
|
||||
GvNC.Caption = " <table width='100%'><tr><td style='text-align:center'>Ventas Aplicadas</td></tr></table>"
|
||||
@@ -4187,7 +4190,7 @@ Partial Class Ventas
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If GvNC.Rows.Count > 0 Then
|
||||
ImgAntiPend.Visible = False
|
||||
@@ -5742,8 +5745,8 @@ Partial Class Ventas
|
||||
Dim Cantidad, PU, Descuento, CantidadInventario As Decimal
|
||||
Dim CuentaPredial As String
|
||||
Cantidad = GvPS.Rows(e.RowIndex).FCTextBox("TxtCantidad").Text.ToDecimal
|
||||
PU = Math.Round(GvPS.Rows(e.RowIndex).FCTextBox("TxtPrecio").Text.ToDecimal, 6)
|
||||
Descuento = Math.Round(GvPS.Rows(e.RowIndex).FCTextBox("TxtDescuento").Text.ToDecimal, NumeroDecimales)
|
||||
PU = (GvPS.Rows(e.RowIndex).FCTextBox("TxtPrecio").Text.ToDecimal).RoundSQL(6)
|
||||
Descuento = (GvPS.Rows(e.RowIndex).FCTextBox("TxtDescuento").Text.ToDecimal).RoundSQL(NumeroDecimales)
|
||||
CuentaPredial = GvPS.Rows(e.RowIndex).FCTextBox("TxtPredial").Text.Trim
|
||||
|
||||
Dim CantidadOriginal As Decimal = GvPS.Rows(e.RowIndex).DataKey("Cantidad").ToDecimal()
|
||||
@@ -14125,7 +14128,7 @@ Partial Class Ventas
|
||||
Dim Row As DataRow = Nothing
|
||||
Dim TotalCalculableImpuestos As Decimal = 0
|
||||
Dim TotalCalculableImpuestosIVA As Decimal = 0
|
||||
PU = Math.Round(PU, 6) ' el precio unitario puede llevar hasta 6 decimales permitidos
|
||||
PU = PU.RoundSQL(6) ' el precio unitario puede llevar hasta 6 decimales permitidos
|
||||
|
||||
Row = TmpDT.NewRow()
|
||||
Row("CveProyecto") = CveProyecto
|
||||
@@ -23935,11 +23938,20 @@ Partial Class Ventas
|
||||
|
||||
#Region "P O L I Z A - V I R T U A L"
|
||||
Private Sub CargaCodigoUnico()
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso DdlTipoComprobante.SelectedValue = "Rem" Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso DdlTipoComprobante.SelectedValue.Contiene("Rem") Then
|
||||
Dim ObjAcum As New ClsAcumuladores
|
||||
If ObjAcum.GetGarantiasPolizaVirtual(Me.CveVenta, UsuarioActual.CveEmpresa) AndAlso ObjAcum.DtResultados.Rows.Count > 0 Then
|
||||
GvCodigosUnicos.DataSource = ObjAcum.DtResultados
|
||||
DivCodigosUnicos.Visible = True
|
||||
If ObjAcum.GetPolizasVirtuales(Me.CveVenta) AndAlso ObjAcum.DtResultados.Rows.Count > 0 Then
|
||||
Dim RowPoliza As DataRow = ObjAcum.DtResultados.Rows(0)
|
||||
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Rem") Then
|
||||
GvCodigosUnicos.DataSource = ObjAcum.DtResultados
|
||||
DivCodigosUnicos.Visible = True
|
||||
End If
|
||||
|
||||
If Not CBool(RowPoliza("Enviada").ToString()) Then
|
||||
LnkEnviarPolizaVirtual.Visible = True
|
||||
End If
|
||||
|
||||
End If
|
||||
ObjAcum.Dispose()
|
||||
GvCodigosUnicos.DataBind()
|
||||
@@ -23947,47 +23959,56 @@ Partial Class Ventas
|
||||
End Sub
|
||||
Protected Sub GeneraPolizaVentaWS(ObjFactura As Modelos.Factura)
|
||||
Try
|
||||
'TipoPoliza: 01 Venta, 02 Ajuste, 03 Garantía
|
||||
Dim TipoPoliza As Integer = 0
|
||||
For Each Row As GridViewRow In GvCodigosUnicos.Rows
|
||||
If Row.RowType = DataControlRowType.DataRow Then
|
||||
Dim CvePolizaVirtual As Integer = Row.DataKey("CvePolizaVirtual").ToEntero()
|
||||
|
||||
Dim obj As New Modelos.MPolizaVentaWS
|
||||
'DATOS DEL CLIENTE
|
||||
obj.customer_name = ObjFactura.Cliente.Nombre
|
||||
obj.customer_last_name1 = ""
|
||||
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
|
||||
obj.customer_car_brand = Row.DataKey("IdMarcaAuto").ToString().Trim()
|
||||
obj.customer_car_model = Row.DataKey("IdModeloAuto").ToString().Trim()
|
||||
obj.customer_car_year = Row.DataKey("AnioVehiculo").ToString().ToEntero()
|
||||
|
||||
'DATOS DE VENTA
|
||||
obj.sale_date = ObjFactura.Fecha
|
||||
obj.sale_paidby = "01"
|
||||
obj.sale_type = "01" 'PISO
|
||||
obj.sale_type_service = "02" 'COMERCIAL
|
||||
obj.sale_total = ObjFactura.Total
|
||||
obj.sale_discount = ObjFactura.Descuento
|
||||
obj.sale_id = String.Format("{0}{1}{2}", ObjFactura.Serie, ObjFactura.Folio, ObjFactura.CveVenta)
|
||||
obj.sale_type_service = "0" & Row.DataKey("TipoServicio").ToString().Trim()
|
||||
obj.sale_total = Row.DataKey("Total").ToString().ToDecimal()
|
||||
obj.sale_discount = Row.DataKey("Descuento").ToString().ToDecimal()
|
||||
obj.sale_id = ObjFactura.CveVenta.ToString
|
||||
|
||||
'DATOS DEL PRODUCTO
|
||||
obj.product_code = Row.DataKey("IdProductoPolizaVirtual").ToString()
|
||||
obj.product_unique_code = Row.FCTextBox("TxtCodigoUnico").Text 'se indique el código único de la batería. (SERIE LOTE)
|
||||
obj.product_sale_type = "01 " 'VENTA
|
||||
|
||||
Dim FechaUsado As DateTime = Row.DataKey("FechaAjuste").ToString().ToDateTime()
|
||||
obj.product_code = Row.DataKey("IdProductoPolizaVirtual").ToString().Trim()
|
||||
obj.product_unique_code = Row.FCTextBox("TxtCodigoUnico").Text.Trim() 'se indique el código único de la batería. (SERIE LOTE)
|
||||
obj.product_sale_type = "0" & Row.DataKey("TipoPoliza").ToString().Trim()
|
||||
|
||||
'DATOS DE USADO
|
||||
obj.used_product = True
|
||||
obj.used_brand = Row.DataKey("IdModelo").ToString() 'MARCAR DEL USADO
|
||||
obj.used_bci = Row.DataKey("IdBCI").ToString() 'VALOR DEL BCI
|
||||
obj.used_month = FechaUsado.Month
|
||||
obj.used_year = FechaUsado.Year
|
||||
obj.used_sale_date = FechaUsado
|
||||
obj.used_product = CBool(Row.DataKey("TieneUsado").ToString())
|
||||
|
||||
If obj.used_product Then
|
||||
Dim FechaUsado As DateTime = Row.DataKey("FechaUsado").ToString().ToDateTime()
|
||||
|
||||
obj.used_brand = Row.DataKey("IdModelo").ToString().Trim() 'MARCAR DEL USADO
|
||||
obj.used_bci = Row.DataKey("IdBCI").ToString().Trim() 'VALOR DEL BCI
|
||||
obj.used_month = FechaUsado.Month
|
||||
obj.used_year = FechaUsado.Year
|
||||
obj.used_sale_date = FechaUsado
|
||||
End If
|
||||
|
||||
|
||||
EnviarPolizaVentaWS(obj, CvePolizaVirtual)
|
||||
|
||||
EnviarPolizaVentaWS(obj)
|
||||
End If
|
||||
Next
|
||||
Catch ex As Exception
|
||||
@@ -23997,11 +24018,11 @@ Partial Class Ventas
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Function EnviarPolizaVentaWS(obj As Modelos.MPolizaVentaWS) As Boolean
|
||||
Protected Function EnviarPolizaVentaWS(obj As Modelos.MPolizaVentaWS, CvePolizaVirtual As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
Dim Respuesta As String = "[]"
|
||||
|
||||
Dim User As String = "cslth.2809@jcilink.com"
|
||||
Dim User As String = "cslth.7777@lth.com"
|
||||
Dim Password As String = "ff31580a95f36b51ad27f970428b77a5a9245076"
|
||||
|
||||
Try
|
||||
@@ -24048,13 +24069,22 @@ Partial Class Ventas
|
||||
Dim resp = JArray.Parse(Respuesta)
|
||||
|
||||
If resp.Count > 0 Then
|
||||
Dim Msg = resp(0)("Descripcion").ToString()
|
||||
Dim Msg As New StringBuilder()
|
||||
Msg.AppendFormat("Mensaje Poliza Virtual: {0}", resp(0)("Descripcion").ToString())
|
||||
|
||||
If resp(0)("Codigo").ToString().Contiene("500", "501", "502", "503", "504", "505", "506", "507", "508") Then
|
||||
Alert(Msg, TipoMensaje.MsgInformacion)
|
||||
Retorno = True
|
||||
Dim ObjAcum As New ClsAcumuladores
|
||||
If ObjAcum.UpdateEnvioPolizaVirutal(CvePolizaVirtual, True, Now) Then
|
||||
Alert(Msg.ToString(), TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
ObjAcum.Dispose()
|
||||
Else
|
||||
Alert(Msg, TipoMensaje.MsgAdvertencia)
|
||||
Dim ObjAcum As New ClsAcumuladores
|
||||
If ObjAcum.UpdateEnvioPolizaVirutal(CvePolizaVirtual, False, Now) Then
|
||||
Alert(Msg.ToString(), TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
ObjAcum.Dispose()
|
||||
End If
|
||||
Else
|
||||
Alert("No se envió la poliza virtual", TipoMensaje.MsgAdvertencia)
|
||||
@@ -24068,6 +24098,13 @@ Partial Class Ventas
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Protected Sub LnkEnviarPolizaVirtual_Click(sender As Object, e As EventArgs)
|
||||
If UsuarioActual.Empresa.Funcionalidad(576) = "1" AndAlso DdlTipoComprobante.SelectedValue.Contains("Rem") Then
|
||||
CreaObjetosVenta()
|
||||
GeneraPolizaVentaWS(ObjFactura)
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Protected Sub DdlTipoRetencion_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
@@ -24112,4 +24149,5 @@ Partial Class Ventas
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
@@ -938,6 +938,26 @@ Public Class WSGPSApp
|
||||
|
||||
End Function
|
||||
|
||||
<WebMethod>
|
||||
Public Function GetArrastre(CveDispositivo As Integer) As String
|
||||
Dim Retorno As String = "[]"
|
||||
Using ObjGPS As New ClsGPS
|
||||
If ObjGPS.GPS_ArrastreGET(CveDispositivo) Then
|
||||
Retorno = ObjGPS.DtResultados.DataTableToJSONIPP()
|
||||
End If
|
||||
End Using
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
<WebMethod>
|
||||
Public Function ActivarDesactivarArrastre(CveDispositivo As Integer, Activo As Boolean) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
Using ObjGPS As New ClsGPS
|
||||
Retorno = ObjGPS.GPS_ArrastreActivarDesactivar(CveDispositivo, Activo)
|
||||
End Using
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
<WebMethod>
|
||||
Public Function GetTrayectos(CveCliente As Integer) As String
|
||||
Dim Retorno As String = "[]"
|
||||
|
||||
@@ -62,9 +62,16 @@ Public Class WsTSoft
|
||||
Dim ObjGPS As New ClsGPS
|
||||
Dim Continuar As Boolean = ObjGPS.UltimaPosicionEquipoGetWS(DevID)
|
||||
Dim ObjPos As New LatLng
|
||||
If Continuar Then
|
||||
If Continuar Then
|
||||
'CONSULTA DIRECCIONES
|
||||
Dim Direcciones As JArray = ConsultarDirecciones(ObjGPS.DtResultados, "Lat", "Lng")
|
||||
For Each Dir As JObject In Direcciones
|
||||
ObjGPS.DtResultados.Rows(Dir("Indice").ToEntero())("Direccion") = Dir("Direccion").ToString()
|
||||
Next
|
||||
|
||||
ObjPos.Lat = ObjGPS.DtResultados.Rows("0")("Lat").ToString
|
||||
ObjPos.Lng = ObjGPS.DtResultados.Rows("0")("Lng").ToString
|
||||
ObjPos.Lng = ObjGPS.DtResultados.Rows("0")("Lng").ToString
|
||||
ObjPos.Direccion = ObjGPS.DtResultados.Rows("0")("Direccion").ToString
|
||||
Else
|
||||
ObjPos.CurrentError = "No se pudo obtener la posición."
|
||||
End If
|
||||
@@ -95,8 +102,17 @@ Public Class WsTSoft
|
||||
Dim objTsoft As New ClsTSoft
|
||||
Dim Continuar As Boolean = objTsoft.GETRemisionesHistorial(FolioRemision, NoEconomico)
|
||||
Dim objRem As New GetRemisionHistorialesObj
|
||||
If Continuar Then
|
||||
objRem.Historial = objTsoft.DtResultados.DataTableToObject(Of GetRemisionHistorialsObj)
|
||||
If Continuar Then
|
||||
Dim Dt = objTsoft.DtResultados.Copy()
|
||||
Dt.Columns.Add("Direccion", GetType(String))
|
||||
|
||||
'CONSULTA DIRECCIONES
|
||||
Dim Direcciones As JArray = ConsultarDirecciones(Dt, "Lat", "Lon")
|
||||
For Each Dir As JObject In Direcciones
|
||||
Dt.Rows(Dir("Indice").ToEntero())("Direccion") = Dir("Direccion").ToString()
|
||||
Next
|
||||
|
||||
objRem.Historial = Dt.DataTableToObject(Of GetRemisionHistorialsObj)
|
||||
objRem.CurrentError = ""
|
||||
Else
|
||||
objRem.Historial = New List(Of GetRemisionHistorialsObj)
|
||||
@@ -149,15 +165,15 @@ Public Class WsTSoft
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ConsultarDirecciones(Dt As DataTable) As JArray
|
||||
Public Function ConsultarDirecciones(Dt As DataTable, Optional LatName As String = "Latitud", Optional LonName As String = "Longitud") As JArray
|
||||
Dim retorno As JArray = Nothing
|
||||
Dim posicionesArray = New JArray(From Row As DataRow In Dt
|
||||
Let index = Dt.Rows().IndexOf(Row)
|
||||
Select New JObject(
|
||||
New JProperty("indice", index),
|
||||
New JProperty("cveTrama", -1),
|
||||
New JProperty("lat", Row("Latitud").ToString.ToDouble),
|
||||
New JProperty("lon", Row("Longitud").ToString.ToDouble)
|
||||
New JProperty("lat", Row(LatName).ToString.ToDouble),
|
||||
New JProperty("lon", Row(LonName).ToString.ToDouble)
|
||||
))
|
||||
|
||||
Dim Base64array = Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(posicionesArray.ToString()))
|
||||
@@ -193,9 +209,10 @@ Public Class WsTSoft
|
||||
End Class
|
||||
<Serializable>
|
||||
Public Class LatLng
|
||||
Public Lat As String
|
||||
Public Lng As String
|
||||
Public CurrentError As String
|
||||
Public Property Lat As String
|
||||
Public Property Lng As String
|
||||
Public Property Direccion As String
|
||||
Public Property CurrentError As String
|
||||
End Class
|
||||
<Serializable>
|
||||
Public Class GetRemisionHistorialsObj
|
||||
@@ -203,7 +220,8 @@ Public Class WsTSoft
|
||||
Public Property FolioRemision As String
|
||||
Public Property NoEconomico As String
|
||||
Public Property Lat As String
|
||||
Public Property Lon As String
|
||||
Public Property Lon As String
|
||||
Public Property Direccion As String
|
||||
Public Property Distancia As String
|
||||
Public Property TrackingNumber As String
|
||||
Public Property CveEstatus As Integer
|
||||
|
||||
10
vwd.webinfo
Normal file
10
vwd.webinfo
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
Visual Studio global web project settings.
|
||||
-->
|
||||
<VisualWebDeveloper>
|
||||
|
||||
<StartupServices>
|
||||
<Service ID="{C0C07587-41A7-46C8-8FBD-3F9C8EBE2DDC}"/>
|
||||
</StartupServices>
|
||||
</VisualWebDeveloper>
|
||||
Reference in New Issue
Block a user