From 7c2eec887b290925f9f89c23bba7d4a642f653d2 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 18 Jun 2024 19:25:12 -0700 Subject: [PATCH 1/7] =?UTF-8?q?--=20activaci=C3=B3n=20de=20Deudores?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bancos/PagoAcreedor.aspx | 1 + Bancos/PagoAcreedor.aspx.cs | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Bancos/PagoAcreedor.aspx b/Bancos/PagoAcreedor.aspx index 2bb7b8143..bff947397 100644 --- a/Bancos/PagoAcreedor.aspx +++ b/Bancos/PagoAcreedor.aspx @@ -268,6 +268,7 @@ - Otros Egresos + Deudores Diversos diff --git a/Bancos/PagoAcreedor.aspx.cs b/Bancos/PagoAcreedor.aspx.cs index 52c647ae7..3b375e6ce 100644 --- a/Bancos/PagoAcreedor.aspx.cs +++ b/Bancos/PagoAcreedor.aspx.cs @@ -348,7 +348,10 @@ public partial class Bancos_PagoAcreedor : ClsPaginas if (ImporteComision != 0 && MsgError == "") { ImporteComisionMN = (ImporteComision * TCPago).RoundSQL(); - if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoComision, ImporteComision, ImporteComisionMN, 255, Ref, Conc, CveIE: CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(),CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), TipoCambio: TC, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero())) + int tTipoConceptoOtro = 255; + if (DdlOtrosPagos.SelectedValue == "3") tTipoConceptoOtro = 43; //deudores diversos + + if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoComision, ImporteComision, ImporteComisionMN, tTipoConceptoOtro, Ref, Conc, CveIE: CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(),CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), TipoCambio: TC, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero())) { MsgError = "No se pudo insertar concepto de pago acreedor"; break; From 1c64469384287b0df405497ca596de9b8bacb0eb Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 18 Jun 2024 19:25:23 -0700 Subject: [PATCH 2/7] =?UTF-8?q?--=20correcci=C3=B3n=20otros=20egresos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bancos/PopIEVentas.aspx | 2 +- Bancos/PopIEVentas.aspx.vb | 257 ++++++++++++++++++------------------- 2 files changed, 129 insertions(+), 130 deletions(-) diff --git a/Bancos/PopIEVentas.aspx b/Bancos/PopIEVentas.aspx index 4f1afc7d8..349381e4e 100644 --- a/Bancos/PopIEVentas.aspx +++ b/Bancos/PopIEVentas.aspx @@ -161,7 +161,7 @@ -
+
diff --git a/Bancos/PopIEVentas.aspx.vb b/Bancos/PopIEVentas.aspx.vb index 9b3840b07..c4e6d323b 100644 --- a/Bancos/PopIEVentas.aspx.vb +++ b/Bancos/PopIEVentas.aspx.vb @@ -325,9 +325,7 @@ Partial Class Bancos_PopIEVentas ViewState("CveIE") = -1 End If - If UsuarioActual.CveEmpresa.Contiene(1, 4, 7, 11, 12, 72, 80, 119) Then - rowComisiones.Visible = True - End If + 'rowComisiones.Visible = True 'SI USUARIO USA AMORTIZACIÓN CONTABLE If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC Then @@ -547,10 +545,11 @@ Partial Class Bancos_PopIEVentas CargaCorteCaja() End If - If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then 'toma como proridad el que viene de + If UsuarioActual.Empresa.Funcionalidad(531) = "1" OrElse (dr("CveCorte").ToString.ToEntero > 0) Then 'toma como proridad el que viene de CveCorte = dr("CveCorte").ToString.ToEntero End If + If RFCCliente.ToUpper <> "XAXX010101000" Then Dim CveProveedor As Integer = GlobalDTCompProveedores(UsuarioActual.CveEmpresa, RFC:=RFCCliente.ToUpper).FiltroPrimeroValor("CveProveedor").ToEntero @@ -752,8 +751,8 @@ Partial Class Bancos_PopIEVentas #Region "DDL'S CHANGED" Protected Sub DdlTipoTransaccion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoTransaccion.SelectedIndexChanged - Dim valor As Integer = DirectCast(sender, DropDownList).SelectedValue.ToEntero - Dim dr As DataRow = GlobalDTTipoTransacciones.FiltroPrimero(String.Format("CveTipoTransaccion = {0}", DdlTipoTransaccion.SelectedValue)) 'Egs o Ing + 'Dim valor As Integer = DirectCast(sender, DropDownList).SelectedValue.ToEntero + 'Dim dr As DataRow = GlobalDTTipoTransacciones.FiltroPrimero(String.Format("CveTipoTransaccion = {0}", DdlTipoTransaccion.SelectedValue)) 'Egs o Ing Select Case valor Case 1 @@ -1239,162 +1238,162 @@ Partial Class Bancos_PopIEVentas Pago.CveMonedaPago = CveMoneda Pago.Referencia = VentaActual.SerieFolio If DdlOtrosPagos.SelectedValue = "2" Then - ImportePagado = TxtImporte.Text.Trim.ToDecimal.RoundSQL - TxtComision.Text.ToDecimal + ImportePagado = TxtImporte.Text.Trim.ToDecimal.RoundSQL + TxtComision.Text.ToDecimal Else ImportePagado = TxtImporte.Text.Trim.ToDecimal.RoundSQL End If 'Tipos de cambio If Pago.CveMonedaPago = 1 AndAlso VentaActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en Pesos - Pago.TCPago = 1 / TxtTipoCambio.Text.ToDecimal - ElseIf Pago.CveMonedaPago = 2 AndAlso VentaActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en DOLARES - Pago.TCPago = TxtTipoCambio.Text.ToDecimal - ElseIf Pago.CveMonedaPago = 2 AndAlso VentaActual.CveMoneda = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES - Pago.TCPago = TxtTipoCambio.Text.ToDecimal - Pago.TCPago = TxtTipoCambio.Text.ToDecimal - End If - If ChkPagarPesos.Checked Then Pago.TCPago = 1 / TxtTipoCambio.Text.ToDecimal - If ChkPagarDolares.Checked Then Pago.TCPago = TxtTipoCambio.Text.ToDecimal + Pago.TCPago = 1 / TxtTipoCambio.Text.ToDecimal + ElseIf Pago.CveMonedaPago = 2 AndAlso VentaActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en DOLARES + Pago.TCPago = TxtTipoCambio.Text.ToDecimal + ElseIf Pago.CveMonedaPago = 2 AndAlso VentaActual.CveMoneda = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES + Pago.TCPago = TxtTipoCambio.Text.ToDecimal + Pago.TCPago = TxtTipoCambio.Text.ToDecimal + End If + If ChkPagarPesos.Checked Then Pago.TCPago = 1 / TxtTipoCambio.Text.ToDecimal + If ChkPagarDolares.Checked Then Pago.TCPago = TxtTipoCambio.Text.ToDecimal - If TxtComision.Text.ToDecimal <> 0 Then Pago.OtroGastoIngreso = TxtComision.Text.ToDecimal Else Pago.OtroGastoIngreso = 0 + If TxtComision.Text.ToDecimal <> 0 Then Pago.OtroGastoIngreso = TxtComision.Text.ToDecimal Else Pago.OtroGastoIngreso = 0 - Select Case RBLContado.SelectedValue - Case "1" ' Banco + Select Case RBLContado.SelectedValue + Case "1" ' Banco CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, Fecha, TxtFolio.Text.Trim, TxtPagueseA.Text.Trim, ImportePagado, CveMoneda, tipoCambioPago, TxtObservaciones.Text.Trim, "", True, True, -1, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCuentaTarjeta:=If(DivTarjeta.Visible, DdlTarjeta.SelectedValue.ToEntero, -1), CveCuentaDeposito:=CveCuentaDeposito, Referencia:=If(TxtReferenciaCIE.Visible, TxtReferenciaCIE.Text, "-1"), CveCorte:=CveCorte, FechaEmision:=FechaEmision) If CveIE > 0 Then Pago.ImportePago = ImportePagado - Pago.ImportePagoVenta = ImportePagado + Pago.ImportePagoVenta = ImportePagado - Pago.OtroGastoIngreso Pago.CveIE = CveIE Pago.TipoPago = "B" + If MsgError = "" AndAlso AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjMov) Then + MsgError = "No se pudo insertar la póliza" + End If + + Else + MsgError = "Ocurrio un Error al registrarse el movimiento bancario." + Inserta = False + End If + Case "2" ' FyE + + Pago.ImportePago = ImportePagado + Pago.ImportePagoVenta = ImportePagado - Pago.OtroGastoIngreso + Pago.TipoPago = "FyE" + Pago.CvePersonal = DdlFuncionarioEmpleado.SelectedValue.ToEntero + Pago.Referencia = DdlFuncionarioEmpleado.SelectedItem.ToString + If MsgError = "" AndAlso AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjMov) Then MsgError = "No se pudo insertar la póliza" End If - Else - MsgError = "Ocurrio un Error al registrarse el movimiento bancario." - Inserta = False - End If - Case "2" ' FyE + Case "3" 'Ingresos x Comprobar - Pago.ImportePago = ImportePagado - Pago.ImportePagoVenta = ImportePagado - Pago.TipoPago = "FyE" - Pago.CvePersonal = DdlFuncionarioEmpleado.SelectedValue.ToEntero - Pago.Referencia = DdlFuncionarioEmpleado.SelectedItem.ToString + CveCliente = DdlIngreso.SelectedValue.ToEntero + CveIE = -1 + ImportePagado = TxtImporte.Text.Trim.ToDecimal + Pago.ImportePago = ImportePagado + Pago.TipoPago = "I" - If MsgError = "" AndAlso AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjMov) Then - MsgError = "No se pudo insertar la póliza" - End If + For Each rw As GridViewRow In GvIngresos.Rows + If rw.FCCheckBox("Chk").Checked Then + CveIE = rw.DataKey("CveIE").ToEntero + Pago.CveMonedaPago = rw.DataKey("CveMoneda").ToEntero + Pago.ImportePago = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal + Pago.ImportePagoVenta = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal + Pago.TCPago = rw.DataKey("TipoCambio").ToDecimal + Pago.FechaDocumentoRelacionado = rw.DataKey("FechaDocumento").ToDate + Pago.CveIE = CveIE + Pago.CveClientePago = rw.DataKey("CveCliente").ToEntero + If ChkPagarPesos.Checked Then Pago.TCPago = 1 / rw.DataKey("TipoCambio").ToDecimal + If ChkPagarDolares.Checked Then Pago.TCPago = rw.DataKey("TipoCambio").ToDecimal - Case "3" 'Ingresos x Comprobar - - CveCliente = DdlIngreso.SelectedValue.ToEntero - CveIE = -1 - ImportePagado = TxtImporte.Text.Trim.ToDecimal - Pago.ImportePago = ImportePagado - Pago.TipoPago = "I" - - For Each rw As GridViewRow In GvIngresos.Rows - If rw.FCCheckBox("Chk").Checked Then - CveIE = rw.DataKey("CveIE").ToEntero - Pago.CveMonedaPago = rw.DataKey("CveMoneda").ToEntero - Pago.ImportePago = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal - Pago.ImportePagoVenta = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal - Pago.TCPago = rw.DataKey("TipoCambio").ToDecimal - Pago.FechaDocumentoRelacionado = rw.DataKey("FechaDocumento").ToDate - Pago.CveIE = CveIE - Pago.CveClientePago = rw.DataKey("CveCliente").ToEntero - If ChkPagarPesos.Checked Then Pago.TCPago = 1 / rw.DataKey("TipoCambio").ToDecimal - If ChkPagarDolares.Checked Then Pago.TCPago = rw.DataKey("TipoCambio").ToDecimal - - If AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjMov) Then - MsgError = "No se pudo insertar la póliza" - Else - Exit For - End If - End If - Next - - Case "4" 'Deudores Diversos - - ImportePagado = TxtImporte.Text.Trim.ToDecimal - 'CveProveedor2 = DdlDeudor.SelectedValue.ToEntero - CveIE = -1 - If DdlDeudor.SelectedValue.ToEntero <= 0 Then - Alert("Debe especificar el deudor.", TipoMensaje.MsgAdvertencia) - Exit Sub - End If - - For Each rw As GridViewRow In GvDeudores.Rows - If rw.FCCheckBox("Chk").Checked AndAlso rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal <> 0 Then - Pago.CveIE = rw.DataKey("CveIE").ToEntero - Pago.CveMonedaPago = rw.DataKey("CveMoneda").ToEntero - Pago.ImportePago = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal - Pago.TCPago = rw.DataKey("TipoCambio").ToDecimal - 'Pago.CveProveedor = DdlDeudor.SelectedValue.ToEntero - Pago.TipoPago = "DD" - If AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjMov) Then - MsgError = "No se pudo insertar la póliza" - Else - Exit For - End If - End If - Next - - Case "5" 'Compras - - ImportePagado = TxtImporte.Text.Trim.ToDecimal - CveIE = -1 - For Each rw As GridViewRow In GvCompras.Rows - If rw.FCCheckBox("Chk").Checked AndAlso rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal <> 0 Then - Pago.CveMonedaPago = 1 - Pago.ImportePago = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal - Pago.ImportePagoVenta = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal - Pago.TipoPago = "Compra" - If AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjMov) Then - MsgError = "No se pudo insertar la póliza" - End If - If MsgError = "" Then - Dim CompraActual As New Compra() With {.CveCompra = rw.DataKey("CveCompra").ToEntero, .ProveedorNombre = NombreCliente, .SerieFolio = rw.DataKey("SerieFolio"), .CveProveedor = rw.DataKey("CveProveedor").ToEntero, .IVA = rw.DataKey("IVA").ToDecimal, .IEPS = rw.DataKey("IEPS").ToDecimal, .RetIVA = rw.DataKey("RetIVA").ToDecimal, .RetISR = rw.DataKey("RetISR").ToDecimal, .Total = rw.DataKey("Total").ToDecimal, .PorcentajeIVA = rw.DataKey("PorcentajeIVA").ToDecimal, .CveSubProyecto = rw.DataKey("CveSubProyecto").ToEntero, .CveMoneda = rw.DataKey("CveMoneda").ToEntero, .CveTipoConceptoProveedor = rw.DataKey("CveTipoConcepto").ToEntero} - Dim PagoCompra As New CompraPago - - PagoCompra.CveMonedaPago = rw.DataKey("CveMoneda").ToEntero - PagoCompra.ImportePago = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal - PagoCompra.TCPago = rw.DataKey("TipoCambio").ToDecimal - PagoCompra.CveProveedor = rw.DataKey("CveProveedor").ToEntero - PagoCompra.CveVentaRelacionada = CveVenta - PagoCompra.TipoPago = "Venta" - If AplicaPrePolizaPagoCompra(CompraActual, PagoCompra, CvePrePoliza, ObjMov) Then + If AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjMov) Then MsgError = "No se pudo insertar la póliza" + Else + Exit For End If End If + Next + Case "4" 'Deudores Diversos + + ImportePagado = TxtImporte.Text.Trim.ToDecimal + 'CveProveedor2 = DdlDeudor.SelectedValue.ToEntero + CveIE = -1 + If DdlDeudor.SelectedValue.ToEntero <= 0 Then + Alert("Debe especificar el deudor.", TipoMensaje.MsgAdvertencia) + Exit Sub End If - Next - Case Else - 'NO SE HA DEFINIDO PARA FUNCIONARIO Y EMPLEADO - If RBLContado.SelectedValue <> "2" Then - MsgError = "No se ha especificada opcion." - End If - End Select - - If MsgError = "" Then - - If MsgError = "" AndAlso ObjMov.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=3) Then - If ObjMov.ValorPolizaDescuadre > 0 Then - MsgError = ObjMov.MensajePolizaDescuadre + For Each rw As GridViewRow In GvDeudores.Rows + If rw.FCCheckBox("Chk").Checked AndAlso rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal <> 0 Then + Pago.CveIE = rw.DataKey("CveIE").ToEntero + Pago.CveMonedaPago = rw.DataKey("CveMoneda").ToEntero + Pago.ImportePago = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal + Pago.TCPago = rw.DataKey("TipoCambio").ToDecimal + 'Pago.CveProveedor = DdlDeudor.SelectedValue.ToEntero + Pago.TipoPago = "DD" + If AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjMov) Then + MsgError = "No se pudo insertar la póliza" + Else + Exit For + End If + End If + Next + + Case "5" 'Compras + + ImportePagado = TxtImporte.Text.Trim.ToDecimal + CveIE = -1 + For Each rw As GridViewRow In GvCompras.Rows + If rw.FCCheckBox("Chk").Checked AndAlso rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal <> 0 Then + Pago.CveMonedaPago = 1 + Pago.ImportePago = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal + Pago.ImportePagoVenta = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal + Pago.TipoPago = "Compra" + If AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjMov) Then + MsgError = "No se pudo insertar la póliza" + End If + If MsgError = "" Then + Dim CompraActual As New Compra() With {.CveCompra = rw.DataKey("CveCompra").ToEntero, .ProveedorNombre = NombreCliente, .SerieFolio = rw.DataKey("SerieFolio"), .CveProveedor = rw.DataKey("CveProveedor").ToEntero, .IVA = rw.DataKey("IVA").ToDecimal, .IEPS = rw.DataKey("IEPS").ToDecimal, .RetIVA = rw.DataKey("RetIVA").ToDecimal, .RetISR = rw.DataKey("RetISR").ToDecimal, .Total = rw.DataKey("Total").ToDecimal, .PorcentajeIVA = rw.DataKey("PorcentajeIVA").ToDecimal, .CveSubProyecto = rw.DataKey("CveSubProyecto").ToEntero, .CveMoneda = rw.DataKey("CveMoneda").ToEntero, .CveTipoConceptoProveedor = rw.DataKey("CveTipoConcepto").ToEntero} + Dim PagoCompra As New CompraPago + + PagoCompra.CveMonedaPago = rw.DataKey("CveMoneda").ToEntero + PagoCompra.ImportePago = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal + PagoCompra.TCPago = rw.DataKey("TipoCambio").ToDecimal + PagoCompra.CveProveedor = rw.DataKey("CveProveedor").ToEntero + PagoCompra.CveVentaRelacionada = CveVenta + PagoCompra.TipoPago = "Venta" + If AplicaPrePolizaPagoCompra(CompraActual, PagoCompra, CvePrePoliza, ObjMov) Then + MsgError = "No se pudo insertar la póliza" + End If + End If + + End If + Next + + Case Else + 'NO SE HA DEFINIDO PARA FUNCIONARIO Y EMPLEADO + If RBLContado.SelectedValue <> "2" Then + MsgError = "No se ha especificada opcion." + End If + End Select + + If MsgError = "" Then + + If MsgError = "" AndAlso ObjMov.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=3) Then + If ObjMov.ValorPolizaDescuadre > 0 Then + MsgError = ObjMov.MensajePolizaDescuadre + End If End If + Else + MsgError = "No se pudo insertar la poliza detalle" End If - Else - MsgError = "No se pudo insertar la poliza detalle" End If - End If - Else + Else MsgError = "venta no identificada" End If Else From a33142086eff2bd7eefbab2764b84fc6f119c05b Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 18 Jun 2024 19:25:53 -0700 Subject: [PATCH 3/7] -- mejora --- Contabilidad/RegPrePolizaS.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb index 163d2c6d8..b368d9f2b 100644 --- a/Contabilidad/RegPrePolizaS.aspx.vb +++ b/Contabilidad/RegPrePolizaS.aspx.vb @@ -468,7 +468,7 @@ Partial Class ContabilidadC_RegPrePolizaS End If ObjContabilidad.GetContabilizacionDiarioDetalle(CvePrePoliza, UsuarioActual.CveEmpresa) - DtMovimientos = ObjContabilidad.DtResultados.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}") + DtMovimientos = ObjContabilidad.DtResultados If dr("Modulo").ToString.Contiene("Banc/FluctuaA", "Banc/FluctuaC", "Banc/FluctuaV", "Banc/FluctuaFilial", "Banc/FluctuaAD") Then BtnEliminar.Enabled = False From 34ef0a401f6a58bd4d0a0f96c5dc91dbe443bc4a Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 19 Jun 2024 08:17:18 -0700 Subject: [PATCH 4/7] =?UTF-8?q?--=20activaci=C3=B3n=20de=20bot=C3=B3n=20im?= =?UTF-8?q?primir?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bancos/PagoAcreedor.aspx.cs | 31 +++++++++++++++++++------------ Bancos/PagoDeudor.aspx.cs | 36 +++++++++++++++++++++--------------- 2 files changed, 40 insertions(+), 27 deletions(-) diff --git a/Bancos/PagoAcreedor.aspx.cs b/Bancos/PagoAcreedor.aspx.cs index 3b375e6ce..c357c01e4 100644 --- a/Bancos/PagoAcreedor.aspx.cs +++ b/Bancos/PagoAcreedor.aspx.cs @@ -397,9 +397,10 @@ public partial class Bancos_PagoAcreedor : ClsPaginas if (MsgError.Equals("")) { + ObjIE.Commit(); if (Msg.ToString().Equals("")) { - Msg.AppendFormat("El Documento se guardo correctamente. Folio {1}
", CveIE, ObjIE.Folio); + Msg.AppendFormat("El Documento se guardo correctamente.
Folio {1}
", CveIE, ObjIE.Folio); } //GUARDA COMPROBANTE @@ -435,11 +436,14 @@ public partial class Bancos_PagoAcreedor : ClsPaginas // } //} - if (IDPoliza > 0) - { - Msg.AppendFormat(@"

