-
This commit is contained in:
@@ -823,8 +823,6 @@ Partial Class Bancos_IE
|
||||
|
||||
UppEliminarIE.Update()
|
||||
|
||||
InicializaActualizarTC()
|
||||
|
||||
'22/06/2018 - VIATICOS
|
||||
If Request("CveSolicitudViatico") IsNot Nothing AndAlso IsNumeric(Request("CveSolicitudViatico")) AndAlso Request("CveSolicitudViatico").ToEntero > 0 Then
|
||||
CargaDatosViaticos()
|
||||
@@ -3327,21 +3325,14 @@ Partial Class Bancos_IE
|
||||
PorcentajeCompraDevDinC = ObjCompras.DtResultados.Rows(0)("PorcentajeIVA").ToString.ToDecimal
|
||||
|
||||
Dim DTCuentas As DataTable = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeCompraDevDinC)
|
||||
Dim CveCuentaIVAxAcreditarDevDinC = 0
|
||||
Dim CveCuentaIVAAcreditableDevDinC = 0
|
||||
Dim IdCtaIVAXAcreditarDevDinC = DTCuentas.Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero
|
||||
Dim IdCtaIVAAcreditableDevDinC = DTCuentas.Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero
|
||||
|
||||
|
||||
Dim IVADevMN As Decimal = 0
|
||||
Dim IEPSDevMN As Decimal = 0
|
||||
|
||||
|
||||
Dim PorcentajeDevolucion As Decimal = ((ImporteAplicar * 100D / TotalCompraDev) / 100).RoundSQL(2)
|
||||
|
||||
IVADev = Math.Round(IVADev * PorcentajeDevolucion, 2)
|
||||
IEPSDev = Math.Round(IEPSDev * PorcentajeDevolucion, 2)
|
||||
|
||||
Dim IdCtaIVADevolucionIMPUESTOS As Integer = -1
|
||||
|
||||
If DdlMoneda.SelectedValue.ToEntero > 1 Then
|
||||
@@ -3352,7 +3343,6 @@ Partial Class Bancos_IE
|
||||
IEPSDevMN = (IEPSDev * If(CveMonedaDev = 1, 1, TxtTipoCambio.Text.ToDecimal)).RoundSQL(2)
|
||||
End If
|
||||
|
||||
|
||||
Dim ErrorDevolucionImpuestos As Boolean = False
|
||||
|
||||
If IVADev > 0 Then
|
||||
@@ -3551,12 +3541,12 @@ Partial Class Bancos_IE
|
||||
Dim IdCtaIVAXAcreditarDevDinC As Integer
|
||||
Dim IdCtaIVAAcreditableDevDinC As Integer
|
||||
|
||||
'If DTCuentas IsNot Nothing AndAlso DTCuentas.Rows.Count > 0 Then
|
||||
' IdCtaIVAXAcreditarDevDinC = DTCuentas.Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero
|
||||
' IdCtaIVAAcreditableDevDinC = DTCuentas.Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero
|
||||
'Else
|
||||
' MsgError = "Sin Registros de porcentaje impuesto"
|
||||
'End If
|
||||
If DTCuentas IsNot Nothing AndAlso DTCuentas.Rows.Count > 0 Then
|
||||
IdCtaIVAXAcreditarDevDinC = DTCuentas.Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero
|
||||
IdCtaIVAAcreditableDevDinC = DTCuentas.Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero
|
||||
Else
|
||||
MsgError = "Sin Registros de porcentaje impuesto"
|
||||
End If
|
||||
|
||||
Dim IVADevMN As Decimal = 0
|
||||
Dim IEPSDevMN As Decimal = 0
|
||||
@@ -5897,49 +5887,6 @@ Partial Class Bancos_IE
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " ACTUALIZAR TIPO CAMBIO PREPOLIZA "
|
||||
Private Sub InicializaActualizarTC()
|
||||
If CveIE > 0 And DdlMoneda.SelectedValue.ToEntero = 2 And CvePrePoliza > 0 Then
|
||||
TxtActualizarTC_TCActual.Text = TxtTipoCambio.Text
|
||||
TxtActualizarTC_TCActualizar.Text = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).FormatoNumero(4)
|
||||
HLModalActualizarTC.Visible = True
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub BtnActualizarTC_Click(sender As Object, e As EventArgs)
|
||||
Dim ObjContabilidad As New ClsContabilidad
|
||||
Dim ObjBancos As New ClsBancos(ObjContabilidad.IniciaTransacSQL())
|
||||
Dim ObjEventos As New ClsOIEventos(ObjContabilidad.IniciaTransacSQL())
|
||||
Dim TieneError = False
|
||||
Dim MensajeError = ""
|
||||
|
||||
If ObjEventos.AddEventoBitacora($"Se actualizó el Tipo de Cambio de la compra. TC anterior: {TxtActualizarTC_TCActual.Text.FormatoNumero(4)} | TC actual: {TxtActualizarTC_TCActualizar.Text.FormatoNumero(4)}", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveIE:=CveIE) Then
|
||||
If ObjBancos.UpdateBancos_IETipoCambio(TxtActualizarTC_TCActualizar.Text.ToDouble, CveIE, CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
||||
If Not ObjContabilidad.ReconstruirPP_PagoCompraVenta(CveIE) Then
|
||||
TieneError = True
|
||||
MensajeError = "Ocurrió un error al actualizar el asiento contable"
|
||||
End If
|
||||
Else
|
||||
TieneError = True
|
||||
MensajeError = "Ocurrió un error al actualizar el Tipo de Cambio al documento"
|
||||
End If
|
||||
Else
|
||||
TieneError = True
|
||||
MensajeError = "Ocurrió un error al guardar el historal al actualizar el Tipo de Cambio al documento"
|
||||
End If
|
||||
|
||||
If Not TieneError Then
|
||||
ObjContabilidad.Commit()
|
||||
Alert("Se actualizó correctamente el tipo de cambio del documento.", TipoMensaje.MsgInformacion)
|
||||
RegistraScript("$('#ModalActualizarTC').modal('hide');")
|
||||
Else
|
||||
ObjContabilidad.RollBack()
|
||||
Alert(MensajeError, TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjContabilidad.Dispose()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "SOLICITAR VIATICOS VIATICOS"
|
||||
|
||||
Protected Sub CargaDatosViaticos()
|
||||
|
||||
Reference in New Issue
Block a user