Исправлена ошибка в Производственной таблице

This commit is contained in:
Anastasia
2015-07-10 10:17:27 +05:00
parent 057aea69e5
commit 37b0fe30d0

View File

@@ -246,7 +246,7 @@ def production_table(request, order_id):
table.verbose_name2 = u'Стоимость: %s' % str(curr_order.price)
costs_sum = order_costs.aggregate(Sum('value'))
table.set_summary(costs_sum['value__sum'] or 0)
table.set_balance(curr_order.price - costs_sum['value__sum'] or 0)
table.set_balance(curr_order.price - (costs_sum['value__sum'] or 0))
RequestConfig(request).configure(table)
return render(request, 'asuzr/table.html', {'table': table, 'title': title})