This commit is contained in:
2024-11-27 22:26:02 -07:00
26 changed files with 3112 additions and 541 deletions

View File

@@ -7680,8 +7680,8 @@ Public Class ClsPaginas
If Not RutaReporte.ToUpper().StartsWith(bdir.ToUpper()) Then If Not RutaReporte.ToUpper().StartsWith(bdir.ToUpper()) Then
RutaReporte = String.Format("{0}{1}", bdir, RutaReporte) RutaReporte = String.Format("{0}{1}", bdir, RutaReporte)
End If End If
Dim urlHost As String = "http://sig.adssistemas.mx:7998/" 'Dim urlHost As String = "http://sig.adssistemas.mx:7998/"
'Dim urlHost As String = "http://localhost:2202/" Dim urlHost As String = "http://localhost:2202/"
If EsProduccion Then If EsProduccion Then
urlHost = "http://192.200.113.178:6599/" urlHost = "http://192.200.113.178:6599/"
End If End If
@@ -11153,7 +11153,7 @@ Public Class ClsPaginas
OpcionNegritas = "H" OpcionNegritas = "H"
Case 4 Case 4
Asunto = $"Nuevo Pedido:{Remision}" Asunto = $"Nuevo Pedido:{Remision}"
Contenido.AppendFormat("Pedido: <a href='https://sms.adssistemas.mx/Ventas/Vetas.aspx?CveVenta={0}'>{1}</a><br/>", CveOS, Folio) Contenido.AppendFormat("Pedido: <a href='https://sms.adssistemas.mx/Ventas/Ventas.aspx?CveVenta={0}'>{1}</a><br/>", CveOS, Folio)
OpcionNegritas = "H" OpcionNegritas = "H"
Case 5 Case 5
Asunto = "Cirugía de Urgencia" Asunto = "Cirugía de Urgencia"

View File

@@ -1980,7 +1980,8 @@ Public Class ClsProductosServicios
#Region "Precios Lista" #Region "Precios Lista"
Public Function GetPSPreciosLista(CveEmpresa As Integer, CvePrecioLista As Integer, Optional CveClasificacion As Integer = -1, Optional CvePS As Integer = -1, Public Function GetPSPreciosLista(CveEmpresa As Integer, CvePrecioLista As Integer, Optional CveClasificacion As Integer = -1, Optional CvePS As Integer = -1,
Optional CveProveedor As Integer = -1, Optional Estado As Integer = -1, Optional Marcas As String = "-1", Optional CveModelo As Integer = -1) As Boolean Optional CveProveedor As Integer = -1, Optional Estado As Integer = -1, Optional Marcas As String = "-1", Optional CveModelo As Integer = -1,
Optional CodigoInicial As String = "-1", Optional CodigoFinal As String = "-1", Optional Opcion As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Vta_PSPrecioListaGet") DataAdapter("PA_Vta_PSPrecioListaGet")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
@@ -1992,6 +1993,9 @@ Public Class ClsProductosServicios
.Add("@Estado", SqlDbType.Int).Value = Estado .Add("@Estado", SqlDbType.Int).Value = Estado
.Add("@Marcas", SqlDbType.VarChar).Value = Marcas .Add("@Marcas", SqlDbType.VarChar).Value = Marcas
.Add("@CveModelo", SqlDbType.Int).Value = CveModelo .Add("@CveModelo", SqlDbType.Int).Value = CveModelo
.Add("@CodigoInicial", SqlDbType.VarChar).Value = CodigoInicial
.Add("@CodigoFinal", SqlDbType.VarChar).Value = CodigoFinal
.Add("@Opcion", SqlDbType.Int).Value = Opcion
End With End With
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -2004,9 +2008,10 @@ Public Class ClsProductosServicios
End Function End Function
Public Function GetPSMultiplesPreciosLista(CveEmpresa As Integer, Optional ListasPrecios As String = "-1", Optional CveClasificacion As Integer = -1, Optional CvePS As Integer = -1, Public Function GetPSMultiplesPreciosLista(CveEmpresa As Integer, Optional ListasPrecios As String = "-1", Optional CveClasificacion As Integer = -1, Optional CvePS As Integer = -1,
Optional CveProveedor As Integer = -1, Optional Estado As Integer = -1, Optional Marcas As String = "-1", Optional CveModelo As Integer = -1) As Boolean Optional CveProveedor As Integer = -1, Optional Estado As Integer = -1, Optional Marcas As String = "-1", Optional CveModelo As Integer = -1,
Optional CodigoInicial As String = "-1", Optional CodigoFinal As String = "-1") As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Vta_PSPrecioListaMultipleGet") DataAdapter("PA_Vta_PSPrecioListaMultipleGetRM")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@ListasPrecios", SqlDbType.VarChar).Value = ListasPrecios .Add("@ListasPrecios", SqlDbType.VarChar).Value = ListasPrecios
@@ -2016,6 +2021,9 @@ Public Class ClsProductosServicios
.Add("@Estado", SqlDbType.Int).Value = Estado .Add("@Estado", SqlDbType.Int).Value = Estado
.Add("@Marcas", SqlDbType.VarChar).Value = Marcas .Add("@Marcas", SqlDbType.VarChar).Value = Marcas
.Add("@CveModelo", SqlDbType.Int).Value = CveModelo .Add("@CveModelo", SqlDbType.Int).Value = CveModelo
.Add("@CodigoInicial", SqlDbType.VarChar).Value = CodigoInicial
.Add("@CodigoFinal", SqlDbType.VarChar).Value = CodigoFinal
End With End With
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)

View File

@@ -190,7 +190,9 @@ Public Class ClsTransportes
Return Retorno Return Retorno
End Function End Function
Public Function UpdateViajesPasajeros(CveViajePasajero As Integer, Optional CveViaje As Integer = -1, Optional CveVendedor As Integer = -1, Optional Importe As Decimal = -1, Optional Asiento As Integer = -1, Optional Nombre As String = "", Optional Visa As String = "", Optional Celular As String = "", Optional Observacion As String = "", Optional Estatus As Boolean = True, Optional CveUsuario As Integer = -1, Optional Sexo As Boolean = True) As Boolean Public Function UpdateViajesPasajeros(CveViajePasajero As Integer, Optional CveViaje As Integer = -1, Optional CveVendedor As Integer = -1, Optional Importe As Decimal = -1, Optional Asiento As Integer = -1, Optional Nombre As String = "",
Optional Visa As String = "", Optional Celular As String = "", Optional Observacion As String = "", Optional Estatus As Boolean = True, Optional CveUsuario As Integer = -1, Optional Sexo As Boolean = True,
Optional FechaNacimiento As Date = MinFecha) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Trans_ViajesPasajerosUpdate") DataAdapter("PA_Trans_ViajesPasajerosUpdate")
@@ -207,6 +209,8 @@ Public Class ClsTransportes
.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("@Sexo", SqlDbType.Bit).Value = Sexo .Add("@Sexo", SqlDbType.Bit).Value = Sexo
.Add("@FechaNacimiento", SqlDbType.Date).Value = FechaNacimiento
End With End With
Try Try

View File

@@ -7417,18 +7417,17 @@ Partial Class Compras_Compras
Pago.ImportePago = importeMovimiento + ImporComisionAnticipo Pago.ImportePago = importeMovimiento + ImporComisionAnticipo
Pago.CveIE = Ant.CveIE Pago.CveIE = Ant.CveIE
Pago.TCPago = Ant.TCCompra Pago.TCPago = Ant.TCCompra
Pago.CveMonedaPago = If(Ant.TCCompra > 1, 2, 1)
If Pago.CveMonedaPago = 1 AndAlso CompraActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en Pesos If Pago.CveMonedaPago = 1 AndAlso CompraActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en Pesos
Pago.TCPago = 1 ' TxtTC.Text.ToDecimal Pago.TCPago = Ant.TCCompra ' TxtTC.Text.ToDecimal
Pago.TCCambioMoneda = Ant.TCCompra 'GlobalTipoCambio(Now).ToDecimal Pago.TCCambioMoneda = 1 'GlobalTipoCambio(Now).ToDecimal
If Ant.TCCompra = 1 Then If Ant.TCCompra = 1 Then
Pago.TCCambioMoneda = 1 / GlobalTipoCambio(Ant.Fecha).ToDecimal Pago.TCCambioMoneda = 1 / GlobalTipoCambio(Ant.Fecha).ToDecimal
End If End If
End If End If
Pago.CveMonedaPago = If(Ant.TCCompra > 1, 2, 1)
Pago.OtroGastoIngreso = -ImporComisionAnticipo Pago.OtroGastoIngreso = -ImporComisionAnticipo
ErrorPrepoliza = AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta) ErrorPrepoliza = AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta)
@@ -9479,6 +9478,10 @@ Partial Class Compras_Compras
Private Function validaFechaNumeroReembolso() As Boolean Private Function validaFechaNumeroReembolso() As Boolean
If UsuarioActual.CveEmpresa <> 119 Then
Return True
End If
Dim respuesta As Boolean = True Dim respuesta As Boolean = True
Dim CvePersonalVal As Integer = -1 Dim CvePersonalVal As Integer = -1
Dim CveCajaChicaVal As Integer = -1 Dim CveCajaChicaVal As Integer = -1
@@ -9522,9 +9525,9 @@ Partial Class Compras_Compras
respuesta = False 'La fecha de la compra esta por fuera de lo permitido mes actual o mes anterior respuesta = False 'La fecha de la compra esta por fuera de lo permitido mes actual o mes anterior
If FechaCompra.Month > MesReembolsoInt Then If FechaCompra.Month > MesReembolsoInt Then
Alert($"La fecha de la compra que se quiere registrar esta adelantada al mes de la comprobación (Fecha comprobación {FechaReembolso.ToString("dd/MM/yyyy")}).", TipoMensaje.MsgAdvertencia) Alert($"La fecha de la compra que se quiere registrar esta adelantada al mes de la comprobación (Reembolso {TxtRembolsoNumero.Text} ,Fecha comprobación {FechaReembolso.ToString("dd/MM/yyyy")}).", TipoMensaje.MsgAdvertencia)
Else Else
Alert($"La fecha de la compra que se quiere registrar es anterior al mes permitido por la comprobación (Fecha comprobación {FechaReembolso.ToString("dd/MM/yyyy")}).", TipoMensaje.MsgAdvertencia) Alert($"La fecha de la compra que se quiere registrar es anterior al mes permitido por la comprobación (Reembolso {TxtRembolsoNumero.Text}, Fecha comprobación {FechaReembolso.ToString("dd/MM/yyyy")}).", TipoMensaje.MsgAdvertencia)
End If End If
End If End If

View File

@@ -1551,6 +1551,16 @@ Partial Class PopUpVerFactura
End If End If
End If End If
'Boleto
If UrlParametros("OP").ToString = "BOLETO" Then
'CveViajePasajero
Dim CVEVIAJEPASAJERO As Integer = UrlParametros("CVEVIAJEPASAJERO").ToString.ToEntero
If CVEVIAJEPASAJERO > 0 Then
ImprimeBoletoViale(CVEVIAJEPASAJERO)
End If
End If
End Sub End Sub
Private Function Parametros(Cadena As String) As Hashtable Private Function Parametros(Cadena As String) As Hashtable
@@ -6502,6 +6512,48 @@ Partial Class PopUpVerFactura
#End Region #End Region
#Region "IMPRESION BOLETOS "
Public Sub ImprimeBoletoViale(CveViajePasajero As Integer)
If Not CveViajePasajero > 0 Then Exit Sub
Dim ObjTransportes As New ClsTransportes
Dim DtViajePAsajero As New DataTable
If ObjTransportes.GetViajesPasajeros(-1, CveViajePasajero) Then
DtViajePAsajero = ObjTransportes.DtResultados
End If
ObjTransportes.Dispose()
If DtViajePAsajero Is Nothing Or (DtViajePAsajero IsNot Nothing AndAlso DtViajePAsajero.Rows.Count = 0) Then
Exit Sub
End If
Dim Fecha As Date = DtViajePAsajero.Rows(0)("FechaIng").ToString.ToDate
Dim Importe As Decimal = DtViajePAsajero.Rows(0)("Importe").ToString.ToDecimal
Dim params As New List(Of ReportParameter) From {
New ReportParameter("Ruta", DtViajePAsajero.Rows(0)("SubProyecto").ToString),
New ReportParameter("Origen", DtViajePAsajero.Rows(0)("Partida").ToString),
New ReportParameter("Destino", DtViajePAsajero.Rows(0)("Destino").ToString),
New ReportParameter("FechaSalida", Fecha.ToShortDateString()),
New ReportParameter("HoraSalida", Fecha.ToString("HH:mm")),
New ReportParameter("Nombre", DtViajePAsajero.Rows(0)("Nombre").ToString),
New ReportParameter("Visa", DtViajePAsajero.Rows(0)("Visa").ToString),
New ReportParameter("Celular", DtViajePAsajero.Rows(0)("Celular").ToString),
New ReportParameter("Importe", Math.Round(Importe, 2).ToString),
New ReportParameter("TipoBoleto", "Tipo Boleto"),
New ReportParameter("Agencia", "Agencia"),
New ReportParameter("TelefonoAgencia", "TelefonoAgencia"),
New ReportParameter("Asiento", DtViajePAsajero.Rows(0)("Asiento").ToString)
}
ImprimirPDFStimul($"{UsuarioActual.Empresa.Ruta}Formatos\Boleto.mrt", New DataTable, params, NombreArchivo:="Boleto")
End Sub
#End Region
Private Function GeneraCodigoQR(CodigoBarras As String, Alto As Integer, Largo As Integer, Margen As Integer, Formato As String, Optional PureBacode As Boolean = False) As Byte() Private Function GeneraCodigoQR(CodigoBarras As String, Alto As Integer, Largo As Integer, Margen As Integer, Formato As String, Optional PureBacode As Boolean = False) As Byte()

View File

@@ -711,7 +711,7 @@ Partial Class Contabilidad_DiarioPagos
'cuando el anticipo no paga toda la factura y no esta contabilizada 'cuando el anticipo no paga toda la factura y no esta contabilizada
If AbonoAnticipo < CompraTotal AndAlso Not EsContabilizada Then AbonoProveedor = CompraTotal - AbonoAnticipo If AbonoAnticipo < CompraTotal AndAlso Not EsContabilizada Then AbonoProveedor = CompraTotal - AbonoAnticipo
'ejecuta la instruccion para contabilizar la prepoliza de amortizacion cuando es unica, es decir se hace al final del cheque, luego otra prepoliza con la compra y tercera la amortizacion 'ejecuta la instruccion para contabilizar la prepoliza de amortizacion cuando es unica, es decir se hace al final del cheque, luego otra prepoliza con la compra y tercera la amortizacion
If Not Bancos.UpdateCompraPrePoliza(TxtFecha.Text.ToDate, NumPoliza, IDPoliza, gvrc.FCHiddenField("HdnCveCompra").Value.ToEntero, CvePlantillaPoliza) Then MsgError = "Error al actualizar compra" : Exit For Else PolizaActualizada = True If Not Bancos.UpdateCompraPrePoliza(Fecha, NumPoliza, IDPoliza, gvrc.FCHiddenField("HdnCveCompra").Value.ToEntero, CvePlantillaPoliza) Then MsgError = "Error al actualizar compra" : Exit For Else PolizaActualizada = True
Case 2, 1 Case 2, 1
TotalProveedores = TotalBancos TotalProveedores = TotalBancos
@@ -721,7 +721,7 @@ Partial Class Contabilidad_DiarioPagos
IdCuentaProveedor = gvrc.FCHiddenField("HdnIdCtaContProveedores").Value.ToEntero IdCuentaProveedor = gvrc.FCHiddenField("HdnIdCtaContProveedores").Value.ToEntero
Case 20 Case 20
'contabilizo la prepoliza 'contabilizo la prepoliza
If Not Bancos.UpdateCompraPrePoliza(TxtFecha.Text.ToDate, NumPoliza, IDPoliza, gvrc.FCHiddenField("HdnCveCompra").Value.ToEntero, CvePlantillaPoliza) Then MsgError = "Error al actualizar compra" : Exit For Else PolizaActualizada = True If Not Bancos.UpdateCompraPrePoliza(Fecha, NumPoliza, IDPoliza, gvrc.FCHiddenField("HdnCveCompra").Value.ToEntero, CvePlantillaPoliza) Then MsgError = "Error al actualizar compra" : Exit For Else PolizaActualizada = True
Case 8 'FyE Case 8 'FyE
AbonoFuncionario = CompraPagadoTotal AbonoFuncionario = CompraPagadoTotal
@@ -803,7 +803,7 @@ Partial Class Contabilidad_DiarioPagos
Next Next
'debe de actualizar 'debe de actualizar
If Not Bancos.UpdateCompraPrePoliza(TxtFecha.Text.ToDate, NumPoliza, IDPoliza, gvrc.FCHiddenField("HdnCveCompra").Value.ToEntero) Then If Not Bancos.UpdateCompraPrePoliza(Fecha, NumPoliza, IDPoliza, gvrc.FCHiddenField("HdnCveCompra").Value.ToEntero) Then
'ya esta corriendo un proceso que actualiza la 'ya esta corriendo un proceso que actualiza la
'If Not PolizaActualizada Then MsgError = "Error al actualizar compra" : Exit For 'If Not PolizaActualizada Then MsgError = "Error al actualizar compra" : Exit For
End If End If

View File

