This commit is contained in:
2024-11-28 11:31:06 -07:00
20 changed files with 2961 additions and 375 deletions

View File

@@ -430,10 +430,10 @@ Public Class ClsContratos
Ubicacion As String, Responsable As String, CveSubProyecto As Integer, PorIVA As Double, PorAnticipo As Double, PorAmortizacionAnticipo As Double, PorGarantia As Double, Archivo As String, Geom As String,
CveContratoPadre As Integer, CveUsuario As Integer, CveEmpresa As Integer, EsPresupuestal As Boolean, Minimo As Double, Maximo As Double, Importe As Double, CveMoneda As Integer, ModalidadDetalle As Integer,
Optional CveContratosEstatus As Integer = -1, Optional CveContratoTipo As Integer = -1, Optional TipoCambio As Double = -1, Optional CveSucursalCliente As Integer = -1, Optional CveAlmacenOrigen As Integer = -1, Optional CveAlmacenDestino As Integer = -1, Optional PorcentajeComision As Integer = -1,
Optional TipoGarantia As Integer = -1, Optional Folio As Integer = -1, Optional FechaVenc As Date = Nothing, Optional EstatusFianza As Integer = -1, Optional CveContratoPlantilla As Integer = -1, Optional CveCuentaEquipo As Integer = -1,
Optional TipoGarantia As Integer = -1, Optional Folio As Integer = -1, Optional FechaVenc As Date = MinFecha, Optional EstatusFianza As Integer = -1, Optional CveContratoPlantilla As Integer = -1, Optional CveCuentaEquipo As Integer = -1,
Optional CveVendedor As Integer = -1, Optional Observaciones As String = "", Optional CveDireccionEnvio As Integer = -1, Optional AplicaImpuestosLocales As Boolean = False, Optional CorreoNotificacionPedDev As String = "", Optional FacturacionCicilica As Boolean = False, Optional FacturacionCiclicaAutomatico As Boolean = False,
Optional DiaMesFacturacion As Integer = 1, Optional CvePeriodo As Integer = -1, Optional ObservacionesGenerales As String = "", Optional CveTipoAF As Integer = Nothing, Optional CveChofer As Integer = Nothing, Optional CveChofer2 As Integer = Nothing, Optional CveAF As Integer = Nothing,
Optional CantidadPasajeros As Integer = Nothing, Optional CvePartida As Integer = Nothing, Optional CveDestino As Integer = Nothing, Optional CveMasivo As Integer = -1, Optional NumChoferes As Integer = -1) As Boolean
Optional DiaMesFacturacion As Integer = 1, Optional CvePeriodo As Integer = -1, Optional ObservacionesGenerales As String = "", Optional CveTipoAF As Integer = -1, Optional CveChofer As Integer = -1, Optional CveChofer2 As Integer = -1, Optional CveAF As Integer = -1,
Optional CantidadPasajeros As Integer = -1, Optional CvePartida As Integer = -1, Optional CveDestino As Integer = -1, Optional CveMasivo As Integer = -1, Optional NumChoferes As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Con_ContratosUpdate")

View File

@@ -7680,8 +7680,8 @@ Public Class ClsPaginas
If Not RutaReporte.ToUpper().StartsWith(bdir.ToUpper()) Then
RutaReporte = String.Format("{0}{1}", bdir, RutaReporte)
End If
Dim urlHost As String = "http://sig.adssistemas.mx:7998/"
'Dim urlHost As String = "http://localhost:2202/"
'Dim urlHost As String = "http://sig.adssistemas.mx:7998/"
Dim urlHost As String = "http://localhost:2202/"
If EsProduccion Then
urlHost = "http://192.200.113.178:6599/"
End If

View File

@@ -190,7 +190,9 @@ Public Class ClsTransportes
Return Retorno
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
DataAdapter("PA_Trans_ViajesPasajerosUpdate")
@@ -207,6 +209,8 @@ Public Class ClsTransportes
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@Sexo", SqlDbType.Bit).Value = Sexo
.Add("@FechaNacimiento", SqlDbType.Date).Value = FechaNacimiento
End With
Try

