This commit is contained in:
Rakcsle Supertramp
2020-01-25 11:30:33 -07:00
35 changed files with 2374 additions and 1778 deletions

View File

@@ -794,6 +794,69 @@ Public Class ClsAcumuladores
#End Region #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, 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 CveEmpresa As Integer, ImporteCompras As Decimal, Observaciones As String, Optional CveMovimiento As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False

View File

@@ -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, 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 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 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 Dim Retorno As Boolean = False
@@ -240,7 +240,7 @@ Public Class ClsCompras
.Add("@NoDeducible", SqlDbType.Bit).Value = NoDeducible .Add("@NoDeducible", SqlDbType.Bit).Value = NoDeducible
.Add("@CveTipoCompra", SqlDbType.Int).Value = CveTipoCompra .Add("@CveTipoCompra", SqlDbType.Int).Value = CveTipoCompra
.Add("@TotalOriginal", SqlDbType.Money).Value = TotalOriginal .Add("@TotalOriginal", SqlDbType.Money).Value = TotalOriginal
.Add("@CveTipoConcepto", SqlDbType.Int).Value = CveConceptoContable .Add("@CveTipoConcepto", SqlDbType.Int).Value = CveTipoConcepto
End With End With
Try Try

View File

@@ -1629,9 +1629,12 @@ Public Class ClsContratos
#Region "T I P O S C O N T R A T O S" #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 Dim Retorno As Boolean = False
DataAdapter("PA_Con_ContratosTiposGet") DataAdapter("PA_Con_ContratosTiposGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
Retorno = True Retorno = True

View File

@@ -4832,7 +4832,69 @@ Public Class ClsInventarios
#End Region #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 " #Region " IDisposable Support "
' IDisposable ' IDisposable
Protected Overridable Sub Dispose(ByVal disposing As Boolean) Protected Overridable Sub Dispose(ByVal disposing As Boolean)

View File

@@ -1673,12 +1673,27 @@ Public Class ClsPaginas
Application("GlobalDTContratos") = value Application("GlobalDTContratos") = value
End Set End Set
End Property End Property
Property GlobalDTContratosTipos() As DataTable Property GlobalDTContratosTipos(CveEmpresa As Integer) As DataTable
Get 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 End Get
Set(value As DataTable) Set(value As DataTable)
Application("GlobalDTContratosTipos") = value Dim AppNombre As String = String.Format("GlobalDTContratosTipos{0}", CveEmpresa)
Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTTipoAlmacen(CveEmpresa As Integer) As DataTable Property GlobalDTTipoAlmacen(CveEmpresa As Integer) As DataTable

View File

@@ -1347,6 +1347,13 @@ Namespace Modelos
Dim rowInv As DataRow = DtRecepcionUsados.Select($"CvePS={Row("CvePS").ToString.ToEntero}")(0) Dim rowInv As DataRow = DtRecepcionUsados.Select($"CvePS={Row("CvePS").ToString.ToEntero}")(0)
rowInv("CveVentaDetalle") = ObjVentas.CveVentaDetalle rowInv("CveVentaDetalle") = ObjVentas.CveVentaDetalle
End If 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 End If
'Agregamos el gasto de contrato 'Agregamos el gasto de contrato
@@ -1376,7 +1383,7 @@ Namespace Modelos
End If End If
Next Next
'Bonificacion Usados 'BONIFICACION USADOS
If UsadosBonificacion IsNot Nothing AndAlso UsadosBonificacion.Count > 0 AndAlso TipoBonificacion > 0 Then If UsadosBonificacion IsNot Nothing AndAlso UsadosBonificacion.Count > 0 AndAlso TipoBonificacion > 0 Then
For Each CveMovto In UsadosBonificacion For Each CveMovto In UsadosBonificacion
If Not ObjAcum.DistribuidorActualizarFacturados(CveMovto, UsuarioActual.CveEmpresa, TipoBonificacion, CveVenta) Then If Not ObjAcum.DistribuidorActualizarFacturados(CveMovto, UsuarioActual.CveEmpresa, TipoBonificacion, CveVenta) Then
@@ -1385,7 +1392,7 @@ Namespace Modelos
Next Next
End If End If
'Ajustes' 'AJUSTES'
If DtAjustes IsNot Nothing AndAlso DtAjustes.Rows.Count > 0 Then If DtAjustes IsNot Nothing AndAlso DtAjustes.Rows.Count > 0 Then
For Each Dr As DataRow In DtAjustes.Rows 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, 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 Next
End If 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 UsuarioActual.CveEmpresa.Contiene(126) Then
If ObjVentas.CveVenta > 0 And factura.CveOrdenProduccion > 0 Then If ObjVentas.CveVenta > 0 And factura.CveOrdenProduccion > 0 Then
If Not ObjCGame.UpdateOrdenProduccionVenta(factura.CveOrdenProduccion, ObjVentas.CveVenta) Then If Not ObjCGame.UpdateOrdenProduccionVenta(factura.CveOrdenProduccion, ObjVentas.CveVenta) Then
@@ -1861,6 +1875,27 @@ Namespace Modelos
Return Resultado 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 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) 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 DtDetalle As Data.DataTable
Public Property DtDetalleAC As Data.DataTable Public Property DtDetalleAC As Data.DataTable
Public Property DtAjustes 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 DtVentasNC As Data.DataTable
Public Property DtDeduccion As Data.DataTable Public Property DtDeduccion As Data.DataTable
Public Property DtFirmas As Data.DataTable Public Property DtFirmas As Data.DataTable

View File

@@ -890,13 +890,13 @@ Namespace Extensiones
Public Function RoundSQL(Valor As Double, Optional Decimales As Integer = 2) As Double Public Function RoundSQL(Valor As Double, Optional Decimales As Integer = 2) As Double
'Return Math.Round(Valor, Decimales, MidpointRounding.AwayFromZero) '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 '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 End Function
<Runtime.CompilerServices.Extension()> <Runtime.CompilerServices.Extension()>
Public Function RoundSQL(Valor As Decimal, Optional Decimales As Integer = 2) As Decimal 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 '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 End Function
<Runtime.CompilerServices.Extension()> <Runtime.CompilerServices.Extension()>
Public Function Abs(Valor As Double) As Double Public Function Abs(Valor As Double) As Double

View File

@@ -41,6 +41,8 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
GetUser(context) GetUser(context)
Case "ActualizaPreP" Case "ActualizaPreP"
ActualizaPrePoliza(context) ActualizaPrePoliza(context)
Case "getpersonal"
getpersonal(context)
End Select End Select
Catch ex As Exception 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}") Dim dt As DataTable = DirectCast(context.Application(AppNombre), DataTable).FiltraParametros($"CveEmpresa = {CveEmpresa}")
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then 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
End If End If
@@ -686,4 +688,50 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
#End Region #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 End Class

View File

@@ -7,8 +7,8 @@ Imports Microsoft.Reporting.WebForms
Imports System.Linq Imports System.Linq
Partial Class Bancos_RepEgresosSinComprobante Partial Class Bancos_RepEgresosSinComprobante
Inherits ClsPaginas Inherits ClsPaginas
#Region " PROPIEDADES " #Region " PROPIEDADES "
Private Property DtDatos As DataTable Private Property DtDatos As DataTable
Get Get
@@ -25,9 +25,9 @@ Partial Class Bancos_RepEgresosSinComprobante
Set(value As DataTable) Set(value As DataTable)
ViewState("DtFuncionariosEmpleados") = value ViewState("DtFuncionariosEmpleados") = value
End Set End Set
End Property End Property
#End Region #End Region
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then If Not Page.IsPostBack Then
@@ -295,12 +295,16 @@ Partial Class Bancos_RepEgresosSinComprobante
Dim CveCuenta As Integer = 0 Dim CveCuenta As Integer = 0
Dim IdCtaContPersonal As Integer = 0 Dim IdCtaContPersonal As Integer = 0
Dim CveConceptoContable As Integer Dim CveConceptoContable As Integer
Dim TipoMovtoOtIngresos As Boolean = True
Dim TipoMovtoConcepto As Boolean = False
Select Case gr.DataKey("CveConceptoContable").ToEntero Select Case gr.DataKey("CveConceptoContable").ToEntero
Case 10 Case 10
CveConceptoContable = 21 CveConceptoContable = 21
Case 28 Case 28
CveConceptoContable = 29 CveConceptoContable = 29
TipoMovtoOtIngresos = False
TipoMovtoConcepto = True
Case 37 Case 37
CveConceptoContable = 43 CveConceptoContable = 43
Case 42 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, 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) "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, gr.DataKey("CveIE").ToEntero, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CvePersonal:=gr.DataKey("CvePersonal").ToEntero,
ImporteMX:=gr.DataKey("Saldo").ToDecimal, CveCuenta:=CveCuenta) Then ImporteMX:=gr.DataKey("Saldo").ToDecimal, CveCuenta:=CveCuenta) Then
MsgError = "Ocurrio un error al saldar el movimiento" MsgError = "Ocurrio un error al saldar el movimiento"
Exit For Exit For
End If 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 ImporteMX:=gr.DataKey("Saldo").ToDecimal, CveCuenta:=CveCuenta) Then
MsgError = "Ocurrio un error al saldar el movimiento" MsgError = "Ocurrio un error al saldar el movimiento"
Exit For Exit For
@@ -392,33 +396,33 @@ Partial Class Bancos_RepEgresosSinComprobante
End If End If
ImprimirPDF($"Empresas/Grales/Formatos/{Archivo}", DtDatos, params, String.Format("EgresosSinComprovante-{0}", Now.ToDateTime.ToShortDateString), Formato:=Formato) ImprimirPDF($"Empresas/Grales/Formatos/{Archivo}", DtDatos, params, String.Format("EgresosSinComprovante-{0}", Now.ToDateTime.ToShortDateString), Formato:=Formato)
End If End If
End Sub End Sub
#Region "PROVEEDORES" #Region "PROVEEDORES"
Protected Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click Protected Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
ImprimirReportePdf("RepEgresosSinComprobante.rdlc", DtDatos.FiltraParametros(" RazonSocial is not null "), "EXCEL") ImprimirReportePdf("RepEgresosSinComprobante.rdlc", DtDatos.FiltraParametros(" RazonSocial is not null "), "EXCEL")
End Sub End Sub
Private Sub LinkPDF_Click(sender As Object, e As EventArgs) Handles LinkPDF.Click Private Sub LinkPDF_Click(sender As Object, e As EventArgs) Handles LinkPDF.Click
ImprimirReportePdf("RepEgresosSinComprobante.rdlc", DtDatos.FiltraParametros(" RazonSocial is not null ")) ImprimirReportePdf("RepEgresosSinComprobante.rdlc", DtDatos.FiltraParametros(" RazonSocial is not null "))
End Sub End Sub
#End Region #End Region
#Region "FUNCIONARIOS/EMPLEADOS" #Region "FUNCIONARIOS/EMPLEADOS"
Protected Sub LnkExportarFuncionarios_Click(sender As Object, e As EventArgs) Protected Sub LnkExportarFuncionarios_Click(sender As Object, e As EventArgs)
ImprimirReportePdf("RepEgresosSinComprobanteFuncionarios.rdlc", DtFuncionariosEmpleados, "EXCEL") ImprimirReportePdf("RepEgresosSinComprobanteFuncionarios.rdlc", DtFuncionariosEmpleados, "EXCEL")
End Sub End Sub
Protected Sub LnkPDFFuncionarios_Click(sender As Object, e As EventArgs) Protected Sub LnkPDFFuncionarios_Click(sender As Object, e As EventArgs)
ImprimirReportePdf("RepEgresosSinComprobanteFuncionarios.rdlc", DtFuncionariosEmpleados) ImprimirReportePdf("RepEgresosSinComprobanteFuncionarios.rdlc", DtFuncionariosEmpleados)
End Sub End Sub
#End Region #End Region
#End Region #End Region
End Class End Class

View File

@@ -1102,12 +1102,12 @@ Partial Class Compras_Compras
End Set End Set
End Property End Property
Private Property CveConceptoContable As Integer Private Property CveTipoConcepto As Integer
Get Get
Return ViewState("CveConceptoContable").ToString.ToEntero Return ViewState("CveTipoConcepto").ToString.ToEntero
End Get End Get
Set(value As Integer) Set(value As Integer)
ViewState("CveConceptoContable") = value ViewState("CveTipoConcepto") = value
End Set End Set
End Property End Property
@@ -1130,7 +1130,7 @@ Partial Class Compras_Compras
SubTotalOriginal = 0 SubTotalOriginal = 0
CveConceptoContableAlmacen = 0 CveConceptoContableAlmacen = 0
EsNoDeducible = False EsNoDeducible = False
CveTipoConcepto = 1
'******** Prorrateo ******************************************** '******** Prorrateo ********************************************
If UsuarioActual.Empresa.Funcionalidad(117) <> "" Then If UsuarioActual.Empresa.Funcionalidad(117) <> "" Then
btnProrateo.Visible = True btnProrateo.Visible = True
@@ -1595,23 +1595,20 @@ Partial Class Compras_Compras
HplAddClasificacion.Visible = False HplAddClasificacion.Visible = False
ImgClasificacion.Visible = False ImgClasificacion.Visible = False
End If End If
CveConceptoContable = 5
'If CargoFactura Then
' 'If UsuarioActual.Empresa.Funcionalidad(128) = "1" Then
' ' If TmpDT.MAX("CvePS").ToEntero > 0 Then
'If CargoFactura Then ' ' BtnGuardar.Enabled = False
' 'If UsuarioActual.Empresa.Funcionalidad(128) = "1" Then ' ' RegistraScript($"AbrirVentana('/OC/PopUpBuscarReq.aspx?V=VOCCOMP&P={CveProveedor}&Masterimpoup=true',1000,600,'S'); return false;")
' ' If TmpDT.MAX("CvePS").ToEntero > 0 Then
' ' BtnGuardar.Enabled = False ' ' End If
' ' RegistraScript($"AbrirVentana('/OC/PopUpBuscarReq.aspx?V=VOCCOMP&P={CveProveedor}&Masterimpoup=true',1000,600,'S'); return false;") ' 'End If
'End If
' ' End If
' 'End If
'End If 'RegistraScript("ScrollVentanaAddProducto();")
'RegistraScript("ScrollVentanaAddProducto();")
End Sub End Sub
#Region "C A R G A S" #Region "C A R G A S"
@@ -2244,7 +2241,7 @@ Partial Class Compras_Compras
TxtDocumentoImporteCaja.Text = TotalTemp.FormatoNumero TxtDocumentoImporteCaja.Text = TotalTemp.FormatoNumero
TxtOtrosImpuestos.Text = OtrosImpuestos.FormatoNumero TxtOtrosImpuestos.Text = OtrosImpuestos.FormatoNumero
If OtrosImpuestos > 0 Then TrOtrosImpuestos.Visible = True 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 HFDiferenciaCompra.Value = TxtTotal.Text
HdnCompraSaldo.Value = TotalTemp.ToString HdnCompraSaldo.Value = TotalTemp.ToString
CompraSaldo = TotalTemp CompraSaldo = TotalTemp
@@ -2501,7 +2498,8 @@ Partial Class Compras_Compras
DdlRetIVAConcepto.SelectedValueExist(dr("CveRetIVAConcepto").ToString) 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 HdnCveEstatusFactura.Value = dr("CveEstatusFactura").ToString
LblCompraEstatus.Text = dr("EstatusFactura").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, 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, 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, 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 ViewState("CveCompra") = ObjCompras.CveCompra
If ObjCompras.DtResultados.Rows.Count > 0 Then ViewState("CompraFolio") = ObjCompras.DtResultados.Rows(0)("vFolio").ToString 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 IdCtaContable = 0
CveCuenta = 0 CveCuenta = 0
End If 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 If Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") Then
importeMovimiento = importeProv importeMovimiento = importeProv
importeMN = importeMovimiento * tipoCambioActual * Multiplicador importeMN = importeMovimiento * tipoCambioActual * Multiplicador
If tipoCambioActual > 1 Then Concepto += $" TC:{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}" If tipoCambioActual > 1 Then Concepto += $" TC:{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}"
Dim CveConceptoComplementario As Integer = 201
If tipoCambioActual = 1 Then If CveTipoConcepto = 2 Then CveConceptoComplementario = 310
IdCtaContable = CtaProveedor
CveCuenta = CveCuentaProveedor If tipoCambioActual = 1 Then
Else IdCtaContable = CtaProveedor
IdCtaContable = CtaProveedorComplementaria CveCuenta = CveCuentaProveedor
CveCuenta = CveCuentaProveedorComplementaria Else
If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or CveCuenta > 0 Or UsuarioActual.CveEmpresa = 119) Then 'Cuando tiene complementaria lo dividimos en dos Then IdCtaContable = CtaProveedorComplementaria
importeMN = importeMovimiento CveCuenta = CveCuentaProveedorComplementaria
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 If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or CveCuenta > 0 Or UsuarioActual.CveEmpresa = 119) Then 'Cuando tiene complementaria lo dividimos en dos Then
ErrorPrepoliza = True importeMN = importeMovimiento
End If 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
End If ErrorPrepoliza = True
IdCtaContable = CtaProveedorExtranjera End If
CveCuenta = CveCuentaProveedorExtranjera End If
End If IdCtaContable = CtaProveedorExtranjera
End If CveCuenta = CveCuentaProveedorExtranjera
End If
Case 59 'Documentos End If
Case 59 'Documentos
importeMovimiento = importeCreditos importeMovimiento = importeCreditos
importeMN = importeMovimiento * tipoCambioActual * Multiplicador importeMN = importeMovimiento * tipoCambioActual * Multiplicador
If ObjConta.GetRetCuenta(ConceptoContable, CveProveedor) Then If ObjConta.GetRetCuenta(ConceptoContable, CveProveedor) Then
@@ -7452,7 +7454,7 @@ Partial Class Compras_Compras
End If End If
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 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 ErrorMovtosRetISR = True
End If End If
@@ -11958,7 +11960,7 @@ Partial Class Compras_Compras
SubTotalConceptos = SubTotal SubTotalConceptos = SubTotal
GvPS.DataSource = TmpDT : GvPS.DataBind() 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 'EN ESPERA DE ALGUN CASO QUE LO NECESITE - IPP 5 DICIEMBRE 2016
'TempSubTotal = TempSubTotal - SubTotal 'TempSubTotal = TempSubTotal - SubTotal
@@ -16471,7 +16473,7 @@ Partial Class Compras_Compras
TempIEPS = TxtIEPS.Text.ToDouble TempIEPS = TxtIEPS.Text.ToDouble
TempRetIVA = TxtRetIVA.Text.ToDouble TempRetIVA = TxtRetIVA.Text.ToDouble
TempRetISR = TxtRetISR.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 DifTotales = TxtTotal.Text.ToDouble - TempTotal
Dim DiferenciaPermitida = 0.6 Dim DiferenciaPermitida = 0.6
@@ -19367,12 +19369,12 @@ Partial Class Compras_Compras
End Sub End Sub
Public Sub LblProveedor_OnClick(sender As Object, e As EventArgs) Handles LblProveedor.Click 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:" LblProveedor.Text = "Acreedor:"
CveConceptoContable = 305 CveTipoConcepto = 2
Else Else
LblProveedor.Text = "Proveedor:" LblProveedor.Text = "Proveedor:"
CveConceptoContable = 5 CveTipoConcepto = 1
End If End If
End Sub End Sub

