This commit is contained in:
2024-01-22 18:51:26 -07:00
8 changed files with 2928 additions and 5969 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,6 @@
<%@ Page Language="VB" Title="Transportes V&A - Comprar Boleto" AutoEventWireup="false" MasterPageFile="~/Site.master" CodeFile="Boletos.aspx.vb"
Inherits="Boletos" %>
<%@ Page Language="VB" Title="Transportes V&A - Comprar Boleto" AutoEventWireup="false"
MasterPageFile="~/Site.master" CodeFile="Boletos.aspx.vb"
Inherits="Boletos" EnableEventValidation="true" %>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
Comprar Boleto
@@ -11,6 +12,10 @@
margin-block: 1rem;
}
.mx-1 {
margin: 0 2rem;
}
.disponible {
display: inline-block;
width: 45px;
@@ -56,6 +61,7 @@
text-align: center;
color: black
}
.btnChofer a {
color: #2C3E50;
}
@@ -67,14 +73,9 @@
</style>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="upPanel">
<ContentTemplate>
<div class="row">
<div class="col-md-8">
<div class="portlet light xspadding bordered">
<div class="portlet-title">
@@ -89,9 +90,13 @@
</div>
<div class="portlet-body form">
<div class="form-group form-md-line-input input-iconright ">
<asp:TextBox ID="TxtNombre" CssClass="form-control" runat="server" MaxLength="200" ClientIDMode="Static"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVTxtNombre" runat="server" ControlToValidate="TxtNombre" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<asp:TextBox ID="TxtNombre" CssClass="form-control" runat="server" MaxLength="200"
ClientIDMode="Static"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVTxtNombre" runat="server" ControlToValidate="TxtNombre"
CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre''</b> es necesario, por favor ingréselo."
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<label for="<%= TxtNombre.ClientID.ToString()%>">Nombre:</label>
<i></i>
</div>
@@ -119,18 +124,20 @@
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtCelular" runat="server" Width="100%" CssClass="form-control"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator12" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtCelular" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Celular''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="RequiredFieldValidator12" runat="server" CssClass="help-block errorimput"
ControlToValidate="TxtCelular" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Celular''</b> es necesario, por favor ingréselo."
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<label for="<%= TxtCelular.ClientID.ToString()%>">Celular:</label>
</div>
</div>
</div>
<div class="form-group form-md-line-input input-iconright ">
<asp:TextBox ID="TxtObservaciones" CssClass="form-control" runat="server" MaxLength="200" ClientIDMode="Static"></asp:TextBox>
<asp:TextBox ID="TxtObservaciones" CssClass="form-control" runat="server" MaxLength="200"
ClientIDMode="Static"></asp:TextBox>
<label for="<%= TxtObservaciones.ClientID.ToString()%>">Observaciones:</label>
<i></i>
</div>
</div>
</div>
@@ -141,6 +148,7 @@
<span class="caption-subject bold uppercase">Datos del Viaje</span>
</div>
</div>
<div class="portlet-body form">
<div class="row">
@@ -153,9 +161,10 @@
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlPartida" DataTextField="Destino"
<asp:DropDownList ID="DdlPartida" AppendDataBoundItems="true" DataTextField="Destino"
AutoPostBack="true"
DataValueField="CveDestino" Class="form-control input-sm select2me" OnSelectedIndexChanged="DdlPartida_SelectedIndexChanged"
DataValueField="CveDestino" Class="form-control input-sm select2me"
OnTextChanged="CotizarTarifa"
Width="200px" runat="server">
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVPartida" runat="server" ControlToValidate="DdlPartida"
@@ -175,10 +184,10 @@
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlDestino" DataTextField="Destino"
<asp:DropDownList ID="DdlDestino" AppendDataBoundItems="true" DataTextField="Destino"
AutoPostBack="true"
DataValueField="CveDestino" Class="form-control input-sm select2me"
OnSelectedIndexChanged="DdlDestino_SelectedIndexChanged"
OnTextChanged="CotizarTarifa"
Width="200px" runat="server">
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVDestino" runat="server" ControlToValidate="DdlDestino"
@@ -190,26 +199,26 @@
</div>
<div class="row">
<asp:Label runat="server" ID="TxtCosto" CssClass="text-success bold text-center"></asp:Label>
<asp:Label runat="server" ID="TxtCosto" CssClass="text-success bold mx-1"></asp:Label>
<br />
<div class="text-center">
<asp:Button ID="BtnGuardar" Visible="False" OnClick="AddBoleto" runat="server" CssClass="btn btn-success margin-top-15"
<asp:Button ID="BtnGuardar" Visible="False" OnClick="AddBoleto" runat="server" CssClass="btn btn-success "
Text="Comprar Boleto"
ValidationGroup="GrpGuardar"></asp:Button>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</div>
<div class="col-md-4">
<div class="portlet light xspadding bordered margin-bottom-10">
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UPPAsientos">
<ContentTemplate>
<table>
<tbody>
<tr>
@@ -217,7 +226,6 @@
<asp:LinkButton ID="chofer" runat="server"
Text="<i class='fa fa-user'><br/>Chofer</i>" />
</td>
<td colspan="3"></td>
</tr>
<tr>
<td>
@@ -461,10 +469,6 @@
</tbody>
</table>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</div>
</ContentTemplate>

