se quitó referencia a variable cvecuenta
This commit is contained in:
@@ -308,7 +308,6 @@ Partial Class Bancos_DepositoTerminal
|
||||
Dim importeMX As Decimal
|
||||
Dim FechaMovimiento As Date = TxtFecha.Text.ToDate
|
||||
Dim IdCtaContable As Integer = 0
|
||||
Dim CveCuenta As Integer = 0
|
||||
Dim ConceptoMovimiento As String = ObjContabilidad.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, ConceptoContable, NombreComercial, gvr.DataKey("SerieFolio").ToString, TxtFolio.ToString)
|
||||
Dim Referencia As String = gvr.DataKey("SerieFolio").ToString
|
||||
Dim CveSubProyecto As Integer = gvr.DataKey("CveSubProyecto").ToEntero
|
||||
@@ -320,20 +319,17 @@ Partial Class Bancos_DepositoTerminal
|
||||
|
||||
If tipoCambioVenta = 1 Then
|
||||
IdCtaContable = IdCuentaCliente
|
||||
CveCuenta = CveCuentaCliente
|
||||
Else
|
||||
ConceptoMovimiento += $" TC:{tipoCambioVenta} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||
IdCtaContable = IdCtaContComplementaria
|
||||
CveCuenta = CveCuentaComplementaria
|
||||
If ImporteMovimiento <> 0 AndAlso IdCtaContable > 0 Then
|
||||
importeMX = ImporteMovimiento
|
||||
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, TipoMovimiento, 0, Referencia, ConceptoContable, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyecto, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteMovimiento * tipoCambioVenta - ImporteMovimiento, CveCuenta:=CveCuenta) Then
|
||||
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, TipoMovimiento, 0, Referencia, ConceptoContable, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyecto, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteMovimiento * tipoCambioVenta - ImporteMovimiento) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
End If
|
||||
End If
|
||||
|
||||
IdCtaContable = IdCtaContMonedaExtranjera
|
||||
CveCuenta = CveCuentaMonedaExtranjera
|
||||
End If
|
||||
|
||||
Case 8 'Ret IVA x Trasladar
|
||||
@@ -351,19 +347,9 @@ Partial Class Bancos_DepositoTerminal
|
||||
IdCtaContable = ObjContabilidad.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
'Conta SIG
|
||||
If CveCuentaRetIVA <> 0 Then
|
||||
CveCuenta = CveCuentaRetIVA
|
||||
Else
|
||||
If ObjContabilidad.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ObjContabilidad.DtResultados.Rows.Count > 0 Then
|
||||
CveCuenta = ObjContabilidad.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Case 9 'Ret ISR x Trasladar
|
||||
|
||||
ImporteMovimiento = gvr.DataKey("RetISR").ToDecimal * PorcentajePago
|
||||
@@ -379,25 +365,13 @@ Partial Class Bancos_DepositoTerminal
|
||||
IdCtaContable = ObjContabilidad.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
'Conta SIG
|
||||
If CveCuentaRetISR <> 0 Then
|
||||
CveCuenta = CveCuentaRetISR
|
||||
Else
|
||||
If ObjContabilidad.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ObjContabilidad.DtResultados.Rows.Count > 0 Then
|
||||
CveCuenta = ObjContabilidad.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Case 13 'Iva por Trasladar
|
||||
|
||||
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal * PorcentajePago
|
||||
importeMX = Math.Round(ImporteMovimiento * tipoCambioVenta, 2)
|
||||
IdCtaContable = UsuarioActual.Empresa.IdCuentaIVAxTrasladar
|
||||
CveCuenta = UsuarioActual.Empresa.CveCuentaIVAxTrasladar
|
||||
If tipoCambioVenta > 1 Then ConceptoMovimiento += $" TC:{tipoCambioVenta} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||
|
||||
Case 62 'Ret IVA Trasladado
|
||||
@@ -415,19 +389,9 @@ Partial Class Bancos_DepositoTerminal
|
||||
IdCtaContable = ObjContabilidad.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
'Conta SIG
|
||||
If CveCuentaRetIVA <> 0 Then
|
||||
CveCuenta = CveCuentaRetIVA
|
||||
Else
|
||||
If ObjContabilidad.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ObjContabilidad.DtResultados.Rows.Count > 0 Then
|
||||
CveCuenta = ObjContabilidad.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Case 63 'Ret ISR Trasladado
|
||||
|
||||
ImporteMovimiento = gvr.DataKey("RetISR").ToDecimal * PorcentajePago
|
||||
@@ -443,25 +407,13 @@ Partial Class Bancos_DepositoTerminal
|
||||
IdCtaContable = ObjContabilidad.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
'Conta SIG
|
||||
If CveCuentaRetISR <> 0 Then
|
||||
CveCuenta = CveCuentaRetISR
|
||||
Else
|
||||
If ObjContabilidad.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ObjContabilidad.DtResultados.Rows.Count > 0 Then
|
||||
CveCuenta = ObjContabilidad.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Case 61 'Iva Trasladado
|
||||
|
||||
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal * PorcentajePago
|
||||
importeMX = Math.Round(ImporteMovimiento * tipoCambioManual, 2)
|
||||
IdCtaContable = UsuarioActual.Empresa.IdCuentaIVATrasladado
|
||||
CveCuenta = UsuarioActual.Empresa.CveCuentaIVATrasladado
|
||||
If tipoCambioManual > 1 Then ConceptoMovimiento += $" TC:{tipoCambioManual} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||
|
||||
Case 38 'IEPS por trasladar
|
||||
@@ -470,14 +422,12 @@ Partial Class Bancos_DepositoTerminal
|
||||
importeMX = Math.Round(ImporteMovimiento * tipoCambioVenta, 2)
|
||||
|
||||
IdCtaContable = UsuarioActual.Empresa.IdCuentaIEPSxTrasladar
|
||||
CveCuenta = UsuarioActual.Empresa.CveCuentaIEPSxTrasladar
|
||||
|
||||
Case 39 'IEPS Trasladado
|
||||
ImporteMovimiento = gvr.DataKey("IEPS").ToDecimal * PorcentajePago
|
||||
importeMX = Math.Round(ImporteMovimiento * tipoCambioManual, 2)
|
||||
|
||||
IdCtaContable = UsuarioActual.Empresa.IdCuentaIEPSTrasladado
|
||||
CveCuenta = UsuarioActual.Empresa.CveCuentaIEPSTrasladado
|
||||
|
||||
Case 78 'Otros Ingresos
|
||||
If ChkAjusteOI.Checked Then
|
||||
@@ -500,15 +450,9 @@ Partial Class Bancos_DepositoTerminal
|
||||
If (IdCtaContable < 1 Or IdCuentaBancaria < 1) Then
|
||||
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
|
||||
idCuentaContabilizacion = 0
|
||||
End If
|
||||
|
||||
'Conta SIG
|
||||
If (CveCuenta < 1 Or CveCuentaBancaria < 1) Then
|
||||
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
|
||||
CveCuentaContabilizacion = 0
|
||||
End If
|
||||
|
||||
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, TipoMovimiento, ImporteMovimiento, Referencia, ConceptoContable, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyecto, gvr.DataKey("CveCliente").ToEntero, ImporteMX:=importeMX, CveCuenta:=CveCuenta) Then
|
||||
End If
|
||||
|
||||
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, TipoMovimiento, ImporteMovimiento, Referencia, ConceptoContable, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyecto, gvr.DataKey("CveCliente").ToEntero, ImporteMX:=importeMX) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
End If
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user