-- Unificar un solo TC de pago en dólares
This commit is contained in:
@@ -79,15 +79,7 @@
|
|||||||
<asp:RequiredFieldValidator ID="RFVTCDolares" Enabled="false" runat="server" ControlToValidate="TxtTCDolares" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Cambio''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVTCDolares" Enabled="false" runat="server" ControlToValidate="TxtTCDolares" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Cambio''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="server" HighlightCssClass="vco" TargetControlID="RFVTCDolares" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="server" HighlightCssClass="vco" TargetControlID="RFVTCDolares" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
<asp:Label ID="LbImporteMN" Text="" ClientIDMode="Static" runat="server" />
|
<asp:Label ID="LbImporteMN" Text="" ClientIDMode="Static" runat="server" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-5" runat="server" id="DivDolaresDolares" visible="false">
|
|
||||||
T.C:
|
|
||||||
<asp:TextBox ID="TxtTCDolaresDolares" runat="server" placeholder="Tipo de Cambio" CssClass="form-control input-sm" MaxLength="12" Width="70px" ClientIDMode="Static" Style="text-align: right; display: inline-block;" />
|
|
||||||
<asp:RequiredFieldValidator ID="RFVDolares" Enabled="false" runat="server" ControlToValidate="TxtTCDolaresDolares" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Cambio''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" HighlightCssClass="vco" TargetControlID="RFVDolares" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
||||||
<asp:Label ID="LbDolaresDolares" Text="" ClientIDMode="Static" runat="server" />
|
|
||||||
</div>
|
|
||||||
<asp:Button ID="BtnCambiaTipoMoneda" Text="" OnClick="BtnCambiaTipoMoneda_Click" ClientIDMode="Static" Style="display: none;" runat="server" />
|
|
||||||
</div>
|
</div>
|
||||||
<div class="row" runat="server" id="DivTarjeta" visible="false">
|
<div class="row" runat="server" id="DivTarjeta" visible="false">
|
||||||
<label class="col-xs-2 control-label">Tarjeta:</label>
|
<label class="col-xs-2 control-label">Tarjeta:</label>
|
||||||
|
|||||||
@@ -294,8 +294,6 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
If CveMoneda = 2 Then
|
If CveMoneda = 2 Then
|
||||||
ChkPagarPesos.Visible = True
|
ChkPagarPesos.Visible = True
|
||||||
TxtTC.Text = GlobalTipoCambio(NowADS()).FormatoNumero(4)
|
TxtTC.Text = GlobalTipoCambio(NowADS()).FormatoNumero(4)
|
||||||
TxtTCDolaresDolares.Text = GlobalTipoCambio(NowADS()).FormatoNumero(4)
|
|
||||||
DivDolaresDolares.Visible = True
|
|
||||||
TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);")
|
TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);")
|
||||||
Else
|
Else
|
||||||
ChkPagarDolares.Visible = True
|
ChkPagarDolares.Visible = True
|
||||||
@@ -338,10 +336,6 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
RegistraScript("CambiaDolaresPesos();")
|
RegistraScript("CambiaDolaresPesos();")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If DivDolaresDolares.Visible Then
|
|
||||||
TxtTCDolaresDolares.Text = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).FormatoNumero(4)
|
|
||||||
End If
|
|
||||||
|
|
||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
End Sub
|
End Sub
|
||||||
#Region " CARGA DATOS "
|
#Region " CARGA DATOS "
|
||||||
@@ -728,11 +722,7 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
CvePrePoliza = ObjMov.AddPrePolizas("Bancos/ProveedoresAbonar", 2, ImporteSeleccionado, ImporteSeleccionado, 1, TxtFechaDocumento.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo:=FolioFijo, ReglaFolioPoliza:=ObjComp.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, Nothing, UsuarioActual.CveEmpresa), CveTipoPoliza:=ObjMov.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, "-1", UsuarioActual.CveEmpresa))
|
CvePrePoliza = ObjMov.AddPrePolizas("Bancos/ProveedoresAbonar", 2, ImporteSeleccionado, ImporteSeleccionado, 1, TxtFechaDocumento.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo:=FolioFijo, ReglaFolioPoliza:=ObjComp.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, Nothing, UsuarioActual.CveEmpresa), CveTipoPoliza:=ObjMov.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, "-1", UsuarioActual.CveEmpresa))
|
||||||
|
|
||||||
If CveMoneda = 2 Then
|
If CveMoneda = 2 Then
|
||||||
If TxtTCDolares.Visible Then
|
TipoCambio = TxtTCDolares.Text.ToDecimal
|
||||||
TipoCambio = TxtTCDolares.Text.ToDecimal
|
|
||||||
Else
|
|
||||||
TipoCambio = TxtTCDolaresDolares.Text.ToDecimal
|
|
||||||
End If
|
|
||||||
Else
|
Else
|
||||||
If TxtTC.Visible Then
|
If TxtTC.Visible Then
|
||||||
TipoCambio = TxtTC.Text.ToDecimal
|
TipoCambio = TxtTC.Text.ToDecimal
|
||||||
@@ -1143,16 +1133,7 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
'recargo la moneda con la que se va a pagar
|
'recargo la moneda con la que se va a pagar
|
||||||
Dim dr As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCuenta = {0}", DdlCuenta.SelectedValue))
|
Dim dr As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCuenta = {0}", DdlCuenta.SelectedValue))
|
||||||
If dr IsNot Nothing Then
|
If dr IsNot Nothing Then
|
||||||
|
TxtFechaDocumento.Attributes.Remove("onchange")
|
||||||
|
|
||||||
If dr("CveMoneda").ToString.ToEntero >= 2 Then
|
|
||||||
DivDolaresDolares.Visible = True
|
|
||||||
TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);")
|
|
||||||
BtnCambiaTipoMoneda_Click(Nothing, Nothing)
|
|
||||||
Else
|
|
||||||
DivDolaresDolares.Visible = False
|
|
||||||
TxtFechaDocumento.Attributes.Remove("onchange")
|
|
||||||
End If
|
|
||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
|
|
||||||
If ChkPagarPesos.Checked Then
|
If ChkPagarPesos.Checked Then
|
||||||
@@ -1162,6 +1143,11 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
CveMoneda = dr("CveMoneda").ToString.ToEntero
|
CveMoneda = dr("CveMoneda").ToString.ToEntero
|
||||||
RegistraScript("CambiaDolaresPesos();")
|
RegistraScript("CambiaDolaresPesos();")
|
||||||
End If
|
End If
|
||||||
|
If CveMoneda = 2 Then
|
||||||
|
DivTCDolares.Visible = True
|
||||||
|
TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);")
|
||||||
|
TxtTCDolares.Text = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).FormatoNumero(4)
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' si no tiene CveMoneda, o es -1, cuando cambia de cuenta filtra las facturas
|
' si no tiene CveMoneda, o es -1, cuando cambia de cuenta filtra las facturas
|
||||||
@@ -1365,13 +1351,11 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
Protected Sub ChkPagarPesos_CheckedChanged(sender As Object, e As EventArgs)
|
Protected Sub ChkPagarPesos_CheckedChanged(sender As Object, e As EventArgs)
|
||||||
If ChkPagarPesos.Checked Then
|
If ChkPagarPesos.Checked Then
|
||||||
DivTC.Visible = True
|
DivTC.Visible = True
|
||||||
DivDolaresDolares.Visible = False
|
|
||||||
CargaCuentas(DdlTipoTransaccion.SelectedValue.ToEntero)
|
CargaCuentas(DdlTipoTransaccion.SelectedValue.ToEntero)
|
||||||
TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);")
|
TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);")
|
||||||
TxtTC.Text = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).FormatoNumero(4)
|
TxtTC.Text = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).FormatoNumero(4)
|
||||||
Else
|
Else
|
||||||
DivTC.Visible = False
|
DivTC.Visible = False
|
||||||
DivDolaresDolares.Visible = True
|
|
||||||
CargaCuentas(DdlTipoTransaccion.SelectedValue.ToEntero)
|
CargaCuentas(DdlTipoTransaccion.SelectedValue.ToEntero)
|
||||||
TxtFechaDocumento.Attributes.Remove("onchange")
|
TxtFechaDocumento.Attributes.Remove("onchange")
|
||||||
End If
|
End If
|
||||||
@@ -1385,13 +1369,13 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
Protected Sub ChkPagarDolares_CheckedChanged(sender As Object, e As EventArgs)
|
Protected Sub ChkPagarDolares_CheckedChanged(sender As Object, e As EventArgs)
|
||||||
If ChkPagarDolares.Checked Then
|
If ChkPagarDolares.Checked Then
|
||||||
DivTCDolares.Visible = True
|
DivTCDolares.Visible = True
|
||||||
DivDolaresDolares.Visible = False
|
'DivDolaresDolares.Visible = False
|
||||||
CargaCuentas(DdlTipoTransaccion.SelectedValue.ToEntero)
|
CargaCuentas(DdlTipoTransaccion.SelectedValue.ToEntero)
|
||||||
TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);")
|
TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);")
|
||||||
TxtTCDolares.Text = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).FormatoNumero(4)
|
TxtTCDolares.Text = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).FormatoNumero(4)
|
||||||
Else
|
Else
|
||||||
DivTCDolares.Visible = False
|
DivTCDolares.Visible = False
|
||||||
DivDolaresDolares.Visible = False
|
'DivDolaresDolares.Visible = False
|
||||||
CargaCuentas(DdlTipoTransaccion.SelectedValue.ToEntero)
|
CargaCuentas(DdlTipoTransaccion.SelectedValue.ToEntero)
|
||||||
TxtFechaDocumento.Attributes.Remove("onchange")
|
TxtFechaDocumento.Attributes.Remove("onchange")
|
||||||
End If
|
End If
|
||||||
|
|||||||
Reference in New Issue
Block a user