Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -285,7 +285,8 @@
|
||||
<div class="row" id="TrProveedor" runat="server" visible="false">
|
||||
<label class="col-md-1 truncate">Proveedor</label>
|
||||
<div class="col-md-5">
|
||||
<asp:DropDownList ID="DdlProveedor" CssClass="form-control select2me" runat="server" DataTextField="RazonSocial" DataValueField="CveProveedor"></asp:DropDownList>
|
||||
<%--<asp:DropDownList ID="DdlProveedor" CssClass="form-control select2me" runat="server" DataTextField="RazonSocial" DataValueField="CveProveedor"></asp:DropDownList>--%>
|
||||
<ADS:Dropdownlost ID="DdlProveedores" runat="server" CssStyle="width: 100%;" Width="100%" DataTextField="RazonSocial" DataValueField="CveProveedor"></ADS:Dropdownlost>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id="TrTipoCargado" runat="server" visible="false">
|
||||
@@ -674,7 +675,7 @@
|
||||
<asp:HiddenField runat="server" ID="HdnCodAFEdit" Value="-1" ClientIDMode="Static" />
|
||||
|
||||
<asp:GridView ID="GvM" runat="server" GridLines="none" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn" EmptyDataText="Aún no hay registros."
|
||||
DataKeyNames="No,CveMovimientoDetalle,Cantidad,CvePS,CveUM,PU,Observaciones,CodigoPS,UnidadMedida,CveAF,Serie,Lote,FechaCaducidad,CveSeccionAlmacen,Codigo" AutoGenerateColumns="False" AllowPaging="False" ShowFooter="True">
|
||||
DataKeyNames="No,CveMovimientoDetalle,Cantidad,CvePS,CveUM,PU,Observaciones,CodigoPS,UnidadMedida,CveAF,Serie,Lote,FechaCaducidad,CveSeccionAlmacen,Codigo,Total" AutoGenerateColumns="False" AllowPaging="False" ShowFooter="True">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="" ItemStyle-Font-Size="6pt">
|
||||
<EditItemTemplate>
|
||||
|
||||
@@ -287,6 +287,23 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
Public Property TotalOriginalEdit() As Decimal
|
||||
Get
|
||||
|
||||
If ViewState("TotalOriginalEdit") Is Nothing Then
|
||||
ViewState("TotalOriginalEdit") = 0D
|
||||
End If
|
||||
|
||||
Return ViewState("TotalOriginalEdit").ToString.ToDecimal
|
||||
End Get
|
||||
Set(value As Decimal)
|
||||
ViewState("TotalOriginalEdit") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
Public Property IndexActualTabla() As Integer
|
||||
Get
|
||||
|
||||
@@ -1130,10 +1147,18 @@ Partial Class Inventarios_EntradasSalidas
|
||||
'TxtPedidoContrato.Text = Mov.PedidoContrato
|
||||
|
||||
If Mov.CveProveedor > 0 Then
|
||||
DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa, Mov.CveProveedor)
|
||||
DdlProveedor.DataBind()
|
||||
DdlProveedor.SelectedValueExist(Mov.CveProveedor)
|
||||
DdlProveedor.Enabled = False
|
||||
'DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa, Mov.CveProveedor)
|
||||
'DdlProveedor.DataBind()
|
||||
'DdlProveedor.SelectedValueExist(Mov.CveProveedor)
|
||||
'DdlProveedor.Enabled = False
|
||||
|
||||
'CargaProveedores
|
||||
DdlProveedores.setEsWebService(True)
|
||||
DdlProveedores.Attributes.Add("data-metodo", "getproveedores")
|
||||
DdlProveedores.txtValue.Value = Mov.CveProveedor.ToString
|
||||
DdlProveedores.txtText.Value = Mov.DtResultados.Rows(0)("RazonSocial").ToString
|
||||
DdlProveedores.SelectedValue = "-1"
|
||||
|
||||
TrProveedor.Visible = True
|
||||
End If
|
||||
|
||||
@@ -1151,7 +1176,6 @@ Partial Class Inventarios_EntradasSalidas
|
||||
DtMovimientos.PrimaryKey = keys
|
||||
|
||||
CargaGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' "))
|
||||
|
||||
End If
|
||||
|
||||
PermisoVerImportes()
|
||||
@@ -1159,8 +1183,6 @@ Partial Class Inventarios_EntradasSalidas
|
||||
If IfNull(Request("Conta"), "0").ToString = "1" Then
|
||||
Contabilizar()
|
||||
End If
|
||||
|
||||
|
||||
Else
|
||||
Alert("Movimiento No encontrado", TipoMensaje.MsgError)
|
||||
|
||||
@@ -1526,7 +1548,20 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
If CveMovimiento > 0 Then
|
||||
If CveMovimientoDetalleEdit > 0 Then
|
||||
|
||||
If CveCompra > 0 Then
|
||||
Dim TotalActual As Decimal = (txtCantidad.Text.ToDecimal * txtPrecio.Text.ToDecimal)
|
||||
Dim Diferencia As Decimal = Math.Abs(TotalOriginalEdit - TotalActual).RoundSQL(2)
|
||||
|
||||
If Diferencia > 0 Then
|
||||
Alert($"Existe una diferencia de {Diferencia.ToString("###,###,###.00")} entre el total anterior ({TotalOriginalEdit.ToString("###,###,###.00")}) y actual({TotalActual.ToString("###,###,###.00")}).", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
ActualizarPS()
|
||||
|
||||
Else
|
||||
AgregarPS()
|
||||
End If
|
||||
@@ -1766,6 +1801,10 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End Sub
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
|
||||
|
||||
If DdlConcepto.SelectedValue.ToEntero = 28 AndAlso DdlProveedores.SelectedValue.ToEntero <= 0 Then
|
||||
Alert("Debe seleccionar un proveedor", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If Not IsDate(TxtFecha.Text.Replace(",", "")) Then
|
||||
Alert("Debe seleccioanr una fecha valida", TipoMensaje.MsgAdvertencia)
|
||||
@@ -1978,7 +2017,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
tFolio = If(TxtFolio.Text.ToEntero <> FolioAsignado, TxtFolio.Text.ToEntero, -1)
|
||||
End If
|
||||
Dim tCveProveedor As Integer = -1
|
||||
If DdlProveedor.SelectedValue.ToEntero > 0 Then tCveProveedor = DdlProveedor.SelectedValue.ToEntero
|
||||
If DdlProveedores.SelectedValue.ToEntero > 0 Then tCveProveedor = DdlProveedores.SelectedValue.ToEntero
|
||||
Dim obs As String = TxtObservaciones.Text.Trim()
|
||||
If obs = "" Then
|
||||
obs = DdlConcepto.SelectedItem.Text
|
||||
@@ -2604,8 +2643,13 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
Case "28"
|
||||
TrProveedor.Visible = True
|
||||
DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
||||
DdlProveedor.DataBind()
|
||||
'DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
||||
'DdlProveedor.DataBind()
|
||||
'CargaProveedores
|
||||
DdlProveedores.setEsWebService(True)
|
||||
DdlProveedores.Attributes.Add("data-metodo", "getproveedores")
|
||||
DdlProveedores.SelectedText = "Seleccione Uno"
|
||||
DdlProveedores.SelectedValue = "-1"
|
||||
If UsuarioActual.CveEmpresa = 119 Then txtPrecio.Enabled = False
|
||||
|
||||
Case Else
|
||||
@@ -2877,6 +2921,8 @@ Partial Class Inventarios_EntradasSalidas
|
||||
Protected Sub imgE_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
TotalOriginalEdit = 0D
|
||||
CveMovimientoDetalleEdit = -1
|
||||
|
||||
'Dim i As Integer = e.NewEditIndex
|
||||
'GvM.EditIndex =
|
||||
@@ -2886,7 +2932,8 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
If CveMovimiento > 0 Then
|
||||
CveMovimientoDetalleEdit = GvRow.DataKey("CveMovimientoDetalle").ToEntero
|
||||
txtCantidad.Enabled = False
|
||||
TotalOriginalEdit = GvRow.DataKey("Total").ToDecimal
|
||||
'txtCantidad.Enabled = False
|
||||
'DdlClasificacion.Enabled = False
|
||||
DdlProducto2.Enabled = False
|
||||
'DdlUnidad.Enabled = False
|
||||
@@ -5288,7 +5335,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
If TxtFecha.Visible Then TxtFecha.Enabled = True
|
||||
If TxtResponsable.Visible Then TxtResponsable.Enabled = True
|
||||
If TxtObservaciones.Visible Then TxtObservaciones.Enabled = True
|
||||
If DdlProveedor.Visible Then DdlProveedor.Enabled = True
|
||||
If DdlProveedores.Visible Then DdlProveedores.Enabled = True
|
||||
If TxtRemision.Visible Then TxtRemision.Enabled = True
|
||||
If DdlMoneda.Visible Then DdlMoneda.Enabled = True
|
||||
If TxtGuia.Visible Then TxtGuia.Enabled = True
|
||||
|
||||
@@ -4672,8 +4672,21 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
If CveOSEstatusFinalizada > 0 Then
|
||||
|
||||
Dim ObjOS As New ClsOS(TransaccionSql)
|
||||
'obtener estatus de la os, actual, si es cancelada, no se debe de cambiar el estatus.
|
||||
Dim CveEstatusActual As Integer = 1
|
||||
Dim CveTipoOS As Integer = -1
|
||||
If ObjOS.GetOrdenesServicios(CveOSCerrar, -1, -1, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
CveEstatusActual = ObjOS.CveEstatusOrdenServicio
|
||||
CveTipoOS = ObjOS.DtResultados.FiltroPrimeroValor("TipoEstatus").ToEntero
|
||||
End If
|
||||
|
||||
'si es cancelada. no se actualiza(5.Cancelada)
|
||||
If CveTipoOS <> 5 Then
|
||||
Respuesta = ObjOS.UpdateOrdenesServiciosEstatus(CveOSEstatusFinalizada, UsuarioActual.CveUsuario, CveOSCerrar)
|
||||
Else
|
||||
Respuesta = True
|
||||
End If
|
||||
|
||||
Respuesta = ObjOS.UpdateOrdenesServiciosEstatus(CveOSEstatusFinalizada, UsuarioActual.CveUsuario, CveOSCerrar)
|
||||
Dim cancelarPeido As Boolean = CancelarPedido(TransaccionSql, CveMovimientoGenerado, Respuesta)
|
||||
If Respuesta Then
|
||||
Dim ObjInventario As New ClsInventarios(TransaccionSql)
|
||||
|
||||
@@ -425,7 +425,7 @@
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="col-md-7">
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpNumeroParte">
|
||||
<ContentTemplate>
|
||||
<asp:Label runat="server" ID="LblNumeroParte" Text="" Visible ="false"></asp:Label>
|
||||
@@ -433,24 +433,54 @@
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</div>
|
||||
<div class="col-md-2" style="text-align:right!important">
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpOCS" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div id="DivIndicadorOC2" runat="server" visible="false" >
|
||||
<div style=" color: gray;font-size: 12px;font-weight: bold;">
|
||||
OC
|
||||
</div>
|
||||
<div style=" color: blue; font-size: 20px; font-weight: bold;">
|
||||
<asp:LinkButton ID="LnkIndicador_OC2" Text="" OnClick="LnkIndicador_OC_Click" runat="server" CssClass="Texto" />
|
||||
</div>
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="col-md-1" style="text-align:right!important">
|
||||
<div id="DivIndicadorL1" runat="server" visible="false" >
|
||||
<div style="font-size: 12px">
|
||||
<asp:Label runat="server" ID="LblHeaderL1"></asp:Label>
|
||||
</div>
|
||||
<div style="font-size: 12px">
|
||||
<asp:Label runat="server" ID="LblL1"></asp:Label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1" style="text-align:right!important">
|
||||
<div id="DivIndicadorL2" runat="server" visible="false" >
|
||||
<div style="font-size: 12px">
|
||||
<asp:Label runat="server" ID="LblHeaderL2"></asp:Label>
|
||||
</div>
|
||||
<div style="font-size: 12px">
|
||||
<asp:Label runat="server" ID="LblL2"></asp:Label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1" style="text-align:right!important">
|
||||
|
||||
<div id="DivIndicadorOC2" runat="server" visible="false" >
|
||||
<div style=" color: gray;font-size: 12px;font-weight: bold;">
|
||||
OC
|
||||
</div>
|
||||
<div style=" color: blue; font-size: 20px; font-weight: bold;">
|
||||
<asp:LinkButton ID="LnkIndicador_OC2" Text="" OnClick="LnkIndicador_OC_Click" runat="server" CssClass="Texto" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="text-right" style="margin: 5px 0px;">
|
||||
<input type="text" id="TxtBusqueda2" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvM.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
@@ -467,67 +497,85 @@
|
||||
<asp:GridView ID="GvM" Width="100%" runat="server" ShowHeader="true" EmptyDataText="No hay registros." AutoGenerateColumns="False" AllowPaging="False"
|
||||
ShowFooter="True" ShowHeaderWhenEmpty="True" CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None" DataKeyNames="CveMovimiento,FechaMovto">
|
||||
<Columns>
|
||||
<%--0--%>
|
||||
<asp:BoundField DataField="FechaMovto" DataFormatString="{0:d}" ItemStyle-Width="70px" HeaderText="Fecha" />
|
||||
<%--1--%>
|
||||
<asp:TemplateField ItemStyle-Width="10px" ItemStyle-HorizontalAlign="Left" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton data-toggle="tooltip" title="Editar Fecha" ID="LnkEditarFecha" OnClick="LnkEditarFecha_Click" CssClass="btn btn-circle btn-sm green" runat="server" Text="<i class='fa fa-pencil'></i>"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--2--%>
|
||||
<asp:BoundField DataField="Concepto" HeaderText="Movimiento" ItemStyle-HorizontalAlign="Left" />
|
||||
<%--3--%>
|
||||
<asp:BoundField DataField="Almacen" HeaderText="Almacén" ItemStyle-HorizontalAlign="Left" />
|
||||
<%--4--%>
|
||||
<asp:TemplateField ItemStyle-Width="70px" HeaderText="Folio">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="hlFolio" runat="server" Text='<%# Eval("Folio")%>' CssClass="Texto" NavigateUrl='<%# Eval("CveMovimiento", "/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}")%>' Target="_blank" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--5--%>
|
||||
<asp:BoundField DataField="AlmacenDestino" HeaderText="A.Destino" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="120px" />
|
||||
<%--6--%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Folio Doc.">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink runat="server" Target="_blank" ID="hlFolioD" Text='<%# Eval("FolioDocto")%>' CssClass="Texto" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--7--%>
|
||||
<asp:BoundField DataField="ClienteProveedor" HeaderText="Cliente/Proveedor" ItemStyle-HorizontalAlign="Left" Visible="false" />
|
||||
<%--8--%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Folio Rel." Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink runat="server" Target="_blank" ID="hlFolioDr" Text='<%# Eval("FolioRelacionEntrada")%>' NavigateUrl='<%# Eval("CveVentaRelacionada", "/Ventas/Ventas.aspx?CveVenta={0}")%>' CssClass="Texto" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--9--%>
|
||||
<asp:TemplateField ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Left" HeaderText="U. M.">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbUm" runat="server" Text='<%# Eval("UnidadMedida")%>' data-toggle="tooltip" title='<%# Eval("CveUnidadMedida")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--10--%>
|
||||
<asp:TemplateField ItemStyle-Width="70px" ItemStyle-HorizontalAlign="Left" HeaderText="Sección" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="lbSA" runat="server" Text='<%# Eval("SeccionAlmacen")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--11--%>
|
||||
<asp:TemplateField ItemStyle-Width="70px" ItemStyle-HorizontalAlign="Left" HeaderText="Serie" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="lbS" runat="server" Text='<%# Eval("Serie")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--12--%>
|
||||
<asp:TemplateField ItemStyle-Width="70px" ItemStyle-HorizontalAlign="Left" HeaderText="Lote" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="lbL" runat="server" Text='<%# Eval("Lote")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--13--%>
|
||||
<asp:TemplateField ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Center" HeaderText="F. Caducidad" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbFCad" runat="server" Text='<%# Eval("FechaCaducidad", "{0:d}")%>' data-toggle="tooltip"></asp:Label>
|
||||
</ItemTemplate>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--14--%>
|
||||
<asp:TemplateField ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" HeaderText="Entrada">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbEntrada" runat="server"
|
||||
Text='<%# Eval("Entrada", "{0:###,###.####}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--15--%>
|
||||
<asp:TemplateField ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" HeaderText="Salida">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbSalida" runat="server"
|
||||
Text='<%# Eval("Salida", "{0:###,###.####}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--16--%>
|
||||
<asp:TemplateField ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Right" HeaderText="Costo">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbCosto" runat="server"
|
||||
@@ -535,24 +583,28 @@
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100px" HorizontalAlign="Right"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
<%--17--%>
|
||||
<asp:TemplateField ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Right" HeaderText="Importe">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbImporte" runat="server"
|
||||
Text='<%# Eval("Importe", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--18--%>
|
||||
<asp:TemplateField ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Right" HeaderText="Existencias">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbExistencias" runat="server"
|
||||
Text='<%# Eval("Existencias", "{0:#,###.####}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--19--%>
|
||||
<asp:TemplateField ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Right" HeaderText="Valor">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbValor" runat="server"
|
||||
Text='<%# Eval("ValorInventario", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--20--%>
|
||||
<asp:TemplateField ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Center" HeaderText="OdeC">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbOC" runat="server" Text='<%# Eval("NoOrden")%>' data-toggle="tooltip" title='<%# Eval("CveOrdendeCorte")%>'></asp:Label>
|
||||
|
||||
@@ -79,16 +79,20 @@ Partial Class Inventarios_Kardex
|
||||
Private Sub CargaPermisos()
|
||||
If UsuarioActual.CveRol = 1 Then ChkAgruparAlmacen.Visible = True
|
||||
Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201)
|
||||
GvM.Columns(15).Visible = TienePermisoImportes ' costo
|
||||
GvM.Columns(16).Visible = TienePermisoImportes ' importe
|
||||
GvM.Columns(18).Visible = TienePermisoImportes ' valor
|
||||
GvM.Columns(16).Visible = TienePermisoImportes ' costo
|
||||
GvM.Columns(17).Visible = TienePermisoImportes ' importe
|
||||
GvM.Columns(19).Visible = TienePermisoImportes ' valor
|
||||
|
||||
GvM.Columns(19).Visible = UsuarioActual.CveEmpresa = 172 AndAlso UsuarioActual.CveRol = 1
|
||||
GvM.Columns(20).Visible = UsuarioActual.CveEmpresa = 172 AndAlso UsuarioActual.CveRol = 1
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(574).ToEntero = 1 Then
|
||||
DVFiltroCodigo.Visible = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||
GvM.Columns(7).Visible = True
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function isWithFamily() As Boolean
|
||||
@@ -261,13 +265,13 @@ Partial Class Inventarios_Kardex
|
||||
AplicaAlmacenDestino = DtTemp.MAX("AlmacenDestino") <> "" AndAlso UsuarioActual.Empresa.Funcionalidad(382) = "1"
|
||||
|
||||
GvM.Columns(5).Visible = AplicaAlmacenDestino
|
||||
GvM.Columns(7).Visible = DtTemp.MAX("FolioRelacionEntrada") <> ""
|
||||
GvM.Columns(8).Visible = DtTemp.MAX("FolioRelacionEntrada") <> ""
|
||||
|
||||
If AplicaSeccion Then GvM.Columns(9).Visible = True
|
||||
If AplicaSerie Then GvM.Columns(10).Visible = True
|
||||
If AplicaLote Then GvM.Columns(11).Visible = True
|
||||
If AplicaCaducidad Then GvM.Columns(12).Visible = True
|
||||
If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then GvM.Columns(12).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
|
||||
If AplicaSeccion Then GvM.Columns(10).Visible = True
|
||||
If AplicaSerie Then GvM.Columns(11).Visible = True
|
||||
If AplicaLote Then GvM.Columns(12).Visible = True
|
||||
If AplicaCaducidad Then GvM.Columns(13).Visible = True
|
||||
If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then GvM.Columns(13).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
|
||||
|
||||
Dim Drp As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
|
||||
Dim AuxAplicaSerie As Boolean
|
||||
@@ -341,6 +345,50 @@ Partial Class Inventarios_Kardex
|
||||
UpOCS.Update()
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaPreciosLista(CvePS As Integer)
|
||||
|
||||
|
||||
LblHeaderL1.Text = ""
|
||||
LblL1.Text = ""
|
||||
|
||||
LblHeaderL2.Text = ""
|
||||
LblL2.Text = ""
|
||||
|
||||
DivIndicadorL1.Visible = False
|
||||
DivIndicadorL2.Visible = False
|
||||
|
||||
Dim DTPrecioLista As New DataTable
|
||||
|
||||
Dim objPS As New ClsProductosServicios
|
||||
If objPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, -1, CvePS:=CvePS) Then
|
||||
DTPrecioLista = objPS.DtResultados.Copy
|
||||
End If
|
||||
objPS.Dispose()
|
||||
|
||||
|
||||
If DTPrecioLista.Rows.Count = 1 Then
|
||||
LblHeaderL1.Text = DTPrecioLista.Rows(0)("PrecioLista").ToString
|
||||
LblL1.Text = DTPrecioLista.Rows(0)("Precio").ToString.ToDecimal.ToString("###,###,###.00")
|
||||
DivIndicadorL1.Visible = True
|
||||
ElseIf DTPrecioLista.Rows.Count >= 2 Then
|
||||
|
||||
LblHeaderL1.Text = DTPrecioLista.Rows(0)("PrecioLista").ToString
|
||||
LblL1.Text = DTPrecioLista.Rows(0)("Precio").ToString.ToDecimal.ToString("###,###,###.00")
|
||||
|
||||
LblHeaderL2.Text = DTPrecioLista.Rows(1)("PrecioLista").ToString
|
||||
LblL2.Text = DTPrecioLista.Rows(1)("Precio").ToString.ToDecimal.ToString("###,###,###.00")
|
||||
|
||||
DivIndicadorL1.Visible = True
|
||||
DivIndicadorL2.Visible = True
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function CargarKardex(CvePS As Integer) As DataTable
|
||||
Dim dt As DataTable = Nothing
|
||||
|
||||
@@ -409,6 +457,7 @@ Partial Class Inventarios_Kardex
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||
CargarOCPendientesCompra()
|
||||
CargaPreciosLista(CvePS)
|
||||
DivIndicadorOC.Visible = True
|
||||
DivIndicadorOC2.Visible = True
|
||||
UpOCS.Update()
|
||||
|
||||
@@ -16,24 +16,29 @@
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpFiltraEntrega" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
|
||||
<div class="portlet-title portlet-filterT smalltitle magindate">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnCargaPendientes" runat="server" Text="Consultar" class="btn btn-default" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
|
||||
<label class="col-md-1 truncate" style="text-align: right;">Proveedor:</label>
|
||||
<div class="col-md-3">
|
||||
<ADS:Dropdownlost ID="ddlProveedor" runat="server" DataValueField="CveProveedor" DataTextField="RazonSocial" AutoPostBack="true" CssClassDdl="select2me" CssStyle="width: 300px; "></ADS:Dropdownlost>
|
||||
<div class="row" style="display: flex; align-items: center;">
|
||||
<label class="col-md-1 truncate" style="text-align: right;">Proveedor:</label>
|
||||
<div class="col-md-2">
|
||||
<ADS:Dropdownlost ID="ddlProveedor" runat="server" DataValueField="CveProveedor" DataTextField="RazonSocial" AutoPostBack="true" CssClassDdl="select2me" CssStyle="width: 300px; "></ADS:Dropdownlost>
|
||||
</div>
|
||||
<label class="col-md-1 truncate" style="text-align: right;">Folio:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:TextBox ID="TxtFolioEntrega" runat="server" Width="100px" CssClass="form-control input-sm"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="SoloNumeros2" runat="server" TargetControlID="TxtFolioEntrega" FilterType="Numbers" />
|
||||
</div>
|
||||
<label runat="server" id="LblSubProyecto" class="col-md-1 truncate">Sucursal:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" Width="100%" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 truncate" style="text-align: right;">Folio:</label>
|
||||
<div class="col-md-3">
|
||||
<asp:TextBox ID="TxtFolioEntrega" runat="server" Width="70px"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="SoloNumeros2" runat="server" TargetControlID="TxtFolioEntrega" FilterType="Numbers" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -138,7 +143,7 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtCantidad" Visible="false" Width="60px" runat="server" Text="0" Enabled="false" Style="text-align:right;"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtCantidad" Visible="false" Width="60px" runat="server" Text="0" Enabled="false" Style="text-align: right;"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="SoloNumeros2" runat="server" TargetControlID="TxtCantidad" FilterType="Custom, Numbers" ValidChars="." />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
@@ -146,19 +151,19 @@
|
||||
<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="35%" />
|
||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="10%" Visible="false"/>
|
||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="10%" Visible="false" />
|
||||
<asp:TemplateField HeaderText="Lote" ItemStyle-Width="10%" HeaderStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlLote" runat="server" Text='<%# Eval("Lote", "{0}") %>'></asp:Literal>
|
||||
<asp:Textbox ID="TxtLote" runat="server" Visible="false" Width="70px" Text='<%# Eval("Lote", "{0}") %>'></asp:Textbox>
|
||||
<asp:TextBox ID="TxtLote" runat="server" Visible="false" Width="70px" Text='<%# Eval("Lote", "{0}") %>'></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
</asp:TemplateField>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Fecha" ItemStyle-Width="25%" HeaderStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaCaducidad" runat="server" Text='<%# Eval("FechaCaducidad", "{0:d}") %>'></asp:Literal>
|
||||
<asp:Textbox ID="TxtFechaCaducidad" runat="server" Visible="false" Width="75px" Text='<%# Eval("FechaCaducidad", "{0:d}") %>'></asp:Textbox>
|
||||
<asp:TextBox ID="TxtFechaCaducidad" runat="server" Visible="false" Width="75px" Text='<%# Eval("FechaCaducidad", "{0:d}") %>'></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
</asp:TemplateField>
|
||||
|
||||
@@ -50,6 +50,9 @@ Partial Class Inventarios_PrestamosdeProveedor
|
||||
DdlAlmacenOrigen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1)
|
||||
DdlAlmacenOrigen.DataBind()
|
||||
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, CveEstatus:=1)
|
||||
DdlSubProyecto.DataBind()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
@@ -59,7 +62,7 @@ Partial Class Inventarios_PrestamosdeProveedor
|
||||
If TxtFolioEntrega.Text <> "" Then tFolio = TxtFolioEntrega.Text.ToEntero
|
||||
Dim ObjInv As New ClsInventarios
|
||||
|
||||
If ObjInv.PrestamosdeProveedorGet(tCveProveedor, tFolio, UsuarioActual.CveEmpresa) Then
|
||||
If ObjInv.PrestamosdeProveedorGet(tCveProveedor, tFolio, DdlSubProyecto.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa) Then
|
||||
GvD.DataSource = ObjInv.DtResultados
|
||||
Dim Dr As Data.DataRow = ObjInv.DtResultados.FiltroPrimero("")
|
||||
If Dr IsNot Nothing AndAlso tFolio > 0 Then
|
||||
|
||||
Reference in New Issue
Block a user