Commit cd007e38 authored by Nicolas Wavrant's avatar Nicolas Wavrant

erp5_payroll_l10n_fr: follow change for retrieving payroll records

parent 3b695570
...@@ -26,6 +26,8 @@ all_other_income_set = set(portal_categories.getCategoryValue('base_amount/payro ...@@ -26,6 +26,8 @@ all_other_income_set = set(portal_categories.getCategoryValue('base_amount/payro
all_other_bonus_set = set(portal_categories.getCategoryValue('base_amount/payroll/l10n/fr/other_bonus').objectValues(portal_type='Category')) all_other_bonus_set = set(portal_categories.getCategoryValue('base_amount/payroll/l10n/fr/other_bonus').objectValues(portal_type='Category'))
trainee_base_contribution = portal_categories.getCategoryValue('base_amount/payroll/l10n/fr/base/gratification_stage') trainee_base_contribution = portal_categories.getCategoryValue('base_amount/payroll/l10n/fr/base/gratification_stage')
enrollment_record = context.getSourceSectionValue().Person_getCareerRecord('DSN Enrollment Record')
def formatDate(datetime): def formatDate(datetime):
return "%02d%02d%04d" % (datetime.day(), datetime.month(), datetime.year()) return "%02d%02d%04d" % (datetime.day(), datetime.month(), datetime.year())
...@@ -90,7 +92,6 @@ def makeTaxableBaseComponentBlock(movement, category): ...@@ -90,7 +92,6 @@ def makeTaxableBaseComponentBlock(movement, category):
if isFullMonthPaysheet(context): if isFullMonthPaysheet(context):
base = minimum_salary base = minimum_salary
else: else:
enrollment_record = context.getSourceSectionValue().Person_getPayrollEnrollmentRecord()
worked_time = float(enrollment_record.getWorkingUnitQuantity()) worked_time = float(enrollment_record.getWorkingUnitQuantity())
normal_working_time = float(enrollment_record.getStandardWorkingUnit()) normal_working_time = float(enrollment_record.getStandardWorkingUnit())
base = minimum_salary * (worked_time / normal_working_time) base = minimum_salary * (worked_time / normal_working_time)
...@@ -258,7 +259,6 @@ if len(result['ctp']): ...@@ -258,7 +259,6 @@ if len(result['ctp']):
###################################################################### ######################################################################
# Remuneration and Activity # Remuneration and Activity
enrollment_record = context.getSourceSectionValue().Person_getPayrollEnrollmentRecord()
is_trainee = (True if enrollment_record.getContractType() == '29' else False) is_trainee = (True if enrollment_record.getContractType() == '29' else False)
is_corporate_executive = (True if enrollment_record.getContractType() == '80' else False) is_corporate_executive = (True if enrollment_record.getContractType() == '80' else False)
career_start_date = enrollment_record.getCareerStartDate() career_start_date = enrollment_record.getCareerStartDate()
......
portal = context.getPortalObject() enrollment_record = context.Person_getCareerRecord('DSN Enrollment Record')
enrollment_record = context.Person_getPayrollEnrollmentRecord()
if dsn_report is None: if dsn_report is None:
dsn_report = context dsn_report = context
......
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