diff --git a/Acumuladores/EntradasUsadosResumenRep.aspx.vb b/Acumuladores/EntradasUsadosResumenRep.aspx.vb
index 1aa15ed02..799484355 100644
--- a/Acumuladores/EntradasUsadosResumenRep.aspx.vb
+++ b/Acumuladores/EntradasUsadosResumenRep.aspx.vb
@@ -49,7 +49,7 @@ Partial Class Acumuladores_RepEntradasUsados
Dim Dia As String = {"lunes", "martes", "miércoles", "jueves", "viernes", "sábado", "domingo"}(If((Weekday(Today) - 2) = -1, 7, Weekday(Today) - 2))
Dim Mes As String = {"enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}(Month(Today) - 1)
- Dim FechaConFormato As String = String.Format("{0}, {1} de {2} de {3}", Dia, Month(Today), Mes, Year(Today))
+ Dim FechaConFormato As String = String.Format("{0}, {1} de {2} de {3}", Dia, Day(Today), Mes, Year(Today))
Dim params As New List(Of ReportParameter)
diff --git a/Acumuladores/RepEntradasUsadosClientes.aspx.vb b/Acumuladores/RepEntradasUsadosClientes.aspx.vb
index 58fbe6141..f20abeef3 100644
--- a/Acumuladores/RepEntradasUsadosClientes.aspx.vb
+++ b/Acumuladores/RepEntradasUsadosClientes.aspx.vb
@@ -74,7 +74,7 @@ Partial Class Acumuladores_RepEntradasUsadosClientes
Dim Dia As String = {"lunes", "martes", "miércoles", "jueves", "viernes", "sábado", "domingo"}(If((Weekday(Today) - 2) = -1, 7, Weekday(Today) - 2))
Dim Mes As String = {"enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}(Month(Today) - 1)
- Dim FechaConFormato As String = String.Format("{0}, {1} de {2} de {3}", Dia, Month(Today), Mes, Year(Today))
+ Dim FechaConFormato As String = String.Format("{0}, {1} de {2} de {3}", Dia, Day(Today), Mes, Year(Today))
Dim params As New List(Of ReportParameter)
diff --git a/App_Code/ClsGenerales.vb b/App_Code/ClsGenerales.vb
index 23bdee732..79167e0a2 100644
--- a/App_Code/ClsGenerales.vb
+++ b/App_Code/ClsGenerales.vb
@@ -134,6 +134,42 @@ Public Class ClsGenerales
End Sub
+ Public Function RepConciliacionSatGET(cveEmpresa As Int32, tipoDocto As String, fechaI As String, fechaF As String) As Boolean
+ Dim retorno As Boolean = False
+ DataAdapter("PA_RepConciliacionSatGET", CommandType.StoredProcedure)
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa
+ .Add("@TipoDocto", SqlDbType.VarChar).Value = tipoDocto
+ .Add("@FechaI", SqlDbType.VarChar).Value = fechaI
+ .Add("@FechaF", SqlDbType.VarChar).Value = fechaF
+ End With
+ Try
+ SqlAdapter.Fill(Data)
+ retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al obtener los registros de Conciliaciones SAT.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+ Return retorno
+ End Function
+ Public Function SAT_DescargaSolicitudesGET(CveEmpresa As Int32, tipo As Int32, fIngInicio As String, fIngFin As String, fSolInicio As String, fSolFin As String) As Boolean
+ Dim retorno As Boolean = False
+ DataAdapter("[PA_SAT_DescargaSolicitudesGET]", CommandType.StoredProcedure)
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ .Add("@Tipo", SqlDbType.Int).Value = tipo
+ .Add("@FIngInicio", SqlDbType.VarChar).Value = fIngInicio
+ .Add("@FIngFin", SqlDbType.VarChar).Value = fIngFin
+ .Add("@FSolInicio", SqlDbType.VarChar).Value = fSolInicio
+ .Add("@FSolFin", SqlDbType.VarChar).Value = fSolFin
+ End With
+ Try
+ SqlAdapter.Fill(Data)
+ retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al obtener los registros de solicitudes CFDI SAT.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+ Return retorno
+ End Function
#Region " I N D I C A D O R E S Y G R A F I C A S"
Public Function GetIndicadores(CveEmpresa As Integer) As DataSet
'Dim Retorno As Boolean = False
diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb
index e5ff86535..150011e9b 100644
--- a/App_Code/ClsPaginas.vb
+++ b/App_Code/ClsPaginas.vb
@@ -3483,6 +3483,8 @@ Public Class ClsPaginas
PaginaDict.Add("/Inicio.aspx".ToUpper(), -1)
PaginaDict.Add("/Ventas/RepConciliacionEmitidosSat.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Ventas/RepConciliacionSat.aspx".ToUpper(), 716)
+ PaginaDict.Add("/Ventas/SolicitudesSAT.aspx".ToUpper(), 717)
PaginaDict.Add("/Nomina/CatConceptos2.aspx".ToUpper(), -1)
PaginaDict.Add("/Nomina/Aguinaldo.aspx".ToUpper(), -1)
diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb
index dc58251c3..6d3b6c35f 100644
--- a/Compras/Compras.aspx.vb
+++ b/Compras/Compras.aspx.vb
@@ -2237,6 +2237,11 @@ Partial Class Compras_Compras
If UsuarioActual.Empresa.Funcionalidad(577).ToString = "1" Then
+ 'If UsuarioActual.CveRol = 1 Then
+ ' Alert("Ok funcionalidad 577")
+ 'End If
+
+
If RetencionIVA = 0 And IVAOriginal > 0 Then
For Each dRow As DataRow In TmpDT.Rows
If dRow("CveTipoPS").ToString.ToEntero = 1 Then
@@ -5828,9 +5833,15 @@ Partial Class Compras_Compras
CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
End If
End If
- End If
-
- 'Agregamos el Opuesto del 22 -> 15
+ End If
+
+
+ If UsuarioActual.Empresa.Funcionalidad(577).ToEntero = 1 Then
+ IdCtaContable = UsuarioActual.Empresa.Funcionalidad(578).ToEntero
+ End If
+
+
+ 'Agregamos el Opuesto del 22 -> 15
If importeMovimiento <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 15, Concepto + If(tipoCambioActual > 1, $" TC: {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then
ErrorPrepoliza = True
@@ -8467,7 +8478,9 @@ Partial Class Compras_Compras
If DdlRetIVAConcepto.Items.Count > 0 Then
If DdlRetIVAConcepto.SelectedValue.ToEntero = 1 Then
ImporteMovimiento = Math.Round(PorcentajePago * TxtRetIVA.Text.ToDecimal, 2)
- importeMN = ImporteMovimiento * tipoCambio
+ importeMN = ImporteMovimiento * tipoCambio
+
+
If CtaProveedorRetIVA > 0 Then
IdCtaContable = CtaProveedorRetIVA
CveCuenta = CveCuentaProveedorRetIVA
@@ -8481,10 +8494,19 @@ Partial Class Compras_Compras
End If
End If
End If
- End If
+
+
+ If UsuarioActual.Empresa.Funcionalidad(577).ToEntero = 1 Then
+ IdCtaContable = UsuarioActual.Empresa.Funcionalidad(578).ToEntero
+ End If
+
+
+ End If
End If
+
End If
+
Case 183 'RetIVA x Acreditar Fletes P.F.
If Not gvr.DataKey("TipoDocto").Contiene("NC", "DEV", "Ant") Then
If DdlRetIVAConcepto.Items.Count > 0 Then
@@ -16988,6 +17010,26 @@ Partial Class Compras_Compras
CompruebaAgregar()
GuardaAC()
End If
+
+ If UsuarioActual.Empresa.Funcionalidad(577).ToString = "1" Then
+
+ 'If UsuarioActual.CveRol = 1 Then
+ ' Alert($"Ok funcionalidad 577 RetencionIVA { RetencionIVA} IVAOriginal {IVAOriginal}")
+ 'End If
+
+ If RetencionIVA = 0 And IVAOriginal > 0 Then
+ For Each dRow As DataRow In TmpDT.Rows
+ If dRow("CveTipoPS").ToString.ToEntero = 1 Then
+ tdIVA6.Visible = True
+ Exit For
+ End If
+ Next
+ End If
+
+ End If
+
+
+
UpPS.Update()
CargaGvPersonal()
End Sub
diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb
index 00ce5db51..afd814184 100644
--- a/Compras/PopUpVerFactura.aspx.vb
+++ b/Compras/PopUpVerFactura.aspx.vb
@@ -1889,10 +1889,9 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("Fecha", Fecha)) 'TxtFecha.Text
params.Add(New ReportParameter("NombreEntrego", Capturo)) 'UsuarioActual.Nombre
params.Add(New ReportParameter("NombreAccion", Recibio)) 'TxtResponsable.Text
- params.Add(New ReportParameter("Accion", "Recibió")) 'Antes Trasladó
+ params.Add(New ReportParameter("Accion", "RECIBE")) 'Antes Trasladó
params.Add(New ReportParameter("Observaciones", Observaciones))
-
Dim DTCliente As New DataTable
Dim SBDireccionO As New StringBuilder()
Dim SBDireccionD As New StringBuilder()
@@ -2003,6 +2002,16 @@ Partial Class PopUpVerFactura
ImprimirPDF(String.Format(RutaFormato, UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Aviso de Traslado - {0}", Folio), RDSName:="DsInventarios")
Else
+ Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
+ Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
+
+ If Imagen.Exists Then
+ params.Add(New ReportParameter("LogoPath", logouri))
+ Else
+ params.Add(New ReportParameter("LogoPath", ""))
+ End If
+ params.Add(New ReportParameter("Origen", Almacen))
+ params.Add(New ReportParameter("Destino", AlmacenDestino))
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
@@ -2042,6 +2051,17 @@ Partial Class PopUpVerFactura
ImprimirPDF(String.Format("{0}Formatos\Traslado.rdlc", UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Recepción de Traslado - {0}", Folio), RDSName:="DsInventarios")
Else
+ Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
+ Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
+
+ If Imagen.Exists Then
+ params.Add(New ReportParameter("LogoPath", logouri))
+ Else
+ params.Add(New ReportParameter("LogoPath", ""))
+ End If
+ params.Add(New ReportParameter("Origen", Almacen))
+ params.Add(New ReportParameter("Destino", AlmacenDestino))
+
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
diff --git a/Compras/RepRembolsoComprobaciones.aspx b/Compras/RepRembolsoComprobaciones.aspx
index e55f48af0..854a49898 100644
--- a/Compras/RepRembolsoComprobaciones.aspx
+++ b/Compras/RepRembolsoComprobaciones.aspx
@@ -106,6 +106,7 @@
+
@@ -120,7 +121,7 @@
-
+
diff --git a/Contabilidad/RegPrePoliza.aspx.vb b/Contabilidad/RegPrePoliza.aspx.vb
index d867a4a8e..623229efd 100644
--- a/Contabilidad/RegPrePoliza.aspx.vb
+++ b/Contabilidad/RegPrePoliza.aspx.vb
@@ -817,7 +817,11 @@ Partial Class ContabilidadC_RegPrePoliza
If CvePrePoliza > 0 Then
'Nuevo Modulo Charlie
- ActualizarPrePoliza()
+ ActualizarPrePoliza()
+
+
+
+
Else
Dim MensajeAlert = New StringBuilder
Dim ObjIE As New ClsBancos()
@@ -966,10 +970,19 @@ Partial Class ContabilidadC_RegPrePoliza
Dim OcurrioError As Boolean = False
Dim ObjContabilidad As New ClsContabilidad
- ObjContabilidad.IniciaTransacSQL()
+ ObjContabilidad.IniciaTransacSQL()
+
+
+
+ If Not ObjContabilidad.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) Then
+ OcurrioError = True
+ End If
+
+
ObjContabilidad.UpdatePrePoliza(MinFecha, -1, DdlTipoPoliza.SelectedValue.ToEntero, -1, CvePrePoliza, UsuarioActual.CveEmpresa, Concepto:=TxtConcepto.Text, FechaPoliza:=TxtFechaDocumento.Text.ToDate)
+
For Each row As GridViewRow In GvPrePoliza.Rows
If row.DataKey("CvePrePolizaDetalle").ToEntero > 0 Then
If Not ObjContabilidad.UpdatePrepolizasDetalle(row.DataKey("CvePrePolizaDetalle").ToEntero, row.FCTextBox("TxtConcepto").Text, row.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero,
@@ -996,13 +1009,20 @@ Partial Class ContabilidadC_RegPrePoliza
If Not OcurrioError Then
ObjContabilidad.Commit()
Alert("La PrePoliza se actualizó correctamente.", TipoMensaje.MsgInformacion)
- Else
+ Else
ObjContabilidad.RollBack()
Alert("Ocurrio un error al actualizar la PrePoliza.", TipoMensaje.MsgError)
End If
ObjContabilidad.Dispose()
CargaPrePoliza()
+
+ If Not OcurrioError Then
+ If IdPoliza > 0 Then
+ BtnContabilizar_Click(Nothing, Nothing)
+ End If
+
+ End If
End Sub
Protected Sub GvPrePoliza_RowUpdating(sender As Object, e As GridViewUpdateEventArgs) Handles GvPrePoliza.RowUpdating
RegistraScript(String.Format("$('#{0}').modal();", "DivEditConcepto"))
@@ -1463,13 +1483,14 @@ Partial Class ContabilidadC_RegPrePoliza
End Sub
Private Sub Contabilizar()
+
Dim ObjConta As New ClsContabilidad
If IdPoliza > 0 Then 'si está bloqueada, lo desbloqueaprimero
ObjConta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False)
End If
- If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, pIDPoliza:=If(IdPoliza > 0, IdPoliza, -1)) Then
+ If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, pIDPoliza:=If(IdPoliza > 0, IdPoliza, -1), Concepto:=TxtConcepto.Text, Fecha:=TxtFechaDocumento.Text.ToDateTime) Then
Alert(String.Format("Prepóliza contabilizada.