From 35af64bd20715eecc67326ea5dc8f578701612d6 Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 29 May 2023 17:38:56 -0700 Subject: [PATCH] -- no deducible --- Bancos/ProveedoresAbonar.aspx | 2 +- Bancos/ProveedoresAbonar.aspx.vb | 287 +------------------------------ 2 files changed, 8 insertions(+), 281 deletions(-) diff --git a/Bancos/ProveedoresAbonar.aspx b/Bancos/ProveedoresAbonar.aspx index 412f0db79..ea7236cd2 100644 --- a/Bancos/ProveedoresAbonar.aspx +++ b/Bancos/ProveedoresAbonar.aspx @@ -369,7 +369,7 @@ diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb index 7dd4fa5af..152534d86 100644 --- a/Bancos/ProveedoresAbonar.aspx.vb +++ b/Bancos/ProveedoresAbonar.aspx.vb @@ -687,18 +687,15 @@ Partial Class Bancos_ProveedoresAbonar Validada = False If Valida.EsValida = 2 Then 'Cancelada - 'estatus inventario, no surtida If gvr.DataKey("EstatusInventario") = "1" Then MsgValidadas.AppendFormat("Factura Cancelada: {0} - {1} , relacione su factura nueva para descontar saldo
", gvr.DataKey("SerieFolio"), gvr.DataKey("Descripcion")) Else MsgValidadas.AppendFormat("Factura Cancelada: {0} - {1} con movimientos de almacen, relacione su factura nueva para descontar saldo
", gvr.DataKey("SerieFolio"), gvr.DataKey("Descripcion")) End If - Else MsgValidadas.AppendFormat("Factura No se pudo Validar: {0} - {1}
", gvr.DataKey("SerieFolio"), gvr.DataKey("Descripcion")) End If - End If End If End If @@ -767,7 +764,6 @@ Partial Class Bancos_ProveedoresAbonar Dim FolioFijo As Integer = 0 Dim TipoCambio As Decimal = 0 - 'cheque If DdlTipoTransaccion.SelectedValue = "1" AndAlso UsuarioActual.CveEmpresa.Contiene(13, 83) Then FolioFijo = TxtFolio.Text.ToEntero @@ -799,7 +795,6 @@ Partial Class Bancos_ProveedoresAbonar If Not ObjGrales.UpdateCuentasDepositosEstatusPagoElectronicoGrupos(DdlCuentaDeposito.SelectedValue.ToEntero, -1, -1, "-1", TxtReferenciaCIE.Text.Trim, TxtConceptoCIE.Text.Trim) Then MsgError = "Error al actualziar Cuanta Referencia y Concepto Deposito." End If - End If End If @@ -834,6 +829,8 @@ Partial Class Bancos_ProveedoresAbonar CompraActual.Total = gvr.DataKey("Total").ToDecimal CompraActual.IVA = gvr.DataKey("IVA").ToDecimal CompraActual.IVADeducible = gvr.DataKey("IVADeducible").ToDecimal + CompraActual.IVANoDeducible = gvr.DataKey("IVANoDeducible").ToDecimal + CompraActual.CompraNoDeducible = gvr.DataKey("NoDeducible").ToEntero CompraActual.IEPS = gvr.DataKey("IEPS").ToDecimal CompraActual.RetIVA = gvr.DataKey("RetIVA").ToDecimal CompraActual.RetISR = gvr.DataKey("RetISR").ToDecimal @@ -843,15 +840,15 @@ Partial Class Bancos_ProveedoresAbonar CompraActual.EsImportacion = gvr.DataKey("EsImportacion") = "1" CompraActual.UsuarioActual = UsuarioActual CompraActual.CveSubProyecto = gvr.DataKey("CveSubProyecto").ToEntero + CompraActual.IdCtaContableProv = If(CompraActual.CveMoneda >= 2, IdCtaProveedorExtranjera, CtaProveedor) CompraActual.IdCtaContableProvComplementaria = IdCtaContComplementaria - 'Importe de pago Pago.ImportePago = gvr.FCTextBox("TxtAbonar").Text.ToDecimal - 'Tipos de cambio If Pago.CveMonedaPago = 1 AndAlso CompraActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en Pesos - Pago.TCPago = TxtTC.Text.ToDecimal + Pago.TCPago = 1 ' TxtTC.Text.ToDecimal + Pago.ImportePago = (gvr.FCTextBox("TxtAbonar").Text.ToDecimal * TxtTC.Text.ToDecimal).RoundSQL ElseIf Pago.CveMonedaPago = 2 AndAlso CompraActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en DOLARES Pago.TCPago = TxtTCDolaresDolares.Text.ToDecimal ElseIf Pago.CveMonedaPago = 2 AndAlso CompraActual.CveMoneda = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES @@ -1107,7 +1104,7 @@ Partial Class Bancos_ProveedoresAbonar If IDPoliza > 0 AndAlso UsuarioActual.Empresa.TipoContabilidad = 2 Then Msg.AppendFormat(" Póliza
", IDPoliza) If UsuarioActual.TienePermisoProceso(354) Then 'visualizar la póliza al registros - Msg.AppendFormat("

Ver Póliza   ", CvePrePoliza) + Msg.AppendFormat("Ver Póliza   ", CvePrePoliza) End If Dim Mensaje As String = String.Format("El Documento se generó correctamente.

{0} ", Msg.ToString) @@ -1516,7 +1513,6 @@ Partial Class Bancos_ProveedoresAbonar #Region " NOTIFICACION PAGO " - Private Sub EnviarCorreoNotificacion(CveIENotificar As Integer, CorreoNotificarA As String, CopiaPara As String, UsuarioActualNotificar As Usuario, MostarAlert As Boolean) Try @@ -1555,263 +1551,8 @@ Partial Class Bancos_ProveedoresAbonar GuardaLog("Error al enviar notificación de pago ProveedoresAbonar --> " & ex.StackTrace.ToString) End Try - - End Sub - - - 'Private Sub NotificacionPago(CveIE As Integer, CorreoNotificarA As String) - - ' If Not DdlTipoTransaccion.SelectedValue.ToEntero.Contiene(9, 17) Then - - ' Dim Body As String = GeneraCorreo(CveIE) - ' Dim Comprobante = If(ComprobanteIE <> "", String.Format("{0}IE\{1}", UsuarioActual.Empresa.Ruta, ComprobanteIE), "") 'Archivo Adjunto - - ' Dim File As Byte() = Nothing - ' If UsuarioActual.Empresa.Funcionalidad(545).ToEntero > 0 Then - ' File = NewGeneraBytesCxP(CveProveedor, UsuarioActual.Nombre) - ' End If - - ' Dim Hilo As New Threading.Thread(Sub() MandaCorreo(CorreoNotificarA, "Notificaciones de pago", Body, CveIE, Comprobante, File)) - ' Hilo.Start() - ' End If - - 'End Sub - - 'Private Sub MandaCorreo(Para As String, Asunto As String, Body As String, CveIE As Integer, Comprobante As String, File As Byte()) - ' 'Dim Parametros As List(Of String) = DirectCast(Data, List(Of String)) - - ' Dim Mail As New ClsSisMail() - ' Para = If(Para IsNot Nothing, Para, "") - ' Asunto = If(Asunto IsNot Nothing, Asunto, "") - ' Body = If(Body IsNot Nothing, Body, "") - - ' Dim ListaArchivos As New List(Of ClsSisMail.ArchivoMail) - ' If Comprobante IsNot Nothing AndAlso Comprobante <> "" Then - ' ListaArchivos.Add(New ClsSisMail.ArchivoMail With {.Ruta = Comprobante}) - ' End If - - ' If File IsNot Nothing Then - ' ListaArchivos.Add(New ClsSisMail.ArchivoMail With {.ArchivoBinario = File, .NombreArchivo = "EstadoCuentaCxP.pdf"}) - ' End If - - ' If Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body, Archivos:=ListaArchivos) Then - ' Dim objIE As New ClsBancos - ' objIE.UpdateBancos_IENotificaciones(1, "-1", "-1", CveIE) - ' objIE.Dispose() - ' End If - 'End Sub - - 'Private Function GeneraCorreo(CveIE As Integer) As String - ' Dim strBody As New StringBuilder - ' Dim objIE As New ClsBancos - - ' If objIE.GetBancosIE(CveIE, UsuarioActual.CveEmpresa) Then - ' strBody.Append(" ") - ' strBody.Append(" ") - ' strBody.Append(" ") - ' strBody.Append(" ") - ' strBody.Append(" ") - ' strBody.AppendFormat("
") - ' strBody.AppendFormat("
") - ' strBody.AppendFormat(" {0}", UsuarioActual.Empresa.Empresa) - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ", UsuarioActual.Empresa.Direccion) - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ", UsuarioActual.Empresa.Colonia) - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ", UsuarioActual.Empresa.Ciudad, UsuarioActual.Empresa.Estado, UsuarioActual.Empresa.CP) - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ", UsuarioActual.Empresa.RFC) - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat("
{0}
Col. {0}
{0}, {1}, C.P.{2}
RFC {0}
") - ' strBody.AppendFormat("
") - ' strBody.AppendFormat("


