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