Commit da096bd7 authored by Arnaud Fontaine's avatar Arnaud Fontaine

erp5_accounting: Rounding debit/credit only makes sense if there is SIT Line.

parent 283fcf52
...@@ -78,6 +78,13 @@ for line in line_list:\n ...@@ -78,6 +78,13 @@ for line in line_list:\n
line.setQuantity(line_quantity)\n line.setQuantity(line_quantity)\n
total_quantity += line_quantity\n total_quantity += line_quantity\n
\n \n
# If no "line" found (eg no SIT line), then do nothing. This is in the case where a SIT\n
# has only Invoice Line and no SIT Line. Otherwise account_type_dict will be empty =>\n
# asset_line = None => the assert below will fail because getTotalPrice() will returns the\n
# price of all Invoice Lines...\n
if not line_list:\n
return\n
\n
abs_total_quantity = abs(round(total_quantity, precision))\n abs_total_quantity = abs(round(total_quantity, precision))\n
# The total quantity should be zero with a little error, if simulation has been\n # The total quantity should be zero with a little error, if simulation has been\n
# completely applied, because the debit and the credit must be balanced. However,\n # completely applied, because the debit and the credit must be balanced. However,\n
......
2015-06-12 arnaud.fontaine
* Rounding debit/credit only makes sense if there is SIT Line.
2014-08-21 Gabriel Monnerat 2014-08-21 Gabriel Monnerat
* Improve Delivery_localBuild to call invoice_builder_alarm only if exist, because in some projects this alarm does not exist * Improve Delivery_localBuild to call invoice_builder_alarm only if exist, because in some projects this alarm does not exist
......
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