From 5b282abf7ffa6bc7c452a326b76209b9a490778d Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Wed, 15 Jan 2025 21:12:30 -0700 Subject: [PATCH] =?UTF-8?q?0=20-=20Conta:=20Aplicaci=C3=B3n=20de=20pago=20?= =?UTF-8?q?a=20proveedores=20en=20pesos=20y=20d=C3=B3lares=20con=20una=20m?= =?UTF-8?q?isma=20cuenta,=20ej.=20=20SCHNEIDER=20ELECTRIC=20MEXICO?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/ClsMovimientos.vb | 5 +- Bancos/ProveedoresAbonar.aspx | 157 ++++++++++++++++++++++------- Bancos/ProveedoresAbonar.aspx.vb | 112 +++++++++++++++----- Bancos/RepProveedoresPagos.aspx | 84 ++++++++------- Bancos/RepProveedoresPagos.aspx.vb | 15 ++- 5 files changed, 270 insertions(+), 103 deletions(-) diff --git a/App_Code/ClsMovimientos.vb b/App_Code/ClsMovimientos.vb index 68de58744..08575e3ae 100644 --- a/App_Code/ClsMovimientos.vb +++ b/App_Code/ClsMovimientos.vb @@ -594,7 +594,7 @@ Public Class ClsMovimientos Public Function GetCxPEmpresa(CveProveedor As Integer, FechaVencimientoInicio As String, FechaVencimientoFin As String, CveSubProyecto As Integer, DiasVencidos As Integer, CveUsuarioRegistro As Integer, CveUsuarioProgramo As Integer, CveUsuarioResponsable As Integer, CveClasificacion As Integer, CveMoneda As Integer, CveTipoPagoProgramo As Integer, CveEstatusFactura As Integer, CveAplicaNC As Integer, CveEmpresa As Integer, Optional FechaVI As String = "-1", Optional FechaVF As String = "-1", Optional CodigoProgramacion As String = "-1", Optional CveTipoProveedor As Integer = 0, - Optional AgrupadoPorSubProyecto As Boolean = False) As Boolean + Optional AgrupadoPorSubProyecto As Boolean = False, Optional VerEnPesos As Boolean = False) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Banc_Proveedores") With SqlAdapter.SelectCommand.Parameters @@ -616,7 +616,8 @@ Public Class ClsMovimientos .Add("@FechaVF", SqlDbType.VarChar).Value = FechaVF .Add("@CodigoProgramacion", SqlDbType.VarChar).Value = CodigoProgramacion .Add("@CveTipoProveedor", SqlDbType.TinyInt).Value = CveTipoProveedor - .Add("@AgrupadoPorSubProyecto", SqlDbType.Bit).Value = AgrupadoPorSubProyecto + .Add("@AgrupadoPorSubProyecto", SqlDbType.Bit).Value = AgrupadoPorSubProyecto + .Add("@VerEnPesos", SqlDbType.Bit).Value = VerEnPesos End With Try diff --git a/Bancos/ProveedoresAbonar.aspx b/Bancos/ProveedoresAbonar.aspx index 873bea6e1..c2daed3a9 100644 --- a/Bancos/ProveedoresAbonar.aspx +++ b/Bancos/ProveedoresAbonar.aspx @@ -341,9 +341,10 @@ - - - + + + + @@ -477,6 +478,15 @@ <%-- 14 --%> + + Moneda + +   + + + + + <%-- 15 --%> Auxiliar @@ -601,7 +611,6 @@ var Facturas = ''; function FnSuma(t, txt, importe) { - debugger; var chkPesosBancos = $get("ChkPagarPesos"); var chkDolaresBancos = $get("ChkPagarDolares"); @@ -612,9 +621,9 @@ } if (chkPesosBancos && chkPesosBancos.checked) { - CambiaPesosDolares() + CambiaPesosDolares(); } else if (chkDolaresBancos && chkDolaresBancos.checked) { - CambiaDolaresPesos() + CambiaDolaresPesos(); } else { var Suma = SumaValores(); @@ -622,7 +631,7 @@ } } - function SumaValores(aplicaTC) { + function SumaValores(aplicaTC, cveMonedaPago = 0) { var Importe = 0; var Comision = 0.00; @@ -637,11 +646,43 @@ idd = textBoxes[i].id.replace('C_GvCxP_TxtAbonar_', ''); Facturas = Facturas + (Importe == 0 ? '' : ', ') + $get("C_GvCxP_HplF_" + idd).innerText; let importeFactura = 0; - if (aplicaTC && $get('TxtTC') != null) { - importeFactura = parseFloat(FormatoNumero(parseFloat(textBoxes[i].value.split(',').join('')) * parseFloat($get('TxtTC').value), 2).split(',').join('')); - } else { - importeFactura = parseFloat(textBoxes[i].value.split(',').join('')); + + if (cveMonedaPago == 0) { + if (aplicaTC && $get('TxtTC') != null) { + importeFactura = parseFloat(FormatoNumero(parseFloat(textBoxes[i].value.split(',').join('')) * parseFloat($get('TxtTC').value), 2).split(',').join('')); + } else { + importeFactura = parseFloat(textBoxes[i].value.split(',').join('')); + } + } else { + let cveMonedaCompra = textBoxes[i].getAttribute("cvemoneda"); + + switch (cveMonedaPago) { + case 1: //PAGO CON PESOS + + //SI SON DOLARES MULTIPLICAR POR TC + if (cveMonedaCompra == '2') { + importeFactura = parseFloat(FormatoNumero(parseFloat(textBoxes[i].value.split(',').join('')) * parseFloat($get('TxtTC').value), 2).split(',').join('')); + //MISMA MONEDA DEBE SOLO SUMAR + } else if (cveMonedaCompra == '1') { + importeFactura = parseFloat(textBoxes[i].value.split(',').join('')); + } + + break; + case 2: //PAGO CON DOLARES + + //MISMA MONEDA DEBE SOLO SUMAR + if (cveMonedaCompra == '2') { + importeFactura = parseFloat(textBoxes[i].value.split(',').join('')); + //SI SON PESOS DIVIDIR ENTRE EL TC + } else if (cveMonedaCompra == '1') { + importeFactura = parseFloat(FormatoNumero(parseFloat(textBoxes[i].value.split(',').join('')) / parseFloat($get('TxtTC').value), 2).split(',').join('')); + } + break; + } + + } + Importe = parseFloat(Importe) + importeFactura; } } @@ -699,53 +740,91 @@ } if (chkPesosBancos && chkPesosBancos.checked) { - CambiaPesosDolares() + CambiaPesosDolares(); } else if (chkDolaresBancos && chkDolaresBancos.checked) { - CambiaDolaresPesos() + CambiaDolaresPesos(); } - - } function CambiaPesosDolares() { - let ImporteDolares = SumaValores(true); + if ('<%= Me.FiltrarCuentas.ToString() %>' == '1') { + let ImporteDolares = SumaValores(true); - $get('TxtImporte').value = FormatoNumero(ImporteDolares, 2); - $('#LtlTotalMXN').text(FormatoNumero(ImporteDolares, 2)) + $get('TxtImporte').value = FormatoNumero(ImporteDolares, 2); + $('#LtlTotalMXN').text(FormatoNumero(ImporteDolares, 2)) - if ($("#LbImporteME").length) { - $get('LbImporteME').innerHTML = '$ ' + FormatoNumero(SumaValores(false), 2) + ' USD'; - $get('TxtImporte').value = FormatoNumero(ToDouble(ImporteDolares), 2); - $get('LtlTotalMXN').value = FormatoNumero(ToDouble(ImporteDolares), 2); + if ($("#LbImporteME").length) { + $get('LbImporteME').innerHTML = '$ ' + FormatoNumero(SumaValores(false), 2) + ' USD'; + $get('TxtImporte').value = FormatoNumero(ToDouble(ImporteDolares), 2); + $get('LtlTotalMXN').value = FormatoNumero(ToDouble(ImporteDolares), 2); + } + + if ($get('TxtTotal') != null) { + $get('TxtTotal').value = FormatoNumero(parseFloat($get('TxtImporte').value.replace(',', '')) + parseFloat($get('TxtOtrosImportes').value.replace(',', '') * -1), 2); + } + + if ($get('LblImporteTotal')) $get('LblImporteTotal').innerHTML = FormatoNumero(SumaValores(), 2); + if ($get('LblIVA')) $get('LblIVA').innerHTML = FormatoNumero(SumaValores() - ((SumaValores() / 1.16)), 2); + if ($get('ChkAbonoCuenta')) $get('ChkAbonoCuenta').checked = (parseFloat($get('TxtImporte').value.replace(/,/g, '')) > 2000); + } else { + SumaDolaresPesos(1); } - if ($get('TxtTotal') != null) { - $get('TxtTotal').value = FormatoNumero(parseFloat($get('TxtImporte').value.replace(',', '')) + parseFloat($get('TxtOtrosImportes').value.replace(',', '') * -1), 2); - } - - if ($get('LblImporteTotal')) $get('LblImporteTotal').innerHTML = FormatoNumero(SumaValores(), 2); - if ($get('LblIVA')) $get('LblIVA').innerHTML = FormatoNumero(SumaValores() - ((SumaValores() / 1.16)), 2); - if ($get('ChkAbonoCuenta')) $get('ChkAbonoCuenta').checked = (parseFloat($get('TxtImporte').value.replace(/,/g, '')) > 2000); } function CambiaDolaresPesos() { - debugger; - $get('TxtImporte').value = FormatoNumero(SumaValores(), 2); - $('#LtlTotalMXN').text(FormatoNumero(SumaValores(), 2)) + if ('<%= Me.FiltrarCuentas.ToString() %>' == '1') { + $get('TxtImporte').value = FormatoNumero(SumaValores(), 2); + $('#LtlTotalMXN').text(FormatoNumero(SumaValores(), 2)) + + + if ($("#LbImporteMN").length) { + $get('LbImporteMN').innerHTML = '$ ' + FormatoNumero(SumaValores(), 2) + ' MXN'; + $get('TxtImporte').value = FormatoNumero(ToDouble($get('TxtImporte').value.replace(',', '')) / ToDouble($get('TxtTC').value), 2); + $get('LtlTotalMXN').value = FormatoNumero(ToDouble($get('TxtImporte').value) / ToDouble($get('TxtTC').value), 2); + } + + if ($get('TxtTotal') != null) { + $get('TxtTotal').value = FormatoNumero(ToDouble($get('TxtImporte').value.replace(',', '')) + (ToDouble($get('TxtOtrosImportes').value.replace(',', '') * -1)), 2); + } + + if ($get('LblImporteTotal')) $get('LblImporteTotal').innerHTML = FormatoNumero(SumaValores(), 2); + if ($get('LblIVA')) $get('LblIVA').innerHTML = FormatoNumero(SumaValores() - ((SumaValores() / 1.16)), 2); + if ($get('ChkAbonoCuenta')) $get('ChkAbonoCuenta').checked = (parseFloat($get('TxtImporte').value.replace(/,/g, '')) > 2000); + } else { + SumaDolaresPesos(2); + } + } + + function SumaDolaresPesos(cveMonedaPago) { + + let ImporteSuma = parseFloat(SumaValores(false, cveMonedaPago)); + + $get('TxtImporte').value = FormatoNumero(ImporteSuma, 2); + $('#LtlTotalMXN').text(FormatoNumero(ImporteSuma, 2)) - debugger; if ($("#LbImporteMN").length) { - $get('LbImporteMN').innerHTML = '$ ' + FormatoNumero(SumaValores(), 2) + ' MXN'; - $get('TxtImporte').value = FormatoNumero(ToDouble($get('TxtImporte').value.replace(',', '')) / ToDouble($get('TxtTC').value), 2); - $get('LtlTotalMXN').value = FormatoNumero(ToDouble($get('TxtImporte').value) / ToDouble($get('TxtTC').value), 2); + + $get('TxtImporte').value = FormatoNumero(ToDouble($get('TxtImporte').value.replace(',', '')), 2); + $get('LtlTotalMXN').value = FormatoNumero(ToDouble($get('TxtImporte').value), 2); + + switch (cveMonedaPago) { + case 1: + $get('LbImporteMN').innerHTML = '$ ' + FormatoNumero(ImporteSuma, 2) + ' MXN'; + break; + case 2: + $get('LbImporteMN').innerHTML = '$ ' + FormatoNumero(ImporteSuma, 2) + ' USD'; + break; + } + } if ($get('TxtTotal') != null) { $get('TxtTotal').value = FormatoNumero(ToDouble($get('TxtImporte').value.replace(',', '')) + (ToDouble($get('TxtOtrosImportes').value.replace(',', '') * -1)), 2); } - if ($get('LblImporteTotal')) $get('LblImporteTotal').innerHTML = FormatoNumero(SumaValores(), 2); - if ($get('LblIVA')) $get('LblIVA').innerHTML = FormatoNumero(SumaValores() - ((SumaValores() / 1.16)), 2); + if ($get('LblImporteTotal')) $get('LblImporteTotal').innerHTML = FormatoNumero(ImporteSuma, 2); + if ($get('LblIVA')) $get('LblIVA').innerHTML = FormatoNumero(ImporteSuma - ((ImporteSuma / 1.16)), 2); if ($get('ChkAbonoCuenta')) $get('ChkAbonoCuenta').checked = (parseFloat($get('TxtImporte').value.replace(/,/g, '')) > 2000); } @@ -790,7 +869,7 @@ } - function DescuenoMasivo(txt) { + function DescuenoMasivo(txt) { $(".selDescuento").val(txt.value); $(".selDescuento").trigger("keyup"); } diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb index af50a3933..b0a843edf 100644 --- a/Bancos/ProveedoresAbonar.aspx.vb +++ b/Bancos/ProveedoresAbonar.aspx.vb @@ -99,6 +99,14 @@ Partial Class Bancos_ProveedoresAbonar End Set End Property + Public Property FiltrarCuentas As Integer + Get + Return If(IsNothing(ViewState("FiltrarCuentas")), 1, ViewState("FiltrarCuentas").ToString.ToEntero) + End Get + Set(value As Integer) + ViewState("FiltrarCuentas") = value + End Set + End Property Private Property CveMonedaFiltro As Integer Get Return ViewState("CveMonedaFiltro").ToString.ToEntero @@ -247,6 +255,7 @@ Partial Class Bancos_ProveedoresAbonar CveClasificacionProveedor = IfNull(Request("CveClasificacion"), "-1").ToString.ToEntero CveMoneda = IfNull(Request("CveMoneda"), "-1").ToString.ToEntero CveMonedaFiltro = IfNull(Request("CveMoneda"), "-1").ToString.ToEntero + FiltrarCuentas = IfNull(Request("FiltrarCuentas"), "1").ToString.ToEntero CveEstatus = IfNull(Request("CveEstatus"), "-1").ToString.ToEntero Serie = IfNull(Request("Serie"), "").ToString CveAplicaNC = IfNull(Request("CveAplicaNC"), "-1").ToString.ToEntero @@ -254,7 +263,6 @@ Partial Class Bancos_ProveedoresAbonar CodigoProgramacion = IfNull(Request("CodigoProgramacion"), "-1").ToString CveSubProyectoFiltro = IfNull(Request("CveSubProyecto"), -1).ToString.ToEntero - TxtOtrosImportes.Attributes.Add("onKeyUp", String.Format("FnSuma(this,{0},{1});", "TxtTotal", 0)) 'proceso para que solo pague lo que este programada @@ -300,13 +308,25 @@ Partial Class Bancos_ProveedoresAbonar LbTipoMoneda.Text = String.Format("Pago en {0}", GlobalDTMonedas.FiltraParametros(String.Format("CveMoneda = {0}", CveMoneda)).Rows(0)("Moneda")) End If - If CveMoneda = 2 Then - ChkPagarPesos.Visible = True - TxtTC.Text = GlobalTipoCambio(NowADS()).FormatoNumero(4) - TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);") + 'SI NO ES GDIAZ, NO PERMITIR LA MEZCLA DE CUENTAS + If UsuarioActual.Empresa.Funcionalidad(382) <> "1" AndAlso FiltrarCuentas = 0 Then + FiltrarCuentas = 1 + End If + + If FiltrarCuentas = 0 Then + ChkPagarPesos.Visible = False + ChkPagarDolares.Visible = False + + CveMonedaFiltro = -1 Else - ChkPagarDolares.Visible = True - TxtTC.Text = GlobalTipoCambio(NowADS()).FormatoNumero(4) + If CveMoneda = 2 Then + ChkPagarPesos.Visible = True + TxtTC.Text = GlobalTipoCambio(NowADS()).FormatoNumero(4) + TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);") + Else + ChkPagarDolares.Visible = True + TxtTC.Text = GlobalTipoCambio(NowADS()).FormatoNumero(4) + End If End If RegistraScript($"TipoCambioActual = {GlobalTipoCambio(NowADS()).FormatoNumero(4)}") @@ -324,7 +344,7 @@ Partial Class Bancos_ProveedoresAbonar If UsuarioActual.TienePermisoProceso(361) Then 'GvCxP.Columns(11).Visible = True chkaplicaDescuento.Visible = True - 'chkaplicaDescuentoMasivo.Visible = True + chkaplicaDescuentoMasivo.Visible = True End If @@ -367,23 +387,27 @@ Partial Class Bancos_ProveedoresAbonar Private Sub CargaDatos(Optional tCveMoneda As Integer = -1) 'pCveProveedor As Integer, tCveMoneda As Integer, FechaVencimientoInicio As String, FechaVencimientoFin As String, CveUsuarioRegistro As Integer, CveUsuarioPrograma As Integer, Serie As String) If tCveMoneda = -1 Then tCveMoneda = CveMoneda - Dim Mov As New ClsMovimientos + If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso FiltrarCuentas = 0 Then + tCveMoneda = -1 + End If + TxtObservaciones.Text = "" TxtImporte.Text = "" TxtTotal.Text = "" - If Mov.GetCxPProveedor(CveProveedor, FechaI, FechaF, CveUsuarioProgramo, CveUsuarioRegistro, CveUsuarioResponsable, CveClasificacionProveedor, tCveMoneda, CveEstatus, CveProveedorSucursal, CveAplicaNC, "-1", "-1", CodigoProgramacion, CveSubProyecto:=CveSubProyectoFiltro) Then - DtDatos = Mov.DtResultados.FiltraParametros("Saldo > 0", "Fecha,SerieFolio") + Dim ObjMov As New ClsMovimientos + If ObjMov.GetCxPProveedor(CveProveedor, FechaI, FechaF, CveUsuarioProgramo, CveUsuarioRegistro, CveUsuarioResponsable, CveClasificacionProveedor, tCveMoneda, CveEstatus, CveProveedorSucursal, CveAplicaNC, "-1", "-1", CodigoProgramacion, CveSubProyecto:=CveSubProyectoFiltro) Then + DtDatos = ObjMov.DtResultados.FiltraParametros("CveCompra > 0 AND Saldo > 0", "Fecha,SerieFolio") GvCxP.DataSource = DtDatos DtDatos.Columns.Add("Movimiento") If DtDatos.Rows.Count > 0 Then DVBusqueda.Visible = True DtDatos.Rows(0)("Movimiento") = "FACTURA DE ACREEDOR" End If - End If + ObjMov.Dispose() + - Mov.Dispose() GvCxP.DataBind() UPCompras.Update() UpBusqueda.Update() @@ -473,6 +497,8 @@ Partial Class Bancos_ProveedoresAbonar e.Row.FCLiteral("LtlFactura").Text = e.Row.DBCampo("Folio") End If + e.Row.FCTextBox("TxtAbonar").Attributes.Add("CveMoneda", e.Row.DBCampo("CveMoneda")) + If e.Row.DBCampo("CveCompra").ToEntero > 0 Then Dim FiltroInv As String = "" @@ -643,6 +669,10 @@ Partial Class Bancos_ProveedoresAbonar Dim ValidaSAT As Boolean = True If UsuarioActual.Empresa.Funcionalidad(529) = "1" OrElse ChkNoValidaSAT.Checked Then ValidaSAT = False + If Not EsProduccion Then + ValidaSAT = False + End If + If ValidaSAT Then Dim Validada As Boolean = False Dim MsgValidadas As New StringBuilder @@ -1117,18 +1147,22 @@ Partial Class Bancos_ProveedoresAbonar DdlCuenta.Items.Clear() Dim dt As DataTable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa) - If ChkPagarPesos.Checked Then - dt = dt.FiltraParametros(String.Format("CveMoneda = {0}", 1)) - RegistraScript("CambiaPesosDolares();") - ElseIf ChkPagarDolares.Checked Then - dt = dt.FiltraParametros(String.Format("CveMoneda = {0}", 2)) - RegistraScript("CambiaDolaresPesos();") - Else - If CveMonedaFiltro > 0 Then - dt = dt.FiltraParametros(String.Format("CveMoneda = {0}", CveMonedaFiltro)) + If FiltrarCuentas = 1 Then + If ChkPagarPesos.Checked Then + dt = dt.FiltraParametros(String.Format("CveMoneda = {0}", 1)) + RegistraScript("CambiaPesosDolares();") + ElseIf ChkPagarDolares.Checked Then + dt = dt.FiltraParametros(String.Format("CveMoneda = {0}", 2)) + RegistraScript("CambiaDolaresPesos();") + Else + If CveMonedaFiltro > 0 Then + dt = dt.FiltraParametros(String.Format("CveMoneda = {0}", CveMonedaFiltro)) + End If End If End If + + If TipoPago = 3 Then dt = dt.FiltraParametros("CveTipoCuenta = 7") End If @@ -1148,8 +1182,32 @@ Partial Class Bancos_ProveedoresAbonar End Sub Protected Sub DdlCuenta_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlCuenta.SelectedIndexChanged - '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)) + + If FiltrarCuentas = 0 Then + + If dr("CveMoneda").ToString() = "2" Then + ChkPagarDolares.Visible = True + ChkPagarDolares.Checked = True + ChkPagarDolares.Enabled = False + + ChkPagarPesos.Visible = False + ChkPagarPesos.Checked = False + Else + ChkPagarPesos.Visible = True + ChkPagarPesos.Checked = True + ChkPagarPesos.Enabled = False + + ChkPagarDolares.Visible = False + ChkPagarDolares.Checked = False + End If + + TxtTC.Text = GlobalTipoCambio(NowADS()).FormatoNumero(4) + TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);") + End If + + 'recargo la moneda con la que se va a pagar + If dr IsNot Nothing Then TxtFechaDocumento.Attributes.Remove("onchange") UpDatos.Update() @@ -1673,11 +1731,17 @@ Partial Class Bancos_ProveedoresAbonar Protected Sub chkaplicaDescuento_CheckedChanged(sender As Object, e As EventArgs) GvCxP.Columns(11).Visible = chkaplicaDescuento.Checked - TxtDescuenoMasivo.Visible = chkaplicaDescuento.Checked UPCompras.Update() End Sub + Protected Sub chkaplicaDescuentoMasivo_CheckedChanged(sender As Object, e As EventArgs) + + GvCxP.Columns(11).Visible = chkaplicaDescuentoMasivo.Checked + TxtDescuenoMasivo.Visible = chkaplicaDescuentoMasivo.Checked + UPCompras.Update() + End Sub + Private Sub tmpValida() Dim ValidaSAT As Boolean = True diff --git a/Bancos/RepProveedoresPagos.aspx b/Bancos/RepProveedoresPagos.aspx index 7b1be4aa2..3708e6830 100644 --- a/Bancos/RepProveedoresPagos.aspx +++ b/Bancos/RepProveedoresPagos.aspx @@ -4,9 +4,9 @@ @@ -42,7 +42,7 @@
Proveedor:
- + <%-- --%> @@ -194,21 +194,28 @@
+
+
+ Ver en pesos: +   +
+
- +
-
+

