Fix quantity field blank when adding item not previously purchased
This commit is contained in:
parent
6d932b2c84
commit
c28f67b4ae
@ -32,7 +32,7 @@ export default class TransactionItemFormController extends Controller {
|
|||||||
this.priceTarget.value = option.getAttribute("data-price");
|
this.priceTarget.value = option.getAttribute("data-price");
|
||||||
}
|
}
|
||||||
if (!this.quantityTarget.value || this.quantityTarget.value === "1") {
|
if (!this.quantityTarget.value || this.quantityTarget.value === "1") {
|
||||||
this.quantityTarget.value = option.getAttribute("data-quantity");
|
this.quantityTarget.value = option.getAttribute("data-quantity") || "1";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user