Commit 9f3aa648 authored by Vincent Pelletier's avatar Vincent Pelletier

Do convert the currency.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13943 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent fe76270f
...@@ -122,7 +122,7 @@ elif (in_price != 0 and in_price != price) or (out_price != 0 and out_price != p ...@@ -122,7 +122,7 @@ elif (in_price != 0 and in_price != price) or (out_price != 0 and out_price != p
# Now we will validate the accounting position\n # Now we will validate the accounting position\n
transaction = state_change[\'object\']\n transaction = state_change[\'object\']\n
bank_account = transaction.getDestinationPaymentValue()\n bank_account = transaction.getDestinationPaymentValue()\n
price = transaction.getSourceTotalAssetPrice()\n price = transaction.ERP5Banking_getExchangeValue()\n
line = transaction.get(\'movement\')\n line = transaction.get(\'movement\')\n
\n \n
in_list = transaction.objectValues(portal_type=\'Incoming Account Incident Line\')\n in_list = transaction.objectValues(portal_type=\'Incoming Account Incident Line\')\n
...@@ -130,11 +130,9 @@ out_list = transaction.objectValues(portal_type=\'Outgoing Account Incident Line ...@@ -130,11 +130,9 @@ out_list = transaction.objectValues(portal_type=\'Outgoing Account Incident Line
\n \n
debit=0\n debit=0\n
if (len(in_list)!= 0): \n if (len(in_list)!= 0): \n
# This is a single currency operation, so it is not necessary to convert the price.\n
line.setSourceCredit(price)\n line.setSourceCredit(price)\n
\n \n
elif (len(out_list) != 0) :\n elif (len(out_list) != 0) :\n
# This is a single currency operation, so it is not necessary to convert the price.\n
debit=1\n debit=1\n
line.setSourceDebit(price)\n line.setSourceDebit(price)\n
\n \n
......
252 255
\ 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