se quitó referencia a variable cvecuenta
This commit is contained in:
@@ -308,7 +308,6 @@ Partial Class Bancos_DepositoTerminal
|
|||||||
Dim importeMX As Decimal
|
Dim importeMX As Decimal
|
||||||
Dim FechaMovimiento As Date = TxtFecha.Text.ToDate
|
Dim FechaMovimiento As Date = TxtFecha.Text.ToDate
|
||||||
Dim IdCtaContable As Integer = 0
|
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 ConceptoMovimiento As String = ObjContabilidad.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, ConceptoContable, NombreComercial, gvr.DataKey("SerieFolio").ToString, TxtFolio.ToString)
|
||||||
Dim Referencia As String = gvr.DataKey("SerieFolio").ToString
|
Dim Referencia As String = gvr.DataKey("SerieFolio").ToString
|
||||||
Dim CveSubProyecto As Integer = gvr.DataKey("CveSubProyecto").ToEntero
|
Dim CveSubProyecto As Integer = gvr.DataKey("CveSubProyecto").ToEntero
|
||||||
@@ -320,20 +319,17 @@ Partial Class Bancos_DepositoTerminal
|
|||||||
|
|
||||||
If tipoCambioVenta = 1 Then
|
If tipoCambioVenta = 1 Then
|
||||||
IdCtaContable = IdCuentaCliente
|
IdCtaContable = IdCuentaCliente
|
||||||
CveCuenta = CveCuentaCliente
|
|
||||||
Else
|
Else
|
||||||
ConceptoMovimiento += $" TC:{tipoCambioVenta} ${ImporteMovimiento.FormatoNumero(2)}"
|
ConceptoMovimiento += $" TC:{tipoCambioVenta} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||||
IdCtaContable = IdCtaContComplementaria
|
IdCtaContable = IdCtaContComplementaria
|
||||||
CveCuenta = CveCuentaComplementaria
|
|
||||||
If ImporteMovimiento <> 0 AndAlso IdCtaContable > 0 Then
|
If ImporteMovimiento <> 0 AndAlso IdCtaContable > 0 Then
|
||||||
importeMX = ImporteMovimiento
|
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"
|
MsgError = "No se pudo insertar la póliza"
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
IdCtaContable = IdCtaContMonedaExtranjera
|
IdCtaContable = IdCtaContMonedaExtranjera
|
||||||
CveCuenta = CveCuentaMonedaExtranjera
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Case 8 'Ret IVA x Trasladar
|
Case 8 'Ret IVA x Trasladar
|
||||||
@@ -353,16 +349,6 @@ Partial Class Bancos_DepositoTerminal
|
|||||||
End If
|
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
|
|
||||||
|
|
||||||
Case 9 'Ret ISR x Trasladar
|
Case 9 'Ret ISR x Trasladar
|
||||||
|
|
||||||
@@ -381,23 +367,11 @@ Partial Class Bancos_DepositoTerminal
|
|||||||
End If
|
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
|
|
||||||
|
|
||||||
Case 13 'Iva por Trasladar
|
Case 13 'Iva por Trasladar
|
||||||
|
|
||||||
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal * PorcentajePago
|
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal * PorcentajePago
|
||||||
importeMX = Math.Round(ImporteMovimiento * tipoCambioVenta, 2)
|
importeMX = Math.Round(ImporteMovimiento * tipoCambioVenta, 2)
|
||||||
IdCtaContable = UsuarioActual.Empresa.IdCuentaIVAxTrasladar
|
IdCtaContable = UsuarioActual.Empresa.IdCuentaIVAxTrasladar
|
||||||
CveCuenta = UsuarioActual.Empresa.CveCuentaIVAxTrasladar
|
|
||||||
If tipoCambioVenta > 1 Then ConceptoMovimiento += $" TC:{tipoCambioVenta} ${ImporteMovimiento.FormatoNumero(2)}"
|
If tipoCambioVenta > 1 Then ConceptoMovimiento += $" TC:{tipoCambioVenta} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||||
|
|
||||||
Case 62 'Ret IVA Trasladado
|
Case 62 'Ret IVA Trasladado
|
||||||
@@ -417,16 +391,6 @@ Partial Class Bancos_DepositoTerminal
|
|||||||
End If
|
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
|
|
||||||
|
|
||||||
Case 63 'Ret ISR Trasladado
|
Case 63 'Ret ISR Trasladado
|
||||||
|
|
||||||
@@ -445,23 +409,11 @@ Partial Class Bancos_DepositoTerminal
|
|||||||
End If
|
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
|
|
||||||
|
|
||||||
Case 61 'Iva Trasladado
|
Case 61 'Iva Trasladado
|
||||||
|
|
||||||
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal * PorcentajePago
|
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal * PorcentajePago
|
||||||
importeMX = Math.Round(ImporteMovimiento * tipoCambioManual, 2)
|
importeMX = Math.Round(ImporteMovimiento * tipoCambioManual, 2)
|
||||||
IdCtaContable = UsuarioActual.Empresa.IdCuentaIVATrasladado
|
IdCtaContable = UsuarioActual.Empresa.IdCuentaIVATrasladado
|
||||||
CveCuenta = UsuarioActual.Empresa.CveCuentaIVATrasladado
|
|
||||||
If tipoCambioManual > 1 Then ConceptoMovimiento += $" TC:{tipoCambioManual} ${ImporteMovimiento.FormatoNumero(2)}"
|
If tipoCambioManual > 1 Then ConceptoMovimiento += $" TC:{tipoCambioManual} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||||
|
|
||||||
Case 38 'IEPS por trasladar
|
Case 38 'IEPS por trasladar
|
||||||
@@ -470,14 +422,12 @@ Partial Class Bancos_DepositoTerminal
|
|||||||
importeMX = Math.Round(ImporteMovimiento * tipoCambioVenta, 2)
|
importeMX = Math.Round(ImporteMovimiento * tipoCambioVenta, 2)
|
||||||
|
|
||||||
IdCtaContable = UsuarioActual.Empresa.IdCuentaIEPSxTrasladar
|
IdCtaContable = UsuarioActual.Empresa.IdCuentaIEPSxTrasladar
|
||||||
CveCuenta = UsuarioActual.Empresa.CveCuentaIEPSxTrasladar
|
|
||||||
|
|
||||||
Case 39 'IEPS Trasladado
|
Case 39 'IEPS Trasladado
|
||||||
ImporteMovimiento = gvr.DataKey("IEPS").ToDecimal * PorcentajePago
|
ImporteMovimiento = gvr.DataKey("IEPS").ToDecimal * PorcentajePago
|
||||||
importeMX = Math.Round(ImporteMovimiento * tipoCambioManual, 2)
|
importeMX = Math.Round(ImporteMovimiento * tipoCambioManual, 2)
|
||||||
|
|
||||||
IdCtaContable = UsuarioActual.Empresa.IdCuentaIEPSTrasladado
|
IdCtaContable = UsuarioActual.Empresa.IdCuentaIEPSTrasladado
|
||||||
CveCuenta = UsuarioActual.Empresa.CveCuentaIEPSTrasladado
|
|
||||||
|
|
||||||
Case 78 'Otros Ingresos
|
Case 78 'Otros Ingresos
|
||||||
If ChkAjusteOI.Checked Then
|
If ChkAjusteOI.Checked Then
|
||||||
@@ -502,13 +452,7 @@ Partial Class Bancos_DepositoTerminal
|
|||||||
idCuentaContabilizacion = 0
|
idCuentaContabilizacion = 0
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Conta SIG
|
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
|
||||||
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
|
|
||||||
MsgError = "No se pudo insertar la póliza"
|
MsgError = "No se pudo insertar la póliza"
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|||||||
Reference in New Issue
Block a user