mejoras visuales agregar ps
This commit is contained in:
@@ -323,81 +323,7 @@
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<%--INVENTARIO INICIAL--%>
|
||||
<asp:UpdatePanel runat="server" ID="UpCodigoBarras" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="col-md-3">
|
||||
<div class="portlet smmallpadding light bordered" id="DivCodigoBarras" runat="server" visible="False">
|
||||
<div class="portlet-title">
|
||||
<div class="tools">
|
||||
<a href="javascript;" data-idchekbox="<%= chkexpand2.ClientID%>" class=" <%= IIf(chkexpand2.Checked = True, "collapse", "expand")%>"></a>
|
||||
</div>
|
||||
<div class="caption uppercase" style="position: relative;">
|
||||
<i class="fa fa-info-circle"></i>Agregar Producto
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<asp:Panel ID="PnlII" runat="server" DefaultButton="BtnAddCodigo">
|
||||
<div class="row">
|
||||
<label class="col-md-4">Cantidad</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox runat="server" ID="TxtCantidadProducto" Text="1" Width="50px" Enabled="false"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-top: 5px;">
|
||||
<label class="col-md-4">NoParte</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox runat="server" ID="TxtCodigo" ClientIDMode="Static"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-top: 5px;">
|
||||
<label class="col-md-4">UPC/EAN</label>
|
||||
<div class="col-md-8">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:Panel ID="PanelCodigoBarras" runat="server" DefaultButton="BtnCodigoBarras">
|
||||
<asp:TextBox runat="server" ID="TxtCodigoBarras" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:Button Text="" ID="BtnCodigoBarras" OnClick="BtnAddCodigo_Click" Style="display: none" runat="server" />
|
||||
</asp:Panel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-top: 5px;">
|
||||
<label class="col-md-4">Costo</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox runat="server" ID="TxtAltaCosto" ClientIDMode="Static"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div runat="server" id="TdSeriePS" visible="false" class="row" style="margin-top: 5px;">
|
||||
<label class="col-md-4">Serie</label>
|
||||
<div class="col-md-8">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:Panel ID="PanelSerie" runat="server" DefaultButton="BtnSeriePS">
|
||||
<asp:TextBox runat="server" ID="TxtCodigoSerie"></asp:TextBox>
|
||||
<asp:Button Text="" ID="BtnSeriePS" OnClick="BtnSeriePS_Click" Style="display: none" runat="server" />
|
||||
</asp:Panel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-top: 5px;">
|
||||
<div class="col-md-12" style="text-align: center;">
|
||||
<asp:Button ID="BtnAddCodigo" runat="server" Text="Guardar" CssClass="btn btn-primary" Width="75%" />
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpRegistroTipoCambio" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="col-md-4">
|
||||
@@ -1726,7 +1652,7 @@
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="Literal3" Text="Detalles" runat="server"> </asp:Literal></h4>
|
||||
<asp:Literal ID="Literal3" Text="Agregar Producto" runat="server"> </asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div runat="server" id="divCantidad" class="form-group form-md-line-input input-iconright">
|
||||
@@ -1756,7 +1682,7 @@
|
||||
|
||||
<div runat="server" id="divPrecio" class="form-group form-md-line-input input-iconright" visible="false">
|
||||
<asp:TextBox ID="txtPrecio" CssClass="form-control input-sm" runat="server" Width="50%" Visible="false"></asp:TextBox>
|
||||
<label for="<%= txtPrecio.ClientID.ToString()%>">P.U.</label>
|
||||
<label for="<%= txtPrecio.ClientID.ToString()%>">Precio unitario</label>
|
||||
<br />
|
||||
</div>
|
||||
<div runat="server" id="divSerie" class="form-group form-md-line-input input-iconright" visible="false">
|
||||
@@ -1766,22 +1692,29 @@
|
||||
<br />
|
||||
</div>
|
||||
<div runat="server" id="divLote" class="form-group form-md-line-input input-iconright" visible="false">
|
||||
<asp:TextBox ID="TxtnLote" CssClass="form-control input-sm" runat="server" Width="80px"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtnLote" CssClass="form-control input-sm" runat="server" Width="120px"></asp:TextBox>
|
||||
<label for="<%= TxtnLote.ClientID.ToString()%>">Lote</label>
|
||||
<br />
|
||||
</div>
|
||||
<div runat="server" id="divSeccionAlmacen" class="form-group form-md-line-input input-iconright" visible="false">
|
||||
<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>
|
||||
</div>
|
||||
<div runat="server" id="divCaducidad" class="form-group form-md-line-input input-iconright" visible="false">
|
||||
<asp:TextBox ID="TxtnFechaCaducidad" CssClass="form-control input-sm" runat="server" Width="80px"></asp:TextBox>
|
||||
</div>
|
||||
<div runat="server" id="divCaducidad" class="form-group form-md-line-input input-iconright input-small date date-picker " data-date-format="dd/mm/yyyy" visible="false">
|
||||
<asp:TextBox ID="TxtnFechaCaducidad" CssClass="form-control input-sm" runat="server" Style="width: 118px" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="LnkFechaCaducidad" class="btn default"> <i class="fa fa-calendar"></i> </asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaCaducidad" runat="server" TargetControlID="TxtnFechaCaducidad" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaCaducidad" TargetControlID="TxtnFechaCaducidad" PopupButtonID="LnkFechaCaducidad" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:CompareValidator ID="CVFechaCaducidad" runat="server" ControlToValidate="TxtnFechaCaducidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Caducidad''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup=""></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEFEchaCaducidad" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaCaducidad" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<label for="<%= TxtnFechaCaducidad.ClientID.ToString()%>">Fecha Caducidad</label>
|
||||
</div>
|
||||
<div runat="server" id="divSeccionAlmacen" class="form-group form-md-line-input input-iconright" visible="false">
|
||||
<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>
|
||||
</div>
|
||||
<br />
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<div class="input-group input-sm" >
|
||||
<asp:TextBox ID="TxtObservacionesdetalle" CssClass="form-control input-sm" runat="server" MaxLength="200"></asp:TextBox>
|
||||
<label for="<%= TxtObservacionesdetalle.ClientID.ToString()%>">Observaciones</label>
|
||||
<br />
|
||||
|
||||
@@ -1220,11 +1220,6 @@ Partial Class Inventarios_EntradasSalidas
|
||||
UppGrid.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCodigoBarras()
|
||||
If DdlConcepto.SelectedValue.ToEntero = 1 Then
|
||||
DivCodigoBarras.Visible = True
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -1574,7 +1569,6 @@ Partial Class Inventarios_EntradasSalidas
|
||||
registro.Item("CveSeccionAlmacen") = CveSeccionAlmacen
|
||||
registro.Item("SeccionAlmacen") = SeccionAlmacen
|
||||
|
||||
|
||||
registro.Item("CodigoAF") = CodigoAF
|
||||
registro.Item("Codigo") = Codigo
|
||||
registro.Item("CveAF") = CveAF
|
||||
@@ -2210,98 +2204,6 @@ Partial Class Inventarios_EntradasSalidas
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " ADD INVENTARIO INICIAL "
|
||||
Protected Sub BtnCodigoBarras_Click(sender As Object, e As EventArgs)
|
||||
|
||||
If TxtCodigoBarras.Text = "" Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
TdSeriePS.Visible = False
|
||||
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero($"CodigoBarras= '{TxtCodigoBarras.Text}'")
|
||||
If DrPS Is Nothing Then
|
||||
Alert($"No se ha encontrado un producto del Codigo ""<b>{TxtCodigoBarras.Text}</b>"". ", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus,200);")
|
||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||
TxtCodigoBarras.Text = ""
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If DrPS("Inv_CveMetodoInventario").ToString.ToEntero = 5 Then
|
||||
TdSeriePS.Visible = True
|
||||
TxtCodigoSerie.Focus()
|
||||
CvePSSerieLote = DrPS("CvePS").ToString.ToEntero
|
||||
CveUMSerieLote = DrPS("CveUnidadMedida").ToString.ToEntero
|
||||
CostoPromedioSerieLote = DrPS("CostoPromedio").ToString.ToDecimal
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
GuardaCodigoSerie(TxtCantidadProducto.Text.ToDecimal, DrPS("CvePS").ToString.ToEntero, DrPS("CveUnidadMedida").ToString.ToEntero, DrPS("CostoPromedio").ToString.ToDecimal)
|
||||
|
||||
TxtCodigoBarras.Text = ""
|
||||
TxtCodigoBarras.Focus()
|
||||
End Sub
|
||||
Protected Sub BtnSeriePS_Click(sender As Object, e As EventArgs)
|
||||
If TxtCodigoSerie.Text.Trim = "" Then TxtCodigoSerie.Focus() : Exit Sub
|
||||
|
||||
GuardaCodigoSerie(1, CvePSSerieLote, CveUMSerieLote, CostoPromedioSerieLote, TxtCodigoSerie.Text.Trim)
|
||||
|
||||
TdSeriePS.Visible = False
|
||||
End Sub
|
||||
Public Sub BtnAddCodigo_Click(sender As Object, e As EventArgs) Handles BtnAddCodigo.Click
|
||||
|
||||
If TxtCodigo.Text.Trim = "" And TxtCodigoBarras.Text.Trim = "" Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim DrP As DataRow = Nothing
|
||||
|
||||
If TxtCodigo.Text.Trim <> String.Empty Then
|
||||
DrP = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero($" Codigo = '{TxtCodigo.Text.Trim}'")
|
||||
ElseIf TxtCodigoBarras.Text.Trim <> String.Empty Then
|
||||
DrP = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero($" CodigoBarras = '{TxtCodigoBarras.Text.Trim}'")
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Dim Costo As Decimal = TxtAltaCosto.Text.ToDecimal
|
||||
|
||||
If DrP IsNot Nothing AndAlso DrP("CvePS").ToString.ToEntero > 0 Then
|
||||
GuardaCodigoSerie(TxtCantidadProducto.Text.ToDecimal, DrP("CvePS").ToString.ToEntero, DrP("CveUnidadMedida").ToString.ToEntero, Costo)
|
||||
Else
|
||||
Alert("No se encontró el producto. Favor de verificar y volver a intentar.", TipoMensaje.MsgError, "window.setTimeout(Focus2,200);")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub GuardaCodigoSerie(Cantidad As Decimal, CvePS As Integer, CveUM As Integer, CostoPromedio As Decimal, Optional SerieLote As String = "-1")
|
||||
Dim ObjInv As New ClsInventarios
|
||||
|
||||
If CveMovimiento <= 0 Then
|
||||
CveMovimiento = ObjInv.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero, DdlConcepto.SelectedValue.ToEntero, 1, TxtFecha.Text.Replace(",", "").ToDate, TxtFolio.Text.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Modulo:="ES/CS1")
|
||||
End If
|
||||
|
||||
ObjInv.AddMovimientoDetalle(CveMovimiento, Cantidad, CveUM, CvePS, CostoPromedio, -1, Serie:=SerieLote)
|
||||
ObjInv.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa)
|
||||
DtMovimientos = ObjInv.DtResultados.FiltraParametros("", "CveMovimientoDetalle DESC").AsEnumerable.Take(25).CopyToDataTable
|
||||
ObjInv.Dispose()
|
||||
|
||||
CargaGVM(DtMovimientos)
|
||||
|
||||
TxtCodigoBarras.Text = ""
|
||||
TxtCodigo.Text = ""
|
||||
TxtCodigoSerie.Text = ""
|
||||
TxtCantidadProducto.Text = "1"
|
||||
|
||||
txtCantidad.Text = ""
|
||||
LblCodigo.Text = ""
|
||||
HdnCodigoAF.Value = "-1"
|
||||
HdnCveActivoFijo.Value = "-1"
|
||||
|
||||
TxtCodigoBarras.Focus()
|
||||
RegistraScript("beep-07.wav')")
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " DdlConcepto, DdlClasificacion, DdlAlmacen | Index CHANGED "
|
||||
|
||||
Protected Sub DdlAlmacen_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
@@ -2459,7 +2361,6 @@ Partial Class Inventarios_EntradasSalidas
|
||||
If CveMovimiento <= 0 Or EsNuevoMov Then SiguienteFolio()
|
||||
Dim CveConcepto As String = DdlConcepto.SelectedValue
|
||||
|
||||
DivCodigoBarras.Visible = False
|
||||
TxtFecha.Enabled = True
|
||||
TxtObservaciones.Enabled = True
|
||||
|
||||
@@ -2471,8 +2372,6 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
Select Case CveConcepto
|
||||
Case "1", "2", "22", "32", "33" ' ENTRADAS
|
||||
DivCodigoBarras.Visible = True
|
||||
TxtCodigoBarras.Focus()
|
||||
|
||||
If CveMovimiento > 0 Then
|
||||
TxtFecha.Text = NowADS().ToShortDateString
|
||||
@@ -2519,7 +2418,6 @@ Partial Class Inventarios_EntradasSalidas
|
||||
DdlProveedor.DataBind()
|
||||
|
||||
Case Else
|
||||
DivCodigoBarras.Visible = False
|
||||
TrSubProyectoActivoFijo.Visible = False
|
||||
VisualizaAF(False)
|
||||
If GvM.Rows.Count > 0 Then GvM.FooterRow.Visible = True
|
||||
@@ -2527,7 +2425,6 @@ Partial Class Inventarios_EntradasSalidas
|
||||
TrResponsable.Visible = False
|
||||
End Select
|
||||
|
||||
UpCodigoBarras.Update()
|
||||
UppGrid.Update()
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
@@ -2612,12 +2509,11 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
DdlUnidad.Items.Clear()
|
||||
DdlUnidad.DataSource = GlobalDTProductosServiciosEquivalencias(DdlProducto2.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa)
|
||||
DdlUnidad.DataBind()
|
||||
End If
|
||||
|
||||
DdlUnidad.Items.Clear()
|
||||
DdlUnidad.DataSource = GlobalDTProductosServiciosEquivalencias(DdlProducto2.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa)
|
||||
DdlUnidad.DataBind()
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
@@ -3385,7 +3281,6 @@ Partial Class Inventarios_EntradasSalidas
|
||||
If TxtCodigoPS.Text.Trim = "" Then
|
||||
Exit Sub
|
||||
End If
|
||||
TdSeriePS.Visible = False
|
||||
TdSeccionPSAdd.Visible = False
|
||||
|
||||
Dim Dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero($"CodigoBarras= '{TxtCodigoPS.Text}'")
|
||||
|
||||
Reference in New Issue
Block a user