Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -542,10 +542,17 @@ Public Class ClsPaginas
|
|||||||
End Property
|
End Property
|
||||||
Property GlobalDTNomConceptosFunciones() As DataTable
|
Property GlobalDTNomConceptosFunciones() As DataTable
|
||||||
Get
|
Get
|
||||||
GlobalDTNomConceptosFunciones = DirectCast(Application("GlobalDTNomConceptosFunciones"), DataTable)
|
Dim AppNombre As String = "GlobalDTNomConceptosFunciones"
|
||||||
|
If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
|
||||||
|
Using ObjNom As New ClsNominas()
|
||||||
|
If ObjNom.GetConceptosFunciones() Then Application(AppNombre) = ObjNom.DtResultados
|
||||||
|
End Using
|
||||||
|
End If
|
||||||
|
GlobalDTNomConceptosFunciones = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
|
||||||
End Get
|
End Get
|
||||||
Set(value As DataTable)
|
Set(value As DataTable)
|
||||||
Application("GlobalDTNomConceptosFunciones") = value
|
Dim AppNombre As String = "GlobalDTNomConceptosFunciones"
|
||||||
|
HttpContext.Current.Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Property GlobalDTUsuarioResponsable(CveEmpresa As Integer) As DataTable
|
Property GlobalDTUsuarioResponsable(CveEmpresa As Integer) As DataTable
|
||||||
@@ -697,18 +704,32 @@ Public Class ClsPaginas
|
|||||||
End Property
|
End Property
|
||||||
Property GlobalDTNomSatBancos() As DataTable
|
Property GlobalDTNomSatBancos() As DataTable
|
||||||
Get
|
Get
|
||||||
GlobalDTNomSatBancos = DirectCast(Application("GlobalDTNomSatBancos"), DataTable)
|
Dim AppNombre As String = "GlobalDTNomSatBancos"
|
||||||
|
If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
|
||||||
|
Using ObjNom As New ClsNominas()
|
||||||
|
If ObjNom.GetBancos() Then Application(AppNombre) = ObjNom.DtResultados
|
||||||
|
End Using
|
||||||
|
End If
|
||||||
|
GlobalDTNomSatBancos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
|
||||||
End Get
|
End Get
|
||||||
Set(ByVal value As DataTable)
|
Set(value As DataTable)
|
||||||
Application("GlobalDTNomSatBancos") = value
|
Dim AppNombre As String = "GlobalDTNomSatBancos"
|
||||||
|
HttpContext.Current.Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Property GlobalDTNomSatConceptos() As DataTable
|
Property GlobalDTNomSatConceptos() As DataTable
|
||||||
Get
|
Get
|
||||||
GlobalDTNomSatConceptos = DirectCast(Application("GlobalDTNomSatConceptos"), DataTable)
|
Dim AppNombre As String = "GlobalDTNomSatConceptos"
|
||||||
|
If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
|
||||||
|
Using ObjNom As New ClsNominas()
|
||||||
|
If ObjNom.GetConceptos() Then Application(AppNombre) = ObjNom.DtResultados
|
||||||
|
End Using
|
||||||
|
End If
|
||||||
|
GlobalDTNomSatConceptos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
|
||||||
End Get
|
End Get
|
||||||
Set(ByVal value As DataTable)
|
Set(value As DataTable)
|
||||||
Application("GlobalDTNomSatConceptos") = value
|
Dim AppNombre As String = "GlobalDTNomSatConceptos"
|
||||||
|
HttpContext.Current.Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Property GlobalDTNomSatRegimenContratacion() As DataTable
|
Property GlobalDTNomSatRegimenContratacion() As DataTable
|
||||||
@@ -753,18 +774,32 @@ Public Class ClsPaginas
|
|||||||
End Property
|
End Property
|
||||||
Property GlobalDTNomSatRiesgoPuesto() As DataTable
|
Property GlobalDTNomSatRiesgoPuesto() As DataTable
|
||||||
Get
|
Get
|
||||||
GlobalDTNomSatRiesgoPuesto = DirectCast(Application("GlobalDTNomSatRiesgoPuesto"), DataTable)
|
Dim AppNombre As String = "GlobalDTNomSatRiesgoPuesto"
|
||||||
|
If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
|
||||||
|
Using ObjNom As New ClsNominas()
|
||||||
|
If ObjNom.GetRiesgoPuesto() Then Application(AppNombre) = ObjNom.DtResultados
|
||||||
|
End Using
|
||||||
|
End If
|
||||||
|
GlobalDTNomSatRiesgoPuesto = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
|
||||||
End Get
|
End Get
|
||||||
Set(ByVal value As DataTable)
|
Set(value As DataTable)
|
||||||
Application("GlobalDTNomSatRiesgoPuesto") = value
|
Dim AppNombre As String = "GlobalDTNomSatRiesgoPuesto"
|
||||||
|
HttpContext.Current.Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Property GlobalDTNomSatTipoIncapacidad() As DataTable
|
Property GlobalDTNomSatTipoIncapacidad() As DataTable
|
||||||
Get
|
Get
|
||||||
GlobalDTNomSatTipoIncapacidad = DirectCast(Application("GlobalDTNomSatTipoIncapacidad"), DataTable)
|
Dim AppNombre As String = "GlobalDTNomSatTipoIncapacidad"
|
||||||
|
If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
|
||||||
|
Using ObjNom As New ClsNominas()
|
||||||
|
If ObjNom.GetTipoIncapacidad() Then Application(AppNombre) = ObjNom.DtResultados
|
||||||
|
End Using
|
||||||
|
End If
|
||||||
|
GlobalDTNomSatTipoIncapacidad = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
|
||||||
End Get
|
End Get
|
||||||
Set(ByVal value As DataTable)
|
Set(value As DataTable)
|
||||||
Application("GlobalDTNomSatTipoIncapacidad") = value
|
Dim AppNombre As String = "GlobalDTNomSatTipoIncapacidad"
|
||||||
|
HttpContext.Current.Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
'Este GlobalDT no debe segmentarse por empresas, puesto que es para todas las empresas
|
'Este GlobalDT no debe segmentarse por empresas, puesto que es para todas las empresas
|
||||||
@@ -1904,7 +1939,7 @@ Public Class ClsPaginas
|
|||||||
Public Shared Property GlobalDTTipoCuenta() As DataTable
|
Public Shared Property GlobalDTTipoCuenta() As DataTable
|
||||||
Get
|
Get
|
||||||
Dim AppNombre As String = "GlobalDTTipoCuenta"
|
Dim AppNombre As String = "GlobalDTTipoCuenta"
|
||||||
If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
|
If HttpContext.Current.Application(AppNombre) Is Nothing Then
|
||||||
Dim ObjBancos As New ClsBancos
|
Dim ObjBancos As New ClsBancos
|
||||||
If ObjBancos.GetBancos_TiposCuenta() Then HttpContext.Current.Application(AppNombre) = ObjBancos.DtResultados
|
If ObjBancos.GetBancos_TiposCuenta() Then HttpContext.Current.Application(AppNombre) = ObjBancos.DtResultados
|
||||||
ObjBancos.Dispose()
|
ObjBancos.Dispose()
|
||||||
@@ -1921,30 +1956,45 @@ Public Class ClsPaginas
|
|||||||
'TipoPerioso
|
'TipoPerioso
|
||||||
Property GlobalDTTipoPeriodo() As DataTable
|
Property GlobalDTTipoPeriodo() As DataTable
|
||||||
Get
|
Get
|
||||||
GlobalDTTipoPeriodo = DirectCast(Application("GlobalDTTipoPeriodo"), DataTable)
|
Dim AppNombre As String = "GlobalDTTipoPeriodo"
|
||||||
|
If HttpContext.Current.Application(AppNombre) Is Nothing Then
|
||||||
|
Using ObjNom As New ClsNominas()
|
||||||
|
If ObjNom.GetTiposPeriodos() Then Application(AppNombre) = ObjNom.DtResultados
|
||||||
|
End Using
|
||||||
|
End If
|
||||||
|
GlobalDTTipoPeriodo = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
|
||||||
|
|
||||||
End Get
|
End Get
|
||||||
Set(value As DataTable)
|
Set(value As DataTable)
|
||||||
Application("GlobalDTTipoPeriodo") = value
|
Dim AppNombre As String = "GlobalDTTipoPeriodo"
|
||||||
|
HttpContext.Current.Application(AppNombre) = value
|
||||||
|
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
'Fin TipoPeriodo
|
'Fin TipoPeriodo
|
||||||
'Periodos
|
'Periodos
|
||||||
Property GlobalDTNominasPeriodos(CveTipoPeriodo As Integer, CvePeriodo As Integer, CveEmpresa As Integer) As DataTable
|
Property GlobalDTNominasPeriodos(CveTipoPeriodo As Integer, CvePeriodo As Integer, CveEmpresa As Integer) As DataTable
|
||||||
Get
|
Get
|
||||||
Dim Str As New StringBuilder
|
Dim AppNombre As String = $"GlobalDTNominasPeriodos-{CveEmpresa}"
|
||||||
If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
|
If HttpContext.Current.Application(AppNombre) Is Nothing Then
|
||||||
If CveTipoPeriodo <> -1 Then Str.AppendFormat(" {0} CveTipoPeriodo = {1}", If(Str.Length > 0, "AND", ""), CveTipoPeriodo)
|
Using ObjNom As New ClsNominas()
|
||||||
If CvePeriodo <> -1 Then Str.AppendFormat(" {0} CvePeriodo = {1}", If(Str.Length > 0, "AND", ""), CvePeriodo)
|
If ObjNom.GetPeriodos(-1, CveEmpresa, -1, -1, -1, -1) Then Application(AppNombre) = ObjNom.DtResultados
|
||||||
If Str.Length > 0 Then
|
End Using
|
||||||
Dim Dv As New DataView(DirectCast(Application("GlobalDTNominasPeriodos"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
|
End If
|
||||||
|
Dim filtros As New List(Of String)
|
||||||
|
If CveTipoPeriodo >= 0 Then filtros.Add($"CveTipoPeriodo = {CveTipoPeriodo}")
|
||||||
|
If CvePeriodo >= 0 Then filtros.Add($"CvePeriodo = {CvePeriodo}")
|
||||||
|
If filtros.Count > 0 Then
|
||||||
|
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Join(" AND ", filtros), "", DataViewRowState.CurrentRows)
|
||||||
GlobalDTNominasPeriodos = Dv.ToTable
|
GlobalDTNominasPeriodos = Dv.ToTable
|
||||||
Dv.Dispose()
|
Dv.Dispose()
|
||||||
Else
|
Else
|
||||||
GlobalDTNominasPeriodos = DirectCast(Application("GlobalDTNominasPeriodos"), DataTable)
|
GlobalDTNominasPeriodos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
|
||||||
End If
|
End If
|
||||||
End Get
|
End Get
|
||||||
Set(value As DataTable)
|
Set(value As DataTable)
|
||||||
Application("GlobalDTNominasPeriodos") = value
|
Dim AppNombre As String = $"GlobalDTNominasPeriodos-{CveEmpresa}"
|
||||||
|
HttpContext.Current.Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
'Fin Periodos
|
'Fin Periodos
|
||||||
@@ -2274,14 +2324,7 @@ Public Class ClsPaginas
|
|||||||
Application(AppNombre) = value
|
Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Property GlobalDTNom_Periodos() As DataTable
|
|
||||||
Get
|
|
||||||
GlobalDTNom_Periodos = DirectCast(Application("GlobalDTNom_Periodos"), DataTable)
|
|
||||||
End Get
|
|
||||||
Set(value As DataTable)
|
|
||||||
Application("GlobalDTNom_Periodos") = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
Public Shared Property GlobalDTVtaFormaPago() As DataTable
|
Public Shared Property GlobalDTVtaFormaPago() As DataTable
|
||||||
Get
|
Get
|
||||||
Dim AppNombre As String = "GlobalDTVtaFormaPago"
|
Dim AppNombre As String = "GlobalDTVtaFormaPago"
|
||||||
@@ -3753,7 +3796,7 @@ Public Class ClsPaginas
|
|||||||
End Property
|
End Property
|
||||||
#End Region
|
#End Region
|
||||||
#Region "*********** D T - C O M B U S T I B L E S ***********"
|
#Region "*********** D T - C O M B U S T I B L E S ***********"
|
||||||
Public Shared Property GlobalDTCombustibles(CveEmpresa As Integer) As DataTable
|
Public Shared Property GlobalDTCombustibles(CveEmpresa As Integer) As DataTable
|
||||||
Get
|
Get
|
||||||
Dim AppNombre As String = $"GlobalDTCombustibles-{CveEmpresa}"
|
Dim AppNombre As String = $"GlobalDTCombustibles-{CveEmpresa}"
|
||||||
'sino existe, recarga los datos
|
'sino existe, recarga los datos
|
||||||
|
|||||||
@@ -291,7 +291,7 @@ Partial Class Bancos_DepositosCaja
|
|||||||
CveSubProyectoComision = DdlSubProyectoDeposito.SelectedValue.ToEntero
|
CveSubProyectoComision = DdlSubProyectoDeposito.SelectedValue.ToEntero
|
||||||
CveClasificacionComision = DdlClasificacion.SelectedValue.ToEntero
|
CveClasificacionComision = DdlClasificacion.SelectedValue.ToEntero
|
||||||
If Comision <> 0 Then
|
If Comision <> 0 Then
|
||||||
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Comision, DdlClasificacion.SelectedItem.Text, 51, DdlClasificacion.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacionComision, CveSubProyecto:=CveSubProyectoComision, ImporteMX:=Comision * TipoCambio) Then
|
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Comision, DdlClasificacion.SelectedItem.Text, 78, DdlClasificacion.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacionComision, CveSubProyecto:=CveSubProyectoComision, ImporteMX:=Comision * TipoCambio) Then
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -2506,25 +2506,16 @@ Partial Class Bancos_IE
|
|||||||
End If
|
End If
|
||||||
Dep.Dispose()
|
Dep.Dispose()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If CveOCSolicitudAnticipo > 0 Then
|
If CveOCSolicitudAnticipo > 0 Then
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dim ObjOC As New ClsOC
|
Dim ObjOC As New ClsOC
|
||||||
If ObjOC.GetOCAnticipoSaldo(CveOCSolicitudAnticipo, UsuarioActual.CveEmpresa) Then
|
If ObjOC.GetOCAnticipoSaldo(CveOCSolicitudAnticipo, UsuarioActual.CveEmpresa) Then
|
||||||
SaldoOCAnticipo = ObjOC.DtResultados(0)("Saldo").ToString.ToDecimal.Round(2)
|
SaldoOCAnticipo = ObjOC.DtResultados(0)("Saldo").ToString.ToDecimal.RoundSQL(2)
|
||||||
Else
|
Else
|
||||||
SaldoOCAnticipo = 0
|
SaldoOCAnticipo = 0
|
||||||
End If
|
End If
|
||||||
ObjOC.Dispose()
|
ObjOC.Dispose()
|
||||||
|
|
||||||
Dim ImporteComparacion As Decimal = TxtImporte.Text.ToDecimal
|
Dim ImporteComparacion As Decimal = TxtImporte.Text.ToDecimal
|
||||||
|
|
||||||
'
|
|
||||||
If ChkPagarPesos.Checked Then
|
If ChkPagarPesos.Checked Then
|
||||||
ImporteComparacion = ImporteOriginalDolaras
|
ImporteComparacion = ImporteOriginalDolaras
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -10,6 +10,9 @@ using Microsoft.Reporting.WebForms;
|
|||||||
using System.Activities.Expressions;
|
using System.Activities.Expressions;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using CrystalDecisions.CrystalReports.Engine;
|
||||||
|
using CrystalDecisions.Shared;
|
||||||
|
using System.Diagnostics;
|
||||||
|
|
||||||
public partial class Contabilidad_RepIVA : ClsPaginas
|
public partial class Contabilidad_RepIVA : ClsPaginas
|
||||||
{
|
{
|
||||||
@@ -245,7 +248,11 @@ public partial class Contabilidad_RepIVA : ClsPaginas
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
Ruta = ModExtensiones.DirectorioBaseEmpresas + $@"Empresas\Grales\Formatos\{Formato}";
|
Ruta = ModExtensiones.DirectorioBaseEmpresas + $@"Empresas\Grales\Formatos\{Formato}";
|
||||||
ImprimirbytesPDF(ImprimirSubRepPDFCrystal(Ruta,Dt,para, DtIEPSA,DtIVAA,"RepIEPSPorcentaje.rpt","RepIVAPorcentaje.rpt", "Reporte de IVA", Opcion), "Reporte de IVA", Opcion);
|
|
||||||
|
|
||||||
|
ImprimirbytesPDF(ImprimirSubRepPDFCrystal(Ruta, Dt, para, DtIEPSA, DtIVAA, "RepIEPSPorcentaje.rpt", "RepIVAPorcentaje.rpt", "Reporte de IVA", Opcion), "Reporte de IVA", Opcion);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
Ruta.GuardaLogAD();
|
Ruta.GuardaLogAD();
|
||||||
//ImprimirbytesPDF(ImprimirPDFCrystal(Ruta, Dt, para, "Reporte de IVA", Opcion), "Reporte de IVA", Opcion);
|
//ImprimirbytesPDF(ImprimirPDFCrystal(Ruta, Dt, para, "Reporte de IVA", Opcion), "Reporte de IVA", Opcion);
|
||||||
@@ -398,4 +405,135 @@ public partial class Contabilidad_RepIVA : ClsPaginas
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//public void IImprimirbytesPDF(byte[] bytes, string NombreArchivo = "Reporte", string Formato = "PDF", bool Descarga = false, string Content_Disposition = "attachment", string Extension = "")
|
||||||
|
//{
|
||||||
|
// // limpio ReportViwer
|
||||||
|
// string mimeType = null;
|
||||||
|
// // If Descarga Then
|
||||||
|
// // Try
|
||||||
|
// // bytes = bytes
|
||||||
|
// // File.WriteAllBytes(String.Format("{0}PDF/whatever.gif", UsuarioActual.Empresa.Ruta), img)
|
||||||
|
// // Catch ex As Exception
|
||||||
|
// // If UsuarioActual.CveRol = 1 Then
|
||||||
|
// // Alert(ex.Message, TipoMensaje.MsgAdvertencia)
|
||||||
|
// // Else
|
||||||
|
// // Alert("Ocurrió un error al generar la descarga. Favor de contactar a soporte tecnico cod'IMPDFclspag'", TipoMensaje.MsgAdvertencia)
|
||||||
|
// // End If
|
||||||
|
// // End Try
|
||||||
|
// // End If
|
||||||
|
// try
|
||||||
|
// {
|
||||||
|
// bytes = bytes;
|
||||||
|
// //Response.Buffer = true;
|
||||||
|
// //Response.Clear();
|
||||||
|
// //if (Formato == "PDF")
|
||||||
|
// // Response.ContentType = "application/pdf";
|
||||||
|
// //else
|
||||||
|
// // Response.ContentType = mimeType;
|
||||||
|
// //Response.ClearHeaders();
|
||||||
|
// //string fileExtension = "";
|
||||||
|
// //if (!string.IsNullOrEmpty(Extension))
|
||||||
|
// // fileExtension = Extension;
|
||||||
|
// //else
|
||||||
|
// // fileExtension = Formato == "PDF" ? "pdf" : "xls";
|
||||||
|
// //Response.AddHeader("content-disposition", string.Format("{0}; filename=\"{1}.{2}\"", Content_Disposition, NombreArchivo, fileExtension));
|
||||||
|
// //Response.BinaryWrite(bytes); // create the file
|
||||||
|
// //Response.Flush(); // send it to the client to download
|
||||||
|
// //bytes = null;
|
||||||
|
// //HttpContext.Current.Response.SuppressContent = true;
|
||||||
|
// //HttpContext.Current.ApplicationInstance.CompleteRequest();
|
||||||
|
// Alert("ok");
|
||||||
|
// }
|
||||||
|
// // HttpContext.Current.Response.End()
|
||||||
|
// catch (Exception ex)
|
||||||
|
// {
|
||||||
|
// if (UsuarioActual.CveRol == 1) {
|
||||||
|
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// Alert("Ocurrió un error al generar la descarga. Favor de contactar a soporte tecnico cod:'IMPDFclspag'", TipoMensaje.MsgAdvertencia);
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
//public byte[] IImprimirSubRepPDFCrystal(string RutaReporte, DataTable DataSource, List<CrystalParametro> Parametros, DataTable DataSource1, DataTable DataSource2, string SubRep1, string SubRep2, string NombreArchivo = "Reporte", string Formato = "PDF", ReportDocument MR = null/* TODO Change to default(_) if this is not a reference type */)
|
||||||
|
//{
|
||||||
|
// // limpio ReportViwer
|
||||||
|
// Stopwatch sw = Stopwatch.StartNew();
|
||||||
|
|
||||||
|
// if (MR == null)
|
||||||
|
// MR = new ReportDocument();
|
||||||
|
// ReportDocument SR1 = new ReportDocument();
|
||||||
|
// ReportDocument SR2 = new ReportDocument();
|
||||||
|
// byte[] Bytes = null;
|
||||||
|
// ExportFormatType formatType = ExportFormatType.NoFormat;
|
||||||
|
// try
|
||||||
|
// {
|
||||||
|
// MR.Load(RutaReporte);
|
||||||
|
// SR1 = MR.OpenSubreport(SubRep1);
|
||||||
|
// SR2 = MR.OpenSubreport(SubRep2);
|
||||||
|
// MR.SetDataSource(DataSource);
|
||||||
|
// SR1.SetDataSource(DataSource1);
|
||||||
|
// SR2.SetDataSource(DataSource2);
|
||||||
|
// foreach (CrystalParametro item in Parametros)
|
||||||
|
// MR.SetParameterValue(item.Nombre, item.Valor);
|
||||||
|
// switch (Formato)
|
||||||
|
// {
|
||||||
|
// case "PDF":
|
||||||
|
// {
|
||||||
|
// formatType = ExportFormatType.PortableDocFormat;
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// case "EXCEL":
|
||||||
|
// {
|
||||||
|
// formatType = ExportFormatType.Excel;
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// System.IO.Stream Stream = MR.ExportToStream(formatType);
|
||||||
|
// BinaryReader BD = new BinaryReader(MR.ExportToStream(formatType));
|
||||||
|
// Bytes = BD.ReadBytes(System.Convert.ToInt32(MR.ExportToStream(formatType).Length));
|
||||||
|
// BD.Dispose();
|
||||||
|
// Stream.Dispose();
|
||||||
|
// }
|
||||||
|
// // Dim Buffer(CInt(Stream.Length)) As Byte
|
||||||
|
// // Bytes = Buffer
|
||||||
|
// // MR.ExportToHttpResponse(formatType, Response, True, NombreArchivo)
|
||||||
|
// catch (CrystalReportsException ex)
|
||||||
|
// {
|
||||||
|
// if(ex.Message != null)
|
||||||
|
// {
|
||||||
|
// Alert(ex.Message);
|
||||||
|
// }
|
||||||
|
// if (ex.InnerException != null)
|
||||||
|
// {
|
||||||
|
// Alert(ex.InnerException.Message);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// }
|
||||||
|
// // HAY QUE VALIDAR QUE LOS OBJETOS QUE SE USAN PARA GUARDAR LOG EXISTEN!!! IPP 14 AGOSTO 2017
|
||||||
|
// // GuardaLog($"Error: {ex.InnerException.Message} | Descripcion: {If(ex.InnerException.InnerException IsNot Nothing, ex.InnerException.InnerException.Message, "Sin descripcion")} - Ruta {RutaReporte}")
|
||||||
|
// catch (Exception ex)
|
||||||
|
// {
|
||||||
|
// //GuardaLog(ex.InnerException != null && ex.Message != null ? $"Error: {ex.InnerException.Message ?? ex.Message} | Descripcion: {ex.InnerException != null && ex.InnerException.InnerException != null && ex.InnerException.InnerException.Message != null ? ex.InnerException.InnerException.Message : ex.InnerException != null && ex.InnerException.Message != null ? ex.InnerException.Message : "Sin descripcion"} Ruta {RutaReporte}" : $"Sin descripción - Ruta {RutaReporte}");
|
||||||
|
// if (ex.Message != null)
|
||||||
|
// {
|
||||||
|
// Alert(ex.Message);
|
||||||
|
// }
|
||||||
|
// if (ex.InnerException != null)
|
||||||
|
// {
|
||||||
|
// Alert(ex.InnerException.Message);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// sw.Stop();
|
||||||
|
// if (sw.Elapsed.TotalSeconds > 10)
|
||||||
|
// // GuardaLog($"Reporte:{RutaReporte} | Tiempo Renderizado Milisegundos: {sw.ElapsedMilliseconds},Total Segundos: {sw.Elapsed.TotalSeconds} ");
|
||||||
|
// if (MR != null)
|
||||||
|
// MR.Dispose();
|
||||||
|
// return Bytes;
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
Binary file not shown.
Binary file not shown.
26
Global.asax
26
Global.asax
@@ -82,23 +82,23 @@
|
|||||||
|
|
||||||
End Using
|
End Using
|
||||||
|
|
||||||
GuardaLogAsax(String.Format("Globalasax 7:{0}", DateTime.Now))
|
'GuardaLogAsax(String.Format("Globalasax 7:{0}", DateTime.Now))
|
||||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
'C A R G A - N O M
|
'C A R G A - N O M
|
||||||
|
|
||||||
Using ObjNom As New ClsNominas()
|
'Using ObjNom As New ClsNominas()
|
||||||
'If ObjNom.GetConceptos(-1) Then Application("GlobalDTNomConceptos") = ObjNom.DtResultados Else Application("GlobalDTNomConceptos") = Nothing
|
' 'If ObjNom.GetConceptos(-1) Then Application("GlobalDTNomConceptos") = ObjNom.DtResultados Else Application("GlobalDTNomConceptos") = Nothing
|
||||||
If ObjNom.GetConceptosFunciones() Then Application("GlobalDTNomConceptosFunciones") = ObjNom.DtResultados Else Application("GlobalDTNomConceptosFunciones") = Nothing
|
' 'If ObjNom.GetConceptosFunciones() Then Application("GlobalDTNomConceptosFunciones") = ObjNom.DtResultados Else Application("GlobalDTNomConceptosFunciones") = Nothing
|
||||||
If ObjNom.GetTiposPeriodos() Then Application("GlobalDTTipoPeriodo") = ObjNom.DtResultados Else Application("GlobalDTTipoPeriodo") = Nothing
|
' 'If ObjNom.GetTiposPeriodos() Then Application("GlobalDTTipoPeriodo") = ObjNom.DtResultados Else Application("GlobalDTTipoPeriodo") = Nothing
|
||||||
If ObjNom.GetPeriodos(-1, -1, -1, -1, -1) Then Application("GlobalDTNominasPeriodos") = ObjNom.DtResultados Else Application("GlobalDTNominasPeriodos") = Nothing
|
' 'If ObjNom.GetPeriodos(-1, -1, -1, -1, -1) Then Application("GlobalDTNominasPeriodos") = ObjNom.DtResultados Else Application("GlobalDTNominasPeriodos") = Nothing
|
||||||
If ObjNom.GetBancos Then Application("GlobalDTNomSatBancos") = ObjNom.DtResultados Else Application("GlobalDTNomSatBancos") = Nothing
|
' 'If ObjNom.GetBancos Then Application("GlobalDTNomSatBancos") = ObjNom.DtResultados Else Application("GlobalDTNomSatBancos") = Nothing
|
||||||
If ObjNom.GetConceptos Then Application("GlobalDTNomSatConceptos") = ObjNom.DtResultados Else Application("GlobalDTNomSatConceptos") = Nothing
|
' 'If ObjNom.GetConceptos Then Application("GlobalDTNomSatConceptos") = ObjNom.DtResultados Else Application("GlobalDTNomSatConceptos") = Nothing
|
||||||
'If ObjNom.GetRegimenContratacion Then Application("GlobalDTNomSatRegimenContratacion") = ObjNom.DtResultados Else Application("GlobalDTNomSatRegimenContratacion") = Nothing
|
' 'If ObjNom.GetRegimenContratacion Then Application("GlobalDTNomSatRegimenContratacion") = ObjNom.DtResultados Else Application("GlobalDTNomSatRegimenContratacion") = Nothing
|
||||||
If ObjNom.GetRiesgoPuesto Then Application("GlobalDTNomSatRiesgoPuesto") = ObjNom.DtResultados Else Application("GlobalDTNomSatRiesgoPuesto") = Nothing
|
' 'If ObjNom.GetRiesgoPuesto Then Application("GlobalDTNomSatRiesgoPuesto") = ObjNom.DtResultados Else Application("GlobalDTNomSatRiesgoPuesto") = Nothing
|
||||||
If ObjNom.GetTipoIncapacidad Then Application("GlobalDTNomSatTipoIncapacidad") = ObjNom.DtResultados Else Application("GlobalDTNomSatTipoIncapacidad") = Nothing
|
' 'If ObjNom.GetTipoIncapacidad Then Application("GlobalDTNomSatTipoIncapacidad") = ObjNom.DtResultados Else Application("GlobalDTNomSatTipoIncapacidad") = Nothing
|
||||||
End Using
|
'End Using
|
||||||
|
|
||||||
GuardaLogAsax(String.Format("Globalasax 9:{0}", DateTime.Now))
|
' GuardaLogAsax(String.Format("Globalasax 9:{0}", DateTime.Now))
|
||||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
'------------------------------------------------------------------------------S I S T E M A ----------------------------------------------------------------------------------
|
'------------------------------------------------------------------------------S I S T E M A ----------------------------------------------------------------------------------
|
||||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -537,9 +537,9 @@
|
|||||||
<asp:Button Text="Lote" ID="BtnLote" CssClass="btn btn-primary" OnClick="BtnLote_Click" runat="server" Visible="false" />
|
<asp:Button Text="Lote" ID="BtnLote" CssClass="btn btn-primary" OnClick="BtnLote_Click" runat="server" Visible="false" />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:BoundField HeaderText="Unidad" DataField="UM" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="7.5%" />
|
<asp:BoundField HeaderText="Unidad" DataField="UM" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||||
<asp:HyperLinkField HeaderText="Producto o Servicio" DataTextField="CodigoPS" DataNavigateUrlFields="CvePS" DataNavigateUrlFormatString="/Ventas/ProductosServicios.aspx?CvePS={0}" Target="_blank" ItemStyle-HorizontalAlign="Left" />
|
<asp:HyperLinkField HeaderText="Productos" DataTextField="CodigoPS" DataNavigateUrlFields="CvePS" DataNavigateUrlFormatString="/Ventas/ProductosServicios.aspx?CvePS={0}" Target="_blank" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:BoundField HeaderText="SubProyecto" DataField="SubProyecto" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="7.5%" />
|
<asp:BoundField HeaderText="SubProyecto" DataField="SubProyecto" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:BoundField HeaderText="P.U." DataField="PU" DataFormatString="{0:#,###.####}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="7.5%" />
|
<asp:BoundField HeaderText="P.U." DataField="PU" DataFormatString="{0:#,###.####}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="7.5%" />
|
||||||
<asp:BoundField HeaderText="C.I." DataField="CostoIndirecto" DataFormatString="{0:###.####}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="7.5%" />
|
<asp:BoundField HeaderText="C.I." DataField="CostoIndirecto" DataFormatString="{0:###.####}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="7.5%" />
|
||||||
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right" FooterStyle-HorizontalAlign="Right" ItemStyle-Width="7.5%">
|
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right" FooterStyle-HorizontalAlign="Right" ItemStyle-Width="7.5%">
|
||||||
|
|||||||
@@ -2377,7 +2377,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
|
|
||||||
If tmpCostos.Rows.Count > 0 Then
|
If tmpCostos.Rows.Count > 0 Then
|
||||||
Dim Concepto As String = ConceptoPoliza
|
Dim Concepto As String = ConceptoPoliza
|
||||||
Dim CvePrePoliza = ObjConta.AddPrePolizas("Inv_EntradaSalida", 74, DtCostos.SUM("Total"), DtCostos.SUM("Total"), 1, TxtFecha.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
Dim CvePrePoliza = ObjConta.AddPrePolizas("RecepAlm", 74, DtCostos.SUM("Total"), DtCostos.SUM("Total"), 1, TxtFecha.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
Dim tCveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={CveAlmacen}").ToEntero
|
Dim tCveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={CveAlmacen}").ToEntero
|
||||||
Dim tCveConcepto As Integer = 69
|
Dim tCveConcepto As Integer = 69
|
||||||
|
|
||||||
|
|||||||
@@ -1452,7 +1452,7 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
|
|
||||||
If tmpCostos.Rows.Count > 0 Then
|
If tmpCostos.Rows.Count > 0 Then
|
||||||
Dim Concepto As String = ConceptoPoliza
|
Dim Concepto As String = ConceptoPoliza
|
||||||
Dim CvePrePoliza = ObjConta.AddPrePolizas("Inv_EntradaSalidaUsados", 74, DtCostos.SUMD("Total"), DtCostos.SUMD("Total"), 1, TxtFecha.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
Dim CvePrePoliza = ObjConta.AddPrePolizas("Inv_EntradaSalidaUsados2", 74, DtCostos.SUMD("Total"), DtCostos.SUMD("Total"), 1, TxtFecha.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
Dim tCveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={CveAlmacen}").ToEntero
|
Dim tCveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={CveAlmacen}").ToEntero
|
||||||
Dim tCveConcepto As Integer = 278
|
Dim tCveConcepto As Integer = 278
|
||||||
|
|
||||||
@@ -2123,7 +2123,7 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
|
|
||||||
If tmpCostos.Rows.Count > 0 Then
|
If tmpCostos.Rows.Count > 0 Then
|
||||||
Dim Concepto As String = $" {TxtObservaciones.Text}"
|
Dim Concepto As String = $" {TxtObservaciones.Text}"
|
||||||
Dim CvePrePoliza = ObjConta.AddPrePolizas("Inv_EntradaSalida", 74, DtCostos.SUM("Total"), DtCostos.SUM("Total"), 1, TxtFecha.Text.ToDate, $"F: {HplVenta.Text}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
Dim CvePrePoliza = ObjConta.AddPrePolizas("Inv_EntradaSalidaUsados", 74, DtCostos.SUM("Total"), DtCostos.SUM("Total"), 1, TxtFecha.Text.ToDate, $"F: {HplVenta.Text}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
If HdnCveOrdenCompra.Value.ToEntero > 0 Then
|
If HdnCveOrdenCompra.Value.ToEntero > 0 Then
|
||||||
MovAlmacen = False
|
MovAlmacen = False
|
||||||
|
|||||||
@@ -41,7 +41,6 @@ Partial Class Nomina_CatPeriodos
|
|||||||
Dim ObjNom_Periodos As New ClsNominas
|
Dim ObjNom_Periodos As New ClsNominas
|
||||||
If ObjNom_Periodos.GetPeriodos(DdlTipoPeriodo.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa, DdlEjercicio.SelectedValue.ToEntero(), -1, -1, DdlEstatus.SelectedValue.ToEntero()) Then
|
If ObjNom_Periodos.GetPeriodos(DdlTipoPeriodo.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa, DdlEjercicio.SelectedValue.ToEntero(), -1, -1, DdlEstatus.SelectedValue.ToEntero()) Then
|
||||||
ViewState("DTNom_Periodos") = ObjNom_Periodos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
ViewState("DTNom_Periodos") = ObjNom_Periodos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||||
GlobalDTNom_Periodos = ObjNom_Periodos.DtResultados
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
Me.GvDatos.DataSource = Nothing
|
Me.GvDatos.DataSource = Nothing
|
||||||
@@ -153,7 +152,7 @@ Partial Class Nomina_CatPeriodos
|
|||||||
If ObjNom_Periodos.RemovePeriodo(GvDatos.DataKeys(e.RowIndex).Value.ToString().ToEntero()) Then
|
If ObjNom_Periodos.RemovePeriodo(GvDatos.DataKeys(e.RowIndex).Value.ToString().ToEntero()) Then
|
||||||
GvDatos.EditIndex = -1
|
GvDatos.EditIndex = -1
|
||||||
ViewState("DTNom_Periodos") = ObjNom_Periodos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
ViewState("DTNom_Periodos") = ObjNom_Periodos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||||
GlobalDTNom_Periodos = ObjNom_Periodos.DtResultados
|
GlobalDTNominasPeriodos(-1, -1, UsuarioActual.CveEmpresa) = Nothing
|
||||||
Alert("El Periodo se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
Alert("El Periodo se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -265,7 +264,7 @@ Partial Class Nomina_CatPeriodos
|
|||||||
Alert("El nuevo Periodo se guardó correctamente.", TipoMensaje.MsgInformacion)
|
Alert("El nuevo Periodo se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
ViewState("DTNom_Periodos") = ObjNom_Periodos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
ViewState("DTNom_Periodos") = ObjNom_Periodos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||||
GlobalDTNom_Periodos = ObjNom_Periodos.DtResultados
|
GlobalDTNominasPeriodos(-1, -1, UsuarioActual.CveEmpresa) = Nothing
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
If String.IsNullOrEmpty(ViewState("Orden").ToString()) Then
|
If String.IsNullOrEmpty(ViewState("Orden").ToString()) Then
|
||||||
CargaGrid(ViewState("Orden").ToString())
|
CargaGrid(ViewState("Orden").ToString())
|
||||||
@@ -281,7 +280,7 @@ Partial Class Nomina_CatPeriodos
|
|||||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
ViewState("DTNom_Periodos") = ObjNom_Periodos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
ViewState("DTNom_Periodos") = ObjNom_Periodos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||||
GlobalDTNom_Periodos = ObjNom_Periodos.DtResultados
|
GlobalDTNominasPeriodos(-1, -1, UsuarioActual.CveEmpresa) = Nothing
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
If String.IsNullOrEmpty(ViewState("Orden").ToString()) Then
|
If String.IsNullOrEmpty(ViewState("Orden").ToString()) Then
|
||||||
CargaGrid(ViewState("Orden").ToString())
|
CargaGrid(ViewState("Orden").ToString())
|
||||||
|
|||||||
@@ -779,6 +779,10 @@ Partial Class RH_Reclutamiento
|
|||||||
|
|
||||||
Try
|
Try
|
||||||
|
|
||||||
|
Dim dt As DataTable = GlobalDTTipoPeriodo()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
HdfEmpresa.Value = UsuarioActual.CveEmpresa.ToString
|
HdfEmpresa.Value = UsuarioActual.CveEmpresa.ToString
|
||||||
|
|
||||||
If Page.ClientQueryString.Contains("CvePersonal") Then
|
If Page.ClientQueryString.Contains("CvePersonal") Then
|
||||||
|
|||||||
@@ -655,7 +655,7 @@ Partial Class Sistemas_Empresa
|
|||||||
'RECARGA EMPRESA
|
'RECARGA EMPRESA
|
||||||
If TextoError = "" Then
|
If TextoError = "" Then
|
||||||
If ObjEmpresas.GetEmpresas(CveEmpresa, "-1", "-1", "-1", "-1") Then
|
If ObjEmpresas.GetEmpresas(CveEmpresa, "-1", "-1", "-1", "-1") Then
|
||||||
GlobalDTEmpresas(CveEmpresa) = ObjEmpresas.DtResultados
|
GlobalDTEmpresas(CveEmpresa) = Nothing
|
||||||
|
|
||||||
'verifico si existe la carpeta de la empresa, sino la crea
|
'verifico si existe la carpeta de la empresa, sino la crea
|
||||||
For Each dr As Data.DataRow In ObjEmpresas.DtResultados.Rows
|
For Each dr As Data.DataRow In ObjEmpresas.DtResultados.Rows
|
||||||
@@ -665,9 +665,8 @@ Partial Class Sistemas_Empresa
|
|||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ObjGral.GetClasificacionPorcentaje(CveEmpresa) Then
|
GlobalDTClasificacionPorcentaje(CveEmpresa) = Nothing
|
||||||
GlobalDTClasificacionPorcentaje(CveEmpresa) = ObjGral.DtResultados
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'AGREGAR FUNCIONALIDADES
|
'AGREGAR FUNCIONALIDADES
|
||||||
@@ -706,31 +705,35 @@ Partial Class Sistemas_Empresa
|
|||||||
If TextoError = "" And TxtBDContPAQi.Text.Trim <> "" And TxtBDContPAQi.Text.Trim <> "" And TxtBDContPAQi.Text.Trim <> "" And TxtBDContPAQi.Text.Trim <> "" Then
|
If TextoError = "" And TxtBDContPAQi.Text.Trim <> "" And TxtBDContPAQi.Text.Trim <> "" And TxtBDContPAQi.Text.Trim <> "" And TxtBDContPAQi.Text.Trim <> "" Then
|
||||||
|
|
||||||
If UsuarioActual.Empresa.UsaContabilidad Then
|
If UsuarioActual.Empresa.UsaContabilidad Then
|
||||||
'CREA OBJETO EMPRESA
|
|
||||||
If ObjEmpresas.GetEmpresas(TxtCveEmpresa.Text.ToEntero, "-1", "-1", "-1", "-1") Then
|
|
||||||
Dim Empresa As New Empresa
|
|
||||||
Empresa = ObjEmpresas.Empresa
|
|
||||||
|
|
||||||
ObjContPAQ = New ClsContPAQi(Empresa)
|
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||||
|
'CREA OBJETO EMPRESA
|
||||||
|
If ObjEmpresas.GetEmpresas(TxtCveEmpresa.Text.ToEntero, "-1", "-1", "-1", "-1") Then
|
||||||
|
Dim Empresa As New Empresa
|
||||||
|
Empresa = ObjEmpresas.Empresa
|
||||||
|
|
||||||
If ObjContPAQ.Conectado Then
|
ObjContPAQ = New ClsContPAQi(Empresa)
|
||||||
'ADD
|
|
||||||
If BDContPAQ = "" Then
|
If ObjContPAQ.Conectado Then
|
||||||
If Not ObjContPAQ.TRIGGER(TxtBDContPAQi.Text.Trim) Then
|
'ADD
|
||||||
TextoError = "Los datos de conexion al servidor de contabilidad son incorrectos"
|
If BDContPAQ = "" Then
|
||||||
|
If Not ObjContPAQ.TRIGGER(TxtBDContPAQi.Text.Trim) Then
|
||||||
|
TextoError = "Los datos de conexion al servidor de contabilidad son incorrectos"
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
|
||||||
|
|
||||||
'UPDATE
|
'UPDATE
|
||||||
If BDContPAQ <> "" And (BDContPAQ <> TxtBDContPAQi.Text.Trim Or ServerContPAQ <> TxtServerContPAQi.Text.Trim) Then
|
If BDContPAQ <> "" And (BDContPAQ <> TxtBDContPAQi.Text.Trim Or ServerContPAQ <> TxtServerContPAQi.Text.Trim) Then
|
||||||
If Not ObjContPAQ.TRIGGER(TxtBDContPAQi.Text.Trim) Then
|
If Not ObjContPAQ.TRIGGER(TxtBDContPAQi.Text.Trim) Then
|
||||||
TextoError = "Los datos de conexion al servidor de contabilidad son incorrectos"
|
TextoError = "Los datos de conexion al servidor de contabilidad son incorrectos"
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
Else
|
||||||
|
TextoError = "Los datos de conexion al servidor de contabilidad son incorrectos"
|
||||||
End If
|
End If
|
||||||
Else
|
|
||||||
TextoError = "Los datos de conexion al servidor de contabilidad son incorrectos"
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
Alert("La empresa tiene la información para el uso de contabilidad pero no se tiene activada", TipoMensaje.MsgAdvertencia)
|
Alert("La empresa tiene la información para el uso de contabilidad pero no se tiene activada", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
@@ -781,11 +784,16 @@ Partial Class Sistemas_Empresa
|
|||||||
If ObjEmpresa.GetEmpresas(CveEmpresa, "-1", "-1", "-1", "-1") Then
|
If ObjEmpresa.GetEmpresas(CveEmpresa, "-1", "-1", "-1", "-1") Then
|
||||||
|
|
||||||
Empresa = ObjEmpresa.Empresa
|
Empresa = ObjEmpresa.Empresa
|
||||||
Dim ObjContabilidad As New ClsContPAQi(Empresa)
|
|
||||||
If ObjContabilidad.GetCuentas(-1, "-1", -1, IdPadre:=IdCuentaPadre) Then
|
If Empresa.TipoContabilidad = 2 Then
|
||||||
DtCuentasContables = ObjContabilidad.DtResultados
|
Dim ObjContabilidad As New ClsContPAQi(Empresa)
|
||||||
|
If ObjContabilidad.GetCuentas(-1, "-1", -1, IdPadre:=IdCuentaPadre) Then
|
||||||
|
DtCuentasContables = ObjContabilidad.DtResultados
|
||||||
|
End If
|
||||||
|
ObjContabilidad.Dispose()
|
||||||
End If
|
End If
|
||||||
ObjContabilidad.Dispose()
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
ObjEmpresa.Dispose()
|
ObjEmpresa.Dispose()
|
||||||
@@ -1410,7 +1418,7 @@ Partial Class Sistemas_Empresa
|
|||||||
Private Sub CargaCuentasIVA(ByRef ObjEmpresas As ClsSisEmpresas)
|
Private Sub CargaCuentasIVA(ByRef ObjEmpresas As ClsSisEmpresas)
|
||||||
|
|
||||||
If ObjEmpresas.GetEmpresas(CveEmpresa, "-1", "-1", "-1", "-1") Then
|
If ObjEmpresas.GetEmpresas(CveEmpresa, "-1", "-1", "-1", "-1") Then
|
||||||
If ObjEmpresas.Empresa.UsaContabilidad Then
|
If ObjEmpresas.Empresa.UsaContabilidad And ObjEmpresas.Empresa.TipoContabilidad = 2 Then
|
||||||
|
|
||||||
'If ObjEmpresas.Empresa.TipoContabilidad = 2 Then
|
'If ObjEmpresas.Empresa.TipoContabilidad = 2 Then
|
||||||
Dim Cuenta As New ClsContPAQi(ObjEmpresas.Empresa)
|
Dim Cuenta As New ClsContPAQi(ObjEmpresas.Empresa)
|
||||||
@@ -1437,6 +1445,8 @@ Partial Class Sistemas_Empresa
|
|||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
End Try
|
End Try
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'ObjEmpresas.Dispose()
|
'ObjEmpresas.Dispose()
|
||||||
|
|||||||
@@ -386,7 +386,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-md-4" id="DVRegimenSociedad" runat="server" visible="false">
|
<div class="col-md-4" id="DVRegimenSociedad" runat="server" visible="false">
|
||||||
<div runat="server" class="form-group form-md-line-input input-iconright">
|
<div runat="server" class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtRegimenSociedad" CssClass="form-control " runat="server" MaxLength="50" onkeyup="fncTxt()" ClientIDMode="Static"></asp:TextBox>
|
<asp:TextBox ID="TxtRegimenSociedad" CssClass="form-control " runat="server" MaxLength="30" onkeyup="fncTxt()" ClientIDMode="Static"></asp:TextBox>
|
||||||
<%--<asp:RequiredFieldValidator ID="RequiredFieldValidator22" runat="server" ControlToValidate="TxtNombre" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre del Cliente''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>--%>
|
<%--<asp:RequiredFieldValidator ID="RequiredFieldValidator22" runat="server" ControlToValidate="TxtNombre" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre del Cliente''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>--%>
|
||||||
<label for="<%= TxtRegimenSociedad.ClientID.ToString()%>">Regimen Sociedad:</label>
|
<label for="<%= TxtRegimenSociedad.ClientID.ToString()%>">Regimen Sociedad:</label>
|
||||||
<i></i>
|
<i></i>
|
||||||
|
|||||||
Reference in New Issue
Block a user