View File

@@ -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") 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 Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
Dim params As New List(Of ReportParameter) 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) 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 If Imagen.Exists Then
params.Add(New ReportParameter("LogoPath", logouri)) params.Add(New ReportParameter("LogoPath", logouri))
@@ -2433,7 +2438,7 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("LogoPath", "")) params.Add(New ReportParameter("LogoPath", ""))
End If 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("Concepto", "Salida por Prestamo"))
params.Add(New ReportParameter("Almacen", Almacen)) params.Add(New ReportParameter("Almacen", Almacen))
params.Add(New ReportParameter("Fecha", Fecha)) params.Add(New ReportParameter("Fecha", Fecha))
@@ -2447,37 +2452,43 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("FacturadoA", NombreCliente)) params.Add(New ReportParameter("FacturadoA", NombreCliente))
If (UsuarioActual.CveEmpresa = 72) Then If (UsuarioActual.CveEmpresa = 72) Then
params.Add(New ReportParameter("DomicilioFiscal", DomicilioFiscalCompu)) 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 Else
params.Add(New ReportParameter("LogoPath", "")) params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
End If End If
If CveConcepto = 21 Then
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) ImprimirPDF(Archivo, DtMovimientos, params, String.Format("Salida por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios")
params.Add(New ReportParameter("Concepto", "Entrada por Prestamo")) ElseIf CveConcepto = 22 Then
params.Add(New ReportParameter("Almacen", Almacen)) ImprimirPDF(Archivo, DtMovimientos, params, String.Format("Entrada por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios")
params.Add(New ReportParameter("Fecha", Fecha)) End If
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
params.Add(New ReportParameter("Folio", Folio)) 'Case 22 'ENTRADA POR PRESTAMO
params.Add(New ReportParameter("Descuentos", "")) ' Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
params.Add(New ReportParameter("IVA", "")) ' Dim params As New List(Of ReportParameter)
params.Add(New ReportParameter("Total", ""))
'params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo))) ' Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio))) ' If Imagen.Exists Then
params.Add(New ReportParameter("FacturadoA", NombreCliente)) ' params.Add(New ReportParameter("LogoPath", logouri))
If (UsuarioActual.CveEmpresa = 72) Then ' Else
params.Add(New ReportParameter("DomicilioFiscal", DomicilioFiscalCompu)) ' params.Add(New ReportParameter("LogoPath", ""))
End If ' End If
ImprimirPDF("Empresas/Grales/Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Entrada por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios")
' 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 Case 24 'SALIDA POR RESGUARDO
If DtMovimientos(0)("CveTipoAlmacen").ToString.ToEntero = 20 Or DtMovimientos(0)("CveTipoAlmacen").ToString.ToEntero = 19 Then 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)) Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))

View File

@@ -688,9 +688,10 @@ Partial Class Compras_eFacturas
GvD.DataSource = Nothing GvD.DataSource = Nothing
End If End If
End If End If
ObjDatos.Dispose()
LblRegistros.Text = String.Format("{0} Registros", ObjDatos.DtResultados.FiltraParametros("TipoComprobante <> 'P'").Rows.Count.ToString("N0")) 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")) 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 If DtPagos IsNot Nothing AndAlso DtPagos.Rows.Count > 0 Then
GvPagos.DataSource = DtPagos GvPagos.DataSource = DtPagos
@@ -1252,16 +1253,10 @@ Partial Class Compras_eFacturas
If txtFechaF.Text = "" Then FechaF = "-1" If txtFechaF.Text = "" Then FechaF = "-1"
Dim Folio = If(TxtFolio.Text.Trim.Length > 0, String.Format("%{0}%", TxtFolio.Text.Trim.ToUpper), "-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 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 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 If Tab.ActiveTabIndex = 0 Then
dt = ObjDatos.DtResultados.FiltraParametros("TipoComprobante <> 'P'") dt = ObjDatos.DtResultados.FiltraParametros("TipoComprobante <> 'P'")
Else Else
@@ -1269,6 +1264,15 @@ Partial Class Compras_eFacturas
End If 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) Dim params As New List(Of ReportParameter)
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
@@ -1283,8 +1287,6 @@ Partial Class Compras_eFacturas
End If End If
ImprimirPDF("Empresas/Grales/Formatos/RepFacturas.rdlc", dt, params, $"FacturasBuzon_{Now.ToString("yyyyMMyyddmmss")}", Tipo) ImprimirPDF("Empresas/Grales/Formatos/RepFacturas.rdlc", dt, params, $"FacturasBuzon_{Now.ToString("yyyyMMyyddmmss")}", Tipo)
Else
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
End If End If
End Sub End Sub

View File

@@ -12,110 +12,110 @@
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server"> <asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
</asp:Content> </asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server"> <asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<table border="0" class=""> <table border="0" class="" style="width: 100%">
<tr> <tr>
<td> <td>
<table class="table table-striped table-advance table-hover Widthall"> <table class="table table-striped table-advance table-hover Widthall" style="width:100%">
<thead> <thead>
<tr class="Titulos"> <tr class="Titulos">
<th width="40px"> <th width="10%">
<asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="false" Text="" CommandArgument="LimiteMaximo;0"> <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="false" Text="" CommandArgument="LimiteMaximo;0">
Clave Clave
<asp:Literal ID="Literal1" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal> <asp:Literal ID="Literal1" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
</asp:LinkButton> </asp:LinkButton>
</th> </th>
<th width="200px"> <th width="200px">
<asp:LinkButton ID="LbLimite" runat="server" CausesValidation="false" Text="" CommandArgument="LimiteMaximo;0"> <asp:LinkButton ID="LbLimite" runat="server" CausesValidation="false" Text="" CommandArgument="LimiteMaximo;0">
Tipo Contrato Tipo Contrato
<asp:Literal ID="ImgLimiteMaximo" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal> <asp:Literal ID="ImgLimiteMaximo" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
</asp:LinkButton> </asp:LinkButton>
</th> </th>
<th width="200px"> <th width="200px">
<asp:LinkButton ID="LbComision" runat="server" CausesValidation="false" Text="" CommandArgument="Comision;0"> <asp:LinkButton ID="LbComision" runat="server" CausesValidation="false" Text="" CommandArgument="Comision;0">
Descripción Descripción
<asp:Literal ID="ImgComision" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal> <asp:Literal ID="ImgComision" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
</asp:LinkButton> </asp:LinkButton>
</th> </th>
<th></th> <th></th>
<th width="165px">Comandos</th> <th width="165px">Comandos</th>
</tr> </tr>
</thead> </thead>
<tr> <tr>
<td style="width:40px;"></td> <td style="width: 15%;"></td>
<td style="text-align: center"> <td style="text-align: center; width: 200px">
<asp:TextBox ID="TxtTipoContrato" runat="server" width="180px"></asp:TextBox> <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> <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> <ajax:ValidatorCalloutExtender ID="VCOLimite" runat="server" HighlightCssClass="vco" TargetControlID="RFVLimite" Width="300px"></ajax:ValidatorCalloutExtender>
</td> </td>
<td style="text-align: center"> <td style="text-align: left; width: 800px">
<asp:TextBox ID="TxtDescripcion" runat="server" width="180px"></asp:TextBox> <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> <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> <ajax:ValidatorCalloutExtender ID="VCEDescripcion" runat="server" HighlightCssClass="vco" TargetControlID="RFVDescripcion" Width="300px"></ajax:ValidatorCalloutExtender>
</td> </td>
<td></td> <td style="width:0%"></td>
<td style="text-align: center"> <td style="text-align: center">
<asp:LinkButton ID="LbAgregarC" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardarCaracteristicas"></asp:LinkButton></td> <asp:LinkButton ID="LbAgregarC" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardarCaracteristicas"></asp:LinkButton></td>
</tr> </tr>
</table> </table>
<asp:UpdatePanel ID="UpGVContratos" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpGVContratos" runat="server" UpdateMode="Conditional">
<ContentTemplate> <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"> <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> <Columns>
<asp:BoundField DataField="CveContratoTipo" ReadOnly="true" /> <asp:BoundField DataField="CveContratoTipo" ItemStyle-Width="10%" ItemStyle-Wrap="false" />
<asp:TemplateField ItemStyle-Width="180px" ItemStyle-HorizontalAlign="left"> <asp:TemplateField ItemStyle-Width="15%" ItemStyle-HorizontalAlign="left">
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="LtlContrato" runat="server" Text='<%# Eval("ContratoTipo", "&nbsp;{0}") %>'></asp:Literal> <asp:Literal ID="LtlContrato" runat="server" Text='<%# Eval("ContratoTipo", "&nbsp;{0}") %>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
<EditItemTemplate> <EditItemTemplate>
<asp:TextBox ID="TxtTipoContrato" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("ContratoTipo")%>' Width="180px"></asp:TextBox> <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> <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> <ajax:ValidatorCalloutExtender ID="VCOCaracteristica" runat="server" HighlightCssClass="vco" TargetControlID="RFVCaracteristica" Width="100px"></ajax:ValidatorCalloutExtender>
</EditItemTemplate> </EditItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField ItemStyle-Width="200px"> <asp:TemplateField ItemStyle-Width="200px">
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="LtlDescripcion" runat="server" Text='<%# Eval("Descripcion", "&nbsp;{0}") %>'></asp:Literal> <asp:Literal ID="LtlDescripcion" runat="server" Text='<%# Eval("Descripcion", "&nbsp;{0}") %>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
<EditItemTemplate> <EditItemTemplate>
<asp:TextBox ID="TxtDescripcion" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Descripcion")%>' Width="180px"></asp:TextBox> <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> <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> <ajax:ValidatorCalloutExtender ID="VCODescripcion" runat="server" HighlightCssClass="vco" TargetControlID="RFVDescripcion" Width="100px"></ajax:ValidatorCalloutExtender>
</EditItemTemplate> </EditItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Editar" ItemStyle-Width="89px"> <asp:TemplateField HeaderText="Editar" ItemStyle-Width="1px">
<EditItemTemplate> <EditItemTemplate>
<center> <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="ImageButton1" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>"/>
&nbsp;<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>" /> &nbsp;<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> </center>
</EditItemTemplate> </EditItemTemplate>
<ItemTemplate> <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>" /> <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> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Eliminar" ItemStyle-Width="83px"> <asp:TemplateField HeaderText="Eliminar" ItemStyle-Width="1px">
<ItemTemplate> <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" /> <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> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
</Columns> </Columns>
<AlternatingRowStyle CssClass="TextoAlterno" /> <AlternatingRowStyle CssClass="TextoAlterno" />
</asp:GridView> </asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
</table>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content> </asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server"> <asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">

View File

@@ -15,9 +15,9 @@ Partial Class Contratos_CatContratosTipos
#Region " CARGAS " #Region " CARGAS "
Private Sub CargaDatos() Private Sub CargaDatos()
Dim Objeto As New ClsContratos Dim Objeto As New ClsContratos
If Objeto.GetContratosTipos() Then If Objeto.GetContratosTipos(UsuarioActual.CveEmpresa) Then
GvContratos.DataSource = Objeto.DtResultados GvContratos.DataSource = Objeto.DtResultados
GlobalDTContratosTipos = Objeto.DtResultados GlobalDTContratosTipos(UsuarioActual.CveEmpresa) = Objeto.DtResultados
End If End If
GvContratos.DataBind() GvContratos.DataBind()
Objeto.Dispose() Objeto.Dispose()

View File

@@ -227,10 +227,10 @@
<Source>External</Source> <Source>External</Source>
<Value>=Parameters!QR.Value</Value> <Value>=Parameters!QR.Value</Value>
<Sizing>FitProportional</Sizing> <Sizing>FitProportional</Sizing>
<Top>5.87436in</Top> <Top>5.8661in</Top>
<Left>0.03915in</Left> <Left>0.03915in</Left>
<Height>0.95455in</Height> <Height>1.10236in</Height>
<Width>1.49755in</Width> <Width>1.10236in</Width>
<ZIndex>5</ZIndex> <ZIndex>5</ZIndex>
<Style> <Style>
<Border> <Border>

View File

@@ -1447,9 +1447,9 @@
<Source>External</Source> <Source>External</Source>
<Value>=Parameters!QR.Value</Value> <Value>=Parameters!QR.Value</Value>
<Sizing>FitProportional</Sizing> <Sizing>FitProportional</Sizing>
<Top>3.15082in</Top> <Top>3.09526in</Top>
<Left>0.15526in</Left> <Left>0.15526in</Left>
<Height>0.95455in</Height> <Height>1.13682in</Height>
<Width>1.49755in</Width> <Width>1.49755in</Width>
<ZIndex>6</ZIndex> <ZIndex>6</ZIndex>
<Style> <Style>

View File

@@ -992,6 +992,9 @@
<Height>0.6cm</Height> <Height>0.6cm</Height>
<Width>1.57396cm</Width> <Width>1.57396cm</Width>
<ZIndex>9</ZIndex> <ZIndex>9</ZIndex>
<Visibility>
<Hidden>=IIF(Parameters!FacturaProveedor.Value&lt;&gt;"",False,True)</Hidden>
</Visibility>
<Style> <Style>
<Border> <Border>
<Style>None</Style> <Style>None</Style>
@@ -1573,6 +1576,12 @@
<DataType>String</DataType> <DataType>String</DataType>
<Prompt>ReportParameter1</Prompt> <Prompt>ReportParameter1</Prompt>
</ReportParameter> </ReportParameter>
<ReportParameter Name="NombreRecibio">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
</ReportParameters> </ReportParameters>
<EmbeddedImages> <EmbeddedImages>
<EmbeddedImage Name="compuproveedores"> <EmbeddedImage Name="compuproveedores">

View File

@@ -481,7 +481,7 @@
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>REMITENTE O EXPEDIDOR: </Value> <Value>REMITENTE O EXPEDIDOR: </Value>
<Style> <Style>
<FontFamily>Myriad Pro</FontFamily> <FontFamily>Myriad Pro</FontFamily>
<FontSize>8pt</FontSize> <FontSize>8pt</FontSize>
@@ -661,7 +661,7 @@
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>DESTINATARIO: </Value> <Value>DESTINATARIO: </Value>
<Style> <Style>
<FontFamily>Myriad Pro</FontFamily> <FontFamily>Myriad Pro</FontFamily>
<FontSize>8pt</FontSize> <FontSize>8pt</FontSize>
@@ -1214,7 +1214,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox1</rd:DefaultName> <rd:DefaultName>Textbox1</rd:DefaultName>
<Top>7.61768cm</Top> <Top>8.25268cm</Top>
<Left>0.20001cm</Left> <Left>0.20001cm</Left>
<Height>0.62599cm</Height> <Height>0.62599cm</Height>
<Width>19.21855cm</Width> <Width>19.21855cm</Width>
@@ -1267,7 +1267,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox1</rd:DefaultName> <rd:DefaultName>Textbox1</rd:DefaultName>
<Top>8.24367cm</Top> <Top>8.87867cm</Top>
<Left>0.20001cm</Left> <Left>0.20001cm</Left>
<Height>1.50794cm</Height> <Height>1.50794cm</Height>
<Width>19.21855cm</Width> <Width>19.21855cm</Width>
@@ -1298,143 +1298,6 @@
<PaddingBottom>2pt</PaddingBottom> <PaddingBottom>2pt</PaddingBottom>
</Style> </Style>
</Textbox> </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"> <Textbox Name="Textbox30">
<CanGrow>true</CanGrow> <CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether> <KeepTogether>true</KeepTogether>
@@ -1468,11 +1331,11 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox21</rd:DefaultName> <rd:DefaultName>Textbox21</rd:DefaultName>
<Top>13.24837cm</Top> <Top>13.69816cm</Top>
<Left>2.21206cm</Left> <Left>2.20199cm</Left>
<Height>1.2cm</Height> <Height>1.2cm</Height>
<Width>5.78664cm</Width> <Width>5.78664cm</Width>
<ZIndex>14</ZIndex> <ZIndex>13</ZIndex>
<Style> <Style>
<Border> <Border>
<Style>None</Style> <Style>None</Style>
@@ -1503,11 +1366,11 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox22</rd:DefaultName> <rd:DefaultName>Textbox22</rd:DefaultName>
<Top>11.58471cm</Top> <Top>12.0345cm</Top>
<Left>2.21206cm</Left> <Left>2.20199cm</Left>
<Height>0.6cm</Height> <Height>0.6cm</Height>
<Width>5.78664cm</Width> <Width>5.78664cm</Width>
<ZIndex>15</ZIndex> <ZIndex>14</ZIndex>
<Style> <Style>
<Border> <Border>
<Style>None</Style> <Style>None</Style>
@@ -1551,11 +1414,11 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox21</rd:DefaultName> <rd:DefaultName>Textbox21</rd:DefaultName>
<Top>13.24837cm</Top> <Top>13.69816cm</Top>
<Left>11.60471cm</Left> <Left>11.59464cm</Left>
<Height>1.2cm</Height> <Height>1.2cm</Height>
<Width>5.78664cm</Width> <Width>5.78664cm</Width>
<ZIndex>16</ZIndex> <ZIndex>15</ZIndex>
<Style> <Style>
<Border> <Border>
<Style>None</Style> <Style>None</Style>
@@ -1586,11 +1449,11 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox22</rd:DefaultName> <rd:DefaultName>Textbox22</rd:DefaultName>
<Top>11.58471cm</Top> <Top>12.0345cm</Top>
<Left>11.60471cm</Left> <Left>11.59464cm</Left>
<Height>0.6cm</Height> <Height>0.6cm</Height>
<Width>5.78664cm</Width> <Width>5.78664cm</Width>
<ZIndex>17</ZIndex> <ZIndex>16</ZIndex>
<Style> <Style>
<Border> <Border>
<Style>None</Style> <Style>None</Style>
@@ -1621,11 +1484,11 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox22</rd:DefaultName> <rd:DefaultName>Textbox22</rd:DefaultName>
<Top>12.88411cm</Top> <Top>13.3339cm</Top>
<Left>2.21206cm</Left> <Left>2.20199cm</Left>
<Height>0.52062cm</Height> <Height>0.52062cm</Height>
<Width>5.78664cm</Width> <Width>5.78664cm</Width>
<ZIndex>18</ZIndex> <ZIndex>17</ZIndex>
<Style> <Style>
<Border> <Border>
<Style>None</Style> <Style>None</Style>
@@ -1656,11 +1519,11 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox22</rd:DefaultName> <rd:DefaultName>Textbox22</rd:DefaultName>
<Top>12.88411cm</Top> <Top>13.3339cm</Top>
<Left>11.60471cm</Left> <Left>11.59464cm</Left>
<Height>0.52062cm</Height> <Height>0.52062cm</Height>
<Width>5.78664cm</Width> <Width>5.78664cm</Width>
<ZIndex>19</ZIndex> <ZIndex>18</ZIndex>
<Style> <Style>
<Border> <Border>
<Style>None</Style> <Style>None</Style>
@@ -1776,7 +1639,7 @@
<Left>0.23022cm</Left> <Left>0.23022cm</Left>
<Height>2.22232cm</Height> <Height>2.22232cm</Height>
<Width>19.21855cm</Width> <Width>19.21855cm</Width>
<ZIndex>20</ZIndex> <ZIndex>19</ZIndex>
<Style> <Style>
<Border> <Border>
<Style>Solid</Style> <Style>Solid</Style>
@@ -1819,7 +1682,7 @@
<Left>0.23022cm</Left> <Left>0.23022cm</Left>
<Height>0.62599cm</Height> <Height>0.62599cm</Height>
<Width>19.21855cm</Width> <Width>19.21855cm</Width>
<ZIndex>21</ZIndex> <ZIndex>20</ZIndex>
<Style> <Style>
<Border> <Border>
<Style>Solid</Style> <Style>Solid</Style>
@@ -1839,11 +1702,174 @@
<PaddingBottom>2pt</PaddingBottom> <PaddingBottom>2pt</PaddingBottom>
</Style> </Style>
</Textbox> </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> </ReportItems>
<Height>8.91698in</Height> <Height>8.91698in</Height>
<Style /> <Style />
</Body> </Body>
<Width>7.7174in</Width> <Width>7.657in</Width>
<Page> <Page>
<PageHeader> <PageHeader>
<Height>3.39287cm</Height> <Height>3.39287cm</Height>
@@ -2084,12 +2110,12 @@
</Style> </Style>
</PageHeader> </PageHeader>
<PageFooter> <PageFooter>
<Height>1.23527cm</Height> <Height>1.23526cm</Height>
<PrintOnFirstPage>true</PrintOnFirstPage> <PrintOnFirstPage>true</PrintOnFirstPage>
<PrintOnLastPage>true</PrintOnLastPage> <PrintOnLastPage>true</PrintOnLastPage>
<ReportItems> <ReportItems>
<Line Name="Line1"> <Line Name="Line1">
<Top>0.03528cm</Top> <Top>0.03527cm</Top>
<Left>0.22015cm</Left> <Left>0.22015cm</Left>
<Height>0cm</Height> <Height>0cm</Height>
<Width>19.22862cm</Width> <Width>19.22862cm</Width>
@@ -2119,7 +2145,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox13</rd:DefaultName> <rd:DefaultName>Textbox13</rd:DefaultName>
<Top>0.14111cm</Top> <Top>0.1411cm</Top>
<Left>0.22015cm</Left> <Left>0.22015cm</Left>
<Height>0.54708cm</Height> <Height>0.54708cm</Height>
<Width>1.55632cm</Width> <Width>1.55632cm</Width>
@@ -2153,7 +2179,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox14</rd:DefaultName> <rd:DefaultName>Textbox14</rd:DefaultName>
<Top>0.14111cm</Top> <Top>0.1411cm</Top>
<Left>1.77647cm</Left> <Left>1.77647cm</Left>
<Height>0.54708cm</Height> <Height>0.54708cm</Height>
<Width>4.96223cm</Width> <Width>4.96223cm</Width>
@@ -2188,7 +2214,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox13</rd:DefaultName> <rd:DefaultName>Textbox13</rd:DefaultName>
<Top>0.14111cm</Top> <Top>0.1411cm</Top>
<Left>6.84454cm</Left> <Left>6.84454cm</Left>
<Height>0.54708cm</Height> <Height>0.54708cm</Height>
<Width>2.84562cm</Width> <Width>2.84562cm</Width>
@@ -2223,7 +2249,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox14</rd:DefaultName> <rd:DefaultName>Textbox14</rd:DefaultName>
<Top>0.14111cm</Top> <Top>0.1411cm</Top>
<Left>9.69015cm</Left> <Left>9.69015cm</Left>
<Height>0.54708cm</Height> <Height>0.54708cm</Height>
<Width>4.68641cm</Width> <Width>4.68641cm</Width>
@@ -2257,7 +2283,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox14</rd:DefaultName> <rd:DefaultName>Textbox14</rd:DefaultName>
<Top>0.17639cm</Top> <Top>0.17638cm</Top>
<Left>14.62633cm</Left> <Left>14.62633cm</Left>
<Height>0.54708cm</Height> <Height>0.54708cm</Height>
<Width>4.8023cm</Width> <Width>4.8023cm</Width>
@@ -2289,7 +2315,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox14</rd:DefaultName> <rd:DefaultName>Textbox14</rd:DefaultName>
<Top>0.68819cm</Top> <Top>0.68818cm</Top>
<Left>0.22015cm</Left> <Left>0.22015cm</Left>
<Height>0.54708cm</Height> <Height>0.54708cm</Height>
<Width>6.21751cm</Width> <Width>6.21751cm</Width>

View File

