Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -47,6 +47,11 @@ Public Class CalendarEvent
|
||||
Public Property SerieFolioCompra As String
|
||||
Public Property CveVenta As Integer
|
||||
Public Property SerieFolioVenta As String
|
||||
|
||||
Public Property CveVentaRemision As Integer = -1
|
||||
Public Property RemisionSerieFolio As String = ""
|
||||
Public Property RemisionSaldo As Decimal = -1
|
||||
|
||||
Public Property CveActivoFijo As Integer
|
||||
Public Property CveTipoAF As Integer
|
||||
|
||||
@@ -64,6 +69,7 @@ Public Class CalendarEvent
|
||||
|
||||
Public Property CveMoneda As Integer
|
||||
Public Property Moneda As String
|
||||
|
||||
Public Property NumChoferes As Integer = 1
|
||||
Public Property TipoEstatus As Integer = -1
|
||||
|
||||
End Class
|
||||
|
||||
@@ -193,6 +193,7 @@ Public Class ClsContratos
|
||||
Public Property CvePartida As Integer
|
||||
Public Property CveDestino As Integer
|
||||
Public Property CveMasivo As Integer
|
||||
Public Property NumChoferes As Integer = 1
|
||||
#End Region
|
||||
|
||||
#Region " C O N T R A T O S "
|
||||
@@ -318,7 +319,8 @@ Public Class ClsContratos
|
||||
Me.CantidadPasajeros = Data.Rows(0)("CantidadPasajeros").ToString.ToEntero
|
||||
Me.CvePartida = Data.Rows(0)("CvePartida").ToString.ToEntero
|
||||
Me.CveDestino = Data.Rows(0)("CveDestino").ToString.ToEntero
|
||||
Me.CveMasivo = Data.Rows(0)("CveMasivo").ToString.ToEntero
|
||||
Me.CveMasivo = Data.Rows(0)("CveMasivo").ToString.ToEntero
|
||||
Me.NumChoferes = Data.Rows(0)("NumChoferes").ToString.ToEntero
|
||||
|
||||
End If
|
||||
Retorno = True
|
||||
@@ -423,7 +425,8 @@ Public Class ClsContratos
|
||||
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 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 = Nothing) As Boolean
|
||||
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
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Con_ContratosUpdate")
|
||||
@@ -487,6 +490,7 @@ Public Class ClsContratos
|
||||
.Add("@CvePartida", SqlDbType.Int).Value = CvePartida
|
||||
.Add("@CveDestino", SqlDbType.Int).Value = CveDestino
|
||||
.Add("@CveMasivo", SqlDbType.Int).Value = CveMasivo
|
||||
.Add("@NumChoferes", SqlDbType.Int).Value = NumChoferes
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
@@ -684,7 +688,7 @@ Public Class ClsContratos
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetContratosValUnidadesAgendadas(CveAF As Integer, FechaInicial As DateTime, FechaFinal As DateTime, CveEmpresa As Integer, CveContrato As Integer) As Boolean
|
||||
Public Function GetContratosValUnidadesAgendadas(CveAF As Integer, FechaInicial As DateTime, FechaFinal As DateTime, CveEmpresa As Integer, CveContrato As Integer, Optional Opcion As Integer = 1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Con_ContratosValUnidadesAgendadasGet")
|
||||
|
||||
@@ -694,6 +698,7 @@ Public Class ClsContratos
|
||||
.Add("@FechaFinal", SqlDbType.DateTime).Value = FechaFinal
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveContrato", SqlDbType.Int).Value = CveContrato
|
||||
.Add("@Opcion", SqlDbType.Int).Value = Opcion
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
@@ -7881,7 +7881,7 @@ Public Class ClsPaginas
|
||||
params.Add(New ReportParameter("TipoOC", If(ObjOC.Tipo = "OC", "Orden de Compra", "Requisición")))
|
||||
params.Add(New ReportParameter("UsoCFDI", ObjOC.UsoCFDI))
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(72, 80, 172) Or (UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso UsuarioActual.CveEmpresa = 197) Then
|
||||
If UsuarioActual.CveEmpresa.Contiene(72, 80, 172) Or (UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso UsuarioActual.CveEmpresa.Contiene(197, 189)) Then
|
||||
params.Add(New ReportParameter("FolioAdicional", dtOC(0)("FolioAdicional").ToString))
|
||||
params.Add(New ReportParameter("Vendedor", dtOC(0)("Vendedor").ToString))
|
||||
params.Add(New ReportParameter("Observacion", dtOC(0)("PrioridadObservacion").ToString))
|
||||
|
||||
@@ -3401,6 +3401,7 @@ Public Class ClsVentas
|
||||
.Add("@EsFilial", SqlDbType.Int).Value = EsFilial
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.SelectCommand.CommandTimeout = 0
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
|
||||
@@ -552,13 +552,28 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
cevent.Anticipo = dr("ImporteMin").ToString.ToDecimal
|
||||
cevent.CveActivoFijo = dr("CveAF").ToString.ToEntero
|
||||
cevent.CveTipoAF = dr("CveTipoAF").ToString.ToEntero
|
||||
cevent.backgroundColor = dr("BackgroundColor").ToString
|
||||
cevent.CantidadPasajeros = dr("CantidadPasajeros").ToString
|
||||
cevent.NumeroContrato = dr("NumeroContrato").ToString
|
||||
cevent.Observaciones = dr("Observaciones").ToString
|
||||
cevent.CveSubProyecto = dr("CveSubProyecto").ToString.ToEntero
|
||||
cevent.CveMoneda = dr("CveMoneda").ToString.ToEntero
|
||||
cevent.Moneda = dr("Moneda").ToString
|
||||
cevent.NumChoferes = dr("NumChoferes").ToString.ToEntero
|
||||
|
||||
cevent.CveVentaRemision = dr("CveVentaRemision").ToString.ToEntero
|
||||
cevent.RemisionSerieFolio = dr("RemisionSerieFolio").ToString
|
||||
cevent.RemisionSaldo = dr("RemisionSaldo").ToString.ToDecimal
|
||||
cevent.TipoEstatus = dr("TipoEstatus").ToString.ToEntero
|
||||
cevent.backgroundColor = dr("backgroundColor").ToString
|
||||
|
||||
Dim BGC_Atencion As String = "#bc9b1b"
|
||||
If cevent.TipoEstatus <> 4 AndAlso cevent.TipoEstatus <> 3 Then
|
||||
If dr("CveChofer").ToString.ToEntero <= 0 Or (dr("CveChofer2").ToString.ToEntero <= 0 And cevent.NumChoferes = 2) Or dr("CveAF").ToString.ToEntero <= 0 Then
|
||||
cevent.backgroundColor = BGC_Atencion
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
If Not cevent.recurrenciatipo > 0 Then
|
||||
|
||||
@@ -446,10 +446,10 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 11 --%>
|
||||
<asp:TemplateField Visible="false">
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="60px">
|
||||
<HeaderTemplate>% Desc.</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtDescuento" Width="40px" runat="server" Style="text-align: right;" MaxLength="6"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtDescuento" Width="60px" runat="server" Style="text-align: right;" MaxLength="15"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtDescuento" ValidChars="1234567890+." FilterType="Custom" />
|
||||
|
||||
</ItemTemplate>
|
||||
@@ -721,63 +721,36 @@
|
||||
//}
|
||||
}
|
||||
|
||||
function calculaDescuentoEscalonado(saldo, TxtDescuento, TxtAbonar, chk,Text,Tipo) {
|
||||
|
||||
let idTxtDescuento = TxtDescuento.id
|
||||
let idTxtAbonar = TxtAbonar.id
|
||||
|
||||
let descuentoValue = $("#" + idTxtDescuento).val().trim();
|
||||
let descuentoParts = descuentoValue.split('+');
|
||||
let abonarConDescuento = 0.0;
|
||||
|
||||
|
||||
if (descuentoParts.length === 1) {
|
||||
|
||||
|
||||
if (isNaN(parseFloat(descuentoParts[0])) || descuentoParts[0] == "0") {
|
||||
$("#" + idTxtAbonar).val(saldo.toFixed(2));
|
||||
FnCambia(chk, TxtAbonar, saldo, 1, Text, Tipo);
|
||||
|
||||
} else {
|
||||
let descuento = saldo * (parseFloat(descuentoParts[0]) / 100);
|
||||
abonarConDescuento = saldo - descuento;
|
||||
$("#" + idTxtAbonar).val(FormatoNumero(abonarConDescuento.toFixed(2),2));
|
||||
FnCambia(chk, TxtAbonar, saldo, 1, Text, Tipo);
|
||||
}
|
||||
|
||||
} else if (descuentoParts.length === 2) {
|
||||
|
||||
if (isNaN(parseFloat(descuentoParts[0]))) {
|
||||
$("#" + idTxtAbonar).val("");
|
||||
FnCambia(chk, TxtAbonar, saldo, 1, Text, Tipo);
|
||||
return;
|
||||
}
|
||||
|
||||
let descuento1 = saldo * (parseFloat(descuentoParts[0]) / 100);
|
||||
|
||||
if (isNaN(parseFloat(descuentoParts[1]))) {
|
||||
|
||||
let descuento = saldo * (parseFloat(descuentoParts[0]) / 100);
|
||||
abonarConDescuento = saldo - descuento;
|
||||
$("#" + idTxtAbonar).val(FormatoNumero(abonarConDescuento.toFixed(2), 2));
|
||||
FnCambia(chk, TxtAbonar, saldo, 1, Text, Tipo);
|
||||
return;
|
||||
}
|
||||
|
||||
let descuento = saldo * (parseFloat(descuentoParts[0]) / 100);
|
||||
abonarConDescuento = saldo - descuento;
|
||||
|
||||
let abonarConDescuento2 = abonarConDescuento - (abonarConDescuento * (parseFloat(descuentoParts[1]) / 100));
|
||||
|
||||
$("#" + idTxtAbonar).val(FormatoNumero(abonarConDescuento2.toFixed(2), 2));
|
||||
FnCambia(chk, TxtAbonar, saldo, 1, Text, Tipo);
|
||||
|
||||
|
||||
} else {
|
||||
$("#" + idTxtAbonar).val("");
|
||||
FnCambia(chk, TxtAbonar, saldo, 1, Text, Tipo);
|
||||
}
|
||||
function calculaDescuentoEscalonado(saldo, TxtDescuento, TxtAbonar, chk, Text, Tipo) {
|
||||
let idTxtDescuento = TxtDescuento.id;
|
||||
let idTxtAbonar = TxtAbonar.id;
|
||||
|
||||
let descuentoValue = $("#" + idTxtDescuento).val().trim();
|
||||
let descuentoParts = descuentoValue.split('+');
|
||||
let abonarConDescuento = saldo;
|
||||
|
||||
if (descuentoParts.length === 0 || (descuentoParts.length === 1 && descuentoParts[0] === "")) {
|
||||
$("#" + idTxtAbonar).val(saldo.toFixed(2));
|
||||
FnCambia(chk, TxtAbonar, saldo, 1, Text, Tipo);
|
||||
return;
|
||||
}
|
||||
|
||||
for (let i = 0; i < descuentoParts.length; i++) {
|
||||
let descuentoPart = descuentoParts[i].trim();
|
||||
|
||||
if (isNaN(parseFloat(descuentoPart)) || descuentoPart === "0") {
|
||||
continue;
|
||||
}
|
||||
|
||||
let descuento = abonarConDescuento * (parseFloat(descuentoPart) / 100);
|
||||
abonarConDescuento -= descuento;
|
||||
}
|
||||
|
||||
$("#" + idTxtAbonar).val(FormatoNumero(abonarConDescuento.toFixed(2), 2));
|
||||
FnCambia(chk, TxtAbonar, saldo, 1, Text, Tipo);
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
@@ -4227,12 +4227,14 @@ Partial Class Compras_Compras
|
||||
|
||||
Protected Sub BtnGuardar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BtnGuardar.Click
|
||||
|
||||
|
||||
|
||||
'------------------ INICIA VALIDACIONES ------------------
|
||||
|
||||
If Not ValidaPresupuesto(2) Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
'------------------ INICIA VALIDACIONES ------------------
|
||||
|
||||
If MetodoPagoOC = 0 AndAlso RBLPago.SelectedValue.ToEntero <> 2 AndAlso LblSaldoFactura.Text.ToDecimal > 0 Then
|
||||
Alert("La orden de compra se definió de contado, favor de especificar la compra de contado.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
@@ -4689,6 +4691,11 @@ Partial Class Compras_Compras
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If DdlMoneda.SelectedValue.ToEntero > 1 And TxtTC.Text.ToDecimal <= 10 Then
|
||||
Alert("Al seleccionar dólares, el tipo de cambio debe ser superior a 10.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
'------------------TERMINA VALIDACIONES------------------
|
||||
|
||||
|
||||
@@ -8552,7 +8559,7 @@ Partial Class Compras_Compras
|
||||
If ArrAnticipos.Count > 0 Then
|
||||
For Each Ant As Compras_Compras.Anticipos In ArrAnticipos
|
||||
'ImporteAnticipo += (Ant.Importe + Ant.ImporteComision)
|
||||
ImporteAnticipo += (Ant.Importe)
|
||||
ImporteAnticipo += ((Ant.Importe) + Ant.ImporteComision)
|
||||
Next
|
||||
End If
|
||||
|
||||
@@ -17103,7 +17110,7 @@ Partial Class Compras_Compras
|
||||
'HdnIVAPS.Value = If(PS.Rows(0)("IVA").ToString = "-1", ViewState("IVA"), PS.Rows(0)("IVA").ToString).ToString
|
||||
ViewState("IVAPS") = PS("IVA").ToString
|
||||
If ViewState("IVAPS").ToString.ToEntero() = -1 Then
|
||||
Dim Drr As DataRow = GlobalDTSubProyectos(-1, DdlSubProyecto.SelectedValue.ToEntero())(0)
|
||||
Dim Drr As DataRow = GlobalDTSubProyectos(-1, DdlSubProyecto.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa)(0)
|
||||
ViewState("IVAPS") = Drr("IVA").ToString().ToDouble()
|
||||
DdlProyecto.SelectedValueExist(Drr("CveProyecto"))
|
||||
|
||||
|
||||
@@ -5114,11 +5114,11 @@
|
||||
<asp:Label runat="server" ID="Label12" Text="Personalizar"></asp:Label>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="modal-body" >
|
||||
|
||||
|
||||
|
||||
<div class="portlet light bordered xspadding" id="portletpersonalizarxls" style="display:none;">
|
||||
<div class="portlet light bordered xspadding" id="portletpersonalizarxls" >
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
@@ -5130,28 +5130,46 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="ddltipoPersonalizar" runat="server" CssClass="form-control Widthall select2me" AutoPostBack="true" OnSelectedIndexChanged="ddltipoPersonalizar_SelectedIndexChanged" Style="width: 100%"
|
||||
DataTextField="Columna" DataValueField="ColumnaDB" ValidationGroup="GrpGuardarOrder">
|
||||
<asp:ListItem Selected="True" Text="campo Libre" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Percepciones" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="deducciones" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="obligacion" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Datos Personal" Value="4"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:Label runat="server" Text="Tipo:" AssociatedControlID="ddltipoPersonalizar"></asp:Label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<%--<asp:DropDownList ID="DropDownList3" runat="server" CssClass="form-control Widthall select2me" ValidationGroup="GrpGuardarOrder" Style="width: 100%">
|
||||
<asp:ListItem Text="Mostrar" Value="1" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Text="Ocultar" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>--%>
|
||||
<asp:TextBox ID="TxtTitulo" CssClass="form-control" runat="server"></asp:TextBox>
|
||||
<asp:Label Text="Titulo:" AssociatedControlID="TxtTitulo" runat="server"></asp:Label>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6" runat="server" id="div3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlMOPXColumna" runat="server" CssClass="form-control Widthall select2me" Style="width: 100%"
|
||||
DataTextField="Columna" DataValueField="ColumnaDB" ValidationGroup="GrpGuardarOrder">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:Label ID="Label13" runat="server" Text="Columna:" AssociatedControlID="DdlMOPXColumna"></asp:Label>
|
||||
<asp:Label runat="server" Text="Columna:" AssociatedControlID="DdlMOPXColumna"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<%--<asp:DropDownList ID="DropDownList3" runat="server" CssClass="form-control Widthall select2me" ValidationGroup="GrpGuardarOrder" Style="width: 100%">
|
||||
<asp:ListItem Text="Mostrar" Value="1" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Text="Ocultar" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:Label ID="Label14" Text="Tipo:" AssociatedControlID="DdlMOTipo" runat="server"></asp:Label>--%>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="text-right">
|
||||
|
||||
@@ -117,7 +117,13 @@
|
||||
<div class="portlet-body rowpadding">
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4 bold text-primary">Folio</label>
|
||||
<asp:Label class="col-md-8" runat="server" ID="LbFolio" Text=""></asp:Label>
|
||||
<asp:Label class="col-md-2" runat="server" ID="LbFolio" Text=""></asp:Label>
|
||||
<div class="col-md-2">
|
||||
<asp:HyperLink runat="server" Text="" Target="_blank" id="HypRemision" CssClass="Texto"></asp:HyperLink>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<asp:Label runat="server" ID="LblSaldo"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
|
||||
@@ -165,6 +165,16 @@ Partial Class RepContratoDetalle
|
||||
CveContratoEstatus = Contrato.Rows(0)("CveContratosEstatus").ToString.ToEntero
|
||||
DdlSubProyecto.SelectedValueExist(Contrato.Rows(0)("CveSubProyecto").ToString)
|
||||
|
||||
|
||||
HypRemision.Text = Contrato.Rows(0)("RemisionSerieFolio").ToString
|
||||
HypRemision.NavigateUrl = $"/Ventas/Ventas.aspx?CveVenta={ Contrato.Rows(0)("CveVentaRemision").ToString}"
|
||||
|
||||
If Contrato.Rows(0)("RemisionSaldo").ToString.ToDecimal > 0 Then
|
||||
LblSaldo.Text = $"Saldo { Contrato.Rows(0)("RemisionSaldo").ToString.ToDecimal.ToString("###,###,###.00")}"
|
||||
Else
|
||||
LblSaldo.Text = ""
|
||||
End If
|
||||
|
||||
If Not IsDBNull(ObjContratos.Archivo) AndAlso ObjContratos.Archivo <> "" AndAlso ObjContratos.Archivo <> "-1" AndAlso ObjContratos.Archivo <> $"{ObjContratos.CveContrato}." Then
|
||||
ViewState("FUrl") = Path.Combine(UsuarioActual.Empresa.Ruta, "CONTRATOS", ObjContratos.Archivo)
|
||||
BtnDescargar.Visible = True
|
||||
|
||||
@@ -104,6 +104,9 @@ Partial Class ListadoContratos
|
||||
Dim Filename As String = ""
|
||||
Dim folderContratosPath As String = Path.Combine(UsuarioActual.Empresa.Ruta, "Contratos")
|
||||
|
||||
Dim CveVentaRemision As Integer = -1
|
||||
Dim SerieFolioRemision As String = ""
|
||||
|
||||
If Not Directory.Exists(folderContratosPath) Then
|
||||
Directory.CreateDirectory(folderContratosPath)
|
||||
End If
|
||||
@@ -163,6 +166,23 @@ Partial Class ListadoContratos
|
||||
End If
|
||||
Anexo.Text = ""
|
||||
|
||||
If ErrorProceso = False Then
|
||||
|
||||
Dim Respuesta As New RespuestaFacturacion()
|
||||
Dim CvePS As Integer = 907783
|
||||
Respuesta = GeneraRemision(CveContrato, LbFolio.Text, TxtImporte.Text.ToDecimal, CvePS, ObjContratos.IniciaTransacSQL)
|
||||
|
||||
If Respuesta.CveVenta > 0 Then
|
||||
CveVentaRemision = Respuesta.CveVenta
|
||||
SerieFolioRemision = Respuesta.SerieFolio
|
||||
ErrorProceso = False
|
||||
Else
|
||||
ErrorProceso = True
|
||||
Alert("se presento un error al generar la remisión", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
ErrorProceso = True
|
||||
End If
|
||||
@@ -177,7 +197,7 @@ Partial Class ListadoContratos
|
||||
|
||||
If Not ErrorProceso Then
|
||||
ObjContratos.Commit()
|
||||
Alert("Agregado Correctamente.")
|
||||
Alert($"Agregado Correctamente.<br> Remisión Generada <a target='_blank' class='Texto' href='/Ventas/Ventas.aspx?CveVenta={CveVentaRemision}' ><b>{SerieFolioRemision}</b></a>")
|
||||
Else
|
||||
ObjContratos.RollBack()
|
||||
Alert("Se presento un error al guardar el contrato.", TipoMensaje.MsgAdvertencia)
|
||||
@@ -287,4 +307,94 @@ Partial Class ListadoContratos
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "G E N E R A R E M I S O N"
|
||||
|
||||
|
||||
Private Function GeneraRemision(CveContrato As Integer, NumContrato As String, Importe As Decimal, CvePS As Integer, ByRef TransaccionSQL As SqlClient.SqlTransaction) As RespuestaFacturacion
|
||||
|
||||
Dim Respuesta As New RespuestaFacturacion()
|
||||
Dim CveRemisionGenerada As Integer = -1
|
||||
Dim ObjVentas As New ClsVentas(TransaccionSQL)
|
||||
Dim ProcesoOK As Boolean = True
|
||||
Dim CveSubProyecto As Integer = DdlSubProyectoModal.SelectedValue.ToEntero
|
||||
Dim CveMoneda As Integer = DdlMoneda.SelectedValue.ToEntero
|
||||
|
||||
Dim ObjFactura As Modelos.Factura = Modelos.Factura.CrearVentaNueva(UsuarioActual, CveSubProyecto, DdlClientes.SelectedValue.ToEntero, CveMoneda, "Rem")
|
||||
|
||||
If ObjFactura IsNot Nothing AndAlso ProcesoOK Then
|
||||
|
||||
ObjFactura.CveContrato = CveContrato
|
||||
ObjFactura.Observaciones = NumContrato
|
||||
|
||||
Dim TmpDTMat As New DataTable
|
||||
TmpDTMat.Columns.Add("Consec", GetType(Integer))
|
||||
TmpDTMat.Columns.Add("CvePS", GetType(Integer))
|
||||
TmpDTMat.Columns.Add("CveUM", GetType(Integer))
|
||||
TmpDTMat.Columns.Add("Cantidad", GetType(Integer))
|
||||
TmpDTMat.Columns.Add("PU", GetType(Decimal))
|
||||
TmpDTMat.Columns.Add("Lote", GetType(String))
|
||||
TmpDTMat.Columns.Add("FechaCaducidad", GetType(Date))
|
||||
TmpDTMat.Columns.Add("CveVentaDetalle", GetType(Integer))
|
||||
|
||||
|
||||
Dim SubTotal As Decimal = (Importe / (1 + 0.16)).ToDecimal
|
||||
|
||||
'Dim CvePS As Integer = 907783
|
||||
Dim CantidadRegistro As Decimal = 1
|
||||
Dim PorcentajeIVA As Decimal = 0.16D
|
||||
|
||||
Dim PU As Decimal = SubTotal
|
||||
Dim Descuento As Decimal = 0
|
||||
Dim Obs As String = NumContrato
|
||||
|
||||
|
||||
If CantidadRegistro > 0 Then
|
||||
If ObjFactura.AgregarPS(CvePS, CantidadRegistro, PU, Descuento, Obs, CveSubProyecto:=CveSubProyecto, PorcentajeIVA:=PorcentajeIVA) Then
|
||||
Dim drp As DataRow = TmpDTMat.NewRow
|
||||
drp("CvePS") = CvePS
|
||||
drp("Cantidad") = CantidadRegistro
|
||||
drp("PU") = PU
|
||||
TmpDTMat.Rows.Add(drp)
|
||||
Else
|
||||
Alert("Error al agregar producto", TipoMensaje.MsgAdvertencia)
|
||||
ProcesoOK = False
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If ProcesoOK Then
|
||||
ObjFactura.CalculaTotales()
|
||||
Dim Resp As New Modelos.Factura.MMensajeFactura
|
||||
Resp = ObjFactura.EmitirFactura(False, Transac:=TransaccionSQL)
|
||||
|
||||
If Resp.CveVenta > 0 Then
|
||||
Respuesta.CveVenta = Resp.CveVenta
|
||||
Respuesta.SerieFolio = Resp.SerieFolio
|
||||
Respuesta.dtdetalle = TmpDTMat
|
||||
Else
|
||||
ProcesoOK = False
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
ProcesoOK = False
|
||||
End If
|
||||
Return Respuesta
|
||||
|
||||
End Function
|
||||
|
||||
Friend Class RespuestaFacturacion
|
||||
Public Property CveVenta As Integer = -1
|
||||
Public Property SerieFolio As String = "-1"
|
||||
Public Property dtdetalle As DataTable = Nothing
|
||||
Public Sub New()
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
|
||||
@@ -207,8 +207,8 @@
|
||||
|
||||
<asp:GridView ID="GvContratos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se Encontró Contrato Registrado"
|
||||
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn miGrid"
|
||||
GridLines="None"
|
||||
data-sort="true" DataKeyNames="CveContrato, NumeroContrato, DescripcionContrato, Ubicacion, FechaInicial, FechaFinal, CveCliente, NombreComercial, CveTipoAF, Importe, ImporteMin, ImporteMax, Observaciones, CveAF, CveChofer, CveChofer2, CveContratosEstatus, CantidadPasajeros,CveMoneda,Moneda,CveSubProyecto">
|
||||
GridLines="None" data-sort="true"
|
||||
DataKeyNames="CveContrato,NumeroContrato,DescripcionContrato,Ubicacion,FechaInicial,FechaFinal,CveCliente,NombreComercial,CveTipoAF,Importe,ImporteMin,ImporteMax,Observaciones,CveAF,CveChofer,CveChofer2,CveContratosEstatus,CantidadPasajeros,CveMoneda,Moneda,CveSubProyecto,NumChoferes,CveVentaRemision,RemisionSerieFolio,RemisionSaldo,TipoEstatus">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Contrato">
|
||||
<ItemTemplate>
|
||||
@@ -336,9 +336,16 @@
|
||||
|
||||
<div class="modal-body">
|
||||
<div class="row my-1">
|
||||
|
||||
<label class="col-md-4 bold text-primary">Folio:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtFolio" runat="server" Width="100%"></asp:TextBox>
|
||||
<div class="col-md-2">
|
||||
<asp:TextBox ID="TxtFolio" runat="server" Width="80px"></asp:TextBox>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:HyperLink runat="server" Text="" Target="_blank" id="HypRemision" CssClass="Texto"></asp:HyperLink>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<asp:Label runat="server" ID="LblSaldo"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -421,7 +428,10 @@
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlTipoAF" DataValueField="CveTipoActivoFijo"
|
||||
DataTextField="TipoActivoFijo" Class="form-control input-inline"
|
||||
Width="100%" runat="server" Enabled="true">
|
||||
Width="100%" runat="server" Enabled="true"
|
||||
AutoPostBack="true"
|
||||
OnSelectedIndexChanged="DdlTipoAF_SelectedIndexChanged"
|
||||
>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
@@ -447,6 +457,13 @@
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Requiere Seguncdo Chofer</label>
|
||||
<div class="col-md-8" style="text-align:left!important">
|
||||
<asp:CheckBox runat="server" ID="chkSegundoChofer" AutoPostBack="true" OnCheckedChanged="chkSegundoChofer_CheckedChanged" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1" runat="server" id="DVChofer2">
|
||||
<label class="col-md-4">Chofer 2</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlChofer2" AppendDataBoundItems="true" DataValueField="CvePersonal"
|
||||
@@ -506,7 +523,10 @@
|
||||
<asp:UpdatePanel ID="UpCommando" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Button runat="server" ID="BtnModal" OnClick="MostrarModal"></asp:Button>
|
||||
<asp:HiddenField runat="server" ID="HdnCveContrato" Value="-1" ClientIDMode="Static" />
|
||||
<asp:HiddenField runat="server" ID="HdnCveContrato" Value="-1" ClientIDMode="Static" />
|
||||
|
||||
<asp:Button runat="server" ID="BtnDdlTipoAF" OnClick="BtnDdlTipoAF_Click" ClientIDMode="Static"></asp:Button>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
@@ -515,6 +535,18 @@
|
||||
|
||||
<asp:HiddenField runat="server" ID="HidCurrentMonth" ClientIDMode="Static" Value="-1" />
|
||||
<asp:HiddenField runat="server" ID="HidCurrentYear" ClientIDMode="Static" Value="-1" />
|
||||
|
||||
|
||||
|
||||
<asp:HiddenField runat="server" ID="HidCveTipoAF" Value="-1" ClientIDMode="Static" />
|
||||
|
||||
<asp:HiddenField runat="server" ID="HidNumChoferes" Value="-1" ClientIDMode="Static" />
|
||||
<asp:HiddenField runat="server" ID="HidRemisionSerieFolio" Value="-1" ClientIDMode="Static" />
|
||||
<asp:HiddenField runat="server" ID="HidCveVentaRemision" Value="-1" ClientIDMode="Static" />
|
||||
<asp:HiddenField runat="server" ID="HidRemisionSaldo" Value="-1" ClientIDMode="Static" />
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="JS" runat="Server">
|
||||
@@ -782,8 +814,18 @@
|
||||
$('#<%=DdlTipoAF.ClientID%>').val(event.CveTipoAF);
|
||||
$('#<%=DdlSubProyectoModal.ClientID%>').val(event.CveSubProyecto);
|
||||
|
||||
$('#<%= HidCveTipoAF.ClientID%>').val( $('#<%=DdlTipoAF.ClientID%>').val() );
|
||||
$('#<%=BtnDdlTipoAF.ClientID%>').click();
|
||||
|
||||
// alert(event.Moneda);
|
||||
$('#HidNumChoferes').val(event.NumChoferes);
|
||||
|
||||
$('#HidRemisionSerieFolio').val(event.RemisionSerieFolio);
|
||||
$('#HidCveVentaRemision').val(event.CveVentaRemision);
|
||||
$('#HidRemisionSaldo').val(event.RemisionSaldo);
|
||||
|
||||
<%-- $('#HidRemision').text(event.RemisionSerieFolio);
|
||||
$('#HypRemision').attr('href', '/Ventas/Ventas.aspx?CveVenta=' + event.CveVentaRemision);
|
||||
$('#LblSaldo').text(event.RemisionSaldo.toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 }));--%>
|
||||
|
||||
|
||||
if (event.NombreComercial !== null) {
|
||||
@@ -793,7 +835,9 @@
|
||||
}
|
||||
|
||||
$('#HidModCveCliente').val(event.CveCliente);
|
||||
|
||||
$('#<%=BtnModal.ClientID%>').click();
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -941,6 +985,14 @@
|
||||
editable: true,
|
||||
minTime: "00:00:00",
|
||||
maxTime: "24:00:00",
|
||||
eventOverlap: false, // No permitir la superposición de eventos
|
||||
slotEventOverlap: false, // No permitir la superposición en vistas de agenda
|
||||
eventRender: function (event, element) {
|
||||
element.css({
|
||||
'margin-bottom': '1px', // Ajusta el valor según sea necesario
|
||||
'margin-left': '1px' // Ajusta el valor según sea necesario
|
||||
});
|
||||
},
|
||||
events: {
|
||||
url: '/Ashx/CargaEventos.ashx',
|
||||
type: 'GET',
|
||||
|
||||
@@ -202,30 +202,35 @@ Partial Class RepContratosCalendario
|
||||
End Sub
|
||||
|
||||
Private Sub OnRowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvContratos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
Dim BackgroundColor As String = DataBinder.Eval(e.Row.DataItem, "BackgroundColor").ToString()
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
Dim BackgroundColor As String = DataBinder.Eval(e.Row.DataItem, "BackgroundColor").ToString()
|
||||
e.Row.BackColor = Drawing.ColorTranslator.FromHtml(BackgroundColor)
|
||||
e.Row.Cells(1).Attributes.Add("data-order", e.Row.DBCampo("FechaInicial").ToDate.Ticks.ToString)
|
||||
|
||||
Dim BGC_Atencion As String = "#bc9b1b"
|
||||
Dim TipoEstatus As Integer = e.Row.DataKey("TipoEstatus").ToEntero
|
||||
|
||||
If TipoEstatus <> 4 AndAlso TipoEstatus <> 3 Then
|
||||
If e.Row.DataKey("CveChofer").ToEntero <= 0 Or (e.Row.DataKey("CveChofer2").ToEntero <= 0 And e.Row.DataKey("NumChoferes").ToEntero = 2) Or e.Row.DataKey("CveAF").ToEntero <= 0 Then
|
||||
e.Row.BackColor = Drawing.ColorTranslator.FromHtml(BGC_Atencion)
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub MostrarModal(sender As Object, e As System.EventArgs)
|
||||
|
||||
|
||||
Protected Sub UpdateContrato(sender As Object, e As EventArgs)
|
||||
|
||||
If HidModClienteNombre.Value = "" Then
|
||||
HidModClienteNombre.Value = GlobalDTCliente(UsuarioActual.CveEmpresa, -1, HidModCveCliente.Value.ToEntero).FiltroPrimeroValor("NombreComercial")
|
||||
Dim NumChoferes As Integer = If(chkSegundoChofer.Checked, 2, 1)
|
||||
|
||||
If NumChoferes = 2 AndAlso DdlChofer2.SelectedValue.ToEntero <= 0 Then
|
||||
Alert("Debe de seleccionar un segundo chofer.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
DdlClientes.SelectedText = HidModClienteNombre.Value
|
||||
DdlClientes.SelectedValue = HidModCveCliente.Value
|
||||
|
||||
DdlClientes.txtText.Value = HidModClienteNombre.Value
|
||||
DdlClientes.txtValue.Value = HidModCveCliente.Value
|
||||
|
||||
UpModal.Update()
|
||||
|
||||
RegistraScript("$('#ModalActualizar').modal('show');")
|
||||
End Sub
|
||||
|
||||
Protected Sub UpdateContrato(sender As Object, e As EventArgs)
|
||||
Dim ObjContratos As New ClsContratos
|
||||
|
||||
Dim DTAgendadados As New DataTable
|
||||
@@ -250,8 +255,12 @@ Partial Class RepContratosCalendario
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
If ObjContratos.UpdateContratos(CveContrato, TxtFolio.Text, TxtDescripcion.Text, "", -1, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", DdlSubProyectoModal.SelectedValue.ToEntero,
|
||||
-1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, -1, 0, CveContratoTipo:=34, CveContratosEstatus:=DdlEstatusContrato.SelectedValue.ToEntero, CveChofer:=DdlChofer.SelectedValue.ToEntero, CveChofer2:=DdlChofer2.SelectedValue.ToEntero, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CveAF:=DdlAF.SelectedValue.ToEntero, CantidadPasajeros:=TxtCantidadPasajeros.Text.ToEntero, Observaciones:=TxtObservaciones.Text.Trim) Then
|
||||
-1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, -1, 0, CveContratoTipo:=34,
|
||||
CveContratosEstatus:=DdlEstatusContrato.SelectedValue.ToEntero, CveChofer:=DdlChofer.SelectedValue.ToEntero, CveChofer2:=DdlChofer2.SelectedValue.ToEntero, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero,
|
||||
CveAF:=DdlAF.SelectedValue.ToEntero, CantidadPasajeros:=TxtCantidadPasajeros.Text.ToEntero, Observaciones:=TxtObservaciones.Text.Trim, NumChoferes:=NumChoferes) Then
|
||||
RegistraScript("$('#ModalActualizar').modal('hide');")
|
||||
Alert("Actualizado Correctamente.")
|
||||
End If
|
||||
@@ -263,8 +272,11 @@ Partial Class RepContratosCalendario
|
||||
InicializaCalendar()
|
||||
|
||||
End Sub
|
||||
Protected Sub UpdateModal(sender As Object, e As EventArgs)
|
||||
Protected Sub UpdateModal(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim NumChoferes As Integer = GvRow.DataKey("NumChoferes").ToEntero
|
||||
|
||||
TxtFolio.Text = GvRow.DataKey("NumeroContrato")
|
||||
TxtCantidadPasajeros.Text = GvRow.DataKey("CantidadPasajeros")
|
||||
DdlClientes.SelectedValue = GvRow.DataKey("CveCliente")
|
||||
@@ -274,18 +286,142 @@ Partial Class RepContratosCalendario
|
||||
TxtUbicacion.Text = GvRow.DataKey("Ubicacion")
|
||||
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")
|
||||
'Requeridos
|
||||
DdlAF.SelectedValueExist(GvRow.DataKey("CveAF"))
|
||||
TxtMoneda.Text = GvRow.DataKey("Moneda")
|
||||
'Requeridos
|
||||
|
||||
DdlChofer.SelectedValueExist(GvRow.DataKey("CveChofer"))
|
||||
DdlChofer2.SelectedValueExist(GvRow.DataKey("CveChofer2"))
|
||||
DdlChofer2.SelectedValueExist(GvRow.DataKey("CveChofer2"))
|
||||
|
||||
|
||||
chkSegundoChofer.Checked = If(NumChoferes = 2, True, False)
|
||||
|
||||
DdlEstatusContrato.SelectedValueExist(GvRow.DataKey("CveContratosEstatus"))
|
||||
DdlSubProyectoModal.SelectedValueExist(GvRow.DataKey("CveSubProyecto"))
|
||||
DdlSubProyectoModal.SelectedValueExist(GvRow.DataKey("CveSubProyecto"))
|
||||
|
||||
DdlTipoAF.SelectedValueExist(GvRow.DataKey("CveTipoAF"))
|
||||
DdlTipoAF_SelectedIndexChanged(Nothing, Nothing)
|
||||
|
||||
DdlAF.SelectedValueExist(GvRow.DataKey("CveAF"))
|
||||
|
||||
|
||||
|
||||
HypRemision.Text = GvRow.DataKey("RemisionSerieFolio")
|
||||
HypRemision.NavigateUrl = $"/Ventas/Ventas.aspx?CveVenta={GvRow.DataKey("CveVentaRemision")}"
|
||||
|
||||
If GvRow.DataKey("RemisionSaldo").ToDecimal > 0 Then
|
||||
LblSaldo.Text = $"Saldo {GvRow.DataKey("RemisionSaldo").ToDecimal.ToString("###,###,###.00")}"
|
||||
Else
|
||||
LblSaldo.Text = ""
|
||||
End If
|
||||
|
||||
|
||||
|
||||
CveContrato = GvRow.DataKey("CveContrato").ToEntero
|
||||
OcultarMostrarSegundoChofer()
|
||||
|
||||
UpCommando.Update()
|
||||
UpModal.Update()
|
||||
RegistraScript("$('#ModalActualizar').modal('show');")
|
||||
End Sub
|
||||
|
||||
Protected Sub MostrarModal(sender As Object, e As System.EventArgs)
|
||||
|
||||
If HidModClienteNombre.Value = "" Then
|
||||
HidModClienteNombre.Value = GlobalDTCliente(UsuarioActual.CveEmpresa, -1, HidModCveCliente.Value.ToEntero).FiltroPrimeroValor("NombreComercial")
|
||||
End If
|
||||
|
||||
DdlClientes.SelectedText = HidModClienteNombre.Value
|
||||
DdlClientes.SelectedValue = HidModCveCliente.Value
|
||||
|
||||
DdlClientes.txtText.Value = HidModClienteNombre.Value
|
||||
DdlClientes.txtValue.Value = HidModCveCliente.Value
|
||||
|
||||
chkSegundoChofer.Checked = If(HidNumChoferes.Value.ToEntero = 2, True, False)
|
||||
|
||||
OcultarMostrarSegundoChofer()
|
||||
|
||||
|
||||
|
||||
HypRemision.Text = HidRemisionSerieFolio.Value
|
||||
HypRemision.NavigateUrl = $"/Ventas/Ventas.aspx?CveVenta={HidCveVentaRemision.Value}"
|
||||
If HidRemisionSaldo.Value.ToDecimal > 0 Then
|
||||
LblSaldo.Text = $"Saldo {HidRemisionSaldo.Value.ToDecimal.ToString("###,###,###.00")}"
|
||||
Else
|
||||
LblSaldo.Text = ""
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
UpModal.Update()
|
||||
|
||||
RegistraScript("$('#ModalActualizar').modal('show');")
|
||||
End Sub
|
||||
|
||||
Protected Sub chkSegundoChofer_CheckedChanged(sender As Object, e As EventArgs)
|
||||
OcultarMostrarSegundoChofer()
|
||||
End Sub
|
||||
|
||||
Private Sub OcultarMostrarSegundoChofer()
|
||||
|
||||
If chkSegundoChofer.Checked Then
|
||||
DVChofer2.Attributes.Add("style", "display:block")
|
||||
Else
|
||||
DVChofer2.Attributes.Add("style", "display:none")
|
||||
End If
|
||||
|
||||
|
||||
UpCommando.Update()
|
||||
UpModal.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlTipoAF_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CargaAFDdl(DdlTipoAF.SelectedValue.ToEntero)
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnDdlTipoAF_Click(sender As Object, e As EventArgs)
|
||||
|
||||
CargaAFDdl(HidCveTipoAF.Value.ToEntero)
|
||||
End Sub
|
||||
|
||||
Private Sub CargaAFDdl(CveTipoAF As Integer)
|
||||
'Lista de Activos fijos
|
||||
|
||||
DdlAF.ClearSelection()
|
||||
DdlAF.SelectedValue = Nothing
|
||||
DdlAF.Items.Clear()
|
||||
|
||||
Dim ObjContratos As New ClsContratos
|
||||
|
||||
|
||||
If ObjContratos.GetContratosValUnidadesAgendadas(DdlAF.SelectedValue.ToEntero, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, UsuarioActual.CveEmpresa, CveContrato, 2) Then
|
||||
|
||||
If CveTipoAF > 0 Then
|
||||
DdlAF.DataSource = ObjContratos.DtResultados.FiltraParametros($" CveTipoActivoFijo = {CveTipoAF} ")
|
||||
Else
|
||||
DdlAF.DataSource = ObjContratos.DtResultados
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
ObjContratos.Dispose()
|
||||
|
||||
'If CveTipoAF > 0 Then
|
||||
' DdlAF.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa).FiltraParametros($" EstadoActivoFijo= 'Activo' AND CveTipoActivoFijo = {CveTipoAF} ")
|
||||
'Else
|
||||
' DdlAF.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa).FiltraParametros($" EstadoActivoFijo= 'Activo' ")
|
||||
'End If
|
||||
|
||||
DdlAF.DataBind()
|
||||
DdlAF.Items.Insert(0, New ListItem("-", "-1"))
|
||||
|
||||
|
||||
|
||||
UpModal.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkExcel_Click(sender As Object, e As EventArgs) Handles LnkExcel.Click
|
||||
GvContratos.ExportToExcel("ReporteCompras" & NowADS().ToShortDateString)
|
||||
End Sub
|
||||
@@ -325,4 +461,10 @@ Partial Class RepContratosCalendario
|
||||
Protected Sub DdlTipoVista_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CargaCronograma(DdlTipoVista.SelectedValue.ToEntero)
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -430,7 +430,12 @@
|
||||
<asp:BoundField HeaderText="Fecha Hora de Emisión" DataField="FechaIng" ItemStyle-Width="200px" ItemStyle-HorizontalAlign="Center" Visible="false" />
|
||||
<%--19--%>
|
||||
<asp:BoundField HeaderText="Num. Turnos" DataField="NumTurnos" DataFormatString="{0:###,###,###,###.##}" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Right" Visible="false" />
|
||||
|
||||
<%--20--%>
|
||||
<asp:BoundField HeaderText="O. C." DataField="OC_noOrden" ItemStyle-Width="5%" Visible="false" />
|
||||
<%--21--%>
|
||||
<asp:BoundField HeaderText="Kilogramos" DataField="OC_Kilogramos" ItemStyle-Width="5%" Visible="false" />
|
||||
<%--22--%>
|
||||
<asp:BoundField HeaderText="Cantiadad" DataField="OC_Cantidad" ItemStyle-Width="5%" Visible="false" />
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
@@ -471,6 +476,18 @@
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkFormaPago" runat="server" Text="Forma de Pago" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkOC_noOrden" runat="server" Text="O. C." />
|
||||
</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkOC_Kilogramos" runat="server" Text="O. C. Kilogramos" />
|
||||
</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkOC_Cantidad" runat="server" Text="O. C. Cantiadad" />
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
|
||||
@@ -555,6 +555,12 @@ Partial Class Ventas_RepProductosServiciosDetalle
|
||||
GvDatos.Columns(18).Visible = ChkFechaHoraEmision.Checked
|
||||
GvDatos.Columns(19).Visible = ChkNumTurnos.Checked
|
||||
|
||||
GvDatos.Columns(20).Visible = ChkOC_noOrden.Checked
|
||||
GvDatos.Columns(21).Visible = ChkOC_Kilogramos.Checked
|
||||
GvDatos.Columns(22).Visible = ChkOC_Cantidad.Checked
|
||||
|
||||
|
||||
|
||||
CargaDatos()
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
|
||||
Reference in New Issue
Block a user