se quitó referencias a cvecuentas

This commit is contained in:
2021-06-23 10:46:02 -07:00
parent 34c0c72c47
commit 310a18945c

View File

@@ -766,8 +766,7 @@ Partial Class Ventas_PortalCliente
Dim TipoMovimiento = False
Dim ImporteMovimiento = 0.0D
Dim importeMX = 0.0D
Dim IdCtaContable = 0
Dim CveCuenta = 0
Dim IdCtaContable = 0
Dim ConceptoMovimiento = ""
Dim Referencia = ""
Dim CveSubProyecto = -1
@@ -810,7 +809,6 @@ Partial Class Ventas_PortalCliente
ImporteMovimiento = 0
importeMX = 0
IdCtaContable = 0
CveCuenta = 0
PorcentajeImpuesto = 0
ConceptoMovimiento = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, ConceptoContable, LtlCliente.Text, DrPago("Factura").ToString, DrPago("Factura").ToString)
'VALORES DE LA VENTA
@@ -843,14 +841,12 @@ Partial Class Ventas_PortalCliente
If CveMonedaVenta = 1 Then
IdCtaContable = IdCuentaCliente
CveCuenta = CveCuentacliente
Else
IdCtaContable = IdCtaContMonedaExtranjera
CveCuenta = CveCuentaComplementaria
ConceptoMovimiento += $" TC:{TCPago} ${ImporteMovimiento.FormatoNumero(2)}"
If ImporteMovimiento <> 0 AndAlso IdCtaContable > 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Referencia, 207, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, -1, CveVenta, -1, CveSubProyecto, CveCliente, ImporteMX:=(importeMX - ImporteMovimiento).RoundSQL(), ImporteME:=ImporteMovimiento, CveCuenta:=CveCuenta, TipoCambio:=TCVenta) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Referencia, 207, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, -1, CveVenta, -1, CveSubProyecto, CveCliente, ImporteMX:=(importeMX - ImporteMovimiento).RoundSQL(), ImporteME:=ImporteMovimiento, TipoCambio:=TCVenta) Then
TieneError = True
MensajeError.Append("No se pudo insertar el detalle de pago de la póliza<br>")
Exit For
@@ -858,7 +854,6 @@ Partial Class Ventas_PortalCliente
End If
IdCtaContable = IdCtaContMonedaExtranjera
CveCuenta = CveCuentaMonedaExtranjera
End If
Case 134 'PAGO INTERMEDIARIO
@@ -882,7 +877,6 @@ Partial Class Ventas_PortalCliente
TCGeneral = TCVenta
IdCtaContable = UsuarioActual.Empresa.IdCuentaIVAxTrasladar
CveCuenta = UsuarioActual.Empresa.CveCuentaIVAxTrasladar
If TCVenta > 1 Then ConceptoMovimiento += $" TC:{TCVenta} ${ImporteMovimiento.FormatoNumero(2)}"
Case 61 'IVA TRASLADADO
@@ -900,7 +894,6 @@ Partial Class Ventas_PortalCliente
TCGeneral = TCFluctuacion
IdCtaContable = UsuarioActual.Empresa.IdCuentaIVATrasladado
CveCuenta = UsuarioActual.Empresa.CveCuentaIVATrasladado
If TCFluctuacion > 1 Then ConceptoMovimiento += $" TC:{TCFluctuacion} ${ImporteMovimiento.FormatoNumero(2)}"
Case 8 'RETIVA X TRASLADAR
@@ -926,16 +919,8 @@ Partial Class Ventas_PortalCliente
If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.FiltroPrimeroValor("IdCuentaRetIVACirculacion").ToEntero
End If
End If
'Conta SIG
If CveCuentaRetIVA <> 0 Then
CveCuenta = CveCuentaRetIVA
Else
If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
CveCuenta = ObjConta.DtResultados.FiltroPrimeroValor("IdCuentaRetIVACirculacionSIG").ToEntero
End If
End If
End If
Case 62 'RETIVA TRASLADADO
If CveMonedaVenta = 1 Then
ImporteMovimiento = RetIVAVenta * PorcentajePago
@@ -959,17 +944,9 @@ Partial Class Ventas_PortalCliente
If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.FiltroPrimeroValor("IdCuentaRetIVACirculacion").ToEntero
End If
End If
'Conta SIG
If CveCuentaRetIVA <> 0 Then
CveCuenta = CveCuentaRetIVA
Else
If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
CveCuenta = ObjConta.DtResultados.FiltroPrimeroValor("IdCuentaRetIVACirculacionSIG").ToEntero
End If
End If
End If
Case 9 'RETISR X TRASLADAR
If CveMonedaVenta = 1 Then
ImporteMovimiento = RetISRVenta * PorcentajePago
@@ -993,17 +970,9 @@ Partial Class Ventas_PortalCliente
If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.FiltroPrimeroValor("IdCuentaRetISRCirculacion").ToEntero
End If
End If
'Conta SIG
If CveCuentaRetISR <> 0 Then
CveCuenta = CveCuentaRetISR
Else
If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
CveCuenta = ObjConta.DtResultados.FiltroPrimeroValor("IdCuentaRetISRCirculacionSIG").ToEntero
End If
End If
End If
Case 63 'RETISR TRASLADADO
If CveMonedaVenta = 1 Then
ImporteMovimiento = RetIVAVenta * PorcentajePago
@@ -1027,17 +996,8 @@ Partial Class Ventas_PortalCliente
If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.FiltroPrimeroValor("IdCuentaRetISRCirculacion").ToEntero
End If
End If
'Conta SIG
If CveCuentaRetISR <> 0 Then
CveCuenta = CveCuentaRetISR
Else
If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
CveCuenta = ObjConta.DtResultados.FiltroPrimeroValor("IdCuentaRetISRCirculacionSIG").ToEntero
End If
End If
End If
Case 38 'IEPS X TRASLADAR
If CveMonedaVenta = 1 Then
ImporteMovimiento = IEPSVenta * PorcentajePago
@@ -1053,7 +1013,6 @@ Partial Class Ventas_PortalCliente
TCGeneral = TCVenta
IdCtaContable = UsuarioActual.Empresa.IdCuentaIEPSxTrasladar
CveCuenta = UsuarioActual.Empresa.CveCuentaIEPSxTrasladar
If TCVenta > 1 Then ConceptoMovimiento += $" TC:{TCVenta} ${ImporteMovimiento.FormatoNumero(2)}"
Case 39 'IEPS TRASLADADO
@@ -1071,14 +1030,12 @@ Partial Class Ventas_PortalCliente
TCGeneral = TCFluctuacion
IdCtaContable = UsuarioActual.Empresa.IdCuentaIEPSTrasladado
CveCuenta = UsuarioActual.Empresa.CveCuentaIEPSTrasladado
If TCFluctuacion > 1 Then ConceptoMovimiento += $" TC:{TCFluctuacion} ${ImporteMovimiento.FormatoNumero(2)}"
Case 64 'GANANCIA
Continue For 'SKIPEA
If CveMonedaVenta <> 1 Then
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
If TCPago > TCVenta AndAlso CveMonedaVenta = 2 Then
ImporteMovimiento = (ImportePago * TCPago) - (ImportePago * TCVenta)
ImporteMovimiento -= ((IVAVenta * PorcentajePago) * TCFluctuacion) - ((IVAVenta * PorcentajePago) * TCVenta)
@@ -1094,7 +1051,6 @@ Partial Class Ventas_PortalCliente
Continue For 'SKIPEA
If CveMonedaVenta <> 1 Then
IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
If TCPago < TCVenta AndAlso CveMonedaVenta = 2 Then
ImporteMovimiento = (ImportePago * TCPago) - (ImportePago * TCVenta)
ImporteMovimiento -= ((IVAVenta * PorcentajePago) * TCFluctuacion) - ((IVAVenta * PorcentajePago) * TCVenta)
@@ -1110,7 +1066,7 @@ Partial Class Ventas_PortalCliente
'AGREGA PREPOLIZA DETALLE
If ImporteMovimiento <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, Referencia, ConceptoContable, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, -1, CveVenta, -1, CveSubProyecto, CveCliente, CveProveedorContabilizar, ImporteMX:=importeMX, CveCuenta:=CveCuenta, TipoCambio:=TCGeneral, PorcentajeImpuesto:=PorcentajeImpuesto) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, Referencia, ConceptoContable, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, -1, CveVenta, -1, CveSubProyecto, CveCliente, CveProveedorContabilizar, ImporteMX:=importeMX, TipoCambio:=TCGeneral, PorcentajeImpuesto:=PorcentajeImpuesto) Then
TieneError = True
MensajeError.Append("No se pudo insertar el detalle de la póliza<br>")
Exit For
@@ -1954,7 +1910,7 @@ Partial Class Ventas_PortalCliente
End Select
If importeMovimiento <> 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, If(ConceptoContable = 30, ObjFactura.Cliente.IdCtaContClientes, ObjFactura.Cliente.IdCtaContAnticipos), -1, CveIE:=CveIE, CveCompra:=-1, CveProveedor:=-1, CvePersonal:=-1, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=importeMovimiento, ImporteME:=tImporteMonedaExtranjera, TipoCambio:=TxtTipoCambio.Text.ToDecimal, CveCuenta:=If(ConceptoContable = 30, ObjFactura.Cliente.CveCuentaClientes, ObjFactura.Cliente.CveCuentaAnticipos)) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, If(ConceptoContable = 30, ObjFactura.Cliente.IdCtaContClientes, ObjFactura.Cliente.IdCtaContAnticipos), -1, CveIE:=CveIE, CveCompra:=-1, CveProveedor:=-1, CvePersonal:=-1, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=importeMovimiento, ImporteME:=tImporteMonedaExtranjera, TipoCambio:=TxtTipoCambio.Text.ToDecimal) Then
MsgError = "Ocurrió un error al registrar el asiento del ingreso."
End If
End If