This commit is contained in:
2025-02-27 12:25:49 -07:00
14 changed files with 613 additions and 299 deletions

View File

@@ -4,6 +4,7 @@ Option Strict On
Imports System.Data Imports System.Data
Imports System.Data.SqlClient Imports System.Data.SqlClient
Imports Extensiones Imports Extensiones
Imports Profact.TimbraCFDI40
Public Class ClsVentas Public Class ClsVentas
Implements IDisposable Implements IDisposable
@@ -1826,6 +1827,7 @@ Public Class ClsVentas
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
Retorno = True Retorno = True
Retorno = True
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error al obtener los datos del reporte.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error al obtener los datos del reporte.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
@@ -1856,38 +1858,53 @@ Public Class ClsVentas
'Reporte de Ventas por Período 'Reporte de Ventas por Período
'Public Function GetRepVentasPeriodos(FechaI As Date, FechaF As Date, FechaIEjec As Date, FechaFEjec As Date, CveCliente As Integer, CveSubProyectoEjecucion As Integer,
' CveVendedor As Integer, CveUsuario As Integer, CveEstatus As Integer, IVA As String, CveEmpresa As Integer, Gpo As Integer, Optional TipoDocto As String = "-1",
' Optional CveProyecto As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional TipoCambio As Integer = 1, Optional TCEspecifico As Decimal = -1, Optional CveUsuarioConsulta As Integer = -1, Optional VerEn As Integer = -1,
' Optional CveClienteClasificacion As Integer = -1, Optional TipoCliente As Integer = -1, Optional ModalidadContable As Boolean = False) As Boolean
Public Function GetRepVentasPeriodos(FechaI As Date, FechaF As Date, FechaIEjec As Date, FechaFEjec As Date, CveCliente As Integer, CveSubProyectoEjecucion As Integer, Public Function GetRepVentasPeriodos(FechaI As Date, FechaF As Date, FechaIEjec As Date, FechaFEjec As Date, CveCliente As Integer, CveSubProyectoEjecucion As Integer,
CveVendedor As Integer, CveUsuario As Integer, CveEstatus As Integer, IVA As String, CveEmpresa As Integer, Gpo As Integer, Optional TipoDocto As String = "-1", CveVendedor As String, CveUsuario As Integer, CveEstatus As String, IVA As String, CveEmpresa As Integer, Gpo As Integer, Optional TipoDocto As String = "-1",
Optional CveProyecto As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional TipoCambio As Integer = 1, Optional TCEspecifico As Decimal = -1, Optional CveUsuarioConsulta As Integer = -1, Optional VerEn As Integer = -1, Optional CveProyecto As Integer = -1, Optional CveSubProyecto As String = "-1", Optional TipoCambio As Integer = 1, Optional TCEspecifico As Decimal = -1, Optional CveUsuarioConsulta As Integer = -1,
Optional CveClienteClasificacion As Integer = -1, Optional TipoCliente As Integer = -1, Optional ModalidadContable As Boolean = False) As Boolean Optional CveClienteClasificacion As Integer = -1, Optional CveCondicionesPago As Integer = -1, Optional TipoCliente As Integer = -1, Optional ModalidadContable As Boolean = False,
Optional EsDistribuidor As Integer = -1, Optional CveTipoRelacion As Integer = -1, Optional ServicioDomicilio As Integer = -1, Optional EsFacturaGlobal As Integer = -1, Optional EsFilial As Integer = -1,
Optional VerEn As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_VentasGetRepPeriodo") DataAdapter("PA_VentasGetRepPeriodo")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
'.Add("@CveVenta", SqlDbType.Int).Value = CveVenta 'PARAMETROS BASE
.Add("@FechaI", SqlDbType.Date).Value = FechaI .Add("@FechaI", SqlDbType.Date).Value = FechaI
.Add("@FechaF", SqlDbType.Date).Value = FechaF .Add("@FechaF", SqlDbType.Date).Value = FechaF
.Add("@FechaIEjec", SqlDbType.Date).Value = FechaIEjec .Add("@FechaIEjec", SqlDbType.Date).Value = FechaIEjec
.Add("@FechaFEjec", SqlDbType.Date).Value = FechaFEjec .Add("@FechaFEjec", SqlDbType.Date).Value = FechaFEjec
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente .Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveSubProyectoEjecucion", SqlDbType.Int).Value = CveSubProyectoEjecucion .Add("@CveSubProyectoEjecucion", SqlDbType.Int).Value = CveSubProyectoEjecucion
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor .Add("@CveVendedor", SqlDbType.VarChar).Value = CveVendedor
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus .Add("@CveEstatus", SqlDbType.VarChar).Value = CveEstatus
.Add("@IVA", SqlDbType.VarChar).Value = IVA .Add("@IVA", SqlDbType.VarChar).Value = IVA
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@GPO", SqlDbType.Int).Value = Gpo .Add("@GPO", SqlDbType.Int).Value = Gpo
.Add("@TipoDocto", SqlDbType.VarChar).Value = TipoDocto .Add("@TipoDocto", SqlDbType.VarChar).Value = TipoDocto
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@CveSubProyecto", SqlDbType.VarChar).Value = CveSubProyecto
.Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto .Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto
.Add("@TipoCambio", SqlDbType.Int).Value = TipoCambio .Add("@TipoCambio", SqlDbType.Int).Value = TipoCambio
.Add("@TCEspecifico", SqlDbType.Float).Value = TCEspecifico .Add("@TCEspecifico", SqlDbType.Float).Value = TCEspecifico
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta .Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
.Add("@VerEn", SqlDbType.Int).Value = VerEn
.Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion .Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion
.Add("@CveCondicionesPago", SqlDbType.Int).Value = CveCondicionesPago
.Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente .Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente
.Add("@EsDistribuidor", SqlDbType.Int).Value = EsDistribuidor
.Add("@ModalidadContable", SqlDbType.Bit).Value = ModalidadContable .Add("@ModalidadContable", SqlDbType.Bit).Value = ModalidadContable
.Add("@CveTipoRelacion", SqlDbType.Int).Value = CveTipoRelacion
.Add("@ServicioDomicilio", SqlDbType.Int).Value = ServicioDomicilio
.Add("@EsFacturaGlobal", SqlDbType.Int).Value = EsFacturaGlobal
.Add("@EsFilial", SqlDbType.Int).Value = EsFilial
'PARAMETROS EXTRA
.Add("@VerEn", SqlDbType.Int).Value = VerEn
End With End With
Try Try
@@ -2485,32 +2502,28 @@ Public Class ClsVentas
Public Function GetPromociones(CvePromocion As Integer, Fecha As Date, CveVendedor As Integer, CveCliente As Integer, Estatus As Integer, CveEmpresa As Integer, Public Function GetPromociones(CvePromocion As Integer, Fecha As Date, CveVendedor As Integer, CveCliente As Integer, Estatus As Integer, CveEmpresa As Integer,
CveSubProyecto As Integer, Optional CveMarca As Integer = -1, Optional CveUsuario As Integer = -1, Optional CvePS As Integer = -1) As Boolean CveSubProyecto As Integer, Optional CveMarca As Integer = -1, Optional CveUsuario As Integer = -1, Optional CvePS As Integer = -1) As Boolean
Dim Retorno As Boolean = False
Dim Retorno As Boolean = False DataAdapter("PA_Vta_PromocionesGet")
DataAdapter("PA_Vta_PromocionesGet") With SqlAdapter.SelectCommand.Parameters
.Add("@CvePromocion", SqlDbType.Int).Value = CvePromocion
With SqlAdapter.SelectCommand.Parameters .Add("@Fecha", SqlDbType.Date).Value = Fecha
.Add("@CvePromocion", SqlDbType.Int).Value = CvePromocion .Add("@Estatus", SqlDbType.Int).Value = Estatus
.Add("@Fecha", SqlDbType.Date).Value = Fecha .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
.Add("@Estatus", SqlDbType.Int).Value = Estatus .Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveMarca", SqlDbType.Int).Value = CveMarca
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuario
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca .Add("@CvePS", SqlDbType.Int).Value = CvePS
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuario End With
.Add("@CvePS", SqlDbType.Int).Value = CvePS Try
End With SqlAdapter.Fill(Data)
Retorno = True
Try Catch ex As Exception
SqlAdapter.Fill(Data) OnError("Ocurrió un error al obtener las Promociones.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
Retorno = True End Try
Catch ex As Exception Return Retorno
OnError("Ocurrió un error al obtener las Promociones.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) End Function
End Try
Return Retorno
End Function
Public Function AddPromociones(Promocion As String, FechaInicio As Date, FechaFin As Date, CveVendedor As Integer, CveCliente As Integer, Estatus As Boolean, Public Function AddPromociones(Promocion As String, FechaInicio As Date, FechaFin As Date, CveVendedor As Integer, CveCliente As Integer, Estatus As Boolean,
CveMoneda As Integer, CveUsuario As Integer, CveEmpresa As Integer, CveSubProyecto As Integer, TipoAplicacion As String, CveMoneda As Integer, CveUsuario As Integer, CveEmpresa As Integer, CveSubProyecto As Integer, TipoAplicacion As String,
@@ -2615,26 +2628,23 @@ Public Class ClsVentas
End Function End Function
Public Function UpdatePromocionEstatus(CvePromocion As Integer, Estatus As Boolean, CveUsuario As Integer, CveEmpresa As Integer) As Boolean Public Function UpdatePromocionEstatus(CvePromocion As Integer, Estatus As Boolean, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Vta_PromocionEstatusUpdate") DataAdapter("PA_Vta_PromocionEstatusUpdate")
With SqlAdapter.SelectCommand.Parameters
With SqlAdapter.SelectCommand.Parameters .Add("@CvePromocion", SqlDbType.Float).Value = CvePromocion
.Add("@CvePromocion", SqlDbType.Float).Value = CvePromocion .Add("@Estatus", SqlDbType.Bit).Value = Estatus
.Add("@Estatus", SqlDbType.Bit).Value = Estatus .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa End With
End With Try
SqlAdapter.Fill(Data)
Try Retorno = True
SqlAdapter.Fill(Data) Catch ex As Exception
Retorno = True OnError("Ocurrió un error al actualizar el estatus la Promoción.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
Catch ex As Exception End Try
OnError("Ocurrió un error al actualizar el estatus la Promoción.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) Return Retorno
End Try End Function
Return Retorno
End Function
@@ -3297,32 +3307,29 @@ Public Class ClsVentas
Public Function GetRepRemisionesSinFacturar(FechaI As String, FechaF As String, FechaV As String, CveSubProyecto As String, CveCliente As Integer, CveContrato As Integer, CveVendedor As String, CveEmpresa As Integer, Public Function GetRepRemisionesSinFacturar(FechaI As String, FechaF As String, FechaV As String, CveSubProyecto As String, CveCliente As Integer, CveContrato As Integer, CveVendedor As String, CveEmpresa As Integer,
Optional CveUsuarioConsulta As Integer = -1, Optional ConsultaInventario As Boolean = False, Optional PrimerProducto As Boolean = False) As Boolean Optional CveUsuarioConsulta As Integer = -1, Optional ConsultaInventario As Boolean = False, Optional PrimerProducto As Boolean = False) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Vta_RepRemisionesGet") DataAdapter("PA_Vta_RepRemisionesGet")
With SqlAdapter.SelectCommand.Parameters
With SqlAdapter.SelectCommand.Parameters .Add("@FechaI", SqlDbType.VarChar).Value = FechaI
.Add("@FechaI", SqlDbType.VarChar).Value = FechaI .Add("@FechaF", SqlDbType.VarChar).Value = FechaF
.Add("@FechaF", SqlDbType.VarChar).Value = FechaF .Add("@FechaV", SqlDbType.VarChar).Value = FechaV
.Add("@FechaV", SqlDbType.VarChar).Value = FechaV .Add("@CveSubProyecto", SqlDbType.VarChar).Value = CveSubProyecto
.Add("@CveSubProyecto", SqlDbType.VarChar).Value = CveSubProyecto .Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente .Add("@CveContrato", SqlDbType.Int).Value = CveContrato
.Add("@CveContrato", SqlDbType.Int).Value = CveContrato .Add("@CveVendedor", SqlDbType.VarChar).Value = CveVendedor
.Add("@CveVendedor", SqlDbType.VarChar).Value = CveVendedor .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta .Add("@ConsultaInventario", SqlDbType.Bit).Value = ConsultaInventario
.Add("@ConsultaInventario", SqlDbType.Bit).Value = ConsultaInventario .Add("@PrimerProducto", SqlDbType.Bit).Value = PrimerProducto
.Add("@PrimerProducto", SqlDbType.Bit).Value = PrimerProducto End With
End With Try
SqlAdapter.Fill(Data)
Try Retorno = True
SqlAdapter.Fill(Data) Catch ex As Exception
Retorno = True OnError("Ocurrió un error al obtener las remisiones sin facturar.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
Catch ex As Exception End Try
OnError("Ocurrió un error al obtener las remisiones sin facturar.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) Return Retorno
End Try End Function
Return Retorno
End Function
Public Function GetRepRemisionesSinFacturarDetalle(FechaI As String, FechaF As String, FechaV As String, CveCliente As Integer, CveContrato As Integer, CveVenta As Integer, CveEmpresa As Integer, CveSubProyecto As String, Optional CveUsuarioConsulta As Integer = -1, Optional ConsultaInventario As Boolean = False) As Boolean Public Function GetRepRemisionesSinFacturarDetalle(FechaI As String, FechaF As String, FechaV As String, CveCliente As Integer, CveContrato As Integer, CveVenta As Integer, CveEmpresa As Integer, CveSubProyecto As String, Optional CveUsuarioConsulta As Integer = -1, Optional ConsultaInventario As Boolean = False) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
@@ -7615,28 +7622,25 @@ Public Class ClsVentas
End Function End Function
Public Function GetSabanaE189(CveEmpresa As Integer, FechaInicio As Date, FechaFin As Date, CveProveedor As Integer, CodigoPSInicio As String, CodigoPSFin As String) As Boolean Public Function GetSabanaE189(CveEmpresa As Integer, FechaInicio As Date, FechaFin As Date, CveProveedor As Integer, CodigoPSInicio As String, CodigoPSFin As String) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Vta_VentasSabanaDatos") DataAdapter("PA_Vta_VentasSabanaDatos")
With SqlAdapter.SelectCommand.Parameters
With SqlAdapter.SelectCommand.Parameters .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio .Add("@FechaFin", SqlDbType.Date).Value = FechaFin
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin .Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor .Add("@CodigoProductoI", SqlDbType.VarChar).Value = CodigoPSInicio
.Add("@CodigoProductoI", SqlDbType.VarChar).Value = CodigoPSInicio .Add("@CodigoProductoF", SqlDbType.VarChar).Value = CodigoPSFin
.Add("@CodigoProductoF", SqlDbType.VarChar).Value = CodigoPSFin End With
End With Try
SqlAdapter.Fill(Data)
Try Retorno = True
SqlAdapter.Fill(Data) Catch ex As Exception
Retorno = True OnError("Ocurrió un error al obtener los datos de la Venta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
Catch ex As Exception End Try
OnError("Ocurrió un error al obtener los datos de la Venta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) Return Retorno
End Try End Function
Return Retorno
End Function
#Region "IDisposable Support" #Region "IDisposable Support"

View File

@@ -1689,9 +1689,16 @@ Namespace Modelos
Timbre.Comprobante.Folio = Me.Folio.ToString() Timbre.Comprobante.Folio = Me.Folio.ToString()
Timbre.Comprobante.Serie = Me.Serie Timbre.Comprobante.Serie = Me.Serie
Timbre.Comprobante.Fecha = Me.FechaCP Timbre.Comprobante.Fecha = Me.FechaCP
Timbre.Comprobante.FormadePago = Me.ClaveFormaPagoSAT
Timbre.Comprobante.CondicionesdePago = Me.FormaPago 'Timbre.Comprobante.FormadePago = Me.ClaveFormaPagoSAT
Timbre.Comprobante.MetodoPago = Me.ClaveMetodoPagoSAT 'Timbre.Comprobante.CondicionesdePago = Me.FormaPago
'Timbre.Comprobante.MetodoPago = Me.ClaveMetodoPagoSAT
Timbre.Comprobante.MetodoPago = ClsPaginas.GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", $"CveMetodoPago = {Me.CveMetodoPago}")
Timbre.Comprobante.FormadePago = ClsPaginas.GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", $"CveFormaPago = {Me.CveFormaPago}")
Timbre.Receptor.UsoCFDI = ClsPaginas.GlobalDTSATUsosCFDI.FiltroPrimeroValor("UsoCFDI", $"CveUsoCFDI = {Me.CveUsoCFDI}")
Timbre.Comprobante.CondicionesdePago = ClsPaginas.GlobalDTVtaFormaPago().FiltroPrimeroValor("FormaPago", $"CveFormaPago = {Me.CveFormaPago}")
Timbre.Comprobante.SubTotal = Me.SubTotal Timbre.Comprobante.SubTotal = Me.SubTotal
Timbre.Comprobante.Descuentos = Me.Descuento Timbre.Comprobante.Descuentos = Me.Descuento
Timbre.Comprobante.Moneda = Me.MonedaSAT Timbre.Comprobante.Moneda = Me.MonedaSAT
@@ -1720,7 +1727,7 @@ Namespace Modelos
Timbre.Receptor.ResidenciaFiscal = "" Timbre.Receptor.ResidenciaFiscal = ""
Timbre.Receptor.NumeroRegistroTributario = "" Timbre.Receptor.NumeroRegistroTributario = ""
Timbre.Receptor.UsoCFDI = Me.ClaveUsoCFDISAT 'Timbre.Receptor.UsoCFDI = Me.ClaveUsoCFDISAT
Dim totSubTotal As Decimal = Me.SubTotal Dim totSubTotal As Decimal = Me.SubTotal
Dim totIVA As Decimal = Me.IVA Dim totIVA As Decimal = Me.IVA

View File

@@ -1284,6 +1284,32 @@ Partial Class Compras_Compras
End Property End Property
Private Property ObsOC As String
Get
If ViewState("ObsOC") Is Nothing Then
ViewState("ObsOC") = ""
End If
Return ViewState("ObsOC").ToString
End Get
Set(value As String)
ViewState("ObsOC") = value
End Set
End Property
Private Property AplicarObsOC As Boolean
Get
If ViewState("AplicarObsOC") Is Nothing Then
ViewState("AplicarObsOC") = False
End If
Return Boolean.Parse(ViewState("AplicarObsOC").ToString)
End Get
Set(value As Boolean)
ViewState("AplicarObsOC") = value
End Set
End Property
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
@@ -5789,6 +5815,10 @@ Partial Class Compras_Compras
Dim ObsGDiaz As String = If(EsGrupoDiaz, TxtObsFact.Text, "") Dim ObsGDiaz As String = If(EsGrupoDiaz, TxtObsFact.Text, "")
If AplicarObsOC Then
ObsGDiaz = ObsOC
End If
For Each tCveAlmacen As Integer In ListAlmacenes For Each tCveAlmacen As Integer In ListAlmacenes
If GvInv.Rows(indice).FCDropDownList("DdlRecibirInv").SelectedValue = "1" Then If GvInv.Rows(indice).FCDropDownList("DdlRecibirInv").SelectedValue = "1" Then
Continue For Continue For
@@ -15049,7 +15079,18 @@ Partial Class Compras_Compras
Dim ObsOCAsignado As Boolean = False
For Each CveOCItem As String In ArrayCveOC.Distinct For Each CveOCItem As String In ArrayCveOC.Distinct
If Not ObsOCAsignado Then
If ObjOC.GetOC(CveOCItem.ToEntero, UsuarioActual.CveEmpresa) Then
ObsOC = ObjOC.Descripcion
End If
ObsOCAsignado = True
End If
If ObjOC.GetOrdenesDetalle(CveOCItem.ToEntero, UsuarioActual.CveEmpresa) AndAlso ObjOC.DtResultados.Rows.Count > 0 Then If ObjOC.GetOrdenesDetalle(CveOCItem.ToEntero, UsuarioActual.CveEmpresa) AndAlso ObjOC.DtResultados.Rows.Count > 0 Then
If IsNothing(DTOCTemp) Then If IsNothing(DTOCTemp) Then
DTOCTemp = ObjOC.DtResultados.Copy DTOCTemp = ObjOC.DtResultados.Copy
@@ -15932,6 +15973,8 @@ Partial Class Compras_Compras
End If End If
AplicarObsOC = True
CalculaTotales() CalculaTotales()
End Sub End Sub

View File

@@ -6080,6 +6080,7 @@ Partial Class Compras_eFacturas
End Sub End Sub
Private Sub VinculacionAutomaticaRNC() Private Sub VinculacionAutomaticaRNC()
Dim ErrorProceso As Boolean = False Dim ErrorProceso As Boolean = False
Dim ErrorProcesoStr As String = "" Dim ErrorProcesoStr As String = ""
Dim Contador As Integer = 0 Dim Contador As Integer = 0
@@ -6088,7 +6089,6 @@ Partial Class Compras_eFacturas
'DataKeyNames="CveFactura,CveCompra,CveProveedor,SerieFolio,NombreProveedor,UUID,RFCDe,RFCPara,TipoFactura,FueValidado,TipoComprobante,Version,RFCde,XML,PDF,BloquePorComplemento,Total,CveTipoProveedor,FechaFactura" 'DataKeyNames="CveFactura,CveCompra,CveProveedor,SerieFolio,NombreProveedor,UUID,RFCDe,RFCPara,TipoFactura,FueValidado,TipoComprobante,Version,RFCde,XML,PDF,BloquePorComplemento,Total,CveTipoProveedor,FechaFactura"
For Each GvRow As GridViewRow In GvD.Rows For Each GvRow As GridViewRow In GvD.Rows
If GvRow.DataKey("TipoComprobante") = "E" Then If GvRow.DataKey("TipoComprobante") = "E" Then
@@ -6113,31 +6113,97 @@ Partial Class Compras_eFacturas
CompraActual.Descripcion = TxtDescripcionCompra.Text.Trim CompraActual.Descripcion = TxtDescripcionCompra.Text.Trim
CompraActual.NombreProveedor = GvRow.DataKey("NombreProveedor") CompraActual.NombreProveedor = GvRow.DataKey("NombreProveedor")
Dim listaRNC As New List(Of Integer) Dim DT_RNC As New DataTable
DT_RNC.Columns.Add("CveCompra", GetType(Integer))
DT_RNC.Columns.Add("CveSubProyecto", GetType(Integer))
DT_RNC.Columns.Add("Saldo", GetType(Decimal))
For Each DR As String In CompraActual.DocumentosRelacionadosUUIDSList For Each DR As String In CompraActual.DocumentosRelacionadosUUIDSList
If Objcompras.GetVinculacionRNC(UUID:=DR, CveEmpresa:=UsuarioActual.CveEmpresa) Then If Objcompras.GetVinculacionRNC(UUID:=DR, CveEmpresa:=UsuarioActual.CveEmpresa) Then
For Each drRNC As DataRow In Objcompras.DtResultados.Rows
Dim DR_RNC As DataRow = DT_RNC.NewRow
DR_RNC("CveCompra") = drRNC("CveCompra").ToString.ToEntero
DR_RNC("CveSubProyecto") = drRNC("CveSubProyecto").ToString.ToEntero
DR_RNC("Saldo") = drRNC("Saldo").ToString.ToDecimal
DT_RNC.Rows.Add(DR_RNC)
Next
End If End If
Next Next
Dim Saldo As Decimal = DT_RNC.SUM("Saldo")
Dim CveSubProyectoPrincipal As Integer = DT_RNC.FiltroPrimeroValor("CveSubProyecto").ToEntero
If Saldo >= CompraActual.Total Then
Dim CvePSRNC As Integer = UsuarioActual.Empresa.Funcionalidad(580).ToEntero
Dim PSRow As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=CvePSRNC).FiltroPrimero("")
If CompraActual.ConfiguraRegistroCompra(CvePSRNC, CveSubProyectoPrincipal, -1, -1,
-1, -1, NumeroReembolso:="",
DTProrrateo:=New DataTable, DTPagosDeudores:=New DataTable, TipoComprobante:="E") Then
If CompraActual.AddCompra(Objcompras.IniciaTransacSQL()) Then
Contador = Contador + 1
Else
ErrorProceso = True
ErrorProcesoStr = CompraActual.MensajeError
Exit For
End If
Else
ErrorProceso = True
ErrorProcesoStr = CompraActual.MensajeError
Exit For
End If
If Not ErrorProceso Then
Dim ObjConta As New ClsContabilidad(Objcompras.IniciaTransacSQL())
Dim TotalSaldo As Decimal = CompraActual.Total
Dim Referencia As String = GvRow.DataKey("SerieFolio")
Dim Concepto As String = GvRow.DataKey("SerieFolio")
Dim TipoCambio As Decimal = GlobalTipoCambio(GvRow.DataKey("FechaFactura").ToDate).ToDecimal
For Each drRNC As GridViewRow In DT_RNC.Rows
Dim ImporteRNCSaldar As Decimal = drRNC.DataKey("Saldo").ToDecimal
Dim CveCompraRNC As Integer = drRNC.DataKey("CveCompra").ToEntero
If ImporteRNCSaldar > TotalSaldo Then ImporteRNCSaldar = TotalSaldo
If Not ErrorProceso Then
If Not ObjConta.AddPrePolizasDetalle(CompraActual.CvePrePoliza, False, ImporteRNCSaldar, ImporteRNCSaldar, 373, Referencia, Concepto, CveCompra:=CveCompraRNC, CveProveedor:=Me.CveProveedor, ImporteME:=If(TipoCambio = 1, 0, ImporteRNCSaldar), TipoCambio:=TipoCambio,
CveClasificacion:=-1, CveSubProyecto:=CompraActual.CveSubProyecto, Contabilizable:=True) Then
ErrorProceso = True
Exit For
End If
If Not ErrorProceso Then
Dim ConPrePNC As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(15, CompraActual.CveMoneda, True, CompraActual.CveTipoConceptoProveedor)
If Not ObjConta.AddPrePolizasDetalle(CompraActual.CvePrePoliza, True, ImporteRNCSaldar, ImporteRNCSaldar, ConPrePNC.CveConcepto, Referencia, Concepto, CveCompra:=CompraActual.CveCompra, CveProveedor:=Me.CveProveedor, ImporteME:=If(TipoCambio = 1, 0, ImporteRNCSaldar), TipoCambio:=TipoCambio,
CveClasificacion:=-1, CveSubProyecto:=CompraActual.CveSubProyecto, Contabilizable:=True) Then
ErrorProceso = True
Exit For
End If
End If
If Not ErrorProceso Then
TotalSaldo = TotalSaldo - ImporteRNCSaldar
End If
End If
Next
End If
End If
'If CompraActual.ConfiguraRegistroCompra(DdlPS.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, CveCajachica, CvePersonal,
' DdlRetIVAConcepto.SelectedValue.ToEntero, DdlRetISRConcepto.SelectedValue.ToEntero, NumeroReembolso:=TxtNumeroReembolso.Text,
' DTProrrateo:=DTProrrateo, DTPagosDeudores:=New DataTable) Then
' 'FIX ME OIC Recuerda cambiar el tipo de documento al registrar, actualmente tiene FAC y NC uno u otro, ajustar para que registre *** Egs *** cuado TipoComprobante = 'E'
' If CompraActual.AddCompra(Objcompras.IniciaTransacSQL()) Then
' Contador = Contador + 1
' Else
' ErrorProceso = True
' ErrorProcesoStr = CompraActual.MensajeError
' Exit For
' End If
'Else
' ErrorProceso = True
' ErrorProcesoStr = CompraActual.MensajeError
' Exit For
'End If
'If RBLContado.SelectedValue.ToEntero = 4 Then 'Deudores 'If RBLContado.SelectedValue.ToEntero = 4 Then 'Deudores
' Dim CompraActualPagar = New Compra ' Dim CompraActualPagar = New Compra
@@ -6850,7 +6916,8 @@ Public Class ClsCompraManager
#End Region #End Region
End Sub End Sub
Public Function ConfiguraRegistroCompra(CvePS As Integer, CveSubProyecto As Integer, CveCajaChica As Integer, CvePersonal As Integer, CveRetIVAConcepto As Integer, CveRetISRConcepto As Integer, NumeroReembolso As String, DTProrrateo As DataTable, DTPagosDeudores As DataTable) As Boolean Public Function ConfiguraRegistroCompra(CvePS As Integer, CveSubProyecto As Integer, CveCajaChica As Integer, CvePersonal As Integer, CveRetIVAConcepto As Integer, CveRetISRConcepto As Integer, NumeroReembolso As String, DTProrrateo As DataTable,
DTPagosDeudores As DataTable, Optional TipoComprobante As String = "") As Boolean
Dim respuesta As Boolean = True Dim respuesta As Boolean = True
Me.CveSubProyecto = CveSubProyecto Me.CveSubProyecto = CveSubProyecto
@@ -6863,6 +6930,10 @@ Public Class ClsCompraManager
Me.NumeroReembolso = NumeroReembolso Me.NumeroReembolso = NumeroReembolso
Me.DTPagosDeudores = DTPagosDeudores Me.DTPagosDeudores = DTPagosDeudores
If TipoComprobante.Length > 0 Then
Me.TipoComprobante = TipoComprobante
End If
Dim dRowSubProyecto As DataRow = GlobalDTSubProyectos(UsuarioActual.CveEmpresa, CveSubProyecto:=CveSubProyecto).FiltroPrimero("") Dim dRowSubProyecto As DataRow = GlobalDTSubProyectos(UsuarioActual.CveEmpresa, CveSubProyecto:=CveSubProyecto).FiltroPrimero("")
If dRowSubProyecto IsNot Nothing Then If dRowSubProyecto IsNot Nothing Then
@@ -6877,7 +6948,7 @@ Public Class ClsCompraManager
Dim DTIndex As DataTable = TmpDT.FiltraParametros("", DistinctColumns:={"Consec"}) Dim DTIndex As DataTable = TmpDT.FiltraParametros("", DistinctColumns:={"Consec"})
For Each dRowIndex As DataRow In DTIndex.Rows For Each dRowIndex As DataRow In DTIndex.Rows
If Not UpdatePSReembolso(dRowIndex("Consec").ToString.ToEntero, CvePS) Then If Not UpdatePSDetalles(dRowIndex("Consec").ToString.ToEntero, CvePS) Then
respuesta = False respuesta = False
End If End If
Next Next
@@ -7830,7 +7901,7 @@ Public Class ClsCompraManager
End Sub End Sub
Private Function UpdatePSReembolso(Index As Integer, CvePS As Integer) As Boolean Private Function UpdatePSDetalles(Index As Integer, CvePS As Integer) As Boolean
Dim Respuesta As Boolean = True Dim Respuesta As Boolean = True

View File

@@ -5884,6 +5884,7 @@ Se ha recibido el número arriba indicado de bultos/contenedores/remolques/autot
<Border> <Border>
<Style>Solid</Style> <Style>Solid</Style>
</Border> </Border>
<BackgroundColor>LightGrey</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft> <PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight> <PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop> <PaddingTop>2pt</PaddingTop>
@@ -6015,6 +6016,7 @@ Se ha recibido el número arriba indicado de bultos/contenedores/remolques/autot
<Border> <Border>
<Style>Solid</Style> <Style>Solid</Style>
</Border> </Border>
<BackgroundColor>LightGrey</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft> <PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight> <PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop> <PaddingTop>2pt</PaddingTop>
@@ -6134,6 +6136,7 @@ Se ha recibido el número arriba indicado de bultos/contenedores/remolques/autot
<Border> <Border>
<Style>Solid</Style> <Style>Solid</Style>
</Border> </Border>
<BackgroundColor>LightGrey</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft> <PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight> <PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop> <PaddingTop>2pt</PaddingTop>

View File

@@ -285,7 +285,8 @@
<div class="row" id="TrProveedor" runat="server" visible="false"> <div class="row" id="TrProveedor" runat="server" visible="false">
<label class="col-md-1 truncate">Proveedor</label> <label class="col-md-1 truncate">Proveedor</label>
<div class="col-md-5"> <div class="col-md-5">
<asp:DropDownList ID="DdlProveedor" CssClass="form-control select2me" runat="server" DataTextField="RazonSocial" DataValueField="CveProveedor"></asp:DropDownList> <%--<asp:DropDownList ID="DdlProveedor" CssClass="form-control select2me" runat="server" DataTextField="RazonSocial" DataValueField="CveProveedor"></asp:DropDownList>--%>
<ADS:Dropdownlost ID="DdlProveedores" runat="server" CssStyle="width: 100%;" Width="100%" DataTextField="RazonSocial" DataValueField="CveProveedor"></ADS:Dropdownlost>
</div> </div>
</div> </div>
<div class="row" id="TrTipoCargado" runat="server" visible="false"> <div class="row" id="TrTipoCargado" runat="server" visible="false">

View File

@@ -1130,10 +1130,18 @@ Partial Class Inventarios_EntradasSalidas
'TxtPedidoContrato.Text = Mov.PedidoContrato 'TxtPedidoContrato.Text = Mov.PedidoContrato
If Mov.CveProveedor > 0 Then If Mov.CveProveedor > 0 Then
DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa, Mov.CveProveedor) 'DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa, Mov.CveProveedor)
DdlProveedor.DataBind() 'DdlProveedor.DataBind()
DdlProveedor.SelectedValueExist(Mov.CveProveedor) 'DdlProveedor.SelectedValueExist(Mov.CveProveedor)
DdlProveedor.Enabled = False 'DdlProveedor.Enabled = False
'CargaProveedores
DdlProveedores.setEsWebService(True)
DdlProveedores.Attributes.Add("data-metodo", "getproveedores")
DdlProveedores.txtValue.Value = Mov.CveProveedor.ToString
DdlProveedores.txtText.Value = Mov.DtResultados.Rows(0)("RazonSocial").ToString
DdlProveedores.SelectedValue = "-1"
TrProveedor.Visible = True TrProveedor.Visible = True
End If End If
@@ -1766,6 +1774,10 @@ Partial Class Inventarios_EntradasSalidas
End Sub End Sub
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
If DdlConcepto.SelectedValue.ToEntero = 28 AndAlso DdlProveedores.SelectedValue.ToEntero <= 0 Then
Alert("Debe seleccionar un proveedor", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If Not IsDate(TxtFecha.Text.Replace(",", "")) Then If Not IsDate(TxtFecha.Text.Replace(",", "")) Then
Alert("Debe seleccioanr una fecha valida", TipoMensaje.MsgAdvertencia) Alert("Debe seleccioanr una fecha valida", TipoMensaje.MsgAdvertencia)
@@ -1978,7 +1990,7 @@ Partial Class Inventarios_EntradasSalidas
tFolio = If(TxtFolio.Text.ToEntero <> FolioAsignado, TxtFolio.Text.ToEntero, -1) tFolio = If(TxtFolio.Text.ToEntero <> FolioAsignado, TxtFolio.Text.ToEntero, -1)
End If End If
Dim tCveProveedor As Integer = -1 Dim tCveProveedor As Integer = -1
If DdlProveedor.SelectedValue.ToEntero > 0 Then tCveProveedor = DdlProveedor.SelectedValue.ToEntero If DdlProveedores.SelectedValue.ToEntero > 0 Then tCveProveedor = DdlProveedores.SelectedValue.ToEntero
Dim obs As String = TxtObservaciones.Text.Trim() Dim obs As String = TxtObservaciones.Text.Trim()
If obs = "" Then If obs = "" Then
obs = DdlConcepto.SelectedItem.Text obs = DdlConcepto.SelectedItem.Text
@@ -2604,8 +2616,13 @@ Partial Class Inventarios_EntradasSalidas
Case "28" Case "28"
TrProveedor.Visible = True TrProveedor.Visible = True
DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa) 'DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
DdlProveedor.DataBind() 'DdlProveedor.DataBind()
'CargaProveedores
DdlProveedores.setEsWebService(True)
DdlProveedores.Attributes.Add("data-metodo", "getproveedores")
DdlProveedores.SelectedText = "Seleccione Uno"
DdlProveedores.SelectedValue = "-1"
If UsuarioActual.CveEmpresa = 119 Then txtPrecio.Enabled = False If UsuarioActual.CveEmpresa = 119 Then txtPrecio.Enabled = False
Case Else Case Else
@@ -5288,7 +5305,7 @@ Partial Class Inventarios_EntradasSalidas
If TxtFecha.Visible Then TxtFecha.Enabled = True If TxtFecha.Visible Then TxtFecha.Enabled = True
If TxtResponsable.Visible Then TxtResponsable.Enabled = True If TxtResponsable.Visible Then TxtResponsable.Enabled = True
If TxtObservaciones.Visible Then TxtObservaciones.Enabled = True If TxtObservaciones.Visible Then TxtObservaciones.Enabled = True
If DdlProveedor.Visible Then DdlProveedor.Enabled = True If DdlProveedores.Visible Then DdlProveedores.Enabled = True
If TxtRemision.Visible Then TxtRemision.Enabled = True If TxtRemision.Visible Then TxtRemision.Enabled = True
If DdlMoneda.Visible Then DdlMoneda.Enabled = True If DdlMoneda.Visible Then DdlMoneda.Enabled = True
If TxtGuia.Visible Then TxtGuia.Enabled = True If TxtGuia.Visible Then TxtGuia.Enabled = True

View File

@@ -1105,6 +1105,8 @@ Partial Class OC_OC
End If End If
End If End If
DdlUsoCFDI.SelectedValueExist(1)
End If End If
'FIX - no funcionan los eventos despues de hacer postback 'FIX - no funcionan los eventos despues de hacer postback

View File

@@ -208,6 +208,7 @@
</div> </div>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
<div class="row"> <div class="row">
<div align="right"> <div align="right">
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" /> <input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
@@ -222,7 +223,17 @@
data-sort="true" GridLines="None"> data-sort="true" GridLines="None">
<Columns> <Columns>
<asp:HyperLinkField HeaderText="Folio" ItemStyle-Width="100px" DataTextField ="Folio" DataNavigateUrlFormatString="/Ventas/RepRemisionesDetalle.aspx?CveVenta={0}" DataNavigateUrlFields="CveVenta" Target="_blank" /> <asp:HyperLinkField HeaderText="Folio" ItemStyle-Width="100px" DataTextField ="Folio" DataNavigateUrlFormatString="/Ventas/RepRemisionesDetalle.aspx?CveVenta={0}" DataNavigateUrlFields="CveVenta" Target="_blank" />
<asp:HyperLinkField HeaderText="Fecha" ItemStyle-Width="150px" DataTextField ="Fecha" DataTextFormatString="{0:d}" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataNavigateUrlFields="CveVenta" /> <%--<asp:HyperLinkField HeaderText="Fecha" ItemStyle-Width="150px" DataTextField ="Fecha" DataTextFormatString="{0:d}" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataNavigateUrlFields="CveVenta" />--%>
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="10%" >
<HeaderTemplate>
Fecha
</HeaderTemplate>
<ItemTemplate>
<asp:LinkButton ID="LnkFecha" runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="Vencimiento" DataField="FechaVencimiento" DataFormatString="{0:d}" /> <asp:BoundField HeaderText="Vencimiento" DataField="FechaVencimiento" DataFormatString="{0:d}" />
<asp:BoundField HeaderText="Cliente" DataField="Cliente" /> <asp:BoundField HeaderText="Cliente" DataField="Cliente" />
<asp:BoundField HeaderText="Contrato" DataField="TieneContrato" Visible="false" /> <asp:BoundField HeaderText="Contrato" DataField="TieneContrato" Visible="false" />

View File

@@ -130,7 +130,12 @@ Partial Class RepRemisiones
e.Row.Cells(2).ForeColor = Drawing.Color.Red e.Row.Cells(2).ForeColor = Drawing.Color.Red
End If End If
e.Row.Cells(1).Text = $"<a href='./Ventas.aspx?CveVenta={e.Row.DataKey("CveVenta")}' targen='_blank'>{e.Row.DataKey("Fecha").ToDate().ToString("dd/MM/yyyy HH:mm:ss")}</a>" 'e.Row.Cells(1).Text = $"<a href='./Ventas.aspx?CveVenta={e.Row.DataKey("CveVenta")}' targen='_blank'>{e.Row.DataKey("Fecha").ToDate().ToString("dd/MM/yyyy HH:mm:ss")}</a>"
Dim LnkFecha = e.Row.FCLinkButton("LnkFecha")
LnkFecha.Text = If(UsuarioActual.Empresa.Funcionalidad(578) = "1", e.Row.DataKey("Fecha").ToDate().ToString("dd/MM/yyyy HH:mm"), e.Row.DataKey("Fecha").ToDate().ToString("dd/MM/yyyy HH:mm:ss"))
LnkFecha.Attributes("onclick") = $"window.open('./Ventas.aspx?CveVenta={e.Row.DataKey("CveVenta")}', '_blank'); return false;"
End If End If
@@ -155,8 +160,8 @@ Partial Class RepRemisiones
GvDatos.Columns(7).Visible = True GvDatos.Columns(7).Visible = True
'columna de fecha 'columna de fecha
GvDatos.Columns(1).HeaderText = "Fecha Cirugía" GvDatos.Columns(1).HeaderText = "Fecha Cirugía"
CType(GvDatos.Columns(1), HyperLinkField).DataTextFormatString = "{0:dd/MM/yyyy HH:mm}" 'CType(GvDatos.Columns(1), HyperLinkField).DataTextFormatString = "{0:dd/MM/yyyy HH:mm}"
CType(GvDatos.Columns(1), HyperLinkField).ItemStyle.Width = Unit.Pixel(120) 'CType(GvDatos.Columns(1), HyperLinkField).ItemStyle.Width = Unit.Pixel(120)
GvDatos.Columns(16).Visible = True GvDatos.Columns(16).Visible = True
End If End If

View File

@@ -15,6 +15,39 @@
color: #FFF; color: #FFF;
font-weight: bold; font-weight: bold;
} }
.select2 .select2-selection__rendered {
line-height: 1;
color: #111;
}
.select2 .select2-selection--multiple {
box-sizing: border-box;
cursor: pointer;
display: block;
min-height: 20px;
user-select: none;
-webkit-user-select: none;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice {
margin-top: 10px;
}
.select2-selection__rendered {
margin-top: 0px;
height: 25px;
}
.select2-selection {
margin-top: 0px;
height: 31px;
}
.select2-container--default.select2-container--focus .select2-selection--multiple {
border: none;
outline: 0;
}
</style> </style>
</asp:Content> </asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="HA" runat="Server"> <asp:Content ID="Content8" ContentPlaceHolderID="HA" runat="Server">
@@ -67,17 +100,26 @@
<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"> <div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
<div class="portlet-title portlet-filterT smalltitle"> <div class="portlet-title portlet-filterT smalltitle">
<div class="tools"> <div class="tools">
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" /> <asp:Button ID="BtnConsultar" 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" style="height: 32px;">
<label class="col-md-1">Tipo: </label> <label class="col-md-1">Tipo: </label>
<div class="col-md-2"> <div class="col-md-2">
<asp:DropDownList CssClass="table-group-action-input form-control input-inline input-small input-sm select2me" ID="DdlTipoComprobante" runat="server" OnSelectedIndexChanged="DdlTipoComprobante_SelectedIndexChanged" AutoPostBack="true"> <asp:ListBox ID="DdlTipoComprobante" AutoPostBack="true" OnTextChanged="DdlTipoComprobante_SelectedIndexChanged" data-text="Todos" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server">
<asp:ListItem Text="Ingresos" Value="Ing"></asp:ListItem>
<asp:ListItem Text="Egresos" Value="Egs"></asp:ListItem>
<asp:ListItem Text="Remisión" Value="Rem"></asp:ListItem>
<asp:ListItem Text="Cotización" Value="Cot"></asp:ListItem>
<asp:ListItem Text="Anticipos" Value="Ant"></asp:ListItem>
<asp:ListItem Text="Pedido" Value="Ped"></asp:ListItem>
<asp:ListItem Text="Devolucion" Value="Dev"></asp:ListItem>
</asp:ListBox>
<%--<asp:DropDownList CssClass="table-group-action-input form-control input-inline input-small input-sm select2me" ID="DdlTipoComprobante" runat="server" OnSelectedIndexChanged="DdlTipoComprobante_SelectedIndexChanged" AutoPostBack="true">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Ingresos" Value="Ing"></asp:ListItem> <asp:ListItem Text="Ingresos" Value="Ing"></asp:ListItem>
<asp:ListItem Text="Egresos" Value="Egs"></asp:ListItem> <asp:ListItem Text="Egresos" Value="Egs"></asp:ListItem>
@@ -86,16 +128,44 @@
<asp:ListItem Text="Anticipos" Value="Ant"></asp:ListItem> <asp:ListItem Text="Anticipos" Value="Ant"></asp:ListItem>
<asp:ListItem Text="Pedido" Value="Ped"></asp:ListItem> <asp:ListItem Text="Pedido" Value="Ped"></asp:ListItem>
<asp:ListItem Text="Devolucion" Value="Dev"></asp:ListItem> <asp:ListItem Text="Devolucion" Value="Dev"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>--%>
</div> </div>
<div class="col-md-1 truncate">
Fecha Inicio:
<label class="col-md-1 ">Estatus:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlEstatus" runat="server" AppendDataBoundItems="true" DataTextField="EstatusFactura" DataValueField="CveEstatusFactura" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div> </div>
<div class="col-md-1" style="min-width: 115px">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
<div class="col-md-1 truncate">
Fecha Fin:
</div>
<div class="col-md-1" style="min-width: 115px">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
<label class="col-md-1 ">Grupo:</label> <label class="col-md-1 ">Grupo:</label>
<div class="col-md-2"> <div class="col-md-2">
<asp:DropDownList ID="DdlGrupo" runat="server" Class="table-group-action-input form-control input-inline input-small input-sm select2me"> <asp:DropDownList ID="DdlGrupo" runat="server" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
@@ -120,67 +190,52 @@
<asp:ListItem Text="Tipo Cliente" Value="19"></asp:ListItem> <asp:ListItem Text="Tipo Cliente" Value="19"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="portlet-body"> <div class="portlet-body" style="display: none">
<div class="row"> <div class="row">
<label class="col-md-1 truncate">Sucursal:</label> <asp:Label ID="LblProyecto" runat="server" class="col-md-1 truncate">Proyecto:</asp:Label>
<div class="col-md-2"> <div runat="server" id="DivProyecto" class="col-md-2">
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me"> <asp:DropDownList ID="DdlProyecto" runat="server" AutoPostBack="true" AppendDataBoundItems="true" DataTextField="Proyecto" DataValueField="CveProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me" Style="width: 100%;"></asp:DropDownList>
</div>
<asp:Label ID="LblSubProyecto" runat="server" class="col-md-1 truncate">SubProyecto:</asp:Label>
<div runat="server" id="DivSubProyecto" class="col-md-2">
<asp:ListBox ID="DdlSubProyecto" SelectionMode="Multiple" data-text="Todos" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server"></asp:ListBox>
<%-- <asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>--%>
</div> </div>
<label class="col-md-1 truncate">F.I.:</label> <label class="col-md-1 ">Cliente:</label>
<div class="col-md-2"> <div class="col-md-2">
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 140px !important; padding: 0px;"> <ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"></ADS:Dropdownlost>
<asp:TextBox ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox> <%-- <asp:DropDownList ID="DdlClientes" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CveCliente" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<span class="input-group-btn ">
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<label class="col-md-1 truncate">F.F.:</label>
<div class="col-md-2">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 140px !important; padding: 0px;">
<asp:TextBox ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<label class="col-md-1 truncate">Usuario:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlUsuario" runat="server" AppendDataBoundItems="true" DataTextField="Usuario" DataValueField="CveUsuario" Class="table-group-action-input form-control input-inline input-small 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>
<label class="col-md-1 truncate">Vendedor:</label>
<div class="col-md-2">
<asp:ListBox ID="DdlVendedor" SelectionMode="Multiple" data-text="Todos" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" CssClass="form-control ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server"></asp:ListBox>
<%-- <asp:DropDownList ID="DdlVendedor" runat="server" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>--%>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<label class="col-md-1 truncate">Sucursal Ejecución:</label> <label class="col-md-1 ">Estatus:</label>
<div class="col-md-2">
<asp:ListBox ID="DdlEstatus" SelectionMode="Multiple" data-text="Todos" AppendDataBoundItems="true" DataTextField="EstatusFactura" DataValueField="CveEstatusFactura" CssClass="form-control ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server"></asp:ListBox>
<%-- <asp:DropDownList ID="DdlEstatus" runat="server" AppendDataBoundItems="true" DataTextField="EstatusFactura" DataValueField="CveEstatusFactura" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>--%>
</div>
<label runat="server" id="LblSubProyectoEjecucion" class="col-md-1 truncate">SubProyecto Ejecución:</label>
<div class="col-md-2"> <div class="col-md-2">
<asp:DropDownList ID="DdlSubProyectoEjecucion" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me"> <asp:DropDownList ID="DdlSubProyectoEjecucion" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<label class="col-md-1 truncate">F.I. E.:</label> <label class="col-md-1 truncate">Fecha I. Ejecución:</label>
<div class="col-md-2"> <div class="col-md-2">
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 140px !important; padding: 0px;"> <div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 140px !important; padding: 0px;">
<asp:TextBox ID="TxtFechaIEjec" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox> <asp:TextBox ID="TxtFechaIEjec" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
@@ -195,7 +250,7 @@
<ajax:ValidatorCalloutExtender ID="VCOFechaIEjec2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaIEjec" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCOFechaIEjec2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaIEjec" Width="350px"></ajax:ValidatorCalloutExtender>
</div> </div>
</div> </div>
<label class="col-md-1 truncate">F.F. E.:</label> <label class="col-md-1 truncate">Fecha F. Ejecución:</label>
<div class="col-md-2"> <div class="col-md-2">
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 140px !important; padding: 0px;"> <div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 140px !important; padding: 0px;">
<asp:TextBox ID="TxtFechaFEjec" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox> <asp:TextBox ID="TxtFechaFEjec" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
@@ -210,34 +265,28 @@
<ajax:ValidatorCalloutExtender ID="VCOFechaFEjec2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaFEjec" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCOFechaFEjec2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaFEjec" Width="350px"></ajax:ValidatorCalloutExtender>
</div> </div>
</div> </div>
<label class="col-md-1 truncate">Vendedor:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlVendedor" runat="server" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
</div> </div>
<div class="row"> <div class="row">
<label class="col-md-1 truncate">Proyecto:</label> <label class="col-md-1 truncate">Usuario:</label>
<div class="col-md-2"> <div class="col-md-2">
<asp:DropDownList ID="DdlProyecto" runat="server" AutoPostBack="true" AppendDataBoundItems="true" DataTextField="Proyecto" DataValueField="CveProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me"> <asp:DropDownList ID="DdlUsuario" runat="server" AppendDataBoundItems="true" DataTextField="Usuario" DataValueField="CveUsuario" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<label class="col-md-1 ">Cliente:</label> <label title="Giro del Cliente" data-toggle="tooltip" data-placement="top" class="col-md-1 ">Giro Cli.:</label>
<div class="col-md-2">
<%--<asp:DropDownList ID="DdlClientes" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CveCliente" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>--%>
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"></ADS:Dropdownlost>
</div>
<label title="Clasificación Cliente" data-toggle="tooltip" data-placement="top" class="col-md-1 ">Clasificacion Cli.:</label>
<div class="col-md-2"> <div class="col-md-2">
<asp:DropDownList ID="DdlClienteClasificacion" AutoPostBack="true" OnSelectedIndexChanged="DdlClienteClasificacion_SelectedIndexChanged" runat="server" AppendDataBoundItems="true" CssClass="table-group-action-input form-control input-inline input-small input-sm select2me" DataTextField="ClienteClasificacion" DataValueField="CveClienteClasificacion"></asp:DropDownList> <asp:DropDownList ID="DdlClienteClasificacion" AutoPostBack="true" OnSelectedIndexChanged="DdlClienteClasificacion_SelectedIndexChanged" runat="server" AppendDataBoundItems="true" CssClass="table-group-action-input form-control input-inline input-small input-sm select2me" DataTextField="ClienteClasificacion" DataValueField="CveClienteClasificacion"></asp:DropDownList>
</div> </div>
<label title="Condiciones de Pago" data-toggle="tooltip" class="col-md-1 truncate">Condiciones Pago:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlCondicionesPago" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Crédito" Value="1"></asp:ListItem>
<asp:ListItem Text="Contado" Value="0"></asp:ListItem>
</asp:DropDownList>
</div>
<label title="Tipo Cliente" data-toggle="tooltip" data-placement="top" class="col-md-1 ">Tipo Cliente:</label> <label title="Tipo Cliente" data-toggle="tooltip" class="col-md-1 truncate">Tipo Cliente:</label>
<div class="col-md-2"> <div class="col-md-2">
<asp:DropDownList ID="DdlTipoCliente" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me"> <asp:DropDownList ID="DdlTipoCliente" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
@@ -245,13 +294,51 @@
<asp:ListItem Text="Venta Mostrador" Value="2"></asp:ListItem> <asp:ListItem Text="Venta Mostrador" Value="2"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<label class="col-md-1 truncate">Lectura administrativa:</label> <label class="col-md-1 truncate">Lectura administrativa:</label>
<div class="col-md-2"> <div class="col-md-2">
<asp:CheckBox ID="ChkLecturaAdmin" runat="server" Checked="false" CssClass="input-sm" /> <asp:CheckBox ID="ChkLecturaAdmin" runat="server" Checked="false" CssClass="input-sm" />
</div> </div>
<label title="Es parte relacionada" data-toggle="tooltip" class="col-md-1 truncate" runat="server" id="Label4">Parte Relacionada:</label>
<div class="col-md-2" runat="server" id="DivFilial">
<asp:DropDownList ID="DdlFilial" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Solo parte relacionadas" Value="1"></asp:ListItem>
<asp:ListItem Text="Sin parte relacionadas" Value="0"></asp:ListItem>
</asp:DropDownList>
</div>
<label title="Distr" data-toggle="tooltip" class="col-md-1 truncate" visible="false" runat="server" id="DivLblDistr">Distribuidor:</label>
<div class="col-md-2" visible="false" runat="server" id="DivDistr">
<asp:DropDownList ID="DdlDistribuidor" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Distribuidor" Value="1"></asp:ListItem>
<asp:ListItem Text="No Distribuidor" Value="0"></asp:ListItem>
</asp:DropDownList>
</div>
<asp:Label runat="server" ID="LblServicioDomicilioFiltro" class="col-md-1 truncate" Visible="false">Servicio Domicilio:</asp:Label>
<div class="col-md-2" runat="server" id="DVServicioDomicilio" visible="false">
<asp:DropDownList ID="DdlServicioDomicilio" CssClass=" form-control input-sm select2me" runat="server" Width="100%">
<asp:ListItem Value="-1">Todos</asp:ListItem>
<asp:ListItem Value="1">Si</asp:ListItem>
<asp:ListItem Value="0">No</asp:ListItem>
</asp:DropDownList>
</div>
<asp:Label runat="server" ID="LblFacturaGlobal" class="col-md-1 truncate" Visible="false">Factura Global:</asp:Label>
<div class="col-md-2" runat="server" id="DivFacturaGlobal" visible="false">
<asp:DropDownList ID="DdlFacturaGlobal" CssClass=" form-control input-sm select2me" runat="server" Width="100%">
<asp:ListItem Value="-1">Todos</asp:ListItem>
<asp:ListItem Value="1">Solo Globales</asp:ListItem>
<asp:ListItem Value="0">Sin Globales</asp:ListItem>
</asp:DropDownList>
</div>
</div>
<div class="row">
<label class="col-md-1 truncate">Relación:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlTipoRelacion" CssClass=" form-control input-sm select2me" runat="server" Width="100%" DataTextField="SATTipoRelacion" DataValueField="CveTipoRelacion">
</asp:DropDownList>
</div>
</div> </div>
</div> </div>
</div> </div>
@@ -605,8 +692,7 @@
try { try {
document.getElementById("topScroll").value = document.getElementById('divDias').scrollTop; document.getElementById("topScroll").value = document.getElementById('divDias').scrollTop;
} }
catch (e) catch (e) { }
{ }
} }
$('.Consultar').click(function () { $('.Consultar').click(function () {

View File

@@ -69,6 +69,7 @@ Partial Class RepVentasPeriodo
TCEspecifico = -1 TCEspecifico = -1
If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario.Contiene(77, 21) Then Response.Redirect("/Inicio.aspx") If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario.Contiene(77, 21) Then Response.Redirect("/Inicio.aspx")
CargaCombos() CargaCombos()
'CargaGrupo()
'MODALIDADES 'MODALIDADES
If Request("Op") IsNot Nothing AndAlso Request("Op").ToString <> "" Then If Request("Op") IsNot Nothing AndAlso Request("Op").ToString <> "" Then
@@ -83,7 +84,7 @@ Partial Class RepVentasPeriodo
'Modalidad Cotizacion 'Modalidad Cotizacion
If Opcion = "Cot" Then If Opcion = "Cot" Then
DdlTipoComprobante.SelectedValueExist(Opcion) DdlTipoComprobante.SelectedValuesIfExistM(Opcion)
DdlGrupo.SelectedValueExist("7") DdlGrupo.SelectedValueExist("7")
DdlTipoComprobante_SelectedIndexChanged(DdlTipoComprobante, EventArgs.Empty) DdlTipoComprobante_SelectedIndexChanged(DdlTipoComprobante, EventArgs.Empty)
DdlEstatus.SelectedValue = "-1" DdlEstatus.SelectedValue = "-1"
@@ -100,29 +101,25 @@ Partial Class RepVentasPeriodo
End Sub End Sub
Private Sub CargaCombos() Private Sub CargaCombos()
''CargaClientes
'Dim ObjClientes As New ClsClientes
'If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
' DdlClientes.DataSource = ObjClientes.DtResultados
'Else
' DdlClientes.DataSource = Nothing
'End If
'ObjClientes.Dispose()
'DdlClientes.DataBind()
DdlClientes.setEsWebService(True)
DdlClientes.Attributes.Add("data-metodo", "getcliente")
DdlClientes.SelectedText = "Todos"
DdlClientes.SelectedValue = "-1"
'CargaSucursales CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto, VisualizacionReporte:=1)
DdlSubProyectoEjecucion.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) 'CargaClientes
DdlSubProyectoEjecucion.DataBind() Dim EsWS As Boolean = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
If EsWS Then
DdlClientes.setEsWebService(True)
Else
DdlClientes.setEsWebService(False)
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
DdlClientes.DataBind()
DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
End If
'Vendedor 'Vendedor
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa) DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa, VendedorTipo:=-1).FiltraParametros("VendedorTipo in (1,4)") 'vendedores y vendedores de piso
DdlVendedor.DataBind() DdlVendedor.DataBind()
DdlVendedor.Items.Insert(0, New ListItem("Todos", "-1")) DdlVendedor.Items.Insert(0, New ListItem("Todos", "-1"))
DdlVendedor.Items.Insert(1, New ListItem("Sin Vendedor", "-2"))
'CargaUsuarios 'CargaUsuarios
DdlUsuario.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa) DdlUsuario.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa)
@@ -133,41 +130,61 @@ Partial Class RepVentasPeriodo
DdlEstatus.DataBind() DdlEstatus.DataBind()
DdlEstatus.Items.Add(New ListItem("Canceladas", "4")) DdlEstatus.Items.Add(New ListItem("Canceladas", "4"))
If UsuarioActual.Empresa.TipoFacturacion = "CFDi" Then If UsuarioActual.Empresa.TipoFacturacion = "CFDi" Then
DdlEstatus.SelectedIndex = 2
Else
DdlEstatus.SelectedIndex = 1 DdlEstatus.SelectedIndex = 1
Else
DdlEstatus.SelectedIndex = 0
End If End If
'CargaProyectos
DdlProyecto.DataSource = GlobalDTProyectos(UsuarioActual.Empresa.CveEmpresa).FiltraParametros("", "", {"CveProyecto", "Proyecto"})
DdlProyecto.DataBind()
DdlProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
'Carga Clasificacion Cliente 'Carga Clasificacion Cliente
DdlClienteClasificacion.DataSource = GlobalDTClienteClasificaciones(UsuarioActual.CveEmpresa) DdlClienteClasificacion.DataSource = GlobalDTClienteClasificaciones(UsuarioActual.CveEmpresa)
DdlClienteClasificacion.DataBind() DdlClienteClasificacion.DataBind()
DdlClienteClasificacion.Items.Insert(0, New ListItem("Todos", "-1")) DdlClienteClasificacion.Items.Insert(0, New ListItem("Todos", "-1"))
DdlTipoRelacion.DataSource = GlobalDTVtaTiposRelacion
DdlTipoRelacion.DataBind()
DdlTipoRelacion.Items.Insert(0, New ListItem("Todos", "-1"))
txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString
txtFechaF.Text = NowADS().ToShortDateString
End Sub End Sub
Protected Sub DdlClienteClasificacion_SelectedIndexChanged(sender As Object, e As EventArgs)
CargaClientes()
End Sub
Private Sub CargaClientes()
DdlClientes.ddl.Items.Clear()
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1).FiltraParametros($"CveClienteClasificacion = {DdlClienteClasificacion.SelectedValue.ToEntero} OR {DdlClienteClasificacion.SelectedValue.ToEntero} = -1")
DdlClientes.DataBind()
DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
End Sub
Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlProyecto.SelectedIndexChanged Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlProyecto.SelectedIndexChanged
CargaSubProyecto() CargarSubProyecto(DdlSubProyecto, DdlProyecto.SelectedValue)
End Sub
Private Sub CargaSubProyecto()
DdlSubProyecto.Items.Clear()
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
DdlSubProyecto.DataBind()
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
''dsadasd
End Sub End Sub
Protected Sub DdlTipoComprobante_SelectedIndexChanged(sender As Object, e As EventArgs) Protected Sub DdlTipoComprobante_SelectedIndexChanged(sender As Object, e As EventArgs)
DdlEstatus.Items.Clear() DdlEstatus.Items.Clear()
If DdlTipoComprobante.SelectedValue <> "-1" Then If DdlTipoComprobante.GetSelectedValuesM <> "" Then
DdlEstatus.DataSource = GlobalDTEstatusFactura.FiltraParametros(String.Format("TipoDocto = '{0}'", DdlTipoComprobante.SelectedValue)) DdlEstatus.DataSource = GlobalDTEstatusFactura.FiltraParametros(String.Format("TipoDocto IN ({0}) OR ('Cot' IN ({0}) AND CveEstatusFactura = 2)", DdlTipoComprobante.GetSelectedValuesM(True).Replace("Ant", "Ing").Replace("Egs", "Ing")))
Else Else
DdlEstatus.DataSource = GlobalDTEstatusFactura DdlEstatus.DataSource = GlobalDTEstatusFactura
End If End If
DdlEstatus.Items.Add(New ListItem("Todos", "-1")) 'DdlEstatus.Items.Add(New ListItem("Todos", "-1"))
DdlEstatus.DataBind() DdlEstatus.DataBind()
If DdlTipoComprobante.GetSelectedValuesM(True).Contains("Rem") Then
For Each item As ListItem In DdlEstatus.Items
If item.Value = "11" Then
DdlEstatus.Items.Remove(item)
DdlEstatus.Items.Insert(0, New ListItem("Registrada", "2"))
Exit For
End If
Next
End If
End Sub End Sub
#End Region #End Region
@@ -180,8 +197,33 @@ Partial Class RepVentasPeriodo
End Sub End Sub
Private Sub CargaGrupo()
DdlGrupo.Items.Insert(0, New ListItem("Año", "1"))
DdlGrupo.Items.Insert(1, New ListItem("Mes", "2"))
DdlGrupo.Items.Insert(2, New ListItem("Año/Mes", "3"))
DdlGrupo.Items.Insert(3, New ListItem("Fecha", "4"))
DdlGrupo.Items.Insert(4, New ListItem("Cliente", "5"))
DdlGrupo.Items.Insert(4, New ListItem(LblSubProyecto.Text, "6"))
DdlGrupo.Items.Insert(5, New ListItem("Corte", "16"))
DdlGrupo.Items.Insert(6, New ListItem("Vendedor", "7"))
DdlGrupo.Items.Insert(7, New ListItem("Usuario", "8"))
DdlGrupo.Items.Insert(8, New ListItem("Estatus", "9"))
DdlGrupo.Items.Insert(9, New ListItem("% IVA", "10"))
DdlGrupo.Items.Insert(10, New ListItem("Año Ejec.", "11"))
DdlGrupo.Items.Insert(11, New ListItem("Mes Ejec.", "12"))
DdlGrupo.Items.Insert(12, New ListItem("Año/Mes Ejec.", "13"))
DdlGrupo.Items.Insert(13, New ListItem("Fecha Ejec.", "14"))
DdlGrupo.Items.Insert(13, New ListItem("Tipo Cliente", "20"))
DdlGrupo.Items.Insert(13, New ListItem("Vendedor/Cliente", "21"))
DdlGrupo.Items.Insert(13, New ListItem("Giro", "22"))
If UsuarioActual.Empresa.Funcionalidad(307) <> "" Then DdlGrupo.Items.Insert(10, New ListItem(UsuarioActual.Empresa.Funcionalidad(307), "23"))
DdlGrupo.DataBind()
DdlGrupo.SelectedValueExist("3")
End Sub
Private Sub CargaDatos() Private Sub CargaDatos()
Dim ObjVentas As New ClsVentas()
If RblTipoCambio.SelectedValue.ToEntero = 3 And TxtEspecifico.Text <> "" Then If RblTipoCambio.SelectedValue.ToEntero = 3 And TxtEspecifico.Text <> "" Then
TCEspecifico = TxtEspecifico.Text.ToDecimal TCEspecifico = TxtEspecifico.Text.ToDecimal
Else Else
@@ -193,29 +235,47 @@ Partial Class RepVentasPeriodo
If RbTotal.Checked Then VerEn = 2 If RbTotal.Checked Then VerEn = 2
If RbIVA.Checked Then VerEn = 3 If RbIVA.Checked Then VerEn = 3
Dim ModalidadContable As Boolean = Not ChkLecturaAdmin.Checked
Dim TipoComprobante As String = If(DdlTipoComprobante.GetSelectedValuesM = "", "-1", DdlTipoComprobante.GetSelectedValuesM)
Dim Sucursales As String = If(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM)
Dim Estatus As String = If(DdlEstatus.GetSelectedValuesM = "", "-1", DdlEstatus.GetSelectedValuesM)
Dim Vendedores As String = If(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM)
Dim CveCliente As Integer = If(DdlClientes.SelectedValue = "", -1, DdlClientes.SelectedValue.ToEntero)
If TipoComprobante.Contiene("Rem") And Not Estatus.Contiene("11") Then
Estatus = Estatus & ",11"
End If
If RblTipoCambio.SelectedValue.ToEntero = 3 And TxtEspecifico.Text <> "" Then
TCEspecifico = TxtEspecifico.Text.ToDecimal
Else
TCEspecifico = -1
End If
Dim FechaI, FechaF, FechaIEjec, FechaFEjec As Date Dim FechaI, FechaF, FechaIEjec, FechaFEjec As Date
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim.ToDate, MinFecha) FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim.ToDate, MinFecha)
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim.ToDate, MaxFecha) FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim.ToDate, MaxFecha)
FechaIEjec = If(IsDate(TxtFechaIEjec.Text.Trim()), TxtFechaIEjec.Text.Trim.ToDate, MinFecha) FechaIEjec = If(IsDate(TxtFechaIEjec.Text.Trim()), TxtFechaIEjec.Text.Trim.ToDate, MinFecha)
FechaFEjec = If(IsDate(TxtFechaFEjec.Text.Trim()), TxtFechaFEjec.Text.Trim.ToDate, MaxFecha) FechaFEjec = If(IsDate(TxtFechaFEjec.Text.Trim()), TxtFechaFEjec.Text.Trim.ToDate, MaxFecha)
Dim ModalidadContable As Boolean = Not ChkLecturaAdmin.Checked CveProyecto = DdlProyecto.SelectedValue.ToEntero
Dim ObjVentas As New ClsVentas()
If ObjVentas.GetRepVentasPeriodos(FechaI, FechaF, FechaIEjec, FechaFEjec, CveCliente, DdlSubProyectoEjecucion.SelectedValue.ToEntero, Vendedores,
DdlUsuario.SelectedValue.ToEntero, Estatus, "-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, TipoComprobante, DdlProyecto.SelectedValue.ToEntero, Sucursales, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, CveUsuarioConsulta:=UsuarioActual.CveUsuario,
CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, ModalidadContable:=ModalidadContable,
EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero, CveTipoRelacion:=DdlTipoRelacion.SelectedValue.ToEntero(), ServicioDomicilio:=DdlServicioDomicilio.SelectedValue.ToEntero, EsFacturaGlobal:=DdlFacturaGlobal.SelectedValue.ToEntero, EsFilial:=DdlFilial.SelectedValue.ToEntero, VerEn:=VerEn) Then
DtVentas = ObjVentas.DtResultados.Copy()
If ObjVentas.GetRepVentasPeriodos(FechaI, FechaF, FechaIEjec, FechaFEjec, DdlClientes.SelectedValue.ToEntero, DdlSubProyectoEjecucion.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero,
DdlUsuario.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, "-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, DdlTipoComprobante.SelectedValue,
DdlProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, CveUsuarioConsulta:=UsuarioActual.CveUsuario,
VerEn:=VerEn, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, ModalidadContable:=ModalidadContable) Then
GvDatos.DataSource = ObjVentas.DtResultados
DtVentas = ObjVentas.DtResultados
Else Else
GvDatos.DataSource = Nothing GvDatos.DataSource = Nothing
End If End If
CveProyecto = DdlProyecto.SelectedValue.ToEntero
ObjVentas.Dispose() ObjVentas.Dispose()
GvDatos.DataSource = DtVentas
GvDatos.DataBind() GvDatos.DataBind()
If GvDatos.Rows.Count > 0 Then If GvDatos.Rows.Count > 0 Then
CargaGraficas(DtVentas) CargaGraficas(DtVentas)
Me.DvGraficas.Visible = True Me.DvGraficas.Visible = True
@@ -413,18 +473,6 @@ Partial Class RepVentasPeriodo
End If End If
RegistraScript(SBJSScript.ToString, Indicador) RegistraScript(SBJSScript.ToString, Indicador)
End Sub End Sub
Protected Sub DdlClienteClasificacion_SelectedIndexChanged(sender As Object, e As EventArgs)
CargaClientes()
End Sub
Private Sub CargaClientes()
DdlClientes.ddl.Items.Clear()
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1).FiltraParametros($"CveClienteClasificacion = {DdlClienteClasificacion.SelectedValue.ToEntero} OR {DdlClienteClasificacion.SelectedValue.ToEntero} = -1")
DdlClientes.DataBind()
DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
End Sub
End Class End Class

