Skip to content

Commit

Permalink
fix(stock exit): set quantity_available
Browse files Browse the repository at this point in the history
This commit fixes an issue with setting the quantity available when the
lot is switched
  • Loading branch information
jniles committed Mar 4, 2022
1 parent b918ab1 commit 7ffc786
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 4 additions & 0 deletions client/src/modules/stock/LotItem.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,10 @@ function LotItemService(uuid, $translate) {
this._quantity_available = clone.quantity;
}

if (clone._quantity_available !== undefined) {
this._quantity_available = clone._quantity_available;
}

// parse the date if it is not already a date
if (!(this.expiration_date instanceof Date) && this.expiration_date !== undefined) {
this.expiration_date = new Date(this.expiration_date);
Expand Down
4 changes: 1 addition & 3 deletions client/src/modules/stock/exit/exit.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@
<!-- note -->
<div class="form-group"
ng-class="{ 'has-error' : StockExitForm.$submitted && StockExitForm.description.$invalid }">
<label class="control-label">
<span translate>FORM.LABELS.DESCRIPTION</span>
</label>
<label class="control-label" translate> FORM.LABELS.DESCRIPTION </label>
<textarea
class="form-control"
name="description"
Expand Down

0 comments on commit 7ffc786

Please sign in to comment.