-- tipo de cambio en depósitos en dólares
This commit is contained in:
@@ -151,11 +151,12 @@
|
|||||||
<label style="">Cuenta:</label>
|
<label style="">Cuenta:</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2" runat="server">
|
<div class="col-md-2" runat="server">
|
||||||
<asp:DropDownList ID="DdlCuentaDeposito" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="100%"></asp:DropDownList>
|
<asp:DropDownList ID="DdlCuentaDeposito" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="100%" AutoPostBack ="true" OnSelectedIndexChanged="DdlCuentaDeposito_SelectedIndexChanged"></asp:DropDownList>
|
||||||
<asp:RequiredFieldValidator ID="RfvDdlCuentaDeposito" runat="server" ControlToValidate="DdlCuentaDeposito" InitialValue="-1" CssClass="help-block errorimput" Display="None"
|
<asp:RequiredFieldValidator ID="RfvDdlCuentaDeposito" runat="server" ControlToValidate="DdlCuentaDeposito" InitialValue="-1" CssClass="help-block errorimput" Display="None"
|
||||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida">
|
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida">
|
||||||
</asp:RequiredFieldValidator>
|
</asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCRfvDdlCuentaDeposito" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlCuentaDeposito" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCRfvDdlCuentaDeposito" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlCuentaDeposito" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
<div id="divtcdeposito" runat="server" visible="False">TC: <asp:TextBox ID="TxtTCDeposito" Width="60px" runat="server"></asp:TextBox></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-1">
|
<div class="col-md-1">
|
||||||
@@ -367,7 +368,7 @@
|
|||||||
<asp:UpdatePanel ID="UpGvFacturas" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpGvFacturas" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<br />
|
<br />
|
||||||
<div style="height: 350px; overflow-x: scroll">
|
<div style="height: 250px; overflow-x: scroll">
|
||||||
<asp:GridView ID="GvFacturas" runat="server" AutoGenerateColumns="False" DataKeyNames="CveVenta, CvePrePoliza, CveIE, TipoCambio, CveMoneda, CveCliente, Importe, SerieFolio,CveCuenta,CveSubProyecto" CssClass="table table-striped table-advance table-hover" Style="text-align: center; float: right; width: 100%;" GridLines="None">
|
<asp:GridView ID="GvFacturas" runat="server" AutoGenerateColumns="False" DataKeyNames="CveVenta, CvePrePoliza, CveIE, TipoCambio, CveMoneda, CveCliente, Importe, SerieFolio,CveCuenta,CveSubProyecto" CssClass="table table-striped table-advance table-hover" Style="text-align: center; float: right; width: 100%;" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
|
|||||||
@@ -85,9 +85,9 @@ Partial Class Bancos_DepositosCaja
|
|||||||
DivRowCuenta.Visible = False
|
DivRowCuenta.Visible = False
|
||||||
DivDescuentocheck.Visible = False
|
DivDescuentocheck.Visible = False
|
||||||
End If
|
End If
|
||||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
DivRowCuenta.Visible = True
|
DivRowCuenta.Visible = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa.Contiene(140, 141) Then divTipoPago.Visible = False : divTipoPago1.Visible = False
|
If UsuarioActual.CveEmpresa.Contiene(140, 141) Then divTipoPago.Visible = False : divTipoPago1.Visible = False
|
||||||
@@ -273,6 +273,7 @@ Partial Class Bancos_DepositosCaja
|
|||||||
Try
|
Try
|
||||||
Dim FolioIE As Long = -1
|
Dim FolioIE As Long = -1
|
||||||
Dim CveMoneda As Integer = 1
|
Dim CveMoneda As Integer = 1
|
||||||
|
Dim CveMonedaDeposito As Integer
|
||||||
Dim TipoCambio As Decimal = 1
|
Dim TipoCambio As Decimal = 1
|
||||||
Dim Fecha As Date = TxtFecha.Text.ToDate
|
Dim Fecha As Date = TxtFecha.Text.ToDate
|
||||||
Dim drOrigen As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta:=DdlCajaChica.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("")
|
Dim drOrigen As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta:=DdlCajaChica.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("")
|
||||||
@@ -294,7 +295,14 @@ Partial Class Bancos_DepositosCaja
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If drDestino IsNot Nothing Then
|
If drDestino IsNot Nothing Then
|
||||||
CveMoneda = drDestino("CveMoneda").ToString.ToEntero
|
CveMonedaDeposito = drDestino("CveMoneda").ToString.ToEntero
|
||||||
|
End If
|
||||||
|
If CveMonedaDeposito <> 1 Then
|
||||||
|
TipoCambio = TxtTCDeposito.Text.ToDecimal
|
||||||
|
If TipoCambio < 10 Then
|
||||||
|
Alert("Tipo cambio incorrecto", TipoMensaje.ToastAdventencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
NuevaCvePrePoliza = ObjConta.AddPrePolizas("DepCaja", 13, TotalImportePrePoliza, TotalImportePrePoliza, CveMoneda, Fecha, $"Depósito Bancario - {DdlTipoDeposito.SelectedItem.Text}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=1)
|
NuevaCvePrePoliza = ObjConta.AddPrePolizas("DepCaja", 13, TotalImportePrePoliza, TotalImportePrePoliza, CveMoneda, Fecha, $"Depósito Bancario - {DdlTipoDeposito.SelectedItem.Text}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=1)
|
||||||
@@ -372,12 +380,18 @@ Partial Class Bancos_DepositosCaja
|
|||||||
If FolioIE <= 0 Then
|
If FolioIE <= 0 Then
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
End If
|
End If
|
||||||
CveIEOrigen = ObjBancos.AddBancos_IE(DdlCuentaDeposito.SelectedValue.ToEntero, CveTransaccionBanco, Fecha, FolioIE.ToString, $"Depósito Bancario - {tSubProyectoDeposito}", TotalImporte, CveMoneda, 1, TxtObservaciones.Text, "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveProveedorIntermediario:=CveProveedorIntermediario)
|
|
||||||
|
CveIEOrigen = ObjBancos.AddBancos_IE(DdlCuentaDeposito.SelectedValue.ToEntero, CveTransaccionBanco, Fecha, FolioIE.ToString, $"Depósito Bancario - {tSubProyectoDeposito}", TotalImporte, CveMonedaDeposito, TipoCambio, TxtObservaciones.Text, "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveProveedorIntermediario:=CveProveedorIntermediario)
|
||||||
|
|
||||||
documentos += String.Format("<a href='/Bancos/IE.aspx?CveIE={0}' target='_blank' class='Texto'>Depósito: {1}</a>     <br/> ", CveIEOrigen, FolioIE)
|
documentos += String.Format("<a href='/Bancos/IE.aspx?CveIE={0}' target='_blank' class='Texto'>Depósito: {1}</a>     <br/> ", CveIEOrigen, FolioIE)
|
||||||
|
|
||||||
If Not OcurrioError AndAlso ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, TotalImporte * TipoCambio, 30, $"Depósito Bancario - {DdlTipoDeposito.SelectedItem.Text}", $"Depósito Bancario - {DdlTipoDeposito.SelectedItem.Text}", CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, CveIE:=CveIEOrigen) Then
|
If Not OcurrioError AndAlso ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, TotalImporte, 30, $"Depósito Bancario - {DdlTipoDeposito.SelectedItem.Text}", $"Depósito Bancario - {DdlTipoDeposito.SelectedItem.Text}", CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, CveIE:=CveIEOrigen) Then
|
||||||
|
|
||||||
|
If CveMonedaDeposito > 1 Then
|
||||||
|
If Not OcurrioError AndAlso Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, (TotalImporte * TipoCambio) - TotalImporte, 204, $"Depósito Bancario - {DdlTipoDeposito.SelectedItem.Text}", $"Depósito Bancario - {DdlTipoDeposito.SelectedItem.Text}", CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, CveIE:=CveIEOrigen, ImporteME:=TotalImporte, TipoCambio:=TipoCambio) Then
|
||||||
|
OcurrioError = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
If ChkFaltante.Checked Then
|
If ChkFaltante.Checked Then
|
||||||
CveSubProyectoComision = DdlSubProyectoDeposito.SelectedValue.ToEntero
|
CveSubProyectoComision = DdlSubProyectoDeposito.SelectedValue.ToEntero
|
||||||
CveClasificacionComision = DdlClasificacion.SelectedValue.ToEntero
|
CveClasificacionComision = DdlClasificacion.SelectedValue.ToEntero
|
||||||
@@ -442,7 +456,15 @@ Partial Class Bancos_DepositosCaja
|
|||||||
End If
|
End If
|
||||||
CveIEDestino = ObjBancos.AddBancos_IE(CveCuentaBancaria, 2, Fecha, FolioIE.ToString, String.Format("Depósito Bancario: {0}", SerieFolio), Importe, CveMoneda, 1, TxtObservaciones.Text, "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
CveIEDestino = ObjBancos.AddBancos_IE(CveCuentaBancaria, 2, Fecha, FolioIE.ToString, String.Format("Depósito Bancario: {0}", SerieFolio), Importe, CveMoneda, 1, TxtObservaciones.Text, "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
If Not OcurrioError AndAlso Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Importe, Importe * TipoCambio, 30, SerieFolio, String.Format("Depósito Bancario: {0}", SerieFolio), CveClasificacion:=CveClasificacion, CveSubProyecto:=tCveSubProyecto, CveVenta:=CveVenta, CveIE:=CveIEDestino) Then
|
If Not OcurrioError AndAlso ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Importe, Importe, 30, SerieFolio, String.Format("Depósito Bancario: {0}", SerieFolio), CveClasificacion:=CveClasificacion, CveSubProyecto:=tCveSubProyecto, CveVenta:=CveVenta, CveIE:=CveIEDestino) Then
|
||||||
|
|
||||||
|
If Gvr.DataKey("CveMoneda").ToEntero > 1 Then
|
||||||
|
If Not OcurrioError AndAlso Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Importe, (Importe * TipoCambio) - Importe, 204, SerieFolio, String.Format("Depósito Bancario: {0}", SerieFolio), CveClasificacion:=CveClasificacion, CveSubProyecto:=tCveSubProyecto, CveVenta:=CveVenta, CveIE:=CveIEDestino, ImporteME:=Importe, TipoCambio:=TipoCambio) Then
|
||||||
|
OcurrioError = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Else
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
@@ -730,4 +752,13 @@ Partial Class Bancos_DepositosCaja
|
|||||||
Return File
|
Return File
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
Protected Sub DdlCuentaDeposito_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
|
Dim CveMonedaDeposito As Integer = GlobalDTBancosCuentasGral(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda", $"CveCuenta={DdlCuentaDeposito.SelectedValue}").ToEntero
|
||||||
|
If CveMonedaDeposito <> 1 Then
|
||||||
|
divtcdeposito.Visible = True
|
||||||
|
Else
|
||||||
|
divtcdeposito.Visible = False
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
Reference in New Issue
Block a user