This commit is contained in:
2024-12-27 15:45:41 -07:00
3 changed files with 18 additions and 3 deletions

View File

@@ -4527,21 +4527,33 @@ Partial Class Compras_Compras
End If
ValidaFechaDeAlamacen()
Else
'GvInv.Rows(x).FCDropDownList("ddlEAlmacen").SelectedValue.ToEntero 'Charlie
Dim x As Integer = 0
For Each Dr As GridViewRow In GvInv.Rows
If Dr.FCCheckBox("cbInv").Checked Then
If Not Dr.FCDropDownList("ddlEAlmacen").SelectedValue.ToEntero > 0 Then
Alert("Favor de seleccionar almacen en la pestaña de almacén.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
x = x + 1
End If
Next
If Not (CveCompraRefacturacion > 0 AndAlso ChkRefacturacionConAlmacen.Checked) Then
If x = 0 AndAlso GvInv.Rows.Count > 0 Then
Alert("Favor de seleccionar un producto en la pestaña de almacen", TipoMensaje.MsgAdvertencia)
Alert("Favor de seleccionar un producto en la pestaña de almacén", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
End If
End If
End If
If UsuarioActual.Empresa.Funcionalidad(538) = "1" Then
If TmpDT.MIN("CvePS").ToEntero <= 0 Then
Alert("Todos los Productos/Servicios deben estar registrados o aliados a un productos ya registrado.", TipoMensaje.MsgAdvertencia)

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