Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -2,9 +2,11 @@
|
||||
Option Explicit On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Security.Cryptography.Pkcs
|
||||
Imports ADSNetLibrary.SIGAPI.Models.CGame
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports Telerik.Web.UI
|
||||
|
||||
Partial Class Inventarios_Kardex
|
||||
Inherits ClsPaginas
|
||||
@@ -569,7 +571,10 @@ Partial Class Inventarios_Kardex
|
||||
Dim CvePS As Integer = ddlProducto2.SelectedValue.ToEntero
|
||||
|
||||
If Not CvePS > 0 Then
|
||||
Exit Sub
|
||||
CvePS = ObtenerInicioPSNavegacion(Siguiente:=Siguiente)
|
||||
If Not CvePS > 0 Then
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim dt As DataTable = New DataTable
|
||||
@@ -609,6 +614,34 @@ Partial Class Inventarios_Kardex
|
||||
ObjInventarios.Dispose()
|
||||
|
||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||
ddlProducto2.SelectedValue = dt.Rows(0)("CvePS").ToString
|
||||
ddlProducto2.SelectedText = dt.Rows(0)("CodigoPS").ToString
|
||||
ddlProducto2.txtValue.Value = dt.Rows(0)("CvePS").ToString
|
||||
ddlProducto2.txtText.Value = dt.Rows(0)("CodigoPS").ToString
|
||||
UPFiltros.Update()
|
||||
UPDatos.Update()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function ObtenerInicioPSNavegacion(Siguiente As Boolean) As Integer
|
||||
|
||||
Dim CvePSRespuesta As Integer = -1
|
||||
Dim dt As DataTable = New DataTable
|
||||
|
||||
If Siguiente Then
|
||||
If TxtCodigoInicio.Text.Trim.Length > 0 Then
|
||||
dt = GlobalDTPS(UsuarioActual.CveEmpresa, Codigo:=TxtCodigoInicio.Text.Trim)
|
||||
End If
|
||||
Else
|
||||
If TxtCodigoFinal.Text.Trim.Length > 0 Then
|
||||
dt = GlobalDTPS(UsuarioActual.CveEmpresa, Codigo:=TxtCodigoFinal.Text.Trim)
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||
CvePSRespuesta = dt.Rows(0)("CvePS").ToString.ToEntero
|
||||
ddlProducto2.SelectedValue = dt.Rows(0)("CvePS").ToString
|
||||
ddlProducto2.SelectedText = dt.Rows(0)("CodigoPS").ToString
|
||||
ddlProducto2.txtValue.Value = dt.Rows(0)("CvePS").ToString
|
||||
@@ -617,7 +650,9 @@ Partial Class Inventarios_Kardex
|
||||
UPFiltros.Update()
|
||||
UPDatos.Update()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Return CvePSRespuesta
|
||||
|
||||
End Function
|
||||
End Class
|
||||
|
||||
@@ -212,8 +212,12 @@ Partial Class Inventarios_KardexAlmacen
|
||||
Dim CvePS As Integer = ddlProducto2.SelectedValue.ToEntero
|
||||
|
||||
If Not CvePS > 0 Then
|
||||
Exit Sub
|
||||
CvePS = ObtenerInicioPSNavegacion(Siguiente:=Siguiente)
|
||||
If Not CvePS > 0 Then
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim dt As DataTable = New DataTable
|
||||
|
||||
Dim Entrada As Boolean = True
|
||||
@@ -261,4 +265,37 @@ Partial Class Inventarios_KardexAlmacen
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function ObtenerInicioPSNavegacion(Siguiente As Boolean) As Integer
|
||||
|
||||
Dim CvePSRespuesta As Integer = -1
|
||||
Dim dt As DataTable = New DataTable
|
||||
|
||||
If Siguiente Then
|
||||
If TxtCodigoInicio.Text.Trim.Length > 0 Then
|
||||
'CvePSRespuesta = GlobalDTPS(UsuarioActual.CveEmpresa, Codigo:=TxtCodigoInicio.Text.Trim).FiltroPrimeroValor("CvePS").ToEntero
|
||||
dt = GlobalDTPS(UsuarioActual.CveEmpresa, Codigo:=TxtCodigoInicio.Text.Trim)
|
||||
End If
|
||||
Else
|
||||
If TxtCodigoFinal.Text.Trim.Length > 0 Then
|
||||
'CvePSRespuesta = GlobalDTPS(UsuarioActual.CveEmpresa, Codigo:=TxtCodigoFinal.Text.Trim).FiltroPrimeroValor("CvePS").ToEntero
|
||||
dt = GlobalDTPS(UsuarioActual.CveEmpresa, Codigo:=TxtCodigoFinal.Text.Trim)
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||
CvePSRespuesta = dt.Rows(0)("CvePS").ToString.ToEntero
|
||||
ddlProducto2.SelectedValue = dt.Rows(0)("CvePS").ToString
|
||||
ddlProducto2.SelectedText = dt.Rows(0)("CodigoPS").ToString
|
||||
ddlProducto2.txtValue.Value = dt.Rows(0)("CvePS").ToString
|
||||
ddlProducto2.txtText.Value = dt.Rows(0)("CodigoPS").ToString
|
||||
UPFiltros.Update()
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Return CvePSRespuesta
|
||||
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
@@ -586,7 +586,10 @@ Partial Class Inventarios_ReporteEntradasSalidas
|
||||
Dim CvePS As Integer = DdlPS.SelectedValue.ToEntero
|
||||
|
||||
If Not CvePS > 0 Then
|
||||
Exit Sub
|
||||
CvePS = ObtenerInicioPSNavegacion(Siguiente:=Siguiente)
|
||||
If Not CvePS > 0 Then
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim dt As DataTable = New DataTable
|
||||
@@ -636,6 +639,39 @@ Partial Class Inventarios_ReporteEntradasSalidas
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function ObtenerInicioPSNavegacion(Siguiente As Boolean) As Integer
|
||||
|
||||
Dim CvePSRespuesta As Integer = -1
|
||||
Dim dt As DataTable = New DataTable
|
||||
|
||||
If Siguiente Then
|
||||
If TxtCodigoInicio.Text.Trim.Length > 0 Then
|
||||
'CvePSRespuesta = GlobalDTPS(UsuarioActual.CveEmpresa, Codigo:=TxtCodigoInicio.Text.Trim).FiltroPrimeroValor("CvePS").ToEntero
|
||||
dt = GlobalDTPS(UsuarioActual.CveEmpresa, Codigo:=TxtCodigoInicio.Text.Trim)
|
||||
End If
|
||||
Else
|
||||
If TxtCodigoFinal.Text.Trim.Length > 0 Then
|
||||
'CvePSRespuesta = GlobalDTPS(UsuarioActual.CveEmpresa, Codigo:=TxtCodigoFinal.Text.Trim).FiltroPrimeroValor("CvePS").ToEntero
|
||||
dt = GlobalDTPS(UsuarioActual.CveEmpresa, Codigo:=TxtCodigoFinal.Text.Trim)
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||
CvePSRespuesta = dt.Rows(0)("CvePS").ToString.ToEntero
|
||||
DdlPS.SelectedValue = dt.Rows(0)("CvePS").ToString
|
||||
DdlPS.SelectedText = dt.Rows(0)("CodigoPS").ToString
|
||||
DdlPS.txtValue.Value = dt.Rows(0)("CvePS").ToString
|
||||
DdlPS.txtText.Value = dt.Rows(0)("CodigoPS").ToString
|
||||
'UPFiltros.Update()
|
||||
UPPMov.Update()
|
||||
End If
|
||||
|
||||
|
||||
Return CvePSRespuesta
|
||||
|
||||
End Function
|
||||
|
||||
'Protected Sub Lnkcompuxlsinventarios_Click(sender As Object, e As EventArgs)
|
||||
' Dim continuar = True
|
||||
' Try
|
||||
|
||||
@@ -26,19 +26,19 @@
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkdownExcel" OnClick="LnkdownExcel_Click" runat="server"><i class="fa fa-download" aria-hidden="true"></i>Excel</asp:LinkButton>
|
||||
</li>
|
||||
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkOpenModalAutoriza" OnClick="LnkOpenModalAutoriza_Click" runat="server"><i class="fa fa-check" aria-hidden="true"></i> Autoriza</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkOpenModalAutoriza" OnClick="LnkOpenModalAutoriza_Click" runat="server"><i class="fa fa-check" aria-hidden="true"></i> Autorizar</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkdownExcel" OnClick="LnkdownExcel_Click" runat="server"><i class="fa fa-download" aria-hidden="true"></i>Descargar XLS</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkFormatoCargaAnual" OnClick="LnkFormatoCargaAnual_Click" runat="server"><i class="fa fa-download" aria-hidden="true"></i>Formato Anual</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkFormatoCargaAnual" OnClick="LnkFormatoCargaAnual_Click" runat="server"><i class="fa fa-download" aria-hidden="true"></i> Constancia 37</asp:LinkButton>
|
||||
</li>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
|
||||
@@ -215,10 +215,7 @@
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="UpAccciones" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LinkButton3" OnClick="LnkMostrarOrdenadores_Click" runat="server"><i class="fas fa-receipt"></i>Ordenar</asp:LinkButton>
|
||||
</li>
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkAutorizar" Visible="false" OnClick="LnkAutorizar_Click" runat="server"><i class="fa fa-thumbs-up" aria-hidden="true"></i>Autorizar</asp:LinkButton>
|
||||
</li>
|
||||
@@ -5049,8 +5046,7 @@
|
||||
<div class="modal-footer">
|
||||
<asp:LinkButton ID="LnkCargaMasiva" OnClick="LnkCargaMasiva_Click" runat="server" CssClass="btn btn-primary" ValidationGroup="grpno validacion"> <i class='material-icons'>done_all</i> Guardar</asp:LinkButton>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
|
||||
<asp:CheckBox ID="ChkCargaMasivaRecalcularNomina" Text="¿Volver a calcular la nómina?" runat="server" />
|
||||
<%--<asp:CheckBox ID="ChkCargaMasivaRecalcularNomina" Text="¿Volver a calcular la nómina?" runat="server" />--%>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
|
||||
@@ -10994,12 +10994,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
Alert("Se cargo satisfactoriamente.");
|
||||
|
||||
RegistraScript(string.Format("$('#divCargaMasiva').modal('hide');"));
|
||||
if (ChkCargaMasivaRecalcularNomina.Checked)
|
||||
{
|
||||
cargaDatos(true);
|
||||
|
||||
}
|
||||
//
|
||||
cargaPeriodos();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -134,7 +134,10 @@ Partial Class RH_CatPersonal
|
||||
FechaFIngreso = "-1"
|
||||
End If
|
||||
|
||||
If ObjPersonal.GetPersonal(-1, "-1", "-1", "-1", "-1", CveTurno, CvePuesto, CveDepartamento, CveRuta, CveEscolaridad, CveEstadoCivil, CveGenero, CveEstatusPersonal, CveSubProyecto, CveClienteAsignado, HorarioTrabajo, CveSupervisor, CveTipoPeriodo, CveMetodoPago, CveTipoContrato, CveMotivoBaja, CveProyecto, FechaIFinContrato, FechaFFinContrato, FechaIIngreso, FechaFIngreso, UsuarioActual.CveEmpresa, ddlclasificacion.SelectedValue.ToEntero()) Then
|
||||
If ObjPersonal.GetPersonal(-1, "-1", "-1", "-1", "-1", CveTurno, CvePuesto, CveDepartamento, CveRuta, CveEscolaridad, CveEstadoCivil, CveGenero,
|
||||
CveEstatusPersonal, CveSubProyecto, CveClienteAsignado, HorarioTrabajo, CveSupervisor, CveTipoPeriodo, CveMetodoPago,
|
||||
CveTipoContrato, CveMotivoBaja, CveProyecto, FechaIFinContrato, FechaFFinContrato, FechaIIngreso, FechaFIngreso,
|
||||
UsuarioActual.CveEmpresa, ddlclasificacion.SelectedValue.ToEntero()) Then
|
||||
DTDatos = ObjPersonal.DtResultados
|
||||
|
||||
'filtro por usuario subproyecto/sucursal vsh
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
Imports System.Data
|
||||
Imports System.IO
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
|
||||
Partial Class RepContratoDetalle
|
||||
Inherits ClsPaginas
|
||||
@@ -85,6 +89,15 @@ Partial Class RepContratoDetalle
|
||||
ViewState("AsientoSeleccionado") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TelefonoEmpresa As String
|
||||
Get
|
||||
Return ViewState("TelefonoEmpresa").ToString()
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("TelefonoEmpresa") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Carga Página"
|
||||
@@ -100,6 +113,7 @@ Partial Class RepContratoDetalle
|
||||
CveViajePasajero = 0
|
||||
Session("FileExtension") = ""
|
||||
ArchivoUpdate = ""
|
||||
TelefonoEmpresa = ""
|
||||
|
||||
End If
|
||||
End Sub
|
||||
@@ -122,7 +136,6 @@ Partial Class RepContratoDetalle
|
||||
Dim Importe As Decimal = Contrato.Rows(0)("Importe").ToString.ToDecimal
|
||||
Dim Pesos As Decimal = Contrato.Rows(0)("ImporteMax").ToString.ToDecimal
|
||||
Dim Anticipo As Decimal = Contrato.Rows(0)("ImporteMin").ToString.ToDecimal
|
||||
|
||||
CveContratoTipo = Contrato.Rows(0)("CveContratoTipo").ToString.ToEntero
|
||||
SubProyecto = Contrato.Rows(0)("SubProyecto").ToString
|
||||
CveMasivo = Contrato.Rows(0)("CveMasivo").ToString.ToEntero
|
||||
@@ -130,8 +143,10 @@ Partial Class RepContratoDetalle
|
||||
LbCveSubProyecto.Text = Contrato.Rows(0)("CveSubProyecto").ToString
|
||||
DdlClientes.SelectedText = Contrato.Rows(0)("NombreComercial").ToString
|
||||
DdlClientes.SelectedValue = Contrato.Rows(0)("CveCliente").ToString
|
||||
DdlMoneda.SelectedValue = Contrato.Rows(0)("CveMoneda").ToString
|
||||
TxtDescripcion.Text = Contrato.Rows(0)("DescripcionContrato").ToString
|
||||
TxtObservaciones.Text = Contrato.Rows(0)("Observaciones").ToString
|
||||
TelefonoEmpresa = Contrato.Rows(0)("Telefono").ToString
|
||||
TxtUbicacion.Text = Contrato.Rows(0)("Ubicacion").ToString
|
||||
TxtFechaSalida.Text = Contrato.Rows(0)("FechaInicial").ToString
|
||||
TxtFechaRegreso.Text = Contrato.Rows(0)("FechaFinal").ToString
|
||||
@@ -180,7 +195,7 @@ Partial Class RepContratoDetalle
|
||||
#Region "Información General"
|
||||
Protected Sub BtnGuardarArchivo_Click1(sender As Object, e As EventArgs) Handles BtnGuardarArchivo.Click
|
||||
Dim FileExtension As String = "-1"
|
||||
Dim Filesgral As List(Of Archivo) = Anexo.getfiles().Archivos
|
||||
Dim Filesgral As List(Of Extensiones.Archivo) = Anexo.getfiles().Archivos
|
||||
Dim Filename As String = ""
|
||||
Dim folderContratosPath As String = Path.Combine(UsuarioActual.Empresa.Ruta, "Contratos")
|
||||
|
||||
@@ -253,7 +268,7 @@ Partial Class RepContratoDetalle
|
||||
Dim ObjContratos As New ClsContratos
|
||||
ObjContratos.IniciaTransacSQL()
|
||||
Try
|
||||
If ObjContratos.UpdateContratos(CveContrato, LbFolio.Text, TxtDescripcion.Text, "", UsuarioActual.CveProveedor, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", LbCveSubProyecto.Text.ToEntero, -1, -1, -1, -1, ArchivoUpdate, "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, -1, TxtImporte.Text.ToDecimal, DdlMoneda.SelectedValue.ToEntero, 0, CveContratoTipo:=CveContratoTipo, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CveContratosEstatus:=CveContratoEstatus) Then
|
||||
If ObjContratos.UpdateContratos(CveContrato, LbFolio.Text, TxtDescripcion.Text, "", UsuarioActual.CveProveedor, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", LbCveSubProyecto.Text.ToEntero, -1, -1, -1, -1, ArchivoUpdate, "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, -1, TxtImporte.Text.ToDecimal, DdlMoneda.SelectedValue.ToEntero, 0, CveContratoTipo:=CveContratoTipo, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CveContratosEstatus:=CveContratoEstatus, Observaciones:=TxtObservacion.Text) Then
|
||||
Alert("Contrato actualizado correctamente")
|
||||
End If
|
||||
ObjContratos.Commit()
|
||||
@@ -304,12 +319,18 @@ Partial Class RepContratoDetalle
|
||||
New ReportParameter("Servicio", TxtDescripcion.Text),
|
||||
New ReportParameter("Observaciones", TxtObservaciones.Text),
|
||||
New ReportParameter("Ubicacion", TxtUbicacion.Text),
|
||||
New ReportParameter("FechaSalida", TxtFechaSalida.Text.ToDate.ToString("HH:mm")),
|
||||
New ReportParameter("FechaRegreso", TxtFechaRegreso.Text.ToDate.ToString("HH:mm")),
|
||||
New ReportParameter("FechaSalida", TxtFechaSalida.Text.ToDate.ToString("dd/MM/yyyy")),
|
||||
New ReportParameter("FechaRegreso", TxtFechaRegreso.Text.ToDate.ToString("dd/MM/yyyy")),
|
||||
New ReportParameter("CantidadPasajeros", TxtCantidadPasajeros.Text),
|
||||
New ReportParameter("TipoAF", DdlTipoAF.Text),
|
||||
New ReportParameter("Importe", Math.Round(TxtImporte.Text.ToDecimal, 2).ToString),
|
||||
New ReportParameter("Anticipo", (TxtAnticipo.Text.ToDecimal * 100).ToString)
|
||||
New ReportParameter("TipoAF", DdlTipoAF.SelectedItem.ToString()),
|
||||
New ReportParameter("Pesos", Math.Round(TxtImporte.Text.ToDecimal, 2).ToString),
|
||||
New ReportParameter("Moneda", DdlMoneda.SelectedItem.ToString),
|
||||
New ReportParameter("Anticipo", Math.Round((TxtAnticipo.Text.ToDecimal * TxtImporte.Text.ToDecimal), 2).ToString),
|
||||
New ReportParameter("Total", Math.Round((TxtImporte.Text.ToDecimal - (TxtAnticipo.Text.ToDecimal * TxtImporte.Text.ToDecimal)), 2).ToString),
|
||||
New ReportParameter("DiaSalida", $"{TxtFechaSalida.Text.ToDate.Hour}:{TxtFechaSalida.Text.ToDate.Minute} "),
|
||||
New ReportParameter("TelefonoEmpresa", TelefonoEmpresa),
|
||||
New ReportParameter("FechaImpresion", Date.Now.ToString("dd/MM/yyyy HH:mm:ss")),
|
||||
New ReportParameter("Usuario", UsuarioActual.Nombre)
|
||||
}
|
||||
|
||||
ImprimirPDFStimul($"{UsuarioActual.Empresa.Ruta}Formatos\Contrato.mrt", dtResult, params, NombreArchivo:="Contrato")
|
||||
|
||||
@@ -100,7 +100,7 @@ Partial Class ListadoContratos
|
||||
'Agregamos Contrato
|
||||
Dim ObjContratos As New ClsContratos
|
||||
ObjContratos.IniciaTransacSQL()
|
||||
If ObjContratos.AddContratos(LbFolio.Text, TxtDescripcion.Text, "", UsuarioActual.CveProveedor, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDateTime, TxtFechaRegreso.Text.ToDateTime, TxtUbicacion.Text, "", CveSubProyecto, -1, -1, -1, -1, LbArchivo.Text, "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, -1, TxtImporte.Text.ToDecimal, DdlMoneda.SelectedValue.ToEntero, 0, CveContratoTipo:=34, CveContratosEstatus:=50, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CantidadPasajeros:=TxtCantidadPasajeros.Text.ToEntero, Observaciones:=TxtObservaciones.Text) > 0 Then
|
||||
If ObjContratos.AddContratos(LbFolio.Text, TxtDescripcion.Text, "", UsuarioActual.CveProveedor, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDateTime, TxtFechaRegreso.Text.ToDateTime, TxtUbicacion.Text, "", CveSubProyecto, -1, -1, -1, -1, LbArchivo.Text, "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, -1, TxtImporte.Text.ToDecimal, DdlMoneda.SelectedValue.ToEntero, 0, CveContratoTipo:=34, CveContratosEstatus:=50, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CantidadPasajeros:=TxtCantidadPasajeros.Text.ToEntero, Observaciones:=TxtObservaciones.Text, CveVendedor:=UsuarioActual.CveVendedor) > 0 Then
|
||||
ObjContratos.Commit()
|
||||
Alert("Agregado Correctamente.")
|
||||
End If
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
#chartdiv {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
height: 700px;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
@@ -613,9 +613,15 @@
|
||||
orientation: "horizontal"
|
||||
});
|
||||
|
||||
var scrollbarY = am5.Scrollbar.new(root, {
|
||||
orientation: "vertical"
|
||||
});
|
||||
|
||||
chart.set("scrollbarX", scrollbarX);
|
||||
chart.bottomAxesContainer.children.push(scrollbarX);
|
||||
|
||||
chart.set("scrollbarY", scrollbarY);
|
||||
|
||||
// Make stuff animate on load
|
||||
// https://www.amcharts.com/docs/v5/concepts/animations/
|
||||
series.appear();
|
||||
|
||||
@@ -62,11 +62,13 @@ Partial Class RepContratosCalendario
|
||||
Private Sub CargaCronograma()
|
||||
If DtAvance IsNot Nothing Then
|
||||
|
||||
For Each Row As DataRow In DtAvance.Rows
|
||||
If String.IsNullOrEmpty(Row("CodigoAF").ToString()) Then
|
||||
Row("CodigoAF") = "Unidad no asignada"
|
||||
End If
|
||||
Next
|
||||
Dim DtUnidades As DataTable = GlobalDTActivoFijos(UsuarioActual.CveEmpresa).FiltraParametros("Codigo <> '' AND MedidaVehicular IN (2,3)", "Codigo", {"Codigo"})
|
||||
|
||||
'For Each Row As DataRow In DtAvance.Rows
|
||||
' If String.IsNullOrEmpty(Row("CodigoAF").ToString()) Then
|
||||
' Row("CodigoAF") = "Unidad no asignada"
|
||||
' End If
|
||||
'Next
|
||||
|
||||
Dim jsonData As New JArray()
|
||||
Dim jsonCategorias As New JArray()
|
||||
@@ -87,10 +89,10 @@ Partial Class RepContratosCalendario
|
||||
jsonData.Add(obj)
|
||||
Next
|
||||
|
||||
'CATEGORIAS
|
||||
For Each Row As DataRow In DtAvance.FiltraParametros("CodigoAF <> ''", "", {"CodigoAF"}).Rows
|
||||
'CATEGORIAS 'AGREGAR TODAS LAS UNIDADES
|
||||
For Each Row As DataRow In DtUnidades.Rows
|
||||
Dim obj As New JObject(
|
||||
New JProperty("category", Row("CodigoAF"))
|
||||
New JProperty("category", Row("Codigo"))
|
||||
)
|
||||
jsonCategorias.Add(obj)
|
||||
Next
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@ Page Title="Ventas - Facturación" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="Ventas.aspx.vb" Inherits="Ventas" EnableEventValidation="false" %>
|
||||
<%@ Page Title="Ventas - Facturación" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="Ventas.aspx.vb" Inherits="Ventas" EnableEventValidation="false" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
|
||||
<%@ Register Src="~/UserControl/AddMedico.ascx" TagPrefix="UserControl" TagName="AddMedico" %>
|
||||
|
||||
@@ -2897,6 +2897,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
TxtFechaOS.Text = NowADS().ToDateTime.ToString("yyyy-MM-dd HH:mm").Replace(" ", "T")
|
||||
|
||||
@@ -3745,7 +3746,7 @@ Partial Class Ventas
|
||||
If ObjPVenta.DtResultados.Rows.Count > 0 Then
|
||||
CveCorte = ObjPVenta.CveCorte
|
||||
Dim FechaICorte As Date = ObjPVenta.FechaInicial.Date '.AddDays(-5)
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso FechaICorte < NowADS().Date Then
|
||||
If (UsuarioActual.Empresa.Funcionalidad(531) = "1" OrElse UsuarioActual.Empresa.Funcionalidad(109) = "1") AndAlso FechaICorte < NowADS().Date Then
|
||||
DebeCerrarCorte = True
|
||||
LblMotivoBloqueo.Text = $"Existe un corte del día <b>{FechaICorte.ToString("dd/MM/yyyy")}</b>. Favor de cerrarlo para iniciar un nuevo corte."
|
||||
Else
|
||||
@@ -10769,8 +10770,9 @@ Partial Class Ventas
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
GeneraPDFFactura(ChkEnviarFactura.Checked, Factura, UsuarioActual, "", UsarDescargaDesdePopUpVerFactura:=False)
|
||||
Else
|
||||
Dim capturedContext = HttpContext.Current
|
||||
Dim strURLHOST As String = String.Format("{0}://{1}:{2}", HttpContext.Current.Request.Url.Scheme, HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port)
|
||||
Dim Hilo As New System.Threading.Thread(Sub() GeneraPDFFactura(ChkEnviarFactura.Checked, Factura, UsuarioActual, strURLHOST))
|
||||
Dim Hilo As New System.Threading.Thread(Sub() GeneraPDFFactura(ChkEnviarFactura.Checked, Factura, UsuarioActual, strURLHOST, EsHilo:=True, Contexto:=capturedContext))
|
||||
Hilo.Start()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
@@ -16308,7 +16310,14 @@ Partial Class Ventas
|
||||
''' <param name="strURLHOST"></param>
|
||||
''' <param name="CorreoCRM"></param>
|
||||
''' <param name="UsarDescargaDesdePopUpVerFactura"></param>
|
||||
Private Sub GeneraPDFFactura(EnviaCorreo As Boolean, Factura As Modelos.Factura, UsuarioActual As Usuario, strURLHOST As String, Optional CorreoCRM As String = "", Optional UsarDescargaDesdePopUpVerFactura As Boolean = True)
|
||||
Private Sub GeneraPDFFactura(EnviaCorreo As Boolean, Factura As Modelos.Factura, UsuarioActual As Usuario, strURLHOST As String, Optional CorreoCRM As String = "", Optional UsarDescargaDesdePopUpVerFactura As Boolean = True,
|
||||
Optional EsHilo As Boolean = False, Optional Contexto As HttpContext = Nothing)
|
||||
|
||||
If EsHilo Then
|
||||
HttpContext.Current = Contexto
|
||||
HttpContext.Current.Session("UsuarioSIG") = UsuarioActual
|
||||
End If
|
||||
|
||||
'GUARDA PDF
|
||||
Dim LocalSerieFolio As String = String.Empty
|
||||
Dim LocalTipoDocto As String = String.Empty
|
||||
@@ -16369,6 +16378,8 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
Private Sub GeneraPDFCotizacion(EnviaCorreo As Boolean, Optional CorreoContactoCRM As String = "", Optional pdfCRM As Byte() = Nothing,
|
||||
Optional SerieFolioCRM As String = "", Optional TipoDoctoCRM As String = "")
|
||||
@@ -16416,7 +16427,9 @@ Partial Class Ventas
|
||||
|
||||
Try
|
||||
' BytesPdfCotizacion(CveVenta)
|
||||
Dim Hilo As New System.Threading.Thread(Sub() MandaMails(UsuarioActual, CveVenta, DdlTipoComprobante.SelectedValue.ToString(), LocalSerieFolio, ChkEnviarFactura.Checked, ArchivoXML, ArchivoPDF, ArchivoAdjunto, CorreoContactoCRM:=CorreoContactoCRM))
|
||||
Dim capturedContext = HttpContext.Current
|
||||
Dim Hilo As New System.Threading.Thread(Sub() MandaMails(UsuarioActual, CveVenta, DdlTipoComprobante.SelectedValue.ToString(), LocalSerieFolio, ChkEnviarFactura.Checked, ArchivoXML, ArchivoPDF, ArchivoAdjunto, CorreoContactoCRM:=CorreoContactoCRM,
|
||||
EsHilo:=True, Contexto:=capturedContext))
|
||||
Hilo.Start()
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió error al mandar Mail", ex)
|
||||
@@ -16463,7 +16476,9 @@ Partial Class Ventas
|
||||
|
||||
Try
|
||||
' BytesPdfCotizacion(CveVenta)
|
||||
Dim Hilo As New System.Threading.Thread(Sub() MandaMails(UsuarioActual, CveVenta, DdlTipoComprobante.SelectedValue.ToString(), LocalSerieFolio, ChkEnviarFactura.Checked, ArchivoXML, ArchivoPDF, ArchivoAdjunto))
|
||||
Dim capturedContext = HttpContext.Current
|
||||
Dim Hilo As New System.Threading.Thread(Sub() MandaMails(UsuarioActual, CveVenta, DdlTipoComprobante.SelectedValue.ToString(), LocalSerieFolio, ChkEnviarFactura.Checked, ArchivoXML, ArchivoPDF, ArchivoAdjunto,
|
||||
EsHilo:=True, Contexto:=capturedContext))
|
||||
Hilo.Start()
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió error al mandar Mail", ex)
|
||||
@@ -16502,8 +16517,25 @@ Partial Class Ventas
|
||||
|
||||
Dim ObjMovtos As New ClsMovimientos()
|
||||
If ObjMovtos.GetAnticiposNCIxCCliente(CveCliente) Then
|
||||
|
||||
Me.TmpDTAnticiposNCIxCCliente = ObjMovtos.DtResultados.Copy()
|
||||
End If
|
||||
|
||||
'AGREGAR LOS ANTICIPOS, DEV, IxC QUE ESTEN EN PUBLICO GENERAL
|
||||
If Me.TmpDTAnticiposNCIxCCliente IsNot Nothing AndAlso UsuarioActual.Empresa.Funcionalidad(109) = "1" AndAlso UsuarioActual.CveEmpresa = 190 Then
|
||||
Dim CveClientePublicoGeneral = UsuarioActual.Empresa.Funcionalidad(714).ToEntero()
|
||||
If CveClientePublicoGeneral > 0 Then
|
||||
If CveCliente <> CveClientePublicoGeneral Then
|
||||
If ObjMovtos.GetAnticiposNCIxCCliente(CveClientePublicoGeneral) Then
|
||||
For Each DrGeneral As DataRow In ObjMovtos.DtResultados.Rows
|
||||
Me.TmpDTAnticiposNCIxCCliente.Rows.Add(DrGeneral.ItemArray)
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
ObjMovtos.Dispose()
|
||||
|
||||
If Me.TmpDTAnticiposNCIxCCliente IsNot Nothing Then
|
||||
Dim DtMovtos As DataTable = Me.TmpDTAnticiposNCIxCCliente.FiltraParametros($"Saldo > 0 AND SaldoSubtotal > 0 {If(CveVenta < 0, $"AND Tipo = 'Ant' ", "")} {If(DdlTipoComprobante.SelectedValue = "Ant", "AND Tipo = 'NC'", "")}")
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(72, 80, 146) Then
|
||||
@@ -16517,7 +16549,6 @@ Partial Class Ventas
|
||||
Else
|
||||
GVAnticipos.DataSource = Nothing
|
||||
End If
|
||||
ObjMovtos.Dispose()
|
||||
|
||||
If CveVenta <= 0 OrElse (EsCreaApartirDe Or CveDevolucion > 0) Then
|
||||
divAmortizacionTipo.Visible = True
|
||||
@@ -17279,9 +17310,10 @@ Partial Class Ventas
|
||||
'IMPRESION
|
||||
Try
|
||||
'MANDA CORREO
|
||||
Dim capturedContext = HttpContext.Current
|
||||
Dim strURLHOST As String = String.Format("{0}://{1}:{2}", HttpContext.Current.Request.Url.Scheme, HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port)
|
||||
Dim Factura As New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion:=False, CargaDTDetalle:=False, CargaDatosCliente:=False, CargaDatosRelacionados:=False, VerificaAlmacen:=False)
|
||||
Dim Hilo As New System.Threading.Thread(Sub() GeneraPDFFactura(ChkEnviarFactura.Checked, Factura, UsuarioActual, strURLHOST))
|
||||
Dim Hilo As New System.Threading.Thread(Sub() GeneraPDFFactura(ChkEnviarFactura.Checked, Factura, UsuarioActual, strURLHOST, EsHilo:=True, Contexto:=capturedContext))
|
||||
Hilo.Start()
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al enviar el PDF", ex)
|
||||
@@ -21895,7 +21927,13 @@ Partial Class Ventas
|
||||
#End Region
|
||||
|
||||
#Region " MANDA CORREO "
|
||||
Private Sub MandaMails(UsuarioActual As Usuario, CveVenta As Integer, TipoDocto As String, SerieFolio As String, EnviarFactura As Boolean, XML As String, PDF As String, Adjunto As String, Optional CorreoContactoCRM As String = "")
|
||||
Private Sub MandaMails(UsuarioActual As Usuario, CveVenta As Integer, TipoDocto As String, SerieFolio As String, EnviarFactura As Boolean, XML As String, PDF As String, Adjunto As String, Optional CorreoContactoCRM As String = "",
|
||||
Optional EsHilo As Boolean = False, Optional Contexto As HttpContext = Nothing)
|
||||
|
||||
If EsHilo Then
|
||||
HttpContext.Current = Contexto
|
||||
HttpContext.Current.Session("UsuarioSIG") = UsuarioActual
|
||||
End If
|
||||
|
||||
Dim ObjMail As New ClsSisMail()
|
||||
Dim ResultadoMail As Integer = 0
|
||||
@@ -38114,5 +38152,10 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
@@ -63,6 +63,7 @@
|
||||
<package id="NuGet.Core" version="2.14.0" targetFramework="net481" />
|
||||
<package id="Owin" version="1.0" targetFramework="net481" />
|
||||
<package id="Portable.BouncyCastle" version="1.8.9" targetFramework="net481" />
|
||||
<package id="QRCoder" version="1.4.3" targetFramework="net48" />
|
||||
<package id="StackExchange.Redis.StrongName" version="1.0.488" targetFramework="net481" />
|
||||
<package id="System.Buffers" version="4.5.1" targetFramework="net481" />
|
||||
<package id="System.Collections.Immutable" version="1.7.1" targetFramework="net481" />
|
||||
|
||||
Reference in New Issue
Block a user