Commit 5021d1c1 authored by Nicolas Wavrant's avatar Nicolas Wavrant Committed by Eteri

erp5_payroll_l10n_fr: sometimes CTP amount is negative

In the case the CTP is for a refund
parent 17e6d95d
...@@ -202,7 +202,10 @@ if block_id == 'S21.G00.23': ...@@ -202,7 +202,10 @@ if block_id == 'S21.G00.23':
rubric_value_dict['S21.G00.23.002'] = target['cap'] rubric_value_dict['S21.G00.23.002'] = target['cap']
rubric_value_dict['S21.G00.23.003'] = ('' if not target['rate'] else formatFloat(target['rate'])) rubric_value_dict['S21.G00.23.003'] = ('' if not target['rate'] else formatFloat(target['rate']))
if target['quantity']: if target['quantity']:
if target['code'][:3] != '801':
assert target['quantity'] > 0 assert target['quantity'] > 0
else:
assert target['quantity'] < 0
rubric_value_dict['S21.G00.23.005'] = formatFloat(round(target['quantity'])) rubric_value_dict['S21.G00.23.005'] = formatFloat(round(target['quantity']))
else: else:
rubric_value_dict['S21.G00.23.004'] = formatFloat(round(target['base'])) rubric_value_dict['S21.G00.23.004'] = formatFloat(round(target['base']))
......
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