Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -13,7 +13,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCombos()
|
||||
Dim DtAlmacenes As DataTable = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1).FiltraParametros("CveTipoAlmacen in (1,12,14,16)")
|
||||
Dim DtAlmacenes As DataTable = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1).FiltraParametros("CveTipoAlmacen in (1,12,14,16, 26)")
|
||||
|
||||
DdlAlmacen.DataSource = DtAlmacenes
|
||||
DdlAlmacen.DataBind()
|
||||
|
||||
@@ -206,12 +206,11 @@
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
||||
data-sort="true" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Folio" DataField="Folio" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" />
|
||||
<asp:HyperlinkField DataTextField="Folio" HeaderText="Folio" DataNavigateUrlFormatString="/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}" DataNavigateUrlFields="CveMovimiento" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" />
|
||||
<asp:BoundField HeaderText="Fecha" DataField="FechaMovto" DataFormatString="{0:d}" ItemStyle-Width="5%" />
|
||||
<asp:BoundField HeaderText="Disponible" DataField="Cantidad" DataFormatString="{0:#,##0.00####}" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" />
|
||||
<asp:BoundField HeaderText="Unidad" DataField="UnidadMedida" ItemStyle-Width="5%" />
|
||||
<asp:BoundField HeaderText="Código" DataField="Codigo" ItemStyle-Width="5%" />
|
||||
|
||||
|
||||
<asp:BoundField HeaderText="Código" DataField="Codigo" ItemStyle-Width="5%" />
|
||||
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:BoundField HeaderText="Valor" DataField="Valor" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:n}" />
|
||||
|
||||
@@ -100,6 +100,13 @@ Partial Class RepTraspasoAlmacen
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.DBCampo("Folio") = "" Then
|
||||
e.Row.CssClass = "Totales"
|
||||
Else
|
||||
If e.Row.DBCampo("PS") = "" Then
|
||||
e.Row.CssClass = "SubTotales"
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -377,6 +377,11 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
'End If
|
||||
'dtt.Dispose()
|
||||
End If
|
||||
Else
|
||||
ThSeccion.Visible = False
|
||||
TrSeccion.Visible = False
|
||||
DdlSeccionAlmacen.Items.Clear()
|
||||
|
||||
End If
|
||||
'activa lote
|
||||
If CBool(drp("AplicaLote")) Then
|
||||
@@ -453,11 +458,11 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
Dim Valido As Boolean = True
|
||||
Dim cantidadd As Double = txtCantidad.Text.ToDouble
|
||||
Dim Existencia As Double = GetExistencias(PSSelected, DdlUnidad.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, If(TxtnSerie.Visible, TxtnSerie.Text, "-1").ToString)
|
||||
If Existencia - txtCantidad.Text.ToDouble < 0 Then
|
||||
If Existencia - txtCantidad.Text.ToDouble - DtMovimientos.SUM("Cantidad", $"CvePS = {PSSelected} ") < 0 Then
|
||||
If Existencia <= 0 Then
|
||||
Alert("No hay existencia del producto", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
Alert(String.Format("Solo hay en existencia: {0}", Existencia), TipoMensaje.MsgAdvertencia)
|
||||
Alert(String.Format("Solo hay en existencia: {0}", Existencia - DtMovimientos.SUM("Cantidad", $"CvePS = {PSSelected} ")), TipoMensaje.MsgAdvertencia)
|
||||
If Not UsuarioActual.TienePermisoProceso(114) Then
|
||||
cantidadd = Existencia
|
||||
End If
|
||||
@@ -496,6 +501,22 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
DdlClasificacion.SelectedValue = "-1"
|
||||
txtCantidad.Text = ""
|
||||
TxtObservacionesdetalle.Text = ""
|
||||
|
||||
ThCaducidad.Visible = False
|
||||
TrCaducidad.Visible = False
|
||||
TxtCaducidad.Text = ""
|
||||
ThLote.Visible = False
|
||||
TrLote.Visible = False
|
||||
TxtLote.Text = ""
|
||||
ThSerie.Visible = False
|
||||
TrSerie.Visible = False
|
||||
TxtnSerie.Visible = False
|
||||
TxtnSerie.Text = ""
|
||||
|
||||
ThSeccion.Visible = False
|
||||
TrSeccion.Visible = False
|
||||
DdlSeccionAlmacen.Items.Clear()
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -382,8 +382,8 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
UpDatos.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "ModalPS"))
|
||||
End Sub
|
||||
Private Sub BtnAgregarPS_Click(sender As Object, e As EventArgs) Handles BtnAgregarPS.Click
|
||||
Dim Existencia As Boolean
|
||||
Private Sub BtnAgregarPS_Click(sender As Object, e As EventArgs) Handles BtnAgregarPS.Click
|
||||
|
||||
If Not DdlProductoServicio.SelectedValue.ToEntero > 0 Then
|
||||
Alert("Tiene que seleccionar un producto.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
@@ -419,8 +419,8 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
End Sub
|
||||
Private Function AddPSTemporal() As Boolean
|
||||
Dim Row As DataRow = TempDT.NewRow()
|
||||
Dim Lote As String
|
||||
Dim FechaCaducidad As Date
|
||||
Dim Lote As String = "-1"
|
||||
Dim FechaCaducidad As Date = MinFecha
|
||||
Row("Cantidad") = TxtCantidad.Text.Trim.ToDouble
|
||||
Row("CvePS") = DdlProductoServicio.SelectedValue.ToEntero
|
||||
Row("CodigoPS") = DdlProductoServicio.SelectedText
|
||||
@@ -465,7 +465,7 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
If Existencia = 0 Then
|
||||
Alert("No hay existencia del producto", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
Alert($"No hay existencia suficiente del producto. Solo hay en existencia: {Existencia}", TipoMensaje.MsgAdvertencia)
|
||||
Alert($"No hay existencia suficiente del producto. Solo hay en existencia: {Existencia - TempDT.SUM("Cantidad", $"CvePS = {DdlProductoServicio.SelectedValue.ToEntero} AND CveUM = {DdlUM.SelectedValue.ToEntero}")}", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
Return False
|
||||
End If
|
||||
@@ -580,8 +580,10 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
RowTemp("CveUM") = row.DataKey("CveUM").ToEntero
|
||||
RowTemp("UnidadMedida") = row.DataKey("UM")
|
||||
RowTemp("Observaciones") = ""
|
||||
'RowTemp("CveDireccionEnvio") = DdlDireccionEnvio.SelectedValue
|
||||
'RowTemp("DireccionEnvio") = IIf(DdlDireccionEnvio.SelectedValue = "-1", "", DdlDireccionEnvio.SelectedItem)
|
||||
RowTemp("Lote") = "-1"
|
||||
RowTemp("FechaCaducidad") = MinFecha
|
||||
'RowTemp("CveDireccionEnvio") = DdlDireccionEnvio.SelectedValue
|
||||
'RowTemp("DireccionEnvio") = IIf(DdlDireccionEnvio.SelectedValue = "-1", "", DdlDireccionEnvio.SelectedItem)
|
||||
RowTemp("CveContratoDetalle") = row.DataKey("CveContratoDetalle")
|
||||
CodigoPS = RowTemp("CodigoPS").ToString
|
||||
|
||||
@@ -1005,7 +1007,7 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
If Existencia = 0 Then
|
||||
Alert($"No hay existencia del producto: {CodigoPS}", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
Alert($"No hay existencia suficiente del producto: {CodigoPS}, Solo hay en existencia: {Existencia}", TipoMensaje.MsgAdvertencia)
|
||||
Alert($"No hay existencia suficiente del producto: {CodigoPS}, Solo hay en existencia: {Existencia - TempDT.SUM("Cantidad", $"CvePS = {RowTemp("CvePS").ToString.ToEntero} AND CveUM = {RowTemp("CveUM").ToString.ToEntero}")}", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End If
|
||||
TempDT.Rows.Add(RowTemp)
|
||||
|
||||
@@ -399,7 +399,7 @@
|
||||
<ajax:FilteredTextBoxExtender ID="ftbeCant" runat="server" TargetControlID="txtCantidad" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<asp:RequiredFieldValidator runat="server" ID="RFVCantidad" ControlToValidate="txtCantidad" ValidationGroup="GrpAgregar" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario por favor introdúzcalo." Display="Dynamic" Text="*"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOCantidad" runat="server" HighlightCssClass="vco" TargetControlID="RFVCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:RangeValidator ID="RVCantidad" runat="server" ControlToValidate="txtCantidad" Display="None" Type="Double" MinimumValue="0.1" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor introdúzcalo." ValidationGroup="GrpAgregar"></asp:RangeValidator>
|
||||
<asp:RangeValidator ID="RVCantidad" runat="server" ControlToValidate="txtCantidad" Display="None" Type="Double" MinimumValue="0.001" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor introdúzcalo." ValidationGroup="GrpAgregar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECantidad" runat="server" HighlightCssClass="vco" TargetControlID="RVCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Reference in New Issue
Block a user