This commit is contained in:
Rene Molina
2019-10-02 19:31:56 -07:00
13 changed files with 1625 additions and 31 deletions

View File

@@ -1700,10 +1700,32 @@ Public Class ClsInventarios
End Try
Return Retorno
End Function
End Function
Public Function RepTraspasoAlmacen(FechaI As String, FechaF As String, CveAlmacenOrigen As Integer, CveAlmacenDestino As Integer, Recibido As Boolean, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Inv_RepTraspasoAlmacen")
With SqlAdapter.SelectCommand.Parameters
.Add("@FechaI", SqlDbType.VarChar).Value = FechaI
.Add("@FechaF", SqlDbType.VarChar).Value = FechaF
.Add("@CveAlmacenOrigen", SqlDbType.Int).Value = CveAlmacenOrigen
.Add("@CveAlmacenDestino", SqlDbType.Int).Value = CveAlmacenDestino
.Add("@Recibido", SqlDbType.Bit).Value = Recibido
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener el Reporte de Traspaso de Almacén.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
#End Region
#Region " INVENTARIOS - EXISTENCIAS "
Public Function GetExistenciasPS(CvePS As Integer, CveUnidadMedida As Integer, CveEmpresa As Integer,
CveAlmacen As Integer, Optional CveSeccionAlmacen As Integer = -1, Optional CveTipoAlmacen As Integer = -1, Optional CveSubProyecto As Integer = -1,
@@ -1889,8 +1911,8 @@ Public Class ClsInventarios
Catch ex As Exception
OnError("Ocurrió un error al obtener las existencias del producto.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
Public Function GetExistenciasPSEmpaque(CvePS As Integer, CveUnidadMedida As Integer, CveEmpresa As Integer,
@@ -1965,11 +1987,11 @@ Public Class ClsInventarios
End Try
Return Retorno
End Function
End Function
#End Region
#Region " INVENTARIOS - INVENTARIO FISICO "
Public Function AddInventarioFisico(CveEmpresa As Integer, InventarioFisico As String, Observaciones As String, Estatus As Integer, CveSubProyecto As Integer) As Boolean
Dim Retorno As Boolean = False

View File

@@ -4091,6 +4091,7 @@ Public Class ClsPaginas
' PaginaDict.Add("/Inventarios/RecepcionUsados.aspx".ToUpper(), 1202)
PaginaDict.Add("/Inventarios/RepTraspasoEmitido.aspx".ToUpper(), 891)
PaginaDict.Add("/Inventarios/KardexSeccionAlmacen.aspx".ToUpper(), 892)
PaginaDict.Add("/Inventarios/RepTraspasoAlmacen.aspx".ToUpper(), 688)
#End Region
#Region "MF"
PaginaDict.Add("/MF/BitacoraDiaria.aspx".ToUpper(), 801)

View File

@@ -1367,10 +1367,13 @@ Partial Class Compras_ReembolsosComprobaciones
If CvePrePolizaExcedente > 0 Then
Mensaje.AppendFormat("Abono Registrado Correctamente. <br/><br/> Cheque: <a target='_blank' href=/Bancos/IE.aspx?CveIE={0}>{1}</a> <br/><br/> <a target='_blank' href=""/Bancos/Reportes.aspx?Opcion=ImprimeMov&CveIE={0}"">Imprimir</a>", CveIEExcedente, TxtFolio.Text)
Mensaje.AppendFormat("</br> <br/>Poliza: <b> <a href='/Contabilidad/RegPoliza.aspx?IdPoliza={0}' class='Texto' target='_blank'>{1}</a><br/>", ObjMov.ContaIdPoliza, ObjMov.ContaFolio)
Mensaje.AppendFormat("</br> <br/>Póliza: <b> <a href='/Contabilidad/RegPoliza.aspx?IdPoliza={0}' class='Texto' target='_blank'>{1}</a><br/>", ObjMov.ContaIdPoliza, ObjMov.ContaFolio)
Alert(Mensaje.ToString, TipoMensaje.MsgInformacion)
Else
Mensaje.AppendFormat("Abono Registrado Correctamente. <br/><br/> <a class=""Texto"" target='_blank' href=""/Bancos/Reportes.aspx?Opcion=ImprimeMov&CveIE={0}"">Imprimir</a>", CveIERegistrado)
If CvePrePolizaIERegistrado > 0 Then
Mensaje.AppendFormat("</br> <br/>Póliza: <b> <a href='/Contabilidad/RegPoliza.aspx?IdPoliza={0}' class='Texto' target='_blank'>{1}</a><br/>", ObjMov.ContaIdPoliza, ObjMov.ContaFolio)
End If
Alert(Mensaje.ToString, TipoMensaje.MsgInformacion)
End If

File diff suppressed because it is too large Load Diff

View File

@@ -447,8 +447,8 @@
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'C O N T R A T O S
Dim ObjContratos As New ClsContratos
If ObjContratos.GetContratos(-1, -1) Then Application("GlobalDTContratos") = ObjContratos.DtResultados Else Application("GlobalDTContratos") = Nothing
Dim ObjContratos As New ClsContratos
If ObjContratos.GetContratos(-1, -1) Then Application("GlobalDTContratos") = ObjContratos.DtResultados Else Application("GlobalDTContratos") = Nothing
If ObjContratos.GetSecciones() Then Application("GlobalDTContratosSecciones") = ObjContratos.DtResultados Else Application("GlobalDTContratosSecciones") = Nothing
If ObjContratos.GetContratosTipos() Then Application("GlobalDTContratosTipos") = ObjContratos.DtResultados Else Application("GlobalDTContratosTipos") = Nothing
ObjContratos.Dispose()

View File

@@ -0,0 +1,348 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepTraspasoAlmacen.aspx.vb" Inherits="RepTraspasoAlmacen" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style>
.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;
}
.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;
}
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HB" 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="ImgExcel" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
</li>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
<asp:Label ID="LblTitulo" runat="server" Text="Reporte de Traspaso de Almacén"></asp:Label>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="HA" runat="Server">
<%-- <asp:UpdatePanel ID="UpdatePanel1" runat="server" RenderMode="Inline" UpdateMode="Conditional">
<ContentTemplate>
<div class="btn-group pull-right btn-separete">
</div>
</ContentTemplate>
</asp:UpdatePanel>--%>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server" defaultbutton="BtnConsultar">
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter" style="">
<div class="portlet-title portlet-filterT smalltitle" style="min-height: 49px; position: relative;">
<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="portlet-body">
<div class="row">
<label class="col-md-1 truncate">F.I.:</label>
<div class="col-md-2">
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 140px !important; padding: 0px; margin-top: 10px;">
<asp:TextBox ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<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="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<label class="col-md-1 truncate">F.F.:</label>
<div class="col-md-2">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 140px !important; padding: 0px; margin-top: 10px;">
<asp:TextBox ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<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="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<label class="col-md-2">Almacén Origen:</label>
<div class="col-md-3">
<asp:DropDownList ID="DdlAlmacenOrigen" Width="150px" AppendDataBoundItems="true" runat="server" DataTextField="Almacen" DataValueField="CveAlmacen" CssClass="form-control input-sm input-small select2me"></asp:DropDownList>
</div>
</div>
</div>
</div>
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
<div class="row">
<label class="col-md-1 truncate" data-toggle="tooltip" title="Almacén Destino">Almacén Destino:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlAlmacenDestino" DataTextField="Almacen" DataValueField="CveAlmacen" CssClass="form-control input-sm input-small select2me" Width="150px" runat="server"></asp:DropDownList>
</div>
<label class="col-md-1 truncate">Recibido:</label>
<div class="col-md-2">
<asp:CheckBox ID="ChkRecibido" runat="server" CssClass="make-switchsd" data-size="small" Text=" " />
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<br />
<div class="row">
<div align="right">
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
</div>
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ningun corte"
ToolTip="Remisiones sin Facturar"
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
data-sort="true" Style="text-align: center;" GridLines="None">
<Columns>
<asp:BoundField HeaderText="Disponible" DataField="Cantidad" DataFormatString="{0:#,##0.00####}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="10%" />
<asp:BoundField HeaderText="Unidad" DataField="UnidadMedida" ItemStyle-Width="10%" />
<asp:BoundField HeaderText="Código" DataField="Codigo" ItemStyle-Width="10%" />
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-Width="40%" ItemStyle-HorizontalAlign="Left"/>
<asp:BoundField HeaderText="SerieLote" DataField="SerieLote" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Left"/>
</Columns>
<HeaderStyle CssClass="Titulos" />
<RowStyle CssClass="Texto" />
<AlternatingRowStyle CssClass="TextoAlterno" />
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel runat="server" ID="UPPersonalizar" UpdateMode="Conditional">
<ContentTemplate>
<div id="DivPersonalizar" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<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="Label1" runat="server" ClientIDMode="Static" Text="Personalizar Columnas"></asp:Label></h4>
</div>
<div class="modal-body">
<table class="table table-striped table-advance table-hover Widthall">
<tbody>
<tr>
<td style="text-align: left;">
<asp:CheckBox ID="ChkUsuarioCancelacion" runat="server" Text="Usuario Cancelación" /></td>
</tr>
<tr>
<td style="text-align: left;">
<asp:CheckBox ID="ChkTipo" runat="server" Text="Cargo/Abono" /></td>
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
<asp:Button ID="BtnPersonalizar" runat="server" Text="Personalizar" class="btn btn-success" />
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
<%--<script type="text/javascript">
function Scroll() {
$(document).ready(function () {
var Tam = TamañoVentana();
var Alto = Tam.height - 300;
$('#<%=GvDatos.ClientID%>').gridviewScroll({
width: 995,
height: Alto
});
});
}
</script>--%>
<script type="text/javascript">
function GetSelectedRow(lnk, txtf, txtoi) {
//var row = lnk.parentNode.parentNode;
//var txtoi = row.cells[10].getElementsByTagName("input")[1];
if (lnk.checked) {
debugger;
if (txtf) { txtf.style.display = ""; }
if (txtoi) { txtoi.style.display = ""; }
// try {
// row.cells[10].getElementsByTagName("input")[0].style.display = "";
// if (txtoi) { txtoi.style.display = ""; }
// }
// catch (err) {
// row = row.parentNode;
// row.cells[10].getElementsByTagName("input")[0].style.display = "";
// }
} else {
if (txtf) { txtf.style.display = "none"; }
if (txtoi) { txtoi.style.display = "none"; }
// try {
// row.cells[10].getElementsByTagName("input")[0].style.display = "none";
// }
// catch (err) {
// row = row.parentNode;
// row.cells[10].getElementsByTagName("input")[0].style.display = "none";
// }
}
return false;
}
function FechaGeneral(lnk, FechaDocumento) {
debugger;
var row = lnk.parentNode.parentNode;
var parts = FechaDocumento.split("/");
var F1 = new Date(parts[2], parts[1], parts[0]);
if (lnk.checked) {
try {
parts = $get("TxtFechaAplicadoHeader").value.split("/");
var F2 = new Date(parts[2], parts[1], parts[0]);
if (F1 < F2) {
row.cells[10].getElementsByTagName("input")[0].value = $get("TxtFechaAplicadoHeader").value;
} else {
row.cells[10].getElementsByTagName("input")[0].value = FechaDocumento;
}
}
catch (err) {
row = row.parentNode;
row.cells[10].getElementsByTagName("input")[0].value = $get("TxtFechaAplicadoHeader").value;
}
}
return false;
}
</script>
<script type="text/javascript">
function OnClientShown(sender, args) {
sender._popupBehavior._element.style.zIndex = 10005;
sender._popupBehavior._element.style.position = "absolute";
sender._popupBehavior._element.style.top = "0px";
document.getElementById("C_GvDatosPanelItem").style.overflow = "initial";
}
</script>
<script src="/Metronic/assets/global/scripts/datatable.js"></script>
<script src="/Metronic/assets/global/plugins/datatables/all.min.js"></script>
<script type="text/javascript">
//function OrdenarGV() {
// var Tam = TamañoVentana();
// var Alto = Tam.height - 270;
// if (Alto < 100) {
// Alto = 100;
// }
// $('#C_GvDatos').DataTable({
// scrollY: Alto + 'px',
// scrollCollapse: true,
// paging: false,
// searching: false,
// info: false
// });
// $('#C_GvDatos').parent().parent().children().first().css("position", "static");
//}
</script>
</asp:Content>

View File

@@ -0,0 +1,176 @@
Option Explicit On
Option Strict On
Imports System.Data
Imports Microsoft.Reporting.WebForms
Imports Extensiones
Partial Class RepTraspasoAlmacen
Inherits ClsPaginas
Private Shared missing As Object = System.Reflection.Missing.Value
#Region "PROPIEDADES"
Private Property FechaI As String
Get
Return ViewState("FechaI").ToString
End Get
Set(value As String)
ViewState("FechaI") = value
End Set
End Property
Private Property FechaF As String
Get
Return ViewState("FechaF").ToString
End Get
Set(value As String)
ViewState("FechaF") = value
End Set
End Property
'Private Property CveCliente As Integer
' Get
' Return ViewState("CveCliente").ToString.ToEntero
' End Get
' Set(value As Integer)
' ViewState("CveCliente") = value
' End Set
'End Property
'Private Property Sucursales As String
' Get
' Return ViewState("Sucursales").ToString
' End Get
' Set(value As String)
' ViewState("Sucursales") = value
' End Set
'End Property
Private Property DtInventarios As DataTable
Get
Return DirectCast(ViewState("DtInventarios"), DataTable)
End Get
Set(value As DataTable)
ViewState("DtInventarios") = value
End Set
End Property
#End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
txtFechaI.Text = Now.Day.ToString + "/" + (Now.Month - 6).ToString + "/" + Now.Year.ToString
txtFechaF.Text = Now.ToShortDateString
CargaAlmacenOrigen()
CargaAlmacenDestino()
CargaDatos()
OrdenaDatos()
End If
End Sub
#Region " C A R G A - D A T O S "
Public Sub CargaDatos()
Dim ObjInventarios As New ClsInventarios
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1")
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1")
'CveCliente = If(DdlClientes.SelectedValue.ToEntero > 0, DdlClientes.SelectedValue.ToEntero, -1)
'Sucursales = IIf(DdlSubProyectos.GetSelectedValuesM = "", "-1", DdlSubProyectos.GetSelectedValuesM).ToString
If ObjInventarios.RepTraspasoAlmacen(FechaI, FechaF, DdlAlmacenOrigen.SelectedValue.ToEntero, DdlAlmacenDestino.SelectedValue.ToEntero, ChkRecibido.Checked, UsuarioActual.CveEmpresa) Then
GvDatos.DataSource = ObjInventarios.DtResultados
DtInventarios = ObjInventarios.DtResultados
GvDatos.DataBind()
UPDatos.Update()
End If
ObjInventarios.Dispose()
End Sub
#End Region
#Region "O R D E N A M I E N T O"
Private Sub OrdenaDatos()
'If (GvDatos.Rows.Count > 0) Then
' GvDatos.UseAccessibleHeader = True
' GvDatos.HeaderRow.TableSection = TableRowSection.TableHeader
' RegistraScript("OrdenarGV();")
'End If
End Sub
#End Region
#Region "G V - D A T O S "
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
'Cuando es titulo
If e.Row.DBCampo("PS").ToString.Trim = "" Then
e.Row.CssClass = "Totales"
e.Row.Cells(0).Text = String.Format("Folio: <a class=""texto"" style=""color:white;"" target='_blank' href='/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}'>{0}</a> ", e.Row.DBCampo("FolioSalida"), e.Row.DBCampo("CveMovimientoSalida"))
e.Row.Cells(1).Text = String.Format("{0}", e.Row.DBCampo("FechaMovto").ToString.ToDate.ToShortDateString)
e.Row.Cells(3).Text = String.Format("Almacen Destino: {0} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Responsable: {1}", e.Row.DBCampo("AlmacenDestino"), e.Row.DBCampo("Recibio"))
End If
End If
End Sub
#End Region
#Region "CARGA COMBOS FILTRO"
Private Sub CargaAlmacenOrigen()
DdlAlmacenOrigen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen NOT IN (3,4,9,10,11,21)")
DdlAlmacenOrigen.Items.Insert(0, New ListItem(" Todos ", "-1"))
DdlAlmacenOrigen.SelectedValue = "-1"
DdlAlmacenOrigen.DataBind()
DdlAlmacenOrigen.SelectedValueExist(UsuarioActual.CveAlmacen)
End Sub
Private Sub CargaAlmacenDestino()
DdlAlmacenDestino.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen NOT IN (3,4,9,10,11,21)")
DdlAlmacenDestino.DataBind()
DdlAlmacenDestino.Items.Insert(0, New ListItem("Todos", "-1"))
DdlAlmacenDestino.SelectedValue = "-1"
End Sub
#End Region
#Region "IMPRESION"
Private Sub LnkPdf_Click(sender As Object, e As EventArgs) Handles LnkPdf.Click
Imprime("PDF")
End Sub
Private Sub Imprime(Formato As String)
If DtInventarios IsNot Nothing Then
Dim StrFiltro As New StringBuilder
If txtFechaI.Text <> "" Then StrFiltro.AppendFormat("&emsp;<b>Fecha Inicio:</b> {0}", txtFechaI.Text.ToDate.ToShortDateString)
If txtFechaF.Text <> "" Then StrFiltro.AppendFormat("&emsp;<b>Fecha Fin:</b> {0}", txtFechaF.Text.ToDate.ToShortDateString)
If DdlAlmacenOrigen.SelectedValue <> "-1" Then StrFiltro.AppendFormat("&emsp;<b>Almacén Origen:</b> {0}", DdlAlmacenOrigen.SelectedItem.Text)
If DdlAlmacenDestino.SelectedValue <> "-1" Then StrFiltro.AppendFormat("&emsp;<b>Almacén Destino:</b> {0}", DdlAlmacenDestino.SelectedItem.Text)
If ChkRecibido.Checked Then StrFiltro.AppendFormat("&emsp;<b>Recibidos: </b>Si") Else StrFiltro.AppendFormat("&emsp;<b>Recibidos: </b>No")
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
Dim FechaI, FechaF As String
FechaI = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", "-1", txtFechaI.Text)
FechaF = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", "-1", txtFechaF.Text)
Dim params As New List(Of ReportParameter)
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("FechaInicio", FechaI))
params.Add(New ReportParameter("FechaFin", FechaF))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("Filtros", StrFiltro.ToString))
If Imagen.Exists Then
params.Add(New ReportParameter("LogoPath", logouri))
Else
params.Add(New ReportParameter("LogoPath", ""))
End If
ImprimirPDF("Empresas/Grales/Formatos/RepTraspasoAlmacen.rdlc", DtInventarios, params, String.Format("RepTraspasoAlmacen-{0}", Now.ToDateTime.ToShortDateString), Formato)
Else
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
End If
End Sub
#End Region
Private Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
CargaDatos()
End Sub
Private Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
Imprime("Excel")
End Sub
End Class