@@ -1,151 +1,151 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="RepArrastre.aspx.cs" Inherits="GPS_RepArrastre" %> <%@ 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 ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content> </asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server"> <asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style> <style>
#map { #map {
height: 450px; height: 450px;
} }
</style> </style>
</asp:Content> </asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server"> <asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
Reporte de Arrastre Reporte de Arrastre
</asp:Content> </asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server"> <asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
</asp:Content> </asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server"> <asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<li> <li>
<asp:LinkButton ID="LnkApagarvehiculo" runat="server">Apagar vehiculo</asp:LinkButton> <asp:LinkButton ID="LnkApagarvehiculo" runat="server">Apagar vehiculo</asp:LinkButton>
</li> </li>
</asp:Content> </asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server"> <asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
</asp:Content> </asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server"> <asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter" style=""> <div class="portlet solid grey-cascade portlet-filter" style="">
<div class="portlet-title portlet-filterT smalltitle" style=""> <div class="portlet-title portlet-filterT smalltitle" style="">
<div class="tools"> <div class="tools">
<asp:Button ID="BtnConsultar" OnClick="BtnConsultar_Click" runat="server" Text="Consultar" class="btn btn-primary" /> <asp:Button ID="BtnConsultar" OnClick="BtnConsultar_Click" runat="server" Text="Consultar" class="btn btn-primary" />
<a href="javascript:;" class="expand"></a> <a href="javascript:;" class="expand"></a>
</div> </div>
<div class="titlefiltros caption"> <div class="titlefiltros caption">
<div class="row"> <div class="row">
<div class="col-md-1 truncate"> <div class="col-md-1 truncate">
Vehiculo: Vehiculo:
</div> </div>
<div class="col-md-3 "> <div class="col-md-3 ">
<asp:DropDownList ID="DdlDispositivo" runat="server" DataTextField="NombreVehiculo" DataValueField="CveDispositivo" CssClass="form-control input-sm select2me"> <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:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="portlet-body" style="display: none;"> <div class="portlet-body" style="display: none;">
<asp:HiddenField ID="HdfVGrafica" ClientIDMode="Static" runat="server" /> <asp:HiddenField ID="HdfVGrafica" ClientIDMode="Static" runat="server" />
</div> </div>
</div> </div>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
<asp:UpdatePanel ID="UpInfo" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpInfo" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<div class="portlet light smmallpadding traspasorow bordered" style=""> <div class="portlet light smmallpadding traspasorow bordered" style="">
<div class="portlet-title"> <div class="portlet-title">
<div class="caption font-red"> <div class="caption font-red">
<i class="fa fa-clock-o font-red"></i> <i class="fa fa-clock-o font-red"></i>
<span class="caption-subject bold uppercase">datos vehiculo</span> <span class="caption-subject bold uppercase">datos vehiculo</span>
</div> </div>
<div class="actions"> <div class="actions">
<div class="btn-group"> <div class="btn-group">
</div> </div>
</div> </div>
<div class="tools"> <div class="tools">
<a href="javascript:;" class="collapse" data-original-title="" title=""></a> <a href="javascript:;" class="collapse" data-original-title="" title=""></a>
</div> </div>
</div> </div>
<div id="C_bodyreportes" class="portlet-body rowpadding"> <div id="C_bodyreportes" class="portlet-body rowpadding">
<asp:TextBox ID="TxtFunciones" CssClass="hidden EvalRun" runat="server"></asp:TextBox> <asp:TextBox ID="TxtFunciones" CssClass="hidden EvalRun" runat="server"></asp:TextBox>
<div class="row"> <div class="row">
<div class="col-md-4"> <div class="col-md-4">
<label style="font-weight: bold;">¿Activar funcion de arrastre?</label> <label style="font-weight: bold;">¿Activar funcion de arrastre?</label>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<asp:CheckBox ID="chkActivarArrastre" CssClass="chksino " AutoPostBack="true" OnCheckedChanged="chkActivarArrastre_CheckedChanged" Text=" " runat="server" /> <asp:CheckBox ID="chkActivarArrastre" CssClass="chksino " AutoPostBack="true" OnCheckedChanged="chkActivarArrastre_CheckedChanged" Text=" " runat="server" />
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-4"> <div class="col-md-4">
<label style="font-weight: bold;">Velocidad</label> <label style="font-weight: bold;">Velocidad</label>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<asp:Label ID="LblVelocidad" runat="server" Text="Sin Información"></asp:Label> <asp:Label ID="LblVelocidad" runat="server" Text="Sin Información"></asp:Label>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-4"> <div class="col-md-4">
<label style="font-weight: bold;">¿Encendido / Apagado?</label> <label style="font-weight: bold;">¿Encendido / Apagado?</label>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<asp:Label ID="LblEncApa" runat="server" Text="Sin Información"></asp:Label> <asp:Label ID="LblEncApa" runat="server" Text="Sin Información"></asp:Label>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-4"> <div class="col-md-4">
<label style="font-weight: bold;">Fecha ultima Conexión</label> <label style="font-weight: bold;">Fecha ultima Conexión</label>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<asp:Label ID="LblFechaInfo" runat="server" Text="Sin Información"></asp:Label> <asp:Label ID="LblFechaInfo" runat="server" Text="Sin Información"></asp:Label>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<asp:Panel runat="server" ID="pnlAlertaActiva" Visible="false" CssClass="col-md-6"> <asp:Panel runat="server" ID="pnlAlertaActiva" Visible="false" CssClass="col-md-6">
<div id="pulsate-regular" class="portlet light smmallpadding traspasorow bordered" style=""> <div id="pulsate-regular" class="portlet light smmallpadding traspasorow bordered" style="">
<div class="portlet-title"> <div class="portlet-title">
<div class="caption font-red"> <div class="caption font-red">
<i class="fa fa-clock-o font-red"></i> <i class="fa fa-clock-o font-red"></i>
<span class="caption-subject bold uppercase">Alerta el vehiculo se encuentra en arrastre</span> <span class="caption-subject bold uppercase">Alerta el vehiculo se encuentra en arrastre</span>
</div> </div>
<div class="actions"> <div class="actions">
<div class="btn-group"> <div class="btn-group">
</div> </div>
</div> </div>
<div class="tools"> <div class="tools">
<%--<a href="javascript:;" class="collapse" data-original-title="" title=""></a>--%> <%--<a href="javascript:;" class="collapse" data-original-title="" title=""></a>--%>
</div> </div>
</div> </div>
<div class="portlet-body rowpadding"> <div class="portlet-body rowpadding">
</div> </div>
</div> </div>
</asp:Panel> </asp:Panel>
</div> </div>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
<div id="map"> <div id="map">
</div> </div>
</asp:Content> </asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server"> <asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAF7s8wwhzCVXDUYopc9mXxqaWB33cDro4&libraries=places"></script> <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 src="/Metronic/assets/global/plugins/jquery.pulsate.min.js"></script>
<script> <script>
var image = '/Imagenes/rsz_11rsz_car.png'; var image = '/Imagenes/rsz_11rsz_car.png';
var geocoder; var geocoder;
var map; var map;
@@ -156,45 +156,45 @@
var polylinesRoute = []; var polylinesRoute = [];
var directionsDisplayArray = []; var directionsDisplayArray = [];
if (jQuery('#pulsate-regular')) { if (jQuery('#pulsate-regular')) {
jQuery('#pulsate-regular').pulsate({ jQuery('#pulsate-regular').pulsate({
color: "#bf1c56" color: "#bf1c56"
}); });
} }
var retorno; var retorno;
function setCenter(myLatLn) { function setCenter(myLatLn) {
map.setCenter(myLatLn); map.setCenter(myLatLn);
} }
function addmarkerarrastre(myLatLn) {//myLatLn = { lat: -25.363, lng: 131.044 } function addmarkerarrastre(myLatLn) {//myLatLn = { lat: -25.363, lng: 131.044 }
if (markerArrastre) { if (markerArrastre) {
markerArrastre.setMap(null); markerArrastre.setMap(null);
} }
markerArrastre = new google.maps.Marker({ markerArrastre = new google.maps.Marker({
position: myLatLn, position: myLatLn,
map: map, map: map,
title: 'Activacion Arrastre' title: 'Activacion Arrastre'
}); });
} }
function addmarkerActual(myLatLn, Encencido) {//myLatLn = { lat: -25.363, lng: 131.044 } ,addmarkerActual({ lat: -25.363, lng: 131.044 }) 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 imagen = Encencido == 1 ? '/Imagenes/rsz_11rsz_cargreen.png' : '/Imagenes/rsz_11rsz_car.png';
var markerIcon = { url: imagen, labelOrigin: new google.maps.Point(26, 43) }; var markerIcon = { url: imagen, labelOrigin: new google.maps.Point(26, 43) };
if (markerActual) { if (markerActual) {
markerActual.setMap(null); markerActual.setMap(null);
} }
markerActual = new google.maps.Marker({ markerActual = new google.maps.Marker({
position: myLatLn, position: myLatLn,
map: map, map: map,
title: 'Posición Actual', title: 'Posición Actual',
icon: markerIcon icon: markerIcon
}); });
} }
function initMap() { function initMap() {
map = new google.maps.Map(document.getElementById('map'), { map = new google.maps.Map(document.getElementById('map'), {
center: { lat: 29.0628417, lng: -110.9872448 }, center: { lat: 29.0628417, lng: -110.9872448 },
zoom: 13 zoom: 13
}); });
//var ShowDiv1 = document.createElement('div'); //var ShowDiv1 = document.createElement('div');
//var ShowDivControl = new ShowDiv(ShowDiv1, map); //var ShowDivControl = new ShowDiv(ShowDiv1, map);
@@ -219,25 +219,25 @@
geocoder = new google.maps.Geocoder(); geocoder = new google.maps.Geocoder();
//google.maps.event.addListener(map, "click", function (event) { //google.maps.event.addListener(map, "click", function (event) {
// closeLastOpenedInfoWindow(); // closeLastOpenedInfoWindow();
//}); //});
directionsService = new google.maps.DirectionsService; directionsService = new google.maps.DirectionsService;
directionsDisplay = new google.maps.DirectionsRenderer; directionsDisplay = new google.maps.DirectionsRenderer;
directionsDisplay.setOptions({ suppressMarkers: true }); directionsDisplay.setOptions({ suppressMarkers: true });
directionsDisplay.setMap(map); directionsDisplay.setMap(map);
} }
function ADSBegin() { function ADSBegin() {
eval($('.EvalRun').val()); eval($('.EvalRun').val());
} }
initMap(); initMap();
//$(document).ready(function () { //$(document).ready(function () {
// initMap(); // initMap();
//}); //});
</script> </script>
</asp:Content> </asp:Content>

View File

@@ -1,100 +1,100 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Data; using System.Data;
using System.Linq; using System.Linq;
using System.Web; using System.Web;
using System.Web.UI; using System.Web.UI;
using System.Web.UI.WebControls; using System.Web.UI.WebControls;
using Extensiones; using Extensiones;
public partial class GPS_RepArrastre : ClsPaginas public partial class GPS_RepArrastre : ClsPaginas
{ {
public int CveDispositivo public int CveDispositivo
{ {
get get
{ {
if (ViewState["CveDispositivo"] != null) if (ViewState["CveDispositivo"] != null)
{ {
return ViewState["CveDispositivo"].ToString().ToEntero(); return ViewState["CveDispositivo"].ToString().ToEntero();
} }
else else
{ {
return 0; return 0;
} }
} }
set { ViewState["CveDispositivo"] = value; } set { ViewState["CveDispositivo"] = value; }
} }
protected void Page_Load(object sender, EventArgs e) protected void Page_Load(object sender, EventArgs e)
{ {
if (!IsPostBack) if (!IsPostBack)
{ {
// fijo borrar // fijo borrar
//DdlDispositivo.DataSource = get_GlobalDTDispositivosUsuarios(263965, 1928) ; //DdlDispositivo.DataSource = get_GlobalDTDispositivosUsuarios(263965, 1928) ;
DdlDispositivo.DataSource = get_GlobalDTDispositivosUsuarios(UsuarioActual.CveCliente, UsuarioActual.CveUsuario) ; DdlDispositivo.DataSource = get_GlobalDTDispositivosUsuarios(UsuarioActual.CveCliente, UsuarioActual.CveUsuario) ;
DdlDispositivo.DataBind(); DdlDispositivo.DataBind();
getArrastre(); getArrastre();
} }
} }
private void getArrastre() private void getArrastre()
{ {
CveDispositivo = DdlDispositivo.SelectedValue.ToEntero(); CveDispositivo = DdlDispositivo.SelectedValue.ToEntero();
using (ClsGPS objgps = new ClsGPS()) using (ClsGPS objgps = new ClsGPS())
{ {
if (objgps.GPS_ArrastreGET(CveDispositivo) && objgps.DtResultados.Rows.Count > 0) if (objgps.GPS_ArrastreGET(CveDispositivo) && objgps.DtResultados.Rows.Count > 0)
{ {
DataRow dtrow = objgps.DtResultados.Rows[0]; DataRow dtrow = objgps.DtResultados.Rows[0];
upInfo(dtrow); upInfo(dtrow);
} }
} }
} }
public void upInfo(DataRow dtrow) public void upInfo(DataRow dtrow)
{ {
if ( dtrow != null) if ( dtrow != null)
{ {
LblVelocidad.Text = $"{dtrow["Speed"]:N0}"; LblVelocidad.Text = $"{dtrow["Speed"]:N0}";
LblEncApa.Text = $"{dtrow["EncendidoText"]}"; LblEncApa.Text = $"{dtrow["EncendidoText"]}";
LblFechaInfo.Text = $"{dtrow["FechaTrama"]:dd/MM/yyyy HH:mm:ss}"; LblFechaInfo.Text = $"{dtrow["FechaTrama"]:dd/MM/yyyy HH:mm:ss}";
chkActivarArrastre.Checked = dtrow["ArrastreActivo"].ToString() == "1"; chkActivarArrastre.Checked = dtrow["ArrastreActivo"].ToString() == "1";
pnlAlertaActiva.Visible = dtrow["AlertaArrastre"].ToString() == "1"; pnlAlertaActiva.Visible = dtrow["AlertaArrastre"].ToString() == "1";
//LblVelocidad.Text = $"{dtrow[""]}"; //LblVelocidad.Text = $"{dtrow[""]}";
//LblVelocidad.Text = $"{dtrow[""]}";addmarkerActual({ lat: -25.363, lng: 131.044 }) //LblVelocidad.Text = $"{dtrow[""]}";addmarkerActual({ lat: -25.363, lng: 131.044 })
string pVehiculo = string.Format("{{ lat: {0}, lng: {1}}}", dtrow["Lat"], dtrow["Lng"]); string pVehiculo = string.Format("{{ lat: {0}, lng: {1}}}", dtrow["Lat"], dtrow["Lng"]);
string parrastre = string.Format("{{ lat: {0}, lng: {1}}}", dtrow["LatArrastre"], dtrow["LngArrastre"]); 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()); 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(); UpInfo.Update();
} }
} }
protected void BtnConsultar_Click(object sender, EventArgs e) protected void BtnConsultar_Click(object sender, EventArgs e)
{ {
getArrastre(); getArrastre();
} }
protected void chkActivarArrastre_CheckedChanged(object sender, EventArgs e) protected void chkActivarArrastre_CheckedChanged(object sender, EventArgs e)
{ {
using (ClsGPS objgps = new ClsGPS()) using (ClsGPS objgps = new ClsGPS())
{ {
if (objgps.GPS_ArrastreActivarDesactivar(CveDispositivo, chkActivarArrastre.Checked)){ if (objgps.GPS_ArrastreActivarDesactivar(CveDispositivo, chkActivarArrastre.Checked)){
if (objgps.GPS_ArrastreGET(CveDispositivo) && objgps.DtResultados.Rows.Count > 0) if (objgps.GPS_ArrastreGET(CveDispositivo) && objgps.DtResultados.Rows.Count > 0)
{ {
DataRow dtrow = objgps.DtResultados.Rows[0]; DataRow dtrow = objgps.DtResultados.Rows[0];
upInfo(dtrow); upInfo(dtrow);
} }
if (chkActivarArrastre.Checked) if (chkActivarArrastre.Checked)
{ {
Alert("se ha activado la funcion de arrastre"); Alert("se ha activado la funcion de arrastre");
} }
else else
{ {
Alert("se ha desactivado la funcion de arrastre"); Alert("se ha desactivado la funcion de arrastre");
} }
} }
} }
} }
} }

View File

@@ -449,14 +449,14 @@
Dim ObjContratos As New ClsContratos Dim ObjContratos As New ClsContratos
If ObjContratos.GetContratos(-1, -1) Then Application("GlobalDTContratos") = ObjContratos.DtResultados Else Application("GlobalDTContratos") = Nothing 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.GetSecciones() Then Application("GlobalDTContratosSecciones") = ObjContratos.DtResultados Else Application("GlobalDTContratosSecciones") = Nothing
If ObjContratos.GetContratosTipos() Then Application("GlobalDTContratosTipos") = ObjContratos.DtResultados Else Application("GlobalDTContratosTipos") = Nothing 'If ObjContratos.GetContratosTipos(-1) Then Application("GlobalDTContratosTipos") = ObjContratos.DtResultados Else Application("GlobalDTContratosTipos") = Nothing
ObjContratos.Dispose() ObjContratos.Dispose()
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'V E N D E D O R E S 'V E N D E D O R E S
Dim ObjVendedores As New ClsVtaVendedores Dim ObjVendedores As New ClsVtaVendedores
If ObjVendedores.GetVendedores(-1) Then Application("GlobalDTVendedores") = ObjVendedores.DtResultados Else Application("GlobalDTVendedores") = Nothing If ObjVendedores.GetVendedores(-1) Then Application("GlobalDTVendedores") = ObjVendedores.DtResultados Else Application("GlobalDTVendedores") = Nothing
ObjVendedores.Dispose() ObjVendedores.Dispose()

View File

