-
This commit is contained in:
@@ -579,9 +579,9 @@ public partial class Bancos_Devoluciones : ClsPaginas
|
||||
// OTROS INGRESOS
|
||||
if (gvr.FCTextBox("TxtComision").Text.ToDecimal() != 0)
|
||||
{
|
||||
int tcvecon = 78;
|
||||
int tcvecon = 255;
|
||||
if (gvr.FCTextBox("TxtComision").Text.ToDecimal() > 0)
|
||||
tcvecon = 255;
|
||||
tcvecon = 78;
|
||||
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoDevolucion, gvr.FCTextBox("TxtComision").Text.ToDecimal(), Ref, tcvecon, Conc, DateTime.Now, UsuarioActual.Empresa.IdCuentaOtrosIngresos, -1, CveIE: gvr.DataKey("CveIE").ToEntero(), CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero(), CveProveedor: cveProveedor, CvePersonal: cvePersonal, ImporteMX: gvr.FCTextBox("TxtComision").Text.ToDecimal(), CveIEDevolucion: CveIE))
|
||||
{
|
||||
|
||||
@@ -25,11 +25,7 @@
|
||||
<asp:LinkButton ID="LnkComplementoPago" runat="server" Visible="false" Style="color: #686868;"><i class="fa fa-money" style="color:#686868;"></i> Complemento Pago</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<li>
|
||||
<asp:HyperLink ID="HLModalActualizarTC" NavigateUrl="#" runat="server" Visible="false" data-toggle="modal" data-target="#ModalActualizarTC" Style="color: #686868;"><i class="fa fa-usd" style="color:#686868;"></i> Actualizar Tipo Cambio</asp:HyperLink>
|
||||
</li>
|
||||
</asp:UpdatePanel>
|
||||
<li>
|
||||
<asp:HyperLink ID="HpLPrePoliza" NavigateUrl="#" runat="server" Visible="false" Style="color: #686868;"><i class="" style="color:#686868;"></i> PrePoliza</asp:HyperLink>
|
||||
</li>
|
||||
@@ -268,7 +264,7 @@
|
||||
<asp:RadioButtonList ID="RBL" runat="server" RepeatDirection="Horizontal" AutoPostBack="True">
|
||||
<asp:ListItem Value="C">Clientes</asp:ListItem>
|
||||
<asp:ListItem Value="P">Proveedor</asp:ListItem>
|
||||
<asp:ListItem Value="FE">Viaticos - Personal</asp:ListItem>
|
||||
<asp:ListItem Value="FE">Viáticos</asp:ListItem>
|
||||
</asp:RadioButtonList>
|
||||
<asp:HiddenField ID="HdnCveCliente" runat="server" ClientIDMode="Static" Value="-1" />
|
||||
<asp:HiddenField ID="HdnCveProveedor" runat="server" ClientIDMode="Static" Value="-1" />
|
||||
@@ -1458,44 +1454,7 @@
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
<%-- ACTUALIZAR TIPO CAMBIO PREPOLIZA --%>
|
||||
<div id="ModalActualizarTC" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel ID="UpActualizarTC" class="modal-dialog rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Actualizar Tipo Cambio</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label for="<%=TxtActualizarTC_TCActual.ClientID.ToString()%>" class="col-md-4 col-md-offset-2 control-label">Tipo Cambio Actual:</label>
|
||||
<div class="input-group col-md-6">
|
||||
<span class="input-group-addon">$</span>
|
||||
<asp:TextBox ID="TxtActualizarTC_TCActual" disabled Width="100" Text="0.00" CssClass="form-control input-sm text-right" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="<%=TxtActualizarTC_TCActualizar.ClientID.ToString()%>" class="col-md-4 col-md-offset-2 control-label">Tipo Cambio Actualizar:</label>
|
||||
<div class="input-group col-md-6">
|
||||
<span class="input-group-addon">$</span>
|
||||
<asp:TextBox ID="TxtActualizarTC_TCActualizar" Width="100" Text="0.00" CssClass="form-control input-sm text-right" runat="server" />
|
||||
<ajax:FilteredTextBoxExtender ID="FTB_TCActualizar" runat="server" TargetControlID="TxtActualizarTC_TCActualizar" FilterType="Custom, Numbers" ValidChars="." />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button id="CancelarActualizarTC" type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
<asp:Button Text="Actualizar" ID="BtnActualizarTC" OnClick="BtnActualizarTC_Click" CssClass="btn btn-primary" ValidationGroup="GrpModalActualizarTC" runat="server" />
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="ModalDivMail" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
@@ -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