Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -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($"<b><center>Reporte Diario {DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss")}</center><b><br><br>")
|
||||
|
||||
' 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("<br>")
|
||||
' sbTablas.Append("<br>")
|
||||
' 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("<table border='1' style='border-collapse:collapse; width:100%;'>")
|
||||
' If table.Columns(0).ColumnName = ColumnaTitulo AndAlso table.Rows.Count > 0 Then html.AppendFormat(" <caption style='background-color:#333333;'>{0}</caption>", table.Rows(0)(ColumnaTitulo))
|
||||
' html.Append("<thead style='background-color:#DDD; padding: 0px;'><tr>")
|
||||
|
||||
' For Each column As DataColumn In table.Columns
|
||||
' If ColumnaTitulo <> column.ColumnName Then html.Append($"<th style='padding:5px; text-align:left;'>{column.ColumnName}</th>")
|
||||
' Next
|
||||
|
||||
' html.Append("</tr></thead>")
|
||||
' html.Append("<tbody>")
|
||||
' Dim numericValue As Decimal = Nothing
|
||||
|
||||
' For Each row As DataRow In table.Rows
|
||||
' html.Append("<tr>")
|
||||
|
||||
' 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($"<td style='padding:5px; text-align:right;'>{cellValue}</td>")
|
||||
' Else
|
||||
' cellValue = If(value?.ToString(), String.Empty)
|
||||
' html.Append($"<td style='padding:5px; text-align:left;'>{cellValue}</td>")
|
||||
' End If
|
||||
' End If
|
||||
' Next
|
||||
|
||||
' html.Append("</tr>")
|
||||
' Next
|
||||
|
||||
' html.Append("</tbody>")
|
||||
' html.Append("</table>")
|
||||
' 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($"<b><center>Reporte Diario {DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss")}</center><b><br><br>")
|
||||
'sbTablas.Append($"<b><center>Reporte Diario {DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss")}</center><b><br><br>")
|
||||
|
||||
sbTablas.AppendLine($"<div style='font-family: Arial, sans-serif; margin: 20px; padding: 20px; background-color: #f4f4f4;'>
|
||||
<div style='width: 90%; margin: auto; background: white; padding: 20px; border-radius: 10px; box-shadow: 0px 0px 10px 0px #aaa; '>
|
||||
<table style='width:100%'>
|
||||
<td style='width:33%'><img src='https://sig.adssistemas.mx/imagenes/u248.png' style='width:210px;height:95px'></td>
|
||||
<td style='width:33%'><h1 style='text-align: center;'>Reporte Diario</h1></td>
|
||||
<td style='width:33%;text-align:right'><img src='https://sig.adssistemas.mx/imagenes/u8.svg' style='width:56px;height:56px'></td>
|
||||
</table>
|
||||
<h2 style='text-align: center;'>{DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss")}</h2>")
|
||||
|
||||
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("</div></div>")
|
||||
|
||||
|
||||
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("<table border='1' style='border-collapse:collapse; width:100%;'>")
|
||||
html.Append("<table style='width: 100%; border-collapse: collapse; margin-top: 20px;'>")
|
||||
If table.Columns(0).ColumnName = ColumnaTitulo AndAlso table.Rows.Count > 0 Then html.AppendFormat(" <caption style='background-color:#333333;'>{0}</caption>", table.Rows(0)(ColumnaTitulo))
|
||||
html.Append("<thead style='background-color:#DDD; padding: 0px;'><tr>")
|
||||
html.Append("<tr>")
|
||||
|
||||
For Each column As DataColumn In table.Columns
|
||||
If ColumnaTitulo <> column.ColumnName Then html.Append($"<th style='padding:5px; text-align:left;'>{column.ColumnName}</th>")
|
||||
If ColumnaTitulo <> column.ColumnName Then html.Append($"<th style='border: 1px solid #ddd; padding: 8px; text-align: center; color:#dbb19a; '>{column.ColumnName}</th>")
|
||||
Next
|
||||
|
||||
html.Append("</tr></thead>")
|
||||
html.Append("</thead>")
|
||||
html.Append("<tbody>")
|
||||
Dim numericValue As Decimal = Nothing
|
||||
|
||||
@@ -1368,10 +1461,10 @@ Public Class TareasProgramadas : Implements IHttpHandler, IReadOnlySessionState
|
||||
cellValue = ""
|
||||
End If
|
||||
|
||||
html.Append($"<td style='padding:5px; text-align:right;'>{cellValue}</td>")
|
||||
html.Append($"<td style='border: 1px solid #ddd; padding: 8px; text-align: center;'>{cellValue}</td>")
|
||||
Else
|
||||
cellValue = If(value?.ToString(), String.Empty)
|
||||
html.Append($"<td style='padding:5px; text-align:left;'>{cellValue}</td>")
|
||||
html.Append($"<td style='border: 1px solid #ddd; padding: 8px; text-align: center;'>{cellValue}</td>")
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
@@ -1494,36 +1494,36 @@
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tools">
|
||||
<table width="325px">
|
||||
<tr>
|
||||
<td width="50px">Compra:</td>
|
||||
<td width="250px">
|
||||
<asp:DropDownList ID="DDLDevolucion" Style="width: 100%" AutoPostBack="true" runat="server" CssClass="form-control input-sm select2me " DataTextField="Compra" DataValueField="CveCompra"></asp:DropDownList>
|
||||
</td>
|
||||
<td width="25px">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="row">
|
||||
<div class="col-md-6" id="DivAlmacenDev" runat="server" visible="false">
|
||||
<table width="275px">
|
||||
<tr>
|
||||
<td width="50px">Almacen:</td>
|
||||
<td width="200px">
|
||||
<asp:DropDownList ID="DdlAlmacenDevolucion" Style="width: 100%" AutoPostBack="true" runat="server" CssClass="form-control input-sm select2me " DataTextField="Almacen" DataValueField="CveAlmacen"></asp:DropDownList>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<table width="325px">
|
||||
<tr>
|
||||
<td width="50px">Compra:</td>
|
||||
<td width="250px">
|
||||
<asp:DropDownList ID="DDLDevolucion" Style="width: 100%" AutoPostBack="true" runat="server" CssClass="form-control input-sm select2me " DataTextField="Compra" DataValueField="CveCompra"></asp:DropDownList>
|
||||
</td>
|
||||
<td width="25px">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<div id="DivAlmacenDev" runat="server" visible="false" class="row">
|
||||
<div class="col-md-12">
|
||||
<table width="325px">
|
||||
<tr>
|
||||
<td width="50px">Almacen:</td>
|
||||
<td width="250px">
|
||||
<asp:DropDownList ID="DdlAlmacenDevolucion" Style="width: 100%" AutoPostBack="true" runat="server" CssClass="form-control input-sm select2me " DataTextField="Almacen" DataValueField="CveAlmacen"></asp:DropDownList>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
<asp:GridView ID="GVDevolucion" runat="server" DataKeyNames="CveMovimientoDetalle,CveAlmacen,Total,PU,Cantidad,CvePS,CveUM,UM,CveClasificacion,Clasificacion,CodigoPS,CveTipoPS,PUExtranjero" ShowFooter="true" GridLines="None" AutoGenerateColumns="false" EmptyDataText="Aun no hay registros." ShowHeaderWhenEmpty="True" Width="100%" CssClass="table table-striped table-hover Widthall">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="60px" ItemStyle-HorizontalAlign="Right">
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -675,7 +675,7 @@
|
||||
<asp:HiddenField runat="server" ID="HdnCodAFEdit" Value="-1" ClientIDMode="Static" />
|
||||
|
||||
<asp:GridView ID="GvM" runat="server" GridLines="none" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn" EmptyDataText="Aún no hay registros."
|
||||
DataKeyNames="No,CveMovimientoDetalle,Cantidad,CvePS,CveUM,PU,Observaciones,CodigoPS,UnidadMedida,CveAF,Serie,Lote,FechaCaducidad,CveSeccionAlmacen,Codigo" AutoGenerateColumns="False" AllowPaging="False" ShowFooter="True">
|
||||
DataKeyNames="No,CveMovimientoDetalle,Cantidad,CvePS,CveUM,PU,Observaciones,CodigoPS,UnidadMedida,CveAF,Serie,Lote,FechaCaducidad,CveSeccionAlmacen,Codigo,Total" AutoGenerateColumns="False" AllowPaging="False" ShowFooter="True">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="" ItemStyle-Font-Size="6pt">
|
||||
<EditItemTemplate>
|
||||
|
||||
@@ -287,6 +287,23 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
Public Property TotalOriginalEdit() As Decimal
|
||||
Get
|
||||
|
||||
If ViewState("TotalOriginalEdit") Is Nothing Then
|
||||
ViewState("TotalOriginalEdit") = 0D
|
||||
End If
|
||||
|
||||
Return ViewState("TotalOriginalEdit").ToString.ToDecimal
|
||||
End Get
|
||||
Set(value As Decimal)
|
||||
ViewState("TotalOriginalEdit") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
Public Property IndexActualTabla() As Integer
|
||||
Get
|
||||
|
||||
@@ -1534,7 +1551,20 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
If CveMovimiento > 0 Then
|
||||
If CveMovimientoDetalleEdit > 0 Then
|
||||
|
||||
If CveCompra > 0 Then
|
||||
Dim TotalActual As Decimal = (txtCantidad.Text.ToDecimal * txtPrecio.Text.ToDecimal)
|
||||
Dim Diferencia As Decimal = Math.Abs(TotalOriginalEdit - TotalActual).RoundSQL(2)
|
||||
|
||||
If Diferencia > 0 Then
|
||||
Alert($"Existe una diferencia de {Diferencia.ToString("###,###,###.00")} entre el total anterior ({TotalOriginalEdit.ToString("###,###,###.00")}) y actual({TotalActual.ToString("###,###,###.00")}).", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
ActualizarPS()
|
||||
|
||||
Else
|
||||
AgregarPS()
|
||||
End If
|
||||
@@ -2894,6 +2924,8 @@ Partial Class Inventarios_EntradasSalidas
|
||||
Protected Sub imgE_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
TotalOriginalEdit = 0D
|
||||
CveMovimientoDetalleEdit = -1
|
||||
|
||||
'Dim i As Integer = e.NewEditIndex
|
||||
'GvM.EditIndex =
|
||||
@@ -2903,7 +2935,8 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
If CveMovimiento > 0 Then
|
||||
CveMovimientoDetalleEdit = GvRow.DataKey("CveMovimientoDetalle").ToEntero
|
||||
txtCantidad.Enabled = False
|
||||
TotalOriginalEdit = GvRow.DataKey("Total").ToDecimal
|
||||
'txtCantidad.Enabled = False
|
||||
'DdlClasificacion.Enabled = False
|
||||
DdlProducto2.Enabled = False
|
||||
'DdlUnidad.Enabled = False
|
||||
|
||||
@@ -436,20 +436,7 @@
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpOCS" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="col-md-1" style="text-align:right!important">
|
||||
|
||||
<div id="DivIndicadorOC2" runat="server" visible="false" >
|
||||
<div style=" color: gray;font-size: 12px;font-weight: bold;">
|
||||
OC
|
||||
</div>
|
||||
<div style=" color: blue; font-size: 20px; font-weight: bold;">
|
||||
<asp:LinkButton ID="LnkIndicador_OC2" Text="" OnClick="LnkIndicador_OC_Click" runat="server" CssClass="Texto" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="col-md-1" style="text-align:right!important">
|
||||
<div id="DivIndicadorL1" runat="server" visible="false" >
|
||||
@@ -475,6 +462,19 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1" style="text-align:right!important">
|
||||
|
||||
<div id="DivIndicadorOC2" runat="server" visible="false" >
|
||||
<div style=" color: gray;font-size: 12px;font-weight: bold;">
|
||||
OC
|
||||
</div>
|
||||
<div style=" color: blue; font-size: 20px; font-weight: bold;">
|
||||
<asp:LinkButton ID="LnkIndicador_OC2" Text="" OnClick="LnkIndicador_OC_Click" runat="server" CssClass="Texto" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
@@ -34643,7 +34643,11 @@ Partial Class Ventas
|
||||
Dim ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetRemisionesSinFacturar(TxtFechaIRem.Text, TxtFechaFRem.Text, CveCliente, CveContrato, 1, CveMoneda) Then
|
||||
If CveContrato = -1 Then
|
||||
DTRemisiones = ObjVentas.DtResultados.FiltraParametros("CveContrato = 0")
|
||||
If UsuarioActual.CveEmpresa = 188 Then
|
||||
DTRemisiones = ObjVentas.DtResultados
|
||||
Else
|
||||
DTRemisiones = ObjVentas.DtResultados.FiltraParametros("CveContrato = 0")
|
||||
End If
|
||||
Else
|
||||
DTRemisiones = ObjVentas.DtResultados.FiltraParametros($"CveContrato = {CveContrato}")
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user