Soporte tipo de cambio Egs
This commit is contained in:
@@ -712,6 +712,7 @@
|
||||
<td>
|
||||
<asp:TextBox ID="TxtTipoCambio" runat="server" MaxLength="12" Width="80px"></asp:TextBox></td>
|
||||
</tr>
|
||||
<asp:Button ID="BtnCambiaTipoMoneda" Text="" OnClick="BtnCambiaTipoMoneda_Click" ClientIDMode="Static" Style="display: none;" runat="server" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
@@ -1533,5 +1534,14 @@
|
||||
t.value = (ToDouble(t.value) > ToDouble(c) ? c : t.value)
|
||||
}
|
||||
|
||||
var TipoCambioActual = 0.0;
|
||||
function CambiaTC(txt) {
|
||||
let TipoCambioTxt = ToDouble(txt.value)
|
||||
if (TipoCambioActual != TipoCambioTxt) {
|
||||
$get("BtnCambiaTipoMoneda").click();
|
||||
TipoCambioActual = TipoCambioTxt;
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
@@ -649,6 +649,7 @@ Partial Class Bancos_IE
|
||||
CveIE = -1
|
||||
TxtFechaDocumento.Text = Now.ToShortDateString
|
||||
ImgUpdateCuentaDeposito.Visible = False
|
||||
TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);")
|
||||
End If
|
||||
|
||||
InicializaSolicitudAnticipoOC()
|
||||
@@ -2251,7 +2252,12 @@ Partial Class Bancos_IE
|
||||
Dep.Dispose()
|
||||
|
||||
Return EsValido
|
||||
End Function
|
||||
End Function
|
||||
|
||||
Protected Sub BtnCambiaTipoMoneda_Click(sender As Object, e As EventArgs)
|
||||
CambiaTipoMoneda()
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As System.EventArgs) Handles BtnGuardar.Click
|
||||
|
||||
@@ -2259,9 +2265,7 @@ Partial Class Bancos_IE
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
'PARA QUE TOME EL TIPO DE CAMBIO DEL DIA
|
||||
TxtTipoCambio.Text = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).ToString
|
||||
UpTipoCambio.Update()
|
||||
|
||||
|
||||
|
||||
Dim ObjIE As New ClsBancos()
|
||||
@@ -3045,14 +3049,13 @@ Partial Class Bancos_IE
|
||||
'BANCOS COMPLEMENTARIA
|
||||
If DdlMoneda.SelectedValue.ToEntero > 1 AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119) Then
|
||||
Dim ImporteAplicar As Decimal = TxtImporte.Text.ToDecimal
|
||||
Dim TCPago As Decimal = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).ToDecimal
|
||||
Dim ImporteAplicarMN = (ImporteAplicar * TCPago - 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:=TCPago) Then
|
||||
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
|
||||
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:=TCPago) 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
|
||||
MsgError = "Ocurrió un error al registrar el asiento de bancos complementaria de devolución"
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -119,7 +119,7 @@ Partial Class Bancos_Reportes
|
||||
If Not UsuarioActual.CveEmpresa.Contiene(13, 83) Then
|
||||
'CONVIERTO A PESOS CUANDO SE PAGA CON PESOS FACTURAS DE DOLARES
|
||||
For Each Dr As DataRow In dtMovs.Rows
|
||||
Dr("Importe") = Dr("Importe").ToString.ToDecimal * Dr("TC").ToString.ToDecimal
|
||||
Dr("Importe") = Dr("ImporteMN").ToString.ToDecimal
|
||||
Dr("ImporteNC") = Dr("ImporteNC").ToString.ToDecimal * Dr("TC").ToString.ToDecimal
|
||||
Dr("Total") = Dr("Total").ToString.ToDecimal * Dr("TC").ToString.ToDecimal
|
||||
Dr("Saldo") = Dr("Saldo").ToString.ToDecimal * Dr("TC").ToString.ToDecimal
|
||||
|
||||
Reference in New Issue
Block a user