View File

@@ -8052,6 +8052,8 @@ Namespace Modelos
Public Property CveSATPeriodicidad As Integer = -1
Public Property CveSATMes As Integer = -1
Public Property SATAnio As Integer = -1
Public Property CveLineaAdicional As Integer = -1
Public Sub SetSubProyecto()
If CveSubProyecto > 0 AndAlso UsuarioActual IsNot Nothing Then

View File

@@ -9478,6 +9478,10 @@ Partial Class Compras_Compras
Private Function validaFechaNumeroReembolso() As Boolean
If UsuarioActual.CveEmpresa <> 119 Then
Return True
End If
Dim respuesta As Boolean = True
Dim CvePersonalVal As Integer = -1
Dim CveCajaChicaVal As Integer = -1
@@ -9521,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
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
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

View File

@@ -1551,6 +1551,16 @@ Partial Class PopUpVerFactura
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
Private Function Parametros(Cadena As String) As Hashtable
@@ -6502,6 +6512,48 @@ Partial Class PopUpVerFactura
#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()

View File

@@ -3,6 +3,30 @@
<asp:Content ID="Content1" ContentPlaceHolderID="CP" Runat="Server">
</asp:Content>
<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 ID="Content3" ContentPlaceHolderID="E" Runat="Server">
Reporte de solicitudes de traspaso
@@ -192,7 +216,7 @@
</div>
<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>
</div>
<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>
</asp:Content>

View File

@@ -69,7 +69,8 @@ Partial Class Inventarios_TrasladoSolicitud
Private Sub InicializaValores()
CreaDTTemporal()
CargaAlmacenes()
CargaPS()
'CargaPS()
CargaFuncionalidad105()
'CargaClientes()
' CargaUnidadMedida()
@@ -92,25 +93,70 @@ Partial Class Inventarios_TrasladoSolicitud
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(UsuarioActual.Empresa.Funcionalidad(105) = "1")
DdlProductoServicio.setEsWebService(EsWS)
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
DdlProductoServicio.ddlWS.Attributes.Add("data-cveclasificacion", "-1")
DdlProductoServicio.SelectedText = ""
DdlProductoServicio.SelectedValue = "-1"
Objeto.ddlWS.Attributes.Add("data-cveclasificacion", CveClasificacion.ToString)
' Objeto.ddlWS.Attributes.Add("data-pagina", "oc/oc")
Objeto.SelectedText = ""
Objeto.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"))
Objeto.ddl.Items.Clear()
Objeto.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacion).FiltraParametros("", "PSCodigo")
Objeto.ddl.DataBind()
'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
'DdlProductoServicio.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
'DdlProductoServicio.DataBind()
'DdlProductoServicio.Items.Insert(0, New ListItem("Seleccione", "-1"))
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()
DdlAlmacenOrigenFiltro.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros("CveTipoAlmacen = 1") 'GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen <> 9")
DdlAlmacenOrigenFiltro.DataBind()

View File

@@ -272,8 +272,28 @@
<div class="row">
<p class="col-md-6"></p>
<asp:Label runat="server" ID="LbCostos" CssClass="col-md-6 text-success bold my-1 text-right"
Visible="False"></asp:Label>
<div class="col-md-6" style="text-align:right">
<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>

View File

