diff --git a/Acumuladores/Tamaños.aspx.vb b/Acumuladores/Tamaños.aspx.vb index 0869900b7..af6592262 100644 --- a/Acumuladores/Tamaños.aspx.vb +++ b/Acumuladores/Tamaños.aspx.vb @@ -52,6 +52,7 @@ Partial Class Acumuladores_Tamaños If objAcum.TamañoGet(-1, UsuarioActual.Empresa.CveEmpresa) Then GvTamanios.DataSource = objAcum.DtResultados + recargaTamaños() Else GvTamanios.DataSource = Nothing End If @@ -63,6 +64,12 @@ Partial Class Acumuladores_Tamaños CargaGvTamanioBitacora() + End Sub + Private Sub recargaTamaños() + Dim objAcum As New ClsAcumuladores + If objAcum.TamañoGet(-1, -1) Then Application("GlobalDTAcumTamaños") = objAcum.DtResultados Else Application("GlobalDTAcumTamaños") = Nothing + objAcum.Dispose() + End Sub Private Sub CargaGvTamanioBitacora() diff --git a/App_Code/BundleConfig.vb b/App_Code/BundleConfig.vb index 26201a87f..d81e59fd1 100644 --- a/App_Code/BundleConfig.vb +++ b/App_Code/BundleConfig.vb @@ -30,7 +30,9 @@ Public Class BundleConfig "~/Metronic/assets/global/plugins/fullcalendar/lib/moment.min.js", "~/Metronic/assets/global/plugins/fullcalendar/fullcalendar.js", "~/Scripts/highcharts.js", - "~/Scripts/exporting.js" + "~/Scripts/exporting.js", + "~/Scripts/offline-exporting.js", + "~/Scripts/export-data.js" )) bundles.Add(New ScriptBundle("~/Metronic/assets/global/scripts/JSNoCustom").Include( diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index 9f5fc09fa..13fb98ade 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -3,7 +3,7 @@ Option Strict On Imports System.Data Imports System.Data.SqlClient -Imports DocumentFormat.OpenXml.Math +Imports System.Web Imports Extensiones Public Class ClsContabilidad @@ -1016,12 +1016,16 @@ Public Class ClsContabilidad If ex1.Message.Contains("50015;") Then OnError("No se puede registrar una póliza en un ejercicio Cerrado", ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) ElseIf ex1.Message.Contains("50024; La Cuenta no fue detectada") Then - Dim dr As Data.DataRow = DirectCast(HttpContext.Current.Application("GlobalDTContaConceptosContables"), DataTable).FiltroPrimero(String.Format("CveConceptoContable = {0}", CveConceptoContable)) - Dim Strr As String = dr("ConceptoContable").ToString - 'If dr("AplicaClasificacion").ToString <> "No" Then - ' Strr = Strr + " - Clasificación: " + DirectCast(HttpContext.Current.Application("GlobalDTContaConceptosContables"), DataTable).FiltroPrimeroValor("", "") - 'End If - OnError(String.Format("El concepto '{0}' no tiene especificada la cuenta. Favor de especificarla en la asignación de cuentas.", dr("ConceptoContable").ToString), ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + Dim Strr As String = "" + If HttpContext.Current.Application("GlobalDTContaConceptosContables") IsNot Nothing Then + Dim dr As Data.DataRow = DirectCast(HttpContext.Current.Application("GlobalDTContaConceptosContables"), DataTable).FiltroPrimero(String.Format("CveConceptoContable = {0}", CveConceptoContable)) + Strr = dr("ConceptoContable").ToString + 'If dr("AplicaClasificacion").ToString <> "No" Then + ' Strr = Strr + " - Clasificación: " + DirectCast(HttpContext.Current.Application("GlobalDTContaConceptosContables"), DataTable).FiltroPrimeroValor("", "") + 'End If + End If + + OnError(String.Format("El concepto '{0}' no tiene especificada la cuenta. Favor de especificarla en la asignación de cuentas.", Strr), ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) ElseIf ex1.Message.Contains("Vw_Val_Conta_CuentasResultados_SubProyectos") Then Dim Concepto2 As String = DirectCast(HttpContext.Current.Application("GlobalDTContaConceptosContables"), DataTable).FiltroPrimeroValor("ConceptoContable", String.Format("CveConceptoContable = {0}", CveConceptoContable)) OnError(String.Format("El concepto '{0}' requiere centro de costo", Concepto2), ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) @@ -2044,6 +2048,25 @@ Public Class ClsContabilidad Return Retorno End Function + Public Function GetPrePolizasDetalleResumen(CvePrePoliza As Integer, CveEmpresa As Integer) As Boolean 'Editado por charlie + Dim Retorno As Boolean = False + DataAdapter("PA_Conta_PrePolizasDetalleResumenGet") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener los detalles resumidos de la prepóliza.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function + Public Function GetContabilizacionVentas(CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Conta_ContabilizacionVentasGet") diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 2735ffee5..92608d0ba 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -9737,7 +9737,7 @@ Public Class ClsPaginas ImporteMN = (ImporteMovimiento * CompraActual.TC).RoundSQL If CompraActual.CveMoneda > 1 Then ImporteME = ImporteMovimiento Dim ContabilizableISR As Boolean = False - If UsuarioActual.CveEmpresa.Contiene(140, 7, 11, 12, 122, 145) Then + If UsuarioActual.CveEmpresa.Contiene(140, 7, 11, 12, 122, 145, 172, 173) Then ContabilizableISR = True End If diff --git a/Bancos/PopIECompras.aspx.vb b/Bancos/PopIECompras.aspx.vb index 9090e3cea..9c2195276 100644 --- a/Bancos/PopIECompras.aspx.vb +++ b/Bancos/PopIECompras.aspx.vb @@ -2309,7 +2309,7 @@ Partial Class Bancos_PopIECompras End If If MovimientoPagar.IVANoDeducible > 0 Then - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, If(ConceptoContable = 30, TxtFolio.Text.Trim, TxtObservaciones.Text), 280, ConceptoMovimiento, Fecha, IdCtaContableNoIVA, -1, CveIE, -1, CveCompra, -1, CveProveedor:=CveProveedor2, ImporteMX:=ImporteMXNoDeducible, TipoCambio:=TimpocambioGeneral, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeImpuesto) Then + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, If(ConceptoContable = 30, TxtFolio.Text.Trim, TxtObservaciones.Text), 280, ConceptoMovimiento, Fecha, IdCtaContableNoIVA, -1, CveIE, -1, CveCompra, CveProveedor:=CveProveedor2, ImporteMX:=ImporteMXNoDeducible, TipoCambio:=TimpocambioGeneral, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeImpuesto, CveSubProyecto:=CveSubProyecto) Then MsgError = "No se pudo insertar la póliza" Else ImporteMovimiento = 0 diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 932534f5b..272927469 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -7136,7 +7136,7 @@ Partial Class Compras_Compras If importeMovimiento <> 0 Then GuardoConcepto18 = True - If DdlMoneda.SelectedValue.ToEntero <> 1 And UsuarioActual.CveEmpresa.Contiene(119) Then + If DdlMoneda.SelectedValue.ToEntero <> 1 And UsuarioActual.CveEmpresa.Contiene(119, 158) Then 'PROVISION IdCtaContable = CtaProveedorExtranjera @@ -7160,7 +7160,9 @@ Partial Class Compras_Compras Dim importeMNNC = importeMovimientoNC * TipoCambioFactura * Multiplicador IdCtaContable = CtaProveedorExtranjera - If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimientoNC, Referencia, 272, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=TipoCambioFactura, Contabilizable:=SeContabiliza, CveCompraAmortizacion:=CveCompra) Then + Dim CveCon As Integer = 272 + If TipoCambioFactura > 1 Then CveCon = 304 + If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimientoNC, Referencia, CveCon, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=TipoCambioFactura, Contabilizable:=SeContabiliza, CveCompraAmortizacion:=CveCompra) Then Dim CveConceptoContableComplementaria As Integer = 206 If Gvr.DataKey("CveTipoConcepto").ToEntero = 2 Then CveConceptoContableComplementaria = 310 'cuando es acreedor diff --git a/Compras/eFacturas.aspx.vb b/Compras/eFacturas.aspx.vb index 22370ba6d..c887c8138 100644 --- a/Compras/eFacturas.aspx.vb +++ b/Compras/eFacturas.aspx.vb @@ -741,6 +741,8 @@ Partial Class Compras_eFacturas 'GvD.Columns(GvD.Columns.Count - 3).Visible = (UsuarioActual.CveRol = 1) ViewState("Orden") = String.Empty + If UsuarioActual.CveEmpresa.Contiene(141, 152, 153, 160, 161, 162) Then System.Threading.Thread.Sleep(2000) + txtFechaI.Text = Now.AddMonths(-1).FirstDayOfMonth().ToShortDateString ' String.Format("01/01/{0}", If(Now.Month > 6, Now.Year, Now.Year - 1)) txtFechaF.Text = Now.ToShortDateString 'txtFechaI.Text.ToDate.AddMonths(1).AddDays(-1).ToShortDateString diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb index d3e889629..2a712db9b 100644 --- a/Contabilidad/RegPrePolizaS.aspx.vb +++ b/Contabilidad/RegPrePolizaS.aspx.vb @@ -575,7 +575,7 @@ Partial Class ContabilidadC_RegPrePolizaS Dim CveConceptoContable As Integer = e.Row.DataKey("CveConceptoContable").ToEntero If CveConceptoContable.Contiene(1, 2, 13, 38, 207, 203, 39, 61, 62, 63, 4, 278, 291, 292, 272) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Ventas/Ventas.aspx?CveVenta={0}", e.Row.DataKey("CveVenta")) - If CveConceptoContable.Contiene(5, 6, 17, 18, 14, 19, 25, 26, 60, 234, 235, 240, 305, 306, 307, 308, 309, 310, 311, 312) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Compras/Compras.aspx?CveCompra={0}", e.Row.DataKey("CveCompra")) + If CveConceptoContable.Contiene(5, 6, 17, 18, 14, 19, 25, 26, 60, 205, 225, 234, 235, 240, 305, 306, 307, 308, 309, 310, 311, 312) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Compras/Compras.aspx?CveCompra={0}", e.Row.DataKey("CveCompra")) If CveConceptoContable.Contiene(68) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}", e.Row.DBCampo("CveMovimientoAlmacen")) If CveConceptoContable.Contiene(30, 204, 66, 92) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Bancos/IE.aspx?CveIE={0}", e.Row.DBCampo("CveIE")) diff --git a/General/RepIndicadorResumen.aspx b/General/RepIndicadorResumen.aspx index 54da8233f..4d18b8fc9 100644 --- a/General/RepIndicadorResumen.aspx +++ b/General/RepIndicadorResumen.aspx @@ -163,7 +163,7 @@
- +
@@ -179,7 +179,7 @@
- @@ -197,7 +197,7 @@
- +
@@ -212,6 +212,197 @@
+
+
+
+
+
+
+
+ +
+
+ + +
+
+ + Gastos +
+
+
+
+
+
+ +
+
+
+ + + + + + + +
+
+
+
+ +
+ + +
+
+ + Compras por clasificación - Gráfica +
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+ +
+
+ + +
+
+ + Cuentas por cobrar +
+
+
+
+
+
+ +
+
+
+ + + + + + + +
+
+
+
+ +
+ + +
+
+ + Cuentas por cobrar - Gráfica Saldo VS Recuperado +
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+ + +
+
+ + Cuentas por cobrar - Gráfica Recuperado +
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+ +
+
+ + +
+
+ + Cuentas por Pagar productores +
+
+
+
+
+
+ +
+
+
+ + + + + + +
+
+
+
+ +
+ + +
+
+ + Cuentas por Pagar productores - Gráfica +
+
+
+
+
+
+ +
+
@@ -222,12 +413,12 @@
- +
- Gastos + Cuentas por Pagar no productores
@@ -238,13 +429,12 @@
- - - - + +
@@ -253,12 +443,12 @@
- +
- Compras por clasificación - Gráfica + Cuentas por Pagar no productores - Gráfica
@@ -276,116 +466,6 @@
-
-
- - -
-
- - Cuentas por cobrar -
-
-
-
-
-
- -
-
-
- - - - - - -
-
-
-
- -
- - -
-
- - Cuentas por cobrar - Gráfica -
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
- -
-
- - -
-
- - Cuentas por pagar por Proveedor -
-
-
-
-
-
- -
-
-
- - - - - - -
-
-
-
- -
- - -
-
- - Cuentas por pagar por Proveedor - Gráfica -
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
- @@ -406,23 +486,20 @@ --%> <%----%> -