This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2019-09-10 20:55:18 -07:00
20 changed files with 1787 additions and 1618 deletions

View File

@@ -27,7 +27,7 @@
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvChofer.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvChofer.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
<asp:GridView ID="GvChofer" runat="server" GridLines="None" data-sort="true" DataKeyNames="CveChofer,Chofer,Estatus,FechaIng,CveUsuario,CveEmpresa,Usuario,CveTransportista" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" ToolTip="Listado de Choferes">
<asp:GridView ID="GvChofer" runat="server" GridLines="None" data-sort="true" DataKeyNames="CveChofer,Chofer,Estatus,FechaIng,CveUsuario,CveEmpresa,Usuario,CveTransportista,Identificacion,Domicilio,Telefono,Ciudad,Licencia" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" ToolTip="Listado de Choferes">
<Columns>
<asp:BoundField DataField="Chofer" HeaderText="Chofer" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="Transportista" HeaderText="Transportista" ItemStyle-HorizontalAlign="Left" />
@@ -69,10 +69,43 @@
<asp:RequiredFieldValidator ID="RFVChofer" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtChofer" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Chofer''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
<label for="<%= TxtChofer.ClientID.ToString()%>">Chofer:</label>
</div>
<br />
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlTransportista" DataValueField="CveTransportista" DataTextField="Transportista" runat="server" CssClass="form-control select2me" AppendDataBoundItems="true" Width="200px"></asp:DropDownList>
<label for="<%= DdlTransportista.ClientID.ToString()%>">Transportista:</label>
</div>
<br />
<div class="form-group form-md-line-input input-iconright" style="width:150px;">
<asp:TextBox ID="TxtIdentificacion" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="50"></asp:TextBox>
<%--<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtIdentificacion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Identificación''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>--%>
<label for="<%= TxtIdentificacion.ClientID.ToString()%>">Identificación:</label>
</div>
<br />
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtDomicilio" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="50"></asp:TextBox>
<%--<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtDomicilio" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Domicilio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>--%>
<label for="<%= TxtDomicilio.ClientID.ToString()%>">Domicilio:</label>
</div>
<br />
<div class="form-group form-md-line-input input-iconright" style="width:150px;">
<asp:TextBox ID="TxtTelefono" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FTETelefono" runat="server" TargetControlID="TxtTelefono" FilterType="Custom, Numbers" />
<%--<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtTelefono" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Teléfono''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>--%>
<label for="<%= TxtTelefono.ClientID.ToString()%>">Teléfono:</label>
</div>
<br />
<div class="form-group form-md-line-input input-iconright" style="width:150px;">
<asp:TextBox ID="TxtCiudad" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="50"></asp:TextBox>
<%--<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtCiudad" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Ciudad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>--%>
<label for="<%= TxtCiudad.ClientID.ToString()%>">Ciudad:</label>
</div>
<br />
<div class="form-group form-md-line-input input-iconright" style="width:150px;">
<asp:TextBox ID="TxtLicencia" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="50"></asp:TextBox>
<%--<asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtLicencia" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Licencia''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>--%>
<label for="<%= TxtLicencia.ClientID.ToString()%>">Licencia:</label>
</div>
<br />
<div class="form-group form-md-line-input input-iconright" id="divEstatus" runat="server">
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="form-control" />
<label for="<%= ChkEstatus.ClientID.ToString()%>">Estatus:</label>

View File

@@ -47,12 +47,12 @@ Partial Class Acarreos_CatChoferes
Dim Estatus = 0
If ChkEstatus.Checked Then Estatus = 1
If HdnModalidad.Value = "A" Then
If ObjAcar.AddChofer(TxtChofer.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlTransportista.SelectedValue) Then
If ObjAcar.AddChofer(TxtChofer.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlTransportista.SelectedValue, TxtIdentificacion.Text.Trim, TxtDomicilio.Text.Trim, TxtTelefono.Text.Trim, TxtCiudad.Text.Trim, TxtLicencia.Text.Trim) Then
CargaDatos()
Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion)
End If
ElseIf HdnModalidad.Value = "U" Then
If ObjAcar.UpdateChofer(HdnID.Value, TxtChofer.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Estatus, DdlTransportista.SelectedValue) Then
If ObjAcar.UpdateChofer(HdnID.Value, TxtChofer.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Estatus, DdlTransportista.SelectedValue, TxtIdentificacion.Text.Trim, TxtDomicilio.Text.Trim, TxtTelefono.Text.Trim, TxtCiudad.Text.Trim, TxtLicencia.Text.Trim) Then
CargaDatos()
Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion)
End If
@@ -71,6 +71,11 @@ Partial Class Acarreos_CatChoferes
BtnAgregarChofer.Text = "Actualizar"
myModalLabel.InnerText = "Actualizar Chofer"
TxtChofer.Text = GvRow.DataKey("Chofer")
TxtIdentificacion.Text = GvRow.DataKey("Identificacion")
TxtDomicilio.Text = GvRow.DataKey("Domicilio")
TxtTelefono.Text = GvRow.DataKey("Telefono")
TxtCiudad.Text = GvRow.DataKey("Ciudad")
TxtLicencia.Text = GvRow.DataKey("Licencia")
DdlTransportista.SelectedValueExist(GvRow.DataKey("CveTransportista"))
divEstatus.Visible = True
ChkEstatus.Checked = CBool(GvRow.DataKey("Estatus"))
@@ -84,6 +89,11 @@ Partial Class Acarreos_CatChoferes
BtnAgregarChofer.Text = "Agregar"
myModalLabel.InnerText = "Agregar Chofer"
TxtChofer.Text = ""
TxtIdentificacion.Text = ""
TxtDomicilio.Text = ""
TxtTelefono.Text = ""
TxtCiudad.Text = ""
TxtLicencia.Text = ""
ChkEstatus.Checked = True
divEstatus.Visible = False
UpAddChofer.Update()

View File

@@ -109,7 +109,7 @@ Public Class ClsAcarreos
#Region "Choferes"
Public Function AddChofer(Chofer As String, CveUsuario As Integer, CveEmpresa As Integer, CveTransportista As Integer) As Boolean
Public Function AddChofer(Chofer As String, CveUsuario As Integer, CveEmpresa As Integer, CveTransportista As Integer, Identificacion As String, Domicilio As String, Telefono As String, Ciudad As String, Licencia As String) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Acar_ChoferesAdd")
With SqlAdapter.SelectCommand.Parameters
@@ -117,6 +117,11 @@ Public Class ClsAcarreos
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveTransportista", SqlDbType.Int).Value = CveTransportista
.Add("@Identificacion", SqlDbType.VarChar).Value = Identificacion
.Add("@Domicilio", SqlDbType.VarChar).Value = Domicilio
.Add("@Telefono", SqlDbType.VarChar).Value = Telefono
.Add("@Ciudad", SqlDbType.VarChar).Value = Ciudad
.Add("@Licencia", SqlDbType.VarChar).Value = Licencia
End With
Try
SqlAdapter.Fill(Data)
@@ -128,7 +133,7 @@ Public Class ClsAcarreos
Return Retorno
End Function
Public Function UpdateChofer(CveChofer As Integer, Chofer As String, CveUsuario As Integer, CveEmpresa As Integer, Estatus As Integer, CveTransportista As Integer) As Boolean
Public Function UpdateChofer(CveChofer As Integer, Chofer As String, CveUsuario As Integer, CveEmpresa As Integer, Estatus As Integer, CveTransportista As Integer, Identificacion As String, Domicilio As String, Telefono As String, Ciudad As String, Licencia As String) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Acar_ChoferesUpdate")
With SqlAdapter.SelectCommand.Parameters
@@ -138,7 +143,11 @@ Public Class ClsAcarreos
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@Estatus", SqlDbType.Int).Value = Estatus
.Add("@CveTransportista", SqlDbType.Int).Value = CveTransportista
.Add("@Identificacion", SqlDbType.VarChar).Value = Identificacion
.Add("@Domicilio", SqlDbType.VarChar).Value = Domicilio
.Add("@Telefono", SqlDbType.VarChar).Value = Telefono
.Add("@Ciudad", SqlDbType.VarChar).Value = Ciudad
.Add("@Licencia", SqlDbType.VarChar).Value = Licencia
End With
Try
SqlAdapter.Fill(Data)

View File

