-- que permita registrar cantidades con decimales.
This commit is contained in:
@@ -213,7 +213,7 @@
|
||||
<asp:TextBox ID="TxtCantidad" CssClass="form-control marginFixRow" runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
|
||||
<label for="<%= TxtCantidad.ClientID.ToString()%>">Cantidad:</label>
|
||||
<asp:RequiredFieldValidator ID="RFVCantidad" runat="server" ControlToValidate="TxtCantidad" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor ingréselo." ValidationGroup="AgregarPS"></asp:RequiredFieldValidator>
|
||||
<ajax:FilteredTextBoxExtender ID="SoloNumerosPS" runat="server" TargetControlID="TxtCantidad" FilterType="Numbers" />
|
||||
<ajax:FilteredTextBoxExtender ID="SoloNumerosPS" runat="server" TargetControlID="TxtCantidad" FilterType="Custom, Numbers" ValidChars="." />
|
||||
</div>
|
||||
|
||||
<div class="col-md-8 form-group form-md-line-input input-iconright" id="DivCaracteristicaOpcion" runat="server">
|
||||
|
||||
@@ -334,14 +334,10 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
MensajeExistencia.Append("No hay la existencia suficiente de los siguientes productos:<br/>")
|
||||
Dim CodigoPS As String = ""
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
For Each row As GridViewRow In GvDatos.Rows
|
||||
CodigoPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=row.DataKey("CvePS").ToEntero).FiltroPrimeroValor("PSCodigo", "")
|
||||
Existencia = ObjInventarios.GetExistenciasPS(row.DataKey("CvePS").ToEntero, row.DataKey("CveUM").ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=NowADS.ToString("yyyy/MM/dd 23:59"), Lote:=row.DataKey("Lote").ToString, FechaCaducidad:=row.DataKey("FechaCaducidad").ToString.ToDate)
|
||||
If Existencia - TempDT.SUM("Cantidad", $"CvePS = {row.DataKey("CvePS").ToEntero} AND CveUM = {row.DataKey("CveUM").ToEntero}") < 0 Then
|
||||
CodigoPS = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=row.DataKey("CvePS").ToEntero).FiltroPrimeroValor("PSCodigo", "")
|
||||
MensajeExistencia.AppendFormat("<br/> - <b>{0}.</b> Existencia: {1}", CodigoPS, Existencia)
|
||||
TieneErrorExistencia = True
|
||||
End If
|
||||
@@ -381,14 +377,7 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
For Each Row As GridViewRow In GvDatos.Rows
|
||||
'Dim CveUM As Integer = Row.DataKey("CveUM").ToEntero
|
||||
Dim CvePS As Integer = Row.DataKey("CvePS").ToEntero
|
||||
Dim Cantidad As Integer = Row.DataKey("Cantidad").ToEntero
|
||||
'Dim Precio As Decimal = Row.DataKey("Precio").ToDecimal
|
||||
'Dim Observaciones As String = Row.DataKey("Observaciones")
|
||||
'Dim CveContratoDetalle As Integer = Row.DataKey("CveContratoDetalle").ToEntero
|
||||
'Dim Serie As String = Row.DataKey("Serie")
|
||||
'Dim Lote As String = Row.DataKey("Lote")
|
||||
'Dim FechaCaducidad As Date = Row.DataKey("FechaCaducidad").ToDate
|
||||
|
||||
Dim Cantidad As Decimal = Row.DataKey("Cantidad").ToDecimal
|
||||
If Not ObjInventarios.AddTrasladoSolicitudDetalle(CveTraspasoSolicitud, Cantidad, -1, CvePS, 0, "", -1, "-1", "-1", MinFecha) Then
|
||||
TieneError = True
|
||||
Exit For
|
||||
@@ -396,7 +385,6 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
Next
|
||||
End If
|
||||
|
||||
|
||||
If TieneError = False Then
|
||||
ObjInventarios.Commit()
|
||||
Alert($"La Solicitud de Traspaso se guardó correctamente con folio #: <b>{Folio}</b>.", TipoMensaje.MsgInformacion)
|
||||
|
||||
Reference in New Issue
Block a user