kfet.kpsul -- Make the low-stock indicator appear…
…if ordered quantity is greater than the current stock. Also fix the focus after a reset of the selected account.
This commit is contained in:
parent
367b5899fc
commit
5aa2d3cbac
2 changed files with 3 additions and 4 deletions
|
@ -2070,7 +2070,7 @@ class PurchaseBasketFormatter extends ItemBasketFormatter {
|
||||||
|
|
||||||
static attr_low_stock(o) {
|
static attr_low_stock(o) {
|
||||||
let stock = o.article.stock;
|
let stock = o.article.stock;
|
||||||
return -5 <= stock && stock <= 5;
|
return (-5 <= stock) && (stock <= 5 || stock < o.article_nb);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -399,9 +399,8 @@ $(document).ready(function() {
|
||||||
case 113:
|
case 113:
|
||||||
if (e.shiftKey) {
|
if (e.shiftKey) {
|
||||||
// Shift+F2 - Account reset
|
// Shift+F2 - Account reset
|
||||||
kpsul.account_manager
|
kpsul.account_manager.reset();
|
||||||
.reset()
|
kpsul.account_manager.focus();
|
||||||
.focus();
|
|
||||||
} else {
|
} else {
|
||||||
// F2 - Basket reset
|
// F2 - Basket reset
|
||||||
kpsul.basket.reset();
|
kpsul.basket.reset();
|
||||||
|
|
Loading…
Reference in a new issue