@@ -290,6 +326,41 @@
diff --git a/Bancos/DepositosCaja.aspx.vb b/Bancos/DepositosCaja.aspx.vb
index ddd4f4960..009fba62d 100644
--- a/Bancos/DepositosCaja.aspx.vb
+++ b/Bancos/DepositosCaja.aspx.vb
@@ -21,10 +21,10 @@ Partial Class Bancos_DepositosCaja
TxtFecha.Text = Now.ToShortDateString
txtFechaI.Text = Now.AddDays(-1).ToShortDateString
txtFechaF.Text = Now.ToShortDateString
- TxtComision.Attributes.Add("onKeyUp", "txtSuma(event);")
- TxtDescuento.Attributes.Add("onKeyUp", "txtSumaDescuento(event);")
- TxtIVA.Attributes.Add("onKeyUp", "txtSumaIVA(event);")
- TxtComisionIntermediario.Attributes.Add("onKeyUp", "txtSumaTntermediario(event);")
+ TxtComision.Attributes.Add("onKeyUp", "txtSuma(this);")
+ TxtDescuento.Attributes.Add("onKeyUp", "txtSumaDescuento(this);")
+ TxtIVA.Attributes.Add("onKeyUp", "txtSumaIVA(this);")
+ TxtComisionIntermediario.Attributes.Add("onKeyUp", "txtSumaTntermediario(this);")
CargaCuentas()
@@ -63,6 +63,9 @@ Partial Class Bancos_DepositosCaja
DdlClasificacionDescuento.DataBind()
DdlClasificacionDescuento.Items.Insert(0, New ListItem("Seleccione", "-1"))
+ DdlPersonal.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa)
+ DdlPersonal.DataBind()
+
'intermediario
DdlProveedorIntermediario.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveProveedor in ({0})", 73343))
DdlProveedorIntermediario.DataBind()
@@ -119,7 +122,7 @@ Partial Class Bancos_DepositosCaja
TotalImportePrePoliza = TotalImporte
If Comision <> 0 Then
- TotalImporte = TotalImporte + Comision + Descuento
+ TotalImporte = TotalImporte + Comision
'Comision = -(Comision) ' se inverte el valor, va cargada
'Descuento = -(Descuento) ' se inverte el valor, va cargada
If DdlSubProyectoDeposito.SelectedValue.ToEntero = -1 Or DdlClasificacion.SelectedValue.ToEntero = -1 Then
@@ -128,6 +131,15 @@ Partial Class Bancos_DepositosCaja
End If
End If
+ If Descuento <> 0 Then
+ TotalImporte = TotalImporte - Descuento
+ 'Descuento = -(Descuento) ' se inverte el valor, va cargada
+ If DdlSubProyectoDescuento.SelectedValue.ToEntero = -1 Or DdlClasificacionDescuento.SelectedValue.ToEntero = -1 Then
+ Alert("Debes Seleccionar un Subproyecto y una Clasificación de descuento", TipoMensaje.MsgAdvertencia)
+ Exit Sub
+ End If
+ End If
+
If TxtComisionIntermediario.Text.ToDecimal <> 0 Then
TotalImporte = TotalImporte - TxtComisionIntermediario.Text.ToDecimal - IVA
End If
@@ -230,7 +242,7 @@ Partial Class Bancos_DepositosCaja
CveSubProyectoDescuento = DdlSubProyectoDescuento.SelectedValue.ToEntero
CveClasificacionDescuento = DdlClasificacionDescuento.SelectedValue.ToEntero
- If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, Descuento, DdlClasificacionDescuento.SelectedItem.Text, 51, DdlClasificacionDescuento.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacionDescuento, CveSubProyecto:=CveSubProyecto, ImporteMX:=Comision * TipoCambio) Then
+ If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, Descuento, DdlClasificacionDescuento.SelectedItem.Text, 51, DdlClasificacionDescuento.SelectedItem.Text & " " & DdlPersonal.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacionDescuento, CveSubProyecto:=CveSubProyectoDescuento, ImporteMX:=Descuento * TipoCambio, CvePersonal:=DdlPersonal.SelectedValue.ToEntero) Then
OcurrioError = True
End If
End If
@@ -263,7 +275,7 @@ Partial Class Bancos_DepositosCaja
CveIEDestino = ObjBancos.AddBancos_IE(DdlCajaChica.SelectedValue.ToEntero, 2, Fecha, FolioIE.ToString, String.Format("Depósito Bancario: {0}", SerieFolio), Importe, CveMoneda, 1, "Depósito Bancario", "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
- If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Importe, SerieFolio, 30, String.Format("Depósito Bancario: {0}", SerieFolio), Fecha, IdCuentaBancariaDestino, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, CveIE:=CveIEDestino, ImporteMX:=Importe * TipoCambio, CveCuenta:=CveCuentaBancariaDestino) Then
+ If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Importe, SerieFolio, 30, String.Format("Depósito Bancario: {0}", SerieFolio), Fecha, IdCuentaBancariaDestino, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, CveVenta:=CveVenta, CveIE:=CveIEDestino, ImporteMX:=Importe * TipoCambio, CveCuenta:=CveCuentaBancariaDestino) Then
OcurrioError = True
Exit For
End If
diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb
index 59af58c78..26461a676 100644
--- a/Bancos/IE.aspx.vb
+++ b/Bancos/IE.aspx.vb
@@ -249,22 +249,6 @@ Partial Class Bancos_IE
ViewState("IDCtaBeneficiarioComplementaria") = value
End Set
End Property
- Private Property CveCuentaConta As Integer
- Get
- Return ViewState("CveCuentaConta").ToString.ToEntero
- End Get
- Set(value As Integer)
- ViewState("CveCuentaConta") = value
- End Set
- End Property
- Private Property CveCuentaBeneficiario As Integer
- Get
- Return ViewState("CveCuentaBeneficiario").ToString.ToEntero
- End Get
- Set(value As Integer)
- ViewState("CveCuentaBeneficiario") = value
- End Set
- End Property
Private Property CvePrePoliza As Integer
Get
Return ViewState("CvePrePoliza").ToString.ToEntero
@@ -611,8 +595,6 @@ Partial Class Bancos_IE
IDCtaContable = 0
IdCtaAnticipoComplementaria = 0
IdCtaAnticipoExtranjera = 0
- CveCuentaBeneficiario = 0
- CveCuentaConta = 0
DirectCast(Master.FindControl("TSM"), ScriptManager).EnablePageMethods = True
TxtImporte.Attributes.Add("onblur", "upIE(this);FncImporteCuenta(this);")
'Calendario.StartDate = Now.AddMonths(-2).FirstDayOfMonth()
@@ -970,7 +952,6 @@ Partial Class Bancos_IE
IDPoliza = ObjIE.IDPoliza
IDCtaContable = ObjIE.IdCtaContable
- CveCuentaConta = ObjIE.CveCuentaConta
If ObjIE.IDPoliza > 0 Then
@@ -1329,24 +1310,22 @@ Partial Class Bancos_IE
Select Case RBL.SelectedValue
Case "P"
- IDCtaBeneficiario = ObjProveedor.IdCtaContAnticipos : CveCuentaBeneficiario = ObjProveedor.CveCuentaAnticipos
+ IDCtaBeneficiario = ObjProveedor.IdCtaContAnticipos
IdCtaAnticipoExtranjera = ObjProveedor.IdCtaContAnticiposExtranjera : IdCtaAnticipoComplementaria = ObjProveedor.IdCtaContAnticiposComplementaria
If EsDevolucion Then
- IDCtaBeneficiario = ObjProveedor.IdCtaContProveedores : CveCuentaBeneficiario = ObjProveedor.CveCuentaProveedores
+ IDCtaBeneficiario = ObjProveedor.IdCtaContProveedores
End If
- Case "DD" : IDCtaBeneficiario = ObjProveedor.IdCtaContDeudor : CveCuentaBeneficiario = ObjProveedor.CveCuentaDeudor
- Case "AC" : IDCtaBeneficiario = ObjProveedor.IdCtaContAcreedor : CveCuentaBeneficiario = ObjProveedor.CveCuentaAcreedor
- Case "DP" : IDCtaBeneficiario = ObjProveedor.IdCtaContDocsXPagar : CveCuentaBeneficiario = ObjProveedor.CveCuentaDocsXPagar
+ Case "DD" : IDCtaBeneficiario = ObjProveedor.IdCtaContDeudor
+ Case "AC" : IDCtaBeneficiario = ObjProveedor.IdCtaContAcreedor
+ Case "DP" : IDCtaBeneficiario = ObjProveedor.IdCtaContDocsXPagar
Case Else
IDCtaBeneficiario = ObjProveedor.IdCtaContProveedores
- CveCuentaBeneficiario = ObjProveedor.CveCuentaProveedores
End Select
If Request("Opcion") IsNot Nothing AndAlso Request("Opcion").ToString.Contiene("EGSCREDITO") Then
IDCtaBeneficiario = ObjProveedor.IdCtaContAcreedor
- CveCuentaBeneficiario = ObjProveedor.CveCuentaAcreedor
If Not IDCtaBeneficiario > 0 Then
Alert("No se pudo cargar IDCtaBeneficiario", TipoMensaje.MsgAdvertencia)
@@ -1359,9 +1338,6 @@ Partial Class Bancos_IE
If IDCtaBeneficiario = 0 AndAlso UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
Alert("El Beneficiario no tiene cuenta contable vinculada. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
BtnGuardar.Enabled = False
- ElseIf CveCuentaBeneficiario = 0 AndAlso UsuarioActual.Empresa.UsaContabilidadSIG Then
- Alert("El Beneficiario no tiene cuenta contable vinculada en SIG. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
- BtnGuardar.Enabled = False
Else
BtnGuardar.Enabled = True
End If
@@ -1470,7 +1446,6 @@ Partial Class Bancos_IE
HdnProvPorRetISR.Value = "0" 'ObjProveedor.RetISR.ToString
IDCtaBeneficiario = ObjCliente.IdCtaContAnticipos
IDCtaBeneficiarioComplementaria = ObjCliente.IdCtaContCompAnticipos
- CveCuentaBeneficiario = ObjCliente.CveCuentaAnticipos
CorreoCobranzaCliente = ObjCliente.CobranzaCorreo
If Request("Opcion") IsNot Nothing AndAlso Request("Opcion") = "DevDinV" Then
@@ -1484,10 +1459,7 @@ Partial Class Bancos_IE
If UsuarioActual.Empresa.UsaAC OrElse UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
If IDCtaBeneficiario = 0 AndAlso UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" Then
Alert("El Beneficiario no tiene cuenta contable vinculada. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
- BtnGuardar.Enabled = False
- ElseIf CveCuentaBeneficiario = 0 AndAlso UsuarioActual.Empresa.UsaContabilidadSIG Then
- Alert("El Beneficiario no tiene cuenta contable vinculada en SIG. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
- BtnGuardar.Enabled = False
+ BtnGuardar.Enabled = False
Else
BtnGuardar.Enabled = True
End If
@@ -1539,15 +1511,11 @@ Partial Class Bancos_IE
HdnProvPorRetIVA.Value = "0" 'ObjProveedor.RetIVA.ToString
HdnProvPorRetISR.Value = "0" 'ObjProveedor.RetISR.ToString
IDCtaBeneficiario = ObjPersonal.IdCtaContPersonal
- CveCuentaBeneficiario = ObjPersonal.CveCuentaPersonal
If UsuarioActual.Empresa.UsaAC OrElse UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
If IDCtaBeneficiario = 0 AndAlso UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" Then
Alert("El Beneficiario no tiene cuenta contable vinculada. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
BtnGuardar.Enabled = False
- ElseIf CveCuentaBeneficiario = 0 AndAlso UsuarioActual.Empresa.UsaContabilidadSIG Then
- Alert("El Beneficiario no tiene cuenta contable vinculada en SIG. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
- BtnGuardar.Enabled = False
Else
BtnGuardar.Enabled = True
End If
@@ -1624,8 +1592,7 @@ Partial Class Bancos_IE
DdlMoneda.SelectedValue = dr("CveMoneda").ToString
IDCtaContable = dr("IdCtaContable").ToString.ToEntero
- IDCtaContableComplementaria = dr("IDCtaContableComplementaria").ToString.ToEntero
- CveCuentaConta = dr("IdCtaContableSIG").ToString.ToEntero
+ IDCtaContableComplementaria = dr("IDCtaContableComplementaria").ToString.ToEntero
CambiaTipoMoneda()
If Opcion IsNot Nothing AndAlso Opcion.Contiene("EGSSINFACT") Then
@@ -1663,9 +1630,6 @@ Partial Class Bancos_IE
Alert("La Cuenta Bancaria no tiene asignada una cuenta contable", TipoMensaje.MsgAdvertencia)
End If
- If Not CveCuentaConta > 0 AndAlso UsuarioActual.Empresa.UsaContabilidadSIG Then
- Alert("La Cuenta Bancaria no tiene asignada una cuenta contable en SIG", TipoMensaje.MsgAdvertencia)
- End If
End If
If trIEDevolucion.Visible And RBL.SelectedValue <> "C" Then
@@ -2708,8 +2672,8 @@ Partial Class Bancos_IE
MsgError = "No se pudo insertar la póliza de saldo inicial."
End If
End If
- Dim UsaComplementariaBancos As Boolean = False
- If UsuarioActual.CveEmpresa = 119 Then UsaComplementariaBancos = True
+ Dim UsaComplementariaBancos As Boolean = False
+ UsaComplementariaBancos = True
If MsgError = "" Then
@@ -2773,11 +2737,11 @@ Partial Class Bancos_IE
Dim DtIE As DataTable = Mov.DtResultados
For Each dr As DataRow In DtIE.Rows
- If MsgError = "" AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, If(dr("TipoMovto").ToString.ToEntero = 1, False, True), If(dr("CveConceptoContable").ToString.ToEntero.Contiene(66), -TxtImporte.Text.ToDecimal, dr("Importe").ToString.ToDecimal), "", dr("CveConceptoContable").ToString.ToEntero, "", Now, IDCtaBeneficiario, -1, CveIE, CveCliente:=dr("CveCliente").ToString.ToEntero, CveVenta:=dr("CveVenta").ToString.ToEntero, ImporteMX:=If(dr("CveConceptoContable").ToString.ToEntero.Contiene(66), -TxtImporte.Text.ToDecimal, -dr("Importe").ToString.ToDecimal), ImporteME:=tImporteMonedaExtranjera, CveCuenta:=CveCuentaBeneficiario) Then
+ If MsgError = "" AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, If(dr("TipoMovto").ToString.ToEntero = 1, False, True), If(dr("CveConceptoContable").ToString.ToEntero.Contiene(66), -TxtImporte.Text.ToDecimal, dr("Importe").ToString.ToDecimal), "", dr("CveConceptoContable").ToString.ToEntero, "", Now, IDCtaBeneficiario, -1, CveIE, CveCliente:=dr("CveCliente").ToString.ToEntero, CveVenta:=dr("CveVenta").ToString.ToEntero, ImporteMX:=If(dr("CveConceptoContable").ToString.ToEntero.Contiene(66), -TxtImporte.Text.ToDecimal, -dr("Importe").ToString.ToDecimal), ImporteME:=tImporteMonedaExtranjera) Then
MsgError = "no se pudo insertar el detalle de la póliza 2"
End If
Next
- ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtImporte.Text.ToDecimal, Ref, CveConceptoContable, Conc, Now, IDCtaContable, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=TxtImporte.Text.ToDecimal, ImporteME:=tImporteMonedaExtranjera, CveCuenta:=CveCuentaConta)
+ ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtImporte.Text.ToDecimal, Ref, CveConceptoContable, Conc, Now, IDCtaContable, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=TxtImporte.Text.ToDecimal, ImporteME:=tImporteMonedaExtranjera)
End If
Mov.Dispose()
@@ -2787,20 +2751,20 @@ Partial Class Bancos_IE
Dim Mov As New ClsMovimientos
'INGxC
- ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -(TxtImporte.Text.ToDecimal - TxtIvaIxC.Text.ToDecimal), Ref, 66, Conc, Now, IDCtaContable, -1, CveIE, CveIEDevolucion:=DdlIEDevolucion.SelectedValue.ToEntero, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=-(TxtImporte.Text.ToDecimal - TxtIvaIxC.Text.ToDecimal), ImporteME:=tImporteMonedaExtranjera, CveCuenta:=CveCuentaConta)
+ ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -(TxtImporte.Text.ToDecimal - TxtIvaIxC.Text.ToDecimal), Ref, 66, Conc, Now, IDCtaContable, -1, CveIE, CveIEDevolucion:=DdlIEDevolucion.SelectedValue.ToEntero, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=-(TxtImporte.Text.ToDecimal - TxtIvaIxC.Text.ToDecimal), ImporteME:=tImporteMonedaExtranjera)
If TxtIvaIxC.Text.ToDouble > 0 Then
'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, CveCuenta:=UsuarioActual.Empresa.CveCuentaIVAxTrasladar)
+ 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)
End If
'Bancos
- ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, -TxtImporte.Text.ToDecimal, Ref, 30, Conc, Now, IDCtaBeneficiario, -1, CveIE, CveIEDevolucion:=DdlIEDevolucion.SelectedValue.ToEntero, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=-TxtImporte.Text.ToDecimal, ImporteME:=tImporteMonedaExtranjera, CveCuenta:=CveCuentaBeneficiario)
+ ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, -TxtImporte.Text.ToDecimal, Ref, 30, Conc, Now, IDCtaBeneficiario, -1, CveIE, CveIEDevolucion:=DdlIEDevolucion.SelectedValue.ToEntero, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=-TxtImporte.Text.ToDecimal, ImporteME:=tImporteMonedaExtranjera)
Mov.Dispose()
Else
- If ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtImporte.Text.ToDecimal, Ref, CveConceptoContable, Conc, Now, IDCtaContable, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=TxtImporte.Text.ToDecimal, ImporteME:=tImporteMonedaExtranjera, CveCuenta:=CveCuentaConta) Then
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtImporte.Text.ToDecimal, Ref, CveConceptoCompra, Conc, Now, IDCtaBeneficiario, -1, CveIE:=If(CveIEOtro < 0, CveIE, CveIEOtro), CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=tImporteMonedaExtranjera, ImporteME:=tImporteMonedaExtranjera, CveCuenta:=CveCuentaBeneficiario) Then
+ If ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtImporte.Text.ToDecimal, Ref, CveConceptoContable, Conc, Now, IDCtaContable, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=TxtImporte.Text.ToDecimal, ImporteME:=tImporteMonedaExtranjera) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtImporte.Text.ToDecimal, Ref, CveConceptoCompra, Conc, Now, IDCtaBeneficiario, -1, CveIE:=If(CveIEOtro < 0, CveIE, CveIEOtro), CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=tImporteMonedaExtranjera, ImporteME:=tImporteMonedaExtranjera) Then
MsgError = "no se pudo insertar el detalle de la póliza 2"
End If
Else
@@ -2885,7 +2849,7 @@ Partial Class Bancos_IE
MsgError = "Ocurrió un error al registrar el asiento del ingreso."
End If
End If
- If tCveMoneda > 1 AndAlso UsuarioActual.CveEmpresa = 119 Then
+ If tCveMoneda > 1 Then
'Agregamos complementaria
Dim TC As Decimal = TxtTipoCambio.Text.ToDecimal
@@ -2918,7 +2882,7 @@ Partial Class Bancos_IE
End Select
If importeMovimiento <> 0 Then
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, If(ConceptoContable = 30, IDCtaContable, IDCtaBeneficiario), -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=importeMovimiento, ImporteME:=tImporteMonedaExtranjera, TipoCambio:=TxtTipoCambio.Text.ToDecimal, CveCuenta:=If(ConceptoContable = 30, CveCuentaConta, CveCuentaBeneficiario)) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, If(ConceptoContable = 30, IDCtaContable, IDCtaBeneficiario), -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, 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
@@ -2940,7 +2904,7 @@ Partial Class Bancos_IE
ImporteAplicarME = ImporteAplicar
'CONSIDERA COMPLEMENTARIA
- If DdlMoneda.SelectedValue.ToEntero > 1 AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119) Then
+ If DdlMoneda.SelectedValue.ToEntero > 1 Then
ImporteAplicarMN = ImporteAplicar
Else
ImporteAplicarMN = (ImporteAplicar * If(DdlMoneda.SelectedValue.ToEntero = 1, 1, TxtTipoCambio.Text.ToDecimal)).RoundSQL()
@@ -2948,15 +2912,15 @@ Partial Class Bancos_IE
'BANCOS
IdCtaContableAplicar = If(IDCtaContable > 0, IDCtaContable, 0)
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, ImporteAplicar, ReferenciaAplicar, 30, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveVenta:=CveVentaDevDin, CveCliente:=CveCliente, ImporteMX:=ImporteAplicarMN, ImporteME:=ImporteAplicarME, CveCuenta:=CveCuentaConta) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, ImporteAplicar, ReferenciaAplicar, 30, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveVenta:=CveVentaDevDin, CveCliente:=CveCliente, ImporteMX:=ImporteAplicarMN, ImporteME:=ImporteAplicarME) Then
MsgError = "Ocurrió un error al registrar el asiento de bancos de devolución"
Exit Select
End If
'BANCOS COMPLEMENTARIA
- If DdlMoneda.SelectedValue.ToEntero > 1 AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119) Then
+ If DdlMoneda.SelectedValue.ToEntero > 1 Then
ImporteAplicarMN = ((ImporteAplicar * If(DdlMoneda.SelectedValue.ToEntero = 1, 1, TxtTipoCambio.Text.ToDecimal)) - ImporteAplicar).RoundSQL()
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, ImporteAplicar, ReferenciaAplicar, 204, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveVenta:=CveVentaDevDin, CveCliente:=CveCliente, ImporteMX:=ImporteAplicarMN, ImporteME:=ImporteAplicarME, CveCuenta:=CveCuentaConta) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, ImporteAplicar, ReferenciaAplicar, 204, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveVenta:=CveVentaDevDin, CveCliente:=CveCliente, ImporteMX:=ImporteAplicarMN, ImporteME:=ImporteAplicarME) Then
MsgError = "Ocurrió un error al registrar el asiento de bancos complementaria de devolución"
End If
End If
@@ -3048,7 +3012,7 @@ Partial Class Bancos_IE
'CONSIDERA COMPLEMENTARIA
- If DdlMoneda.SelectedValue.ToEntero > 1 AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119) Then
+ If DdlMoneda.SelectedValue.ToEntero > 1 Then
ImporteAplicarMN = ImporteAplicar
Else
ImporteAplicarMN = (ImporteAplicar * If(DdlMoneda.SelectedValue.ToEntero = 1, 1, TxtTipoCambio.Text.ToDecimal)).RoundSQL()
@@ -3060,7 +3024,7 @@ Partial Class Bancos_IE
'BANCOS
IdCtaContableAplicar = If(IDCtaContable > 0, IDCtaContable, 0)
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteAplicar, ReferenciaAplicar, 30, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=ImporteAplicarMN, ImporteME:=ImporteAplicarME, CveCuenta:=CveCuentaConta, TipoCambio:=TCDocumento) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteAplicar, ReferenciaAplicar, 30, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=ImporteAplicarMN, ImporteME:=ImporteAplicarME, TipoCambio:=TCDocumento) Then
MsgError = "Ocurrió un error al registrar el asiento de bancos de devolución"
Exit Select
End If
@@ -3074,7 +3038,7 @@ Partial Class Bancos_IE
Dim FechaCompraNota As Date = GvRow.DataKey("Fecha").ToDate
- If DdlMoneda.SelectedValue.ToEntero > 1 AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119) Then
+ If DdlMoneda.SelectedValue.ToEntero > 1 Then
TCCompra = GlobalTipoCambio(FechaCompraNota).ToDecimal
TCDocumento = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).ToDecimal
@@ -3096,14 +3060,14 @@ Partial Class Bancos_IE
'CONSIDERA COMPLEMENTARIA
- If DdlMoneda.SelectedValue.ToEntero > 1 AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119) Then
+ If DdlMoneda.SelectedValue.ToEntero > 1 Then
ImporteAplicarMN = ImporteAplicar
Else
ImporteAplicarMN = (ImporteAplicar * If(DdlMoneda.SelectedValue.ToEntero = 1, 1, TxtTipoCambio.Text.ToDecimal)).RoundSQL()
End If
- If DdlMoneda.SelectedValue.ToEntero > 1 AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119) Then
+ If DdlMoneda.SelectedValue.ToEntero > 1 Then
TCCompra = GlobalTipoCambio(GvRow.DataKey("Fecha").ToDate).ToDecimal
TCDocumento = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).ToDecimal
@@ -3125,9 +3089,9 @@ Partial Class Bancos_IE
''
'BANCOS COMPLEMENTARIA
- If DdlMoneda.SelectedValue.ToEntero > 1 AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119) Then
+ If DdlMoneda.SelectedValue.ToEntero > 1 Then
ImporteAplicarMN = ((ImporteAplicar * If(DdlMoneda.SelectedValue.ToEntero = 1, 1, TCDocumento)) - ImporteAplicar).RoundSQL()
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteAplicar, ReferenciaAplicar, 204, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=ImporteAplicarMN, ImporteME:=ImporteAplicarME, CveCuenta:=CveCuentaConta, TipoCambio:=TCDocumento) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteAplicar, ReferenciaAplicar, 204, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=ImporteAplicarMN, ImporteME:=ImporteAplicarME, TipoCambio:=TCDocumento) Then
MsgError = "Ocurrió un error al registrara el asiento de bancos complementaria de devolución"
End If
End If
@@ -3150,7 +3114,7 @@ Partial Class Bancos_IE
' End If
- ' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoIE, Impo, ReferenciaAplicar, CveConcIE, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=Impo, ImporteME:=0, CveCuenta:=CveCuentaConta, TipoCambio:=TCDocumento) Then
+ ' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoIE, Impo, ReferenciaAplicar, CveConcIE, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=Impo, ImporteME:=0, TipoCambio:=TCDocumento) Then
' MsgError = "Ocurrió un error al registrar el asiento de pago de devolución"
' Exit Select
' End If
@@ -3171,11 +3135,11 @@ Partial Class Bancos_IE
'NC COMPLEMENTARIA
- If DdlMoneda.SelectedValue.ToEntero > 1 AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119) Then
+ If DdlMoneda.SelectedValue.ToEntero > 1 Then
ImporteAplicarMN = ((ImporteAplicar * If(DdlMoneda.SelectedValue.ToEntero = 1, 1, TCCompra)) - ImporteAplicar).RoundSQL()
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, -(ImporteAplicar), ReferenciaAplicar, 201, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-(ImporteAplicarMN), ImporteME:=-(ImporteAplicarME), CveCuenta:=CveCuentaConta, TipoCambio:=TCCompra) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, -(ImporteAplicar), ReferenciaAplicar, 201, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-(ImporteAplicarMN), ImporteME:=-(ImporteAplicarME), TipoCambio:=TCCompra) Then
MsgError = "Ocurrió un error al registrar el asiento de bancos complementaria de devolución"
End If
@@ -3189,14 +3153,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, CveCuenta:=CveCuentaConta, TipoCambio:=TCCompra) Then
+ 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
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, CveCuenta:=CveCuentaConta, TipoCambio:=TCCompra) Then
+ 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
MsgError = "Ocurrió un error al registrar el asiento de perdidada cfambiaria"
Exit Select
End If
@@ -3247,7 +3211,7 @@ Partial Class Bancos_IE
Dim IdCtaIVADevolucionIMPUESTOS As Integer = -1
- If DdlMoneda.SelectedValue.ToEntero > 1 AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119) Then
+ If DdlMoneda.SelectedValue.ToEntero > 1 Then
IVADevMN = IVADev
IEPSDevMN = IEPSDev
Else
@@ -3335,7 +3299,7 @@ Partial Class Bancos_IE
Else
- If DdlMoneda.SelectedValue.ToEntero > 1 AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119) Then
+ If DdlMoneda.SelectedValue.ToEntero > 1 Then
TCCompra = GlobalTipoCambio(FechaCompra).ToDecimal
TCDocumento = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).ToDecimal
@@ -3352,9 +3316,9 @@ Partial Class Bancos_IE
'BANCOS COMPLEMENTARIA
- If DdlMoneda.SelectedValue.ToEntero > 1 AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119) Then
+ If DdlMoneda.SelectedValue.ToEntero > 1 Then
ImporteAplicarMN = ((ImporteAplicar * If(DdlMoneda.SelectedValue.ToEntero = 1, 1, TCDocumento)) - ImporteAplicar).RoundSQL()
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteAplicar, ReferenciaAplicar, 204, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=ImporteAplicarMN, ImporteME:=ImporteAplicarME, CveCuenta:=CveCuentaConta, TipoCambio:=TCDocumento) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteAplicar, ReferenciaAplicar, 204, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=ImporteAplicarMN, ImporteME:=ImporteAplicarME, TipoCambio:=TCDocumento) Then
MsgError = "Ocurrió un error al registrara el asiento de bancos complementaria de devolución"
End If
End If
@@ -3377,7 +3341,7 @@ Partial Class Bancos_IE
End If
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoIE, Impo, ReferenciaAplicar, CveConcIE, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=Impo, ImporteME:=0, CveCuenta:=CveCuentaConta, TipoCambio:=TCDocumento) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoIE, Impo, ReferenciaAplicar, CveConcIE, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=Impo, ImporteME:=0, TipoCambio:=TCDocumento) Then
MsgError = "Ocurrió un error al registrar el asiento de pago de devolución"
Exit Select
End If
@@ -3398,11 +3362,11 @@ Partial Class Bancos_IE
'NC COMPLEMENTARIA
- If DdlMoneda.SelectedValue.ToEntero > 1 AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119) Then
+ If DdlMoneda.SelectedValue.ToEntero > 1 Then
ImporteAplicarMN = ((ImporteAplicar * If(DdlMoneda.SelectedValue.ToEntero = 1, 1, TCCompra)) - ImporteAplicar).RoundSQL()
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, -(ImporteAplicar), ReferenciaAplicar, 201, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-(ImporteAplicarMN), ImporteME:=-(ImporteAplicarME), CveCuenta:=CveCuentaConta, TipoCambio:=TCCompra) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, -(ImporteAplicar), ReferenciaAplicar, 201, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-(ImporteAplicarMN), ImporteME:=-(ImporteAplicarME), TipoCambio:=TCCompra) Then
MsgError = "Ocurrió un error al registrar el asiento de bancos complementaria de devolución"
End If
@@ -3416,14 +3380,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, CveCuenta:=CveCuentaConta, TipoCambio:=TCCompra) Then
+ 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
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, CveCuenta:=CveCuentaConta, TipoCambio:=TCCompra) Then
+ 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
MsgError = "Ocurrió un error al registrar el asiento de perdidada cfambiaria"
Exit Select
End If
@@ -3481,7 +3445,7 @@ Partial Class Bancos_IE
Dim IdCtaIVADevolucionIMPUESTOS As Integer = -1
- If DdlMoneda.SelectedValue.ToEntero > 1 AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119) Then
+ If DdlMoneda.SelectedValue.ToEntero > 1 Then
IVADevMN = IVADev
IEPSDevMN = IEPSDev
Else
@@ -3593,7 +3557,7 @@ Partial Class Bancos_IE
Case 30
importeMovimiento = TxtImporte.Text.ToDecimal
importeMX = importeMovimiento
- If tCveMoneda > 1 AndAlso UsuarioActual.CveEmpresa = 119 Then
+ If tCveMoneda > 1 Then
'Agregamos complementaria
Dim TC As Decimal = TxtTipoCambio.Text.ToDecimal
@@ -3627,7 +3591,7 @@ Partial Class Bancos_IE
End Select
If importeMovimiento <> 0 Then
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, If(ConceptoContable = 30, IDCtaContable, IDCtaBeneficiario), -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=importeMovimiento, ImporteME:=tImporteMonedaExtranjera, TipoCambio:=TxtTipoCambio.Text.ToDecimal, CveCuenta:=If(ConceptoContable = 30, CveCuentaConta, CveCuentaBeneficiario)) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, If(ConceptoContable = 30, IDCtaContable, IDCtaBeneficiario), -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, 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
@@ -3643,19 +3607,18 @@ Partial Class Bancos_IE
End If
If CveConceptoCompra = 10 AndAlso DdlMoneda.SelectedValue.ToEntero > 1 AndAlso UsaComplementariaBancos Then
- IDCtaBeneficiario = IdCtaAnticipoExtranjera
- CveCuentaConta = 0
+ IDCtaBeneficiario = IdCtaAnticipoExtranjera
End If
'MOVIMIENTOS EGRESOS
- If ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, TxtImporte.Text.ToDecimal, Ref, CveConceptoContable, Conc, Now, IDCtaContable, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveOC:=CveOrdenCompra, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=TxtImporte.Text.ToDecimal, ImporteME:=tImporteMonedaExtranjera, CveCuenta:=CveCuentaConta, CveIEDevolucion:=DDlCheques.SelectedValue.ToEntero) Then
+ If ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, TxtImporte.Text.ToDecimal, Ref, CveConceptoContable, Conc, Now, IDCtaContable, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveOC:=CveOrdenCompra, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=TxtImporte.Text.ToDecimal, ImporteME:=tImporteMonedaExtranjera, CveIEDevolucion:=DDlCheques.SelectedValue.ToEntero) Then
Dim IVA As Decimal = 0 ' TxtImporte.Text.ToDouble * HdnProvPorIVA.Value.ToDouble
- If ObjMov.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, TxtImporte.Text.ToDecimal - IVA - CIF, Ref, CveConceptoCompra, Conc, Now, IDCtaBeneficiario, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveOC:=CveOrdenCompra, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=If(UsaComplementariaBancos, TxtImporte.Text.ToDecimal, tImporteMonedaExtranjera), ImporteME:=TxtImporte.Text.ToDecimal, CveCuenta:=CveCuentaBeneficiario, CveIEDevolucion:=DdlIEAcreedor.SelectedValue.ToEntero) Then
- If IVA > 0 AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, IVA, Ref, 19, Conc, Now, IDCtaBeneficiario, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveOC:=CveOrdenCompra, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=TxtImporte.Text.ToDecimal, ImporteME:=tImporteMonedaExtranjera, CveCuenta:=CveCuentaBeneficiario, CveIEDevolucion:=DDlCheques.SelectedValue.ToEntero) Then
+ If ObjMov.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, TxtImporte.Text.ToDecimal - IVA - CIF, Ref, CveConceptoCompra, Conc, Now, IDCtaBeneficiario, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveOC:=CveOrdenCompra, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=If(UsaComplementariaBancos, TxtImporte.Text.ToDecimal, tImporteMonedaExtranjera), ImporteME:=TxtImporte.Text.ToDecimal, CveIEDevolucion:=DdlIEAcreedor.SelectedValue.ToEntero) Then
+ If IVA > 0 AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, IVA, Ref, 19, Conc, Now, IDCtaBeneficiario, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveOC:=CveOrdenCompra, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=TxtImporte.Text.ToDecimal, ImporteME:=tImporteMonedaExtranjera, CveIEDevolucion:=DDlCheques.SelectedValue.ToEntero) Then
MsgError = "Detalle"
End If
'intereses pagados
- If CIF > 0 AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, CIF, Ref, 46, Conc, Now, IDCtaBeneficiario, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveOC:=CveOrdenCompra, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=CIF, ImporteME:=tImporteMonedaExtranjera, CveCuenta:=CveCuentaBeneficiario, CveIEDevolucion:=DDlCheques.SelectedValue.ToEntero) Then
+ If CIF > 0 AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, CIF, Ref, 46, Conc, Now, IDCtaBeneficiario, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveOC:=CveOrdenCompra, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=CIF, ImporteME:=tImporteMonedaExtranjera, CveIEDevolucion:=DDlCheques.SelectedValue.ToEntero) Then
MsgError = "Detalle"
End If
Else
@@ -3666,15 +3629,15 @@ Partial Class Bancos_IE
End If
'BANCOS COMPLEMENTARIA
- If DdlMoneda.SelectedValue.ToEntero > 1 AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119) Then
+ If DdlMoneda.SelectedValue.ToEntero > 1 Then
Dim ImporteAplicar As Decimal = TxtImporte.Text.ToDecimal
Dim ImporteAplicarMN = (ImporteAplicar * TxtTipoCambio.Text.ToDecimal - ImporteAplicar).RoundSQL()
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteAplicar, Ref, 204, Conc, Now, IDCtaContableComplementaria, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=ImporteAplicarMN, ImporteME:=ImporteAplicar, CveCuenta:=CveCuentaConta, TipoCambio:=TxtTipoCambio.Text.ToDecimal) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteAplicar, Ref, 204, Conc, Now, IDCtaContableComplementaria, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=ImporteAplicarMN, ImporteME:=ImporteAplicar, TipoCambio:=TxtTipoCambio.Text.ToDecimal) Then
MsgError = "Ocurrió un error al registrar el asiento de bancos complementaria de devolución"
End If
If CveConceptoCompra = 10 Then
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, ImporteAplicar, Ref, 266, Conc, Now, IdCtaAnticipoComplementaria, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=ImporteAplicarMN, ImporteME:=ImporteAplicar, CveCuenta:=0, TipoCambio:=TxtTipoCambio.Text.ToDecimal) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, ImporteAplicar, Ref, 266, Conc, Now, IdCtaAnticipoComplementaria, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=ImporteAplicarMN, ImporteME:=ImporteAplicar, TipoCambio:=TxtTipoCambio.Text.ToDecimal) Then
MsgError = "Ocurrió un error al registrar el asiento de bancos complementaria de devolución"
End If
End If
@@ -5463,11 +5426,13 @@ Partial Class Bancos_IE
If Borrar = True Then
Dim ErrorCompra = False
+ Dim MsgEliminar As String = ""
'VERIFICA SI EL IES ESTA VINCULADO A UNA SOLICITUD VIATICO
If Banc.GetSolicitudesViaticos(-1, UsuarioActual.CveEmpresa, CveIE:=CveIE) AndAlso Banc.DtResultados.Rows.Count > 0 Then
If Not Banc.UpdateSolicitudesViaticosIE(Banc.DtResultados.FiltroPrimeroValor("CveSolicitudViatico").ToEntero(), -1) Then
ErrorCompra = True
+ MsgEliminar = "Documento con solicitud de viáticos solicitado"
End If
End If
@@ -5476,12 +5441,14 @@ Partial Class Bancos_IE
ObjAC.IniciaTransacSQL()
If Not ObjAC.RemovePoliza(IDPoliza) Then
ErrorCompra = True
+ MsgEliminar = "- No se pudo eliminar la póliza"
End If
End If
If Not ErrorCompra Then
If Not ObjConta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) Then
ErrorCompra = True
+ MsgEliminar += "- No se pudo desbloquear la prepóliza"
End If
End If
@@ -5489,6 +5456,7 @@ Partial Class Bancos_IE
If Not ErrorCompra Then
If Not Banc.EliminarBancos_IE(UsuarioActual.CveUsuario, CveIE) Then
ErrorCompra = True
+ MsgEliminar = "- No se pudo eliminar el movimiento bancario"
End If
End If
diff --git a/Bancos/PopIECompras.aspx.vb b/Bancos/PopIECompras.aspx.vb
index a25f96907..ae9c29298 100644
--- a/Bancos/PopIECompras.aspx.vb
+++ b/Bancos/PopIECompras.aspx.vb
@@ -96,24 +96,8 @@ Partial Class Bancos_PopIECompras
Get
Return ViewState("CtaProveedorAcreedores").ToString.ToEntero
End Get
- End Property
- Private ReadOnly Property CveCuentaProveedorAcreedores As Integer
- Get
- Return ViewState("CveCuentaProveedorAcreedores").ToString.ToEntero
- End Get
- End Property
-
- Private ReadOnly Property CveCuentaProveedor As Integer
- Get
- Return ViewState("CveCuentaProveedor").ToString.ToEntero
- End Get
- End Property
- Private ReadOnly Property CveCuentaProveedorDeudores As Integer
- Get
- Return ViewState("CveCuentaProveedorDeudores").ToString.ToEntero
- End Get
- End Property
-
+ End Property
+
Private Property IdCuentaBancaria As Integer
Get
Return ViewState("IdCuentaBancaria").ToString.ToEntero
@@ -184,33 +168,8 @@ Partial Class Bancos_PopIECompras
Set(value As Integer)
ViewState("CveCuentaBancaria") = value
End Set
- End Property
-
- Private ReadOnly Property CveCuentaMonedaExtranjera As Integer
- Get
- Return ViewState("CveCuentaMonedaExtranjera").ToString.ToEntero
- End Get
- End Property
- Private ReadOnly Property CveCuentaComplementaria As Integer
- Get
- Return ViewState("CveCuentaComplementaria").ToString.ToEntero
- End Get
- End Property
- Private ReadOnly Property CveCuentaRetIVA As Integer
- Get
- Return ViewState("CveCuentaRetIVA").ToString.ToEntero
- End Get
- End Property
- Private ReadOnly Property CveCuentaRetISR As Integer
- Get
- Return ViewState("CveCuentaRetISR").ToString.ToEntero
- End Get
- End Property
- Private ReadOnly Property CveCuentaAnticipo As Integer
- Get
- Return ViewState("CveCuentaAnticipo").ToString.ToEntero
- End Get
- End Property
+ End Property
+
Private Property CveMoneda As Integer
Get
Return ViewState("CveMoneda").ToString.ToEntero
@@ -393,28 +352,7 @@ Partial Class Bancos_PopIECompras
Set(value As Integer)
ViewState("CveCuentaCliente") = value
End Set
- End Property
- Private ReadOnly Property CveCuentaRetIVACliente As Integer
- Get
- Return ViewState("CveCuentaRetIVACliente").ToString.ToEntero
- End Get
- End Property
- Private ReadOnly Property CveCuentaRetISRCliente As Integer
- Get
- Return ViewState("CveCuentaRetISRCliente").ToString.ToEntero
- End Get
- End Property
- Private ReadOnly Property CveCuentaComplementariaCliente As Integer
- Get
- Return ViewState("CveCuentaComplementariaCliente").ToString.ToEntero
- End Get
- End Property
- Private ReadOnly Property CveCuentaMonedaExtranjeraCliente As Integer
- Get
- Return ViewState("CveCuentaMonedaExtranjeraCliente").ToString.ToEntero
- End Get
End Property
-
Private Property OriReferenciaCIE As String
Get
If ViewState("OriReferenciaCIE") Is Nothing Then
@@ -505,15 +443,8 @@ Partial Class Bancos_PopIECompras
ViewState("IdCtaContRetISR") = 0
ViewState("IdCuentaBancaria") = 0
ViewState("IdCuentaBancariaComplementaria") = 0
- ViewState("IdCtaAnticipo") = 0
-
- ViewState("CveCuentaMonedaExtranjera") = 0
- ViewState("CveCuentaComplementaria") = 0
- ViewState("CveCuentaRetIVA") = 0
- ViewState("CveCuentaRetISR") = 0
- ViewState("CveCuentaBancaria") = 0
- ViewState("CveCuentaAnticipo") = 0
-
+ ViewState("IdCtaAnticipo") = 0
+
ViewState("CtaProveedorDeudores") = 0
ViewState("CtaProveedorAcreedores") = 0
ViewState("CveCuentaProveedorDeudores") = 0
@@ -762,9 +693,9 @@ Partial Class Bancos_PopIECompras
If ObjProveedor.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, CveProveedor, "-1", "-1", "-1", "-1", RFC, "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
If ObjProveedor.DtResultados.Rows.Count > 0 Then
TxtPagueseA.Text = ObjProveedor.RazonSocial
- RFCProveedor = ObjProveedor.RFC
-
- 'Conta SIG
+ RFCProveedor = ObjProveedor.RFC
+
+ 'Conta ContPAQ
ViewState("CtaProveedor") = ObjProveedor.IdCtaContProveedores
ViewState("CtaProveedorDeudores") = ObjProveedor.IdCtaContDeudor
ViewState("CtaProveedorAcreedores") = ObjProveedor.IdCtaContAcreedor
@@ -773,19 +704,7 @@ Partial Class Bancos_PopIECompras
ViewState("IdCtaContRetIVA") = ObjProveedor.IdCtaContRetIVA
ViewState("IdCtaContRetIVAAcreditable") = ObjProveedor.IdCtaContRetIVAAcreditable
ViewState("IdCtaProveedorExtranjera") = ObjProveedor.IdCtaContProveedoresExtranjera
- ViewState("IdCtaContComplementaria") = ObjProveedor.IdCtaContProveedoresComplementaria
-
- 'Conta ContPAQ
- ViewState("CveCuentaProveedor") = ObjProveedor.CveCuentaProveedores
- ViewState("CveCuentaProveedorDeudores") = ObjProveedor.CveCuentaDeudor
- ViewState("CveCuentaProveedorAcreedores") = ObjProveedor.CveCuentaAcreedor
- ViewState("CveCuentaRetISR") = ObjProveedor.CveCuentaRetISR
- ViewState("CveCuentaRetIVA") = ObjProveedor.CveCuentaRetIVA
- ViewState("CveCuentaProveedorExtranjera") = ObjProveedor.CveCuentaProveedoresExtranjera
- ViewState("CveCuentaComplementaria") = ObjProveedor.CveCuentaProveedoresComplementaria
- ViewState("NotificarA") = ObjProveedor.NotificarA.Trim()
-
-
+ ViewState("IdCtaContComplementaria") = ObjProveedor.IdCtaContProveedoresComplementaria
Else
Alert("El Proveedor solicitado no existe, por favor intente de nuevo.", TipoMensaje.MsgAdvertencia)
@@ -933,13 +852,8 @@ Partial Class Bancos_PopIECompras
ViewState("IdCtaContRetIVACliente") = ObjCliente.IdCtaContRetIVA
ViewState("IdCtaContRetISRCliente") = ObjCliente.IdCtaContRetISR
ViewState("IdCtaContComplementariaCliente") = ObjCliente.IdCtaContComplementaria
- ViewState("IdCtaContMonedaExtranjeraCliente") = ObjCliente.IdCtaContMonedaExtranjera
-
- ViewState("CveCuentaCliente") = ObjCliente.CveCuentaClientes
- ViewState("CveCuentaRetIVACliente") = ObjCliente.CveCuentaRetIVA
- ViewState("CveCuentaRetISRCliente") = ObjCliente.CveCuentaRetISR
- ViewState("CveCuentaComplementariaCliente") = ObjCliente.CveCuentaComplementaria
- ViewState("CveCuentaMonedaExtranjeraCliente") = ObjCliente.CveCuentaMonedaExtranjera
+ ViewState("IdCtaContMonedaExtranjeraCliente") = ObjCliente.IdCtaContMonedaExtranjera
+
End If
End If
@@ -1674,28 +1588,24 @@ Partial Class Bancos_PopIECompras
ImporteMX = ImporteMovimiento
End If
IdCtaContable = IdCtaProveedorExtranjera
- CveCuenta = CveCuentaMonedaExtranjera
Else
IdCtaContable = CtaProveedor
- CveCuenta = CveCuentaProveedor
End If
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, TxtObservaciones.Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, -1, CveCompra, -1, -1, CveProveedor:=CveProveedor2, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=tipoCambioCompra) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, TxtObservaciones.Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, -1, CveCompra, -1, -1, CveProveedor:=CveProveedor2, ImporteMX:=ImporteMX, TipoCambio:=tipoCambioCompra) Then
MsgError = "No se pudo insertar la póliza"
End If
If CveMonedaCompra <> 1 AndAlso (IdCtaContComplementaria > 0 Or UsuarioActual.CveEmpresa = 119) Then
IdCtaContable = IdCtaContComplementaria
- CveCuenta = CveCuentaComplementaria
If ImporteMovimiento <> 0 Then
Dim ImporteMN As Decimal = (ImporteMovimiento * tipoCambioCompra - ImporteMovimiento).RoundSQL
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, TxtObservaciones.Text, CveConceptoContableComplementaria, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor2, CvePersonal:=CvePersonal, ImporteMX:=ImporteMN, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioCompra, CveCuenta:=CveCuenta) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, TxtObservaciones.Text, CveConceptoContableComplementaria, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor2, CvePersonal:=CvePersonal, ImporteMX:=ImporteMN, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioCompra) Then
MsgError = "No se pudo insertar la póliza"
End If
End If
ImporteMX = ImporteMovimiento
IdCtaContable = IdCtaProveedorExtranjera
- CveCuenta = CveCuentaMonedaExtranjera
End If
End If
Next
@@ -1726,27 +1636,23 @@ Partial Class Bancos_PopIECompras
ImporteMX = ImporteMovimiento
End If
IdCtaContable = IdCtaProveedorExtranjera
- CveCuenta = CveCuentaMonedaExtranjera
Else
IdCtaContable = CtaProveedor
- CveCuenta = CveCuentaProveedor
End If
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, TxtObservaciones.Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, -1, CveCompra, -1, -1, CveProveedor:=CveProveedor2, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=tipoCambioCompra) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, TxtObservaciones.Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, -1, CveCompra, -1, -1, CveProveedor:=CveProveedor2, ImporteMX:=ImporteMX, TipoCambio:=tipoCambioCompra) Then
MsgError = "No se pudo insertar la póliza"
End If
If CveMonedaCompra <> 1 AndAlso (IdCtaContComplementaria > 0 Or UsuarioActual.CveEmpresa = 119) Then
IdCtaContable = IdCtaContComplementaria
- CveCuenta = CveCuentaComplementaria
If ImporteMovimiento <> 0 AndAlso (IdCtaContable > 0 Or UsuarioActual.CveEmpresa = 119) Then
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, TxtObservaciones.Text, CveConceptoContableComplementaria, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor2, CvePersonal:=CvePersonal, ImporteMX:=ImporteMovimiento * tipoCambioCompra - ImporteMovimiento, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioCompra, CveCuenta:=CveCuenta) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, TxtObservaciones.Text, CveConceptoContableComplementaria, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor2, CvePersonal:=CvePersonal, ImporteMX:=ImporteMovimiento * tipoCambioCompra - ImporteMovimiento, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioCompra) Then
MsgError = "No se pudo insertar la póliza"
End If
End If
ImporteMX = ImporteMovimiento
IdCtaContable = IdCtaProveedorExtranjera
- CveCuenta = CveCuentaMonedaExtranjera
End If
End If
Next
@@ -1776,27 +1682,23 @@ Partial Class Bancos_PopIECompras
ImporteMX = ImporteMovimiento
End If
IdCtaContable = IdCtaProveedorExtranjera
- CveCuenta = CveCuentaMonedaExtranjera
Else
IdCtaContable = CtaProveedor
- CveCuenta = CveCuentaProveedor
End If
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, TxtObservaciones.Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, -1, CveCompra, -1, -1, CveProveedor:=CveProveedor2, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=tipoCambioCompra) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, TxtObservaciones.Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, -1, CveCompra, -1, -1, CveProveedor:=CveProveedor2, ImporteMX:=ImporteMX, TipoCambio:=tipoCambioCompra) Then
MsgError = "No se pudo insertar la póliza"
End If
If CveMonedaCompra <> 1 AndAlso (IdCtaContComplementaria > 0 Or UsuarioActual.CveEmpresa = 119) Then
IdCtaContable = IdCtaContComplementaria
- CveCuenta = CveCuentaComplementaria
If ImporteMovimiento <> 0 AndAlso (IdCtaContable > 0 Or UsuarioActual.CveEmpresa = 119) Then
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, TxtObservaciones.Text, CveConceptoContableComplementaria, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor2, CvePersonal:=CvePersonal, ImporteMX:=ImporteMovimiento * tipoCambioCompra - ImporteMovimiento, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioCompra, CveCuenta:=CveCuenta) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, TxtObservaciones.Text, CveConceptoContableComplementaria, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor2, CvePersonal:=CvePersonal, ImporteMX:=ImporteMovimiento * tipoCambioCompra - ImporteMovimiento, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioCompra) Then
MsgError = "No se pudo insertar la póliza"
End If
End If
ImporteMX = ImporteMovimiento
IdCtaContable = IdCtaProveedorExtranjera
- CveCuenta = CveCuentaMonedaExtranjera
End If
End If
Next
@@ -1825,27 +1727,23 @@ Partial Class Bancos_PopIECompras
ImporteMX = ImporteMovimiento
End If
IdCtaContable = IdCtaProveedorExtranjera
- CveCuenta = CveCuentaMonedaExtranjera
Else
IdCtaContable = CtaProveedor
- CveCuenta = CveCuentaProveedor
End If
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, TxtObservaciones.Text, 275, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, rw.DataKey("CveVenta").ToEntero, CveCompra, -1, -1, CveProveedor:=CveProveedor2, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=tipoCambioCompra) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, TxtObservaciones.Text, 275, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, rw.DataKey("CveVenta").ToEntero, CveCompra, -1, -1, CveProveedor:=CveProveedor2, ImporteMX:=ImporteMX, TipoCambio:=tipoCambioCompra) Then
MsgError = "No se pudo insertar la póliza"
End If
If CveMonedaCompra = 2 Then
IdCtaContable = IdCtaContComplementaria
- CveCuenta = CveCuentaComplementaria
If ImporteMovimiento <> 0 AndAlso (IdCtaContable > 0 Or UsuarioActual.CveEmpresa = 119) Then
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, TxtObservaciones.Text, CveConceptoContableComplementaria, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, rw.DataKey("CveVenta").ToEntero, CveCompra:=CveCompra, CveProveedor:=CveProveedor2, CvePersonal:=CvePersonal, ImporteMX:=ImporteMovimiento * tipoCambioCompra - ImporteMovimiento, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioCompra, CveCuenta:=CveCuenta) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, TxtObservaciones.Text, CveConceptoContableComplementaria, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, rw.DataKey("CveVenta").ToEntero, CveCompra:=CveCompra, CveProveedor:=CveProveedor2, CvePersonal:=CvePersonal, ImporteMX:=ImporteMovimiento * tipoCambioCompra - ImporteMovimiento, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioCompra) Then
MsgError = "No se pudo insertar la póliza"
End If
End If
ImporteMX = ImporteMovimiento
IdCtaContable = IdCtaProveedorExtranjera
- CveCuenta = CveCuentaMonedaExtranjera
End If
End If
Next
@@ -1872,17 +1770,14 @@ Partial Class Bancos_PopIECompras
If CveMonedaCompra = 1 Then
IdCtaContable = CtaProveedor
- CveCuenta = CveCuentaProveedor
Else
IdCtaContable = IdCtaContComplementaria
- CveCuenta = CveCuentaComplementaria
If ImporteMovimiento <> 0 AndAlso (IdCtaContable > 0 Or UsuarioActual.CveEmpresa = 119) Then
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, TxtObservaciones.Text, CveConceptoContableComplementaria, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor2, CvePersonal:=CvePersonal, ImporteMX:=ImporteMovimiento * tipoCambioCompra - ImporteMovimiento, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioCompra, CveCuenta:=CveCuenta) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, TxtObservaciones.Text, CveConceptoContableComplementaria, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor2, CvePersonal:=CvePersonal, ImporteMX:=ImporteMovimiento * tipoCambioCompra - ImporteMovimiento, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioCompra) Then
MsgError = "No se pudo insertar la póliza"
End If
ImporteMX = ImporteMovimiento
IdCtaContable = IdCtaProveedorExtranjera
- CveCuenta = CveCuentaMonedaExtranjera
End If
End If
Case 15 'Ret IVA X Acreditar Honorarios/Serv. Prof.
@@ -1916,18 +1811,8 @@ Partial Class Bancos_PopIECompras
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If
End If
- End If
-
- 'Conta SIG
- If CveCuentaRetIVA <> 0 Then
- CveCuenta = CveCuentaRetIVA
- Else
- If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
- If ObjMov.DtResultados.Rows.Count > 0 Then
- CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
- End If
- End If
- End If
+ End If
+
End If
Case 22 'Ret IVA Acreditable Honorarios/Serv. Prof.
If MovimientoPagar.ConceptoRetIVA = 1 Then
@@ -1995,18 +1880,8 @@ Partial Class Bancos_PopIECompras
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If
End If
- End If
-
- 'Conta SIG
- If CveCuentaRetIVA <> 0 Then
- CveCuenta = CveCuentaRetIVA
- Else
- If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
- If ObjMov.DtResultados.Rows.Count > 0 Then
- CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
- End If
- End If
- End If
+ End If
+
End If
Case 184 'Ret IVA Acreditable Fletes P.F.
If MovimientoPagar.ConceptoRetIVA = 2 Then
@@ -2073,18 +1948,7 @@ Partial Class Bancos_PopIECompras
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If
End If
- End If
-
- 'Conta SIG
- If CveCuentaRetIVA <> 0 Then
- CveCuenta = CveCuentaRetIVA
- Else
- If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
- If ObjMov.DtResultados.Rows.Count > 0 Then
- CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
- End If
- End If
- End If
+ End If
End If
Case 186 'Ret IVA Acreditable Fletes P.M.
If MovimientoPagar.ConceptoRetIVA = 3 Then
@@ -2510,7 +2374,6 @@ Partial Class Bancos_PopIECompras
If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaIVAxAcreditar").ToString.ToEntero
- CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaIVAxAcreditarSIG").ToString.ToEntero
End If
End If
@@ -2657,7 +2520,7 @@ Partial Class Bancos_PopIECompras
End If
If MovimientoPagar.IVANoDeducible > 0 Then
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, If(ConceptoContable = 30, TxtFolio.Text.Trim, TxtObservaciones.Text), 280, ConceptoMovimiento, Fecha, IdCtaContableNoIVA, -1, CveIE, -1, CveCompra, -1, CveProveedor:=CveProveedor2, ImporteMX:=ImporteMXNoDeducible, CveCuenta:=CveCuenta, TipoCambio:=TimpocambioGeneral, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeImpuesto) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, If(ConceptoContable = 30, TxtFolio.Text.Trim, TxtObservaciones.Text), 280, ConceptoMovimiento, Fecha, IdCtaContableNoIVA, -1, CveIE, -1, CveCompra, -1, CveProveedor:=CveProveedor2, ImporteMX:=ImporteMXNoDeducible, TipoCambio:=TimpocambioGeneral, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeImpuesto) Then
MsgError = "No se pudo insertar la póliza"
Else
ImporteMovimiento = 0
@@ -2885,7 +2748,7 @@ Partial Class Bancos_PopIECompras
End If
If MovimientoPagar.IVANoDeducible > 0 Then
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, If(ConceptoContable = 30, TxtFolio.Text.Trim, TxtObservaciones.Text), 280, ConceptoMovimiento, Fecha, IdCtaContableNoIVA, -1, CveIE, -1, CveCompra, -1, CveProveedor:=CveProveedor2, ImporteMX:=ImporteMXNoDeducible, CveCuenta:=CveCuenta, TipoCambio:=TimpocambioGeneral, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeImpuesto) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, If(ConceptoContable = 30, TxtFolio.Text.Trim, TxtObservaciones.Text), 280, ConceptoMovimiento, Fecha, IdCtaContableNoIVA, -1, CveIE, -1, CveCompra, -1, CveProveedor:=CveProveedor2, ImporteMX:=ImporteMXNoDeducible, TipoCambio:=TimpocambioGeneral, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeImpuesto) Then
MsgError = "No se pudo insertar la póliza"
End If
@@ -2987,7 +2850,6 @@ Partial Class Bancos_PopIECompras
If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSxAcreditar").ToString.ToEntero
- CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSxAcreditarSIG").ToString.ToEntero
End If
End If
Case 26 'IEPS Acreditable
@@ -3011,7 +2873,6 @@ Partial Class Bancos_PopIECompras
If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero
- CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSAcreditableSIG").ToString.ToEntero
End If
End If
Case 64 'Ganancia
@@ -3091,20 +2952,17 @@ Partial Class Bancos_PopIECompras
ObjCreditos.GetTarjetasCreditos(DdlCuenta.SelectedValue.ToEntero, DdlTarjeta.SelectedValue.ToEntero)
If ObjCreditos.DtResultados.Rows.Count > 0 AndAlso (ObjCreditos.DtResultados.Rows(0)("IdCtaContableTarjeta").ToString.ToEntero > 0 Or ObjCreditos.DtResultados.Rows(0)("IdCtaContableTarjetaSIG").ToString.ToEntero > 0) Then
IdCtaContable = ObjCreditos.DtResultados.Rows(0)("IdCtaContableTarjeta").ToString.ToEntero
- CveCuenta = ObjCreditos.DtResultados.Rows(0)("IdCtaContableTarjetaSIG").ToString.ToEntero
Else
IdCtaContable = CtaProveedor
- CveCuenta = CveCuentaProveedor
End If
ObjCreditos.Dispose()
Else
IdCtaContable = IdCuentaBancaria
- CveCuenta = CveCuentaCliente
End If
Else
IdCtaContable = IdCuentaBancariaComplementaria
If ImporteMovimiento <> 0 AndAlso (IdCtaContable > 0 Or UsuarioActual.CveEmpresa = 119) Then
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, TxtObservaciones.Text, 204, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, -1, CveCompra, -1, -1, CveProveedor:=CveProveedor2, CvePersonal:=CvePersonal, ImporteMX:=ImporteMovimiento * tipoCambioPago - ImporteMovimiento, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioPago, CveCuenta:=CveCuenta) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, TxtObservaciones.Text, 204, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, -1, CveCompra, -1, -1, CveProveedor:=CveProveedor2, CvePersonal:=CvePersonal, ImporteMX:=ImporteMovimiento * tipoCambioPago - ImporteMovimiento, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioPago) Then
MsgError = "No se pudo insertar la póliza"
End If
ImporteMX = ImporteMovimiento
@@ -3136,7 +2994,7 @@ Partial Class Bancos_PopIECompras
CveIE = rw.DataKey("CveIE").ToString.ToEntero
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, TxtObservaciones.Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, -1, CveCompra, -1, CveCliente:=rw.DataKey("CveProveedor").ToString.ToEntero, CveProveedor:=CveProveedor2, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=tipoCambioPago) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, TxtObservaciones.Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, -1, CveCompra, -1, CveCliente:=rw.DataKey("CveProveedor").ToString.ToEntero, CveProveedor:=CveProveedor2, ImporteMX:=ImporteMX, TipoCambio:=tipoCambioPago) Then
MsgError = "No se pudo insertar la póliza"
End If
End If
@@ -3166,8 +3024,7 @@ Partial Class Bancos_PopIECompras
CveIE = rw.DataKey("CveIE").ToString.ToEntero
IdCtaContable = CtaProveedorAcreedores
- CveCuenta = CveCuentaProveedorAcreedores
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, TxtObservaciones.Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, -1, CveCompra, CveProveedor:=CveProveedor2, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=tipoCambioPago) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, TxtObservaciones.Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, -1, CveCompra, CveProveedor:=CveProveedor2, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, TipoCambio:=tipoCambioPago) Then
MsgError = "No se pudo insertar la póliza"
End If
End If
@@ -3219,8 +3076,7 @@ Partial Class Bancos_PopIECompras
CveIE = rw.DataKey("CveIE").ToString.ToEntero
IdCtaContable = CtaProveedorDeudores
- CveCuenta = CveCuentaProveedorDeudores
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, TxtObservaciones.Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, -1, CveCompra, CveProveedor:=CveProveedor2, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=tipoCambioPago) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, TxtObservaciones.Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, -1, CveCompra, CveProveedor:=CveProveedor2, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, TipoCambio:=tipoCambioPago) Then
MsgError = "No se pudo insertar la póliza"
End If
End If
@@ -3249,22 +3105,19 @@ Partial Class Bancos_PopIECompras
If rw.DataKey("CveMoneda").ToEntero = 1 Then
IdCtaContable = IdCuentaCliente
- CveCuenta = CveCuentaCliente
Else
ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
IdCtaContable = IdCtaContComplementariaCliente
- CveCuenta = CveCuentaComplementariaCliente
If ImporteMovimiento <> 0 AndAlso (IdCtaContable > 0 Or UsuarioActual.CveEmpresa = 119) Then
ImporteMX = ImporteMovimiento
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, TxtObservaciones.Text, 207, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, rw.DataKey("CveVenta").ToString.ToEntero, CveCompra, CveCliente:=rw.DataKey("CveCliente").ToString.ToEntero, ImporteMX:=Math.Round(ImporteMovimiento * tipoCambioPago - ImporteMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=ImporteMovimiento, CveCuenta:=CveCuenta, TipoCambio:=tipoCambioPago) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, TxtObservaciones.Text, 207, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, rw.DataKey("CveVenta").ToString.ToEntero, CveCompra, CveCliente:=rw.DataKey("CveCliente").ToString.ToEntero, ImporteMX:=Math.Round(ImporteMovimiento * tipoCambioPago - ImporteMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioPago) Then
MsgError = "No se pudo insertar la póliza"
End If
End If
IdCtaContable = IdCtaContMonedaExtranjeraCliente
- CveCuenta = CveCuentaMonedaExtranjeraCliente
End If
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, TxtObservaciones.Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveCompra:=CveCompra, CveVenta:=rw.DataKey("CveVenta").ToString.ToEntero, CveCliente:=rw.DataKey("CveCliente").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=tipoCambioPago) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, TxtObservaciones.Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveCompra:=CveCompra, CveVenta:=rw.DataKey("CveVenta").ToString.ToEntero, CveCliente:=rw.DataKey("CveCliente").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, TipoCambio:=tipoCambioPago) Then
MsgError = "No se pudo insertar la póliza"
End If
End If
@@ -3302,21 +3155,9 @@ Partial Class Bancos_PopIECompras
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If
End If
- End If
-
- 'Conta SIG
- If CveCuentaRetIVACliente <> 0 Then
- CveCuenta = CveCuentaRetIVACliente
- Else
- If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
- If ObjMov.DtResultados.Rows.Count > 0 Then
- CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
- End If
- End If
- End If
-
+ End If
If ImporteMovimiento > 0 Then
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, TxtObservaciones.Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveCompra:=CveCompra, CveVenta:=rw.DataKey("CveVenta").ToString.ToEntero, CveCliente:=rw.DataKey("CveCliente").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, TxtObservaciones.Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveCompra:=CveCompra, CveVenta:=rw.DataKey("CveVenta").ToString.ToEntero, CveCliente:=rw.DataKey("CveCliente").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal) Then
MsgError = "No se pudo insertar la póliza"
End If
End If
@@ -3355,21 +3196,10 @@ Partial Class Bancos_PopIECompras
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
End If
End If
- End If
-
- 'Conta SIG
- If CveCuentaRetISR <> 0 Then
- CveCuenta = CveCuentaRetISR
- Else
- If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
- If ObjMov.DtResultados.Rows.Count > 0 Then
- CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
- End If
- End If
- End If
-
+ End If
+
If ImporteMovimiento > 0 Then
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, TxtObservaciones.Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveCompra:=CveCompra, CveVenta:=rw.DataKey("CveVenta").ToString.ToEntero, CveCliente:=rw.DataKey("CveCliente").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, TxtObservaciones.Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveCompra:=CveCompra, CveVenta:=rw.DataKey("CveVenta").ToString.ToEntero, CveCliente:=rw.DataKey("CveCliente").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal) Then
MsgError = "No se pudo insertar la póliza"
End If
End If
@@ -3409,10 +3239,9 @@ Partial Class Bancos_PopIECompras
End If
IdCtaContable = If(IdCtaIVAXTrasladar > 0, IdCtaIVAXTrasladar, UsuarioActual.Empresa.IdCuentaIVAxTrasladar)
- CveCuenta = UsuarioActual.Empresa.CveCuentaIVAxTrasladar
If ImporteMovimiento > 0 Then
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, TxtObservaciones.Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveCompra:=CveCompra, CveVenta:=rw.DataKey("CveVenta").ToString.ToEntero, CveCliente:=rw.DataKey("CveCliente").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal, PorcentajeImpuesto:=PorcentajeImpuesto) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, TxtObservaciones.Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveCompra:=CveCompra, CveVenta:=rw.DataKey("CveVenta").ToString.ToEntero, CveCliente:=rw.DataKey("CveCliente").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal, PorcentajeImpuesto:=PorcentajeImpuesto) Then
MsgError = "No se pudo insertar la póliza"
End If
End If
@@ -3453,10 +3282,9 @@ Partial Class Bancos_PopIECompras
End If
IdCtaContable = If(IdCtaIVATrasladado > 0, IdCtaIVATrasladado, UsuarioActual.Empresa.IdCuentaIVATrasladado)
- CveCuenta = UsuarioActual.Empresa.CveCuentaIVATrasladado
If ImporteMovimiento > 0 Then
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, TxtObservaciones.Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveCompra:=CveCompra, CveVenta:=rw.DataKey("CveVenta").ToString.ToEntero, CveCliente:=rw.DataKey("CveCliente").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, rw.DataKey("TipoCambio").ToString.ToDecimal), PorcentajeImpuesto:=PorcentajeImpuesto) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, TxtObservaciones.Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveCompra:=CveCompra, CveVenta:=rw.DataKey("CveVenta").ToString.ToEntero, CveCliente:=rw.DataKey("CveCliente").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, rw.DataKey("TipoCambio").ToString.ToDecimal), PorcentajeImpuesto:=PorcentajeImpuesto) Then
MsgError = "No se pudo insertar la póliza"
End If
End If
@@ -3487,10 +3315,9 @@ Partial Class Bancos_PopIECompras
ImporteMX = Math.Round(ImporteMX, 2)
IdCtaContable = UsuarioActual.Empresa.IdCuentaIEPSxTrasladar
- CveCuenta = UsuarioActual.Empresa.CveCuentaIEPSxTrasladar
If ImporteMovimiento > 0 Then
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, TxtObservaciones.Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveCompra:=CveCompra, CveVenta:=rw.DataKey("CveVenta").ToString.ToEntero, CveCliente:=rw.DataKey("CveCliente").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, TxtObservaciones.Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveCompra:=CveCompra, CveVenta:=rw.DataKey("CveVenta").ToString.ToEntero, CveCliente:=rw.DataKey("CveCliente").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal) Then
MsgError = "No se pudo insertar la póliza"
End If
End If
@@ -3521,10 +3348,9 @@ Partial Class Bancos_PopIECompras
ImporteMX = Math.Round(ImporteMX, 2)
IdCtaContable = UsuarioActual.Empresa.IdCuentaIEPSTrasladado
- CveCuenta = UsuarioActual.Empresa.CveCuentaIEPSTrasladado
If ImporteMovimiento > 0 Then
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, TxtObservaciones.Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveCompra:=CveCompra, CveVenta:=rw.DataKey("CveVenta").ToString.ToEntero, CveCliente:=rw.DataKey("CveCliente").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, TxtObservaciones.Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveCompra:=CveCompra, CveVenta:=rw.DataKey("CveVenta").ToString.ToEntero, CveCliente:=rw.DataKey("CveCliente").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal) Then
MsgError = "No se pudo insertar la póliza"
End If
End If
@@ -3563,21 +3389,11 @@ Partial Class Bancos_PopIECompras
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If
End If
- End If
-
- 'Conta SIG
- If CveCuentaRetIVA <> 0 Then
- CveCuenta = CveCuentaRetIVA
- Else
- If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
- If ObjMov.DtResultados.Rows.Count > 0 Then
- CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
- End If
- End If
- End If
-
+ End If
+
+
If ImporteMovimiento > 0 Then
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, TxtObservaciones.Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveCompra:=CveCompra, CveVenta:=rw.DataKey("CveVenta").ToString.ToEntero, CveCliente:=rw.DataKey("CveCliente").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, TxtObservaciones.Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveCompra:=CveCompra, CveVenta:=rw.DataKey("CveVenta").ToString.ToEntero, CveCliente:=rw.DataKey("CveCliente").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal) Then
MsgError = "No se pudo insertar la póliza"
End If
End If
@@ -3616,21 +3432,10 @@ Partial Class Bancos_PopIECompras
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
End If
End If
- End If
-
- 'Conta SIG
- If CveCuentaRetISR <> 0 Then
- CveCuenta = CveCuentaRetISR
- Else
- If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
- If ObjMov.DtResultados.Rows.Count > 0 Then
- CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
- End If
- End If
- End If
-
+ End If
+
If ImporteMovimiento > 0 Then
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, TxtObservaciones.Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveCompra:=CveCompra, CveVenta:=rw.DataKey("CveVenta").ToString.ToEntero, CveCliente:=rw.DataKey("CveCliente").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, TxtObservaciones.Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveCompra:=CveCompra, CveVenta:=rw.DataKey("CveVenta").ToString.ToEntero, CveCliente:=rw.DataKey("CveCliente").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal) Then
MsgError = "No se pudo insertar la póliza"
End If
End If
@@ -3659,7 +3464,7 @@ Partial Class Bancos_PopIECompras
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, If(ConceptoContable = 30, TxtFolio.Text.Trim, TxtObservaciones.Text), ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, -1, CveCompra, CveSubProyecto:=CveSubProyectoInsertar, CveProveedor:=CveProveedor2, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=TimpocambioGeneral, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeImpuesto) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, If(ConceptoContable = 30, TxtFolio.Text.Trim, TxtObservaciones.Text), ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, -1, CveCompra, CveSubProyecto:=CveSubProyectoInsertar, CveProveedor:=CveProveedor2, ImporteMX:=ImporteMX, TipoCambio:=TimpocambioGeneral, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeImpuesto) Then
MsgError = "No se pudo insertar la póliza"
End If
diff --git a/Bancos/PopIEVentas.aspx.vb b/Bancos/PopIEVentas.aspx.vb
index 9be734101..e267668e4 100644
--- a/Bancos/PopIEVentas.aspx.vb
+++ b/Bancos/PopIEVentas.aspx.vb
@@ -942,7 +942,7 @@ Partial Class Bancos_PopIEVentas
If CveProveedor > 0 Then
If ObjProveedor.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, CveProveedor, "-1", "-1", "-1", "-1", RFCCliente, "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
- 'Conta SIG
+ 'Conta ContPAQ
ViewState("CtaProveedor") = ObjProveedor.IdCtaContProveedores
ViewState("CtaProveedorDeudores") = ObjProveedor.IdCtaContDeudor
ViewState("CtaProveedorAcreedores") = ObjProveedor.IdCtaContAcreedor
@@ -951,16 +951,8 @@ Partial Class Bancos_PopIEVentas
ViewState("IdCtaContRetIVAProveedor") = ObjProveedor.IdCtaContRetIVA
ViewState("IdCtaContRetIVAAcreditableProveedor") = ObjProveedor.IdCtaContRetIVAAcreditable
ViewState("IdCtaProveedorExtranjera") = ObjProveedor.IdCtaContProveedoresExtranjera
- ViewState("IdCtaContComplementariaProveedor") = ObjProveedor.IdCtaContProveedoresComplementaria
-
- 'Conta ContPAQ
- ViewState("CveCuentaProveedor") = ObjProveedor.CveCuentaProveedores
- ViewState("CveCuentaProveedorDeudores") = ObjProveedor.CveCuentaDeudor
- ViewState("CveCuentaProveedorAcreedores") = ObjProveedor.CveCuentaAcreedor
- ViewState("CveCuentaRetISRProveedor") = ObjProveedor.CveCuentaRetISR
- ViewState("CveCuentaRetIVAProveedor") = ObjProveedor.CveCuentaRetIVA
- ViewState("CveCuentaProveedorExtranjera") = ObjProveedor.CveCuentaProveedoresExtranjera
- ViewState("CveCuentaComplementariaProveedor") = ObjProveedor.CveCuentaProveedoresComplementaria
+ ViewState("IdCtaContComplementariaProveedor") = ObjProveedor.IdCtaContProveedoresComplementaria
+
End If
End If
diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb
index 9aebbf918..10bdfd99c 100644
--- a/Bancos/ProveedoresAbonar.aspx.vb
+++ b/Bancos/ProveedoresAbonar.aspx.vb
@@ -150,18 +150,6 @@ Partial Class Bancos_ProveedoresAbonar
End Get
End Property
- Private ReadOnly Property CveCuentaProveedor As Integer
- Get
- Return ViewState("CveCuentaProveedor").ToString.ToEntero
- End Get
- End Property
-
- Private ReadOnly Property CveCuentaProveedorExtranjera As Integer
- Get
- Return ViewState("CveCuentaProveedorExtranjera").ToString.ToEntero
- End Get
- End Property
-
Private Property IdCuenta As Integer
Get
Return ViewState("IdCuenta").ToString.ToEntero
@@ -171,15 +159,6 @@ Partial Class Bancos_ProveedoresAbonar
End Set
End Property
- Private Property CveCuentaB As Integer
- Get
- Return ViewState("CveCuentaB").ToString.ToEntero
- End Get
- Set(value As Integer)
- ViewState("CveCuentaB") = value
- End Set
- End Property
-
Private Property CveProveedorSucursal As Integer
Get
Return ViewState("CveProveedorSucursal").ToString.ToEntero
@@ -198,15 +177,6 @@ Partial Class Bancos_ProveedoresAbonar
End Set
End Property
- Private Property CveCuentaBancariaComplementaria As Integer
- Get
- Return ViewState("CveCuentaBancariaComplementaria").ToString.ToEntero
- End Get
- Set(value As Integer)
- ViewState("CveCuentaBancariaComplementaria") = value
- End Set
- End Property
-
Private Property PermiteModificarImporte As Boolean
Get
Return CType(ViewState("PermiteModificarImporte").ToString, Boolean)
@@ -252,28 +222,7 @@ Partial Class Bancos_ProveedoresAbonar
Return ViewState("IdCtaContRetISRAcreditable").ToString.ToEntero
End Get
End Property
- Private ReadOnly Property CveCuentaMonedaExtranjera As Integer
- Get
- Return ViewState("CveCuentaMonedaExtranjera").ToString.ToEntero
- End Get
- End Property
- Private ReadOnly Property CveCuentaComplementaria As Integer
- Get
- Return ViewState("CveCuentaComplementaria").ToString.ToEntero
- End Get
- End Property
-
- Private ReadOnly Property CveCuentaRetIVA As Integer
- Get
- Return ViewState("CveCuentaRetIVA").ToString.ToEntero
- End Get
- End Property
- Private ReadOnly Property CveCuentaRetISR As Integer
- Get
- Return ViewState("CveCuentaRetISR").ToString.ToEntero
- End Get
- End Property
Private Property EmpresaPrueba As Boolean
Get
Return CBool(ViewState("EmpresaPrueba"))
@@ -352,15 +301,10 @@ Partial Class Bancos_ProveedoresAbonar
ViewState("IdCtaContComplementaria") = 0
ViewState("IdCtaContRetIVA") = 0
ViewState("IdCtaContRetISR") = 0
- ViewState("CveCuentaMonedaExtranjera") = 0
- ViewState("CveCuentaComplementaria") = 0
- ViewState("CveCuentaRetIVA") = 0
- ViewState("CveCuentaRetISR") = 0
End If
IdCuenta = 0
- CveCuentaB = 0
PermiteModificarImporte = True
TxtFechaIncobrable.Text = Now.ToShortDateString
@@ -528,9 +472,6 @@ Partial Class Bancos_ProveedoresAbonar
ViewState("IdCtaContRetISR") = ObjProveedor.IdCtaContRetISR
ViewState("IdCtaContRetISRAcreditable") = ObjProveedor.IdCtaContRetISRAcreditable
- ViewState("CveCuentaRetIVA") = ObjProveedor.CveCuentaRetIVA
- ViewState("CveCuentaRetISR") = ObjProveedor.CveCuentaRetISR
-
'Sección de pago a proveedor
LtlNombreProveedor.Text = ObjProveedor.RazonSocial
LtlRFCProveedor.Text = ObjProveedor.RFC
@@ -542,10 +483,6 @@ Partial Class Bancos_ProveedoresAbonar
ViewState("IdCtaContComplementaria") = ObjProveedor.IdCtaContProveedoresComplementaria
ViewState("IdCtaAcreedorComplementaria") = ObjProveedor.IdCtaContAcreedorComplementaria
- ViewState("CveCuentaProveedor") = ObjProveedor.CveCuentaProveedores
- ViewState("CveCuentaProveedorExtranjera") = ObjProveedor.CveCuentaProveedoresExtranjera
- ViewState("CveCuentaComplementaria") = ObjProveedor.CveCuentaProveedoresComplementaria
-
If Serie <> "" AndAlso Serie <> "-1" Then
Dim dr As DataRow = GlobalDTProveedorSucursales(CveProveedor, UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("Serie = '{0}'", Serie))
If dr IsNot Nothing Then
@@ -966,7 +903,6 @@ Partial Class Bancos_ProveedoresAbonar
Dim alertaContabilizacion As String = "Se enviaron correctamente las siguientes pólizas:
"
Dim idCuentaContabilizacion As Long = 1
Dim CuentasContablesInvalidas As New StringBuilder
- Dim CveCuentaContabilizacion As Long = 1
Dim CuentasContablesInvalidasSIG As New StringBuilder
Dim ConceptoContable As Integer
Dim TipoMovimiento As Boolean
@@ -1097,7 +1033,7 @@ Partial Class Bancos_ProveedoresAbonar
IdCtaContable = IdCtaContComplementaria
If ImporteMovimiento <> 0 AndAlso (UsaComplementariaProveedores Or IdCtaContable > 0) Then 'Cuando tiene complementaria lo dividimos en dos
importeMX = ImporteMovimiento
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0.00D, Referencia, CveConceptoComplementaria, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, CveCompra:=gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedor, ImporteMX:=Math.Round(ImporteMovimiento * tipoCambioCompraValuacion - ImporteMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioCompraValuacion, CveCuenta:=CveCuentaComplementaria) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0.00D, Referencia, CveConceptoComplementaria, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, CveCompra:=gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedor, ImporteMX:=Math.Round(ImporteMovimiento * tipoCambioCompraValuacion - ImporteMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioCompraValuacion) Then
MsgError = "No se pudo insertar la póliza"
End If
End If
@@ -1750,11 +1686,9 @@ Partial Class Bancos_ProveedoresAbonar
Dim ImporteNOIVA As Decimal = gvr.DataKey("IVAPorPagarNoDeducible").ToDecimal * PorcentajePago
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteNOIVA, Referencia, 280, ConceptoMovimiento, FechaMovimiento, IdCtaContableNoIVA, -1, CveIE, CveCompra:=gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedor, ImporteMX:=ImporteNOIVA, ImporteME:=If(TipoCambioPago = 1, 0, ImporteMovimiento), TipoCambio:=TipoCambioGeneral, PorcentajeImpuesto:=PorcentajeImpuesto) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteNOIVA, Referencia, 280, ConceptoMovimiento, FechaMovimiento, IdCtaContableNoIVA, -1, CveIE, CveCompra:=gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedor, ImporteMX:=ImporteNOIVA, ImporteME:=If(TipoCambioPago = 1, 0, ImporteMovimiento), TipoCambio:=TipoCambioGeneral, CveSubProyecto:=CveSubProyecto, PorcentajeImpuesto:=PorcentajeImpuesto) Then
MsgError = "No se pudo insertar la póliza"
Exit For
-
-
End If
End If
@@ -1961,11 +1895,6 @@ Partial Class Bancos_ProveedoresAbonar
idCuentaContabilizacion = 0
End If
- 'Conta SIG
- If CveCuentaB < 1 Then
- CuentasContablesInvalidasSIG.Append(" " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
- CveCuentaContabilizacion = 0
- End If
ImporteMovimiento = 0
Case Else
ImporteMovimiento = 0
@@ -2013,17 +1942,17 @@ Partial Class Bancos_ProveedoresAbonar
If (Not DivTarjeta.Visible Or DdlTarjeta.SelectedValue.ToEntero = -1) Then
If TipoCambioPago > 1 AndAlso CveMoneda = 2 Then
- If UsaComplementariaBancos Or (CveCuentaBancariaComplementaria > 0 OrElse IdCuentaBancariaComplementaria > 0) Then
+ If UsaComplementariaBancos Or (IdCuentaBancariaComplementaria > 0) Then
If CveMoneda = 2 AndAlso CveMonedaFiltro = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES
TipoCambioPago = TxtTCDolares.Text.ToDecimal
ElseIf CveMoneda = 2 AndAlso CveMonedaFiltro = 2 Then
TipoCambioPago = TxtTCDolaresDolares.Text.ToDecimal
End If
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtImporte.Text.ToDecimal, Referencia, 30, ConceptoMovimiento, TxtFechaDocumento.Text.ToDate, IdCuenta, -1, CveIE, CveProveedor:=CveProveedor, ImporteMX:=TxtImporte.Text.ToDecimal, ImporteME:=If(TipoCambioPago = 1, 0, TxtImporte.Text.ToDecimal), CveCuenta:=CveCuentaB, TipoCambio:=TipoCambioPago, CveSubProyecto:=CveSubProyecto) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtImporte.Text.ToDecimal, Referencia, 30, ConceptoMovimiento, TxtFechaDocumento.Text.ToDate, IdCuenta, -1, CveIE, CveProveedor:=CveProveedor, ImporteMX:=TxtImporte.Text.ToDecimal, ImporteME:=If(TipoCambioPago = 1, 0, TxtImporte.Text.ToDecimal), TipoCambio:=TipoCambioPago, CveSubProyecto:=CveSubProyecto) Then
MsgError = "No se pudo insertar la póliza"
End If
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, If(CveMoneda = 1 AndAlso TxtTC.Visible, TxtImporte.Text.ToDecimal / TxtTC.Text.ToDecimal, TxtImporte.Text.ToDecimal), Referencia, 204, ConceptoMovimiento, TxtFechaDocumento.Text.ToDate, IdCuentaBancariaComplementaria, -1, CveIE, CveProveedor:=CveProveedor, ImporteMX:=If(CveMoneda = 2, Math.Round((TxtImporte.Text.Trim.ToDecimal * TipoCambioPago) - TxtImporte.Text.Trim.ToDecimal, 2, MidpointRounding.AwayFromZero), TxtImporte.Text.Trim.ToDecimal), ImporteME:=If(CveMoneda = 1, 0, TxtImporte.Text.ToDecimal), TipoCambio:=TipoCambioPago, CveCuenta:=CveCuentaBancariaComplementaria, CveSubProyecto:=CveSubProyecto) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, If(CveMoneda = 1 AndAlso TxtTC.Visible, TxtImporte.Text.ToDecimal / TxtTC.Text.ToDecimal, TxtImporte.Text.ToDecimal), Referencia, 204, ConceptoMovimiento, TxtFechaDocumento.Text.ToDate, IdCuentaBancariaComplementaria, -1, CveIE, CveProveedor:=CveProveedor, ImporteMX:=If(CveMoneda = 2, Math.Round((TxtImporte.Text.Trim.ToDecimal * TipoCambioPago) - TxtImporte.Text.Trim.ToDecimal, 2, MidpointRounding.AwayFromZero), TxtImporte.Text.Trim.ToDecimal), ImporteME:=If(CveMoneda = 1, 0, TxtImporte.Text.ToDecimal), TipoCambio:=TipoCambioPago, CveSubProyecto:=CveSubProyecto) Then
MsgError = "No se pudo insertar la póliza"
End If
Else
@@ -2033,7 +1962,7 @@ Partial Class Bancos_ProveedoresAbonar
TipoCambioPago = TxtTCDolaresDolares.Text.ToDecimal
End If
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtImporte.Text.ToDecimal, Referencia, 30, ConceptoMovimiento, TxtFechaDocumento.Text.ToDate, IdCuenta, -1, CveIE, CveProveedor:=CveProveedor, ImporteMX:=If(CveMoneda = 2, Math.Round(TxtImporte.Text.Trim.ToDecimal * TipoCambioPago, 2, MidpointRounding.AwayFromZero), TxtImporte.Text.Trim.ToDecimal), ImporteME:=If(DivTC.Visible, If(TxtTC.Text.ToDecimal > 0, TxtImporte.Text.ToDecimal / TxtTC.Text.ToDecimal, 0), 0), CveCuenta:=CveCuentaB, TipoCambio:=TipoCambioPago, CveSubProyecto:=CveSubProyecto) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtImporte.Text.ToDecimal, Referencia, 30, ConceptoMovimiento, TxtFechaDocumento.Text.ToDate, IdCuenta, -1, CveIE, CveProveedor:=CveProveedor, ImporteMX:=If(CveMoneda = 2, Math.Round(TxtImporte.Text.Trim.ToDecimal * TipoCambioPago, 2, MidpointRounding.AwayFromZero), TxtImporte.Text.Trim.ToDecimal), ImporteME:=If(DivTC.Visible, If(TxtTC.Text.ToDecimal > 0, TxtImporte.Text.ToDecimal / TxtTC.Text.ToDecimal, 0), 0), TipoCambio:=TipoCambioPago, CveSubProyecto:=CveSubProyecto) Then
MsgError = "No se pudo insertar la póliza"
End If
@@ -2045,7 +1974,7 @@ Partial Class Bancos_ProveedoresAbonar
TipoCambioPago = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).ToString.ToDecimal
End If
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtImporte.Text.ToDecimal, Referencia, 30, ConceptoMovimiento, TxtFechaDocumento.Text.ToDate, IdCuenta, -1, CveIE, CveProveedor:=CveProveedor, ImporteMX:=If(CveMoneda = 2, Math.Round(TxtImporte.Text.Trim.ToDecimal * TipoCambioPago, 2, MidpointRounding.AwayFromZero), TxtImporte.Text.Trim.ToDecimal), ImporteME:=If(DivTC.Visible, If(TxtTC.Text.ToDecimal > 0, TxtImporte.Text.ToDecimal / TxtTC.Text.ToDecimal, 0), 0), CveCuenta:=CveCuentaB, TipoCambio:=TipoCambioPago, CveSubProyecto:=CveSubProyecto) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtImporte.Text.ToDecimal, Referencia, 30, ConceptoMovimiento, TxtFechaDocumento.Text.ToDate, IdCuenta, -1, CveIE, CveProveedor:=CveProveedor, ImporteMX:=If(CveMoneda = 2, Math.Round(TxtImporte.Text.Trim.ToDecimal * TipoCambioPago, 2, MidpointRounding.AwayFromZero), TxtImporte.Text.Trim.ToDecimal), ImporteME:=If(DivTC.Visible, If(TxtTC.Text.ToDecimal > 0, TxtImporte.Text.ToDecimal / TxtTC.Text.ToDecimal, 0), 0), TipoCambio:=TipoCambioPago, CveSubProyecto:=CveSubProyecto) Then
MsgError = "No se pudo insertar la póliza"
End If
@@ -2509,9 +2438,7 @@ Partial Class Bancos_ProveedoresAbonar
End If
IdCuenta = dr("IdCtaContable").ToString.ToEntero
- CveCuentaB = dr("IdCtaContableSIG").ToString.ToEntero
IdCuentaBancariaComplementaria = dr("IdCtaContableComplementaria").ToString.ToEntero
- CveCuentaBancariaComplementaria = dr("IdCtaContableComplementariaSIG").ToString.ToEntero
End If
' si no tiene CveMoneda, o es -1, cuando cambia de cuenta filtra las facturas
@@ -3108,7 +3035,6 @@ Partial Class Bancos_ProveedoresAbonar
For Each gr As GridViewRow In GvCxP.Rows
If gr.FCCheckBox("Chk").Checked Then
Dim IdCtaContable As Integer = CtaProveedor
- Dim CveCuenta As Integer = CveCuentaProveedor
Dim Saldo As Decimal = gr.DataKey("Saldo").ToDecimal
Dim TCCompra As Decimal = gr.DataKey("TipoCambio").ToDecimal
Dim TCPago As Decimal = GlobalTipoCambio(TxtFechaIncobrable.Text.ToDate).ToDecimal
@@ -3138,30 +3064,23 @@ Partial Class Bancos_ProveedoresAbonar
If CveMoneda > 1 AndAlso (IdCtaContComplementaria > 0 Or UsaComplementariaProveedores) Then
IdCtaContable = IdCtaContComplementaria
- CveCuenta = CveCuentaProveedorExtranjera
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, 0.00D, gr.DataKey("SerieFolio").ToString, CveConceptoContableComplementaria, ConceptoPartida, Now, IdCtaContable:=IdCtaContable, CveIE:=-1, IdSegmentoNegocio:=-1, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=Math.Round(Saldo * TCCompra - Saldo, 2, MidpointRounding.AwayFromZero), ImporteME:=Saldo, TipoCambio:=TCCompra, CveCuenta:=CveCuentaComplementaria) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, 0.00D, gr.DataKey("SerieFolio").ToString, CveConceptoContableComplementaria, ConceptoPartida, Now, IdCtaContable:=IdCtaContable, CveIE:=-1, IdSegmentoNegocio:=-1, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=Math.Round(Saldo * TCCompra - Saldo, 2, MidpointRounding.AwayFromZero), ImporteME:=Saldo, TipoCambio:=TCCompra) Then
MsgError = "No se pudo insertar la póliza"
End If
IdCtaContable = IdCtaProveedorExtranjera
- CveCuenta = CveCuentaProveedorExtranjera
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Saldo, gr.DataKey("SerieFolio").ToString, CveConceptoContablePago, ConceptoPartida, Now, IdCtaContable:=IdCtaContable, CveIE:=-1, IdSegmentoNegocio:=-1, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=Saldo, ImporteME:=If(CveMoneda > 1, Saldo, 0), TipoCambio:=TCCompra, CveCuenta:=CveCuenta) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Saldo, gr.DataKey("SerieFolio").ToString, CveConceptoContablePago, ConceptoPartida, Now, IdCtaContable:=IdCtaContable, CveIE:=-1, IdSegmentoNegocio:=-1, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=Saldo, ImporteME:=If(CveMoneda > 1, Saldo, 0), TipoCambio:=TCCompra) Then
MsgError = "Ocurrio un error al saldar el movimiento"
End If
Else
If CveMoneda > 1 Then
IdCtaContable = IdCtaProveedorExtranjera
- CveCuenta = CveCuentaProveedorExtranjera
End If
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Saldo, gr.DataKey("SerieFolio").ToString, CveConceptoContablePago, ConceptoPartida, Now, IdCtaContable:=IdCtaContable, CveIE:=-1, IdSegmentoNegocio:=-1, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=If(CveMoneda = 1, Saldo, Saldo * TCCompra), ImporteME:=If(CveMoneda > 1, Saldo, 0), TipoCambio:=TCCompra, CveCuenta:=CveCuenta) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Saldo, gr.DataKey("SerieFolio").ToString, CveConceptoContablePago, ConceptoPartida, Now, IdCtaContable:=IdCtaContable, CveIE:=-1, IdSegmentoNegocio:=-1, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=If(CveMoneda = 1, Saldo, Saldo * TCCompra), ImporteME:=If(CveMoneda > 1, Saldo, 0), TipoCambio:=TCCompra) Then
MsgError = "Ocurrio un error al saldar el movimiento"
End If
End If
-
-
-
-
Dim PorcentajePago As Decimal = gr.DataKey("Saldo").ToDecimal / gr.DataKey("Original").ToDecimal
If MsgError = "" AndAlso gr.DataKey("IVA").ToDecimal > 0 Then
@@ -3190,11 +3109,10 @@ Partial Class Bancos_ProveedoresAbonar
If ObjConta.GetRetCuenta(25, UsuarioActual.CveEmpresa) Then
If ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSxAcreditar").ToString.ToEntero
- CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSxAcreditarSIG").ToString.ToEntero
End If
End If
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, IEPS, gr.DataKey("SerieFolio").ToString, 25, ConceptoPartida, Now, IdCtaContable:=IdCtaContable, CveIE:=-1, IdSegmentoNegocio:=-1, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=If(CveMoneda = 1, IEPS, IEPS * If(FuncionalidadFluctuacionImpuestos, TCPago, TCCompra)), CveCuenta:=CveCuenta) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, IEPS, gr.DataKey("SerieFolio").ToString, 25, ConceptoPartida, Now, IdCtaContable:=IdCtaContable, CveIE:=-1, IdSegmentoNegocio:=-1, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=If(CveMoneda = 1, IEPS, IEPS * If(FuncionalidadFluctuacionImpuestos, TCPago, TCCompra))) Then
MsgError = "Ocurrio un error al saldar el movimiento"
End If
@@ -3203,7 +3121,7 @@ Partial Class Bancos_ProveedoresAbonar
End If
' se manda al ot ingresos, los impuestos por acreditar
- If MsgError = "" AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Saldo, gr.DataKey("SerieFolio").ToString, 78, ConceptoPartida, Now, IdCtaContable:=UsuarioActual.Empresa.IdCuentaOtrosIngresos, CveIE:=-1, IdSegmentoNegocio:=-1, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=If(CveMoneda = 1, Saldo, Saldo * TCPago), TipoCambio:=TCCompra, TipoCambioPago:=TCPago, CveCuenta:=-1, CveSubProyecto:=CveSubProyecto) Then
+ If MsgError = "" AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Saldo, gr.DataKey("SerieFolio").ToString, 78, ConceptoPartida, Now, IdCtaContable:=UsuarioActual.Empresa.IdCuentaOtrosIngresos, CveIE:=-1, IdSegmentoNegocio:=-1, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=If(CveMoneda = 1, Saldo, Saldo * TCPago), TipoCambio:=TCCompra, TipoCambioPago:=TCPago, CveSubProyecto:=CveSubProyecto) Then
MsgError = "Ocurrio un error al saldar el movimiento"
End If
@@ -3330,7 +3248,7 @@ Partial Class Bancos_ProveedoresAbonar
Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init
RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString
- RVTxtFechaDocumentoMenor.MinimumValue = DateTime.Now.AddMonths(-4).ToShortDateString
+ RVTxtFechaDocumentoMenor.MinimumValue = DateTime.Now.AddMonths(-12).ToShortDateString
RVTxtFechaDocumentoMenor.MaximumValue = DateTime.Now.ToShortDateString
Calendario.EndDate = DateTime.Now
diff --git a/Bin/GoCfdi.dll b/Bin/GoCfdi.dll
index 9b90aa84d..aba020c12 100644
Binary files a/Bin/GoCfdi.dll and b/Bin/GoCfdi.dll differ
diff --git a/Bin/Microsoft.AspNet.SignalR.Core.xml b/Bin/Microsoft.AspNet.SignalR.Core.xml
index 1fd189758..421b8482c 100644
--- a/Bin/Microsoft.AspNet.SignalR.Core.xml
+++ b/Bin/Microsoft.AspNet.SignalR.Core.xml
@@ -4,6 +4,52 @@
Microsoft.AspNet.SignalR.Core
+
+
+ Apply to Hubs and Hub methods to authorize client connections to Hubs and authorize client invocations of Hub methods.
+
+
+
+
+ Set to false to apply authorization only to the invocations of any of the Hub's server-side methods.
+ This property only affects attributes applied to the Hub class.
+ This property cannot be read.
+
+
+
+
+ Gets or sets the user roles.
+
+
+
+
+ Gets or sets the authorized users.
+
+
+
+
+ Determines whether client is authorized to connect to .
+
+ Description of the hub client is attempting to connect to.
+ The (re)connect request from the client.
+ true if the caller is authorized to connect to the hub; otherwise, false.
+
+
+
+ Determines whether client is authorized to invoke the method.
+
+ An providing details regarding the method invocation.
+ Indicates whether the interface instance is an attribute applied directly to a method.
+ true if the caller is authorized to invoke the method; otherwise, false.
+
+
+
+ When overridden, provides an entry point for custom authorization checks.
+ Called by and .
+
+ The for the client being authorize
+ true if the user is authorized, otherwise, false
+
The amount of time the client should wait without seeing a keep alive before trying to reconnect.
@@ -21,301 +67,6 @@
-
-
- The dependency resolver to use for the hub connection.
-
-
-
-
- Gets of sets a boolean that determines if JSONP is enabled.
-
-
-
-
- Represents a connection to the client.
-
-
-
-
- Writes buffered data.
-
- The data to write to the buffer.
-
-
-
- Flushes the buffered response to the client.
-
- A task that represents when the data has been flushed.
-
-
-
- Gets a cancellation token that represents the client's lifetime.
-
-
-
-
- Gets or sets the status code of the response.
-
-
-
-
- Gets or sets the content type of the response.
-
-
-
-
- Encapsulates all information about a SignalR connection for an .
-
-
-
-
- Encapsulates all information about an individual SignalR connection for an .
-
-
-
-
- Provides access to information about a .
-
-
-
-
- Encapsulates all information about a SignalR connection for an .
-
-
-
-
- Gets the the hub.
-
-
-
-
- Provides methods that communicate with SignalR connections that connected to a .
-
-
-
-
- Provides methods that communicate with SignalR connections that connected to a .
-
-
-
-
- This marker interface can be used in lieu of IDisposable in order to indicate to the dependency resolver that
- it should not retain/track references nor invoke Dispose on instances of the resolved type.
- This is useful for transient types that are created by the dependency resolver, but are short-lived and will
- be Disposed by some other means outside of the resolver.
-
-
-
-
- Called when a new connection is made to the .
-
-
-
-
- Called when a connection reconnects to the after a timeout.
-
-
-
-
- Called when a connection disconnects from the gracefully or due to a timeout.
-
-
- true, if stop was called on the client closing the connection gracefully;
- false, if the connection has been lost for longer than the
- .
- Timeouts can be caused by clients reconnecting to another SignalR server in scaleout.
-
-
-
-
- Gets a . Which contains information about the calling client.
-
-
-
-
- Gets a dynamic object that represents all clients connected to this hub (not hub instance).
-
-
-
-
- Gets the the hub instance.
-
-
-
-
- Called when a connection disconnects from this hub gracefully or due to a timeout.
-
-
- true, if stop was called on the client closing the connection gracefully;
- false, if the connection has been lost for longer than the
- .
- Timeouts can be caused by clients reconnecting to another SignalR server in scaleout.
-
- A
-
-
-
- Called when the connection connects to this hub instance.
-
- A
-
-
-
- Called when the connection reconnects to this hub instance.
-
- A
-
-
-
- Gets a dynamic object that represents all clients connected to this hub (not hub instance).
-
-
-
-
- Provides information about the calling client.
-
-
-
-
- The group manager for this hub instance.
-
-
-
-
- Gets a dynamic object that represents all clients connected to this hub (not hub instance).
-
-
-
-
- Determines whether JavaScript proxies for the server-side hubs should be auto generated at {Path}/hubs or {Path}/js.
- Defaults to true.
-
-
-
-
- Determines whether detailed exceptions thrown in Hub methods get reported back the invoking client.
- Defaults to false.
-
-
-
-
- A server side proxy for the client side hub.
-
-
-
-
- Invokes a method on the connection(s) represented by the instance.
-
- name of the method to invoke
- argumetns to pass to the client
- A task that represents when the data has been sent to the client.
-
-
-
- Returns a dynamic representation of all clients except the calling client ones specified.
-
- The list of connection ids to exclude
- A dynamic representation of all clients except the calling client ones specified.
-
-
-
- Returns a dynamic representation of the connection with the specified connectionid.
-
- The connection id
- A dynamic representation of the specified client.
-
-
-
- Returns a dynamic representation of the connections with the specified connectionids.
-
- The connection ids.
- A dynamic representation of the specified clients.
-
-
-
- Returns a dynamic representation of the specified group.
-
- The name of the group
- The list of connection ids to exclude
- A dynamic representation of the specified group.
-
-
-
- Returns a dynamic representation of the specified groups.
-
- The names of the groups.
- The list of connection ids to exclude
- A dynamic representation of the specified groups.
-
-
-
- Holds information about a single hub method.
-
-
-
-
- Name of Descriptor.
-
-
-
-
- Flags whether the name was specified.
-
-
-
-
- The return type of this method.
-
-
-
-
- Hub descriptor object, target to this method.
-
-
-
-
- Available method parameters.
-
-
-
-
- Method invocation delegate.
- Takes a target hub and an array of invocation arguments as it's arguments.
-
-
-
-
- Attributes attached to this method.
-
-
-
-
- The exception to be sent to the calling client.
- This will be overridden by a generic Exception unless Error is a
- or is set to true.
-
-
-
-
- The value to return in lieu of throwing Error. Whenever Result is set, Error will be set to null.
-
-
-
-
- Provides access to information about a .
-
-
-
-
- Encapsulates all information about a SignalR connection for an .
-
-
-
-
- Gets the the hub.
-
-
Provides access to server configuration.
@@ -363,137 +114,60 @@
Gets or sets a representing tell the client to wait before restablishing a
- long poll connection after data is sent from the server.
+ long poll connection after data is sent from the server.
The default value is 0.
-
+
- A buffering text writer that supports writing binary directly as well
+ Gets or sets the maximum number of scaleout mappings per scaleout stream stored on the server.
+ The default value is 65535
-
+
- TextWriter implementation over a write delegate optimized for writing in small chunks
- we don't need to write to a long lived buffer. This saves massive amounts of memory
- as the number of connections grows.
+ The dependency resolver to use for the hub connection.
-
+
- Implemented on anything that has the ability to write raw binary data
+ Gets of sets a boolean that determines if JSONP is enabled.
-
+
- Default implementation.
+ Sends a message to all connections subscribed to the specified signal. An example of signal may be a
+ specific connection id.
+ The connection
+ The connectionId to send to.
+ The value to publish.
+ A task that represents when the broadcast is complete.
-
+
- Provides access to hubs and persistent connections references.
+ Sends a message to all connections subscribed to the specified signal. An example of signal may be a
+ specific connection id.
+ The connection
+ The connection ids to send to.
+ The value to publish.
+ A task that represents when the broadcast is complete.
-
+
- Returns a for the specified .
+ Broadcasts a value to all connections, excluding the connection ids specified.
- Type of the
- a for the specified
-
-
-
- Returns a for the specified hub.
-
- Name of the hub
- a for the specified hub
-
-
-
- Returns a for the specified .
-
- Type of the
- Interface implemented by the client proxy
- a for the specified
-
-
-
- Returns a for the specified hub.
-
- Name of the hub
- Interface implemented by the client proxy
- a for the specified hub
-
-
-
- Returns a for the .
-
- Type of the
- A for the .
-
-
-
- Initializes a new instance of the class.
-
- The .
-
-
-
- Returns a for the .
-
- Type of the
- A for the .
-
-
-
- Returns a for the .
-
- Type of the
- A for the .
-
-
-
- Returns a for the specified .
-
- Type of the
- a for the specified
-
-
-
- Returns a for the specified hub.
-
- Name of the hub
- a for the specified hub
-
-
-
- Returns a for the specified .
-
- Type of the
- Interface implemented by the client proxy
- a for the specified
-
-
-
- Returns a for the specified hub.
-
- Name of the hub
- Interface implemented by the client proxy
- a for the specified hub
+ The connection
+ The value to broadcast.
+ The list of connection ids to exclude
+ A task that represents when the broadcast is complete.
A message sent to one more connections.
-
-
- Initializes a new instance of the class.
-
- The signal
- The payload of the message
- The signals to exclude.
-
The signal to this message should be sent to. Connections subscribed to this signal
@@ -517,6 +191,14 @@
receive this message.
+
+
+ Initializes a new instance of the class.
+
+ The signal
+ The payload of the message
+ The signals to exclude.
+
Provides access to default host information.
@@ -547,82 +229,89 @@
-
+
- Represents a SignalR request
+ The default implementation.
-
+
- Reads the form of the http request
+ Initializes a new instance of the class.
-
+ The this group resides on.
+ The prefix for this group. Either a name or type name.
-
+
- Gets the url for this request.
+ Sends a value to the specified group.
+
+ The name of the group.
+ The value to send.
+ The list of connection ids to exclude
+ A task that represents when send is complete.
+
+
+
+ Sends a value to the specified group.
+
+ The names of the groups.
+ The value to send.
+ The list of connection ids to exclude
+ A task that represents when send is complete.
+
+
+
+ Adds a connection to the specified group.
+
+ The connection id to add to the group.
+ The name of the group
+ A task that represents the connection id being added to the group.
+
+
+
+ Removes a connection from the specified group.
+
+ The connection id to remove from the group.
+ The name of the group
+ A task that represents the connection id being removed from the group.
+
+
+
+ Represents a connection to the client.
-
+
- The local path part of the url
+ Gets a cancellation token that represents the client's lifetime.
-
+
- Gets the querystring for this request.
+ Gets or sets the status code of the response.
-
+
- Gets the headers for this request.
+ Gets or sets the content type of the response.
-
+
- Gets the cookies for this request.
+ Writes buffered data.
+ The data to write to the buffer.
-
+
- Gets security information for the current HTTP request.
-
-
-
-
- Gets the owin enviornment
-
-
-
-
- A converter for dictionaries that uses a SipHash comparer
+ Flushes the buffered response to the client.
+ A task that represents when the data has been flushed.
Represents a web socket.
-
-
- Sends data over the websocket.
-
- The value to send.
- A that represents the send is complete.
-
-
-
- Sends a chunk of data over the websocket ("endOfMessage" flag set to false.)
-
-
- A that represents the send is complete.
-
-
-
- Sends a zero byte data chunk with the "endOfMessage" flag set to true.
-
- A that represents the flush is complete.
-
Invoked when data is sent over the websocket
@@ -638,6 +327,31 @@
Invoked when there is an error
+
+
+ Sends data over the websocket.
+
+ The value to send.
+ A that represents the send is complete.
+
+
+
+ Responsible for creating instances.
+
+
+
+
+ Creates a new instance of the class.
+
+ The dependency resolver to use for when creating the .
+
+
+
+ Creates an instance of the specified type using the dependency resolver or the type's default constructor.
+
+ The type of to create.
+ An instance of a .
+
Extension methods for .
@@ -651,6 +365,129 @@
The data to write to the connection.
A task that represents when the connection is closed.
+
+
+ Provides methods that communicate with SignalR connections that connected to a .
+
+
+
+
+ Determines whether JavaScript proxies for the server-side hubs should be auto generated at {Path}/hubs or {Path}/js.
+ Defaults to true.
+
+
+
+
+ Determines whether detailed exceptions thrown in Hub methods get reported back the invoking client.
+ Defaults to false.
+
+
+
+
+ A description of a client-side hub method invocation.
+
+
+
+
+ The name of the hub that the method being invoked belongs to.
+
+
+
+
+ The name of the client-side hub method be invoked.
+
+
+
+
+ The argument list the client-side hub method will be called with.
+
+
+
+
+ A key-value store representing the hub state on the server that has changed since the last time the hub
+ state was sent to the client.
+
+
+
+
+ Provides methods that communicate with SignalR connections that connected to a .
+
+
+
+
+ Gets a dynamic object that represents all clients connected to this hub (not hub instance).
+
+
+
+
+ Provides information about the calling client.
+
+
+
+
+ The group manager for this hub instance.
+
+
+
+
+ Called when a connection disconnects from this hub gracefully or due to a timeout.
+
+
+ true, if stop was called on the client closing the connection gracefully;
+ false, if the connection has been lost for longer than the
+ .
+ Timeouts can be caused by clients reconnecting to another SignalR server in scaleout.
+
+ A
+
+
+
+ Called when the connection connects to this hub instance.
+
+ A
+
+
+
+ Called when the connection reconnects to this hub instance.
+
+ A
+
+
+
+ Gets the connection id of the calling client.
+
+
+
+
+ Gets the cookies for the request.
+
+
+
+
+ Gets the headers for the request.
+
+
+
+
+ Gets the querystring for the request.
+
+
+
+
+ Gets the for the request.
+
+
+
+
+ Gets the for the current HTTP request.
+
+
+
+
+ This constructor is only intended to enable mocking of the class. Use of this constructor
+ for other purposes may result in unexpected behavior.
+
+
Encapsulates all information about an individual SignalR connection for an .
@@ -671,20 +508,6 @@
The connection id.
The connection hub state.
-
-
- Returns a dynamic representation of all clients in a group except the calling client.
-
- The name of the group
- A dynamic representation of all clients in a group except the calling client.
-
-
-
- Returns a dynamic representation of all clients in the specified groups except the calling client.
-
- The name of the groups
- A dynamic representation of all clients in a group except the calling client.
-
All connected clients except the calling client.
@@ -701,6 +524,405 @@
via the property (such as in VB.NET or in typed Hubs).
+
+
+ Returns a dynamic representation of all clients in a group except the calling client.
+
+ The name of the group
+ A dynamic representation of all clients in a group except the calling client.
+
+
+
+ Returns a dynamic representation of all clients in the specified groups except the calling client.
+
+ The name of the groups
+ A dynamic representation of all clients in a group except the calling client.
+
+
+
+ Returns a dynamic representation of all clients except the calling client ones specified.
+
+ The list of connection ids to exclude
+ A dynamic representation of all clients except the calling client ones specified.
+
+
+
+ Returns a dynamic representation of the connection with the specified connectionid.
+
+ The connection id
+ A dynamic representation of the specified client.
+
+
+
+ Returns a dynamic representation of the connections with the specified connectionids.
+
+ The connection ids.
+ A dynamic representation of the specified clients.
+
+
+
+ Returns a dynamic representation of the specified group.
+
+ The name of the group
+ The list of connection ids to exclude
+ A dynamic representation of the specified group.
+
+
+
+ Returns a dynamic representation of the specified groups.
+
+ The names of the groups.
+ The list of connection ids to exclude
+ A dynamic representation of the specified groups.
+
+
+
+ Handles all communication over the hubs persistent connection.
+
+
+
+
+ Initializes an instance of the class.
+
+ Configuration settings determining whether to enable JS proxies and provide clients with detailed hub errors.
+
+
+
+ Processes the hub's incoming method calls.
+
+
+
+
+ The response returned from an incoming hub request.
+
+
+
+
+ The changes made the the round tripped state.
+
+
+
+
+ The result of the invocation.
+
+
+
+
+ The id of the operation.
+
+
+
+
+ The progress update of the invocation.
+
+
+
+
+ Indicates whether the Error is a see .
+
+
+
+
+ The exception that occurs as a result of invoking the hub method.
+
+
+
+
+ The stack trace of the exception that occurs as a result of invoking the hub method.
+
+
+
+
+ Extra error data contained in the
+
+
+
+
+ A server side proxy for the client side hub.
+
+
+
+
+ Invokes a method on the connection(s) represented by the instance.
+
+ name of the method to invoke
+ arguments to pass to the client
+ A task that represents when the data has been sent to the client.
+
+
+
+ Gets a . Which contains information about the calling client.
+
+
+
+
+ Gets a dynamic object that represents all clients connected to this hub (not hub instance).
+
+
+
+
+ Gets the the hub instance.
+
+
+
+
+ Called when a new connection is made to the .
+
+
+
+
+ Called when a connection reconnects to the after a timeout.
+
+
+
+
+ Called when a connection disconnects from the gracefully or due to a timeout.
+
+
+ true, if stop was called on the client closing the connection gracefully;
+ false, if the connection has been lost for longer than the
+ .
+ Timeouts can be caused by clients reconnecting to another SignalR server in scaleout.
+
+
+
+
+ Encapsulates all information about an individual SignalR connection for an .
+
+
+
+
+ Encapsulates all information about a SignalR connection for an .
+
+
+
+
+ Handles parsing incoming requests through the .
+
+
+
+
+ Parses the incoming hub payload into a .
+
+ The raw hub payload.
+ The JsonSerializer used to parse the data.
+ The resulting .
+
+
+
+ Resolves a parameter value based on the provided object.
+
+ Parameter descriptor.
+ Value to resolve the parameter value from.
+ The parameter value.
+
+
+
+ Resolves method parameter values based on provided objects.
+
+ Method descriptor.
+ List of values to resolve parameter values from.
+ Array of parameter values.
+
+
+
+ Name of Descriptor.
+
+
+
+
+ Flags whether the name was specified.
+
+
+
+
+ Holds information about a single hub.
+
+
+
+
+ Hub type.
+
+
+
+
+ Holds information about a single hub method.
+
+
+
+
+ The return type of this method.
+
+
+
+
+ Hub descriptor object, target to this method.
+
+
+
+
+ Available method parameters.
+
+
+
+
+ Method invocation delegate.
+ Takes a target hub and an array of invocation arguments as it's arguments.
+
+
+
+
+ Attributes attached to this method.
+
+
+
+
+ Holds information about a single hub method parameter.
+
+
+
+
+ Parameter name.
+
+
+
+
+ Parameter type.
+
+
+
+
+ Describes hub descriptor provider, which provides information about available hubs.
+
+
+
+
+ Retrieve all avaiable hubs.
+
+ Collection of hub descriptors.
+
+
+
+ Tries to retrieve hub with a given name.
+
+ Name of the hub.
+ Retrieved descriptor object.
+ True, if hub has been found
+
+
+
+ Describes a hub manager - main point in the whole hub and method lookup process.
+
+
+
+
+ Retrieves a single hub descriptor.
+
+ Name of the hub.
+ Hub descriptor, if found. Null, otherwise.
+
+
+
+ Retrieves all available hubs matching the given predicate.
+
+ List of hub descriptors.
+
+
+
+ Resolves a given hub name to a concrete object.
+
+ Name of the hub.
+ Hub implementation instance, if found. Null otherwise.
+
+
+
+ Resolves all available hubs to their concrete objects.
+
+ List of hub instances.
+
+
+
+ Retrieves a method with a given name on a given hub.
+
+ Name of the hub.
+ Name of the method to find.
+ Method parameters to match.
+ Descriptor of the method, if found. Null otherwise.
+
+
+
+ Gets all methods available to call on a given hub.
+
+ Name of the hub,
+ Optional predicate for filtering results.
+ List of available methods.
+
+
+
+ Describes a hub method provider that builds a collection of available methods on a given hub.
+
+
+
+
+ Retrieve all methods on a given hub.
+
+ Hub descriptor object.
+ Available methods.
+
+
+
+ Tries to retrieve a method.
+
+ Hub descriptor object
+ Name of the method.
+ Descriptor of the method, if found. Null otherwise.
+ Method parameters to match.
+ True, if a method has been found.
+
+
+
+ Describes a parameter resolver for resolving parameter-matching values based on provided information.
+
+
+
+
+ Resolves method parameter values based on provided objects.
+
+ Method descriptor.
+ List of values to resolve parameter values from.
+ Array of parameter values.
+
+
+
+ Retrieves an existing dictionary of all available methods for a given hub from cache.
+ If cache entry does not exist - it is created automatically by BuildMethodCacheFor.
+
+
+
+
+
+
+ Builds a dictionary of all possible methods on a given hub.
+ Single entry contains a collection of available overloads for a given method name (key).
+ This dictionary is being cached afterwards.
+
+ Hub to build cache for
+ Dictionary of available methods
+
+
+
+ Searches the specified Hub for the specified .
+
+
+ In the case that there are multiple overloads of the specified , the parameter set helps determine exactly which instance of the overload should be resolved.
+ If there are multiple overloads found with the same number of matching parameters, none of the methods will be returned because it is not possible to determine which overload of the method was intended to be resolved.
+
+ Hub to search for the specified on.
+ The method name to search for.
+ If successful, the that was resolved.
+ The set of parameters that will be used to help locate a specific overload of the specified .
+ True if the method matching the name/parameter set is found on the hub, otherwise false.
+
This module is added the the HubPipeline by default.
@@ -717,100 +939,54 @@
authorizers that will be applied globally to all hubs and hub methods.
+
+
+ Interface to be implemented by s that can authorize client to connect to a .
+
+
+
+
+ Given a , determine whether client is authorized to connect to .
+
+ Description of the hub client is attempting to connect to.
+ The connection request from the client.
+ true if the caller is authorized to connect to the hub; otherwise, false.
+
+
+
+ Interface to be implemented by s that can authorize the invocation of methods.
+
+
+
+
+ Given a , determine whether client is authorized to invoke the method.
+
+ An providing details regarding the method invocation.
+ Indicates whether the interface instance is an attribute applied directly to a method.
+ true if the caller is authorized to invoke the method; otherwise, false.
+
+
+
+ The exception to be sent to the calling client.
+ This will be overridden by a generic Exception unless Error is a
+ or is set to true.
+
+
+
+
+ The value to return in lieu of throwing Error. Whenever Result is set, Error will be set to null.
+
+
Common base class to simplify the implementation of IHubPipelineModules.
A module can intercept and customize various stages of hub processing such as connecting, reconnecting, disconnecting,
invoking server-side hub methods, invoking client-side hub methods, authorizing hub clients and rejoining hub groups.
A module can be activated by calling .
- The combined modules added to the are invoked via the
+ The combined modules added to the are invoked via the
interface.
-
-
- An can intercept and customize various stages of hub processing such as connecting,
- reconnecting, disconnecting, invoking server-side hub methods, invoking client-side hub methods, authorizing hub
- clients and rejoining hub groups.
- Modules can be be activated by calling .
- The combined modules added to the are invoked via the
- interface.
-
-
-
-
- Wraps a function that invokes a server-side hub method. Even if a client has not been authorized to connect
- to a hub, it will still be authorized to invoke server-side methods on that hub unless it is prevented in
- by not executing the invoke parameter.
-
- A function that invokes a server-side hub method.
- A wrapped function that invokes a server-side hub method.
-
-
-
- Wraps a function that invokes a client-side hub method.
-
- A function that invokes a client-side hub method.
- A wrapped function that invokes a client-side hub method.
-
-
-
- Wraps a function that is called when a client connects to the for each
- the client connects to. By default, this results in the 's
- OnConnected method being invoked.
-
- A function to be called when a client connects to a hub.
- A wrapped function to be called when a client connects to a hub.
-
-
-
- Wraps a function that is called when a client reconnects to the for each
- the client connects to. By default, this results in the 's
- OnReconnected method being invoked.
-
- A function to be called when a client reconnects to a hub.
- A wrapped function to be called when a client reconnects to a hub.
-
-
-
- Wraps a function that is called when a client disconnects from the for each
- the client was connected to. By default, this results in the 's
- OnDisconnected method being invoked.
-
-
- A task-returning function to be called when a client disconnects from a hub.
- This function takes two parameters:
- 1. The is being disconnected from.
- 2. A boolean, stopCalled, that is true if stop was called on the client and false if the client timed out.
- Timeouts can be caused by clients reconnecting to another SignalR server in scaleout.
-
- A wrapped function to be called when a client disconnects from a hub.
-
-
-
- Wraps a function to be called before a client subscribes to signals belonging to the hub described by the
- . By default, the will look for attributes on the
- to help determine if the client is authorized to subscribe to method invocations for the
- described hub.
- The function returns true if the client is authorized to subscribe to client-side hub method
- invocations; false, otherwise.
-
-
- A function that dictates whether or not the client is authorized to connect to the described Hub.
-
-
- A wrapped function that dictates whether or not the client is authorized to connect to the described Hub.
-
-
-
-
- Wraps a function that determines which of the groups belonging to the hub described by the
- the client should be allowed to rejoin.
- By default, clients will rejoin all the groups they were in prior to reconnecting.
-
- A function that determines which groups the client should be allowed to rejoin.
- A wrapped function that determines which groups the client should be allowed to rejoin.
-
Wraps a function that invokes a server-side hub method. Even if a client has not been authorized to connect
@@ -1015,76 +1191,29 @@
A description of the server-side hub method invocation.
-
+
- Apply to Hubs and Hub methods to authorize client connections to Hubs and authorize client invocations of Hub methods.
+ A description of a server-side hub method invocation originating from a client.
-
+
- Interface to be implemented by s that can authorize client to connect to a .
+ A hub instance that contains the invoked method as a member.
-
+
- Given a , determine whether client is authorized to connect to .
-
- Description of the hub client is attempting to connect to.
- The connection request from the client.
- true if the caller is authorized to connect to the hub; otherwise, false.
-
-
-
- Interface to be implemented by s that can authorize the invocation of methods.
+ A description of the method being invoked by the client.
-
+
- Given a , determine whether client is authorized to invoke the method.
-
- An providing details regarding the method invocation.
- Indicates whether the interface instance is an attribute applied directly to a method.
- true if the caller is authorized to invoke the method; otherwise, false.
-
-
-
- Determines whether client is authorized to connect to .
-
- Description of the hub client is attempting to connect to.
- The (re)connect request from the client.
- true if the caller is authorized to connect to the hub; otherwise, false.
-
-
-
- Determines whether client is authorized to invoke the method.
-
- An providing details regarding the method invocation.
- Indicates whether the interface instance is an attribute applied directly to a method.
- true if the caller is authorized to invoke the method; otherwise, false.
-
-
-
- When overridden, provides an entry point for custom authorization checks.
- Called by and .
-
- The for the client being authorize
- true if the user is authorized, otherwise, false
-
-
-
- Set to false to apply authorization only to the invocations of any of the Hub's server-side methods.
- This property only affects attributes applied to the Hub class.
- This property cannot be read.
+ The arguments to be passed to the invoked method.
-
+
- Gets or sets the user roles.
-
-
-
-
- Gets or sets the authorized users.
+ A key-value store representing the hub state on the client at the time of the invocation.
@@ -1121,40 +1250,29 @@
not receive the method invocation regardless of the .
-
+
- A description of a client-side hub method invocation.
+ A collection of modules that can intercept and customize various stages of hub processing such as connecting,
+ reconnecting, disconnecting, invoking server-side hub methods, invoking client-side hub methods, authorizing
+ hub clients and rejoining hub groups.
-
+
- The name of the hub that the method being invoked belongs to.
+ Adds an to the hub pipeline. Modules added to the pipeline first will wrap
+ modules that are added to the pipeline later. All modules must be added to the pipeline before any methods
+ on the are invoked.
-
-
-
- The name of the client-side hub method be invoked.
-
-
-
-
- The argument list the client-side hub method will be called with.
-
-
-
-
- A key-value store representing the hub state on the server that has changed since the last time the hub
- state was sent to the client.
-
-
-
-
- Requiring Authentication adds an to the with
- and authorizers that will be applied globally to all hubs and hub methods.
- These authorizers require that the 's
- IsAuthenticated for any clients that invoke server-side hub methods or receive client-side hub method invocations.
-
- The to which the will be added.
+
+ A module that may intercept and customize various stages of hub processing such as connecting,
+ reconnecting, disconnecting, invoking server-side hub methods, invoking client-side hub methods, authorizing
+ hub clients and rejoining hub groups.
+
+
+ The itself with the newly added module allowing
+ calls to be chained.
+ This method mutates the pipeline it is invoked on so it is not necessary to store its result.
+
@@ -1228,123 +1346,154 @@
A list of groups the client is allowed to rejoin.
-
+
- A description of a server-side hub method invocation originating from a client.
+ An can intercept and customize various stages of hub processing such as connecting,
+ reconnecting, disconnecting, invoking server-side hub methods, invoking client-side hub methods, authorizing hub
+ clients and rejoining hub groups.
+ Modules can be be activated by calling .
+ The combined modules added to the are invoked via the
+ interface.
-
+
- A hub instance that contains the invoked method as a member.
+ Wraps a function that invokes a server-side hub method. Even if a client has not been authorized to connect
+ to a hub, it will still be authorized to invoke server-side methods on that hub unless it is prevented in
+ by not executing the invoke parameter.
+ A function that invokes a server-side hub method.
+ A wrapped function that invokes a server-side hub method.
-
+
- A description of the method being invoked by the client.
+ Wraps a function that invokes a client-side hub method.
+ A function that invokes a client-side hub method.
+ A wrapped function that invokes a client-side hub method.
-
+
- The arguments to be passed to the invoked method.
+ Wraps a function that is called when a client connects to the for each
+ the client connects to. By default, this results in the 's
+ OnConnected method being invoked.
+ A function to be called when a client connects to a hub.
+ A wrapped function to be called when a client connects to a hub.
-
+
- A key-value store representing the hub state on the client at the time of the invocation.
+ Wraps a function that is called when a client reconnects to the for each
+ the client connects to. By default, this results in the 's
+ OnReconnected method being invoked.
+ A function to be called when a client reconnects to a hub.
+ A wrapped function to be called when a client reconnects to a hub.
-
+
- Handles parsing incoming requests through the .
+ Wraps a function that is called when a client disconnects from the for each
+ the client was connected to. By default, this results in the 's
+ OnDisconnected method being invoked.
+
+ A task-returning function to be called when a client disconnects from a hub.
+ This function takes two parameters:
+ 1. The is being disconnected from.
+ 2. A boolean, stopCalled, that is true if stop was called on the client and false if the client timed out.
+ Timeouts can be caused by clients reconnecting to another SignalR server in scaleout.
+
+ A wrapped function to be called when a client disconnects from a hub.
-
+
- Parses the incoming hub payload into a .
+ Wraps a function to be called before a client subscribes to signals belonging to the hub described by the
+ . By default, the will look for attributes on the
+ to help determine if the client is authorized to subscribe to method invocations for the
+ described hub.
+ The function returns true if the client is authorized to subscribe to client-side hub method
+ invocations; false, otherwise.
- The raw hub payload.
- The JsonSerializer used to parse the data.
- The resulting .
+
+ A function that dictates whether or not the client is authorized to connect to the described Hub.
+
+
+ A wrapped function that dictates whether or not the client is authorized to connect to the described Hub.
+
-
+
- The response returned from an incoming hub request.
-
-
-
-
- The changes made the the round tripped state.
-
-
-
-
- The result of the invocation.
-
-
-
-
- The id of the operation.
-
-
-
-
- The progress update of the invocation.
-
-
-
-
- Indicates whether the Error is a see .
-
-
-
-
- The exception that occurs as a result of invoking the hub method.
-
-
-
-
- The stack trace of the exception that occurs as a result of invoking the hub method.
-
-
-
-
- Extra error data contained in the
+ Wraps a function that determines which of the groups belonging to the hub described by the
+ the client should be allowed to rejoin.
+ By default, clients will rejoin all the groups they were in prior to reconnecting.
+ A function that determines which groups the client should be allowed to rejoin.
+ A wrapped function that determines which groups the client should be allowed to rejoin.
A change tracking dictionary.
-
+
- A collection of modules that can intercept and customize various stages of hub processing such as connecting,
- reconnecting, disconnecting, invoking server-side hub methods, invoking client-side hub methods, authorizing
- hub clients and rejoining hub groups.
+ Requiring Authentication adds an to the with
+ and authorizers that will be applied globally to all hubs and hub methods.
+ These authorizers require that the 's
+ IsAuthenticated for any clients that invoke server-side hub methods or receive client-side hub method invocations.
+
+ The to which the will be added.
+
+
+
+ Provides methods that communicate with SignalR connections that connected to a .
-
+
- Adds an to the hub pipeline. Modules added to the pipeline first will wrap
- modules that are added to the pipeline later. All modules must be added to the pipeline before any methods
- on the are invoked.
+ Gets a dynamic object that represents all clients connected to this hub (not hub instance).
-
- A module that may intercept and customize various stages of hub processing such as connecting,
- reconnecting, disconnecting, invoking server-side hub methods, invoking client-side hub methods, authorizing
- hub clients and rejoining hub groups.
-
-
- The itself with the newly added module allowing
- calls to be chained.
- This method mutates the pipeline it is invoked on so it is not necessary to store its result.
-
+
+
+
+ A communication channel for a and its connections.
+
+
+
+
+ The main signal for this connection. This is the main signalr for a .
+
+
+
+
+ Sends a message to connections subscribed to the signal.
+
+ The message to send.
+ A task that returns when the message has be sent.
Manages groups for a connection and allows sending messages to the group.
+
+
+ Sends a value to the specified group.
+
+ The name of the group.
+ The value to send.
+ The list of connection ids to exclude
+ A task that represents when send is complete.
+
+
+
+ Sends a value to the specified groups.
+
+ The names of the groups.
+ The value to send.
+ The list of connection ids to exclude
+ A task that represents when send is complete.
+
Manages groups for a connection.
@@ -1366,23 +1515,166 @@
The name of the group
A task that represents the connection id being removed from the group.
-
+
- Sends a value to the specified group.
+ Provides access to information about a .
- The name of the group.
- The value to send.
- The list of connection ids to exclude
- A task that represents when send is complete.
-
+
- Sends a value to the specified groups.
+ Encapsulates all information about a SignalR connection for an .
- The names of the groups.
- The value to send.
- The list of connection ids to exclude
- A task that represents when send is complete.
+
+
+
+ Gets the the hub.
+
+
+
+
+ Provides access to information about a .
+
+
+
+
+ Encapsulates all information about a SignalR connection for an .
+
+
+
+
+ Gets the the hub.
+
+
+
+
+ A singleton that subscribes to all ACKs sent over the
+ and
+ triggers any corresponding ACKs on the .
+
+
+
+
+ Default implementation.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The .
+
+
+
+ Returns a for the .
+
+ Type of the
+ A for the .
+
+
+
+ Returns a for the .
+
+ Type of the
+ A for the .
+
+
+
+ Returns a for the specified .
+
+ Type of the
+ a for the specified
+
+
+
+ Returns a for the specified hub.
+
+ Name of the hub
+ a for the specified hub
+
+
+
+ Returns a for the specified .
+
+ Type of the
+ Interface implemented by the client proxy
+ a for the specified
+
+
+
+ Returns a for the specified hub.
+
+ Name of the hub
+ Interface implemented by the client proxy
+ a for the specified hub
+
+
+
+ Helper class to manage disposing a resource at an arbirtary time
+
+
+
+
+ Implemented on anything that has the ability to write raw binary data
+
+
+
+
+ Provides access to hubs and persistent connections references.
+
+
+
+
+ Returns a for the specified .
+
+ Type of the
+ a for the specified
+
+
+
+ Returns a for the specified hub.
+
+ Name of the hub
+ a for the specified hub
+
+
+
+ Returns a for the specified .
+
+ Type of the
+ Interface implemented by the client proxy
+ a for the specified
+
+
+
+ Returns a for the specified hub.
+
+ Name of the hub
+ Interface implemented by the client proxy
+ a for the specified hub
+
+
+
+ Returns a for the .
+
+ Type of the
+ A for the .
+
+
+
+ Acquires a sub-segment of a larger memory allocation. Used for async sends of write-behind
+ buffers to reduce number of array segments pinned
+
+ The smallest length of the ArraySegment.Count that may be returned
+ An array segment which is a sub-block of a larger allocation
+
+
+
+ Frees a sub-segment of a larger memory allocation produced by AllocSegment. The original ArraySegment
+ must be frees exactly once and must have the same offset and count that was returned by the Alloc.
+ If a segment is not freed it won't be re-used and has the same effect as a memory leak, so callers must be
+ implemented exactly correctly.
+
+ The sub-block that was originally returned by a call to AllocSegment.
@@ -1590,6 +1882,38 @@
Gets the performance counter representing the current scaleout send queue length.
+
+
+ Minifies a string in a way that can be reversed by this instance of .
+
+ The string to be minified
+ A minified representation of the without the following characters:,|\
+
+
+
+ Reverses a call that was executed at least once previously on this instance of
+ without any subsequent calls to sharing the
+ same argument as the call that returned .
+
+
+ A minified string that was returned by a previous call to .
+
+
+ The argument of all previous calls to that returned .
+ If every call to on this instance of has never
+ returned or if the most recent call to that did
+ return was followed by a call to sharing
+ the same argument, may return null but must not throw.
+
+
+
+
+ A call to this function indicates that any future attempt to unminify strings that were previously minified
+ from may be met with a null return value. This provides an opportunity clean up
+ any internal data structures that reference .
+
+ The string that may have previously have been minified.
+
Manages performance counters using Windows performance counters.
@@ -1605,13 +1929,6 @@
Creates a new instance.
-
-
- Initializes the performance counters.
-
- The host instance name.
- The CancellationToken representing the host shutdown.
-
Gets the performance counter representing the total number of connection Connect events since the application was started.
@@ -1797,10 +2114,12 @@
Gets the performance counter representing the current scaleout send queue length.
-
+
- Helper class to manage disposing a resource at an arbirtary time
+ Initializes the performance counters.
+ The host instance name.
+ The CancellationToken representing the host shutdown.
@@ -1809,6 +2128,80 @@
- Dispose may be called after Cancel.
+
+
+ Helpers for decoding URI query components.
+
+
+
+
+ Provides access to information about a .
+
+
+
+
+ Gets the for the .
+
+
+
+
+ Gets the for the .
+
+
+
+
+ Represents a SignalR request
+
+
+
+
+ Gets the url for this request.
+
+
+
+
+ The local path part of the url
+
+
+
+
+ Gets the querystring for this request.
+
+
+
+
+ Gets the headers for this request.
+
+
+
+
+ Gets the cookies for this request.
+
+
+
+
+ Gets security information for the current HTTP request.
+
+
+
+
+ Gets the owin environment
+
+
+
+
+ Reads the form of the http request
+
+
+
+
+
+ This marker interface can be used in lieu of IDisposable in order to indicate to the dependency resolver that
+ it should not retain/track references nor invoke Dispose on instances of the resolved type.
+ This is useful for transient types that are created by the dependency resolver, but are short-lived and will
+ be Disposed by some other means outside of the resolver.
+
+
Represents a JSON value.
@@ -1844,205 +2237,6 @@
An implementation of IJsonValue over JSON.NET
-
-
- Sends a message to all connections subscribed to the specified signal. An example of signal may be a
- specific connection id.
-
- The connection
- The connectionId to send to.
- The value to publish.
- A task that represents when the broadcast is complete.
-
-
-
- Sends a message to all connections subscribed to the specified signal. An example of signal may be a
- specific connection id.
-
- The connection
- The connection ids to send to.
- The value to publish.
- A task that represents when the broadcast is complete.
-
-
-
- Broadcasts a value to all connections, excluding the connection ids specified.
-
- The connection
- The value to broadcast.
- The list of connection ids to exclude
- A task that represents when the broadcast is complete.
-
-
-
- Describes a parameter resolver for resolving parameter-matching values based on provided information.
-
-
-
-
- Resolves method parameter values based on provided objects.
-
- Method descriptor.
- List of values to resolve parameter values from.
- Array of parameter values.
-
-
-
- Resolves a parameter value based on the provided object.
-
- Parameter descriptor.
- Value to resolve the parameter value from.
- The parameter value.
-
-
-
- Resolves method parameter values based on provided objects.
-
- Method descriptor.
- List of values to resolve parameter values from.
- Array of parameter values.
-
-
-
- Holds information about a single hub method parameter.
-
-
-
-
- Parameter name.
-
-
-
-
- Parameter type.
-
-
-
-
- Describes a hub method provider that builds a collection of available methods on a given hub.
-
-
-
-
- Retrieve all methods on a given hub.
-
- Hub descriptor object.
- Available methods.
-
-
-
- Tries to retrieve a method.
-
- Hub descriptor object
- Name of the method.
- Descriptor of the method, if found. Null otherwise.
- Method parameters to match.
- True, if a method has been found.
-
-
-
- Retrieves an existing dictionary of all available methods for a given hub from cache.
- If cache entry does not exist - it is created automatically by BuildMethodCacheFor.
-
-
-
-
-
-
- Builds a dictionary of all possible methods on a given hub.
- Single entry contains a collection of available overloads for a given method name (key).
- This dictionary is being cached afterwards.
-
- Hub to build cache for
- Dictionary of available methods
-
-
-
- Searches the specified Hub for the specified .
-
-
- In the case that there are multiple overloads of the specified , the parameter set helps determine exactly which instance of the overload should be resolved.
- If there are multiple overloads found with the same number of matching parameters, none of the methods will be returned because it is not possible to determine which overload of the method was intended to be resolved.
-
- Hub to search for the specified on.
- The method name to search for.
- If successful, the that was resolved.
- The set of parameters that will be used to help locate a specific overload of the specified .
- True if the method matching the name/parameter set is found on the hub, otherwise false.
-
-
-
- Holds information about a single hub.
-
-
-
-
- Hub type.
-
-
-
-
- Describes a hub manager - main point in the whole hub and method lookup process.
-
-
-
-
- Retrieves a single hub descriptor.
-
- Name of the hub.
- Hub descriptor, if found. Null, otherwise.
-
-
-
- Retrieves all available hubs matching the given predicate.
-
- List of hub descriptors.
-
-
-
- Resolves a given hub name to a concrete object.
-
- Name of the hub.
- Hub implementation instance, if found. Null otherwise.
-
-
-
- Resolves all available hubs to their concrete objects.
-
- List of hub instances.
-
-
-
- Retrieves a method with a given name on a given hub.
-
- Name of the hub.
- Name of the method to find.
- Method parameters to match.
- Descriptor of the method, if found. Null otherwise.
-
-
-
- Gets all methods available to call on a given hub.
-
- Name of the hub,
- Optional predicate for filtering results.
- List of available methods.
-
-
-
- Provides access to information about a .
-
-
-
-
- Gets the for the .
-
-
-
-
- Gets the for the .
-
-
Extensions for .
@@ -2083,67 +2277,43 @@
The object to serailize.
A JSON string representation of the object.
-
+
- Minifies a string in a way that can be reversed by this instance of .
-
- The string to be minified
- A minified representation of the without the following characters:,|\
-
-
-
- Reverses a call that was executed at least once previously on this instance of
- without any subsequent calls to sharing the
- same argument as the call that returned .
-
-
- A minified string that was returned by a previous call to .
-
-
- The argument of all previous calls to that returned .
- If every call to on this instance of has never
- returned or if the most recent call to that did
- return was followed by a call to sharing
- the same argument, may return null but must not throw.
-
-
-
-
- A call to this function indicates that any future attempt to unminify strings that were previously minified
- from may be met with a null return value. This provides an opportunity clean up
- any internal data structures that reference .
-
- The string that may have previously have been minified.
-
-
-
- This class is the main coordinator.
- It schedules work to be done for a particular subscription.
+ Helper class for common JSON operations.
-
+
- Represents a message to the scaleout backplane
+ Converts the specified name to camel case.
+
+ The name to convert.
+ A camel cased version of the specified name.
+
+
+
+ Gets a string that returns JSON mime type "application/json; charset=UTF-8".
-
+
- The messages from SignalR
+ Gets a string that returns JSONP mime type "application/javascript; charset=UTF-8".
-
+
- The time the message was created on the origin server
+ Creates a default instance.
+ The newly created .
-
+
- Common base class for scaleout message bus implementations.
+ Creates a instance with the default setting.
+ The newly created .
-
+
-
+ A converter for dictionaries that uses a SipHash comparer
@@ -2164,6 +2334,67 @@
+
+
+ Which connection the message originated from
+
+
+
+
+ The signal for the message (connection id, group, etc)
+
+
+
+
+ The message payload
+
+
+
+
+ The command id if this message is a command
+
+
+
+
+ Determines if the caller should wait for acknowledgement for this message
+
+
+
+
+ Determines if this message is itself an ACK
+
+
+
+
+ A list of connection ids to filter out
+
+
+
+
+ The encoding of the message
+
+
+
+
+ The payload id. Only used in scaleout scenarios
+
+
+
+
+ The stream index this message came from. Only used the scaleout scenarios.
+
+
+
+
+ This class is the main coordinator.
+ It schedules work to be done for a particular subscription.
+
+
+
+
+
+
+
@@ -2204,6 +2435,65 @@
The key to create the topic for.
A for the specified key.
+
+
+
+
+
+
+
+ Gets an associated with the result.
+
+
+
+
+ Initializes a new instance of the struct.
+
+ The array of messages associated with this .
+ The amount of messages populated in the messages array.
+
+
+
+ Common settings for scale-out message bus implementations.
+
+
+
+
+ Gets or sets a value that represents the queuing behavior for scale-out messages.
+ Defaults to QueuingBehavior.InitialOnly
+
+
+
+
+ The maximum length of the outgoing send queue. Messages being sent to the backplane are queued
+ up to this length. After the max length is reached, further sends will throw an InvalidOperationException.
+
+
+
+
+ Represents a message to the scaleout backplane
+
+
+
+
+ The messages from SignalR
+
+
+
+
+ The time the message was created on the origin server
+
+
+
+
+ Common base class for scaleout message bus implementations.
+
+
+
+
+ The number of streams can't change for the lifetime of this instance.
+
+
Opens the specified queue for sending messages.
@@ -2239,227 +2529,26 @@
The scaleout message.
-
-
- The number of streams can't change for the lifetime of this instance.
-
-
-
-
-
-
-
-
-
- Initializes a new instance of the struct.
-
- The array of messages associated with this .
- The amount of messages populated in the messages array.
-
-
-
- Gets an associated with the result.
-
-
-
-
- Common settings for scale-out message bus implementations.
-
-
-
-
- Gets or sets a value that represents the queuing behavior for scale-out messages.
- Defaults to QueuingBehavior.InitialOnly
-
-
-
-
- The maximum length of the outgoing send queue. Messages being sent to the backplane are queued
- up to this length. After the max length is reached, further sends will throw an InvalidOperationException.
-
-
-
-
- Responsible for creating instances.
-
-
-
-
- Creates a new instance of the class.
-
- The dependency resolver to use for when creating the .
-
-
-
- Creates an instance of the specified type using the dependency resolver or the type's default constructor.
-
- The type of to create.
- An instance of a .
-
-
-
- Helpers for decoding URI query components.
-
-
Standard keys and values for use within the OWIN interfaces
-
-
- Maps SignalR hubs to the app builder pipeline at "/signalr".
-
- The app builder
-
-
-
- Maps SignalR hubs to the app builder pipeline at "/signalr".
-
- The app builder
- The to use
-
-
-
- Maps SignalR hubs to the app builder pipeline at the specified path.
-
- The app builder
- The path to map signalr hubs
- The to use
-
-
-
- Adds SignalR hubs to the app builder pipeline.
-
- The app builder
-
-
-
- Adds SignalR hubs to the app builder pipeline.
-
- The app builder
- The to use
-
-
-
- Maps the specified SignalR to the app builder pipeline at
- the specified path.
-
- The type of
- The app builder
- The path to map the
-
-
-
- Maps the specified SignalR to the app builder pipeline at
- the specified path.
-
- The type of
- The app builder
- The path to map the persistent connection
- The to use
-
-
-
-
- Maps the specified SignalR to the app builder pipeline at
- the specified path.
-
- The app builder
- The path to map the persistent connection
- The type of
- The to use
-
-
-
- Adds the specified SignalR to the app builder.
-
- The type of
- The app builder
-
-
-
- Adds the specified SignalR to the app builder.
-
- The type of
- The app builder
- The to use
-
-
-
-
- Adds the specified SignalR to the app builder.
-
- The app builder
- The type of
- The to use
-
-
-
-
- Describes hub descriptor provider, which provides information about available hubs.
-
-
-
-
- Retrieve all avaiable hubs.
-
- Collection of hub descriptors.
-
-
-
- Tries to retrieve hub with a given name.
-
- Name of the hub.
- Retrieved descriptor object.
- True, if hub has been found
-
-
-
- This constructor is only intended to enable mocking of the class. Use of this constructor
- for other purposes may result in unexpected behavior.
-
-
-
-
- Gets the connection id of the calling client.
-
-
-
-
- Gets the cookies for the request.
-
-
-
-
- Gets the headers for the request.
-
-
-
-
- Gets the querystring for the request.
-
-
-
-
- Gets the for the request.
-
-
-
-
- Gets the for the current HTTP request.
-
-
-
-
- Handles all communication over the hubs persistent connection.
-
-
Represents a connection between client and server.
+
+
+ Gets the for the .
+
+
+
+
+ Gets the for the .
+
+
OWIN entry point.
@@ -2479,6 +2568,17 @@
Thrown if the connection id wasn't specified.
+
+
+ Validates the connection token and extracts the connection ID from it.
+
+ The representing the request.
+ The connection token to validate.
+ If this method returns true, this output parameter receives the connection ID contained within the token.
+ If this method returns false, this output parameter receives an error message to report.
+ If this method returns false, this output parameter receives an HTTP status code to report.
+ A boolean indicating if the connection token was valid.
+
Returns the signals used in the .
@@ -2542,114 +2642,6 @@
A that completes when the disconnect operation is complete.
-
-
- Gets the for the .
-
-
-
-
- Gets the for the .
-
-
-
-
- Initializes an instance of the class.
-
- Configuration settings determining whether to enable JS proxies and provide clients with detailed hub errors.
-
-
-
- Processes the hub's incoming method calls.
-
-
-
-
- Helper class for common JSON operations.
-
-
-
-
- Converts the specified name to camel case.
-
- The name to convert.
- A camel cased version of the specified name.
-
-
-
- Creates a default instance.
-
- The newly created .
-
-
-
- Creates a instance with the default setting.
-
- The newly created .
-
-
-
- Gets a string that returns JSON mime type "application/json; charset=UTF-8".
-
-
-
-
- Gets a string that returns JSONP mime type "application/javascript; charset=UTF-8".
-
-
-
-
- The default implementation.
-
-
-
-
- Initializes a new instance of the class.
-
- The this group resides on.
- The prefix for this group. Either a name or type name.
-
-
-
- Sends a value to the specified group.
-
- The name of the group.
- The value to send.
- The list of connection ids to exclude
- A task that represents when send is complete.
-
-
-
- Sends a value to the specified group.
-
- The names of the groups.
- The value to send.
- The list of connection ids to exclude
- A task that represents when send is complete.
-
-
-
- Adds a connection to the specified group.
-
- The connection id to add to the group.
- The name of the group
- A task that represents the connection id being added to the group.
-
-
-
- Removes a connection from the specified group.
-
- The connection id to remove from the group.
- The name of the group
- A task that represents the connection id being removed from the group.
-
-
-
- A singleton that subscribes to all ACKs sent over the
- and
- triggers any corresponding ACKs on the .
-
-
A strongly-typed resource class, for looking up localized strings, etc.
@@ -2786,6 +2778,11 @@
Looks up a localized string similar to KeepAlive value must be no more than a third of the DisconnectTimeout..
+
+
+ Looks up a localized string similar to The value of the MaxScaleoutMappingsPerStream property must be greater or equal to zero..
+
+
Looks up a localized string similar to '{0}' method could not be resolved. No method found with that name..
@@ -2916,46 +2913,16 @@
Looks up a localized string similar to Forbidden: JSONP is disabled..
+
+
+ Looks up a localized string similar to The hub name '{0}' is invalid..
+
+
Represents a connection that can be tracked by an .
-
-
- Applies a new state to the connection.
-
-
-
-
- Causes the connection to disconnect.
-
-
-
-
- Causes the connection to timeout.
-
-
-
-
- Sends a keep alive ping over the connection.
-
-
-
-
- Increments performance counter for current connections.
-
-
-
-
- Decrements performance counter for current connections.
-
-
-
-
- Kills the connection.
-
-
Gets the id of the connection.
@@ -3001,31 +2968,46 @@
Gets the uri of the connection.
+
+
+ Applies a new state to the connection.
+
+
+
+
+ Causes the connection to disconnect.
+
+
+
+
+ Causes the connection to timeout.
+
+
+
+
+ Sends a keep alive ping over the connection.
+
+
+
+
+ Increments performance counter for current connections.
+
+
+
+
+ Decrements performance counter for current connections.
+
+
+
+
+ Kills the connection.
+
+
Represents a transport that communicates
-
-
- Get groupsToken in request over the transport.
-
- groupsToken in request
-
-
-
- Processes the specified for this transport.
-
- The to process.
- A that completes when the transport has finished processing the connection.
-
-
-
- Sends data over the transport.
-
- The value to be sent.
- A that completes when the send is complete.
-
Gets or sets a callback that is invoked when the transport receives data.
@@ -3051,10 +3033,25 @@
Gets or sets the connection id for the transport.
-
+
- Pointed to the HTMLOutputWriter to wrap output stream with an HTML friendly one
+ Get groupsToken in request over the transport.
+ groupsToken in request
+
+
+
+ Processes the specified for this transport.
+
+ The to process.
+ A that completes when the transport has finished processing the connection.
+
+
+
+ Sends data over the transport.
+
+ The value to be sent.
+ A that completes when the send is complete.
@@ -3105,35 +3102,6 @@
The name of the transport to test.
True if the transport is supported, otherwise False.
-
-
- Default implementation of .
-
-
-
-
- Initializes and instance of the class.
-
- The .
-
-
-
- Adds a new connection to the list of tracked connections.
-
- The connection to be added.
-
-
-
- Removes a connection from the list of tracked connections.
-
- The connection to remove.
-
-
-
- Marks an existing connection as active.
-
- The connection to mark.
-
Represents a response to a connection.
@@ -3146,13 +3114,6 @@
A filter that determines whether messages should be written to the client.
The cursor writer.
-
-
- Serializes only the necessary components of the to JSON
- using Json.NET's JsonTextWriter to improve performance.
-
- The that receives the JSON serialization.
-
The list of messages to be sent to the receiving connection.
@@ -3188,72 +3149,41 @@
The time the long polling client should wait before reestablishing a connection if no data is received.
-
+
- A communication channel for a and its connections.
+ Serializes only the necessary components of the to JSON
+ using Json.NET's JsonTextWriter to improve performance.
+
+ The that receives the JSON serialization.
+
+
+
+ Default implementation of .
-
+
- Sends a message to connections subscribed to the signal.
+ Initializes and instance of the class.
- The message to send.
- A task that returns when the message has be sent.
+ The .
-
+
- The main signal for this connection. This is the main signalr for a .
+ Adds a new connection to the list of tracked connections.
+ The connection to be added.
-
+
- Which connection the message originated from
+ Removes a connection from the list of tracked connections.
+ The connection to remove.
-
+
- The signal for the message (connection id, group, etc)
-
-
-
-
- The message payload
-
-
-
-
- The command id if this message is a command
-
-
-
-
- Determines if the caller should wait for acknowledgement for this message
-
-
-
-
- Determines if this message is itself an ACK
-
-
-
-
- A list of connection ids to filter out
-
-
-
-
- The encoding of the message
-
-
-
-
- The payload id. Only used in scaleout scenarios
-
-
-
-
- The stream index this message came from. Only used the scaleout scenarios.
+ Marks an existing connection as active.
+ The connection to mark.
@@ -3293,5 +3223,94 @@
The name of the transport to test.
True if the transport is supported, otherwise False.
+
+
+ Maps SignalR hubs to the app builder pipeline at "/signalr".
+
+ The app builder
+
+
+
+ Maps SignalR hubs to the app builder pipeline at "/signalr".
+
+ The app builder
+ The to use
+
+
+
+ Maps SignalR hubs to the app builder pipeline at the specified path.
+
+ The app builder
+ The path to map signalr hubs
+ The to use
+
+
+
+ Adds SignalR hubs to the app builder pipeline.
+
+ The app builder
+
+
+
+ Adds SignalR hubs to the app builder pipeline.
+
+ The app builder
+ The to use
+
+
+
+ Maps the specified SignalR to the app builder pipeline at
+ the specified path.
+
+ The type of
+ The app builder
+ The path to map the
+
+
+
+ Maps the specified SignalR to the app builder pipeline at
+ the specified path.
+
+ The type of
+ The app builder
+ The path to map the persistent connection
+ The to use
+
+
+
+
+ Maps the specified SignalR to the app builder pipeline at
+ the specified path.
+
+ The app builder
+ The path to map the persistent connection
+ The type of
+ The to use
+
+
+
+ Adds the specified SignalR to the app builder.
+
+ The type of
+ The app builder
+
+
+
+ Adds the specified SignalR to the app builder.
+
+ The type of
+ The app builder
+ The to use
+
+
+
+
+ Adds the specified SignalR to the app builder.
+
+ The app builder
+ The type of
+ The to use
+
+
diff --git a/Bin/Microsoft.IdentityModel.JsonWebTokens.dll b/Bin/Microsoft.IdentityModel.JsonWebTokens.dll
index 1c17c5a22..3706dc751 100644
Binary files a/Bin/Microsoft.IdentityModel.JsonWebTokens.dll and b/Bin/Microsoft.IdentityModel.JsonWebTokens.dll differ
diff --git a/Bin/Microsoft.IdentityModel.Logging.dll b/Bin/Microsoft.IdentityModel.Logging.dll
index 60646a6da..bd5ad3a26 100644
Binary files a/Bin/Microsoft.IdentityModel.Logging.dll and b/Bin/Microsoft.IdentityModel.Logging.dll differ
diff --git a/Bin/Microsoft.IdentityModel.Tokens.dll b/Bin/Microsoft.IdentityModel.Tokens.dll
index 67cef9cb9..df612ddfe 100644
Binary files a/Bin/Microsoft.IdentityModel.Tokens.dll and b/Bin/Microsoft.IdentityModel.Tokens.dll differ
diff --git a/Bin/Microsoft.SqlServer.Types.dll b/Bin/Microsoft.SqlServer.Types.dll
index d4dd78993..1ccde4ab4 100644
Binary files a/Bin/Microsoft.SqlServer.Types.dll and b/Bin/Microsoft.SqlServer.Types.dll differ
diff --git a/Bin/System.IdentityModel.Tokens.Jwt.dll b/Bin/System.IdentityModel.Tokens.Jwt.dll
index bb9aec487..d48bf0826 100644
Binary files a/Bin/System.IdentityModel.Tokens.Jwt.dll and b/Bin/System.IdentityModel.Tokens.Jwt.dll differ
diff --git a/Bin/System.IdentityModel.Tokens.Jwt.dll.refresh b/Bin/System.IdentityModel.Tokens.Jwt.dll.refresh
index c2fd62bfd..bc64f028c 100644
Binary files a/Bin/System.IdentityModel.Tokens.Jwt.dll.refresh and b/Bin/System.IdentityModel.Tokens.Jwt.dll.refresh differ
diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb
index e3cb7e01f..0fe63b649 100644
--- a/Compras/Compras.aspx.vb
+++ b/Compras/Compras.aspx.vb
@@ -1,17 +1,15 @@
Option Explicit On
Option Strict On
-Imports Extensiones
-Imports System.Data
-Imports System.Xml
-Imports System.Globalization
-Imports System.Linq
Imports System
-Imports System.IO
-Imports ADServerControl
-Imports System.Threading.Tasks
+Imports System.Data
Imports System.Diagnostics
+Imports System.Globalization
+Imports System.IO
Imports System.Text.RegularExpressions
+Imports System.Threading.Tasks
+Imports System.Xml
+Imports Extensiones
Partial Class Compras_Compras
Inherits ClsPaginas
@@ -255,26 +253,13 @@ Partial Class Compras_Compras
Return ViewState("CtaProveedor").ToString.ToEntero
End Get
End Property
- Private ReadOnly Property CveCuentaProveedor As Integer
- Get
- Return ViewState("CveCuentaProveedor").ToString.ToEntero
- End Get
- End Property
+
Private ReadOnly Property CtaProveedorDeudores As Integer
Get
Return ViewState("CtaProveedorDeudores").ToString.ToEntero
End Get
End Property
- Private ReadOnly Property CveCuentaProveedorDeudores As Integer
- Get
- Return ViewState("CveCuentaProveedorDeudores").ToString.ToEntero
- End Get
- End Property
- Private ReadOnly Property CveCuentaProveedorAcreedores As Integer
- Get
- Return ViewState("CveCuentaProveedorAcreedores").ToString.ToEntero
- End Get
- End Property
+
Private ReadOnly Property CtaProveedorAcreedores As Integer
Get
Return ViewState("CtaProveedorAcreedores").ToString.ToEntero
@@ -285,79 +270,43 @@ Partial Class Compras_Compras
Return ViewState("CtaProveedorAnticipos").ToString.ToEntero
End Get
End Property
- Private ReadOnly Property CveCuentaProveedorAnticipos As Integer
- Get
- Return ViewState("CveCuentaProveedorAnticipos").ToString.ToEntero
- End Get
- End Property
+
Private ReadOnly Property CtaProveedorAnticiposExtranjera As Integer
Get
Return ViewState("CtaProveedorAnticiposExtranjera").ToString.ToEntero
End Get
End Property
- Private ReadOnly Property CveCuentaProveedorAnticiposExtranjera As Integer
- Get
- Return ViewState("CveCuentaProveedorAnticiposExtranjera").ToString.ToEntero
- End Get
- End Property
+
Private ReadOnly Property CtaProveedorAnticiposComplementaria As Integer
Get
Return ViewState("CtaProveedorAnticiposComplementaria").ToString.ToEntero
End Get
End Property
- Private ReadOnly Property CveCuentaProveedorAnticiposComplementaria As Integer
- Get
- Return ViewState("CveCuentaProveedorAnticiposComplementaria").ToString.ToEntero
- End Get
- End Property
Private ReadOnly Property CtaProveedorRetIVA As Integer
Get
Return ViewState("CtaProveedorRetIVA").ToString.ToEntero
End Get
End Property
- Private ReadOnly Property CveCuentaProveedorRetIVA As Integer
- Get
- Return ViewState("CveCuentaProveedorRetIVA").ToString.ToEntero
- End Get
- End Property
+
Private ReadOnly Property CtaProveedorRetISR As Integer
Get
Return ViewState("CtaProveedorRetISR").ToString.ToEntero
End Get
End Property
- Private ReadOnly Property CveCuentaProveedorRetISR As Integer
- Get
- Return ViewState("CveCuentaProveedorRetISR").ToString.ToEntero
- End Get
- End Property
- Private ReadOnly Property CveCuentaIEPS As Integer
- Get
- Return ViewState("CveCuentaIEPS").ToString.ToEntero
- End Get
- End Property
Private ReadOnly Property CtaProveedorExtranjera As Integer
Get
Return ViewState("CtaProveedorExtranjera").ToString.ToEntero
End Get
End Property
- Private ReadOnly Property CveCuentaProveedorExtranjera As Integer
- Get
- Return ViewState("CveCuentaProveedorExtranjera").ToString.ToEntero
- End Get
- End Property
Private ReadOnly Property CtaProveedorComplementaria As Integer
Get
Return ViewState("CtaProveedorComplementaria").ToString.ToEntero
End Get
End Property
- Private ReadOnly Property CveCuentaProveedorComplementaria As Integer
- Get
- Return ViewState("CveCuentaProveedorComplementaria").ToString.ToEntero
- End Get
- End Property
+
Private ReadOnly Property NombreProveedor As String
Get
Return ViewState("NombreProveedor").ToString
@@ -3291,18 +3240,6 @@ Partial Class Compras_Compras
ViewState("CtaProveedorComplementaria") = ObjProveedor.IdCtaContProveedoresComplementaria
ViewState("IdCtaContDocsXPagar") = ObjProveedor.IdCtaContDocsXPagar
- 'Conta SIG
- ViewState("CveCuentaProveedor") = ObjProveedor.CveCuentaProveedores
- ViewState("CveCuentaProveedorAnticipos") = ObjProveedor.CveCuentaAnticipos
- ViewState("CveCuentaProveedorAnticiposExtranjera") = ObjProveedor.CveCuentaAnticiposExtranjera
- ViewState("CveCuentaProveedorAnticiposComplementaria") = ObjProveedor.CveCuentaAnticiposComplementaria
- ViewState("CveCuentaProveedorDeudores") = ObjProveedor.CveCuentaDeudor
- ViewState("CveCuentaProveedorAcreedores") = ObjProveedor.CveCuentaAcreedor
- ViewState("CveCuentaProveedorRetISR") = ObjProveedor.CveCuentaRetISR
- ViewState("CveCuentaProveedorRetIVA") = ObjProveedor.CveCuentaRetIVA
- ViewState("CveCuentaProveedorExtranjera") = ObjProveedor.CveCuentaProveedoresExtranjera
- ViewState("CveCuentaProveedorComplementaria") = ObjProveedor.CveCuentaProveedoresComplementaria
-
ViewState("NombreProveedor") = ObjProveedor.RazonSocial
@@ -5874,12 +5811,10 @@ Partial Class Compras_Compras
Dim ConceptoContable As Integer = Row("CveConcepto").ToString.ToEntero
If chkImportacion.Checked And ConceptoContable = 14 Then
ConceptoContable = 287
-
End If
Dim TipoMovimiento As Boolean = If(Row("TipoMovto").ToString = "True", True, False)
Dim importeMovimiento As Decimal = 0
Dim IdCtaContable As Integer = 0
- Dim CveCuenta As Integer = 0
Dim Concepto As String = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, ConceptoContable, NombreProveedor, $"{TxtSerie.Text}-{TxtFolio.Text}", If(TxtDocumentoFolio.Visible, TxtDocumentoFolio.Text, If(TxtDocumentoFolioCaja.Visible, TxtDocumentoFolioCaja.Text, ConceptoPersonal)))
Dim importeMN As Decimal = 0
Dim Multiplicador As Integer = If(Row("Multiplicador").ToString.ToEntero = 1, 1, -1)
@@ -5911,8 +5846,6 @@ Partial Class Compras_Compras
End If
importeMN = importeMovimiento * TipoCambioCompra * Multiplicador
IdCtaContable = If(CveTipoConcepto = 2, CtaProveedorAcreedores, CtaProveedor)
- CveCuenta = CveCuentaProveedor
-
If RBLPago.SelectedValue.ToEntero = 4 And EstatusCredito.Contiene(2, 102) Then 'SI ES CRÉDITO Y ESTA PAGADO
@@ -5926,17 +5859,12 @@ Partial Class Compras_Compras
If ObjConta.GetRetCuenta(6, Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero) Then
If ObjConta.DtResultados.Rows.Count > 0 AndAlso ObjConta.DtResultados.Rows(0)("IdCuentaGasto").ToString.ToEntero > 0 Then
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaGasto").ToString.ToEntero
- CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaGastoSIG").ToString.ToEntero
Else
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToString.ToEntero
- CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToString.ToEntero
End If
End If
End If
-
-
-
'SEGMENTO DE NEGOCIO
Dim drT As DataRow = GlobalDTSubProyectos(-1, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero).FiltroPrimero(String.Format("CveSubProyecto = {0} ", Row2("CveSubProyecto").ToString.ToEntero))
@@ -5972,12 +5900,12 @@ Partial Class Compras_Compras
Dim ImporteSubCre As Decimal = TxtSubTotal.Text.ToDecimal
Dim ImporteSubCreMN As Decimal = TxtSubTotal.Text.ToDecimal * tipoCambioActual
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteSubCre, Referencia, 6, Concepto, FechaMovimiento, IdCtaContable, IdSegmentoNegocio, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=CveClasificacionDT, CveSubProyecto:=CveSubProyectoDT, ImporteMX:=ImporteSubCreMN, ImporteME:=If(tipoCambioActual = 1, 0, ImporteSubCre), CveCuenta:=CveCuenta, CveTipoGasto:=CveTipoGastoDT, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteSubCre, Referencia, 6, Concepto, FechaMovimiento, IdCtaContable, IdSegmentoNegocio, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=CveClasificacionDT, CveSubProyecto:=CveSubProyectoDT, ImporteMX:=ImporteSubCreMN, ImporteME:=If(tipoCambioActual = 1, 0, ImporteSubCre), CveTipoGasto:=CveTipoGastoDT, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
End If
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimiento, Referencia, 41, Concepto, FechaMovimiento, CtaProveedorAcreedores, IdSegmentoNegocio, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=CveClasificacionDT, CveSubProyecto:=CveSubProyectoDT, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, CveTipoGasto:=CveTipoGastoDT, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimiento, Referencia, 41, Concepto, FechaMovimiento, CtaProveedorAcreedores, IdSegmentoNegocio, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=CveClasificacionDT, CveSubProyecto:=CveSubProyectoDT, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveTipoGasto:=CveTipoGastoDT, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
End If
@@ -5988,10 +5916,10 @@ Partial Class Compras_Compras
Dim importeMNIn As Decimal = importeMovimientoIn * tipoCambioActual * Multiplicador
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimientoIn, Referencia, 41, Concepto, FechaMovimiento, CtaProveedorAcreedores, IdSegmentoNegocio, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=CveClasificacionDT, CveSubProyecto:=CveSubProyectoDT, ImporteMX:=importeMNIn, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimientoIn), CveCuenta:=CveCuenta, CveTipoGasto:=CveTipoGastoDT, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimientoIn, Referencia, 41, Concepto, FechaMovimiento, CtaProveedorAcreedores, IdSegmentoNegocio, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=CveClasificacionDT, CveSubProyecto:=CveSubProyectoDT, ImporteMX:=importeMNIn, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimientoIn), CveTipoGasto:=CveTipoGastoDT, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
End If
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimientoIn, Referencia, 50, Concepto, FechaMovimiento, ViewState("IdCtaContDocsXPagar").ToString.ToEntero(), IdSegmentoNegocio, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=CveClasificacionDT, CveSubProyecto:=CveSubProyectoDT, ImporteMX:=importeMNIn, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimientoIn), CveCuenta:=CveCuenta, CveTipoGasto:=CveTipoGastoDT, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimientoIn, Referencia, 50, Concepto, FechaMovimiento, ViewState("IdCtaContDocsXPagar").ToString.ToEntero(), IdSegmentoNegocio, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=CveClasificacionDT, CveSubProyecto:=CveSubProyectoDT, ImporteMX:=importeMNIn, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimientoIn), CveTipoGasto:=CveTipoGastoDT, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
End If
@@ -6006,24 +5934,21 @@ Partial Class Compras_Compras
If TipoCambioCompra = 1 Or DdlMoneda.SelectedValue.ToEntero = 1 Then
IdCtaContable = CtaProveedor
- CveCuenta = CveCuentaProveedor
importeMovimiento = importeMN
Else
IdCtaContable = CtaProveedorComplementaria
- CveCuenta = CveCuentaProveedorComplementaria
- If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or CveCuenta > 0) Then 'Cuando tiene complementaria lo dividimos en dos
+ If importeMovimiento <> 0 AndAlso (IdCtaContable > 0) Then 'Cuando tiene complementaria lo dividimos en dos
Dim CveConceptoContableComplementaria As Integer = 206
If CveTipoConcepto = 2 Then CveConceptoContableComplementaria = 310 'cuando es acreedor
importeMN = importeMovimiento
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento * TipoCambioCompra - importeMovimiento, Referencia, CveConceptoContableComplementaria, Concepto, FechaMovimiento, IdCtaContable, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=importeMovimiento * TipoCambioCompra - importeMovimiento, ImporteME:=importeMovimiento, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza, TipoCambio:=TipoCambioCompra) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento * TipoCambioCompra - importeMovimiento, Referencia, CveConceptoContableComplementaria, Concepto, FechaMovimiento, IdCtaContable, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=importeMovimiento * TipoCambioCompra - importeMovimiento, ImporteME:=importeMovimiento, Contabilizable:=SeContabiliza, TipoCambio:=TipoCambioCompra) Then
ErrorPrepoliza = True
End If
End If
IdCtaContable = CtaProveedorExtranjera
- CveCuenta = CveCuentaProveedorExtranjera
End If
Case 30 'Bancos
@@ -6037,19 +5962,16 @@ Partial Class Compras_Compras
If TCPago = 1 Or CveMonedaPago = 1 Then
IdCtaContable = IdCuentaBancaria
- CveCuenta = CveCuentaBancaria
Else
IdCtaContable = IdCuentaBancariaComplementaria
- CveCuenta = CveCuentaBancariaComplementaria
- If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or CveCuenta > 0) Then 'Cuando tiene complementaria lo dividimos en dos
+ If importeMovimiento <> 0 AndAlso (IdCtaContable > 0) Then 'Cuando tiene complementaria lo dividimos en dos
importeMN = importeMovimiento
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento * TCPago - importeMovimiento, Referencia, 204, Concepto, FechaMovimiento, IdCtaContable, -1, CveIE, CveProveedor:=CveProveedor, ImporteMX:=importeMovimiento * TCPago - importeMovimiento, ImporteME:=importeMovimiento, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza, TipoCambio:=TCPago) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento * TCPago - importeMovimiento, Referencia, 204, Concepto, FechaMovimiento, IdCtaContable, -1, CveIE, CveProveedor:=CveProveedor, ImporteMX:=importeMovimiento * TCPago - importeMovimiento, ImporteME:=importeMovimiento, Contabilizable:=SeContabiliza, TipoCambio:=TCPago) Then
ErrorPrepoliza = True
End If
End If
IdCtaContable = IdCuentaBancaria
- CveCuenta = CveCuentaBancaria
End If
@@ -6072,24 +5994,21 @@ Partial Class Compras_Compras
If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
If ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaIVAAcreditable").ToString.ToEntero
- CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaIVAAcreditableSIG").ToString.ToEntero
End If
End If
'Agregamos el Opuesto del 19 -> 14
If importeMovimiento <> 0 Then
Dim IdCtaIva As Integer = 0
- Dim CveCuentaIVA As Integer = 0
IdCtaIva = If(IdCtaIVAXAcreditar > 0, IdCtaIVAXAcreditar, 0)
If ObjConta.GetRetCuenta(14, UsuarioActual.CveEmpresa) And Not IdCtaIva > 0 Then
If ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaIva = ObjConta.DtResultados.Rows(0)("IdCuentaIVAxAcreditar").ToString.ToEntero
- CveCuentaIVA = ObjConta.DtResultados.Rows(0)("IdCuentaIVAxAcreditarSIG").ToString.ToEntero
End If
End If
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 14, Concepto + If(tipoCambioActual > 1, $" TC {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaIva, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuentaIVA, PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 14, Concepto + If(tipoCambioActual > 1, $" TC {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaIva, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then
ErrorPrepoliza = True
End If
End If
@@ -6104,7 +6023,6 @@ Partial Class Compras_Compras
If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
If ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaIVAxAcreditar").ToString.ToEntero
- CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaIVAxAcreditarSIG").ToString.ToEntero
End If
End If
@@ -6116,8 +6034,7 @@ Partial Class Compras_Compras
IdCtaContable = If(IdCtaIVAXAcreditar > 0, IdCtaIVAXAcreditar, 0)
If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
If ObjConta.DtResultados.Rows.Count > 0 Then
- IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
- CveCuenta = ObjConta.DtResultados.Rows(0)("IdCtaContableSIG").ToString.ToEntero
+ IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaIVAxAcreditar").ToString.ToEntero
End If
End If
@@ -6130,7 +6047,6 @@ Partial Class Compras_Compras
If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
If ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSxAcreditar").ToString.ToEntero
- CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSxAcreditarSIG").ToString.ToEntero
End If
End If
End If
@@ -6141,7 +6057,6 @@ Partial Class Compras_Compras
importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador
If tipoCambioActual > 1 Then Concepto += $" TC{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}"
IdCtaContable = If(UsuarioActual.CveEmpresa = 119, 1171, -1)
- CveCuenta = -1
End If
Case 26 'IEPS Acreditable
If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then
@@ -6150,22 +6065,19 @@ Partial Class Compras_Compras
If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
If ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero
- CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSAcreditableSIG").ToString.ToEntero
End If
End If
'Agregamos el Opuesto del 26 -> 25
If importeMovimiento <> 0 Then
Dim IdCtaIEPS As Integer = 0
- Dim CveCuentaIEPS As Integer = 0
If ObjConta.GetRetCuenta(25, UsuarioActual.CveEmpresa) Then
If ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaIEPS = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSxAcreditar").ToString.ToEntero
- CveCuentaIEPS = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSxAcreditarSIG").ToString.ToEntero
End If
End If
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 25, Concepto + If(tipoCambioActual > 1, $" TC {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaIEPS, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuentaIEPS, Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 25, Concepto + If(tipoCambioActual > 1, $" TC {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaIEPS, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then
ErrorPrepoliza = True
End If
End If
@@ -6181,14 +6093,12 @@ Partial Class Compras_Compras
importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador
If CtaProveedorRetIVA > 0 Then
IdCtaContable = CtaProveedorRetIVA
- CveCuenta = CveCuentaProveedorRetIVA
ElseIf UsuarioActual.Empresa.Funcionalidad(308).ToEntero > 0 Then
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(308).ToEntero
Else
If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
If ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
- CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
End If
End If
End If
@@ -6206,7 +6116,7 @@ Partial Class Compras_Compras
'Agregamos el Opuesto del 22 -> 15
If importeMovimiento <> 0 Then
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 15, Concepto + If(tipoCambioActual > 1, $" TC {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 15, Concepto + If(tipoCambioActual > 1, $" TC {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then
ErrorPrepoliza = True
End If
End If
@@ -6224,14 +6134,12 @@ Partial Class Compras_Compras
If tipoCambioActual > 1 Then Concepto += $" TC{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}"
If CtaProveedorRetIVA > 0 Then
IdCtaContable = CtaProveedorRetIVA
- CveCuenta = CveCuentaProveedorRetIVA
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
- CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
End If
End If
End If
@@ -6246,21 +6154,19 @@ Partial Class Compras_Compras
importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador
If CtaProveedorRetIVA > 0 Then
IdCtaContable = CtaProveedorRetIVA
- CveCuenta = CveCuentaProveedorRetIVA
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
- CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
End If
End If
End If
'Agregamos el Opuesto del 184 -> 183
If importeMovimiento <> 0 Then
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 183, Concepto + If(tipoCambioActual > 1, $" TC {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 183, Concepto + If(tipoCambioActual > 1, $" TC {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then
ErrorPrepoliza = True
End If
End If
@@ -6278,14 +6184,12 @@ Partial Class Compras_Compras
If tipoCambioActual > 1 Then Concepto += $" TC{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}"
If CtaProveedorRetIVA > 0 Then
IdCtaContable = CtaProveedorRetIVA
- CveCuenta = CveCuentaProveedorRetIVA
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
- CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
End If
End If
End If
@@ -6300,14 +6204,12 @@ Partial Class Compras_Compras
If tipoCambioActual > 1 Then Concepto += $" TC{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}"
If CtaProveedorRetIVA > 0 Then
IdCtaContable = CtaProveedorRetIVA
- CveCuenta = CveCuentaProveedorRetIVA
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
- CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
End If
End If
End If
@@ -6322,21 +6224,19 @@ Partial Class Compras_Compras
importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador
If CtaProveedorRetIVA > 0 Then
IdCtaContable = CtaProveedorRetIVA
- CveCuenta = CveCuentaProveedorRetIVA
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
- CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
End If
End If
End If
'Agregamos el Opuesto del 186 -> 185
If importeMovimiento <> 0 Then
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 185, Concepto + If(tipoCambioActual > 1, $" TC {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 185, Concepto + If(tipoCambioActual > 1, $" TC {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then
ErrorPrepoliza = True
End If
End If
@@ -6354,14 +6254,12 @@ Partial Class Compras_Compras
If tipoCambioActual > 1 Then Concepto += $" TC{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}"
If CtaProveedorRetIVA > 0 Then
IdCtaContable = CtaProveedorRetIVA
- CveCuenta = CveCuentaProveedorRetIVA
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
- CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
End If
End If
End If
@@ -6375,14 +6273,12 @@ Partial Class Compras_Compras
importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador
If CtaProveedorRetIVA > 0 Then
IdCtaContable = CtaProveedorRetIVA
- CveCuenta = CveCuentaProveedorRetIVA
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
- CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
End If
End If
End If
@@ -6398,21 +6294,19 @@ Partial Class Compras_Compras
' importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador
' If CtaProveedorRetISR > 0 Then
' IdCtaContable = CtaProveedorRetISR
- ' CveCuenta = CveCuentaProveedorRetISR
' 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
- ' CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
' End If
' End If
' End If
' 'Agregamos el Opuesto del 23 -> 16
' If importeMovimiento <> 0 Then
- ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 15, Concepto + If(tipoCambioActual > 1, $" TC {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
+ ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 15, Concepto + If(tipoCambioActual > 1, $" TC {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza) Then
' ErrorPrepoliza = True
' End If
' End If
@@ -6428,14 +6322,12 @@ Partial Class Compras_Compras
If tipoCambioActual > 1 Then Concepto += $" TC{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}"
If CtaProveedorRetISR > 0 Then
IdCtaContable = CtaProveedorRetISR
- CveCuenta = CveCuentaProveedorRetISR
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
- CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
End If
End If
End If
@@ -6448,14 +6340,12 @@ Partial Class Compras_Compras
importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador
If CtaProveedorRetISR > 0 Then
IdCtaContable = CtaProveedorRetISR
- CveCuenta = CveCuentaProveedorRetISR
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
- CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
End If
End If
End If
@@ -6470,20 +6360,18 @@ Partial Class Compras_Compras
' importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador
' If CtaProveedorRetISR > 0 Then
' IdCtaContable = CtaProveedorRetISR
- ' CveCuenta = CveCuentaProveedorRetISR
' 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
- ' CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
' End If
' End If
' End If
' 'Agregamos el Opuesto del 244 -> 243
' If importeMovimiento <> 0 Then
- ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 243, Concepto + If(tipoCambioActual > 1, $" TC {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
+ ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 243, Concepto + If(tipoCambioActual > 1, $" TC {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza) Then
' ErrorPrepoliza = True
' End If
' End If
@@ -6502,7 +6390,6 @@ Partial Class Compras_Compras
If TCPago > 0 AndAlso TCPago <> 1 AndAlso TxtFechaPago.Text <> TxtFecha.Text Then
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
- CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
If TCPago < TipoCambioCompra Then
importeMovimiento = Math.Abs(TCPago - TipoCambioCompra) * importePagoProv
importeMovimiento -= Math.Abs(TCPago - TipoCambioCompra) * importeIVAAcreditable
@@ -6524,7 +6411,6 @@ Partial Class Compras_Compras
If TCPago > 0 AndAlso TCPago <> 1 AndAlso TxtFechaPago.Text <> TxtFecha.Text Then
IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
- CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
If TCPago < TipoCambioCompra Then
importeMovimiento = Math.Abs(TCPago - TipoCambioCompra) * importePagoProv
importeMovimiento -= Math.Abs(TCPago - TipoCambioCompra) * importeIVAAcreditable
@@ -6542,7 +6428,6 @@ Partial Class Compras_Compras
'If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
' If ObjConta.DtResultados.Rows.Count > 0 Then
' IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
- ' CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
' End If
'End If
@@ -6582,7 +6467,6 @@ Partial Class Compras_Compras
If ObjConta.GetRetCuenta(49, Row2("CveActivoFijo").ToString.ToEntero) Then
If ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContActivoFijo").ToString.ToEntero
- CveCuenta = ObjConta.DtResultados.Rows(0)("IdCtaContActivoFijoSIG").ToString.ToEntero
End If
End If
@@ -6593,7 +6477,7 @@ Partial Class Compras_Compras
idCuentaContabilizacion = 0
End If
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Row2("CodAF").ToString, 49, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveActivoFijo:=Row2("CveActivoFijo").ToString.ToEntero, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Row2("CodAF").ToString, 49, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveActivoFijo:=Row2("CveActivoFijo").ToString.ToEntero, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
End If
End If
@@ -6603,7 +6487,6 @@ Partial Class Compras_Compras
'LIMPIA
importeMovimiento = 0
IdCtaContable = 0
- CveCuenta = 0
'COSTO ALMACEN
Dim DtAlmacenes = GlobalDTAlmacen(UsuarioActual.CveEmpresa)
@@ -6633,12 +6516,11 @@ Partial Class Compras_Compras
If ObjConta.GetRetCuenta(6, RowDetalle("CveClasificacion").ToString().ToEntero()) Then
If ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaGasto").ToString.ToEntero
- CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaGastoSIG").ToString.ToEntero
End If
End If
If importeMN <> 0 Then
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN, Referencia, 6, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual,
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN, Referencia, 6, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual,
CveClasificacion:=RowDetalle("CveClasificacion").ToString().ToEntero(), CveSubProyecto:=RowDetalle("CveSubProyecto").ToString().ToEntero(), Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
End If
@@ -6653,7 +6535,6 @@ Partial Class Compras_Compras
If ObjConta.GetRetCuenta(68, GvInv.HeaderRow.FCDropDownList("ddlAlmacen").SelectedValue.ToString.ToEntero) Then
If ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
- CveCuenta = ObjConta.DtResultados.Rows(0)("IdCtaContableSIG").ToString.ToEntero
End If
End If
If importeMN <> 0 Then
@@ -6664,13 +6545,13 @@ Partial Class Compras_Compras
End If
'SI ES GASTO CON ALMACEN NO DEBE CONTABILIZAR CONCEPTO 68
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN, Referencia, 68, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=If(DdlTipoCompra.SelectedValue = "10", False, SeContabiliza)) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN, Referencia, 68, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, Contabilizable:=If(DdlTipoCompra.SelectedValue = "10", False, SeContabiliza)) Then
ErrorPrepoliza = True
End If
'SI ES GASTO CON ALMACEN REGISTRA EL CONCEPTO 95
If DdlTipoCompra.SelectedValue = "10" Then
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMN, Referencia, 95, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=False) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMN, Referencia, 95, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, Contabilizable:=False) Then
ErrorPrepoliza = True
End If
End If
@@ -6684,7 +6565,6 @@ Partial Class Compras_Compras
'LIMPIA
importeMovimiento = 0
IdCtaContable = 0
- CveCuenta = 0
''FLETES
'If UsuarioActual.CveEmpresa.Contiene(119) And UsuarioActual.Empresa.UsaInventarios And DdlTipoComprobante.SelectedValue <> "NC" And Not UsuarioActual.Empresa.Funcionalidad(126) = "1" And CveConceptoContableAlmacen.Contiene(237, 240) Then
@@ -6779,8 +6659,8 @@ Partial Class Compras_Compras
SumatoriaInventario += Importe228 + Importe229
'se considera costoindirecto, para que la factura tiene en un concepto tipo servicio
SumatoriaOCINV += (Dr(If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, "ImporteSinImpuestos", "Total")).ToString.ToDecimal * tipoCambioActual) - (ImporteMN228 + ImporteMN229 - ImporteCI176)
- If ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, Importe228, Referencia, ConceptoContabilizacionME, Concepto, FechaMovimiento, IdCtaContableME, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=ImporteMN228, ImporteME:=ImporteME228, CveCuenta:=CveCuenta, CveOCDetalle:=Dr("CveOrdenCompraDetalle").ToString.ToEntero, TipoCambio:=TCAjuste, CveMovimientoAlmacen:=CveMovimientoAlmacen, Contabilizable:=SeContabiliza) Then
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, Importe229, Referencia, ConceptoContabilizacionMEComp, Concepto, FechaMovimiento, IdCtaContableMEComp, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=ImporteMN229, ImporteME:=ImporteME229, CveCuenta:=CveCuenta, CveOCDetalle:=Dr("CveOrdenCompraDetalle").ToString.ToEntero, TipoCambio:=TCAjuste, CveMovimientoAlmacen:=CveMovimientoAlmacen, Contabilizable:=SeContabiliza) Then
+ If ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, Importe228, Referencia, ConceptoContabilizacionME, Concepto, FechaMovimiento, IdCtaContableME, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=ImporteMN228, ImporteME:=ImporteME228, CveOCDetalle:=Dr("CveOrdenCompraDetalle").ToString.ToEntero, TipoCambio:=TCAjuste, CveMovimientoAlmacen:=CveMovimientoAlmacen, Contabilizable:=SeContabiliza) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, Importe229, Referencia, ConceptoContabilizacionMEComp, Concepto, FechaMovimiento, IdCtaContableMEComp, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=ImporteMN229, ImporteME:=ImporteME229, CveOCDetalle:=Dr("CveOrdenCompraDetalle").ToString.ToEntero, TipoCambio:=TCAjuste, CveMovimientoAlmacen:=CveMovimientoAlmacen, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
Exit For
End If
@@ -6793,7 +6673,7 @@ Partial Class Compras_Compras
SumatoriaInventario += Importe176
'se considera costoindirecto, para que la factura tiene en un concepto tipo servicio
SumatoriaOCINV += (Dr(If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, "ImporteSinImpuestos", "Total")).ToString.ToDecimal * tipoCambioActual) - (ImporteMN176 - ImporteCI176)
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, Importe176, Referencia, ConceptoContabilizacion, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=ImporteMN176, ImporteME:=ImporteME176, CveCuenta:=CveCuenta, CveOCDetalle:=Dr("CveOrdenCompraDetalle").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimientoAlmacen, Contabilizable:=SeContabiliza) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, Importe176, Referencia, ConceptoContabilizacion, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=ImporteMN176, ImporteME:=ImporteME176, CveOCDetalle:=Dr("CveOrdenCompraDetalle").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimientoAlmacen, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
Exit For
End If
@@ -6828,7 +6708,7 @@ Partial Class Compras_Compras
End If
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {CveClasificacionCostoOC}").ToString.ToEntero
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, SumatoriaOCINV, Referencia, 69, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveClasificacion:=CveClasificacionCostoOC, ImporteMX:=SumatoriaOCINV, CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza, CveSubProyecto:=CveSubProyecto69) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, SumatoriaOCINV, Referencia, 69, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveClasificacion:=CveClasificacionCostoOC, ImporteMX:=SumatoriaOCINV, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza, CveSubProyecto:=CveSubProyecto69) Then
ErrorPrepoliza = True
Exit For
End If
@@ -6837,8 +6717,8 @@ Partial Class Compras_Compras
Insertado205 = True
Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}"
If DdlMoneda.SelectedValue.ToEntero <> 1 AndAlso UsaComplementariaFleteImportaciones Then
- If ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContabilizacionME, Concepto, FechaMovimiento, IdCtaContableME, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMovimiento, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN - importeMovimiento, Referencia, ConceptoContabilizacionMEComp, Concepto, FechaMovimiento, IdCtaContableMEComp, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMN - importeMovimiento, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
+ If ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContabilizacionME, Concepto, FechaMovimiento, IdCtaContableME, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMovimiento, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN - importeMovimiento, Referencia, ConceptoContabilizacionMEComp, Concepto, FechaMovimiento, IdCtaContableMEComp, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMN - importeMovimiento, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
End If
Else
@@ -6846,7 +6726,7 @@ Partial Class Compras_Compras
End If
Else
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN, Referencia, ConceptoContabilizacion, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN, Referencia, ConceptoContabilizacion, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
End If
End If
@@ -6858,12 +6738,11 @@ Partial Class Compras_Compras
If ObjConta.GetRetCuenta(6, RowDetalle("CveClasificacion").ToString().ToEntero()) Then
If ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaGasto").ToString.ToEntero
- CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaGastoSIG").ToString.ToEntero
End If
End If
If importeMN <> 0 Then
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN, Referencia, 6, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual,
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN, Referencia, 6, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual,
CveClasificacion:=RowDetalle("CveClasificacion").ToString().ToEntero(), CveSubProyecto:=RowDetalle("CveSubProyecto").ToString().ToEntero(), Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
End If
@@ -6940,10 +6819,9 @@ Partial Class Compras_Compras
If DdlTipoCompra.SelectedValue = "10" AndAlso ConceptoContabilizacionNC = 68 Then
SeContabiliza = False
IdCtaContable = 0
- CveCuenta = 0
End If
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContabilizacionNC, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, CveMovimientoAlmacen:=CveMovimientoDevolucion, Contabilizable:=SeContabiliza) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContabilizacionNC, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, CveMovimientoAlmacen:=CveMovimientoDevolucion, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
End If
@@ -6967,8 +6845,8 @@ Partial Class Compras_Compras
Dim CveSubProyecto259 As Integer = TmpDT.MAX("CveSubProyecto").ToEntero
- If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimiento, Referencia, 259, Concepto, FechaMovimiento, IdCtaContableDescCompra, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza, CveSubProyecto:=CveSubProyecto259) Then
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -importeMovimiento, Referencia, 259, Concepto, FechaMovimiento, IdCtaContableDescCompra, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=-importeMN, ImporteME:=If(tipoCambioActual = 1, 0, -importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza, CveSubProyecto:=CveSubProyecto259) Then
+ If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimiento, Referencia, 259, Concepto, FechaMovimiento, IdCtaContableDescCompra, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza, CveSubProyecto:=CveSubProyecto259) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -importeMovimiento, Referencia, 259, Concepto, FechaMovimiento, IdCtaContableDescCompra, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=-importeMN, ImporteME:=If(tipoCambioActual = 1, 0, -importeMovimiento), TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza, CveSubProyecto:=CveSubProyecto259) Then
ErrorPrepoliza = True
End If
Else
@@ -7064,10 +6942,8 @@ Partial Class Compras_Compras
If ObjConta.GetRetCuenta(6, Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero) Then
If ObjConta.DtResultados.Rows.Count > 0 AndAlso ObjConta.DtResultados.Rows(0)("IdCuentaGasto").ToString.ToEntero > 0 Then
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaGasto").ToString.ToEntero
- ' CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaGastoSIG").ToString.ToEntero
Else
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToString.ToEntero
- ' CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToString.ToEntero
End If
End If
End If
@@ -7115,7 +6991,7 @@ Partial Class Compras_Compras
Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}"
importeMN = tipoCambioActual * importeMovimiento - importeMovimiento
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 266, Concepto, FechaMovimiento, tidctacon, IdSegmentoNegocio, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMN, ImporteME:=importeMovimiento, CveCuenta:=CveCuenta, CveTipoGasto:=Row2("CveTipoGasto").ToString.ToEntero, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 266, Concepto, FechaMovimiento, tidctacon, IdSegmentoNegocio, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMN, ImporteME:=importeMovimiento, CveTipoGasto:=Row2("CveTipoGasto").ToString.ToEntero, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
End If
importeMN = importeMovimiento
@@ -7125,7 +7001,7 @@ Partial Class Compras_Compras
If Not Insertado205 Then
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, tcvecon, Concepto, FechaMovimiento, tidctacon, IdSegmentoNegocio, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, CveTipoGasto:=Row2("CveTipoGasto").ToString.ToEntero, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, tcvecon, Concepto, FechaMovimiento, tidctacon, IdSegmentoNegocio, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveTipoGasto:=Row2("CveTipoGasto").ToString.ToEntero, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
End If
@@ -7143,7 +7019,6 @@ Partial Class Compras_Compras
'LIMPIA
importeMovimiento = 0
IdCtaContable = 0
- CveCuenta = 0
End If
Case 5 'Proveedores
If CveTipoConcepto = 2 Then ConceptoContable = 305 'cuando es acreedor
@@ -7169,18 +7044,15 @@ Partial Class Compras_Compras
If tipoCambioActual = 1 Then
IdCtaContable = If(CveTipoConcepto = 2, CtaProveedorAcreedores, CtaProveedor)
- CveCuenta = CveCuentaProveedor
Else
IdCtaContable = CtaProveedorComplementaria
- CveCuenta = CveCuentaProveedorComplementaria
- If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or CveCuenta > 0 Or UsaComplementaria) Then 'Cuando tiene complementaria lo dividimos en dos Then
+ If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or UsaComplementaria) Then 'Cuando tiene complementaria lo dividimos en dos Then
importeMN = importeMovimiento
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Referencia, CveConceptoContableComplementaria, Concepto, FechaMovimiento, IdCtaContable, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=importeMovimiento * tipoCambioActual - importeMovimiento, ImporteME:=importeMovimiento, CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Referencia, CveConceptoContableComplementaria, Concepto, FechaMovimiento, IdCtaContable, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=importeMovimiento * tipoCambioActual - importeMovimiento, ImporteME:=importeMovimiento, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
End If
End If
IdCtaContable = CtaProveedorExtranjera
- CveCuenta = CveCuentaProveedorExtranjera
End If
End If
@@ -7197,7 +7069,6 @@ Partial Class Compras_Compras
If ObjConta.DtResultados.Rows.Count > 0 Then
If ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
- CveCuenta = ObjConta.DtResultados.Rows(0)("IdCtaContableSIG").ToString.ToEntero
End If
End If
End If
@@ -7209,7 +7080,6 @@ Partial Class Compras_Compras
importeMovimiento = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal
importeMN = importeMovimiento * tipoCambioActual * Multiplicador
IdCtaContable = CtaProveedorDeudores
- CveCuenta = CveCuentaProveedorDeudores
'Conta ContPAQ
If IdCtaContable = 0 Then
@@ -7217,7 +7087,7 @@ Partial Class Compras_Compras
idCuentaContabilizacion = 0
End If
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=rw.DataKey("CveIE").ToString.ToEntero, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=rw.DataKey("CveIE").ToString.ToEntero, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
End If
End If
@@ -7228,9 +7098,8 @@ Partial Class Compras_Compras
importeMovimiento = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal
importeMN = importeMovimiento * tipoCambioActual * Multiplicador
IdCtaContable = CtaProveedorDeudores
- CveCuenta = CveCuentaProveedorDeudores
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 254, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=rw.DataKey("CveIE").ToString.ToEntero, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 254, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=rw.DataKey("CveIE").ToString.ToEntero, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
End If
End If
@@ -7244,13 +7113,11 @@ Partial Class Compras_Compras
importeMN = importeMovimiento * tipoCambioActual * Multiplicador
IdCtaContable = CtaProveedorAcreedores
- CveCuenta = CveCuentaProveedorAcreedores
Case 42 'Acreedores
importeMovimiento = importeAcreedoresTarjeta
importeMN = importeMovimiento * tipoCambioActual * Multiplicador
IdCtaContable = CtaProveedorAcreedores
- CveCuenta = CveCuentaProveedorAcreedores
Case 18 'NC - Notas de Credito
@@ -7263,10 +7130,8 @@ Partial Class Compras_Compras
importeMN = importeMovimiento * tipoCambioActual * Multiplicador
If tipoCambioActual > 1 Then Concepto += $" TC{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}"
IdCtaContable = CtaProveedor
- CveCuenta = CveCuentaProveedor
If DdlMoneda.SelectedValue.ToEntero <> 1 And UsuarioActual.CveEmpresa.Contiene(119) Then
IdCtaContable = CtaProveedorExtranjera
- CveCuenta = CveCuentaProveedorExtranjera
End If
If importeMovimiento <> 0 Then
@@ -7275,11 +7140,9 @@ Partial Class Compras_Compras
'PROVISION
IdCtaContable = CtaProveedorExtranjera
- CveCuenta = CveCuentaProveedorExtranjera
- If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento, ImporteME:=importeMovimiento, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
+ If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento, ImporteME:=importeMovimiento, Contabilizable:=SeContabiliza) Then
IdCtaContable = CtaProveedorComplementaria
- CveCuenta = CveCuentaProveedorComplementaria
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMN - importeMovimiento, Referencia, 234, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN - importeMovimiento, ImporteME:=importeMovimiento, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMN - importeMovimiento, Referencia, 234, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN - importeMovimiento, ImporteME:=importeMovimiento, Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then
ErrorPrepoliza = True
Exit Select
End If
@@ -7297,15 +7160,13 @@ Partial Class Compras_Compras
Dim importeMNNC = importeMovimientoNC * TipoCambioFactura * Multiplicador
IdCtaContable = CtaProveedorExtranjera
- CveCuenta = CveCuentaProveedorExtranjera
- If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimientoNC, Referencia, 272, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=TipoCambioFactura, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza, CveCompraAmortizacion:=CveCompra) Then
+ If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimientoNC, Referencia, 272, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=TipoCambioFactura, Contabilizable:=SeContabiliza, CveCompraAmortizacion:=CveCompra) Then
Dim CveConceptoContableComplementaria As Integer = 206
If Gvr.DataKey("CveTipoConcepto").ToEntero = 2 Then CveConceptoContableComplementaria = 310 'cuando es acreedor
IdCtaContable = CtaProveedorComplementaria
- CveCuenta = CveCuentaProveedorComplementaria
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMNNC - importeMovimientoNC, Referencia, CveConceptoContableComplementaria, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC - importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=TipoCambioFactura, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza, CveCompraAmortizacion:=CveCompra) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMNNC - importeMovimientoNC, Referencia, CveConceptoContableComplementaria, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC - importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=TipoCambioFactura, Contabilizable:=SeContabiliza, CveCompraAmortizacion:=CveCompra) Then
ErrorPrepoliza = True
Exit For
End If
@@ -7317,11 +7178,9 @@ Partial Class Compras_Compras
importeMNNC = importeMovimientoNC * tipoCambioActual * Multiplicador
IdCtaContable = CtaProveedorExtranjera
- CveCuenta = CveCuentaProveedorExtranjera
- If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimientoNC, Referencia, 60, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=tipoCambioActual, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
+ If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimientoNC, Referencia, 60, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
IdCtaContable = CtaProveedorComplementaria
- CveCuenta = CveCuentaProveedorComplementaria
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMNNC - importeMovimientoNC, Referencia, 235, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC - importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=tipoCambioActual, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMNNC - importeMovimientoNC, Referencia, 235, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC - importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
Exit For
End If
@@ -7339,12 +7198,10 @@ Partial Class Compras_Compras
ConceptoContable = 64
TipoMovimiento = True
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
- CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
ElseIf importeMovimiento < 0 Then
ConceptoContable = 65
TipoMovimiento = False
IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
- CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
End If
importeMovimiento = importeMovimiento.Abs.RoundSQL()
@@ -7354,7 +7211,7 @@ Partial Class Compras_Compras
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza, CveSubProyecto:=CveSubProyecto) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, Contabilizable:=SeContabiliza, CveSubProyecto:=CveSubProyecto) Then
ErrorPrepoliza = True
Exit For
End If
@@ -7372,16 +7229,15 @@ Partial Class Compras_Compras
Else
IdCtaContable = CtaProveedor
- CveCuenta = CveCuentaProveedor
- If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
+ If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza) Then
For Each Gvr As GridViewRow In GvFacturaNC.Rows
If Gvr.FCCheckBox("ChkFacturaNC").Checked Then
Dim CvePrePolizaTemp = ObjConta.AddPrePolizas("Compras/Registrar", If(EsContado And CvePlantillaPrePoliza = 1, 2, CvePlantillaPrePoliza), ImporteCompra, TxtTotal.Text.ToDouble, DdlMoneda.SelectedValue.ToEntero, TxtFecha.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo:=FolioFijo, ReglaFolioPoliza:=ObjCompras.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, DdlTipoTransaccionCaja.SelectedValue, UsuarioActual.CveEmpresa), CveTipoPoliza:=ObjConta.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, DdlTipoTransaccionCaja.SelectedValue, UsuarioActual.CveEmpresa))
Dim importeMovimientoNC = Gvr.FCTextBox("TxtImporte").Text.ToDecimal
Dim importeMNNC = importeMovimientoNC * tipoCambioActual * Multiplicador
- If ObjConta.AddPrePolizasDetalle(CvePrePolizaTemp, False, importeMovimientoNC, Referencia, 272, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimientoNC), CveCompraAmortizacion:=CveCompra, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
- If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaTemp, True, importeMovimientoNC, Referencia, 60, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimientoNC), CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
+ If ObjConta.AddPrePolizasDetalle(CvePrePolizaTemp, False, importeMovimientoNC, Referencia, 272, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimientoNC), CveCompraAmortizacion:=CveCompra, Contabilizable:=SeContabiliza) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaTemp, True, importeMovimientoNC, Referencia, 60, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimientoNC), Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
End If
Else
@@ -7402,7 +7258,6 @@ Partial Class Compras_Compras
If ObjConta.GetRetCuenta(ConceptoContable, CvePersonal) Then
If ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContPersonal").ToString.ToEntero
- CveCuenta = ObjConta.DtResultados.Rows(0)("IdCtaContPersonalSIG").ToString.ToEntero
End If
End If
@@ -7413,14 +7268,12 @@ Partial Class Compras_Compras
Dim CtaIvaxAcreditar As Integer = 0
Dim CtaIvaAcreditable As Integer = 0
- Dim CveCuentaIvaxAcreditar As Integer = 0
Dim PorcentajeImpuestoAnticipo = PorcentajeIVA
CtaIvaxAcreditar = If(IdCtaIVAXAcreditar > 0, IdCtaIVAXAcreditar, 0)
CtaIvaAcreditable = If(IdCtaIVAAcreditable > 0, IdCtaIVAAcreditable, 0)
If ObjConta.GetRetCuenta(14, UsuarioActual.CveEmpresa) And Not CtaIvaxAcreditar > 0 Then
If ObjConta.DtResultados.Rows.Count > 0 Then
CtaIvaxAcreditar = ObjConta.DtResultados.Rows(0)("IdCuentaIVAxAcreditar").ToString.ToEntero
- CveCuentaIvaxAcreditar = ObjConta.DtResultados.Rows(0)("IdCuentaIVAxAcreditarSIG").ToString.ToEntero
End If
End If
If ObjConta.GetRetCuenta(19, UsuarioActual.CveEmpresa) And Not CtaIvaAcreditable > 0 Then
@@ -7450,22 +7303,18 @@ Partial Class Compras_Compras
ConceptoContableAnticipoComplementaria = 235
CveCompraNC = Ant.CveCompra 'cuando es NC, se utiliza la clave de compra de la nota de credito
IdCtaContable = CtaProveedor
- CveCuenta = CveCuentaProveedor
Case "Egsc"
ConceptoContableAnticipo = 21
IdCtaContable = CtaProveedorAnticipos
- CveCuenta = CveCuentaProveedorAnticipos
Case "DD"
ConceptoContableAnticipo = 37
IdCtaContable = CtaProveedorDeudores
- CveCuenta = CveCuentaProveedorDeudores
Case "Ant"
ConceptoContableAnticipo = 265
ConceptoContableAnticipoComplementaria = 266
CveCompraNC = Ant.CveCompra
IdCtaContable = CtaProveedorAnticipos
- CveCuenta = CveCuentaProveedorAnticipos
End Select
importeMovimiento = Ant.Importe
@@ -7486,11 +7335,9 @@ Partial Class Compras_Compras
importeMNNC = importeMovimientoNC * TipoCambioNC * Multiplicador
IdCtaContable = CtaProveedorExtranjera
- CveCuenta = CveCuentaProveedorExtranjera
- If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimientoNC, Referencia, 60, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Ant.CveCompra, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=TipoCambioNC, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
+ If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimientoNC, Referencia, 60, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Ant.CveCompra, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=TipoCambioNC, Contabilizable:=SeContabiliza) Then
IdCtaContable = CtaProveedorComplementaria
- CveCuenta = CveCuentaProveedorComplementaria
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMNNC - importeMovimientoNC, Referencia, 235, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Ant.CveCompra, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC - importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=TipoCambioNC, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMNNC - importeMovimientoNC, Referencia, 235, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Ant.CveCompra, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC - importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=TipoCambioNC, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
Exit For
End If
@@ -7501,15 +7348,13 @@ Partial Class Compras_Compras
importeMNNC = importeMovimientoNC * tipoCambioActual * Multiplicador
IdCtaContable = CtaProveedorExtranjera
- CveCuenta = CveCuentaProveedorExtranjera
- If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimientoNC, Referencia, 272, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=tipoCambioActual, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
+ If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimientoNC, Referencia, 272, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
Dim CveConceptoContableComplementaria As Integer = 206
If CveTipoConcepto = 2 Then CveConceptoContableComplementaria = 310 'cuando es acreedor
IdCtaContable = CtaProveedorComplementaria
- CveCuenta = CveCuentaProveedorComplementaria
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMNNC - importeMovimientoNC, Referencia, CveConceptoContableComplementaria, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC - importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=tipoCambioActual, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMNNC - importeMovimientoNC, Referencia, CveConceptoContableComplementaria, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC - importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
Exit For
End If
@@ -7526,12 +7371,10 @@ Partial Class Compras_Compras
ConceptoContable = 64
TipoMovimiento = True
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
- CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
ElseIf importeMovimiento < 0 Then
ConceptoContable = 65
TipoMovimiento = False
IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
- CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
End If
importeMovimiento = importeMovimiento.Abs.RoundSQL()
@@ -7539,7 +7382,7 @@ Partial Class Compras_Compras
If importeMovimiento <> 0 Then
Dim CveSubProyecto6465 As Integer = TmpDT.FiltroPrimeroValor("CveSubProyecto", " CveSubProyecto > 0").ToEntero
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveSubProyecto:=CveSubProyecto6465, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveSubProyecto:=CveSubProyecto6465, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
Exit For
End If
@@ -7553,11 +7396,9 @@ Partial Class Compras_Compras
importeMNNC = importeMovimientoNC * TipoCambioNC * Multiplicador
IdCtaContable = CtaProveedorAnticiposExtranjera
- CveCuenta = CveCuentaProveedorAnticiposExtranjera
- If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimientoNC, Referencia, 265, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Ant.CveCompra, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=TipoCambioNC, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
+ If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimientoNC, Referencia, 265, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Ant.CveCompra, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=TipoCambioNC, Contabilizable:=SeContabiliza) Then
IdCtaContable = CtaProveedorAnticiposComplementaria
- CveCuenta = CveCuentaProveedorAnticiposComplementaria
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMNNC - importeMovimientoNC, Referencia, 266, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Ant.CveCompra, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC - importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=TipoCambioNC, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMNNC - importeMovimientoNC, Referencia, 266, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Ant.CveCompra, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC - importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=TipoCambioNC, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
Exit For
End If
@@ -7569,15 +7410,13 @@ Partial Class Compras_Compras
If TxtTotal.Text.ToDouble > 0 AndAlso TieneAnticiposXML = False Then
importeMNNC = importeMovimientoNC * tipoCambioActual * Multiplicador
IdCtaContable = CtaProveedorExtranjera ' CtaProveedorAnticiposExtranjera
- CveCuenta = CveCuentaProveedorExtranjera 'CveCuentaProveedorAnticiposExtranjera
- If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimientoNC, Referencia, 272, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=tipoCambioActual, CveCuenta:=CveCuenta, CveCompraAmortizacion:=CveCompraNC, Contabilizable:=SeContabiliza) Then
+ If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimientoNC, Referencia, 272, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=tipoCambioActual, CveCompraAmortizacion:=CveCompraNC, Contabilizable:=SeContabiliza) Then
Dim CveConceptoContableComplementaria As Integer = 206
If CveTipoConcepto = 2 Then CveConceptoContableComplementaria = 310 'cuando es acreedor
IdCtaContable = CtaProveedorExtranjera 'CtaProveedorAnticiposComplementaria
- CveCuenta = CveCuentaProveedorExtranjera 'CveCuentaProveedorAnticiposComplementaria
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMNNC - importeMovimientoNC, Referencia, CveConceptoContableComplementaria, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC - importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=tipoCambioActual, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMNNC - importeMovimientoNC, Referencia, CveConceptoContableComplementaria, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC - importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
Exit For
End If
@@ -7591,7 +7430,7 @@ Partial Class Compras_Compras
Dim ImporteIVA As Decimal = Math.Round(PorcentajePagoAnt * TxtIVA.Text.ToDecimal, 2)
'Agregamos el 14
- If ImporteIVA > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteIVA, Referencia, 14, Concepto, FechaMovimiento, CtaIvaxAcreditar, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=ImporteIVA * tipoCambioActual * Multiplicador, ImporteME:=If(tipoCambioActual = 1, 0, ImporteIVA), CveCuenta:=CveCuentaIvaxAcreditar, PorcentajeImpuesto:=PorcentajeImpuestoAnticipo, Contabilizable:=SeContabiliza) Then
+ If ImporteIVA > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteIVA, Referencia, 14, Concepto, FechaMovimiento, CtaIvaxAcreditar, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=ImporteIVA * tipoCambioActual * Multiplicador, ImporteME:=If(tipoCambioActual = 1, 0, ImporteIVA), PorcentajeImpuesto:=PorcentajeImpuestoAnticipo, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
End If
@@ -7603,7 +7442,7 @@ Partial Class Compras_Compras
Dim ImporteIEPS As Decimal = Math.Round(PorcentajePagoAnt * TxtIEPS.Text.ToDecimal, 2)
'Agregamos el 25
- If ImporteIEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteIEPS, Referencia, 25, Concepto, FechaMovimiento, CtaIvaxAcreditar, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=ImporteIVA * tipoCambioActual * Multiplicador, ImporteME:=If(tipoCambioActual = 1, 0, ImporteIVA), CveCuenta:=CveCuentaIvaxAcreditar, PorcentajeImpuesto:=PorcentajeImpuestoAnticipo, Contabilizable:=SeContabiliza) Then
+ If ImporteIEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteIEPS, Referencia, 25, Concepto, FechaMovimiento, CtaIvaxAcreditar, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=ImporteIVA * tipoCambioActual * Multiplicador, ImporteME:=If(tipoCambioActual = 1, 0, ImporteIVA), PorcentajeImpuesto:=PorcentajeImpuestoAnticipo, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
End If
@@ -7622,19 +7461,17 @@ Partial Class Compras_Compras
ConceptoContable = 64
TipoMovimiento = True
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
- CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
ElseIf importeMovimiento < 0 Then
ConceptoContable = 65
TipoMovimiento = False
IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
- CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
End If
importeMovimiento = importeMovimiento.Abs.RoundSQL()
importeMN = importeMovimiento
If importeMovimiento <> 0 Then
Dim CveSubProyecto6465 As Integer = TmpDT.FiltroPrimeroValor("CveSubProyecto", " CveSubProyecto > 0").ToEntero
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveSubProyecto:=CveSubProyecto6465, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveSubProyecto:=CveSubProyecto6465, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
Exit For
@@ -7655,9 +7492,8 @@ Partial Class Compras_Compras
Dim ImporteAntMN As Decimal = ImporteAnt * TipoCambioAnt
If usacomplementariaAnticipo Then
IdCtaContable = CtaProveedorAnticiposComplementaria
- CveCuenta = CveCuentaProveedorAnticiposComplementaria
ImporteAntMN = TipoCambioAnt * ImporteAnt - ImporteAnt
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteAnt, Referencia, 266, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompraNC, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=ImporteAntMN, ImporteME:=ImporteAnt, TipoCambio:=TipoCambioAnt, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteAnt, Referencia, 266, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompraNC, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=ImporteAntMN, ImporteME:=ImporteAnt, TipoCambio:=TipoCambioAnt, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
Exit For
End If
@@ -7666,11 +7502,10 @@ Partial Class Compras_Compras
If TipoCambioAnt > 1 Then
IdCtaContable = CtaProveedorAnticiposExtranjera
- CveCuenta = CveCuentaProveedorAnticiposExtranjera
End If
'Agregamos el 21/37/60
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteAnt, Referencia, ConceptoContableAnticipo, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompraNC, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=ImporteAntMN, ImporteME:=If(tipoCambioActual = 1, 0, ImporteAnt), TipoCambio:=TipoCambioAnt, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteAnt, Referencia, ConceptoContableAnticipo, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompraNC, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=ImporteAntMN, ImporteME:=If(tipoCambioActual = 1, 0, ImporteAnt), TipoCambio:=TipoCambioAnt, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
End If
@@ -7678,13 +7513,12 @@ Partial Class Compras_Compras
Dim CveConceptoContableComplementaria As Integer = 201
If CveTipoConcepto = 2 Then CveConceptoContableComplementaria = 307
Dim IdCtaContablePago As Integer = CtaProveedor
- Dim CveCuentaPago As Integer = CveCuentaProveedor
Dim usacomplementariaProveedor As Boolean = False
usacomplementariaProveedor = If(tipoCambioActual > 1 AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119), True, False)
If usacomplementariaProveedor Then
Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}"
importeMN = tipoCambioActual * importeMovimiento - importeMovimiento
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, CveConceptoContableComplementaria, Concepto, FechaMovimiento, CtaProveedorComplementaria, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuentaProveedorComplementaria, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, CveConceptoContableComplementaria, Concepto, FechaMovimiento, CtaProveedorComplementaria, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
End If
importeMN = importeMovimiento
@@ -7692,7 +7526,6 @@ Partial Class Compras_Compras
If tipoCambioActual > 1 Then
IdCtaContablePago = CtaProveedorExtranjera
- CveCuentaPago = CveCuentaProveedorExtranjera
End If
Dim CveConceptoContablePago As Integer = 17
@@ -7708,7 +7541,7 @@ Partial Class Compras_Compras
End If
'Agregamos el 17
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, CveConceptoContablePago, Concepto, FechaMovimiento, IdCtaContablePago, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuentaPago, Contabilizable:=SeContabiliza) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, CveConceptoContablePago, Concepto, FechaMovimiento, IdCtaContablePago, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
End If
@@ -7721,18 +7554,16 @@ Partial Class Compras_Compras
ConceptoContable = 64
TipoMovimiento = True
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
- CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
ElseIf importeFluctuacion < 0 Then
ConceptoContable = 65
TipoMovimiento = False
IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
- CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
End If
importeFluctuacion = importeFluctuacion.Abs.RoundSQL()
If importeFluctuacion <> 0 Then
Dim CveSubProyecto6465 As Integer = TmpDT.FiltroPrimeroValor("CveSubProyecto", " CveSubProyecto > 0").ToEntero
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeFluctuacion, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveSubProyecto:=CveSubProyecto6465, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeFluctuacion, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeFluctuacion, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveSubProyecto:=CveSubProyecto6465, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeFluctuacion, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
Exit For
End If
@@ -7753,7 +7584,7 @@ Partial Class Compras_Compras
If ImporteIVA <> 0 Then
'Agregamos el 14
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteIVA, Referencia, 14, Concepto, FechaMovimiento, CtaIvaxAcreditar, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=ImporteIVA * tipoCambioActual * Multiplicador, ImporteME:=If(tipoCambioActual = 1, 0, ImporteIVA), CveCuenta:=CveCuentaIvaxAcreditar, PorcentajeImpuesto:=PorcentajeImpuestoAnticipo, Contabilizable:=SeContabiliza) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteIVA, Referencia, 14, Concepto, FechaMovimiento, CtaIvaxAcreditar, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=ImporteIVA * tipoCambioActual * Multiplicador, ImporteME:=If(tipoCambioActual = 1, 0, ImporteIVA), PorcentajeImpuesto:=PorcentajeImpuestoAnticipo, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
End If
@@ -7779,7 +7610,13 @@ Partial Class Compras_Compras
'Simplificacion de PrePolizas
If UsuarioActual.Empresa.Funcionalidad(220) <> "" Then
- If Not ObjConta.PrePolizaSimplificacion(Ant.CvePrePoliza, UsuarioActual.CveEmpresa) Then
+
+ If Not ObjConta.UpdatePrePolizasDetalleBloquear(Ant.CvePrePoliza, False) Then
+ ErrorPrepoliza = True
+ Alert("No se pudo desbloquear los movimientos", TipoMensaje.MsgError)
+ End If
+
+ If Not ErrorPrepoliza AndAlso Not ObjConta.PrePolizaSimplificacion(Ant.CvePrePoliza, UsuarioActual.CveEmpresa) Then
ErrorPrepoliza = True
Alert("No se pudo simplificar los movimientos", TipoMensaje.MsgError)
End If
@@ -7795,7 +7632,7 @@ Partial Class Compras_Compras
'Case 205
' If TxtTotal.Text.ToDecimal = 0 And DdlTipoComprobante.SelectedValue = "Fac" Then
- ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, Row("IdCtaContable").ToString.ToEntero, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=Math.Round(importeMN, 2, MidpointRounding.AwayFromZero), ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=True) Then
+ ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, Row("IdCtaContable").ToString.ToEntero, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=Math.Round(importeMN, 2, MidpointRounding.AwayFromZero), ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=True) Then
' ErrorPrepoliza = True
' Exit For
' End If
@@ -7817,7 +7654,7 @@ Partial Class Compras_Compras
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveSubProyecto:=CveSubProyectoInsertar, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=Math.Round(importeMN, 2, MidpointRounding.AwayFromZero), ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=SeContabiliza) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveSubProyecto:=CveSubProyectoInsertar, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=Math.Round(importeMN, 2, MidpointRounding.AwayFromZero), ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
Exit For
End If
@@ -8877,7 +8714,7 @@ Partial Class Compras_Compras
ObjConta = New ClsContabilidad(ObjCompra.IniciaTransacSQL)
End If
- Dim CveCompraNC, IdCtaContable, CveCuenta As Integer
+ Dim CveCompraNC, IdCtaContable As Integer
Dim PorcentajePago, ImporteMovimiento, sumaAmortizacion, sumaAmortizacionCompleto As Decimal
Dim ConceptoPoliza As String = $"Amortización {NombreProveedor} - {TxtSerie.Text}-{TxtFolio.Text}"
@@ -8900,7 +8737,6 @@ Partial Class Compras_Compras
Dim tipoCambioNC As Decimal
Dim alertaContabilizacion As New StringBuilder
Dim idCuentaContabilizacion As Long = 1
- Dim CveCuentaContabilizacion As Long = 1
Dim CvePrepolizaPadre As Integer = CvePrePoliza
Dim CuentasContablesInvalidas As New StringBuilder
Dim CuentasContablesInvalidasSIG As New StringBuilder
@@ -8932,7 +8768,6 @@ Partial Class Compras_Compras
Dim TipoMovimiento As Boolean = If(Row("TipoMovto").ToString = "True", True, False)
ImporteMovimiento = 0
IdCtaContable = 0
- CveCuenta = 0
Dim Concepto As String = String.Format("{0}-{1}", TxtSerie.Text, TxtFolio.Text)
Dim importeMN As Decimal = 0
Dim Multiplicador As Integer = If(Row("Multiplicador").ToString.ToEntero = 1, 1, -1)
@@ -8957,12 +8792,10 @@ Partial Class Compras_Compras
If DdlMoneda.SelectedValue.ToEntero <> 1 Then
IdCtaContable = CtaProveedorAnticiposExtranjera
- CveCuenta = CveCuentaProveedorAnticiposExtranjera
- If ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, "", ConceptoContable, "", Fecha, IdCtaContable, -1, CveCompra:=CveCompraNC, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteMovimiento, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioNC, CveCompraAmortizacion:=CveCompra, CveCuenta:=CveCuenta) Then
+ If ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, "", ConceptoContable, "", Fecha, IdCtaContable, -1, CveCompra:=CveCompraNC, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteMovimiento, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioNC, CveCompraAmortizacion:=CveCompra) Then
If UsuarioActual.CveEmpresa.Contiene(119) Then
IdCtaContable = CtaProveedorAnticiposComplementaria
- CveCuenta = CveCuentaProveedorAnticiposComplementaria
- If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, importeMN - ImporteMovimiento, "", 266, "", Fecha, IdCtaContable, -1, CveCompra:=CveCompraNC, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN - ImporteMovimiento, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioNC, CveCompraAmortizacion:=CveCompra, CveCuenta:=CveCuenta) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, importeMN - ImporteMovimiento, "", 266, "", Fecha, IdCtaContable, -1, CveCompra:=CveCompraNC, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN - ImporteMovimiento, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioNC, CveCompraAmortizacion:=CveCompra) Then
ErrorMovtosCxP = 1
Exit Select
End If
@@ -8973,10 +8806,9 @@ Partial Class Compras_Compras
End If
Else
IdCtaContable = CtaProveedorAnticipos
- CveCuenta = CveCuentaProveedorAnticipos
If ImporteMovimiento <> 0 Then
PorcentajePago = ImporteMovimiento / TxtTotal.Text.ToDecimal
- If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, "", ConceptoContable, "", Fecha, IdCtaContable, -1, CveCompra:=CveCompraNC, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=If(tipoCambio = 1, 0, ImporteMovimiento), CveCompraAmortizacion:=CveCompra, CveCuenta:=CveCuenta) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, "", ConceptoContable, "", Fecha, IdCtaContable, -1, CveCompra:=CveCompraNC, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=If(tipoCambio = 1, 0, ImporteMovimiento), CveCompraAmortizacion:=CveCompra) Then
ErrorMovtosCxP = 1
End If
End If
@@ -9000,11 +8832,9 @@ Partial Class Compras_Compras
If DdlMoneda.SelectedValue.ToEntero <> 1 And UsuarioActual.CveEmpresa.Contiene(119) Then
IdCtaContable = CtaProveedorExtranjera
- CveCuenta = CveCuentaProveedorExtranjera
- If ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, ConceptoPartida, ConceptoContable, ConceptoPartida, Fecha, IdCtaContable, -1, CveCompra:=CveCompraNC, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteMovimiento, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioNC, CveCompraAmortizacion:=CveCompra, CveCuenta:=CveCuenta) Then
+ If ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, ConceptoPartida, ConceptoContable, ConceptoPartida, Fecha, IdCtaContable, -1, CveCompra:=CveCompraNC, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteMovimiento, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioNC, CveCompraAmortizacion:=CveCompra) Then
IdCtaContable = CtaProveedorComplementaria
- CveCuenta = CveCuentaProveedorComplementaria
- If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, importeMN - ImporteMovimiento, ConceptoPartida, 235, ConceptoPartida, Fecha, IdCtaContable, -1, CveCompra:=CveCompraNC, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN - ImporteMovimiento, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioNC, CveCompraAmortizacion:=CveCompra, CveCuenta:=CveCuenta) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, importeMN - ImporteMovimiento, ConceptoPartida, 235, ConceptoPartida, Fecha, IdCtaContable, -1, CveCompra:=CveCompraNC, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN - ImporteMovimiento, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioNC, CveCompraAmortizacion:=CveCompra) Then
ErrorMovtosCxP = 1
Exit Select
End If
@@ -9014,10 +8844,9 @@ Partial Class Compras_Compras
End If
Else
IdCtaContable = CtaProveedor
- CveCuenta = CveCuentaProveedor
If ImporteMovimiento <> 0 Then
PorcentajePago = ImporteMovimiento / TxtTotal.Text.ToDecimal
- If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, ConceptoPartida, ConceptoContable, ConceptoPartida, Fecha, IdCtaContable, -1, CveCompra:=CveCompraNC, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=If(tipoCambio = 1, 0, ImporteMovimiento), CveCompraAmortizacion:=CveCompra, CveCuenta:=CveCuenta) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, ConceptoPartida, ConceptoContable, ConceptoPartida, Fecha, IdCtaContable, -1, CveCompra:=CveCompraNC, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=If(tipoCambio = 1, 0, ImporteMovimiento), CveCompraAmortizacion:=CveCompra) Then
ErrorMovtosCxP = 1
End If
End If
@@ -9033,7 +8862,6 @@ Partial Class Compras_Compras
sumaAmortizacion += ImporteMovimiento
sumaAmortizacionCompleto += ImporteMovimiento
IdCtaContable = CtaProveedorAnticipos
- CveCuenta = CveCuentaProveedorAnticipos
PorcentajePago = ImporteMovimiento / TxtTotal.Text.ToDecimal
@@ -9055,9 +8883,8 @@ Partial Class Compras_Compras
Dim ImporteAntMN As Decimal = ImporteAnt * TipoCambioAnt
If usacomplementariaAnticipo Then
IdCtaContable = CtaProveedorAnticiposComplementaria
- CveCuenta = CveCuentaProveedorAnticiposComplementaria
ImporteAntMN = TipoCambioAnt * ImporteAnt - ImporteAnt
- If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteAnt, "", 266, ConceptoPartida, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=CveCompraNC, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, ImporteMX:=ImporteAntMN, ImporteME:=ImporteAnt, TipoCambio:=TipoCambioAnt, CveCuenta:=CveCuenta) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteAnt, "", 266, ConceptoPartida, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=CveCompraNC, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, ImporteMX:=ImporteAntMN, ImporteME:=ImporteAnt, TipoCambio:=TipoCambioAnt) Then
ErrorMovtosCxP = 1
End If
ImporteAntMN = ImporteAnt
@@ -9065,10 +8892,9 @@ Partial Class Compras_Compras
If TipoCambioAnt > 1 Then
IdCtaContable = CtaProveedorAnticiposExtranjera
- CveCuenta = CveCuentaProveedorAnticiposExtranjera
End If
- If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteAnt, "", ConceptoContable, ConceptoPartida, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteAntMN, CvePrePolizaOriginal:=CvePrePolizaNueva, ImporteME:=If(tipoCambio = 1, 0, ImporteAnt), CveCompraAmortizacion:=CveCompraNC, CveCuenta:=CveCuenta) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteAnt, "", ConceptoContable, ConceptoPartida, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteAntMN, CvePrePolizaOriginal:=CvePrePolizaNueva, ImporteME:=If(tipoCambio = 1, 0, ImporteAnt), CveCompraAmortizacion:=CveCompraNC) Then
ErrorMovtosCxP = 1
End If
@@ -9086,22 +8912,16 @@ Partial Class Compras_Compras
ConceptoContable = 64
TipoMovimiento = True
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
- CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
ElseIf importeFluctuacion < 0 Then
ConceptoContable = 65
TipoMovimiento = False
IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
- CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
End If
-
-
-
-
importeFluctuacion = importeFluctuacion.Abs.RoundSQL()
If importeFluctuacion <> 0 Then
Dim CveSubProyecto6465 As Integer = TmpDT.FiltroPrimeroValor("CveSubProyecto", " CveSubProyecto > 0").ToEntero
- If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, importeFluctuacion, "", ConceptoContable, ConceptoPartida, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveSubProyecto:=CveSubProyecto6465, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeFluctuacion, CvePrePolizaOriginal:=CvePrePolizaNueva, ImporteME:=0, CveCuenta:=CveCuenta) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, importeFluctuacion, "", ConceptoContable, ConceptoPartida, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveSubProyecto:=CveSubProyecto6465, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeFluctuacion, CvePrePolizaOriginal:=CvePrePolizaNueva, ImporteME:=0) Then
ErrorMovtosCxP = 1
End If
End If
@@ -9120,11 +8940,10 @@ Partial Class Compras_Compras
sumaAmortizacion += ImporteMovimiento
sumaAmortizacionCompleto += ImporteMovimiento
IdCtaContable = CtaProveedorDeudores
- CveCuenta = CveCuentaProveedorDeudores
If ImporteMovimiento <> 0 Then
PorcentajePago = ImporteMovimiento / TxtTotal.Text.ToDecimal
- If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, "", ConceptoContable, "", Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteMovimiento * tipoCambio, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=If(tipoCambio = 1, 0, ImporteMovimiento), CveCompraAmortizacion:=CveCompraNC, CveCuenta:=CveCuenta) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, "", ConceptoContable, "", Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteMovimiento * tipoCambio, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=If(tipoCambio = 1, 0, ImporteMovimiento), CveCompraAmortizacion:=CveCompraNC) Then
ErrorMovtosCxP = 1
End If
End If
@@ -9158,15 +8977,13 @@ Partial Class Compras_Compras
If DdlMoneda.SelectedValue.ToEntero <> 1 And UsuarioActual.CveEmpresa.Contiene(119) Then
IdCtaContable = CtaProveedorExtranjera
- CveCuenta = CveCuentaProveedorExtranjera
- If ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, Concepto, ConceptoContable, Concepto, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=CveCompraNC, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteMovimiento, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=ImporteMovimiento, TipoCambio:=TipoCambio17, CveCuenta:=CveCuenta) Then
+ If ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, Concepto, ConceptoContable, Concepto, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=CveCompraNC, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteMovimiento, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=ImporteMovimiento, TipoCambio:=TipoCambio17) Then
Dim CveConceptoContableComplementaria As Integer = 206
If CveTipoConcepto = 2 Then CveConceptoContableComplementaria = 310 'cuando es acreedor
IdCtaContable = CtaProveedorComplementaria
- CveCuenta = CveCuentaProveedorComplementaria
- If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, importeMN - ImporteMovimiento, Concepto, CveConceptoContableComplementaria, Concepto, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=CveCompraNC, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN - ImporteMovimiento, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=ImporteMovimiento, TipoCambio:=TipoCambio17, CveCuenta:=CveCuenta) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, importeMN - ImporteMovimiento, Concepto, CveConceptoContableComplementaria, Concepto, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=CveCompraNC, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN - ImporteMovimiento, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=ImporteMovimiento, TipoCambio:=TipoCambio17) Then
ErrorMovtosCxP = 1
Exit Select
End If
@@ -9176,9 +8993,8 @@ Partial Class Compras_Compras
End If
Else
IdCtaContable = CtaProveedor
- CveCuenta = CveCuentaProveedor
If ImporteMovimiento <> 0 Then
- If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, Concepto, ConceptoContable, Concepto, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=CveCompraNC, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=If(TipoCambio17 = 1, 0, ImporteMovimiento), CveCuenta:=CveCuenta) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, Concepto, ConceptoContable, Concepto, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=CveCompraNC, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=If(TipoCambio17 = 1, 0, ImporteMovimiento)) Then
ErrorMovtosCxP = 1
Exit For
End If
@@ -9187,6 +9003,7 @@ Partial Class Compras_Compras
ImporteMovimiento = 0
Case 14 'Iva X Acreditar
+
If Not gvr.DataKey("TipoDocto").Contiene("NC", "DEV", "Ant") Then
If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then
If sumaAmortizacion = CompraSaldo Then
@@ -9205,39 +9022,44 @@ Partial Class Compras_Compras
importeMN = ImporteMovimiento * tipoCambio
PorcentajeImpuesto = TmpDT.MAX("IVAPorcentaje").ToDecimal
IdCtaContable = If(IdCtaIVAXAcreditar > 0, IdCtaIVAXAcreditar, 0)
+
+ If chkImportacion.checked Then
+ ConceptoContable = 287
+ End If
+
If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
If ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaIVAxAcreditar").ToString.ToEntero
- CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaIVAxAcreditarSIG").ToString.ToEntero
End If
End If
End If
- Case 287 'Iva X Acreditar importacion
- If Not gvr.DataKey("TipoDocto").Contiene("NC", "DEV", "Ant") Then
- If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then
- If sumaAmortizacion = CompraSaldo Then
- ImporteMovimiento = TxtIVA.Text.ToDecimal
+ 'Case 287 'Iva X Acreditar importacion
+ ' If Not gvr.DataKey("TipoDocto").Contiene("NC", "DEV", "Ant") AndAlso chkImportacion.checked Then
+ ' If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then
+ ' If sumaAmortizacion = CompraSaldo Then
+ ' ImporteMovimiento = TxtIVA.Text.ToDecimal
+
+ ' If ImporteMovimiento > 0 Then
+ ' IVACompleto = True
+ ' End If
+
+ ' Else
+ ' ImporteMovimiento = 0
+ ' End If
+ ' Else
+ ' ImporteMovimiento = Math.Round(PorcentajePago * TxtIVA.Text.ToDecimal, 2)
+ ' End If
+ ' importeMN = ImporteMovimiento * tipoCambio
+ ' PorcentajeImpuesto = TmpDT.MAX("IVAPorcentaje").ToDecimal
+ ' IdCtaContable = If(IdCtaIVAXAcreditar > 0, IdCtaIVAXAcreditar, 0)
+ ' If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
+ ' If ObjConta.DtResultados.Rows.Count > 0 Then
+ ' IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaIVAxAcreditar").ToString.ToEntero
+ ' End If
+ ' End If
+ ' End If
- If ImporteMovimiento > 0 Then
- IVACompleto = True
- End If
- Else
- ImporteMovimiento = 0
- End If
- Else
- ImporteMovimiento = Math.Round(PorcentajePago * TxtIVA.Text.ToDecimal, 2)
- End If
- importeMN = ImporteMovimiento * tipoCambio
- PorcentajeImpuesto = TmpDT.MAX("IVAPorcentaje").ToDecimal
- IdCtaContable = If(IdCtaIVAXAcreditar > 0, IdCtaIVAXAcreditar, 0)
- If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
- If ObjConta.DtResultados.Rows.Count > 0 Then
- IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaIVAxAcreditar").ToString.ToEntero
- CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaIVAxAcreditarSIG").ToString.ToEntero
- End If
- End If
- End If
Case 19 'Iva Acreditado
If Not gvr.DataKey("TipoDocto").Contiene("NC", "DEV", "Ant") Then
If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then
@@ -9253,10 +9075,13 @@ Partial Class Compras_Compras
importeMN = ImporteMovimiento * tipoCambio
PorcentajeImpuesto = TmpDT.MAX("IVAPorcentaje").ToDecimal
IdCtaContable = If(IdCtaIVAAcreditable > 0, IdCtaIVAAcreditable, 0)
+
+ If chkImportacion.checked Then
+ ConceptoContable = 288
+ End If
If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
If ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaIVAAcreditable").ToString.ToEntero
- CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaIVAAcreditableSIG").ToString.ToEntero
End If
End If
End If
@@ -9268,14 +9093,12 @@ Partial Class Compras_Compras
importeMN = ImporteMovimiento * tipoCambio
If CtaProveedorRetIVA > 0 Then
IdCtaContable = CtaProveedorRetIVA
- CveCuenta = CveCuentaProveedorRetIVA
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
- CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
End If
End If
End If
@@ -9292,14 +9115,12 @@ Partial Class Compras_Compras
If CtaProveedorRetIVA > 0 Then
IdCtaContable = CtaProveedorRetIVA
- CveCuenta = CveCuentaProveedorRetIVA
ElseIf UsuarioActual.Empresa.Funcionalidad(308).ToEntero > 0 Then
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(308).ToEntero
Else
If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
If ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
- CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
End If
End If
End If
@@ -9327,14 +9148,12 @@ Partial Class Compras_Compras
importeMN = ImporteMovimiento * tipoCambio
If CtaProveedorRetIVA > 0 Then
IdCtaContable = CtaProveedorRetIVA
- CveCuenta = CveCuentaProveedorRetIVA
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
- CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
End If
End If
End If
@@ -9350,14 +9169,12 @@ Partial Class Compras_Compras
importeMN = ImporteMovimiento * tipoCambio
If CtaProveedorRetIVA > 0 Then
IdCtaContable = CtaProveedorRetIVA
- CveCuenta = CveCuentaProveedorRetIVA
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
- CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
End If
End If
End If
@@ -9373,14 +9190,12 @@ Partial Class Compras_Compras
importeMN = ImporteMovimiento * tipoCambio
If CtaProveedorRetIVA > 0 Then
IdCtaContable = CtaProveedorRetIVA
- CveCuenta = CveCuentaProveedorRetIVA
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
- CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
End If
End If
End If
@@ -9396,14 +9211,12 @@ Partial Class Compras_Compras
importeMN = ImporteMovimiento * tipoCambio
If CtaProveedorRetIVA > 0 Then
IdCtaContable = CtaProveedorRetIVA
- CveCuenta = CveCuentaProveedorRetIVA
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
- CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
End If
End If
End If
@@ -9418,14 +9231,12 @@ Partial Class Compras_Compras
importeMN = ImporteMovimiento * tipoCambio
If CtaProveedorRetIVA > 0 Then
IdCtaContable = CtaProveedorRetIVA
- CveCuenta = CveCuentaProveedorRetIVA
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
- CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
End If
End If
End If
@@ -9441,14 +9252,12 @@ Partial Class Compras_Compras
importeMN = ImporteMovimiento * tipoCambio
If CtaProveedorRetIVA > 0 Then
IdCtaContable = CtaProveedorRetIVA
- CveCuenta = CveCuentaProveedorRetIVA
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
- CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
End If
End If
End If
@@ -9462,14 +9271,12 @@ Partial Class Compras_Compras
importeMN = ImporteMovimiento * tipoCambio
If CtaProveedorRetISR > 0 Then
IdCtaContable = CtaProveedorRetISR
- CveCuenta = CveCuentaProveedorRetISR
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
- CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
End If
End If
End If
@@ -9483,14 +9290,12 @@ Partial Class Compras_Compras
importeMN = ImporteMovimiento * tipoCambio
If CtaProveedorRetISR > 0 Then
IdCtaContable = CtaProveedorRetISR
- CveCuenta = CveCuentaProveedorRetISR
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
- CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
End If
End If
End If
@@ -9503,14 +9308,12 @@ Partial Class Compras_Compras
importeMN = ImporteMovimiento * tipoCambio
If CtaProveedorRetISR > 0 Then
IdCtaContable = CtaProveedorRetISR
- CveCuenta = CveCuentaProveedorRetISR
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
- CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
End If
End If
End If
@@ -9523,14 +9326,12 @@ Partial Class Compras_Compras
importeMN = ImporteMovimiento * tipoCambio
If CtaProveedorRetISR > 0 Then
IdCtaContable = CtaProveedorRetISR
- CveCuenta = CveCuentaProveedorRetISR
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
- CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
End If
End If
End If
@@ -9540,7 +9341,6 @@ Partial Class Compras_Compras
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
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
- CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
Dim TipoCambioDiferenciaCambiaria = If(ChkPagarConPesos.Checked, GlobalTipoCambio(gvr.DataKey("Fecha").ToDate).ToDecimal, tipoCambioNC)
Dim TipoCambioDiferenciaCompra = If(ChkPagarConDolares.Checked, GlobalTipoCambio(TxtFecha.Text.ToDate), TipoCambioCompra).ToDecimal
If TipoCambioDiferenciaCompra > TipoCambioDiferenciaCambiaria Then
@@ -9555,7 +9355,7 @@ Partial Class Compras_Compras
If ImporteMovimiento <> 0 Then
Dim CveSubProyecto64 As Integer = TmpDT.FiltroPrimeroValor("CveSubProyecto", " CveSubProyecto > 0").ToEntero
- If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, Concepto, ConceptoContable, Concepto, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveSubProyecto:=CveSubProyecto64, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, Concepto, ConceptoContable, Concepto, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveSubProyecto:=CveSubProyecto64, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0) Then
ErrorMovtosCxP = 1
Exit For
End If
@@ -9568,7 +9368,6 @@ Partial Class Compras_Compras
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
IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
- CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
Dim TipoCambioDiferenciaCambiaria = If(ChkPagarConPesos.Checked, GlobalTipoCambio(gvr.DataKey("Fecha").ToDate).ToDecimal, tipoCambioNC)
Dim TipoCambioDiferenciaCompra = If(ChkPagarConDolares.Checked, GlobalTipoCambio(TxtFecha.Text.ToDate), TipoCambioCompra).ToDecimal
If TipoCambioDiferenciaCambiaria > TipoCambioDiferenciaCompra Then
@@ -9579,7 +9378,7 @@ Partial Class Compras_Compras
If ImporteMovimiento <> 0 Then
Dim CveSubProyecto65 As Integer = TmpDT.FiltroPrimeroValor("CveSubProyecto", " CveSubProyecto > 0").ToEntero
- If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, Concepto, ConceptoContable, Concepto, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveSubProyecto:=CveSubProyecto65, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, Concepto, ConceptoContable, Concepto, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveSubProyecto:=CveSubProyecto65, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0) Then
ErrorMovtosCxP = 1
Exit For
End If
@@ -9596,13 +9395,9 @@ Partial Class Compras_Compras
CuentasContablesInvalidas.Append(" " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
idCuentaContabilizacion = 0
End If
- 'Conta SIG
- If CveCuenta = 0 Then
- CuentasContablesInvalidasSIG.Append(" " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
- CveCuentaContabilizacion = 0
- End If
- If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, Concepto, ConceptoContable, Concepto, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=If(tipoCambio = 1, 0, ImporteMovimiento), CveCuenta:=CveCuenta, PorcentajeImpuesto:=PorcentajeImpuesto) Then
+
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, Concepto, ConceptoContable, Concepto, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=If(tipoCambio = 1, 0, ImporteMovimiento), PorcentajeImpuesto:=PorcentajeImpuesto) Then
ErrorMovtosCxP = 1
Exit For
End If
@@ -9634,11 +9429,11 @@ Partial Class Compras_Compras
If TxtIVA.Text.ToDecimal > 0 Then
- If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, True, TxtIVA.Text.ToDecimal, "", 14, "", Fecha, IdCtaIVAXAcreditar, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=TxtIVA.Text.ToDecimal * tipoCambio, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=If(tipoCambio = 1, 0, TxtIVA.Text.ToDecimal), CveCuenta:=CveCuenta, PorcentajeImpuesto:=PorcentajeImpuesto) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, True, TxtIVA.Text.ToDecimal, "", 14, "", Fecha, IdCtaIVAXAcreditar, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=TxtIVA.Text.ToDecimal * tipoCambio, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=If(tipoCambio = 1, 0, TxtIVA.Text.ToDecimal), PorcentajeImpuesto:=PorcentajeImpuesto) Then
ErrorMovtosCxP = 1
End If
- If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, False, TxtIVA.Text.ToDecimal, "", 19, "", Fecha, IdCtaIVAAcreditable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=TxtIVA.Text.ToDecimal * tipoCambio, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=If(tipoCambio = 1, 0, TxtIVA.Text.ToDecimal), CveCuenta:=CveCuenta, PorcentajeImpuesto:=PorcentajeImpuesto) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, False, TxtIVA.Text.ToDecimal, "", 19, "", Fecha, IdCtaIVAAcreditable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=TxtIVA.Text.ToDecimal * tipoCambio, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=If(tipoCambio = 1, 0, TxtIVA.Text.ToDecimal), PorcentajeImpuesto:=PorcentajeImpuesto) Then
ErrorMovtosCxP = 1
End If
End If
@@ -10530,7 +10325,6 @@ Partial Class Compras_Compras
Dim TipoMovimiento As Boolean = If(Row("TipoMovto").ToString = "True", True, False)
Dim importeMovimiento As Decimal = 0
Dim IdCtaContable As Integer = 0
- Dim CveCuenta As Integer = 0
Dim importeMN As Decimal = 0
Dim Multiplicador As Integer = If(Row("Multiplicador").ToString.ToEntero = 1, 1, -1)
Dim Referencia As String = $"{TxtSerie.Text}-{TxtFolio.Text}" ' concatenation interpolation
@@ -10538,11 +10332,11 @@ Partial Class Compras_Compras
Select Case ConceptoContable
'Case 5
' IdCtaContable = 1244
- ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimiento, Referencia, 5, Referencia, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=DdlProveedor.SelectedValue.ToEntero, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=TxtTotal.Text.ToDecimal, ImporteME:=If(tipoCambioActual = 1, 0, TxtTotal.Text.ToDecimal), CveCuenta:=CveCuenta) Then
+ ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimiento, Referencia, 5, Referencia, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=DdlProveedor.SelectedValue.ToEntero, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=TxtTotal.Text.ToDecimal, ImporteME:=If(tipoCambioActual = 1, 0, TxtTotal.Text.ToDecimal)) Then
' ErrorPrepoliza = True
' End If
' IdCtaContable = 1243
- ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimiento, Referencia, 205, Referencia, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=DdlProveedor.SelectedValue.ToEntero, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=TxtTotal.Text.ToDecimal, ImporteME:=If(tipoCambioActual = 1, 0, TxtTotal.Text.ToDecimal), CveCuenta:=CveCuenta) Then
+ ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimiento, Referencia, 205, Referencia, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=DdlProveedor.SelectedValue.ToEntero, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=TxtTotal.Text.ToDecimal, ImporteME:=If(tipoCambioActual = 1, 0, TxtTotal.Text.ToDecimal)) Then
' ErrorPrepoliza = True
' End If
Case 6
@@ -10594,7 +10388,7 @@ Partial Class Compras_Compras
End If
If importeMovimiento <> 0 Then
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Row2("CodAF").ToString, 49, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveActivoFijo:=Row2("CveActivoFijo").ToString.ToEntero, CveIE:=CveIE, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Row2("CodAF").ToString, 49, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveActivoFijo:=Row2("CveActivoFijo").ToString.ToEntero, CveIE:=CveIE, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento)) Then
ErrorPrepoliza = True
End If
End If
@@ -10604,7 +10398,6 @@ Partial Class Compras_Compras
'LIMPIA
importeMovimiento = 0
IdCtaContable = 0
- CveCuenta = 0
'COSTO ALMACEN
Dim DtAlmacenes = GlobalDTAlmacen(UsuarioActual.CveEmpresa)
@@ -10637,10 +10430,9 @@ Partial Class Compras_Compras
If DdlTipoCompra.SelectedValue = "10" Then
SeContabiliza = False
IdCtaContable = 0
- CveCuenta = 0
End If
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 68, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 68, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
End If
@@ -10652,7 +10444,6 @@ Partial Class Compras_Compras
'LIMPIA
importeMovimiento = 0
IdCtaContable = 0
- CveCuenta = 0
'INV [MERCANCIA RECIBIDA POR ADELANTADO (OC) | MERCANCIA PENDIENTE POR RECIBIR (COMPRA) ]
If UsuarioActual.Empresa.UsaInventarios And Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") And Not UsuarioActual.Empresa.Funcionalidad(126) = "1" And ConceptoContabilizacionAlmacen.Contiene(176, 205) Then
@@ -10667,7 +10458,7 @@ Partial Class Compras_Compras
If importeMovimiento <> 0 Then
Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}"
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContabilizacionAlmacen, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContabilizacionAlmacen, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento)) Then
ErrorPrepoliza = True
End If
End If
@@ -10688,7 +10479,7 @@ Partial Class Compras_Compras
If importeMovimiento <> 0 Then
Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}"
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContabilizacionAlmacen, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContabilizacionAlmacen, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento)) Then
ErrorPrepoliza = True
End If
End If
@@ -10754,7 +10545,7 @@ Partial Class Compras_Compras
'AGREGA MOVIMIENTO
If importeMovimiento <> 0 Then
Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}"
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 6, Concepto, FechaMovimiento, IdCtaContable, IdSegmentoNegocio, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, CveTipoGasto:=Row2("CveTipoGasto").ToString.ToEntero) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 6, Concepto, FechaMovimiento, IdCtaContable, IdSegmentoNegocio, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveTipoGasto:=Row2("CveTipoGasto").ToString.ToEntero) Then
ErrorPrepoliza = True
End If
End If
@@ -10765,7 +10556,6 @@ Partial Class Compras_Compras
'LIMPIA
importeMovimiento = 0
IdCtaContable = 0
- CveCuenta = 0
End Select
@@ -13025,7 +12815,6 @@ Partial Class Compras_Compras
If ObjProveedor.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, DdlAcreedor.SelectedValue.ToEntero, "-1", "-1", "-1", "-1", "-1", "-1", "-1", 1, UsuarioActual.CveEmpresa) Then
ViewState("CtaProveedorAcreedores") = ObjProveedor.IdCtaContAcreedor
- ViewState("CveCuentaProveedorAcreedores") = ObjProveedor.CveCuentaAcreedor
End If
@@ -14212,7 +14001,6 @@ Partial Class Compras_Compras
If dr IsNot Nothing Then
CveMoneda = dr("CveMoneda").ToString.ToEntero
IdCuentaBancaria = dr("IdCtaContable").ToString.ToEntero
- CveCuentaBancaria = dr("IdCtaContableSIG").ToString.ToEntero
EstaAsociadoACajaChica = True
End If
ViewState("CveCajaChica") = DdlCuentaCajaChicaReembolso.SelectedValue
@@ -15193,7 +14981,7 @@ Partial Class Compras_Compras
If Not ObjContabilidad.AddPrePolizasDetalle(CvePrePolizaNueva, CBool(dr("TipoMovto").ToString), dr("Importe").ToString.ToDecimal * -1, dr("Referencia").ToString, dr("CveConceptoContable").ToString.ToEntero,
dr("Concepto").ToString, TxtFechaCancelacion.Text.ToDate, dr("IdCtaContable").ToString.ToEntero, dr("IdSegmentoNegocio").ToString.ToEntero, dr("CveIE").ToString.ToEntero,
dr("CveVenta").ToString.ToEntero, dr("CveCompra").ToString.ToEntero, dr("CveSubProyecto").ToString.ToEntero, dr("CveCliente").ToString.ToEntero, dr("CveProveedor").ToString.ToEntero, dr("CvePersonal").ToString.ToEntero,
- dr("CveMovimientoAlmacen").ToString.ToEntero, dr("CveActivoFijo").ToString.ToEntero, -1, -1, dr("CveCreditoDetalle").ToString.ToEntero, CveCuenta:=dr("CveCuenta").ToString.ToEntero,
+ dr("CveMovimientoAlmacen").ToString.ToEntero, dr("CveActivoFijo").ToString.ToEntero, -1, -1, dr("CveCreditoDetalle").ToString.ToEntero,
ImporteMX:=dr("Importe").ToString.ToDecimal * -1, ImporteME:=dr("Importe").ToString.ToDecimal * -1, CveTipoGasto:=dr("CveTipoGasto").ToString.ToEntero, CveClasificacion:=dr("CveClasificacion").ToString.ToEntero, CveOCDetalle:=dr("CveOCDetalle").ToString.ToEntero,
CveCompraAmortizacion:=dr("CveCompraAmortizacion").ToString.ToEntero) Then
ErrorCancelar = True
@@ -15217,7 +15005,7 @@ Partial Class Compras_Compras
If Not ObjContabilidad.AddPrePolizasDetalle(CvePrePolizaNueva, CBool(dr("TipoMovto").ToString), dr("Importe").ToString.ToDecimal * -1, dr("Referencia").ToString, dr("CveConceptoContable").ToString.ToEntero,
dr("Concepto").ToString, TxtFechaCancelacion.Text.ToDate, dr("IdCtaContable").ToString.ToEntero, dr("IdSegmentoNegocio").ToString.ToEntero, dr("CveIE").ToString.ToEntero,
dr("CveVenta").ToString.ToEntero, dr("CveCompra").ToString.ToEntero, dr("CveSubProyecto").ToString.ToEntero, dr("CveCliente").ToString.ToEntero, dr("CveProveedor").ToString.ToEntero, dr("CvePersonal").ToString.ToEntero,
- dr("CveMovimientoAlmacen").ToString.ToEntero, dr("CveActivoFijo").ToString.ToEntero, -1, -1, dr("CveCreditoDetalle").ToString.ToEntero, CveCuenta:=dr("CveCuenta").ToString.ToEntero,
+ dr("CveMovimientoAlmacen").ToString.ToEntero, dr("CveActivoFijo").ToString.ToEntero, -1, -1, dr("CveCreditoDetalle").ToString.ToEntero,
ImporteMX:=dr("Importe").ToString.ToDecimal * -1, ImporteME:=dr("Importe").ToString.ToDecimal * -1, CveTipoGasto:=dr("CveTipoGasto").ToString.ToEntero, CveClasificacion:=dr("CveClasificacion").ToString.ToEntero, CveOCDetalle:=dr("CveOCDetalle").ToString.ToEntero) Then
ErrorCancelar = True
Exit For
@@ -17639,6 +17427,11 @@ Partial Class Compras_Compras
End If
End If
+ If Not CveCompra > 0 Then 'cuando se está registrando manualmente y se va amortizar
+ LblSaldoFactura.Text = TxtTotal.Text.FormatoNumero
+ End If
+
+
LblRetIVA.Text = (If(SubTotal2 > 0, (RetIVA / SubTotal2), 0) * 100).FormatoNumero(3) + "%"
LblRetISR.Text = (If(SubTotal2 > 0, (RetISR / SubTotal2), 0) * 100).FormatoNumero(3)
@@ -19570,9 +19363,7 @@ Partial Class Compras_Compras
'CONFIGURACIONES
Dim CuentasContablesInvalidas As New StringBuilder
- Dim CuentasContablesInvalidasSIG As New StringBuilder
Dim IdCtaContable As Integer = 0
- Dim CveCuenta As Integer = 0
Dim CveProveedorConcepto = 0
Dim Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}"
Dim Multiplicador = If(DdlTipoComprobante.SelectedValue = "NC", -1, 1)
@@ -19613,17 +19404,14 @@ Partial Class Compras_Compras
If ObjConta.GetRetCuenta(49, Row2("CveActivoFijo").ToString.ToEntero) Then
If ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContActivoFijo").ToString.ToEntero
- CveCuenta = ObjConta.DtResultados.Rows(0)("IdCtaContActivoFijoSIG").ToString.ToEntero
End If
End If
If ImporteMovimiento <> 0 Then
If IdCtaContable = 0 Then
CuentasContablesInvalidas.Append(" " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 49))("ConceptoContable").ToString)
End If
- If CveCuenta = 0 Then
- CuentasContablesInvalidasSIG.Append(" " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 49))("ConceptoContable").ToString)
- End If
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, Row2("CodAF").ToString, 49, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveActivoFijo:=Row2("CveActivoFijo").ToString.ToEntero, ImporteMX:=importeMN, ImporteME:=If(TipoCambioActual = 1, 0, ImporteMovimiento), CveCuenta:=CveCuenta) Then
+
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, Row2("CodAF").ToString, 49, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveActivoFijo:=Row2("CveActivoFijo").ToString.ToEntero, ImporteMX:=importeMN, ImporteME:=If(TipoCambioActual = 1, 0, ImporteMovimiento)) Then
TieneError = True
End If
End If
@@ -19653,7 +19441,6 @@ Partial Class Compras_Compras
End If
CveMovimientoInventario = DtInv.MAX("CveMovimiento", $"CveCompraDetalle = {Row2("CveCompraDetalle")}").ToEntero
IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen = {DtInv.MIN("CveAlmacen", $"CveCompraDetalle = {Row2("CveCompraDetalle")}")}").ToEntero
- ' CveCuenta = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContableSIG", $"CveAlmacen = {DtInv.MIN("CveAlmacen", $"CveCompraDetalle = {Row2("CveCompraDetalle")}")}").ToEntero
ImporteMovimiento = DtInv.SUM(If(DdlMoneda.SelectedValue = "1", "Total", "TotalExtranjero"), $"CveCompraDetalle = {Row2("CveCompraDetalle")}").ToDecimal
ImporteMovimiento = If(ImporteMovimiento > Row2("Total").ToString.ToDecimal, Row2("Total").ToString.ToDecimal, ImporteMovimiento) * Multiplicador
@@ -19667,7 +19454,6 @@ Partial Class Compras_Compras
Dim DrInv = DtMovtosAlmacen.NewRow
DrInv("CveMovimiento") = CveMovimientoInventario
DrInv("IdCtaContable") = IdCtaContable
- DrInv("CveCuenta") = CveCuenta
DrInv("Importe") = ImporteMovimiento
DtMovtosAlmacen.Rows.Add(DrInv)
@@ -19683,9 +19469,7 @@ Partial Class Compras_Compras
If IdCtaContable = 0 Then
CuentasContablesInvalidas.Append(" " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 68))("ConceptoContable").ToString)
End If
- 'If CveCuenta = 0 Then
- ' CuentasContablesInvalidasSIG.Append(" " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 68))("ConceptoContable").ToString)
- 'End If
+
Dim SeContabiliza As Boolean = True
'SI ES GASTO DE ALMACEN NO DEBE CONTABILIZAR CONCEPTO 68
If DdlTipoCompra.SelectedValue = "10" Then
@@ -19702,7 +19486,6 @@ Partial Class Compras_Compras
ImporteMovimiento = 0
IdCtaContable = 0
- CveCuenta = 0
'INGRESA DETALLE DE GASTO(6)
DT = DtTemporal
@@ -19735,10 +19518,8 @@ Partial Class Compras_Compras
If ObjConta.GetRetCuenta(6, Row2("CveClasificacion").ToString.ToEntero) Then
If ObjConta.DtResultados.Rows.Count > 0 AndAlso (ObjConta.DtResultados.Rows(0)("IdCuentaGasto").ToString.ToEntero > 0 Or ObjConta.DtResultados.Rows(0)("IdCuentaGastoSIG").ToString.ToEntero > 0) Then
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaGasto").ToString.ToEntero
- CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaGastoSIG").ToString.ToEntero
Else
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToString.ToEntero
- CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToString.ToEntero
End If
End If
End If
@@ -19751,9 +19532,7 @@ Partial Class Compras_Compras
If IdCtaContable = 0 Then
CuentasContablesInvalidas.Append(" " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 6))("ConceptoContable").ToString)
End If
- If CveCuenta = 0 Then
- CuentasContablesInvalidasSIG.Append(" " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 6))("ConceptoContable").ToString)
- End If
+
Dim tcvecon As Integer = 6
Dim tidctacon As Integer = 6
tidctacon = IdCtaContable
@@ -19766,7 +19545,7 @@ Partial Class Compras_Compras
End If
Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}"
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, Concepto, tcvecon, Concepto, FechaMovimiento, IdCtaContable, IdSegmentoNegocio, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMN, ImporteME:=If(TipoCambioActual = 1, 0, ImporteMovimiento), CveCuenta:=CveCuenta) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, Concepto, tcvecon, Concepto, FechaMovimiento, IdCtaContable, IdSegmentoNegocio, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMN, ImporteME:=If(TipoCambioActual = 1, 0, ImporteMovimiento)) Then
TieneError = True
End If
@@ -20505,7 +20284,7 @@ Partial Class Compras_Compras
End If
Else
'2018.11.24 se cambia concepto 177, de cargo a abono negativo., petición MALL
- If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -DiferenciaInvOC, SerieFolio, If(ConceptoSalida = 0, 177, 177), ConceptoPartida, Fecha, IdCtaContableRecepcionOCER, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=-DiferenciaInvOC, CveCuenta:=CveCuentaAlmacen, CveOCDetalle:=CveOCDetalle, CveSubProyecto:=CveSubProyecto) Then
+ If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -DiferenciaInvOC, SerieFolio, If(ConceptoSalida = 0, 177, 177), ConceptoPartida, Fecha, IdCtaContableRecepcionOCER, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=-DiferenciaInvOC, CveOCDetalle:=CveOCDetalle, CveSubProyecto:=CveSubProyecto) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, DiferenciaInvOC, SerieFolio, 176, ConceptoPartida, Fecha, IdCtaContableRecepcionOC, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=DiferenciaInvOC, CveOCDetalle:=CveOCDetalle) Then
Retorno = False
Exit For
diff --git a/Compras/ReembolsosComprobaciones.aspx.vb b/Compras/ReembolsosComprobaciones.aspx.vb
index dc1c9f30e..d1e293610 100644
--- a/Compras/ReembolsosComprobaciones.aspx.vb
+++ b/Compras/ReembolsosComprobaciones.aspx.vb
@@ -639,11 +639,6 @@ Partial Class Compras_ReembolsosComprobaciones
'Conta SIG
Dim CveCuentaProveedor As Integer = 0
Dim CveCuentaPersonal As Integer = 0
- Dim CveCuentaIVAxAcreditar As Integer = 0
- Dim CveCuentaIVAAcreditable As Integer = 0
- Dim CveCuentaRetIVA As Integer = 0
- Dim CveCuentaRetISR As Integer = 0
- Dim CveCuentaOtrosProductos As Integer = 0
Dim SeUnifico = False
'Obtenemos la cuenta del Personal o Caja Chica
@@ -667,7 +662,6 @@ Partial Class Compras_ReembolsosComprobaciones
If ObjMov.GetRetCuenta(14, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaIVAxAcreditar = ObjMov.DtResultados.Rows(0)("IdCuentaIVAxAcreditar").ToString.ToEntero
- CveCuentaIVAxAcreditar = ObjMov.DtResultados.Rows(0)("IdCuentaIVAxAcreditarSIG").ToString.ToEntero
End If
End If
@@ -675,7 +669,6 @@ Partial Class Compras_ReembolsosComprobaciones
If ObjMov.GetRetCuenta(19, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaIVAAcreditable = ObjMov.DtResultados.Rows(0)("IdCuentaIVAAcreditable").ToString.ToEntero
- CveCuentaIVAAcreditable = ObjMov.DtResultados.Rows(0)("IdCuentaIVAAcreditableSIG").ToString.ToEntero
End If
End If
@@ -683,7 +676,6 @@ Partial Class Compras_ReembolsosComprobaciones
If ObjMov.GetRetCuenta(15, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaRetIVA = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
- CveCuentaRetIVA = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
End If
End If
@@ -691,7 +683,6 @@ Partial Class Compras_ReembolsosComprobaciones
If ObjMov.GetRetCuenta(16, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaRetISR = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
- CveCuentaRetISR = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
End If
End If
@@ -699,7 +690,6 @@ Partial Class Compras_ReembolsosComprobaciones
If ObjMov.GetRetCuenta(132, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaOtrosProductos = ObjMov.DtResultados.Rows(0)("IdCtaOtrosProductos").ToString.ToEntero
- CveCuentaOtrosProductos = ObjMov.DtResultados.Rows(0)("IdCtaOtrosProductosSIG").ToString.ToEntero
End If
End If
@@ -707,7 +697,6 @@ Partial Class Compras_ReembolsosComprobaciones
For Each gvr As GridViewRow In GvCxP.Rows
-
If gvr.FCCheckBox("Chk").Checked Then
ConceptoMovimiento = $"{gvr.DataKey("Proveedor")} F:{gvr.DataKey("SerieFolio")} {If(DdlPersonal.Visible, DdlPersonal.SelectedItem.Text, DdlCajaChica.SelectedItem.Text)}"
Referencia = gvr.DataKey("SerieFolio").ToString
@@ -797,26 +786,26 @@ Partial Class Compras_ReembolsosComprobaciones
If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then
If ImporteMovto = gvr.FCLiteral("LtlSaldo").Text.ToDouble Then
'Agrego el IVA
- If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, gvr.DataKey("IVA").ToDecimal, Referencia, 14, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(IdCtaContIVAXAcreditar > 0, IdCtaContIVAXAcreditar, IdCtaIVAxAcreditar), -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("IVA").ToDecimal), ImporteMX:=(gvr.DataKey("IVA").ToDecimal) * tipoCambio, CveCuenta:=CveCuentaIVAxAcreditar, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeIVA) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, gvr.DataKey("IVA").ToDecimal, Referencia, 14, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(IdCtaContIVAXAcreditar > 0, IdCtaContIVAXAcreditar, IdCtaIVAxAcreditar), -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("IVA").ToDecimal), ImporteMX:=(gvr.DataKey("IVA").ToDecimal) * tipoCambio, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeIVA) Then
MsgError = "Detalle"
End If
'Agrego el IVA
If gvr.DataKey("IVADeducible").ToDecimal > 0 Then
- If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, False, gvr.DataKey("IVADeducible").ToDecimal, Referencia, 19, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(IdCtaContIVAAcreditable > 0, IdCtaContIVAAcreditable, IdCtaIVAAcreditable), -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("IVADeducible").ToDecimal), ImporteMX:=(gvr.DataKey("IVADeducible").ToDecimal) * tipoCambio, CveCuenta:=CveCuentaIVAAcreditable, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeIVA) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, False, gvr.DataKey("IVADeducible").ToDecimal, Referencia, 19, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(IdCtaContIVAAcreditable > 0, IdCtaContIVAAcreditable, IdCtaIVAAcreditable), -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("IVADeducible").ToDecimal), ImporteMX:=(gvr.DataKey("IVADeducible").ToDecimal) * tipoCambio, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeIVA) Then
MsgError = "Detalle"
End If
End If
End If
Else
'Agrego el IVA
- If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago, Referencia, 14, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(IdCtaContIVAXAcreditar > 0, IdCtaContIVAXAcreditar, IdCtaIVAxAcreditar), -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("IVA").ToDecimal * PorcentajePago), ImporteMX:=(gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambio, CveCuenta:=CveCuentaIVAxAcreditar, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeIVA) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago, Referencia, 14, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(IdCtaContIVAXAcreditar > 0, IdCtaContIVAXAcreditar, IdCtaIVAxAcreditar), -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("IVA").ToDecimal * PorcentajePago), ImporteMX:=(gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambio, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeIVA) Then
MsgError = "Detalle"
End If
'Agrego el IVA
If gvr.DataKey("IVADeducible").ToDecimal > 0 Then
Dim ImporteIVA As Decimal = gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago
- If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, False, ImporteIVA, Referencia, 19, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(IdCtaContIVAAcreditable > 0, IdCtaContIVAAcreditable, IdCtaIVAAcreditable), -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, ImporteIVA), ImporteMX:=(ImporteIVA) * tipoCambio, CveCuenta:=CveCuentaIVAAcreditable, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeIVA) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, False, ImporteIVA, Referencia, 19, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(IdCtaContIVAAcreditable > 0, IdCtaContIVAAcreditable, IdCtaIVAAcreditable), -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, ImporteIVA), ImporteMX:=(ImporteIVA) * tipoCambio, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeIVA) Then
MsgError = "Detalle"
End If
End If
@@ -826,7 +815,7 @@ Partial Class Compras_ReembolsosComprobaciones
Dim ImporteNOIVA As Decimal = gvr.DataKey("IVANoDeducible").ToDecimal * PorcentajePago
- If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, False, ImporteNOIVA, Referencia, 280, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(IdCtaContIVANoAcreditable > 0, IdCtaContIVANoAcreditable, IdCtaIVAAcreditable), -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, ImporteNOIVA), ImporteMX:=(ImporteNOIVA) * tipoCambio, CveCuenta:=CveCuentaIVAAcreditable, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeIVA) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, False, ImporteNOIVA, Referencia, 280, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(IdCtaContIVANoAcreditable > 0, IdCtaContIVANoAcreditable, IdCtaIVAAcreditable), -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, ImporteNOIVA), ImporteMX:=(ImporteNOIVA) * tipoCambio, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeIVA) Then
MsgError = "Detalle"
End If
End If
@@ -939,23 +928,23 @@ Partial Class Compras_ReembolsosComprobaciones
If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then
If ImporteMovto = gvr.FCLiteral("LtlSaldo").Text.ToDouble Then
'Agrego el RetIVA
- If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, False, gvr.DataKey("RetIVA").ToDecimal, Referencia, ConceptoContableRetIVAXAcreditar, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaContableRetIVAXAcreditar, -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("RetIVA").ToDecimal), ImporteMX:=(gvr.DataKey("RetIVA").ToDecimal) * tipoCambio, CveCuenta:=CveCuentaIVAxAcreditar, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, False, gvr.DataKey("RetIVA").ToDecimal, Referencia, ConceptoContableRetIVAXAcreditar, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaContableRetIVAXAcreditar, -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("RetIVA").ToDecimal), ImporteMX:=(gvr.DataKey("RetIVA").ToDecimal) * tipoCambio, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal) Then
MsgError = "Detalle"
End If
'Agrego el RetIVA
- If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, gvr.DataKey("RetIVA").ToDecimal, Referencia, ConceptoContableRetIVAAcreditable, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaContableRetIVAAcreditable, -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("RetIVA").ToDecimal), ImporteMX:=(gvr.DataKey("RetIVA").ToDecimal) * tipoCambio, CveCuenta:=CveCuentaIVAAcreditable, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, gvr.DataKey("RetIVA").ToDecimal, Referencia, ConceptoContableRetIVAAcreditable, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaContableRetIVAAcreditable, -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("RetIVA").ToDecimal), ImporteMX:=(gvr.DataKey("RetIVA").ToDecimal) * tipoCambio, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal) Then
MsgError = "Detalle"
End If
End If
Else
'Agrego el RetIVA
- If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, False, gvr.DataKey("RetIVA").ToDecimal * PorcentajePago, Referencia, ConceptoContableRetIVAXAcreditar, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaContableRetIVAXAcreditar, -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("RetIVA").ToDecimal * PorcentajePago), ImporteMX:=(gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambio, CveCuenta:=CveCuentaIVAxAcreditar, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, False, gvr.DataKey("RetIVA").ToDecimal * PorcentajePago, Referencia, ConceptoContableRetIVAXAcreditar, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaContableRetIVAXAcreditar, -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("RetIVA").ToDecimal * PorcentajePago), ImporteMX:=(gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambio, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal) Then
MsgError = "Detalle"
End If
'Agrego el RetIVA
- If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, gvr.DataKey("RetIVA").ToDecimal * PorcentajePago, Referencia, ConceptoContableRetIVAAcreditable, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaContableRetIVAAcreditable, -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("RetIVA").ToDecimal * PorcentajePago), ImporteMX:=(gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambio, CveCuenta:=CveCuentaIVAAcreditable, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, gvr.DataKey("RetIVA").ToDecimal * PorcentajePago, Referencia, ConceptoContableRetIVAAcreditable, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaContableRetIVAAcreditable, -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("RetIVA").ToDecimal * PorcentajePago), ImporteMX:=(gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambio, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal) Then
MsgError = "Detalle"
End If
End If
@@ -1047,7 +1036,7 @@ Partial Class Compras_ReembolsosComprobaciones
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, False, SaldoExcedente, Referencia, CveConceptoContablePago, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaProveedor, -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, SaldoExcedente), ImporteMX:=(SaldoExcedente) * tipoCambio, CvePersonal:=CvePersonal, CveCuenta:=CveCuentaProveedor, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal) Then
MsgError = "Detalle Reembolso Personal"
End If
- If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, SaldoExcedente, Referencia, 132, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaOtrosProductos, -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, SaldoExcedente), ImporteMX:=SaldoExcedente * tipoCambio, CvePersonal:=CvePersonal, CveCuenta:=CveCuentaOtrosProductos, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, SaldoExcedente, Referencia, 132, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaOtrosProductos, -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, SaldoExcedente), ImporteMX:=SaldoExcedente * tipoCambio, CvePersonal:=CvePersonal, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal) Then
MsgError = "Detalle Reembolso Personal"
End If
@@ -1093,7 +1082,7 @@ Partial Class Compras_ReembolsosComprobaciones
If CveCajaChica > 0 Then
CveIEPago = 0
Dim FolioIENew = ObjIE.GetNextFolio(CveCajaChica, 6).ToString
- CveIEPago = ObjIE.AddBancos_IE(CveCajaChica, 6, Now, FolioIENew, gvr.DataKey("Proveedor"), ImporteMovto, CveMoneda, 0.0, $"{gvr.DataKey("Proveedor")} F:{gvr.DataKey("SerieFolio")} {If(DdlPersonal.Visible, DdlPersonal.SelectedItem.Text, DdlCajaChica.SelectedItem.Text)}", "", False, True, -1, CvePrePolizaPago, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FueConciliado:=If(ChkReembolsarSinBancos.Checked Or CveCajaChica > 0, True, False))
+ CveIEPago = ObjIE.AddBancos_IE(CveCajaChica, 6, TxtFechaPrePoliza.Text.ToDate, FolioIENew, gvr.DataKey("Proveedor"), ImporteMovto, CveMoneda, 0.0, $"{gvr.DataKey("Proveedor")} F:{gvr.DataKey("SerieFolio")} {If(DdlPersonal.Visible, DdlPersonal.SelectedItem.Text, DdlCajaChica.SelectedItem.Text)}", "", False, True, -1, CvePrePolizaPago, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FueConciliado:=If(ChkReembolsarSinBancos.Checked Or CveCajaChica > 0, True, False))
End If
End If
@@ -1127,23 +1116,23 @@ Partial Class Compras_ReembolsosComprobaciones
If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then
If gvr.FCTextBox("TxtAbonar").Text.ToDecimal = gvr.FCLiteral("LtlSaldo").Text.ToDouble Then
'Agrego el IVA
- If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaExcedente, True, gvr.DataKey("IVA").ToDecimal, Referencia, 14, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(IdCtaContIVAXAcreditar > 0, IdCtaContIVAXAcreditar, IdCtaIVAxAcreditar), -1, CveIE:=CveIEExcedente, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("IVA").ToDecimal), ImporteMX:=(gvr.DataKey("IVA").ToDecimal) * tipoCambio, CveCuenta:=CveCuentaIVAxAcreditar, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeIVA) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaExcedente, True, gvr.DataKey("IVA").ToDecimal, Referencia, 14, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(IdCtaContIVAXAcreditar > 0, IdCtaContIVAXAcreditar, IdCtaIVAxAcreditar), -1, CveIE:=CveIEExcedente, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("IVA").ToDecimal), ImporteMX:=(gvr.DataKey("IVA").ToDecimal) * tipoCambio, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeIVA) Then
MsgError = "Detalle"
End If
'Agrego el IVA
- If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaExcedente, False, gvr.DataKey("IVA").ToDecimal, Referencia, 19, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(IdCtaContIVAAcreditable > 0, IdCtaContIVAAcreditable, IdCtaIVAAcreditable), -1, CveIE:=CveIEExcedente, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("IVA").ToDecimal), ImporteMX:=(gvr.DataKey("IVA").ToDecimal) * tipoCambio, CveCuenta:=CveCuentaIVAAcreditable, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeIVA) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaExcedente, False, gvr.DataKey("IVA").ToDecimal, Referencia, 19, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(IdCtaContIVAAcreditable > 0, IdCtaContIVAAcreditable, IdCtaIVAAcreditable), -1, CveIE:=CveIEExcedente, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("IVA").ToDecimal), ImporteMX:=(gvr.DataKey("IVA").ToDecimal) * tipoCambio, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeIVA) Then
MsgError = "Detalle"
End If
End If
Else
'Agrego el IVA
- If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaExcedente, True, gvr.DataKey("IVA").ToDecimal * PorcentajePago, Referencia, 14, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(IdCtaContIVAXAcreditar > 0, IdCtaContIVAXAcreditar, IdCtaIVAxAcreditar), -1, CveIE:=CveIEExcedente, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("IVA").ToDecimal * PorcentajePago), ImporteMX:=(gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambio, CveCuenta:=CveCuentaIVAxAcreditar, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeIVA) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaExcedente, True, gvr.DataKey("IVA").ToDecimal * PorcentajePago, Referencia, 14, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(IdCtaContIVAXAcreditar > 0, IdCtaContIVAXAcreditar, IdCtaIVAxAcreditar), -1, CveIE:=CveIEExcedente, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("IVA").ToDecimal * PorcentajePago), ImporteMX:=(gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambio, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeIVA) Then
MsgError = "Detalle"
End If
'Agrego el IVA
- If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaExcedente, False, gvr.DataKey("IVA").ToDecimal * PorcentajePago, Referencia, 19, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(IdCtaContIVAAcreditable > 0, IdCtaContIVAAcreditable, IdCtaIVAAcreditable), -1, CveIE:=CveIEExcedente, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("IVA").ToDecimal * PorcentajePago), ImporteMX:=(gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambio, CveCuenta:=CveCuentaIVAAcreditable, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeIVA) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaExcedente, False, gvr.DataKey("IVA").ToDecimal * PorcentajePago, Referencia, 19, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(IdCtaContIVAAcreditable > 0, IdCtaContIVAAcreditable, IdCtaIVAAcreditable), -1, CveIE:=CveIEExcedente, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("IVA").ToDecimal * PorcentajePago), ImporteMX:=(gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambio, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeIVA) Then
MsgError = "Detalle"
End If
End If
@@ -1255,12 +1244,12 @@ Partial Class Compras_ReembolsosComprobaciones
End Select
'Agrego el RetIVA
- If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaExcedente, False, gvr.DataKey("RetIVA").ToDecimal * PorcentajePago, Referencia, ConceptoContableRetIVAXAcreditar, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaContableRetIVAXAcreditar, -1, CveIE:=CveIEExcedente, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("RetIVA").ToDecimal * PorcentajePago), ImporteMX:=(gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambio, CveCuenta:=CveCuentaIVAxAcreditar, CvePrePolizaOriginal:=CvePrePolizaExcedente, CvePersonal:=CvePersonal) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaExcedente, False, gvr.DataKey("RetIVA").ToDecimal * PorcentajePago, Referencia, ConceptoContableRetIVAXAcreditar, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaContableRetIVAXAcreditar, -1, CveIE:=CveIEExcedente, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("RetIVA").ToDecimal * PorcentajePago), ImporteMX:=(gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambio, CvePrePolizaOriginal:=CvePrePolizaExcedente, CvePersonal:=CvePersonal) Then
MsgError = "Detalle"
End If
'Agrego el RetIVA
- If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaExcedente, True, gvr.DataKey("RetIVA").ToDecimal * PorcentajePago, Referencia, ConceptoContableRetIVAAcreditable, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaContableRetIVAAcreditable, -1, CveIE:=CveIEExcedente, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("RetIVA").ToDecimal * PorcentajePago), ImporteMX:=(gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambio, CveCuenta:=CveCuentaIVAAcreditable, CvePrePolizaOriginal:=CvePrePolizaExcedente, CvePersonal:=CvePersonal) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaExcedente, True, gvr.DataKey("RetIVA").ToDecimal * PorcentajePago, Referencia, ConceptoContableRetIVAAcreditable, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaContableRetIVAAcreditable, -1, CveIE:=CveIEExcedente, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("RetIVA").ToDecimal * PorcentajePago), ImporteMX:=(gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambio, CvePrePolizaOriginal:=CvePrePolizaExcedente, CvePersonal:=CvePersonal) Then
MsgError = "Detalle"
End If
End If
@@ -1395,15 +1384,7 @@ Partial Class Compras_ReembolsosComprobaciones
If CvePrePolizaIERegistrado > 0 Then
If UsuarioActual.Empresa.UsaContabilidadSIG AndAlso CveCuentaPersonal > 0 Then
If UsuarioActual.Empresa.UsaContabilidadSIG AndAlso CveCuentaProveedor > 0 Then
- If UsuarioActual.Empresa.UsaContabilidadSIG AndAlso CveCuentaIVAxAcreditar > 0 Then
- If UsuarioActual.Empresa.UsaContabilidadSIG AndAlso CveCuentaIVAAcreditable > 0 Then
- Else
- MsgError = "No tiene cuenta contable SIG IVA Acreditable"
- End If
- Else
- MsgError = "No tiene cuenta contable SIG IVA x Acreditar"
- End If
Else
MsgError = "No tiene cuenta contable SIG de proveedor"
End If
@@ -1415,23 +1396,7 @@ Partial Class Compras_ReembolsosComprobaciones
If ChkChequeExcedente.Checked Then
If UsuarioActual.Empresa.UsaContabilidadSIG AndAlso CveCuentaBancaria > 0 Then
If UsuarioActual.Empresa.UsaContabilidadSIG AndAlso CveCuentaProveedor > 0 Then
- If UsuarioActual.Empresa.UsaContabilidadSIG AndAlso CveCuentaIVAxAcreditar > 0 Then
- If UsuarioActual.Empresa.UsaContabilidadSIG AndAlso CveCuentaIVAAcreditable > 0 Then
- If UsuarioActual.Empresa.UsaContabilidadSIG AndAlso CveCuentaRetIVA > 0 Then
- If UsuarioActual.Empresa.UsaContabilidadSIG AndAlso CveCuentaRetISR > 0 Then
- Else
- MsgError = "No tiene cuenta contable SIG Ret ISR"
- End If
- Else
- MsgError = "No tiene cuenta contable SIG Ret IVA"
- End If
- Else
- MsgError = "No tiene cuenta contable SIG IVA Acreditable"
- End If
- Else
- MsgError = "No tiene cuenta contable SIG IVA x Acreditar"
- End If
Else
MsgError = "No tiene cuenta contable SIG de proveedor"
End If
diff --git a/Compras/RepComprasAF.aspx b/Compras/RepComprasAF.aspx
index 015394096..b6ee8e1f9 100644
--- a/Compras/RepComprasAF.aspx
+++ b/Compras/RepComprasAF.aspx
@@ -152,10 +152,11 @@
-
-
Producto Servicio:
+
+
+
Producto Servicio:
-
+
diff --git a/Compras/RepComprasAF.aspx.vb b/Compras/RepComprasAF.aspx.vb
index 3d1e6789b..2c5fc308c 100644
--- a/Compras/RepComprasAF.aspx.vb
+++ b/Compras/RepComprasAF.aspx.vb
@@ -57,7 +57,7 @@ Partial Class Compras_RepComprasAF
Private Sub Compras_RepComprasAFaspx_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not IsPostBack Then
CargaCombos()
- DdlPS.ddl.Visible = False
+ 'DdlPS.ddl.Visible = False
If UsuarioActual.Empresa.GralSoloProyecto Then
LblSubProyecto.Text = "Proyecto:"
DdlSubProyecto.Items.Clear()
@@ -429,5 +429,24 @@ Partial Class Compras_RepComprasAF
End Sub
#End Region
+ Protected Sub DdlClasificacion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlClasificacion.SelectedIndexChanged
+ CargaPS(DdlClasificacion.SelectedValue.ToEntero)
+ End Sub
+ Private Sub CargaPS(CveClasificacion As Integer)
+ DdlPS.setEsWebService(If(UsuarioActual.Empresa.Funcionalidad(105).ToString = "1", True, False))
+
+ If Not UsuarioActual.Empresa.Funcionalidad(105).ToString = "1" Then
+ DdlPS.ddl.Items.Clear()
+ DdlPS.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacion, Estatus:=1)
+ DdlPS.ddl.DataBind()
+ DdlPS.ddl.Items.Insert(0, New ListItem("*** Actualizar listado de Productos o Servicios ***", "-2"))
+ DdlPS.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
+ Else
+ DdlPS.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacion.SelectedValue)
+ DdlPS.SelectedText = "Todos"
+ DdlPS.SelectedValue = "-1"
+ End If
+
+ End Sub
End Class
diff --git a/Compras/RepComprasAFDetalle.aspx.vb b/Compras/RepComprasAFDetalle.aspx.vb
index 1f5ae872f..0d78f1e74 100644
--- a/Compras/RepComprasAFDetalle.aspx.vb
+++ b/Compras/RepComprasAFDetalle.aspx.vb
@@ -448,4 +448,24 @@ Partial Class Compras_RepComprasAFDetalle
Return filtro
End Function
+ Protected Sub DdlClasificacion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlClasificacion.SelectedIndexChanged
+ CargaPS(DdlClasificacion.SelectedValue.ToEntero)
+ End Sub
+ Private Sub CargaPS(CveClasificacion As Integer)
+
+ DdlPS.setEsWebService(If(UsuarioActual.Empresa.Funcionalidad(105).ToString = "1", True, False))
+
+ If Not UsuarioActual.Empresa.Funcionalidad(105).ToString = "1" Then
+ DdlPS.ddl.Items.Clear()
+ DdlPS.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacion, Estatus:=1)
+ DdlPS.ddl.DataBind()
+ DdlPS.ddl.Items.Insert(0, New ListItem("*** Actualizar listado de Productos o Servicios ***", "-2"))
+ DdlPS.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
+ Else
+ DdlPS.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacion.SelectedValue)
+ DdlPS.SelectedText = "Todos"
+ DdlPS.SelectedValue = "-1"
+ End If
+
+ End Sub
End Class
\ No newline at end of file
diff --git a/Compras/RepComprasDetalle.aspx b/Compras/RepComprasDetalle.aspx
index 405e52e78..050c2e50b 100644
--- a/Compras/RepComprasDetalle.aspx
+++ b/Compras/RepComprasDetalle.aspx
@@ -355,6 +355,8 @@
+
+
Total
@@ -498,6 +500,13 @@