@@ -4,6 +4,7 @@ Imports System.Data
Imports ADSNetLibrary.Helpers
Imports Extensiones
Imports Extensiones.ModExtensiones
Partial Class Boletos
Inherits ClsPaginas
#Region "Propiedades"
@@ -77,9 +78,7 @@ Partial Class Boletos
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
Response.Redirect("/Transportes/RepViajes.aspx")
@@ -92,8 +91,24 @@ Partial Class Boletos
Alert("Viaje no definido")
End If
Permisos()
End If
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()
Dim ObjContratos As New ClsContratos
Dim ObjViaje As New ClsTransportes
@@ -180,30 +195,33 @@ Partial Class Boletos
Dim CveSubProyecto As Integer = Contrato.Rows(0)("CveSubProyecto").ToString.ToEntero
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
edad = CInt(DateDiff(DateInterval.Year, fechaNacimiento, fechaHoy))
If edad <= 4 Or edad >= 60 Then
ImporteR = ObjDestinos.DtResultados.FiltroPrimeroValor("Importe").ToDecimal.RoundSQL - 20
Dim edad As Integer = CInt(DateDiff(DateInterval.Year, TxtFechaNacimiento.Text.ToDate, Date.Today))
Dim Mes As Integer = TxtFecha.Text.ToDate.Month
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
ImporteR = ObjDestinos.DtResultados.FiltroPrimeroValor("Importe").ToDecimal.RoundSQL
End If
ImporteR = If(edad <= 4 Or edad >= 60, ImporteR - 20, ImporteR)
End If
If ImporteR > 0 Then
ViewState("Importe") = ImporteR
LbCostos.Text = $"El precio de su boleto es ${ImporteR.FormatoNumero}"
LbCostos.Text = $"El precio de su boleto es:"
LbCostos.Visible = True
TxtImporte.Text = ImporteR.FormatoNumero
TxtImporte.Visible = True
BtnAgregarPasajero.Visible = True
LbAviso.Visible = True
Else
ViewState("Importe") = 0
BtnAgregarPasajero.Visible = False
LbCostos.Visible = False
TxtImporte.Visible = False
Alert("No se encontro una tarifa para estos destinos", TipoMensaje.MsgAdvertencia)
End If
@@ -249,6 +267,7 @@ Partial Class Boletos
End If
dr("CveViajePasajero") = CveViajePasajero
'dr("Numero") = dr("Importe").ToString
Next
@@ -305,7 +324,9 @@ Partial Class Boletos
ObjTransporte.Commit()
ObjTransporte.Dispose()
SbAlert.Append("El boleto se genero correctamente.")
SbAlert.Append("El boleto se genero correctamente.</br>")
GeneraLinksDescargaBoleto(SbAlert)
DtPasajeros.Clear()
GvB.DataSource = DtPasajeros
@@ -321,7 +342,8 @@ Partial Class Boletos
CargaDatos()
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
LbAviso.Visible = False
@@ -331,6 +353,20 @@ Partial Class Boletos
UpPanel.Update()
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)
DdlDestino.DataSource = DtDestinos.FiltraParametros($"CveDestinoOrigen = {DdlPartida.SelectedValue}")
DdlDestino.DataBind()
@@ -358,6 +394,13 @@ Partial Class Boletos
End Sub
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
Alert("No se ha seleccionado el asiento.")
Exit Sub
@@ -372,7 +415,7 @@ Partial Class Boletos
Dr1("Destino") = DdlDestino.SelectedItem
Dr1("CveDestinoOrigen") = DdlPartida.SelectedValue.ToEntero
Dr1("CveDestinoFinal") = DdlDestino.SelectedValue.ToEntero
Dr1("Importe") = Me.Importe
Dr1("Importe") = TxtImporte.Text.ToDecimal 'Me.Importe
Dr1("Asiento") = AsientoSeleccionado.Replace("A", "")
Dr1("Nombre") = TxtNombre.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
Dim Retorno As New Modelos.Factura.MMensajeFactura
Dim CveCliente As Integer = 1154164
Dim CveCliente As Integer = 1172306 ' 1154164
Dim CveMoneda As Integer = 2
Dim CveSubProyecto As Integer = -1
Dim CvePSBoleto As Integer = 912720
Dim CvePSBoleto As Integer = 907706 '912720
If EsProduccion Then
CvePSBoleto = 986337
@@ -501,4 +544,7 @@ Partial Class Boletos
Return Retorno
End Function
End Class

View File

