diff --git a/App_Code/ClsGenerales.vb b/App_Code/ClsGenerales.vb index 3b125265b..4e0ef922e 100644 --- a/App_Code/ClsGenerales.vb +++ b/App_Code/ClsGenerales.vb @@ -2973,6 +2973,20 @@ Public Class ClsGenerales End Try Return Retorno End Function + + Public Function GetSATDIOTTipoOperacion() As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Gral_SAT_DIOT_TipoOperacionGet") + With SqlAdapter.SelectCommand.Parameters + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener los tipos de operacion del SAT-DIOT", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + Return Retorno + End Function Public Function GetSATUnidadesAduana() As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Gral_SAT_UnidadAduanaGet") diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index b9c0c104c..c884bbe5d 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -561,6 +561,22 @@ Public Class ClsPaginas HttpContext.Current.Application(AppNombre) = value End Set End Property + + Property GlobalDTDIOTTipoOperacion() As DataTable + Get + Dim AppNombre As String = "GlobalDTDIOTTipoOperacion" + If Application(AppNombre) Is Nothing Then + Dim ObjGrales As New ClsGenerales + If ObjGrales.GetSATDIOTTipoOperacion() Then Application(AppNombre) = ObjGrales.DtResultados + ObjGrales.Dispose() + End If + GlobalDTDIOTTipoOperacion = DirectCast(Application(AppNombre), DataTable) + End Get + Set(value As DataTable) + Dim AppNombre As String = "GlobalDTDIOTTipoOperacion" + Application(AppNombre) = value + End Set + End Property Property GlobalDTGralPaises() As DataTable Get Dim AppNombre As String = "GlobalDTGralPaises" diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 1f3e35b51..241e90e0d 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -8488,7 +8488,7 @@ Partial Class Compras_Compras Dim DiferenciaRetISR As Decimal = TxtRetISR.Text.ToDecimal - RetISRDetalles If Math.Abs(DiferenciaRetISR) > 0 Then - If Math.Abs(DiferenciaRetISR) <= 0.05 Then + If Math.Abs(DiferenciaRetISR) <= 0.09 Then Dim DTConsulta As New DataTable DTConsulta = TmpDT.FiltraParametros(" RetISR > 0 ") @@ -8512,12 +8512,17 @@ Partial Class Compras_Compras If Math.Abs(DiferenciaRetISR) > 0.0D Then - If (TmpDT.Rows(IndiceUltimo)("RetISR").ToString.ToDecimal + DiferenciaRetISR) < 0 Then + If (TmpDT.Rows(IndiceUltimo)("RetISR").ToString.ToDecimal + DiferenciaRetISR) < 0 Or (Math.Abs(DiferenciaRetISR) >= 0.06) Then Dim AjusteteDividido As Decimal = Math.Abs(DiferenciaRetISR) / CantidadRegistroConRetISR For Each dRow As DataRow In TmpDT.Rows - dRow("RetISR") = dRow("RetISR").ToString.ToDecimal - AjusteteDividido + If DiferenciaRetISR > 0 Then + dRow("RetISR") = dRow("RetISR").ToString.ToDecimal + AjusteteDividido + Else + dRow("RetISR") = dRow("RetISR").ToString.ToDecimal - AjusteteDividido + End If + Next Else diff --git a/Compras/Proveedores.aspx b/Compras/Proveedores.aspx index 1801c70c2..81079cc46 100644 --- a/Compras/Proveedores.aspx +++ b/Compras/Proveedores.aspx @@ -799,20 +799,19 @@
+ + +
Tipo Tercero:
- + - - - - - - + + @@ -833,11 +832,16 @@
Tipo Operación:
- + + + + + + @@ -864,7 +868,9 @@
-
+ + +
diff --git a/Compras/Proveedores.aspx.vb b/Compras/Proveedores.aspx.vb index e5548a436..51eeafbab 100644 --- a/Compras/Proveedores.aspx.vb +++ b/Compras/Proveedores.aspx.vb @@ -908,6 +908,7 @@ Partial Class Compras_Proveedores 'DIOT CargaDIOTPais() DDlDIOTTipoTercero.SelectedValueExist(ObjProveedor.DIOTCveTipoTercero) + CargaTipoTransaccion() DdlDIOTTipoOperacion.SelectedValueExist(ObjProveedor.DIOTCveTipoOperacion) TxtDIOTNumIDFiscal.Text = ObjProveedor.DIOTNumeroIDFiscal DdlDIOTPais.SelectedValueExist(ObjProveedor.DIOTCvePais) @@ -5876,6 +5877,27 @@ Partial Class Compras_Proveedores End If End Sub + + Protected Sub DDlDIOTTipoTercero_SelectedIndexChanged(sender As Object, e As EventArgs) + CargaTipoTransaccion() + End Sub + + + Private Sub CargaTipoTransaccion() + Dim Filtro As String = "" + Select Case DDlDIOTTipoTercero.SelectedValue + Case "1" + Filtro = "AplicaProvNacional = 1" + Case "2" + Filtro = "AplicaProvExtranjero = 1" + Case "5" + Filtro = "AplicaProvGlobal = 1" + End Select + + DdlDIOTTipoOperacion.DataSource = GlobalDTDIOTTipoOperacion.FiltraParametros(Filtro) + DdlDIOTTipoOperacion.DataBind() + End Sub + End Class diff --git a/Contabilidad/RepIVA.aspx b/Contabilidad/RepIVA.aspx index 9ba2ebace..3f452be28 100644 --- a/Contabilidad/RepIVA.aspx +++ b/Contabilidad/RepIVA.aspx @@ -241,7 +241,7 @@ <%-- --%> - SubTotal
0%
+ SubTotal
0%
diff --git a/Contabilidad/RepIVA.aspx.cs b/Contabilidad/RepIVA.aspx.cs index 77b7be8ac..ac8f7ced2 100644 --- a/Contabilidad/RepIVA.aspx.cs +++ b/Contabilidad/RepIVA.aspx.cs @@ -343,7 +343,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas if (Objconta.GetRepIVA(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), 2, UsuarioActual.CveUsuario, -1, Conciliado, UsuarioActual.CveEmpresa, TipoCambio, TCEspecifico)) { - if (txtFechaI.Text.ToDate() < "2025/01/31".ToDate()) // años anteriores al enero 2025 + if (txtFechaI.Text.ToDate() < "2024/12/31".ToDate()) // años anteriores al enero 2025 { foreach (DataRow Drow in Objconta.DtResultados.FiltraParametros("CveCompra is null and CveProveedor > 0 and SubTotal >= 1 ").Rows) // and(IVA > 1 OR IEPS > 0) { @@ -380,7 +380,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas } else { - foreach (DataRow Drow in Objconta.DtResultados.FiltraParametros("CveCompra is null and CveProveedor > 0 and SubTotal >= 1 ").Rows) // and(IVA > 1 OR IEPS > 0) + foreach (DataRow Drow in Objconta.DtResultados.FiltraParametros("CveCompra is null and CveProveedor > 0 ").Rows) // and(IVA > 1 OR IEPS > 0) { SBDIOT.AppendLine( Drow["TipoTercero"].ToString() + "|" + @@ -388,7 +388,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas Drow["RFC_DIOT"].ToString() + "|" + Drow["NumeroIDFiscal"].ToString() + "|" + Drow["NombreExtranjero"].ToString() + "|" + - Drow["PaisResidencia"].ToString() + "|" + + Drow["PaisResidenciaFiscal"].ToString() + "|" + Drow["Jurisdiccion"].ToString() + "|" + // 3.2 valor de los actos o actividades LV0(Drow["ActosFN"].ToString()) + "|" + // actos norte @@ -441,28 +441,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas LV0(Drow["DANoObjetoTN"].ToString()) + "|" + // Actos o actividades no objeto del IVA realizados en LV0(Drow["DANoObjetoNoTN"].ToString()) + "|" + // Actos o actividades no objeto del IVA por no contar on establecimiento en territorio nacion (Drow["DAManifiesto"].ToString())); // Manifiesto que se dio efectos fiscales a los comprobantes que amparan las operaciones realizadas con el proveedor - - //LV(Drow["valorActos1516"].ToString()) + "|" + - //LV(Drow["valorActos15"].ToString()) + "|" + - //LV(Drow["ValorIvaNo1516"].ToString()) + "|" + - - //LV(Drow["valorActos1011"].ToString()) + "|" + - //LV(Drow["valorActos10"].ToString()) + "|" + - //LV(Drow["valorActosImp8"].ToString()) + "|" + - //LV(Drow["ValorIvaNo10"].ToString()) + "|" + - //LV(Drow["ValorIvaNo08"].ToString()) + "|" + - - //LV(Drow["valorActosImp1516"].ToString()) + "|" + - //LV(Drow["ValorIvaNoImp16"].ToString()) + "|" + - - //LV(Drow["valorActosImp10"].ToString()) + "|" + - //LV(Drow["ValorIvaNoImp10"].ToString()) + "|" + - - //LV(Drow["IvaExentoImpo"].ToString()) + "|" + - //LV(Drow["IVACero"].ToString()) + "|" + - //LV(Drow["IvaExento"].ToString()) + "|" + - //LV(Drow["IvaRetenido"].ToString()) + "|" + - //LV(Drow["IvaDevoluciones"].ToString()) + "|"); + } } diff --git a/OC/OC.aspx.vb b/OC/OC.aspx.vb index 5847b3b9f..12d5cb61f 100644 --- a/OC/OC.aspx.vb +++ b/OC/OC.aspx.vb @@ -1105,7 +1105,10 @@ Partial Class OC_OC End If End If - DdlUsoCFDI.SelectedValueExist(1) + If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then + DdlUsoCFDI.SelectedValueExist(1) + End If + End If diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index 11d90c8d8..f99b79160 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -5753,7 +5753,7 @@
- diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 004c014db..1fc4a2307 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -3850,6 +3850,7 @@ Partial Class Clientes End If ObjEventoBitacora.Dispose() GvEB.DataBind() + UPEventoBitacora.Update() End Sub Protected Sub DownloadFile(ByVal sender As Object, ByVal e As EventArgs) @@ -4801,6 +4802,8 @@ Partial Class Clientes Dim ObjConta As New ClsContabilidad ObjConta.IniciaTransacSQL() + Dim ObjEventoBitacora As New ClsOIEventos(ObjConta.IniciaTransacSQL()) + Dim TieneError As Boolean = False @@ -4869,20 +4872,56 @@ Partial Class Clientes TieneError = True End If End If + End If + + + If Not TieneError Then + Dim CveIE As Integer = -1 + Dim Folio As String = Gvr.DataKey("Folio") + Dim Liga As String = "" + + Select Case Tipo + Case "Ant", "NC" + CveVenta = Gvr.DataKey("CveVenta").ToEntero() + Liga = $"./Ventas.aspx?CveVenta={CveVenta}" + Case "IxC" + CveIE = Gvr.DataKey("CveIE").ToEntero() + Liga = $"../Bancos/IE.aspx?CveIE={CveIE}" + End Select + + Dim DescripcioBitacora As String = $"Ha sido reclasificado el folio {Folio} al cliente: {DdlClienteImportarSaldos.txtText.Value}" + + If Not ObjEventoBitacora.AddEventoBitacora(DescripcioBitacora, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, DdlClienteImportarSaldos.SelectedValue.ToEntero(), -1, -1, -1, -1, -1) Then + TieneError = True + End If + + If Not TieneError Then + If Not ObjEventoBitacora.AddEventoBitacora(DescripcioBitacora, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, CveCliente, -1, -1, -1, -1, -1) Then + TieneError = True + End If + End If + + End If - End If + End If + Next Else TieneError = True - End If - - + End If + + + + + + If Not TieneError Then ObjConta.Commit() Alert($"La importación de saldos se hizo correctamente.", TipoMensaje.MsgInformacion) TxtSaldoImportar.Text = "" ConsultarAnticiposSaldosClientes() + CargaEventoBitacora() Else ObjConta.RollBack() Alert("Ocurrió un error al importar los saldos. Por favor vuelva a intentar.", TipoMensaje.MsgError)