diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb
index 0d02c285a..a97e3fa58 100644
--- a/App_Code/Modelos.vb
+++ b/App_Code/Modelos.vb
@@ -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
diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb
index 4950bd341..7765642fb 100644
--- a/Compras/Compras.aspx.vb
+++ b/Compras/Compras.aspx.vb
@@ -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
diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb
index b012e31e1..ad012761a 100644
--- a/Compras/PopUpVerFactura.aspx.vb
+++ b/Compras/PopUpVerFactura.aspx.vb
@@ -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
diff --git a/Inventarios/Kardex.aspx b/Inventarios/Kardex.aspx
index 7fb29e832..4dc8de0ff 100644
--- a/Inventarios/Kardex.aspx
+++ b/Inventarios/Kardex.aspx
@@ -258,11 +258,14 @@
+
+
+
+
+
+
-
-
-
+
+
+
+
diff --git a/Transportes/RepContratosCalendario.aspx.vb b/Transportes/RepContratosCalendario.aspx.vb
index 589ba314d..3e9bce566 100644
--- a/Transportes/RepContratosCalendario.aspx.vb
+++ b/Transportes/RepContratosCalendario.aspx.vb
@@ -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
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb
index a45c309e2..1e85a60b2 100644
--- a/Ventas/Ventas.aspx.vb
+++ b/Ventas/Ventas.aspx.vb
@@ -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