View File

@@ -1357,6 +1357,7 @@
</span> </span>
<br /> <br />
<asp:Label ID="LblPS" runat="server" Text='<%# Eval("CodigoPS") %>'></asp:Label> <asp:Label ID="LblPS" runat="server" Text='<%# Eval("CodigoPS") %>'></asp:Label>
<asp:Hyperlink ID="HLPS" runat="server" Visible="false" Target="_blank" Text='<%# Eval("CodigoPS") %>'></asp:Hyperlink>
</ItemTemplate> </ItemTemplate>
<EditItemTemplate> <EditItemTemplate>
<asp:DropDownList ID="DdlClasificacion" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="100%" OnSelectedIndexChanged="DdlClasificacion_SelectedIndexChanged1" CssClass="select2me"> <asp:DropDownList ID="DdlClasificacion" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="100%" OnSelectedIndexChanged="DdlClasificacion_SelectedIndexChanged1" CssClass="select2me">

View File

@@ -9084,6 +9084,16 @@ Partial Class Ventas
End If End If
End If End If
If DdlTipoComprobante.SelectedValue.Contiene("Cot") Then
e.Row.FCHyperLink("HLPS").Visible = True
e.Row.FCLabel("LblPS").Visible = False
e.Row.FCHyperLink("HLPS").NavigateUrl = String.Format("/Inventarios/Kardex.aspx?CveSubProyecto={0}", DdlSubProyectoDatos.SelectedValue.ToEntero())
Else
e.Row.FCHyperLink("HLPS").Visible = False
e.Row.FCLabel("LblPS").Visible = True
End If
End If End If
If CveVenta <= 0 Then If CveVenta <= 0 Then
@@ -10590,10 +10600,15 @@ Partial Class Ventas
Dim PU As Decimal = Row("PU").ToString().ToDecimal() Dim PU As Decimal = Row("PU").ToString().ToDecimal()
Dim Descuento As Decimal = Row("Descuento").ToString().ToDecimal() Dim Descuento As Decimal = Row("Descuento").ToString().ToDecimal()
If Not ValidaPorcentajeMarcas(CvePS, Cantidad, PU, Descuento) Then Dim EsGarantia As Boolean = Me.EsGarantia OrElse Row("Obs").ToString().Contains("Descuento por garantía")
ValidoDescuentos = False
Exit For If Not EsGarantia Then
If Not ValidaPorcentajeMarcas(CvePS, Cantidad, PU, Descuento) Then
ValidoDescuentos = False
Exit For
End If
End If End If
Next Next
End If End If