-- se quitaron propiedades de empresa

idcuenta, perdida,ganancia,ieps,iva
-- se quitó globaldtclasificación porcentaje
This commit is contained in:
2023-04-19 06:11:06 -07:00
parent 3732dde1b1
commit 860b14e7dc
29 changed files with 325 additions and 466 deletions

View File

@@ -345,7 +345,6 @@ Partial Class Bancos_DepositoTerminal
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal * PorcentajePago
importeMX = Math.Round(ImporteMovimiento * tipoCambioVenta, 2)
IdCtaContable = UsuarioActual.Empresa.IdCuentaIVAxTrasladar
If tipoCambioVenta > 1 Then ConceptoMovimiento += $" TC:{tipoCambioVenta} ${ImporteMovimiento.FormatoNumero(2)}"
Case 62 'Ret IVA Trasladado
@@ -387,7 +386,6 @@ Partial Class Bancos_DepositoTerminal
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal * PorcentajePago
importeMX = Math.Round(ImporteMovimiento * tipoCambioManual, 2)
IdCtaContable = UsuarioActual.Empresa.IdCuentaIVATrasladado
If tipoCambioManual > 1 Then ConceptoMovimiento += $" TC:{tipoCambioManual} ${ImporteMovimiento.FormatoNumero(2)}"
Case 38 'IEPS por trasladar
@@ -395,14 +393,10 @@ Partial Class Bancos_DepositoTerminal
ImporteMovimiento = gvr.DataKey("IEPS").ToDecimal * PorcentajePago
importeMX = Math.Round(ImporteMovimiento * tipoCambioVenta, 2)
IdCtaContable = UsuarioActual.Empresa.IdCuentaIEPSxTrasladar
Case 39 'IEPS Trasladado
ImporteMovimiento = gvr.DataKey("IEPS").ToDecimal * PorcentajePago
importeMX = Math.Round(ImporteMovimiento * tipoCambioManual, 2)
IdCtaContable = UsuarioActual.Empresa.IdCuentaIEPSTrasladado
Case 78 'Otros Ingresos
If ChkAjusteOI.Checked Then
ImporteMovimiento = gvr.FCTextBox("TxtComision").Text.ToDecimal

View File

@@ -540,12 +540,12 @@ public partial class Bancos_Devoluciones : ClsPaginas
}
//IVA
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, -gvr.FCTextBox("TxtIVA").Text.ToDecimal(), Ref, 13, Conc, DateTime.Now, UsuarioActual.Empresa.IdCuentaIVAxTrasladar, -1, CveIE, CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero(), CveCliente: DdlCliente.SelectedValue.ToEntero(), ImporteMX: -gvr.FCTextBox("TxtIVA").Text.ToDecimal()))
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, -gvr.FCTextBox("TxtIVA").Text.ToDecimal(), Ref, 13, Conc, DateTime.Now, 0, -1, CveIE, CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero(), CveCliente: DdlCliente.SelectedValue.ToEntero(), ImporteMX: -gvr.FCTextBox("TxtIVA").Text.ToDecimal()))
{
MsgError = "No se pudo insertar concepto de IVA";
}
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, -gvr.FCTextBox("TxtIVA").Text.ToDecimal(), Ref, 61, Conc, DateTime.Now, UsuarioActual.Empresa.IdCuentaIVAxTrasladar, -1, CveIE, CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero(), CveCliente: DdlCliente.SelectedValue.ToEntero(), ImporteMX: -gvr.FCTextBox("TxtIVA").Text.ToDecimal()))
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, -gvr.FCTextBox("TxtIVA").Text.ToDecimal(), Ref, 61, Conc, DateTime.Now,0, -1, CveIE, CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero(), CveCliente: DdlCliente.SelectedValue.ToEntero(), ImporteMX: -gvr.FCTextBox("TxtIVA").Text.ToDecimal()))
{
MsgError = "No se pudo insertar concepto de IVA";
}

View File