@@ -2444,16 +2444,6 @@ Partial Class Inventarios_RecepcionAlmacen
End If End If
End If End If
'CONTABILIZAR - SIMPLIFICAR
If Retorno Then
If UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
If Not ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
Retorno = False
End If
End If
End If
Else Else
Retorno = False Retorno = False
End If End If
@@ -2509,17 +2499,6 @@ Partial Class Inventarios_RecepcionAlmacen
Retorno = False Retorno = False
End If End If
End If End If
'CONTABILIZAR - SIMPLIFICAR
If Retorno Then
If UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
If Not ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
Retorno = False
End If
End If
End If
Else Else
Retorno = False Retorno = False
End If End If
@@ -3504,18 +3483,7 @@ Partial Class Inventarios_RecepcionAlmacen
End If End If
End If End If
End If End If
If UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
MensajeContabilidad = $"<br>Movimiento contabilizado en el folio: <b><a class='Texto' href = '/Contabilidad/RegPrePolizaS.aspx?CvePrePoliza={CvePrePoliza}'>{ObjConta.ContaFolio}</a></b><br>"
Else
ErrorMovInv = True
MensajeError = "Error al contabilizar los conceptos contables"
End If
End If
End If End If
End If End If
Else Else
ErrorMovInv = True ErrorMovInv = True
@@ -3604,16 +3572,6 @@ Partial Class Inventarios_RecepcionAlmacen
End If End If
End If End If
End If End If
If UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
MensajeContabilidad = $"<br>Movimiento contabilizado en el folio: <b><a class='Texto' href = '/Contabilidad/RegPoliza.aspx?IdPoliza={ObjConta.ContaIdPoliza}'>{ObjConta.ContaFolio}</a></b><br>"
Else
ErrorMovInv = True
MensajeError = "Error al contabilizar los conceptos contables"
End If
End If
End If End If
End If End If
Else Else
@@ -4036,18 +3994,6 @@ Partial Class Inventarios_RecepcionAlmacen
End If End If
End If End If
'If Not ErrorMovInv AndAlso UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
' ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa)
' ObjContaAC.IniciaTransacSQL()
' If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContaAC) Then
' MensajeError = $"<br>Movimiento contabilizado en el folio: <b><a class='Texto' href = '/Contabilidad/RegPoliza.aspx?IdPoliza={ObjConta.ContaIdPoliza}'>{ObjConta.ContaFolio}</a></b><br>"
' Else
' ErrorMovInv = True
' MensajeError = "Error al contabilizar los conceptos contables"
' End If
'End If
If Not ErrorMovInv AndAlso CveImportacionSeleccionada > 0 Then If Not ErrorMovInv AndAlso CveImportacionSeleccionada > 0 Then
If Not ObjInventario.UpdateImportacionCierre(CveImportacionSeleccionada, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then If Not ObjInventario.UpdateImportacionCierre(CveImportacionSeleccionada, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
@@ -4056,14 +4002,12 @@ Partial Class Inventarios_RecepcionAlmacen
End If End If
If Not ErrorMovInv AndAlso CveFleteSeleccionado > 0 Then If Not ErrorMovInv AndAlso CveFleteSeleccionado > 0 Then
If Not ObjInventario.UpdateFleteCierre(CveFleteSeleccionado, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then If Not ObjInventario.UpdateFleteCierre(CveFleteSeleccionado, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
ErrorMovInv = True ErrorMovInv = True
End If End If
End If End If
'FINAL 'FINAL
If Not ErrorMovInv Then If Not ErrorMovInv Then
ObjInventario.Commit() ' aplica los movimientos insertados ObjInventario.Commit() ' aplica los movimientos insertados

View File

@@ -68,9 +68,9 @@ Partial Class Inventarios_RepVentasXSurtir
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
Select Case e.Row.DBCampo("EsDevolucionVenta").ToEntero Select Case e.Row.DBCampo("EsDevolucionVenta").ToEntero
Case 0 Case 0
e.Row.Cells(0).Text = "<div class='label label-success'>Surtir</div>" e.Row.Cells(0).Text = $" <a href='/Inventarios/EntregaAlmacen.aspx?CveVenta={e.Row.DBCampo("CveVenta")}' class='btn btn-sm green' target='_blank'> Surtir</a>"
Case 1 Case 1
e.Row.Cells(0).Text = "<div class='label label-warning'>Recibir</div>" e.Row.Cells(0).Text = $" <a href='/Inventarios/EntregaAlmacen.aspx?CveVenta={e.Row.DBCampo("CveVenta")}' class='btn btn-sm yellow-gold' target='_blank'> Recibir</a>"
End Select End Select
End If End If
End Sub End Sub

View File

@@ -3,6 +3,30 @@
<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>
.select2anothertable {
position: absolute;
left: 100%;
background-color: white;
/*top: 50px;*/ top: 21px;
/*max-height: 200px;*/ max-height: 229px;
/*background-color: #dcdcdc;*/
overflow: hidden;
}
.select2anothertable > table > tbody > tr > td:nth-of-type(odd) {
background-color: rgba(220, 220, 220, 0.45);
}
.select2anothertable > table > tbody > tr > td {
line-height: 21px;
white-space: nowrap;
}
.select2anothertable > table > tbody > tr.active {
background-color: #5897fb;
}
</style>
</asp:Content> </asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server"> <asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
Reporte de solicitudes de traspaso Reporte de solicitudes de traspaso
@@ -192,7 +216,7 @@
</div> </div>
<div class="col-md-8 form-group form-md-line-input input-iconright" id="DivCaracteristicaOpcion" runat="server"> <div class="col-md-8 form-group form-md-line-input input-iconright" id="DivCaracteristicaOpcion" runat="server">
<ADS:Dropdownlost ID="DdlProductoServicio" runat="server" CssClass="form-control input-sm" CssClassDdl="select2me" CssStyle="width: 100%;" DataTextField="PSCodigo" DataValueField="CvePS" ></ADS:Dropdownlost> <ADS:Dropdownlost ID="DdlProductoServicio" runat="server" CssClass="form-control input-sm" CssClassDdl="select2me" CssStyle="width: 100%;" DataTextField="PSCodigo" DataValueField="CvePS" data-estatus="1" ></ADS:Dropdownlost>
<label for="<%= DdlProductoServicio.ClientID.ToString()%>">Producto o Servicio:</label> <label for="<%= DdlProductoServicio.ClientID.ToString()%>">Producto o Servicio:</label>
</div> </div>
<div class="col-md-2 form-group form-md-line-input input-iconright" id="Div3" runat="server"> <div class="col-md-2 form-group form-md-line-input input-iconright" id="Div3" runat="server">
@@ -338,6 +362,48 @@
} }
} }
} }
$('.DdlPS').on("select2:open", function (e) { $('.select2-container.select2-container--default .select2-dropdown .select2anothertable').remove(); });
$("body").on("mouseenter", ".select2-container.select2-container--default.select2-container--open .select2-dropdown li", function (event) {
var $this = $(this);
var ind = $this.index();
$(".select2-container.select2-container--default.select2-container--open .select2-dropdown .select2anothertable tr.active").removeClass('active');
$(".select2-container.select2-container--default.select2-container--open .select2-dropdown .select2anothertable tr:nth-child(" + (ind + 2) + ")").addClass('active');
//log($this);
});
var scrollfuncion = function () {
var stop = this.scrollTop;
$(".select2-container.select2-container--default.select2-container--open .select2-dropdown .select2anothertable").scrollTop(stop);
}
function CargaExistenciaAlmacenes(data, params) {
var div = $('<div class="select2anothertable"></div>');
$('.select2-container.select2-container--default.select2-container--open .select2-dropdown .select2anothertable').remove();
$('.select2-container.select2-container--default.select2-container--open .select2-dropdown').prepend(div);
var table = $('<table></table>'); div.append(table);
var tbody = $('<tbody></tbody>'); table.append(tbody);
$(".select2-container--default .select2-results>.select2-results__options").off("scroll", scrollfuncion);
$(".select2-container--default .select2-results>.select2-results__options").scroll(scrollfuncion);
var indexd = 0;
data.forEach(function (item) {
if (indexd == 0) {
var tr = $('<tr></tr>'); tbody.append(tr);
var td;
for (var key in item) {
if (!(key == "text" || key == "id")) { td = $('<td style="font-weight:bold;">' + key + '</td>'); tr.append(td); }
}
}
var tr = $('<tr></tr>'); tbody.append(tr);
var td;
for (var key in item) {
if (!(key == "text" || key == "id")) { td = $('<td ' + ((item[key] > 0) ? 'style = "font-weight:bold;"' : '') + '>' + item[key] + '</td>'); tr.append(td); }
}
indexd += 1;
});
}
</script> </script>
</asp:Content> </asp:Content>

View File

@@ -69,7 +69,8 @@ Partial Class Inventarios_TrasladoSolicitud
Private Sub InicializaValores() Private Sub InicializaValores()
CreaDTTemporal() CreaDTTemporal()
CargaAlmacenes() CargaAlmacenes()
CargaPS() 'CargaPS()
CargaFuncionalidad105()
'CargaClientes() 'CargaClientes()
' CargaUnidadMedida() ' CargaUnidadMedida()
@@ -92,25 +93,70 @@ Partial Class Inventarios_TrasladoSolicitud
End Sub End Sub
#Region " FUNCIONALIDAD 105-141 "
Private Sub CargaFuncionalidad105()
Dim EsWS As Boolean = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
Private Sub CargaPS() DdlProductoServicio.setEsWebService(EsWS)
DdlProductoServicio.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
If DdlProductoServicio.UsaWebService Then
'If isWithFamily() Then
' DdlP2.ddlWS.Attributes.Add("data-idSubFamilia", DdlClasificacion.ClientID)
'Else
' DdlP2.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacion.SelectedValue)
'End If
DdlProductoServicio.IncluyeTodos = False
DdlProductoServicio.ddlWS.Attributes.Add("data-pagina", "inv/traspaso")
If UsuarioActual.Empresa.Funcionalidad(141) = "1" Or True Then
DdlProductoServicio.ddlWS.Attributes.Add("Data-onresult", "CargaExistenciaAlmacenes")
'CargaSucursal()
'DdlSubProyecto.AutoPostBack = True
End If
DdlProductoServicio.Attributes.Add("Data-usoclasificacion", "-1")
Else
CargaPS(-1, DdlProductoServicio)
'DdlP2.ddl.Items.Add(New ListItem("Seleccione", "-1"))
'DdlP2.ddl.Items.Add(New ListItem("*** Actualizar listado de Productos o Servicios ***", "-2"))
End If
End Sub
Private Sub CargaPS(CveClasificacion As Integer, Objeto As ADServerControl.Dropdownlost)
If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
DdlProductoServicio.ddlWS.Attributes.Add("data-cveclasificacion", "-1") Objeto.ddlWS.Attributes.Add("data-cveclasificacion", CveClasificacion.ToString)
DdlProductoServicio.SelectedText = "" ' Objeto.ddlWS.Attributes.Add("data-pagina", "oc/oc")
DdlProductoServicio.SelectedValue = "-1" Objeto.SelectedText = ""
Objeto.SelectedValue = "-1"
Else Else
DdlProductoServicio.ddl.Items.Clear() Objeto.ddl.Items.Clear()
DdlProductoServicio.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=-1) Objeto.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacion).FiltraParametros("", "PSCodigo")
DdlProductoServicio.ddl.DataBind() Objeto.ddl.DataBind()
DdlProductoServicio.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1")) 'Objeto.Items.Insert(0, New ListItem("*** Actualizar listado de Productos o Servicios ***", "-2"))
Objeto.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
End If End If
'DdlProductoServicio.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
'DdlProductoServicio.DataBind()
'DdlProductoServicio.Items.Insert(0, New ListItem("Seleccione", "-1"))
End Sub End Sub
#End Region
'Private Sub CargaPS()
' DdlProductoServicio.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
' If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
' DdlProductoServicio.ddlWS.Attributes.Add("data-cveclasificacion", "-1")
' DdlProductoServicio.SelectedText = ""
' DdlProductoServicio.SelectedValue = "-1"
' Else
' DdlProductoServicio.ddl.Items.Clear()
' DdlProductoServicio.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=-1)
' DdlProductoServicio.ddl.DataBind()
' DdlProductoServicio.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
' End If
' 'DdlProductoServicio.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
' 'DdlProductoServicio.DataBind()
' 'DdlProductoServicio.Items.Insert(0, New ListItem("Seleccione", "-1"))
'End Sub
Private Sub CargaCombos() Private Sub CargaCombos()
DdlAlmacenOrigenFiltro.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros("CveTipoAlmacen = 1") 'GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen <> 9") DdlAlmacenOrigenFiltro.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros("CveTipoAlmacen = 1") 'GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen <> 9")
DdlAlmacenOrigenFiltro.DataBind() DdlAlmacenOrigenFiltro.DataBind()

View File