Ver Póliza", IDPoliza); - } - ObjIE.Commit(); + //if (IDPoliza > 0) + //{ + // Msg.AppendFormat(@"

Ver Póliza", IDPoliza); + //} + + Msg.AppendFormat(@"Ver Póliza
", CvePrePoliza); + Msg.AppendFormat($"Imprimir"); + } else { @@ -619,9 +623,10 @@ public partial class Bancos_PagoAcreedor : ClsPaginas if (MsgError.Equals("")) { + ObjIE.Commit(); if (Msg.ToString().Equals("")) { - Msg.Append("El Documento se guardo correctamente"); + Msg.Append("El Documento se guardo correctamente.
"); } System.IO.FileInfo archivo = null; @@ -651,11 +656,13 @@ public partial class Bancos_PagoAcreedor : ClsPaginas // } //} - if (IDPoliza > 0) - { - Msg.AppendFormat(@"

Ver Póliza", IDPoliza); - } - ObjIE.Commit(); + //if (IDPoliza > 0) + //{ + // Msg.AppendFormat(@"

Ver Póliza", IDPoliza); + //} + Msg.AppendFormat(@"Ver Póliza
", CvePrePoliza); + Msg.AppendFormat($"Imprimir"); + } else { diff --git a/Bancos/PagoDeudor.aspx.cs b/Bancos/PagoDeudor.aspx.cs index 020ac979b..5ca8a834f 100644 --- a/Bancos/PagoDeudor.aspx.cs +++ b/Bancos/PagoDeudor.aspx.cs @@ -311,12 +311,13 @@ public partial class Bancos_PagoDeudor : ClsPaginas if (MsgError.Equals("")) { + ObjIE.Commit(); if (Msg.ToString().Equals("")) { - Msg.Append("El Documento se guardo correctamente"); + Msg.Append("El Documento se guardo correctamente.
"); } System.IO.FileInfo archivo = null; - Msg.AppendFormat("

