Estatus:
diff --git a/AF/CatTipos.aspx.vb b/AF/CatTipos.aspx.vb
index d7dd84cf6..b391ca2a3 100644
--- a/AF/CatTipos.aspx.vb
+++ b/AF/CatTipos.aspx.vb
@@ -16,8 +16,16 @@ Partial Class AF_CatTipos
GvDatos.Columns(1).Visible = True
End If
+ If UsuarioActual.CveEmpresa = 13 Then
+ DvTipoAFGrupo.Visible = True
+ DvTipoAFPadre.Visible = True
+ GvDatos.Columns(4).Visible = True
+ GvDatos.Columns(5).Visible = True
+ End If
+
+
CargaDatos()
- End If
+ End If
End Sub
#Region "AGREGAR / ACTUALIZAR"
@@ -33,6 +41,9 @@ Partial Class AF_CatTipos
ChkFolio.Checked = False
ChkContable.Checked = False
divEstatus.Visible = False
+ DdlTipoAFGrupo.SelectedValueExist("-1")
+ ChkTipoAFPadre.Checked = True
+
UpAddTipoAF.Update()
RegistraScript(String.Format("$('#{0}').modal('show');", "DivAddTipoAF"))
End Sub
@@ -58,6 +69,11 @@ Partial Class AF_CatTipos
ChkContable.Checked = CBool(If(GvRow.DataKey("Contable") = "Activo", True, False))
divEstatus.Visible = True
ChkEstatus.Checked = CBool(If(GvRow.DataKey("Estado") = "Activo", True, False))
+
+ DdlTipoAFGrupo.SelectedValueExist(GvRow.DataKey("CveTipoAFGrupo"))
+ ChkTipoAFPadre.Checked = Boolean.Parse((GvRow.DataKey("TipoAFPadre")))
+ 'CveTipoAFGrupo, TipoAFPadre
+
UpAddTipoAF.Update()
RegistraScript(String.Format("$('#{0}').modal('show');", "DivAddTipoAF"))
End Sub
@@ -68,11 +84,15 @@ Partial Class AF_CatTipos
If ChkEstatus.Checked Then Estatus = True Else Estatus = False
If HdnModalidad.Value = "A" Then
- If Not ObjAF.AddTiposActivosFijos(TxtTipo.Text.Trim, DdlCuentaInicial.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, PorDepreciacion:=TxtDepreciacionAF.Text.ToDecimal, MedidaVehicular:=DdlMedidaVehicular.SelectedValue.ToEntero, AutoFolio:=ChkFolio.Checked, Contable:=ChkContable.Checked) Then
+ If Not ObjAF.AddTiposActivosFijos(TxtTipo.Text.Trim, DdlCuentaInicial.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, PorDepreciacion:=TxtDepreciacionAF.Text.ToDecimal,
+ MedidaVehicular:=DdlMedidaVehicular.SelectedValue.ToEntero, AutoFolio:=ChkFolio.Checked, Contable:=ChkContable.Checked, CveTipoAFGrupo:=DdlTipoAFGrupo.SelectedValue.ToEntero,
+ TipoAFPadre:=ChkTipoAFPadre.Checked) Then
TieneError = True
End If
ElseIf HdnModalidad.Value = "U" Then
- If Not ObjAF.UpdateTiposActivosFijos(HdnID.Value.ToEntero, TxtTipo.Text.Trim, DdlCuentaInicial.SelectedValue.ToEntero, Estatus, PorDepreciacion:=TxtDepreciacionAF.Text.ToDecimal, MedidaVehicular:=DdlMedidaVehicular.SelectedValue.ToEntero, AutoFolio:=ChkFolio.Checked, Contable:=ChkContable.Checked) Then
+ If Not ObjAF.UpdateTiposActivosFijos(HdnID.Value.ToEntero, TxtTipo.Text.Trim, DdlCuentaInicial.SelectedValue.ToEntero, Estatus, PorDepreciacion:=TxtDepreciacionAF.Text.ToDecimal,
+ MedidaVehicular:=DdlMedidaVehicular.SelectedValue.ToEntero, AutoFolio:=ChkFolio.Checked, Contable:=ChkContable.Checked, CveTipoAFGrupo:=DdlTipoAFGrupo.SelectedValue.ToEntero,
+ TipoAFPadre:=ChkTipoAFPadre.Checked) Then
TieneError = True
End If
End If
diff --git a/App_Code/ClsAF.vb b/App_Code/ClsAF.vb
index e0edd96b6..6e352b78b 100644
--- a/App_Code/ClsAF.vb
+++ b/App_Code/ClsAF.vb
@@ -1512,7 +1512,8 @@ Public Class ClsAF
Return Retorno
End Function
- Public Function AddTiposActivosFijos(TipoActivoFijo As String, CuentaInicial As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional PorDepreciacion As Decimal = 0, Optional MedidaVehicular As Integer = 1, Optional AutoFolio As Boolean = False, Optional Contable As Boolean = False) As Boolean
+ Public Function AddTiposActivosFijos(TipoActivoFijo As String, CuentaInicial As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional PorDepreciacion As Decimal = 0, Optional MedidaVehicular As Integer = 1,
+ Optional AutoFolio As Boolean = False, Optional Contable As Boolean = False, Optional CveTipoAFGrupo As Integer = 1, Optional TipoAFPadre As Boolean = True) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_AF_TiposActivosFijosAdd")
@@ -1526,6 +1527,8 @@ Public Class ClsAF
.Add("@MedidaVehicular", SqlDbType.TinyInt).Value = MedidaVehicular
.Add("@AutoFolio", SqlDbType.Bit).Value = AutoFolio
.Add("@Contable", SqlDbType.Bit).Value = Contable
+ .Add("@CveTipoAFGrupo", SqlDbType.Int).Value = CveTipoAFGrupo
+ .Add("@TipoAFPadre", SqlDbType.Bit).Value = TipoAFPadre
End With
Try
@@ -1538,7 +1541,8 @@ Public Class ClsAF
Return Retorno
End Function
- Public Function UpdateTiposActivosFijos(CveTipoActivoFijo As Integer, TipoActivoFijo As String, CuentaInicial As Integer, Estado As Boolean, Optional PorDepreciacion As Decimal = 0, Optional MedidaVehicular As Integer = 1, Optional AutoFolio As Boolean = False, Optional Contable As Boolean = False) As Boolean
+ Public Function UpdateTiposActivosFijos(CveTipoActivoFijo As Integer, TipoActivoFijo As String, CuentaInicial As Integer, Estado As Boolean, Optional PorDepreciacion As Decimal = 0, Optional MedidaVehicular As Integer = 1,
+ Optional AutoFolio As Boolean = False, Optional Contable As Boolean = False, Optional CveTipoAFGrupo As Integer = 1, Optional TipoAFPadre As Boolean = True) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_AF_TiposActivosFijosUpdate")
@@ -1552,6 +1556,8 @@ Public Class ClsAF
.Add("@MedidaVehicular", SqlDbType.TinyInt).Value = MedidaVehicular
.Add("@AutoFolio", SqlDbType.Bit).Value = AutoFolio
.Add("@Contable", SqlDbType.Bit).Value = Contable
+ .Add("@CveTipoAFGrupo", SqlDbType.Int).Value = CveTipoAFGrupo
+ .Add("@TipoAFPadre", SqlDbType.Bit).Value = TipoAFPadre
End With
Try
diff --git a/App_Code/ClsBancos.vb b/App_Code/ClsBancos.vb
index 135d41b25..6723cdd82 100644
--- a/App_Code/ClsBancos.vb
+++ b/App_Code/ClsBancos.vb
@@ -1808,6 +1808,7 @@ Public Class ClsBancos
End With
Try
+ SqlAdapter.SelectCommand.CommandTimeout = 0
SqlAdapter.Fill(Data)
Retorno = SqlAdapter.SelectCommand.Parameters("@CvePrePoliza").Value.ToString.ToEntero
Catch ex As Exception
diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb
index ab193393f..b4d3bd9eb 100644
--- a/App_Code/ClsNominas.vb
+++ b/App_Code/ClsNominas.vb
@@ -1509,7 +1509,7 @@ Public Class ClsNominas
EsRetencion As Boolean, CveClasificacion As Integer, CveTipoGasto As Integer, TipoCalculo As Boolean, CveConceptoContable As Integer,
AplicaFiniquito As Integer, AutomaticoGlobal As Integer, Especie As Integer, Imprimir As Integer, CveSATConcepto As Integer,
ctaImporteNegativoProv As Integer, contabiliza As Integer, CargoOAbono As Integer, cveConceptoContableB As Integer, CveCuentaB As Integer,
- CveConceptoContablePasivo As Integer, Optional AplicaEfectivale As Integer = 0, Optional EsFormula As Integer = -1) As Integer
+ CveConceptoContablePasivo As Integer, Optional AplicaEfectivale As Integer = 0, Optional EsFormula As Integer = -1, Optional AplicaArt174 As Integer = 0) As Integer
Dim Retorno As Integer = -1
DataAdapter("PA_Nom_ConceptosAdd")
@@ -1544,6 +1544,7 @@ Public Class ClsNominas
.Add("CveCuentaB", SqlDbType.Int).Value = CveCuentaB
.Add("CveConceptoContablePasivo", SqlDbType.Int).Value = CveConceptoContablePasivo
.Add("AplicaEfectivale", SqlDbType.Int).Value = AplicaEfectivale
+ .Add("AplicaArt174", SqlDbType.Int).Value = AplicaArt174
End With
@@ -1571,7 +1572,7 @@ Public Class ClsNominas
EsRetencion As Boolean, CveClasificacion As Integer, CveTipoGasto As Integer, TipoCalculo As Boolean, CveConceptoContable As Integer, CveCuenta As Integer, AplicaFiniquito As Integer,
AutomaticoGlobal As Integer, Especie As Integer, Imprimir As Integer, CveSATConcepto As Integer, CveEmpresa As Integer, CveUsuario As Integer,
ctaImporteNegativoProv As Integer, contabiliza As Integer, CargoOAbono As Integer, cveConceptoContableB As Integer, CveCuentaB As Integer,
- CveConceptoContablePasivo As Integer, Optional AplicaEfectivale As Integer = 0, Optional EsFormula As Integer = -1) As Boolean
+ CveConceptoContablePasivo As Integer, Optional AplicaEfectivale As Integer = 0, Optional EsFormula As Integer = -1, Optional AplicaArt174 As Integer = 0) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Nom_ConceptosUpdate")
@@ -1606,6 +1607,7 @@ Public Class ClsNominas
.Add("CveCuentaB", SqlDbType.Int).Value = CveCuentaB
.Add("CveConceptoContablePasivo", SqlDbType.Int).Value = CveConceptoContablePasivo
.Add("AplicaEfectivale", SqlDbType.Int).Value = AplicaEfectivale
+ .Add("AplicaArt174", SqlDbType.Int).Value = AplicaArt174
End With
Try
diff --git a/App_Code/DtDatos.xsd b/App_Code/DtDatos.xsd
index d3f670d1b..2ca976f84 100644
--- a/App_Code/DtDatos.xsd
+++ b/App_Code/DtDatos.xsd
@@ -308,10 +308,12 @@
-
-
-
-
+
+
+
+
+
+
diff --git a/App_Code/DtDatos.xss b/App_Code/DtDatos.xss
index af01e0090..22cad2737 100644
--- a/App_Code/DtDatos.xss
+++ b/App_Code/DtDatos.xss
@@ -4,7 +4,7 @@
Changes to this file may cause incorrect behavior and will be lost if
the code is regenerated.
-->
-
+
diff --git a/Bancos/DepositosCaja.aspx.vb b/Bancos/DepositosCaja.aspx.vb
index c11961c9a..8308bc5b0 100644
--- a/Bancos/DepositosCaja.aspx.vb
+++ b/Bancos/DepositosCaja.aspx.vb
@@ -271,6 +271,11 @@ Partial Class Bancos_DepositosCaja
TotalImporte = TotalImporte - TxtComisionIntermediario.Text.ToDecimal - IVA
End If
+ 'SI NO SE ESPECIFICO POR FACTURA PROBAR POR LOS OTROS MEDIOS
+ If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso TotalImportePrePoliza = 0 Then
+ TotalImportePrePoliza = TotalImporte
+ End If
+
If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso TotalImportePrePoliza = 0 Then
Alert("No se ha especificado un importe a depositar.", TipoMensaje.MsgAdvertencia)
Exit Sub
diff --git a/Bancos/PagoElectronicoGrupos.aspx.vb b/Bancos/PagoElectronicoGrupos.aspx.vb
index 245d7a2e0..3d7cbcf63 100644
--- a/Bancos/PagoElectronicoGrupos.aspx.vb
+++ b/Bancos/PagoElectronicoGrupos.aspx.vb
@@ -2,8 +2,9 @@
Option Strict On
Imports System.Data
-Imports Extensiones
+Imports System.Globalization
Imports System.IO
+Imports Extensiones
Imports Ionic.Zip
Imports Microsoft.Reporting.WebForms
@@ -1167,12 +1168,34 @@ Partial Class Bancos_PagoElectronicoGrupos
If Not DdlCuenta.SelectedValue.ToEntero > 0 Then
Alert("Primero debe seleccionar una Cuenta", TipoMensaje.MsgAdvertencia)
Exit Sub
- End If
-
+ End If
+
+
+ 'GlobalDTBancosCuentas.FiltraParametros($"CveCuentaDeposito = {DdlCuenta.SelectedValue} AND EstatusCtaDeposito = 'True'")
+
+
+
If DTPendientes.FiltraParametros("EstatusPagoElectronicoGrupos = 'True' AND EstatusCtaDeposito = 'True'") IsNot Nothing Then
- GeneraPago(DTPendientes.FiltraParametros("EstatusPagoElectronicoGrupos = 'True' AND EstatusCtaDeposito > 0"))
-
+ Dim CuentaCargo As String = "0382755740201"
+
+ If DdlCuenta.SelectedItem.Text.Contains("BAJIO") Then
+
+ GeneraPagoBajio(
+ numeroArchivo:=1,
+ fechaCargo:=NowADS,
+ cuentaCargo:=CuentaCargo,
+ DTPendientes.FiltraParametros("EstatusPagoElectronicoGrupos = 'True' AND EstatusCtaDeposito > 0"))
+
+
+ ElseIf DdlCuenta.SelectedItem.Text.Contains("Scotiabank") Then
+ GeneraPagoScotiabank(DTPendientes.FiltraParametros("EstatusPagoElectronicoGrupos = 'True' AND EstatusCtaDeposito > 0"))
+ Else
+ GeneraPago(DTPendientes.FiltraParametros("EstatusPagoElectronicoGrupos = 'True' AND EstatusCtaDeposito > 0"))
+ End If
+
+
+
Else
Alert("No hay registros para generar", TipoMensaje.MsgAdvertencia)
@@ -1180,6 +1203,175 @@ Partial Class Bancos_PagoElectronicoGrupos
End If
End Sub
+ 'Private Sub GeneraPagoBajio(dataTable As DataTable)
+ ' 'Throw New NotImplementedException()
+ 'End Sub
+
+ Public Sub GeneraPagoBajio(numeroArchivo As Integer,
+ fechaCargo As Date,
+ cuentaCargo As String,
+ DTDatos As DataTable)
+
+
+ Dim HEADER_LEN As Integer = 20
+ Dim DETALLE_LEN As Integer = 384
+ Dim TRAILER_LEN As Integer = 34
+
+ ' --- columnas fijas del header / trailer ---
+ Dim DIVISA_MXN As String = "001"
+ Dim FILLER_8CEROS As String = "00000000"
+ Dim FILLER_4CEROS As String = "0000"
+ Dim CONST_0140 As String = "0140" '/** Pregunta */: tu banco usa siempre 0140?
+
+ Dim _mediosValidos As HashSet(Of String) = New HashSet(Of String)({"BCO", "TEF", "SPE", "SPD"})
+ Dim _tiposCuentaValidos As HashSet(Of String) = New HashSet(Of String)({"40", "1", "3"})
+
+ ' --------------------------- Header (20 bytes) ---------------------------
+ Dim header As String = $"01{numeroArchivo:D7}{fechaCargo:yyyyMMdd}{DIVISA_MXN}"
+ If header.Length <> HEADER_LEN Then
+ Alert($"Header debe medir {HEADER_LEN} bytes, mide {header.Length}.", TipoMensaje.MsgAdvertencia)
+ Exit Sub
+ End If
+
+ ' --------------------------- Detalles (384 bytes) ------------------------
+ Dim detalles As New List(Of String)(DTDatos.Rows.Count)
+ Dim consecArchivo As Integer = 2 'el #1 lo ocupa el header
+ Dim consecPago As Integer = 1
+ Dim totalCentavos As Long = 0
+ Dim MedioPago As String = "TEF"
+ Dim ReferenciaSPEI As String = ""
+ Dim ClasificacionSPID As String = ""
+
+
+ For Each DRow As DataRow In DTDatos.Rows
+
+ Dim ClabeOCuenta As String = DRow("CLABEDestino").ToString.Trim
+ Dim nCaracteresClabeCuenta As Integer = ClabeOCuenta.Length
+ Dim TipoCuentaDestino As String = ""
+ Dim Importe As Decimal = DRow("Importe").ToString.ToDecimal
+ Dim IVA As Decimal = 0D
+
+ If nCaracteresClabeCuenta <> 18 Then
+ If nCaracteresClabeCuenta <> 12 Then
+ Alert($"CLABE/Cuenta debe tener 18 o 12 caracteres, tiene {ClabeOCuenta.Length}.", TipoMensaje.MsgAdvertencia)
+ Exit Sub
+ End If
+ End If
+
+ If nCaracteresClabeCuenta = 18 Then
+ TipoCuentaDestino = "40"
+ Else
+ TipoCuentaDestino = "1"
+ End If
+
+
+ ' ----------- Validaciones de negocio --------------------------------
+ DRow("RazonSocial") = LimpiarDatosBajio(DRow("RazonSocial").ToString, 15, "Alias")
+ DRow("RazonSocial") = LimpiarDatosBajio(DRow("RazonSocial").ToString, 250, "Descripción")
+
+ If Not _tiposCuentaValidos.Contains(TipoCuentaDestino) Then
+ Alert($"TipoCuentaDestino inválido: {TipoCuentaDestino}", TipoMensaje.MsgAdvertencia)
+ Exit Sub
+ End If
+
+ If Not _mediosValidos.Contains(MedioPago) Then
+ Alert($"MedioPago inválido: {MedioPago}", TipoMensaje.MsgAdvertencia)
+ Exit Sub
+ End If
+
+ If MedioPago = "SPE" AndAlso (ReferenciaSPEI.Length <> 7 OrElse Not IsNumeric(ReferenciaSPEI)) Then
+ Alert("ReferenciaSPEI debe contener 7 dígitos numéricos cuando MedioPago = SPE.", TipoMensaje.MsgAdvertencia)
+ Exit Sub
+ End If
+
+ If MedioPago <> "SPD" AndAlso Not String.IsNullOrEmpty(ClasificacionSPID) Then
+ Alert("ClasificacionSPID sólo se permite cuando MedioPago = SPD.", TipoMensaje.MsgAdvertencia)
+ Exit Sub
+ End If
+
+ If Importe <= 0D Then
+ Alert("Importe debe ser mayor a cero.", TipoMensaje.MsgAdvertencia)
+ Exit Sub
+ End If
+
+ 'If DRow.IVA < 0D Then
+ ' Alert("IVA no puede ser negativo.", TipoMensaje.MsgAdvertencia)
+ ' Exit Sub
+ 'End If
+
+ ' ----------- Construcción de la línea --------------------------------
+ Dim sb As New StringBuilder(DETALLE_LEN)
+
+ sb.Append("02") 'tipo registro
+ sb.Append(consecArchivo.ToString("D7")) 'consec archivo
+ sb.Append("01") 'tipo cta origen fijo
+ sb.Append(FILLER_8CEROS) 'filler
+ sb.Append(cuentaCargo.PadLeft(12, "0"c)) 'cta cargo
+ sb.Append(CONST_0140) 'constante 0140
+ sb.Append(ClabeOCuenta.PadLeft(3, "0"c))
+ sb.Append("00") '5 dígitos banco destino
+ sb.Append(consecPago.ToString("D10")) 'consec pago
+ sb.Append("000" & fechaCargo.ToString("yyyyMMdd")) 'prefijo 000 + fecha
+ sb.Append(MedioPago) 'BCO/TEF/SPE/SPD
+ sb.Append(TipoCuentaDestino.PadLeft(2, "0"c)) 'tipo cta destino
+ sb.Append(FILLER_4CEROS) 'filler
+ sb.Append(DRow("RazonSocial").ToString.PadRight(15)) 'alias (15)
+ sb.Append(CLng(IVA).ToString("D15")) 'IVA ×100
+ sb.Append(DRow("RazonSocial").ToString.PadRight(250)) 'descripción (250)
+ sb.Append(If(String.IsNullOrEmpty(ReferenciaSPEI),
+ New String("0"c, 7),
+ ReferenciaSPEI)) 'referencia SPEI
+ sb.Append(If(String.IsNullOrEmpty(ClasificacionSPID),
+ "00",
+ ClasificacionSPID.PadLeft(2, "0"c))) 'clasif SPID
+ sb.Append(New String(" "c, 25)) 'filler final
+
+ If sb.Length <> DETALLE_LEN Then
+ Throw New InvalidOperationException($"Detalle #{consecPago} mide {sb.Length} bytes, debería {DETALLE_LEN}.")
+ End If
+
+ detalles.Add(sb.ToString())
+ consecArchivo += 1
+ consecPago += 1
+ totalCentavos += CLng(Importe * 100)
+ Next
+
+ ' --------------------------- Trailer (34 bytes) -------------------------
+ Dim totalLineas As Integer = 1 + DTDatos.Rows.Count + 1 'header + detalles + trailer
+ Dim trailer As String = $"09{totalLineas:D7}{DTDatos.Rows.Count:D7}{FILLER_8CEROS}{totalCentavos:D10}"
+ If trailer.Length <> TRAILER_LEN Then Throw New InvalidOperationException($"Trailer debe medir {TRAILER_LEN} bytes, mide {trailer.Length}.")
+
+ ' --------------------------- Resultado ----------------------------------
+ 'Return {header}.Concat(detalles).Concat({trailer})
+ End Sub
+
+ Private Function LimpiarDatosBajio(texto As String, maxLen As Integer, campo As String) As String
+
+ Dim _rxProhibidos As Regex = New Regex("[\$\,\./\-ñÑÁÉÍÓÚÜáéíóúü]", RegexOptions.Compiled)
+
+ If String.IsNullOrWhiteSpace(texto) Then
+ Throw New ArgumentException($"{campo} es obligatorio.")
+ End If
+
+ ' Normalizar y quitar diacríticos
+ Dim s = New String(texto.Normalize(NormalizationForm.FormD) _
+ .Where(Function(ch) CharUnicodeInfo.GetUnicodeCategory(ch) <> UnicodeCategory.NonSpacingMark) _
+ .ToArray()) _
+ .Normalize(NormalizationForm.FormC)
+
+ ' Eliminar caracteres prohibidos
+ s = _rxProhibidos.Replace(s, "")
+
+ If s.Length > maxLen Then
+ Throw New ArgumentException($"{campo} ({s}) excede {maxLen} caracteres.")
+ End If
+ Return s
+ End Function
+
+ Private Sub GeneraPagoScotiabank(dataTable As DataTable)
+ 'Throw New NotImplementedException()
+ End Sub
+
Private Sub GeneraPago(DTPendientesTemp As DataTable, Optional InsertaEnDB As Boolean = True, Optional NombreArchivoEnviado As String = "")
Dim RegistrosPago As New StringBuilder
diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb
index 505f8942e..8b1947ecb 100644
--- a/Compras/Compras.aspx.vb
+++ b/Compras/Compras.aspx.vb
@@ -18116,6 +18116,9 @@ Partial Class Compras_Compras
DdlIVA.Enabled = True
End If
+ If UsuarioActual.CveRol = 1 Then
+ TxtRetISRModal.Enabled = True
+ End If
UpPSS.Update()
RegistraScript("$('#divAddProducto').modal('show');")
diff --git a/Compras/eFacturas.aspx.vb b/Compras/eFacturas.aspx.vb
index 7176a8e4e..6d6c56058 100644
--- a/Compras/eFacturas.aspx.vb
+++ b/Compras/eFacturas.aspx.vb
@@ -1756,9 +1756,7 @@ Partial Class Compras_eFacturas
Dim PDfDestino As String = $"{UsuarioActual.Empresa.Ruta}\Compras\{FF.EmisorRFC}\{FF.CveFactura}.PDF"
- If RutaPDF = "" Then
-
-
+ If RutaPDF = "" Then ' llega sin pdf
'no valida nada solo lo crea y lo pone en la carpeta, no importa si ya existe
If SobreEscribirPDFSiExiste Then
@@ -9124,6 +9122,12 @@ Namespace ADS.eFacturas
Dim TmpArchivoQR As String = $"{Ruta}\Temp\Facturas\{Path.GetFileNameWithoutExtension(Fact.ArchivoXML)}-ttt.jpg"
Dim ArchivoXML As String = String.Format("{0}\Compras\{2}\{1}", DirectorioEmpresa, Fact.ArchivoXML, Fact.EmisorRFC)
Dim ArchivoPDF As String = String.Format("{0}\Compras\{2}\{1}.pdf", DirectorioEmpresa, Fact.CveFactura, Fact.EmisorRFC)
+
+ 'Validación si existe PDF no lo genera
+ If System.IO.File.Exists(ArchivoPDF) Then
+ Return True
+ End If
+
Dim dtotal As Decimal = If(Fact.Total <= 0.0D, 0.0001D, Fact.Total)
Dim cfdi As New RVCFDI33.GeneraCFDI()
diff --git a/Contabilidad/ContabilidadElectronica.aspx.vb b/Contabilidad/ContabilidadElectronica.aspx.vb
index e3e1494bf..637c36959 100644
--- a/Contabilidad/ContabilidadElectronica.aspx.vb
+++ b/Contabilidad/ContabilidadElectronica.aspx.vb
@@ -2,7 +2,6 @@
Option Strict On
Imports Extensiones
-Imports System
Imports System.IO
Imports System.Security.Cryptography
Imports System.Security.Cryptography.X509Certificates
@@ -10,7 +9,6 @@ Imports System.Text
Imports System.Xml
Imports System.Xml.Xsl
Imports System.Data
-Imports CrystalDecisions.Web
Imports DocumentFormat.OpenXml.Wordprocessing
Imports Org.BouncyCastle.Asn1
Imports Org.BouncyCastle.Tls.Crypto.Impl
@@ -134,7 +132,7 @@ Partial Class Contabilidad_ContabilidadElectronica
Str.AppendFormat("Desc=""{0}"" ", HttpUtility.HtmlEncode(Dr("Nombre").ToString))
Str.AppendFormat("SubCtaDe=""{0}"" ", Dr("CodigoPadre").ToString)
Str.AppendFormat("Nivel=""{0}"" ", Dr("Nivel").ToString)
- Str.AppendFormat("Natur=""{0}"" ", If(Dr("Tipo").ToString.Contiene("A", "C", "D", "G", "H"), "D", "A")) 'Atributo requerido para expresar la naturaleza de la cuenta o subcuenta. (D - Deudora, A - Acreedora). ( Activo = D ) ( Pasivo = A ) ( Capital = A ) ( Ingreso = A ) ( Costo = D ) ( Gasto = D ) ( Resultado Integral de Financiamiento = D y/o A ) ( Cuentas de orden = D y/o A ). Existen cuentas de Activo, Pasivo y Capital que por su naturaleza pueden presentarse de manera Deudora o Acreedora.
+ Str.AppendFormat("Natur=""{0}"" ", If(Dr("Tipo").ToString.Contiene("A", "C", "E", "G", "I", "K"), "D", "A")) 'Atributo requerido para expresar la naturaleza de la cuenta o subcuenta. (D - Deudora, A - Acreedora). ( Activo = D ) ( Pasivo = A ) ( Capital = A ) ( Ingreso = A ) ( Costo = D ) ( Gasto = D ) ( Resultado Integral de Financiamiento = D y/o A ) ( Cuentas de orden = D y/o A ). Existen cuentas de Activo, Pasivo y Capital que por su naturaleza pueden presentarse de manera Deudora o Acreedora.
Else
Str.AppendFormat("CodAgrup=""{0}"" ", Dr("CodAgrup").ToString)
Str.AppendFormat("NumCta=""{0}"" ", Dr("NumCta").ToString)
@@ -274,12 +272,12 @@ Partial Class Contabilidad_ContabilidadElectronica
objconta.Dispose()
If DtCuentas IsNot Nothing Then
- Dim Deudor As Decimal = DtCuentas.SUM("SaldoAD")
- Dim Acreedor As Decimal = DtCuentas.SUM("SaldoAA")
- 'If Deudor <> Acreedor Then
- ' Alert("los Saldos Actuales no cuadran.", TipoMensaje.MsgError)
- ' Exit Sub
- 'End If
+ Dim Deudor As Decimal = DtCuentas.SUM("SaldoFCargo", "CveCuenta is null") 'tomo los datos del acumulado de la balanza
+ Dim Acreedor As Decimal = DtCuentas.SUM("SaldoFAbono", "CveCuenta is null") 'tomo los datos del acumulado de la balanza
+ If Deudor <> Acreedor Then
+ Alert(String.Format("los Saldos Actuales no cuadran. {0}-{1}", Deudor, Acreedor), TipoMensaje.MsgError)
+ Exit Sub
+ End If
End If
Else
Dim ObjConpaq As New ClsContPAQi(UsuarioActual.Empresa)
diff --git a/Contabilidad/RepBalanceGeneral.aspx.vb b/Contabilidad/RepBalanceGeneral.aspx.vb
index 89393e737..f40ebe5b0 100644
--- a/Contabilidad/RepBalanceGeneral.aspx.vb
+++ b/Contabilidad/RepBalanceGeneral.aspx.vb
@@ -554,6 +554,7 @@ Partial Class Contabilidad_RepBalanceGeneral
End Sub
Protected Sub GvPatrimonio_RowDataBound(sender As Object, e As GridViewRowEventArgs)
+
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then
TotalPatrimonioActual += e.Row.DBCampo("ImporteActual").ToString.ToDouble
@@ -585,6 +586,7 @@ Partial Class Contabilidad_RepBalanceGeneral
End If
End If
+
End Sub
#End Region
diff --git a/Contabilidad/RepBalanzaComprobacion.aspx b/Contabilidad/RepBalanzaComprobacion.aspx
index 3cec952cb..8cedf3845 100644
--- a/Contabilidad/RepBalanzaComprobacion.aspx
+++ b/Contabilidad/RepBalanzaComprobacion.aspx
@@ -186,7 +186,7 @@
-
+
diff --git a/Contabilidad/RepBalanzaComprobacion.aspx.vb b/Contabilidad/RepBalanzaComprobacion.aspx.vb
index ed2233a4c..c8b5a5d7e 100644
--- a/Contabilidad/RepBalanzaComprobacion.aspx.vb
+++ b/Contabilidad/RepBalanzaComprobacion.aspx.vb
@@ -11,8 +11,6 @@ Imports System.IO
Imports System.Drawing
Imports System.Web.Services
-
-
Partial Class Contabilidad2_RepBalanzaComprobacion
Inherits ClsPaginas
@@ -193,6 +191,7 @@ Partial Class Contabilidad2_RepBalanzaComprobacion
'Acomoda Deudor y Acreedor
If e.Row.DBCampo("CveTipo") = "1" Then
e.Row.FCLabel("LbSaldoInicial").Text = String.Format("{0} ", e.Row.DBCampo("SaldoInicial").FormatoNumero)
+ e.Row.FCLabel("LbSaldoInicial").Style.Remove("padding-right")
e.Row.FCLabel("LbSaldoActual").Text = " "
End If
@@ -211,19 +210,25 @@ Partial Class Contabilidad2_RepBalanzaComprobacion
End If
'Total general
- If e.Row.DBCampo("Id") = "" Then
-
+ If e.Row.DBCampo("CveCuenta") = "" Then
e.Row.ControlStyle.Font.Bold = True
e.Row.ControlStyle.Font.Size = 9
e.Row.ControlStyle.Height = 30
e.Row.FCLabel("LbNombre").Text = "Sumas Iguales"
- e.Row.FCLabel("LbSaldoInicial").Text = String.Format("{0} {1}", e.Row.DBCampo("SaldoID").FormatoNumero, e.Row.DBCampo("SaldoIA").FormatoNumero)
- e.Row.FCLabel("LbCargos").Text = e.Row.DBCampo("TotalCargos").FormatoNumero
- e.Row.FCLabel("LbAbonos").Text = e.Row.DBCampo("TotalAbonos").FormatoNumero
+ e.Row.FCLabel("LbSaldoInicial").Style.Remove("padding-right")
+ e.Row.FCLabel("LbSaldoInicial").Style.Add("white-space", "pre")
+ e.Row.FCLabel("LbSaldoInicial").Text = String.Format("{0} {1}", e.Row.DBCampo("SaldoICargo").FormatoNumero, e.Row.DBCampo("SaldoIAbono").FormatoNumero)
+ e.Row.FCLabel("LbCargos").Text = e.Row.DBCampo("Cargos").FormatoNumero
+ e.Row.FCLabel("LbAbonos").Text = e.Row.DBCampo("Abonos").FormatoNumero
e.Row.FCLabel("LbSaldoActual").Visible = True
- e.Row.FCLabel("LbSaldoActual").Text = String.Format("{0} {1}", e.Row.DBCampo("SaldoAD").FormatoNumero, e.Row.DBCampo("SaldoAA").FormatoNumero)
+ e.Row.FCLabel("LbSaldoActual").Text = String.Format("{0} {1}", e.Row.DBCampo("SaldoFCargo").FormatoNumero, e.Row.DBCampo("SaldoFAbono").FormatoNumero)
+ e.Row.FCHyperLink("HLSaldoActual").Visible = False
Else
- If ModoImpresion Then e.Row.Cells(6).Text = e.Row.FCHyperLink("HLSaldoActual").Text Else e.Row.FCHyperLink("HLSaldoActual").NavigateUrl = String.Format("/Contabilidad/RepMovimientosAuxiliaresCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("ID"), FechaInicio.ToShortDateString, FechaFin.ToShortDateString, CveProyecto, CveSubProyecto)
+ If ModoImpresion Then
+ e.Row.Cells(6).Text = e.Row.FCHyperLink("HLSaldoActual").Text
+ Else
+ e.Row.FCHyperLink("HLSaldoActual").NavigateUrl = String.Format("/Contabilidad/RepMovimientosAuxiliaresCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), FechaInicio.ToShortDateString, FechaFin.ToShortDateString, CveProyecto, CveSubProyecto)
+ End If
End If
End If
End Sub
diff --git a/Contabilidad/RepEstadoActividades.aspx.vb b/Contabilidad/RepEstadoActividades.aspx.vb
index 1c403019b..4f66e11eb 100644
--- a/Contabilidad/RepEstadoActividades.aspx.vb
+++ b/Contabilidad/RepEstadoActividades.aspx.vb
@@ -165,8 +165,8 @@ Partial Class AC_RepEstadoActividades
End Sub
Private Sub CargaGrids()
- DtIngresos = DtDatos.FiltraParametros("Tipo ='H' ")
- DtGastos = DtDatos.FiltraParametros("Tipo ='G' ")
+ DtIngresos = DtDatos.FiltraParametros("(Tipo ='H' OR Codigo like '4020%') AND NOT(Codigo like '5030%' OR Codigo like '7020%') ")
+ DtGastos = DtDatos.FiltraParametros("(Tipo ='G' AND Codigo NOT like '4020%') OR (Codigo like '5030%' OR Codigo like '7020%') ")
Dim Row As DataRow = DtIngresos.NewRow
diff --git a/Contabilidad/RepEstadoResultados.aspx.vb b/Contabilidad/RepEstadoResultados.aspx.vb
index 7427ce343..777914fe3 100644
--- a/Contabilidad/RepEstadoResultados.aspx.vb
+++ b/Contabilidad/RepEstadoResultados.aspx.vb
@@ -2,7 +2,6 @@
Option Strict On
Imports System.Data
-Imports Extensiones
Imports Microsoft.Reporting.WebForms
Partial Class Contabilidad2_RepEstadoResultados
Inherits ClsPaginas
@@ -192,8 +191,8 @@ Partial Class Contabilidad2_RepEstadoResultados
End Sub
Private Sub CargaGrids()
- DtIngresos = DtDatos.FiltraParametros("Orden Like '0004%' OR Tipo = 'H'")
- DtGastos = DtDatos.FiltraParametros("Orden Like '0005%' OR Tipo = 'G'")
+ DtIngresos = DtDatos.FiltraParametros("Orden Like '0004%' OR Tipo = 'H' OR Codigo like '4020%' ")
+ DtGastos = DtDatos.FiltraParametros("Orden Like '0005%' OR Tipo = 'G' OR (Codigo like '5030%' OR Codigo like '7020%') ")
Dim Row As DataRow = DtIngresos.NewRow
diff --git a/Contabilidad/RepIVA.aspx.cs b/Contabilidad/RepIVA.aspx.cs
index 8b761791e..03e1e139b 100644
--- a/Contabilidad/RepIVA.aspx.cs
+++ b/Contabilidad/RepIVA.aspx.cs
@@ -1,23 +1,13 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Web;
-using System.Web.UI.WebControls;
-using Extensiones;
-using System.Data;
-using static Extensiones.ModExtensiones;
+using Extensiones;
using Microsoft.Reporting.WebForms;
-using System.Activities.Expressions;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
using System.Text;
-using System.IO;
-using CrystalDecisions.CrystalReports.Engine;
-using CrystalDecisions.Shared;
-using System.Diagnostics;
-using DocumentFormat.OpenXml.Drawing;
-using DocumentFormat.OpenXml.ExtendedProperties;
-using static Stimulsoft.Report.StiOptions;
-using System.Web.Services.Description;
-using System.Drawing;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using static Extensiones.ModExtensiones;
public partial class Contabilidad_RepIVA : ClsPaginas
{
@@ -75,7 +65,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas
LnkTxtDIOT.Visible = true;
LnkExcelDIOT.Visible = true;
- DdlCuenta.DataSource = get_GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:UsuarioActual.CveEmpresa, CveTipoCuenta:2);
+ DdlCuenta.DataSource = get_GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa: UsuarioActual.CveEmpresa, CveTipoCuenta: 2);
DdlCuenta.DataBind();
DdlCuenta.Items.Insert(0, new ListItem("Todos", "-1"));
}
@@ -85,7 +75,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas
if (TipoCambio == 3 && TxtEspecifico.Text != "") { TCEspecifico = TxtEspecifico.Text.ToDouble(); } else { TCEspecifico = -1; }
int Conciliado = DdlTipoMovto.SelectedValue.ToEntero();
LblMsgAcreditable.Text = ""; // lbl de mensajes de negativos
-
+
if (TT.ActiveTabIndex == 0)
{
ClsContabilidad ObjCont = new ClsContabilidad();
@@ -146,8 +136,8 @@ public partial class Contabilidad_RepIVA : ClsPaginas
GvA.DataBind();
GvIVA2.DataBind();
GvRetIVA.DataBind();
- }
-
+ }
+
UpDatos.Update();
String Str = "Se Consultó el Reporte de IVA. - " + UsuarioActual.Usuario;
@@ -182,13 +172,13 @@ public partial class Contabilidad_RepIVA : ClsPaginas
}
if (e.Row.DBCampo("PorcentajeIVA").ToDecimal() > 0)
{
- // Decimal SubTotal = (e.Row.DBCampo("SubTotal16").ToDecimal() != 0 ? e.Row.DBCampo("SubTotal16").ToDecimal() : (e.Row.DBCampo("SubTotal8").ToDecimal() != 0 ? e.Row.DBCampo("SubTotal8").ToDecimal() : (Decimal)0.0));
+ // Decimal SubTotal = (e.Row.DBCampo("SubTotal16").ToDecimal() != 0 ? e.Row.DBCampo("SubTotal16").ToDecimal() : (e.Row.DBCampo("SubTotal8").ToDecimal() != 0 ? e.Row.DBCampo("SubTotal8").ToDecimal() : (Decimal)0.0));
- Decimal dif = Math.Round(e.Row.DBCampo("SubTotal16").ToDecimal() * 0.16M, 2) + Math.Round(e.Row.DBCampo("SubTotal8").ToDecimal() * 0.08M , 2) - Math.Round(e.Row.DBCampo("IVA").ToDecimal(), 2);
+ Decimal dif = Math.Round(e.Row.DBCampo("SubTotal16").ToDecimal() * 0.16M, 2) + Math.Round(e.Row.DBCampo("SubTotal8").ToDecimal() * 0.08M, 2) - Math.Round(e.Row.DBCampo("IVA").ToDecimal(), 2);
if (Math.Abs(dif) > 1)
{
- e.Row.ForeColor = System.Drawing.Color.Red;
- e.Row.Cells[0].Text = e.Row.Cells[0].Text + "Err";
+ e.Row.ForeColor = System.Drawing.Color.Red;
+ e.Row.Cells[0].Text = e.Row.Cells[0].Text + "Err";
e.Row.ToolTip = "Dif:" + dif.ToString() + " - IVA:" + e.Row.DBCampo("IVA");
}
@@ -202,19 +192,37 @@ public partial class Contabilidad_RepIVA : ClsPaginas
protected void LnkPdf_Click(object sender, EventArgs e)
{
- Imprimir("PDF");
+ ImprimirCrystal("PDF");
}
protected void LnkExcel_Click(object sender, EventArgs e)
{
- Imprimir("EXCEL");
+ ImprimirGembox();
}
protected void LnkExcel2_Click(object sender, EventArgs e)
{
- Imprimir("EXCEL2");
+ ImprimirCrystal("EXCEL2");
}
- public void Imprimir(String Opcion)
+ private void ImprimirGembox()
+ {
+ String FechaF;
+ if (txtFechaF.Text == "" || txtFechaF.Text == "__/__/____") { FechaF = "-1"; } else { FechaF = $"Fecha Final: {txtFechaF.Text}"; }
+ String FechaI;
+ if (txtFechaI.Text == "" || txtFechaI.Text == "__/__/____") { FechaI = "-1"; } else { FechaI = $"Fecha Inicial: {txtFechaI.Text}"; }
+ String TipoMov;
+ if (DdlTipoMovto.SelectedItem.Text == "Todos") { TipoMov = ""; } else { TipoMov = $"Tipo Movimiento: {DdlTipoMovto.SelectedItem.Text}"; }
+
+ var filtros = $"Filtros: {FechaI} {FechaF} {TipoMov}";
+
+ GvA.ExportToExcelGembox("ReporteIVA", UsuarioActual, "Reporte de IVA", DatosFiltros: filtros);
+ }
+ public override void VerifyRenderingInServerForm(Control control)
+ {
+
+ }
+
+ public void ImprimirStimulsoft()
{
String FechaF;
if (txtFechaF.Text == "" || txtFechaF.Text == "__/__/____") { FechaF = "-1"; } else { FechaF = $" Fecha Final: {txtFechaF.Text}"; }
@@ -222,11 +230,94 @@ public partial class Contabilidad_RepIVA : ClsPaginas
if (txtFechaI.Text == "" || txtFechaI.Text == "__/__/____") { FechaI = "-1"; } else { FechaI = $" Fecha Inicial: {txtFechaI.Text}"; }
String TipoMov;
if (DdlTipoMovto.SelectedItem.Text == "Todos") { TipoMov = ""; } else { TipoMov = $" Tipo Movimiento: {DdlTipoMovto.SelectedItem.Text}"; }
-
+
if (GvT.Rows.Count > 0 || GvA.Rows.Count > 0)
{
System.IO.FileInfo Imagen;
- // String logouri = "";
+
+ if (UsuarioActual.CveEmpresa.Contiene(119))
+ {
+ Imagen = new System.IO.FileInfo(String.Format("{0}/Logo.jpg", UsuarioActual.Empresa.Ruta));
+ }
+ else
+ {
+ Imagen = new System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png");
+ }
+
+ List para = new List();
+ para.Add(new ReportParameter("Empresa", UsuarioActual.Empresa.Empresa));
+ para.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre));
+ para.Add(new ReportParameter("Filtros", $"Filtros: {FechaI}{FechaF}{TipoMov}"));
+
+ if (Imagen.Exists)
+ {
+ para.Add(new ReportParameter("LogoPath", Imagen.FullName));
+ }
+ else
+ {
+ para.Add(new ReportParameter("LogoPath", ""));
+ }
+
+ DataTable Dt = DtIVAAcreditable.Copy();
+ string Formato = "RepIVAAcreditable.mrt";
+
+
+ para.Add(new ReportParameter("Formato", "PDF"));
+
+ System.IO.FileInfo Archivo = new System.IO.FileInfo(string.Format("{0}/Formatos/{1}", UsuarioActual.Empresa.Ruta, Formato));
+ string Ruta = ModExtensiones.DirectorioBaseEmpresas + $@"Empresas\Grales\Formatos\{Formato}";
+
+ List lrds = new List();
+
+ ReportDataSource rds = new ReportDataSource();
+ rds.Name = "RepIVAAcreditable";
+ rds.Value = Dt;
+ lrds.Add(rds);
+
+ if (DtIEPSA != null)
+ {
+ ReportDataSource rds2 = new ReportDataSource();
+ rds2.Name = "IEPSPorcentaje";
+ rds2.Value = DtIEPSA;
+ lrds.Add(rds2);
+ }
+
+ if (DtIVAA != null)
+ {
+ ReportDataSource rds3 = new ReportDataSource();
+ rds3.Name = "IVAPorcentaje";
+ rds3.Value = DtIVAA;
+ lrds.Add(rds3);
+ }
+
+ string Extension = "pdf";
+
+ var bytes = StreamBytesStimul("Facturas", Ruta, lrds, para, NombreArchivo: "Reporte de IVA", Formato: "PDF", NombreDataSource: "DtDatos");
+
+ ImprimirbytesPDF(bytes, "Reporte de IVA", Formato, Content_Disposition: "attachment", Extension: Extension);
+
+ Ruta.GuardaLogAD();
+ }
+ else
+ {
+ Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia);
+ }
+ }
+
+
+ public void ImprimirCrystal(String Opcion)
+ {
+ String FechaF;
+ if (txtFechaF.Text == "" || txtFechaF.Text == "__/__/____") { FechaF = "-1"; } else { FechaF = $" Fecha Final: {txtFechaF.Text}"; }
+ String FechaI;
+ if (txtFechaI.Text == "" || txtFechaI.Text == "__/__/____") { FechaI = "-1"; } else { FechaI = $" Fecha Inicial: {txtFechaI.Text}"; }
+ String TipoMov;
+ if (DdlTipoMovto.SelectedItem.Text == "Todos") { TipoMov = ""; } else { TipoMov = $" Tipo Movimiento: {DdlTipoMovto.SelectedItem.Text}"; }
+
+ if (GvT.Rows.Count > 0 || GvA.Rows.Count > 0)
+ {
+ System.IO.FileInfo Imagen;
+ // String logouri = "";
if (UsuarioActual.CveEmpresa.Contiene(119))
{
@@ -277,7 +368,8 @@ public partial class Contabilidad_RepIVA : ClsPaginas
//ImprimirbytesPDF(ImprimirPDFCrystal(Ruta, Dt, para, "Reporte de IVA", Opcion), "Reporte de IVA", Opcion);
ImprimirbytesPDF(ImprimirSubRepPDFCrystal(Ruta, Dt, para, new DataTable(), new DataTable(), "RepIEPSPorcentaje.rpt", "RepIVAPorcentaje.rpt", "Reporte de IVA", Opcion), "Reporte de IVA", Opcion);
}
- }else
+ }
+ else
{
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);
@@ -334,7 +426,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas
{
StringBuilder SBDIOT = new StringBuilder();
- int Conciliado = DdlTipoMovto.SelectedValue.ToEntero();
+ int Conciliado = DdlTipoMovto.SelectedValue.ToEntero();
using (var Objconta = new ClsContabilidad())
{
@@ -390,7 +482,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas
SbSinTipo.Append("Los siguientes proveedores no tienen especificado el tipo de operación: ");
foreach (DataRow row in dtSinTipoOperacion.Rows)
{
- SbSinTipo.AppendFormat("{0}-{1} ", row["RFC"], row["RazonSocial"]);
+ SbSinTipo.AppendFormat("{0} - {1} ", row["RFC"], row["RazonSocial"]);
}
Alert(SbSinTipo.ToString(), TipoMensaje.MsgAdvertencia);
}
@@ -579,12 +671,12 @@ public partial class Contabilidad_RepIVA : ClsPaginas
{
ClsContabilidad Objconta = new ClsContabilidad();
-
+
int Conciliado = DdlTipoMovto.SelectedValue.ToEntero();
- if (Objconta.GetRepIVAComparativo(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), UsuarioActual.CveUsuario, -1, Conciliado, UsuarioActual.CveEmpresa ))
+ if (Objconta.GetRepIVAComparativo(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), UsuarioActual.CveUsuario, -1, Conciliado, UsuarioActual.CveEmpresa))
{
- GvCompara.DataSource = Objconta.DtResultados;
+ GvCompara.DataSource = Objconta.DtResultados;
}
Objconta.Dispose();
@@ -744,11 +836,11 @@ public partial class Contabilidad_RepIVA : ClsPaginas
protected void GvIEPSA_RowDataBound(object sender, GridViewRowEventArgs e)
{
- if(e.Row.RowType == DataControlRowType.DataRow && e.Row.DataKey("PorcentajeIEPS").Trim() == "")
+ if (e.Row.RowType == DataControlRowType.DataRow && e.Row.DataKey("PorcentajeIEPS").Trim() == "")
{
e.Row.Cells[0].Text = "Total";
e.Row.Font.Bold = true;
- }
+ }
}
protected void GvIVAA_RowDataBound(object sender, GridViewRowEventArgs e)
{
@@ -756,7 +848,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas
{
e.Row.Cells[0].Text = "Total";
e.Row.Font.Bold = true;
- }
+ }
}
protected void GvIVA2_RowDataBound(object sender, GridViewRowEventArgs e)
{
@@ -764,7 +856,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas
{
e.Row.Cells[0].Text = "Total";
e.Row.Font.Bold = true;
- }
+ }
}
protected void GvRetIVA_RowDataBound(object sender, GridViewRowEventArgs e)
{
@@ -773,14 +865,14 @@ public partial class Contabilidad_RepIVA : ClsPaginas
e.Row.Cells[0].Text = "Total";
e.Row.Font.Bold = true;
- }
+ }
}
protected void LnkExcelDIOT_Click(object sender, EventArgs e)
{
ClsContabilidad Objconta = new ClsContabilidad();
StringBuilder SBDIOT = new StringBuilder();
int Conciliado = DdlTipoMovto.SelectedValue.ToEntero();
-
+
if (Objconta.GetRepIVA(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), 2, UsuarioActual.CveUsuario, -1, Conciliado, UsuarioActual.CveEmpresa, TipoCambio, TCEspecifico))
{
DataTable TmpDIOT = new DataTable("DIOT");
@@ -794,13 +886,13 @@ public partial class Contabilidad_RepIVA : ClsPaginas
TmpDIOT.Columns.Add("Actos16", typeof(string)); TmpDIOT.Columns.Add("ActosDev16", typeof(string));
TmpDIOT.Columns.Add("ActosImp16", typeof(string)); TmpDIOT.Columns.Add("ActosImpDev16", typeof(string));
TmpDIOT.Columns.Add("ActosImpNotan16", typeof(string)); TmpDIOT.Columns.Add("ActosImpNotanDev16", typeof(string));
-
+
TmpDIOT.Columns.Add("AcredFN", typeof(string)); TmpDIOT.Columns.Add("AcreNoFN", typeof(string));
TmpDIOT.Columns.Add("AcredFS", typeof(string)); TmpDIOT.Columns.Add("AcredNoFS", typeof(string));
TmpDIOT.Columns.Add("Acred16", typeof(string)); TmpDIOT.Columns.Add("AcredIva16", typeof(string));
TmpDIOT.Columns.Add("AcredImp16", typeof(string)); TmpDIOT.Columns.Add("AcredNoImp16", typeof(string));
TmpDIOT.Columns.Add("AcredImpIntan16", typeof(string)); TmpDIOT.Columns.Add("AcredNoImpIntan16", typeof(string));
-
+
TmpDIOT.Columns.Add("NoAcredFN", typeof(string)); TmpDIOT.Columns.Add("NoAcredNoFN", typeof(string));
TmpDIOT.Columns.Add("NoAcredExentaFN", typeof(string)); TmpDIOT.Columns.Add("NoAcredNoObjetoFN", typeof(string));
TmpDIOT.Columns.Add("NoAcredFS", typeof(string)); TmpDIOT.Columns.Add("NoAcredNoFS", typeof(string));
@@ -890,7 +982,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas
}
Objconta.Dispose();
TmpDIOT.Columns[0].ColumnName = "01- Tipo de tercero\r\n"; TmpDIOT.Columns[1].ColumnName = "02 -Tipo de operación\r\n";
- TmpDIOT.Columns[2].ColumnName = "03- RFC\r\n"; TmpDIOT.Columns[3].ColumnName = "04 - ID Fiscal";
+ TmpDIOT.Columns[2].ColumnName = "03- RFC\r\n"; TmpDIOT.Columns[3].ColumnName = "04 - ID Fiscal";
TmpDIOT.Columns[4].ColumnName = "05- Nombre del Extranjero\r\n"; TmpDIOT.Columns[5].ColumnName = "06 - País de residencia\r\n";
TmpDIOT.Columns[6].ColumnName = "07- Jurisdicción Fiscal\r\n"; TmpDIOT.Columns[7].ColumnName = "08 - Actividades pagadas RFN\r\n";
TmpDIOT.Columns[8].ColumnName = "09- Devoluciones, Descuentos y Bonificaciones RFN\r\n"; TmpDIOT.Columns[9].ColumnName = "10 - Actividades pagadas RFS\r\n";
@@ -921,7 +1013,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas
TmpDIOT.Columns[50].ColumnName = "51 - Valor de actos o actividades 0%\r\n"; TmpDIOT.Columns[51].ColumnName = "52 -Valor de actos o actividades no objeto en territorio nacional\r\n";
TmpDIOT.Columns[52].ColumnName = "53 - Valor de actos o actividades no objeto sin establecimiento en territorio nacional\r\n"; TmpDIOT.Columns[53].ColumnName = "54 - Efectos fiscales a los comprobantes de operaciones realizadas con el proveedor\r\n";
- TmpDIOT.ExportToExcelG("DIOT_"+ txtFechaI.Text,"Reporte DIOT");
+ TmpDIOT.ExportToExcelG("DIOT_" + txtFechaI.Text, "Reporte DIOT");
}
}
}
\ No newline at end of file
diff --git a/Empresas/119/Formatos/RepIVAAcreditable.rpt b/Empresas/119/Formatos/RepIVAAcreditable.rpt
index 5a2d0b240..d8c974391 100644
Binary files a/Empresas/119/Formatos/RepIVAAcreditable.rpt and b/Empresas/119/Formatos/RepIVAAcreditable.rpt differ
diff --git a/Empresas/13/Formatos/CHQ-10.rdlc b/Empresas/13/Formatos/CHQ-10.rdlc
index bc1b247d2..3b497a9c7 100644
--- a/Empresas/13/Formatos/CHQ-10.rdlc
+++ b/Empresas/13/Formatos/CHQ-10.rdlc
@@ -594,61 +594,6 @@