@@ -58,6 +58,7 @@
</div> </div>
<div class="caption uppercase" style="position: relative;"> <div class="caption uppercase" style="position: relative;">
<i class="fa fa-info-circle"></i>información del movimiento <i class="fa fa-info-circle"></i>información del movimiento
</div> </div>
</div> </div>
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style='display:none;'")%>> <div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style='display:none;'")%>>
@@ -79,29 +80,32 @@
<div class="row" id="DivPersonal" runat="server"> <div class="row" id="DivPersonal" runat="server">
<label class="col-md-4 truncate" style="max-width: 155px"> <label class="col-md-4 truncate" style="max-width: 155px">
Personal/Responsable: Personal/Responsable:
</label> </label>
<div class="col-md-8"> <div class="col-md-8">
<asp:DropDownList ID="DdlPersonal" CssClass="form-control select2me" Width="100%" runat="server" DataTextField="NombreCompletoNombre" DataValueField="CvePersonal"></asp:DropDownList> <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> <%--<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> <ajax:ValidatorCalloutExtender ID="VCEPersonal" runat="server" HighlightCssClass="vco" TargetControlID="RFVPersonal" Width="350px"></ajax:ValidatorCalloutExtender>--%>
</div> </div>
</div> </div>
<div class="row" id="DivCliente" visible="false" runat="server"> <div class="row" id="DivCliente" visible="false" runat="server">
<label class="col-md-4 truncate" style="max-width: 155px"> <label class="col-md-4 truncate" style="max-width: 155px">
Cliente: Cliente:
</label> </label>
<div class="col-md-8"> <div class="col-md-8">
<asp:DropDownList ID="DdlCliente" CssClass="form-control select2me" Width="100%" runat="server" DataTextField="Nombre" DataValueField="CveCliente"></asp:DropDownList> <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> <%--<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> <ajax:ValidatorCalloutExtender ID="VCOCliente" runat="server" HighlightCssClass="vco" TargetControlID="RFVCliente" Width="350px"></ajax:ValidatorCalloutExtender>--%>
</div> </div>
</div> </div>
<div class="row" id="DivProveedor" visible="false" runat="server"> <div class="row" id="DivProveedor" visible="false" runat="server">
<label class="col-md-4 truncate" style="max-width: 155px"> <label class="col-md-4 truncate" style="max-width: 155px">
Proveedor: Proveedor:
</label> </label>
<div class="col-md-8"> <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>--%> <%--<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>--%> <%--<ajax:ValidatorCalloutExtender ID="VCOProveedor" runat="server" HighlightCssClass="vco" TargetControlID="RFVProveedor" Width="350px"></ajax:ValidatorCalloutExtender>--%>
</div> </div>
@@ -164,6 +168,7 @@
<div class="row"> <div class="row">
<label class="col-md-4 truncate" style="max-width: 155px"> <label class="col-md-4 truncate" style="max-width: 155px">
Observaciones Observaciones
</label> </label>
<div class="col-md-8"> <div class="col-md-8">
<asp:TextBox ID="TxtObservaciones" TextMode="MultiLine" Rows="2" CssClass="form-control input-sm" runat="server" MaxLength="200"></asp:TextBox> <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 solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle magindate"> <div class="portlet-title portlet-filterT smalltitle magindate">
<div class="tools"> <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>
<div class="titlefiltros caption "> <div class="titlefiltros caption ">
<div class="row"> <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> <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> <ajax:ValidatorCalloutExtender ID="VCOTipo" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipo" Width="350px"></ajax:ValidatorCalloutExtender>
</div> </div>
<div class="col-md-1" style="max-width: 100px">Fecha</div> <div class="col-md-2" id="DivPersonalLiberacion" runat="server" style="max-width: 155px">Personal/Responsable</div>
<div class="col-md-2"> <div class="col-md-2" id="DivPersonalLiberacion2" runat="server">
<div style="display: inline-block; vertical-align: text-bottom;"> <ADS:Dropdownlost ID="DdlPersonalLiberacion" runat="server" CssStyle="width: 100%;" Width="100%" DataTextField="NombreCompletoNombre" DataValueField="CvePersonal" IncluyeTodos="false"></ADS:Dropdownlost>
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;"> <%--<asp:DropDownList ID="DdlPersonalLiberacion" CssClass="form-control select2me" Width="100%" runat="server" DataTextField="NombreCompletoNombre" DataValueField="CvePersonal"></asp:DropDownList>
<asp:TextBox ID="TxtFechaLiberacion" runat="server" CssClass="form-control" CausesValidation="true" Style="width: 118px" MaxLength="10"></asp:TextBox> <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>
<span class="input-group-btn "> <ajax:ValidatorCalloutExtender ID="VCEPersonalLiberacion" runat="server" HighlightCssClass="vco" TargetControlID="RFVPersonalLiberacion" Width="350px"></ajax:ValidatorCalloutExtender>--%>
<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 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>
</div> </div>
<div class="portlet-body"> <div class="portlet-body">
<div class="row"> <div class="row">
<div class="col-md-2" id="DivPersonalLiberacion" runat="server" style="max-width: 155px">Personal/Responsable</div> <div class="col-md-1" style="max-width: 100px">Fecha</div>
<div class="col-md-2" id="DivPersonalLiberacion2" runat="server"> <div class="col-md-2">
<asp:DropDownList ID="DdlPersonalLiberacion" CssClass="form-control select2me" Width="100%" runat="server" DataTextField="NombreCompletoNombre" DataValueField="CvePersonal"></asp:DropDownList> <div style="display: inline-block; vertical-align: text-bottom;">
<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> <div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
<ajax:ValidatorCalloutExtender ID="VCEPersonalLiberacion" runat="server" HighlightCssClass="vco" TargetControlID="RFVPersonalLiberacion" Width="350px"></ajax:ValidatorCalloutExtender> <asp:TextBox ID="TxtFechaLiberacion" runat="server" CssClass="form-control" CausesValidation="true" Style="width: 118px" MaxLength="10"></asp:TextBox>
</div> <span class="input-group-btn ">
<div class="col-md-2" style="max-width: 155px" id="DivClienteLiberacion" runat="server" visible="false">Cliente</div> <asp:LinkButton ID="ImgFechaLiberacion" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
<div class="col-md-2" id="DivClienteLiberacion2" runat="server" visible="false"> </span>
<asp:DropDownList ID="DdlClienteLiberacion" CssClass="form-control select2me" Width="100%" runat="server" DataTextField="Nombre" DataValueField="CveCliente"></asp:DropDownList> <ajax:MaskedEditExtender ID="MEEFechaLiberacion" runat="server" TargetControlID="TxtFechaLiberacion" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<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:CalendarExtender runat="server" ID="CEFechaLiberacion" TargetControlID="TxtFechaLiberacion" PopupButtonID="ImgFechaLiberacion" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<ajax:ValidatorCalloutExtender ID="VCOClienteLiberacion" runat="server" HighlightCssClass="vco" TargetControlID="RFVClienteLiberacion" Width="350px"></ajax:ValidatorCalloutExtender> <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>
</div> <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>
<div class="col-md-2" style="max-width: 155px" id="DivProveedorLiberacion" runat="server" visible="false">Proveedor</div> <ajax:ValidatorCalloutExtender ID="VCOFechaLiberacion1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaLiberacion" Width="350px"></ajax:ValidatorCalloutExtender>
<div class="col-md-2" id="DivProveedorLiberacion2" runat="server" visible="false"> <ajax:ValidatorCalloutExtender ID="VCOFechaLiberacion2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaLiberacion" Width="350px"></ajax:ValidatorCalloutExtender>
<ADS:Dropdownlost ID="DdlProveedorLiberacion" runat="server" CssStyle="width: 100%;" DataTextField="RazonSocial" DataValueField="CveProveedor"></ADS:Dropdownlost> </div>
<%--<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>--%> </div>
<%--<ajax:ValidatorCalloutExtender ID="VCOProveedorLiberacion" runat="server" HighlightCssClass="vco" TargetControlID="RFVProveedorLiberacion" Width="350px"></ajax:ValidatorCalloutExtender>--%>
</div> </div>
</div> </div>
</div> </div>
@@ -387,6 +395,7 @@
</div> </div>
<div class="caption uppercase" style="position: relative;"> <div class="caption uppercase" style="position: relative;">
<i class="fa fa-info-circle"></i>información del movimiento <i class="fa fa-info-circle"></i>información del movimiento
</div> </div>
</div> </div>
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style='display:none;'")%>> <div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style='display:none;'")%>>
@@ -423,6 +432,7 @@
<div class="row"> <div class="row">
<label class="col-md-4 truncate" style="max-width: 155px"> <label class="col-md-4 truncate" style="max-width: 155px">
Observaciones Observaciones
</label> </label>
<div class="col-md-8"> <div class="col-md-8">
<asp:TextBox ID="TxtObservacionesLiberacion" TextMode="MultiLine" Rows="2" CssClass="form-control input-sm" runat="server" MaxLength="200"></asp:TextBox> <asp:TextBox ID="TxtObservacionesLiberacion" TextMode="MultiLine" Rows="2" CssClass="form-control input-sm" runat="server" MaxLength="200"></asp:TextBox>

View File

