Commit fd770219 authored by Nicolas Wavrant's avatar Nicolas Wavrant

erp5_payroll_l10n_fr: sometimes CTP amount is negative

In the case the CTP is for a refund
parent 4e48f904
......@@ -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.003'] = ('' if not target['rate'] else formatFloat(target['rate']))
if target['quantity']:
assert target['quantity'] > 0
if target['code'][:3] != '801':
assert target['quantity'] > 0
else:
assert target['quantity'] < 0
rubric_value_dict['S21.G00.23.005'] = formatFloat(round(target['quantity']))
else:
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