-- seccion en importacion de AF
This commit is contained in:
10
AF/AF.aspx
10
AF/AF.aspx
@@ -2903,6 +2903,16 @@
|
||||
<ajax:ValidatorCalloutExtender ID="VCEAFInvSerie" runat="server" HighlightCssClass="vco" TargetControlID="RFVAFInvSerie" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div id="DivSeccion" runat="server" visible="false" class="row">
|
||||
<div class="col-md-2">Sección:</div>
|
||||
<div class="col-md-10">
|
||||
<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>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" ControlToValidate="TxtAFInvSerie" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Serie''</b> es necesario, por favor seleccione uno." InitialValue="" ValidationGroup="GrpAFInv"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender27" runat="server" HighlightCssClass="vco" TargetControlID="RFVAFInvSerie" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button Text="Cargar Producto" ID="BtnAFInv" CssClass="btn btn-primary" ValidationGroup="GrpAFInv" OnClick="BtnAFInv_Click" runat="server" />
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
Option Strict On
|
||||
|
||||
Imports Extensiones
|
||||
Imports System.Runtime.InteropServices
|
||||
Imports System.IO
|
||||
Imports System.Data
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
@@ -528,7 +527,7 @@ Partial Class AF_AF
|
||||
Private Sub CargaAFInv()
|
||||
If UsuarioActual.Empresa.UsaInventarios AndAlso CveActivoFijo <= 0 Then
|
||||
|
||||
HLAFInv.Visible= True
|
||||
HLAFInv.Visible = True
|
||||
|
||||
Dim StrAlmacenes As String = "CveTipoAlmacen IN (1,2,12)"
|
||||
DdlAFInvAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, CveEmpresaActual, CveTipoAlmacen:=-1).FiltraParametros(StrAlmacenes)
|
||||
@@ -3048,18 +3047,22 @@ Partial Class AF_AF
|
||||
Alert("Seleccione un producto.")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim CveSeccionAlmacen As Integer = -1
|
||||
AFInvSerie = ""
|
||||
AFInvCvePS = -1
|
||||
AFInvCveAlmacen = -1
|
||||
|
||||
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, DdlAFInvPS.SelectedValue.ToEntero).Rows(0)
|
||||
Dim Inv_CveMetodoInventario As Integer = DrPS("Inv_CveMetodoInventario").ToString().ToEntero()
|
||||
Dim DrPS As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=DdlAFInvPS.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
If DrPS Is Nothing Then Exit Sub
|
||||
|
||||
Dim Inv_CveMetodoInventario As Integer = If(DrPS("AplicaSerie").ToString() = "True", 5, 1)
|
||||
If CBool(DrPS("AplicaSeccion")) Then CveSeccionAlmacen = DdlSeccionAlmacen.SelectedValue.ToEntero
|
||||
|
||||
AFInvSerie = If(Inv_CveMetodoInventario = 5, TxtAFInvSerie.Text.Trim, "-1")
|
||||
|
||||
|
||||
Dim ObjInventario As New ClsInventarios
|
||||
Dim Existencia = ObjInventario.GetExistenciasPS(DdlAFInvPS.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa, DdlAFInvAlmacen.SelectedValue.ToEntero, FechaMovto:=Now.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=AFInvSerie)
|
||||
Dim Existencia = ObjInventario.GetExistenciasPS(DdlAFInvPS.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa, DdlAFInvAlmacen.SelectedValue.ToEntero, CveSeccionAlmacen:=CveSeccionAlmacen, FechaMovto:=Now.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=AFInvSerie)
|
||||
Dim Costo As Decimal = 0
|
||||
If Inv_CveMetodoInventario = 5 Then
|
||||
Costo = ObjInventario.GetCostoPSSerie(DdlAFInvPS.SelectedValue.ToEntero, AFInvSerie, DdlAFInvAlmacen.SelectedValue.ToEntero, CveEmpresaActual)
|
||||
@@ -3643,7 +3646,22 @@ Partial Class AF_AF
|
||||
End Sub
|
||||
#End Region
|
||||
Protected Sub DdlAFInvPS_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
DivSerie.Visible = CBool(GlobalDTPS(UsuarioActual.CveEmpresa, DdlAFInvPS.SelectedValue.ToEntero).FiltroPrimeroValor("AplicaSerie"))
|
||||
Dim drr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, DdlAFInvPS.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
If drr IsNot Nothing Then
|
||||
DivSerie.Visible = CBool(drr("AplicaSerie"))
|
||||
DivSeccion.Visible = CBool(drr("AplicaSeccion"))
|
||||
DdlSeccionAlmacen.Items.Clear()
|
||||
If CBool(drr("AplicaSeccion")) Then
|
||||
Dim dtt As DataTable = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAFInvAlmacen.SelectedValue.ToEntero, DdlAFInvPS.SelectedValue.ToEntero)
|
||||
DdlSeccionAlmacen.DataSource = dtt
|
||||
DdlSeccionAlmacen.DataBind()
|
||||
|
||||
dtt.Dispose()
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
Protected Sub BtnPDFCompras_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Reference in New Issue
Block a user