Commit f1a71e2a authored by Jérome Perrin's avatar Jérome Perrin

Don't create line if no quantity and no total_price

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16515 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b11840d6
......@@ -142,6 +142,9 @@ for inventory in getInventoryList(\n
total_price = roundCurrency(inventory.total_price or 0, section_currency)\n
quantity = roundCurrency(inventory.total_quantity or 0,\n
inventory.resource_relative_url)\n
\n
if not total_price and not quantity:\n
continue\n
\n
if inventory.resource_uid != section_currency_uid:\n
if inventory.node_relative_url == profit_and_loss_account:\n
......@@ -179,6 +182,9 @@ for inventory in getInventoryList(\n
total_price = roundCurrency(inventory.total_price or 0, section_currency)\n
quantity = roundCurrency(inventory.total_quantity or 0,\n
inventory.resource_relative_url)\n
\n
if not total_price and not quantity:\n
continue\n
profit_and_loss_quantity += total_price\n
\n
if inventory.resource_uid != section_currency_uid:\n
......@@ -210,6 +216,9 @@ for inventory in getInventoryList(\n
total_price = roundCurrency(inventory.total_price or 0, section_currency)\n
quantity = roundCurrency(inventory.total_quantity or 0,\n
inventory.resource_relative_url)\n
\n
if not total_price and not quantity:\n
continue\n
profit_and_loss_quantity += total_price\n
\n
if inventory.resource_uid != section_currency_uid:\n
......
414
\ No newline at end of file
415
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment