Skip to content

Commit

Permalink
OAM-229: fixed stock movement validation
Browse files Browse the repository at this point in the history
  • Loading branch information
DominikNoga committed Jun 24, 2024
1 parent 3c8bbe6 commit 0099cf5
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,9 @@
lineItem.totalPrice = 0;
// AO-804: Ends here
var validatedQuantity = vm.getLineItemTotalQuantity(lineItem);
if (validatedQuantity > lineItem.$previewSOH && ((lineItem.reason
&& lineItem.reason.reasonType === REASON_TYPES.DEBIT) || !lineItem.reason)) {
if (adjustmentType.state === ADJUSTMENT_TYPE.ISSUE.state &&
validatedQuantity > lineItem.$previewSOH && ((lineItem.reason &&
lineItem.reason.reasonType === REASON_TYPES.DEBIT) || !lineItem.reason)) {
lineItem.$errors.quantityInvalid = messageService
.get('stockAdjustmentCreation.quantityGreaterThanStockOnHand');
} else if (validatedQuantity > MAX_INTEGER_VALUE) {
Expand Down

0 comments on commit 0099cf5

Please sign in to comment.