@@ -11,6 +11,17 @@
<li>
<asp:LinkButton runat="server" OnClick="ImprimirContrato"><i class="fa fa-print"></i> Imprimir Contrato</asp:LinkButton>
</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 ID="Content2" ContentPlaceHolderID="Css" runat="Server">
@@ -111,7 +122,9 @@
<%-- Información General --%>
<ajax:TabPanel runat="server" HeaderText="Información General" CssClass="tabBodyOverride">
<ContentTemplate>
<div class="row">
<%-- Datos del Contrato --%>
<div class="col-md-7">
<div class="portlet light bordered xspadding">
@@ -216,18 +229,29 @@
<label class="col-md-4">Fecha Salida</label>
<div class="col-md-8">
<div class="input-group">
<asp:TextBox ID="TxtFechaSalida" runat="server" CssClass="form-control" CausesValidation="True"
<%-- <asp:TextBox ID="TxtFechaSalida" runat="server" CssClass="form-control" CausesValidation="True"
Width="100%"
type="datetime"></asp:TextBox>
type="datetime"></asp:TextBox>--%>
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
<asp:TextBox Width="80px" ID="TxtFechaSalida" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="LnkTxtFechaSalida" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEETxtFechaSalida" runat="server" TargetControlID="TxtFechaSalida" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CalTxtFechaSalida" TargetControlID="TxtFechaSalida" PopupButtonID="LnkTxtFechaSalida" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RFVTxtFechaSalida" runat="server" ControlToValidate="TxtFechaSalida"
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Salida''</b> es necesario, por favor ingréselo."
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCETxtFechaSalida" runat="server" HighlightCssClass="vco"
TargetControlID="RFVTxtFechaSalida" Width="100%">
TargetControlID="RFVTxtFechaSalida" Width="300px">
</ajax:ValidatorCalloutExtender>
<div class="input-group-addon">
<%--<div class="input-group-addon">
<i class="fa fa-calendar"></i>
</div>
</div>--%>
</div>
</div>
</div>
@@ -237,18 +261,29 @@
<div class="col-md-8">
<div class="input-group">
<asp:TextBox ID="TxtFechaRegreso" runat="server" CssClass="form-control" CausesValidation="True"
<%--<asp:TextBox ID="TxtFechaRegreso" runat="server" CssClass="form-control" CausesValidation="True"
Width="100%"
type="datetime"></asp:TextBox>
type="datetime"></asp:TextBox>--%>
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
<asp:TextBox Width="80px" ID="TxtFechaRegreso" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="LnkTxtFechaRegreso" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEETxtFechaRegreso" runat="server" TargetControlID="TxtFechaRegreso" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CalTxtFechaRegreso" TargetControlID="TxtFechaRegreso" PopupButtonID="LnkTxtFechaRegreso" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RFVTxtFechaRegreso" runat="server" ControlToValidate="TxtFechaRegreso"
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Regreso''</b> es necesario, por favor ingréselo."
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco"
TargetControlID="RFVTxtFechaRegreso" Width="100%">
TargetControlID="RFVTxtFechaRegreso" Width="300px">
</ajax:ValidatorCalloutExtender>
<div class="input-group-addon">
<%-- <div class="input-group-addon">
<i class="fa fa-calendar"></i>
</div>
</div>--%>
</div>
</div>
</div>
@@ -494,220 +529,274 @@
</div>
<%-- Bitácora --%>
<div class="col-md-12">
<div class="portlet light bordered xspadding">
<div class="portlet-title">
<%-- Bitácora --%>
<%--<div class="caption uppercase" style="position: relative;">
<i class="fa fa-commenting"></i>Bitácora
</div>
</div>
<asp:UpdatePanel ID="UpBitacora" runat="server" UpdateMode="Conditional">
<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>
<UserControl:TareaNueva runat="server" ID="TareaNueva" />
<%--<script> function OnAddedTareaNueva() { $('.btnupEventoBitacora').click(); }</script>--%>
<div class="row">
<div class="col-md-12">
<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 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 class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right; margin-right: 5px" align="left;">
<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;" />
<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>
</div>
<div class="row">
<div class="col-md-12">
<asp:GridView ID="GvViajesPasajeros" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ningún boleto registrado" Width="100%" ShowFooter="true"
CssClass="table table-striped table-advance 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,FechaNacimiento"
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" 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>
<asp:UpdatePanel ID="UpBitacora" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<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>
</asp:UpdatePanel>
</ContentTemplate>
</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>
<%-- Modal Editar Boleto --%>
<asp:UpdatePanel runat="server" ID="UpModal" UpdateMode="Conditional">
<ContentTemplate>
<div id="ModalEditar" class="modal ADS fade" role="dialog">
@@ -811,7 +900,7 @@
</div>
<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">
<asp:DropDownList ID="RblSexo" CssClass="form-control input-sm select2me" runat="server"
Width="100%">
@@ -821,6 +910,29 @@
</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>--%>
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
<asp:TextBox Width="80px" ID="TxtFechaNacimiento" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="LnkTxtFechaNacimiento" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="TxtFechaNacimiento" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="TxtFechaNacimiento" PopupButtonID="LnkTxtFechaNacimiento" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RFVFechaNacimiento" runat="server" ControlToValidate="TxtFechaNacimiento" Display="None"
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>
<ajax:ValidatorCalloutExtender ID="VCETxtFechaNacimiento" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaNacimiento" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="row margin-bottom-5">
<label class="col-md-4 bold">Estatus</label>
<div class="col-md-8">
@@ -1145,8 +1257,7 @@
</asp:UpdatePanel>
</div>
<div class="modal-footer">
<asp:Button OnClick="UpdateBoleto" runat="server" CssClass="btn btn-primary" Text="Actualizar">
</asp:Button>
<asp:Button OnClick="UpdateBoleto" runat="server" CssClass="btn btn-primary" Text="Actualizar" ValidationGroup="GrpActViaje" ID="BtnActualizarViaje"></asp:Button>
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
</div>
</div>

