Fix/minor mw fixes (#3521)
**What** - Fix stock locations quantities being shown as `undefined` and `NaN` - Throw if updates to location levels are made with negative quantities through the api - Show "allocated" in order summary for partially fulfilled orders Fixes CORE-1268, CORE-1267, CORE-1265
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Request, Response } from "express"
|
||||
import { IsNumber, IsOptional } from "class-validator"
|
||||
import { IsNumber, IsOptional, Min } from "class-validator"
|
||||
|
||||
import { IInventoryService } from "../../../../interfaces"
|
||||
import { FindParams } from "../../../../types/common"
|
||||
@@ -105,10 +105,12 @@ export default async (req: Request, res: Response) => {
|
||||
export class AdminPostInventoryItemsItemLocationLevelsLevelReq {
|
||||
@IsOptional()
|
||||
@IsNumber()
|
||||
@Min(0)
|
||||
incoming_quantity?: number
|
||||
|
||||
@IsOptional()
|
||||
@IsNumber()
|
||||
@Min(0)
|
||||
stocked_quantity?: number
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user