Folio: {1}
", CveIE, TxtFolioPrestamo.Text.Trim()); + Msg.AppendFormat("Folio: {1}
", CveIE, TxtFolioPrestamo.Text.Trim()); if (DdlTipoTransaccionPrestamo.SelectedValue.ToEntero().Contiene(2, 8, 9)) { @@ -335,7 +336,7 @@ public partial class Bancos_PagoDeudor : ClsPaginas { archivo = new System.IO.FileInfo(String.Format("{0}Formatos/ComprobanteEgreso.rdlc", UsuarioActual.Empresa.Ruta, DdlCuentaPrestamo.SelectedValue.ToEntero())); } - + //if (archivo.Length > 0) //{ // if (archivo.Exists) @@ -344,11 +345,13 @@ public partial class Bancos_PagoDeudor : ClsPaginas // } //} - if (IDPoliza > 0) - { - Msg.AppendFormat(@"

Ver Póliza", IDPoliza); - } - ObjIE.Commit(); + //if (IDPoliza > 0) + //{ + // Msg.AppendFormat(@"

Ver Póliza", IDPoliza); + //} + Msg.AppendFormat(@"Ver Póliza
", CvePrePoliza); + Msg.AppendFormat($"Imprimir"); + } else { @@ -682,12 +685,13 @@ public partial class Bancos_PagoDeudor : ClsPaginas if (MsgError.Equals("")) { + ObjIE.Commit(); if (Msg.ToString().Equals("")) { - Msg.Append("El Documento se guardo correctamente"); + Msg.Append("El Documento se guardo correctamente.
"); } System.IO.FileInfo archivo = null; - Msg.AppendFormat("

