local
This commit is contained in:
@@ -36,16 +36,30 @@
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
|
||||
<label class="col-md-1 truncate" style="text-align: right;">Almacen:</label>
|
||||
<div class="col-md-3">
|
||||
<asp:DropDownList ID="DdlAlmacen" runat="server" DataValueField="CveAlmacen" DataTextField="Almacen" class="select2me" Width="300px"></asp:DropDownList>
|
||||
<label class="col-sm-1" style="text-align: right">Almacen:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlAlmacen" runat="server" DataValueField="CveAlmacen" DataTextField="Almacen" class="select2me" Width="100%"></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 truncate" style="text-align: right;">Clasificacion:</label>
|
||||
<div class="col-md-3">
|
||||
<asp:DropDownList ID="DdlClasificaciones" runat="server" DataValueField="CveClasificacion" DataTextField="Clasificacion" class="select2me" Width="300px"></asp:DropDownList>
|
||||
<label class="col-sm-1" style="text-align: right">Clasificacion:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlClasificaciones" runat="server" DataValueField="CveClasificacion" DataTextField="Clasificacion" class="select2me" Width="100%"></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-sm-1" style="text-align: right">Folio:</label>
|
||||
<div class="col-sm-1" style="width:60px">
|
||||
<asp:TextBox runat="server" ID="TxtFolioFiltro" Width="60px" />
|
||||
</div>
|
||||
|
||||
<label class="col-sm-1" style="text-align: right">Producto:</label>
|
||||
<div class="col-md-2">
|
||||
<ADS:Dropdownlost runat="server" ID="DdlPS" CssStyle="width:150px" CssClass="DdlPS " CssClassDdl="select2me" data-metodo="getps" UsaWebService="true" IncluyeTodos="false" DataTextField="PSCodigo" DataValueField="CvePS" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<div class="row" style="margin-left: 0px;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -62,15 +76,22 @@
|
||||
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-Width="5%" />
|
||||
<asp:BoundField HeaderText="FechaCaducidad" DataField="FechaCaducidad" ItemStyle-Width="5%" />
|
||||
<asp:BoundField HeaderText="Sección Actual" DataField="SeccionAlmacen" ItemStyle-Width="15%" />
|
||||
<asp:BoundField HeaderText="Existencia" DataField="Existencia" DataFormatString="{0:#,###.##}" ItemStyle-Width="5%" />
|
||||
<asp:TemplateField ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center">
|
||||
<%--<asp:BoundField HeaderText="Existencia" DataField="Existencia" DataFormatString="{0:#,###.##}" ItemStyle-Width="5%" />--%>
|
||||
<asp:TemplateField ItemStyle-Width="7%">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="Chk" Checked="false" runat="server"></asp:CheckBox>
|
||||
<%--<asp:Literal ID="LtlExistencia" runat="server" Text='<%# Eval("Existencia").ToString().Split("."c)(0) %>'></asp:Literal>--%>
|
||||
<asp:TextBox ID="TxtCantidad" runat="server" Text='<%# Eval("Existencia").ToString().Split("."c)(0) %>' Width="100%" />
|
||||
<asp:RangeValidator ID="RVR" Display="Dynamic" ControlToValidate="TxtCantidad" runat="server" MinimumValue="0" Type="Double" ErrorMessage="No cumple con la cantidad especificada"></asp:RangeValidator>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="3%" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="Chk" Checked="false" runat="server" OnCheckedChanged="Chk_Click" AutoPostBack="true"></asp:CheckBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Nueva Seccion" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DDlS" runat="server" Width="150px" DataValueField="CveSeccion" DataTextField="Seccion" class="select2me"></asp:DropDownList>
|
||||
<asp:DropDownList ID="DDlS" runat="server" Width="150px" DataValueField="CveSeccionAlmacen" DataTextField="SeccionAlmacen" class="select2me"></asp:DropDownList>
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
@@ -13,7 +13,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCombos()
|
||||
Dim DtAlmacenes As DataTable = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
Dim DtAlmacenes As DataTable = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1).FiltraParametros("CveTipoAlmacen in (1,14)")
|
||||
|
||||
DdlAlmacen.DataSource = DtAlmacenes
|
||||
DdlAlmacen.DataBind()
|
||||
@@ -24,6 +24,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen
|
||||
DdlClasificaciones.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
|
||||
DdlClasificaciones.DataBind()
|
||||
DdlClasificaciones.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
|
||||
@@ -32,8 +33,9 @@ Partial Class Inventarios_AjustesSeccionAlmacen
|
||||
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjInv As New ClsInventarios
|
||||
|
||||
If ObjInv.GetMovimientosDetalleSeccionesAlmacen(DdlAlmacen.SelectedValue.ToEntero, DdlClasificaciones.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
Dim CvePS As String = If(DdlPS.SelectedValue = "", "-1", DdlPS.SelectedValue)
|
||||
Dim FolioAux As String = If(TxtFolioFiltro.Text.Length > 0, TxtFolioFiltro.Text, "-1")
|
||||
If ObjInv.GetMovimientosDetalleSeccionesAlmacen(DdlAlmacen.SelectedValue.ToEntero, DdlClasificaciones.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, FolioAux, CvePS.ToEntero) Then
|
||||
GvD.DataSource = ObjInv.DtResultados
|
||||
End If
|
||||
|
||||
@@ -44,10 +46,19 @@ Partial Class Inventarios_AjustesSeccionAlmacen
|
||||
|
||||
Private Sub GvD_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvD.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
CargaSeccionesAlmacen(e.Row.FCDropDownList("DDlS"), DdlAlmacen.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero, UsuarioActual.CveEmpresa)
|
||||
|
||||
e.Row.FCDropDownList("DDlS").DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero)
|
||||
e.Row.FCDropDownList("DDlS").DataBind()
|
||||
'e.Row.FCDropDownList("DDlS").DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero)
|
||||
'e.Row.FCDropDownList("DDlS").DataBind()
|
||||
|
||||
Dim ExistenciasAux As Decimal = e.Row.DataKey("Existencia").ToDecimal
|
||||
e.Row.FCRangeValidator("RVR").Enabled = ExistenciasAux > 0
|
||||
If ExistenciasAux > 0 Then
|
||||
e.Row.FCRangeValidator("RVR").MaximumValue = ExistenciasAux
|
||||
Else
|
||||
e.Row.FCCheckBox("Chk").Visible = False
|
||||
e.Row.FCRangeValidator("RVR").MaximumValue = 0
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -77,11 +88,12 @@ Partial Class Inventarios_AjustesSeccionAlmacen
|
||||
Dim CveMovimientoDetalleEntrada As Integer = 0
|
||||
Dim Cont As Integer = 0
|
||||
Dim Lista As New Hashtable
|
||||
Dim Cantidad As Decimal = 0
|
||||
For Each gvr As GridViewRow In GvD.Rows
|
||||
|
||||
'que este seleccionado y que tenga diferente seccion
|
||||
If gvr.FCCheckBox("Chk").Checked AndAlso gvr.FCDropDownList("DDlS").SelectedValue.ToEntero <> gvr.DataKey("CveSeccionAlmacen").ToEntero Then
|
||||
|
||||
Cantidad = gvr.FCTextBox("TxtCantidad").Text.ToDecimal()
|
||||
If gvr.DataKey("CveSeccionAlmacen").ToEntero > 0 Then
|
||||
ObjPS.UpdateAplicaSeccionAlmacen(gvr.DataKey("CvePS").ToEntero, UsuarioActual.CveEmpresa, True)
|
||||
Else
|
||||
@@ -89,7 +101,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen
|
||||
End If
|
||||
If Not Lista.ContainsKey(gvr.DataKey("CvePS").ToEntero) Then Lista.Add(gvr.DataKey("CvePS").ToEntero, gvr.FCDropDownList("DDlS").SelectedValue.ToEntero) 'guardo que dato le corresponde
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, gvr.DataKey("Existencia").ToDecimal, gvr.DataKey("CveUM").ToEntero, gvr.DataKey("CvePS").ToEntero, 0, -1, CveSeccionAlmacen:=gvr.DataKey("CveSeccionAlmacen").ToEntero, Serie:=gvr.DataKey("Serie"), Lote:=gvr.DataKey("Lote"), FechaCaducidad:=gvr.DataKey("FechaCaducidad").ToDate) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Cantidad, gvr.DataKey("CveUM").ToEntero, gvr.DataKey("CvePS").ToEntero, 0, -1, CveSeccionAlmacen:=gvr.DataKey("CveSeccionAlmacen").ToEntero, Serie:=gvr.DataKey("Serie"), Lote:=gvr.DataKey("Lote"), FechaCaducidad:=gvr.DataKey("FechaCaducidad").ToDate) Then
|
||||
ErrorMovInv = True
|
||||
TextoError = "Ocurrió un error al guardar los movimientos de salida"
|
||||
Exit For
|
||||
@@ -109,7 +121,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen
|
||||
|
||||
For Each Row As DataRow In resultado.Rows
|
||||
Dim CvePS = Row("CvePS").ToString().ToEntero()
|
||||
Dim Cantidad As Decimal = Row("Cantidad").ToString().ToDecimal()
|
||||
'Dim Cantidad As Decimal = Row("Cantidad").ToString().ToDecimal()
|
||||
Dim PU As Decimal = Row("PUOriginal").ToString().ToDecimal()
|
||||
Dim CveUM As Integer = Row("CveUM").ToString().ToEntero()
|
||||
Dim CveSeccionAlmacen As Integer = Lista(Row("CvePS").ToString().ToEntero()) 'GvD.Rows(ind).FCDropDownList("DDlS").SelectedValue.ToEntero ' IfNull(Row("CveSeccionAlmacen"), "-1").ToString().ToEntero()
|
||||
@@ -121,9 +133,9 @@ Partial Class Inventarios_AjustesSeccionAlmacen
|
||||
'actualizamos el PS, para que tenga el aplica seccion
|
||||
|
||||
ObjPS.UpdateAplicaSeccionAlmacen(Row("CvePS").ToString().ToEntero(), UsuarioActual.CveEmpresa, True)
|
||||
If Not ObjInventario.AddProductosServiciosAlmacenSeccion(CvePS, CveAlmacen, CveSeccionAlmacen) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
'If Not ObjInventario.AddProductosServiciosAlmacenSeccion(CvePS, CveAlmacen, CveSeccionAlmacen) Then
|
||||
' ErrorMovInv = True
|
||||
'End If
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Cantidad, CveUM, CvePS, PU, -1, CostoIndirecto:=CostoIndirecto, CveSeccionAlmacen:=CveSeccionAlmacen, Lote:=Lote, Serie:=Serie, FechaCaducidad:=FechaCaducidad, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
ErrorMovInv = True
|
||||
@@ -288,7 +300,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen
|
||||
|
||||
Try
|
||||
Dim DtExistenciasSecciones As DataTable = Nothing
|
||||
If ObjInventario.GetMovimientosDetalleSeccionesAlmacen(DdlAlmacenExcel.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa) Then
|
||||
If ObjInventario.GetMovimientosDetalleSeccionesAlmacen(DdlAlmacenExcel.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa, "-1", -1) Then
|
||||
DtExistenciasSecciones = ObjInventario.DtResultados.Copy()
|
||||
End If
|
||||
|
||||
@@ -370,9 +382,9 @@ Partial Class Inventarios_AjustesSeccionAlmacen
|
||||
|
||||
'ACTUALIZAMOS EL PS, PARA QUE TENGA EL APLICA SECCION
|
||||
ErrorMovInv = Not ObjPS.UpdateAplicaSeccionAlmacen(CvePS, UsuarioActual.CveEmpresa, True)
|
||||
If Not ObjInventario.AddProductosServiciosAlmacenSeccion(CvePS, CveAlmacen, CveSeccionAlmacen) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
'If Not ObjInventario.AddProductosServiciosAlmacenSeccion(CvePS, CveAlmacen, CveSeccionAlmacen) Then
|
||||
' ErrorMovInv = True
|
||||
'End If
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, CantidadEntrada, CveUMEntrada, CvePSEntrada, PUEntrada, -1, CostoIndirecto:=CostoIndirecto, CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
ErrorMovInv = True
|
||||
@@ -447,4 +459,12 @@ Partial Class Inventarios_AjustesSeccionAlmacen
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub Chk_Click(sender As Object, e As EventArgs)
|
||||
'Dim row As GridViewRow = (CType((CType(sender, CheckBox)).NamingContainer, GridViewRow))
|
||||
'Dim ExistenciaBackup As Integer = row.DataKey("Existencia").ToEntero()
|
||||
'row.FCTextBox("TxtCantidad").Enabled = Not row.FCTextBox("TxtCantidad").Enabled
|
||||
'If Not row.FCTextBox("TxtCantidad").Enabled Then
|
||||
' row.FCTextBox("TxtCantidad").Text = ExistenciaBackup
|
||||
'End If
|
||||
End Sub
|
||||
End Class
|
||||
@@ -401,7 +401,7 @@
|
||||
<asp:UpdatePanel runat="server" ID="UpDatosDesapartado" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div style="max-height: 300px; overflow-y: auto;">
|
||||
<asp:GridView ID="GvDatosDesapartado" DataKeyNames="CvePS,CveUM,CveMovimientoDetalle,CveSeccionAlmacen,Serie,Lote,FechaCaducidad,PU,Cantidad,AplicaSeccion" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró mercancía apartada" ToolTip="Listado de Movimientos" CssClass="Widthall table table-striped table-hover" GridLines="None">
|
||||
<asp:GridView ID="GvDatosDesapartado" DataKeyNames="CvePS,CveUM,CveMovimientoDetalle,CveSeccionAlmacen,Serie,Lote,FechaCaducidad,PU,Cantidad,AplicaSeccion,AplicaSerie" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró mercancía apartada" ToolTip="Listado de Movimientos" CssClass="Widthall table table-striped table-hover" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="#" DataField="No" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" ItemStyle-Font-Size="6pt" />
|
||||
<asp:BoundField HeaderText="Disponible" DataField="Cantidad" DataFormatString="{0:#,###.##}" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right" />
|
||||
@@ -416,9 +416,9 @@
|
||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="20%" />
|
||||
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-Width="10%" />
|
||||
<asp:BoundField HeaderText="F.Caducidad" DataField="FechaCaducidad" DataFormatString="{0:d}" ItemStyle-Width="10%" />
|
||||
<asp:TemplateField HeaderText="Sección Almacén" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false">
|
||||
<asp:TemplateField HeaderText="Sección" ItemStyle-Width="10%" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="SeccionAlmacen" AppendDataBoundItems="true" DataValueField="CveSeccionAlmacen" Class="form-control input-sm select2me" Style="width: 95% !important" runat="server" CausesValidation="true">
|
||||
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="SeccionAlmacen" AppendDataBoundItems="true" DataValueField="CveSeccionAlmacen" Class="form-control input-sm select2me" Visible="false" Style="width: 95% !important" runat="server" CausesValidation="true">
|
||||
|
||||
</asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
|
||||
@@ -285,8 +285,9 @@ Partial Class Inventarios_Apartados
|
||||
If CBool(drP("AplicaSeccion")) Then
|
||||
ThSeccion.Visible = True
|
||||
TdSeccionAlmacen.Visible = True
|
||||
DdlSeccionAlmacen.DataSource = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, DdlProducto2.SelectedValue.ToEntero)
|
||||
DdlSeccionAlmacen.DataBind()
|
||||
CargaSeccionesAlmacen(DdlSeccionAlmacen, DdlAlmacenOrigen.SelectedValue.ToEntero, DdlProducto2.SelectedValue.ToEntero, UsuarioActual.CveEmpresa)
|
||||
'DdlSeccionAlmacen.DataSource = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, DdlProducto2.SelectedValue.ToEntero)
|
||||
'DdlSeccionAlmacen.DataBind()
|
||||
GvDatos.Columns(7).Visible = True
|
||||
End If
|
||||
|
||||
@@ -836,7 +837,7 @@ Partial Class Inventarios_Apartados
|
||||
GvDatosDesapartado.Columns(5).Visible = DtTemp.MAX("Serie").ToString <> ""
|
||||
GvDatosDesapartado.Columns(6).Visible = DtTemp.MAX("Lote").ToString <> ""
|
||||
GvDatosDesapartado.Columns(7).Visible = DtTemp.MAX("FechaCaducidad").ToString.ToDate > MinFecha
|
||||
GvDatosDesapartado.Columns(8).Visible = DtTemp.MAX("CveSeccionAlmacen").ToString.ToEntero > 0
|
||||
GvDatosDesapartado.Columns(8).Visible = DtTemp.MAX("AplicaSeccion") = "True"
|
||||
|
||||
GvDatosDesapartado.DataSource = DtTemp
|
||||
GvDatosDesapartado.DataBind()
|
||||
|
||||
91
Inventarios/CatAlmacenClasificacionSecciones.aspx
Normal file
91
Inventarios/CatAlmacenClasificacionSecciones.aspx
Normal file
@@ -0,0 +1,91 @@
|
||||
<%@ Page Title="Inventarios - Catálogo almacén clasificación secciones" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="CatAlmacenClasificacionSecciones.aspx.cs" Inherits="Inventarios_CatAlmacenClasificacionSecciones" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Almacén Clasificacion Secciones
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarAlmacenClasificacionSeccion" OnClick="BtnAgregarAlmacenClasificacionSeccion_Click" data-toggle="tooltip" data-placement="left" title="Agregar" Text="<i class='fa fa-plus'></i>Agregar"></asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveSeccionClasificacion,CveAlmacen,CveClasificacion,CveClasificacionDetalle,CveMarca,CveSeccionAlmacen,Almacen,Clasificacion,ClasificacionDetalle,Marca,SeccionAlmacen"
|
||||
EmptyDataText="No se encontraron Tipo Gasto" ToolTip="Listado de Tipo Gasto " CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; width: 100%"
|
||||
GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Almacen" HeaderText="Almacén" />
|
||||
<asp:BoundField DataField="Clasificacion" HeaderText="Clasificación" />
|
||||
<asp:BoundField DataField="ClasificacionDetalle" HeaderText="Tipo" />
|
||||
<asp:BoundField DataField="Marca" HeaderText="Marca" />
|
||||
<asp:BoundField DataField="SeccionAlmacen" HeaderText="Sección Almacén" />
|
||||
<asp:TemplateField ItemStyle-Width="13%" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Left" HeaderText="Editar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEditar" OnClick="LnkEditar_Click" runat="server" Visible="true" AlternateText="Subir" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i title='Editar' class='fa fa-pencil' title='Editar' ></i>" />
|
||||
<asp:LinkButton ID="LnkEliminar" OnClick="LnkEliminar_Click" runat="server" Visible="true" AlternateText="Reasignar" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i title='Reasignar' class='icon-trash' title='Eliminar' ></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div id="DivAgregarTiposD" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalTiposD" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModalTiposD" runat="server">Almacén Clasificación Sección</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<label for="DdlAlmacen">Almacén:</label><br />
|
||||
<asp:DropDownList runat="server" ID="DdlAlmacen" DataTextField="Almacen" DataValueField="CveAlmacen" OnSelectedIndexChanged="DdlAlmacen_Change" AutoPostBack="true" CssClass="select2me" Width="100%" />
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<label for="DdlClasificacion">Clasificación:</label><br />
|
||||
<asp:DropDownList runat="server" ID="DdlClasificacion" DataTextField="Clasificacion" DataValueField="CveClasificacion" CssClass="select2me" Width="100%" />
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<label for="DdlTipo">Tipo:</label><br />
|
||||
<asp:DropDownList runat="server" ID="DdlTipo" DataTextField="ClasificacionDetalle" DataValueField="CveClasificacionDetalle" CssClass="select2me" Width="100%" />
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<label for="DdlMarca">Marca:</label><br />
|
||||
<asp:DropDownList runat="server" ID="DdlMarca" DataTextField="Marca" DataValueField="CveMarca" CssClass="select2me" Width="100%" />
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<label for="DdlSeccionAlmacen">Sección Almacén:</label><br />
|
||||
<asp:DropDownList runat="server" ID="DdlSeccionAlmacen" DataTextField="SeccionAlmacen" DataValueField="CveSeccionAlmacen" CssClass="select2me" Width="100%" />
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnAgregarACS" OnClick="BtnAgregarACS_Click" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpTiposD" />
|
||||
<button id="Button3" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
153
Inventarios/CatAlmacenClasificacionSecciones.aspx.cs
Normal file
153
Inventarios/CatAlmacenClasificacionSecciones.aspx.cs
Normal file
@@ -0,0 +1,153 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Data;
|
||||
using Extensiones;
|
||||
|
||||
public partial class Inventarios_CatAlmacenClasificacionSecciones : ClsPaginas
|
||||
{
|
||||
private int CveSeccionClasificacion
|
||||
{
|
||||
get
|
||||
{
|
||||
return ViewState["CveSeccionClasificacion"].ToString().ToEntero();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["CveSeccionClasificacion"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
CargarDatos();
|
||||
CargarDropDowns();
|
||||
}
|
||||
}
|
||||
|
||||
private void CargarDatos()
|
||||
{
|
||||
ClsInventarios Objinv = new ClsInventarios();
|
||||
if (Objinv.GetAlmacenClasificacionSecciones(-1,UsuarioActual.CveEmpresa))
|
||||
{
|
||||
GvDatos.DataSource = Objinv.DtResultados;
|
||||
}
|
||||
Objinv.Dispose();
|
||||
GvDatos.DataBind();
|
||||
}
|
||||
private void CargarDropDowns()
|
||||
{
|
||||
DdlAlmacen.DataSource = get_GlobalDTAlmacen(UsuarioActual.CveEmpresa);
|
||||
DdlAlmacen.DataBind();
|
||||
DdlAlmacen.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
|
||||
DdlClasificacion.DataSource = get_GlobalDTClasificaciones(CveEmpresa:UsuarioActual.CveEmpresa);
|
||||
DdlClasificacion.DataBind();
|
||||
DdlClasificacion.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
|
||||
DdlTipo.DataSource = get_GlobalDTClasificacionesDetalle(UsuarioActual.CveEmpresa);
|
||||
DdlTipo.DataBind();
|
||||
DdlTipo.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
|
||||
ClsProductosServicios ObjMarcas = new ClsProductosServicios();
|
||||
ObjMarcas.GetMarcas(UsuarioActual.CveEmpresa);
|
||||
DdlMarca.DataSource = ObjMarcas.DtResultados;
|
||||
ObjMarcas.Dispose();
|
||||
DdlMarca.DataBind();
|
||||
DdlMarca.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
|
||||
}
|
||||
|
||||
protected void DdlAlmacen_Change(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
int CveAlmacen = ((DropDownList)sender).SelectedValue.ToEntero();
|
||||
CargarSeccionAlmacen(CveAlmacen);
|
||||
|
||||
}
|
||||
private void CargarSeccionAlmacen(int CveAlmacen)
|
||||
{
|
||||
DdlSeccionAlmacen.DataSource = get_GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, CveAlmacen);
|
||||
DdlSeccionAlmacen.DataBind();
|
||||
DdlSeccionAlmacen.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
}
|
||||
|
||||
protected void BtnAgregarAlmacenClasificacionSeccion_Click(object sender, EventArgs e)
|
||||
{
|
||||
DdlAlmacen.SelectedValue = "-1";
|
||||
DdlClasificacion.SelectedValue = "-1";
|
||||
DdlTipo.SelectedValue = "-1";
|
||||
DdlMarca.SelectedValue = "-1";
|
||||
DdlSeccionAlmacen.Items.Clear();
|
||||
UpModalTiposD.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposD"));
|
||||
}
|
||||
|
||||
protected void BtnAgregarACS_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClsInventarios ObjInv = new ClsInventarios();
|
||||
|
||||
if (BtnAgregarACS.Text == "Agregar")
|
||||
{
|
||||
if (ObjInv.AddAlmacenClasificacionSecciones(DdlAlmacen.SelectedValue.ToEntero(),DdlClasificacion.SelectedValue.ToEntero(),DdlTipo.SelectedValue.ToEntero(),
|
||||
DdlMarca.SelectedValue.ToEntero(),DdlSeccionAlmacen.SelectedValue.ToEntero()))
|
||||
{
|
||||
Alert("Se agregó correctamente Almacén Clasificación Sección");
|
||||
}
|
||||
}else
|
||||
{
|
||||
if (ObjInv.UpdateAlmacenClasificacionSecciones(CveSeccionClasificacion,DdlAlmacen.SelectedValue.ToEntero(), DdlClasificacion.SelectedValue.ToEntero(), DdlTipo.SelectedValue.ToEntero(),
|
||||
DdlMarca.SelectedValue.ToEntero(), DdlSeccionAlmacen.SelectedValue.ToEntero()))
|
||||
{
|
||||
Alert("Se actualizó correctamente Almacén Clasificación Sección");
|
||||
}
|
||||
}
|
||||
|
||||
CargarDatos();
|
||||
UpDatos.Update();
|
||||
|
||||
ObjInv.Dispose();
|
||||
}
|
||||
|
||||
protected void LnkEditar_Click(object sender, EventArgs e)
|
||||
{
|
||||
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
string CveAlmacen = GvRow.DataKey("CveAlmacen");
|
||||
string CveClasificacion = GvRow.DataKey("CveClasificacion");
|
||||
string CveClasificacionDetalle = GvRow.DataKey("CveClasificacionDetalle");
|
||||
string CveMarca = GvRow.DataKey("CveMarca");
|
||||
string CveSeccionAlmacen = GvRow.DataKey("CveSeccionAlmacen");
|
||||
BtnAgregarACS.Text = "Actualizar";
|
||||
|
||||
CveSeccionClasificacion = GvRow.DataKey("CveSeccionClasificacion").ToEntero();
|
||||
|
||||
DdlAlmacen.SelectedValueExist(CveAlmacen);
|
||||
CargarSeccionAlmacen(CveAlmacen.ToEntero());
|
||||
DdlClasificacion.SelectedValueExist(CveClasificacion);
|
||||
DdlTipo.SelectedValueExist(CveClasificacionDetalle);
|
||||
DdlMarca.SelectedValueExist(CveMarca);
|
||||
DdlSeccionAlmacen.SelectedValueExist(CveSeccionAlmacen);
|
||||
UpModalTiposD.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposD"));
|
||||
}
|
||||
|
||||
protected void LnkEliminar_Click(object sender,EventArgs e)
|
||||
{
|
||||
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
int CveSeccionClasificacion = GvRow.DataKey("CveSeccionClasificacion").ToEntero();
|
||||
ClsInventarios ObjInv = new ClsInventarios();
|
||||
if (ObjInv.RemoveAlmacenClasificacionSecciones(CveSeccionClasificacion))
|
||||
{
|
||||
CargarDatos();
|
||||
UpDatos.Update();
|
||||
Alert("Se eliminó correctamente Almacén Clasificación Sección");
|
||||
}
|
||||
ObjInv.Dispose();
|
||||
}
|
||||
}
|
||||
@@ -546,6 +546,14 @@
|
||||
<asp:Button Text="" ID="BtnSeriePSAdd" OnClick="BtnSeriePSAdd_Click" Style="display: none" runat="server" />
|
||||
</asp:Panel>
|
||||
</td>
|
||||
<td runat="server" visible="false" id="TdSeccionPSAdd">
|
||||
<asp:Panel ID="Panel3" runat="server" DefaultButton="BtnSeccionPSAdd">
|
||||
<asp:DropDownList ID="DdlSeccionPSAdd" DataTextField="SeccionAlmacen" AppendDataBoundItems="true" DataValueField="CveSeccionAlmacen" Class="form-control input-sm select2me" Style="width: 95% !important" runat="server" CausesValidation="true">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:Button Text="" ID="BtnSeccionPSAdd" Style="display: none" runat="server" />
|
||||
</asp:Panel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
@@ -687,7 +695,7 @@
|
||||
<asp:Literal ID="LbCaducidad" runat="server" Text='<%# Eval("FechaCaducidad", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Sección Almacén" Visible="false">
|
||||
<asp:TemplateField HeaderText="Sección" Visible="false">
|
||||
<EditItemTemplate>
|
||||
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="Seccion" AppendDataBoundItems="true" DataValueField="CveSeccion" CssClass="select2me" runat="server">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
@@ -1450,7 +1458,7 @@
|
||||
<br />
|
||||
</div>
|
||||
<div runat="server" id="divSeccionAlmacen" class="form-group form-md-line-input input-iconright" visible="false">
|
||||
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="Seccion" AppendDataBoundItems="true" DataValueField="CveSeccion" Class="form-control input-sm select2me" Style="width: 95% !important" runat="server" CausesValidation="true">
|
||||
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="SeccionAlmacen" AppendDataBoundItems="true" DataValueField="CveSeccionAlmacen" Class="form-control input-sm select2me" Style="width: 95% !important" runat="server" CausesValidation="true">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlSeccionAlmacen.ClientID.ToString()%>">Sección Almacén</label>
|
||||
|
||||
@@ -461,8 +461,8 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End If
|
||||
DdlClasificacion.DataBind()
|
||||
|
||||
DdlSeccionAlmacen.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1)
|
||||
DdlSeccionAlmacen.DataBind()
|
||||
'DdlSeccionAlmacen.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1)
|
||||
'DdlSeccionAlmacen.DataBind()
|
||||
|
||||
DdlSeccionAlmacenEntrada.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1)
|
||||
DdlSeccionAlmacenEntrada.DataBind()
|
||||
@@ -827,7 +827,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
'cargar también los movimentos detalle
|
||||
If Mov.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
DtMovimientos = Mov.DtResultados.FiltraParametros("", "CveMovimientoDetalle")
|
||||
DtMovimientos = Mov.DtResultados
|
||||
|
||||
DtMovimientos.Columns("No").AutoIncrement = True
|
||||
DtMovimientos.Columns("No").AutoIncrementSeed = DtMovimientos.Rows.Count + 1
|
||||
@@ -1190,7 +1190,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub AddNew(CvePS As Integer, PS As String, CveUM As Integer, UM As String, Cantidad As Double, PU As Double, SerieLote As String, CodigoAF As String, Codigo As String, CveAF As String, Observaciones As String, Lote As String, FechaCaducidad As Date, CveSeccionAlmacen As Integer, SeccionAlmacen As String)
|
||||
Protected Sub AddNew(CvePS As Integer, PS As String, CveUM As Integer, UM As String, Cantidad As Double, PU As Double, Serie As String, CodigoAF As String, Codigo As String, CveAF As String, Observaciones As String, Lote As String, FechaCaducidad As Date, CveSeccionAlmacen As Integer, SeccionAlmacen As String)
|
||||
If DdlAlmacen.SelectedValue.ToEntero <= 0 Then Alert("Seleccione un almacen", TipoMensaje.MsgAdvertencia) : RegistraScript("playsonidito('142608__autistic-lucario__error.wav')") : DdlProducto2.SelectedText = "" : Exit Sub
|
||||
|
||||
Dim Valido As Boolean = True
|
||||
@@ -1201,7 +1201,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
Dim FechaCaducidadVal As Date = If(RowPS("AplicaCaducidad").ToString = "True", FechaCaducidad, MinFecha)
|
||||
|
||||
If CveMetodoInventario = 5 And (String.IsNullOrEmpty(SerieLote.Trim()) OrElse SerieLote = "-1") Then
|
||||
If CveMetodoInventario = 5 And (String.IsNullOrEmpty(Serie.Trim()) OrElse Serie = "-1") Then
|
||||
Valido = False
|
||||
Alert("El producto requiere Serie", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
@@ -1209,9 +1209,9 @@ Partial Class Inventarios_EntradasSalidas
|
||||
'salida
|
||||
If Valido AndAlso DdlConcepto.SelectedValue.Contiene({"3", "5", "7", "8", "11", "12", "13", "15", "16", "17", "20", "21", "30", "31"}) Then ' salida de almacen
|
||||
|
||||
Dim Existencia As Double = GetExistencias(CvePS, CveUM, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, -1, If(SerieLote = "", "-1", SerieLote), If(Lote = "", "-1", Lote), FechaCaducidadVal)
|
||||
Dim Existencia As Double = GetExistencias(CvePS, CveUM, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, -1, If(Serie = "", "-1", Serie), If(Lote = "", "-1", Lote), FechaCaducidadVal)
|
||||
' LbAgregar.ToolTip = Existencia.ToString
|
||||
If Existencia - Cantidad - DtMovimientos.SUM("Cantidad", $"CvePS = {CvePS} AND CveUM = {CveUM} {If(SerieLote <> "", $" AND Serie = '{SerieLote}'", "")}") < 0 Then
|
||||
If Existencia - Cantidad - DtMovimientos.SUM("Cantidad", $"CvePS = {CvePS} AND CveUM = {CveUM} {If(Serie <> "", $" AND Serie = '{Serie}'", "")}") < 0 Then
|
||||
If Existencia <= 0 Then
|
||||
Alert("No hay existencia del producto", TipoMensaje.MsgAdvertencia)
|
||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||
@@ -1230,12 +1230,12 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
If Valido Then
|
||||
Dim CveClasificacion As Integer
|
||||
Dim dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS).FiltroPrimero("", "PS")
|
||||
If dr IsNot Nothing Then CveClasificacion = dr("CveClasificacion").ToString.ToEntero
|
||||
'Dim dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS).FiltroPrimero("", "PS")
|
||||
If RowPS IsNot Nothing Then CveClasificacion = RowPS("CveClasificacion").ToString.ToEntero
|
||||
|
||||
'VALIDA QUE LA SERIE NO SEA IGUAL AL CODIGO O CODIGOBARRAS
|
||||
If SerieLote <> "" And (SerieLote.ToUpper = dr("Codigo").ToString.ToUpper Or SerieLote.ToUpper = dr("CodigoBarras").ToString.ToUpper) Then
|
||||
Alert($"La serie indicada <b>{SerieLote}</b> coincide con el codigo o codigo de barras del producto. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||
If Serie <> "" And (Serie.ToUpper = RowPS("Codigo").ToString.ToUpper Or Serie.ToUpper = RowPS("CodigoBarras").ToString.ToUpper) Then
|
||||
Alert($"La serie indicada <b>{Serie}</b> coincide con el codigo o codigo de barras del producto. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
@@ -1258,7 +1258,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
registro.Item("CodigoAF") = CodigoAF
|
||||
registro.Item("Codigo") = Codigo
|
||||
registro.Item("CveAF") = CveAF
|
||||
registro.Item("Serie") = If(SerieLote <> "", SerieLote, "")
|
||||
registro.Item("Serie") = If(Serie <> "", Serie, "")
|
||||
registro.Item("Lote") = If(Lote <> "", Lote, "")
|
||||
registro.Item("FechaCaducidad") = FechaCaducidad
|
||||
registro.Item("Observaciones") = Observaciones
|
||||
@@ -2187,12 +2187,18 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End If
|
||||
If CBool(dr("AplicaSeccion")) Then
|
||||
divSeccionAlmacen.Visible = True
|
||||
'DdlSeccionAlmacen.Items.Clear()
|
||||
'DdlSeccionAlmacen.ClearSelection()
|
||||
'DdlSeccionAlmacen.DataSource = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, DdlProducto2.SelectedValue.ToEntero)
|
||||
'DdlSeccionAlmacen.DataBind()
|
||||
CargaSeccionesAlmacen(DdlSeccionAlmacen, DdlAlmacen.SelectedValue.ToEntero, DdlProducto2.SelectedValue.ToEntero, UsuarioActual.CveEmpresa)
|
||||
|
||||
End If
|
||||
If CBool(dr("AplicaCaducidad")) Then
|
||||
divCaducidad.Visible = True
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -2397,7 +2403,11 @@ Partial Class Inventarios_EntradasSalidas
|
||||
TxtnLote.Text = GvRow.DataKey("Lote")
|
||||
TxtnFechaCaducidad.Text = GvRow.DataKey("FechaCaducidad").ToDate.ToShortDateString
|
||||
TxtObservacionesdetalle.Text = GvRow.DataKey("Observaciones")
|
||||
|
||||
DdlSeccionAlmacen.DataSource = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, GvRow.DataKey("CvePS").ToEntero)
|
||||
DdlSeccionAlmacen.DataBind()
|
||||
DdlSeccionAlmacen.SelectedValueExist(GvRow.DataKey("CveSeccionAlmacen"))
|
||||
|
||||
LkAgregarDetalle.Text = "Actualizar"
|
||||
Dim Origen As Integer = GlobalDTInvConceptos.FiltroPrimeroValor("Origen", String.Format("CveConcepto = {0}", DdlConcepto.SelectedValue)).ToEntero
|
||||
divPrecio.Visible = Origen = 1
|
||||
@@ -2426,6 +2436,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
TxtnFechaCaducidad.Text = GvRow.DataKey("FechaCaducidad")
|
||||
TxtObservacionesdetalle.Text = GvRow.DataKey("Observaciones")
|
||||
DdlSeccionAlmacen.SelectedValueExist(GvRow.DataKey("CveSeccionAlmacen"))
|
||||
|
||||
Dim Origen As Integer = GlobalDTInvConceptos.FiltroPrimeroValor("Origen", String.Format("CveConcepto = {0}", DdlConcepto.SelectedValue)).ToEntero
|
||||
divPrecio.Visible = Origen = 1
|
||||
txtPrecio.Visible = Origen = 1
|
||||
@@ -2938,6 +2949,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End If
|
||||
|
||||
TdSeriePS.Visible = False
|
||||
TdSeccionPSAdd.Visible = False
|
||||
|
||||
Dim Dr = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero($"CodigoBarras= '{TxtCodigoPS.Text}'")
|
||||
If Dr Is Nothing Then
|
||||
@@ -2947,7 +2959,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If Dr("Inv_CveMetodoInventario").ToString.ToEntero = 5 Then
|
||||
If Dr("AplicaSerie").ToString = "True" Then
|
||||
TdSeriePSAdd.Visible = True
|
||||
TxtSeriePS.Focus()
|
||||
CvePSSerieLote = Dr("CvePS").ToString.ToEntero
|
||||
@@ -2956,8 +2968,32 @@ Partial Class Inventarios_EntradasSalidas
|
||||
UMSerieLote = Dr("UnidadMedida").ToString
|
||||
Exit Sub
|
||||
End If
|
||||
Dim CveSeccionAlmacen As Integer = -1
|
||||
Dim SeccionAlmacen As String = ""
|
||||
|
||||
AddNew(Dr("CvePS").ToString.ToEntero, Dr("PSCodigo").ToString, Dr("CveUM").ToString.ToEntero, Dr("UnidadMedida").ToString, 1, Dr("CostoPromedio").ToString.ToDouble, "", "", "", "", "", "", MinFecha, -1, "")
|
||||
If Dr("AplicaSeccion").ToString = "True" Then
|
||||
If DdlAlmacen.SelectedValue.ToEntero <= 1 Then
|
||||
Alert("No se ha especificado el almacen para especificar la sección", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
DdlSeccionPSAdd.Items.Clear()
|
||||
Dim dtt As DataTable = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, Dr("CvePS").ToString.ToEntero)
|
||||
DdlSeccionPSAdd.DataSource = dtt
|
||||
DdlSeccionPSAdd.DataBind()
|
||||
If dtt.Rows.Count > 1 Then
|
||||
DdlSeccionPSAdd.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
' si solo hay un movimiento, debe de agregar, sino debe de esperar a que seleccionen
|
||||
Exit Sub
|
||||
DdlSeccionPSAdd.Focus()
|
||||
TdSeccionPSAdd.Visible = True
|
||||
Else
|
||||
CveSeccionAlmacen = DdlSeccionPSAdd.SelectedValue.ToEntero
|
||||
SeccionAlmacen = DdlSeccionPSAdd.SelectedItem.Text
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
AddNew(Dr("CvePS").ToString.ToEntero, Dr("PSCodigo").ToString, Dr("CveUM").ToString.ToEntero, Dr("UnidadMedida").ToString, 1, Dr("CostoPromedio").ToString.ToDouble, "", "", "", "", "", "", MinFecha, CveSeccionAlmacen, SeccionAlmacen)
|
||||
|
||||
TxtCodigoPS.Text = ""
|
||||
TxtCodigoPS.Focus()
|
||||
@@ -2968,6 +3004,11 @@ Partial Class Inventarios_EntradasSalidas
|
||||
If TxtSeriePS.Text.Trim = "" Then
|
||||
Exit Sub
|
||||
End If
|
||||
If TdSeccionPSAdd.Visible Then
|
||||
If DdlSeccionAlmacen.SelectedValue.ToEntero <= 0 Then
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
AddNew(CvePSSerieLote, PSSerieLote, CveUMSerieLote, UMSerieLote, 1, 0, TxtSeriePS.Text.Trim, "", "", "", "", "", MinFecha, -1, "")
|
||||
|
||||
@@ -4333,6 +4374,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
Alert("Error al Actualizar los movimientos")
|
||||
Else
|
||||
Alert("Movimiento actualizado correctamente")
|
||||
RegistraScript("$('#ModalAgregar').modal('hide')")
|
||||
End If
|
||||
ObjInventario.Dispose()
|
||||
@@ -4355,7 +4397,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
TxtnLote.Text = ""
|
||||
TxtnFechaCaducidad.Text = ""
|
||||
TxtObservacionesdetalle.Text = ""
|
||||
DdlSeccionAlmacen.SelectedValue = "-1"
|
||||
DdlSeccionAlmacen.ClearSelection()
|
||||
LkAgregarDetalle.Text = "Agregar"
|
||||
If DdlMonedaTC.SelectedValue.ToEntero = 2 Then
|
||||
VisualizaPUExtranjero(UsuarioActual.TienePermisoProceso(201))
|
||||
|
||||
@@ -21,20 +21,22 @@
|
||||
}
|
||||
|
||||
.gvInventario tr td:nth-child(4) {
|
||||
width: 18% !important;
|
||||
width: 12% !important;
|
||||
text-align: center !important;
|
||||
}
|
||||
|
||||
.gvInventario tr th:nth-child(4) {
|
||||
width: 18% !important;
|
||||
width: 12% !important;
|
||||
}
|
||||
|
||||
.gvEscondeColumna tr td:nth-child(3) {
|
||||
display: none;
|
||||
width:0px;
|
||||
}
|
||||
|
||||
.gvEscondeColumna tr th:nth-child(3) {
|
||||
display: none;
|
||||
width:0px;
|
||||
}
|
||||
|
||||
.btn.default:hover {
|
||||
@@ -406,6 +408,12 @@
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="row" runat="server" id="DivCodigoSeriePS" visible="false">
|
||||
|
||||
<div class="col-md-2 pull-right">
|
||||
<div class="btn-group" style="float: right;">
|
||||
<asp:Button ID="BtnVerSugerencias" CssClass="btn green-haze btn-outline btn-circle btn-sm" OnClick="BtnVerSugerencias_Click" runat="server" Text="Ver Secciones" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4 pull-right">
|
||||
<table style="float: right;">
|
||||
<tr>
|
||||
@@ -429,40 +437,32 @@
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="btn-group pull-right">
|
||||
<asp:Button ID="BtnVerSugerencias" CssClass="btn green-haze btn-outline btn-circle btn-sm" OnClick="BtnVerSugerencias_Click" runat="server" Text="Ver Secciones" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<%--GV DATOS--%>
|
||||
<asp:GridView ID="GvDatos" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False" ShowFooter="True" ShowHeader="true" ShowHeaderWhenEmpty="True"
|
||||
DataKeyNames="Consec,CvePS,Codigo,CodigoBarras,AplicaSerieLote,CveUM,CantidadC,CantidadF,UM,PS,CveClasificacion,CveVentaDetalle,CveTamaño,AplicaSeccion, AplicaSerie,AplicaLote,AplicaCaducidad" HeaderStyle-CssClass="Titulos" RowStyle-Height="25px" CssClass="table table-striped table-hover Widthall ScrollAD gvInventario mysmallbtn" data-heighterror="450" data-freezerows="1" GridLines="None">
|
||||
<HeaderStyle Height="58px" />
|
||||
DataKeyNames="Consec,CvePS,Codigo,CodigoBarras,AplicaSerieLote,CveUM,CantidadC,CantidadF,UM,PS,CveClasificacion,CveVentaDetalle,CveTamaño,AplicaSeccion, AplicaSerie,AplicaLote,AplicaCaducidad" HeaderStyle-CssClass="Titulos" CssClass="table table-striped table-hover Widthall ScrollAD gvInventario mysmallbtn" data-heighterror="450" data-freezerows="1" GridLines="None">
|
||||
<HeaderStyle Height="30px" />
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="cbInv" runat="server" Checked="true" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Center" Width="5%" />
|
||||
<ItemStyle HorizontalAlign="Center" Width="2.5%" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Cant. Venta" DataField="CantidadC" DataFormatString="{0:#,##0.######}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="7.5%" />
|
||||
<asp:BoundField HeaderText="Cant. Venta" DataField="CantidadC" DataFormatString="{0:#,##0.######}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="5%" />
|
||||
|
||||
<asp:BoundField HeaderText="Cant. Surtida" DataField="CantidadS" DataFormatString="{0:#,##0.######}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="7.5%" />
|
||||
<asp:TemplateField HeaderText="Cant. a Surtir" ItemStyle-Width="10%">
|
||||
<asp:BoundField HeaderText="Cant. Surtida" DataField="CantidadS" DataFormatString="{0:#,##0.######}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:TemplateField HeaderText="Cant. a Surtir" >
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TbCantidadF" runat="server" Width="60px" Mask="9,999.99" DataFormatString="{0:#,##0.######}" style="text-align: right" Text='<%# Eval("CantidadF") %>'></asp:TextBox>
|
||||
<asp:TextBox ID="TbCantidadF" runat="server" Width="50px" Mask="9,999.99" DataFormatString="{0:#,##0.######}" style="text-align: right" Text='<%# Eval("CantidadF", "{0:#,##0.######}") %>'></asp:TextBox>
|
||||
<asp:Button Text="Serie" ID="BtnSerie" OnClick="BtnSerie_Click" CssClass="btn btn-primary btn-xs" runat="server" />
|
||||
</ItemTemplate>
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Unidad" DataField="UM" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" />
|
||||
<asp:HyperLinkField HeaderText="Producto o Servicio" Target="_blank" DataTextField="CodigoPS" DataNavigateUrlFields="CvePS" DataNavigateUrlFormatString="/Ventas/ProductosServicios.aspx?CvePS={0}" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="35%" />
|
||||
<asp:BoundField HeaderText="Unidad" DataField="UM" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" />
|
||||
<asp:HyperLinkField HeaderText="Producto o Servicio" Target="_blank" DataTextField="CodigoPS" DataNavigateUrlFields="CvePS" DataNavigateUrlFormatString="/Ventas/ProductosServicios.aspx?CvePS={0}" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Observación" DataField="ObservacionesDetalle" ItemStyle-Width="7.5%" />
|
||||
|
||||
<asp:TemplateField HeaderText="Sección Almacén" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false">
|
||||
<asp:TemplateField HeaderText="Sección" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="7.5%" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="SeccionAlmacen" DataValueField="CveSeccionAlmacen" CssClass="select2me" Style="width: 85% !important" runat="server" CausesValidation="true" Visible="false">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
|
||||
@@ -7,7 +7,8 @@ Imports System.IO
|
||||
Imports Extensiones
|
||||
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Imports Stimulsoft.Base.Indicator
|
||||
|
||||
Partial Class Inventarios_EntregaAlmacen
|
||||
Inherits ClsPaginas
|
||||
|
||||
@@ -886,13 +887,14 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
If CBool(e.Row.DBCampo("AplicaSeccion")) Then
|
||||
e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = True
|
||||
If DdlAlmacen.SelectedValue.ToEntero > 0 Then
|
||||
Dim dtt As DataTable = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero)
|
||||
e.Row.FCDropDownList("DdlSeccionAlmacen").DataSource = dtt
|
||||
e.Row.FCDropDownList("DdlSeccionAlmacen").DataBind()
|
||||
If dtt.Rows.Count > 1 Then
|
||||
e.Row.FCDropDownList("DdlSeccionAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End If
|
||||
dtt.Dispose()
|
||||
CargaSeccionesAlmacen(e.Row.FCDropDownList("DdlSeccionAlmacen"), DdlAlmacen.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero, UsuarioActual.CveEmpresa, True)
|
||||
'Dim dtt As DataTable = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero)
|
||||
'e.Row.FCDropDownList("DdlSeccionAlmacen").DataSource = dtt
|
||||
'e.Row.FCDropDownList("DdlSeccionAlmacen").DataBind()
|
||||
'If dtt.Rows.Count > 1 Then
|
||||
' e.Row.FCDropDownList("DdlSeccionAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
'End If
|
||||
'dtt.Dispose()
|
||||
End If
|
||||
|
||||
Else
|
||||
@@ -927,7 +929,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
If e.Row.DBCampo("Inv_CveMetodoInventario").Contiene("5", "6") Then
|
||||
e.Row.FCTextBox("TbCantidadF").Enabled = False
|
||||
Else
|
||||
e.Row.FCTextBox("TbCantidadF").Text = e.Row.DBCampo("CantidadF").FormatoNumero()
|
||||
e.Row.FCTextBox("TbCantidadF").Text = e.Row.DBCampo("CantidadF").ToDecimal.ToString("#,##0.######")
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -1720,10 +1722,10 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
If CBool(Dr("AplicaSerie")) Then
|
||||
DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Dr("Consec")))
|
||||
For Each Dr1 As DataRow In DtDetalle.Rows
|
||||
StrXML.AppendFormat("<concepto CvePS=""{0}"" CveUM=""{1}"" Cantidad= ""{2}"" CveSeccionAlmacen=""{3}"" Serie=""{4}"" Lote=""{5}"" FechaCaducidad=""{6}"" ></concepto>", Dr1("CvePS"), Dr1("CveUM"), 1, IfNull(Dr("CveSeccion"), -1), Dr1("Serie"), Lote, FechaCaducidad.ToString("yyyy/MM/dd"))
|
||||
StrXML.AppendFormat("<concepto CvePS=""{0}"" CveUM=""{1}"" Cantidad= ""{2}"" CveSeccionAlmacen=""{3}"" Serie=""{4}"" Lote=""{5}"" FechaCaducidad=""{6}""></concepto>", Dr1("CvePS"), Dr1("CveUM"), 1, IfNull(Dr("CveSeccion"), -1), Dr1("Serie"), Lote, FechaCaducidad.ToString("yyyy/MM/dd"))
|
||||
Next
|
||||
Else
|
||||
StrXML.AppendFormat("<concepto CvePS=""{0}"" CveUM=""{1}"" Cantidad= ""{2}"" CveSeccionAlmacen=""{3}"" Serie=""{4}"" Lote=""{5}"" FechaCaducidad=""{6}"" ></concepto>", Dr("CvePS"), Dr("CveUM"), Dr("CantidadGV"), IfNull(Dr("CveSeccion"), -1), "-1", Lote, FechaCaducidad.ToString("yyyy/MM/dd"))
|
||||
StrXML.AppendFormat("<concepto CvePS=""{0}"" CveUM=""{1}"" Cantidad= ""{2}"" CveSeccionAlmacen=""{3}"" Serie=""{4}"" Lote=""{5}"" FechaCaducidad=""{6}""></concepto>", Dr("CvePS"), Dr("CveUM"), Dr("CantidadGV"), IfNull(Dr("CveSeccion"), -1), "-1", Lote, FechaCaducidad.ToString("yyyy/MM/dd"))
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
@@ -1959,9 +1961,16 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
Dr1("CveMovimientoEntrada") = CveMovimientoEntradaApartado
|
||||
Dr1("FolioEntrada") = FolioEntrada
|
||||
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
||||
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaApartado, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
||||
Dim CveSeccionAlmacen As Integer = -1
|
||||
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
||||
If CBool(Dr("AplicaSeccion")) Then
|
||||
CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenExA, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
|
||||
Else
|
||||
CveSeccionAlmacen = -1
|
||||
End If
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaApartado, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=CveSeccionAlmacen) Then
|
||||
ErrorMovInv = True
|
||||
TextoError.AppendFormat("Ocurrió un error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar.")
|
||||
Exit For
|
||||
@@ -2002,6 +2011,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Dr("Consec")))
|
||||
For Each Dr1 As DataRow In DtDetalle.Rows
|
||||
If ObjInventario.GetExistenciasProducto(Dr1("CvePS").ToString.ToEntero, Dr1("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, -1, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Dr1("Serie").ToString, CveTipoAlmacen:=9, CveVendedor:=CveVendedor, CveSubProyecto:=CveSubProyecto, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeApartados:=-1, Caducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then
|
||||
Dim CveSeccionAlmacen As Integer = 0
|
||||
For Each Dr2 As DataRow In ObjInventario.DtResultados.FiltraParametros("CveAlmacen > 0 AND ExistenciaFinal > 0").Rows
|
||||
|
||||
'BUSCA SI EXISTE YA UN TRASPASO DEL ALMACEN DE APARTADO
|
||||
@@ -2031,8 +2041,14 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
|
||||
|
||||
CantidadPendiente = 1
|
||||
If CBool(Dr("AplicaSeccion")) Then
|
||||
CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, Dr2("CveAlmacen").ToString.ToEntero, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
|
||||
Dim a As String = String.Format("CveAlmacen={0}-CvePS:{1}-CveseccionAlmacen={2}", Dr2("CveAlmacen"), Dr("CvePS"), CveSeccionAlmacen)
|
||||
Else
|
||||
CveSeccionAlmacen = -1
|
||||
End If
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadPendiente.ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, Serie:=Dr1("Serie").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadPendiente.ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, Serie:=Dr1("Serie").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=CveSeccionAlmacen) Then
|
||||
ErrorMovInv = True
|
||||
TextoError.AppendFormat("Ocurrió un Error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar.")
|
||||
Exit For
|
||||
@@ -2462,7 +2478,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
Dim CveMovimientoSalidaApartado = -1
|
||||
Dim CveAlmacenApartado = -1
|
||||
Dim CveAlmacenOrigen = If(CveAlmacenTraspasoDestino > 0, CveAlmacenTraspasoDestino, DdlAlmacen.SelectedValue.ToEntero)
|
||||
|
||||
Dim CveSeccionAlmacen As Integer = 0
|
||||
For Each Dr As DataRow In DtTempApartados.Rows
|
||||
|
||||
If CveMovimientoSalidaApartado = -1 Or CveAlmacenApartado <> Dr("CveAlmacen").ToString.ToEntero Then
|
||||
@@ -2484,9 +2500,14 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
ErrorMovInv = True
|
||||
TextoError.AppendFormat("Ocurrió un error al guardar los movimientos de control de apartados")
|
||||
Exit For
|
||||
End If
|
||||
If CBool(Dr("AplicaSeccion")) Then
|
||||
CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenOrigen, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
|
||||
Dim a As String = String.Format("CveAlmacen={0}-CvePS:{1}-CveseccionAlmacen={2}", CveAlmacenOrigen, Dr("CvePS"), CveSeccionAlmacen)
|
||||
Else
|
||||
CveSeccionAlmacen = -1
|
||||
End If
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaApartado, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaApartado, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString, CveSeccionAlmacen:=CveSeccionAlmacen) Then
|
||||
ErrorMovInv = True
|
||||
TextoError.AppendFormat("Ocurrió un error al guardar los movimientos de control de apartados")
|
||||
Exit For
|
||||
@@ -2513,8 +2534,15 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
Dr1("FolioEntrada") = FolioEntrada
|
||||
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
||||
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaApartado, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString) Then
|
||||
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
||||
If CBool(Dr("AplicaSeccion")) Then
|
||||
CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, Dr1("CveAlmacen").ToString.ToEntero, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
|
||||
Dim a As String = String.Format("CveAlmacen={0}-CvePS:{1}-CveseccionAlmacen={2}", Dr1("CveAlmacen").ToString.ToEntero, Dr("CvePS"), CveSeccionAlmacen)
|
||||
Else
|
||||
CveSeccionAlmacen = -1
|
||||
End If
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaApartado, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString, CveSeccionAlmacen:=CveSeccionAlmacen) Then
|
||||
ErrorMovInv = True
|
||||
TextoError.AppendFormat("Ocurrió un error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar.")
|
||||
Exit For
|
||||
@@ -3205,71 +3233,75 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
tCvecliente = dr("CveCliente").ToString.ToEntero
|
||||
|
||||
Dim drC As DataRow = GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=tCvecliente).FiltroPrimero("")
|
||||
Destinatario += String.Format(";{0};{1}", drC("CorreoEntregaCompras"), drC("CorreoEntregaAlmacen"))
|
||||
If drC IsNot Nothing Then
|
||||
|
||||
Dim ClienteNombre As String = dr("ClienteNombre").ToString()
|
||||
Dim FolioVenta As String = dr("SerieFolio").ToString()
|
||||
Dim Pedido As String = dr("PedidoContrato").ToString()
|
||||
Dim OrdenCompra As String = dr("OrdenCompra").ToString()
|
||||
Dim CveVenta As Integer = dr("CveVenta").ToString().ToEntero()
|
||||
Dim TipoDocto As String = dr("TipoDocto").ToString()
|
||||
Destinatario += String.Format(";{0};{1}", drC("CorreoEntregaCompras"), drC("CorreoEntregaAlmacen"))
|
||||
|
||||
Dim dtDetalle As New DataTable
|
||||
If ObjVentas.GetVentaDetalle(CveVenta) Then
|
||||
dtDetalle = ObjVentas.DtResultados
|
||||
Dim ClienteNombre As String = dr("ClienteNombre").ToString()
|
||||
Dim FolioVenta As String = dr("SerieFolio").ToString()
|
||||
Dim Pedido As String = dr("PedidoContrato").ToString()
|
||||
Dim OrdenCompra As String = dr("OrdenCompra").ToString()
|
||||
Dim CveVenta As Integer = dr("CveVenta").ToString().ToEntero()
|
||||
Dim TipoDocto As String = dr("TipoDocto").ToString()
|
||||
|
||||
Dim dtDetalle As New DataTable
|
||||
If ObjVentas.GetVentaDetalle(CveVenta) Then
|
||||
dtDetalle = ObjVentas.DtResultados
|
||||
End If
|
||||
Dim DetalleTable As String = ""
|
||||
For Each dRow As DataRow In dtDetalle.Rows
|
||||
Dim detalle As String = String.Format("<tr><td style='width:25%'>{0}</td><td style='width:25%'>{1}</td><td style='width:50%'>{2}</td></tr>", dRow("Codigo"), dRow("Cantidad"), dRow("PS"))
|
||||
DetalleTable += detalle
|
||||
Next
|
||||
|
||||
strBody.Append("<html>")
|
||||
strBody.Append("<head>")
|
||||
strBody.Append("<meta charset='UTF-8'>")
|
||||
strBody.Append("</head>")
|
||||
strBody.Append(" <body style='width:800px'>")
|
||||
strBody.Append("<div>")
|
||||
strBody.Append($"<img src='http://sig.adssistemas.mx/Empresas/{UsuarioActual.CveEmpresa}/Logo.png' style='width:200px'></img>")
|
||||
strBody.Append("</div>")
|
||||
strBody.Append(" <p style='font-family:Segoe UI Semibold;font-size:12pt;width:100%'>")
|
||||
strBody.Append($" Apreciable {ClienteNombre}, le confirmamos los")
|
||||
strBody.Append(" productos surtidos y entregados en mostrador conforme a la")
|
||||
strBody.Append($" {TipoDocto}:")
|
||||
strBody.Append(" </p>")
|
||||
strBody.Append($" <p style='width:100%;text-align:center;font-family:Segoe UI Semibold;font-size:12pt'>{FolioVenta} - Pedido {Pedido} - Orden de Compra {OrdenCompra}</P>")
|
||||
strBody.Append(" <div style='width:100%;text-align:center'>")
|
||||
strBody.Append(" <table style='width:100%;font-family:Segoe UI Semibold;font-size:12pt'>")
|
||||
strBody.Append(DetalleTable)
|
||||
strBody.Append(" ")
|
||||
strBody.Append(" </table>")
|
||||
strBody.Append(" </div>")
|
||||
strBody.Append(" <p style='font-family:Segoe UI Semibold;font-size:12pt;width:100%'>")
|
||||
strBody.Append(" Se entregaron los productos conforme a las especificaciones de su pedido y verificamos que no se presentara alguno de los siguientes inconvenientes:")
|
||||
strBody.Append(" </p>")
|
||||
strBody.Append(" <p style='font-family:Segoe UI Semibold;font-size:12pt;width:100%'>")
|
||||
strBody.Append(" • Empaque violado.<br/>")
|
||||
strBody.Append("• Daño físico en la caja.<br/>")
|
||||
strBody.Append("• Producto incompleto o distinto al solicitado.<br/>")
|
||||
strBody.Append("• Alguna otra situación que se considere que compromete la integridad de la mercancía.<br/>")
|
||||
strBody.Append("")
|
||||
strBody.Append(" </p>")
|
||||
strBody.Append(" <br/>")
|
||||
strBody.Append(" <p style='font-family:Segoe UI Semibold;font-size:12pt;width:100%'>")
|
||||
strBody.Append($" Aceptando a entera satisfacción a las {Today.Hour}:{Today.Minute} hrs del {Today.ToString}")
|
||||
strBody.Append(" </p>")
|
||||
strBody.Append(" <br/>")
|
||||
strBody.Append(" <p style='font-family:Segoe UI Semibold;font-size:12pt;width:100%'>")
|
||||
strBody.Append(" Gracias por su compra <br/>")
|
||||
'strBody.Append(" Compuproveedores")
|
||||
strBody.Append(" </p>")
|
||||
strBody.Append(" <p style='font-family:Segoe UI Semibold;font-size:12pt;width:100%;text-align:center'>")
|
||||
strBody.Append(" Sigue disfrutando de nuestros productos y servicios<br/>")
|
||||
'strBody.Append(" <a href='https://www.compuproveedoresti.com/'>www.compuproveedores.com</a>")
|
||||
strBody.Append("")
|
||||
strBody.Append(" </p>")
|
||||
strBody.Append(" </body>")
|
||||
strBody.Append("</html>")
|
||||
End If
|
||||
Dim DetalleTable As String = ""
|
||||
For Each dRow As DataRow In dtDetalle.Rows
|
||||
Dim detalle As String = String.Format("<tr><td style='width:25%'>{0}</td><td style='width:25%'>{1}</td><td style='width:50%'>{2}</td></tr>", dRow("Codigo"), dRow("Cantidad"), dRow("PS"))
|
||||
DetalleTable += detalle
|
||||
Next
|
||||
|
||||
strBody.Append("<html>")
|
||||
strBody.Append("<head>")
|
||||
strBody.Append("<meta charset='UTF-8'>")
|
||||
strBody.Append("</head>")
|
||||
strBody.Append(" <body style='width:800px'>")
|
||||
strBody.Append("<div>")
|
||||
strBody.Append($"<img src='http://sig.adssistemas.mx/Empresas/{UsuarioActual.CveEmpresa}/Logo.png' style='width:200px'></img>")
|
||||
strBody.Append("</div>")
|
||||
strBody.Append(" <p style='font-family:Segoe UI Semibold;font-size:12pt;width:100%'>")
|
||||
strBody.Append($" Apreciable {ClienteNombre}, le confirmamos los")
|
||||
strBody.Append(" productos surtidos y entregados en mostrador conforme a la")
|
||||
strBody.Append($" {TipoDocto}:")
|
||||
strBody.Append(" </p>")
|
||||
strBody.Append($" <p style='width:100%;text-align:center;font-family:Segoe UI Semibold;font-size:12pt'>{FolioVenta} - Pedido {Pedido} - Orden de Compra {OrdenCompra}</P>")
|
||||
strBody.Append(" <div style='width:100%;text-align:center'>")
|
||||
strBody.Append(" <table style='width:100%;font-family:Segoe UI Semibold;font-size:12pt'>")
|
||||
strBody.Append(DetalleTable)
|
||||
strBody.Append(" ")
|
||||
strBody.Append(" </table>")
|
||||
strBody.Append(" </div>")
|
||||
strBody.Append(" <p style='font-family:Segoe UI Semibold;font-size:12pt;width:100%'>")
|
||||
strBody.Append(" Se entregaron los productos conforme a las especificaciones de su pedido y verificamos que no se presentara alguno de los siguientes inconvenientes:")
|
||||
strBody.Append(" </p>")
|
||||
strBody.Append(" <p style='font-family:Segoe UI Semibold;font-size:12pt;width:100%'>")
|
||||
strBody.Append(" • Empaque violado.<br/>")
|
||||
strBody.Append("• Daño físico en la caja.<br/>")
|
||||
strBody.Append("• Producto incompleto o distinto al solicitado.<br/>")
|
||||
strBody.Append("• Alguna otra situación que se considere que compromete la integridad de la mercancía.<br/>")
|
||||
strBody.Append("")
|
||||
strBody.Append(" </p>")
|
||||
strBody.Append(" <br/>")
|
||||
strBody.Append(" <p style='font-family:Segoe UI Semibold;font-size:12pt;width:100%'>")
|
||||
strBody.Append($" Aceptando a entera satisfacción a las {Today.Hour}:{Today.Minute} hrs del {Today.ToString}")
|
||||
strBody.Append(" </p>")
|
||||
strBody.Append(" <br/>")
|
||||
strBody.Append(" <p style='font-family:Segoe UI Semibold;font-size:12pt;width:100%'>")
|
||||
strBody.Append(" Gracias por su compra <br/>")
|
||||
'strBody.Append(" Compuproveedores")
|
||||
strBody.Append(" </p>")
|
||||
strBody.Append(" <p style='font-family:Segoe UI Semibold;font-size:12pt;width:100%;text-align:center'>")
|
||||
strBody.Append(" Sigue disfrutando de nuestros productos y servicios<br/>")
|
||||
'strBody.Append(" <a href='https://www.compuproveedoresti.com/'>www.compuproveedores.com</a>")
|
||||
strBody.Append("")
|
||||
strBody.Append(" </p>")
|
||||
strBody.Append(" </body>")
|
||||
strBody.Append("</html>")
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ public partial class Inventarios_EntregasPorRealizar : ClsPaginas
|
||||
|
||||
private void CargarPersonal()
|
||||
{
|
||||
DataTable UsuariosConRolLogistico = get_GlobalDTUsuarios(CveEmpresa: UsuarioActual.CveEmpresa).FiltraParametros("CveRol IN (1339,1386,1430)");
|
||||
DataTable UsuariosConRolLogistico = get_GlobalDTUsuarios(CveEmpresa: UsuarioActual.CveEmpresa).FiltraParametros("CveRol IN (1339,1386,1430,1155)");
|
||||
DdlUsuario.DataSource = UsuariosConRolLogistico;
|
||||
DdlUsuario.DataBind();
|
||||
DdlUsuario.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
|
||||
@@ -63,6 +63,7 @@ Partial Class Inventarios_Kardex
|
||||
#Region " INICIALIZA VALORES "
|
||||
|
||||
Private Sub CargaPermisos()
|
||||
If UsuarioActual.CveRol = 1 Then ChkAgruparAlmacen.Visible = True
|
||||
Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201)
|
||||
GvM.Columns(13).Visible = TienePermisoImportes ' costo
|
||||
GvM.Columns(14).Visible = TienePermisoImportes ' importe
|
||||
@@ -168,9 +169,9 @@ Partial Class Inventarios_Kardex
|
||||
|
||||
TxtSerie.Text = ""
|
||||
If ddlProducto2.SelectedValue.ToEntero > 0 Then
|
||||
Dim Dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, ddlProducto2.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
Dim Dr As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=ddlProducto2.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
If Dr IsNot Nothing Then
|
||||
If Dr("Inv_CveMetodoInventario").ToString.ToEntero = 5 Then
|
||||
If Dr("AplicaSerie").ToString = "True" Then
|
||||
DivSerie.Visible = True
|
||||
Else
|
||||
DivSerie.Visible = False
|
||||
|
||||
@@ -1267,19 +1267,23 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
If CBool(e.Row.DBCampo("AplicaSeccion")) Then
|
||||
e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = True
|
||||
If DdlAlmacen.SelectedValue.ToEntero > 0 Then
|
||||
Dim dtsec As DataTable = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero)
|
||||
e.Row.FCDropDownList("DdlSeccionAlmacen").DataSource = dtsec
|
||||
e.Row.FCDropDownList("DdlSeccionAlmacen").DataBind()
|
||||
If dtsec.Rows.Count = 1 Then
|
||||
e.Row.FCDropDownList("DdlSeccionAlmacen").SelectedIndex = 0
|
||||
e.Row.FCDropDownList("DdlSeccionAlmacen").Enabled = False
|
||||
End If
|
||||
|
||||
e.Row.FCDropDownList("DdlSeccionAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
CargaSeccionesAlmacen(e.Row.FCDropDownList("DdlSeccionAlmacen"), DdlAlmacen.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero, UsuarioActual.CveEmpresa, True)
|
||||
'Dim dtsec As DataTable = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero)
|
||||
'e.Row.FCDropDownList("DdlSeccionAlmacen").DataSource = dtsec
|
||||
'e.Row.FCDropDownList("DdlSeccionAlmacen").DataBind()
|
||||
'If dtsec.Rows.Count = 1 Then
|
||||
' e.Row.FCDropDownList("DdlSeccionAlmacen").SelectedIndex = 0
|
||||
' e.Row.FCDropDownList("DdlSeccionAlmacen").Enabled = False
|
||||
'Else 'si es mayor a uno que por default seleccione el primero, que seria el predeterminado
|
||||
' e.Row.FCDropDownList("DdlSeccionAlmacen").SelectedValueExist(dtsec.FiltroPrimeroValor("CveSeccionAlmacen", "Predeterminado = 1"))
|
||||
'End If
|
||||
|
||||
dtsec.Dispose()
|
||||
End If
|
||||
e.Row.FCTextBox("TxtDividir").Visible = True
|
||||
'e.Row.FCDropDownList("DdlSeccionAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
'dtsec.Dispose()
|
||||
End If
|
||||
e.Row.FCTextBox("TxtDividir").Visible = True
|
||||
|
||||
Else
|
||||
e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = False
|
||||
@@ -2382,6 +2386,8 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
Dim CveClienteActual = -1
|
||||
|
||||
Dim CveAlmacenDestino = CveAlmacenApartado
|
||||
Dim CveSeccionDestino As Integer = -1
|
||||
|
||||
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
||||
|
||||
If CveVendedorActual = -1 Or (Dr("CveVendedor").ToString.ToEntero <> CveVendedorActual Or Dr("CveCliente").ToString.ToEntero <> CveClienteActual) Then
|
||||
@@ -2391,7 +2397,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
MovtosSalida.Add(CveMovtoSalidaActual)
|
||||
FoliosSalida.Add(ObjInventario.Folio)
|
||||
|
||||
CveMovtoEntradaActual = ObjInventario.AddMovimiento(CveAlmacenDestino, 9, 1, FechaMovto, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompraSurtir, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, TipoCambio:=If(DdlMonedaTC.SelectedValue.ToEntero = 1, -1, TipoCambio), CveAlmacenDestino:=CveAlmacenDestino, CveMovimientoRelacionado:=CveMovtoSalidaActual, CveVendedor:=Dr("CveVendedor").ToString.ToEntero, CveCliente:=Dr("CveCliente").ToString.ToEntero, Remision:=TxtRemision.Text)
|
||||
CveMovtoEntradaActual = ObjInventario.AddMovimiento(CveAlmacenDestino, 9, 1, FechaMovto, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompraSurtir, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, TipoCambio:=If(DdlMonedaTC.SelectedValue.ToEntero = 1, -1, TipoCambio), CveAlmacenDestino:=CveAlmacenDestino, CveMovimientoRelacionado:=CveMovtoSalidaActual, CveVendedor:=Dr("CveVendedor").ToString.ToEntero, CveCliente:=Dr("CveCliente").ToString.ToEntero, Remision:=TxtRemision.Text, Modulo:="RA/G7")
|
||||
MovtosEntrada.Add(CveMovtoEntradaActual)
|
||||
FoliosEntrada.Add(ObjInventario.Folio)
|
||||
|
||||
@@ -2408,8 +2414,14 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
End If
|
||||
If CBool(Dr("AplicaSeccion")) Then
|
||||
CveSeccionDestino = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenDestino, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
|
||||
Else
|
||||
CveSeccionDestino = -1
|
||||
End If
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovtoEntradaActual, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovtoEntradaActual, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=CveSeccionDestino, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -3110,7 +3122,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
End If
|
||||
Dim CvePrePoliza As Integer = 0
|
||||
Dim UsaComplementariaCostoIndirecto As Boolean = False
|
||||
Dim ConceptoPrePoliza As String = LbProveedor.Text
|
||||
Dim ConceptoPrePoliza As String = String.Format("{0}-{1}", LbProveedor.Text, HLFolio.Text)
|
||||
If UsuarioActual.CveEmpresa = 119 Then UsaComplementariaCostoIndirecto = False
|
||||
Dim PorcentajeCompraImportacion As Decimal = 0 ' si hay mas de una factura de importación saber lo que se está recibiendo
|
||||
|
||||
@@ -3156,13 +3168,12 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
drc("SubTotal") = drt("SubTotal")
|
||||
drc("TipoCambio") = drt("TipoCambio")
|
||||
drc("CveProveedor") = drt("CveProveedor")
|
||||
drc("SubTotalTC") = drt("SubTotalTC")
|
||||
DtTempCompras.Rows.Add(drc)
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Else
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
@@ -3174,6 +3185,9 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa)
|
||||
Dim TotalCosto As Decimal = ObjInventario.DtResultados.SUMD("Total").RoundSQL()
|
||||
Dim IdCtaContableCostoInd As Integer = 0
|
||||
'si reciben parcialidades de producto. en base al total de la importacion y lo recibido.
|
||||
Dim PorcentajeRecepcionCompras As Decimal = TotalCosto / DtTempCompras.SUMD("SubTotalTC")
|
||||
Dim ConceptoPartida As String = String.Format("{0}- Inv#{1}", HLFolio.Text, InvFolio)
|
||||
|
||||
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, TotalCosto, InvFolio, 68, InvFolio, FechaMovto, IdCtaContableAlmacen, -1, CveCompra:=CveCompraSurtir, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=TotalCosto, CveCuenta:=CveCuentaAlmacen) Then
|
||||
'se recorren las facturas a descontar el recepción
|
||||
@@ -3182,7 +3196,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
For Each dr As DataRow In DtTempCompras.Rows
|
||||
Dim CveComp As Integer = dr("CveCompra").ToString.ToEntero
|
||||
'el porcentaje solo aplica a las facturas de costo indirecto
|
||||
Dim SubTotalPartida As Decimal = dr("SubTotal").ToString.ToDecimal * If(dr("TipoCompra").ToString = "CI", PorcentajeCompraImportacion, 1)
|
||||
Dim SubTotalPartida As Decimal = dr("SubTotal").ToString.ToDecimal * If(dr("TipoCompra").ToString = "CI", PorcentajeCompraImportacion, 1) * PorcentajeRecepcionCompras
|
||||
Dim ImporteAbono As Decimal = (SubTotalPartida * dr("TipoCambio").ToString.ToDecimal).RoundSQL
|
||||
Dim ImporteAbonoME As Decimal = 0
|
||||
Dim CveConceptoCostoIndirecto As Integer = If(CveImportacionSurtir > 0, 240, 237)
|
||||
@@ -3199,10 +3213,10 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
|
||||
|
||||
|
||||
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteAbono, InvFolio, CveConceptoCostoIndirecto, InvFolio, FechaMovto, IdCtaContableCostoInd, -1, CveCompra:=CveComp, CveProveedor:=dr("CveProveedor").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=ImporteAbono) Then
|
||||
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteAbono, ConceptoPartida, CveConceptoCostoIndirecto, ConceptoPartida, FechaMovto, IdCtaContableCostoInd, -1, CveCompra:=CveComp, CveProveedor:=dr("CveProveedor").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=ImporteAbono) Then
|
||||
' si tiene valor es que hay complementaria
|
||||
If ImporteAbonoME > 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteAbono, InvFolio, If(CveImportacionSurtir > 0, 242, 239), InvFolio, FechaMovto, IdCtaContableCostoInd, -1, CveCompra:=CveComp, CveProveedor:=dr("CveProveedor").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=ImporteAbono) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteAbono, ConceptoPartida, If(CveImportacionSurtir > 0, 242, 239), ConceptoPartida, FechaMovto, IdCtaContableCostoInd, -1, CveCompra:=CveComp, CveProveedor:=dr("CveProveedor").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=ImporteAbono) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
@@ -3220,7 +3234,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
End If
|
||||
End If
|
||||
|
||||
If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then
|
||||
If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 6) Then
|
||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||
GuardaLogAD($"Inventarios/RecepcionAlmacen-PPCompOC | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||
ErrorMovInv = True
|
||||
|
||||
@@ -242,7 +242,7 @@
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="server" HighlightCssClass="vco" TargetControlID="CVUnidad" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td runat="server" id="TrSeccion" visible="false">
|
||||
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="Seccion" AppendDataBoundItems="true" DataValueField="CveSeccion" Class="form-control input-sm select2me" Style="width: 95% !important" runat="server" CausesValidation="true">
|
||||
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="SeccionAlmacen" AppendDataBoundItems="true" DataValueField="CveSeccionAlmacen" Class="form-control input-sm select2me" Style="width: 95% !important" runat="server" CausesValidation="true">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
@@ -284,11 +284,11 @@
|
||||
<asp:BoundField HeaderText="#" DataField="No" ItemStyle-Width="3%" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:#,###,###.##}" ItemStyle-Width="7%" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-Width="40%" />
|
||||
<asp:BoundField HeaderText="Unidad" DataField="UnidadMedida" ItemStyle-Width="10%" />
|
||||
<asp:BoundField HeaderText="Sección Almacén" DataField="SeccionAlmacen" ItemStyle-Width="10%" Visible="false"/>
|
||||
<asp:BoundField HeaderText="Unidad" DataField="UnidadMedida" ItemStyle-Width="10%" />
|
||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="10%" Visible="false" />
|
||||
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-Width="10%" Visible="false" />
|
||||
<asp:BoundField HeaderText="Caducidad" DataField="FechaCaducidad" DataFormatString="{0:d}" ItemStyle-Width="10%" Visible="false" />
|
||||
<asp:BoundField HeaderText="Sección" DataField="SeccionAlmacen" ItemStyle-Width="10%" Visible="false"/>
|
||||
<asp:BoundField HeaderText="Observaciones" DataField="Observaciones" ItemStyle-Width="10%" />
|
||||
<%--<asp:TemplateField HeaderText="Sección Almacén" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false">
|
||||
<ItemTemplate>
|
||||
@@ -439,7 +439,7 @@
|
||||
<div class="row">
|
||||
<label class="col-md-4 truncate" style="max-width: 155px">Almacén destino:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlAlmacenDestinoLiberacion" runat="server" CssClass="form-control input-sm select2me" Width="100%" DataTextField="Almacen" DataValueField="CveAlmacen"></asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlAlmacenDestinoLiberacion" runat="server" CssClass="form-control input-sm select2me" Width="100%" DataTextField="Almacen" DataValueField="CveAlmacen" AutoPostBack="true"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator InitialValue="-1" ID="RfvAlmacenDestinoLiberacion" Display="None" ValidationGroup="GrpGuardarLiberacion" runat="server" ControlToValidate="DdlAlmacenDestinoLiberacion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Es campo <b>''Almacén destino''</b> es necesario, por favor seleccione uno."></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEAlmacenDestinoLiberacion" runat="server" HighlightCssClass="vco" TargetControlID="RfvAlmacenDestinoLiberacion" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
@@ -473,7 +473,7 @@
|
||||
|
||||
<asp:UpdatePanel ID="UpGridLiberacion" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvMLiberacion" OnRowCreated="GvMLiberacion_RowCreated" OnRowDataBound="GvMLiberacion_RowDataBound" runat="server" GridLines="none" CssClass="table table-striped table-hover Widthall" EmptyDataText="Aún no hay registros." DataKeyNames="No,CveMovimientoDetalle,CveUM,CvePS,Serie,Observaciones,PU" AutoGenerateColumns="False" AllowPaging="False" ShowFooter="True" ShowHeaderWhenEmpty="True">
|
||||
<asp:GridView ID="GvMLiberacion" OnRowCreated="GvMLiberacion_RowCreated" OnRowDataBound="GvMLiberacion_RowDataBound" runat="server" GridLines="none" CssClass="table table-striped table-hover Widthall" EmptyDataText="Aún no hay registros." DataKeyNames="No,CveMovimientoDetalle,CveUM,CvePS,Serie,Observaciones,PU,CveSeccionAlmacen,Lote,FechaCaducidad" AutoGenerateColumns="False" AllowPaging="False" ShowFooter="True" ShowHeaderWhenEmpty="True">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="#" DataField="No" ItemStyle-Width="3%" ItemStyle-HorizontalAlign="Center" />
|
||||
<%-- <asp:BoundField HeaderText="Cant. Disponible" DataField="Cantidad" DataFormatString="{0:#,###,###.##}" ItemStyle-Width="7%" ItemStyle-HorizontalAlign="Right" />--%>
|
||||
@@ -490,13 +490,15 @@
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Producto" DataField="CodigoPS" ItemStyle-Width="40%" />
|
||||
<asp:BoundField HeaderText="Unidad" DataField="UnidadMedida" ItemStyle-Width="10%" />
|
||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="20%" />
|
||||
<asp:BoundField HeaderText="Observaciones" DataField="Observaciones" ItemStyle-Width="10%" />
|
||||
<asp:TemplateField HeaderText="Sección Almacén" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false">
|
||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="20%" Visible="false"/>
|
||||
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-Width="20%" Visible="false"/>
|
||||
<asp:BoundField HeaderText="Caducidad" DataField="FechaCaducidad" ItemStyle-Width="20%" Visible="false"/>
|
||||
<asp:TemplateField HeaderText="Sección" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false">
|
||||
<ItemTemplate>
|
||||
xx
|
||||
<asp:DropDownlist ID="DdlSeccionAlmacen" runat="server" DataTextField="SeccionAlmacen" DataValueField="CveSeccionAlmacen" CssClass="form-control input-sm select2me" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Observaciones" DataField="Observaciones" ItemStyle-Width="10%" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
|
||||
@@ -121,7 +121,6 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
EsSurtidoUniforme = If(Request.QueryString("EsSurtidoUniforme").ToString = "1", True, False)
|
||||
End If
|
||||
|
||||
|
||||
InicializaValores()
|
||||
|
||||
If Not Request.QueryString("CvePersonal") Is Nothing Then
|
||||
@@ -275,8 +274,8 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
DdlAlmacenDestinoLiberacion.DataBind()
|
||||
DdlAlmacenDestinoLiberacion.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
DdlSeccionAlmacen.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1)
|
||||
DdlSeccionAlmacen.DataBind()
|
||||
'DdlSeccionAlmacen.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1)
|
||||
'DdlSeccionAlmacen.DataBind()
|
||||
|
||||
CargaPS()
|
||||
End Sub
|
||||
@@ -335,9 +334,11 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
End Sub
|
||||
Private Sub VerificaProducto()
|
||||
If DdlProducto2.SelectedValue.ToEntero > 0 Then
|
||||
Dim drp As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlProducto2.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
Dim drp As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=DdlProducto2.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
|
||||
If drp IsNot Nothing Then
|
||||
|
||||
|
||||
'activa Serie
|
||||
If CBool(drp("AplicaSerie")) Then
|
||||
ThSerie.Visible = True
|
||||
@@ -349,6 +350,17 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
If CBool(drp("AplicaSeccion")) Then
|
||||
ThSeccion.Visible = True
|
||||
TrSeccion.Visible = True
|
||||
If DdlAlmacen.SelectedValue.ToEntero > 0 Then
|
||||
DdlSeccionAlmacen.Items.Clear()
|
||||
CargaSeccionesAlmacen(DdlSeccionAlmacen, DdlAlmacen.SelectedValue.ToEntero, DdlProducto2.SelectedValue.ToEntero, UsuarioActual.CveEmpresa)
|
||||
'Dim dtt As DataTable = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, DdlProducto2.SelectedValue.ToEntero)
|
||||
'DdlSeccionAlmacen.DataSource = dtt
|
||||
'DdlSeccionAlmacen.DataBind()
|
||||
'If dtt.Rows.Count > 1 Then
|
||||
' DdlSeccionAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
'End If
|
||||
'dtt.Dispose()
|
||||
End If
|
||||
End If
|
||||
'activa lote
|
||||
If CBool(drp("AplicaLote")) Then
|
||||
@@ -445,7 +457,7 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
registro.Item("Estatus") = ""
|
||||
registro.Item("SeccionAlmacen") = If(DdlSeccionAlmacen.SelectedValue.ToEntero > 0, DdlSeccionAlmacen.SelectedItem.Text, "")
|
||||
registro.Item("Serie") = TxtnSerie.Text
|
||||
registro.Item("Lote") = If(TxtLote.Text = "", "-1", TxtLote.Text)
|
||||
registro.Item("Lote") = If(TxtLote.Text = "", "", TxtLote.Text)
|
||||
registro.Item("FechaCaducidad") = If(TxtCaducidad.Text = "", MinFecha.ToString, TxtCaducidad.Text)
|
||||
registro.Item("CveSeccionAlmacen") = If(DdlSeccionAlmacen.SelectedValue.ToEntero > 0, DdlSeccionAlmacen.SelectedValue.ToEntero, -1)
|
||||
registro.Item("Observaciones") = TxtObservacionesdetalle.Text
|
||||
@@ -571,6 +583,18 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
Protected Sub GvMLiberacion_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
e.Row.FCLabel("LblCantidad").Text = e.Row.FCLabel("LblCantidad").Text.FormatoNumero(2)
|
||||
|
||||
If CBool(e.Row.DBCampo("AplicaSeccion")) AndAlso DdlAlmacenDestinoLiberacion.SelectedValue.ToEntero > 0 Then
|
||||
Dim dtt As DataTable = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacenDestinoLiberacion.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero)
|
||||
e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = True
|
||||
e.Row.FCDropDownList("DdlSeccionAlmacen").DataSource = dtt
|
||||
e.Row.FCDropDownList("DdlSeccionAlmacen").DataBind()
|
||||
If dtt.Rows.Count = 0 Then
|
||||
e.Row.FCDropDownList("DdlSeccionAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End If
|
||||
dtt.Dispose()
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -650,13 +674,12 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGvMLiberacion()
|
||||
GvM.Columns(5).Visible = False
|
||||
For Each Dr As DataRow In DtMovimientosLiberacion.Rows
|
||||
If Dr("Serie").ToString <> "" Then
|
||||
GvM.Columns(5).Visible = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
GvMLiberacion.Columns(5).Visible = DtMovimientosLiberacion.MAX("Serie").ToString <> ""
|
||||
GvMLiberacion.Columns(6).Visible = DtMovimientosLiberacion.MAX("Lote").ToString <> ""
|
||||
GvMLiberacion.Columns(7).Visible = DtMovimientosLiberacion.MAX("FechaCaducidad").ToString.ToDate > MinFecha
|
||||
GvMLiberacion.Columns(8).Visible = DtMovimientosLiberacion.MAX("CveSeccionAlmacen").ToString.ToEntero > 0 Or DtMovimientosLiberacion.MAX("AplicaSeccion") = "True"
|
||||
|
||||
|
||||
GvMLiberacion.DataSource = DtMovimientosLiberacion
|
||||
GvMLiberacion.DataBind()
|
||||
@@ -823,10 +846,17 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
MensajeError = "Ocurrió un error al guardar el movimiento de entrada correctamente. Por favor vuelva a intentar."
|
||||
TieneError = True
|
||||
Else
|
||||
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
||||
Dim CveSeccionAlmacen As Integer = 0
|
||||
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
||||
If CBool(Dr("AplicaSeccion")) Then
|
||||
CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacenDestino.SelectedValue.ToEntero, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
|
||||
Else
|
||||
CveSeccionAlmacen = -1
|
||||
End If
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero,
|
||||
Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero,
|
||||
Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=CveSeccionAlmacen,
|
||||
Serie:=Dr("Serie").ToString, Observaciones:=Dr("Observaciones").ToString) Then
|
||||
TieneError = True
|
||||
MensajeError = "Ocurrió un error al guardar los movimientos de entrada"
|
||||
@@ -845,6 +875,7 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
'SALIDA ORIGEN - RESGUARDO
|
||||
CveMovimientoSalida = ObjInventario.AddMovimiento(CveAlmacenLiberación, 3, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, SubProyecto, ActivoFijo, Observaciones:=TxtObservacionesLiberacion.Text, CvePersonal:=CvePersonalLiberacion, CveAlmacenDestino:=DdlAlmacenDestinoLiberacion.SelectedValue.ToEntero, CveProveedor:=CveProveedorLiberacion, CveCliente:=CveClienteLiberacion, MovimientoFijo:=True)
|
||||
FolioSalida = ObjInventario.Folio
|
||||
Dim DiccionarioSecciones As New HybridDictionary
|
||||
|
||||
If CveMovimientoSalida <= 0 Then
|
||||
TieneError = True
|
||||
@@ -855,11 +886,12 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
Dim Cont As Integer = 0
|
||||
For Each Gvr As GridViewRow In GvMLiberacion.Rows
|
||||
If Gvr.FCTextBox("TxtCantidad").Text.ToDouble > 0 Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Gvr.FCTextBox("TxtCantidad").Text.ToDouble, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("PU").ToString.ToDecimal, -1, -1, Gvr.DataKey("Serie").ToString, Gvr.DataKey("Observaciones").ToString) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Gvr.FCTextBox("TxtCantidad").Text.ToDouble, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("PU").ToString.ToDecimal, -1, CveSeccionAlmacen:=Gvr.DataKey("CveSeccionAlmacen").ToEntero, Serie:=Gvr.DataKey("Serie").ToString, Observaciones:=Gvr.DataKey("Observaciones").ToString) Then
|
||||
MensajeError = "Ocurrió un error al guardar los detalles del movimiento de salida. Por favor vuelva a intentar."
|
||||
TieneError = True
|
||||
Exit For
|
||||
|
||||
Else
|
||||
DiccionarioSecciones.Add(ObjInventario.CveMovimientoDetalle, Gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue)
|
||||
End If
|
||||
End If
|
||||
Cont += 1
|
||||
@@ -877,7 +909,8 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
||||
Cont = 0
|
||||
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, -1, Dr("Serie").ToString, Dr("Observaciones").ToString) Then
|
||||
Dim CveSeccionAlmacen As Integer = DiccionarioSecciones(Dr("CveMovimientoDetalle").ToString.ToEntero).ToString.ToEntero
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Dr("Serie").ToString, Observaciones:=Dr("Observaciones").ToString) Then
|
||||
TieneError = True
|
||||
MensajeError = "Ocurrió un error al guardar los movimientos de entrada"
|
||||
Exit For
|
||||
@@ -1020,4 +1053,7 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub DdlAlmacenDestinoLiberacion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlAlmacenDestinoLiberacion.SelectedIndexChanged
|
||||
CargaResguardos()
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -1534,13 +1534,14 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
e.Row.FCTextBox("TxtCantidad").Attributes.Add("onkeyup", String.Format("ValidaCantidad(this,{0});", e.Row.DBCampo("Cantidad")))
|
||||
If CBool(e.Row.DBCampo("AplicaSeccion")) AndAlso DdlAlmacenRecepcion.SelectedValue.ToEntero > 0 Then
|
||||
|
||||
Dim dtt As DataTable = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacenRecepcion.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero)
|
||||
e.Row.FCDropDownList("DdlSeccionAlmacen").DataSource = dtt
|
||||
e.Row.FCDropDownList("DdlSeccionAlmacen").DataBind()
|
||||
If dtt.Rows.Count > 1 Then
|
||||
e.Row.FCDropDownList("DdlSeccionAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End If
|
||||
dtt.Dispose()
|
||||
CargaSeccionesAlmacen(e.Row.FCDropDownList("DdlSeccionAlmacen"), DdlAlmacenRecepcion.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero, UsuarioActual.CveEmpresa)
|
||||
'Dim dtt As DataTable = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacenRecepcion.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero)
|
||||
'e.Row.FCDropDownList("DdlSeccionAlmacen").DataSource = dtt
|
||||
'e.Row.FCDropDownList("DdlSeccionAlmacen").DataBind()
|
||||
'If dtt.Rows.Count > 1 Then
|
||||
' e.Row.FCDropDownList("DdlSeccionAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
'End If
|
||||
'dtt.Dispose()
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user