Commit 40fdd2da authored by Łukasz Nowak's avatar Łukasz Nowak

Be as precise as invoice's currency.

(cherry picked from commit fc0e4e18)

Conflicts:

	master/bt5/vifib_base/bt/revision
parent 892a815a
...@@ -55,6 +55,8 @@ amount_list = specialise.getAggregatedAmountList(context)\n ...@@ -55,6 +55,8 @@ amount_list = specialise.getAggregatedAmountList(context)\n
if len(amount_list) != 1:\n if len(amount_list) != 1:\n
return False\n return False\n
\n \n
precision = context.getPriceCurrencyValue().getQuantityPrecision()\n
\n
amount = amount_list[0]\n amount = amount_list[0]\n
\n \n
total_price = amount.getTotalPrice()\n total_price = amount.getTotalPrice()\n
...@@ -64,7 +66,7 @@ for line in context.getMovementList(context.getPortalInvoiceMovementTypeList()): ...@@ -64,7 +66,7 @@ for line in context.getMovementList(context.getPortalInvoiceMovementTypeList()):
if line.getUse() == \'trade/tax\':\n if line.getUse() == \'trade/tax\':\n
invoice_tax += line.getTotalPrice()\n invoice_tax += line.getTotalPrice()\n
\n \n
return total_price == invoice_tax\n return round(total_price, precision) == round(invoice_tax, precision)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
428 430
\ No newline at end of file \ No newline at end of file
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