Compras Retenciones, limpiesa en anticipos , se concetraron en 15,22,16,23, conceptos eliminados 183,185,248,285 , 184,186,249,578,

This commit is contained in:
rakcsle
2022-05-26 09:55:02 -07:00
parent 8f8d2d2992
commit 65368ceb2e

View File

@@ -9261,28 +9261,6 @@ Partial Class Compras_Compras
End If
End If
'If DdlRetIVAConcepto.SelectedValue.ToEntero = 1 Then
' ImporteMovimiento = Math.Round(PorcentajePago * TxtRetIVA.Text.ToDecimal, 2)
' importeMN = ImporteMovimiento * tipoCambio
' If CtaProveedorRetIVA > 0 Then
' IdCtaContable = CtaProveedorRetIVA
' ElseIf UsuarioActual.Empresa.Funcionalidad(307).ToEntero > 0 Then
' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(307).ToEntero
' Else
' If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
' If ObjConta.DtResultados.Rows.Count > 0 Then
' IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
' End If
' End If
' End If
'End If
End If
End If
Case 22 'RetIVA Acreditable Honorarios/Serv. Prof.
@@ -9349,168 +9327,11 @@ Partial Class Compras_Compras
End If
End If
''Dim Funcionalidad As Integer = 0
'If DdlRetIVAConcepto.SelectedValue.ToEntero = 1 Then
' Funcionalidad = 307
'ElseIf DdlRetIVAConcepto.SelectedValue.ToEntero = 2 Then
' Funcionalidad = 310
'ElseIf DdlRetIVAConcepto.SelectedValue.ToEntero = 3 Then
' Funcionalidad = 312
'ElseIf DdlRetIVAConcepto.SelectedValue.ToEntero = 4 Then
' Funcionalidad = 314
'ElseIf DdlRetIVAConcepto.SelectedValue.ToEntero = 5 Then
' Funcionalidad = 578
'End If
'ImporteMovimiento = Math.Round(PorcentajePago * TxtRetIVA.Text.ToDecimal, 2)
'importeMN = ImporteMovimiento * tipoCambioNC
'If CtaProveedorRetIVA > 0 Then
' IdCtaContable = CtaProveedorRetIVA
'ElseIf UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero > 0 Then
' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero
'Else
' If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
' If ObjConta.DtResultados.Rows.Count > 0 Then
' IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
' End If
' 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
If DdlRetIVAConcepto.SelectedValue.ToEntero = 2 Then
ImporteMovimiento = Math.Round(PorcentajePago * TxtRetIVA.Text.ToDecimal, 2)
importeMN = ImporteMovimiento * tipoCambio
If CtaProveedorRetIVA > 0 Then
IdCtaContable = CtaProveedorRetIVA
ElseIf UsuarioActual.Empresa.Funcionalidad(309).ToEntero > 0 Then
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(309).ToEntero
Else
If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
If ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If
End If
End If
End If
End If
End If
Case 184 'RetIVA Acreditable Fletes P.F.
If Not gvr.DataKey("TipoDocto").Contiene("NC", "DEV", "Ant") Then
If DdlRetIVAConcepto.Items.Count > 0 Then
If DdlRetIVAConcepto.SelectedValue.ToEntero = 2 Then
ImporteMovimiento = Math.Round(PorcentajePago * TxtRetIVA.Text.ToDecimal, 2)
importeMN = ImporteMovimiento * tipoCambio
If CtaProveedorRetIVA > 0 Then
IdCtaContable = CtaProveedorRetIVA
ElseIf UsuarioActual.Empresa.Funcionalidad(310).ToEntero > 0 Then
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(310).ToEntero
Else
If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
If ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If
End If
End If
End If
End If
End If
Case 185 'RetIVA x Acreditar Fletes P.M.
If Not gvr.DataKey("TipoDocto").Contiene("NC", "DEV", "Ant") Then
If DdlRetIVAConcepto.Items.Count > 0 Then
If DdlRetIVAConcepto.SelectedValue.ToEntero = 3 Then
ImporteMovimiento = Math.Round(PorcentajePago * TxtRetIVA.Text.ToDecimal, 2)
importeMN = ImporteMovimiento * tipoCambio
If CtaProveedorRetIVA > 0 Then
IdCtaContable = CtaProveedorRetIVA
ElseIf UsuarioActual.Empresa.Funcionalidad(311).ToEntero > 0 Then
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(311).ToEntero
Else
If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
If ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If
End If
End If
End If
End If
End If
Case 186 'RetIVA Acreditable Fletes P.M.
If Not gvr.DataKey("TipoDocto").Contiene("NC", "DEV", "Ant") Then
If DdlRetIVAConcepto.Items.Count > 0 Then
If DdlRetIVAConcepto.SelectedValue.ToEntero = 3 Then
ImporteMovimiento = Math.Round(PorcentajePago * TxtRetIVA.Text.ToDecimal, 2)
importeMN = ImporteMovimiento * tipoCambio
If CtaProveedorRetIVA > 0 Then
IdCtaContable = CtaProveedorRetIVA
ElseIf UsuarioActual.Empresa.Funcionalidad(312).ToEntero > 0 Then
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(312).ToEntero
Else
If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
If ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If
End If
End If
End If
End If
End If
Case 248 'RetIVA x Acreditar Arrendamiento
If Not gvr.DataKey("TipoDocto").Contiene("NC", "DEV", "Ant") Then
If DdlRetIVAConcepto.Items.Count > 0 Then
If DdlRetIVAConcepto.SelectedValue.ToEntero = 4 Then
ImporteMovimiento = Math.Round(PorcentajePago * TxtRetIVA.Text.ToDecimal, 2)
importeMN = ImporteMovimiento * tipoCambio
If CtaProveedorRetIVA > 0 Then
IdCtaContable = CtaProveedorRetIVA
ElseIf UsuarioActual.Empresa.Funcionalidad(313).ToEntero > 0 Then
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(313).ToEntero
Else
If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
If ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If
End If
End If
End If
End If
End If
Case 249 'RetIVA Acreditable Arrendamiento
If Not gvr.DataKey("TipoDocto").Contiene("NC", "DEV", "Ant") Then
If DdlRetIVAConcepto.Items.Count > 0 Then
If DdlRetIVAConcepto.SelectedValue.ToEntero = 4 Then
ImporteMovimiento = Math.Round(PorcentajePago * TxtRetIVA.Text.ToDecimal, 2)
importeMN = ImporteMovimiento * tipoCambio
If CtaProveedorRetIVA > 0 Then
IdCtaContable = CtaProveedorRetIVA
ElseIf UsuarioActual.Empresa.Funcionalidad(314).ToEntero > 0 Then
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(314).ToEntero
Else
If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
If ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If
End If
End If
End If
End If
End If
Case 16 'RetISR x Acreditar
If Not gvr.DataKey("TipoDocto").Contiene("NC", "DEV", "Ant") Then
'If Not gvr.DataKey("TipoDocto").Contiene("NC", "DEV") Then
@@ -9549,20 +9370,6 @@ Partial Class Compras_Compras
End If
End If
'ImporteMovimiento = Math.Round(PorcentajePago * TxtRetISR.Text.ToDecimal, 2)
'importeMN = ImporteMovimiento * tipoCambio
'If CtaProveedorRetISR > 0 Then
' IdCtaContable = CtaProveedorRetISR
'ElseIf UsuarioActual.Empresa.Funcionalidad(315).ToEntero > 0 Then
' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(315).ToEntero
'Else
' If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
' If ObjConta.DtResultados.Rows.Count > 0 Then
' IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
' End If
' End If
'End If
End If
End If
@@ -9619,63 +9426,13 @@ Partial Class Compras_Compras
End If
End If
'ImporteMovimiento = Math.Round(PorcentajePago * TxtRetISR.Text.ToDecimal, 2)
'importeMN = ImporteMovimiento * tipoCambio
'If CtaProveedorRetISR > 0 Then
' IdCtaContable = CtaProveedorRetISR
'ElseIf UsuarioActual.Empresa.Funcionalidad(316).ToEntero > 0 Then
' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(316).ToEntero
'Else
' If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
' If ObjConta.DtResultados.Rows.Count > 0 Then
' IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
' End If
' End If
'End If
End If
End If
Case 243 'RetISR X Acreditar Terceros y Arrendamiento
If Not gvr.DataKey("TipoDocto").Contiene("NC", "DEV", "Ant") Then
If DdlRetISRConcepto.Items.Count > 0 AndAlso DdlRetISRConcepto.SelectedValue.ToEntero = 2 Then
ImporteMovimiento = Math.Round(PorcentajePago * TxtRetISR.Text.ToDecimal, 2)
importeMN = ImporteMovimiento * tipoCambio
If CtaProveedorRetISR > 0 Then
IdCtaContable = CtaProveedorRetISR
ElseIf UsuarioActual.Empresa.Funcionalidad(317).ToEntero > 0 Then
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(317).ToEntero
Else
If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
If ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
End If
End If
End If
End If
End If
Case 244 'RetISR Acreditable Terceros y Arrendamiento
If Not gvr.DataKey("TipoDocto").Contiene("NC", "DEV", "Ant") Then
If DdlRetISRConcepto.Items.Count > 0 AndAlso DdlRetISRConcepto.SelectedValue.ToEntero = 2 Then
ImporteMovimiento = Math.Round(PorcentajePago * TxtRetISR.Text.ToDecimal, 2)
importeMN = ImporteMovimiento * tipoCambio
If CtaProveedorRetISR > 0 Then
IdCtaContable = CtaProveedorRetISR
ElseIf UsuarioActual.Empresa.Funcionalidad(318).ToEntero > 0 Then
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(318).ToEntero
Else
If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
If ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
End If
End If
End If
End If
End If
Case 64 'GANANCIA
If gvr.DataKey("TipoDocto").Contiene("NC", "DEV", "Ant") Then 'SOLO SE IMPLEMENTÓ PARA NC
If DdlMoneda.SelectedValue.ToEntero <> 1 Or gvr.DataKey("CveMoneda").ToEntero <> 1 Then