From f42c0e9878eac224c3a51d30efa035d3c1260ebe Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 29 Jun 2020 20:53:48 -0700 Subject: [PATCH 01/10] --otros ingresos --- Ventas/ClientesAbonar.aspx.vb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb index cc9f9197d..22c97dceb 100644 --- a/Ventas/ClientesAbonar.aspx.vb +++ b/Ventas/ClientesAbonar.aspx.vb @@ -2581,9 +2581,9 @@ Partial Class Ventas_ClientesAbonar Dim CveCuenta As Integer = 0 Dim PorcentajePago As Decimal = gr.DataKey("Saldo").ToDecimal / gr.DataKey("Original").ToDecimal Dim Saldo As Decimal = gr.DataKey("Saldo").ToDecimal - Dim SubTotal As Decimal = PorcentajePago * gr.DataKey("SubTotal").ToDecimal - Dim IVA As Decimal = PorcentajePago * gr.DataKey("IVA").ToDecimal - Dim IEPS As Decimal = PorcentajePago * gr.DataKey("IEPS").ToDecimal + Dim SubTotal As Decimal = PorcentajePago * gr.DataKey("SubTotal").ToDecimal.RoundSQL + Dim IVA As Decimal = PorcentajePago * gr.DataKey("IVA").ToDecimal.RoundSQL + Dim IEPS As Decimal = PorcentajePago * gr.DataKey("IEPS").ToDecimal.RoundSQL Dim TCVenta As Decimal = gr.DataKey("TipoCambio").ToDecimal Dim FechaVenta As Date = gr.DataKey("Fecha").ToDate Dim tCveMoneda As Integer = gr.DataKey("CveMoneda").ToEntero From 898d28f56d52cac62b64cf5a46d21d2fd8f3059a Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 29 Jun 2020 20:54:07 -0700 Subject: [PATCH 02/10] - iva no deducible --- Compras/ReembolsosComprobaciones.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Compras/ReembolsosComprobaciones.aspx.vb b/Compras/ReembolsosComprobaciones.aspx.vb index 001743e8f..592f5814e 100644 --- a/Compras/ReembolsosComprobaciones.aspx.vb +++ b/Compras/ReembolsosComprobaciones.aspx.vb @@ -745,7 +745,7 @@ Partial Class Compras_ReembolsosComprobaciones Dim ImporteNOIVA As Decimal = gvr.DataKey("IVANoDeducible").ToDecimal * PorcentajePago - If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, False, ImporteNOIVA, Referencia, 280, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(IdCtaContIVANoAcreditable > 0, IdCtaContIVANoAcreditable, IdCtaIVAAcreditable), -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("IVA").ToDecimal * PorcentajePago), ImporteMX:=(gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambio, CveCuenta:=CveCuentaIVAAcreditable, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeIVA) Then + If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, False, ImporteNOIVA, Referencia, 280, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(IdCtaContIVANoAcreditable > 0, IdCtaContIVANoAcreditable, IdCtaIVAAcreditable), -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, ImporteNOIVA), ImporteMX:=(ImporteNOIVA) * tipoCambio, CveCuenta:=CveCuentaIVAAcreditable, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeIVA) Then MsgError = "Detalle" End If End If From d80fea03846fe60439ed1c877d2a039f6f8e62c9 Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Tue, 30 Jun 2020 13:52:59 -0700 Subject: [PATCH 03/10] Devoluciones --- App_Code/ClsBancos.vb | 307 +++++++++++++ Bancos/IE.aspx | 153 ++++++- Bancos/IE.aspx.vb | 848 ++++++++++++++++++++++++++---------- Compras/Proveedores.aspx | 9 + Compras/Proveedores.aspx.vb | 10 + vwd.webinfo | 2 + 6 files changed, 1108 insertions(+), 221 deletions(-) diff --git a/App_Code/ClsBancos.vb b/App_Code/ClsBancos.vb index 7a39219a4..da147e2c4 100644 --- a/App_Code/ClsBancos.vb +++ b/App_Code/ClsBancos.vb @@ -4446,5 +4446,312 @@ Public Class ClsBancos End Function +#Region "N O T I F I C A C I O N E S D E P A G O P R O V E E D O R E S" + + Public Function NotificacionPago(CveIENotificar As Integer, CorreoNotificarA As String, CopiaPara As String, UsuarioActual As Usuario) As Boolean + + Dim RutaComprobante As String = "" + If GetBancosIE(CveIENotificar, UsuarioActual.CveEmpresa) Then + RutaComprobante = Comprobante + End If + + + Dim Body As String = GeneraCorreo(CveIENotificar, UsuarioActual) + 'Dim Comprobante As String = "" + + Dim File As Byte() = Nothing + + + 'If MostrarConfirmacion Then + Return MandaCorreo(CorreoNotificarA, "Notificaciones de pago", Body, RutaComprobante, File, UsuarioActual, CopiaPara) + 'Else + ' Dim Hilo As New Threading.Thread(Sub() MandaCorreo(CorreoNotificarA, "Notificaciones de pago", Body, RutaComprobante, File, UsuarioActual, MostrarConfirmacion, CopiaPara)) + ' Hilo.Start() + 'End If + + + End Function + + Private Function MandaCorreo(Para As String, Asunto As String, Body As String, RutaComprobante As String, File As Byte(), UsuarioActual As Usuario, CopiaPara As String) As Boolean + + Dim Respuesta As Boolean = False + + Try + 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 RutaComprobante IsNot Nothing AndAlso RutaComprobante <> "" Then + ListaArchivos.Add(New ClsSisMail.ArchivoMail With {.Ruta = RutaComprobante}) + End If + + If File IsNot Nothing Then + ListaArchivos.Add(New ClsSisMail.ArchivoMail With {.ArchivoBinario = File, .NombreArchivo = "EstadoCuentaCxP.pdf"}) + End If + + Dim separador As Char() = {";"c, ","c} + Dim strArray As String() = Para.Split(separador) + + Para = "" + + For Each sCorreo As String In strArray + If ClsSisMail.IsMailShared(sCorreo) And sCorreo.Trim.Length > 0 Then + Para = $"{Para}{sCorreo};" + End If + Next + + + If Para.Length > 0 Then + + Para = Para.Substring(0, Para.Length - 1) + + If Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body, Archivos:=ListaArchivos, Displayname:=$"SIG Notificaciones: Pago de {UsuarioActual.Empresa.Empresa}", CCP:=CopiaPara) Then + + Respuesta = True + 'If MostrarConfirmacion Then + ' Alert("El correo se envió correctamente", TipoMensaje.MsgInformacion) + 'End If + + + + 'If MostrarConfirmacion Then + ' Alert("No se pudo enviar el correo electrónico.", TipoMensaje.MsgError) + 'End If + + End If + + End If + + + Catch ex As Exception + OnError("Ocurrio un error al enviar el correo", ex) + + + End Try + + Return Respuesta + + End Function + + Private Function GeneraCorreo(CveIENotificar As Integer, UsuarioActual As Usuario) As String + + Dim strBody As New StringBuilder + + + If GetBancosIE(CveIENotificar, 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 CveTipoTransaccion = 1 Then ' cuando es cheque + strBody.Append(" ") + strBody.Append(" ") + strBody.Append(" ") + End If + + If CveTipoTransaccion.Contiene(2, 9, 17) 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} ", PagueseA) + strBody.AppendFormat(" ") + strBody.AppendFormat(" ") + strBody.AppendFormat(" ") + strBody.AppendFormat(" ") + strBody.AppendFormat(" ") + strBody.AppendFormat(" ") + strBody.AppendFormat(" ") + strBody.AppendFormat(" ", TipoTransaccion) + strBody.AppendFormat(" ") + strBody.AppendFormat(" ") + strBody.AppendFormat(" ") + strBody.AppendFormat(" ", Banco) + strBody.AppendFormat(" ") + strBody.AppendFormat(" ") + strBody.AppendFormat(" ") + strBody.AppendFormat(" ", NumCuenta) + strBody.AppendFormat(" ") + If CuentaDepositado.ToString <> "" Then + strBody.AppendFormat(" ") + strBody.AppendFormat(" ") + strBody.AppendFormat(" ", CuentaDepositado) + strBody.AppendFormat(" ") + End If + + strBody.AppendFormat(" ") + strBody.AppendFormat(" ") + strBody.AppendFormat(" ", FechaDocumento.ToString("dd/MM/yyyy")) + strBody.AppendFormat(" ") + strBody.AppendFormat(" ") + strBody.AppendFormat(" ") + strBody.AppendFormat(" ", Importe.FormatoNumero, Moneda) + strBody.AppendFormat(" ") + strBody.AppendFormat(" ") + strBody.AppendFormat(" ") + strBody.AppendFormat(" ", 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 GetBancosIEMovimientos(CveIENotificar, 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 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 End Class diff --git a/Bancos/IE.aspx b/Bancos/IE.aspx index 4cacca5f8..c5e19185d 100644 --- a/Bancos/IE.aspx +++ b/Bancos/IE.aspx @@ -441,6 +441,115 @@
+ + + + +
+
+
+ + Notas de Crédito + +
+ +
+ + + +
+ +
+
+
+
+
+
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +   + + + + +   + + + + + + <%-- Visible='<%# Eval("CveCompra").ToString <> "" andalso CDbl(Eval("Saldo")) > 0%>' />--%> + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + +
+
+ + + + + + +