[UI] Indicate over-allocation (#11247)

- Display red text when stock item is over-allocated
This commit is contained in:
Oliver 2026-02-03 15:39:44 +11:00 committed by GitHub
parent 05b8c812f5
commit a5b6e4eda3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 1 deletions

View File

@ -157,7 +157,15 @@ function stockItemTableColumns({
if (record.in_stock) {
if (allocated > 0) {
if (allocated >= quantity) {
if (allocated > quantity) {
color = 'red';
extra.push(
<Text
key='over-allocated'
size='sm'
>{t`This stock item is over-allocated`}</Text>
);
} else if (allocated == quantity) {
color = 'orange';
extra.push(
<Text