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

Be as precise as invoice's currency.

(cherry picked from commit fc0e4e182275a2adb5cbcbe548262ccc94d53cac)

Conflicts:

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