This commit is contained in:
2024-04-12 07:58:59 -07:00
9 changed files with 787 additions and 554 deletions

View File

@@ -4326,20 +4326,30 @@ Namespace Modelos
'TEMPORAL. PARA OPTIMIZAR LOS TIEMPOS PARA LA GENERACION DE LA FACTURA GLOBAL
If factura.EsFacturaGlobal Then
If Not ObjInventario.ActualizarEsDevolucionVenta(factura.CveVenta, 2) Then
OcurrioError = True
End If
Else
If RemisionesLista IsNot Nothing AndAlso factura.TipoDocto = "Ing" AndAlso RemisionesLista.Count > 0 Then
For Each CveRemision As Integer In RemisionesLista
'El almacen general es el Primer Almacen de Material en la Sucursal
If Not TraspasoAlmacen(ObjInventario, ObjVentas, CveRemision, ObjConta, True, 9, factura.EsFacturaGlobal) Then
OcurrioError = True
Exit For
End If
Next
End If
'If factura.EsFacturaGlobal Then
' If Not ObjInventario.ActualizarEsDevolucionVenta(factura.CveVenta, 2) Then
' OcurrioError = True
' End If
'Else
' If RemisionesLista IsNot Nothing AndAlso factura.TipoDocto = "Ing" AndAlso RemisionesLista.Count > 0 Then
' For Each CveRemision As Integer In RemisionesLista
' 'El almacen general es el Primer Almacen de Material en la Sucursal
' If Not TraspasoAlmacen(ObjInventario, ObjVentas, CveRemision, ObjConta, True, 9, factura.EsFacturaGlobal) Then
' OcurrioError = True
' Exit For
' End If
' Next
' End If
'End If
If RemisionesLista IsNot Nothing AndAlso factura.TipoDocto = "Ing" AndAlso RemisionesLista.Count > 0 Then
For Each CveRemision As Integer In RemisionesLista
'El almacen general es el Primer Almacen de Material en la Sucursal
If Not TraspasoAlmacen(ObjInventario, ObjVentas, CveRemision, ObjConta, True, 9, factura.EsFacturaGlobal) Then
OcurrioError = True
Exit For
End If
Next
End If
If factura.TipoDocto = "Rem" AndAlso factura.ServicioDomicilio Then

View File