- + + $

TOTAL ORIGINAL @@ -218,21 +225,24 @@
-
- MXN: +
+ MXN: +
-
- Dólares: +
+ Dólares: +
-
+
-

- +

+ + $

ABONADO @@ -258,11 +268,12 @@
-
+
-

- +

+ + $

SALDO PENDIENTE @@ -272,11 +283,13 @@
-
- MXN: +
+ MXN: +
-
- DÓLARES +
+ DÓLARES +
@@ -303,7 +316,7 @@ - + @@ -312,17 +325,17 @@ - + Venci. - - + + - - + + Original @@ -330,9 +343,9 @@ - + - + Abonado @@ -349,7 +362,7 @@ - + @@ -358,7 +371,7 @@ - + @@ -367,7 +380,7 @@ - + @@ -376,20 +389,19 @@ - + Abonar <%----%> - + - + <%----%> - diff --git a/Bancos/RepProveedoresPagos.aspx.vb b/Bancos/RepProveedoresPagos.aspx.vb index 335c19e47..f6b4d7def 100644 --- a/Bancos/RepProveedoresPagos.aspx.vb +++ b/Bancos/RepProveedoresPagos.aspx.vb @@ -31,6 +31,11 @@ Partial Class Bancos_RepProveedoresPagos GvCxP.Columns(10).Visible = True End If + If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then + chkexpand.Checked = True + DivVerPesos.Visible = True + End If + End If End Sub @@ -103,7 +108,7 @@ Partial Class Bancos_RepProveedoresPagos GvCxP.Columns(7).Visible = ChkProgramadas.Checked 'AndAlso DdlUsuarioProgramo.SelectedValue.ToEntero > 0 - If Mov.GetCxPEmpresa(DdlProveedores.SelectedValue.ToEntero, FechaI, FechaF, DdlSubProyecto.SelectedValue.ToEntero, -1, DdlUsuarioRegistro.SelectedValue.ToEntero, CveUsuarioProgramo, DdlUsuarioResponsable.SelectedValue.ToEntero, DdlProveedoresClasificaciones.SelectedValue.ToEntero, DdlMoneda.SelectedValue.ToEntero, -1, DdlEstatusCompra.SelectedValue.ToEntero, AplicaNC.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, FechaVI, FechaVF, CodigoProgramacion, DdlTipoProveedor.SelectedValue.ToEntero) Then + If Mov.GetCxPEmpresa(DdlProveedores.SelectedValue.ToEntero, FechaI, FechaF, DdlSubProyecto.SelectedValue.ToEntero, -1, DdlUsuarioRegistro.SelectedValue.ToEntero, CveUsuarioProgramo, DdlUsuarioResponsable.SelectedValue.ToEntero, DdlProveedoresClasificaciones.SelectedValue.ToEntero, DdlMoneda.SelectedValue.ToEntero, -1, DdlEstatusCompra.SelectedValue.ToEntero, AplicaNC.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, FechaVI, FechaVF, CodigoProgramacion, DdlTipoProveedor.SelectedValue.ToEntero, VerEnPesos:=ChkVerEnPesos.Checked) Then GvCxP.DataSource = Mov.DtResultados If Mov.DtResultados IsNot Nothing AndAlso Mov.DtResultados.Rows.Count > 0 Then @@ -162,7 +167,13 @@ Partial Class Bancos_RepProveedoresPagos CveUsuarioProgramo = DdlUsuarioProgramo.SelectedValue.ToEntero End If - e.Row.FCHyperLink("ImgAbonar").NavigateUrl = String.Format("/Bancos/ProveedoresAbonar.aspx?CveProveedor={0}&FechaI={1}&FechaF={2}&CveUsuarioProgramo={3}&TipoPago={4}&CveUsuarioRegistro={5}&CveUsuarioResponsable={6}&CveClasificacion={7}&CveMoneda={8}&CveEstatus={9}&CveProveedorSucursal={10}&CveAplicaNC={11}&CodigoProgramacion={12}&CveSubProyecto={13}", e.Row.DBCampo("CveProveedor"), If(txtFechaI.Text <> "", txtFechaI.Text, "-1"), If(txtFechaF.Text <> "", txtFechaF.Text, "-1"), CveUsuarioProgramo, -1, DdlUsuarioRegistro.SelectedValue, DdlUsuarioResponsable.SelectedValue, DdlProveedoresClasificaciones.SelectedValue, e.Row.DBCampo("CveMoneda"), DdlEstatusCompra.SelectedValue, e.Row.DBCampo("CveProveedorSucursal"), AplicaNC.SelectedValue, DdlCodigoProgramacion.SelectedValue, DdlSubProyecto.SelectedValue) + Dim FiltrarCuentas As Integer = 1 + + If ChkVerEnPesos.Checked Then + FiltrarCuentas = 0 + End If + + e.Row.FCHyperLink("ImgAbonar").NavigateUrl = String.Format("/Bancos/ProveedoresAbonar.aspx?CveProveedor={0}&FechaI={1}&FechaF={2}&CveUsuarioProgramo={3}&TipoPago={4}&CveUsuarioRegistro={5}&CveUsuarioResponsable={6}&CveClasificacion={7}&CveMoneda={8}&CveEstatus={9}&CveProveedorSucursal={10}&CveAplicaNC={11}&CodigoProgramacion={12}&CveSubProyecto={13}&FiltrarCuentas={14}", e.Row.DBCampo("CveProveedor"), If(txtFechaI.Text <> "", txtFechaI.Text, "-1"), If(txtFechaF.Text <> "", txtFechaF.Text, "-1"), CveUsuarioProgramo, -1, DdlUsuarioRegistro.SelectedValue, DdlUsuarioResponsable.SelectedValue, DdlProveedoresClasificaciones.SelectedValue, e.Row.DBCampo("CveMoneda"), DdlEstatusCompra.SelectedValue, e.Row.DBCampo("CveProveedorSucursal"), AplicaNC.SelectedValue, DdlCodigoProgramacion.SelectedValue, DdlSubProyecto.SelectedValue, FiltrarCuentas) End If End Sub