forked from DGNum/gestioCOF
Add variable for article line
This commit is contained in:
parent
92fd94d1f9
commit
9c9ad21d73
1 changed files with 5 additions and 6 deletions
|
@ -1340,15 +1340,14 @@ $(document).ready(function() {
|
|||
}
|
||||
}
|
||||
for (var i=0; i<data['articles'].length; i++) {
|
||||
article = data['articles'][i];
|
||||
var article = data['articles'][i];
|
||||
var article_line = articles_container.find('#data-article-'+article.id);
|
||||
if (article.stock <= 5 && article.stock >= -5) {
|
||||
articles_container.find('#data-article-'+article['id'])
|
||||
.addClass('low-stock');
|
||||
article_line.addClass('low-stock');
|
||||
} else {
|
||||
articles_container.find('#data-article-'+article['id'])
|
||||
.removeClass('low-stock');
|
||||
article_line.removeClass('low-stock');
|
||||
}
|
||||
articles_container.find('#data-article-'+article['id']+' .stock')
|
||||
article_line.find('.stock')
|
||||
.text(article['stock']);
|
||||
|
||||
var i = 0;
|
||||
|
|
Loading…
Reference in a new issue