fixes in gross profit report

This commit is contained in:
Anand Doshi
2013-03-28 16:40:30 +05:30
parent 0c541a0fe2
commit 8c45420f19
3 changed files with 6 additions and 6 deletions

View File

@@ -25,12 +25,12 @@ def execute(filters=None):
item_sales_bom.get(row.parenttype, {}).get(row.name, webnotes._dict()))
buying_amount = buying_amount > 0 and buying_amount or 0
gross_profit = selling_amount - buying_amount
if selling_amount:
gross_profit = selling_amount - buying_amount
gross_profit_percent = (gross_profit / selling_amount) * 100.0
else:
gross_profit = gross_profit_percent = 0.0
gross_profit_percent = 0.0
icon = """<a href="%s"><i class="icon icon-share" style="cursor: pointer;"></i></a>""" \
% ("/".join(["#Form", row.parenttype, row.name]),)