View File

@@ -155,7 +155,7 @@ Partial Class Nomina_ReportePTU
If Not IsNothing(rowc) Then
CveConcepto = rowc("CveConcepto").ToString().ToEntero()
Else
CveConcepto = objNomina.AddConcepto("PTU", "Utilidades", "P", "", True, True, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, -1, -1, -1, 0, -1)
CveConcepto = objNomina.AddConcepto("PTU", "Utilidades", "P", "", True, True, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, -1, -1, -1, 0, -1, 0, 0, 0, 0)
End If
If CveConcepto < 1 Then
continuar = False

View File

@@ -78,7 +78,7 @@
<asp:UpdatePanel ID="UPAcciones" runat="server">
<ContentTemplate>
<li>
<asp:LinkButton ID="BtnAgregarEstatus" runat="server" data-toggle="tooltip" data-placement="left" title="Agregar Estado de Orden de Servicio" Text="<i class='fa fa-plus'></i> Agregar"></asp:LinkButton>
<asp:LinkButton ID="BtnAgregarEstatus" runat="server" data-toggle="tooltip" data-placement="left" title="Agregar Estado de Orden de Servicio" Text="<i class='fa fa-plus'></i> Agregar Estatus"></asp:LinkButton>
</li>
</ContentTemplate>
@@ -88,6 +88,11 @@
<ajax:TabContainer runat="server" ActiveTabIndex="0" Width="100%" CssClass="tabBodyOverride">
<ajax:TabPanel runat="server" ID="TabCatalogo" HeaderText="Estatus">
<ContentTemplate>
<div class="row" style="margin-right: 10px; margin-top: 18px;" align="right">
<label for="TxtBusquedaEstatus">Buscar: </label>
<input type="text" id="TxtBusquedaEstatus" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", Prueba.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:HiddenField ClientIDMode="Static" runat="server" ID="HdnCveEstatus" Value="-1" />
@@ -116,17 +121,21 @@
<ajax:TabPanel runat="server" ID="TabPanel3" HeaderText="Configuración">
<ContentTemplate>
<div class="row" style="margin-right: 10px; margin-top: 18px;" align="right">
<label for="TxtBusqueda">Buscar: </label>
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", Prueba.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", Prueba.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
<asp:UpdatePanel ID="UpPrueba" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="Prueba" 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" style="text-align:center">
<asp:GridView ID="Prueba" 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" Style="text-align: center">
<HeaderStyle VerticalAlign="Middle" />
<Columns>
<asp:TemplateField>
<HeaderTemplate>Estatus</HeaderTemplate>
<ItemStyle Width="150px" BorderStyle="None" />
<ItemTemplate>
<asp:Label Font-Bold="true" Width="250px" ID="LblUsuario" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
<asp:Label Font-Bold="true" Style="text-align: left" Width="250px" ID="LblUsuario" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns>
@@ -144,7 +153,7 @@
<%--POPUP AGREGAR--%>
<div id="divAddEstatusOS" class="modal ADS fade" role="dialog">
<div class="modal-dialog">
<asp:UpdatePanel ID="UpAddEstatus" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
<asp:UpdatePanel ID="UpAddEstatus" class="modal-content" tabindex="-1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
@@ -171,7 +180,7 @@
<label for="<%= DdlTipoEstatus.ClientID.ToString()%>">Tipo Estatus:</label>
</div>
<br />
<div class="form-group form-md-line-input input-iconright">
<div runat="server" id="divChkEstatus" class="form-group form-md-line-input input-iconright">
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="form-control" />
<label for="<%= ChkEstatus.ClientID.ToString()%>">Estatus:</label>
</div>
@@ -180,7 +189,8 @@
<div class="modal-footer">
<asp:UpdatePanel ID="UpFooter" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:LinkButton ID="BtnAgregarEstatusOS" runat="server" CssClass="btn btn-primary" ValidationGroup="GrpObligatorio"> <i class='material-icons'>done_all</i> Agregar</asp:LinkButton>
<asp:Button ID="BtnAgregarEstatusOS" runat="server" class="btn btn-success" Text="Agregar" />
<%--<asp:LinkButton ID="BtnAgregarEstatusOS" runat="server" CssClass="btn btn-primary" ValidationGroup="GrpObligatorio"> <i class='material-icons'>done_all</i> Agregar</asp:LinkButton>--%>
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
</ContentTemplate>
</asp:UpdatePanel>