@@ -294,8 +294,9 @@ Partial Class Bancos_FluctuacionCambiaria
HdnAcreedorAntCvePrePoliza.Value = ObjBancos.DtResultados.MAX("CvePrePoliza").ToString
BtnAcreedoresAntRemove.Visible = HdnAcreedorAntCvePrePoliza.Value.ToEntero > 0
BtnGeneraAcreedoresAnt.Visible = Not HdnAcreedorAntCvePrePoliza.Value.ToEntero > 0
HdnCveFluctuacionBitacora.Value = ObjBancos.DtResultados.MAX("CveFluctuacionBitacora").ToString
HplAcreedorAntLiga.Visible = HdnAcreedorCvePrePoliza.Value.ToEntero > 0
HplAcreedorAntLiga.Visible = HdnAcreedorAntCvePrePoliza.Value.ToEntero > 0
HplAcreedorAntLiga.NavigateUrl = String.Format("/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}", ObjBancos.DtResultados.MAX("CvePrePoliza").ToString)
GvAcreedoresAnt.DataSource = ObjBancos.DtResultados
LblTotalAcreedoresAnt.Text = ObjBancos.DtResultados.SUM("Fluctuacion").FormatoNumero
@@ -427,9 +428,7 @@ Partial Class Bancos_FluctuacionCambiaria
Dim ErrorRegistrar As Boolean = False
CveCuentaPerdida = 0 '55379
CveCuentaGanancia = 0 ' 55382
idCtaPerdida = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria '1227
IdCtaGanancia = UsuarioActual.Empresa.IdCuentaGananciaCambiaria '1230
CveCuentaGanancia = 0 ' 55382
Dim TC As Decimal = 2 ' se pone 2, para que cumpla con el check constrains de complementarias
Total = LblTotal.ToDecimal
@@ -507,9 +506,7 @@ Partial Class Bancos_FluctuacionCambiaria
Dim ErrorRegistrar As Boolean = False
CveCuentaPerdida = 0 '55379
CveCuentaGanancia = 0 ' 55382
idCtaPerdida = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria '1227
IdCtaGanancia = UsuarioActual.Empresa.IdCuentaGananciaCambiaria '1230
CveCuentaGanancia = 0 ' 55382
Dim TC As Decimal = 2 ' se pone 2, para que cumpla con el check constrains de complementarias
Total = LblTotal.ToDecimal
@@ -591,9 +588,7 @@ Partial Class Bancos_FluctuacionCambiaria
Dim ErrorRegistrar As Boolean = False
CveCuentaPerdida = 0 '55379
CveCuentaGanancia = 0 ' 55382
idCtaPerdida = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria '1227
IdCtaGanancia = UsuarioActual.Empresa.IdCuentaGananciaCambiaria '1230
CveCuentaGanancia = 0 ' 55382
Dim TC As Decimal = 2 ' se pone 2, para que cumpla con el check constrains de complementarias
Dim TCUltimaFluctuacion As Decimal = GlobalTipoCambio(FechaUltimoDiaMes).ToDecimal()
@@ -688,9 +683,7 @@ Partial Class Bancos_FluctuacionCambiaria
Dim ErrorRegistrar As Boolean = False
CveCuentaPerdida = 0 '55379
CveCuentaGanancia = 0 ' 55382
idCtaPerdida = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria '1227
IdCtaGanancia = UsuarioActual.Empresa.IdCuentaGananciaCambiaria '1230
CveCuentaGanancia = 0 ' 55382
Dim TC As Decimal = 2 ' se pone 2, para que cumpla con el check constrains de complementarias
Dim TCUltimaFluctuacion As Decimal = GlobalTipoCambio(FechaUltimoDiaMes).ToDecimal()
@@ -794,9 +787,7 @@ Partial Class Bancos_FluctuacionCambiaria
Dim ErrorRegistrar As Boolean = False
CveCuentaPerdida = 0 '55379
CveCuentaGanancia = 0 ' 55382
idCtaPerdida = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria '1227
IdCtaGanancia = UsuarioActual.Empresa.IdCuentaGananciaCambiaria '1230
CveCuentaGanancia = 0 ' 55382
Dim TC As Decimal = 2 ' se pone 2, para que cumpla con el check constrains de complementarias
Total = LblTotalAcreedores.Text.ToDecimal
@@ -883,9 +874,7 @@ Partial Class Bancos_FluctuacionCambiaria
Dim ErrorRegistrar As Boolean = False
CveCuentaPerdida = 0 '55379
CveCuentaGanancia = 0 ' 55382
idCtaPerdida = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria '1227
IdCtaGanancia = UsuarioActual.Empresa.IdCuentaGananciaCambiaria '1230
CveCuentaGanancia = 0 ' 55382
Dim TC As Decimal = 2 ' se pone 2, para que cumpla con el check constrains de complementarias
Total = LblTotalAcreedoresAnt.Text.ToDecimal
@@ -966,9 +955,7 @@ Partial Class Bancos_FluctuacionCambiaria
Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaB", 1, 0, 0, 1, FechaUltimoDiaMes, TxtConceptoBancos.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
CveCuentaPerdida = 0 ' 55379
CveCuentaGanancia = 0 ' 55382
idCtaPerdida = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria '1227
IdCtaGanancia = UsuarioActual.Empresa.IdCuentaGananciaCambiaria '1230
CveCuentaGanancia = 0 ' 55382
Dim TC As Decimal = 2 ' se pone 2, para que cumpla con el check constrains de complementarias
Total = LblTotalBancos.Text.ToDecimal
@@ -1052,9 +1039,7 @@ Partial Class Bancos_FluctuacionCambiaria
Dim ErrorRegistrar As Boolean = False
CveCuentaPerdida = 0 '55379
CveCuentaGanancia = 0 ' 55382
idCtaPerdida = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria '1227
IdCtaGanancia = UsuarioActual.Empresa.IdCuentaGananciaCambiaria '1230
CveCuentaGanancia = 0 ' 55382
Dim TC As Decimal = 2 ' se pone 2, para que cumpla con el check constrains de complementarias
Dim TCCierreFluctuacion As Decimal = LtTipoCambioActual.Text.ToDecimal
@@ -1130,9 +1115,7 @@ Partial Class Bancos_FluctuacionCambiaria
Dim ErrorRegistrar As Boolean = False
CveCuentaPerdida = 0 '55379
CveCuentaGanancia = 0 ' 55382
idCtaPerdida = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria '1227
IdCtaGanancia = UsuarioActual.Empresa.IdCuentaGananciaCambiaria '1230
CveCuentaGanancia = 0 ' 55382
Dim TC As Decimal = 2 ' se pone 2, para que cumpla con el check constrains de complementarias
Dim TCCierreFluctuacion As Decimal = LtTipoCambioActual.Text.ToDecimal

