Commit e4b0c44d authored by Jérome Perrin's avatar Jérome Perrin

indent with spaces instead of tabs


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25062 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c17be65d
...@@ -206,11 +206,11 @@ class InvoiceTransactionRule(Rule, PredicateMatrix): ...@@ -206,11 +206,11 @@ class InvoiceTransactionRule(Rule, PredicateMatrix):
dest_currency_url = None dest_currency_url = None
if dest_currency_url is not None and currency_url != dest_currency_url: if dest_currency_url is not None and currency_url != dest_currency_url:
precision = dest_section.getPriceCurrencyValue().getQuantityPrecision() precision = dest_section.getPriceCurrencyValue().getQuantityPrecision()
dest_exchange_ratio = currency.getPrice(context=new_mvmt.asContext( dest_exchange_ratio = currency.getPrice(context=new_mvmt.asContext(
categories=['price_currency/%s' % dest_currency_url, categories=['price_currency/%s' % dest_currency_url,
'resource/%s' % currency_url], 'resource/%s' % currency_url],
start_date=new_mvmt.getStartDate())) start_date=new_mvmt.getStartDate()))
if dest_exchange_ratio is not None: if dest_exchange_ratio is not None:
new_mvmt.edit(destination_total_asset_price=round( new_mvmt.edit(destination_total_asset_price=round(
(dest_exchange_ratio* (dest_exchange_ratio*
applied_rule.getParentValue().getTotalPrice()),precision)) applied_rule.getParentValue().getTotalPrice()),precision))
...@@ -222,7 +222,7 @@ class InvoiceTransactionRule(Rule, PredicateMatrix): ...@@ -222,7 +222,7 @@ class InvoiceTransactionRule(Rule, PredicateMatrix):
source_currency_url = None source_currency_url = None
if source_currency_url is not None and currency_url != source_currency_url: if source_currency_url is not None and currency_url != source_currency_url:
precision = source_section.getPriceCurrencyValue().getQuantityPrecision() precision = source_section.getPriceCurrencyValue().getQuantityPrecision()
source_exchange_ratio = currency.getPrice(context=new_mvmt.asContext( source_exchange_ratio = currency.getPrice(context=new_mvmt.asContext(
categories=['price_currency/%s' % source_currency_url, categories=['price_currency/%s' % source_currency_url,
'resource/%s' % currency_url], 'resource/%s' % currency_url],
start_date=new_mvmt.getStartDate())) start_date=new_mvmt.getStartDate()))
...@@ -230,7 +230,7 @@ class InvoiceTransactionRule(Rule, PredicateMatrix): ...@@ -230,7 +230,7 @@ class InvoiceTransactionRule(Rule, PredicateMatrix):
new_mvmt.setSourceTotalAssetPrice(round( new_mvmt.setSourceTotalAssetPrice(round(
(source_exchange_ratio*applied_rule.getParentValue().getTotalPrice()), (source_exchange_ratio*applied_rule.getParentValue().getTotalPrice()),
precision)) precision))
# Pass to base class # Pass to base class
Rule.expand(self, applied_rule, force=force, **kw) Rule.expand(self, applied_rule, force=force, **kw)
......
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