View File

@@ -63,10 +63,8 @@ Partial Class OS_CatEstatusOrdenServicio
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
DTUsuarios = GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa)
'DTUsuarios = GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa)
CargaDatos()
'CreaGrid()
'CargaGridEstatusUsuarios()
AsociarEstatusUsuarios()
CargarUsuarioConEstatus()
CveEstatuOS = -1
@@ -74,6 +72,7 @@ Partial Class OS_CatEstatusOrdenServicio
End Sub
Public Sub CargaDatos()
DTUsuarios = GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa)
Using ObjEstatusOrdenServicios As New ClsOS
If ObjEstatusOrdenServicios.GetEstatusOrdenServicio() Then
@@ -95,10 +94,12 @@ Partial Class OS_CatEstatusOrdenServicio
Private Sub BtnAgregarEstatus_Click(sender As Object, e As EventArgs) Handles BtnAgregarEstatus.Click
BtnAgregarEstatusOS.Text = "Agregar"
divChkEstatus.Visible = False
UpBodyEstatus.Update()
UpFooter.Update()
RegistraScript("$('#divAddEstatusOS').modal();LimpiaModal()")
End Sub
Private Sub BtnAgregarEstatusOS_Click(sender As Object, e As EventArgs) Handles BtnAgregarEstatusOS.Click
Protected Sub BtnAgregarEstatusOS_Click(sender As Object, e As EventArgs) Handles BtnAgregarEstatusOS.Click
Dim ObjEstatusOrdenServicios As New ClsOS
Dim TieneError = False
@@ -121,11 +122,15 @@ Partial Class OS_CatEstatusOrdenServicio
End If
End If
ObjEstatusOrdenServicios.Dispose()
CargaDatos()
UpDatos.Update()
RegistraScript("$('#divAddEstatusOS').modal('hide');")
'CargaDatos()
'AsociarEstatusUsuarios()
'CargarUsuarioConEstatus()
'UpDatos.Update()
'UpPrueba.Update()
Alert("Estatus agregado")
RegistraScript(String.Format("$('#{0}').modal('hide');", "divAddEstatusOS"))
Response.Redirect(HttpContext.Current.Request.Url.ToString(), True)
End Sub
Public Sub Edit_Click(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
@@ -134,6 +139,8 @@ Partial Class OS_CatEstatusOrdenServicio
ChkEstatus.Checked = If(GvRow.DataKey("Estado").ToString = "Activo", True, False)
CveEstatuOS = GvRow.DataKey("CveEstatusOrdenServicio").ToEntero
BtnAgregarEstatusOS.Text = "Actualizar"
divChkEstatus.Visible = True
UpBodyEstatus.Update()
UpAddEstatus.Update()
RegistraScript(String.Format("$('#{0}').modal();", "divAddEstatusOS"))
End Sub
@@ -161,8 +168,9 @@ Partial Class OS_CatEstatusOrdenServicio
End If
ObjEstatusOrdenServicios.Dispose()
CargaDatos()
UpDatos.Update()
'CargaDatos()
'UpDatos.Update()
Response.Redirect(HttpContext.Current.Request.Url.ToString(), True)
End Sub
Protected Sub GvDatos_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvDatos.RowUpdating
Dim ObjEstatusOrdenServicios As New ClsOS
@@ -200,6 +208,9 @@ Partial Class OS_CatEstatusOrdenServicio
End Sub
Private Sub CargarUsuarioConEstatus()
'For Contador As Integer = (Prueba.Columns.Count - 1) To 1 Step -1
' Prueba.Columns.RemoveAt(Contador)
'Next
For Each Estatus As DataRow In DtEstatusOS.Rows
Dim test As New CheckBoxField
test.HeaderText = Estatus.Item("EstatusOrdenServicio").ToString

View File

@@ -11,7 +11,7 @@ Partial Class RH_Asistencias
CargaProyecto()
CargaTurnos()
TxtFechaAsistencia.Text = Now.ToShortDateString
If UsuarioActual.CveRol = 1 Then
If UsuarioActual.CveRol = 1 OrElse UsuarioActual.CveUsuario = 2343 Then
PnlMasivo.Visible = True
CargaTiposPeriodo()
End If

View File

@@ -252,7 +252,7 @@
<asp:Literal ID="LtlContrato" runat="server" Text='<%# Eval("TieneContrato") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="PorcentajeAvance" HeaderText="Facturado" DataFormatString="{0:F}" HtmlEncode="false" />
<%-- <asp:BoundField DataField="PorcentajeAvance" HeaderText="Facturado" DataFormatString="{0:F}" HtmlEncode="false" />--%>
<%-- <asp:TemplateField>
<HeaderTemplate>
<asp:Label Text="Facturado" runat="server" CausesValidation="false"> </asp:Label>

View File

@@ -74,7 +74,7 @@ Partial Class RepRemisionesNC
Sucursales = IIf(DdlSubProyectos.GetSelectedValuesM = "", "-1", DdlSubProyectos.GetSelectedValuesM).ToString
If ObjVentas.GetRepCotizacionesSinFacturar(FechaI, FechaF, Sucursales, CveCliente, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
If ObjVentas.GetRepRemisionesNCSinFacturar(FechaI, FechaF, Sucursales, CveCliente, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
GvDatos.DataSource = ObjVentas.DtResultados
DtVentas = ObjVentas.DtResultados
GvDatos.DataBind()
@@ -113,7 +113,7 @@ Partial Class RepRemisionesNC
e.Row.Cells(2).ForeColor = Drawing.Color.Red
End If
e.Row.Cells(5).Text = e.Row.Cells(5).Text + "%"
'e.Row.Cells(5).Text = e.Row.Cells(5).Text + "%"
End If
End If