View File

@@ -1,11 +1,12 @@
Option Explicit On
Option Strict On
Imports System.Activities.Statements
Imports System.Data
Imports System.Data.SqlClient
Imports System.IO
Imports Extensiones
Imports Microsoft.Reporting.WebForms
Imports Modelos
Partial Class RepContratoDetalle
@@ -231,6 +232,18 @@ Partial Class RepContratoDetalle
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
@@ -297,9 +310,34 @@ Partial Class RepContratoDetalle
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
Private Sub CargaDatos()
CargaDatosContrato()
CargaDatosViajes()
'Información General
End Sub
Private Sub CargaDatosContrato()
Dim ObjContratos As New ClsContratos
If ObjContratos.GetContratos(CveContrato, UsuarioActual.CveEmpresa) Then
Contrato = ObjContratos.DtResultados
@@ -359,17 +397,7 @@ Partial Class RepContratoDetalle
A1.Visible = True
End If
'Boletos Vendidos
If drc("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
'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
@@ -385,10 +413,38 @@ Partial Class RepContratoDetalle
End If
ObjContratos.Dispose()
UpTabContainer.Update()
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"
Protected Sub GVEventoBitacora_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEB.RowDataBound
@@ -707,7 +763,7 @@ Partial Class RepContratoDetalle
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
Exit For
End If
@@ -840,7 +896,7 @@ Partial Class RepContratoDetalle
Try
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()
End If
Catch ex As ArgumentException
@@ -855,6 +911,7 @@ Partial Class RepContratoDetalle
End Try
CargaDatos()
RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalEditar"))
End Sub
Protected Sub OnChangeRuta(sender As Object, e As EventArgs)
@@ -893,53 +950,39 @@ Partial Class RepContratoDetalle
ViajeActual = dt
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)
If e.Row.RowType = DataControlRowType.DataRow Then
If EsAgencia Then
e.Row.FCLinkButton("BtnCancelar").Visible = False
e.Row.FCLinkButton("BtnReAgendar").Visible = False
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
If e.Row.RowType = DataControlRowType.Footer Then
e.Row.FCLiteral("LtlImportePie").Text = DTViajesPasajeros.SUM("Importe").ToString("###,###,###.00")
End If
End Sub
Protected Sub EditarBoleto(sender As Object, e As EventArgs)
PnEditarUsuario.Visible = True
PnEditarViaje.Visible = False
PnAsientos.Visible = False
TxtFechaNacimiento.Enabled = True
TxtNombre.Enabled = True
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
CveViajePasajero = GvRow.DataKey("CveViajePasajero").ToEntero
DdlRuta.SelectedValue = GvRow.DataKey("CveViaje")
DdlRuta.SelectedValueExist(GvRow.DataKey("CveViaje"))
LbPartida.Text = GvRow.DataKey("Partida").ToString()
LbDestino.Text = GvRow.DataKey("Destino").ToString()
LbImporte.Text = Convert.ToDecimal(GvRow.DataKey("Importe")).ToString("C")
@@ -952,6 +995,12 @@ Partial Class RepContratoDetalle
TxtEstatus.Text = GvRow.DataKey("Estatus").ToString
LbEstatus.CssClass = If(CBool(GvRow.DataKey("Estatus").ToString), "text-success bold", "text-danger bold")
TxtAsiento.Text = GvRow.DataKey("Asiento").ToString()
TxtFechaNacimiento.Text = GvRow.DataKey("FechaNacimiento").ToString().ToDate.ToString("dd/MM/yyyy")
If EsAgencia Then
TxtFechaNacimiento.Enabled = False
TxtNombre.Enabled = False
End If
UpTabContainer.Update()
UpModal.Update()
@@ -977,6 +1026,7 @@ Partial Class RepContratoDetalle
LbEstatus.Text = GvRow.DataKey("Estatus").ToString()
LbCreado.Text = GvRow.DataKey("FechaIng").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
DdlRuta.ClearSelection()
@@ -990,7 +1040,7 @@ Partial Class RepContratoDetalle
DdlRuta.Items.Add(listItem)
Next
End If
DdlRuta.SelectedValue = GvRow.DataKey("CveViaje")
DdlRuta.SelectedValueExist(GvRow.DataKey("CveViaje"))
ObjContratos.Dispose()
UpTabContainer.Update()
RegistraScript(String.Format("$('#{0}').modal('show');", "ModalEditar"))
@@ -1177,6 +1227,83 @@ Partial Class RepContratoDetalle
End Class
#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

