Hide articles with empty stock

This commit is contained in:
keplyx 2019-09-28 10:40:10 +02:00
parent 182ba7d9da
commit 4cefcccdce

View file

@ -63,7 +63,7 @@ export default class ProximoMainScreen extends FetchedDataSectionList {
data: [] data: []
}); });
for (let k = 0; k < articles.length; k++) { for (let k = 0; k < articles.length; k++) {
if (articles[k]['type'].includes(types[i].id)) { if (articles[k]['type'].includes(types[i].id) && parseInt(articles[k]['quantity']) > 0) {
finalData[i].data.push(articles[k]); finalData[i].data.push(articles[k]);
} }
} }