View File

@@ -20,7 +20,6 @@ Partial Class Boletos
ViewState("Importe") = value
End Set
End Property
Private Property CveViaje As Integer
Get
Return ViewState("CveViaje").ToString().ToEntero
@@ -68,7 +67,6 @@ Partial Class Boletos
'Boletos Vendidos
Dim dt As DataTable
If ObjViaje.GetViajesPasajeros(CveViaje, Estatus:=1) Then 'Poner párametro para estatus y cancelado de viajes
dt = ObjViaje.DtResultados
dt = ObjViaje.DtResultados
Dim cph As ContentPlaceHolder = CType(Me.Master.FindControl("C"), ContentPlaceHolder)
For Each dr As DataRow In dt.Rows
@@ -90,7 +88,7 @@ Partial Class Boletos
End Sub
Private Sub CargaDestinos()
Protected Sub CargaDestinos()
Dim ObjDestinos As New ClsTransportes()
If ObjDestinos.GetDestinos(CveRuta:=CveRuta) Then
@@ -108,7 +106,7 @@ Partial Class Boletos
End If
ObjDestinos.Dispose()
End Sub
Private Sub CotizarTarifa()
Protected Sub CotizarTarifa(sender As Object, e As EventArgs)
If DdlDestino.SelectedValue <> "" And DdlPartida.SelectedValue <> "" Then
Dim ObjDestinos As New ClsTransportes()
@@ -169,6 +167,8 @@ Partial Class Boletos
TxtVisa.Text = ""
TxtCelular.Text = ""
TxtObservaciones.Text = ""
AsientoSeleccionado = ""
upPanel.Update()
End If
Catch ex As Exception
ObjTransporte.RollBack()
@@ -181,10 +181,10 @@ Partial Class Boletos
Protected Sub DdlPartida_SelectedIndexChanged(sender As Object, e As EventArgs)
CotizarTarifa()
CotizarTarifa(sender, e)
End Sub
Protected Sub DdlDestino_SelectedIndexChanged(sender As Object, e As EventArgs)
CotizarTarifa()
CotizarTarifa(sender, e)
End Sub
End Class

View File

@@ -12,10 +12,6 @@
margin-block: .5rem;
}
.fecha {
padding: 3px;
}
.masivo {
color: green;
}
@@ -223,12 +219,13 @@
</div>
</div>
<div class="row my-1 truncate">
<label class="col-md-4 input-group date date-picker " data-date-format="dd/mm/yyyy">
Fecha Viaje:</label>
<div class="col-md-8 fecha">
<div class="input-group input-sm input-small date date-picker">
<asp:TextBox ID="TxtFechaViaje" runat="server" CssClass="form-control" CausesValidation="True"
<div class="row margin-bottom-5">
<label class="col-md-4">
<asp:Label runat="server" Text="Fecha Viaje:"></asp:Label></label>
<div class="col-md-8">
<div class="">
<asp:TextBox ID="TxtFechaViaje" runat="server" Class="form-control input-sm select2me"
Width="200px" CausesValidation="True"
type="date"
MaxLength="10">
</asp:TextBox>

View File

