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 @@ ...@@ -50,7 +50,9 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <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 request = context.REQUEST\n
\n \n
# display only title line instead of description\n # display only title line instead of description\n
...@@ -235,7 +237,7 @@ for line in getSubLineList(context):\n ...@@ -235,7 +237,7 @@ for line in getSubLineList(context):\n
\'base_contribution\':line.getBaseContribution() or None,\n \'base_contribution\':line.getBaseContribution() or None,\n
\'use_type\':line.getResourceValue().getUse() or \'\',\n \'use_type\':line.getResourceValue().getUse() or \'\',\n
\'use_type_tax\':is_tax,\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_name\':tax_name or \'\',\n
\'tax_number\':tax_number or \'\',\n \'tax_number\':tax_number or \'\',\n
\'quantity_unit\': line.getQuantityUnitTranslatedTitle() or (\n \'quantity_unit\': line.getQuantityUnitTranslatedTitle() or (\n
...@@ -482,10 +484,15 @@ data_dict = {\n ...@@ -482,10 +484,15 @@ data_dict = {\n
\'line_tax\':line_tax,\n \'line_tax\':line_tax,\n
\'line_not_tax\':line_not_tax,\n \'line_not_tax\':line_not_tax,\n
\'line_list\': line_list,\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
\n \n
return unicodeDict(data_dict)\n return unicodeDict(data_dict)\n
</string> </value>
]]></string> </value>
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <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