Commit d90f7c8f authored by Nicolas Wavrant's avatar Nicolas Wavrant

erp5_payroll_l10n_fr: individual contribution for retirement's base is 0.

Only quantity should be set
parent 9a6fe459
......@@ -106,17 +106,18 @@ def makeTaxableBaseComponentBlock(movement, category):
def makeIndividualContributionBlock(movement, category):
base = quantity = 0.0
if category in ('018', '063', '064'):
if category in ('063', '064'):
quantity = (getattr(movement, 'employer_total_price', 0) + getattr(movement, 'employee_total_price', 0)) * -1
# If "reduction generale but CTP is 801P then it should be positive, as we have to give money back
if category == '018' and 'base_amount/payroll/l10n/fr/ctp/801P' not in movement.getBaseContributionList():
assert quantity <= 0., "Quantity in %s should be negative" % movement.absolute_url()
elif category == '018':
assert quantity >= 0., "Quantity in %s should be positive" % movement.absolute_url()
base = movement.base
quantity = (getattr(movement, 'employer_total_price', 0) + getattr(movement, 'employee_total_price', 0)) * -1
if 'base_amount/payroll/l10n/fr/ctp/801P' not in movement.getBaseContributionList():
assert quantity <= 0., "Quantity in %s should be negative" % movement.absolute_url()
else:
assert quantity >= 0., "Quantity in %s should be positive" % movement.absolute_url()
elif category in ('059',):
quantity = (getattr(movement, 'employer_total_price', 0) + getattr(movement, 'employee_total_price', 0)) * -1
base = 0.
else:
base = movement.base
return {
......
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