@@ -2722,7 +2722,7 @@ Partial Class Ventas
If Request("CveManifiesto") IsNot Nothing AndAlso IsNumeric(Request("CveManifiesto")) AndAlso Request("CveManifiesto").ToEntero() > 0 Then
Using ObjCGame As New ClsCGame()
If ObjCGame.ManifiestoGet(Request("CveManifiesto").ToEntero(), -1, -1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveEmpresa, "-1", "-1") Then
If ObjCGame.ManifiestoGet(Request("CveManifiesto").ToEntero(), -1, -1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveEmpresa, "-1", "-1") AndAlso ObjCGame.DtResultados.Rows.Count > 0 Then
DdlSubProyectoDatos.SelectedValueExist(ObjCGame.DtResultados.Rows(0)("CveSubProyecto").ToString())
End If
@@ -2733,6 +2733,10 @@ Partial Class Ventas
End If
End Using
If AplicaComercioExterior Then
CargaGvComercioExterior()
End If
End If
If Request("CveEmbarqueManifiesto") IsNot Nothing AndAlso IsNumeric(Request("CveEmbarqueManifiesto")) AndAlso Request("CveEmbarqueManifiesto").ToEntero() > 0 Then
@@ -8294,6 +8298,7 @@ Partial Class Ventas
End Sub
Protected Sub GvPS_RowUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvPS.RowUpdating
'Dim TipoDescuento As Integer
Dim Cantidad, PU, CantidadInventario As Decimal
Dim ObjDescuento As New Modelos.VentaDescuentos
Dim CuentaPredial As String
@@ -8326,6 +8331,7 @@ Partial Class Ventas
End If
Dim CantidadOriginal As Decimal = GvPS.Rows(e.RowIndex).DataKey("Cantidad").ToDecimal()
Dim TotalOriginal As Decimal = GvPS.Rows(e.RowIndex).DataKey("Total").ToDecimal()
Dim DatarowPS As DataRow = Nothing
DatarowPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=TmpDT.Rows(e.RowIndex)("CvePS").ToString().ToEntero()).FiltroPrimero("") ' Estado = -1
@@ -8631,6 +8637,30 @@ Partial Class Ventas
ObjDescuento.Consec = TmpDT.Rows(e.RowIndex)("Consec").ToString().ToEntero()
End If
'RECALCULA LA CANTIDAD DE CONVERSION
If CantidadOriginal <> Cantidad Then
Dim CantidadConversion As Decimal = TmpDT.Rows(e.RowIndex)("CantidadConversion").ToString().ToDecimal()
If AplicaComercioExterior Then
'SI NO VIENE DE MANIFIESTO UTILIZA EL PESO DEL PRODUCTO
If Request("CveManifiesto") Is Nothing Then
If DrPS("PesoKg").ToString().ToDecimal() > 0 Then
CantidadConversion = Cantidad * DrPS("PesoKg").ToString().ToDecimal()
Else
CantidadConversion = Cantidad
End If
Else
Dim TotalNuevo As Decimal = TmpDT.Rows(e.RowIndex)("Total").ToString().ToDecimal()
Dim PorcentajeConversion As Decimal = CantidadConversion / TotalOriginal
CantidadConversion = TotalNuevo * PorcentajeConversion
End If
Else
CantidadConversion = Cantidad
End If
TmpDT.Rows(e.RowIndex)("CantidadConversion") = CantidadConversion
End If
DrPS = Nothing
@@ -18466,7 +18496,7 @@ Partial Class Ventas
'SI NO SE UTILIZA LA CONVERSION, UTILIZA LA CANTIDAD
If CantidadConversion = 0 Then
If DrPS("PesoKg").ToString().ToDecimal() > 0 Then
CantidadConversion = DrPS("PesoKg").ToString().ToDecimal()
CantidadConversion = Cantidad * DrPS("PesoKg").ToString().ToDecimal()
Else
CantidadConversion = Cantidad
End If
@@ -29688,9 +29718,9 @@ Partial Class Ventas
Protected Sub GvComercioExterior_RowDataBound(sender As Object, e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then
Dim CantidadConversion = CDbl(e.Row.DBCampo("CantidadConversion"))
Dim CantidadBase = CDbl(e.Row.DBCampo("Cantidad"))
Dim PUBase = CDbl(e.Row.DBCampo("PU"))
Dim CantidadConversion = e.Row.DBCampo("CantidadConversion").ToDecimal()
Dim CantidadBase = e.Row.DBCampo("Cantidad").ToDecimal()
Dim PUBase = e.Row.DBCampo("PU").ToDecimal()
Dim TotalUSD = (CantidadBase * PUBase)