Folio: {1}
", CveIE, TxtFolio.Text.Trim()); + Msg.AppendFormat("Folio: {1}
", CveIE, TxtFolio.Text.Trim()); if (DdlTipoTransaccion.SelectedValue.ToEntero().Contiene(2, 8, 9)) { @@ -715,11 +719,13 @@ public partial class Bancos_PagoDeudor : ClsPaginas // } //} - if (IDPoliza > 0) - { - Msg.AppendFormat(@"

Ver Póliza", IDPoliza); - } - ObjIE.Commit(); + //if (IDPoliza > 0) + //{ + // Msg.AppendFormat(@"

Ver Póliza", IDPoliza); + //} + Msg.AppendFormat(@"Ver Póliza
", CvePrePoliza); + Msg.AppendFormat($"Imprimir"); + } else { From ab4946a268e0cd6a5dfeb043091e5a5f800d9891 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 19 Jun 2024 08:18:28 -0700 Subject: [PATCH 5/7] - --- Bancos/PopIEVentas.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Bancos/PopIEVentas.aspx.vb b/Bancos/PopIEVentas.aspx.vb index c4e6d323b..e8da3815a 100644 --- a/Bancos/PopIEVentas.aspx.vb +++ b/Bancos/PopIEVentas.aspx.vb @@ -751,7 +751,7 @@ Partial Class Bancos_PopIEVentas #Region "DDL'S CHANGED" Protected Sub DdlTipoTransaccion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoTransaccion.SelectedIndexChanged - 'Dim valor As Integer = DirectCast(sender, DropDownList).SelectedValue.ToEntero + Dim valor As Integer = DirectCast(sender, DropDownList).SelectedValue.ToEntero 'Dim dr As DataRow = GlobalDTTipoTransacciones.FiltroPrimero(String.Format("CveTipoTransaccion = {0}", DdlTipoTransaccion.SelectedValue)) 'Egs o Ing Select Case valor From 152114956237b2eeaafdef2e66a5fca6ef86058e Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 19 Jun 2024 08:27:40 -0700 Subject: [PATCH 6/7] =?UTF-8?q?--=20condiciones=20de=20fecha=20m=C3=A1xima?= =?UTF-8?q?=20=20+=20chques=203meses=20+=20transf=20=203=20semanas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bancos/IE.aspx.vb | 22 ++++++++++++++++++++++ Bancos/PopIECompras.aspx.vb | 28 +++++++++++++++------------- Bancos/ProveedoresAbonar.aspx.vb | 25 +++++++++++++------------ 3 files changed, 50 insertions(+), 25 deletions(-) diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index 3aa0660a9..5688cc07e 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -1448,11 +1448,33 @@ Partial Class Bancos_IE 'RecargaCuentas CargaCuenta(CveMoneda) RecargaCuentasDepositos() + ValidaFechaDocumentoDiasPosteriores() UpDatos.Update() BtnGuardar.Enabled = True End Sub + Private Sub ValidaFechaDocumentoDiasPosteriores() + + RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(3).ToShortDateString + Calendario.EndDate = NowADS().AddDays(3) + RVTxtFechaDocumento.ErrorMessage = "ERROR:
La fecha del documento no puede ser superior a 3 días de la fecha actual" + + If DdlTipoTransaccion.SelectedValue.Contiene("1", "16") Then 'cheques, 3meses + RVTxtFechaDocumento.MaximumValue = NowADS().AddMonths(3).ToShortDateString + RVTxtFechaDocumento.ErrorMessage = "ERROR:
La fecha del documento no puede ser superior a 3 meses de la fecha actual" + Calendario.EndDate = NowADS().AddMonths(3) + End If + If DdlTipoTransaccion.SelectedValue = "2" Then 'transfer, 3semanas + RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(21).ToShortDateString + RVTxtFechaDocumento.ErrorMessage = "ERROR:
La fecha del documento no puede ser superior a 3 semanas de la fecha actual" + Calendario.EndDate = NowADS().AddDays(21) + End If + UpDatos.Update() + UpGuardar.Update() + + End Sub + Protected Sub DdlCuenta_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlCuenta.SelectedIndexChanged 'si solo es de egreso el movimiento debe de generar el siguiente folio. diff --git a/Bancos/PopIECompras.aspx.vb b/Bancos/PopIECompras.aspx.vb index 4362fffd8..c4bc99aac 100644 --- a/Bancos/PopIECompras.aspx.vb +++ b/Bancos/PopIECompras.aspx.vb @@ -848,13 +848,12 @@ Partial Class Bancos_PopIECompras #Region "DDL'S CHANGED" Protected Sub DdlTipoTransaccion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoTransaccion.SelectedIndexChanged - Dim valor As Integer = DirectCast(sender, DropDownList).SelectedValue.ToEntero - Dim dr As DataRow = GlobalDTTipoTransacciones.FiltroPrimero(String.Format("CveTipoTransaccion = {0}", DdlTipoTransaccion.SelectedValue)) 'Egs o Ing - + Dim valor As Integer = DirectCast(sender, DropDownList).SelectedValue.ToEntero + 'Dim dr As DataRow = GlobalDTTipoTransacciones.FiltroPrimero(String.Format("CveTipoTransaccion = {0}", DdlTipoTransaccion.SelectedValue)) 'Egs o Ing + Select Case valor Case 1 LblPagueseA.Text = "Páguese a" - Case 2 LblPagueseA.Text = "Beneficiario" End Select @@ -1723,17 +1722,20 @@ Partial Class Bancos_PopIECompras Private Sub ValidaFechaDocumentoDiasPosteriores() + RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(3).ToShortDateString + Calendario.EndDate = NowADS().AddDays(3) + RVTxtFechaDocumento.ErrorMessage = "ERROR:
La fecha del documento no puede ser superior a 3 días de la fecha actual" - RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(2).ToShortDateString - Calendario.EndDate = NowADS().AddDays(2) - RVTxtFechaDocumento.ErrorMessage = "ERROR:
La fecha del documento no puede ser superior a 6 meses de la fecha actual" - - If DdlTipoTransaccion.SelectedValue.ToEntero.Contiene(1, 16) Then - RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(30).ToShortDateString - RVTxtFechaDocumento.ErrorMessage = "ERROR:
La fecha del documento no puede ser superior a 6 meses de la fecha actual" - Calendario.EndDate = NowADS().AddDays(30) + If DdlTipoTransaccion.SelectedValue.Contiene("1", "16") Then 'cheques, 3meses + RVTxtFechaDocumento.MaximumValue = NowADS().AddMonths(3).ToShortDateString + RVTxtFechaDocumento.ErrorMessage = "ERROR:
La fecha del documento no puede ser superior a 3 meses de la fecha actual" + Calendario.EndDate = NowADS().AddMonths(3) + End If + If DdlTipoTransaccion.SelectedValue = "2" Then 'transfer, 3semanas + RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(21).ToShortDateString + RVTxtFechaDocumento.ErrorMessage = "ERROR:
La fecha del documento no puede ser superior a 3 semanas de la fecha actual" + Calendario.EndDate = NowADS().AddDays(21) End If - UpDatos.Update() UpGuardar.Update() diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb index 3c3ba9bb5..dd8d8709c 100644 --- a/Bancos/ProveedoresAbonar.aspx.vb +++ b/Bancos/ProveedoresAbonar.aspx.vb @@ -1627,20 +1627,21 @@ Partial Class Bancos_ProveedoresAbonar Private Sub ValidaFechaDocumentoDiasPosteriores() - RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(2).ToShortDateString - RVTxtFechaDocumentoMenor.MaximumValue = NowADS().AddDays(2).ToShortDateString + RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(3).ToShortDateString + RVTxtFechaDocumentoMenor.MaximumValue = NowADS().AddDays(3).ToShortDateString + RVTxtFechaDocumento.ErrorMessage = "ERROR:
La fecha del documento no puede ser superior a 3 días de la fecha actual" - RVTxtFechaDocumento.ErrorMessage = "ERROR:
La fecha del documento no puede ser superior a 6 meses de la fecha actual" + Calendario.EndDate = NowADS().AddDays(3) - Calendario.EndDate = NowADS().AddDays(2) - - If DdlTipoTransaccion.SelectedValue.ToEntero.Contiene(1, 16) Then - - RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(182).ToShortDateString - RVTxtFechaDocumentoMenor.MaximumValue = NowADS().AddDays(182).ToShortDateString - RVTxtFechaDocumento.ErrorMessage = "ERROR:
La fecha del documento no puede ser superior a 6 meses de la fecha actual" - - Calendario.EndDate = NowADS().AddDays(182) + If DdlTipoTransaccion.SelectedValue.Contiene("1", "16") Then 'cheques, 3meses + RVTxtFechaDocumento.MaximumValue = NowADS().AddMonths(3).ToShortDateString + RVTxtFechaDocumento.ErrorMessage = "ERROR:
La fecha del documento no puede ser superior a 3 meses de la fecha actual" + Calendario.EndDate = NowADS().AddMonths(3) + End If + If DdlTipoTransaccion.SelectedValue = "2" Then 'transfer, 3semanas + RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(21).ToShortDateString + RVTxtFechaDocumento.ErrorMessage = "ERROR:
La fecha del documento no puede ser superior a 3 semanas de la fecha actual" + Calendario.EndDate = NowADS().AddDays(21) End If UpDatos.Update() From b448757c45d2106cb76ffdaab2d6dbe5ec8655da Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 19 Jun 2024 08:27:56 -0700 Subject: [PATCH 7/7] - --- Ventas/RepPS.aspx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Ventas/RepPS.aspx b/Ventas/RepPS.aspx index f8f5baef0..1b6afbf33 100644 --- a/Ventas/RepPS.aspx +++ b/Ventas/RepPS.aspx @@ -87,8 +87,8 @@
SubProyecto: -
- +
+
Fecha Inicio: