diff --git a/Ashx/TareasProgramadas.ashx b/Ashx/TareasProgramadas.ashx
index cdf23a0b6..95eba56b4 100644
--- a/Ashx/TareasProgramadas.ashx
+++ b/Ashx/TareasProgramadas.ashx
@@ -1303,12 +1303,102 @@ Public Class TareasProgramadas : Implements IHttpHandler, IReadOnlySessionState
#End Region
#Region "R E P O R T E D I A R I O "
+ 'Private Function ReporteDiario(ByVal CveEmpresa As Integer, ByVal context As HttpContext) As Boolean
+ ' Dim Usuario As Usuario = ValidaUsuarioSistema(100, CveEmpresa)
+ ' Dim objGenerales As ClsGenerales = New ClsGenerales()
+ ' Dim respuesta As Boolean = True
+ ' Dim sbTablas As StringBuilder = New StringBuilder()
+ ' sbTablas.Append($"
Reporte Diario {DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss")}
")
+
+ ' If objGenerales.GetReporteDiario(CveEmpresa) Then
+ ' Dim TablaActual As Integer = 1
+
+ ' For Each tabla As DataTable In objGenerales.DSResultados.Tables
+ ' sbTablas.AppendLine(ConvertDataTableToHtml(tabla))
+ ' TablaActual += 1
+ ' sbTablas.Append("
")
+ ' sbTablas.Append("
")
+ ' Next
+ ' Else
+ ' respuesta = False
+ ' End If
+
+ ' objGenerales.Dispose()
+ ' 'MandaCorreoDiario
+ ' Dim Correos As String = "hdiaz@grupodiaz.com.mx;libarra@grupodiaz.com.mx;jguerrero@grupodiaz.com.mx;contabilidad@grupodiaz.com.mx;cnazarit@yahoo.com;julian@adsistemas.mx;rene.molina@adssistemas.mx"
+ ' ' Dim Correos As String = " rene.molina@adssistemas.mx"
+ ' MandaCorreoDiario(sbTablas.ToString(), Correos, respuesta)
+ ' Return respuesta
+ 'End Function
+
+ 'Private Function ConvertDataTableToHtml(ByVal table As DataTable) As String
+ ' Dim html As StringBuilder = New StringBuilder()
+ ' Dim ColumnaTitulo As String = "Titulo"
+ ' html.Append("")
+ ' If table.Columns(0).ColumnName = ColumnaTitulo AndAlso table.Rows.Count > 0 Then html.AppendFormat(" {0}", table.Rows(0)(ColumnaTitulo))
+ ' html.Append("")
+
+ ' For Each column As DataColumn In table.Columns
+ ' If ColumnaTitulo <> column.ColumnName Then html.Append($"| {column.ColumnName} | ")
+ ' Next
+
+ ' html.Append("
")
+ ' html.Append("")
+ ' Dim numericValue As Decimal = Nothing
+
+ ' For Each row As DataRow In table.Rows
+ ' html.Append("")
+
+ ' For Each column As DataColumn In table.Columns
+
+ ' If ColumnaTitulo <> column.ColumnName Then
+ ' Dim value As Object = row(column)
+ ' Dim cellValue As String
+
+ ' If column.DataType = GetType(Integer) OrElse column.DataType = GetType(Decimal) OrElse column.DataType = GetType(Double) OrElse column.DataType = GetType(Single) Then
+
+ ' If value IsNot DBNull.Value AndAlso Decimal.TryParse(value.ToString(), numericValue) Then
+
+ ' If numericValue <> 0 Then
+ ' cellValue = numericValue.ToString("N2")
+ ' Else
+ ' cellValue = ""
+ ' End If
+ ' Else
+ ' cellValue = ""
+ ' End If
+
+ ' html.Append($"| {cellValue} | ")
+ ' Else
+ ' cellValue = If(value?.ToString(), String.Empty)
+ ' html.Append($"{cellValue} | ")
+ ' End If
+ ' End If
+ ' Next
+
+ ' html.Append("
")
+ ' Next
+
+ ' html.Append("")
+ ' html.Append("
")
+ ' Return html.ToString()
+ 'End Function
+
Private Function ReporteDiario(ByVal CveEmpresa As Integer, ByVal context As HttpContext) As Boolean
Dim Usuario As Usuario = ValidaUsuarioSistema(100, CveEmpresa)
Dim objGenerales As ClsGenerales = New ClsGenerales()
Dim respuesta As Boolean = True
Dim sbTablas As StringBuilder = New StringBuilder()
- sbTablas.Append($"Reporte Diario {DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss")}
")
+ 'sbTablas.Append($"Reporte Diario {DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss")}
")
+
+ sbTablas.AppendLine($"
+
+
+  |
+ Reporte Diario |
+  |
+
+
{DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss")}
")
If objGenerales.GetReporteDiario(CveEmpresa) Then
Dim TablaActual As Integer = 1
@@ -1323,10 +1413,13 @@ Public Class TareasProgramadas : Implements IHttpHandler, IReadOnlySessionState
respuesta = False
End If
+ sbTablas.AppendLine("
")
+
+
objGenerales.Dispose()
'MandaCorreoDiario
- Dim Correos As String = "hdiaz@grupodiaz.com.mx;libarra@grupodiaz.com.mx;jguerrero@grupodiaz.com.mx;contabilidad@grupodiaz.com.mx;cnazarit@yahoo.com;julian@adsistemas.mx;rene.molina@adssistemas.mx"
- 'Dim Correos As String = " rene.molina@adssistemas.mx;japmx95@gmail.com"
+ 'Dim Correos As String = "hdiaz@grupodiaz.com.mx;libarra@grupodiaz.com.mx;jguerrero@grupodiaz.com.mx;contabilidad@grupodiaz.com.mx;cnazarit@yahoo.com;julian@adsistemas.mx;rene.molina@adssistemas.mx"
+ Dim Correos As String = " oscar.irigoyen@adssistemas.mx"
MandaCorreoDiario(sbTablas.ToString(), Correos, respuesta)
Return respuesta
End Function
@@ -1334,15 +1427,15 @@ Public Class TareasProgramadas : Implements IHttpHandler, IReadOnlySessionState
Private Function ConvertDataTableToHtml(ByVal table As DataTable) As String
Dim html As StringBuilder = New StringBuilder()
Dim ColumnaTitulo As String = "Titulo"
- html.Append("")
+ html.Append("")
If table.Columns(0).ColumnName = ColumnaTitulo AndAlso table.Rows.Count > 0 Then html.AppendFormat(" {0}", table.Rows(0)(ColumnaTitulo))
- html.Append("")
+ html.Append("
")
For Each column As DataColumn In table.Columns
- If ColumnaTitulo <> column.ColumnName Then html.Append($"| {column.ColumnName} | ")
+ If ColumnaTitulo <> column.ColumnName Then html.Append($"{column.ColumnName} | ")
Next
- html.Append("
")
+ html.Append("")
html.Append("")
Dim numericValue As Decimal = Nothing
@@ -1368,10 +1461,10 @@ Public Class TareasProgramadas : Implements IHttpHandler, IReadOnlySessionState
cellValue = ""
End If
- html.Append($"{cellValue} | ")
+ html.Append($"{cellValue} | ")
Else
cellValue = If(value?.ToString(), String.Empty)
- html.Append($"{cellValue} | ")
+ html.Append($"{cellValue} | ")
End If
End If
Next
diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb
index f7d7eb3a2..61eb5ee6e 100644
--- a/Compras/Compras.aspx.vb
+++ b/Compras/Compras.aspx.vb
@@ -13907,7 +13907,7 @@ Partial Class Compras_Compras
Next
'si no esta vinculado a nc simplemente me lo brinco
If realizadevolucion Then
-
+ subtotaldevolucion = subtotaldevolucion.RoundSQL(2)
'si el subtotal es igual a la nc lo guardo si no marco error
Dim tTolerancia As Decimal = 0
Dim tAjustaUltimo As Boolean = True