Commit 21dc3020 authored by Vincent Pelletier's avatar Vincent Pelletier

Use getQuantity instead of getTotalPrice.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5073 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent bb46ce34
......@@ -93,8 +93,8 @@ if len(accounting_movement_list) :\n
#if vat_infos[\'ratio\'] != 0 :\n
# assert 1 # TODO\n
vat_infos.setdefault(\'title\', account.getTitle())\n
vat_infos.setdefault(\'ratio\', movement.getTotalPrice() / (float(invoice.getTotalPrice()) or 1)) # XXX this calls catalog => bad & this does not suport multiple VAT lines either\n
vat_infos.update( { \'total\': vat_infos[\'total\'] + movement.getTotalPrice() } )\n
vat_infos.setdefault(\'ratio\', movement.getQuantity() / (float(invoice.getTotalPrice(portal_type = [\'Invoice Line\', \'Sale Invoice Line\'])) or 1)) # XXX this calls catalog => bad & this does not suport multiple VAT lines either\n
vat_infos.update( { \'total\': vat_infos[\'total\'] + movement.getQuantity() } )\n
\n
# 2) no accounting lines => we must look in the simulation\n
if not vat_infos.has_key(\'title\') :\n
......
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