mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-11 07:24:15 +00:00
* Change backend validation
- Allow stock adjustments with zero quantity
* Frontend changes
(cherry picked from commit ae7f4e33d5
)
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
This commit is contained in:
committed by
GitHub
parent
40245a6c4a
commit
cab7a06146
@ -661,7 +661,6 @@ export default function StockDetail() {
|
||||
const stockActions = useMemo(() => {
|
||||
const inStock =
|
||||
user.hasChangeRole(UserRoles.stock) &&
|
||||
stockitem.quantity > 0 &&
|
||||
!stockitem.sales_order &&
|
||||
!stockitem.belongs_to &&
|
||||
!stockitem.customer &&
|
||||
@ -717,7 +716,7 @@ export default function StockDetail() {
|
||||
{
|
||||
name: t`Remove`,
|
||||
tooltip: t`Remove Stock`,
|
||||
hidden: serialized || !inStock,
|
||||
hidden: serialized || !inStock || stockitem.quantity <= 0,
|
||||
icon: <InvenTreeIcon icon='remove' iconProps={{ color: 'red' }} />,
|
||||
onClick: () => {
|
||||
stockitem.pk && removeStockItem.open();
|
||||
|
Reference in New Issue
Block a user