@@ -300,7 +300,8 @@ Public Class ClsInventarios
Return Retorno
End Function
Public Function GetRepAlmacenes(FechaInicio As String, FechaFin As String, CveEmpresa As Integer, CveTipoAlmacen As String, Contabilizable As Integer, Inventariable As Boolean, Optional SoloMovimientosContables As Boolean = False) As Boolean
Public Function GetRepAlmacenes(FechaInicio As String, FechaFin As String, CveEmpresa As Integer, CveTipoAlmacen As String, Contabilizable As Integer, Inventariable As Boolean,
Optional SoloMovimientosContables As Boolean = False, Optional Almacenes As String = "-1", Optional CveSubProyecto As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Inv_AlmacenesRepGet")
@@ -311,7 +312,9 @@ Public Class ClsInventarios
.Add("@CveTipoAlmacen", SqlDbType.VarChar).Value = CveTipoAlmacen
.Add("@Inventariable", SqlDbType.Bit).Value = Inventariable
.Add("@SoloMovimientosContables", SqlDbType.Bit).Value = SoloMovimientosContables
.Add("@Modalidad", SqlDbType.Int).Value = Contabilizable
.Add("@Modalidad", SqlDbType.Int).Value = Contabilizable
.Add("@Almacenes", SqlDbType.VarChar).Value = Almacenes
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
End With
Try
SqlAdapter.Fill(Data)
@@ -2415,15 +2418,15 @@ Public Class ClsInventarios
Return Retorno
End Function
Public Function GetInventarioFisicoDetalle(CveInventarioFisico As Integer, CveUsuario As Integer) As Boolean
Public Function GetInventarioFisicoDetalle(CveInventarioFisico As Integer, CveUsuario As Integer, Optional Agrupar As Boolean = False) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Inv_InventarioFisicoDetalleGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveInventarioFisico", SqlDbType.Int).Value = CveInventarioFisico
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@Agrupar", SqlDbType.Bit).Value = Agrupar
End With
Try
@@ -2438,10 +2441,10 @@ Public Class ClsInventarios
End Try
Return Retorno
End Function
End Function
#End Region
#Region "I N V E N T A R I O - F I S I C O - R E S U L T A D O"
Public Function AddInventarioFisicoResultados(CveInventarioFisico As Integer, CveUsuario As Integer) As Boolean
Dim Retorno As Boolean = False

View File

@@ -1574,16 +1574,16 @@ Public Class ClsOS
Return Retorno
End Function
Public Function RemoveEstatusUsuarios(CveEstatusUsuarios As Integer) As Boolean
Public Function RemoveEstatusUsuarios(CveEstatus As Integer, CveUsuario As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_OS_EstatusUsuariosRemove")
With SqlAdapter.SelectCommand.Parameters
SqlAdapter.SelectCommand.Parameters.Add("@CveEstatusUsuario", SqlDbType.Int).Value = CveEstatusUsuarios
.Add("@CveEstatusOrdenServicio", SqlDbType.Int).Value = CveEstatus
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
End With
Try
SqlAdapter.Fill(Data)
Retorno = True

View File

@@ -380,7 +380,6 @@
<asp:Literal ID="LtlDescrip" runat="server" Text='<%# Eval("Descripcion", "<div>{0}</div>")%>'></asp:Literal>
<span style='display: none'><%# Eval("RazonSocial")%></span>
</ItemTemplate>
<HeaderTemplate>
<div>
<asp:LinkButton ID="LbMoneda_RazonSocial" runat="server" CausesValidation="false" Text="Proveedor" OnClick="LbOrden_Click" CommandArgument="Moneda,RazonSocial"></asp:LinkButton>&nbsp;<asp:ImageButton ID="ImgMoneda_RazonSocial" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" OnClick="LbOrden_Click" CommandArgument="Moneda,RazonSocial" />/<asp:LinkButton ID="LbMoneda_OrdenMonedaProveedor_SerieFolio" runat="server" CausesValidation="false" Text="Factura" OnClick="LbOrden_Click" CommandArgument="Moneda,OrdenMonedaProveedor,SerieFolio"></asp:LinkButton>&nbsp;<asp:ImageButton ID="ImgMoneda_OrdenMonedaProveedor_SerieFolio" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" OnClick="LbOrden_Click" CommandArgument="Moneda,OrdenMonedaProveedor,SerieFolio" />

View File

@@ -3,10 +3,10 @@ Imports Extensiones
Imports Microsoft.Reporting.WebForms
Partial Class Bancos_RepProgramarRecursos
Inherits ClsPaginas
Inherits ClsPaginas
#Region "P R O P I E D A D E S"
Private Property DtDatos As DataTable
Get
Return CType(ViewState("DtDatos"), DataTable)
@@ -80,9 +80,9 @@ Partial Class Bancos_RepProgramarRecursos
Set(value As String)
ViewState("UsuarioProgramo") = value
End Set
End Property
End Property
#End Region
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
DdlUsuarioProgramo.Visible = False
@@ -501,7 +501,6 @@ Partial Class Bancos_RepProgramarRecursos
Protected Sub BtnProgramar_Click(sender As Object, e As EventArgs) Handles BtnProgramar.Click
Dim CveUsuario As Integer = UsuarioActual.CveUsuario
If UsuarioActual.Empresa.Funcionalidad(138) = "1" Then
'Validación del SAT - DF 21/01/17
Dim Validada As Boolean = False
@@ -596,18 +595,18 @@ Partial Class Bancos_RepProgramarRecursos
MsgError &= "No se pudo programar la factura </br>"
End If
End If
Next
TxtCodigoP.Text = ""
Next
Comp.Dispose()
TxtCodigoP.Text = ""
If MsgError <> "" Then
Alert(MsgError, TipoMensaje.MsgError)
Else
Alert("La programación se guardó correctamente", TipoMensaje.MsgInformacion)
Alert("La programación se guardó correctamente", TipoMensaje.MsgInformacion)
EnviaCorreoNotificacion()
End If
Comp.Dispose()
CargaDatos()
'Recarga DdlUsuarioProgramo
@@ -623,6 +622,105 @@ Partial Class Bancos_RepProgramarRecursos
End If
ObjUsuarios.Dispose()
End Sub
Private Sub EnviaCorreoNotificacion()
If UsuarioActual.CveEmpresa = 13 Then
Dim strBody As New StringBuilder
Try
strBody.Append("<html xmlns=""http://www.w3.org/1999/xhtml""> ")
strBody.Append("<head> ")
strBody.Append(" <style type=""text/css""> ")
strBody.Append(" body ")
strBody.Append(" { ")
strBody.Append(" margin:0px; ")
strBody.Append(" padding:0px 0px 0px 0px; ")
strBody.Append(" font-family: Verdana, Arial, Helvetica, sans-serif; ")
strBody.Append(" font-size: 10px; ")
strBody.Append(" background-color:#F0F0F0; ")
strBody.Append(" } ")
strBody.Append(" a.Texto ")
strBody.Append(" { ")
strBody.Append(" font-size:11px; ")
strBody.Append(" background-color:#F7F6F3; ")
strBody.Append(" text-decoration:none; ")
strBody.Append(" font-weight:bold; ")
strBody.Append(" } ")
strBody.Append(" .Texto ")
strBody.Append(" { ")
strBody.Append(" background-color:#F7F6F3; color:Black; font-family:Verdana; font-size:10px; text-align:center; vertical-align:middle; height:20px;")
strBody.Append(" } ")
strBody.Append(" .TextoAlterno ")
strBody.Append(" { ")
strBody.Append(" background-color:White; color:Black; font-family:Verdana; font-size:10px; text-align:center; ")
strBody.Append(" vertical-align:middle; height:20px;")
strBody.Append(" } ")
strBody.Append(" .BarraIdentidad ")
strBody.Append(" { ")
strBody.Append(" color:#FFFFFF; ")
strBody.Append(" background:#F0F0F0; ")
strBody.Append(" font-weight:bold; ")
strBody.Append(" font-size:19px; ")
strBody.Append(" font-style:oblique; ")
strBody.Append(" } ")
strBody.Append(" .Titulos ")
strBody.Append(" { ")
strBody.Append(" background-color: Gray;")
strBody.Append(" color:White; ")
strBody.Append(" font-family:Verdana; font-size:12px; text-align:center; ")
strBody.Append(" vertical-align:middle; font-weight:bold; height:30px; ")
strBody.Append(" text-decoration:none; ")
strBody.Append(" } ")
strBody.Append(" .Verde {color: #00CC00;} ")
strBody.Append(" .Negro {color: #000000;} ")
strBody.Append(" .Rojo {color: #FF0000;} ")
strBody.Append(" </style> ")
strBody.Append("</head> ")
strBody.Append("<body> ")
'Cargo el detalle
strBody.Append(" <div style='width: 550px'> ")
strBody.Append(" <fieldset> ")
strBody.Append(" <legend>Compras Programadas</legend> ")
strBody.Append(" <table width=""550px""><tr style='background-color:gray;color:White;font-family:Verdana;font-size:10px;text-align:center;vertical-align:middle;font-weight:bold;height:20px;text-decoration:none;'>")
strBody.Append(" <th scope='col' style='width: 100px'>Serie-Folio</th> <th scope='col' style='width: 100px'>Fecha</th><th scope='col' style='width: 120px'>Importe</th><th scope='col' style='width: 100px'>Importe Programado</th></tr>")
For Each gvr As GridViewRow In Gv.Rows
If gvr.FCCheckBox("Chk").Checked Then
Dim SerieFolio = gvr.DataKey("SerieFolio")
Dim Importe = gvr.DataKey("Original").ToDouble.FormatoNumero()
Dim ImporteProgramo = gvr.FCTextBox("TxtS").Text.ToDouble.FormatoNumero()
strBody.Append($"<tr class='Texto'><td>{SerieFolio}</td><td>{DateTime.Now}</td><td style='text-align: right;'><span >{Importe}</span></td><td style='text-align: right;'>{ImporteProgramo}</td></tr>")
End If
Next
strBody.Append(" </table> ")
strBody.Append(" </fieldset> ")
strBody.Append(" </div> ")
strBody.Append("</body></html>")
Try
Dim Correo As String = "" '"rpenunuriv@hotmail.com"
'Rafael Peñuñuri
Dim ObjUsuarios As New ClsSisUsuarios
If ObjUsuarios.GetUsuarios(293) Then
If ObjUsuarios.DtResultados.Rows.Count > 0 Then
Correo = ObjUsuarios.DtResultados.Rows(0)("Correo").ToString()
End If
End If
ObjUsuarios.Dispose()
Dim Asunto As String = "SIG - Se programaron las siguientes facturas"
Dim Mail As New ClsSisMail()
Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Correo, Asunto, strBody.ToString())
Catch ex As Exception
OnError("Ocurrió error al mandar MAIL por cambio de Estatus", ex)
End Try
Catch ex As Exception
OnError("Ocurrio un error al general el correo.", ex)
End Try
End If
End Sub
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
CargaDatos()
End Sub
@@ -795,8 +893,8 @@ Partial Class Bancos_RepProgramarRecursos
End If
ObjMovimientos.Dispose()
End If
End Sub
End Sub
#Region "C R E D I T O S - V E N C I M I E N T O"
Private Sub CargaCreditosVencimiento()
Dim ObjCreditos As New ClsBancos
@@ -826,9 +924,9 @@ Partial Class Bancos_RepProgramarRecursos
End If
GvV.DataBind()
UPDatos.Update()
End Sub
End Sub
#End Region
End Class

View File

@@ -7951,7 +7951,7 @@ Partial Class Compras_Compras
ImporteMovimiento = 0
IdCtaContable = 0
CveCuenta = 0
Dim Concepto As String = ""
Dim Concepto As String = String.Format("{0}-{1}", TxtSerie.Text, TxtFolio.Text)
Dim importeMN As Decimal = 0
Dim Multiplicador As Integer = If(Row("Multiplicador").ToString.ToEntero = 1, 1, -1)
Dim PorcentajeImpuesto As Decimal = 0
@@ -13440,7 +13440,7 @@ Partial Class Compras_Compras
Protected Sub BtnRefacturacionVer_Click(sender As Object, e As EventArgs) Handles BtnRefacturacionVer.Click
Dim Opcion As Integer = 1
If UsuarioActual.CveEmpresa = 119 Then Opcion = 2
If UsuarioActual.CveEmpresa.Contiene(119, 72) Then Opcion = 2
Dim ObjCompras As New ClsCompras
@@ -14553,7 +14553,7 @@ Partial Class Compras_Compras
End If
End If
If Math.Abs(HdnIEPSModificadoOC.Value.ToDecimal - LbIEPSOC2.Text.ToDecimal) > 0.05 Then
If Math.Abs(HdnIEPSModificadoOC.Value.ToDecimal - LbIEPSOC2.Text.ToDecimal) > 0.05 AndAlso UsuarioActual.CveEmpresa.Contiene(119) Then
Alert($"Hay una diferencia de IEPS entre la factura y la OC. Dif: {HdnIEPSModificadoOC.Value.ToDecimal - LbIEPSOC2.Text.ToDecimal}", TipoMensaje.MsgAdvertencia)
Exit Sub
End If

File diff suppressed because it is too large Load Diff

View File

@@ -1,336 +1,342 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="InventarioFisicoDetalle.aspx.vb" Inherits="Inventarios_InventarioFisicoDetalle" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
<style>
#C_TxtHoraInicio_picker {
position: fixed !important;
}
.grides > tbody > tr > td:nth-child(3), .grides > tbody > tr > td:nth-child(3) {
width: 250px;
}
#C_myhidenbutton {
display: none;
}
.psagregar {
width: 450px;
}
.psagregar > div.comboxes {
display: inline-block;
width: 400px;
}
.table-scrollable {
margin-top: 0px !important;
margin-bottom: 0px !important;
}
.Widthall {
width: 100% !important;
}
.dataTables_scrollHeadInner {
width: 100% !important;
background-color: #dddddd;
padding-left: 0px !important;
}
.dataTables_scrollFoot {
display: none;
position: static;
}
.table-scrollable {
margin: 0px !important;
}
.dataTables_scroll {
margin-bottom: 0px;
}
.table.dataTable {
margin-top: 0px !important;
}
.dataTables_scrollBody table th {
padding: 0px !important;
padding-right: 4px !important;
padding-left: 4px !important;
}
.sinlink td a {
pointer-events: none;
cursor: default;
color: black;
font-size: small;
}
.white a {
color: white !important;
}
.Derecha {
text-align: right;
}
.Izquierda {
text-align: left;
}
.SinColor th {
background-color: white;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
<li>
<asp:LinkButton ID="btnFin" runat="server" Text="Finalizar" data-toggle="confirmation" data-popout="true" data-original-title="Finalizar el inventario" data-btn-ok-label="si" />
</li>
<li>
<asp:LinkButton ID="LBAvance" OnClick="LBAvance_Click" runat="server" Text="Ver Avance" Visible="false" />
</li>
<li>
<asp:LinkButton ID="LnkPDF" runat="server"><i class="fa fa-ad-pdf"></i> Imprimir PDF</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkExcel" runat="server"><i class="fa fa-ad-excel"></i> Imprimir EXCEL</asp:LinkButton>
</li>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
Inventario Físico Detalle
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<div class="row" style="margin-left: 0px; margin-right: 0px;">
<div class="col-md-6" style="max-width: 545px;">
<div class="portlet smmallpadding light bordered infomov">
<div class="portlet-title">
<div class="tools">
<a href="javascript:;" class="expand"></a>
</div>
<div class="caption uppercase" style="position: relative;">
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="InventarioFisicoDetalle.aspx.vb" Inherits="Inventarios_InventarioFisicoDetalle" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
<style>
#C_TxtHoraInicio_picker {
position: fixed !important;
}
.grides > tbody > tr > td:nth-child(3), .grides > tbody > tr > td:nth-child(3) {
width: 250px;
}
#C_myhidenbutton {
display: none;
}
.psagregar {
width: 450px;
}
.psagregar > div.comboxes {
display: inline-block;
width: 400px;
}
.table-scrollable {
margin-top: 0px !important;
margin-bottom: 0px !important;
}
.Widthall {
width: 100% !important;
}
.dataTables_scrollHeadInner {
width: 100% !important;
background-color: #dddddd;
padding-left: 0px !important;
}
.dataTables_scrollFoot {
display: none;
position: static;
}
.table-scrollable {
margin: 0px !important;
}
.dataTables_scroll {
margin-bottom: 0px;
}
.table.dataTable {
margin-top: 0px !important;
}
.dataTables_scrollBody table th {
padding: 0px !important;
padding-right: 4px !important;
padding-left: 4px !important;
}
.sinlink td a {
pointer-events: none;
cursor: default;
color: black;
font-size: small;
}
.white a {
color: white !important;
}
.Derecha {
text-align: right;
}
.Izquierda {
text-align: left;
}
.SinColor th {
background-color: white;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
<li>
<asp:LinkButton ID="btnFin" runat="server" Text="Finalizar" data-toggle="confirmation" data-popout="true" data-original-title="Finalizar el inventario" data-btn-ok-label="si" />
</li>
<li>
<asp:LinkButton ID="LBAvance" OnClick="LBAvance_Click" runat="server" Text="Ver Avance" Visible="false" />
</li>
<li>
<asp:LinkButton ID="LnkPDF" runat="server"><i class="fa fa-ad-pdf"></i> Imprimir PDF</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkPDFResumido" runat="server"><i class="fa fa-ad-pdf"></i> Imprimir PDF Resumido</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkExcel" runat="server"><i class="fa fa-ad-excel"></i> Imprimir EXCEL</asp:LinkButton>
</li>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
Inventario Físico Detalle
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<div class="row" style="margin-left: 0px; margin-right: 0px;">
<div class="col-md-6" style="max-width: 545px;">
<div class="portlet smmallpadding light bordered infomov">
<div class="portlet-title">
<div class="tools">
<a href="javascript:;" class="expand"></a>
</div>
<div class="caption uppercase" style="position: relative;">
<i class="fa fa-info-circle"></i>Información del movimiento
</div>
</div>
<div class="portlet-body">
<table>
<tr>
<td class="col-md-4">
<label><b>Título: </b></label>
<asp:Label ID="lbTitulo" runat="server"></asp:Label>
</td>
<td class="col-md-4">
<label><b>SubProyecto: </b></label>
<asp:Label ID="lbSubProyecto" runat="server"></asp:Label>
</td>
<td class="col-md-4">
<label><b>Estatus: </b></label>
<asp:Label ID="lbEstatus" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td class="col-md-4">
<label><b>Fecha Inicio: </b></label>
<asp:Label ID="lbFechaI" runat="server"></asp:Label>
</td>
<td class="col-md-4">
<label><b>Fecha Fin: </b></label>
<asp:Label ID="lbFechaF" runat="server"></asp:Label>
</td>
<td class="col-md-4">
<label><b>Usuario: </b></label>
<asp:DropDownList ID="ddlUsuario" AutoPostBack="true" runat="server" AppendDataBoundItems="true" Class="form-control input-sm select2me" Style="width: 141px !important;" DataTextField="Nombre" DataValueField="CveUsuario">
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td colspan="3">&nbsp;&nbsp;&nbsp;<label><b>Almacenes:</b></label>&nbsp;<asp:Label ID="LblAlmacenes" runat="server" Text=""></asp:Label>
</td>
</tr>
<tr>
<td colspan="3">&nbsp;&nbsp;&nbsp;<label><b>Clasificaciones:</b></label>&nbsp;<asp:Label ID="LblClasif" runat="server" Text="Todas"></asp:Label>
<br />
&nbsp;&nbsp;&nbsp;<label><b>Clasificaciones Excluidas:</b></label>&nbsp;<asp:Label ID="LblClasificacionesExcluidas" runat="server" Text=""></asp:Label>
</td>
</tr>
<tr>
<td colspan="3">&nbsp;&nbsp;&nbsp;<label><b>Productos:</b></label>&nbsp;<asp:Label ID="LblProductos" runat="server" Text="Todos"></asp:Label>
<br />
&nbsp;&nbsp;&nbsp;<label><b>Productos Excluidos:</b></label>&nbsp;<asp:Label ID="LblProductosExcluidos" runat="server" Text=""></asp:Label>
</td>
</tr>
</table>
<table>
<tr>
<td class="col-md-12" style="width: 500px;">
<label><b>Observaciones: </b></label>
<asp:Label ID="lbObservaciones" runat="server" Style="width: 450px;"></asp:Label>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="col-md-3" id="PAgregar" runat="server">
<asp:UpdatePanel ID="UPAgregarPro" runat="server" RenderMode="Inline" ViewStateMode="Inherit" UpdateMode="Conditional">
<ContentTemplate>
<asp:Panel ID="PnlII" runat="server" DefaultButton="BtnGuardar">
<div class="portlet smmallpadding light bordered" id="DivCodigoBarras" runat="server">
<div class="portlet-title">
<div class="tools">
<a href="javascript:;" class="collapse"></a>
</div>
<div class="caption uppercase" style="position: relative;">
</div>
</div>
<div class="portlet-body">
<table>
<tr>
<td class="col-md-4">
<label><b>Título: </b></label>
<asp:Label ID="lbTitulo" runat="server"></asp:Label>
</td>
<td class="col-md-4">
<label><b>SubProyecto: </b></label>
<asp:Label ID="lbSubProyecto" runat="server"></asp:Label>
</td>
<td class="col-md-4">
<label><b>Estatus: </b></label>
<asp:Label ID="lbEstatus" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td class="col-md-4">
<label><b>Fecha Inicio: </b></label>
<asp:Label ID="lbFechaI" runat="server"></asp:Label>
</td>
<td class="col-md-4">
<label><b>Fecha Fin: </b></label>
<asp:Label ID="lbFechaF" runat="server"></asp:Label>
</td>
<td class="col-md-4">
<label><b>Usuario: </b></label>
<asp:DropDownList ID="ddlUsuario" AutoPostBack="true" runat="server" AppendDataBoundItems="true" Class="form-control input-sm select2me" Style="width: 141px !important;" DataTextField="Nombre" DataValueField="CveUsuario">
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td colspan="3">&nbsp;&nbsp;&nbsp;<label><b>Almacenes:</b></label>&nbsp;<asp:Label ID="LblAlmacenes" runat="server" Text=""></asp:Label>
</td>
</tr>
<tr>
<td colspan="3">&nbsp;&nbsp;&nbsp;<label><b>Clasificaciones:</b></label>&nbsp;<asp:Label ID="LblClasif" runat="server" Text="Todas"></asp:Label>
<br />
&nbsp;&nbsp;&nbsp;<label><b>Clasificaciones Excluidas:</b></label>&nbsp;<asp:Label ID="LblClasificacionesExcluidas" runat="server" Text=""></asp:Label>
</td>
</tr>
<tr>
<td colspan="3">&nbsp;&nbsp;&nbsp;<label><b>Productos:</b></label>&nbsp;<asp:Label ID="LblProductos" runat="server" Text="Todos"></asp:Label>
<br />
&nbsp;&nbsp;&nbsp;<label><b>Productos Excluidos:</b></label>&nbsp;<asp:Label ID="LblProductosExcluidos" runat="server" Text=""></asp:Label>
</td>
</tr>
</table>
<table>
<tr>
<td class="col-md-12" style="width: 500px;">
<label><b>Observaciones: </b></label>
<asp:Label ID="lbObservaciones" runat="server" Style="width: 450px;"></asp:Label>
</td>
</tr>
</table>
</div>
</div>
</div>
<asp:UpdatePanel ID="UPAgregarPro" runat="server" RenderMode="Inline" ViewStateMode="Inherit" UpdateMode="Conditional">
<ContentTemplate>
<div class="col-md-3" id="PAgregar" runat="server">
<asp:Panel ID="PnlII" runat="server" DefaultButton="BtnGuardar">
<div class="portlet smmallpadding light bordered" id="DivCodigoBarras" runat="server">
<div class="portlet-title">
<div class="tools">
<a href="javascript:;" class="collapse"></a>
</div>
<div class="caption uppercase" style="position: relative;">
<i class="fa fa-info-circle"></i>Agregar Producto
</div>
</div>
<div class="portlet-body">
<div class="row">
<label class="col-md-4">Cantidad</label>
<div class="col-md-8">
<asp:TextBox runat="server" ID="TxtCantidadProducto" Text="1" Width="50px"></asp:TextBox>
<asp:RequiredFieldValidator runat="server" ID="RFVCantidad" ControlToValidate="TxtCantidadProducto" ValidationGroup="GrpIngresar" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor ingrése una." Display="Dynamic" Text="*"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCOCantidad" runat="server" HighlightCssClass="vco" TargetControlID="RFVCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="row" style="margin-top: 5px;">
<label class="col-md-4">Código/NoParte</label>
<div class="col-md-8">
<asp:TextBox runat="server" ID="TxtCodigo"></asp:TextBox>
</div>
</div>
<div class="row" style="margin-top: 5px;">
<label class="col-md-4">Código.Barras</label>
<div class="col-md-8">
<asp:TextBox runat="server" ID="TxtCodigoBarras"></asp:TextBox>
</div>
</div>
<div class="row" style="margin-top: 5px;">
<label class="col-md-4">Serie</label>
<div class="col-md-8">
<asp:TextBox runat="server" ID="TxtCodigoSerie"></asp:TextBox>
<asp:RequiredFieldValidator runat="server" ID="RFVSerie" ControlToValidate="TxtCodigoSerie" Enabled="false" ValidationGroup="GrpIngresar" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Serie''</b> es necesario, por favor ingrése una." Display="Dynamic" Text="*"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCESerie" runat="server" HighlightCssClass="vco" TargetControlID="RFVSerie" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="row" style="margin-top: 5px;">
<div class="col-md-12" style="text-align: center;">
<asp:Button ID="BtnGuardar" runat="server" ValidationGroup="GrpIngresar" Text="Ingresar" class="btn btn-primary" Enabled="false" />
</div>
</div>
</div>
</div>
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
<asp:UpdatePanel ID="UPPInventario" runat="server" RenderMode="Inline" UpdateMode="Conditional">
<ContentTemplate>
<div class="row">
<label class="col-md-2"><b>Ultimo Registrado: </b></label>
<div class="col-md-8">
<asp:GridView ID="GvIFDUltimoRegistrado" ClientIDMode="Static" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False" GridLines="None" DataKeyNames="CveInventarioFisicoDetalle" ShowHeaderWhenEmpty="True" CssClass="table table-striped table-hover Widthall">
<Columns>
<asp:BoundField HeaderText="Fecha" DataField="FechaInvFisico" DataFormatString="{0:g}"></asp:BoundField>
<asp:BoundField HeaderText="Código Barras" DataField="CodigoBarras" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
<asp:BoundField HeaderText="Código" DataField="Codigo" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
<asp:BoundField HeaderText="Serie/Lote" DataField="SerieLote" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right"></asp:BoundField>
</Columns>
</asp:GridView>
</div>
<div class="col-md-2">
<asp:Button ID="BtnVerRegistrados" OnClick="BtnVerRegistrados_Click" runat="server" CssClass="btn btn-primary btn-sm" Text="Ver Registrados" />
</div>
</div>
<br />
<div class="row col-md-12" align="right" id="DivBuscador" runat="server">
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="return Filtrar(event);" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvIFD.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
<div style="display: inline-block;" id="SumFiltra"></div>
</div>
<asp:GridView ID="GvIFD" ClientIDMode="Static" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False" GridLines="None" DataKeyNames="CveInventarioFisicoDetalle" ShowHeaderWhenEmpty="True" CssClass="table table-striped table-hover Widthall">
<Columns>
<asp:BoundField HeaderText="Fecha" DataField="FechaInvFisico" DataFormatString="{0:g}"></asp:BoundField>
<asp:BoundField HeaderText="Código Barras" DataField="CodigoBarras" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
<asp:BoundField HeaderText="Código" DataField="Codigo" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
<asp:BoundField HeaderText="Serie/Lote" DataField="SerieLote" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right"></asp:BoundField>
<asp:TemplateField HeaderText="Eliminar" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-xs red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Estas seguro que desea eliminar el registro?" data-btn-ok-label="si" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="ddlUsuario" EventName="SelectedIndexChanged" />
</Triggers>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
<script src="/Scripts/DataTables.js"></script>
</div>
</div>
<div class="portlet-body">
<div class="row">
<label class="col-md-4">Cantidad</label>
<div class="col-md-8">
<asp:TextBox runat="server" ID="TxtCantidadProducto" Text="1" Width="50px"></asp:TextBox>
<asp:RequiredFieldValidator runat="server" ID="RFVCantidad" ControlToValidate="TxtCantidadProducto" ValidationGroup="GrpIngresar" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor ingrése una." Display="Dynamic" Text="*"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCOCantidad" runat="server" HighlightCssClass="vco" TargetControlID="RFVCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="row" style="margin-top: 5px;">
<label class="col-md-4">Código/NoParte</label>
<div class="col-md-8">
<asp:TextBox runat="server" ID="TxtCodigo"></asp:TextBox>
</div>
</div>
<div class="row" style="margin-top: 5px;">
<label class="col-md-4">Código.Barras</label>
<div class="col-md-8">
<asp:TextBox runat="server" ID="TxtCodigoBarras"></asp:TextBox>
</div>
</div>
<div class="row" style="margin-top: 5px;">
<label class="col-md-4">Serie</label>
<div class="col-md-8">
<asp:TextBox runat="server" ID="TxtCodigoSerie"></asp:TextBox>
<asp:RequiredFieldValidator runat="server" ID="RFVSerie" ControlToValidate="TxtCodigoSerie" Enabled="false" ValidationGroup="GrpIngresar" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Serie''</b> es necesario, por favor ingrése una." Display="Dynamic" Text="*"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCESerie" runat="server" HighlightCssClass="vco" TargetControlID="RFVSerie" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="row" style="margin-top: 5px;">
<div class="col-md-12" style="text-align: center;">
<asp:Button ID="BtnGuardar" runat="server" ValidationGroup="GrpIngresar" Text="Ingresar" class="btn btn-primary" Enabled="false" />
</div>
</div>
</div>
</div>
</asp:Panel>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<asp:UpdatePanel ID="UPPInventario" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="row">
<label class="col-md-2"><b>Ultimo Registrado: </b></label>
<div class="col-md-8">
<asp:GridView ID="GvIFDUltimoRegistrado" ClientIDMode="Static" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False" GridLines="None" DataKeyNames="CveInventarioFisicoDetalle" ShowHeaderWhenEmpty="True" CssClass="table table-striped table-hover Widthall">
<Columns>
<asp:BoundField HeaderText="Fecha" DataField="FechaInvFisico" DataFormatString="{0:g}"></asp:BoundField>
<asp:BoundField HeaderText="Código Barras" DataField="CodigoBarras" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
<asp:BoundField HeaderText="Código" DataField="Codigo" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
<asp:BoundField HeaderText="Serie/Lote" DataField="SerieLote" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right"></asp:BoundField>
</Columns>
</asp:GridView>
</div>
<div class="col-md-2">
<asp:Button ID="BtnVerRegistrados" OnClick="BtnVerRegistrados_Click" runat="server" CssClass="btn btn-primary btn-sm" Text="Ver Registrados" />
</div>
</div>
<br />
<div class="row col-md-12" align="right" id="DivBuscador" runat="server">
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="return Filtrar(event);" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvIFD.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
<div style="display: inline-block;" id="SumFiltra"></div>
</div>
<asp:GridView ID="GvIFD" ClientIDMode="Static" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False" GridLines="None" DataKeyNames="CveInventarioFisicoDetalle" ShowHeaderWhenEmpty="True" CssClass="table table-striped table-hover Widthall">
<Columns>
<asp:BoundField HeaderText="Fecha" DataField="FechaInvFisico" DataFormatString="{0:g}"></asp:BoundField>
<asp:BoundField HeaderText="Código Barras" DataField="CodigoBarras" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
<asp:BoundField HeaderText="Código" DataField="Codigo" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
<asp:BoundField HeaderText="Serie/Lote" DataField="SerieLote" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right"></asp:BoundField>
<asp:TemplateField HeaderText="Eliminar" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-xs red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Estas seguro que desea eliminar el registro?" data-btn-ok-label="si" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="ddlUsuario" EventName="SelectedIndexChanged" />
</Triggers>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
<script src="/Scripts/DataTables.js"></script>
<script type="text/javascript">
function pageLoad(sender, e) {
$(document).ready(function () {
$('a[class="ajax__tab_tab"]').click(function () {
$.fn.dataTable.tables({ visible: true, api: true }).columns.adjust();
});
});
function pageLoad(sender, e) {
$(document).ready(function () {
$('a[class="ajax__tab_tab"]').click(function () {
$.fn.dataTable.tables({ visible: true, api: true }).columns.adjust();
});
});
}
function Filtrar(e) {
function Filtrar(e) {
debugger;
if (e.keyCode == 13 || e.which == 13) {
return false;
if (e.keyCode == 13 || e.which == 13) {
return false;
} else {
<%= String.Format("FiltrarTabla('TxtBusqueda','{0}','SumFiltra')", GvIFD.ClientID) %>;
}
<%= String.Format("FiltrarTabla('TxtBusqueda','{0}','SumFiltra')", GvIFD.ClientID) %>;
}
}
function playsonidito(NomArchivo) {
function playsonidito(NomArchivo) {
var URL = /Sonidos/ + NomArchivo
var snd = new Audio(URL);
snd.play();
snd.currentTime = 0;
snd.currentTime = 0;
}
function OrdenarGV() {
$('#<%=GvIFD.ClientID%>').DataTable({
function OrdenarGV() {
$('#<%=GvIFD.ClientID%>').DataTable({
retrieve: true,
scrollY: '300px',
scrollCollapse: true,
paging: false,
searching: false,
info: false,
ordering: false
ordering: false
});
$('#GvIFD').parent().parent().children().first().css("position", "static");
$('#GvIFD').parent().parent().children().first().css("position", "static");
}
</script>
</asp:Content>
</script>
</asp:Content>

View File

@@ -88,44 +88,42 @@ Partial Class Inventarios_InventarioFisicoDetalle
#Region " CARGA DATOS "
Private Sub CargaDatos(CveInventarioFisico As Integer, CveEmpresa As Integer, Optional CveUsuario As Integer = -1)
Dim Inventario As New ClsInventarios
Dim ObjInventario As New ClsInventarios
If ObjInventario.GetInventarioFisico(CveInventarioFisico, CveEmpresa, -1, -1) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
Dim CveEstatus = ObjInventario.DtResultados.FiltroPrimeroValor("CveEstatus")
Select Case CveEstatus
Case "0" 'NUEVO
CveSubProyecto = ObjInventario.CveSubProyectoInventario
lbTitulo.Text = ObjInventario.InventarioFisico
lbObservaciones.Text = ObjInventario.Observaciones
lbSubProyecto.Text = ObjInventario.SubProyectoInventario
lbEstatus.Text = ObjInventario.Estatus
If Inventario.GetInventarioFisico(CveInventarioFisico, CveEmpresa, -1, -1) Then
Select Case Inventario.Estatus
Case "Nuevo"
CveSubProyecto = Inventario.CveSubProyectoInventario
lbTitulo.Text = Inventario.InventarioFisico
lbObservaciones.Text = Inventario.Observaciones
lbSubProyecto.Text = Inventario.SubProyectoInventario
lbEstatus.Text = Inventario.Estatus
lbFechaF.Text = Inventario.FechaF
lbFechaF.Text = ObjInventario.FechaF
btnFin.Text = "Iniciar"
BtnGuardar.Enabled = False
btnFin.ToolTip = "Inicia el Inventario Físico"
Case "Finalizado"
Case "3" 'FINALIZADO
GvIFD.Columns(6).Visible = False
PAgregar.Visible = False
'BtnGuardar.Visible = False
PAgregar.Visible = False
BtnGuardar.Enabled = False
BtnGuardar.Visible = False
btnFin.Visible = False
'BtnGuardar.Enabled = False
'PAgregar.Visible = False
CveSubProyecto = Inventario.CveSubProyectoInventario
lbTitulo.Text = Inventario.InventarioFisico
lbObservaciones.Text = Inventario.Observaciones
lbSubProyecto.Text = Inventario.SubProyectoInventario
lbEstatus.Text = Inventario.Estatus
lbFechaI.Text = Inventario.FechaI
lbFechaF.Text = Inventario.FechaF
Case Else ' en proceso
CveSubProyecto = Inventario.CveSubProyectoInventario
lbTitulo.Text = Inventario.InventarioFisico
lbObservaciones.Text = Inventario.Observaciones
lbEstatus.Text = Inventario.Estatus
lbSubProyecto.Text = Inventario.SubProyectoInventario
lbFechaI.Text = Inventario.FechaI
lbFechaF.Text = Inventario.FechaF
CveSubProyecto = ObjInventario.CveSubProyectoInventario
lbTitulo.Text = ObjInventario.InventarioFisico
lbObservaciones.Text = ObjInventario.Observaciones
lbSubProyecto.Text = ObjInventario.SubProyectoInventario
lbEstatus.Text = ObjInventario.Estatus
lbFechaI.Text = ObjInventario.FechaI
lbFechaF.Text = ObjInventario.FechaF
Case "1", "2" ' EN PROCESO,EN ESPERA
CveSubProyecto = ObjInventario.CveSubProyectoInventario
lbTitulo.Text = ObjInventario.InventarioFisico
lbObservaciones.Text = ObjInventario.Observaciones
lbEstatus.Text = ObjInventario.Estatus
lbSubProyecto.Text = ObjInventario.SubProyectoInventario
lbFechaI.Text = ObjInventario.FechaI
lbFechaF.Text = ObjInventario.FechaF
BtnGuardar.Enabled = True
btnFin.Text = "Finalizar"
LBAvance.Visible = UsuarioActual.TienePermisoProceso(178) ' si tiene permiso de ver el avance, se activa
@@ -133,8 +131,8 @@ Partial Class Inventarios_InventarioFisicoDetalle
GvIFD.Visible = False
DivBuscador.Visible = False
If Inventario.GetInventarioFisicoDetallesAlmacen(CveInventarioFisico, UsuarioActual.CveEmpresa) Then
Dim dt As DataTable = Inventario.DtResultados
If ObjInventario.GetInventarioFisicoDetallesAlmacen(CveInventarioFisico, UsuarioActual.CveEmpresa) Then
Dim dt As DataTable = ObjInventario.DtResultados
Dim str As New StringBuilder
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
@@ -144,8 +142,9 @@ Partial Class Inventarios_InventarioFisicoDetalle
End If
LblAlmacenes.Text = str.ToString
End If
If Inventario.GetInventarioFisicoDetallesClasificacion(CveInventarioFisico, UsuarioActual.CveEmpresa) Then
Dim dt As DataTable = Inventario.DtResultados
If ObjInventario.GetInventarioFisicoDetallesClasificacion(CveInventarioFisico, UsuarioActual.CveEmpresa) Then
Dim dt As DataTable = ObjInventario.DtResultados
Dim str As New StringBuilder
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
@@ -161,8 +160,9 @@ Partial Class Inventarios_InventarioFisicoDetalle
End If
End If
If Inventario.GetInventarioFisicoDetallesProductosServicios(CveInventarioFisico, UsuarioActual.CveEmpresa) Then
Dim dt As DataTable = Inventario.DtResultados
If ObjInventario.GetInventarioFisicoDetallesProductosServicios(CveInventarioFisico, UsuarioActual.CveEmpresa) Then
Dim dt As DataTable = ObjInventario.DtResultados
Dim str As New StringBuilder
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
@@ -179,18 +179,32 @@ Partial Class Inventarios_InventarioFisicoDetalle
End If
If Inventario.GetInventarioFisicoDetalle(CveInventarioFisico, CveUsuario) Then
If Inventario.DtResultados.Rows.Count > 0 Then
GvIFDUltimoRegistrado.DataSource = Inventario.DtResultados.AsEnumerable.OrderByDescending(Function(k) k!CveInventarioFisicoDetalle).Take(1).CopyToDataTable
If ObjInventario.GetInventarioFisicoDetalle(CveInventarioFisico, CveUsuario) Then
If ObjInventario.DtResultados.Rows.Count > 0 Then
GvIFDUltimoRegistrado.DataSource = ObjInventario.DtResultados.AsEnumerable.OrderByDescending(Function(k) k!CveInventarioFisicoDetalle).Take(1).CopyToDataTable
Else
GvIFDUltimoRegistrado.DataSource = Nothing
End If
DtDatos = Inventario.DtResultados
End If
DtDatos = ObjInventario.DtResultados
End If
Else
GvIFD.Columns(6).Visible = False
PAgregar.Visible = False
BtnGuardar.Enabled = False
BtnGuardar.Visible = False
btnFin.Visible = False
CveSubProyecto = ObjInventario.CveSubProyectoInventario
lbTitulo.Text = ObjInventario.InventarioFisico
lbObservaciones.Text = ObjInventario.Observaciones
lbSubProyecto.Text = ObjInventario.SubProyectoInventario
lbEstatus.Text = ObjInventario.Estatus
lbFechaI.Text = ObjInventario.FechaI
lbFechaF.Text = ObjInventario.FechaF
Alert("Ocurrió un error al obterner el inventario fisico")
End If
Inventario.Dispose()
ObjInventario.Dispose()
GvIFDUltimoRegistrado.DataBind()
'If (GvIFD.Rows.Count > 0) Then
@@ -397,20 +411,30 @@ Partial Class Inventarios_InventarioFisicoDetalle
#Region " VER AVANCE "
Protected Sub LBAvance_Click(sender As Object, e As EventArgs)
Response.Redirect($"~/Inventarios/RepAnomalias.aspx?CveInventarioFisico={CveInventarioFisico}&EsAvance=1")
End Sub
End Sub
#End Region
#Region "I M P R I M I R"
Private Sub LnkPDF_Click(sender As Object, e As EventArgs) Handles LnkPDF.Click
Impimir(Formato:="PDF")
End Sub
Private Sub LnkPDFResumido_Click(sender As Object, e As EventArgs) Handles LnkPDFResumido.Click
Impimir(Formato:="PDF", Agrupar:=True)
End Sub
Private Sub LnkExcel_Click(sender As Object, e As EventArgs) Handles LnkExcel.Click
Impimir(Formato:="EXCEL")
End Sub
Protected Sub Impimir(Optional Formato As String = "PDF")
Protected Sub Impimir(Optional Formato As String = "PDF", Optional Agrupar As Boolean = False)
Dim DtDatos As New DataTable
Dim ObjInventario As New ClsInventarios()
If ObjInventario.GetInventarioFisicoDetalle(CveInventarioFisico, UsuarioActual.CveUsuario, Agrupar:=Agrupar) Then
DtDatos = ObjInventario.DtResultados
End If
ObjInventario.Dispose()
If DtDatos IsNot Nothing Then
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/RepAnomalias.rdlc", UsuarioActual.Empresa.Ruta))
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
@@ -441,8 +465,8 @@ Partial Class Inventarios_InventarioFisicoDetalle
Else
Alert("No se encontraron resultado", TipoMensaje.MsgAdvertencia)
End If
End Sub
End Sub
#End Region
End Class

View File

@@ -2111,7 +2111,17 @@ Partial Class Inventarios_RecepcionAlmacen
'ENTREGA DIRECTA
If EntregaDirecta Then
If Not ErrorMovInv Then
CveMovtoSalidaDirecta = ObjInventario.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero, 3, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, TipoCambio:=If(DdlMonedaTC.SelectedValue.ToEntero = 1, -1, TipoCambio), MovimientoFijo:=True, CveMovimientoRelacionado:=CveMovimiento, Remision:=TxtRemision.Text, CveVendedor:=CveVendedor, CveCliente:=CveCliente)
Dim CveVenta As Integer = 0
Dim Dt As DataTable
If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
If ObjInventario.DtResultados.Rows.Count > 0 Then
Dt = ObjInventario.DtResultados
CveVenta = ObjInventario.DtResultados.Rows(0)("CveVenta").ToString.ToEntero
End If
End If
CveMovtoSalidaDirecta = ObjInventario.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero, 3, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, TipoCambio:=If(DdlMonedaTC.SelectedValue.ToEntero = 1, -1, TipoCambio), MovimientoFijo:=True, CveMovimientoRelacionado:=CveMovimiento, Remision:=TxtRemision.Text, CveVendedor:=CveVendedor, CveCliente:=CveCliente)
FolioSalidaDirecta = ObjInventario.Folio
If Not CveMovtoSalidaDirecta > 0 Then
@@ -2119,14 +2129,12 @@ Partial Class Inventarios_RecepcionAlmacen
End If
If Not ErrorMovInv Then
If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
If Not ObjInventario.AddMovimientoDetalle(CveMovtoSalidaDirecta, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDouble, Dr("CveAF").ToString.ToEntero, Dr("CveSeccionAlmacen").ToString.ToEntero, Dr("SerieLote").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
ErrorMovInv = True
Exit For
End If
Next
End If
For Each Dr As DataRow In Dt.Rows
If Not ObjInventario.AddMovimientoDetalle(CveMovtoSalidaDirecta, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDouble, Dr("CveAF").ToString.ToEntero, Dr("CveSeccionAlmacen").ToString.ToEntero, Dr("SerieLote").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
ErrorMovInv = True
Exit For
End If
Next
End If
If Not ErrorMovInv Then

View File

@@ -1,258 +1,277 @@
<%@ Page Title="REPORTE DE ALMACÉN" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepAlmacen.aspx.vb" Inherits="Inventarios_RepAlmacen" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style>
.GVAlmacen > tbody > tr:nth-child(2) {
background: #CCCCCC;
color: #67809F;
font-weight: bold;
}
.GVAlmacen > tbody > tr > td:nth-child(2) {
text-align: right;
}
.GVAlmacen > tbody > tr > td:nth-child(3) {
text-align: center;
}
.select2 .select2-selection__rendered {
line-height: 1;
color: #111;
}
.select2 .select2-selection--multiple {
box-sizing: border-box;
cursor: pointer;
display: block;
min-height: 20px;
user-select: none;
-webkit-user-select: none;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice {
margin-top: 10px;
}
.select2-selection__rendered {
margin-top: 0px;
height: 25px;
}
.select2-selection {
margin-top: 0px;
height: 31px;
}
.select2-container--default.select2-container--focus .select2-selection--multiple {
border: none;
outline: 0;
}
#chartdiv {
width: 100%;
height: 500px;
}
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
REPORTE DE ALMACÉN
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<li>
<asp:LinkButton ID="LnkPdf" runat="server"><i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkExportar" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
</li>
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<li>
<asp:LinkButton ID="LnkVerGrafica" OnClick="LnkVerGrafica_Click" runat="server"><i class="fa fa-signal"></i> Ver Grafica</asp:LinkButton>
</li>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle">
<div class="tools">
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
<a href="javascript;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
</div>
<div class="titlefiltros caption">
<div class="row">
<div class="col-md-1 truncate" style="text-align: right!important">Fecha Inicio:</div>
<div class="col-md-1 col-sm-1">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 95px !important; padding: 0px;">
<asp:TextBox Style="width: 80px !important;" ID="TxtFechaI" runat="server" CssClass="form-control" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="ImgFechaI" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="TxtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEFechaI" TargetControlID="TxtFechaI" PopupButtonID="ImgFechaI" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
</div>
<div class="col-md-1 truncate" style="text-align: right!important">Fecha Fin:</div>
<div class="col-md-1 col-sm-1">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 95px !important; padding: 0px;">
<asp:TextBox Style="width: 80px !important;" ID="TxtFechaF" runat="server" CssClass="form-control" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="ImgFechaF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="TxtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaF" PopupButtonID="ImgFechaF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
</div>
<div class="col-md-1 truncate" style="text-align: right!important">Tipo Almacen:</div>
<div class="col-md-1">
<asp:ListBox ID="DdlTipoAlmacen" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" DataTextField="TipoAlmacen" DataValueField="CveTipoAlmacen" Style="width: 100%;" runat="server"></asp:ListBox>
</div>
<div class="col-md-1 truncate" style="text-align: right!important">Modalidad:</div>
<div class="col-md-1">
<asp:DropDownList ID="DdlModalidadFiltro" runat="server" CssClass="input-small input-sm select2me" Width="100%">
<asp:ListItem Text="Todas" Value="-1" Selected="True"> </asp:ListItem>
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
<asp:ListItem Text="No Contable" Value="0"></asp:ListItem>
</asp:DropDownList>
</div>
<asp:CheckBox ID="ChkInventariable" CssClass="md-checksd" runat="server" Text="Aplica Inventario" />
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GVAlmacen" runat="server" AutoGenerateColumns="False" data-sort="true" EmptyDataText="No se encontraron Almacenes" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None">
<Columns>
<asp:TemplateField HeaderText="Almacén">
<ItemTemplate>
<asp:HyperLink ID="HyperLink1" Target="_blank" NavigateUrl='<%# String.Format("/Inventarios/RepEntradasSalidas.aspx?CveAlmacen={0}&FechaInicio={1:d}&FechaCorte={2:d}", Eval("CveAlmacen").ToString, Eval("FechaInicio"), Eval("FechaFin"))%>' runat="server"><%# Eval("Almacen") %></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Existencia" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label ID="LtlExist" runat="server" Text='<%# Eval("Existencia", "{0:#,###.##}")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label ID="LtlTotal" runat="server" Text='<%# Eval("Total", "{0:#,##0.00}")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Tipo Almacén">
<ItemTemplate>
<asp:Label ID="LtlAlmacen" runat="server" Text='<%# Eval("TipoAlmacen")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
<div id="DivModalGrafica" class="modal ADS fade" role="dialog">
<asp:UpdatePanel class="modal-dialog modal-lg" runat="server" ID="UPModalProd" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">
<asp:Label ID="LblTituloGrafica" runat="server" ClientIDMode="Static" Text="Almacenes"></asp:Label>
</h4>
</div>
<div class="modal-body">
<div class="row">
<div class="col-md-2"></div>
<label class="col-md-1 truncate">Grafica:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlGrafica" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlGrafica_SelectedIndexChanged" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Barras" Value="1"></asp:ListItem>
<asp:ListItem Text="Pastel" Value="2"></asp:ListItem>
</asp:DropDownList>
</div>
<label class="col-md-1 truncate">&nbsp;&nbsp;&nbsp;Ver:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlVer" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlVer_SelectedIndexChanged" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Existencias" Value="1"></asp:ListItem>
<asp:ListItem Text="Total" Value="2"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
<br />
<div id="chartdiv"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
<script src="https://www.amcharts.com/lib/3/amcharts.js"></script>
<script src="https://www.amcharts.com/lib/3/serial.js"></script>
<script src="https://www.amcharts.com/lib/3/pie.js"></script>
<script src="https://www.amcharts.com/lib/3/plugins/export/export.min.js"></script>
<link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />
<script src="https://www.amcharts.com/lib/3/themes/light.js"></script>
<%@ Page Title="REPORTE DE ALMACÉN" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepAlmacen.aspx.vb" Inherits="Inventarios_RepAlmacen" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style>
.GVAlmacen > tbody > tr:nth-child(2) {
background: #CCCCCC;
color: #67809F;
font-weight: bold;
}
.GVAlmacen > tbody > tr > td:nth-child(2) {
text-align: right;
}
.GVAlmacen > tbody > tr > td:nth-child(3) {
text-align: center;
}
.select2 .select2-selection__rendered {
line-height: 1;
color: #111;
}
.select2 .select2-selection--multiple {
box-sizing: border-box;
cursor: pointer;
display: block;
min-height: 20px;
user-select: none;
-webkit-user-select: none;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice {
margin-top: 10px;
}
.select2-selection__rendered {
margin-top: 0px;
height: 25px;
}
.select2-selection {
margin-top: 0px;
height: 31px;
}
.select2-container--default.select2-container--focus .select2-selection--multiple {
border: none;
outline: 0;
}
#chartdiv {
width: 100%;
height: 500px;
}
.v-center {
display: flex;
align-items: center;
}
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
REPORTE DE ALMACÉN
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<li>
<asp:LinkButton ID="LnkPdf" runat="server"><i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkExportar" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
</li>
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<li>
<asp:LinkButton ID="LnkVerGrafica" OnClick="LnkVerGrafica_Click" runat="server"><i class="fa fa-signal"></i> Ver Grafica</asp:LinkButton>
</li>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle">
<div class="tools">
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
<a href="javascript;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
</div>
<div class="titlefiltros caption">
<div class="row v-center">
<div class="col-md-1 truncate" style="text-align: right!important">Fecha Inicio:</div>
<div class="col-md-1 v-center">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 95px !important; padding: 0px;">
<asp:TextBox Style="width: 80px !important;" ID="TxtFechaI" runat="server" CssClass="form-control" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="ImgFechaI" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="TxtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEFechaI" TargetControlID="TxtFechaI" PopupButtonID="ImgFechaI" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
</div>
<div class="col-md-1 truncate" style="text-align: right!important">Fecha Fin:</div>
<div class="col-md-1 v-center">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 95px !important; padding: 0px;">
<asp:TextBox Style="width: 80px !important;" ID="TxtFechaF" runat="server" CssClass="form-control" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="ImgFechaF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="TxtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaF" PopupButtonID="ImgFechaF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
</div>
<div class="col-md-1 truncate v-center" style="text-align: right!important">Almacen:</div>
<div class="col-md-2 v-center">
<asp:ListBox ID="DdlAlmacen" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" DataTextField="Almacen" DataValueField="CveAlmacen" Style="width: 100%;" runat="server"></asp:ListBox>
</div>
<div class="col-md-1 truncate" style="text-align: right!important">Sucursal:</div>
<div class="col-md-2">
<asp:DropDownList ID="DdlSucursal" runat="server" CssClass="input-small input-sm select2me" Width="100%" DataTextField="SubProyecto" DataValueField="CveSubProyecto">
<asp:ListItem Text="Todas" Value="-1" Selected="True"> </asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>
</div>
<div class="portlet-body" style=" <%= IIf(chkexpand.Checked = True, "display:block;", "display:none;")%>">
<div class="row">
<div class="col-md-1 truncate" style="text-align: right!important">Modalidad:</div>
<div class="col-md-1">
<asp:DropDownList ID="DdlModalidadFiltro" runat="server" CssClass="input-small input-sm select2me" Width="100%">
<asp:ListItem Text="Todas" Value="-1" Selected="True"> </asp:ListItem>
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
<asp:ListItem Text="No Contable" Value="0"></asp:ListItem>
</asp:DropDownList>
</div>
<div class="col-md-1 truncate v-center" style="text-align: right!important">Tipo Almacen:</div>
<div class="col-md-2 v-center">
<asp:ListBox ID="DdlTipoAlmacen" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" DataTextField="TipoAlmacen" DataValueField="CveTipoAlmacen" Style="width: 100%;" runat="server"></asp:ListBox>
</div>
<div class="col-md-2">
<asp:CheckBox ID="ChkInventariable" CssClass="md-checksd" runat="server" Text="Aplica Inventario" />
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GVAlmacen" runat="server" AutoGenerateColumns="False" data-sort="true" EmptyDataText="No se encontraron Almacenes" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None">
<Columns>
<asp:TemplateField HeaderText="Almacén">
<ItemTemplate>
<asp:HyperLink ID="HyperLink1" Target="_blank" NavigateUrl='<%# String.Format("/Inventarios/RepEntradasSalidas.aspx?CveAlmacen={0}&FechaInicio={1:d}&FechaCorte={2:d}", Eval("CveAlmacen").ToString, Eval("FechaInicio"), Eval("FechaFin"))%>' runat="server"><%# Eval("Almacen") %></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Existencia" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label ID="LtlExist" runat="server" Text='<%# Eval("Existencia", "{0:#,###.##}")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label ID="LtlTotal" runat="server" Text='<%# Eval("Total", "{0:#,##0.00}")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Tipo Almacén">
<ItemTemplate>
<asp:Label ID="LtlAlmacen" runat="server" Text='<%# Eval("TipoAlmacen")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
<div id="DivModalGrafica" class="modal ADS fade" role="dialog">
<asp:UpdatePanel class="modal-dialog modal-lg" runat="server" ID="UPModalProd" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">
<asp:Label ID="LblTituloGrafica" runat="server" ClientIDMode="Static" Text="Almacenes"></asp:Label>
</h4>
</div>
<div class="modal-body">
<div class="row">
<div class="col-md-2"></div>
<label class="col-md-1 truncate">Grafica:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlGrafica" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlGrafica_SelectedIndexChanged" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Barras" Value="1"></asp:ListItem>
<asp:ListItem Text="Pastel" Value="2"></asp:ListItem>
</asp:DropDownList>
</div>
<label class="col-md-1 truncate">&nbsp;&nbsp;&nbsp;Ver:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlVer" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlVer_SelectedIndexChanged" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Existencias" Value="1"></asp:ListItem>
<asp:ListItem Text="Total" Value="2"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
<br />
<div id="chartdiv"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
<script src="https://www.amcharts.com/lib/3/amcharts.js"></script>
<script src="https://www.amcharts.com/lib/3/serial.js"></script>
<script src="https://www.amcharts.com/lib/3/pie.js"></script>
<script src="https://www.amcharts.com/lib/3/plugins/export/export.min.js"></script>
<link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />
<script src="https://www.amcharts.com/lib/3/themes/light.js"></script>
<script>
function CargaGraficaBarras(data,title) {
function CargaGraficaBarras(data, title) {
var chart = AmCharts.makeChart("chartdiv", {
var chart = AmCharts.makeChart("chartdiv", {
"type": "serial",
"theme": "light",
"dataProvider": data,
"startDuration": 2,
"valueAxes": [{
"valueAxes": [{
"position": "left",
"title": title
"title": title
}],
"graphs": [{
"graphs": [{
"balloonText": "[[category]]: <b>[[value]]</b>",
"colorField": "Color",
"fillAlphas": 1,
"lineAlpha": 0.1,
"type": "column",
"valueField": "Valor"
"valueField": "Valor"
}],
"depth3D": 20,
"angle": 30,
"chartCursor": {
"chartCursor": {
"categoryBalloonEnabled": false,
"cursorAlpha": 0,
"zoomable": false
"zoomable": false
},
"categoryField": "Texto",
"categoryAxis": {
"categoryAxis": {
"gridPosition": "start",
"labelRotation": 90
"labelRotation": 90
},
"export": {
"enabled": true
}
});
"export": {
"enabled": true
}
});
}
function CargaGraficaPastel(data) {
function CargaGraficaPastel(data) {
var chart = AmCharts.makeChart("chartdiv", {
var chart = AmCharts.makeChart("chartdiv", {
"type": "pie",
"theme": "light",
"dataProvider":
@@ -263,12 +282,12 @@
"depth3D": 0,
"balloonText": "[[title]]<br><span style='font-size:14px'><b>[[value]]</b> ([[percents]]%)</span>",
"angle": 0,
"export": {
"enabled": true
}
});
"export": {
"enabled": true
}
});
}
</script>
</asp:Content>
</script>
</asp:Content>

View File

@@ -6,9 +6,9 @@ Imports System.Data
Imports Microsoft.Reporting.WebForms
Partial Class Inventarios_RepAlmacen
Inherits ClsPaginas
Inherits ClsPaginas
#Region "PROPIEDADES"
Private Property TmpDT As DataTable
Get
@@ -25,7 +25,7 @@ Partial Class Inventarios_RepAlmacen
Set(value As DataTable)
ViewState("DtColor") = value
End Set
End Property
End Property
#End Region
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not IsPostBack Then
@@ -39,6 +39,15 @@ Partial Class Inventarios_RepAlmacen
DdlTipoAlmacen.DataSource = GlobalDTTipoAlmacen(1)
DdlTipoAlmacen.DataBind()
DdlTipoAlmacen.Items.Insert(0, New ListItem("Todos", "-1"))
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
DdlAlmacen.DataBind()
DdlAlmacen.Items.Insert(0, New ListItem("Todos", "-1"))
DdlSucursal.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, CveEstatus:=1)
DdlSucursal.DataBind()
DdlSucursal.Items.Insert(0, New ListItem("Todas", "-1"))
End Sub
Private Sub CargaDatos()
@@ -48,8 +57,11 @@ Partial Class Inventarios_RepAlmacen
FechaI = If(IsDate(TxtFechaI.Text.Trim()), TxtFechaI.Text.Trim(), "-1")
FechaF = If(IsDate(TxtFechaF.Text.Trim()), TxtFechaF.Text.Trim(), "-1")
Dim TipoAlmacen As String = If(DdlTipoAlmacen.GetSelectedValuesM = "", "-1", DdlTipoAlmacen.GetSelectedValuesM)
Dim Almacenes As String = If(DdlAlmacen.GetSelectedValuesM = "", "-1", DdlAlmacen.GetSelectedValuesM)
Dim CveSubProyecto As Integer = DdlSucursal.SelectedValue.ToEntero()
If objInv.GetRepAlmacenes(FechaI, FechaF, UsuarioActual.CveEmpresa, TipoAlmacen, DdlModalidadFiltro.SelectedValue.ToEntero, ChkInventariable.Checked) Then
If objInv.GetRepAlmacenes(FechaI, FechaF, UsuarioActual.CveEmpresa, TipoAlmacen, DdlModalidadFiltro.SelectedValue.ToEntero, ChkInventariable.Checked,
Almacenes:=Almacenes, CveSubProyecto:=CveSubProyecto) Then
GVAlmacen.DataSource = objInv.DtResultados
TmpDT = objInv.DtResultados
End If
@@ -60,8 +72,9 @@ Partial Class Inventarios_RepAlmacen
Private Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
CargaDatos()
UpDatos.Update()
End Sub
UPFiltros.Update()
End Sub
#Region "I M P R I M I R <i class='fa fa-print'></i>"
Protected Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
@@ -98,11 +111,11 @@ Partial Class Inventarios_RepAlmacen
e.Row.CssClass = "Totales"
End If
End If
End Sub
End Sub
#End Region
#Region "GRAFICA"
Protected Sub LnkVerGrafica_Click(sender As Object, e As EventArgs)
If Not TmpDT IsNot Nothing AndAlso TmpDT.Rows.Count > 0 Then
Alert("No hay datos disponibles", TipoMensaje.MsgAdvertencia)
@@ -227,8 +240,8 @@ Partial Class Inventarios_RepAlmacen
Protected Sub DdlVer_SelectedIndexChanged(sender As Object, e As EventArgs)
CambioGrafica()
End Sub
End Sub
#End Region
End Class

View File

@@ -172,14 +172,14 @@
<div class="col-md-2">
<asp:TextBox runat="server" Text="" ID="TxtGastoIndirecto" Width="100px" />
</div>
<label class="col-md-1">Chofer:</label>
<div class="col-md-2">
<asp:DropDownList ID="DldChofer" runat="server" DataTextField="Chofer" DataValueField="CveChofer" CssClass="form-control input-sm select2me" Style="width: 150px !important;"></asp:DropDownList>
</div>
<label class="col-md-1">Placa:</label>
<div class="col-md-2">
<asp:TextBox runat="server" Text="" ID="TxtPlaca" Width="100px" />
</div>
<label class="col-md-1">Chofer:</label>
<div class="col-md-2">
<asp:DropDownList ID="DldChofer" runat="server" DataTextField="Chofer" DataValueField="CveChofer" OnSelectedIndexChanged="DldChofer_SelectedIndexChanged" AutoPostBack="true" CssClass="form-control input-sm select2me" Style="width: 150px !important;"></asp:DropDownList>
</div>
</div>
<div class="row">
<label class="col-md-2">Fecha Entrega:</label>
@@ -256,7 +256,8 @@
<div class="row">
<label class="col-md-5">Teléfono:</label>
<div class="col-md-4">
<asp:TextBox runat="server" Text="" ID="TxtTelefono" Width="150px" />
<asp:TextBox runat="server" Text="" ID="TxtTelefono" Width="150px" MaxLength="10" />
<ajax:FilteredTextBoxExtender ID="FTETelefono" runat="server" TargetControlID="TxtTelefono" FilterType="Custom, Numbers" />
</div>
</div>
<div class="row">

View File

@@ -377,7 +377,7 @@ Partial Class Inventarios_TraspasoAlmacen
'Llena Choferes
Dim ObjAcar As New ClsAcarreos()
If ObjAcar.GetChofer(-1, UsuarioActual.CveEmpresa, -1, -1) Then
If ObjAcar.GetChofer(-1, UsuarioActual.CveEmpresa, 1, -1) Then
DldChofer.DataSource = ObjAcar.DtResultados
DldChofer.DataBind()
End If
@@ -2408,5 +2408,19 @@ Partial Class Inventarios_TraspasoAlmacen
#End Region
Protected Sub DldChofer_SelectedIndexChanged(sender As Object, e As EventArgs)
Dim ObjAcar As New ClsAcarreos()
If ObjAcar.GetChofer(DldChofer.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, 1, -1) Then
Dim dr As DataRow = ObjAcar.DtResultados.Rows(0)
If dr IsNot Nothing Then
TxtIdentificacion.Text = dr("Identificacion").ToString
TxtDomicilio.Text = dr("Domicilio").ToString
TxtTelefono.Text = dr("Telefono").ToString
TxtCiudad.Text = dr("Ciudad").ToString
TxtLicencia.Text = dr("Licencia").ToString
End If
End If
ObjAcar.Dispose()
End Sub
End Class

View File

@@ -4,4 +4,4 @@
28/08/2019:05:48 p. m. No se especifico a remitente - SIG - Se Genero una Recepción de Usados con el folio: 80
02/09/2019:11:00 a. m. From:'signotificaciones@adssistemas.mx' - Para:'x@x.com' - Asunto:'Entrega de Factura SUCURSAL NARANJO SN-22' - CCP: '' - Adjuntos: 1

View File

@@ -119,7 +119,7 @@
<asp:UpdatePanel ID="UPPEmp" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvEstatusUsuariosREQ" GridLines="None" CssClass="table table-striped table-advance table-hover" Width="100%" runat="server" AutoGenerateColumns="False" DataKeyNames="CveUsuario" EmptyDataText="No se encontraron Usuarios Registrados" ToolTip="Listado de Usuarios">
<asp:GridView ID="GvEstatusUsuarios" GridLines="None" CssClass="table table-striped table-advance table-hover" Width="100%" runat="server" AutoGenerateColumns="False" DataKeyNames="CveUsuario" EmptyDataText="No se encontraron Usuarios Registrados" ToolTip="Listado de Usuarios">
<HeaderStyle VerticalAlign="Middle" />
<Columns>
<asp:TemplateField>
@@ -302,70 +302,6 @@
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel runat="server" ID="UPSuperior" UpdateMode="Conditional">
<ContentTemplate>
<asp:HiddenField runat="server" ID="IDhdnCveEstatusUsuarios" ClientIDMode="Static" />
<asp:HiddenField runat="server" ID="IDCellYellow" ClientIDMode="Static" />
<asp:HiddenField runat="server" ID="IDimg" ClientIDMode="Static" />
<asp:HiddenField runat="server" ID="hdnCveEstatusUsuarios" ClientIDMode="Static" />
<asp:HiddenField runat="server" ID="hdnCveSuperior" ClientIDMode="Static" />
<asp:HiddenField runat="server" ID="hdnCveEstatusSiguiente" ClientIDMode="Static" />
<asp:HiddenField runat="server" ID="HiddenField1" ClientIDMode="Static" />
<asp:HiddenField runat="server" ID="hdnCveUsuario" ClientIDMode="Static" />
<div id="DivSuperior" style="width: 200px; background-color: White; border: solid 1px black; color: Black; display: none; position: absolute;">
<table border="0" style="width: 200px" cellpadding="0" cellspacing="0">
<tr class="Titulos">
<td style="width: 400px">Opciones&nbsp;</td>
<td style="padding-right: 4px; padding-top: 4px" valign="top">
<img alt="" src="/Imagenes/close.gif" style="cursor: pointer;" onclick="$('#DivSuperior').hide(1000);" /></td>
</tr>
<tr align="center">
<td colspan="2">
<table style="height: 80px; width: 100%">
<tr>
<td style="vertical-align: top; text-align: left; width: 100%">
<asp:CheckBox ID="chkMostrarLimites" Font-Bold="true" Style="display: none" ClientIDMode="Static" Text="Usar Limites" runat="server" /><br />
<div id="DivLimites" style="display: none;">
<table>
<tr>
<td>Inferior</td>
<td>
<asp:TextBox ID="txtLimiteInferior" Width="80px" runat="server" ClientIDMode="Static"></asp:TextBox></td>
</tr>
<tr>
<td>Superior</td>
<td>
<asp:TextBox ID="txtLimiteSuperior" Width="80px" runat="server" ClientIDMode="Static"></asp:TextBox></td>
</tr>
</table>
</div>
<table style="text-align: center" runat="server" id="tblSuperior">
<tr>
<td style="font-weight: bold">Superior</td>
</tr>
<tr>
<td>
<asp:DropDownList ID="ddlSuperior" Width="170px" ClientIDMode="Static" runat="server" DataValueField="CveUsuario" DataTextField="Nombre"></asp:DropDownList></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr style="height: 25px">
<td align="center" colspan="2">
<asp:Button ID="BtnGuardarSuperior" runat="server" ClientIDMode="Static" OnClientClick="$('#DivSuperior').hide(1000);" Text="Guardar" />
<input id="BtnCancelarObs" type="button" value="Cancelar" onclick="$('#DivSuperior').hide(1000);" />
</td>
</tr>
</table>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</ContentTemplate>
</ajax:TabPanel>
</ajax:TabContainer>

View File

@@ -30,7 +30,7 @@ Partial Class OS_CatEstatusOrdenServicio
Get
Return CType(ViewState("DTEstatusUsuarios"), DataTable)
End Get
Set(value As DataTable)
Set(value As Data.DataTable)
ViewState("DTEstatusUsuarios") = value
End Set
End Property
@@ -39,17 +39,12 @@ Partial Class OS_CatEstatusOrdenServicio
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
CargaDatos()
CreaGrid("Req")
CreaGrid("OC")
CargaGridEstatusUsuarios()
ViewState("Orden") = ""
'ViewState("TipoSeleccionado") = DdlTipo.SelectedValue
CveEstatuOS = -1
CargaDatos()
'CargaProyectos()
CargaUsuarios()
End If
End Sub
@@ -66,6 +61,12 @@ Partial Class OS_CatEstatusOrdenServicio
Else
Me.GvDatos.DataSource = Nothing
End If
If ObjEstatusOrdenServicios.GetEstatusUsuarios(-1, -1) Then
DTEstatusUsuarios = ObjEstatusOrdenServicios.DtResultados
Dim PermisosDeUsuario As DataTable = DTEstatusUsuarios
End If
OrdenaDatos()
ObjEstatusOrdenServicios.Dispose()
GvDatos.DataBind()
@@ -148,16 +149,8 @@ Partial Class OS_CatEstatusOrdenServicio
Dim Estado As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEstado").Checked
Dim CveEstatusOrdenServicio As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero
'If ObjEstatusOrdenServicios.UpdateEstatusOrdenServicio(EstatusOrdenServicio, Estado, CveEstatusOrdenServicio) Then
' GvDatos.EditIndex = -1
' ViewState("DTEstatusOrdenServicios") = ObjEstatusOrdenServicios.DtResultados '.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
' GlobalDTEstatusOrdenServicios = ObjEstatusOrdenServicios.DtResultados
' Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
'End If
ObjEstatusOrdenServicios.Dispose()
End Sub
#End Region
@@ -173,85 +166,50 @@ Partial Class OS_CatEstatusOrdenServicio
#End Region
#Region "Configuracion"
Protected Sub ibOpciones1_Click(sender As Object, e As ImageClickEventArgs)
Dim imgBtn As ImageButton = DirectCast(sender, System.Web.UI.WebControls.ImageButton)
ddlSuperior.Items.Clear()
If imgBtn.CommandArgument <> "" Then
'chkMostrarLimites.Visible = If(GlobalDTOCEstatus.FiltraParametros("CveEstatusSiguiente = " + imgBtn.CommandArgument)(0)("TipoTermino").ToString.ToEntero = 3, False, True)
chkMostrarLimites.Style("display") = If(GlobalDTOCEstatus(UsuarioActual.CveEmpresa).FiltraParametros("CveEstatusSiguiente = " + imgBtn.CommandArgument)(0)("TipoTermino").ToString.ToEntero = 3, "none", "inline")
'ddlSuperior.DataSource = DTEstatusUsuarios.FiltraParametros(String.Format("CveEstatus = {0}", imgBtn.CommandArgument), "Nombre DESC")
ddlSuperior.DataBind()
ddlSuperior.Items.Insert(0, New ListItem("Todos los Superiores", "-1"))
Try
ddlSuperior.SelectedValue = hdnCveSuperior.Value
Catch ex As Exception
End Try
tblSuperior.Visible = True
Else
tblSuperior.Visible = False
End If
UPSuperior.Update()
UPPEmp.Update()
RegistraScript("$('#DivSuperior').show(1000); PosicionaObjeto('" + imgBtn.ClientID + "','DivSuperior'); chkMostrarLimitesCambio();")
End Sub
Private Sub CreaGrid(Tipo As String)
Dim i As Integer = 1
For Each Row As DataRow In GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa).Rows
GvEstatusUsuariosREQ.Columns(i).HeaderText = Row("EstatusOrdenServicio").ToString.ToUpper
GvEstatusUsuariosREQ.Columns(i).FooterText = Row("CveEstatusOrdenServicio").ToString
GvEstatusUsuarios.Columns(i).HeaderText = Row("EstatusOrdenServicio").ToString.ToUpper
GvEstatusUsuarios.Columns(i).FooterText = Row("CveEstatusOrdenServicio").ToString
i += 1
Next
While i <= 10
GvEstatusUsuariosREQ.Columns(i).Visible = False
GvEstatusUsuarios.Columns(i).Visible = False
i += 1
End While
End Sub
Protected Sub CargaGridEstatusUsuarios()
GvEstatusUsuariosREQ.DataSource = GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa)
GvEstatusUsuariosREQ.DataBind()
GvEstatusUsuarios.DataSource = GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa)
GvEstatusUsuarios.DataBind()
UPPEmp.Update()
End Sub
Public Sub CargaUsuarios()
ddlSuperior.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa)
ddlSuperior.DataBind()
End Sub
Protected Sub btnGuardarEstatusUsuariosREQ_Click(sender As Object, e As EventArgs) Handles btnGuardarEstatusUsuariosREQ.Click
Dim objEstatusOC As New ClsOS
objEstatusOC.IniciaTransacSQL()
Dim HuboErrores As Boolean = False
Dim CveSubProyecto = 59
For Each Row As GridViewRow In GvEstatusUsuariosREQ.Rows
Dim aux As String = Row.DataKey("CveUsuario").ToString
For Each Row As GridViewRow In GvEstatusUsuarios.Rows
Dim r As Integer = 1
For i = 0 To Row.Cells.Count - 1
Dim CveEstatus As Integer = If(IsNumeric(GvEstatusUsuariosREQ.Columns(i).FooterText), GvEstatusUsuariosREQ.Columns(i).FooterText.ToEntero, 0)
Dim CveEstatus As Integer = If(IsNumeric(GvEstatusUsuarios.Columns(i).FooterText), GvEstatusUsuarios.Columns(i).FooterText.ToEntero, 0)
If CveEstatus > 0 Then
If Row.FCCheckBox("chkEstatus" + r.ToString).Checked = False And Row.FCHiddenField("hdnCveEstatusUsuarios" + r.ToString).Value.ToEntero > 0 Then
If Row.FCCheckBox("chkEstatus" + r.ToString).Checked = False Then
'Eliminar el registro existente
If Not objEstatusOC.RemoveEstatusUsuarios(Row.FCHiddenField("hdnCveEstatusUsuarios" + r.ToString).Value.ToEntero) Then
If Not objEstatusOC.RemoveEstatusUsuarios(CveEstatus, Row.DataKey("CveUsuario").ToString.ToEntero) Then
HuboErrores = True
Exit For
End If
ElseIf Row.FCCheckBox("chkEstatus" + r.ToString).Checked = True Then
'And Row.FCHiddenField("hdnCveEstatusUsuarios" + r.ToString).Value.ToEntero = -1
'Guardado masivo cuando sea SubProyecto "Todos"
If CveSubProyecto = -2 Then
For Each dr As DataRow In GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).Rows
@@ -292,7 +250,25 @@ Partial Class OS_CatEstatusOrdenServicio
End If
objEstatusOC.Dispose()
CargaDatos()
CargaGridEstatusUsuarios()
End Sub
Protected Sub GvEstatusUsuarios_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEstatusUsuarios.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
Dim PermisosDeUsuario As DataTable = DTEstatusUsuarios.FiltraParametros(String.Format("CveUsuario = {0}", e.Row.DBCampo("CveUsuario").ToString))
Dim CveUsuario As String = e.Row.DBCampo("CveUsuario").ToString
For i As Integer = 1 To 10
Dim CveEstatus As Integer = GvEstatusUsuarios.Columns(i).FooterText.ToEntero
If CveEstatus > 0 Then
Dim auxiliarBandera As DataRow = PermisosDeUsuario.FiltroPrimero(String.Format("CveEstatusOrdenServicio = {0}", CveEstatus.ToString))
If auxiliarBandera IsNot Nothing Then
Dim chkEstatus As CheckBox = e.Row.FCCheckBox(String.Format("chkEstatus{0}", i))
chkEstatus.Checked = True
End If
End If
Next
End If
End Sub
#End Region
End Class

View File

@@ -9370,8 +9370,8 @@ Partial Class Ventas
Importe91 = Dr("Importe").ToString.ToDecimal
ImporteMN91 = Dr("Importe").ToString.ToDecimal * TipoCambioNC
ElseIf DdlMoneda.SelectedValue.ToEntero = 1 AndAlso Dr("TCCambioValuacion").ToString.ToDecimal > 1 Then
Importe251 = Dr("Importe").ToString.ToDecimal
Importe91 = Dr("Importe").ToString.ToDecimal
Importe91 = Dr("Importe").ToString.ToDecimal / TipoCambioNC
ImporteMN91 = Dr("Importe").ToString.ToDecimal
End If
@@ -9385,7 +9385,8 @@ Partial Class Ventas
ElseIf DdlMoneda.SelectedValue.ToEntero = 2 AndAlso Dr("TCCambioValuacion").ToString.ToDecimal > 1 Then
ImporteMN251 = Dr("Importe").ToString.ToDecimal * TCFluctuacion
ElseIf DdlMoneda.SelectedValue.ToEntero = 1 AndAlso Dr("TCCambioValuacion").ToString.ToDecimal > 1 Then
ImporteMN251 = Dr("Importe").ToString.ToDecimal / TipoCambioNC
Importe251 = Dr("Importe").ToString.ToDecimal / TCFluctuacion
ImporteMN251 = Dr("Importe").ToString.ToDecimal
Else
ImporteMN251 = Dr("Importe").ToString.ToDecimal
End If
@@ -16526,18 +16527,32 @@ Partial Class Ventas
End Sub
Protected Sub LBDevolucionAlmacen_Click(sender As Object, e As EventArgs)
Dim ObjVentas As New ClsVentas
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then
If ObjVentas.DtResultados.Rows.Count > 0 Then
Dim DbRowVenta As DataRow = ObjVentas.DtResultados.Rows(0)
Me.DevolucionAlmacen = DbRowVenta("EsDevolucionVenta").ToString.ToEntero
End If
End If
Dim EstatusDevolucion = If(DevolucionAlmacen = 0, 1, 0)
If Me.DevolucionAlmacen.Contiene(2) Then
InicializaDevolucionAlmacen()
UpnTools.Update()
Alert("El movimiento ya fue devuelto.", TipoMensaje.MsgAdvertencia)
ObjVentas.Dispose()
Exit Sub
End If
Dim EstatusDevolucion = If(Me.DevolucionAlmacen = 0, 1, 0)
If ObjVentas.UpdateVentasDevolucionAlmacen(EstatusDevolucion, CveVenta) Then
Alert("La solicitud de Devolución de Almacén se guardó correctamente")
End If
ObjVentas.Dispose()
DevolucionAlmacen = EstatusDevolucion
Me.DevolucionAlmacen = EstatusDevolucion
InicializaDevolucionAlmacen()
UpnTools.Update()
ObjVentas.Dispose()
End Sub
#End Region
@@ -19928,7 +19943,7 @@ Partial Class Ventas
Private Sub CargaCxC()
Dim ObjMovtos As New ClsMovimientos()
If ObjMovtos.GetCxCClienteDetalle(ViewState("CveCliente").ToString.ToEntero, "-1", "-1", DdlMoneda.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa, DdlSucursalCliente.SelectedValue.ToEntero) Then
If ObjMovtos.GetCxCClienteDetalle(ViewState("CveCliente").ToString.ToEntero, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa, DdlSucursalCliente.SelectedValue.ToEntero) Then
Dim DtTemporal As DataTable = ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Act' AND CveVenta > 0", "Moneda, OrdenVencimiento, FechaVencimiento")
GvCxC.DataSource = DtTemporal
End If