View File

@@ -2818,7 +2818,7 @@ Partial Class Bancos_IE
If TxtIvaIxC.Text.ToDouble > 0 Then
Dim PorcentajeIVA = (TxtIvaIxC.Text.ToDecimal() / (TxtImporte.Text.ToDecimal() - TxtIvaIxC.Text.ToDecimal())).RoundSQL(2)
'Iva
ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -TxtIvaIxC.Text.ToDecimal, Ref, 61, Conc, Now, UsuarioActual.Empresa.IdCuentaIVAxTrasladar, -1, CveIE, CveIEDevolucion:=DdlIEDevolucion.SelectedValue.ToEntero, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=-TxtIvaIxC.Text.ToDecimal, ImporteME:=tImporteMonedaExtranjera, PorcentajeImpuesto:=If(PorcentajeIVA.ToString().Contiene("0.08", "0.16"), PorcentajeIVA, 0))
ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -TxtIvaIxC.Text.ToDecimal, Ref, 61, Conc, Now, 0, -1, CveIE, CveIEDevolucion:=DdlIEDevolucion.SelectedValue.ToEntero, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=-TxtIvaIxC.Text.ToDecimal, ImporteME:=tImporteMonedaExtranjera, PorcentajeImpuesto:=If(PorcentajeIVA.ToString().Contiene("0.08", "0.16"), PorcentajeIVA, 0))
End If
'Bancos
@@ -2935,7 +2935,7 @@ Partial Class Bancos_IE
Dim CveConIVA As Integer = 61
If UsuarioActual.CveEmpresa = 70 Then CveConIVA = 299
Dim PorcentajeIVA = (TxtIvaIxC.Text.ToDecimal() / (TxtImporte.Text.ToDecimal() - TxtIvaIxC.Text.ToDecimal())).RoundSQL(2)
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, TxtIvaIxC.Text.ToDecimal, Concepto, CveConIVA, Concepto, FechaMovimiento, UsuarioActual.Empresa.IdCuentaIVAxTrasladar, -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=TxtIvaIxC.Text.ToDecimal, ImporteME:=tImporteMonedaExtranjera, PorcentajeImpuesto:=PorcentajeIVA) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, TxtIvaIxC.Text.ToDecimal, Concepto, CveConIVA, Concepto, FechaMovimiento, 0, -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=TxtIvaIxC.Text.ToDecimal, ImporteME:=tImporteMonedaExtranjera, PorcentajeImpuesto:=PorcentajeIVA) Then
MsgError = "Ocurrió un error al registrar el asiento del ingreso."
End If
End If
@@ -3244,14 +3244,14 @@ Partial Class Bancos_IE
If DiferenciaTC < 0 Then
'64
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, DiferenciaImportes, ReferenciaAplicar, 64, ConceptoAplicar, Now, UsuarioActual.Empresa.IdCuentaGananciaCambiaria, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=DiferenciaImportes, ImporteME:=0, TipoCambio:=TCCompra) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, DiferenciaImportes, ReferenciaAplicar, 64, ConceptoAplicar, Now, 0, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=DiferenciaImportes, ImporteME:=0, TipoCambio:=TCCompra) Then
MsgError = "Ocurrió un error al registrar el asiento de ganancia cambiaria"
Exit Select
End If
Else
'65
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, DiferenciaImportes, ReferenciaAplicar, 65, ConceptoAplicar, Now, UsuarioActual.Empresa.IdCuentaPerdidaCambiaria, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=DiferenciaImportes, ImporteME:=0, TipoCambio:=TCCompra) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, DiferenciaImportes, ReferenciaAplicar, 65, ConceptoAplicar, Now, 0, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=DiferenciaImportes, ImporteME:=0, TipoCambio:=TCCompra) Then
MsgError = "Ocurrió un error al registrar el asiento de perdidada cfambiaria"
Exit Select
End If
@@ -3282,9 +3282,9 @@ Partial Class Bancos_IE
Dim IEPSDev As Decimal = dr("IEPS").ToString.ToDecimal
PorcentajeCompraDevDinC = ObjCompras.DtResultados.Rows(0)("PorcentajeIVA").ToString.ToDecimal
Dim DTCuentas As DataTable = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeCompraDevDinC)
Dim IdCtaIVAXAcreditarDevDinC = DTCuentas.Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero
Dim IdCtaIVAAcreditableDevDinC = DTCuentas.Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero
'Dim DTCuentas As DataTable = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeCompraDevDinC)
'Dim IdCtaIVAXAcreditarDevDinC = DTCuentas.Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero
'Dim IdCtaIVAAcreditableDevDinC = DTCuentas.Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero
Dim IVADevMN As Decimal = 0
Dim IEPSDevMN As Decimal = 0
Dim PorcentajeDevolucion As Decimal = ((ImporteAplicar * 100D / TotalCompraDev) / 100).RoundSQL(2)
@@ -3305,11 +3305,11 @@ Partial Class Bancos_IE
If IVADev > 0 Then
IdCtaIVADevolucionIMPUESTOS = IdCtaIVAXAcreditarDevDinC
' IdCtaIVADevolucionIMPUESTOS = IdCtaIVAXAcreditarDevDinC
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -IVADev, ReferenciaAplicar, 14, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IVADevMN, ImporteME:=-IVADev, PorcentajeImpuesto:=PorcentajeCompraDevDinC) Then
IdCtaIVADevolucionIMPUESTOS = IdCtaIVAAcreditableDevDinC
' IdCtaIVADevolucionIMPUESTOS = IdCtaIVAAcreditableDevDinC
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, -IVADev, ReferenciaAplicar, 19, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IVADevMN, ImporteME:=-IVADev, PorcentajeImpuesto:=PorcentajeCompraDevDinC) Then
MsgError = "Ocurrió un error al registrar el asiento de impuestos de devolución"
@@ -3453,14 +3453,14 @@ Partial Class Bancos_IE
If DiferenciaTC < 0 Then
'64
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, DiferenciaImportes, ReferenciaAplicar, 64, ConceptoAplicar, Now, UsuarioActual.Empresa.IdCuentaGananciaCambiaria, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=DiferenciaImportes, ImporteME:=0, TipoCambio:=TCCompra) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, DiferenciaImportes, ReferenciaAplicar, 64, ConceptoAplicar, Now, 0, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=DiferenciaImportes, ImporteME:=0, TipoCambio:=TCCompra) Then
MsgError = "Ocurrió un error al registrar el asiento de ganancia cambiaria"
Exit Select
End If
Else
'65
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, DiferenciaImportes, ReferenciaAplicar, 65, ConceptoAplicar, Now, UsuarioActual.Empresa.IdCuentaPerdidaCambiaria, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=DiferenciaImportes, ImporteME:=0, TipoCambio:=TCCompra) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, DiferenciaImportes, ReferenciaAplicar, 65, ConceptoAplicar, Now, 0, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=DiferenciaImportes, ImporteME:=0, TipoCambio:=TCCompra) Then
MsgError = "Ocurrió un error al registrar el asiento de perdidada cfambiaria"
Exit Select
End If
@@ -3489,17 +3489,17 @@ Partial Class Bancos_IE
Dim IEPSDev As Decimal = dr("IEPS").ToString.ToDecimal
PorcentajeCompraDevDinC = ObjCompras.DtResultados.Rows(0)("PorcentajeIVA").ToString.ToDecimal
Dim DTCuentas As DataTable = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeCompraDevDinC)
'Dim DTCuentas As DataTable = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeCompraDevDinC)
Dim IdCtaIVAXAcreditarDevDinC As Integer
Dim IdCtaIVAAcreditableDevDinC As Integer
If DTCuentas IsNot Nothing AndAlso DTCuentas.Rows.Count > 0 Then
IdCtaIVAXAcreditarDevDinC = DTCuentas.Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero
IdCtaIVAAcreditableDevDinC = DTCuentas.Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero
Else
MsgError = "Sin Registros de porcentaje impuesto"
End If
'If DTCuentas IsNot Nothing AndAlso DTCuentas.Rows.Count > 0 Then
' IdCtaIVAXAcreditarDevDinC = DTCuentas.Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero
' IdCtaIVAAcreditableDevDinC = DTCuentas.Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero
'Else
' MsgError = "Sin Registros de porcentaje impuesto"
'End If
Dim IVADevMN As Decimal = 0
Dim IEPSDevMN As Decimal = 0

View File

@@ -409,13 +409,11 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
if (TCPago > TC)
{
CveConceptoDiferenciaCambiaria = 65;
IdCtaContableDiferenciaCambiaria = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria;
TipoMovto = false;
}
else if (TCPago < TC)
{
CveConceptoDiferenciaCambiaria = 64;
IdCtaContableDiferenciaCambiaria = UsuarioActual.Empresa.IdCuentaGananciaCambiaria;
TipoMovto = true;
}
Importe = ((Importe * TCPago) - (Importe * TC)).Abs();

View File

@@ -780,16 +780,13 @@ public partial class Bancos_PagoDeudor : ClsPaginas
if (TC < TCDoc)
{
CveConceptoDiferenciaCambiaria = 65;
IdCtaContableDiferenciaCambiaria = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria;
TipoMovto = false;
Importe = (Importe * gvr.DataKey("TipoCambio").ToDecimal()) - (Importe * TC);
}
else if (TC > TCDoc)
{
CveConceptoDiferenciaCambiaria = 64;
IdCtaContableDiferenciaCambiaria = UsuarioActual.Empresa.IdCuentaGananciaCambiaria;
TipoMovto = true;
Importe = (Importe * TC) - (Importe * gvr.DataKey("TipoCambio").ToDecimal());
}
ImporteMN = Importe;

View File

@@ -416,10 +416,9 @@ Partial Class Bancos_PolizaCheque
NombreCuenta = ""
If UsuarioActual.Empresa.UsaContabilidad Then
If drt("CveCuenta").ToString.ToEntero > 0 Then
If UsuarioActual.Empresa.TipoContabilidad = 1 AndAlso drt("CveCuenta").ToString.ToEntero > 0 Then
Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("CveCuenta={0}", drt("CveCuenta").ToString))
If drr IsNot Nothing Then
IdCuenta = drt("IdCtaContable").ToString.ToEntero
CodigoCuenta = drr("CuentaFormato").ToString()
@@ -428,52 +427,42 @@ Partial Class Bancos_PolizaCheque
End If
EsComodin = 0
End If
If drt("IdCtaContable").ToString.ToEntero > 0 Then 'DtCuentasContables
Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("Id={0}", drt("IdCtaContable").ToString))
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
If drt("IdCtaContable").ToString.ToEntero > 0 Then 'DtCuentasContables
Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("Id={0}", drt("IdCtaContable").ToString))
If drr IsNot Nothing Then
IdCuenta = drt("IdCtaContable").ToString.ToEntero
CodigoCuenta = drr("CuentaFormato").ToString()
NombreCuenta = drr("Nombre").ToString()
'Cuenta = drr("Nombre").ToString()
End If
EsComodin = 0
If drr IsNot Nothing Then
IdCuenta = drt("IdCtaContable").ToString.ToEntero
ElseIf drt("CveConcepto").ToString = "30" Then
'saco la clave de la cuenta bancaria seleccionada
If DdlCuenta.SelectedValue.ToEntero > 0 And drt("CveConcepto").ToString = "30" Then 'DtCuentasContables
Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("Id={0}", IdCuentaBancos(DdlCuenta.SelectedValue.ToEntero)))
If drr IsNot Nothing Then
IdCuenta = drr("Id").ToString.ToEntero
CodigoCuenta = drr("CuentaFormato").ToString()
NombreCuenta = drr("Nombre").ToString()
' Cuenta = drr("Nombre").ToString()
EsComodin = 1
End If
End If
ElseIf drt("CveConcepto").ToString.ToEntero = 135 And IdCtaFondoGarantia > 0 Then
Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("Id={0}", IdCtaFondoGarantia))
IdCuenta = IdCtaFondoGarantia
CodigoCuenta = drr("CuentaFormato").ToString()
NombreCuenta = drr("Nombre").ToString()
'Cuenta = drr("Nombre").ToString()
EsComodin = 0
End If
EsComodin = 0
ElseIf drt("CveConcepto").ToString = "30" Then
'saco la clave de la cuenta bancaria seleccionada
If DdlCuenta.SelectedValue.ToEntero > 0 And drt("CveConcepto").ToString = "30" Then 'DtCuentasContables
Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("Id={0}", IdCuentaBancos(DdlCuenta.SelectedValue.ToEntero)))
If drr IsNot Nothing Then
IdCuenta = drr("Id").ToString.ToEntero
CodigoCuenta = drr("CuentaFormato").ToString()
NombreCuenta = drr("Nombre").ToString()
' Cuenta = drr("Nombre").ToString()
EsComodin = 1
Else
' Rad.Checked = False
'If us Then
' Alert("La Cuenta Bancaria no se ha vinculado a la cuenta contable", TipoMensaje.MsgAdvertencia)
' GvMov.DataBind()
' UPMovs.Update()
' Exit Sub
'End If
End If
End If
ElseIf drt("CveConcepto").ToString.ToEntero = 135 And IdCtaFondoGarantia > 0 Then
Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("Id={0}", IdCtaFondoGarantia))
IdCuenta = IdCtaFondoGarantia
CodigoCuenta = drr("CuentaFormato").ToString()
NombreCuenta = drr("Nombre").ToString()
'Cuenta = drr("Nombre").ToString()
EsComodin = 0
End If
End If