") - - ' strBody.AppendFormat("
") - ' strBody.AppendFormat("
") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - - ' If objIE.CveTipoTransaccion = 1 Then ' cuando es cheque - ' strBody.Append(" ") - ' strBody.Append(" ") - ' strBody.Append(" ") - ' End If - - ' If objIE.CveTipoTransaccion = 2 Then ' cuando es transf - ' strBody.Append(" ") - ' strBody.Append(" ") - ' strBody.Append(" ") - ' End If - - ' strBody.Append(" ") - ' strBody.AppendFormat(" ") - ' strBody.Append(" ") - ' strBody.Append("
Favor de pasar a nuestras oficinas por el cheque con la siguientes instrucciones.
Notificación de transferencia de pago realizada.
 
") - ' strBody.AppendFormat("
") - ' strBody.Append("
") - - - ' strBody.AppendFormat("
") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat("
") - ' strBody.AppendFormat("
") - ' strBody.AppendFormat(" Beneficiario:{0} ", objIE.PagueseA) - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ", objIE.TipoTransaccion) - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ", objIE.Banco) - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ", objIE.NumCuenta) - ' strBody.AppendFormat(" ") - ' If objIE.CuentaDepositado.ToString <> "" Then - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ", objIE.CuentaDepositado) - ' strBody.AppendFormat(" ") - ' End If - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ", objIE.FechaDocumento.ToString("dd/MM/yyyy")) - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ", objIE.Importe.FormatoNumero, objIE.Moneda) - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ", objIE.Observaciones) - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat("
Movimiento:{0}
Banco:{0}
Cuenta:{0}
Cuenta Destino:{0}
Fecha:{0}
Importe:$ {0} {1}
Observaciones:{0}
") - ' strBody.AppendFormat("
") - ' strBody.AppendFormat("
") - ' strBody.AppendFormat("
") - ' strBody.AppendFormat("
") - ' strBody.AppendFormat("
") - - - ' 'MOVIMIENTOS CHEQUE - ' If objIE.GetBancosIEMovimientos(CveIE, UsuarioActual.CveEmpresa) Then - ' Dim Textov33 As String = "" - ' If UsuarioActual.Empresa.Funcionalidad(520) = "1" Then - ' Textov33 = "Favor de emitir complemento de pago de los siguientes documentos" - ' End If - - ' strBody.AppendFormat("
") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat("
") - ' strBody.AppendFormat("
") - ' strBody.AppendFormat(" Documentos abonados o pagados
{0}
", Textov33) - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - - - ' For Each dr As DataRow In objIE.DtResultados.FiltraParametros("CveConceptoContable IN (17) AND CveCompra > 0").Rows - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ", dr("Fecha").ToString.ToDate.ToShortDateString()) - ' strBody.AppendFormat(" ", dr("SerieFolio").ToString) - ' strBody.AppendFormat(" ", dr("Importe").ToString.FormatoNumero) - ' strBody.AppendFormat(" ", dr("FolioFiscal")) - ' strBody.AppendFormat(" ", dr("ImporteNC").ToString.FormatoNumero) - ' strBody.AppendFormat(" ") - ' Next - - - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat("
FechaFacturaImporte ($)Folio FiscalNC Aplicadas
{0}{0}$ {0}{0}{0}
") - ' strBody.AppendFormat("
") - ' strBody.AppendFormat("
") - ' strBody.AppendFormat("
") - ' strBody.AppendFormat("
") - ' strBody.AppendFormat("
") - ' End If - - ' strBody.Append("
Favor de no responder a este correo.
") - - ' strBody.Append("") - ' End If - - ' objIE.Dispose() - ' Return strBody.ToString - 'End Function - #End Region #Region "SALDAR CUENTAS" @@ -1950,31 +1691,17 @@ Partial Class Bancos_ProveedoresAbonar End If Next - - If MsgError.Trim.Length = 0 AndAlso CvePrePoliza > 0 Then - If MsgError = "" AndAlso ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 5) Then + If MsgError = "" AndAlso ObjConta.ValidacionesPrePoliza(CvePrePoliza, 5, UsuarioActual) Then If ObjConta.ValorPolizaDescuadre > 0 Then MsgError = ObjConta.MensajePolizaDescuadre + " " + ObjConta.ValorDiferencia GuardaLogAD($"Bancos/ProveedoresAbonar | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") - Else - If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError = "" Then - - If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then - ' Alert(alertaContabilizacion, ModExtensiones.TipoMensaje.MsgInformacion) - Else - 'Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError) - MsgError = "Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico" - End If - - End If End If End If End If - If MsgError = "" Then ObjConta.Commit() CargaDatos(CveMoneda)