usacomplementarias
This commit is contained in:
@@ -446,7 +446,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
HlSaldarCuentasSinPagar.Visible = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa = 119 And CveUsuarioProgramo <> -1 Then
|
||||
If UsuarioActual.CveEmpresa.Contiene(119, 158) And CveUsuarioProgramo <> -1 Then
|
||||
LnkPDFSolicitud.Visible = True
|
||||
LnkExcelSolicitud.Visible = True
|
||||
End If
|
||||
@@ -942,6 +942,9 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
Dim TipoCambioGeneral As Decimal = 0
|
||||
Dim tipoCambioCompraValuacion As Decimal = 1
|
||||
|
||||
Dim UsaComplementariaBancos As Boolean = If(UsuarioActual.CveEmpresa.Contiene(119, 158), True, False)
|
||||
Dim UsaComplementariaProveedores As Boolean = If(UsuarioActual.CveEmpresa.Contiene(119, 158), True, False)
|
||||
|
||||
Dim FuncionalidadFluctuacionImpuestos As Boolean = If(UsuarioActual.Empresa.Funcionalidad(159) = "1", True, False)
|
||||
|
||||
Dim TipoCambioFluctuacion As Decimal = 1
|
||||
@@ -1046,7 +1049,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||
IdCtaContable = IdCtaContComplementaria
|
||||
CveCuenta = CveCuentaProveedorExtranjera
|
||||
If ImporteMovimiento <> 0 AndAlso (UsuarioActual.CveEmpresa = 119 Or IdCtaContable > 0) Then 'Cuando tiene complementaria lo dividimos en dos
|
||||
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
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
@@ -2034,7 +2037,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
|
||||
If (Not DivTarjeta.Visible Or DdlTarjeta.SelectedValue.ToEntero = -1) Then
|
||||
If TipoCambioPago > 1 AndAlso CveMoneda = 2 Then
|
||||
If UsuarioActual.CveEmpresa = 119 Or (CveCuentaBancariaComplementaria > 0 OrElse IdCuentaBancariaComplementaria > 0) Then
|
||||
If UsaComplementariaBancos Or (CveCuentaBancariaComplementaria > 0 OrElse 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
|
||||
@@ -3121,6 +3124,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
Dim CveMoneda As Integer = gr.DataKey("CveMoneda").ToEntero
|
||||
Dim FechaCompra As Date = gr.DataKey("Fecha").ToDate
|
||||
Dim CveSubProyecto As Integer = gr.DataKey("CveSubProyecto").ToEntero
|
||||
Dim UsaComplementariaProveedores As Boolean = If(UsuarioActual.CveEmpresa.Contiene(119, 158), True, False)
|
||||
|
||||
Dim CveConceptoContablePago As Integer = 17
|
||||
If gr.DataKey("CveTipoConcepto").ToEntero = 2 Then CveConceptoContablePago = 308 'cuando es acreedor
|
||||
@@ -3141,7 +3145,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
|
||||
CvePrePoliza = ObjConta.AddPrePolizas("Bancos/ProveedoresAbonar/Saldar", 98, gr.DataKey("Saldo").ToDecimal, gr.DataKey("Saldo").ToDecimal, gr.DataKey("CveMoneda").ToEntero, TxtFechaIncobrable.Text.ToDate, ConceptoPartida, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
If CveMoneda > 1 AndAlso (IdCtaContComplementaria > 0 Or UsuarioActual.CveEmpresa = 119) Then
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user