View File

@@ -349,16 +349,28 @@
<label class="col-md-4">Fecha Salida</label>
<div class="col-md-8">
<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%"
></asp:TextBox>
></asp:TextBox>--%>
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
<asp:TextBox Width="80px" ID="TxtFechaSalida" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="LnkTxtFechaSalida" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEETxtFechaSalida" runat="server" TargetControlID="TxtFechaSalida" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaSalida" PopupButtonID="LnkTxtFechaSalida" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RFVTxtFechaSalida" runat="server" ControlToValidate="TxtFechaSalida"
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Salida''</b> es necesario, por favor ingréselo."
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCETxtFechaSalida" runat="server" HighlightCssClass="vco"
TargetControlID="RFVTxtFechaSalida" Width="100%">
TargetControlID="RFVTxtFechaSalida" Width="300px">
</ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
@@ -368,14 +380,26 @@
<div class="col-md-8">
<div class="input-group">
<asp:TextBox ID="TxtFechaRegreso" runat="server" CssClass="form-control" CausesValidation="True" type="datetime-local"
<%-- <asp:TextBox ID="TxtFechaRegreso" runat="server" CssClass="form-control" CausesValidation="True" type="datetime-local"
Width="100%"
></asp:TextBox>
></asp:TextBox>--%>
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
<asp:TextBox Width="80px" ID="TxtFechaRegreso" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="LnkTxtFechaRegreso" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEETxtFechaRegreso" runat="server" TargetControlID="TxtFechaRegreso" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CalendarExtender2" TargetControlID="TxtFechaRegreso" PopupButtonID="LnkTxtFechaRegreso" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RFVTxtFechaRegreso" runat="server" ControlToValidate="TxtFechaRegreso"
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Regreso''</b> es necesario, por favor ingréselo."
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco"
TargetControlID="RFVTxtFechaRegreso" Width="100%">
TargetControlID="RFVTxtFechaRegreso" Width="300px">
</ajax:ValidatorCalloutExtender>
</div>

View File