View File

@@ -1122,7 +1122,7 @@ Partial Class Bancos_PopIEVentas
trCuentaDeposito.Visible = False
Dim Dep As New ClsGenerales
If Dep.GetCuentasDepositos(CveCliente:=CveCliente) Then
If Dep.GetCuentasDepositos(CveCliente:=CveCliente, CveEmpresa:=UsuarioActual.CveEmpresa) Then
If DdlTipoTransaccion.SelectedValue = "9" Then
DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'")
@@ -1905,13 +1905,6 @@ Partial Class Bancos_PopIEVentas
PorcentajeImpuesto = MovimientoPagar.PorcentajeIVA
Dim IdCtaIVAXTrasladar As Integer = 0
If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then
IdCtaIVAXTrasladar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAXTrasladar").ToString.ToEntero
End If
IdCtaContable = If(IdCtaIVAXTrasladar > 0, IdCtaIVAXTrasladar, UsuarioActual.Empresa.IdCuentaIVAxTrasladar)
Case 61 'Iva Trasladado
If CveMoneda = 1 AndAlso CveMonedaVenta = 1 Then
@@ -1937,13 +1930,7 @@ Partial Class Bancos_PopIEVentas
If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
PorcentajeImpuesto = MovimientoPagar.PorcentajeIVA
Dim IdCtaIVATrasladado As Integer = 0
If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then
IdCtaIVATrasladado = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVATrasladado").ToString.ToEntero
End If
IdCtaContable = If(IdCtaIVATrasladado > 0, IdCtaIVATrasladado, UsuarioActual.Empresa.IdCuentaIVATrasladado)
Case 38 'IEPS por trasladar
If CveMoneda = 1 AndAlso CveMonedaVenta = 1 Then
@@ -2078,7 +2065,6 @@ Partial Class Bancos_PopIEVentas
Case 64 'Ganancia
If CveMoneda <> 1 OrElse CveMonedaVenta <> 1 Then
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
Dim tImporteVenta, tImportePago, Diferencia As Decimal
ImporteMovimiento = 0
@@ -2100,11 +2086,9 @@ Partial Class Bancos_PopIEVentas
If tImporteVenta <> tImportePago Then
If tImporteVenta < tImportePago Then
ConceptoContable = 64
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
TipoMovimiento = True
Else
ConceptoContable = 65
IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
TipoMovimiento = False
End If
Diferencia = Math.Abs(tImporteVenta - tImportePago)

View File

@@ -1877,10 +1877,10 @@ Partial Class Bancos_ProveedoresAbonar
Dim IdCtaIVAXAcreditar As Integer = 0
Dim IdCtaIVAAcreditable As Integer = 0
If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then
IdCtaIVAXAcreditar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero
IdCtaIVAAcreditable = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero
End If
'If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then
' IdCtaIVAXAcreditar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero
' IdCtaIVAAcreditable = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero
'End If
Dim IVA As Decimal = PorcentajePago * gr.DataKey("IVA").ToDecimal
@@ -1930,11 +1930,11 @@ Partial Class Bancos_ProveedoresAbonar
End If
If TCCompra > TCPago Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 64, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaGananciaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveSubProyecto:=CveSubProyecto, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), TipoCambio:=TCCompra, TipoCambioPago:=TCPago, Contabilizable:=EsContabilizable) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 64, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=0, CveIE:=-1, IdSegmentoNegocio:=-1, CveSubProyecto:=CveSubProyecto, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), TipoCambio:=TCCompra, TipoCambioPago:=TCPago, Contabilizable:=EsContabilizable) Then
MsgError = "Ocurrio un error al saldar el movimiento"
End If
Else
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 65, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaPerdidaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveSubProyecto:=CveSubProyecto, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), TipoCambio:=TCCompra, TipoCambioPago:=TCPago, Contabilizable:=EsContabilizable) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 65, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=0, CveIE:=-1, IdSegmentoNegocio:=-1, CveSubProyecto:=CveSubProyecto, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), TipoCambio:=TCCompra, TipoCambioPago:=TCPago, Contabilizable:=EsContabilizable) Then
MsgError = "Ocurrio un error al saldar el movimiento"
End If
End If