Commit 868f058b authored by Jérome Perrin's avatar Jérome Perrin

base: use resource quantity precision to display movement quantities

on the various trade printouts
parent 7e877013
......@@ -50,7 +50,9 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>translateString = context.Base_translateString\n
<value> <string encoding="cdata"><![CDATA[
translateString = context.Base_translateString\n
request = context.REQUEST\n
\n
# display only title line instead of description\n
......@@ -235,7 +237,7 @@ for line in getSubLineList(context):\n
\'base_contribution\':line.getBaseContribution() or None,\n
\'use_type\':line.getResourceValue().getUse() or \'\',\n
\'use_type_tax\':is_tax,\n
\'total_quantity\': line.getTotalQuantity() or \'\',\n
\'total_quantity\': (\'%%.%df\' % line.getQuantityPrecisionFromResource(line.getResource())) % line.getTotalQuantity(),\n
\'tax_name\':tax_name or \'\',\n
\'tax_number\':tax_number or \'\',\n
\'quantity_unit\': line.getQuantityUnitTranslatedTitle() or (\n
......@@ -482,10 +484,15 @@ data_dict = {\n
\'line_tax\':line_tax,\n
\'line_not_tax\':line_not_tax,\n
\'line_list\': line_list,\n
\'quantity_unit_detail_list\': [\n
{\'title\': v[\'title\'], \'total_quantity\': v[\'total_quantity\']} for k, v in quantity_unit_detail_dict.items()\n
],\n
}\n
\n
return unicodeDict(data_dict)\n
</string> </value>
]]></string> </value>
</item>
<item>
<key> <string>_params</string> </key>
......
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