@@ -4,8 +4,8 @@ Option Strict On
Imports System.Data Imports System.Data
Imports Extensiones Imports Extensiones
Partial Class Inventarios_ResguardoMaterial Partial Class Inventarios_ResguardoMaterial
Inherits ClsPaginas Inherits ClsPaginas
#Region "Propiedades" #Region "Propiedades"
Public Property DtMovimientos() As DataTable Public Property DtMovimientos() As DataTable
Get Get
@@ -122,12 +122,12 @@ Partial Class Inventarios_ResguardoMaterial
Set(value As Integer) Set(value As Integer)
ViewState("TipoSeccionAlmacen") = value ViewState("TipoSeccionAlmacen") = value
End Set End Set
End Property End Property
#End Region #End Region
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not IsPostBack Then If Not IsPostBack Then
@@ -156,11 +156,11 @@ Partial Class Inventarios_ResguardoMaterial
Private Sub OcultarControles(CvePersonal As Integer) Private Sub OcultarControles(CvePersonal As Integer)
DdlPersonal.SelectedValueExist(CvePersonal) DdlPersonal.ddl.SelectedValueExist(CvePersonal)
DdlPersonal.Enabled = False DdlPersonal.Enabled = False
DVTipo.Visible = False DVTipo.Visible = False
End Sub End Sub
#Region " INICIALIZA VALORES " #Region " INICIALIZA VALORES "
Private Sub InicializaValores() Private Sub InicializaValores()
CreaDT() CreaDT()
@@ -213,21 +213,25 @@ Partial Class Inventarios_ResguardoMaterial
End Sub End Sub
Private Sub CargaCombos() Private Sub CargaCombos()
DdlPersonal.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa) DdlPersonal.setEsWebService(True)
DdlPersonal.DataBind() DdlPersonal.Attributes.Add("data-metodo", "getpersonal")
DdlPersonal.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlPersonal.SelectedValue = "-1"
DdlPersonal.SelectedText = "Seleccione"
DdlPersonalLiberacion.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa) DdlPersonalLiberacion.setEsWebService(True)
DdlPersonalLiberacion.DataBind() DdlPersonalLiberacion.Attributes.Add("data-metodo", "getpersonal")
DdlPersonalLiberacion.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlPersonalLiberacion.SelectedValue = "-1"
DdlPersonalLiberacion.SelectedText = "Seleccione"
DdlCliente.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa) DdlCliente.setEsWebService(True)
DdlCliente.DataBind() DdlCliente.Attributes.Add("data-metodo", "getcliente")
DdlCliente.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlCliente.SelectedValue = "-1"
DdlCliente.SelectedText = "Seleccione"
DdlClienteLiberacion.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa) DdlClienteLiberacion.setEsWebService(True)
DdlClienteLiberacion.DataBind() DdlClienteLiberacion.Attributes.Add("data-metodo", "getcliente")
DdlClienteLiberacion.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlClienteLiberacion.SelectedValue = "-1"
DdlClienteLiberacion.SelectedText = "Seleccione"
DdlProveedor.setEsWebService(True) DdlProveedor.setEsWebService(True)
DdlProveedor.Attributes.Add("data-metodo", "getproveedores") DdlProveedor.Attributes.Add("data-metodo", "getproveedores")
@@ -304,14 +308,14 @@ Partial Class Inventarios_ResguardoMaterial
End Sub End Sub
Private Function isWhitFamily() As Boolean Private Function isWhitFamily() As Boolean
Return (UsuarioActual.CveEmpresa = 66) Return (UsuarioActual.CveEmpresa = 66)
End Function End Function
#End Region #End Region
#Region " RESGUARDO " #Region " RESGUARDO "
#Region " FUNCIONALIDAD 105 - CLASIFICACION PS" #Region " FUNCIONALIDAD 105 - CLASIFICACION PS"
Protected Sub DdlClasificacion_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlClasificacion.SelectedIndexChanged Protected Sub DdlClasificacion_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlClasificacion.SelectedIndexChanged
CargaProductosPorClasificacion() CargaProductosPorClasificacion()
@@ -371,21 +375,21 @@ Partial Class Inventarios_ResguardoMaterial
DdlUnidad.DataBind() DdlUnidad.DataBind()
UPDatos.Update() UPDatos.Update()
End Sub End Sub
#End Region #End Region
#Region " EISTENCIAS " #Region " EISTENCIAS "
Private Function GetExistencias(CvePS As Integer, CveUnidadMedida As Integer, CveEmpresa As Integer, CveAlmacen As Integer, Optional SerieLote As String = "-1") As Double 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 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) Dim Existencia As Double = Inv.GetExistenciasPS(CvePS, CveUnidadMedida, CveEmpresa, CveAlmacen, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), SerieLote:=SerieLote)
Inv.Dispose() Inv.Dispose()
Return Existencia Return Existencia
End Function End Function
#End Region #End Region
#Region " AGREGAR " #Region " AGREGAR "
Protected Sub btnAgregar_Click(sender As Object, e As EventArgs) Handles LbAgregar.Click Protected Sub btnAgregar_Click(sender As Object, e As EventArgs) Handles LbAgregar.Click
AgregaProducto() AgregaProducto()
@@ -443,10 +447,10 @@ Partial Class Inventarios_ResguardoMaterial
DdlClasificacion.SelectedValue = "-1" DdlClasificacion.SelectedValue = "-1"
txtCantidad.Text = "" txtCantidad.Text = ""
TxtObservacionesdetalle.Text = "" TxtObservacionesdetalle.Text = ""
End Sub End Sub
#End Region #End Region
#Region " GvM " #Region " GvM "
Private Sub CargaGvM() Private Sub CargaGvM()
@@ -483,10 +487,10 @@ Partial Class Inventarios_ResguardoMaterial
e.Row.FCLinkButton("lnkRemove").ToolTip = "Cuenta con sección almacen" e.Row.FCLinkButton("lnkRemove").ToolTip = "Cuenta con sección almacen"
End If End If
End If End If
End Sub End Sub
#End Region #End Region
#Region " NUEVO " #Region " NUEVO "
Protected Sub BtnNuevo_Click(sender As Object, e As EventArgs) Protected Sub BtnNuevo_Click(sender As Object, e As EventArgs)
LimpiarMovimiento() LimpiarMovimiento()
@@ -503,20 +507,20 @@ Partial Class Inventarios_ResguardoMaterial
TxtObservaciones.Text = "" TxtObservaciones.Text = ""
TxtFecha.Text = Now.ToShortDateString TxtFecha.Text = Now.ToShortDateString
DdlPersonal.SelectedIndex = 0 DdlPersonal.ddl.SelectedIndex = 0
LimpiarAgregar() LimpiarAgregar()
UPDatos.Update() UPDatos.Update()
UpGenerales.Update() UpGenerales.Update()
End Sub End Sub
#End Region #End Region
#End Region #End Region
#Region " LIBERACION " #Region " LIBERACION "
#Region " GV DATOS LIBERACION " #Region " GV DATOS LIBERACION "
Protected Sub GvMLiberacion_RowDataBound(sender As Object, e As GridViewRowEventArgs) Protected Sub GvMLiberacion_RowDataBound(sender As Object, e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
@@ -529,12 +533,12 @@ Partial Class Inventarios_ResguardoMaterial
Dim Index = e.Row.RowIndex Dim Index = e.Row.RowIndex
e.Row.FCTextBox("TxtCantidad").Attributes.Add("onKeyUp", String.Format("ValidarCantidad({0});", Index)) e.Row.FCTextBox("TxtCantidad").Attributes.Add("onKeyUp", String.Format("ValidarCantidad({0});", Index))
End If End If
End Sub End Sub
#End Region #End Region
#Region " CARGA RESGUARDOS PARA LIBERACION " #Region " CARGA RESGUARDOS PARA LIBERACION "
Protected Sub BtnVerificarExistencias_Click(sender As Object, e As EventArgs) Protected Sub BtnVerificarExistencias_Click(sender As Object, e As EventArgs)
If Not DdlProveedorLiberacion.SelectedValue.ToEntero > 0 AndAlso DdlTipo.SelectedValue.ToEntero = 3 Then If Not DdlProveedorLiberacion.SelectedValue.ToEntero > 0 AndAlso DdlTipo.SelectedValue.ToEntero = 3 Then
Alert("Tiene que seleccionar un proveedor.", TipoMensaje.MsgAdvertencia) Alert("Tiene que seleccionar un proveedor.", TipoMensaje.MsgAdvertencia)
@@ -572,7 +576,7 @@ Partial Class Inventarios_ResguardoMaterial
CargaGvMLiberacion() CargaGvMLiberacion()
If DdlPersonalLiberacion.SelectedValue.ToEntero <> -1 Then If DdlPersonalLiberacion.SelectedValue.ToEntero <> -1 Then
LblTipo.InnerText = "Personal/Responsable:" LblTipo.InnerText = "Personal/Responsable:"
LbTipoLiberacion.Text = DdlPersonalLiberacion.SelectedItem.Text LbTipoLiberacion.Text = DdlPersonalLiberacion.SelectedText
End If End If
If DdlProveedorLiberacion.SelectedValue.ToEntero <> -1 Then If DdlProveedorLiberacion.SelectedValue.ToEntero <> -1 Then
LblTipo.InnerText = "Proveedor:" LblTipo.InnerText = "Proveedor:"
@@ -580,7 +584,7 @@ Partial Class Inventarios_ResguardoMaterial
End If End If
If DdlClienteLiberacion.SelectedValue.ToEntero <> -1 Then If DdlClienteLiberacion.SelectedValue.ToEntero <> -1 Then
LblTipo.InnerText = "Cliente:" LblTipo.InnerText = "Cliente:"
LbTipoLiberacion.Text = DdlClienteLiberacion.SelectedItem.Text LbTipoLiberacion.Text = DdlClienteLiberacion.SelectedText
End If End If
CvePersonalLiberacion = DdlPersonalLiberacion.SelectedValue.ToEntero CvePersonalLiberacion = DdlPersonalLiberacion.SelectedValue.ToEntero
CveClienteLiberacion = DdlClienteLiberacion.SelectedValue.ToEntero CveClienteLiberacion = DdlClienteLiberacion.SelectedValue.ToEntero
@@ -613,10 +617,10 @@ Partial Class Inventarios_ResguardoMaterial
GvMLiberacion.DataSource = DtMovimientosLiberacion GvMLiberacion.DataSource = DtMovimientosLiberacion
GvMLiberacion.DataBind() GvMLiberacion.DataBind()
UpGridLiberacion.Update() UpGridLiberacion.Update()
End Sub End Sub
#End Region #End Region
#Region " LIMPIAR LIBERACION " #Region " LIMPIAR LIBERACION "
Private Sub LimpiarLiberacion() Private Sub LimpiarLiberacion()
LbTipoLiberacion.Text = "" LbTipoLiberacion.Text = ""
@@ -638,14 +642,14 @@ Partial Class Inventarios_ResguardoMaterial
CargaGvMLiberacion() CargaGvMLiberacion()
UpGeneralesLibreacion.Update() UpGeneralesLibreacion.Update()
End Sub End Sub
#End Region #End Region
#End Region #End Region
#Region " GUARDAR " #Region " GUARDAR "
Protected Sub BtnGuardarResguardo_Click(sender As Object, e As EventArgs) Handles BtnGuardarResguardo.Click Protected Sub BtnGuardarResguardo_Click(sender As Object, e As EventArgs) Handles BtnGuardarResguardo.Click
@@ -963,17 +967,26 @@ Partial Class Inventarios_ResguardoMaterial
DivCliente.Visible = False DivCliente.Visible = False
DivPersonal.Visible = False DivPersonal.Visible = False
DivProveedor.Visible = False DivProveedor.Visible = False
If RbTipoCliente.Checked Then DivCliente.Visible = True If RbTipoCliente.Checked Then
If RbTipoPersonal.Checked Then DivPersonal.Visible = True DivCliente.Visible = True
If RbTipoProveedor.Checked Then DivProveedor.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() UpGenerales.Update()
End Sub End Sub
Protected Sub DdlTipo_SelectedIndexChanged(sender As Object, e As EventArgs) Protected Sub DdlTipo_SelectedIndexChanged(sender As Object, e As EventArgs)
DdlPersonalLiberacion.SelectedIndex = 0 'DdlPersonalLiberacion.ddl.SelectedIndex = 0
DdlProveedorLiberacion.SelectedValue = "-1" 'DdlProveedorLiberacion.SelectedValue = "-1"
DdlProveedorLiberacion.SelectedText = "Seleccione" 'DdlProveedorLiberacion.SelectedText = "Seleccione"
DdlClienteLiberacion.SelectedIndex = 0 'DdlClienteLiberacion.SelectedValue = "0"
DivPersonalLiberacion.Visible = False DivPersonalLiberacion.Visible = False
DivPersonalLiberacion2.Visible = False DivPersonalLiberacion2.Visible = False
DivClienteLiberacion.Visible = False DivClienteLiberacion.Visible = False
@@ -993,10 +1006,10 @@ Partial Class Inventarios_ResguardoMaterial
DivProveedorLiberacion2.Visible = True DivProveedorLiberacion2.Visible = True
End If End If
UpFiltraLiberacion.Update() UpFiltraLiberacion.Update()
End Sub End Sub
#End Region #End Region
#Region "SECCION ALMACEN" #Region "SECCION ALMACEN"
Private Sub CreaDtSeccionAlmacen() Private Sub CreaDtSeccionAlmacen()
DtSeccionAlmacen = New DataTable DtSeccionAlmacen = New DataTable
@@ -1100,9 +1113,9 @@ Partial Class Inventarios_ResguardoMaterial
DdlAlmacen.Enabled = True DdlAlmacen.Enabled = True
DdlAlmacen.ToolTip = "" DdlAlmacen.ToolTip = ""
End If End If
UpGenerales.Update() UpGenerales.Update()
ElseIf TipoSeccionAlmacen = 2 Then ElseIf TipoSeccionAlmacen = 2 Then
If CantidadTotalSeccion > 0 Then If CantidadTotalSeccion > 0 Then
GvMLiberacion.Rows(IndexSeccionAlmacen).FCTextBox("TxtCantidad").Enabled = False GvMLiberacion.Rows(IndexSeccionAlmacen).FCTextBox("TxtCantidad").Enabled = False
GvMLiberacion.Rows(IndexSeccionAlmacen).FCTextBox("TxtCantidad").ToolTip = "Cuenta con sección almacen" GvMLiberacion.Rows(IndexSeccionAlmacen).FCTextBox("TxtCantidad").ToolTip = "Cuenta con sección almacen"
@@ -1172,32 +1185,32 @@ Partial Class Inventarios_ResguardoMaterial
DtSeccionAlmacen.Rows.RemoveAt(Index) DtSeccionAlmacen.Rows.RemoveAt(Index)
DtSeccionAlmacen.AcceptChanges() DtSeccionAlmacen.AcceptChanges()
CargaSeccionAlmacen() CargaSeccionAlmacen()
End Sub End Sub
'Protected Sub LnkVerSecciones_Click(sender As Object, e As EventArgs) 'Protected Sub LnkVerSecciones_Click(sender As Object, e As EventArgs)
' If Not CveVentaSurtir > 0 Then ' If Not CveVentaSurtir > 0 Then
' Alert("Tiene que seleccionar la venta a surtir", TipoMensaje.MsgAdvertencia) ' Alert("Tiene que seleccionar la venta a surtir", TipoMensaje.MsgAdvertencia)
' Exit Sub ' Exit Sub
' End If ' End If
' If Not DdlAlmacen.SelectedValue.ToEntero > 0 Then ' If Not DdlAlmacen.SelectedValue.ToEntero > 0 Then
' Alert("Tiene que seleccionar el almacen", TipoMensaje.MsgAdvertencia) ' Alert("Tiene que seleccionar el almacen", TipoMensaje.MsgAdvertencia)
' Exit Sub ' Exit Sub
' End If ' End If
' Dim ObjInv As New ClsInventarios ' Dim ObjInv As New ClsInventarios
' If ObjInv.GetExistenciaSeccionAlmacen(CveVentaSurtir, DdlAlmacen.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then ' If ObjInv.GetExistenciaSeccionAlmacen(CveVentaSurtir, DdlAlmacen.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
' GvVerSeccionesAlmacen.DataSource = ObjInv.DtResultados ' GvVerSeccionesAlmacen.DataSource = ObjInv.DtResultados
' End If ' End If
' ObjInv.Dispose() ' ObjInv.Dispose()
' GvVerSeccionesAlmacen.DataBind() ' GvVerSeccionesAlmacen.DataBind()
' UpVerSeccionesAlmacen.Update() ' UpVerSeccionesAlmacen.Update()
' RegistraScript("$('#ModalVerSeccionesAlmacen').modal()") ' RegistraScript("$('#ModalVerSeccionesAlmacen').modal()")
'End Sub 'End Sub
#End Region #End Region
End Class End Class

File diff suppressed because it is too large Load Diff

View File

@@ -422,7 +422,7 @@ Partial Class Inventarios_TraspasoAlmacen
SiguienteFolio(If(ChkTransitorio.Checked, 9, 8)) SiguienteFolio(If(ChkTransitorio.Checked, 9, 8))
'DdlProducto.DataBind() 'DdlProducto.DataBind()
CargarCamiones()
End Sub End Sub
Private Sub CargaAlmacenOrigen() Private Sub CargaAlmacenOrigen()
DdlAlmacenOrigen.Enabled = True DdlAlmacenOrigen.Enabled = True
@@ -2779,4 +2779,22 @@ Partial Class Inventarios_TraspasoAlmacen
Return dataTable Return dataTable
End Function 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 End Class

View File

@@ -1337,14 +1337,14 @@ Partial Class OC
ChkCotizacion.Visible = True ChkCotizacion.Visible = True
DdlProveedores.SelectedValue = objOC.CveProveedor.ToString DdlProveedores.SelectedValue = objOC.CveProveedor.ToString
If DdlProveedores.SelectedValue.ToEntero > 0 Then 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 Else
DdlProveedores.SelectedText = "-" DdlProveedores.SelectedText = "-"
End If End If
If objOC.CveProveedorSucursal.ToEntero > 0 Then If objOC.CveProveedorSucursal.ToEntero > 0 Then
DivProveedorSucursal.Visible = True DivProveedorSucursal.Visible = True
DdlProveedorSucursal.DataSource = GlobalDTProveedorSucursales(objOC.CveProveedor, UsuarioActual.CveEmpresa) DdlProveedorSucursal.DataSource = GlobalDTProveedorSucursales(objOC.CveProveedor, CveEmpresaActual)
DdlProveedorSucursal.DataBind() DdlProveedorSucursal.DataBind()
DdlProveedorSucursal.SelectedValueExist(objOC.CveProveedorSucursal.ToString) DdlProveedorSucursal.SelectedValueExist(objOC.CveProveedorSucursal.ToString)
End If End If

View File

@@ -1894,22 +1894,22 @@ Partial Class Clientes
Protected Sub BtnVerMasBancos_Click(sender As Object, e As EventArgs) Protected Sub BtnVerMasBancos_Click(sender As Object, e As EventArgs)
If BtnVerMasBancos.Text = "Ver Más" Then If BtnVerMasBancos.Text = "Ver Más" Then
CargaBancos(-1) CargaBancos(1000000)
BtnVerMasBancos.Text = "Ver Menos" BtnVerMasBancos.Text = "Ver Menos"
Else Else
CargaBancos(11) CargaBancos(51)
BtnVerMasBancos.Text = "Ver Más" BtnVerMasBancos.Text = "Ver Más"
End If End If
End Sub End Sub
#End Region #End Region
#Region "B A N C O S" #Region "B A N C O S"
'CuentasxCobrar Activas (Pagos Recibidos) 'CuentasxCobrar Activas (Pagos Recibidos)
Private Sub CargaBancos(Optional SelectTop As Integer = 11, Optional CveClienteSucursal As Integer = -1) Private Sub CargaBancos(Optional SelectTop As Integer = 51, Optional CveClienteSucursal As Integer = -1)
Dim ObjMovtos As New ClsMovimientos() Dim ObjMovtos As New ClsMovimientos()
'CxC Activas '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 GvBancos.DataSource = ObjMovtos.DtResultados
DTCobrosRealizados = ObjMovtos.DtResultados DTCobrosRealizados = ObjMovtos.DtResultados
DTCobrosRealizados.Rows.Remove(DTCobrosRealizados.Rows(0)) DTCobrosRealizados.Rows.Remove(DTCobrosRealizados.Rows(0))
@@ -9201,7 +9201,7 @@ Partial Class Clientes
Dim Serie As String = "" Dim Serie As String = ""
If FolioNotaCredito(Tipo) Then If FolioNotaCredito(Tipo) Then
Folio = -1 Folio = FolioNotaAcumulador
Serie = SerieNotaAcumulador Serie = SerieNotaAcumulador
End If End If
@@ -9220,8 +9220,8 @@ Partial Class Clientes
ObjFactura.TipoDocto = "RNC" ObjFactura.TipoDocto = "RNC"
ObjFactura.Folio = Folio ObjFactura.Folio = Folio
ObjFactura.Serie = Serie ObjFactura.Serie = Serie
ObjFactura.Fecha = Now ObjFactura.Fecha = Now
ObjFactura.CvePrePoliza = -1 ObjFactura.CvePrePoliza = -1
ObjFactura.CveMetodoPago = DdlMetodoPago.SelectedValue.ToEntero ObjFactura.CveMetodoPago = DdlMetodoPago.SelectedValue.ToEntero

View File

@@ -3,9 +3,9 @@ Imports System.Data
Imports System.Linq Imports System.Linq
Partial Class Ventas_ClientesAbonar Partial Class Ventas_ClientesAbonar
Inherits ClsPaginas Inherits ClsPaginas
#Region "Propiedades" #Region "Propiedades"
Private ReadOnly Property CveCliente As Integer Private ReadOnly Property CveCliente As Integer
Get Get
@@ -273,9 +273,9 @@ Partial Class Ventas_ClientesAbonar
Set(value As Date) Set(value As Date)
ViewState("Fecha") = value ViewState("Fecha") = value
End Set End Set
End Property End Property
#End Region #End Region
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then If Not Page.IsPostBack Then
CveMonedaPago = -1 CveMonedaPago = -1
@@ -641,8 +641,10 @@ Partial Class Ventas_ClientesAbonar
e.Row.FCRangeValidator("RVComision").MaximumValue = e.Row.DBCampo("Saldo") e.Row.FCRangeValidator("RVComision").MaximumValue = e.Row.DBCampo("Saldo")
End If 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").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 End If
Else Else
@@ -1876,12 +1878,12 @@ Partial Class Ventas_ClientesAbonar
Dim DtVentasNC = InicializaDTVentasNC() Dim DtVentasNC = InicializaDTVentasNC()
Dim TotalImporte As Decimal = ObjFacturaDevolucion.DtDetalle.SUM("TotalImporte").ToDecimal() Dim TotalImporte As Decimal = ObjFacturaDevolucion.DtDetalle.SUMD("TotalImporte")
Dim ImporteIVA As Decimal = ObjFacturaDevolucion.DtDetalle.SUM("ImporteIVA").ToDecimal() Dim ImporteIVA As Decimal = ObjFacturaDevolucion.DtDetalle.SUMD("ImporteIVA")
Dim ImporteRetIVA As Decimal = ObjFacturaDevolucion.DtDetalle.SUM("ImporteRetIVA").ToDecimal() Dim ImporteRetIVA As Decimal = ObjFacturaDevolucion.DtDetalle.SUMD("ImporteRetIVA")
Dim ImporteRetISR As Decimal = ObjFacturaDevolucion.DtDetalle.SUM("ImporteRetISR").ToDecimal() Dim ImporteRetISR As Decimal = ObjFacturaDevolucion.DtDetalle.SUMD("ImporteRetISR")
Dim ImporteIEPS As Decimal = ObjFacturaDevolucion.DtDetalle.SUM("ImporteIEPS").ToDecimal() Dim ImporteIEPS As Decimal = ObjFacturaDevolucion.DtDetalle.SUMD("ImporteIEPS")
Dim Descuento As Decimal = ObjFacturaDevolucion.DtDetalle.SUM("Descuento").ToDecimal() Dim Descuento As Decimal = ObjFacturaDevolucion.DtDetalle.SUMD("Descuento")
Dim Amortizacion As Decimal = 0 Dim Amortizacion As Decimal = 0
Dim Total As Decimal = (TotalImporte + ImporteIVA + ImporteIEPS) - (ImporteRetIVA + ImporteRetISR + Descuento + Amortizacion) Dim Total As Decimal = (TotalImporte + ImporteIVA + ImporteIEPS) - (ImporteRetIVA + ImporteRetISR + Descuento + Amortizacion)
@@ -1908,7 +1910,7 @@ Partial Class Ventas_ClientesAbonar
DtVentasNC.AcceptChanges() DtVentasNC.AcceptChanges()
ObjFacturaDevolucion.DtVentasNC = DtVentasNC ObjFacturaDevolucion.DtVentasNC = DtVentasNC
ObjFacturaDevolucion.GenerarPDFFactura = True
Dim Resp = ObjFacturaDevolucion.EmitirFactura(False, Trasac:=Trasac, ObjContPaqTransac:=ObjConta) Dim Resp = ObjFacturaDevolucion.EmitirFactura(False, Trasac:=Trasac, ObjContPaqTransac:=ObjConta)
Return Resp Return Resp
@@ -2056,21 +2058,25 @@ Partial Class Ventas_ClientesAbonar
Dim ImporteReferencia As Decimal = Total Dim ImporteReferencia As Decimal = Total
Dim Porcentaje As Decimal = ((Importe * 100) / ImporteReferencia) / 100 Dim Porcentaje As Decimal = ((Importe * 100) / ImporteReferencia) / 100
Dim FiltroStr As String = "" Dim FiltroStr As String = ""
Dim ImporteTotalConcepto As Decimal = 0
For Each Dr As DataRow In DtImpuestosLocal.Rows 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")) 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("ImportePU") = ImporteTotalConcepto.RoundSQL(6)
Dr("ImporteRetIVA") = (Dr("ImporteTotal").ToString().ToDecimal() * Dr("PorcentajeRetIVA").ToString().ToDecimal()).RoundSQL(2) Dr("ImporteTotal") = ImporteTotalConcepto.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("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("ImporteIVA") = Math.Round(Porcentaje * TmpDT.SUM("ImporteIVA", FiltroStr), 2)
'Dr("ImporteRetIVA") = Math.Round(Porcentaje * TmpDT.SUM("ImporteRetIVA", FiltroStr), 2) 'Dr("ImporteRetIVA") = Math.Round(Porcentaje * TmpDT.SUM("ImporteRetIVA", FiltroStr), 2)
'Dr("ImporteRetISR") = Math.Round(Porcentaje * TmpDT.SUM("ImporteRetISR", FiltroStr), 2) 'Dr("ImporteRetISR") = Math.Round(Porcentaje * TmpDT.SUM("ImporteRetISR", FiltroStr), 2)
'Dr("ImporteIEPS") = Math.Round(Porcentaje * TmpDT.SUM("ImporteIEPS", 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 Next
'codigo para ajuste de centavo, si el importe total no cuadra con los totales '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")) 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() UpDatos.Update()
UPVentas.Update() UPVentas.Update()
End Sub End Sub
#Region " PAGAR CON PESOS " #Region " PAGAR CON PESOS "
Protected Sub ChkPagarPesos_CheckedChanged(sender As Object, e As EventArgs) Protected Sub ChkPagarPesos_CheckedChanged(sender As Object, e As EventArgs)
If ChkPagarPesos.Checked Then If ChkPagarPesos.Checked Then
@@ -2330,9 +2336,9 @@ Partial Class Ventas_ClientesAbonar
CargaDatos(2) CargaDatos(2)
RegistraScript("CambiaPesosDolares();") RegistraScript("CambiaPesosDolares();")
End Sub End Sub
#End Region #End Region
#Region "PAGAR CON DOLARES" #Region "PAGAR CON DOLARES"
Protected Sub ChkPagarDolares_CheckedChanged(sender As Object, e As EventArgs) Protected Sub ChkPagarDolares_CheckedChanged(sender As Object, e As EventArgs)
If ChkPagarDolares.Checked Then If ChkPagarDolares.Checked Then
@@ -2353,9 +2359,9 @@ Partial Class Ventas_ClientesAbonar
CargaDatos(1) CargaDatos(1)
RegistraScript("CambiaDolaresPesos();") RegistraScript("CambiaDolaresPesos();")
End Sub End Sub
#End Region #End Region
#Region " CUENTAS DEPOSITOS" #Region " CUENTAS DEPOSITOS"
Private Sub CargaCuentasDepositos() Private Sub CargaCuentasDepositos()
DdlCuentaDeposito.Items.Clear() DdlCuentaDeposito.Items.Clear()
@@ -2422,9 +2428,9 @@ Partial Class Ventas_ClientesAbonar
End If End If
Dep.Dispose() Dep.Dispose()
UpCuentaDeposito.Update() UpCuentaDeposito.Update()
End Sub End Sub
#End Region #End Region
#Region " COMPLEMENTOS PAGO " #Region " COMPLEMENTOS PAGO "
Private Function EmitirComplementoPago(CveIE As Integer, CveVentas As List(Of Integer), Series As List(Of String)) As String Private Function EmitirComplementoPago(CveIE As Integer, CveVentas As List(Of Integer), Series As List(Of String)) As String
If Not ChkComplementoPago.Checked Then If Not ChkComplementoPago.Checked Then
@@ -2476,14 +2482,14 @@ Partial Class Ventas_ClientesAbonar
' Next ' Next
Return Retorno.ToString Return Retorno.ToString
End Function End Function
#End Region #End Region
#Region "SALDAR CUENTAS" #Region "SALDAR CUENTAS"
Private Sub BtnSaldarCuentasIncobrables_Click(sender As Object, e As EventArgs) Handles BtnSaldarCuentasIncobrables.Click Private Sub BtnSaldarCuentasIncobrables_Click(sender As Object, e As EventArgs) Handles BtnSaldarCuentasIncobrables.Click
Dim ObjConta As New ClsContabilidad Dim ObjConta As New ClsContabilidad
ObjConta.IniciaTransacSQL() ObjConta.IniciaTransacSQL()
@@ -2507,7 +2513,10 @@ Partial Class Ventas_ClientesAbonar
End If End If
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 For Each gr As GridViewRow In GvCxC.Rows
If gr.FCCheckBox("Chk").Checked Then If gr.FCCheckBox("Chk").Checked Then
@@ -2540,6 +2549,7 @@ Partial Class Ventas_ClientesAbonar
Dim ImpuestosMovto As Boolean = False Dim ImpuestosMovto As Boolean = False
Dim IdCuentaContableNoDeducible As Integer = 0 Dim IdCuentaContableNoDeducible As Integer = 0
Dim CveSubProyecto As Integer = gr.DataKey("CveSubProyecto").ToEntero 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 = 255 Then IdCuentaContableNoDeducible = UsuarioActual.Empresa.Funcionalidad(266).ToEntero
If CveConceptoDeduccion = 211 Then IdCuentaContableNoDeducible = UsuarioActual.Empresa.Funcionalidad(559).ToEntero If CveConceptoDeduccion = 211 Then IdCuentaContableNoDeducible = UsuarioActual.Empresa.Funcionalidad(559).ToEntero
@@ -2561,9 +2571,8 @@ Partial Class Ventas_ClientesAbonar
UsaComplementaria = True UsaComplementaria = True
End If End If
If MsgError = "" Then 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 tCveMoneda = 2 Then If tCveMoneda = 2 Then
IdCtaContable = IdCtaContMonedaExtranjera IdCtaContable = IdCtaContMonedaExtranjera
Else Else
@@ -2572,16 +2581,16 @@ Partial Class Ventas_ClientesAbonar
If UsaComplementaria AndAlso tCveMoneda = 2 Then If UsaComplementaria AndAlso tCveMoneda = 2 Then
'normal '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" MsgError = "Ocurrio un error al saldar el movimiento"
End If End If
'complementaria '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" MsgError = "Ocurrio un error al saldar el movimiento"
End If End If
Else 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" MsgError = "Ocurrio un error al saldar el movimiento"
End If End If
@@ -2592,11 +2601,11 @@ Partial Class Ventas_ClientesAbonar
Dim ImporteFluctuacion As Decimal = 0 Dim ImporteFluctuacion As Decimal = 0
ImporteFluctuacion = Saldo * (TCPago - TCVenta) ImporteFluctuacion = Saldo * (TCPago - TCVenta)
If TCPago > TCVenta Then 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" MsgError = "Ocurrio un error al saldar el movimiento"
End If End If
Else 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" MsgError = "Ocurrio un error al saldar el movimiento"
End If End If
End If End If
@@ -2620,18 +2629,18 @@ Partial Class Ventas_ClientesAbonar
IdCtaContable = If(IdCtaIVAXTrasladar > 0, IdCtaIVAXTrasladar, UsuarioActual.Empresa.IdCuentaIVAxTrasladar) IdCtaContable = If(IdCtaIVAXTrasladar > 0, IdCtaIVAXTrasladar, UsuarioActual.Empresa.IdCuentaIVAxTrasladar)
CveCuenta = If(CveCuentaIVAxTrasladar > 0, CveCuentaIVAxTrasladar, UsuarioActual.Empresa.CveCuentaIVAxTrasladar) 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" MsgError = "Ocurrio un error al saldar el movimiento"
End If End If
IdCtaContable = UsuarioActual.Empresa.IdCuentaIEPSxTrasladar IdCtaContable = UsuarioActual.Empresa.IdCuentaIEPSxTrasladar
CveCuenta = UsuarioActual.Empresa.CveCuentaIEPSxTrasladar 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" MsgError = "Ocurrio un error al saldar el movimiento"
End If End If
'al gasto,Subtotal '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" MsgError = "Ocurrio un error al saldar el movimiento"
End If End If
@@ -2772,10 +2781,10 @@ Partial Class Ventas_ClientesAbonar
UpGuardar.Update() UpGuardar.Update()
End Sub End Sub
#End Region #End Region
#Region "COMPLEMENTO DE PAGO - ELIMINAR POR SUSTITUCION" #Region "COMPLEMENTO DE PAGO - ELIMINAR POR SUSTITUCION"
Protected Sub CargaIESustituir() Protected Sub CargaIESustituir()
Dim ObjIE As New ClsBancos() 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 Private Sub BtnVincularIntermediario_Click(sender As Object, e As EventArgs) Handles BtnVincularIntermediario.Click
RegistraScript("$('#ModalVincularIntermediario').modal('hide')", "hidemodal") RegistraScript("$('#ModalVincularIntermediario').modal('hide')", "hidemodal")
End Sub End Sub
#End Region #End Region
Protected Sub BtnCambiaTipoMoneda_Click(sender As Object, e As EventArgs) Protected Sub BtnCambiaTipoMoneda_Click(sender As Object, e As EventArgs)
CambiaTipoMoneda() CambiaTipoMoneda()
End Sub End Sub

View File

@@ -2664,12 +2664,30 @@
<div id="DivRecepcionUsados" runat="server"> <div id="DivRecepcionUsados" runat="server">
<div class="row"> <div class="row">
<div class="col-md-5"> <div class="col-md-6">
<label>Modelo:</label> <label>Modelo:</label>
<br /> <br />
<asp:DropDownList ID="DdlModeloAuto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="ModeloMarca" DataValueField="CveModeloAuto"> <asp:DropDownList ID="DdlModeloAuto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="ModeloMarca" DataValueField="CveModeloAuto">
</asp:DropDownList> </asp:DropDownList>
</div> </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> </div>
<br /> <br />

View File

@@ -859,6 +859,14 @@ Partial Class PV
ViewState("TmpDTRecepcionUsados") = value ViewState("TmpDTRecepcionUsados") = value
End Set End Set
End Property 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 Private Property TmpDTImpuestos As DataTable
Get Get
Return If(IsNothing(ViewState("TmpDTImpuestos")), Nothing, CType(ViewState("TmpDTImpuestos"), DataTable)) Return If(IsNothing(ViewState("TmpDTImpuestos")), Nothing, CType(ViewState("TmpDTImpuestos"), DataTable))
@@ -2547,6 +2555,8 @@ Partial Class PV
ObjFactura.DtRecepcionUsados = TmpDTRecepcionUsados ObjFactura.DtRecepcionUsados = TmpDTRecepcionUsados
ObjFactura.DtPolizasVirtuales = TmpDTPolizaVirtual
ObjFactura.GenerarPDFFactura = False ObjFactura.GenerarPDFFactura = False
Dim CveTipoAlmacen As Integer = If(TmpDTAjustes IsNot Nothing AndAlso TmpDTAjustes.Rows.Count > 0, 6, 22) 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 ChkAgregar.Checked = False
divagregrarotrops.Visible = False divagregrarotrops.Visible = False
Ajuste() Ajuste()
AddPolizaVirtual(DdlPS.SelectedValue.ToEntero())
UpVenta.Update() UpVenta.Update()
RegistraScript(String.Format("$('#{0}').modal('show');", "DivAddVenta"), "EdicionVenta") RegistraScript(String.Format("$('#{0}').modal('show');", "DivAddVenta"), "EdicionVenta")
End Sub End Sub
Protected Sub LnkAgregarPS_Click(sender As Object, e As EventArgs) Protected Sub LnkAgregarPS_Click(sender As Object, e As EventArgs)
If AgregarPS() Then If AgregarPS() Then
If ChkAjuste.Checked Then GuardaAjuste() If ChkAjuste.Checked Then GuardaAjuste()
AddPolizaVirtual(DdlPS.SelectedValue.ToEntero())
CalculaTotalesVenta() CalculaTotalesVenta()
If ChkAgregar.Checked = True And Modalidad = "A" Then If ChkAgregar.Checked = True And Modalidad = "A" Then
@@ -5053,6 +5064,7 @@ Partial Class PV
CreaDTmpDTAjustes() CreaDTmpDTAjustes()
CreaDTmpDTRecepcionUsados() CreaDTmpDTRecepcionUsados()
CreaDTmpDTPolizaVirtual()
CargaBCIAjuste() CargaBCIAjuste()
DdlDistribuidor.setEsWebService(True) DdlDistribuidor.setEsWebService(True)
DivChkAjuste.Visible = True DivChkAjuste.Visible = True
@@ -5478,6 +5490,101 @@ Partial Class PV
#End Region #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" #Region "U S A D O S"
Private Sub CreaDTmpDTRecepcionUsados() Private Sub CreaDTmpDTRecepcionUsados()
@@ -5492,6 +5599,7 @@ Partial Class PV
TmpDTRecepcionUsados.Columns.Add("CveModeloAuto", GetType(Integer)) TmpDTRecepcionUsados.Columns.Add("CveModeloAuto", GetType(Integer))
End Sub End Sub
Protected Sub BtnRecepcionUsados_Click(sender As Object, e As EventArgs) Protected Sub BtnRecepcionUsados_Click(sender As Object, e As EventArgs)
'CalculaRecepcionUsados(GvRecepcionUsadosModal) 'CalculaRecepcionUsados(GvRecepcionUsadosModal)

View File

@@ -356,6 +356,9 @@
<li> <li>
<asp:LinkButton runat="server" ID="LnkImprimirFormatoCicovisa" Visible="false" OnClick="LnkImprimirFormatoCicovisa_Click">Imprimir Formato Cicovisa</asp:LinkButton> <asp:LinkButton runat="server" ID="LnkImprimirFormatoCicovisa" Visible="false" OnClick="LnkImprimirFormatoCicovisa_Click">Imprimir Formato Cicovisa</asp:LinkButton>
</li> </li>
<li>
<asp:LinkButton runat="server" ID="LnkEnviarPolizaVirtual" Visible="false" OnClick="LnkEnviarPolizaVirtual_Click">Enviar Poliza Virtual</asp:LinkButton>
</li>
</ContentTemplate> </ContentTemplate>
<Triggers> <Triggers>
<asp:AsyncPostBackTrigger ControlID="LnkImprimir" EventName="Click" /> <asp:AsyncPostBackTrigger ControlID="LnkImprimir" EventName="Click" />
@@ -1301,7 +1304,7 @@
<ContentTemplate> <ContentTemplate>
<div class="col-md-12"> <div class="col-md-12">
<asp:GridView ID="GvCodigosUnicos" runat="server" CssClass="table table-striped table-hover Widthall" AutoGenerateColumns="False" <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> <Columns>
<asp:TemplateField HeaderText="Código Único"> <asp:TemplateField HeaderText="Código Único">
<ItemTemplate> <ItemTemplate>

View File

@@ -4174,7 +4174,10 @@ Partial Class Ventas
End If End If
If DdlTipoComprobante.SelectedValue.Contiene("Egs", "Dev", "Ant") Then 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 GvNC.DataSource = ObjVentas.DtResultados
TmpDTNCVinculadas = ObjVentas.DtResultados TmpDTNCVinculadas = ObjVentas.DtResultados
GvNC.Caption = " <table width='100%'><tr><td style='text-align:center'>Ventas Aplicadas</td></tr></table>" GvNC.Caption = " <table width='100%'><tr><td style='text-align:center'>Ventas Aplicadas</td></tr></table>"
@@ -4187,7 +4190,7 @@ Partial Class Ventas
Next Next
End If End If
End If End If
End If End If
If GvNC.Rows.Count > 0 Then If GvNC.Rows.Count > 0 Then
ImgAntiPend.Visible = False ImgAntiPend.Visible = False
@@ -5742,8 +5745,8 @@ Partial Class Ventas
Dim Cantidad, PU, Descuento, CantidadInventario As Decimal Dim Cantidad, PU, Descuento, CantidadInventario As Decimal
Dim CuentaPredial As String Dim CuentaPredial As String
Cantidad = GvPS.Rows(e.RowIndex).FCTextBox("TxtCantidad").Text.ToDecimal Cantidad = GvPS.Rows(e.RowIndex).FCTextBox("TxtCantidad").Text.ToDecimal
PU = Math.Round(GvPS.Rows(e.RowIndex).FCTextBox("TxtPrecio").Text.ToDecimal, 6) PU = (GvPS.Rows(e.RowIndex).FCTextBox("TxtPrecio").Text.ToDecimal).RoundSQL(6)
Descuento = Math.Round(GvPS.Rows(e.RowIndex).FCTextBox("TxtDescuento").Text.ToDecimal, NumeroDecimales) Descuento = (GvPS.Rows(e.RowIndex).FCTextBox("TxtDescuento").Text.ToDecimal).RoundSQL(NumeroDecimales)
CuentaPredial = GvPS.Rows(e.RowIndex).FCTextBox("TxtPredial").Text.Trim CuentaPredial = GvPS.Rows(e.RowIndex).FCTextBox("TxtPredial").Text.Trim
Dim CantidadOriginal As Decimal = GvPS.Rows(e.RowIndex).DataKey("Cantidad").ToDecimal() Dim CantidadOriginal As Decimal = GvPS.Rows(e.RowIndex).DataKey("Cantidad").ToDecimal()
@@ -14125,7 +14128,7 @@ Partial Class Ventas
Dim Row As DataRow = Nothing Dim Row As DataRow = Nothing
Dim TotalCalculableImpuestos As Decimal = 0 Dim TotalCalculableImpuestos As Decimal = 0
Dim TotalCalculableImpuestosIVA As Decimal = 0 Dim TotalCalculableImpuestosIVA As Decimal = 0
PU = Math.Round(PU, 6) ' el precio unitario puede llevar hasta 6 decimales permitidos PU = PU.RoundSQL(6) ' el precio unitario puede llevar hasta 6 decimales permitidos
Row = TmpDT.NewRow() Row = TmpDT.NewRow()
Row("CveProyecto") = CveProyecto Row("CveProyecto") = CveProyecto
@@ -23935,11 +23938,20 @@ Partial Class Ventas
#Region "P O L I Z A - V I R T U A L" #Region "P O L I Z A - V I R T U A L"
Private Sub CargaCodigoUnico() 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 Dim ObjAcum As New ClsAcumuladores
If ObjAcum.GetGarantiasPolizaVirtual(Me.CveVenta, UsuarioActual.CveEmpresa) AndAlso ObjAcum.DtResultados.Rows.Count > 0 Then If ObjAcum.GetPolizasVirtuales(Me.CveVenta) AndAlso ObjAcum.DtResultados.Rows.Count > 0 Then
GvCodigosUnicos.DataSource = ObjAcum.DtResultados Dim RowPoliza As DataRow = ObjAcum.DtResultados.Rows(0)
DivCodigosUnicos.Visible = True
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 End If
ObjAcum.Dispose() ObjAcum.Dispose()
GvCodigosUnicos.DataBind() GvCodigosUnicos.DataBind()
@@ -23947,47 +23959,56 @@ Partial Class Ventas
End Sub End Sub
Protected Sub GeneraPolizaVentaWS(ObjFactura As Modelos.Factura) Protected Sub GeneraPolizaVentaWS(ObjFactura As Modelos.Factura)
Try Try
'TipoPoliza: 01 Venta, 02 Ajuste, 03 Garantía
Dim TipoPoliza As Integer = 0
For Each Row As GridViewRow In GvCodigosUnicos.Rows For Each Row As GridViewRow In GvCodigosUnicos.Rows
If Row.RowType = DataControlRowType.DataRow Then If Row.RowType = DataControlRowType.DataRow Then
Dim CvePolizaVirtual As Integer = Row.DataKey("CvePolizaVirtual").ToEntero()
Dim obj As New Modelos.MPolizaVentaWS Dim obj As New Modelos.MPolizaVentaWS
'DATOS DEL CLIENTE 'DATOS DEL CLIENTE
obj.customer_name = ObjFactura.Cliente.Nombre obj.customer_name = ObjFactura.Cliente.Nombre
obj.customer_last_name1 = "" obj.customer_last_name1 = "."
obj.customer_last_name2 = "" obj.customer_last_name2 = ""
obj.customer_birthday = Nothing obj.customer_birthday = Nothing
obj.customer_phone = ObjFactura.Cliente.Telefono obj.customer_phone = ObjFactura.Cliente.Telefono
obj.customer_email = ObjFactura.Cliente.Mail obj.customer_email = ObjFactura.Cliente.Mail
obj.customer_gender = "03" 'OTRO GENERO obj.customer_gender = "03" 'OTRO GENERO
obj.customer_advertising = False obj.customer_advertising = False
obj.customer_car_brand = "00" obj.customer_car_brand = Row.DataKey("IdMarcaAuto").ToString().Trim()
obj.customer_car_model = "00" obj.customer_car_model = Row.DataKey("IdModeloAuto").ToString().Trim()
obj.customer_car_year = ObjFactura.Fecha.Year obj.customer_car_year = Row.DataKey("AnioVehiculo").ToString().ToEntero()
'DATOS DE VENTA 'DATOS DE VENTA
obj.sale_date = ObjFactura.Fecha obj.sale_date = ObjFactura.Fecha
obj.sale_paidby = "01" obj.sale_paidby = "01"
obj.sale_type = "01" 'PISO obj.sale_type = "01" 'PISO
obj.sale_type_service = "02" 'COMERCIAL obj.sale_type_service = "0" & Row.DataKey("TipoServicio").ToString().Trim()
obj.sale_total = ObjFactura.Total obj.sale_total = Row.DataKey("Total").ToString().ToDecimal()
obj.sale_discount = ObjFactura.Descuento obj.sale_discount = Row.DataKey("Descuento").ToString().ToDecimal()
obj.sale_id = String.Format("{0}{1}{2}", ObjFactura.Serie, ObjFactura.Folio, ObjFactura.CveVenta) obj.sale_id = ObjFactura.CveVenta.ToString
'DATOS DEL PRODUCTO 'DATOS DEL PRODUCTO
obj.product_code = Row.DataKey("IdProductoPolizaVirtual").ToString() obj.product_code = Row.DataKey("IdProductoPolizaVirtual").ToString().Trim()
obj.product_unique_code = Row.FCTextBox("TxtCodigoUnico").Text 'se indique el código único de la batería. (SERIE LOTE) 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 = "01 " 'VENTA obj.product_sale_type = "0" & Row.DataKey("TipoPoliza").ToString().Trim()
Dim FechaUsado As DateTime = Row.DataKey("FechaAjuste").ToString().ToDateTime()
'DATOS DE USADO 'DATOS DE USADO
obj.used_product = True obj.used_product = CBool(Row.DataKey("TieneUsado").ToString())
obj.used_brand = Row.DataKey("IdModelo").ToString() 'MARCAR DEL USADO
obj.used_bci = Row.DataKey("IdBCI").ToString() 'VALOR DEL BCI If obj.used_product Then
obj.used_month = FechaUsado.Month Dim FechaUsado As DateTime = Row.DataKey("FechaUsado").ToString().ToDateTime()
obj.used_year = FechaUsado.Year
obj.used_sale_date = FechaUsado 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 End If
Next Next
Catch ex As Exception Catch ex As Exception
@@ -23997,11 +24018,11 @@ Partial Class Ventas
End Sub 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 Retorno As Boolean = False
Dim Respuesta As String = "[]" 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" Dim Password As String = "ff31580a95f36b51ad27f970428b77a5a9245076"
Try Try
@@ -24048,13 +24069,22 @@ Partial Class Ventas
Dim resp = JArray.Parse(Respuesta) Dim resp = JArray.Parse(Respuesta)
If resp.Count > 0 Then 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 If resp(0)("Codigo").ToString().Contiene("500", "501", "502", "503", "504", "505", "506", "507", "508") Then
Alert(Msg, TipoMensaje.MsgInformacion)
Retorno = True Retorno = True
Dim ObjAcum As New ClsAcumuladores
If ObjAcum.UpdateEnvioPolizaVirutal(CvePolizaVirtual, True, Now) Then
Alert(Msg.ToString(), TipoMensaje.MsgInformacion)
End If
ObjAcum.Dispose()
Else 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 End If
Else Else
Alert("No se envió la poliza virtual", TipoMensaje.MsgAdvertencia) Alert("No se envió la poliza virtual", TipoMensaje.MsgAdvertencia)
@@ -24068,6 +24098,13 @@ Partial Class Ventas
Return Retorno Return Retorno
End Function 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 #End Region
Protected Sub DdlTipoRetencion_SelectedIndexChanged(sender As Object, e As EventArgs) Protected Sub DdlTipoRetencion_SelectedIndexChanged(sender As Object, e As EventArgs)
@@ -24112,4 +24149,5 @@ Partial Class Ventas
End Sub End Sub
End Class End Class

View File

@@ -938,6 +938,26 @@ Public Class WSGPSApp
End Function 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> <WebMethod>
Public Function GetTrayectos(CveCliente As Integer) As String Public Function GetTrayectos(CveCliente As Integer) As String
Dim Retorno As String = "[]" Dim Retorno As String = "[]"

View File

@@ -62,9 +62,16 @@ Public Class WsTSoft
Dim ObjGPS As New ClsGPS Dim ObjGPS As New ClsGPS
Dim Continuar As Boolean = ObjGPS.UltimaPosicionEquipoGetWS(DevID) Dim Continuar As Boolean = ObjGPS.UltimaPosicionEquipoGetWS(DevID)
Dim ObjPos As New LatLng Dim ObjPos As New LatLng
If Continuar Then If Continuar Then
'CONSULTA DIRECCIONES
Dim Direcciones As JArray = ConsultarDirecciones(ObjGPS.DtResultados, "Lat", "Lng")
For Each Dir As JObject In Direcciones
ObjGPS.DtResultados.Rows(Dir("Indice").ToEntero())("Direccion") = Dir("Direccion").ToString()
Next
ObjPos.Lat = ObjGPS.DtResultados.Rows("0")("Lat").ToString ObjPos.Lat = ObjGPS.DtResultados.Rows("0")("Lat").ToString
ObjPos.Lng = ObjGPS.DtResultados.Rows("0")("Lng").ToString ObjPos.Lng = ObjGPS.DtResultados.Rows("0")("Lng").ToString
ObjPos.Direccion = ObjGPS.DtResultados.Rows("0")("Direccion").ToString
Else Else
ObjPos.CurrentError = "No se pudo obtener la posición." ObjPos.CurrentError = "No se pudo obtener la posición."
End If End If
@@ -95,8 +102,17 @@ Public Class WsTSoft
Dim objTsoft As New ClsTSoft Dim objTsoft As New ClsTSoft
Dim Continuar As Boolean = objTsoft.GETRemisionesHistorial(FolioRemision, NoEconomico) Dim Continuar As Boolean = objTsoft.GETRemisionesHistorial(FolioRemision, NoEconomico)
Dim objRem As New GetRemisionHistorialesObj Dim objRem As New GetRemisionHistorialesObj
If Continuar Then If Continuar Then
objRem.Historial = objTsoft.DtResultados.DataTableToObject(Of GetRemisionHistorialsObj) Dim Dt = objTsoft.DtResultados.Copy()
Dt.Columns.Add("Direccion", GetType(String))
'CONSULTA DIRECCIONES
Dim Direcciones As JArray = ConsultarDirecciones(Dt, "Lat", "Lon")
For Each Dir As JObject In Direcciones
Dt.Rows(Dir("Indice").ToEntero())("Direccion") = Dir("Direccion").ToString()
Next
objRem.Historial = Dt.DataTableToObject(Of GetRemisionHistorialsObj)
objRem.CurrentError = "" objRem.CurrentError = ""
Else Else
objRem.Historial = New List(Of GetRemisionHistorialsObj) objRem.Historial = New List(Of GetRemisionHistorialsObj)
@@ -149,15 +165,15 @@ Public Class WsTSoft
End Function End Function
Public Function ConsultarDirecciones(Dt As DataTable) As JArray Public Function ConsultarDirecciones(Dt As DataTable, Optional LatName As String = "Latitud", Optional LonName As String = "Longitud") As JArray
Dim retorno As JArray = Nothing Dim retorno As JArray = Nothing
Dim posicionesArray = New JArray(From Row As DataRow In Dt Dim posicionesArray = New JArray(From Row As DataRow In Dt
Let index = Dt.Rows().IndexOf(Row) Let index = Dt.Rows().IndexOf(Row)
Select New JObject( Select New JObject(
New JProperty("indice", index), New JProperty("indice", index),
New JProperty("cveTrama", -1), New JProperty("cveTrama", -1),
New JProperty("lat", Row("Latitud").ToString.ToDouble), New JProperty("lat", Row(LatName).ToString.ToDouble),
New JProperty("lon", Row("Longitud").ToString.ToDouble) New JProperty("lon", Row(LonName).ToString.ToDouble)
)) ))
Dim Base64array = Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(posicionesArray.ToString())) Dim Base64array = Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(posicionesArray.ToString()))
@@ -193,9 +209,10 @@ Public Class WsTSoft
End Class End Class
<Serializable> <Serializable>
Public Class LatLng Public Class LatLng
Public Lat As String Public Property Lat As String
Public Lng As String Public Property Lng As String
Public CurrentError As String Public Property Direccion As String
Public Property CurrentError As String
End Class End Class
<Serializable> <Serializable>
Public Class GetRemisionHistorialsObj Public Class GetRemisionHistorialsObj
@@ -203,7 +220,8 @@ Public Class WsTSoft
Public Property FolioRemision As String Public Property FolioRemision As String
Public Property NoEconomico As String Public Property NoEconomico As String
Public Property Lat As String Public Property Lat As String
Public Property Lon As String Public Property Lon As String
Public Property Direccion As String
Public Property Distancia As String Public Property Distancia As String
Public Property TrackingNumber As String Public Property TrackingNumber As String
Public Property CveEstatus As Integer Public Property CveEstatus As Integer

10
vwd.webinfo Normal file
View 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>