Skip to content
Snippets Groups Projects
Commit 7e61b120 authored by meskio's avatar meskio :tent:
Browse files

Count the actual ordered products, don't skip the first

parent 763a52d9
Branches please_mypy
No related tags found
No related merge requests found
......@@ -29,7 +29,7 @@ function ShowOrderResults(props) {
const transactions = props.order.transactions.map((t) => {
const list = t.order_purchase.map((purchase) => {
const i = products.findIndex((p) => p.code === purchase.product_code);
if (!i) {
if (i === -1) {
return null;
}
products[i].amount += purchase.amount;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment