-- mejora pago compra

This commit is contained in:
2022-08-23 15:03:04 -07:00
parent 580ef7fbe7
commit 34046f7b08
2 changed files with 37 additions and 31 deletions

View File

@@ -9625,21 +9625,21 @@ Public Class ClsPaginas
Public ReadOnly Property ConceptoPrePolizaRetIVA As ConceptosRetenciones Public ReadOnly Property ConceptoPrePolizaRetIVA As ConceptosRetenciones
Get Get
Dim Ret As New ConceptosRetenciones Dim Ret As New ConceptosRetenciones
Dim Funcionalidad As Integer Dim Funcionalidad, FuncionalidadxAcred As Integer
If CveConceptoRetIVA = 1 Then If CveConceptoRetIVA = 1 Then
Funcionalidad = 308 Funcionalidad = 308 : FuncionalidadxAcred = 307
Ret.CveConceptoAcreditable = 22 Ret.CveConceptoAcreditable = 22
Ret.CveConceptoxAcreditar = 15 Ret.CveConceptoxAcreditar = 15
ElseIf CveConceptoRetIVA = 2 Then ElseIf CveConceptoRetIVA = 2 Then
Funcionalidad = 310 Funcionalidad = 310 : FuncionalidadxAcred = 309
Ret.CveConceptoAcreditable = 184 Ret.CveConceptoAcreditable = 184
Ret.CveConceptoxAcreditar = 183 Ret.CveConceptoxAcreditar = 183
ElseIf CveConceptoRetIVA = 3 Then ElseIf CveConceptoRetIVA = 3 Then
Funcionalidad = 312 Funcionalidad = 312 : FuncionalidadxAcred = 311
Ret.CveConceptoAcreditable = 186 Ret.CveConceptoAcreditable = 186
Ret.CveConceptoxAcreditar = 185 Ret.CveConceptoxAcreditar = 185
ElseIf CveConceptoRetIVA = 4 Then ElseIf CveConceptoRetIVA = 4 Then
Funcionalidad = 314 Funcionalidad = 314 : FuncionalidadxAcred = 313
Ret.CveConceptoAcreditable = 249 Ret.CveConceptoAcreditable = 249
Ret.CveConceptoxAcreditar = 248 Ret.CveConceptoxAcreditar = 248
ElseIf CveConceptoRetIVA = 5 Then ElseIf CveConceptoRetIVA = 5 Then
@@ -9653,22 +9653,24 @@ Public Class ClsPaginas
End If End If
If UsuarioActual.Empresa.TipoContabilidad = 2 Then If UsuarioActual.Empresa.TipoContabilidad = 2 Then
If UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero > 0 Then
Ret.IdCtaContablexAcreditar = UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero Dim ObjConta As New ClsContabilidad
If UsuarioActual.Empresa.Funcionalidad(FuncionalidadxAcred).ToEntero > 0 Then
Ret.IdCtaContablexAcreditar = UsuarioActual.Empresa.Funcionalidad(FuncionalidadxAcred).ToEntero
Else Else
Dim ObjConta As New ClsContabilidad
If ObjConta.GetRetCuenta(Ret.CveConceptoAcreditable, UsuarioActual.CveEmpresa) Then
If ObjConta.DtResultados.Rows.Count > 0 Then
Ret.IdCtaContablexAcreditar = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If
End If
If ObjConta.GetRetCuenta(Ret.CveConceptoxAcreditar, UsuarioActual.CveEmpresa) Then If ObjConta.GetRetCuenta(Ret.CveConceptoxAcreditar, UsuarioActual.CveEmpresa) Then
If ObjConta.DtResultados.Rows.Count > 0 Then If ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContablexAcreditar = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
Ret.IdCtaContableAcreditable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If
End If End If
ObjConta.Dispose()
End If End If
If UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero > 0 Then
Ret.IdCtaContableAcreditable = UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero
Else
If ObjConta.GetRetCuenta(Ret.CveConceptoAcreditable, UsuarioActual.CveEmpresa) Then
If ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContableAcreditable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If
End If
ObjConta.Dispose()
End If End If
Return Ret Return Ret
@@ -9677,38 +9679,41 @@ Public Class ClsPaginas
Public ReadOnly Property ConceptoPrePolizaRetISR As ConceptosRetenciones Public ReadOnly Property ConceptoPrePolizaRetISR As ConceptosRetenciones
Get Get
Dim Ret As New ConceptosRetenciones Dim Ret As New ConceptosRetenciones
Dim Funcionalidad As Integer Dim Funcionalidad, FuncionalidadxAcred As Integer
If CveConceptoRetISR = 1 Then If CveConceptoRetISR = 1 Then
Funcionalidad = 316 Funcionalidad = 316 : FuncionalidadxAcred = 315
Ret.CveConceptoAcreditable = 23 Ret.CveConceptoAcreditable = 23
Ret.CveConceptoxAcreditar = 16 Ret.CveConceptoxAcreditar = 16
ElseIf CveConceptoRetISR = 2 Then ElseIf CveConceptoRetISR = 2 Then
Funcionalidad = 318 Funcionalidad = 318 : FuncionalidadxAcred = 317
Ret.CveConceptoAcreditable = 244 Ret.CveConceptoAcreditable = 244
Ret.CveConceptoxAcreditar = 243 Ret.CveConceptoxAcreditar = 243
ElseIf CveConceptoRetISR = 3 Then ElseIf CveConceptoRetISR = 3 Then
Funcionalidad = 348 Funcionalidad = 349 : FuncionalidadxAcred = 348
Ret.CveConceptoAcreditable = 328 Ret.CveConceptoAcreditable = 328
Ret.CveConceptoxAcreditar = 327 Ret.CveConceptoxAcreditar = 327
End If End If
If UsuarioActual.Empresa.TipoContabilidad = 2 Then If UsuarioActual.Empresa.TipoContabilidad = 2 Then
Dim ObjConta As New ClsContabilidad
If UsuarioActual.Empresa.Funcionalidad(FuncionalidadxAcred).ToEntero > 0 Then
Ret.IdCtaContablexAcreditar = UsuarioActual.Empresa.Funcionalidad(FuncionalidadxAcred).ToEntero
Else
If ObjConta.GetRetCuenta(Ret.CveConceptoxAcreditar, UsuarioActual.CveEmpresa) Then
If ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContablexAcreditar = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
End If
End If
If UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero > 0 Then If UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero > 0 Then
Ret.IdCtaContableAcreditable = UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero Ret.IdCtaContableAcreditable = UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero
Else Else
Dim ObjConta As New ClsContabilidad
If ObjConta.GetRetCuenta(Ret.CveConceptoxAcreditar, UsuarioActual.CveEmpresa) Then
If ObjConta.DtResultados.Rows.Count > 0 Then
Ret.IdCtaContablexAcreditar = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
End If
End If
If ObjConta.GetRetCuenta(Ret.CveConceptoAcreditable, UsuarioActual.CveEmpresa) Then If ObjConta.GetRetCuenta(Ret.CveConceptoAcreditable, UsuarioActual.CveEmpresa) Then
If ObjConta.DtResultados.Rows.Count > 0 Then If ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContableAcreditable = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
Ret.IdCtaContableAcreditable = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
End If
End If End If
ObjConta.Dispose()
End If End If
ObjConta.Dispose()
End If End If
Return Ret Return Ret

View File

@@ -835,6 +835,7 @@ Partial Class Bancos_ProveedoresAbonar
CompraActual.EsImportacion = gvr.DataKey("EsImportacion") = "True" CompraActual.EsImportacion = gvr.DataKey("EsImportacion") = "True"
CompraActual.UsuarioActual = UsuarioActual CompraActual.UsuarioActual = UsuarioActual
CompraActual.CveSubProyecto = gvr.DataKey("CveSubProyecto").ToEntero CompraActual.CveSubProyecto = gvr.DataKey("CveSubProyecto").ToEntero
CompraActual.IdCtaContableProv = CtaProveedor
'Importe de pago 'Importe de pago
Pago.ImportePago = gvr.FCTextBox("TxtAbonar").Text.ToDecimal Pago.ImportePago = gvr.FCTextBox("TxtAbonar").Text.ToDecimal