@@ -590,8 +590,15 @@ Partial Class RepContratosCalendario
TxtFechaSalida.Text = Convert.ToDateTime(DRow("FechaInicial")).ToString("dd/MM/yyyy HH:mm:ss")
TxtFechaRegreso.Text = Convert.ToDateTime(DRow("FechaFinal")).ToString("dd/MM/yyyy HH:mm:ss ")
TxtMoneda.Text = DRow("Moneda").ToString
TxtAnticipo.Text = DRow("ImporteMin").ToString
TxtDolares.Text = DRow("Importe").ToString
'Requeridos
DdlChofer.SelectedValueExist(-1)
DdlChofer2.SelectedValueExist(-1)
DdlChofer.SelectedValueExist(DRow("CveChofer").ToString)
DdlChofer2.SelectedValueExist(DRow("CveChofer2").ToString)
chkSegundoChofer.Checked = If(NumChoferes = 2, True, False)
@@ -719,6 +726,9 @@ Partial Class RepContratosCalendario
TxtFechaSalida.Text = Convert.ToDateTime(GvRow.DataKey("FechaInicial")).ToString("dd/MM/yyyy HH:mm:ss")
TxtFechaRegreso.Text = Convert.ToDateTime(GvRow.DataKey("FechaFinal")).ToString("dd/MM/yyyy HH:mm:ss ")
TxtMoneda.Text = GvRow.DataKey("Moneda")
TxtAnticipo.Text = GvRow.DataKey("ImporteMin")
TxtDolares.Text = GvRow.DataKey("Importe")
'Requeridos
DdlChofer.SelectedValueExist(GvRow.DataKey("CveChofer"))

View File

@@ -186,19 +186,7 @@
TargetControlID="RFVTxtFechaViaje" Width="400px" BehaviorID="_content_VCETxtFechaViaje">
</ajax:ValidatorCalloutExtender>
</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>
<div class="row my-1" id="DivAF" runat="server">
<label class="col-md-4">Unidad</label>

View File

@@ -24,12 +24,27 @@ Partial Class ListadoViajes
ViewState("Ruta") = value
End Set
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
#Region "Carga Página"
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
CveTipoActivoFijo = 181 'Autobuses
CargaDatos()
InicializaCombos()
End If
@@ -69,6 +84,7 @@ Partial Class ListadoViajes
End If
ObjContratos.Dispose()
GvContratos.DataBind()
UpDatos.Update()
End Sub
#End Region
@@ -94,7 +110,7 @@ Partial Class ListadoViajes
BtnGuardar.Text = "Agregar"
ModalLabel.InnerHtml = "Agregar Nuevo Viaje"
DdlTipoAF.SelectedValueExist(-1)
'DdlTipoAF.SelectedValueExist(-1)
DdlAF.SelectedValueExist(-1)
DdlChofer.SelectedValueExist(-1)
DdlChofer2.SelectedValueExist(-1)
@@ -144,7 +160,7 @@ Partial Class ListadoViajes
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,
-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()
ErrorProceso = True
Exit For
@@ -192,14 +208,14 @@ Partial Class ListadoViajes
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,
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
End If
Else
'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,
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
End If
End If
@@ -262,15 +278,15 @@ Partial Class ListadoViajes
Private Sub CargaUnidades()
Dim dttipoaf As DataTable = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa).FiltraParametros("MedidaVehicularClave IN (2,3)")
DdlTipoAF.DataSource = dttipoaf
DdlTipoAF.DataBind()
DdlTipoAF.Items.Insert(0, New ListItem("-", "-1"))
'Dim dttipoaf As DataTable = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa).FiltraParametros("MedidaVehicularClave IN (2,3)")
'DdlTipoAF.DataSource = dttipoaf
'DdlTipoAF.DataBind()
'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()
End Sub
Private Sub CargaChoferes()
@@ -299,50 +315,5 @@ Partial Class ListadoViajes
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

View File

