[FIX] l10n_fr_fec: unaffected earning sign and separator in FEC
The separator in the debit/credit columns of the report must contains coma instead of dots for decimal separator (fr). All the other columns (cf SQL query) contains coma but not this one. Inverse the currency sign of the credit column. Otherwise the credit is negative and sum of the balance is wrong (sum credit != debit) Closes #15550
This commit is contained in:
@@ -184,11 +184,11 @@ class AccountFrFec(models.TransientModel):
|
||||
unaffected_earnings_amount = float(unaffected_earnings_results[11].replace(',', '.')) - float(unaffected_earnings_results[12].replace(',', '.'))
|
||||
listrow_amount = current_amount + unaffected_earnings_amount
|
||||
if listrow_amount > 0:
|
||||
listrow[11] = str(listrow_amount)
|
||||
listrow[12] = '0.00'
|
||||
listrow[11] = str(listrow_amount).replace('.', ',')
|
||||
listrow[12] = '0,00'
|
||||
else:
|
||||
listrow[11] = '0.00'
|
||||
listrow[12] = str(listrow_amount)
|
||||
listrow[11] = '0,00'
|
||||
listrow[12] = str(-listrow_amount).replace('.', ',')
|
||||
w.writerow([s.encode("utf-8") for s in listrow])
|
||||
#if the unaffected earnings account wasn't in the selection yet: add it manually
|
||||
if not unaffected_earnings_line and unaffected_earnings_results and unaffected_earnings_results[11] != '0,00' and unaffected_earnings_results[12] != '0,00':
|
||||
|
||||
Reference in New Issue
Block a user