@@ -304,8 +304,11 @@
<li> <li>
<asp:LinkButton ID="LnkDownArchivosSua" OnClick="LnkDownArchivosSua_Click" runat="server"><i class="fa fa-download"></i> Descargar archivos SUA</asp:LinkButton> <asp:LinkButton ID="LnkDownArchivosSua" OnClick="LnkDownArchivosSua_Click" runat="server"><i class="fa fa-download"></i> Descargar archivos SUA</asp:LinkButton>
</li> </li>
<li>
<asp:HyperLink ID="HypXMLSTimbrados" Visible="false" onclick="GETXML(-1,-1)" NavigateUrl="#" runat="server"><i class="fa fa-download" aria-hidden="true"></i>Recibos timbrados XML</asp:HyperLink>
</li>
<li> <li>
<asp:HyperLink ID="HypPDFSTimbrados" Visible="false" onclick="GETPDF(-1,0)" NavigateUrl="#" runat="server"><i class="fa fa-download" aria-hidden="true"></i>Recibos timbrados</asp:HyperLink> <asp:HyperLink ID="HypPDFSTimbrados" Visible="false" onclick="GETPDF(-1,0)" NavigateUrl="#" runat="server"><i class="fa fa-download" aria-hidden="true"></i>Recibos timbrados PDF</asp:HyperLink>
</li> </li>
<li> <li>
<asp:LinkButton ID="LnkProcesarModal" OnClick="LnkProcesarModal_Click" runat="server"><i class="fa fa-check"></i> Procesar archivo SUA EBA PDF</asp:LinkButton> <asp:LinkButton ID="LnkProcesarModal" OnClick="LnkProcesarModal_Click" runat="server"><i class="fa fa-check"></i> Procesar archivo SUA EBA PDF</asp:LinkButton>
@@ -5293,6 +5296,8 @@
<asp:Literal ID="LtlXml" runat="server"></asp:Literal></span> <asp:Literal ID="LtlXml" runat="server"></asp:Literal></span>
<span class="ltlxmlfin"> <span class="ltlxmlfin">
<asp:Literal ID="LtlXmlfin" runat="server"></asp:Literal></span> <asp:Literal ID="LtlXmlfin" runat="server"></asp:Literal></span>
<span class="ltlzip">
<asp:Literal ID="LtlZip" runat="server"></asp:Literal></span>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
</asp:Content> </asp:Content>
@@ -5367,6 +5372,20 @@
document.body.removeChild(elem); document.body.removeChild(elem);
} }
} }
function Savezip(filename, data) {
var blob = new Blob([data], { type: 'application/zip' });
if (window.navigator.msSaveOrOpenBlob) {
window.navigator.msSaveBlob(blob, filename);
}
else {
var elem = window.document.createElement('a');
elem.href = window.URL.createObjectURL(blob);
elem.download = filename;
document.body.appendChild(elem);
elem.click();
document.body.removeChild(elem);
}
}
function SaveCsv(filename, data) { function SaveCsv(filename, data) {
var blob = new Blob([data], { type: 'text/csv' }); var blob = new Blob([data], { type: 'text/csv' });
if (window.navigator.msSaveOrOpenBlob) { if (window.navigator.msSaveOrOpenBlob) {

View File

@@ -14,6 +14,7 @@ using Modelos;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using iTextSharp.text.pdf.parser; using iTextSharp.text.pdf.parser;
using Profact.TimbraCFDI40; using Profact.TimbraCFDI40;
using Ionic.Zip;
public partial class Nomina_Nomina2 : ClsPaginas public partial class Nomina_Nomina2 : ClsPaginas
{ {
@@ -555,6 +556,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
} }
private void CargaTiposPeriodo() private void CargaTiposPeriodo()
{ {
set_GlobalDTTipoPeriodos(UsuarioActual.CveEmpresa, null);
DdlTipoPeriodo.DataSource = get_GlobalDTTipoPeriodos(UsuarioActual.CveEmpresa); DdlTipoPeriodo.DataSource = get_GlobalDTTipoPeriodos(UsuarioActual.CveEmpresa);
DdlTipoPeriodoCM.DataSource = DdlTipoPeriodo.DataSource; DdlTipoPeriodoCM.DataSource = DdlTipoPeriodo.DataSource;
DdlTipoPeriodoSim.DataSource = DdlTipoPeriodo.DataSource; DdlTipoPeriodoSim.DataSource = DdlTipoPeriodo.DataSource;
@@ -627,6 +629,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
FiltAgrupador = 1; FiltAgrupador = 1;
CveTipoTrabajador = DdlTipoTrabajador.SelectedValue.ToEntero(); CveTipoTrabajador = DdlTipoTrabajador.SelectedValue.ToEntero();
HypPDFSTimbrados.Attributes.Add("onclick", string.Format("GETPDF({0},{1})", -1, FiltCvePeriodo)); HypPDFSTimbrados.Attributes.Add("onclick", string.Format("GETPDF({0},{1})", -1, FiltCvePeriodo));
HypXMLSTimbrados.Attributes.Add("onclick", string.Format("GETXML({0},{1})", -1, FiltCvePeriodo));
cargaDatos(); cargaDatos();
int empleados = 0; int empleados = 0;
if (dtempleados != null && dtempleados.Rows.Count > 0) if (dtempleados != null && dtempleados.Rows.Count > 0)
@@ -694,6 +697,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
LnkPersonalizarNomina.Visible = true; LnkPersonalizarNomina.Visible = true;
LnkFormatoFiscal.Visible = (UsuarioActual.CveEmpresa == 141 || UsuarioActual.CveRol == 1); LnkFormatoFiscal.Visible = (UsuarioActual.CveEmpresa == 141 || UsuarioActual.CveRol == 1);
HypPDFSTimbrados.Visible = true; HypPDFSTimbrados.Visible = true;
HypXMLSTimbrados.Visible = true;
if (objnom.GetNominaEmpleado(FiltCveProyecto, FiltCveSubProyecto, FiltCveTurno, FiltCvePeriodo, CveEmpresa, FiltAgrupador, if (objnom.GetNominaEmpleado(FiltCveProyecto, FiltCveSubProyecto, FiltCveTurno, FiltCvePeriodo, CveEmpresa, FiltAgrupador,
DdlRegimenContratacion.SelectedValue.ToEntero(), CveTipoTrabajador: CveTipoTrabajador, Neto: ddlfiniquito.SelectedValue.ToEntero(), DdlRegimenContratacion.SelectedValue.ToEntero(), CveTipoTrabajador: CveTipoTrabajador, Neto: ddlfiniquito.SelectedValue.ToEntero(),
CvePersonal: CvePersonal) CvePersonal: CvePersonal)
@@ -9544,66 +9548,138 @@ public partial class Nomina_Nomina2 : ClsPaginas
string Xmlname = ""; string Xmlname = "";
string XmlnameF = ""; string XmlnameF = "";
string empleado = ""; string empleado = "";
DataRow dr = dtempleados.FiltroPrimero(string.Format("CvePersonal ={0}", TxtCvePersonal.Text.ToEntero()));
if (dr != null)
{
empleado = string.Format("{0} - {1}", dr["Codigo"], dr["Nombre"]);
}
using (ClsNominas ObjNomina = new ClsNominas())
{
if (ObjNomina.GetNom_Nominas(-1, TxtCvePersonal.Text.ToEntero(), TxtCvePeriodo.Text.ToEntero(), -1, UsuarioActual.CveEmpresa))
{
Ruta = UsuarioActual.Empresa.Ruta;
PathXML = $"{Ruta}XML\\Nomina\\{ObjNomina.SerieFolio}.xml";
PathXMLF = $"{Ruta}XML\\Nomina\\{ObjNomina.Serie}F-{ObjNomina.Folio}.xml";
Xmlname = ObjNomina.SerieFolio;
XmlnameF = $"{ObjNomina.Serie}F-{ObjNomina.Folio}";
}
}
try
{
string script = "";
if (!string.IsNullOrEmpty(PathXML) && System.IO.File.Exists(PathXML))
{
LtlXml.Text = System.IO.File.ReadAllText(PathXML);
script = string.Format("Savexml(\"{0} {1}.xml\", $('.ltlxml').html());", Xmlname, empleado);
//System.IO.FileInfo file = new System.IO.FileInfo(PathXML);
//string mimeType = "text/plain";
//try
//{
// mimeType = MimeMapping.GetMimeMapping(PathXML);
//}
//catch (Exception)
//{
//} Ruta = UsuarioActual.Empresa.Ruta;
//// Response.Write(path) if (TxtCvePersonal.Text.ToEntero() != -1)
//Response.Clear(); {
//Response.ClearHeaders(); DataRow dr = dtempleados.FiltroPrimero(string.Format("CvePersonal ={0}", TxtCvePersonal.Text.ToEntero()));
//Response.ClearContent(); if (dr != null)
//Response.AddHeader("Content-Disposition", $"attachment; filename= {Uri.EscapeDataString(file.Name)}");
//Response.AddHeader("Content-Length", file.Length.ToString());
//Response.ContentType = mimeType;
//Response.Flush();
//Response.TransmitFile(file.FullName);
//Response.End();
}
if (!string.IsNullOrEmpty(PathXML) && System.IO.File.Exists(PathXMLF))
{ {
LtlXmlfin.Text = System.IO.File.ReadAllText(PathXMLF); empleado = string.Format("{0} - {1}", dr["Codigo"], dr["Nombre"]);
script = string.Format("{1}Savexml(\"{0}(Indemnización) {2}.xml\", $('.ltlxmlfin').html());", Xmlname, script, empleado);
} }
if (script.Trim().Length > 0) using (ClsNominas ObjNomina = new ClsNominas())
{ {
RegistraScript(script); if (ObjNomina.GetNom_Nominas(-1, TxtCvePersonal.Text.ToEntero(), TxtCvePeriodo.Text.ToEntero(), -1, UsuarioActual.CveEmpresa))
{
PathXML = $"{Ruta}XML\\Nomina\\{ObjNomina.SerieFolio}.xml";
PathXMLF = $"{Ruta}XML\\Nomina\\{ObjNomina.Serie}F-{ObjNomina.Folio}.xml";
Xmlname = ObjNomina.SerieFolio;
XmlnameF = $"{ObjNomina.Serie}F-{ObjNomina.Folio}";
}
} }
else try
{
string script = "";
if (!string.IsNullOrEmpty(PathXML) && System.IO.File.Exists(PathXML))
{
LtlXml.Text = System.IO.File.ReadAllText(PathXML);
script = string.Format("Savexml(\"{0} {1}.xml\", $('.ltlxml').html());", Xmlname, empleado);
//System.IO.FileInfo file = new System.IO.FileInfo(PathXML);
//string mimeType = "text/plain";
//try
//{
// mimeType = MimeMapping.GetMimeMapping(PathXML);
//}
//catch (Exception)
//{
//}
//// Response.Write(path)
//Response.Clear();
//Response.ClearHeaders();
//Response.ClearContent();
//Response.AddHeader("Content-Disposition", $"attachment; filename= {Uri.EscapeDataString(file.Name)}");
//Response.AddHeader("Content-Length", file.Length.ToString());
//Response.ContentType = mimeType;
//Response.Flush();
//Response.TransmitFile(file.FullName);
//Response.End();
}
if (!string.IsNullOrEmpty(PathXMLF) && System.IO.File.Exists(PathXMLF))
{
LtlXmlfin.Text = System.IO.File.ReadAllText(PathXMLF);
script = string.Format("{1}Savexml(\"{0}(Indemnización) {2}.xml\", $('.ltlxmlfin').html());", Xmlname, script, empleado);
}
if (script.Trim().Length > 0)
{
RegistraScript(script);
}
else
{
Alert("No se encontro el archivo");
}
}
catch (Exception)
{ {
Alert("No se encontro el archivo");
} }
} }
catch (Exception) else
{ {
using (ClsNominas ObjNomina = new ClsNominas())
{
if (ObjNomina.GetNom_Nominas(-1, -1, TxtCvePeriodo.Text.ToEntero(), -1, UsuarioActual.CveEmpresa))
{
string script = "";
using (ZipFile descargaZIP = new ZipFile())
{
descargaZIP.UseZip64WhenSaving = Zip64Option.AsNecessary;
foreach (DataRow dbrow in ObjNomina.DtResultados.Rows)
{
Ruta = UsuarioActual.Empresa.Ruta;
PathXML = $"{Ruta}XML\\Nomina\\{dbrow["SerieFolio"].ToString()}.xml";
PathXMLF = $"{Ruta}XML\\Nomina\\{dbrow["Serie"].ToString()}F-{dbrow["Folio"].ToString()}.xml";
if (!string.IsNullOrEmpty(PathXML) && System.IO.File.Exists(PathXML))
{
FileInfo file = new FileInfo(PathXML);
if (!descargaZIP.Any(x => x.FileName.Contains(file.Name)))
{
descargaZIP.AddFile(PathXML);
}
}
if (!string.IsNullOrEmpty(PathXMLF) && System.IO.File.Exists(PathXMLF))
{
FileInfo file = new FileInfo(PathXMLF);
if (!descargaZIP.Any(x => x.FileName.Contains(file.Name)))
{
descargaZIP.AddFile(PathXMLF);
}
}
}
String PathZIP = $"{Ruta}XML\\Nomina\\{TxtCvePeriodo.Text.ToEntero()}.zip";
descargaZIP.Save(PathZIP);
if (!string.IsNullOrEmpty(PathZIP) && System.IO.File.Exists(PathZIP))
{
LtlZip.Text = System.IO.File.ReadAllText(PathZIP);
script = string.Format("Savezip(\"{0}.zip\", $('.ltlzip').html());", DdlPeriodo.SelectedItem.Text);
System.IO.File.Delete(PathZIP);
}
if (script.Trim().Length > 0)
{
RegistraScript(script);
}
else
{
Alert("No se encontro el archivo");
}
//Response.Clear();
//Response.AddHeader("Content-Disposition", "attachment; filename=ArchivosXML.zip");
//Response.ContentType = "application/zip";
//descargaZIP.Save(Response.OutputStream);
//Response.End();
}
}
}
} }
} }
@@ -10704,7 +10780,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
StringBuilder SbErrores = new StringBuilder(); StringBuilder SbErrores = new StringBuilder();
bool ErroresValidaciones = false; bool ErroresValidaciones = false;
int modalidadnomina = 1; int modalidadnomina = 1;
if (UsuarioActual.CveEmpresa.Contiene(189, 193, 195, 196, 197, 172, 173, 174)) modalidadnomina = 2; if (UsuarioActual.CveEmpresa.Contiene(189, 193, 195, 196, 197, 172, 173,174)) modalidadnomina = 2;
SbErrores.AppendLine("Se detectaron los siguientes errores en la generación del layout:<br/>"); SbErrores.AppendLine("Se detectaron los siguientes errores en la generación del layout:<br/>");

View File

@@ -432,7 +432,7 @@ Partial Class Sistemas_Empresa
Else Else
If ObjEmpresas.UpdateEmpresa(TxtEmpresa.Text.Trim, TxtDireccion.Text.Trim, TxtNoExt.Text.Trim, TxtNoInt.Text.Trim, TxtColonia.Text.Trim, TxtCiudad.Text.Trim, TxtEstado.Text.Trim, TxtRFC.Text.Trim, If ObjEmpresas.UpdateEmpresa(TxtEmpresa.Text.Trim, TxtDireccion.Text.Trim, TxtNoExt.Text.Trim, TxtNoInt.Text.Trim, TxtColonia.Text.Trim, TxtCiudad.Text.Trim, TxtEstado.Text.Trim, TxtRFC.Text.Trim,
TxtCP.Text.Trim, TxtTelefono.Text.Trim, TxtContacto.Text.Trim, TxtMail.Text.Trim, DdlTipoFacturacion.SelectedItem.ToString, TxtBIUsuario.Text.Trim, TxtCP.Text.Trim, TxtTelefono.Text.Trim, TxtContacto.Text.Trim, TxtMail.Text.Trim, DdlTipoFacturacion.SelectedItem.ToString, TxtBIUsuario.Text.Trim,
TxtBIContraseña.Text.Trim, TxtContraseñaKey.Text.Trim, TxtArchivoKey.Text.Trim, TxtArchivoCer.Text.Trim, TxtArchivoPfx.Text.Trim, "", ChkEstatus.Checked, TxtBIContraseña.Text.Trim, TxtContraseñaKey.Text, TxtArchivoKey.Text.Trim, TxtArchivoCer.Text.Trim, TxtArchivoPfx.Text.Trim, "", ChkEstatus.Checked,
ChkFacturaProduccion.Checked, ChkMostrarRetIVA.Checked, ChkMostrarRetISR.Checked, "", TxtSendMail.Text.Trim, ChkFacturaProduccion.Checked, ChkMostrarRetIVA.Checked, ChkMostrarRetISR.Checked, "", TxtSendMail.Text.Trim,
TxtSendMailPassword.Text.Trim, TxtSendMailServer.Text.Trim, TxtSendMailPort.Text.Trim.ToEntero, ChkSendMailSSL.Checked, ChkUsaContabilidad.Checked, ChkUsaBancos.Checked, TxtSendMailPassword.Text.Trim, TxtSendMailServer.Text.Trim, TxtSendMailPort.Text.Trim.ToEntero, ChkSendMailSSL.Checked, ChkUsaContabilidad.Checked, ChkUsaBancos.Checked,
ChkUsaVentas.Checked, ChkUsaCxC.Checked, ChkUsaCompras.Checked, ChkUsaInventarios.Checked, ChkUsaRH.Checked, ChkUsaNomina.Checked, ChkUsaOS.Checked, TxtBDContPAQi.Text.Trim, ChkUsaVentas.Checked, ChkUsaCxC.Checked, ChkUsaCompras.Checked, ChkUsaInventarios.Checked, ChkUsaRH.Checked, ChkUsaNomina.Checked, ChkUsaOS.Checked, TxtBDContPAQi.Text.Trim,

View File

@@ -272,8 +272,28 @@
<div class="row"> <div class="row">
<p class="col-md-6"></p> <p class="col-md-6"></p>
<asp:Label runat="server" ID="LbCostos" CssClass="col-md-6 text-success bold my-1 text-right" <div class="col-md-6" style="text-align:right">
Visible="False"></asp:Label> <div class="row">
<div class="col-lg-10" style="text-align:right!important">
<asp:Label runat="server" Width="270px" ID="LbCostos" CssClass="text-success bold my-1 text-right" Visible="False"></asp:Label>
</div>
<div class="col-lg-2" style="text-align:left!important;margin-top:7px!important">
<asp:TextBox runat="server" ID="TxtImporte" Enabled="false" Visible="false" Width="50px" CssClass="text-success" ForeColor="#3b9c96" Font-Bold="true"></asp:TextBox>
<ajax:FilteredTextBoxExtender FilterType="Custom" ValidChars="1234567890." runat="server" TargetControlID="TxtImporte" />
</div>
</div>
<%--<table>
<tr>
<td style="width:270px;text-align:right"> </td>
<td style="width:50px;text-align:left">
</td>
</tr>
</table>--%>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -4,6 +4,7 @@ Imports System.Data
Imports ADSNetLibrary.Helpers Imports ADSNetLibrary.Helpers
Imports Extensiones Imports Extensiones
Imports Extensiones.ModExtensiones Imports Extensiones.ModExtensiones
Partial Class Boletos Partial Class Boletos
Inherits ClsPaginas Inherits ClsPaginas
#Region "Propiedades" #Region "Propiedades"
@@ -77,9 +78,7 @@ Partial Class Boletos
If Not IsPostBack Then If Not IsPostBack Then
If UsuarioActual.CveRol = 1583 Then
EsAgencia = True
End If
If Request.QueryString("CveViaje") Is Nothing And UsuarioActual.CveVendedor <> Nothing And UsuarioActual.CveVendedor <> -1 Then If Request.QueryString("CveViaje") Is Nothing And UsuarioActual.CveVendedor <> Nothing And UsuarioActual.CveVendedor <> -1 Then
Response.Redirect("/Transportes/RepViajes.aspx") Response.Redirect("/Transportes/RepViajes.aspx")
@@ -92,8 +91,24 @@ Partial Class Boletos
Alert("Viaje no definido") Alert("Viaje no definido")
End If End If
Permisos()
End If End If
End Sub End Sub
Private Sub Permisos()
If UsuarioActual.CveRol = 1583 Then
EsAgencia = True
If UsuarioActual.CveVendedor <= 0 Then
Alert("El usuario no tiene Vendedor Asignado", TipoMensaje.MsgAdvertencia)
End If
End If
If UsuarioActual.TienePermisoProceso(400) Then
TxtImporte.Enabled = True
End If
End Sub
Private Sub CargaDatos() Private Sub CargaDatos()
Dim ObjContratos As New ClsContratos Dim ObjContratos As New ClsContratos
Dim ObjViaje As New ClsTransportes Dim ObjViaje As New ClsTransportes
@@ -180,30 +195,33 @@ Partial Class Boletos
Dim CveSubProyecto As Integer = Contrato.Rows(0)("CveSubProyecto").ToString.ToEntero Dim CveSubProyecto As Integer = Contrato.Rows(0)("CveSubProyecto").ToString.ToEntero
If ObjDestinos.GetDestinosTarifas(CveSubProyecto, DdlPartida.SelectedValue.ToEntero, DdlDestino.SelectedValue.ToEntero) Then If ObjDestinos.GetDestinosTarifas(CveSubProyecto, DdlPartida.SelectedValue.ToEntero, DdlDestino.SelectedValue.ToEntero) Then
Dim fechaHoy As Date = Date.Today
Dim fechaNacimiento As Date = TxtFechaNacimiento.Text.ToDate
Dim edad As Integer
' Calcular la diferencia en años entre la fecha actual y la fecha de nacimiento Dim edad As Integer = CInt(DateDiff(DateInterval.Year, TxtFechaNacimiento.Text.ToDate, Date.Today))
edad = CInt(DateDiff(DateInterval.Year, fechaNacimiento, fechaHoy)) Dim Mes As Integer = TxtFecha.Text.ToDate.Month
If edad <= 4 Or edad >= 60 Then
ImporteR = ObjDestinos.DtResultados.FiltroPrimeroValor("Importe").ToDecimal.RoundSQL - 20 If Mes.Contiene(11, 12) Then 'Tarifas de meses Noviembre y Diciembre
ImporteR = If(Mes = 11, ObjDestinos.DtResultados.FiltroPrimeroValor("ImporteNov").ToDecimal.RoundSQL, ObjDestinos.DtResultados.FiltroPrimeroValor("ImporteDic").ToDecimal.RoundSQL)
Else Else
ImporteR = ObjDestinos.DtResultados.FiltroPrimeroValor("Importe").ToDecimal.RoundSQL ImporteR = ObjDestinos.DtResultados.FiltroPrimeroValor("Importe").ToDecimal.RoundSQL
End If End If
ImporteR = If(edad <= 4 Or edad >= 60, ImporteR - 20, ImporteR)
End If End If
If ImporteR > 0 Then If ImporteR > 0 Then
ViewState("Importe") = ImporteR ViewState("Importe") = ImporteR
LbCostos.Text = $"El precio de su boleto es ${ImporteR.FormatoNumero}" LbCostos.Text = $"El precio de su boleto es:"
LbCostos.Visible = True LbCostos.Visible = True
TxtImporte.Text = ImporteR.FormatoNumero
TxtImporte.Visible = True
BtnAgregarPasajero.Visible = True BtnAgregarPasajero.Visible = True
LbAviso.Visible = True LbAviso.Visible = True
Else Else
ViewState("Importe") = 0 ViewState("Importe") = 0
BtnAgregarPasajero.Visible = False BtnAgregarPasajero.Visible = False
LbCostos.Visible = False LbCostos.Visible = False
TxtImporte.Visible = False
Alert("No se encontro una tarifa para estos destinos", TipoMensaje.MsgAdvertencia) Alert("No se encontro una tarifa para estos destinos", TipoMensaje.MsgAdvertencia)
End If End If
@@ -249,6 +267,7 @@ Partial Class Boletos
End If End If
dr("CveViajePasajero") = CveViajePasajero dr("CveViajePasajero") = CveViajePasajero
'dr("Numero") = dr("Importe").ToString
Next Next
@@ -305,7 +324,9 @@ Partial Class Boletos
ObjTransporte.Commit() ObjTransporte.Commit()
ObjTransporte.Dispose() ObjTransporte.Dispose()
SbAlert.Append("El boleto se genero correctamente.") SbAlert.Append("El boleto se genero correctamente.</br>")
GeneraLinksDescargaBoleto(SbAlert)
DtPasajeros.Clear() DtPasajeros.Clear()
GvB.DataSource = DtPasajeros GvB.DataSource = DtPasajeros
@@ -321,7 +342,8 @@ Partial Class Boletos
CargaDatos() CargaDatos()
End If End If
Alert(SbAlert.ToString(), If(TieneError, TipoMensaje.MsgError, TipoMensaje.MsgInformacion), ShowCloseButton:=False) Alert(SbAlert.ToString(), If(TieneError, TipoMensaje.MsgError, TipoMensaje.MsgInformacion), ShowCloseButton:=False, JSBtnAceptar:="window.location.reload();")
End Try End Try
LbAviso.Visible = False LbAviso.Visible = False
@@ -331,6 +353,20 @@ Partial Class Boletos
UpPanel.Update() UpPanel.Update()
End Sub End Sub
Private Sub GeneraLinksDescargaBoleto(ByRef SB As StringBuilder)
For Each dRow As DataRow In DtPasajeros.Rows
Dim CveViajePasajero As Integer = dRow("CveViajePasajero").ToString.ToEntero
If CveViajePasajero > 0 Then
Dim Liga As String = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=BOLETO&CVEVIAJEPASAJERO={0}", CveViajePasajero.ToString)))
SB.Append($"<a target= '_blank' href='{Liga}' class='Texto' ><i class='fa fa-print'></i> Boleto: {dRow("Nombre").ToString}</a></br>")
End If
Next
End Sub
Protected Sub DdlPartida_SelectedIndexChanged(sender As Object, e As EventArgs) Protected Sub DdlPartida_SelectedIndexChanged(sender As Object, e As EventArgs)
DdlDestino.DataSource = DtDestinos.FiltraParametros($"CveDestinoOrigen = {DdlPartida.SelectedValue}") DdlDestino.DataSource = DtDestinos.FiltraParametros($"CveDestinoOrigen = {DdlPartida.SelectedValue}")
DdlDestino.DataBind() DdlDestino.DataBind()
@@ -358,6 +394,13 @@ Partial Class Boletos
End Sub End Sub
Protected Sub AgregarPasajero(sender As Object, e As EventArgs) Protected Sub AgregarPasajero(sender As Object, e As EventArgs)
If EsAgencia Then
If UsuarioActual.CveVendedor <= 0 Then
Alert("El usuario no tiene Vendedor Asignado", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
End If
If AsientoSeleccionado = "" Then If AsientoSeleccionado = "" Then
Alert("No se ha seleccionado el asiento.") Alert("No se ha seleccionado el asiento.")
Exit Sub Exit Sub
@@ -372,7 +415,7 @@ Partial Class Boletos
Dr1("Destino") = DdlDestino.SelectedItem Dr1("Destino") = DdlDestino.SelectedItem
Dr1("CveDestinoOrigen") = DdlPartida.SelectedValue.ToEntero Dr1("CveDestinoOrigen") = DdlPartida.SelectedValue.ToEntero
Dr1("CveDestinoFinal") = DdlDestino.SelectedValue.ToEntero Dr1("CveDestinoFinal") = DdlDestino.SelectedValue.ToEntero
Dr1("Importe") = Me.Importe Dr1("Importe") = TxtImporte.Text.ToDecimal 'Me.Importe
Dr1("Asiento") = AsientoSeleccionado.Replace("A", "") Dr1("Asiento") = AsientoSeleccionado.Replace("A", "")
Dr1("Nombre") = TxtNombre.Text.Trim Dr1("Nombre") = TxtNombre.Text.Trim
'Dr1("INE") = TxtINE.Text.Trim 'Dr1("INE") = TxtINE.Text.Trim
@@ -415,11 +458,11 @@ Partial Class Boletos
Private Function CrearRemision(ByRef objTrans As ClsTransportes) As Modelos.Factura.MMensajeFactura Private Function CrearRemision(ByRef objTrans As ClsTransportes) As Modelos.Factura.MMensajeFactura
Dim Retorno As New Modelos.Factura.MMensajeFactura Dim Retorno As New Modelos.Factura.MMensajeFactura
Dim CveCliente As Integer = 1154164 Dim CveCliente As Integer = 1172306 ' 1154164
Dim CveMoneda As Integer = 2 Dim CveMoneda As Integer = 2
Dim CveSubProyecto As Integer = -1 Dim CveSubProyecto As Integer = -1
Dim CvePSBoleto As Integer = 912720 Dim CvePSBoleto As Integer = 907706 '912720
If EsProduccion Then If EsProduccion Then
CvePSBoleto = 986337 CvePSBoleto = 986337
@@ -501,4 +544,7 @@ Partial Class Boletos
Return Retorno Return Retorno
End Function End Function
End Class End Class

View File

@@ -11,6 +11,17 @@
<li> <li>
<asp:LinkButton runat="server" OnClick="ImprimirContrato"><i class="fa fa-print"></i> Imprimir Contrato</asp:LinkButton> <asp:LinkButton runat="server" OnClick="ImprimirContrato"><i class="fa fa-print"></i> Imprimir Contrato</asp:LinkButton>
</li> </li>
<asp:UpdatePanel runat="server">
<ContentTemplate>
<li>
<asp:LinkButton ID="ImgPDF" runat="server" OnClick="ImgPDF_Click"> <i class="fa fa-file-pdf-o" style="font-weight:bold; margin-right:5px;"></i> <span> Manifiesto</span></asp:LinkButton>
</li>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="ImgPDF" />
</Triggers>
</asp:UpdatePanel>
</asp:Content> </asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server"> <asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
@@ -111,7 +122,9 @@
<%-- Información General --%> <%-- Información General --%>
<ajax:TabPanel runat="server" HeaderText="Información General" CssClass="tabBodyOverride"> <ajax:TabPanel runat="server" HeaderText="Información General" CssClass="tabBodyOverride">
<ContentTemplate> <ContentTemplate>
<div class="row"> <div class="row">
<%-- Datos del Contrato --%> <%-- Datos del Contrato --%>
<div class="col-md-7"> <div class="col-md-7">
<div class="portlet light bordered xspadding"> <div class="portlet light bordered xspadding">
@@ -494,220 +507,274 @@
</div> </div>
<%-- Bitácora --%> <%-- Bitácora --%>
<div class="col-md-12">
<div class="portlet light bordered xspadding">
<div class="portlet-title">
<%--<div class="caption uppercase" style="position: relative;"> </div>
<i class="fa fa-commenting"></i>Bitácora <asp:UpdatePanel ID="UpBitacora" runat="server" UpdateMode="Conditional">
</div> <ContentTemplate>
<div class="btn-group">
<asp:HyperLink ID="ImgAddObs" CssClass="caption-subject bold font-green" data-toggle="modal" data-target="#ModalBitacora" runat="server" Text=" <i class='fa fa-commenting font-green' ></i><span class='caption-subject bold'>Agregar</span>" Style="font-weight: 700 !important;cursor: pointer;" ToolTip="Observaciones"></asp:HyperLink><br />
<asp:HyperLink ID="HlEvento" CssClass="thickbox caption-subject bold font-green" runat="server" Text=" <i class='fa fa-calendar-plus-o font-green' ></i>Agendar" Visible="false" Style="font-weight: 700 !important;cursor: pointer;" ToolTip="Agendar"></asp:HyperLink><br />
<asp:Literal ID="LtlTareaNueva" runat="server"></asp:Literal>
<UserControl:TareaNueva runat="server" ID="TareaNueva" />
</div>--%>
<div class="caption font-default">
<%--<i class="fa fa-users font-green"></i>--%>
<span class="caption-subject bold uppercase">Bitacora</span>
</div>
<div class="actions">
<div class="btn-group">
<asp:HyperLink ID="ImgAddObs" CssClass="caption-subject bold font-light " data-toggle="modal" data-target="#ModalBitacora" runat="server" Text=" <i class='fa fa-commenting font-light ' ></i><span class='caption-subject bold'>Agregar</span>" Style="font-weight: 700 !important; cursor: pointer" ToolTip="Observaciones"></asp:HyperLink><br />
<asp:HyperLink ID="HlEvento" CssClass="thickbox caption-subject bold font-light " runat="server" Text="" Visible="false" Style="font-weight: 700 !important; cursor: pointer" ToolTip="Agendar"><i class='fa fa-calendar-plus-o font-light ' ></i>Agendar</asp:HyperLink><br />
<asp:Literal ID="LtlTareaNueva" runat="server"></asp:Literal> <div class="row">
<UserControl:TareaNueva runat="server" ID="TareaNueva" /> <div class="col-md-12">
<%--<script> function OnAddedTareaNueva() { $('.btnupEventoBitacora').click(); }</script>--%> <div class="portlet light bordered xspadding">
<div class="portlet-title">
<div class="caption font-default">
<span class="caption-subject bold uppercase">Bitacora</span>
</div>
<div class="actions">
<div class="btn-group">
<asp:HyperLink ID="ImgAddObs" CssClass="caption-subject bold font-light " data-toggle="modal" data-target="#ModalBitacora" runat="server" Text=" <i class='fa fa-commenting font-light ' ></i><span class='caption-subject bold'>Agregar</span>" Style="font-weight: 700 !important; cursor: pointer" ToolTip="Observaciones"></asp:HyperLink><br />
<asp:HyperLink ID="HlEvento" CssClass="thickbox caption-subject bold font-light " runat="server" Text="" Visible="false" Style="font-weight: 700 !important; cursor: pointer" ToolTip="Agendar"><i class='fa fa-calendar-plus-o font-light ' ></i>Agendar</asp:HyperLink><br />
<asp:Literal ID="LtlTareaNueva" runat="server"></asp:Literal>
<UserControl:TareaNueva runat="server" ID="TareaNueva" />
</div>
</div>
</div>
<div class="portlet-body rowpadding">
<asp:UpdatePanel ID="UPEventoBitacora" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvEB" runat="server" AutoGenerateColumns="False" DataKeyNames="CveEvento" EmptyDataText="No se han capturado comentarios o bitácora" CssClass="table table-striped table-advance table-hover Widthall" GridLines="None">
<Columns>
<asp:TemplateField>
<HeaderTemplate>Fecha</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Fecha Agenda</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlFechaAgenda" runat="server" Text='<%# Eval("FechaInicio") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Usuario</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Descripción</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlEventoBitacora" runat="server" Text='<%# Eval("Descripcion") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="10px" ItemStyle-HorizontalAlign="Center">
<HeaderTemplate>Archivo</HeaderTemplate>
<ItemTemplate>
<asp:LinkButton ID="LinkArchivo" Visible="false" runat="server" CssClass="Texto" OnClick="DownloadFile">
<asp:Image ImageUrl="/Imagenes/Abajo.png" ID="ImgArchivo" runat="server" />
</asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<HeaderStyle CssClass="Titulos" />
<AlternatingRowStyle CssClass="TextoAlterno" />
<RowStyle CssClass="Texto" />
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="portlet light bordered xspadding">
<div class="portlet-title">
<div class="caption">
<i class="icon-pin"></i>
<span class="caption-subject bold uppercase">Historial de Modificación</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
</div>
<div class="portlet-body">
<asp:GridView ID="GvBitacora" runat="server" GridLines="None" Width="100%" CssClass="table table-striped table-advance table-hover Widthall ADSCroll mysmallbtn" CellSpacing="0" AutoGenerateColumns="False">
<Columns>
<asp:TemplateField>
<HeaderTemplate>Fecha</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="ConceptoHistorialBitacora" HeaderText="Campo" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="Anterior" HeaderText="Anterior" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="Actual" HeaderText="Actual" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="Descripcion" HeaderText="Descripción" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="Usuario" HeaderText="Usuario" ItemStyle-HorizontalAlign="Left" />
</Columns>
</asp:GridView>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel runat="server" HeaderText="Boletos" CssClass="row" Visible="false"
ID="TabBoletos">
<ContentTemplate>
<asp:UpdatePanel runat="server" ID="UpPasajeros" UpdateMode="Conditional">
<ContentTemplate>
<div class="row">
<div class="col-lg-12">
<div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
<div class="portlet-title portlet-filterT smalltitle">
<div class="tools">
<a href="javascript:;" class="expand"></a>
</div>
<div class="titlefiltros caption">
<div class="row" style="height: 32px;">
<div class="col-md-1 truncate">
Vendedor:
</div>
<div class="col-md-2" style="min-width: 115px">
<asp:DropDownList ID="DdlVendedor" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" Width="100%"
AutoPostBack="true" OnSelectedIndexChanged="DdlVendedor_SelectedIndexChanged">
<asp:ListItem Selected="true" Text="Sin asignar" Value="0"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>
</div>
<div class="portlet-body" style="display: none">
</div> </div>
</div> </div>
</div> </div>
<div class="portlet-body rowpadding"> </div>
<asp:UpdatePanel ID="UPEventoBitacora" runat="server" UpdateMode="Conditional">
<ContentTemplate> <div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right; margin-right: 5px" align="left;">
<asp:GridView ID="GvEB" runat="server" AutoGenerateColumns="False" DataKeyNames="CveEvento" EmptyDataText="No se han capturado comentarios o bitácora" CssClass="table table-striped table-advance table-hover Widthall" GridLines="None">
<Columns> <input type="text" id="TxtBusquedaBol" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaBol','{0}')", GvViajesPasajeros.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<asp:TemplateField> <a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaBol','{0}')", GvViajesPasajeros.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
<HeaderTemplate>Fecha</HeaderTemplate>
<ItemTemplate> </div>
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField> <div class="row">
<asp:TemplateField> <div class="col-md-12">
<HeaderTemplate>Fecha Agenda</HeaderTemplate>
<ItemTemplate> <asp:GridView ID="GvViajesPasajeros" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ningún boleto registrado" Width="100%" ShowFooter="true"
<asp:Literal ID="LtlFechaAgenda" runat="server" Text='<%# Eval("FechaInicio") %>'></asp:Literal> CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn"
</ItemTemplate> GridLines="None"
</asp:TemplateField> data-sort="true"
<asp:TemplateField> DataKeyNames="CveViajePasajero, CveViaje, CveDestinoFinal, CveVendedor, Importe, Asiento, Nombre, Visa, Celular, Observacion, Estatus, CveUsuario, FechaIng, Sexo, Partida, Destino, Vendedor, Agencia, TelefonoAgencia,FechaNacimiento"
<HeaderTemplate>Usuario</HeaderTemplate> OnRowDataBound="GvViajesPasajeros_RowDataBound">
<ItemTemplate> <Columns>
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal> <asp:TemplateField HeaderText="No. Asiento">
</ItemTemplate> <ItemTemplate>
</asp:TemplateField> <asp:Literal ID="LtlAsiento" runat="server" Text='<%# Eval("Asiento") %>'></asp:Literal>
<asp:TemplateField> </ItemTemplate>
<HeaderTemplate>Descripción</HeaderTemplate> </asp:TemplateField>
<ItemTemplate> <asp:TemplateField HeaderText="Nombre">
<asp:Literal ID="LtlEventoBitacora" runat="server" Text='<%# Eval("Descripcion") %>'></asp:Literal> <ItemTemplate>
</ItemTemplate> <asp:Literal ID="LtlNombre" runat="server" Text='<%# Eval("Nombre") %>'></asp:Literal>
</asp:TemplateField> </ItemTemplate>
<asp:TemplateField ItemStyle-Width="10px" ItemStyle-HorizontalAlign="Center"> </asp:TemplateField>
<HeaderTemplate>Archivo</HeaderTemplate> <asp:TemplateField HeaderText="Visa">
<ItemTemplate> <ItemTemplate>
<asp:LinkButton ID="LinkArchivo" Visible="false" runat="server" CssClass="Texto" OnClick="DownloadFile"> <asp:Literal ID="LtlVisa" runat="server" Text='<%# Eval("Visa") %>'></asp:Literal>
<asp:Image ImageUrl="/Imagenes/Abajo.png" ID="ImgArchivo" runat="server" /> </ItemTemplate>
</asp:LinkButton> </asp:TemplateField>
</ItemTemplate> <asp:TemplateField HeaderText="Celular">
</asp:TemplateField> <ItemTemplate>
</Columns> <asp:Literal ID="LtlCelular" runat="server" Text='<%# Eval("Celular") %>'></asp:Literal>
<HeaderStyle CssClass="Titulos" /> </ItemTemplate>
<AlternatingRowStyle CssClass="TextoAlterno" /> </asp:TemplateField>
<RowStyle CssClass="Texto" /> <asp:TemplateField HeaderText="Sexo">
</asp:GridView> <ItemTemplate>
</ContentTemplate> <asp:Literal ID="LtlSexo" runat="server" Text='<%# If(Eval("Sexo").ToString = "True", "Masculino", "Femenino") %>'>
</asp:UpdatePanel> </asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Estatus">
<ItemTemplate>
<asp:Label ID="LtlEstatus" runat="server" Text='<%# If(Eval("Estatus").ToString = "True", "Activo", "Cancelado") %>'
CssClass='<%# If(Eval("Estatus").ToString = "True", "text-success", "text-danger") %>'>
</asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Partida">
<ItemTemplate>
<asp:Literal ID="LtlPartida" runat="server" Text='<%# Eval("Partida") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Destino">
<ItemTemplate>
<asp:Literal ID="LtlDestino" runat="server" Text='<%# Eval("Destino") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Vendedor">
<ItemTemplate>
<asp:Literal ID="LtlVendedor" runat="server" Text='<%# Eval("Vendedor") %>'>
</asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Importe" ItemStyle-HorizontalAlign="Right" FooterStyle-HorizontalAlign="Right">
<FooterTemplate>
<asp:Literal ID="LtlImportePie" runat="server"></asp:Literal>
</FooterTemplate>
<ItemTemplate>
<asp:Literal ID="LtlImporte" runat="server" Text='<%# Eval("Importe", "{0:C2}") %>'>
</asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Acciones">
<ItemTemplate>
<asp:LinkButton ID="BtnEditar" runat="server" AlternateText="Editar" OnClick="EditarBoleto"
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" ToolTip="Editar" />
<asp:LinkButton ID="BtnReAgendar" runat="server" AlternateText="Editar" OnClick="CambiarBoleto"
CssClass="btn btn-circle btn-sm yellow" Text="<i class='fa fa-repeat'></i>" ToolTip="Editar" />
<asp:LinkButton ID="BtnCancelar" runat="server" AlternateText="Activar"
CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-cancel'></i>"
data-toggle="confirmation" data-popout="true" data-original-title='<%# If(Eval("Estatus").ToString = "True", "Cancelar Boleto", "Reactivar") %>'
data-btn-ok-label="si" OnClick="BtnCancelar_Click" />
<asp:Literal runat="server" ID="LtlImprimir"></asp:Literal>
<%-- <asp:LinkButton ID="BtnImprimir" runat="server" AlternateText="Viaje"
CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-print'></i>" ToolTip="Imprimir"
OnClick="ImprimirBoleto" />--%>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div> </div>
</div> </div>
</div>
</div>
<asp:UpdatePanel ID="UpBitacora" runat="server" UpdateMode="Conditional">
<ContentTemplate> </ContentTemplate>
<div class="row"> </asp:UpdatePanel>
<div class="col-md-12">
<div class="portlet light bordered xspadding">
<div class="portlet-title">
<div class="caption">
<i class="icon-pin"></i>
<span class="caption-subject bold uppercase">Historial de Modificación</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
</div>
<div class="portlet-body">
<asp:GridView ID="GvBitacora" runat="server" GridLines="None" Width="100%" CssClass="table table-striped table-advance table-hover Widthall ADSCroll mysmallbtn" CellSpacing="0" AutoGenerateColumns="False">
<Columns>
<asp:TemplateField>
<HeaderTemplate>Fecha</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="ConceptoHistorialBitacora" HeaderText="Campo" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="Anterior" HeaderText="Anterior" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="Actual" HeaderText="Actual" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="Descripcion" HeaderText="Descripción" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="Usuario" HeaderText="Usuario" ItemStyle-HorizontalAlign="Left" />
</Columns>
</asp:GridView>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</ContentTemplate> </ContentTemplate>
</ajax:TabPanel> </ajax:TabPanel>
<%-- Pre init --%>
<%-- <ajax:TabPanel runat="server" HeaderText="PreInit" CssClass="row">
<ContentTemplate>
</ContentTemplate>
</ajax:TabPanel>--%>
<%-- Boletos --%>
<ajax:TabPanel runat="server" HeaderText="Boletos" CssClass="row" Visible="false"
ID="TabBoletos">
<ContentTemplate>
<asp:UpdatePanel runat="server" ID="UpPasajeros" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvViajesPasajeros" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ningún boleto registrado"
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None"
data-sort="true" DataKeyNames="CveViajePasajero, CveViaje, CveDestinoFinal, CveVendedor, Importe, Asiento, Nombre, Visa, Celular, Observacion, Estatus, CveUsuario, FechaIng, Sexo, Partida, Destino, Vendedor, Agencia, TelefonoAgencia"
OnRowDataBound="GvViajesPasajeros_RowDataBound">
<Columns>
<asp:TemplateField HeaderText="No. Asiento">
<ItemTemplate>
<asp:Literal ID="LtlAsiento" runat="server" Text='<%# Eval("Asiento") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Nombre">
<ItemTemplate>
<asp:Literal ID="LtlNombre" runat="server" Text='<%# Eval("Nombre") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Visa">
<ItemTemplate>
<asp:Literal ID="LtlVisa" runat="server" Text='<%# Eval("Visa") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Celular">
<ItemTemplate>
<asp:Literal ID="LtlCelular" runat="server" Text='<%# Eval("Celular") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Sexo">
<ItemTemplate>
<asp:Literal ID="LtlSexo" runat="server" Text='<%# If(Eval("Sexo").ToString = "True", "Masculino", "Femenino") %>'>
</asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Estatus">
<ItemTemplate>
<asp:Label ID="LtlEstatus" runat="server" Text='<%# If(Eval("Estatus").ToString = "True", "Activo", "Cancelado") %>'
CssClass='<%# If(Eval("Estatus").ToString = "True", "text-success", "text-danger") %>'>
</asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Partida">
<ItemTemplate>
<asp:Literal ID="LtlPartida" runat="server" Text='<%# Eval("Partida") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Destino">
<ItemTemplate>
<asp:Literal ID="LtlDestino" runat="server" Text='<%# Eval("Destino") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Vendedor">
<ItemTemplate>
<asp:Literal ID="LtlVendedor" runat="server" Text='<%# Eval("Vendedor") %>'>
</asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Importe" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Literal ID="LtlImporte" runat="server" Text='<%# Eval("Importe", "{0:C2}") %>'>
</asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Acciones">
<ItemTemplate>
<asp:LinkButton ID="BtnEditar" runat="server" AlternateText="Editar" OnClick="EditarBoleto"
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" ToolTip="Editar" />
<asp:LinkButton ID="BtnReAgendar" runat="server" AlternateText="Editar" OnClick="CambiarBoleto"
CssClass="btn btn-circle btn-sm yellow" Text="<i class='fa fa-repeat'></i>" ToolTip="Editar" />
<asp:LinkButton ID="BtnCancelar" runat="server" AlternateText="Activar"
CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-cancel'></i>"
data-toggle="confirmation" data-popout="true" data-original-title='<%# If(Eval("Estatus").ToString = "True", "Cancelar Boleto", "Reactivar") %>'
data-btn-ok-label="si" OnClick="BtnCancelar_Click" />
<asp:LinkButton ID="BtnImprimir" runat="server" AlternateText="Viaje"
CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-print'></i>" ToolTip="Imprimir"
OnClick="ImprimirBoleto" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</ContentTemplate>
</ajax:TabPanel>
</ajax:TabContainer> </ajax:TabContainer>
<%-- Modal Editar Boleto --%> <%-- Modal Editar Boleto --%>
<asp:UpdatePanel runat="server" ID="UpModal" UpdateMode="Conditional"> <asp:UpdatePanel runat="server" ID="UpModal" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<div id="ModalEditar" class="modal ADS fade" role="dialog"> <div id="ModalEditar" class="modal ADS fade" role="dialog">
@@ -811,7 +878,7 @@
</div> </div>
<div class="row margin-bottom-5"> <div class="row margin-bottom-5">
<label class="col-md-4 bold">Sexo</label> <label class="col-md-4 bold">Sexo:</label>
<div class="col-md-8"> <div class="col-md-8">
<asp:DropDownList ID="RblSexo" CssClass="form-control input-sm select2me" runat="server" <asp:DropDownList ID="RblSexo" CssClass="form-control input-sm select2me" runat="server"
Width="100%"> Width="100%">
@@ -821,6 +888,16 @@
</div> </div>
</div> </div>
<div class="row margin-bottom-5">
<label class="col-md-4 bold">Fecha de Nacimiento:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtFechaNacimiento" runat="server" type="date" Width="100%" CssClass="form-control x"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVFechaNacimiento" runat="server" ControlToValidate="TxtFechaNacimiento"
CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha de Nacimiento''</b> es necesario, por favor ingréselo."
ValidationGroup="GrpActViaje"></asp:RequiredFieldValidator>
</div>
</div>
<div class="row margin-bottom-5"> <div class="row margin-bottom-5">
<label class="col-md-4 bold">Estatus</label> <label class="col-md-4 bold">Estatus</label>
<div class="col-md-8"> <div class="col-md-8">
@@ -1145,8 +1222,7 @@
</asp:UpdatePanel> </asp:UpdatePanel>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<asp:Button OnClick="UpdateBoleto" runat="server" CssClass="btn btn-primary" Text="Actualizar"> <asp:Button OnClick="UpdateBoleto" runat="server" CssClass="btn btn-primary" Text="Actualizar" ValidationGroup="GrpActViaje" ID="BtnActualizarViaje"></asp:Button>
</asp:Button>
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button> <button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
</div> </div>
</div> </div>

View File

@@ -1,11 +1,12 @@
Option Explicit On Option Explicit On
Option Strict On Option Strict On
Imports System.Activities.Statements
Imports System.Data Imports System.Data
Imports System.Data.SqlClient Imports System.Data.SqlClient
Imports System.IO Imports System.IO
Imports Extensiones Imports Extensiones
Imports Microsoft.Reporting.WebForms Imports Microsoft.Reporting.WebForms
Imports Modelos
Partial Class RepContratoDetalle Partial Class RepContratoDetalle
@@ -231,6 +232,18 @@ Partial Class RepContratoDetalle
End Property End Property
Private Property DTViajesPasajeros As DataTable
Get
If ViewState("DTViajesPasajeros") Is Nothing Then
ViewState("DTViajesPasajeros") = New DataTable
End If
Return CType(ViewState("DTViajesPasajeros"), DataTable)
End Get
Set(value As DataTable)
ViewState("DTViajesPasajeros") = value
End Set
End Property
#End Region #End Region
@@ -297,9 +310,34 @@ Partial Class RepContratoDetalle
DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione uno", "-1")) DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa)
DdlVendedor.DataBind()
DdlVendedor.Items.Insert(0, New ListItem("Todos", "-1"))
For i As Integer = DdlVendedor.Items.Count - 1 To 0 Step -1
If DdlVendedor.Items(i).Text = "Sin Asignar" Then
DdlVendedor.Items.RemoveAt(i)
End If
Next
If EsAgencia Then
DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor)
DdlVendedor.Enabled = False
End If
End Sub End Sub
Private Sub CargaDatos() Private Sub CargaDatos()
CargaDatosContrato()
CargaDatosViajes()
'Información General 'Información General
End Sub
Private Sub CargaDatosContrato()
Dim ObjContratos As New ClsContratos Dim ObjContratos As New ClsContratos
If ObjContratos.GetContratos(CveContrato, UsuarioActual.CveEmpresa) Then If ObjContratos.GetContratos(CveContrato, UsuarioActual.CveEmpresa) Then
Contrato = ObjContratos.DtResultados Contrato = ObjContratos.DtResultados
@@ -322,7 +360,7 @@ Partial Class RepContratoDetalle
TxtFechaSalida.Text = Contrato.Rows(0)("FechaInicial").ToString.ToDate.ToString("dd/MM/yyyy HH:mm:ss") TxtFechaSalida.Text = Contrato.Rows(0)("FechaInicial").ToString.ToDate.ToString("dd/MM/yyyy HH:mm:ss")
TxtFechaRegreso.Text = Contrato.Rows(0)("FechaFinal").ToString.ToDate.ToString("dd/MM/yyyy HH:mm:ss") TxtFechaRegreso.Text = Contrato.Rows(0)("FechaFinal").ToString.ToDate.ToString("dd/MM/yyyy HH:mm:ss")
TxtCantidadPasajeros.Text = Contrato.Rows(0)("CantidadPasajeros").ToString TxtCantidadPasajeros.Text = Contrato.Rows(0)("CantidadPasajeros").ToString
DdlTipoAF.SelectedValue = If(Contrato.Rows(0)("CveTipoAF") Is Nothing, "", Contrato.Rows(0)("CveTipoAF").ToString) DdlTipoAF.SelectedValueExist(If(Contrato.Rows(0)("CveTipoAF") Is Nothing, "", Contrato.Rows(0)("CveTipoAF").ToString))
TxtImporte.Text = Math.Round(Importe, 2).ToString TxtImporte.Text = Math.Round(Importe, 2).ToString
TxtAnticipo.Text = Math.Round(Anticipo, 2).ToString TxtAnticipo.Text = Math.Round(Anticipo, 2).ToString
CveContratoEstatus = Contrato.Rows(0)("CveContratosEstatus").ToString.ToEntero CveContratoEstatus = Contrato.Rows(0)("CveContratosEstatus").ToString.ToEntero
@@ -367,17 +405,7 @@ Partial Class RepContratoDetalle
A1.Visible = True A1.Visible = True
End If End If
'Boletos Vendidos
If Contrato.Rows(0)("CveContratoTipo").ToString() = "35" Then
TabBoletos.Visible = True
Dim ObjTransportes As New ClsTransportes
If ObjTransportes.GetViajesPasajeros(CveContrato) Then
GvViajesPasajeros.DataSource = ObjTransportes.DtResultados
BusquedaSeleccionada(ObjTransportes.DtResultados)
End If
ObjTransportes.Dispose()
GvViajesPasajeros.DataBind()
End If
''Bitácora ''Bitácora
'Dim ObjEventoBitacora As New ClsOIEventos 'Dim ObjEventoBitacora As New ClsOIEventos
'If ObjEventoBitacora.GetEventos(-1, -1, -1, "-1", "-1", -1, -1, -1, -1, -1, -1, "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveContrato:=CveContrato) Then 'If ObjEventoBitacora.GetEventos(-1, -1, -1, "-1", "-1", -1, -1, -1, -1, -1, -1, "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveContrato:=CveContrato) Then
@@ -393,10 +421,38 @@ Partial Class RepContratoDetalle
End If End If
ObjContratos.Dispose() ObjContratos.Dispose()
UpTabContainer.Update() UpTabContainer.Update()
End Sub End Sub
#End Region
Private Sub CargaDatosViajes()
'Boletos Vendidos
DTViajesPasajeros = New DataTable
If CveContratoTipo = 35 Then
TabBoletos.Visible = True
Dim ObjTransportes As New ClsTransportes
If ObjTransportes.GetViajesPasajeros(CveContrato) Then
If DdlVendedor.SelectedValue.ToEntero > 0 Then
DTViajesPasajeros = ObjTransportes.DtResultados.FiltraParametros($" CveVendedor = {DdlVendedor.SelectedValue.ToEntero} ")
Else
DTViajesPasajeros = ObjTransportes.DtResultados
End If
GvViajesPasajeros.DataSource = DTViajesPasajeros
BusquedaSeleccionada(DTViajesPasajeros)
End If
ObjTransportes.Dispose()
GvViajesPasajeros.DataBind()
End If
UpPasajeros.Update()
UpTabContainer.Update()
End Sub
#End Region
Protected Sub DdlUsuarioFiltroBoletos_SelectedIndexChanged(sender As Object, e As EventArgs)
CargaDatosViajes()
End Sub
#Region "Bitacora" #Region "Bitacora"
Protected Sub GVEventoBitacora_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEB.RowDataBound Protected Sub GVEventoBitacora_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEB.RowDataBound
@@ -715,7 +771,7 @@ Partial Class RepContratoDetalle
For Each dRow As DataRow In DTPrePoliza.Rows For Each dRow As DataRow In DTPrePoliza.Rows
If Not ObjConta.UpdatePrePolizasDetalle(dRow("CvePrePolizaDetalle").ToString.ToEntero, dRow("Concepto").ToString, dRow("CveSubProyecto").ToString.ToEntero, -1, Boolean.Parse(dRow("TipoMovto").ToString), ImporteMN:=(TotalNew * TC), Importe:=TotalNew, TipoCambio:=TC) Then If Not ObjConta.UpdatePrePolizasDetalle(dRow("CvePrePolizaDetalle").ToString.ToEntero, dRow("Concepto").ToString, dRow("CveSubProyecto").ToString.ToEntero, -1, Boolean.Parse(dRow("TipoMovto").ToString), ImporteMN:=TotalNew, Importe:=TotalNew, TipoCambio:=TC) Then
OcurrioError = True OcurrioError = True
Exit For Exit For
End If End If
@@ -848,7 +904,7 @@ Partial Class RepContratoDetalle
Try Try
ObjTransportes.IniciaTransacSQL() ObjTransportes.IniciaTransacSQL()
If ObjTransportes.UpdateViajesPasajeros(CveViajePasajero, DdlRuta.SelectedValue.ToEntero, UsuarioActual.CveVendedor, LbImporte.Text.ToDecimal, TxtAsiento.Text.ToEntero, TxtNombre.Text, TxtVisa.Text, TxtCelular.Text, TxtObservacion.Text, CBool(TxtEstatus.Text), UsuarioActual.CveUsuario, CBool(RblSexo.SelectedValue)) Then If ObjTransportes.UpdateViajesPasajeros(CveViajePasajero, DdlRuta.SelectedValue.ToEntero, UsuarioActual.CveVendedor, LbImporte.Text.ToDecimal, TxtAsiento.Text.ToEntero, TxtNombre.Text, TxtVisa.Text, TxtCelular.Text, TxtObservacion.Text, CBool(TxtEstatus.Text), UsuarioActual.CveUsuario, CBool(RblSexo.SelectedValue), FechaNacimiento:=TxtFechaNacimiento.Text.ToDate) Then
ObjTransportes.Commit() ObjTransportes.Commit()
End If End If
Catch ex As ArgumentException Catch ex As ArgumentException
@@ -863,6 +919,7 @@ Partial Class RepContratoDetalle
End Try End Try
CargaDatos() CargaDatos()
RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalEditar")) RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalEditar"))
End Sub End Sub
Protected Sub OnChangeRuta(sender As Object, e As EventArgs) Protected Sub OnChangeRuta(sender As Object, e As EventArgs)
@@ -901,53 +958,39 @@ Partial Class RepContratoDetalle
ViajeActual = dt ViajeActual = dt
End Sub End Sub
Protected Sub ImprimirBoleto(sender As Object, e As EventArgs)
Dim dtResult As New DataTable()
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
Dim Fecha As Date = GvRow.DataKey("FechaIng").ToDate
Dim Importe As Decimal = GvRow.DataKey("Importe").ToDecimal
Dim params As New List(Of ReportParameter) From {
New ReportParameter("Ruta", SubProyecto),
New ReportParameter("Origen", GvRow.DataKey("Partida")),
New ReportParameter("Destino", GvRow.DataKey("Destino")),
New ReportParameter("FechaSalida", Fecha.ToShortDateString()),
New ReportParameter("HoraSalida", Fecha.ToString("HH:mm")),
New ReportParameter("Nombre", GvRow.DataKey("Nombre")),
New ReportParameter("Visa", GvRow.DataKey("Visa")),
New ReportParameter("Celular", GvRow.DataKey("Celular")),
New ReportParameter("Importe", Math.Round(Importe, 2).ToString),
New ReportParameter("TipoBoleto", "Tipo Boleto"),
New ReportParameter("Agencia", "Agencia"),
New ReportParameter("TelefonoAgencia", "TelefonoAgencia"),
New ReportParameter("Asiento", GvRow.DataKey("Asiento"))
}
ImprimirPDFStimul($"{UsuarioActual.Empresa.Ruta}Formatos\Boleto.mrt", dtResult, params, NombreArchivo:="Boleto")
End Sub
Protected Sub GvViajesPasajeros_RowDataBound(sender As Object, e As GridViewRowEventArgs) Protected Sub GvViajesPasajeros_RowDataBound(sender As Object, e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
If EsAgencia Then If EsAgencia Then
e.Row.FCLinkButton("BtnCancelar").Visible = False e.Row.FCLinkButton("BtnCancelar").Visible = False
e.Row.FCLinkButton("BtnReAgendar").Visible = False
End If End If
Dim Liga As String = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=BOLETO&CVEVIAJEPASAJERO={0}", e.Row.DataKey("CveViajePasajero"))))
e.Row.FCLiteral("LtlImprimir").Text = $"<a class='btn btn-circle btn-sm blue' target='_blank' href='{Liga}'><i class='fa fa-print'></i></a>"
ScriptManager.GetCurrent(Me).RegisterPostBackControl(e.Row.FCLinkButton("BtnImprimir")) 'ScriptManager.GetCurrent(Me).RegisterPostBackControl(e.Row.FCLinkButton("BtnImprimir"))
End If End If
If e.Row.RowType = DataControlRowType.Footer Then
e.Row.FCLiteral("LtlImportePie").Text = DTViajesPasajeros.SUM("Importe").ToString("###,###,###.00")
End If
End Sub End Sub
Protected Sub EditarBoleto(sender As Object, e As EventArgs) Protected Sub EditarBoleto(sender As Object, e As EventArgs)
PnEditarUsuario.Visible = True PnEditarUsuario.Visible = True
PnEditarViaje.Visible = False PnEditarViaje.Visible = False
PnAsientos.Visible = False PnAsientos.Visible = False
TxtFechaNacimiento.Enabled = True
TxtNombre.Enabled = True
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
CveViajePasajero = GvRow.DataKey("CveViajePasajero").ToEntero CveViajePasajero = GvRow.DataKey("CveViajePasajero").ToEntero
DdlRuta.SelectedValue = GvRow.DataKey("CveViaje") DdlRuta.SelectedValueExist(GvRow.DataKey("CveViaje"))
LbPartida.Text = GvRow.DataKey("Partida").ToString() LbPartida.Text = GvRow.DataKey("Partida").ToString()
LbDestino.Text = GvRow.DataKey("Destino").ToString() LbDestino.Text = GvRow.DataKey("Destino").ToString()
LbImporte.Text = Convert.ToDecimal(GvRow.DataKey("Importe")).ToString("C") LbImporte.Text = Convert.ToDecimal(GvRow.DataKey("Importe")).ToString("C")
@@ -960,6 +1003,12 @@ Partial Class RepContratoDetalle
TxtEstatus.Text = GvRow.DataKey("Estatus").ToString TxtEstatus.Text = GvRow.DataKey("Estatus").ToString
LbEstatus.CssClass = If(CBool(GvRow.DataKey("Estatus").ToString), "text-success bold", "text-danger bold") LbEstatus.CssClass = If(CBool(GvRow.DataKey("Estatus").ToString), "text-success bold", "text-danger bold")
TxtAsiento.Text = GvRow.DataKey("Asiento").ToString() TxtAsiento.Text = GvRow.DataKey("Asiento").ToString()
TxtFechaNacimiento.Text = GvRow.DataKey("FechaNacimiento").ToString().ToDate.ToString("yyyy-MM-dd") 'Este es el formato que admite el control
If EsAgencia Then
TxtFechaNacimiento.Enabled = False
TxtNombre.Enabled = False
End If
UpTabContainer.Update() UpTabContainer.Update()
UpModal.Update() UpModal.Update()
@@ -985,6 +1034,7 @@ Partial Class RepContratoDetalle
LbEstatus.Text = GvRow.DataKey("Estatus").ToString() LbEstatus.Text = GvRow.DataKey("Estatus").ToString()
LbCreado.Text = GvRow.DataKey("FechaIng").ToString() LbCreado.Text = GvRow.DataKey("FechaIng").ToString()
TxtAsiento.Text = GvRow.DataKey("Asiento").ToString() TxtAsiento.Text = GvRow.DataKey("Asiento").ToString()
TxtFechaNacimiento.Text = GvRow.DataKey("FechaNacimiento").ToString().ToDate.ToString("dd/MM/yyyy")
'Seleccionamos la ruta que tiene el usuario actual 'Seleccionamos la ruta que tiene el usuario actual
DdlRuta.ClearSelection() DdlRuta.ClearSelection()
@@ -998,7 +1048,7 @@ Partial Class RepContratoDetalle
DdlRuta.Items.Add(listItem) DdlRuta.Items.Add(listItem)
Next Next
End If End If
DdlRuta.SelectedValue = GvRow.DataKey("CveViaje") DdlRuta.SelectedValueExist(GvRow.DataKey("CveViaje"))
ObjContratos.Dispose() ObjContratos.Dispose()
UpTabContainer.Update() UpTabContainer.Update()
RegistraScript(String.Format("$('#{0}').modal('show');", "ModalEditar")) RegistraScript(String.Format("$('#{0}').modal('show');", "ModalEditar"))
@@ -1185,6 +1235,83 @@ Partial Class RepContratoDetalle
End Class End Class
#End Region #End Region
Protected Sub DdlVendedor_SelectedIndexChanged(sender As Object, e As EventArgs)
CargaDatosViajes()
End Sub
#Region "IMPRESION MANIFIESTO"
'Private Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
' GeneraPDF("Excel")
' 'GvDatos.ExportToExcel("ReporteProductosServicios" & NowADS().ToShortDateString)
'End Sub
Private Sub PreparaManifiesto()
End Sub
Protected Sub GeneraPDF(Optional Formato As String = "PDF")
Dim DTManifiestoViajes As DataTable = DTViajesPasajeros.Copy
DTManifiestoViajes.Rows.Clear()
DTManifiestoViajes.Columns.Add("SexoStr")
For x = 1 To 50
Dim dRow As DataRow = DTManifiestoViajes.NewRow
Dim Encontrado As Boolean = False
For Each faRow As DataRow In DTViajesPasajeros.Rows
If faRow("Asiento").ToString.ToEntero = x Then
Encontrado = True
dRow("Asiento") = x
dRow("Nombre") = faRow("Nombre").ToString
dRow("Visa") = faRow("Visa").ToString
dRow("Celular") = faRow("Celular").ToString
dRow("SexoStr") = If(Boolean.Parse(faRow("Sexo").ToString), "Masculino", "Femenino")
dRow("Partida") = faRow("Partida").ToString
dRow("Destino") = faRow("Destino").ToString
dRow("Importe") = faRow("Importe").ToString.ToDecimal
Exit For
End If
Next
If Not Encontrado Then
dRow("Asiento") = x
End If
DTManifiestoViajes.Rows.Add(dRow)
Next
DTManifiestoViajes.TableName = "DTManifiestoViajes"
DTManifiestoViajes.AcceptChanges()
Dim DTManifiesto As DataTable = DTManifiestoViajes.FiltraParametros("", "Asiento")
DTManifiesto.TableName = "DTManifiestoViajes"
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
Dim params As New List(Of ReportParameter)()
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("Contrato", TxtFolio.Text))
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
params.Add(New ReportParameter("FechaSalida", TxtFechaSalida.Text))
ImprimirPDF("Empresas/Grales/Formatos/ManifiestoViajes.rdlc", DTManifiesto, params, "Reporte de Productos Servicios", Formato)
End Sub
Protected Sub ImgPDF_Click(sender As Object, e As EventArgs)
GeneraPDF()
End Sub
#End Region
End Class End Class

View File

@@ -349,6 +349,7 @@
<label class="col-md-4">Fecha Salida</label> <label class="col-md-4">Fecha Salida</label>
<div class="col-md-8"> <div class="col-md-8">
<div class="input-group"> <div class="input-group">
<asp:TextBox ID="TxtFechaSalida" runat="server" CssClass="form-control" CausesValidation="True" type="datetime-local" <asp:TextBox ID="TxtFechaSalida" runat="server" CssClass="form-control" CausesValidation="True" type="datetime-local"
Width="100%" Width="100%"
></asp:TextBox> ></asp:TextBox>

View File

@@ -186,19 +186,7 @@
TargetControlID="RFVTxtFechaViaje" Width="400px" BehaviorID="_content_VCETxtFechaViaje"> TargetControlID="RFVTxtFechaViaje" Width="400px" BehaviorID="_content_VCETxtFechaViaje">
</ajax:ValidatorCalloutExtender> </ajax:ValidatorCalloutExtender>
</div> </div>
</div> </div>
<div class="row my-1">
<label class="col-md-4">Tipo Unidad</label>
<div class="col-md-8">
<asp:DropDownList ID="DdlTipoAF" DataValueField="CveTipoActivoFijo"
DataTextField="TipoActivoFijo" Class="form-control input-inline"
Width="100%" runat="server" Enabled="true"
AutoPostBack="true"
OnSelectedIndexChanged="DdlTipoAF_SelectedIndexChanged">
</asp:DropDownList>
</div>
</div>
<div class="row my-1" id="DivAF" runat="server"> <div class="row my-1" id="DivAF" runat="server">
<label class="col-md-4">Unidad</label> <label class="col-md-4">Unidad</label>

View File

@@ -24,12 +24,27 @@ Partial Class ListadoViajes
ViewState("Ruta") = value ViewState("Ruta") = value
End Set End Set
End Property End Property
Private Property CveTipoActivoFijo As Integer
Get
If ViewState("CveTipoActivoFijo") Is Nothing Then
ViewState("CveTipoActivoFijo") = -1
End If
Return ViewState("CveTipoActivoFijo").ToString().ToEntero
End Get
Set(value As Integer)
ViewState("CveTipoActivoFijo") = value
End Set
End Property
#End Region #End Region
#Region "Carga Página" #Region "Carga Página"
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
If Not IsPostBack Then If Not IsPostBack Then
CveTipoActivoFijo = 181 'Autobuses
CargaDatos() CargaDatos()
InicializaCombos() InicializaCombos()
End If End If
@@ -69,6 +84,7 @@ Partial Class ListadoViajes
End If End If
ObjContratos.Dispose() ObjContratos.Dispose()
GvContratos.DataBind() GvContratos.DataBind()
UpDatos.Update()
End Sub End Sub
#End Region #End Region
@@ -94,7 +110,7 @@ Partial Class ListadoViajes
BtnGuardar.Text = "Agregar" BtnGuardar.Text = "Agregar"
ModalLabel.InnerHtml = "Agregar Nuevo Viaje" ModalLabel.InnerHtml = "Agregar Nuevo Viaje"
DdlTipoAF.SelectedValueExist(-1) 'DdlTipoAF.SelectedValueExist(-1)
DdlAF.SelectedValueExist(-1) DdlAF.SelectedValueExist(-1)
DdlChofer.SelectedValueExist(-1) DdlChofer.SelectedValueExist(-1)
DdlChofer2.SelectedValueExist(-1) DdlChofer2.SelectedValueExist(-1)
@@ -144,7 +160,7 @@ Partial Class ListadoViajes
ObjContratos.IniciaTransacSQL() ObjContratos.IniciaTransacSQL()
If Not ObjContratos.AddContratos(LbFolio.Text, "", "", UsuarioActual.CveProveedor, -1, -1, fecha, fecha, "", "", DdlRutas.SelectedValue.ToEntero, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, -1, -1, -1, If Not ObjContratos.AddContratos(LbFolio.Text, "", "", UsuarioActual.CveProveedor, -1, -1, fecha, fecha, "", "", DdlRutas.SelectedValue.ToEntero, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, -1, -1, -1,
-1, 0, CveContratoTipo:=35, CveContratosEstatus:=50, CvePartida:=DdlPartida.SelectedValue.ToEntero, CveDestino:=DdlDestino.SelectedValue.ToEntero, CveMasivo:=CveMasivo, CveVendedor:=UsuarioActual.CveVendedor, -1, 0, CveContratoTipo:=35, CveContratosEstatus:=50, CvePartida:=DdlPartida.SelectedValue.ToEntero, CveDestino:=DdlDestino.SelectedValue.ToEntero, CveMasivo:=CveMasivo, CveVendedor:=UsuarioActual.CveVendedor,
CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CveAF:=DdlAF.SelectedValue.ToEntero, CveChofer:=DdlChofer.SelectedValue.ToEntero, CveChofer2:=DdlChofer2.SelectedValue.ToEntero) > 0 Then CveTipoAF:=CveTipoActivoFijo, CveAF:=DdlAF.SelectedValue.ToEntero, CveChofer:=DdlChofer.SelectedValue.ToEntero, CveChofer2:=DdlChofer2.SelectedValue.ToEntero) > 0 Then
'ObjContratos.Commit() 'ObjContratos.Commit()
ErrorProceso = True ErrorProceso = True
Exit For Exit For
@@ -192,14 +208,14 @@ Partial Class ListadoViajes
If BtnGuardar.Text = "Agregar" Then If BtnGuardar.Text = "Agregar" Then
If Not ObjContratos.AddContratos(LbFolio.Text, "", "", UsuarioActual.CveProveedor, -1, -1, TxtFechaViaje.Text.ToDate, TxtFechaViaje.Text.ToDate, "", "", DdlRutas.SelectedValue.ToEntero, -1, -1, -1, -1, "", "", -1, If Not ObjContratos.AddContratos(LbFolio.Text, "", "", UsuarioActual.CveProveedor, -1, -1, TxtFechaViaje.Text.ToDate, TxtFechaViaje.Text.ToDate, "", "", DdlRutas.SelectedValue.ToEntero, -1, -1, -1, -1, "", "", -1,
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, 0, 0, 0, 2, 0, CveContratoTipo:=35, CveContratosEstatus:=50, CvePartida:=DdlPartida.SelectedValue.ToEntero, CveDestino:=DdlDestino.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, 0, 0, 0, 2, 0, CveContratoTipo:=35, CveContratosEstatus:=50, CvePartida:=DdlPartida.SelectedValue.ToEntero, CveDestino:=DdlDestino.SelectedValue.ToEntero,
CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CveAF:=DdlAF.SelectedValue.ToEntero, CveChofer:=DdlChofer.SelectedValue.ToEntero, CveChofer2:=DdlChofer2.SelectedValue.ToEntero) > 0 Then CveTipoAF:=CveTipoActivoFijo, CveAF:=DdlAF.SelectedValue.ToEntero, CveChofer:=DdlChofer.SelectedValue.ToEntero, CveChofer2:=DdlChofer2.SelectedValue.ToEntero) > 0 Then
ErrorProceso = True ErrorProceso = True
End If End If
Else Else
'Actualizamos Viaje 'Actualizamos Viaje
If Not ObjContratos.UpdateContratos(CveContrato.ToEntero, LbFolio.Text, "", "", UsuarioActual.CveProveedor, -1, -1, TxtFechaInicial.Text.ToDate, TxtFechaInicial.Text.ToDate, "", "", DdlRutas.SelectedValue.ToEntero, -1, -1, -1, -1, "", "", -1, If Not ObjContratos.UpdateContratos(CveContrato.ToEntero, LbFolio.Text, "", "", UsuarioActual.CveProveedor, -1, -1, TxtFechaInicial.Text.ToDate, TxtFechaInicial.Text.ToDate, "", "", DdlRutas.SelectedValue.ToEntero, -1, -1, -1, -1, "", "", -1,
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, -1, -1, -1, 2, 0, CveContratoTipo:=35, CveContratosEstatus:=50, CvePartida:=DdlPartida.SelectedValue.ToEntero, CveDestino:=DdlDestino.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, -1, -1, -1, 2, 0, CveContratoTipo:=35, CveContratosEstatus:=50, CvePartida:=DdlPartida.SelectedValue.ToEntero, CveDestino:=DdlDestino.SelectedValue.ToEntero,
CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CveAF:=DdlAF.SelectedValue.ToEntero, CveChofer:=DdlChofer.SelectedValue.ToEntero, CveChofer2:=DdlChofer2.SelectedValue.ToEntero) = True Then CveTipoAF:=CveTipoActivoFijo, CveAF:=DdlAF.SelectedValue.ToEntero, CveChofer:=DdlChofer.SelectedValue.ToEntero, CveChofer2:=DdlChofer2.SelectedValue.ToEntero) = True Then
ErrorProceso = True ErrorProceso = True
End If End If
End If End If
@@ -262,15 +278,15 @@ Partial Class ListadoViajes
Private Sub CargaUnidades() Private Sub CargaUnidades()
Dim dttipoaf As DataTable = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa).FiltraParametros("MedidaVehicularClave IN (2,3)") 'Dim dttipoaf As DataTable = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa).FiltraParametros("MedidaVehicularClave IN (2,3)")
DdlTipoAF.DataSource = dttipoaf 'DdlTipoAF.DataSource = dttipoaf
DdlTipoAF.DataBind() 'DdlTipoAF.DataBind()
DdlTipoAF.Items.Insert(0, New ListItem("-", "-1")) 'DdlTipoAF.Items.Insert(0, New ListItem("-", "-1"))
DdlAF.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa).FiltraParametros($" EstadoActivoFijo= 'Activo' AND CveTipoActivoFijo = {CveTipoActivoFijo}")
DdlAF.DataBind()
DdlAF.Items.Insert(0, New ListItem("-", "-1"))
'DdlAF.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa).FiltraParametros(" EstadoActivoFijo= 'Activo' ")
'DdlAF.DataBind()
'DdlAF.Items.Insert(0, New ListItem("-", "-1"))
'UpDatos.Update()
UpModal.Update() UpModal.Update()
End Sub End Sub
Private Sub CargaChoferes() Private Sub CargaChoferes()
@@ -299,50 +315,5 @@ Partial Class ListadoViajes
End Sub End Sub
Protected Sub DdlTipoAF_SelectedIndexChanged(sender As Object, e As EventArgs)
'Dim FechaInicio As Date = TxtFechaViaje.Text.ToDate
'If FechaInicio <= MinFecha Then
' Alert("Debe seleccionar Fecha de viaje.", TipoMensaje.MsgAdvertencia)
' DdlTipoAF.SelectedValueExist(-1)
' UpModal.Update()
' Exit Sub
'End If
CargaAFDdl(DdlTipoAF.SelectedValue.ToEntero)
End Sub
'FIXME OIC REVISAR SI SE VA USAR
Private Sub CargaAFDdl(CveTipoAF As Integer)
'Lista de Activos fijos
'DdlAF.ClearSelection()
'DdlAF.SelectedValue = Nothing
'DdlAF.Items.Clear()
'Dim FechaInicio As Date = TxtFechaViaje.Text.ToDate
'Dim FinDeAnio As Date = New Date(FechaInicio.Year, 12, 31)
'Dim ObjContratos As New ClsContratos
'If ObjContratos.GetContratosValUnidadesAgendadas(DdlAF.SelectedValue.ToEntero, TxtFechaViaje.Text.ToDate, FinDeAnio, UsuarioActual.CveEmpresa, -1, 2) Then
' If CveTipoAF > 0 Then
' DdlAF.DataSource = ObjContratos.DtResultados.FiltraParametros($" CveTipoActivoFijo = {CveTipoAF} ")
' Else
' DdlAF.DataSource = ObjContratos.DtResultados
' End If
'End If
'ObjContratos.Dispose()
'Lista de Activos fijos
DdlAF.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa).FiltraParametros($" EstadoActivoFijo= 'Activo' AND CveTipoActivoFijo = {CveTipoAF} ")
DdlAF.DataBind()
DdlAF.Items.Insert(0, New ListItem("-", "-1"))
UpModal.Update()
End Sub
End Class End Class

View File

@@ -90,7 +90,7 @@
<asp:DropDownList ID="DDlClasificacion" runat="server" Width="100%" CssClass="select2me" OnSelectedIndexChanged="DDlClasificacion_SelectedIndexChanged" AutoPostBack="True" DataValueField="CveClasificacion" DataTextField="Clasificacion"></asp:DropDownList> <asp:DropDownList ID="DDlClasificacion" runat="server" Width="100%" CssClass="select2me" OnSelectedIndexChanged="DDlClasificacion_SelectedIndexChanged" AutoPostBack="True" DataValueField="CveClasificacion" DataTextField="Clasificacion"></asp:DropDownList>
</div> </div>
<label class="col-md-1 v-center truncate" style="width: 90px;">PS:</label> <label class="col-md-1 v-center truncate" style="width: 90px;">Prod/Serv:</label>
<div class="col-md-2 v-center"> <div class="col-md-2 v-center">
<ADS:Dropdownlost ID="DDlPs" AutoPostBack="false" runat="server" DataTextField="PSCodigo" DataValueField="CvePS" CssClassDdl="select2me" CssStyle="width:250px;"></ADS:Dropdownlost> <ADS:Dropdownlost ID="DDlPs" AutoPostBack="false" runat="server" DataTextField="PSCodigo" DataValueField="CvePS" CssClassDdl="select2me" CssStyle="width:250px;"></ADS:Dropdownlost>
</div> </div>
@@ -106,7 +106,7 @@
</div> </div>
</div> </div>
<div class="portlet-body"> <div class="portlet-body">
<div class="row v-center" style="height: 32px;"> <div class="row" style="height: 32px;">
<label class="col-md-1 v-center truncate" style="width: 90px;">Estado:</label> <label class="col-md-1 v-center truncate" style="width: 90px;">Estado:</label>
<div class="col-md-2 v-center"> <div class="col-md-2 v-center">
<asp:DropDownList ID="DdlEstado" runat="server" Width="100%" CssClass="select2me"> <asp:DropDownList ID="DdlEstado" runat="server" Width="100%" CssClass="select2me">
@@ -129,6 +129,20 @@
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlProveedor" Width="100%" data-metodo="getproveedores" runat="server" DataTextField="RazonSocial" DataValueField="CveProveedor" CssStyle="width: 100%;"></ADS:Dropdownlost> <ADS:Dropdownlost CssClassDdl="select2me" ID="DdlProveedor" Width="100%" data-metodo="getproveedores" runat="server" DataTextField="RazonSocial" DataValueField="CveProveedor" CssStyle="width: 100%;"></ADS:Dropdownlost>
</div> </div>
</div> </div>
<div class="row">
<div class="col-md-12">
</div>
</div>
<div class="row" runat="server" visible="false" id="DVFiltroCodigo">
<label id="Label1" class="col-md-1 v-center truncate" style="width: 90px;">Código Inicio:</label>
<div class="col-md-2">
<asp:TextBox runat="server" ID="TxtCodigoInicio" Height="26px" Width="85px"></asp:TextBox>
</div>
<div class="col-md-1" style="max-width: 80px;">Código Fin:</div>
<div class="col-md-2">
<asp:TextBox runat="server" ID="TxtCodigoFinal" Height="26px" Width="85px"></asp:TextBox>
</div>
</div>
</div> </div>
</div> </div>
</ContentTemplate> </ContentTemplate>
@@ -151,7 +165,7 @@
<a href="javascript:;" class="collapse"></a> <a href="javascript:;" class="collapse"></a>
</div> </div>
</div> </div>
<div class="portlet-body rowpadding"> <div class="portlet-body">
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<asp:RadioButtonList AutoPostBack="true" OnSelectedIndexChanged="RblTipo_SelectedIndexChanged" RepeatDirection="Horizontal" ID="RblTipo" runat="server"> <asp:RadioButtonList AutoPostBack="true" OnSelectedIndexChanged="RblTipo_SelectedIndexChanged" RepeatDirection="Horizontal" ID="RblTipo" runat="server">
@@ -186,16 +200,19 @@
<a class="btn btn-default" onclick="CambiaPrecio();">Aplicar Precio Min.</a> <a class="btn btn-default" onclick="CambiaPrecio();">Aplicar Precio Min.</a>
</div> </div>
</div> </div>
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright" style="width: 50%"> <div class="form-group form-md-line-input input-iconright" >
<asp:TextBox ID="TxtPorcentaje" runat="server" CssClass="form-control" CausesValidation="true"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FTBSerie" runat="server" TargetControlID="TxtPorcentaje" FilterType="Numbers, Custom" ValidChars=".,-" /> <asp:TextBox ID="TxtPorcentaje" runat="server" CssClass="form-control" CausesValidation="true"></asp:TextBox>
<label for="<%= TxtPorcentaje.ClientID.ToString()%>">Porcentaje Nuevo:</label> <ajax:FilteredTextBoxExtender ID="FTBSerie" runat="server" TargetControlID="TxtPorcentaje" FilterType="Numbers, Custom" ValidChars=".,-" />
</div> <label for="<%= TxtPorcentaje.ClientID.ToString()%>">Porcentaje Nuevo:</label>
<div class="text-right"> </div>
<asp:LinkButton ID="BtnGuardar" runat="server" AlternateText="Actualizar" CausesValidation="True" CssClass="btn btn-primary" Text="Actualizar Seleccionadas" ValidationGroup="GrpGuardar" /> </div>
</div> <div class="col-md-6 text-right">
<asp:LinkButton ID="BtnGuardar" runat="server" AlternateText="Actualizar" CausesValidation="True" CssClass="btn btn-primary" Text="Actualizar Seleccionadas" ValidationGroup="GrpGuardar" />
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
@@ -213,7 +230,7 @@
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" AutoGenerateColumns="False" data-sort="true" EmptyDataText="No se encontraron registros" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" AutoGenerateColumns="False" data-sort="true" EmptyDataText="No se encontraron registros"
OnRowDataBound="GVPrecios_RowDataBound" > OnRowDataBound="GVPrecios_RowDataBound" >
<Columns> <Columns>
<asp:TemplateField ItemStyle-HorizontalAlign="center" ItemStyle-Width="5%"> <asp:TemplateField ItemStyle-HorizontalAlign="center" ItemStyle-Width="35px">
<ItemTemplate> <ItemTemplate>
<asp:CheckBox runat="server" ID="chkPS" /> <asp:CheckBox runat="server" ID="chkPS" />
</ItemTemplate> </ItemTemplate>
@@ -221,7 +238,7 @@
<asp:BoundField DataField="Codigo" ItemStyle-Width="5%" HeaderText="Código" /> <asp:BoundField DataField="Codigo" ItemStyle-Width="5%" HeaderText="Código" />
<asp:TemplateField ItemStyle-Width="5%" Visible="false" > <asp:TemplateField ItemStyle-Width="5%" Visible="false" >
<HeaderTemplate> <HeaderTemplate>
<asp:Literal ID="LtlNumeroParte" runat="server" Text='<%# If(UsuarioActual.Empresa.Funcionalidad(531) = "1", "Código CPK", "Numero de parte") %>'></asp:Literal> <asp:Literal ID="LtlNumeroParte" runat="server" Text='<%# If(UsuarioActual.Empresa.Funcionalidad(531) = "1", "Código CPK", "Número parte") %>'></asp:Literal>
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="LtlNumeroParte" runat="server" Text='<%# Eval("NumeroParte", "{0}")%>'></asp:Literal> <asp:Literal ID="LtlNumeroParte" runat="server" Text='<%# Eval("NumeroParte", "{0}")%>'></asp:Literal>
@@ -229,42 +246,36 @@
</asp:TemplateField> </asp:TemplateField>
<asp:BoundField DataField="PS" HeaderText="Producto/Servicio" /> <asp:BoundField DataField="PS" HeaderText="Producto/Servicio" />
<asp:BoundField DataField="Clasificacion" ItemStyle-Width="15%" HeaderText="Clasificación" /> <asp:BoundField DataField="Clasificacion" ItemStyle-Width="15%" HeaderText="Clasificación" />
<asp:BoundField DataField="PrecioLista" NullDisplayText="N/A" ItemStyle-Width="10%" HeaderText="Importe" DataFormatString="$ {0:N2}" ItemStyle-HorizontalAlign="right" /> <asp:TemplateField HeaderText="Importe" ItemStyle-HorizontalAlign="Right" >
<asp:TemplateField HeaderText="">
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtPrecio" runat="server" Text='<%# Eval("PrecioLista", "{0:0.######}")%>' CssClass="CssCamviaPrecio" MaxLength="39" Width="90px" onkeypress="return onlyNumberKey(event)"></asp:TextBox> <asp:TextBox ID="TxtPrecio" runat="server" Text='<%# Eval("PrecioLista", "{0:0.00####}")%>' style="text-align:right;" CssClass="CssCamviaPrecio" MaxLength="39" Width="90px" onkeypress="return onlyNumberKey(event)"></asp:TextBox>
<%--<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtPrecio" FilterType="Numbers,Custom" ValidChars="." /> <br />
<asp:RegularExpressionValidator ID="REVTxtPrecio" runat="server" ControlToValidate="TxtPrecio" Display="None" EnableClientScript="True" ErrorMessage="El campo <b>''PrecioLista''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." ValidationGroup="GrpGuardar" ValidationExpression="^[0-9]{1,15}(?:\.[0-9]{1,4})?$" /> <asp:Label ID="LtlPrecio" runat="server" Text='<%# Eval("PrecioLista", "$ {0:#,##0.00####}")%>' Font-Italic="true" Font-Size="8pt" ></asp:Label>
<ajax:ValidatorCalloutExtender ID="VCPrecio" runat="server" HighlightCssClass="vco" TargetControlID="REVTxtPrecio" Width="300px"></ajax:ValidatorCalloutExtender>--%>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Precio Mínimo" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right"> <asp:TemplateField HeaderText="Precio Mínimo" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right" Visible="false">
<ItemTemplate>
<asp:LinkButton ID="LnkPrecioMinActual" OnClick="LnkPrecioMinActual_Click" runat="server" Text='<%# If(Eval("PrecioMinimo").ToString.Length = 0, "N/A", Eval("PrecioMinimo", "{0:N2}")) %>'></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="">
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtPrecioMinimo" runat="server" Text='<%# Eval("PrecioMinimo", "{0:0.######}")%>' CssClass="CssCamviaPrecio" MaxLength="39" Width="60px" onkeypress="return onlyNumberKey(event)"></asp:TextBox> <asp:TextBox ID="TxtPrecioMinimo" runat="server" Text='<%# Eval("PrecioMinimo", "{0:0.######}")%>' CssClass="CssCamviaPrecio" MaxLength="39" Width="60px" onkeypress="return onlyNumberKey(event)"></asp:TextBox>
<br />
<asp:LinkButton ID="LnkPrecioMinActual" OnClick="LnkPrecioMinActual_Click" runat="server" Text='<%# If(Eval("PrecioMinimo").ToString.Length = 0, "N/A", Eval("PrecioMinimo", "{0:N2}")) %>' Font-Italic="true" Font-Size="8pt"></asp:LinkButton>
<%-- <ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtPrecioMinimo" FilterType="Numbers,Custom" ValidChars="." /> <%-- <ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtPrecioMinimo" FilterType="Numbers,Custom" ValidChars="." />
<asp:RegularExpressionValidator ID="REVTxtPrecioMinimo" runat="server" ControlToValidate="TxtPrecioMinimo" Display="None" EnableClientScript="True" ErrorMessage="El campo <b>''PrecioLista''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." ValidationGroup="GrpGuardar" ValidationExpression="^[0-9]{1,15}(?:\.[0-9]{1,4})?$" /> <asp:RegularExpressionValidator ID="REVTxtPrecioMinimo" runat="server" ControlToValidate="TxtPrecioMinimo" Display="None" EnableClientScript="True" ErrorMessage="El campo <b>''PrecioLista''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." ValidationGroup="GrpGuardar" ValidationExpression="^[0-9]{1,15}(?:\.[0-9]{1,4})?$" />
<ajax:ValidatorCalloutExtender ID="VCTxtPrecioMinimo" runat="server" HighlightCssClass="vco" TargetControlID="REVTxtPrecioMinimo" Width="300px"></ajax:ValidatorCalloutExtender>--%> <ajax:ValidatorCalloutExtender ID="VCTxtPrecioMinimo" runat="server" HighlightCssClass="vco" TargetControlID="REVTxtPrecioMinimo" Width="300px"></ajax:ValidatorCalloutExtender>--%>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:BoundField DataField="UltimoCosto" ItemStyle-Width="5%" HeaderText="Ult.Costo" DataFormatString="{0:#,##0.00}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField DataField="CostoPromedio" ItemStyle-Width="5%" HeaderText="Costo Prom." DataFormatString="{0:#,##0.00}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField DataField="UnidadMedida" NullDisplayText="N/A" ItemStyle-Width="2.5%" HeaderText="U.M." />
<asp:BoundField DataField="Moneda" NullDisplayText="N/A" ItemStyle-Width="2.5%" HeaderText="Moneda" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="VentaMinima" NullDisplayText="N/A" ItemStyle-Width="10%" HeaderText="E. Mínimo" ItemStyle-HorizontalAlign="right" Visible="false" />
<asp:BoundField DataField="UnidadMedida" NullDisplayText="N/A" ItemStyle-Width="10%" HeaderText="U.M." /> <asp:BoundField DataField="ImporteAnterior" NullDisplayText="N/A" ItemStyle-Width="5%" HeaderText="Imp. Anterior" DataFormatString="$ {0:N2}" ItemStyle-HorizontalAlign="right" />
<asp:BoundField DataField="Moneda" NullDisplayText="N/A" ItemStyle-Width="10%" HeaderText="Moneda" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField DataField="PrecioMinimoAnterior" NullDisplayText="N/A" ItemStyle-Width="5%" HeaderText="Precio Mínimo Anterior" DataFormatString="$ {0:N2}" ItemStyle-HorizontalAlign="right" Visible="false" />
<asp:BoundField DataField="CostoPromedio" NullDisplayText="-" ItemStyle-Width="5%" DataFormatString="{0:N2}" Visible="false" HeaderText="C. Promedio" ItemStyle-HorizontalAlign="right" />
<asp:BoundField DataField="VentaMinima" NullDisplayText="N/A" ItemStyle-Width="10%" HeaderText="E. Mínimo" ItemStyle-HorizontalAlign="right" />
<asp:BoundField DataField="ImporteAnterior" NullDisplayText="N/A" ItemStyle-Width="10%" HeaderText="Importe Anterior" DataFormatString="$ {0:N2}" ItemStyle-HorizontalAlign="right" />
<asp:BoundField DataField="PrecioMinimoAnterior" NullDisplayText="N/A" ItemStyle-Width="10%" HeaderText="Precio Mínimo Anterior" DataFormatString="$ {0:N2}" ItemStyle-HorizontalAlign="right" />
<asp:BoundField DataField="FechaModificacion" DataFormatString="{0:dd/MM/yyyy hh:mm:ss}" ItemStyle-Width="10%" HeaderText="Fecha Modificación" /> <asp:BoundField DataField="FechaModificacion" DataFormatString="{0:dd/MM/yyyy hh:mm:ss}" ItemStyle-Width="10%" HeaderText="Fecha Modificación" />
<asp:BoundField DataField="UsuarioModifico" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="10%" HeaderText="Usuario Modificó" /> <asp:BoundField DataField="UsuarioModifico" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="10%" HeaderText="Usuario Modificó" Visible="false" />
<asp:BoundField DataField="Porcentaje" NullDisplayText="N/A" ItemStyle-Width="10%" DataFormatString="%{0}" HeaderText="Porcentaje" ItemStyle-HorizontalAlign="right" /> <asp:BoundField DataField="Porcentaje" NullDisplayText="N/A" ItemStyle-Width="10%" DataFormatString="%{0}" HeaderText="Porcentaje" ItemStyle-HorizontalAlign="right" Visible="false" />
<asp:BoundField DataField="FechaIng" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="10%" HeaderText="Fecha Ingreso" /> <asp:BoundField DataField="FechaIng" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="10%" HeaderText="Fecha Ingreso" Visible="false" />
<asp:BoundField DataField="Usuario" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="10%" HeaderText="Usuario Ingresó" /> <asp:BoundField DataField="Usuario" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="10%" HeaderText="Usuario Ingresó" Visible="false" />
</Columns> </Columns>
</asp:GridView> </asp:GridView>
@@ -616,6 +627,8 @@
<asp:TextBox ID="TxtPrecio_40" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox> <asp:TextBox ID="TxtPrecio_40" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:BoundField DataField="UltimoCosto" ItemStyle-Width="75px" HeaderText="Ult.Costo" DataFormatString="{0:#,##0.00}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField DataField="CostoPromedio" ItemStyle-Width="75px" HeaderText="Costo Prom." DataFormatString="{0:#,##0.00}" ItemStyle-HorizontalAlign="Right"/>
</Columns> </Columns>
</asp:GridView> </asp:GridView>
</div> </div>

View File

@@ -114,6 +114,11 @@ Partial Class Ventas_ActualizarPrecios
PermisoEdicionLista = False PermisoEdicionLista = False
DivActualizarPrecio.Visible = False DivActualizarPrecio.Visible = False
HlAgregarExcel.Visible = False HlAgregarExcel.Visible = False
End If
If UsuarioActual.Empresa.Funcionalidad(382) = "1" OrElse UsuarioActual.Empresa.Funcionalidad(109) = "1" Then 'Empresa gdiaz
GVPrecios.Columns(2).Visible = True
DVFiltroCodigo.Visible = True
End If End If
CargaCombos() CargaCombos()
@@ -202,12 +207,9 @@ Partial Class Ventas_ActualizarPrecios
End If End If
End Sub End Sub
Protected Sub CargarMarcas() Protected Sub CargarMarcas()
If UsuarioActual.Empresa.Funcionalidad(130) = "1" Then If UsuarioActual.Empresa.Funcionalidad(130) = "1" Then
Dim ObjMarcas As New ClsProductosServicios
If ObjMarcas.GetMarcas(UsuarioActual.CveEmpresa) Then DdlMarca.DataSource = GlobalDTGralMarcas(UsuarioActual.CveEmpresa)
DdlMarca.DataSource = ObjMarcas.DtResultados.Copy
End If
ObjMarcas.Dispose()
DdlMarca.DataBind() DdlMarca.DataBind()
LblMarca.Visible = True LblMarca.Visible = True
@@ -248,16 +250,27 @@ Partial Class Ventas_ActualizarPrecios
If DdlModalidad.SelectedValue = "1" Then If DdlModalidad.SelectedValue = "1" Then
Dim objPS As New ClsProductosServicios Dim objPS As New ClsProductosServicios
If objPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, DdlPrecioLista.SelectedValue.ToEntero, DDlClasificacion.SelectedValue.ToEntero, CvePS, If objPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, DdlPrecioLista.SelectedValue.ToEntero, DDlClasificacion.SelectedValue.ToEntero, CvePS,
CveProveedor:=CveProveedor, Estado:=DdlEstado.SelectedValue.ToEntero, Marcas:=Marcas, CveModelo:=DdlModelo.SelectedValue.ToEntero) Then CveProveedor:=CveProveedor, Estado:=DdlEstado.SelectedValue.ToEntero, Marcas:=Marcas, CveModelo:=DdlModelo.SelectedValue.ToEntero,
CodigoInicial:=TxtCodigoInicio.Text.Trim, CodigoFinal:=TxtCodigoFinal.Text.Trim) Then
DtDatosPrecios = objPS.DtResultados DtDatosPrecios = objPS.DtResultados
GVPrecios.DataSource = DtDatosPrecios GVPrecios.DataSource = DtDatosPrecios
End If End If
objPS.Dispose() objPS.Dispose()
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then 'Empresa Acumuladores If UsuarioActual.Empresa.Funcionalidad(531) = "1" Or UsuarioActual.Empresa.Funcionalidad(382) = "1" Then 'Empresa Acumuladores
GVPrecios.Columns(2).Visible = True GVPrecios.Columns(2).Visible = True
End If End If
If UsuarioActual.CveEmpresa = 119 Then 'JAM
GVPrecios.Columns(6).Visible = True
GVPrecios.Columns(7).Visible = False 'ult costo
GVPrecios.Columns(11).Visible = True
GVPrecios.Columns(13).Visible = True
GVPrecios.Columns(15).Visible = True
GVPrecios.Columns(16).Visible = True
GVPrecios.Columns(17).Visible = True
End If
If UsuarioActual.CveEmpresa = 153 Then 'Empresa servec If UsuarioActual.CveEmpresa = 153 Then 'Empresa servec
GVPrecios.Columns(11).Visible = True GVPrecios.Columns(11).Visible = True
End If End If
@@ -281,7 +294,8 @@ Partial Class Ventas_ActualizarPrecios
Dim objPS As New ClsProductosServicios Dim objPS As New ClsProductosServicios
If objPS.GetPSMultiplesPreciosLista(UsuarioActual.CveEmpresa, ListasPrecios:=ListasPrecios, CveClasificacion:=DDlClasificacion.SelectedValue.ToEntero, CvePS:=CvePS, If objPS.GetPSMultiplesPreciosLista(UsuarioActual.CveEmpresa, ListasPrecios:=ListasPrecios, CveClasificacion:=DDlClasificacion.SelectedValue.ToEntero, CvePS:=CvePS,
CveProveedor:=CveProveedor, Estado:=DdlEstado.SelectedValue.ToEntero, Marcas:=Marcas, CveModelo:=DdlModelo.SelectedValue.ToEntero) Then CveProveedor:=CveProveedor, Estado:=DdlEstado.SelectedValue.ToEntero, Marcas:=Marcas, CveModelo:=DdlModelo.SelectedValue.ToEntero,
CodigoInicial:=TxtCodigoInicio.Text.Trim, CodigoFinal:=TxtCodigoFinal.Text.Trim) Then
DtPreciosMultiple = objPS.DtResultados.Copy() DtPreciosMultiple = objPS.DtResultados.Copy()
GvMultiple.DataSource = DtPreciosMultiple GvMultiple.DataSource = DtPreciosMultiple
End If End If
@@ -291,17 +305,15 @@ Partial Class Ventas_ActualizarPrecios
dvMultiple.Visible = True dvMultiple.Visible = True
DivActualizarPrecio.Visible = False DivActualizarPrecio.Visible = False
For colIndex As Integer = 2 To GvMultiple.Columns.Count - 1 For colIndex As Integer = 2 To GvMultiple.Columns.Count - 3
If colIndex <= DtPreciosMultiple.Columns.Count - 1 Then If colIndex <= DtPreciosMultiple.Columns.Count - 3 Then
GvMultiple.Columns(colIndex).Visible = True GvMultiple.Columns(colIndex).Visible = True
Else Else
GvMultiple.Columns(colIndex).Visible = False GvMultiple.Columns(colIndex).Visible = False
End If End If
Next Next
GvMultiple.DataBind() GvMultiple.DataBind()
End If End If
UpDescargar.Update() UpDescargar.Update()
UpDatos.Update() UpDatos.Update()
@@ -341,7 +353,6 @@ Partial Class Ventas_ActualizarPrecios
sbProductos.AppendFormat("{0},", row.DataKey("CvePS").ToEntero) sbProductos.AppendFormat("{0},", row.DataKey("CvePS").ToEntero)
End If End If
If Not TieneError Then If Not TieneError Then
TieneError = ActualizarPreciosFranquicia(ObjPS, row.DataKey("Codigo"), row.FCTextBox("TxtPrecio").Text.ToDecimal, row.FCTextBox("TxtPrecioMinimo").Text.ToDecimal, DdlPrecioLista.SelectedItem.Text) TieneError = ActualizarPreciosFranquicia(ObjPS, row.DataKey("Codigo"), row.FCTextBox("TxtPrecio").Text.ToDecimal, row.FCTextBox("TxtPrecioMinimo").Text.ToDecimal, DdlPrecioLista.SelectedItem.Text)
Else Else
@@ -948,7 +959,7 @@ Partial Class Ventas_ActualizarPrecios
If Dr IsNot Nothing Then If Dr IsNot Nothing Then
'VERIFICA QUE EL INDICE DE LA COLUMNA DEL DT NO SEA MAYOR A LA DEL GRIDVIEW 'VERIFICA QUE EL INDICE DE LA COLUMNA DEL DT NO SEA MAYOR A LA DEL GRIDVIEW
If indiceColumna <= DtPreciosMultiple.Columns.Count - 1 Then If indiceColumna <= DtPreciosMultiple.Columns.Count - 3 Then
Dim Valor As Decimal = DtPreciosMultiple.Rows(e.Row.RowIndex)(indiceColumna).ToString().ToDecimal() Dim Valor As Decimal = DtPreciosMultiple.Rows(e.Row.RowIndex)(indiceColumna).ToString().ToDecimal()
e.Row.FCTextBox(TxtId).Text = Valor.FormatoNumero(2) e.Row.FCTextBox(TxtId).Text = Valor.FormatoNumero(2)

View File

@@ -0,0 +1,896 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="ActualizarPrecios.aspx.vb" Inherits="Ventas_ActualizarPrecios" EnableEventValidation="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style>
.v-center {
display: flex;
align-items: center;
}
.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>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
Actualizar Precios
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<li>
<asp:HyperLink ID="HlAgregarExcel" NavigateUrl="#" Visible="True" data-toggle="modal" data-target="#DivCargaExcel" runat="server"><i class='fa fa-server'></i> Importar Listado</asp:HyperLink>
</li>
<asp:UpdatePanel ID="UpExportarExcel" runat="server">
<ContentTemplate>
<li>
<asp:LinkButton ID="LnkExportarExcel" Text="" runat="server" OnClick="LnkExportarExcel_Click"> <i class='fa fa-file-excel-o'></i> Exportar Excel</asp:LinkButton>
</li>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LnkExportarExcel" />
</Triggers>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel runat="server" ID="UpEncabezado" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
<div class="portlet-title portlet-filterT smalltitle">
<div class="tools">
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" OnClick="BtnConsultar_Click" ValidationGroup="GrpConsultar" />
<a href="javascript:;" class="expand"></a>
</div>
<div class="titlefiltros caption ">
<div class="row v-center" style="height: 32px;">
<label class="col-md-1 v-center truncate" style="width: 90px;">Precio de Lista:</label>
<div class="col-md-2 v-center" id="DivPrecioLista" runat="server">
<asp:DropDownList ID="DdlPrecioLista" runat="server" AppendDataBoundItems="true" Width="100%" CssClass="select2me" DataValueField="CvePrecioLista" DataTextField="PrecioLista"></asp:DropDownList>
</div>
<div class="col-md-2 v-center" id="DivMultiplePrecioLista" runat="server" visible="false">
<asp:ListBox ID="DdlMultiplePrecioLista" runat="server" DataTextField="PrecioLista" DataValueField="CvePrecioLista" data-text="Todos" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" Style="width: 100%;"></asp:ListBox>
</div>
<label class="col-md-1 v-center truncate" style="width: 90px;">Clasificación:</label>
<div class="col-md-2 v-center">
<asp:DropDownList ID="DDlClasificacion" runat="server" Width="100%" CssClass="select2me" OnSelectedIndexChanged="DDlClasificacion_SelectedIndexChanged" AutoPostBack="True" DataValueField="CveClasificacion" DataTextField="Clasificacion"></asp:DropDownList>
</div>
<label class="col-md-1 v-center truncate" style="width: 90px;">PS:</label>
<div class="col-md-2 v-center">
<ADS:Dropdownlost ID="DDlPs" AutoPostBack="false" runat="server" DataTextField="PSCodigo" DataValueField="CvePS" CssClassDdl="select2me" CssStyle="width:250px;"></ADS:Dropdownlost>
</div>
<label class="col-md-1 v-center truncate" runat="server" id="LblModalidad" visible="false" style="width: 80px;">Modalidad:</label>
<div class="col-md-2 v-center" runat="server" id="DivModalidad" visible="false">
<asp:DropDownList ID="DdlModalidad" runat="server" AppendDataBoundItems="true" Width="100%" CssClass="select2me" AutoPostBack="true" OnSelectedIndexChanged="DdlModalidad_SelectedIndexChanged">
<asp:ListItem Selected="True" Value="1" Text="lista de precio"></asp:ListItem>
<asp:ListItem Value="2" Text="múltiples listas de precio"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>
</div>
<div class="portlet-body">
<div class="row v-center" style="height: 32px;">
<label class="col-md-1 v-center truncate" style="width: 90px;">Estado:</label>
<div class="col-md-2 v-center">
<asp:DropDownList ID="DdlEstado" runat="server" Width="100%" CssClass="select2me">
<asp:ListItem Value="-1">Todos</asp:ListItem>
<asp:ListItem Value="1" Selected="True">Activos</asp:ListItem>
<asp:ListItem Value="0">Incativos</asp:ListItem>
</asp:DropDownList>
</div>
<label id="LblMarca" runat="server" visible="false" class="col-md-1 v-center truncate" style="width: 90px;">Marca:</label>
<div class="col-md-2 v-center" id="DivMarca" runat="server" visible="false">
<asp:ListBox ID="DdlMarca" runat="server" DataTextField="Marca" DataValueField="CveMarca" data-text="Todos" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" Style="width: 100%;"></asp:ListBox>
</div>
<label id="lblModelo" runat="server" class="col-md-1 v-center truncate" visible="false" style="width: 90px;">Modelo:</label>
<div class="col-md-2 v-center" id="DivModelo" runat="server" visible="false">
<asp:DropDownList ID="DdlModelo" runat="server" Width="100%" CssClass="select2me" DataTextField="Modelo" DataValueField="CveModelo">
</asp:DropDownList>
</div>
<label class="col-md-1 v-center" id="LblProveedorCompra" runat="server" visible="false" style="width: 90px;">Proveedor:</label>
<div class="col-md-2 v-center" id="DivProveedorCompra" runat="server" visible="false">
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlProveedor" Width="100%" data-metodo="getproveedores" runat="server" DataTextField="RazonSocial" DataValueField="CveProveedor" CssStyle="width: 100%;"></ADS:Dropdownlost>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel runat="server" UpdateMode="conditional" ID="UPPrecioLista">
<ContentTemplate>
<div class="row" id="DivActualizarPrecio" runat="server">
<div class="col-md-6">
<div class="portlet light smmallpadding traspasorow bordered xspadding">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">Actualizar Precio de Lista</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
<div class="tools">
<a href="javascript:;" class="collapse"></a>
</div>
</div>
<div class="portlet-body rowpadding">
<div class="row">
<div class="col-md-12">
<asp:RadioButtonList AutoPostBack="true" OnSelectedIndexChanged="RblTipo_SelectedIndexChanged" RepeatDirection="Horizontal" ID="RblTipo" runat="server">
<asp:ListItem Selected="true" Value="Imp" Text="Importe Fijo" />
<asp:ListItem Value="Por" Text="Porcentaje" />
</asp:RadioButtonList>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div runat="Server" id="ImporteFijo" class="form-group form-md-line-input input-iconright" style="width: 50%">
<asp:TextBox ID="TxtImporte" runat="server" CssClass="form-control" CausesValidation="true"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" TargetControlID="TxtImporte" FilterType="Numbers, Custom" ValidChars="." />
<label for="<%= TxtImporte.ClientID.ToString()%>">Importe Nuevo:</label>
<i>$</i>
</div>
</div>
<div class="col-md-1">
<a class="btn btn-default" onclick="CambiaImporte();">Aplicar Importe</a>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div runat="Server" id="Div1" class="form-group form-md-line-input input-iconright" style="width: 50%">
<asp:TextBox ID="TxtPrecio" runat="server" CssClass="form-control" CausesValidation="true"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender2" runat="server" TargetControlID="TxtPrecio" FilterType="Numbers, Custom" ValidChars="." />
<label for="<%= TxtPrecio.ClientID.ToString()%>">Precio Min.:</label>
<i>$</i>
</div>
</div>
<div class="col-md-1">
<a class="btn btn-default" onclick="CambiaPrecio();">Aplicar Precio Min.</a>
</div>
</div>
<div class="form-group form-md-line-input input-iconright" style="width: 50%">
<asp:TextBox ID="TxtPorcentaje" runat="server" CssClass="form-control" CausesValidation="true"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FTBSerie" runat="server" TargetControlID="TxtPorcentaje" FilterType="Numbers, Custom" ValidChars=".,-" />
<label for="<%= TxtPorcentaje.ClientID.ToString()%>">Porcentaje Nuevo:</label>
</div>
<div class="text-right">
<asp:LinkButton ID="BtnGuardar" runat="server" AlternateText="Actualizar" CausesValidation="True" CssClass="btn btn-primary" Text="Actualizar Seleccionadas" ValidationGroup="GrpGuardar" />
</div>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel runat="server" ID="UpDatos" UpdateMode="Conditional">
<ContentTemplate>
<div runat="server" visible="false" id="dvDatos">
<div align="right">
<input type="text" id="TxtBuscar" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBuscar','{0}')", GVPrecios.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBuscar','{0}')", GVPrecios.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
<asp:GridView ID="GVPrecios" runat="server" GridLines="None" DataKeyNames="CvePS, CvePrecioLista,PrecioLista,PS,Codigo,NumeroParte,Porcentaje,CodigoPS,ProductoExhibicion"
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" AutoGenerateColumns="False" data-sort="true" EmptyDataText="No se encontraron registros"
OnRowDataBound="GVPrecios_RowDataBound" >
<Columns>
<asp:TemplateField ItemStyle-HorizontalAlign="center" ItemStyle-Width="5%">
<ItemTemplate>
<asp:CheckBox runat="server" ID="chkPS" />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="Codigo" ItemStyle-Width="5%" HeaderText="Código" />
<asp:TemplateField ItemStyle-Width="5%" Visible="false" >
<HeaderTemplate>
<asp:Literal ID="LtlNumeroParte" runat="server" Text='<%# If(UsuarioActual.Empresa.Funcionalidad(531) = "1", "Código CPK", "Numero de parte") %>'></asp:Literal>
</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlNumeroParte" runat="server" Text='<%# Eval("NumeroParte", "{0}")%>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="PS" HeaderText="Producto/Servicio" />
<asp:BoundField DataField="Clasificacion" ItemStyle-Width="15%" HeaderText="Clasificación" />
<asp:BoundField DataField="PrecioLista" NullDisplayText="N/A" ItemStyle-Width="10%" HeaderText="Importe" DataFormatString="$ {0:N2}" ItemStyle-HorizontalAlign="right" />
<asp:TemplateField HeaderText="">
<ItemTemplate>
<asp:TextBox ID="TxtPrecio" runat="server" Text='<%# Eval("PrecioLista", "{0:0.######}")%>' CssClass="CssCamviaPrecio" MaxLength="39" Width="90px" onkeypress="return onlyNumberKey(event)"></asp:TextBox>
<%--<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtPrecio" FilterType="Numbers,Custom" ValidChars="." />
<asp:RegularExpressionValidator ID="REVTxtPrecio" runat="server" ControlToValidate="TxtPrecio" Display="None" EnableClientScript="True" ErrorMessage="El campo <b>''PrecioLista''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." ValidationGroup="GrpGuardar" ValidationExpression="^[0-9]{1,15}(?:\.[0-9]{1,4})?$" />
<ajax:ValidatorCalloutExtender ID="VCPrecio" runat="server" HighlightCssClass="vco" TargetControlID="REVTxtPrecio" Width="300px"></ajax:ValidatorCalloutExtender>--%>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Precio Mínimo" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:LinkButton ID="LnkPrecioMinActual" OnClick="LnkPrecioMinActual_Click" runat="server" Text='<%# If(Eval("PrecioMinimo").ToString.Length = 0, "N/A", Eval("PrecioMinimo", "{0:N2}")) %>'></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="">
<ItemTemplate>
<asp:TextBox ID="TxtPrecioMinimo" runat="server" Text='<%# Eval("PrecioMinimo", "{0:0.######}")%>' CssClass="CssCamviaPrecio" MaxLength="39" Width="60px" onkeypress="return onlyNumberKey(event)"></asp:TextBox>
<%-- <ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtPrecioMinimo" FilterType="Numbers,Custom" ValidChars="." />
<asp:RegularExpressionValidator ID="REVTxtPrecioMinimo" runat="server" ControlToValidate="TxtPrecioMinimo" Display="None" EnableClientScript="True" ErrorMessage="El campo <b>''PrecioLista''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." ValidationGroup="GrpGuardar" ValidationExpression="^[0-9]{1,15}(?:\.[0-9]{1,4})?$" />
<ajax:ValidatorCalloutExtender ID="VCTxtPrecioMinimo" runat="server" HighlightCssClass="vco" TargetControlID="REVTxtPrecioMinimo" Width="300px"></ajax:ValidatorCalloutExtender>--%>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="UnidadMedida" NullDisplayText="N/A" ItemStyle-Width="10%" HeaderText="U.M." />
<asp:BoundField DataField="Moneda" NullDisplayText="N/A" ItemStyle-Width="10%" HeaderText="Moneda" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="CostoPromedio" NullDisplayText="-" ItemStyle-Width="5%" DataFormatString="{0:N2}" Visible="false" HeaderText="C. Promedio" ItemStyle-HorizontalAlign="right" />
<asp:BoundField DataField="VentaMinima" NullDisplayText="N/A" ItemStyle-Width="10%" HeaderText="E. Mínimo" ItemStyle-HorizontalAlign="right" />
<asp:BoundField DataField="ImporteAnterior" NullDisplayText="N/A" ItemStyle-Width="10%" HeaderText="Importe Anterior" DataFormatString="$ {0:N2}" ItemStyle-HorizontalAlign="right" />
<asp:BoundField DataField="PrecioMinimoAnterior" NullDisplayText="N/A" ItemStyle-Width="10%" HeaderText="Precio Mínimo Anterior" DataFormatString="$ {0:N2}" ItemStyle-HorizontalAlign="right" />
<asp:BoundField DataField="FechaModificacion" DataFormatString="{0:dd/MM/yyyy hh:mm:ss}" ItemStyle-Width="10%" HeaderText="Fecha Modificación" />
<asp:BoundField DataField="UsuarioModifico" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="10%" HeaderText="Usuario Modificó" />
<asp:BoundField DataField="Porcentaje" NullDisplayText="N/A" ItemStyle-Width="10%" DataFormatString="%{0}" HeaderText="Porcentaje" ItemStyle-HorizontalAlign="right" />
<asp:BoundField DataField="FechaIng" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="10%" HeaderText="Fecha Ingreso" />
<asp:BoundField DataField="Usuario" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="10%" HeaderText="Usuario Ingresó" />
</Columns>
</asp:GridView>
</div>
<div id="dvMultiple" runat="server" visible="false">
<br />
<div class="row">
<div class="col-md-3">
<asp:LinkButton ID="LnkGuardarMultiple" runat="server" AlternateText="Actualizar" CausesValidation="True" CssClass="btn btn-primary" Text="Actualizar Seleccionadas" OnClick="LnkGuardarMultiple_Click" />
</div>
<div class="col-md-6">
</div>
<div class="col-md-3">
<div align="right">
<input type="text" id="TxtBuscarM" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBuscarM','{0}')", GvMultiple.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBuscarM','{0}')", GvMultiple.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<asp:GridView ID="GvMultiple" runat="server" GridLines="None" ClientIDMode="Static" AutoGenerateColumns="false"
CssClass="table table-striped table-advance table-hover ScrollAD" data-sort="true" EmptyDataText="No se encontraron registros"
OnRowCreated="GvMultiple_RowCreated" OnRowDataBound="GvMultiple_RowDataBound">
<Columns>
<asp:TemplateField ItemStyle-HorizontalAlign="center" ItemStyle-Width="35px">
<ItemTemplate>
<asp:CheckBox runat="server" ID="chkPS" />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="CodigoPS" HeaderText="Producto/Servicio" ItemStyle-Width="350px" />
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_1" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_1" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_2" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_2" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_3" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_3" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_4" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_4" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_5" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_5" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_6" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_6" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_7" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_7" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_8" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_8" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_9" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_9" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_10" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_10" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_11" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_11" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_12" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_12" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_13" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_13" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_14" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_14" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_15" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_15" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_16" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_16" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_17" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_17" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_18" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_18" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_19" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_19" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_20" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_20" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_21" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_21" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_22" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_22" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_23" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_23" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_24" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_24" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_25" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_25" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_26" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_26" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_27" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_27" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_28" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_28" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_29" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_29" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_30" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_30" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_31" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_31" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_32" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_32" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_33" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_33" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_34" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_34" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_35" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_35" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_36" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_36" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_37" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_37" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_38" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_38" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_39" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_39" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_40" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_40" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<div id="ModalActualizaPrecios" class="modal ADS fade" role="dialog">
<div class="modal-dialog" style="width: 900px; margin: auto;">
<div class="modal-content">
<div class="modal-header ">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">
<asp:UpdatePanel ID="UpModalTitulo" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Literal ID="LtlModalTitleUpModalTitulo" runat="server">Codigo </asp:Literal>
</ContentTemplate>
</asp:UpdatePanel>
</h4>
</div>
<div class="modal-body">
<asp:UpdatePanel runat="server" ID="UpModalActualizaPrecios" UpdateMode="Conditional">
<ContentTemplate>
<div class="col-md-12">
<div class="col-md-3" style="text-align: left">
<input id="ChkSeleccionarTodos" type="checkbox" title="Seleccionar Todos" onclick="SeleccionarTodosChkGvSucursa()" />
Seleccionar Todos
</div>
<div class="col-md-9" style="text-align: right">
<label>Aplicar precio mínimo</label>
<asp:TextBox ID="TxtAplicarPrecio" runat="server" Width="60px" MaxLength="39"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FilTxtAplicarPrecio" TargetControlID="TxtAplicarPrecio" runat="server" FilterType="Numbers,Custom" ValidChars="." InvalidChars="-+" />
<a id="lnkAplicarPrecioSucursales" runat="server" class="btn btn-default" onclick="CambiaPrecioModal();">Aplicar</a>
</div>
</div>
<asp:GridView ID="gvSucursal" runat="server" AutoGenerateColumns="False" DataKeyNames="CveSubProyecto" EmptyDataText="No se encontraron Sucursales" ToolTip="Sucursales habilitadas para Productos o Servicios"
CssClass="table table-striped table-smallpadding table-advance table-hover Widthall" OnRowDataBound="gvSucursal_RowDataBound" Style="text-align: center;" GridLines="None">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox ID="chkSucursal" runat="server" Checked="false" CssClass="CsMCheckGvSucursal" />
<asp:HiddenField ID="hdnEnBD" runat="server" Value='<%# If(IsDBNull(Eval("CvePS")), 0, 1) %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Sucursal" ItemStyle-Width="30%">
<ItemTemplate>
<asp:Literal ID="LtlSucursal" runat="server" Text='<%# Eval("SubProyecto", "{0}") %>'></asp:Literal>
</ItemTemplate>
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Precio Mínimo">
<ItemTemplate>
<asp:TextBox ID="TxtPrecioMinimo" Style="text-align: right" runat="server" CausesValidation="true" MaxLength="39" Text='<%# Eval("PrecioMinimo", "{0:0.######}")%>' ValidationGroup="GrpEditGuardarO" Width="90px" CssClass="CssMCamviaPrecio"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVTxtPrecioMinimo" runat="server" ControlToValidate="TxtPrecioMinimo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Importe''</b> es necesario, por favor ingréselo." ValidationGroup="GrpEditGuardarS"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCOTxtPrecioMinimo" runat="server" HighlightCssClass="vco" TargetControlID="RFVTxtPrecioMinimo" Width="100px"></ajax:ValidatorCalloutExtender>
<ajax:FilteredTextBoxExtender ID="FilTxtPrecioMinimo" runat="server" TargetControlID="TxtPrecioMinimo" FilterType="Numbers,Custom" ValidChars="." InvalidChars=",-+" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Mínimo" Visible="false">
<ItemTemplate>
<asp:TextBox ID="TxtMinimo" Style="text-align: right" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Minimo") %>' ValidationGroup="GrpEditGuardarO" Width="100px"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Máximo" Visible="false">
<ItemTemplate>
<asp:TextBox ID="TxtMaximo" Style="text-align: right" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Maximo")%>' ValidationGroup="GrpEditGuardarO" Width="100px"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="Precio Mínimo Anterior" DataField="PrecioMinimoAnterior" DataFormatString="{0:N2}" />
<asp:BoundField HeaderText="Usuario Modificó" DataField="Usuario" />
<asp:BoundField HeaderText="Fecha Modificación" DataField="FechaModificacion" DataFormatString="{0:dd/MM/yyyy hh:mm:ss}" />
</Columns>
<RowStyle CssClass="Texto" />
<AlternatingRowStyle CssClass="TextoAlterno" />
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div class="modal-footer">
<asp:UpdatePanel runat="server" ID="UpModalBotonesCodigos" UpdateMode="Conditional">
<ContentTemplate>
<asp:LinkButton ID="LnkModalGuardarPreciosMinimos" runat="server" Text="Guardar" CssClass="btn btn-primary" OnClick="LnkModalGuardarPreciosMinimos_Click"></asp:LinkButton>
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</div>
</div>
<%--CARGA EXCEL--%>
<div id="DivCargaExcel" class="modal ADS fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header ">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">Agregar Excel</h4>
</div>
<div class="modal-body">
<div class="row v-center">
<div class="col-md-6 v-center">
<label class="col-md-6 v-center truncate">Precio de Lista:</label>
<div class="col-md-6 v-center">
<asp:DropDownList ID="DdlPrecioListaCarga" runat="server" AppendDataBoundItems="true" Width="100%" CssClass="select2me" DataValueField="CvePrecioLista" DataTextField="PrecioLista"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVPrecioListaCarga" runat="server" ControlToValidate="DdlPrecioListaCarga" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Precio Lista''</b> es necesario, por favor selecionarlo." ValidationGroup="GrpCargarExcel"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEPrecioListaCarga" runat="server" HighlightCssClass="vco" TargetControlID="RFVPrecioListaCarga" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<h3>Arraste o haga click para subir el archivo Excel</h3>
</div>
</div>
<div class="row">
<div class="col-md-11" style="margin-left: 30px; margin-right: 30px;">
<asp:TextBox ID="TxtExcel" CssClass="ADSdropzone hidden" Text="" data-maxFile="1" runat="server"></asp:TextBox>
</div>
</div>
</div>
<div class="modal-footer">
<div class="row">
<div class="col-md-2" style="text-align: left">
<asp:UpdatePanel ID="UpDescargar" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Button ID="BtnDescargarFormato" runat="server" CssClass="btn btn-warning" Text="Descargar Formato" />
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="BtnDescargarFormato" />
</Triggers>
</asp:UpdatePanel>
</div>
<div class="col-md-10" style="text-align: right">
<asp:Button ID="BtnCargaExcel" runat="server" CssClass="btn btn-success" Text="Aceptar" ValidationGroup="GrpCargarExcel"></asp:Button>
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
</div>
</div>
</div>
</div>
</div>
</div>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
<script src="/Scripts/PrintJS/print.min.js"></script>
<script>
function impresionBase64(pdfBase64) {
printJS({ printable: pdfBase64, type: 'pdf', showModal: true, base64: true });
}
function convertirTabla() {
let json = tableToJson($('#GvMultiple').get(0));
}
function tableToJson(table) {
var data = [];
// first row needs to be headers
var headers = [];
for (var i = 0; i < table.rows[0].cells.length; i++) {
if (table.rows[0].cells[i].innerHTML != "") {
headers[i] = table.rows[0].cells[i].innerText.toLowerCase().replace(/ /gi, '');
}
}
// go through cells
for (var i = 1; i < table.rows.length; i++) {
var tableRow = table.rows[i];
var rowData = {};
for (var j = 1; j < tableRow.cells.length; j++) {
rowData[headers[j]] = tableRow.cells[j].innerText;
}
data.push(rowData);
}
return data;
}
function onlyNumberKey(evt) {
// Only ASCII character in that range allowed
var ASCIICode = (evt.which) ? evt.which : evt.keyCode
if (ASCIICode > 31 && (ASCIICode < 48 || ASCIICode > 57)) {
if (ASCIICode == 46) {
return true
} else {
return false;
}
}
return true;
}
function CambiaImporte() {
var topLevelElem = document.getElementById("form1");
var checks = topLevelElem.getElementsByTagName("input");
var idd = '';
var valor = $('#<%= TxtImporte.ClientID %>').val();
for (var i = 0; i < checks.length; i++) {
if (checks[i].type == "checkbox") {
debugger;
if (checks[i].checked) {
idd = checks[i].id.replace('C_GVPrecios_chkPS_', '')
if ($get('C_GVPrecios_TxtPrecio_' + idd) != null) {
$get('C_GVPrecios_TxtPrecio_' + idd).value = FormatoNumero(ToDouble(valor), 2);
}
}
}
}
}
function CambiaPrecio() {
var topLevelElem = document.getElementById("form1");
var checks = topLevelElem.getElementsByTagName("input");
var idd = '';
var valor = $('#<%= TxtPrecio.ClientID %>').val();
//if (!isNaN(valor) && valor.length > 0) {
// $('.CssCamviaPrecio').val(valor);
//}
for (var i = 0; i < checks.length; i++) {
if (checks[i].type == "checkbox") {
debugger;
if (checks[i].checked) {
idd = checks[i].id.replace('C_GVPrecios_chkPS_', '')
if ($get('C_GVPrecios_TxtPrecioMinimo_' + idd) != null) {
$get('C_GVPrecios_TxtPrecioMinimo_' + idd).value = FormatoNumero(ToDouble(valor), 2);
}
}
}
}
}
function CambiaPrecioModal() {
var ChecksGv = $('.CsMCheckGvSucursal').find('input[type=checkbox]');
var valor = $('#<%= TxtAplicarPrecio.ClientID %>').val();
if (!isNaN(valor) && valor.length > 0) {
$(".CssMCamviaPrecio").each(function (index) {
if ($($(ChecksGv).get(index)).attr('checked')) {
$(this).val(valor);
}
});
}
}
function SeleccionarTodosChkGvSucursa() {
if ($('#ChkSeleccionarTodos').attr('checked')) {
$('.CsMCheckGvSucursal').find('input[type=checkbox]').prop('checked', true);
} else {
$('.CsMCheckGvSucursal').find('input[type=checkbox]').prop('checked', false);
}
}
function FncSeleccionaChk(chk) {
chk.checked = true;
}
</script>
</asp:Content>

File diff suppressed because it is too large Load Diff

View File

@@ -19,6 +19,9 @@ Partial Class PopUpBuscarFolio
CType(Me.Master, BaseMasterPage).PopupWidth = 850 CType(Me.Master, BaseMasterPage).PopupWidth = 850
txtFechaI.Text = NowADS().AddMonths(-12).ToShortDateString txtFechaI.Text = NowADS().AddMonths(-12).ToShortDateString
'RegistraScript("$get('tdContenido').style.height='500px'") 'RegistraScript("$get('tdContenido').style.height='500px'")
'venta de pv, y gdiaz
If UsuarioActual.Empresa.Funcionalidad(109) = "1" OrElse UsuarioActual.Empresa.Funcionalidad(382) = "1" Then txtFechaI.Text = NowADS.ToShortDateString
CargaSubProyectos() CargaSubProyectos()
CargaEstatus() CargaEstatus()
CargaUsuarios() CargaUsuarios()

View File

@@ -18584,7 +18584,7 @@ Partial Class Ventas
If CvePrecioListaPS > 0 Then If CvePrecioListaPS > 0 Then
Dim ObjPS As New ClsProductosServicios Dim ObjPS As New ClsProductosServicios
If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSParametro) Then If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSParametro, Opcion:=1) Then
PrecioSugerido = ObjPS.DtResultados.FiltroPrimeroValor("PrecioLista").ToDecimal PrecioSugerido = ObjPS.DtResultados.FiltroPrimeroValor("PrecioLista").ToDecimal
PorcentajePrecio = ObjPS.DtResultados.FiltroPrimeroValor("Porcentaje").ToDecimal PorcentajePrecio = ObjPS.DtResultados.FiltroPrimeroValor("Porcentaje").ToDecimal
End If End If
@@ -20599,7 +20599,7 @@ Partial Class Ventas
'Dim CvePrecioListaPS = GlobalDTCliente(UsuarioActual.CveEmpresa, -1).FiltroPrimeroValor("CvePrecioLista", $"CveCliente = {CveCliente}").ToEntero() 'Dim CvePrecioListaPS = GlobalDTCliente(UsuarioActual.CveEmpresa, -1).FiltroPrimeroValor("CvePrecioLista", $"CveCliente = {CveCliente}").ToEntero()
If CvePrecioLista > 0 Then If CvePrecioLista > 0 Then
Dim ObjPS As New ClsProductosServicios Dim ObjPS As New ClsProductosServicios
If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioLista, CvePS:=CvePSAdicional) Then If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioLista, CvePS:=CvePSAdicional, Opcion:=1) Then
PrecioSugerido = ObjPS.DtResultados.FiltroPrimeroValor("PrecioLista").ToDecimal PrecioSugerido = ObjPS.DtResultados.FiltroPrimeroValor("PrecioLista").ToDecimal
If PrecioSugerido = 0 Then If PrecioSugerido = 0 Then
@@ -38125,7 +38125,7 @@ Partial Class Ventas
If CvePrecioListaPS > 0 Then If CvePrecioListaPS > 0 Then
Dim ObjPS As New ClsProductosServicios Dim ObjPS As New ClsProductosServicios
If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSParametro) Then If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSParametro, Opcion:=1) Then
PrecioSugerido = ObjPS.DtResultados.FiltroPrimeroValor("PrecioLista").ToDecimal PrecioSugerido = ObjPS.DtResultados.FiltroPrimeroValor("PrecioLista").ToDecimal
PorcentajePrecio = ObjPS.DtResultados.FiltroPrimeroValor("Porcentaje").ToDecimal PorcentajePrecio = ObjPS.DtResultados.FiltroPrimeroValor("Porcentaje").ToDecimal
End If End If
@@ -39278,12 +39278,12 @@ Partial Class Ventas
Dim drr As DataRow = GlobalDTClientesSucursales(UsuarioActual.CveEmpresa, CveCliente).FiltroPrimero($"CveClienteSucursal={DdlSucursalCliente.SelectedValue}") Dim drr As DataRow = GlobalDTClientesSucursales(UsuarioActual.CveEmpresa, CveCliente).FiltroPrimero($"CveClienteSucursal={DdlSucursalCliente.SelectedValue}")
If drr IsNot Nothing Then If drr IsNot Nothing Then
If RBLTipoVenta.SelectedValue.Contiene("6") Then If RBLTipoVenta.SelectedValue.Contiene("6") Then 'cuando es A-vista
tCveAlmacenExistencia = drr("CveAlmacenAlterno").ToString.ToEntero tCveAlmacenExistencia = drr("CveAlmacenAlterno").ToString.ToEntero
ElseIf RBLTipoVenta.SelectedValue.Contiene("5") Then ElseIf RBLTipoVenta.SelectedValue.Contiene("5") Then 'cuando es Consignación
tCveAlmacenExistencia = drr("CveAlmacenConsignacion").ToString.ToEntero tCveAlmacenExistencia = drr("CveAlmacenConsignacion").ToString.ToEntero
Else Else
tCveAlmacenExistencia = drr("CveAlmacenAsignado").ToString.ToEntero tCveAlmacenExistencia = -1 'drr("CveAlmacenAsignado").ToString.ToEntero
End If End If
End If End If
Else Else
@@ -39294,7 +39294,7 @@ Partial Class Ventas
ElseIf RBLTipoVenta.SelectedValue.Contiene("5") Then 'cuando es Consignación ElseIf RBLTipoVenta.SelectedValue.Contiene("5") Then 'cuando es Consignación
tCveAlmacenExistencia = drr("CveAlmacenConsignacion").ToString.ToEntero tCveAlmacenExistencia = drr("CveAlmacenConsignacion").ToString.ToEntero
Else Else
tCveAlmacenExistencia = drr("CveAlmacenAsignado").ToString.ToEntero '' cuando Fuera de Línea tCveAlmacenExistencia = -1 ' drr("CveAlmacenAsignado").ToString.ToEntero '' cuando Fuera de Línea
End If End If
End If End If
End If End If