@@ -710,7 +710,11 @@ Partial Class Ventas_ActualizarPrecios
DtExcel.Columns.Add(New DataColumn("Código CPK", GetType(String)))
End If
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then 'Empresa Acumuladores
'If UsuarioActual.Empresa.Funcionalidad(531) = "1" Or UsuarioActual.Empresa.Funcionalidad(382) = "1" Then 'Empresa Acumuladores
'End If
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Or UsuarioActual.Empresa.Funcionalidad(531) = "1" Or UsuarioActual.Empresa.Funcionalidad(382) = "1" Then '
DtExcel.Columns.Add(New DataColumn("Número de parte", GetType(String)))
End If
@@ -744,6 +748,9 @@ Partial Class Ventas_ActualizarPrecios
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then 'Empresa Acumuladores
NewRow("Código CPK") = Row("NumeroParte")
End If
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Or UsuarioActual.Empresa.Funcionalidad(531) = "1" Or UsuarioActual.Empresa.Funcionalidad(382) = "1" Then '
NewRow("Número de parte") = Row("NumeroParte")
End If
NewRow("Producto/Servicio") = Row("PS")
NewRow("Clasificación") = Row("Clasificacion")

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

@@ -8591,6 +8591,10 @@ Partial Class Ventas
DdlNCFactura.SelectedValueExist(pCveVenta)
DdlNCFactura.Enabled = False
If ObjFacturaNC IsNot Nothing AndAlso ObjFacturaNC.CveLineaAdicional > 0 Then
DdlLineaAdicional.SelectedValueExist(ObjFacturaNC.CveLineaAdicional)
End If
End If
Else
@@ -14442,6 +14446,13 @@ Partial Class Ventas
CveAlmacenTraspasoDestino = -1
End If
Dim CveLAdicional = DdlLineaAdicional.SelectedValue.ToEntero()
If ObjFacturaNC IsNot Nothing Then
If NuevaFactura = 1 AndAlso ObjFacturaNC.CveLineaAdicional > 0 Then
CveLAdicional = ObjFacturaNC.CveLineaAdicional
End If
End If
If Not ObjVentas.AddVenta(factura.TipoDocto, factura.Folio, factura.CveCliente, factura.CveClienteSucursal, factura.SubTotalTC, factura.DescuentoTC,
factura.AmortizacionTC, factura.IVATC, factura.RetIVATC, factura.RetISRTC,
@@ -14459,7 +14470,7 @@ Partial Class Ventas
DiasCredito:=factura.DiasCredito, EsDiasCreditoFijo:=factura.EsDiasCreditoFijo, AnticipoEspecial:=If(TrAntEspecial.Visible, ChkAntEspecial.Checked, False),
Kilometraje:=TxtKilometraje.Text.ToDouble, EsAmortizacion:=EsNCAmortizacion, CveTipoRetencion:=factura.CveTipoRetencion, CorreoNotificacion:=TxtCorreoNotificaciones.Text,
FormaPaqueteria:=RblPaqueteria.SelectedValue.ToEntero, FacturarSucursal:=factura.FacturarSucursal, VentaDesglosaIEPS:=factura.VentaDesglosaIEPS, RFCReceptor:=RFCReceptor, Adjunto:=Adjunto, DevolucionImportePagado:=factura.DevolucionImportePagado, EsGarantia:=factura.EsGarantia, ServicioDomicilio:=TrServicioDomicilio.Visible,
CveLineaAdicional:=DdlLineaAdicional.SelectedValue.ToEntero(), DescripcionVenta:=DescripcionVenta,
CveLineaAdicional:=CveLAdicional, DescripcionVenta:=DescripcionVenta,
CveMedico:=CveMedico, CveProcedimiento:=CveProcedimiento, CveTipoVenta:=CveTipoVentaGuardar, RequiereOS:=ChkRequiereTecnico.Checked, FechaParaSurtir:=factura.FechaParaSurtir,
Paciente:=TxtPaciente.Text, Episodio:=TxtEpisodio.Text, CveMotivoDevolucion:=CveMotivoDevolucion, CveCobranzaEstatusTurno:=DdlGestionCobranza.SelectedValue.ToEntero, Addenda:=factura.Addenda) Then
ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")