From 7cf14ef53b27419fdb8a454813b4d64af3e6b06b Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Fri, 3 Jul 2020 20:02:49 -0700 Subject: [PATCH 01/12] agregando la carga de los ddl desde clspaginas --- App_Code/ClsPaginas.vb | 10 ++++-- Compras/Compras.aspx | 27 +++++++++------ Compras/Compras.aspx.vb | 76 ++++++++++++++++++++--------------------- 3 files changed, 63 insertions(+), 50 deletions(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index a04b7132b..e5e692298 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -8053,12 +8053,18 @@ Public Class ClsPaginas If DdlProyecto IsNot Nothing Then DdlProyecto.Visible = False LblSubProyecto.Text = "Proyecto" Case 4 - If LthProyectoP IsNot Nothing Then LthProyectoP.Text = "Proyecto" + If LthProyectoP IsNot Nothing Then LthProyectoP.Text = "Proyecto
" LblSubProyecto.Text = "Subproyecto" Case 5 - If LthProyectoP IsNot Nothing Then LthProyectoP.Text = "Proyecto" + If LthProyectoP IsNot Nothing Then LthProyectoP.Text = "Proyecto
" LblSubProyecto.Text = "Sucursal" End Select + DdlProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1).FiltraParametros("", "", {"CveProyecto", "Proyecto"}), GlobalDTProyectos(UsuarioActual.CveEmpresa, -1).FiltraParametros("", "", {"CveProyecto", "Proyecto"})) + DdlProyecto.DataBind() + + DdlSubProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1)) + DdlSubProyecto.DataBind() + DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) End Sub End Class diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx index 781193794..82abd140c 100644 --- a/Compras/Compras.aspx +++ b/Compras/Compras.aspx @@ -613,9 +613,8 @@ Producto o Servicio Observación -   - - + +   @@ -650,13 +649,21 @@ - - - - <%--
--%> - - - +
+
+ + + +
+ <%----%> +
+
+
+ + + +
+
diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 816d8cd42..9782d8da6 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -1546,11 +1546,11 @@ Partial Class Compras_Compras ' LblSubProyecto.InnerText = "Proyecto" ' 'LblSubProyectoDivAplica.InnerText = "Proyecto" - DdlSubProyecto.Items.Clear() - ' 'DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) - DdlSubProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1)) - DdlSubProyecto.DataBind() - DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) + 'DdlSubProyecto.Items.Clear() + ''DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) + 'DdlSubProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1)) + 'DdlSubProyecto.DataBind() + 'DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) ' 'DdlAsignaSubProyecto.Items.Clear() ' 'DdlAsignaSubProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1)) @@ -1572,48 +1572,48 @@ Partial Class Compras_Compras ' LblSubProyecto.InnerText = "Sucursal" ' 'LblSubProyectoDivAplica.InnerText = "Sucursal" - DdlSubProyecto.Items.Clear() - 'DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) - DdlSubProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1)) - DdlSubProyecto.DataBind() - DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) + 'DdlSubProyecto.Items.Clear() + ''DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) + 'DdlSubProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1)) + 'DdlSubProyecto.DataBind() + 'DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) - ' 'DdlAsignaSubProyecto.Items.Clear() - ' 'DdlAsignaSubProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1)) - ' 'DdlAsignaSubProyecto.DataBind() - ' 'DdlAsignaSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) + ' 'DdlAsignaSubProyecto.Items.Clear() + ' 'DdlAsignaSubProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1)) + ' 'DdlAsignaSubProyecto.DataBind() + ' 'DdlAsignaSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) - divproyecto.Visible = False - 'divasignaproyecto.Visible = False - DdlProyecto.Visible = False - DdlProyecto.Items(0).Text = "" + divproyecto.Visible = False + 'divasignaproyecto.Visible = False + DdlProyecto.Visible = False + DdlProyecto.Items(0).Text = "" - 'ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 4 Then - ' LitHProyecto.Text = "Sucursal" - ' LthProyectoP.Text = "Sucursal" + 'ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 4 Then + ' LitHProyecto.Text = "Sucursal" + ' LthProyectoP.Text = "Sucursal" - ' LblSubProyectoHeader.Text = "Proyecto" - ' LblSubProyectoPHeader.Text = "Proyecto" + ' LblSubProyectoHeader.Text = "Proyecto" + ' LblSubProyectoPHeader.Text = "Proyecto" - ' 'LblSubProyectoDivAplica.InnerText = "Sucursal" - ' 'LblProyectoDivAplica.InnerText = "Proyecto" - ' LblSubProyecto.InnerText = "Sucursal" - ' LblProyecto.InnerText = "Proyecto" + ' 'LblSubProyectoDivAplica.InnerText = "Sucursal" + ' 'LblProyectoDivAplica.InnerText = "Proyecto" + ' LblSubProyecto.InnerText = "Sucursal" + ' LblProyecto.InnerText = "Proyecto" - 'ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 5 Then - ' LitHProyecto.Text = "Proyecto" - ' LthProyectoP.Text = "Proyecto" + 'ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 5 Then + ' LitHProyecto.Text = "Proyecto" + ' LthProyectoP.Text = "Proyecto" - ' LblSubProyectoHeader.Text = "Sucursal" - ' LblSubProyectoPHeader.Text = "Sucursal" + ' LblSubProyectoHeader.Text = "Sucursal" + ' LblSubProyectoPHeader.Text = "Sucursal" - ' 'LblSubProyectoDivAplica.InnerText = "Proyecto" - ' 'LblProyectoDivAplica.InnerText = "Sucursal" - ' LblSubProyecto.InnerText = "Proyecto" - ' LblProyecto.InnerText = "Sucursal" - End If + ' 'LblSubProyectoDivAplica.InnerText = "Proyecto" + ' 'LblProyectoDivAplica.InnerText = "Sucursal" + ' LblSubProyecto.InnerText = "Proyecto" + ' LblProyecto.InnerText = "Sucursal" + End If - CargaGvPersonal() + CargaGvPersonal() CargaDdlPersonal() From 2624f0d8e1dae6addef5bbd93976b9836dbc19f2 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Fri, 3 Jul 2020 20:03:27 -0700 Subject: [PATCH 02/12] - --- Acumuladores/CatFoliosGarantia.aspx | 2 +- Acumuladores/CatFoliosGarantia.aspx.vb | 1 + Ventas/Ventas.aspx | 8 ++-- Ventas/Ventas.aspx.vb | 51 +++++++++++++------------- 4 files changed, 32 insertions(+), 30 deletions(-) diff --git a/Acumuladores/CatFoliosGarantia.aspx b/Acumuladores/CatFoliosGarantia.aspx index d5595991a..ee503615a 100644 --- a/Acumuladores/CatFoliosGarantia.aspx +++ b/Acumuladores/CatFoliosGarantia.aspx @@ -250,10 +250,10 @@
+ SubProyecto: -
diff --git a/Acumuladores/CatFoliosGarantia.aspx.vb b/Acumuladores/CatFoliosGarantia.aspx.vb index 778a6275d..26e8947e3 100644 --- a/Acumuladores/CatFoliosGarantia.aspx.vb +++ b/Acumuladores/CatFoliosGarantia.aspx.vb @@ -47,6 +47,7 @@ Partial Class Acumuladores_CatFoliosGarantia #Region "Folios Garantía" Private Sub CargaSubProyectos() + CargarCentrosDeCosto(Nothing, DdlSubProyectos, Nothing, lblSubProyecto) DdlSubProyectos.Items.Clear() DdlSubProyectos.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) DdlSubProyectos.DataBind() diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index a394d9dfa..5d72b5557 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -891,8 +891,8 @@ Cantidad
Facturada -
- +
+ P.U.  Desc @@ -5345,16 +5345,16 @@
+ Proyecto: -
+ SubProyecto: -
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index afc90a877..0fb24e713 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -1948,7 +1948,7 @@ Partial Class Ventas CreaDTmpF() CreaDTDocumentosRelacionados() CargaDdlSubProyectos() - CargaProyecto() + 'CargaProyecto() CargaSucursales() CargaClasificaciones() @@ -2455,10 +2455,10 @@ Partial Class Ventas 'DdlProyecto.Visible = False BrSubProyecto.Visible = False DdlProyectoPyME.Visible = False - LblProyectoHeader.Text = "Sucursal" + ' LblProyectoHeader.Text = "Sucursal" LblSubProyecto.Text = "" divProyectoPyME.Visible = False - LblSubProyectoPyME.InnerText = "Sucursal" + 'LblSubProyectoPyME.InnerText = "Sucursal" Dim dttSub As New DataTable dttSub = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) @@ -2479,37 +2479,38 @@ Partial Class Ventas 'DdlProyecto.Visible = False BrSubProyecto.Visible = False DdlProyectoPyME.Visible = False - LblProyectoHeader.Text = "Proyecto" + 'LblProyectoHeader.Text = "Proyecto" LblSubProyecto.Text = "" divProyectoPyME.Visible = False - LblSubProyectoPyME.InnerText = "Proyecto" - Dim dttSub As New DataTable - dttSub = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) + 'LblSubProyectoPyME.InnerText = "Proyecto" + 'Dim dttSub As New DataTable + 'dttSub = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) - DdlSubProyecto.Items.Clear() - DdlSubProyecto.DataSource = dttSub - 'DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("", "", {"CveSubProyecto", "SubProyecto"}) - DdlSubProyecto.DataBind() - DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) + 'DdlSubProyecto.Items.Clear() + 'DdlSubProyecto.DataSource = dttSub + ''DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("", "", {"CveSubProyecto", "SubProyecto"}) + 'DdlSubProyecto.DataBind() + 'DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) - DdlSubProyectoPyME.Items.Clear() - DdlSubProyectoPyME.DataSource = dttSub - 'DdlSubProyectoPyME.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("", "", {"CveSubProyecto", "SubProyecto"}) - DdlSubProyectoPyME.DataBind() - DdlSubProyectoPyME.Items.Insert(0, New ListItem("Seleccione", "-1")) - dttSub.Dispose() + 'DdlSubProyectoPyME.Items.Clear() + 'DdlSubProyectoPyME.DataSource = dttSub + ''DdlSubProyectoPyME.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("", "", {"CveSubProyecto", "SubProyecto"}) + 'DdlSubProyectoPyME.DataBind() + 'DdlSubProyectoPyME.Items.Insert(0, New ListItem("Seleccione", "-1")) + 'dttSub.Dispose() - ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 4 Then - LblProyectoHeader.Text = "Sucursal" - LblSubProyecto.Text = "Proyecto" + 'ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 4 Then + ' LblProyectoHeader.Text = "Sucursal" + ' LblSubProyecto.Text = "Proyecto" - ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 5 Then - LblProyectoHeader.Text = "Proyecto" - LblSubProyecto.Text = "Sucursal" + 'ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 5 Then + ' LblProyectoHeader.Text = "Proyecto" + ' LblSubProyecto.Text = "Sucursal" End If - CargarCentrosDeCosto(Nothing, Nothing, LblProyectoHeader, LblSubProyecto) + CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyectoHeader, LblSubProyecto) + CargarCentrosDeCosto(DdlProyectoPyME, DdlSubProyectoPyME, LblProyectoPyME, LblSubProyectoPyME) 'MOSTRAR LA OPCION DE AGREGAR PS EN BDH If UsuarioActual.CveEmpresa = 140 AndAlso CveVenta <= 0 Then From 8300c026e21a55cf009ff40ab6c2cc99fe703633 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 3 Jul 2020 21:34:20 -0700 Subject: [PATCH 03/12] quitar clssucursales - concepto 103, ventas --- App_Code/WS_PuntoVenta.vb | 46 +++++++++++++++++++-------------------- Ventas/Ventas.aspx.vb | 46 +++++++++++++++++++++++++-------------- 2 files changed, 53 insertions(+), 39 deletions(-) diff --git a/App_Code/WS_PuntoVenta.vb b/App_Code/WS_PuntoVenta.vb index cd18bf021..e22b5f793 100644 --- a/App_Code/WS_PuntoVenta.vb +++ b/App_Code/WS_PuntoVenta.vb @@ -429,22 +429,22 @@ Public Class WS_PuntoVenta Return Respuesta End Function - - Public Function GetSucursales(CveEmpresa As Integer) As RespuestaWS - Dim objSucursales As New ClsSucursales - Dim Respuesta As New RespuestaWS + ' + 'Public Function GetSucursales(CveEmpresa As Integer) As RespuestaWS + ' Dim objSucursales As New ClsSucursales + ' Dim Respuesta As New RespuestaWS - If objSucursales.GetSucursales() Then - Respuesta.Datos = objSucursales.DtResultados.FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa)) - Respuesta.Datos.TableName = "Resultados" - Respuesta.HuboError = False - Else - Respuesta.Descripcion = "HUBO UN ERROR" - End If + ' If objSucursales.GetSucursales() Then + ' Respuesta.Datos = objSucursales.DtResultados.FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa)) + ' Respuesta.Datos.TableName = "Resultados" + ' Respuesta.HuboError = False + ' Else + ' Respuesta.Descripcion = "HUBO UN ERROR" + ' End If - objSucursales.Dispose() - Return Respuesta - End Function + ' objSucursales.Dispose() + ' Return Respuesta + 'End Function Public Function GetClientes(CveEmpresa As Integer) As RespuestaWS @@ -1170,7 +1170,7 @@ Public Class WS_PuntoVenta 'Enviar correo de corte de turno EnviarCorreo(VtaCorte.CveCorte, VtaCorte.CveEmpresa) - Dim cuenta As Integer = GetCuenta(2090) + ' Dim cuenta As Integer = GetCuenta(2090) Else objPV.RollBack() End If @@ -1197,16 +1197,16 @@ Public Class WS_PuntoVenta Return objVentasPago End Function - - Public Function GetCuenta(CveSucursal As Integer) As Integer - Dim objSU As New ClsSucursales - Dim Cuenta As Integer + ' + 'Public Function GetCuenta(CveSucursal As Integer) As Integer + ' Dim objSU As New ClsSucursales + ' Dim Cuenta As Integer - 'Cuenta = objSU.GetCuenta(CveSucursal) - objSU.Dispose() + ' 'Cuenta = objSU.GetCuenta(CveSucursal) + ' objSU.Dispose() - Return Cuenta - End Function + ' Return Cuenta + 'End Function Public Function AddBancosIE(Importe As Double, Moneda As Integer, Fecha As Date, CveUsuario As Integer, CveEmpresa As Integer, Cuenta As Integer, Comprobante As String, Opcion As String) As Boolean diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index e744b495e..e7fb5937f 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -10963,25 +10963,39 @@ Partial Class Ventas 'CveCuenta = ObjConta.DtResultados.Rows(0)("Conta_IdCuentaDescuentoVenta").ToString().ToEntero() End If End If - If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" - If importeMovimiento > 0 AndAlso UsuarioActual.CveEmpresa = 119 Then - 'código fijo en base el porcentaje iva, que se afecten las clasificaciones - For i = 0 To TmpDTDetalle.Rows.Count - 1 - 'If TmpDTDetalle(i)("PorcentajeIVA").ToString().ToDecimal > 0 Then - ' If TmpDTDetalle(i)("PorcentajeIVA").ToString().ToDecimal = 0.08 Then - ' TmpDTDetalle(i)("CveClasificacion") = 20242 'clasif: ventas tasa 8% - ' Else - ' TmpDTDetalle(i)("CveClasificacion") = 19929 'clasif: ventas tasa 16% - ' End If - 'Else - ' TmpDTDetalle(i)("CveClasificacion") = 19930 'clasif: ventas tasa 0% - 'End If - If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDT.MAX("PorcentajeIVA").ToDouble).Rows.Count > 0 Then - TmpDTDetalle(i)("CveClasificacion") = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDT.MAX("PorcentajeIVA").ToDouble).Rows(0)("CveClasificacion").ToString() + DT = TmpDTDetalle.FiltraParametros("", "", {"CveClasificacion", "CveSubProyecto", "PorcentajeIVA"}) + + If DT.Rows.Count > 0 Then + 'Se agrega movimiento separado por la cuenta de ventas (ER) + For Each Row2 As DataRow In DT.Rows + importeMovimiento = (TmpDTDetalle.SUM("TotalImporte", String.Format("CveClasificacion = {0} And CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString().ToDecimal) * ValorMultiplicador + importeMX = importeMovimiento * tipoCambio * Multiplicador + FechaMovimiento = ObjFactura.FechaPago + Concepto = $"{ViewState("VentaFolio").ToString()} {If(Row2("CveClasificacion").ToString().ToEntero() > 0, GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}"), "")} - {If(Row2("CveSubProyecto").ToString().ToEntero() > 0, GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString()}"), "Sin SubProyecto Asignado")}" + + If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" + 'Nota cuando es Nota de crédiot, debe de tomar el devoluciones y rebajas + If ObjFactura.TipoDocto.Contiene("Egs") Then + IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero() + Else + IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresos", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero() + End If + + If importeMovimiento <> 0 Then + + If IdCtaContable <= 0 Then + CuentasContablesInvalidas.Append("
" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString() + GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}")) + idCuentaContabilizacion = 0 + End If + + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 103, Concepto, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveVentaAmortizacion:=-1, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString().ToEntero(), CveSubProyecto:=Row2("CveSubProyecto").ToString().ToEntero(), ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, PorcentajeImpuesto:=Row2("PorcentajeIVA").ToString().ToDecimal) Then + ErrorPrepoliza = True + Else + ViewState("SeGuardoPrePoliza") = True + End If End If Next - End If End If From 26e6199260eca44e3b5352cb23b36710c5dbc986 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 4 Jul 2020 11:48:40 -0700 Subject: [PATCH 04/12] concepto 103 --- App_Code/Modelos.vb | 64 +++++++++++++------- Ventas/Ventas.aspx.vb | 136 +++++++++++++++++++++--------------------- 2 files changed, 112 insertions(+), 88 deletions(-) diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index baf59538a..1b3a113ff 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -2917,42 +2917,66 @@ Namespace Modelos importeMovimiento = 0 Case 103 'Descuento - If Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") AndAlso ObjFactura.CveTipoAmortizacionAnticipo = -1 Then + If ObjFactura.Descuento <> 0 AndAlso Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") AndAlso ObjFactura.CveTipoAmortizacionAnticipo = -1 Then - importeMovimiento = (ObjFactura.Descuento * ValorMultiplicador) + importeMovimiento = ObjFactura.Descuento * ValorMultiplicador importeMX = Math.Round(importeMovimiento, 2) * tipoCambio * Multiplicador FechaMovimiento = ObjFactura.FechaPago CveSubProyectoContabilizar = CveSubProyectoVenta If importeMovimiento <> 0 AndAlso ObjConta.GetRetCuenta(ConceptoContable, ObjFactura.CveEmpresa) Then If ObjConta.DtResultados.Rows.Count > 0 Then - IdCtaContable = ObjConta.DtResultados.Rows(0)("Conta_IdCuentaDescuentoVenta").ToString.ToEntero - 'CveCuenta = ObjConta.DtResultados.Rows(0)("Conta_IdCuentaDescuentoVenta").ToString.ToEntero + IdCtaContable = ObjConta.DtResultados.Rows(0)("Conta_IdCuentaDescuentoVenta").ToString().ToEntero() + 'CveCuenta = ObjConta.DtResultados.Rows(0)("Conta_IdCuentaDescuentoVenta").ToString().ToEntero() End If End If - If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" - If importeMovimiento > 0 AndAlso UsuarioActual.CveEmpresa = 119 Then - 'código fijo en base el porcentaje iva, que se afecten las clasificaciones - For i = 0 To TmpDTDetalle.Rows.Count - 1 - If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDTDetalle.MAX("PorcentajeIVA").ToDouble).Rows.Count > 0 Then - TmpDTDetalle(i)("CveClasificacion") = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDTDetalle.MAX("PorcentajeIVA").ToDouble).Rows(0)("CveClasificacion").ToString + DT = TmpDTDetalle.FiltraParametros("", "", {"CveClasificacion", "CveSubProyecto", "PorcentajeIVA"}) + + If DT.Rows.Count > 0 Then + 'Se agrega movimiento separado por la cuenta de ventas (ER) + For Each Row2 As DataRow In DT.Rows + importeMovimiento = (TmpDTDetalle.SUM("Descuento", String.Format("CveClasificacion = {0} And CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString().ToDecimal) * ValorMultiplicador + importeMX = importeMovimiento * tipoCambio * Multiplicador + FechaMovimiento = ObjFactura.FechaPago + Concepto = $"{ObjFactura.SerieFolio} {If(Row2("CveClasificacion").ToString().ToEntero() > 0, GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}"), "")} - {If(Row2("CveSubProyecto").ToString().ToEntero() > 0, GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString()}"), "Sin SubProyecto Asignado")}" + + If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" + 'Nota cuando es Nota de crédiot, debe de tomar el devoluciones y rebajas + If ObjFactura.TipoDocto.Contiene("Egs") Then + IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero() + Else + IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresos", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero() + End If + + If importeMovimiento <> 0 Then + + If IdCtaContable <= 0 Then + CuentasContablesInvalidas.Append("
" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString() + GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}")) + idCuentaContabilizacion = 0 + End If + + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 103, Concepto, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveVentaAmortizacion:=-1, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString().ToEntero(), CveSubProyecto:=Row2("CveSubProyecto").ToString().ToEntero(), ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, PorcentajeImpuesto:=Row2("PorcentajeIVA").ToString().ToDecimal) Then + ErrorPrepoliza = True + Else + ObjFactura.SeGuardoPrePoliza = True + End If End If Next - End If End If + importeMovimiento = 0 - Case 103 'Descuento - 'si se amortiza anticipo por concepto de descuento, no debe de registrar esta partida. - If ObjFactura.CveTipoAmortizacionAnticipo <> 1 Then - importeMovimiento = (ObjFactura.Descuento * ValorMultiplicador) - importeMX = Math.Round(importeMovimiento, 2) * tipoCambio * Multiplicador - FechaMovimiento = ObjFactura.FechaPago - If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" - IdCtaContable = 0 - End If + 'Case 103 'Descuento + ' 'si se amortiza anticipo por concepto de descuento, no debe de registrar esta partida. + ' If ObjFactura.CveTipoAmortizacionAnticipo <> 1 Then + ' importeMovimiento = (ObjFactura.Descuento * ValorMultiplicador) + ' importeMX = Math.Round(importeMovimiento, 2) * tipoCambio * Multiplicador + ' FechaMovimiento = ObjFactura.FechaPago + ' If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" + ' IdCtaContable = 0 + ' End If Case 8 'Ret IVA por Trasladar If Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") AndAlso ObjFactura.CveTipoRetencion <> 4 Then 'SI NO ES RETENCION DE IVA DE SERVICIOS diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 8fcea4f04..fd5d050a7 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -1948,7 +1948,7 @@ Partial Class Ventas CreaDTmpF() CreaDTDocumentosRelacionados() CargaDdlSubProyectos() - 'CargaProyecto() + CargaProyecto() CargaSucursales() CargaClasificaciones() @@ -2452,13 +2452,13 @@ Partial Class Ventas CargaFletes() If UsuarioActual.Empresa.Tipo_CentroCosto = 1 Then - 'DdlProyecto.Visible = False + DdlProyecto.Visible = False BrSubProyecto.Visible = False DdlProyectoPyME.Visible = False - ' LblProyectoHeader.Text = "Sucursal" + LblProyectoHeader.Text = "Sucursal" LblSubProyecto.Text = "" divProyectoPyME.Visible = False - 'LblSubProyectoPyME.InnerText = "Sucursal" + LblSubProyectoPyME.Text = "Sucursal" Dim dttSub As New DataTable dttSub = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) @@ -2476,41 +2476,41 @@ Partial Class Ventas dttSub.Dispose() ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 2 Then - 'DdlProyecto.Visible = False + DdlProyecto.Visible = False BrSubProyecto.Visible = False DdlProyectoPyME.Visible = False - 'LblProyectoHeader.Text = "Proyecto" + LblProyectoHeader.Text = "Proyecto" LblSubProyecto.Text = "" divProyectoPyME.Visible = False - 'LblSubProyectoPyME.InnerText = "Proyecto" - 'Dim dttSub As New DataTable - 'dttSub = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) + LblSubProyectoPyME.Text = "Proyecto" + Dim dttSub As New DataTable + dttSub = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) - 'DdlSubProyecto.Items.Clear() - 'DdlSubProyecto.DataSource = dttSub - ''DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("", "", {"CveSubProyecto", "SubProyecto"}) - 'DdlSubProyecto.DataBind() - 'DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) + DdlSubProyecto.Items.Clear() + DdlSubProyecto.DataSource = dttSub + 'DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("", "", {"CveSubProyecto", "SubProyecto"}) + DdlSubProyecto.DataBind() + DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) - 'DdlSubProyectoPyME.Items.Clear() - 'DdlSubProyectoPyME.DataSource = dttSub - ''DdlSubProyectoPyME.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("", "", {"CveSubProyecto", "SubProyecto"}) - 'DdlSubProyectoPyME.DataBind() - 'DdlSubProyectoPyME.Items.Insert(0, New ListItem("Seleccione", "-1")) - 'dttSub.Dispose() + DdlSubProyectoPyME.Items.Clear() + DdlSubProyectoPyME.DataSource = dttSub + 'DdlSubProyectoPyME.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("", "", {"CveSubProyecto", "SubProyecto"}) + DdlSubProyectoPyME.DataBind() + DdlSubProyectoPyME.Items.Insert(0, New ListItem("Seleccione", "-1")) + dttSub.Dispose() - 'ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 4 Then - ' LblProyectoHeader.Text = "Sucursal" - ' LblSubProyecto.Text = "Proyecto" + ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 4 Then + LblProyectoHeader.Text = "Sucursal" + LblSubProyecto.Text = "Proyecto" - 'ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 5 Then - ' LblProyectoHeader.Text = "Proyecto" - ' LblSubProyecto.Text = "Sucursal" + ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 5 Then + LblProyectoHeader.Text = "Proyecto" + LblSubProyecto.Text = "Sucursal" End If - CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyectoHeader, LblSubProyecto) - CargarCentrosDeCosto(DdlProyectoPyME, DdlSubProyectoPyME, LblProyectoPyME, LblSubProyectoPyME) + 'CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyectoHeader, LblSubProyecto) + 'CargarCentrosDeCosto(DdlProyectoPyME, DdlSubProyectoPyME, LblProyectoPyME, LblSubProyectoPyME) 'MOSTRAR LA OPCION DE AGREGAR PS EN BDH If UsuarioActual.CveEmpresa = 140 AndAlso CveVenta <= 0 Then @@ -4472,25 +4472,25 @@ Partial Class Ventas End If If UsuarioActual.CveEmpresa = 48 Then - TxtFecha.AutoPostBack = True + TxtFecha.AutoPostBack = True + End If + + CargaCodigoUnico() + + 'SI ES COTIZACION PUEDE GENERAR UNA OC PARA MODIFICAR LOS IMPORTES + If DdlTipoComprobante.SelectedValue = "Cot" AndAlso UsuarioActual.Empresa.Funcionalidad(583) = "1" Then + Dim DtOCGeneradas As DataTable = Nothing + If ObjVentas.GetVentasCotizacionesOC(Me.CveVenta, -1, UsuarioActual.CveEmpresa) Then + DtOCGeneradas = ObjVentas.DtResultados.Copy() End If - - CargaCodigoUnico() - - 'SI ES COTIZACION PUEDE GENERAR UNA OC PARA MODIFICAR LOS IMPORTES - If DdlTipoComprobante.SelectedValue = "Cot" AndAlso UsuarioActual.Empresa.Funcionalidad(583) = "1" Then - Dim DtOCGeneradas As DataTable = Nothing - If ObjVentas.GetVentasCotizacionesOC(Me.CveVenta, -1, UsuarioActual.CveEmpresa) Then - DtOCGeneradas = ObjVentas.DtResultados.Copy() - End If - If DtOCGeneradas IsNot Nothing AndAlso DtOCGeneradas.Rows.Count > 0 Then - LtGenerarOC.Visible = False - Else - LtGenerarOC.Visible = True - End If + If DtOCGeneradas IsNot Nothing AndAlso DtOCGeneradas.Rows.Count > 0 Then + LtGenerarOC.Visible = False + Else + LtGenerarOC.Visible = True End If + End If - DdlTipoRetencion.SelectedValueExist(DbRowVenta("CveTipoRetencion").ToString()) + DdlTipoRetencion.SelectedValueExist(DbRowVenta("CveTipoRetencion").ToString()) CargaPS(-1, DdlPS) @@ -4509,8 +4509,8 @@ Partial Class Ventas UpEstatus.Update() Retorno = True - Else - ViewState("CveVenta") = -1 + Else + ViewState("CveVenta") = -1 Alert("El documento solicitado no existe, favor de revisar su búsqueda.", TipoMensaje.MsgAdvertencia) End If End If @@ -10047,17 +10047,17 @@ Partial Class Ventas CveCuentaCliente = CveCuenta End If - Case 7 'descuentos - If LblDescuentos.Text.ToDecimal > 0 Then + 'Case 7 'descuentos + ' If LblDescuentos.Text.ToDecimal > 0 Then - importeMovimiento = (ObjFactura.Descuento) * ValorMultiplicador - importeMX = importeMovimiento * tipoCambio * Multiplicador - FechaMovimiento = ObjFactura.FechaPago - CveSubProyectoContabilizar = CveSubProyectoVenta - IdCtaContable = 0 - If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" + ' importeMovimiento = (ObjFactura.Descuento) * ValorMultiplicador + ' importeMX = importeMovimiento * tipoCambio * Multiplicador + ' FechaMovimiento = ObjFactura.FechaPago + ' CveSubProyectoContabilizar = CveSubProyectoVenta + ' IdCtaContable = 0 + ' If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" - End If + ' End If Case 3 'Cliente If ObjFactura.TipoDocto = "Ant" Then @@ -10419,7 +10419,7 @@ Partial Class Ventas 'End If End If - If Not ErrorPrepoliza AndAlso ObjConta.ValidacionPrePolizaCuadre(ObjFactura.CvePrePoliza, 5) Then + If Not ErrorPrepoliza AndAlso ObjConta.ValidacionPrePolizaCuadre(ObjFactura.CvePrePoliza, 5) Then If ObjConta.ValorPolizaDescuadre > 0 Then 'ErrorPrepoliza = True GuardaLogAD($"Ventas/Ventas-ProcesoPrePolizas | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{ObjFactura.CvePrePoliza}", "LogPrePolizas") @@ -10956,7 +10956,7 @@ Partial Class Ventas importeMovimiento = 0 Case 103 'Descuento - If Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") AndAlso DdlTipoAmortizacionAnticipo.SelectedValue = "-1" Then + If ObjFactura.Descuento <> 0 AndAlso Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") AndAlso DdlTipoAmortizacionAnticipo.SelectedValue = "-1" Then importeMovimiento = ObjFactura.Descuento * ValorMultiplicador importeMX = Math.Round(importeMovimiento, 2) * tipoCambio * Multiplicador @@ -10975,7 +10975,7 @@ Partial Class Ventas If DT.Rows.Count > 0 Then 'Se agrega movimiento separado por la cuenta de ventas (ER) For Each Row2 As DataRow In DT.Rows - importeMovimiento = (TmpDTDetalle.SUM("TotalImporte", String.Format("CveClasificacion = {0} And CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString().ToDecimal) * ValorMultiplicador + importeMovimiento = (TmpDTDetalle.SUM("Descuento", String.Format("CveClasificacion = {0} And CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString().ToDecimal) * ValorMultiplicador importeMX = importeMovimiento * tipoCambio * Multiplicador FechaMovimiento = ObjFactura.FechaPago Concepto = $"{ViewState("VentaFolio").ToString()} {If(Row2("CveClasificacion").ToString().ToEntero() > 0, GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}"), "")} - {If(Row2("CveSubProyecto").ToString().ToEntero() > 0, GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString()}"), "Sin SubProyecto Asignado")}" @@ -11005,16 +11005,16 @@ Partial Class Ventas End If End If - - Case 103 'Descuento - 'si se amortiza anticipo por concepto de descuento, no debe de registrar esta partida. - If DdlTipoAmortizacionAnticipo.SelectedValue <> "1" Then - importeMovimiento = ObjFactura.Descuento * ValorMultiplicador - importeMX = Math.Round(importeMovimiento, 2) * tipoCambio * Multiplicador - FechaMovimiento = ObjFactura.FechaPago - If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" - IdCtaContable = 0 - End If + importeMovimiento = 0 + 'Case 103 'Descuento + ' 'si se amortiza anticipo por concepto de descuento, no debe de registrar esta partida. + ' If DdlTipoAmortizacionAnticipo.SelectedValue <> "1" Then + ' importeMovimiento = ObjFactura.Descuento * ValorMultiplicador + ' importeMX = Math.Round(importeMovimiento, 2) * tipoCambio * Multiplicador + ' FechaMovimiento = ObjFactura.FechaPago + ' If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" + ' IdCtaContable = 0 + ' End If Case 8 'Ret IVA por Trasladar If Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") AndAlso ObjFactura.CveTipoRetencion <> 4 Then 'SI NO ES RETENCION DE IVA DE SERVICIOS From 70520bb0071ebf08dfc04e87e7b69b3144af4ee5 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 4 Jul 2020 13:32:59 -0700 Subject: [PATCH 05/12] recarga el GlobalDTRHpersonal --- RH/Personal.aspx.vb | 1 + 1 file changed, 1 insertion(+) diff --git a/RH/Personal.aspx.vb b/RH/Personal.aspx.vb index 6301a5bb3..7ae62dd50 100644 --- a/RH/Personal.aspx.vb +++ b/RH/Personal.aspx.vb @@ -1738,6 +1738,7 @@ Partial Class RH_Personal 'If File.Exists(ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & ObjPersonal.URL) Then ' ImgPersonal.ImageUrl = "/Empresas/" & UsuarioActual.CveEmpresa & "/RH/Personal/" & ObjPersonal.URL 'End If + GlobalDTRHPersonal(UsuarioActual.CveEmpresa) = Nothing If CvePersonal > 0 Then CargaDatos() From 828bee6c172722897d67e3fa81d7f735cb4d4032 Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Sat, 4 Jul 2020 14:18:41 -0700 Subject: [PATCH 06/12] Agrupador filtro TipoCliente, Unificaion Correos de notificacion de Pago --- App_Code/ClsBancos.vb | 4 +- App_Code/ClsMovimientos.vb | 10 +- App_Code/ClsVentas.vb | 20 +- Bancos/IE.aspx.vb | 584 ++++---- Bancos/PagoElectronico.aspx.vb | 1498 ++++++++++--------- Bancos/PagoElectronicoGrupos.aspx.vb | 1129 ++++++-------- Bancos/PopIECompras.aspx.vb | 80 +- Bancos/ProveedoresAbonar.aspx.vb | 518 ++++--- CxC/RepCxC.aspx | 14 + CxC/RepCxC.aspx.vb | 51 +- CxC/RepCxCDetalle.aspx | 13 + CxC/RepCxCDetalle.aspx.vb | 40 +- Ventas/Clientes.aspx | 2 +- Ventas/ClientesAbonar.aspx.vb | 2 + Ventas/RepProductosServicios.aspx | 9 + Ventas/RepProductosServicios.aspx.vb | 7 +- Ventas/RepProductosServiciosDetalle.aspx | 12 + Ventas/RepProductosServiciosDetalle.aspx.vb | 26 +- Ventas/RepVentaDetalle.aspx | 11 + Ventas/RepVentaDetalle.aspx.vb | 26 +- Ventas/RepVentas.aspx | 11 + Ventas/RepVentas.aspx.vb | 7 +- Ventas/RepVentasPeriodo.aspx | 11 + Ventas/RepVentasPeriodo.aspx.vb | 5 +- vwd.webinfo | 6 + 25 files changed, 2111 insertions(+), 1985 deletions(-) diff --git a/App_Code/ClsBancos.vb b/App_Code/ClsBancos.vb index da147e2c4..c795ada73 100644 --- a/App_Code/ClsBancos.vb +++ b/App_Code/ClsBancos.vb @@ -4452,7 +4452,8 @@ Public Class ClsBancos Dim RutaComprobante As String = "" If GetBancosIE(CveIENotificar, UsuarioActual.CveEmpresa) Then - RutaComprobante = Comprobante + RutaComprobante = $"{UsuarioActual.Empresa.Ruta}IE/{Comprobante}" + End If @@ -4742,6 +4743,7 @@ Public Class ClsBancos strBody.AppendFormat("") End If + strBody.Append("
Correo automatizado por SIG ERP www.adsistemas.mx
") strBody.Append("
Favor de no responder a este correo.
") strBody.Append("") diff --git a/App_Code/ClsMovimientos.vb b/App_Code/ClsMovimientos.vb index 7849671d9..88e6a9522 100644 --- a/App_Code/ClsMovimientos.vb +++ b/App_Code/ClsMovimientos.vb @@ -240,7 +240,7 @@ Public Class ClsMovimientos Gpo As Integer, CveResponsable As Integer, TipoCambio As Integer, Optional TCEspecifico As Double = -1, Optional TipoDocto As String = "-1", Optional FechaVI As String = "-1", Optional FechaVF As String = "-1", Optional FechaCorte As Date = Nothing, Optional EstatusCliente As Integer = -1, Optional CveUsuarioConsulta As Integer = -1, - Optional CveCobranzaEstatus As Integer = -1, Optional CveClienteClasificacion As Integer = -1) As Boolean + Optional CveCobranzaEstatus As Integer = -1, Optional CveClienteClasificacion As Integer = -1, Optional TipoCliente As Integer = -1) As Boolean Dim Retorno As Boolean = False 'Data = New DataTable @@ -272,6 +272,7 @@ Public Class ClsMovimientos .Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta .Add("@CveCobranzaEstatus", SqlDbType.Int).Value = CveCobranzaEstatus .Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion + .Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente End With Try @@ -325,7 +326,8 @@ Public Class ClsMovimientos CveEstatus As Integer, IVA As String, Agrupador As Integer, CveEmpresa As Integer, CveResponsable As Integer, TipoCambio As Integer, Optional TCEspecifico As Double = -1, Optional TipoDocto As String = "-1", Optional FechaVI As String = "-1", Optional FechaVF As String = "1", Optional FechaCorte As Date = Nothing, Optional CveUsuarioConsulta As Integer = -1, - Optional CveCobranzaEstatus As Integer = -1, Optional CveClienteClasificacion As Integer = -1, Optional LimiteCredito As Decimal = -1) As Boolean + Optional CveCobranzaEstatus As Integer = -1, Optional CveClienteClasificacion As Integer = -1, Optional LimiteCredito As Decimal = -1, + Optional TipoCliente As Integer = -1, Optional CveMoneda As Integer = -1) As Boolean Dim Retorno As Boolean = False 'Data = New DataTable @@ -363,6 +365,10 @@ Public Class ClsMovimientos .Add("@CveCobranzaEstatus", SqlDbType.Int).Value = CveCobranzaEstatus .Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion .Add("@LimiteCredito", SqlDbType.Float).Value = LimiteCredito + .Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente + .Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda + + End With Try diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index daee7399b..6aad2b55e 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -1320,7 +1320,7 @@ Public Class ClsVentas Public Function GetRepVentas(FechaI As Date, FechaF As Date, FechaIEjec As Date, FechaFEjec As Date, CveCliente As Integer, CveSubProyectoEjecucion As Integer, CveVendedor As String, CveUsuario As Integer, CveEstatus As String, IVA As String, CveEmpresa As Integer, Gpo As Integer, Optional TipoDocto As String = "-1", Optional CveProyecto As Integer = -1, Optional CveSubProyecto As String = "-1", Optional TipoCambio As Integer = 1, Optional TCEspecifico As Decimal = -1, Optional CveUsuarioConsulta As Integer = -1, - Optional CveClienteClasificacion As Integer = -1, Optional CveCondicionesPago As Integer = -1) As Boolean + Optional CveClienteClasificacion As Integer = -1, Optional CveCondicionesPago As Integer = -1, Optional TipoCliente As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_VentasGetRep") @@ -1346,6 +1346,7 @@ Public Class ClsVentas .Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta .Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion .Add("@CveCondicionesPago", SqlDbType.Int).Value = CveCondicionesPago + .Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente End With Try @@ -1405,7 +1406,7 @@ Public Class ClsVentas Public Function GetRepVentasPeriodos(FechaI As Date, FechaF As Date, FechaIEjec As Date, FechaFEjec As Date, CveCliente As Integer, CveSubProyectoEjecucion As Integer, CveVendedor As Integer, CveUsuario As Integer, CveEstatus As Integer, IVA As String, CveEmpresa As Integer, Gpo As Integer, Optional TipoDocto As String = "-1", Optional CveProyecto As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional TipoCambio As Integer = 1, Optional TCEspecifico As Decimal = -1, Optional CveUsuarioConsulta As Integer = -1, Optional VerEn As Integer = -1, - Optional CveClienteClasificacion As Integer = -1) As Boolean + Optional CveClienteClasificacion As Integer = -1, Optional TipoCliente As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_VentasGetRepPeriodo") @@ -1432,6 +1433,7 @@ Public Class ClsVentas .Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta .Add("@VerEn", SqlDbType.Int).Value = VerEn .Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion + .Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente End With Try @@ -1449,7 +1451,7 @@ Public Class ClsVentas Vendedor As String, CveUsuario As Integer, CveEstatus As String, FechaI As Date, FechaF As Date, CveCorte As Integer, TipoDocto As String, CveSubProyectoEjecucion As Integer, CveEmpresa As Integer, FechaIEjec As Date, FechaFEjec As Date, Optional CveProyecto As Integer = -1, Optional CveSubProyecto As String = "-1", Optional TipoCambio As Integer = 1, Optional TCEspecifico As Decimal = -1, Optional CveMoneda As Integer = -1, Optional CveUsuarioConsulta As Integer = -1, - Optional CveClienteClasificacion As Integer = -1, Optional CveCondicionesPago As Integer = -1) As Boolean + Optional CveClienteClasificacion As Integer = -1, Optional CveCondicionesPago As Integer = -1, Optional TipoCliente As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_VentasGetRepDetalle") @@ -1480,6 +1482,7 @@ Public Class ClsVentas .Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta .Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion .Add("@CveCondicionesPago", SqlDbType.Int).Value = CveCondicionesPago + .Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente End With Try @@ -1499,7 +1502,7 @@ Public Class ClsVentas CveVendedor As Integer, CveUsuario As Integer, CveEstatus As Integer, IVA As String, CveEmpresa As Integer, Gpo As Integer, Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = -1, Optional CveUsuarioConsulta As Integer = -1, Optional TipoDocto As String = "-1", Optional CveClienteClasificacion As Integer = -1, Optional CveProveedorCompra As Integer = -1, - Optional CveMarca As Integer = -1, Optional MostrarLitraje As Boolean = False) As Boolean + Optional CveMarca As Integer = -1, Optional MostrarLitraje As Boolean = False, Optional TipoCliente As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_GetRepPS") @@ -1528,6 +1531,7 @@ Public Class ClsVentas .Add("@CveProveedorCompra", SqlDbType.Int).Value = CveProveedorCompra .Add("@CveMarca", SqlDbType.Int).Value = CveMarca .Add("@MostrarLitraje", SqlDbType.Bit).Value = MostrarLitraje + .Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente End With @@ -1544,8 +1548,9 @@ Public Class ClsVentas Public Function GetRepProductosServiciosDetalle(CveProyecto As Integer, CveSubProyecto As Integer, CveCategoria As Integer, CveClasificacion As Integer, CvePS As Integer, FechaI As Date, FechaF As Date, Mes As Integer, FechaIEjec As Date, FechaFEjec As Date, MesEjec As Integer, CveCliente As Integer, CveSubProyectoEjecucion As Integer, CveVendedor As Integer, CveUsuario As Integer, CveEstatus As Integer, CveEmpresa As Integer, Optional CveUsuarioConsulta As Integer = -1, - Optional TipoDocto As String = "-1", Optional GPO As Integer = -1, Optional CveMoneda As Integer = -1, Optional TipoCambio As Integer = -1, - Optional TCEspecifico As Double = 0, Optional CveClienteClasificacion As Integer = -1, Optional CveProveedorCompra As Integer = -1, Optional CveMarca As Integer = -1, Optional CveClasificacionDetalle As Integer = -1) As Boolean + Optional TipoDocto As String = "-1", Optional GPO As Integer = -1, Optional CveMoneda As Integer = -1, Optional TipoCambio As Integer = -1, + Optional TCEspecifico As Double = 0, Optional CveClienteClasificacion As Integer = -1, Optional CveProveedorCompra As Integer = -1, Optional CveMarca As Integer = -1, + Optional CveClasificacionDetalle As Integer = -1, Optional TipoCliente As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_GetRepPSDetalle") @@ -1577,6 +1582,9 @@ Public Class ClsVentas .Add("@CveProveedorCompra", SqlDbType.Int).Value = CveProveedorCompra .Add("@CveMarca", SqlDbType.Int).Value = CveMarca .Add("@CveClasificacionDetalle", SqlDbType.Int).Value = CveClasificacionDetalle + .Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente + + End With Try diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index cf54db94e..e02318b0a 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -3680,7 +3680,8 @@ Partial Class Bancos_IE 'Notificación de Pago If TxtNotificarA.Text.Trim <> "" And MsgError = "" Then - NotificacionPago(CveIE, TxtNotificarA.Text.Trim) + 'NotificacionPago(CveIE, TxtNotificarA.Text.Trim) + EnviarCorreoNotificacion(CveIE, TxtNotificarA.Text.Trim, "", UsuarioActual, False) End If Else @@ -3811,253 +3812,257 @@ Partial Class Bancos_IE End Sub #Region " NOTIFICACION PAGO " - Private Sub NotificacionPago(CveIE As Integer, CorreoNotificarA As String) - - If Not DdlTipoTransaccion.SelectedValue.ToEntero.Contiene(9, 17) Then - - Dim Param As New List(Of String) - - Param.Add(CorreoNotificarA) 'Para - Param.Add("Notificaciones de pago") 'Asunto - Param.Add(GeneraCorreo2(CveIE)) 'Body - Param.Add(CveIE.ToString) 'CveIE - Param.Add(If(ComprobanteIE <> "", String.Format("{0}IE\{1}", UsuarioActual.Empresa.Ruta, ComprobanteIE), "")) 'Archivo Adjunto - - Dim Hilo As New Threading.Thread(AddressOf MandaCorreo) - Hilo.Start(Param) - - End If - End Sub - Private Sub MandaCorreo(data As Object) - Dim Parametros As List(Of String) = DirectCast(data, List(Of String)) - - Dim Mail As New ClsSisMail() - Dim Para As String = If(Parametros(0) IsNot Nothing, Parametros(0), "") - Dim Asunto As String = If(Parametros(1) IsNot Nothing, Parametros(1), "") - Dim Body As String = If(Parametros(2) IsNot Nothing, Parametros(2), "") - Dim CveIE As Integer = If(Parametros(3) IsNot Nothing, Parametros(3).ToEntero, 0) - - Dim ListaArchivos As New List(Of ClsSisMail.ArchivoMail) - If Parametros(4) IsNot Nothing AndAlso Parametros(4) <> "" Then - ListaArchivos.Add(New ClsSisMail.ArchivoMail With {.Ruta = Parametros(4).ToString}) - 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 GeneraCorreo2(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(" ") - - - ' 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(" ") - ' Next - - - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat("
FechaFacturaImporte ($)Folio Fiscal
{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 + + 'Private Sub NotificacionPago(CveIE As Integer, CorreoNotificarA As String) + + ' If Not DdlTipoTransaccion.SelectedValue.ToEntero.Contiene(9, 17) Then + + ' Dim Param As New List(Of String) + + ' Param.Add(CorreoNotificarA) 'Para + ' Param.Add("Notificaciones de pago") 'Asunto + ' Param.Add(GeneraCorreo2(CveIE)) 'Body + ' Param.Add(CveIE.ToString) 'CveIE + ' Param.Add(If(ComprobanteIE <> "", String.Format("{0}IE\{1}", UsuarioActual.Empresa.Ruta, ComprobanteIE), "")) 'Archivo Adjunto + + ' Dim Hilo As New Threading.Thread(AddressOf MandaCorreo) + ' Hilo.Start(Param) + + ' End If + + + + 'End Sub + 'Private Sub MandaCorreo(data As Object) + ' Dim Parametros As List(Of String) = DirectCast(data, List(Of String)) + + ' Dim Mail As New ClsSisMail() + ' Dim Para As String = If(Parametros(0) IsNot Nothing, Parametros(0), "") + ' Dim Asunto As String = If(Parametros(1) IsNot Nothing, Parametros(1), "") + ' Dim Body As String = If(Parametros(2) IsNot Nothing, Parametros(2), "") + ' Dim CveIE As Integer = If(Parametros(3) IsNot Nothing, Parametros(3).ToEntero, 0) + + ' Dim ListaArchivos As New List(Of ClsSisMail.ArchivoMail) + ' If Parametros(4) IsNot Nothing AndAlso Parametros(4) <> "" Then + ' ListaArchivos.Add(New ClsSisMail.ArchivoMail With {.Ruta = Parametros(4).ToString}) + ' 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 GeneraCorreo2(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(" ") + + + ' ' 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(" ") + ' ' Next + + + ' ' strBody.AppendFormat(" ") + ' ' strBody.AppendFormat(" ") + ' ' strBody.AppendFormat(" ") + ' ' strBody.AppendFormat("
FechaFacturaImporte ($)Folio Fiscal
{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 @@ -6102,38 +6107,77 @@ Partial Class Bancos_IE End Function Private Sub BtnSendMail_Click(sender As Object, e As EventArgs) Handles BtnSendMail.Click - 'NotificacionPago(HdnCveIE.Value.ToEntero, Txt) - Dim ObjMail As New ClsSisMail() - Dim Body = GeneraCorreo(CveIE) - Dim ListaArchivos As New List(Of ClsSisMail.ArchivoMail) - Dim ObjIE As New ClsBancos() - If ObjIE.GetBancosIE(CveIE, UsuarioActual.CveEmpresa) Then - If ObjIE.DtResultados.Rows.Count > 0 Then - If ObjIE.Comprobante <> "" Then - ComprobanteIE = String.Format("{0}IE\{1}", UsuarioActual.Empresa.Ruta, ObjIE.Comprobante.ToString) + EnviarCorreoNotificacion(CveIE, TxtParaMail.Text.Trim, TxtCC.Text.Trim, UsuarioActual, True) - If IO.File.Exists(ComprobanteIE) Then - ListaArchivos.Add(New ClsSisMail.ArchivoMail With {.Ruta = ComprobanteIE.ToString}) - End If - End If - End If - End If - ObjIE.Dispose() + ''NotificacionPago(HdnCveIE.Value.ToEntero, Txt) + 'Dim ObjMail As New ClsSisMail() + 'Dim Body = GeneraCorreo(CveIE) - If ObjMail.SendMail(UsuarioActual.Empresa, TxtParaMail.Text.Trim, "Notificaciones de pago", Body, TxtCC.Text.Trim, Displayname:="Notificaciones de pago", Archivos:=ListaArchivos) Then - 'ResultadoMail = 1 - TxtCC.Text = "" - 'TxtAdicional.Text = "" - RegistraScript("$('#ModalDivMail').modal('hide');") - Alert("El correo se envió correctamente", TipoMensaje.MsgInformacion) - Else - Alert("No se pudo enviar el correo electrónico.", TipoMensaje.MsgError) - End If + 'Dim ListaArchivos As New List(Of ClsSisMail.ArchivoMail) + + 'Dim ObjIE As New ClsBancos() + 'If ObjIE.GetBancosIE(CveIE, UsuarioActual.CveEmpresa) Then + ' If ObjIE.DtResultados.Rows.Count > 0 Then + ' If ObjIE.Comprobante <> "" Then + ' ComprobanteIE = String.Format("{0}IE\{1}", UsuarioActual.Empresa.Ruta, ObjIE.Comprobante.ToString) + + ' If IO.File.Exists(ComprobanteIE) Then + ' ListaArchivos.Add(New ClsSisMail.ArchivoMail With {.Ruta = ComprobanteIE.ToString}) + ' End If + ' End If + ' End If + 'End If + 'ObjIE.Dispose() + + 'If ObjMail.SendMail(UsuarioActual.Empresa, TxtParaMail.Text.Trim, "Notificaciones de pago", Body, TxtCC.Text.Trim, Displayname:="Notificaciones de pago", Archivos:=ListaArchivos) Then + ' 'ResultadoMail = 1 + ' TxtCC.Text = "" + ' 'TxtAdicional.Text = "" + ' RegistraScript("$('#ModalDivMail').modal('hide');") + ' Alert("El correo se envió correctamente", TipoMensaje.MsgInformacion) + 'Else + ' Alert("No se pudo enviar el correo electrónico.", TipoMensaje.MsgError) + 'End If End Sub + + Private Sub EnviarCorreoNotificacion(CveIENotificar As Integer, CorreoNotificarA As String, CopiaPara As String, UsuarioActualNotificar As Usuario, MostarAlert As Boolean) + + Try + Dim Hilo As New Threading.Thread(Sub() EnviarCorreoNotifiMandaCorreocacionHilo(CveIENotificar, CorreoNotificarA, CopiaPara, UsuarioActualNotificar)) + Hilo.Start() + If MostarAlert Then + Alert("El correo se envió correctamente", TipoMensaje.MsgInformacion) + RegistraScript("$('#ModalDivMail').modal('hide');") + End If + Catch ex As Exception + If MostarAlert Then + Alert("No se pudo enviar el correo electrónico.", TipoMensaje.MsgError) + End If + End Try + + End Sub + + Private Sub EnviarCorreoNotifiMandaCorreocacionHilo(CveIENotificar As Integer, CorreoNotificarA As String, CopiaPara As String, UsuarioActualNotificar As Usuario) + + Try + Dim ObjBancos As New ClsBancos() + If ObjBancos.NotificacionPago(CveIENotificar, CorreoNotificarA, CopiaPara, UsuarioActualNotificar) Then + Alert("El correo se envió correctamente", TipoMensaje.MsgInformacion) + Else + Alert("No se pudo enviar el correo electrónico.", TipoMensaje.MsgError) + End If + ObjBancos.Dispose() + Catch ex As Exception + GuardaLog("Error al enviar notificación de pago IE --> " & ex.StackTrace.ToString) + End Try + + End Sub + + Private Sub LnkAjustarMovimiento_Click(sender As Object, e As EventArgs) Handles LnkAjustarMovimiento.Click RegistraScript("$('#ModalAjustarMovimiento').modal('show');") End Sub diff --git a/Bancos/PagoElectronico.aspx.vb b/Bancos/PagoElectronico.aspx.vb index a47729cf5..9e4dcebc6 100644 --- a/Bancos/PagoElectronico.aspx.vb +++ b/Bancos/PagoElectronico.aspx.vb @@ -179,13 +179,15 @@ Partial Class Bancos_PagoElectronico CargaCuentas() CargaProveedores() - InicializaDatosGenerales() - - + InicializaDatosGenerales() + + End If - End Sub - - + End Sub + + + + #Region " C A R G A - D A T O S " Private Sub CargaCuentas() DdlCuenta.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario).FiltraParametros("UsaLayout = 1") @@ -1554,24 +1556,23 @@ Partial Class Bancos_PagoElectronico If ObjIE.UpdateBancos_IENotificaciones(2, "-1", "-1", ArrayCveIEs(index).ToEntero) Then 'Obtenemos los correos del movimiento - If ArrayCorreos(index) <> "-1" Or ArrayCorreos(index) <> "" Then - - 'Dim CorreosMovto() = ArrayCorreos(index).Split(";"c) - 'For index2 = 0 To CorreosMovto.Length - 1 - ' If CorreosMovto(index2).Length > 5 Then - ' End If - 'Next - + If ArrayCorreos(index) <> "-1" Or ArrayCorreos(index) <> "" Then + + + Dim Param As New List(Of String) + Param.Add(ArrayCveIEs(index).ToString) Param.Add(ArrayCorreos(index)) 'Para - Param.Add("Notificación de Pago") 'Asunto - - Param.Add(GeneraCorreo2(DtPago.Rows(index), ObjIE, ArrayCveIEs(index).ToEntero)) 'Body - - Dim Hilo As New Threading.Thread(AddressOf MandaCorreo) - ArregloHilos.Add(Hilo) + 'Param.Add("Notificación de Pago") 'Asunto + 'Param.Add(GeneraCorreo2(DtPago.Rows(index), ObjIE, ArrayCveIEs(index).ToEntero)) 'Body + + ' EnviarCorreoNotificacion() + 'Dim Hilo As New Threading.Thread(AddressOf MandaCorreo) + 'ArregloHilos.Add(Hilo) + ArregloParametros.Add(Param) + End If Else ErrorDB = True @@ -1597,11 +1598,26 @@ Partial Class Bancos_PagoElectronico ObjIE.Commit() 'ObjIE.RollBack() - 'EMPIEZA A ENVIAR CORREO POR HILOS - For index = 0 To ArregloHilos.Count - 1 - ArregloHilos(index).Start(ArregloParametros(index)) - Next + ''EMPIEZA A ENVIAR CORREO POR HILOS + 'For index = 0 To ArregloHilos.Count - 1 + ' ArregloHilos(index).Start(ArregloParametros(index)) + 'Next + For Each ObjParametros As Object In ArregloParametros + + Dim Parametros As List(Of String) = DirectCast(ObjParametros, List(Of String)) + + Dim CveIENotificar As Integer = Parametros(0).ToEntero + Dim NotificarA As String = Parametros(1) + + EnviarCorreoNotificacion(CveIENotificar, NotificarA, "", UsuarioActual, False) + + Next + + + + + Respuesta.Append("

NOTA: El archivo se analizo correctamente y se efectuaron todos los cambios en el sistema.") Alert(Respuesta.ToString, TipoMensaje.MsgInformacion) @@ -1855,12 +1871,11 @@ Partial Class Bancos_PagoElectronico ''''' ARMADO DEL TEXTO COMPLETO TextoCompleto = String.Format("{1}{0}{2}{0}{3}{0}", vbCrLf, HeaderTexto, DetalleTexto, TrailerTexto) 'TxtAltas.Text = TextoCompleto - End Sub + End Sub #End Region - - - - 'TABS + + + 'TABS #Region "R E P O R T E S" Protected Sub BtnConsultarReportes_Click(sender As Object, e As EventArgs) CargaReporte() @@ -1959,717 +1974,762 @@ Partial Class Bancos_PagoElectronico - End Sub + End Sub #End Region - - - - 'CORREO + + + + 'CORREO #Region " GENERA Y MANDA CORREO " - Private Sub MandaCorreo(data As Object) - Dim Parametros As List(Of String) = DirectCast(data, List(Of String)) - - Dim Mail As New ClsSisMail() - Dim Para As String = Parametros(0) - Dim Asunto As String = Parametros(1) - Dim Body As String = Parametros(2) - - 'NO SE OCUPAN - 'Dim CveIE As Integer = Parametros(3).ToEntero - 'Dim CveTipoTransaccion As Integer = Parametros(4).ToEntero - 'Dim Estatus As Integer = If(CveTipoTransaccion = 2, 2, 1) ' cuando es transferencia, no lo pasa por entregar - - 'Mail.MandaCorreo(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body) - Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body) - End Sub - - Private Function GeneraCorreo(CveIE As Integer, objIE As ClsBancos) As String - Dim strBody As New StringBuilder - - 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("
Usted puede pasar a recorger el cheque en las oficinas administrativas.
Se notifica el envío de transferencia de pago.
 
") - 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(" ") - strBody.AppendFormat(" ") - strBody.AppendFormat(" ") - strBody.AppendFormat(" ") - strBody.AppendFormat(" ", objIE.Banco) - strBody.AppendFormat(" ") - 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:Transferencia Bancaria
Banco:{0}
Fecha:{0}
Importe:$ {0} {1}
Observaciones:{0}
") - strBody.AppendFormat("
") - strBody.AppendFormat("
") - strBody.AppendFormat("
") - strBody.AppendFormat("
") - strBody.AppendFormat("
") - - - - strBody.Append("
Favor de no responder a este correo.
") - - strBody.Append("") - End If - - Return strBody.ToString - End Function + + Private Sub EnviarCorreoNotificacion(CveIENotificar As Integer, CorreoNotificarA As String, CopiaPara As String, UsuarioActualNotificar As Usuario, MostarAlert As Boolean) + + Try + Dim Hilo As New Threading.Thread(Sub() EnviarCorreoNotifiMandaCorreocacionHilo(CveIENotificar, CorreoNotificarA, CopiaPara, UsuarioActualNotificar)) + Hilo.Start() + + If MostarAlert Then + Alert("El correo se envió correctamente", TipoMensaje.MsgInformacion) + End If + + Catch ex As Exception + + If MostarAlert Then + Alert("No se pudo enviar el correo electrónico.", TipoMensaje.MsgError) + End If + + End Try + + End Sub + + Private Sub EnviarCorreoNotifiMandaCorreocacionHilo(CveIENotificar As Integer, CorreoNotificarA As String, CopiaPara As String, UsuarioActualNotificar As Usuario) + + Try + Dim ObjBancos As New ClsBancos() + + + If ObjBancos.NotificacionPago(CveIENotificar, CorreoNotificarA, CopiaPara, UsuarioActualNotificar) Then + Alert("El correo se envió correctamente", TipoMensaje.MsgInformacion) + Else + Alert("No se pudo enviar el correo electrónico.", TipoMensaje.MsgError) + End If + + ObjBancos.Dispose() + + Catch ex As Exception + GuardaLog("Error al enviar notificación de pago PagoElectronico --> " & ex.StackTrace.ToString) + End Try + + + + End Sub + + + 'Private Sub MandaCorreo(data As Object) + ' Dim Parametros As List(Of String) = DirectCast(data, List(Of String)) + + ' Dim Mail As New ClsSisMail() + ' Dim Para As String = Parametros(0) + ' Dim Asunto As String = Parametros(1) + ' Dim Body As String = Parametros(2) + + ' 'NO SE OCUPAN + ' 'Dim CveIE As Integer = Parametros(3).ToEntero + ' 'Dim CveTipoTransaccion As Integer = Parametros(4).ToEntero + ' 'Dim Estatus As Integer = If(CveTipoTransaccion = 2, 2, 1) ' cuando es transferencia, no lo pasa por entregar + + ' 'Mail.MandaCorreo(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body) + ' Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body) + 'End Sub + + 'Private Function GeneraCorreo(CveIE As Integer, objIE As ClsBancos) As String + ' Dim strBody As New StringBuilder + + ' 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("
Usted puede pasar a recorger el cheque en las oficinas administrativas.
Se notifica el envío de transferencia de pago.
 
") + ' 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(" ") + ' strBody.AppendFormat(" ") + ' strBody.AppendFormat(" ") + ' strBody.AppendFormat(" ") + ' strBody.AppendFormat(" ", objIE.Banco) + ' strBody.AppendFormat(" ") + ' 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:Transferencia Bancaria
Banco:{0}
Fecha:{0}
Importe:$ {0} {1}
Observaciones:{0}
") + ' strBody.AppendFormat("
") + ' strBody.AppendFormat("
") + ' strBody.AppendFormat("
") + ' strBody.AppendFormat("
") + ' strBody.AppendFormat("
") + + + + ' strBody.Append("
Favor de no responder a este correo.
") + + ' strBody.Append("") + ' End If + + ' Return strBody.ToString + 'End Function + #End Region #Region " GENERA CORREO 2" - Private Function GeneraCorreo2(Dr As DataRow, ByRef ObjIE As ClsBancos, CveIE As Integer) As String - Dim strBody As New StringBuilder - - - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append("
") - strBody.Append("

") - - - 'strBody.Append(" De: Bancomer.com [mailto:alertatdu@serviciobancomer.com]
") - - strBody.Append("

") - strBody.AppendFormat(" ", UrlSitio) - strBody.Append("
") - - - strBody.AppendFormat(" Enviado el: {0} {1}
", Date.Now.ToLongDateString, Date.Now.ToShortTimeString) - strBody.AppendFormat(" Para:{0}
", If(UsuarioActual.CveEmpresa = 66, "PAGOS@GLUYASCONSTRUCCIONES.COM", "")) - strBody.Append(" Asunto: CONFIRMACION SIT DISPERSION ") - strBody.Append("

") - strBody.Append("

") - strBody.Append("   ") - strBody.Append("

") - strBody.Append("
") - strBody.Append("

") - strBody.AppendFormat(" ", UrlSitio) - strBody.Append("

") - strBody.Append("
") - strBody.Append("

") - strBody.Append("   ") - strBody.Append("

") - strBody.Append("

") - strBody.Append(" Confirmación de pago realizado bajo las siguientes condiciones: ") - strBody.Append("

") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append("
") - strBody.Append(" ") - strBody.Append("
") - strBody.Append("

") - strBody.Append(" NOMBRE DEL CLIENTE: ") - strBody.Append("

") - strBody.Append("
") - strBody.Append("

") - strBody.AppendFormat(" {0} ", UsuarioActual.Empresa.Empresa) - strBody.Append("

") - strBody.Append("
") - strBody.Append("

") - strBody.Append(" NÚMERO DE CONVENIO: ") - strBody.Append("

") - strBody.Append("
") - strBody.Append("

") - strBody.AppendFormat(" {0} ", Dr("NumeroConvenio").ToString) - strBody.Append("

") - strBody.Append("
") - strBody.Append("

") - strBody.Append(" CLAVE DEL PROVEEDOR: ") - strBody.Append("

") - strBody.Append("
") - strBody.Append("

") - strBody.AppendFormat(" {0} ", Dr("ClaveProveedor").ToString) - strBody.Append("

") - strBody.Append("
") - strBody.Append("

") - strBody.Append(" NOMBRE DEL PROVEEDOR/TERCERO: ") - strBody.Append("

") - strBody.Append("
") - strBody.Append("

") - strBody.AppendFormat(" {0} ", Dr("Proveedor").ToString) - strBody.Append("

") - strBody.Append("
") - strBody.Append("

") - strBody.Append(" REFERENCIA DEL PAGO: ") - strBody.Append("

") - strBody.Append("
") - strBody.Append("

") - strBody.AppendFormat(" {0} ", Dr("ReferenciaPago").ToString) - strBody.Append("

") - strBody.Append("
") - strBody.Append("

") - strBody.Append(" TIPO DE PAGO: ") - strBody.Append("

") - strBody.Append("
") - strBody.Append("

") - strBody.AppendFormat(" {0} ", Dr("TipoPago").ToString) - strBody.Append("

") - strBody.Append("
") - strBody.Append("

") - strBody.Append(" CUENTA DE ABONO: ") - strBody.Append("

") - strBody.Append("
") - strBody.Append("

") - strBody.AppendFormat(" {0} ", Dr("Cuenta").ToString) - strBody.Append("

") - strBody.Append("
") - strBody.Append("

") - strBody.Append(" IMPORTE DEL PAGO: ") - strBody.Append("

") - strBody.Append("
") - strBody.Append("

") - strBody.AppendFormat(" ${0}  ", Dr("Importe").ToString.FormatoNumero) - strBody.Append("

") - strBody.Append("
") - strBody.Append("

") - strBody.Append(" FECHA DE OPERACIÓN ") - strBody.Append("

") - strBody.Append("
") - strBody.Append("

") - strBody.AppendFormat(" {0} ", Dr("FechaOperacion").ToString) - strBody.Append("

") - strBody.Append("
") - strBody.Append("

") - strBody.Append(" MENSAJE ADICIONAL: ") - strBody.Append("

") - strBody.Append("
") - strBody.Append("

") - strBody.AppendFormat(" {0} ", Dr("Observaciones").ToString.PadRight(70, " "c).Replace(" ", " ")) - strBody.Append("

") - strBody.Append("
") - - - - strBody.Append("
") - strBody.AppendFormat(" ", UrlSitio) - strBody.Append("
") - - - - strBody.Append("

") - strBody.Append("   ") - strBody.Append("

") - strBody.Append("

") - strBody.Append("   ") - strBody.Append("

") - strBody.Append("

") - strBody.Append("   ") - strBody.Append("

") - strBody.Append("

") - strBody.Append("   ") - strBody.Append("

") - strBody.Append("

") - strBody.Append("   ") - strBody.Append("

") - - - If ObjIE.GetBancosIE(CveIE, UsuarioActual.CveEmpresa) Then - If ObjIE.DtResultados.Rows.Count > 0 Then - Dim dtMovs As DataTable - - Dim Mov As New ClsContabilidad - If Mov.GetPrePolizasDetalle(-1, CveIE) Then - dtMovs = Mov.DtResultados.FiltraParametros("CveConceptoContable IN (17)") - - strBody.Append(" ") - strBody.Append(" ") - - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - - For Each Dr2 As DataRow In dtMovs.Rows - strBody.Append(" ") - strBody.Append($" ") - strBody.Append($" ") - strBody.Append($" ") - strBody.Append($" ") - strBody.Append($" ") - strBody.Append($" ") - strBody.Append(" ") - Next - - strBody.Append(" ") - strBody.Append("
Listado de facturas pagadas
Factura ") - strBody.Append(" Fecha ") - strBody.Append(" Original ") - strBody.Append(" Abonado ") - strBody.Append(" Nota Crédito ") - strBody.Append(" Saldo ") - strBody.Append("
{Dr2("SerieFolio")}{Dr2("FechaCompra").ToString.ToDate.ToShortDateString}{Dr2("Total").ToString.ToDouble.FormatoNumero}{Dr2("Importe").ToString.ToDouble.FormatoNumero}{Dr2("ImporteNC").ToString.ToDouble.FormatoNumero}{Dr2("Saldo").ToString.ToDouble.FormatoNumero}
") - - strBody.Append("
") - strBody.Append(" ") - strBody.Append(" ") - - End If - Mov.Dispose() - - End If - End If - - Return strBody.ToString - End Function + 'Private Function GeneraCorreo2(Dr As DataRow, ByRef ObjIE As ClsBancos, CveIE As Integer) As String + ' Dim strBody As New StringBuilder + + + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append("
") + ' strBody.Append("

") + + + ' 'strBody.Append(" De: Bancomer.com [mailto:alertatdu@serviciobancomer.com]
") + + ' strBody.Append("

") + ' strBody.AppendFormat(" ", UrlSitio) + ' strBody.Append("
") + + + ' strBody.AppendFormat(" Enviado el: {0} {1}
", Date.Now.ToLongDateString, Date.Now.ToShortTimeString) + ' strBody.AppendFormat(" Para:{0}
", If(UsuarioActual.CveEmpresa = 66, "PAGOS@GLUYASCONSTRUCCIONES.COM", "")) + ' strBody.Append(" Asunto: CONFIRMACION SIT DISPERSION ") + ' strBody.Append("

") + ' strBody.Append("

") + ' strBody.Append("   ") + ' strBody.Append("

") + ' strBody.Append("
") + ' strBody.Append("

") + ' strBody.AppendFormat(" ", UrlSitio) + ' strBody.Append("

") + ' strBody.Append("
") + ' strBody.Append("

") + ' strBody.Append("   ") + ' strBody.Append("

") + ' strBody.Append("

") + ' strBody.Append(" Confirmación de pago realizado bajo las siguientes condiciones: ") + ' strBody.Append("

") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append("
") + ' strBody.Append(" ") + ' strBody.Append("
") + ' strBody.Append("

") + ' strBody.Append(" NOMBRE DEL CLIENTE: ") + ' strBody.Append("

") + ' strBody.Append("
") + ' strBody.Append("

") + ' strBody.AppendFormat(" {0} ", UsuarioActual.Empresa.Empresa) + ' strBody.Append("

") + ' strBody.Append("
") + ' strBody.Append("

") + ' strBody.Append(" NÚMERO DE CONVENIO: ") + ' strBody.Append("

") + ' strBody.Append("
") + ' strBody.Append("

") + ' strBody.AppendFormat(" {0} ", Dr("NumeroConvenio").ToString) + ' strBody.Append("

") + ' strBody.Append("
") + ' strBody.Append("

") + ' strBody.Append(" CLAVE DEL PROVEEDOR: ") + ' strBody.Append("

") + ' strBody.Append("
") + ' strBody.Append("

") + ' strBody.AppendFormat(" {0} ", Dr("ClaveProveedor").ToString) + ' strBody.Append("

") + ' strBody.Append("
") + ' strBody.Append("

") + ' strBody.Append(" NOMBRE DEL PROVEEDOR/TERCERO: ") + ' strBody.Append("

") + ' strBody.Append("
") + ' strBody.Append("

") + ' strBody.AppendFormat(" {0} ", Dr("Proveedor").ToString) + ' strBody.Append("

") + ' strBody.Append("
") + ' strBody.Append("

") + ' strBody.Append(" REFERENCIA DEL PAGO: ") + ' strBody.Append("

") + ' strBody.Append("
") + ' strBody.Append("

") + ' strBody.AppendFormat(" {0} ", Dr("ReferenciaPago").ToString) + ' strBody.Append("

") + ' strBody.Append("
") + ' strBody.Append("

") + ' strBody.Append(" TIPO DE PAGO: ") + ' strBody.Append("

") + ' strBody.Append("
") + ' strBody.Append("

") + ' strBody.AppendFormat(" {0} ", Dr("TipoPago").ToString) + ' strBody.Append("

") + ' strBody.Append("
") + ' strBody.Append("

") + ' strBody.Append(" CUENTA DE ABONO: ") + ' strBody.Append("

") + ' strBody.Append("
") + ' strBody.Append("

") + ' strBody.AppendFormat(" {0} ", Dr("Cuenta").ToString) + ' strBody.Append("

") + ' strBody.Append("
") + ' strBody.Append("

") + ' strBody.Append(" IMPORTE DEL PAGO: ") + ' strBody.Append("

") + ' strBody.Append("
") + ' strBody.Append("

") + ' strBody.AppendFormat(" ${0}  ", Dr("Importe").ToString.FormatoNumero) + ' strBody.Append("

") + ' strBody.Append("
") + ' strBody.Append("

") + ' strBody.Append(" FECHA DE OPERACIÓN ") + ' strBody.Append("

") + ' strBody.Append("
") + ' strBody.Append("

") + ' strBody.AppendFormat(" {0} ", Dr("FechaOperacion").ToString) + ' strBody.Append("

") + ' strBody.Append("
") + ' strBody.Append("

") + ' strBody.Append(" MENSAJE ADICIONAL: ") + ' strBody.Append("

") + ' strBody.Append("
") + ' strBody.Append("

") + ' strBody.AppendFormat(" {0} ", Dr("Observaciones").ToString.PadRight(70, " "c).Replace(" ", " ")) + ' strBody.Append("

") + ' strBody.Append("
") - 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.Append("
") + ' strBody.AppendFormat(" ", UrlSitio) + ' 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("
") + + ' strBody.Append("

") + ' strBody.Append("   ") + ' strBody.Append("

") + ' strBody.Append("

") + ' strBody.Append("   ") + ' strBody.Append("

") + ' strBody.Append("

") + ' strBody.Append("   ") + ' strBody.Append("

") + ' strBody.Append("

") + ' strBody.Append("   ") + ' strBody.Append("

") + ' strBody.Append("

") + ' strBody.Append("   ") + ' strBody.Append("

") - '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 + ' If ObjIE.GetBancosIE(CveIE, UsuarioActual.CveEmpresa) Then + ' If ObjIE.DtResultados.Rows.Count > 0 Then + ' Dim dtMovs As DataTable - strBody.AppendFormat("
") - strBody.AppendFormat(" ") - strBody.AppendFormat(" ") - 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 + + '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(" Documentos abonados o pagados
{0}
", Textov33) - strBody.AppendFormat(" ") - strBody.AppendFormat(" ") - strBody.AppendFormat(" ") - strBody.AppendFormat(" ") - strBody.AppendFormat(" ") - strBody.AppendFormat(" ") - strBody.AppendFormat(" ") - strBody.AppendFormat(" ") + ' Dim Mov As New ClsContabilidad + ' If Mov.GetPrePolizasDetalle(-1, CveIE) Then + ' dtMovs = Mov.DtResultados.FiltraParametros("CveConceptoContable IN (17)") + + ' strBody.Append("
FechaFacturaImporte ($)Folio FiscalNC Aplicadas
") + ' strBody.Append(" ") + + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + + ' For Each Dr2 As DataRow In dtMovs.Rows + ' strBody.Append(" ") + ' strBody.Append($" ") + ' strBody.Append($" ") + ' strBody.Append($" ") + ' strBody.Append($" ") + ' strBody.Append($" ") + ' strBody.Append($" ") + ' strBody.Append(" ") + ' Next + + ' strBody.Append(" ") + ' strBody.Append("
Listado de facturas pagadas
Factura ") + ' strBody.Append(" Fecha ") + ' strBody.Append(" Original ") + ' strBody.Append(" Abonado ") + ' strBody.Append(" Nota Crédito ") + ' strBody.Append(" Saldo ") + ' strBody.Append("
{Dr2("SerieFolio")}{Dr2("FechaCompra").ToString.ToDate.ToShortDateString}{Dr2("Total").ToString.ToDouble.FormatoNumero}{Dr2("Importe").ToString.ToDouble.FormatoNumero}{Dr2("ImporteNC").ToString.ToDouble.FormatoNumero}{Dr2("Saldo").ToString.ToDouble.FormatoNumero}
") + + ' strBody.Append(" ") + ' strBody.Append(" ") + ' strBody.Append(" ") + + ' End If + ' Mov.Dispose() + + ' End If + ' End If + + ' Return strBody.ToString + 'End Function - For Each dr As DataRow In objIE.DtResultados.FiltraParametros("CveConceptoContable IN (17) AND CveCompra > 0").Rows - strBody.AppendFormat("
{0}{0}$ {0}{0}{0}
") + ' 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(" ") - strBody.AppendFormat(" ") - strBody.AppendFormat(" ") - strBody.AppendFormat("
") - End If + ' 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("
") - strBody.Append("
Favor de no responder a este correo.
") - strBody.Append("") - End If + ' '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 - objIE.Dispose() - Return strBody.ToString - End Function + ' 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 diff --git a/Bancos/PagoElectronicoGrupos.aspx.vb b/Bancos/PagoElectronicoGrupos.aspx.vb index b784fb90d..8ff8ceec9 100644 --- a/Bancos/PagoElectronicoGrupos.aspx.vb +++ b/Bancos/PagoElectronicoGrupos.aspx.vb @@ -2139,485 +2139,159 @@ Partial Class Bancos_PagoElectronicoGrupos 'End Sub - Private Function GeneraCorreo(CveIE As Integer, objIE As ClsBancos) As String - Dim strBody As New StringBuilder - - 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(" ") + 'Private Function GeneraCorreo(CveIE As Integer, objIE As ClsBancos) As String + ' Dim strBody As New StringBuilder - 'If objIE.CveTipoTransaccion = 1 Then ' cuando es cheque - ' strBody.Append(" ") - ' strBody.Append(" ") - ' strBody.Append(" ") - 'End If + ' 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("
Usted puede pasar a recorger el cheque en las oficinas administrativas.
") + ' 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("


") - ' If objIE.CveTipoTransaccion = 2 Then ' cuando es transf - strBody.Append(" ") - strBody.Append(" Se notifica el envío de transferencia de pago. ") - strBody.Append(" ") - ' End If + ' strBody.AppendFormat("
") + ' strBody.AppendFormat("
") + ' strBody.AppendFormat(" ") + ' strBody.AppendFormat(" ") - strBody.Append(" ") - strBody.AppendFormat(" ") - strBody.Append(" ") - strBody.Append("
 
") - 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(" ") - strBody.AppendFormat(" ") - strBody.AppendFormat(" ") - strBody.AppendFormat(" ") - strBody.AppendFormat(" ", objIE.Banco) - strBody.AppendFormat(" ") - 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:Transferencia Bancaria
Banco:{0}
Fecha:{0}
Importe:$ {0} {1}
Observaciones:{0}
") - strBody.AppendFormat("
") - strBody.AppendFormat("
") - strBody.AppendFormat("
") - strBody.AppendFormat("
") - strBody.AppendFormat("
") - - - - strBody.Append("
Favor de no responder a este correo.
") - - strBody.Append("") - End If - - Return strBody.ToString - End Function + ' 'If objIE.CveTipoTransaccion = 1 Then ' cuando es cheque + ' ' strBody.Append(" ") + ' ' strBody.Append(" Usted puede pasar a recorger el cheque en las oficinas administrativas. ") + ' ' strBody.Append(" ") + ' 'End If + + ' ' If objIE.CveTipoTransaccion = 2 Then ' cuando es transf + ' strBody.Append(" ") + ' strBody.Append(" Se notifica el envío de transferencia de pago. ") + ' strBody.Append(" ") + ' ' End If + + ' strBody.Append(" ") + ' strBody.AppendFormat("   ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' 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(" ") + ' strBody.AppendFormat(" ") + ' strBody.AppendFormat(" ") + ' strBody.AppendFormat(" ") + ' strBody.AppendFormat(" ", objIE.Banco) + ' strBody.AppendFormat(" ") + ' 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:Transferencia Bancaria
Banco:{0}
Fecha:{0}
Importe:$ {0} {1}
Observaciones:{0}
") + ' strBody.AppendFormat("
") + ' strBody.AppendFormat("
") + ' strBody.AppendFormat("
") + ' strBody.AppendFormat("
") + ' strBody.AppendFormat("
") + + + + ' strBody.Append("
Favor de no responder a este correo.
") + + ' strBody.Append("") + ' End If + + ' Return strBody.ToString + 'End Function #End Region -#Region " GENERA CORREO 2" - Private Function GeneraCorreo2(Dr As DataRow, ByRef ObjIE As ClsBancos, CveIE As Integer) As String - Dim strBody As New StringBuilder - - - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append("
") - strBody.Append("

") - - - 'strBody.Append(" De: Bancomer.com [mailto:alertatdu@serviciobancomer.com]
") - - strBody.Append("

") - strBody.AppendFormat(" ", UrlSitio) - strBody.Append("
") - - - strBody.AppendFormat(" Enviado el: {0} {1}
", Date.Now.ToLongDateString, Date.Now.ToShortTimeString) - strBody.AppendFormat(" Para:{0}
", If(UsuarioActual.CveEmpresa = 66, "PAGOS@GLUYASCONSTRUCCIONES.COM", "")) - strBody.Append(" Asunto: CONFIRMACION SIT DISPERSION ") - strBody.Append("

") - strBody.Append("

") - strBody.Append("   ") - strBody.Append("

") - strBody.Append("
") - strBody.Append("

") - strBody.AppendFormat(" ", UrlSitio) - strBody.Append("

") - strBody.Append("
") - strBody.Append("

") - strBody.Append("   ") - strBody.Append("

") - strBody.Append("

") - strBody.Append(" Confirmación de pago realizado bajo las siguientes condiciones: ") - strBody.Append("

") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append("
") - strBody.Append(" ") - strBody.Append("
") - strBody.Append("

") - strBody.Append(" NOMBRE DEL CLIENTE: ") - strBody.Append("

") - strBody.Append("
") - strBody.Append("

") - strBody.AppendFormat(" {0} ", UsuarioActual.Empresa.Empresa) - strBody.Append("

") - strBody.Append("
") - strBody.Append("

") - strBody.Append(" NÚMERO DE CONVENIO: ") - strBody.Append("

") - strBody.Append("
") - strBody.Append("

") - strBody.AppendFormat(" {0} ", Dr("NumeroConvenio").ToString) - strBody.Append("

") - strBody.Append("
") - strBody.Append("

") - strBody.Append(" CLAVE DEL PROVEEDOR: ") - strBody.Append("

") - strBody.Append("
") - strBody.Append("

") - strBody.AppendFormat(" {0} ", Dr("ClaveProveedor").ToString) - strBody.Append("

") - strBody.Append("
") - strBody.Append("

") - strBody.Append(" NOMBRE DEL PROVEEDOR/TERCERO: ") - strBody.Append("

") - strBody.Append("
") - strBody.Append("

") - strBody.AppendFormat(" {0} ", Dr("Proveedor").ToString) - strBody.Append("

") - strBody.Append("
") - strBody.Append("

") - strBody.Append(" REFERENCIA DEL PAGO: ") - strBody.Append("

") - strBody.Append("
") - strBody.Append("

") - strBody.AppendFormat(" {0} ", Dr("ReferenciaPago").ToString) - strBody.Append("

") - strBody.Append("
") - strBody.Append("

") - strBody.Append(" TIPO DE PAGO: ") - strBody.Append("

") - strBody.Append("
") - strBody.Append("

") - strBody.AppendFormat(" {0} ", Dr("TipoPago").ToString) - strBody.Append("

") - strBody.Append("
") - strBody.Append("

") - strBody.Append(" CUENTA DE ABONO: ") - strBody.Append("

") - strBody.Append("
") - strBody.Append("

") - strBody.AppendFormat(" {0} ", Dr("Cuenta").ToString) - strBody.Append("

") - strBody.Append("
") - strBody.Append("

") - strBody.Append(" IMPORTE DEL PAGO: ") - strBody.Append("

") - strBody.Append("
") - strBody.Append("

") - strBody.AppendFormat(" ${0}  ", Dr("Importe").ToString.FormatoNumero) - strBody.Append("

") - strBody.Append("
") - strBody.Append("

") - strBody.Append(" FECHA DE OPERACIÓN ") - strBody.Append("

") - strBody.Append("
") - strBody.Append("

") - strBody.AppendFormat(" {0} ", Dr("FechaOperacion").ToString) - strBody.Append("

") - strBody.Append("
") - strBody.Append("

") - strBody.Append(" MENSAJE ADICIONAL: ") - strBody.Append("

") - strBody.Append("
") - strBody.Append("

") - strBody.AppendFormat(" {0} ", Dr("Observaciones").ToString.PadRight(70, " "c).Replace(" ", " ")) - strBody.Append("

") - strBody.Append("
") - - - - strBody.Append("
") - strBody.AppendFormat(" ", UrlSitio) - strBody.Append("
") - - - - strBody.Append("

") - strBody.Append("   ") - strBody.Append("

") - strBody.Append("

") - strBody.Append("   ") - strBody.Append("

") - strBody.Append("

") - strBody.Append("   ") - strBody.Append("

") - strBody.Append("

") - strBody.Append("   ") - strBody.Append("

") - strBody.Append("

") - strBody.Append("   ") - strBody.Append("

") - - - If ObjIE.GetBancosIE(CveIE, UsuarioActual.CveEmpresa) Then - If ObjIE.DtResultados.Rows.Count > 0 Then - Dim dtMovs As DataTable - - Dim Mov As New ClsContabilidad - If Mov.GetPrePolizasDetalle(-1, CveIE) Then - dtMovs = Mov.DtResultados.FiltraParametros("CveConceptoContable IN (17)") - - strBody.Append(" ") - strBody.Append(" ") - - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - - For Each Dr2 As DataRow In dtMovs.Rows - strBody.Append(" ") - strBody.Append($" ") - strBody.Append($" ") - strBody.Append($" ") - strBody.Append($" ") - strBody.Append($" ") - strBody.Append($" ") - strBody.Append(" ") - Next - - strBody.Append(" ") - strBody.Append("
Listado de facturas pagadas
Factura ") - strBody.Append(" Fecha ") - strBody.Append(" Original ") - strBody.Append(" Abonado ") - strBody.Append(" Nota Crédito ") - strBody.Append(" Saldo ") - strBody.Append("
{Dr2("SerieFolio")}{Dr2("FechaCompra").ToString.ToDate.ToShortDateString}{Dr2("Total").ToString.ToDouble.FormatoNumero}{Dr2("Importe").ToString.ToDouble.FormatoNumero}{Dr2("ImporteNC").ToString.ToDouble.FormatoNumero}{Dr2("Saldo").ToString.ToDouble.FormatoNumero}
") - - strBody.Append("
") - strBody.Append(" ") - strBody.Append(" ") - - End If - Mov.Dispose() - - End If - End If - - Return strBody.ToString - End Function - - -#End Region @@ -3019,8 +2693,8 @@ Partial Class Bancos_PagoElectronicoGrupos FDestino = "" End If - NotificacionPago(CveIE, NotificarA, FDestino) - + 'NotificacionPago(CveIE, NotificarA, FDestino) + EnviarCorreoNotificacion(CveIE, NotificarA, "", UsuarioActual, False) CargaEnviados() For Each RowGV As GridViewRow In GvEnviadas.Rows @@ -3330,273 +3004,320 @@ Partial Class Bancos_PagoElectronicoGrupos End Sub - Private Sub NotificacionPago(CveIE As Integer, CorreoNotificarA As String, RutaComprobante As String) - - Dim Body As String = GeneraCorreo(CveIE) - 'Dim Comprobante As String = "" - - Dim File As Byte() = Nothing - - Dim Hilo As New Threading.Thread(Sub() MandaCorreo(CorreoNotificarA, "Notificaciones de pago", Body, CveIE, RutaComprobante, File)) - Hilo.Start() + 'Private Sub NotificacionPago(CveIE As Integer, CorreoNotificarA As String, RutaComprobante As String) + + ' If CorreoNotificarA.Length > 0 Then + ' Dim Body As String = GeneraCorreo(CveIE) + ' 'Dim Comprobante As String = "" + + ' Dim File As Byte() = Nothing + + ' Dim Hilo As New Threading.Thread(Sub() MandaCorreo(CorreoNotificarA, "Notificaciones de pago", Body, CveIE, RutaComprobante, File)) + ' Hilo.Start() + ' End If + + + + + 'End Sub + + + Private Sub EnviarCorreoNotificacion(CveIENotificar As Integer, CorreoNotificarA As String, CopiaPara As String, UsuarioActualNotificar As Usuario, MostarAlert As Boolean) + + Try + Dim Hilo As New Threading.Thread(Sub() EnviarCorreoNotifiMandaCorreocacionHilo(CveIENotificar, CorreoNotificarA, CopiaPara, UsuarioActualNotificar)) + Hilo.Start() + + + If MostarAlert Then + Alert("El correo se envió correctamente", TipoMensaje.MsgInformacion) + End If + + Catch ex As Exception + + If MostarAlert Then + Alert("No se pudo enviar el correo electrónico.", TipoMensaje.MsgError) + End If + + + End Try End Sub - Private Sub MandaCorreo(Para As String, Asunto As String, Body As String, CveIE As Integer, Comprobante As String, File As Byte()) + Private Sub EnviarCorreoNotifiMandaCorreocacionHilo(CveIENotificar As Integer, CorreoNotificarA As String, CopiaPara As String, UsuarioActualNotificar As Usuario) + 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 ObjBancos As New ClsBancos() - Dim ListaArchivos As New List(Of ClsSisMail.ArchivoMail) - If Comprobante IsNot Nothing AndAlso Comprobante <> "" Then - ListaArchivos.Add(New ClsSisMail.ArchivoMail With {.Ruta = Comprobante}) + If ObjBancos.NotificacionPago(CveIENotificar, CorreoNotificarA, CopiaPara, UsuarioActualNotificar) Then + Alert("El correo se envió correctamente", TipoMensaje.MsgInformacion) + Else + Alert("No se pudo enviar el correo electrónico.", TipoMensaje.MsgError) End If - If File IsNot Nothing Then - ListaArchivos.Add(New ClsSisMail.ArchivoMail With {.ArchivoBinario = File, .NombreArchivo = "EstadoCuentaCxP.pdf"}) - End If + ObjBancos.Dispose() - 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 - - 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}") Then - Dim objIE As New ClsBancos - objIE.UpdateBancos_IENotificaciones(1, "-1", "-1", CveIE) - objIE.Dispose() - End If Catch ex As Exception - OnError("Ocurrio un error al enviar el correo", ex) + GuardaLog("Error al enviar notificación de pago PagoElectronicoGrupos --> " & ex.StackTrace.ToString) End Try End Sub + 'Private Sub MandaCorreo(Para As String, Asunto As String, Body As String, CveIE As Integer, Comprobante As String, File As Byte()) + ' 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 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 + + ' 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 + + ' 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}") Then + ' Dim objIE As New ClsBancos + ' objIE.UpdateBancos_IENotificaciones(1, "-1", "-1", CveIE) + ' objIE.Dispose() + ' End If + ' Catch ex As Exception + ' OnError("Ocurrio un error al enviar el correo", ex) + ' End Try + + 'End Sub - Private Function GeneraCorreo(CveIE As Integer) As String - Dim strBody As New StringBuilder - Dim objIE As New ClsBancos + 'Private Function GeneraCorreo(CveIE As Integer) As String - 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("


") + ' Dim strBody As New StringBuilder + ' Dim objIE As New ClsBancos - strBody.AppendFormat("
") - strBody.AppendFormat("
") - strBody.AppendFormat(" ") - strBody.AppendFormat(" ") + ' 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("


") - 'If objIE.CveTipoTransaccion = 1 Then ' cuando es cheque - ' strBody.Append(" ") - ' strBody.Append(" Favor de pasar a nuestras oficinas por el cheque con la siguientes instrucciones. ") - ' strBody.Append(" ") - 'End If + ' strBody.AppendFormat("
") + ' strBody.AppendFormat("
") + ' strBody.AppendFormat(" ") + ' strBody.AppendFormat(" ") - 'If objIE.CveTipoTransaccion = 2 Then ' cuando es transf - strBody.Append(" ") - strBody.Append(" ") - strBody.Append(" ") - 'End If + ' 'If objIE.CveTipoTransaccion = 1 Then ' cuando es cheque + ' ' strBody.Append(" ") + ' ' strBody.Append(" ") + ' ' strBody.Append(" ") + ' 'End If - strBody.Append(" ") - strBody.AppendFormat(" ") - strBody.Append(" ") - strBody.Append("
Notificación de transferencia de pago realizada.
Favor de pasar a nuestras oficinas por el cheque con la siguientes instrucciones.
 
") - strBody.AppendFormat("
") - strBody.Append("
") + ' 'If objIE.CveTipoTransaccion = 2 Then ' cuando es transf + ' strBody.Append(" ") + ' strBody.Append(" Notificación de transferencia de pago realizada. ") + ' strBody.Append(" ") + ' 'End If + + ' strBody.Append(" ") + ' strBody.AppendFormat("   ") + ' strBody.Append(" ") + ' strBody.Append(" ") + ' 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("
") + ' 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 + ' '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("
") - strBody.AppendFormat(" Documentos abonados o pagados
{0}
", Textov33) - strBody.AppendFormat(" ") - strBody.AppendFormat(" ") - strBody.AppendFormat(" ") - strBody.AppendFormat(" ") - strBody.AppendFormat(" ") - strBody.AppendFormat(" ") - strBody.AppendFormat(" ") - strBody.AppendFormat(" ") + ' strBody.AppendFormat("
") + ' strBody.AppendFormat("
FechaFacturaImporte ($)Folio FiscalNC Aplicadas
") + ' 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 + ' 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}
{0}{0}$ {0}{0}{0}
") - strBody.AppendFormat("
") - strBody.AppendFormat("
") - strBody.AppendFormat("
") - strBody.AppendFormat("
") - strBody.AppendFormat("") - End If + ' strBody.AppendFormat("
") + ' strBody.AppendFormat("
") + ' strBody.AppendFormat("
") + ' strBody.AppendFormat(" ") + ' strBody.AppendFormat(" ") + ' strBody.AppendFormat(" ") + ' strBody.AppendFormat(" ") + ' strBody.AppendFormat("
") + ' End If - strBody.Append("
Favor de no responder a este correo.
") + ' strBody.Append("
Favor de no responder a este correo.
") - strBody.Append("") - End If + ' strBody.Append("") + ' End If - objIE.Dispose() - Return strBody.ToString + ' objIE.Dispose() + ' Return strBody.ToString - End Function + 'End Function diff --git a/Bancos/PopIECompras.aspx.vb b/Bancos/PopIECompras.aspx.vb index 7dd634876..639c41138 100644 --- a/Bancos/PopIECompras.aspx.vb +++ b/Bancos/PopIECompras.aspx.vb @@ -437,6 +437,22 @@ Partial Class Bancos_PopIECompras End Set End Property + Private Property NotificarA As String + Get + If ViewState("NotificarA") Is Nothing Then + Return "" + Else + Return ViewState("NotificarA").ToString + End If + + End Get + Set(value As String) + ViewState("NotificarA") = value + End Set + End Property + + + #End Region Private Sub Bancos_PopIECompras_Load(sender As Object, e As EventArgs) Handles Me.Load @@ -724,6 +740,10 @@ Partial Class Bancos_PopIECompras ViewState("CveCuentaRetIVA") = ObjProveedor.CveCuentaRetIVA ViewState("CveCuentaProveedorExtranjera") = ObjProveedor.CveCuentaProveedoresExtranjera ViewState("CveCuentaComplementaria") = ObjProveedor.CveCuentaProveedoresComplementaria + ViewState("NotificarA") = ObjProveedor.NotificarA.Trim() + + + Else Alert("El Proveedor solicitado no existe, por favor intente de nuevo.", TipoMensaje.MsgAdvertencia) End If @@ -3351,7 +3371,10 @@ Partial Class Bancos_PopIECompras If IdPoliza > 0 Then StrMsg.AppendFormat("
Ver Póliza", IdPoliza) End If - If RBLContado.SelectedValue.ToEntero = 6 And ChkEmitirComplementoPago.Checked Then GeneraTimbre(CvePrePoliza) Else Alert(StrMsg.ToString, TipoMensaje.MsgInformacion, "self.parent.tb_remove();self.parent.location.reload();") + If RBLContado.SelectedValue.ToEntero = 6 And ChkEmitirComplementoPago.Checked Then GeneraTimbre(CvePrePoliza) Else Alert(StrMsg.ToString, TipoMensaje.MsgInformacion, "self.parent.tb_remove();self.parent.location.reload();") + + EnviarCorreoNotificacion(CveIE, NotificarA, "", UsuarioActual, False) + Else ObjIE.RollBack() Alert(MsgError, TipoMensaje.MsgError) @@ -3359,11 +3382,60 @@ Partial Class Bancos_PopIECompras ObjIE.Dispose() ObjMov.Dispose() - End Sub + End Sub #End Region - + + +#Region "ENVIAR CORREO NOTIFICACION DE PAGO" + + + Private Sub EnviarCorreoNotificacion(CveIENotificar As Integer, CorreoNotificarA As String, CopiaPara As String, UsuarioActualNotificar As Usuario, MostarAlert As Boolean) + + Try + Dim Hilo As New Threading.Thread(Sub() EnviarCorreoNotifiMandaCorreocacionHilo(CveIENotificar, CorreoNotificarA, CopiaPara, UsuarioActualNotificar)) + 'Dim Hilo As New Threading.Thread( EnviarCorreoNotifiMandaCorreocacionHilo(CveIENotificar, CorreoNotificarA, CopiaPara, UsuarioActualNotificar)) + Hilo.Start() + + + If MostarAlert Then + Alert("El correo se envió correctamente", TipoMensaje.MsgInformacion) + End If + + Catch ex As Exception + + If MostarAlert Then + Alert("No se pudo enviar el correo electrónico.", TipoMensaje.MsgError) + End If + + + End Try + End Sub + + Private Sub EnviarCorreoNotifiMandaCorreocacionHilo(CveIENotificar As Integer, CorreoNotificarA As String, CopiaPara As String, UsuarioActualNotificar As Usuario) + + Try + Dim ObjBancos As New ClsBancos() + + If ObjBancos.NotificacionPago(CveIENotificar, CorreoNotificarA, CopiaPara, UsuarioActualNotificar) Then + Alert("El correo se envió correctamente", TipoMensaje.MsgInformacion) + Else + Alert("No se pudo enviar el correo electrónico.", TipoMensaje.MsgError) + End If + + ObjBancos.Dispose() + + Catch ex As Exception + GuardaLog("Error al enviar notificación de pago PopIECompras --> " & ex.StackTrace.ToString) + End Try + + + + End Sub + +#End Region + #Region "COMPLEMENTO DE PAGO" - + Private Sub GeneraTimbre(CvePrePoliza As Integer) Dim Str As New StringBuilder diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb index 5ce744e3b..c19a66acc 100644 --- a/Bancos/ProveedoresAbonar.aspx.vb +++ b/Bancos/ProveedoresAbonar.aspx.vb @@ -2365,7 +2365,8 @@ Partial Class Bancos_ProveedoresAbonar 'Notificación de Pago If TxtNotificarA.Text.Trim <> "" AndAlso ChkEnviarCorreo.Checked Then - NotificacionPago(CveIE, TxtNotificarA.Text.Trim) + 'NotificacionPago(CveIE, TxtNotificarA.Text.Trim) + EnviarCorreoNotificacion(CveIE, TxtNotificarA.Text.Trim, "", UsuarioActual, False) End If End If @@ -2785,261 +2786,302 @@ Partial Class Bancos_ProveedoresAbonar #Region " NOTIFICACION PAGO " - Private Sub NotificacionPago(CveIE As Integer, CorreoNotificarA As String) - If Not DdlTipoTransaccion.SelectedValue.ToEntero.Contiene(9, 17) Then - 'Dim Param As New List(Of String) - 'Param.Add(CorreoNotificarA) 'Para - 'Param.Add("Notificaciones de pago") 'Asunto - 'Param.Add(GeneraCorreo(CveIE)) 'Body - 'Param.Add(CveIE.ToString) 'CveIE - Dim Body As String = GeneraCorreo(CveIE) - Dim Comprobante = If(ComprobanteIE <> "", String.Format("{0}IE\{1}", UsuarioActual.Empresa.Ruta, ComprobanteIE), "") 'Archivo Adjunto + Private Sub EnviarCorreoNotificacion(CveIENotificar As Integer, CorreoNotificarA As String, CopiaPara As String, UsuarioActualNotificar As Usuario, MostarAlert As Boolean) - 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)) + Try + Dim Hilo As New Threading.Thread(Sub() EnviarCorreoNotifiMandaCorreocacionHilo(CveIENotificar, CorreoNotificarA, CopiaPara, UsuarioActualNotificar)) + 'Dim Hilo As New Threading.Thread( EnviarCorreoNotifiMandaCorreocacionHilo(CveIENotificar, CorreoNotificarA, CopiaPara, UsuarioActualNotificar)) Hilo.Start() - End If + + If MostarAlert Then + Alert("El correo se envió correctamente", TipoMensaje.MsgInformacion) + End If + + Catch ex As Exception + + If MostarAlert Then + Alert("No se pudo enviar el correo electrónico.", TipoMensaje.MsgError) + End If + + + End Try + End Sub + + Private Sub EnviarCorreoNotifiMandaCorreocacionHilo(CveIENotificar As Integer, CorreoNotificarA As String, CopiaPara As String, UsuarioActualNotificar As Usuario) + + + Try + Dim ObjBancos As New ClsBancos() + + If ObjBancos.NotificacionPago(CveIENotificar, CorreoNotificarA, CopiaPara, UsuarioActualNotificar) Then + Alert("El correo se envió correctamente", TipoMensaje.MsgInformacion) + Else + Alert("No se pudo enviar el correo electrónico.", TipoMensaje.MsgError) + End If + + ObjBancos.Dispose() + Catch ex As Exception + GuardaLog("Error al enviar notificación de pago ProveedoresAbonar --> " & ex.StackTrace.ToString) + End Try + + 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("
") + '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("
") - '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(" ", 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 + ' '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(" Documentos abonados o pagados
{0}
", Textov33) - strBody.AppendFormat(" ") - strBody.AppendFormat(" ") - strBody.AppendFormat(" ") - strBody.AppendFormat(" ") - strBody.AppendFormat(" ") - strBody.AppendFormat(" ") - strBody.AppendFormat(" ") - strBody.AppendFormat(" ") + ' strBody.AppendFormat("
") + ' strBody.AppendFormat("
FechaFacturaImporte ($)Folio FiscalNC Aplicadas
") + ' 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("") - For Each dr As DataRow In objIE.DtResultados.FiltraParametros("CveConceptoContable IN (17) AND CveCompra > 0").Rows - strBody.AppendFormat("
{0}{0}$ {0}{0}{0}
") + ' 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(" ") - strBody.AppendFormat(" ") - strBody.AppendFormat(" ") - strBody.AppendFormat(" ") - strBody.AppendFormat("
FechaFacturaImporte ($)Folio FiscalNC Aplicadas
") - strBody.AppendFormat("
") - strBody.AppendFormat("
") - strBody.AppendFormat("
") - strBody.AppendFormat("
") - strBody.AppendFormat("
") - End If + ' For Each dr As DataRow In objIE.DtResultados.FiltraParametros("CveConceptoContable IN (17) AND CveCompra > 0").Rows + ' strBody.AppendFormat(" ") + ' strBody.AppendFormat(" {0}", dr("Fecha").ToString.ToDate.ToShortDateString()) + ' strBody.AppendFormat(" {0}", dr("SerieFolio").ToString) + ' strBody.AppendFormat(" $ {0}", dr("Importe").ToString.FormatoNumero) + ' strBody.AppendFormat(" {0}", dr("FolioFiscal")) + ' strBody.AppendFormat(" {0}", dr("ImporteNC").ToString.FormatoNumero) + ' strBody.AppendFormat(" ") + ' Next - strBody.Append("
Favor de no responder a este correo.
") - strBody.Append("") - End If + ' strBody.AppendFormat(" ") + ' strBody.AppendFormat(" ") + ' strBody.AppendFormat("
") + ' strBody.AppendFormat(" ") + ' strBody.AppendFormat(" ") + ' strBody.AppendFormat(" ") + ' strBody.AppendFormat(" ") + ' strBody.AppendFormat(" ") + ' strBody.AppendFormat(" ") + ' strBody.AppendFormat(" ") + ' strBody.AppendFormat("") + ' End If - objIE.Dispose() - Return strBody.ToString - End Function + ' strBody.Append("
Favor de no responder a este correo.
") + + ' strBody.Append("") + ' End If + + ' objIE.Dispose() + ' Return strBody.ToString + 'End Function #End Region diff --git a/CxC/RepCxC.aspx b/CxC/RepCxC.aspx index 5f9970007..82e7afba0 100644 --- a/CxC/RepCxC.aspx +++ b/CxC/RepCxC.aspx @@ -141,6 +141,7 @@ + @@ -322,6 +323,19 @@ + +
+ Tipo Cliente: +
+ +
+ + + + + +
+ diff --git a/CxC/RepCxC.aspx.vb b/CxC/RepCxC.aspx.vb index 7c3b73753..a207e9e54 100644 --- a/CxC/RepCxC.aspx.vb +++ b/CxC/RepCxC.aspx.vb @@ -199,7 +199,8 @@ Partial Class RepCxC If ObjMovtos.GetCxC(FechaI, FechaF, CveCliente, DdlSubProyecto.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, -1, "-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, DdlResponsable.SelectedValue.ToEntero, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, If(DdlTipoDocto.GetSelectedValuesM = "", "-1", DdlTipoDocto.GetSelectedValuesM), FechaVI, FechaVF, FechaCorte:=txtCorteA.Text.ToDate, EstatusCliente:=DdlEstatusCliente.SelectedValue.ToEntero, - CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveCobranzaEstatus:=CveCobranzaEstatus, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero) Then + CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveCobranzaEstatus:=CveCobranzaEstatus, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, + TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero) Then GvDatos.DataSource = ObjMovtos.DtResultados DtDatos = ObjMovtos.DtResultados @@ -378,53 +379,53 @@ Partial Class RepCxC End If End If - Dim Liga1 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C1&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}", + Dim Liga1 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C1&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}", DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), - e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito")) + e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda")) - Dim Liga2 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C2&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}", + Dim Liga2 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C2&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}", DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), - e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito")) + e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda")) - Dim Liga3 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C3&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}", + Dim Liga3 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C3&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}", DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), - e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito")) + e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda")) - Dim Liga4 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C4&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}", + Dim Liga4 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C4&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}", DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), - e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito")) + e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda")) - Dim Liga5 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C5&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}", + Dim Liga5 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C5&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}", DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), - e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito")) + e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda")) - Dim Liga6 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C6&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}", + Dim Liga6 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C6&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}", DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), - e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito")) + e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda")) - Dim Liga7 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C7&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}", + Dim Liga7 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C7&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}", DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), - e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito")) + e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda")) - Dim Liga8 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C8&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}", + Dim Liga8 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C8&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}", DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), - e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito")) + e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda")) - Dim Liga9 As String = String.Format("/CxC/RepCxCDetalle.aspx.aspx?Op=S&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}", + Dim Liga9 As String = String.Format("/CxC/RepCxCDetalle.aspx.aspx?Op=S&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}", DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), - e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito")) + e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda")) - Dim Liga10 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=TV&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}", + Dim Liga10 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=TV&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}", DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), - e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito")) + e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda")) - Dim Liga11 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=TPV&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}", + Dim Liga11 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=TPV&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}", DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), - e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito")) + e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda")) - Dim LigaTot As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=S&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}", + Dim LigaTot As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=S&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}", DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), - e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito")) + e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda")) e.Row.FCHyperLink("HplSaldo").NavigateUrl = LigaTot diff --git a/CxC/RepCxCDetalle.aspx b/CxC/RepCxCDetalle.aspx index f362fc720..e2805597e 100644 --- a/CxC/RepCxCDetalle.aspx +++ b/CxC/RepCxCDetalle.aspx @@ -118,6 +118,7 @@ + @@ -215,6 +216,18 @@ +
+ Tipo Cliente: +
+ +
+ + + + + +
+ diff --git a/CxC/RepCxCDetalle.aspx.vb b/CxC/RepCxCDetalle.aspx.vb index 8b2f794e6..840738cfe 100644 --- a/CxC/RepCxCDetalle.aspx.vb +++ b/CxC/RepCxCDetalle.aspx.vb @@ -178,9 +178,37 @@ Partial Class RepCxCDetalle Set(value As Decimal) ViewState("LimiteCredito") = value End Set - End Property + End Property + + Private Property TipoCliente As Integer + Get + If ViewState("TipoCliente") Is Nothing Then + Return -1 + Else + Return DirectCast(ViewState("TipoCliente"), Integer) + End If + End Get + Set(value As Integer) + ViewState("TipoCliente") = value + End Set + End Property + + + Private Property CveMoneda As Integer + Get + If ViewState("CveMoneda") Is Nothing Then + Return -1 + Else + Return DirectCast(ViewState("CveMoneda"), Integer) + End If + End Get + Set(value As Integer) + ViewState("CveMoneda") = value + End Set + End Property + #End Region - + Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not IsPostBack Then ViewState("Opcion") = IfNull(Request("Op"), "-1") @@ -252,7 +280,10 @@ Partial Class RepCxCDetalle CveCobranzaEstatus = If(Request("CveCobranzaEstatus") IsNot Nothing, Request("CveCobranzaEstatus").ToString, "-1").ToString.ToEntero CveClienteClasificacion = If(Request("CveClienteClasificacion") IsNot Nothing, Request("CveClienteClasificacion").ToString, "-1").ToString.ToEntero LimiteCredito = If(Request("LimiteCredito") IsNot Nothing, Request("LimiteCredito").ToString, "-1").ToString.ToDecimal - + TipoCliente = If(Request("TipoCliente") IsNot Nothing, Request("TipoCliente").ToString, "-1").ToString.ToEntero + CveMoneda = If(Request("CveMoneda") IsNot Nothing, Request("CveMoneda").ToString, "-1").ToString.ToEntero + + DdlTipoCliente.SelectedValueExist(TipoCliente) If FechaF <> "-1" Then txtFechaF.Text = FechaF @@ -387,7 +418,8 @@ Partial Class RepCxCDetalle Iva.ToString, DdlGrupo.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlResponsable.SelectedValue.ToEntero, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, If(DdlTipoDocto.GetSelectedValuesM = "", "-1", DdlTipoDocto.GetSelectedValuesM), FechaVI, FechaVF, FechaCorte:=txtCorteA.Text.ToDate, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveCobranzaEstatus:=DdlCobranzaEstatusFiltro.SelectedValue.ToEntero, - CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, LimiteCredito:=LimiteCredito) Then + CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, LimiteCredito:=LimiteCredito, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, + CveMoneda:=CveMoneda) Then GvDatos.DataSource = ObjMovtos.DtResultados dt = ObjMovtos.DtResultados diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index 81a8d4702..d537bc6bb 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -633,7 +633,7 @@
Frecuente - No Frecuente + Venta Mostrador
diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb index cc9f9197d..e3966aaed 100644 --- a/Ventas/ClientesAbonar.aspx.vb +++ b/Ventas/ClientesAbonar.aspx.vb @@ -2277,6 +2277,8 @@ Partial Class Ventas_ClientesAbonar IDPoliza = -1 FolioIECancelado = "" + Anexo.Text = "" + If UsuarioActual.Empresa.UsaAC Then TxtOtrosImportes.Text = "" UpDatos.Update() diff --git a/Ventas/RepProductosServicios.aspx b/Ventas/RepProductosServicios.aspx index 09b1bb7d9..c917789c2 100644 --- a/Ventas/RepProductosServicios.aspx +++ b/Ventas/RepProductosServicios.aspx @@ -302,7 +302,16 @@ + +
+ + + + + +
+ diff --git a/Ventas/RepProductosServicios.aspx.vb b/Ventas/RepProductosServicios.aspx.vb index c51511b3a..b8564290b 100644 --- a/Ventas/RepProductosServicios.aspx.vb +++ b/Ventas/RepProductosServicios.aspx.vb @@ -86,6 +86,7 @@ Partial Class Ventas_RepProductosServicios DdlGrupo.Items.Insert(15, New ListItem("Cliente - PS", "20")) DdlGrupo.Items.Insert(16, New ListItem("Sucursal - PS", "21")) DdlGrupo.Items.Insert(17, New ListItem("Familia - Marca - Tipo", "22")) + DdlGrupo.Items.Insert(18, New ListItem("Tipo Cliente", "23")) DdlGrupo.DataBind() DdlGrupo.SelectedValueExist("8") @@ -266,7 +267,7 @@ Partial Class Ventas_RepProductosServicios DdlSubProyectoEjecucion.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, "-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:=TipoComprobante, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, TipoCambio:=TipoCambio, TCEspecifico:=TCEspecifico, CveProveedorCompra:=CveProveedorCompra, - CveMarca:=DdlMarcaPSDes.SelectedValue.ToEntero, MostrarLitraje:=ChkLitraje.Checked) Then + CveMarca:=DdlMarcaPSDes.SelectedValue.ToEntero, MostrarLitraje:=ChkLitraje.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero) Then GvDatos.DataSource = ObjVentas.DtResultados DtVentas = ObjVentas.DtResultados Else @@ -346,11 +347,11 @@ Partial Class Ventas_RepProductosServicios FechaIEjec = If(IsDate(TxtFechaIEjec.Text.Trim()), TxtFechaIEjec.Text.Trim(), "-1") FechaFEjec = If(IsDate(TxtFechaFEjec.Text.Trim()), TxtFechaFEjec.Text.Trim(), "-1") - Dim Liga = String.Format("/Ventas/RepProductosServiciosDetalle.aspx?CveProyecto={0}&CveSubProyecto={1}&CveCategoria={2}&CveClasificacion={3}&CvePS={4}&CveCliente={5}&CveSubProyectoEjecucion={6}&CveVendedor={7}&CveUsuario={8}&CveEstatus={9}&Anio={10}&Mes={11}&AnioMes={12}&Fecha={13}&AnioEjec={14}&MesEjec={15}&AnioMesEjec={16}&FechaEjec={17}&FechaI={18}&FechaF={19}&FechaEI={20}&FechaEF={21}&TipoDocto={22}&Grupo={23}&CveMoneda={24}&TipoCambio={25}&TCEspecifico={26}&CveClienteClasificacion={27}&CveProveedorCompra={28}&CveMarca={29}&CveClasificacionDetalle={30}", + Dim Liga = String.Format("/Ventas/RepProductosServiciosDetalle.aspx?CveProyecto={0}&CveSubProyecto={1}&CveCategoria={2}&CveClasificacion={3}&CvePS={4}&CveCliente={5}&CveSubProyectoEjecucion={6}&CveVendedor={7}&CveUsuario={8}&CveEstatus={9}&Anio={10}&Mes={11}&AnioMes={12}&Fecha={13}&AnioEjec={14}&MesEjec={15}&AnioMesEjec={16}&FechaEjec={17}&FechaI={18}&FechaF={19}&FechaEI={20}&FechaEF={21}&TipoDocto={22}&Grupo={23}&CveMoneda={24}&TipoCambio={25}&TCEspecifico={26}&CveClienteClasificacion={27}&CveProveedorCompra={28}&CveMarca={29}&CveClasificacionDetalle={30}&TipoCliente={31}", e.Row.DBCampo("CveProyecto"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveCategoria"), e.Row.DBCampo("CveClasificacion"), e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyectoEjecucion"), e.Row.DBCampo("Vendedor"), e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("AnioEjec"), e.Row.DBCampo("MesEjec"), e.Row.DBCampo("AnioMesEjec"), e.Row.DBCampo("FechaEjec"), - FechaI, FechaF, FechaIEjec, FechaFEjec, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("CveGpo"), e.Row.DBCampo("CveMoneda"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), e.Row.DBCampo("CveClienteClasificacion"), e.Row.DBCampo("CveProveedorCompra"), cveMarca, CveClasificacionDetalle) + FechaI, FechaF, FechaIEjec, FechaFEjec, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("CveGpo"), e.Row.DBCampo("CveMoneda"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), e.Row.DBCampo("CveClienteClasificacion"), e.Row.DBCampo("CveProveedorCompra"), cveMarca, CveClasificacionDetalle, If(DdlGrupo.SelectedValue.ToEntero = 23, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue)) e.Row.FCLiteral("LtlGrupo").Text = String.Format("{2}", Css, Liga, e.Row.DBCampo("Gpo")) diff --git a/Ventas/RepProductosServiciosDetalle.aspx b/Ventas/RepProductosServiciosDetalle.aspx index de2f98f82..f0fb503c3 100644 --- a/Ventas/RepProductosServiciosDetalle.aspx +++ b/Ventas/RepProductosServiciosDetalle.aspx @@ -303,6 +303,18 @@ + + +
+ + + + + +
+ + + diff --git a/Ventas/RepProductosServiciosDetalle.aspx.vb b/Ventas/RepProductosServiciosDetalle.aspx.vb index 948eb61bc..989d36af3 100644 --- a/Ventas/RepProductosServiciosDetalle.aspx.vb +++ b/Ventas/RepProductosServiciosDetalle.aspx.vb @@ -60,6 +60,23 @@ Partial Class Ventas_RepProductosServiciosDetalle ViewState("Agrupador") = value End Set End Property + + Private Property TipoCliente As Integer + Get + + If ViewState("TipoCliente") Is Nothing Then + Return -1 + Else + Return ViewState("TipoCliente").ToString.ToEntero + End If + + End Get + + Set(value As Integer) + ViewState("TipoCliente") = value + End Set + End Property + #End Region Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load @@ -299,6 +316,10 @@ Partial Class Ventas_RepProductosServiciosDetalle CveMarca = If(Request("CveMarca") IsNot Nothing AndAlso Request("CveMarca").ToEntero() > 0, Request("CveMarca").ToEntero(), -1).ToString.ToEntero CveClasificacionDetalle = If(Request("CveClasificacionDetalle") IsNot Nothing AndAlso Request("CveClasificacionDetalle").ToEntero() > 0, Request("CveClasificacionDetalle").ToEntero(), -1).ToString.ToEntero + TipoCliente = If(Request("TipoCliente") IsNot Nothing, Request("TipoCliente").ToString, "-1").ToString.ToEntero + + DdlTipoCliente.SelectedValueExist(TipoCliente) + If Fecha <> "-1" Then txtFechaI.Text = Fecha txtFechaF.Text = Fecha @@ -410,7 +431,8 @@ Partial Class Ventas_RepProductosServiciosDetalle DdlPS.SelectedValue.ToEntero, FechaI, FechaF, -1, FechaIEjec, FechaFEjec, -1, CveCliente, DdlSubProyectoEjecucion.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:=TipoComprobante, GPO:=DdlGrupo.SelectedValue.ToEntero, CveMoneda:=CveMoneda, - TipoCambio:=TipoCambio, TCEspecifico:=TCEspecifico, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, CveProveedorCompra:=CveProveedorCompra, CveMarca:=DdlMarcaPSDes.SelectedValue.ToEntero, CveClasificacionDetalle:=DdlTipoPSDes.SelectedValue.ToEntero()) Then + TipoCambio:=TipoCambio, TCEspecifico:=TCEspecifico, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, CveProveedorCompra:=CveProveedorCompra, + CveMarca:=DdlMarcaPSDes.SelectedValue.ToEntero, CveClasificacionDetalle:=DdlTipoPSDes.SelectedValue.ToEntero(), TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero) Then GvDatos.DataSource = ObjVentas.DtResultados TmpDT = ObjVentas.DtResultados Else @@ -438,7 +460,7 @@ Partial Class Ventas_RepProductosServiciosDetalle FechaI, FechaF, Mes.ToEntero, FechaIEjec, FechaFEjec, MesEjec.ToEntero, CveCliente.ToEntero, CveSubProyectoEjecucion.ToEntero, CveVendedor, CveUsuario.ToEntero, CveEstatus.ToEntero, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:=TipoComprobante, GPO:=Gpo, CveMoneda:=CveMoneda, TipoCambio:=TipoCambio, TCEspecifico:=TCEspecifico, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, - CveProveedorCompra:=CveProveedorCompra, CveMarca:=CveMarca) Then + CveProveedorCompra:=CveProveedorCompra, CveMarca:=CveMarca, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero) Then GvDatos.DataSource = ObjVentas.DtResultados TmpDT = ObjVentas.DtResultados Else diff --git a/Ventas/RepVentaDetalle.aspx b/Ventas/RepVentaDetalle.aspx index e63a976b6..0dc5dd450 100644 --- a/Ventas/RepVentaDetalle.aspx +++ b/Ventas/RepVentaDetalle.aspx @@ -283,6 +283,7 @@
+
@@ -291,6 +292,16 @@
+ + +
+ + + + + +
+ diff --git a/Ventas/RepVentaDetalle.aspx.vb b/Ventas/RepVentaDetalle.aspx.vb index 1e00b530d..4e35dd634 100644 --- a/Ventas/RepVentaDetalle.aspx.vb +++ b/Ventas/RepVentaDetalle.aspx.vb @@ -54,7 +54,26 @@ Partial Class RepVentaDetalle Set(value As Integer) ViewState("CveMoneda") = value End Set - End Property + End Property + + + Private Property TipoCliente As Integer + Get + If ViewState("TipoCliente") Is Nothing Then + Return -1 + Else + Return ViewState("TipoCliente").ToString.ToEntero + End If + + End Get + + Set(value As Integer) + ViewState("TipoCliente") = value + End Set + End Property + + + Private Property TCEspecifico As Decimal Get Return ViewState("TCEspecifico").ToString.ToDecimal @@ -141,7 +160,9 @@ Partial Class RepVentaDetalle TipoCambio = If(Request("TipoCambio") IsNot Nothing, Request("TipoCambio").ToString.ToEntero, -1).ToString.ToEntero TCEspecifico = If(Request("TCEspecifico") IsNot Nothing, Request("TCEspecifico").ToString.ToEntero, -1).ToString.ToDecimal CveMoneda = If(Request("CveMoneda") IsNot Nothing, Request("CveMoneda").ToString.ToEntero, -1).ToString.ToEntero + TipoCliente = If(Request("TipoCliente") IsNot Nothing, Request("TipoCliente").ToString.ToEntero, -1).ToString.ToEntero + DdlTipoCliente.SelectedValueExist(TipoCliente) 'LISTBOXS TipoDocto = If(Request("TipoDocto") IsNot Nothing, Request("TipoDocto").ToString, "-1").ToString @@ -461,7 +482,8 @@ Partial Class RepVentaDetalle If ObjVentas.GetRepVentasDetalle(DdlGrupo.SelectedValue.ToEntero, Anio.ToEntero, Mes.ToEntero, AnioMes, Fecha, CveCliente, IVA, Vendedores, DdlUsuario.SelectedValue.ToEntero, Estatus, FechaI, FechaF, CveCorte.ToEntero, TipoComprobante, DdlSubProyectoEjecucion.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, FechaIEjec, FechaFEjec, - CveProyecto, Sucursales, TipoCambio, TCEspecifico, CveMoneda, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, CveCondicionesPago:=CveCondicionesPago) Then + CveProyecto, Sucursales, TipoCambio, TCEspecifico, CveMoneda, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, + CveCondicionesPago:=CveCondicionesPago, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero) Then DtVentas = AddRows(ObjVentas.DtResultados) ImgImprimir.Enabled = True GvDatos.DataSource = AddRows(ObjVentas.DtResultados) diff --git a/Ventas/RepVentas.aspx b/Ventas/RepVentas.aspx index 8f047fda7..ebafa4a4f 100644 --- a/Ventas/RepVentas.aspx +++ b/Ventas/RepVentas.aspx @@ -284,6 +284,17 @@ + + +
+ + + + + +
+ + diff --git a/Ventas/RepVentas.aspx.vb b/Ventas/RepVentas.aspx.vb index 8ecb43232..077411a25 100644 --- a/Ventas/RepVentas.aspx.vb +++ b/Ventas/RepVentas.aspx.vb @@ -137,6 +137,7 @@ Partial Class Ventas_RepVentas DdlGrupo.Items.Insert(11, New ListItem("Mes Ejec.", "12")) DdlGrupo.Items.Insert(12, New ListItem("Año/Mes Ejec.", "13")) DdlGrupo.Items.Insert(13, New ListItem("Fecha Ejec.", "14")) + DdlGrupo.Items.Insert(13, New ListItem("Tipo Cliente", "20")) DdlGrupo.DataBind() DdlGrupo.SelectedValueExist("3") End Sub @@ -320,7 +321,7 @@ Partial Class Ventas_RepVentas If ObjVentas.GetRepVentas(FechaI, FechaF, FechaIEjec, FechaFEjec, CveCliente, DdlSubProyectoEjecucion.SelectedValue.ToEntero, Vendedores, DdlUsuario.SelectedValue.ToEntero, Estatus, "-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, TipoComprobante, DdlProyecto.SelectedValue.ToEntero, Sucursales, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, CveUsuarioConsulta:=UsuarioActual.CveUsuario, - CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero) Then + CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero) Then GvDatos.DataSource = ObjVentas.DtResultados DtVentas = ObjVentas.DtResultados Else @@ -420,14 +421,14 @@ Partial Class Ventas_RepVentas 'LIGA A DETALLE - Dim Liga As String = $"/Ventas/RepVentaDetalle.aspx?GPO={DdlGrupo.SelectedValue}&Anio={e.Row.DBCampo("Anio")}&Mes={e.Row.DBCampo("Mes")}&AnioMes={e.Row.DBCampo("AnioMes")}&Fecha={e.Row.DBCampo("Fecha")}&AnioEjec={e.Row.DBCampo("AnioEjec")}&MesEjec={e.Row.DBCampo("MesEjec")}&AnioMesEjec={e.Row.DBCampo("AnioMesEjec")}&FechaEjec={e.Row.DBCampo("FechaEjec")}&CveCliente={e.Row.DBCampo("CveCliente")}&CveVendedor={ e.Row.DBCampo("CveVendedor")}&CveUsuario={e.Row.DBCampo("CveUsuario")}&CveEstatusFactura={e.Row.DBCampo("CveEstatusFactura")}&FechaI={FechaI}&FechaF={FechaF}&FechaIEjec={FechaIEjec}&FechaFEjec={FechaFEjec}&IVA={e.Row.DBCampo("GPO_IVA")}&CveCorte={ e.Row.DBCampo("CveCorte")}&TipoDocto={ DdlTipoComprobante.GetSelectedValuesM}&CveSubProyectoEjecucion={e.Row.DBCampo("CveSubProyectoEjecucion")}&CveSubProyecto={CveSubProyecto}&CveProyecto={CveProyecto}&TipoCambio={TipoCambio}&TCEspecifico={TCEspecifico}&CveMoneda={CveMoneda}&CveClienteClasificacion={e.Row.DBCampo("CveClienteClasificacion")}&CveCondicionesPago={DdlCondicionesPago.SelectedValue}" + Dim Liga As String = $"/Ventas/RepVentaDetalle.aspx?GPO={DdlGrupo.SelectedValue}&Anio={e.Row.DBCampo("Anio")}&Mes={e.Row.DBCampo("Mes")}&AnioMes={e.Row.DBCampo("AnioMes")}&Fecha={e.Row.DBCampo("Fecha")}&AnioEjec={e.Row.DBCampo("AnioEjec")}&MesEjec={e.Row.DBCampo("MesEjec")}&AnioMesEjec={e.Row.DBCampo("AnioMesEjec")}&FechaEjec={e.Row.DBCampo("FechaEjec")}&CveCliente={e.Row.DBCampo("CveCliente")}&CveVendedor={ e.Row.DBCampo("CveVendedor")}&CveUsuario={e.Row.DBCampo("CveUsuario")}&CveEstatusFactura={e.Row.DBCampo("CveEstatusFactura")}&FechaI={FechaI}&FechaF={FechaF}&FechaIEjec={FechaIEjec}&FechaFEjec={FechaFEjec}&IVA={e.Row.DBCampo("GPO_IVA")}&CveCorte={ e.Row.DBCampo("CveCorte")}&TipoDocto={ DdlTipoComprobante.GetSelectedValuesM}&CveSubProyectoEjecucion={e.Row.DBCampo("CveSubProyectoEjecucion")}&CveSubProyecto={CveSubProyecto}&CveProyecto={CveProyecto}&TipoCambio={TipoCambio}&TCEspecifico={TCEspecifico}&CveMoneda={CveMoneda}&CveClienteClasificacion={e.Row.DBCampo("CveClienteClasificacion")}&CveCondicionesPago={DdlCondicionesPago.SelectedValue}&TipoCliente={ If(DdlGrupo.SelectedValue.ToEntero = 20, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue)}" e.Row.FCLiteral("LtlGrupo").Text = "" & e.Row.FCLiteral("LtlGrupo").Text & "" e.Row.FCLiteral("LtlCantidad").Text = "" & e.Row.FCLiteral("LtlCantidad").Text & "" - If DdlGrupo.SelectedValue.ToEntero > 16 AndAlso e.Row.DBCampo("Orden") = "2" Then + If DdlGrupo.SelectedValue.ToEntero > 16 AndAlso e.Row.DBCampo("Orden") = "2" AndAlso DdlGrupo.SelectedValue.ToEntero <> 20 Then e.Row.CssClass = "SubTotales" e.Row.Attributes.Add("style", "background:#CCCCCC !important") End If diff --git a/Ventas/RepVentasPeriodo.aspx b/Ventas/RepVentasPeriodo.aspx index 7741a082e..6a8b81c5a 100644 --- a/Ventas/RepVentasPeriodo.aspx +++ b/Ventas/RepVentasPeriodo.aspx @@ -117,6 +117,7 @@ + @@ -233,6 +234,16 @@
+ + +
+ + + + + +
+ diff --git a/Ventas/RepVentasPeriodo.aspx.vb b/Ventas/RepVentasPeriodo.aspx.vb index 0a8a64cf9..9b733053f 100644 --- a/Ventas/RepVentasPeriodo.aspx.vb +++ b/Ventas/RepVentasPeriodo.aspx.vb @@ -193,7 +193,10 @@ Partial Class RepVentasPeriodo FechaFEjec = If(IsDate(TxtFechaFEjec.Text.Trim()), TxtFechaFEjec.Text.Trim.ToDate, MaxFecha) If ObjVentas.GetRepVentasPeriodos(FechaI, FechaF, FechaIEjec, FechaFEjec, DdlClientes.SelectedValue.ToEntero, DdlSubProyectoEjecucion.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, - DdlUsuario.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, "-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, DdlTipoComprobante.SelectedValue, DdlProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, CveUsuarioConsulta:=UsuarioActual.CveUsuario, VerEn:=VerEn, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero) Then + DdlUsuario.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, "-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, DdlTipoComprobante.SelectedValue, + DdlProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, CveUsuarioConsulta:=UsuarioActual.CveUsuario, + VerEn:=VerEn, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero) Then + GvDatos.DataSource = ObjVentas.DtResultados DtVentas = ObjVentas.DtResultados Else diff --git a/vwd.webinfo b/vwd.webinfo index 8404920ba..65b4102ee 100644 --- a/vwd.webinfo +++ b/vwd.webinfo @@ -70,6 +70,12 @@ + + + + + + From 29f65a3749aa708e2f68e558e99d24e94b4f62de Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Sat, 4 Jul 2020 15:48:48 -0700 Subject: [PATCH 07/12] - --- App_Code/ClsPaginas.vb | 16 ++++++++++----- RH/Personal.aspx.vb | 45 +++++++++++++++++++++--------------------- 2 files changed, 34 insertions(+), 27 deletions(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 7c9436364..5da9e2bbf 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -8059,12 +8059,18 @@ Public Class ClsPaginas If LthProyectoP IsNot Nothing Then LthProyectoP.Text = "Proyecto
" LblSubProyecto.Text = "Sucursal" End Select - DdlProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1).FiltraParametros("", "", {"CveProyecto", "Proyecto"}), GlobalDTProyectos(UsuarioActual.CveEmpresa, -1).FiltraParametros("", "", {"CveProyecto", "Proyecto"})) - DdlProyecto.DataBind() - DdlSubProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1)) - DdlSubProyecto.DataBind() - DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) + If DdlProyecto IsNot Nothing Then + DdlProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1).FiltraParametros("", "", {"CveProyecto", "Proyecto"}), GlobalDTProyectos(UsuarioActual.CveEmpresa, -1).FiltraParametros("", "", {"CveProyecto", "Proyecto"})) + DdlProyecto.DataBind() + DdlProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) + End If + + If DdlSubProyecto IsNot Nothing Then + DdlSubProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1)) + DdlSubProyecto.DataBind() + DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) + End If End Sub End Class diff --git a/RH/Personal.aspx.vb b/RH/Personal.aspx.vb index 6301a5bb3..bf18b4eac 100644 --- a/RH/Personal.aspx.vb +++ b/RH/Personal.aspx.vb @@ -5774,33 +5774,34 @@ Partial Class RH_Personal If dtVC.Rows.Count > 0 Then dr = dtVC.Rows(0) - If UsuarioActual.CveEmpresa.Contiene(72) Then - Dim SBDomicilioSucursal As New StringBuilder() - Dim DRSucursal = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa, CveSubProyecto:=dr("CveSubProyecto").ToString().ToEntero, Estatus:=1).FiltroPrimero("") + 'If UsuarioActual.CveEmpresa.Contiene(72, 119) Then + 'End If - If DRSucursal IsNot Nothing Then - Dim CiudadSucursal As String = String.Format("{0},{1}", DRSucursal("Municipio"), DRSucursal("Estado")) - Dim DomicilioSucursal As String = "" + Dim SBDomicilioSucursal As New StringBuilder() + Dim DRSucursal = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa, CveSubProyecto:=dr("CveSubProyecto").ToString().ToEntero, Estatus:=1).FiltroPrimero("") - SBDomicilioSucursal.AppendFormat("{0}", DRSucursal("Calle")) - If DRSucursal("NoExt").ToString().ToEntero > 0 Then SBDomicilioSucursal.AppendFormat(" No.Ext: {0}", DRSucursal("NoExt").ToString().ToEntero) - If DRSucursal("NoInt").ToString().ToEntero > 0 Then SBDomicilioSucursal.AppendFormat(", No.Int: {0}", DRSucursal("NoInt").ToString().ToEntero) - If DRSucursal("Colonia").ToString().Length > 0 Then SBDomicilioSucursal.AppendFormat(", Col: {0}", DRSucursal("Colonia").ToString()) - If DRSucursal("CP").ToString().ToEntero > 0 Then SBDomicilioSucursal.AppendFormat(", CP: {0}", DRSucursal("CP").ToString()) - If CiudadSucursal.Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", CiudadSucursal) - If DRSucursal("Pais").ToString().Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", DRSucursal("Pais").ToString()) - End If + If DRSucursal IsNot Nothing Then + Dim CiudadSucursal As String = String.Format("{0},{1}", DRSucursal("Municipio"), DRSucursal("Estado")) + Dim DomicilioSucursal As String = "" - params.Add(New ReportParameter("NombreResponsable", dr("NombreCompleto").ToString())) - params.Add(New ReportParameter("RFC", dr("RFC").ToString())) - params.Add(New ReportParameter("Puesto", dr("Puesto").ToString())) - params.Add(New ReportParameter("Departamento", dr("Departamento").ToString())) - params.Add(New ReportParameter("Sucursal", dr("SubProyecto").ToString())) - params.Add(New ReportParameter("Telefono", dr("Celular").ToString())) - params.Add(New ReportParameter("DireccionSucursal", SBDomicilioSucursal.ToString())) - params.Add(New ReportParameter("PuestoUsuarioActual", dr("PuestoUsuarioImprimio").ToString())) + SBDomicilioSucursal.AppendFormat("{0}", DRSucursal("Calle")) + If DRSucursal("NoExt").ToString().ToEntero > 0 Then SBDomicilioSucursal.AppendFormat(" No.Ext: {0}", DRSucursal("NoExt").ToString().ToEntero) + If DRSucursal("NoInt").ToString().ToEntero > 0 Then SBDomicilioSucursal.AppendFormat(", No.Int: {0}", DRSucursal("NoInt").ToString().ToEntero) + If DRSucursal("Colonia").ToString().Length > 0 Then SBDomicilioSucursal.AppendFormat(", Col: {0}", DRSucursal("Colonia").ToString()) + If DRSucursal("CP").ToString().ToEntero > 0 Then SBDomicilioSucursal.AppendFormat(", CP: {0}", DRSucursal("CP").ToString()) + If CiudadSucursal.Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", CiudadSucursal) + If DRSucursal("Pais").ToString().Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", DRSucursal("Pais").ToString()) End If + params.Add(New ReportParameter("NombreResponsable", dr("NombreCompleto").ToString())) + params.Add(New ReportParameter("RFC", dr("RFC").ToString())) + params.Add(New ReportParameter("Puesto", dr("Puesto").ToString())) + params.Add(New ReportParameter("Departamento", dr("Departamento").ToString())) + params.Add(New ReportParameter("Sucursal", dr("SubProyecto").ToString())) + params.Add(New ReportParameter("Telefono", dr("Celular").ToString())) + params.Add(New ReportParameter("DireccionSucursal", SBDomicilioSucursal.ToString())) + params.Add(New ReportParameter("PuestoUsuarioActual", dr("PuestoUsuarioImprimio").ToString())) + params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) From da1991458aa851cbe7b716b5493924b07ecfbbd1 Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Sat, 4 Jul 2020 18:19:12 -0700 Subject: [PATCH 08/12] Correcion TipoCliente --- App_Code/ClsMovimientos.vb | 14 +++----- CxC/RepCxC.aspx.vb | 48 ++++++++++++++-------------- CxC/RepCxCDetalle.aspx | 48 ++++++++++++++++++++-------- CxC/RepCxCDetalle.aspx.vb | 17 +++++++++- Ventas/RepProductosServicios.aspx | 18 +++++++---- Ventas/RepProductosServicios.aspx.vb | 8 ++++- vwd.webinfo | 2 ++ 7 files changed, 101 insertions(+), 54 deletions(-) diff --git a/App_Code/ClsMovimientos.vb b/App_Code/ClsMovimientos.vb index 88e6a9522..fac07ad08 100644 --- a/App_Code/ClsMovimientos.vb +++ b/App_Code/ClsMovimientos.vb @@ -318,16 +318,12 @@ Public Class ClsMovimientos Return Retorno End Function - Public Function GetCxCDetalle(FechaI As String, FechaF As String, CveCliente As Integer, CveSubProyecto As Integer, - CveVendedor As Integer, CveUsuario As Integer, Anio As Integer, Mes As Integer, - AnioMes As String, - Fecha As String, - CveClienteSucursal As Integer, Opcion As String, - CveEstatus As Integer, IVA As String, Agrupador As Integer, CveEmpresa As Integer, CveResponsable As Integer, - TipoCambio As Integer, Optional TCEspecifico As Double = -1, Optional TipoDocto As String = "-1", + Public Function GetCxCDetalle(FechaI As String, FechaF As String, CveCliente As Integer, CveSubProyecto As Integer, CveVendedor As Integer, CveUsuario As Integer, Anio As Integer, Mes As Integer, + AnioMes As String, Fecha As String, CveClienteSucursal As Integer, Opcion As String, CveEstatus As Integer, IVA As String, Agrupador As Integer, CveEmpresa As Integer, + CveResponsable As Integer, TipoCambio As Integer, Optional TCEspecifico As Double = -1, Optional TipoDocto As String = "-1", Optional FechaVI As String = "-1", Optional FechaVF As String = "1", Optional FechaCorte As Date = Nothing, Optional CveUsuarioConsulta As Integer = -1, Optional CveCobranzaEstatus As Integer = -1, Optional CveClienteClasificacion As Integer = -1, Optional LimiteCredito As Decimal = -1, - Optional TipoCliente As Integer = -1, Optional CveMoneda As Integer = -1) As Boolean + Optional TipoCliente As Integer = -1, Optional CveMoneda As Integer = -1, Optional EstatusCliente As Integer = -1) As Boolean Dim Retorno As Boolean = False 'Data = New DataTable @@ -367,7 +363,7 @@ Public Class ClsMovimientos .Add("@LimiteCredito", SqlDbType.Float).Value = LimiteCredito .Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente .Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda - + .Add("@EstatusCliente", SqlDbType.Int).Value = EstatusCliente End With diff --git a/CxC/RepCxC.aspx.vb b/CxC/RepCxC.aspx.vb index a207e9e54..f049dfde1 100644 --- a/CxC/RepCxC.aspx.vb +++ b/CxC/RepCxC.aspx.vb @@ -379,53 +379,53 @@ Partial Class RepCxC End If End If - Dim Liga1 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C1&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}", + Dim Liga1 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C1&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente={26}", DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), - e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda")) + e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero) - Dim Liga2 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C2&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}", + Dim Liga2 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C2&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&EstatusCliente={26}", DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), - e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda")) + e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero) - Dim Liga3 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C3&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}", + Dim Liga3 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C3&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&EstatusCliente={26}", DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), - e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda")) + e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero) - Dim Liga4 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C4&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}", + Dim Liga4 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C4&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&EstatusCliente={26}", DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), - e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda")) + e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero) - Dim Liga5 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C5&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}", + Dim Liga5 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C5&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&EstatusCliente{26}", DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), - e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda")) + e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero) - Dim Liga6 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C6&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}", + Dim Liga6 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C6&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&EstatusCliente={26}", DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), - e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda")) + e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero) - Dim Liga7 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C7&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}", + Dim Liga7 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C7&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&EstatusCliente={26}", DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), - e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda")) + e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero) - Dim Liga8 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C8&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}", + Dim Liga8 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C8&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&EstatusCliente={26}", DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), - e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda")) + e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero) - Dim Liga9 As String = String.Format("/CxC/RepCxCDetalle.aspx.aspx?Op=S&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}", + Dim Liga9 As String = String.Format("/CxC/RepCxCDetalle.aspx.aspx?Op=S&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&EstatusCliente={26}", DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), - e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda")) + e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero) - Dim Liga10 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=TV&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}", + Dim Liga10 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=TV&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&EstatusCliente={26}", DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), - e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda")) + e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero) - Dim Liga11 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=TPV&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}", + Dim Liga11 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=TPV&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&EstatusCliente={26}", DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), - e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda")) + e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero) - Dim LigaTot As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=S&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}", + Dim LigaTot As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=S&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&EstatusCliente={26}", DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), - e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda")) + e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero) e.Row.FCHyperLink("HplSaldo").NavigateUrl = LigaTot diff --git a/CxC/RepCxCDetalle.aspx b/CxC/RepCxCDetalle.aspx index e2805597e..d20c79363 100644 --- a/CxC/RepCxCDetalle.aspx +++ b/CxC/RepCxCDetalle.aspx @@ -216,17 +216,7 @@ -
- Tipo Cliente: -
- -
- - - - - -
+ @@ -286,13 +276,45 @@ -
+ +
+ Estatus Cliente: +
+
+ + + + + +
+ + +
+ +
+
Clasificación Cliente:
+
+ + +
+ Tipo Cliente:
-
+ +
+ + + + + +
+ + + + diff --git a/CxC/RepCxCDetalle.aspx.vb b/CxC/RepCxCDetalle.aspx.vb index 840738cfe..1ebca9cb7 100644 --- a/CxC/RepCxCDetalle.aspx.vb +++ b/CxC/RepCxCDetalle.aspx.vb @@ -207,6 +207,19 @@ Partial Class RepCxCDetalle End Set End Property + Private Property EstatusCliente As Integer + Get + If ViewState("EstatusCliente") Is Nothing Then + Return -1 + Else + Return DirectCast(ViewState("EstatusCliente"), Integer) + End If + End Get + Set(value As Integer) + ViewState("EstatusCliente") = value + End Set + End Property + #End Region Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load @@ -282,8 +295,10 @@ Partial Class RepCxCDetalle LimiteCredito = If(Request("LimiteCredito") IsNot Nothing, Request("LimiteCredito").ToString, "-1").ToString.ToDecimal TipoCliente = If(Request("TipoCliente") IsNot Nothing, Request("TipoCliente").ToString, "-1").ToString.ToEntero CveMoneda = If(Request("CveMoneda") IsNot Nothing, Request("CveMoneda").ToString, "-1").ToString.ToEntero + EstatusCliente = If(Request("EstatusCliente") IsNot Nothing, Request("EstatusCliente").ToString, "-1").ToString.ToEntero DdlTipoCliente.SelectedValueExist(TipoCliente) + DdlEstatusCliente.SelectedValueExist(EstatusCliente) If FechaF <> "-1" Then txtFechaF.Text = FechaF @@ -419,7 +434,7 @@ Partial Class RepCxCDetalle RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, If(DdlTipoDocto.GetSelectedValuesM = "", "-1", DdlTipoDocto.GetSelectedValuesM), FechaVI, FechaVF, FechaCorte:=txtCorteA.Text.ToDate, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveCobranzaEstatus:=DdlCobranzaEstatusFiltro.SelectedValue.ToEntero, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, LimiteCredito:=LimiteCredito, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, - CveMoneda:=CveMoneda) Then + CveMoneda:=CveMoneda, EstatusCliente:=DdlEstatusCliente.SelectedValue.ToEntero) Then GvDatos.DataSource = ObjMovtos.DtResultados dt = ObjMovtos.DtResultados diff --git a/Ventas/RepProductosServicios.aspx b/Ventas/RepProductosServicios.aspx index c917789c2..2b700023e 100644 --- a/Ventas/RepProductosServicios.aspx +++ b/Ventas/RepProductosServicios.aspx @@ -297,11 +297,18 @@ - -
+ +
+ + +
+ + +
+
@@ -309,10 +316,9 @@ -
- - - +
+ + diff --git a/Ventas/RepProductosServicios.aspx.vb b/Ventas/RepProductosServicios.aspx.vb index b8564290b..6f25b6b3a 100644 --- a/Ventas/RepProductosServicios.aspx.vb +++ b/Ventas/RepProductosServicios.aspx.vb @@ -60,7 +60,13 @@ Partial Class Ventas_RepProductosServicios If Not IsPostBack Then If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario.Contiene(77, 21) Then Response.Redirect("/Inicio.aspx") CargarMarcas() - SetValues() + SetValues() + + If UsuarioActual.Empresa.Funcionalidad(531).ToEntero = 1 Then + LblLitraje.Visible = True + DvLitraje.Visible = True + End If + End If End Sub diff --git a/vwd.webinfo b/vwd.webinfo index a9c00ff76..3874691e4 100644 --- a/vwd.webinfo +++ b/vwd.webinfo @@ -76,6 +76,8 @@ + + From d232be8bfbe9a269adc05aefcc77a9ccc78d5830 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Mon, 6 Jul 2020 09:19:51 -0700 Subject: [PATCH 09/12] =?UTF-8?q?implementando=20nuevo=20m=C3=A9todos=20co?= =?UTF-8?q?n=20ddl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Inventarios/EntradasSalidas.aspx | 2 +- Inventarios/EntradasSalidas.aspx.vb | 5 +++-- Ventas/Ventas.aspx | 6 +++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Inventarios/EntradasSalidas.aspx b/Inventarios/EntradasSalidas.aspx index 960ef3445..d3ce5043b 100644 --- a/Inventarios/EntradasSalidas.aspx +++ b/Inventarios/EntradasSalidas.aspx @@ -303,7 +303,7 @@
- + Proyecto:
diff --git a/Inventarios/EntradasSalidas.aspx.vb b/Inventarios/EntradasSalidas.aspx.vb index 772c5fdc2..9d1766958 100644 --- a/Inventarios/EntradasSalidas.aspx.vb +++ b/Inventarios/EntradasSalidas.aspx.vb @@ -542,8 +542,9 @@ Partial Class Inventarios_EntradasSalidas End Sub Private Sub CargaSubProyectos() - DdlSubProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1)) - DdlSubProyecto.DataBind() + CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto) + 'DdlSubProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1)) + 'DdlSubProyecto.DataBind() 'DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) End Sub Private Sub CargaPersonal() diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index 5d72b5557..91bc5be3e 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -891,7 +891,7 @@ Cantidad
Facturada -
+ P.U.  Desc @@ -976,11 +976,11 @@ - + <%----%> - + <%----%> From e3b83c84f037b5a2d83fca4885567bbc2337656e Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Mon, 6 Jul 2020 11:55:10 -0700 Subject: [PATCH 10/12] Envio de correo Tareas 119 --- TareasProgramadas/Tareas119.ashx | 176 +++++++++++++++++++++++++------ 1 file changed, 141 insertions(+), 35 deletions(-) diff --git a/TareasProgramadas/Tareas119.ashx b/TareasProgramadas/Tareas119.ashx index bc0290609..45891ec9a 100644 --- a/TareasProgramadas/Tareas119.ashx +++ b/TareasProgramadas/Tareas119.ashx @@ -8,7 +8,8 @@ using System.IO; using System.Web.Services; using System.Web.Services.Protocols; using GemBox.Spreadsheet; -using System.Data; +using System.Data; +using System.Text; public class TareasJam : IHttpHandler { @@ -46,6 +47,9 @@ public class TareasJam : IHttpHandler private bool EjecutaThalamus(int CveEmpresa) { + bool Respuesta = false; + StringBuilder SBLog = new StringBuilder(); + ClsGenerales ObjGenerales = new ClsGenerales(); DataTable DTProductos = new DataTable(); @@ -53,53 +57,98 @@ public class TareasJam : IHttpHandler DataTable DTClientes = new DataTable(); DataTable DTAlmacenes = new DataTable(); + string FTPServer = "ftp://127.0.0.1/"; + string TFPUsr = "Toor"; + string FTPPass = "agj-3500"; + bool ErrorProceso = false; + SBLog.AppendLine("Consultas
"); + SBLog.AppendLine(""); + if (ObjGenerales.GetJAMCorveta(1)) { DTProductos = ObjGenerales.DtResultados.Copy(); + SBLog.AppendLine($""); + } + else { + ErrorProceso = true; + SBLog.AppendLine($""); } - else { ErrorProceso = true; } - if (ObjGenerales.GetJAMCorveta(2)) + if (ObjGenerales.GetJAMCorveta(2) & ErrorProceso == false) { DTVentas = ObjGenerales.DtResultados.Copy(); + SBLog.AppendLine($"Ventas"); + } + else + { + ErrorProceso = true; + SBLog.AppendLine($""); } - else { ErrorProceso = true; } - if (ObjGenerales.GetJAMCorveta(3)) + if (ObjGenerales.GetJAMCorveta(3) & ErrorProceso == false) { DTClientes = ObjGenerales.DtResultados.Copy(); - } - else { ErrorProceso = true; } + SBLog.AppendLine($""); - if (ObjGenerales.GetJAMCorveta(4)) + } + else { + ErrorProceso = true; + SBLog.AppendLine($""); + } + + if (ObjGenerales.GetJAMCorveta(4) & ErrorProceso == false) { DTAlmacenes = ObjGenerales.DtResultados.Copy(); + SBLog.AppendLine($""); } - else { ErrorProceso = true; } + else { + ErrorProceso = true; + SBLog.AppendLine($""); + } + + SBLog.AppendLine("
ConsultaRegistros
Productos{DTProductos.Rows.Count}
ProductosError al consultar
{DTVentas.Rows.Count}
VentasError al consultar
Clientes{DTClientes.Rows.Count}
ClientesError al consultar
Almacenes{DTAlmacenes.Rows.Count}
AlmacenesError al consultar
"); + SBLog.AppendLine("
"); + ObjGenerales.Dispose(); - DTProductos.Columns[0].ColumnName = "Código Producto Interno "; - DTProductos.Columns[1].ColumnName = "Nombre del Producto"; - DTProductos.Columns[2].ColumnName = "Presentación"; - DTProductos.AcceptChanges(); + if (!ErrorProceso) + { + + try + { + + DTProductos.Columns[0].ColumnName = "Código Producto Interno "; + DTProductos.Columns[1].ColumnName = "Nombre del Producto"; + DTProductos.Columns[2].ColumnName = "Presentación"; + DTProductos.AcceptChanges(); - DTClientes.Columns[4].ColumnName = "address.countryId"; - DTClientes.Columns[5].ColumnName = "address.stateId"; - DTClientes.Columns[6].ColumnName = "address.city"; - DTClientes.Columns[7].ColumnName = "address.street1"; - DTClientes.Columns[8].ColumnName = "address.street2"; - DTClientes.Columns[9].ColumnName = "address.postalCode"; - DTClientes.Columns[9].ColumnName = "phone.intCode"; - DTClientes.Columns[9].ColumnName = "phone.areaCode"; - DTClientes.Columns[9].ColumnName = "phone.number"; - DTClientes.Dispose(); + DTClientes.Columns[4].ColumnName = "address.countryId"; + DTClientes.Columns[5].ColumnName = "address.stateId"; + DTClientes.Columns[6].ColumnName = "address.city"; + DTClientes.Columns[7].ColumnName = "address.street1"; + DTClientes.Columns[8].ColumnName = "address.street2"; + DTClientes.Columns[9].ColumnName = "address.postalCode"; + DTClientes.Columns[9].ColumnName = "phone.intCode"; + DTClientes.Columns[9].ColumnName = "phone.areaCode"; + DTClientes.Columns[9].ColumnName = "phone.number"; + DTClientes.Dispose(); + + DTVentas.Columns.RemoveAt(7); + DTVentas.AcceptChanges(); + } + catch (Exception e) + { + SBLog.AppendLine("Error al renombrar columnas"); + } + + + } + - DTVentas.Columns.RemoveAt(7); - DTVentas.AcceptChanges(); if (!ErrorProceso) @@ -107,12 +156,7 @@ public class TareasJam : IHttpHandler string RutaProductos = $@"{ HttpContext.Current.Server.MapPath("~") }Temp\Productos{DateTime.Now.ToString("yyyyMMdd")}.xlsx"; string RutaVentas = $@"{ HttpContext.Current.Server.MapPath("~") }Temp\Ventas{DateTime.Now.ToString("yyyyMMdd")}.xlsx"; string RutaClientes = $@"{ HttpContext.Current.Server.MapPath("~") }Temp\Clientes{DateTime.Now.ToString("yyyyMMdd")}.xlsx"; - string RutaAlmacenes = $@"{ HttpContext.Current.Server.MapPath("~") }Temp\Almacenes{DateTime.Now.ToString("yyyyMMdd")}.xlsx"; - - - string FTPServer = "ftp://127.0.0.1/"; - string TFPUsr = "Toor"; - string FTPPass = "agj-3500"; + string RutaAlmacenes = $@"{ HttpContext.Current.Server.MapPath("~") }Temp\Almacenes{DateTime.Now.ToString("yyyyMMdd")}.xlsx"; SpreadsheetInfo.SetLicense(Extensiones.ModExtensiones.SerialGemBoxSpreadsheet()); @@ -160,18 +204,30 @@ public class TareasJam : IHttpHandler var FInfoClientes = new FileInfo(RutaClientes); var FInfoAlmacenes = new FileInfo(RutaAlmacenes); - bool CargaProductos = false; bool CargaVentas = false; bool CargaClientes = false; bool CargaAlmacenes = false; + SBLog.AppendLine("Cargas
"); + SBLog.AppendLine(""); + CargaProductos = CargarArchivos(FInfoProductos, FTPServer, TFPUsr, FTPPass); + if (CargaProductos) { CargaProductos = VerificarArchivo(FInfoProductos, FInfoProductos.Length, FTPServer, TFPUsr, FTPPass); } + if (CargaProductos) + { + SBLog.AppendLine($""); + } + else + { + SBLog.AppendLine($""); + } + if (CargaProductos) { CargaVentas = CargarArchivos(FInfoVentas, FTPServer, TFPUsr, FTPPass); @@ -181,6 +237,14 @@ public class TareasJam : IHttpHandler } } + if (CargaVentas) + { + SBLog.AppendLine($""); + }else + { + SBLog.AppendLine($""); + } + if (CargaProductos & CargaVentas) { CargaClientes = CargarArchivos(FInfoClientes, FTPServer, TFPUsr, FTPPass); @@ -190,6 +254,13 @@ public class TareasJam : IHttpHandler } } + if (CargaClientes) + { + SBLog.AppendLine($""); + }else + { + SBLog.AppendLine($""); + } if (CargaProductos & CargaVentas& CargaClientes ) { @@ -200,25 +271,60 @@ public class TareasJam : IHttpHandler } } + if (CargaAlmacenes) + { + SBLog.AppendLine($""); + }else + { + SBLog.AppendLine($""); + } + if (CargaProductos & CargaVentas & CargaClientes & CargaAlmacenes) { - return true; + Respuesta = true; } else { - return false; + Respuesta = false; } + SBLog.AppendLine("
ArchivoEstado
Productosok
ProductosError carga
Ventasok
VentasError carga
Clientesok
ClientesError carga
Almacenesok
AlmacenesError carga
"); + } else { - return false; + Respuesta = false; } + + string Cuerpo = Respuesta ? $"Correcto
Tarea de carga de archios Corteva realizada correctamente
{SBLog.ToString()}" : $"Error
Error tarea de carga de archios Corteva
{SBLog.ToString()}" ; + + MandaCorreo(Cuerpo, Respuesta); + + return Respuesta; + } + private void MandaCorreo(string Cuerpo, bool ErrorProceso) + { + + try + { + ClsSisMail Correo = new ClsSisMail(); + //string Para = "julian@adssistemas.mx;rene.molina@adssistemas.mx;oscar.irigoyen@adssistemas.mx"; + string Para = "oscar.irigoyen@adssistemas.mx"; + string Asunto = ErrorProceso ? $"Carga Layout Corteva {DateTime.Now.ToString("yyyy-MM-dd")}" : $"Carga Layout Corteva Error {DateTime.Now.ToString("yyyy-MM-dd")}"; + + Correo.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Cuerpo); + + }catch(Exception ex) + { + Extensiones.ModExtensiones.GuardaLog(null,$"Error Tareas Programadas 119 error enviar mail --> {ex.Message} "); + } + } + private bool CargarArchivos(FileInfo FInfo, string FTPServer, string FTPUsr, string FTPPass) { From 13d3c2ec459043dd6d2aaf878ab9702d8e9223b6 Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Mon, 6 Jul 2020 11:57:19 -0700 Subject: [PATCH 11/12] =?UTF-8?q?Correci=C3=B3n=20correo=20tareas=20119?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TareasProgramadas/Tareas119.ashx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/TareasProgramadas/Tareas119.ashx b/TareasProgramadas/Tareas119.ashx index 45891ec9a..49543b657 100644 --- a/TareasProgramadas/Tareas119.ashx +++ b/TareasProgramadas/Tareas119.ashx @@ -111,7 +111,6 @@ public class TareasJam : IHttpHandler SBLog.AppendLine(""); SBLog.AppendLine("
"); - ObjGenerales.Dispose(); if (!ErrorProceso) @@ -313,8 +312,8 @@ public class TareasJam : IHttpHandler try { ClsSisMail Correo = new ClsSisMail(); - //string Para = "julian@adssistemas.mx;rene.molina@adssistemas.mx;oscar.irigoyen@adssistemas.mx"; - string Para = "oscar.irigoyen@adssistemas.mx"; + string Para = "julian@adssistemas.mx;rene.molina@adssistemas.mx;oscar.irigoyen@adssistemas.mx"; + //string Para = "oscar.irigoyen@adssistemas.mx"; string Asunto = ErrorProceso ? $"Carga Layout Corteva {DateTime.Now.ToString("yyyy-MM-dd")}" : $"Carga Layout Corteva Error {DateTime.Now.ToString("yyyy-MM-dd")}"; Correo.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Cuerpo); From eb6e25252df641f24fb3d86591f161e7ba3f4a0c Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Mon, 6 Jul 2020 17:53:50 -0700 Subject: [PATCH 12/12] Estatus OC Evitar recursividad --- App_Code/ClsOC.vb | 5 ++++- OC/CatEstatus.aspx.vb | 17 ++++++++++++++--- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/App_Code/ClsOC.vb b/App_Code/ClsOC.vb index dbda19f3b..5a2e41f76 100644 --- a/App_Code/ClsOC.vb +++ b/App_Code/ClsOC.vb @@ -1431,7 +1431,7 @@ Public Class ClsOC Return Retorno End Function - Public Function UpdateEstatus(Estatus As String, Tipo As String, CveEstatusSiguiente As Integer, TipoTermino As Integer, EstatusActivo As Boolean, EsCancelable As Boolean, CveEstatus As Integer) As Boolean + Public Function UpdateEstatus(Estatus As String, Tipo As String, CveEstatusSiguiente As Integer, TipoTermino As Integer, EstatusActivo As Boolean, EsCancelable As Boolean, CveEstatus As Integer, EsatatusSiguiente As String) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_OC_EstatusUpdate") @@ -1452,6 +1452,9 @@ Public Class ClsOC Catch Ex1 As SqlException If Ex1.Message.Contains("Número: 2627;") Then Alert("Ya existe un Estatus con el mismo nombre: " & Estatus & ".", TipoMensaje.MsgAdvertencia) + + ElseIf Ex1.Message.Contains("Número: 530;") Then + Alert($"La asiganación del campo estatus siguiente {EsatatusSiguiente} esta creando problema de recursividad.", TipoMensaje.MsgAdvertencia) Else Me.OnError("Ocurrió un error al guardar los cambios en el Estatus", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End If diff --git a/OC/CatEstatus.aspx.vb b/OC/CatEstatus.aspx.vb index 0ee5d010d..84303384c 100644 --- a/OC/CatEstatus.aspx.vb +++ b/OC/CatEstatus.aspx.vb @@ -165,16 +165,27 @@ Partial Class OC_CatEstatus Private Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click Dim TieneError = False - Dim ObjEstatus As New ClsOC + Dim ObjEstatus As New ClsOC + + 'No quitar transacción la transacción es por que el update puede generar recursividad en la vista Vw_OC_Estatus error 530 + ObjEstatus.IniciaTransacSQL() + If HdnModalidad.Value = "I" Then If Not ObjEstatus.AddEstatus(TxtEstatus.Text.Trim, DdlTipo.SelectedValue.ToString, DdlEstatusSiguiente.SelectedValue.ToEntero, DdlTipoTermino.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then TieneError = True End If Else - If Not ObjEstatus.UpdateEstatus(TxtEstatus.Text.Trim, DdlTipo.SelectedValue.ToString, DdlEstatusSiguiente.SelectedValue.ToEntero, DdlTipoTermino.SelectedValue.ToEntero, ChkEstatus.Checked, ChkCancelable.Checked, CveEstatus) Then + If Not ObjEstatus.UpdateEstatus(TxtEstatus.Text.Trim, DdlTipo.SelectedValue.ToString, DdlEstatusSiguiente.SelectedValue.ToEntero, DdlTipoTermino.SelectedValue.ToEntero, ChkEstatus.Checked, ChkCancelable.Checked, CveEstatus, DdlEstatusSiguiente.SelectedItem.Text) Then TieneError = True End If End If + + If TieneError Then + ObjEstatus.RollBack() + Else + ObjEstatus.Commit() + End If + ObjEstatus.Dispose() If Not TieneError Then @@ -189,7 +200,7 @@ Partial Class OC_CatEstatus RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarEstatus")) CargaDatos() Else - Alert("Ocurrió un error al guardar/editar estatus de órden de compra", TipoMensaje.MsgError) + 'Alert("Ocurrió un error al guardar/editar estatus de órden de compra", TipoMensaje.MsgError) End If End Sub