Traspaso permitir enviar mas de lo que se solicito, traspaso permitir con un articulo, compras requerir alamacen cuando eta chequeado el row

This commit is contained in:
rakcsle
2024-12-27 15:43:42 -07:00
parent 6ce6828748
commit 59ac81f770
3 changed files with 18 additions and 3 deletions

View File

@@ -359,7 +359,7 @@
$chk.prop('checked', true);
} else if (valorTxt > cantidad) {
$chk.prop('checked', true);
$txt.val(cantidad);
//$txt.val(cantidad);
}
}
}

View File

@@ -270,7 +270,7 @@ Partial Class Inventarios_TrasladoSolicitud
'CodigoPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=Row.DataKey("CvePS").ToEntero).FiltroPrimeroValor("PSCodigo", "")
Existencia = ObjInventarios.GetExistenciasPS(DdlProductoServicio.SelectedValue.ToEntero, CveUnidadMedida, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=NowADS.ToString("yyyy/MM/dd 23:59"))
If Existencia - (TempDT.SUM("Cantidad", $"CvePS = {DdlProductoServicio.SelectedValue.ToEntero} AND CveUM = {CveUnidadMedida}") + TxtCantidad.Text.Trim.ToDecimal) <= 0 Then
If Existencia - (TempDT.SUM("Cantidad", $"CvePS = {DdlProductoServicio.SelectedValue.ToEntero} AND CveUM = {CveUnidadMedida}") + TxtCantidad.Text.Trim.ToDecimal) < 0 Then
MensajeExistencia.AppendFormat("<br/> - <b>{0}.</b> Existencia: {1}", DdlProductoServicio.SelectedText, Existencia)
TieneErrorExistencia = True
End If
@@ -752,9 +752,12 @@ Partial Class Inventarios_TrasladoSolicitud
Protected Sub GvSolicitudes_RowDataBound(sender As Object, e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then
Dim Cantidad As Decimal = e.Row.DataKey("Cantidad").ToDecimal
e.Row.FCCheckBox("chk").Attributes.Add("onclick", $"validaCantidadSolicitud({Cantidad},'{e.Row.FCTextBox("TxtCantidad").ClientID}','{e.Row.FCCheckBox("Chk").ClientID}',1);")
e.Row.FCTextBox("TxtCantidad").Attributes.Add("onkeyup", $"validaCantidadSolicitud({Cantidad},'{e.Row.FCTextBox("TxtCantidad").ClientID}','{e.Row.FCCheckBox("Chk").ClientID}',2);")
End If
End Sub