--merge SIGWEB
This commit is contained in:
@@ -123,20 +123,48 @@
|
||||
<asp:HiddenField ID="HdnTipoTransaccion" runat="server" Value="" />
|
||||
</div>
|
||||
|
||||
|
||||
<asp:Label CssClass="col-md-1" Text="" ID="LbTipoMoneda" runat="server" />
|
||||
<div class="col-md-2" id="DVPAgoEnPesos" runat="server" visible ="false">
|
||||
<asp:CheckBox Text="Pagar con pesos" TextAlign="Right" Visible="false" AutoPostBack="true" ID="ChkPagarPesos" OnCheckedChanged="ChkPagarPesos_CheckedChanged" runat="server" ClientIDMode="Static" />
|
||||
<%--<asp:CheckBox Text="Pagar con dolares" TextAlign="Right" Visible="false" AutoPostBack="true" ID="ChkPagarDolares" runat="server" OnCheckedChanged="ChkPagarDolares_CheckedChanged" ClientIDMode="Static" />--%>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-2 control-label">Cuenta:</label>
|
||||
<div class="col-md-5">
|
||||
<div class="col-md-4">
|
||||
<asp:Label ID="LblCuenta" runat="server" Text=""></asp:Label>
|
||||
<asp:DropDownList ID="DdlCuenta" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" ValidationGroup="GrpGuardar">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVCuenta" runat="server" ControlToValidate="DdlCuenta" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOCuenta" runat="server" HighlightCssClass="vco" TargetControlID="RFVCuenta" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="col-md-1">
|
||||
<asp:Label ID="LblEstatusIE" runat="server" Text="Activo" Visible="false"></asp:Label>
|
||||
<asp:DropDownList runat="server" CssClass="form-control input-sm select2me" ID="DdlEstatusIE" DataValueField="CveEstatusIE" DataTextField="EstatusIE" AutoPostBack="false"></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2" runat="server" id="DivTC" visible="false">
|
||||
T.C.:
|
||||
<asp:TextBox ID="TxtTC" runat="server" Text="1" placeholder="Tipo de Cambio" CssClass="form-control input-sm" MaxLength="12" onblur="CambiaTCPagoOC();" Width="70px" ClientIDMode="Static" Style="text-align: right; display: inline-block;" />
|
||||
<asp:RequiredFieldValidator ID="RFVTC" Enabled="false" runat="server" ControlToValidate="TxtTC" 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="VCETC" runat="server" HighlightCssClass="vco" TargetControlID="RFVTC" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:Label ID="LbImporteME" Text="" ClientIDMode="Static" runat="server" />
|
||||
<div style="display:none">
|
||||
<asp:Button ID="LnkActualizaTCOC" ClientIDMode="Static" runat="server" Text="Actaulziar" OnClick="LnkActualizaTCOC_Click" ></asp:Button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-2" runat="server" id="DivTC2" visible="false">
|
||||
Dolares
|
||||
<asp:TextBox ID="TxtImporteDolares" runat="server" Text="1" placeholder="Dolares" CssClass="form-control input-sm" MaxLength="12" Width="70px" ClientIDMode="Static" Style="text-align: right; display: inline-block;" />
|
||||
<%--<asp:Label ID="Label1" Text="" ClientIDMode="Static" runat="server" />--%>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="row" id="DivCheques" runat="server" visible="false">
|
||||
<label class="col-md-2 control-label">Movimiento Relacionado:</label>
|
||||
@@ -1781,5 +1809,10 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
function CambiaTCPagoOC() {
|
||||
|
||||
$("#LnkActualizaTCOC").click();
|
||||
}
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
@@ -297,6 +297,17 @@ Partial Class Bancos_IE
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private Property CveMonedaOriginal As Integer
|
||||
Get
|
||||
Return ViewState("CveMonedaOriginal").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveMonedaOriginal") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private Property CveOCSolicitudAnticipo As Integer
|
||||
Get
|
||||
|
||||
@@ -504,6 +515,22 @@ Partial Class Bancos_IE
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private Property ImporteOriginalDolaras As Decimal
|
||||
Get
|
||||
If ViewState("ImporteOriginalDolaras") Is Nothing Then
|
||||
Return 0
|
||||
Else
|
||||
Return ViewState("ImporteOriginalDolaras").ToString().ToDecimal()
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As Decimal)
|
||||
ViewState("ImporteOriginalDolaras") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
#Region "CANCELACIÓN COMPLEMENTO MODAL V2"
|
||||
|
||||
Property CveComplementoPagoCancelar As Integer
|
||||
@@ -2471,6 +2498,9 @@ Partial Class Bancos_IE
|
||||
|
||||
If CveOCSolicitudAnticipo > 0 Then
|
||||
|
||||
|
||||
|
||||
|
||||
Dim ObjOC As New ClsOC
|
||||
If ObjOC.GetOCAnticipoSaldo(CveOCSolicitudAnticipo, UsuarioActual.CveEmpresa) Then
|
||||
SaldoOCAnticipo = ObjOC.DtResultados(0)("Saldo").ToString.ToDecimal
|
||||
@@ -2479,10 +2509,18 @@ Partial Class Bancos_IE
|
||||
End If
|
||||
ObjOC.Dispose()
|
||||
|
||||
If TxtImporte.Text.ToDecimal > SaldoOCAnticipo Then
|
||||
Dim ImporteComparacion As Decimal = TxtImporte.Text.ToDecimal
|
||||
|
||||
'
|
||||
If ChkPagarPesos.Checked Then
|
||||
ImporteComparacion = ImporteOriginalDolaras
|
||||
End If
|
||||
|
||||
If ImporteComparacion > SaldoOCAnticipo Then
|
||||
EsValido = False
|
||||
Alert($"El importe del movimiento es mayor al saldo de la orden de compra importe movmiento {TxtImporte.Text.FormatoNumero } saldo orden de compra: {SaldoOCAnticipo.ToString.FormatoNumero}", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Return EsValido
|
||||
@@ -5557,11 +5595,23 @@ Partial Class Bancos_IE
|
||||
Else
|
||||
TxtImporte.Text = DrOC("ImporteAnticipo").ToString.FormatoNumero
|
||||
TxtImporteLetra.Text = DrOC("ImporteAnticipo").ToString.ToDouble.Texto2Letras(DrOC("CveMoneda").ToString.ToEntero)
|
||||
|
||||
ImporteOriginalDolaras = DrOC("ImporteAnticipo").ToString.ToDecimal
|
||||
End If
|
||||
|
||||
DdlMoneda.SelectedValue = DrOC("CveMoneda").ToString
|
||||
|
||||
CveMoneda = DrOC("CveMoneda").ToString.ToEntero
|
||||
CargaCuenta(DrOC("CveMoneda").ToString.ToEntero)
|
||||
|
||||
CveMonedaOriginal = DrOC("CveMoneda").ToString.ToEntero
|
||||
|
||||
|
||||
If CveMonedaOriginal > 1 Then
|
||||
MostrarPagoEnPesos(True)
|
||||
End If
|
||||
|
||||
|
||||
UpCuentaDeposito.Update()
|
||||
If DrOC("CveProveedor").ToString.ToEntero > 0 Then
|
||||
HdnCveProveedor.Value = DrOC("CveProveedor").ToString
|
||||
@@ -5644,6 +5694,69 @@ Partial Class Bancos_IE
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub MostrarPagoEnPesos(Mostrar As Boolean)
|
||||
|
||||
LbTipoMoneda.Visible = Mostrar
|
||||
LbTipoMoneda.Text = If(Mostrar, "Pago en doalres", "")
|
||||
DVPAgoEnPesos.Visible = Mostrar
|
||||
ChkPagarPesos.Visible = Mostrar
|
||||
|
||||
TxtTC.Text = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).FormatoNumero(4)
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub ChkPagarPesos_CheckedChanged(sender As Object, e As EventArgs)
|
||||
|
||||
If ChkPagarPesos.Checked Then
|
||||
DivTC.Visible = True
|
||||
DivTC2.Visible = True
|
||||
' DivDolaresDolares.Visible = False
|
||||
'CargaCuentas(DdlTipoTransaccion.SelectedValue.ToEntero)
|
||||
CargaCuenta(1)
|
||||
'TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);")
|
||||
'TxtTC.Text = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).FormatoNumero(4)
|
||||
TxtImporteDolares.Text = TxtImporte.Text
|
||||
'TxtImporteDolares.Text = TxtImporte.Text
|
||||
'TxtImporte.Text = (TxtImporte.Text.ToDecimal * (TxtTC.Text.ToDecimal)).ToString("###,###,###.00")
|
||||
CveMoneda = 1
|
||||
Else
|
||||
DivTC.Visible = False
|
||||
DivTC2.Visible = False
|
||||
CveMoneda = CveMonedaOriginal
|
||||
'DivDolaresDolares.Visible = True
|
||||
'CargaCuentas(DdlTipoTransaccion.SelectedValue.ToEntero)
|
||||
CargaCuenta(CveMonedaOriginal)
|
||||
'TxtFechaDocumento.Attributes.Remove("onchange")
|
||||
TxtImporte.Text = ImporteOriginalDolaras.ToString("###,###,###.00")
|
||||
End If
|
||||
|
||||
CambiaTCPagoOC()
|
||||
|
||||
UpDatos.Update()
|
||||
|
||||
' RegistraScript("CambiaPesosDolares();")
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub CambiaTCPagoOC()
|
||||
|
||||
If ChkPagarPesos.Checked Then
|
||||
TxtImporte.Text = (TxtImporteDolares.Text.ToDecimal * (TxtTC.Text.ToDecimal)).ToString("###,###,###.00")
|
||||
Else
|
||||
TxtImporte.Text = TxtImporteDolares.Text
|
||||
End If
|
||||
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkActualizaTCOC_Click(sender As Object, e As EventArgs)
|
||||
CambiaTCPagoOC()
|
||||
End Sub
|
||||
|
||||
|
||||
Private Function GuardaSolicitudAnticipoOC(ByRef ObjOC As ClsOC) As String
|
||||
Dim ObjOI As New ClsOIEventos
|
||||
Dim CveEvento As Integer = 0
|
||||
@@ -6724,4 +6837,5 @@ Partial Class Bancos_IE
|
||||
RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString
|
||||
Calendario.EndDate = DateTime.Now
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -1812,7 +1812,7 @@ Partial Class Bancos_PopIECompras
|
||||
Funcionalidad = 313
|
||||
ConceptoContable = 248
|
||||
ElseIf MovimientoPagar.ConceptoRetIVA = 5 Then
|
||||
Funcionalidad = 578
|
||||
Funcionalidad = 577
|
||||
ConceptoContable = 285
|
||||
End If
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
<asp:ListItem Value="2">F y E</asp:ListItem>
|
||||
<asp:ListItem Value="3">Ingresos X Comprobar</asp:ListItem>
|
||||
<asp:ListItem Value="4">Deudores</asp:ListItem>
|
||||
<asp:ListItem Value="5">Compras</asp:ListItem>
|
||||
<asp:ListItem Value="5" Enabled="false">Compras</asp:ListItem>
|
||||
</asp:RadioButtonList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -785,11 +785,25 @@ Partial Class Bancos_PopIEVentas
|
||||
End If
|
||||
|
||||
If RFCCliente.ToUpper <> "XAXX010101000" Then
|
||||
Dim ObjCompras As New ClsCompras
|
||||
If ObjCompras.GetCompras(-1, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa, ProveedorRFC:=RFCCliente) Then
|
||||
RBLContado.Items(4).Enabled = True
|
||||
Dim CveProveedor As Integer = GlobalDTCompProveedores(UsuarioActual.CveEmpresa, RFC:=RFCCliente.ToUpper).FiltroPrimeroValor("CveProveedor").ToEntero
|
||||
|
||||
If CveProveedor > 0 Then
|
||||
Dim Mov As New ClsMovimientos
|
||||
If Mov.GetCxPProveedor(CveProveedor, MinFecha.ToShortDateString, MaxFecha.ToShortDateString, -1, -1, -1, -1, -1, 1, -1, -1, "-1", "-1", "-1") Then
|
||||
If Mov.DtResultados.FiltraParametros("Saldo > 0", "Fecha,SerieFolio").Rows.Count > 0 Then
|
||||
RBLContado.Items(4).Enabled = True
|
||||
End If
|
||||
End If
|
||||
|
||||
Mov.Dispose()
|
||||
End If
|
||||
ObjCompras.Dispose()
|
||||
|
||||
|
||||
'Dim ObjCompras As New ClsCompras
|
||||
'If ObjCompras.GetCompras(-1, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa, ProveedorRFC:=RFCCliente) Then
|
||||
' RBLContado.Items(4).Enabled = True
|
||||
'End If
|
||||
'ObjCompras.Dispose()
|
||||
End If
|
||||
|
||||
If Not Validada Then
|
||||
@@ -926,6 +940,9 @@ Partial Class Bancos_PopIEVentas
|
||||
End Sub
|
||||
|
||||
Protected Sub CargaCompras(Optional CveMoneda As Integer = 1)
|
||||
|
||||
If RFCCliente = "XAXX010101000" Then Exit Sub
|
||||
|
||||
Dim ObjCompras As New ClsCompras
|
||||
Dim ObjProveedor As New ClsCompProveedores
|
||||
Dim CveProveedor As Integer = -1
|
||||
|
||||
@@ -1066,7 +1066,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
Funcionalidad = 313
|
||||
ConceptoContable = 248
|
||||
ElseIf gvr.DataKey("CveRetIVAConcepto").ToEntero = 5 Then
|
||||
Funcionalidad = 578
|
||||
Funcionalidad = 577
|
||||
ConceptoContable = 285
|
||||
End If
|
||||
|
||||
@@ -1221,13 +1221,13 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
importeMX = ImporteMovimiento
|
||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago)
|
||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioCompra, TipoCambioPago)
|
||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago)
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago)
|
||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioCompra, TipoCambioPago)
|
||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
End If
|
||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
||||
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
||||
|
||||
@@ -654,7 +654,7 @@ Partial Class Bancos_RepProgramarRecursos
|
||||
ObjUsuarios.Dispose()
|
||||
End Sub
|
||||
Private Sub EnviaCorreoNotificacion()
|
||||
If UsuarioActual.CveEmpresa = 13 Then
|
||||
If UsuarioActual.CveEmpresa.Contiene(13, 83) Then
|
||||
|
||||
Dim strBody As New StringBuilder
|
||||
Try
|
||||
|
||||
Reference in New Issue
Block a user