@@ -4398,7 +4398,7 @@ Partial Class Compras_Compras
If UsuarioActual.TienePermisoProceso(121) Then
If DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") Then
If Not NCDevolucion Then
If Not NCDevolucion And Not ChkNCInvNC.Checked Then
Alert("Favor de seleccionar un producto en la pestaña de almacen", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
@@ -18436,7 +18436,7 @@ Partial Class Compras_Compras
For Each Gvr As GridViewRow In GVNCInvAlmacen.Rows
If Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDouble > 0 Then
If i < TmpDT.Rows.Count Then
TmpDT.Rows(i)("CveOrdenCompraDetalle") = Gvr.DataKey("CveOrdenCompraDetalle")
TmpDT.Rows(i)("CveOrdenCompraDetalle") = Gvr.DataKey("CveOrdenCompraDetalle").ToString.ToEntero
End If
'If Not ObjCompras.ComprasDetalleDevolucionesAdd(Gvr.DataKey("CveCompraDetalle").ToEntero, Gvr.DataKey("CveCompra").ToEntero, Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDouble, UsuarioActual.CveEmpresa) Then
' TieneError = True

View File

@@ -3704,6 +3704,8 @@ Partial Class PopUpVerFactura
Dim Archivo As New System.IO.FileInfo(String.Format(RutaFormato, UsuarioActual.Empresa.Ruta))
Dim NombreArchivo As String = If(Consola <> "-1" And Consola.Trim.Length > 0, $"Aviso de Traslado - {Folio} Consola", $"Aviso de Traslado - {Folio}")
If Archivo.Exists Then
params.Add(New ReportParameter("LogoPath", RutaImagenLogo))
If UsuarioActual.CveEmpresa = 140 Then
@@ -3746,9 +3748,10 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("ResponsableRecibio", ResponsableRecibio))
DtMovimientos = DtMovimientos.FiltraParametros("", "PS")
End If
ImprimirPDF(String.Format(RutaFormato, UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Aviso de Traslado - {0}", Folio), RDSName:="DsInventarios")
ImprimirPDF(String.Format(RutaFormato, UsuarioActual.Empresa.Ruta), DtMovimientos, params, NombreArchivo, RDSName:="DsInventarios")
Else
params.Add(New ReportParameter("LogoPath", RutaImagenLogo))
@@ -3760,7 +3763,7 @@ Partial Class PopUpVerFactura
If UsuarioActual.CveEmpresa.Contiene(172, 173) Then
ImprimirPDFStimul(String.Format("Empresas/Grales/Formatos/Traslado.mrt", UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Aviso de Traslado - {0}", Folio), RDSName:="DsInventarios")
Else
ImprimirPDF(String.Format("Empresas/Grales/Formatos/Traslado.rdlc", UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Aviso de Traslado - {0}", Folio), RDSName:="DsInventarios")
ImprimirPDF(String.Format("Empresas/Grales/Formatos/Traslado.rdlc", UsuarioActual.Empresa.Ruta), DtMovimientos, params, NombreArchivo, RDSName:="DsInventarios")
End If
End If

View File

@@ -258,11 +258,14 @@
<div class="col-md-1" runat="server" id="DVNavegar" visible="false">
<div class="row">
<div class="col-md-6">
<asp:LinkButton runat="server" ID="LnkPSAntyerior" OnClick="LnkPSAntyerior_Click" CssClass="btn btn-primary" ><</asp:LinkButton>
<div class="col-md-5">
<asp:LinkButton runat="server" ID="LnkPSAntyerior" OnClick="LnkPSAntyerior_Click" CssClass="btn btn-primary" >Anterior</asp:LinkButton>
</div>
<div class="col-md-6">
<asp:LinkButton runat="server" ID="LnkPSSiguiente" OnClick="LnkPSSiguiente_Click" CssClass="btn btn-primary" >></asp:LinkButton>
<div class="col-md-2">
</div>
<div class="col-md-5">
<asp:LinkButton runat="server" ID="LnkPSSiguiente" OnClick="LnkPSSiguiente_Click" CssClass="btn btn-primary" >Siguiente</asp:LinkButton>
</div>
</div>
</div>

View File

@@ -216,12 +216,6 @@
<asp:UpdatePanel ID="UpAccciones" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<li>
<asp:LinkButton ID="LnkMostrarOrdenadores" OnClick="LnkMostrarOrdenadores_Click" runat="server"><i class="fas fa-receipt"></i>Ordenar</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkMostrarOcultarMostrar" OnClick="LnkMostrarOcultarMostrar_Click" runat="server"><i class="fas fa-columns"></i>Ocultar / Mostrar</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LinkButton3" OnClick="LnkMostrarOrdenadores_Click" runat="server"><i class="fas fa-receipt"></i>Ordenar</asp:LinkButton>
</li>
@@ -314,9 +308,15 @@
</li>
<li>
<asp:LinkButton ID="LnkProcesarModal" OnClick="LnkProcesarModal_Click" runat="server"><i class="fa fa-check"></i> Procesar archivo SUA EBA PDF</asp:LinkButton>
</li><%--
<li>
<asp:LinkButton ID="LnkOpenCancelarTimbre" OnClick="LnkOpenCancelarTimbre_Click" runat="server"><i class="fa fa-download"></i> CancelarTimbre</asp:LinkButton>
</li>--%>
<li>
<asp:LinkButton ID="LnkMostrarOrdenadores" OnClick="LnkMostrarOrdenadores_Click" runat="server"><i class="fas fa-receipt"></i>Ordenar</asp:LinkButton>
</li>
<li>
<%--<asp:LinkButton ID="LnkOpenCancelarTimbre" OnClick="LnkOpenCancelarTimbre_Click" runat="server"><i class="fa fa-download"></i> CancelarTimbre</asp:LinkButton>--%>
<asp:LinkButton ID="LnkMostrarOcultarMostrar" OnClick="LnkMostrarOcultarMostrar_Click" runat="server"><i class="fas fa-columns"></i>Personalizar</asp:LinkButton>
</li>
</ContentTemplate>
@@ -5133,7 +5133,7 @@
</div>
<div class="modal-footer">
<asp:LinkButton ID="LnkReordenaGridEmpleados" OnClick="LnkReordenaGridEmpleados_Click" runat="server" CssClass="btn btn-primary" ValidationGroup="grpno-validacion"> <i class='material-icons'>done_all</i> Guardar</asp:LinkButton>
<asp:LinkButton ID="LnkReordenaGridEmpleados" OnClick="LnkReordenaGridEmpleados_Click" runat="server" CssClass="btn btn-primary" ValidationGroup="grpno-validacion">Aceptar</asp:LinkButton>
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
</div>
</div>
@@ -5151,7 +5151,7 @@
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" id="H3" runat="server">
<asp:Label runat="server" ID="Label9" Text="Mostrar/ocultar columna"></asp:Label>
<asp:Label runat="server" ID="Label9" Text="Personalizar"></asp:Label>
</h4>
</div>
<div class="modal-body">
@@ -5217,7 +5217,7 @@
</div>
<div class="modal-footer">
<asp:LinkButton ID="LnkReShowHide" OnClick="LnkReShowHide_Click" runat="server" CssClass="btn btn-primary" ValidationGroup="grpno-validacion"> <i class='material-icons'>done_all</i> Guardar</asp:LinkButton>
<asp:LinkButton ID="LnkReShowHide" OnClick="LnkReShowHide_Click" runat="server" CssClass="btn btn-primary" ValidationGroup="grpno-validacion"> Aceptar</asp:LinkButton>
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
</div>
</div>

View File

@@ -325,7 +325,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
{
if (!IsPostBack)
{
{
{
DtNomOrden = new DataTable();

File diff suppressed because it is too large Load Diff

View File

@@ -5,9 +5,11 @@ Imports ADSNetLibrary.SIGAPI.Helpers
Imports Extensiones.ModExtensiones
Imports GemBox.Spreadsheet
Imports Microsoft.Reporting.WebForms
Imports Newtonsoft.Json.Linq
Partial Class RepContratosCalendario
Inherits ClsPaginas
Inherits ClsPaginas
#Region "PROPIEDADES"
Public Property DtAvance() As DataTable
Get
@@ -25,21 +27,18 @@ Partial Class RepContratosCalendario
Set(value As String)
ViewState("Contrato") = value
End Set
End Property
End Property
#End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
txtFechaI.Text = DateTime.Now.AddMonths(-1).ToShortDateString
txtFechaF.Text = DateTime.Now.AddDays(7).ToShortDateString
InicializaCombos()
InicializaCalendar()
CargaDatos()
End If
End If
InicializaCalendar()
End Sub
Private Sub CargaDatos()
Dim ObjContratos As New ClsContratos
@@ -49,16 +48,56 @@ Partial Class RepContratosCalendario
If CveCliente = 0 Then CveCliente = -1
If ObjContratos.GetContratosReporte(UsuarioActual.CveEmpresa, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, DdlCliente.SelectedValue.ToEntero, CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero, CveEstatus:=DdlEstatusConsulta.SelectedValue.ToEntero, CveTipoContrato:=34) Then
GvContratos.DataSource = ObjContratos.DtResultados
DtAvance = ObjContratos.DtResultados.Copy()
End If
DtAvance = ObjContratos.DtResultados
GvContratos.DataSource = DtAvance
ObjContratos.Dispose()
GvContratos.DataBind()
UpTitulos.Update()
UpTitulos.Update()
CargaCronograma()
End Sub
Private Sub CargaCronograma()
If DtAvance IsNot Nothing Then
For Each Row As DataRow In DtAvance.Rows
If String.IsNullOrEmpty(Row("NombreAF").ToString()) Then
Row("NombreAF") = "Unidad no asignada"
End If
Next
Dim jsonData As New JArray()
Dim jsonCategorias As New JArray()
Dim random = New Random()
'DATOS
For Each Row As DataRow In DtAvance.FiltraParametros("NombreAF <> ''").Rows
Dim obj As New JObject(
New JProperty("category", Row("NombreAF")),
New JProperty("fromDate", Row("FechaInicial").ToString().ToDateTime().ToString("dd/MM/yyyy HH:mm").ToDateTime()),
New JProperty("toDate", Row("FechaFinal").ToString().ToDateTime().ToString("dd/MM/yyyy HH:mm").ToDateTime()),
New JProperty("columnSettings", New JObject(
New JProperty("fill", String.Format("#{0:X6}", random.Next(16777216)))
))
)
jsonData.Add(obj)
Next
'CATEGORIAS
For Each Row As DataRow In DtAvance.FiltraParametros("NombreAF <> ''", "", {"NombreAF"}).Rows
Dim obj As New JObject(
New JProperty("category", Row("NombreAF"))
)
jsonCategorias.Add(obj)
Next
RegistraScript($"cargaDiagramaGrant({jsonData.ToString()},{jsonCategorias.ToString()});", "A1")
End If
End Sub
Private Sub InicializaCalendar()
RegistraScript("InitCalendar();")
DirectCast(Master.FindControl("TSM"), ScriptManager).EnablePageMethods = True
End Sub
@@ -158,10 +197,6 @@ Partial Class RepContratosCalendario
UpModal.Update()
RegistraScript("$('#ModalActualizar').modal('show');")
End Sub
Protected Sub Consultar(sender As Object, e As EventArgs)
End Sub
Protected Sub LnkExcel_Click(sender As Object, e As EventArgs) Handles LnkExcel.Click
GvContratos.ExportToExcel("ReporteCompras" & NowADS().ToShortDateString)
End Sub
@@ -190,5 +225,9 @@ Partial Class RepContratosCalendario
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
CargaDatos()
End Sub
End Sub
Protected Sub RBTipoVista_SelectedIndexChanged(sender As Object, e As EventArgs)
InicializaCalendar()
CargaCronograma()
End Sub
End Class

View File

@@ -15256,7 +15256,8 @@ Partial Class Ventas
importeMovimiento = 0
Case 103 'Descuento
If ObjFactura.Descuento <> 0 AndAlso Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") AndAlso (DdlTipoAmortizacionAnticipo.SelectedValue = "-1" OrElse UsuarioActual.CveEmpresa.Contiene(140, 141)) Then
If ObjFactura.Descuento <> 0 AndAlso Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") AndAlso
(DdlTipoAmortizacionAnticipo.SelectedValue = "-1" OrElse UsuarioActual.CveEmpresa.Contiene(140, 141, 190)) Then
importeMovimiento = ObjFactura.Descuento * Multiplicador * ValorMultiplicador
importeMX = Math.Round(importeMovimiento, 2) * tipoCambio * Multiplicador * ValorMultiplicador
@@ -17697,12 +17698,21 @@ Partial Class Ventas
End If
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
'ES CREDITO, DEBE TOMAR LA LISTA DE PRECIOS DE CREDITO
If RBLPago.SelectedValue = "1" Then
Dim CvePrecioListaCredito = GlobalDTPrecioListas(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePrecioLista", "ISNULL(Credito,False) = True").ToEntero()
If CvePrecioListaCredito > 0 Then
CvePrecioListaPS = CvePrecioListaCredito
End If
End If
'ESTE CLIENTE DEBE TENER PRIORIDAD SU LISTA DE PRECIO, SEA CREDITO O CONTADO
If CveCliente = 888648 Then
If Me.CvePrecioListaCliente > 0 Then
CvePrecioListaPS = Me.CvePrecioListaCliente
End If
End If
End If
If CvePrecioListaPS > 0 Then