[UPD] odex_takaful

This commit is contained in:
Samir Ladoui 2026-01-22 05:52:49 +01:00
parent 529a3cabf6
commit 643cde9dce
1 changed files with 10 additions and 10 deletions

View File

@ -308,19 +308,19 @@
</tr>
<t t-set="family_salaries" t-value="doc.benefit_id.salary_ids or []"/>
<t t-set="approved_salaries" t-value="family_salaries.filtered(lambda s: s.approved) if family_salaries else []"/>
<t t-set="social_security" t-value="approved_salaries.filtered(lambda s: s.income_type and s.income_type.name == 'الضمان الاجتماعي')"/>
<t t-set="mother_salary" t-value="approved_salaries.filtered(lambda s: s.is_mother_salary)"/>
<t t-set="retirement" t-value="approved_salaries.filtered(lambda s: s.income_type and s.income_type.name == 'راتب تقاعدي')"/>
<t t-set="social_insurance" t-value="approved_salaries.filtered(lambda s: s.income_type and s.income_type.name == 'التأمينات الاجتماعية')"/>
<t t-set="total_income" t-value="sum(approved_salaries.mapped('salary_amount')) if approved_salaries else (doc.member_income if doc and doc.member_income else 0)"/>
<t t-set="approved_salaries" t-value="family_salaries.filtered(lambda s: s.approved) if len(family_salaries) else []"/>
<t t-set="social_security" t-value="approved_salaries.filtered(lambda s: s.income_type and s.income_type.name == 'الضمان الاجتماعي').mapped('salary_amount') if len(approved_salaries) else []"/>
<t t-set="mother_salary" t-value="approved_salaries.filtered(lambda s: s.is_mother_salary).mapped('salary_amount')"/>
<t t-set="retirement" t-value="approved_salaries.filtered(lambda s: s.income_type and s.income_type.name == 'راتب تقاعدي').mapped('salary_amount') if len(approved_salaries) else []"/>
<t t-set="social_insurance" t-value="approved_salaries.filtered(lambda s: s.income_type and s.income_type.name == '').mapped('salary_amount') if len(approved_salaries) else []"/>
<t t-set="total_income" t-value="sum(social_security + mother_salary + retirement + social_insurance)"/>
<tr class="data-items-row">
<td class="data-item-col" style="width: 50%; padding: 9px 35px 10px 15px; vertical-align: top;">
<table class="data-row-table" style="width: 100%; height: 40px; box-shadow: 0 0 0 1px #136456; background-color: white !important; border-collapse: separate; border-spacing: 0; border-radius: 30px; overflow: hidden; direction: rtl; table-layout: fixed;" cellpadding="0" cellspacing="0">
<tr>
<td class="label-cell-dark" style="width: 48%; height: 40px; background-color: #136456 !important; color: white !important; text-align: center; font-size: 15px; font-weight: bold; padding: 5px 15px; font-family: 'Cairo', Arial, sans-serif; border-radius: 30px 0px 0px 30px; overflow: hidden;">الضمان الاجتماعي</td>
<td style="width: 52%; text-align: center; font-size: 14px; color: #136456; font-weight: bold; font-family: 'Cairo', Arial, sans-serif;"><t t-esc="sum(social_security.mapped('salary_amount')) if social_security else '-'"/></td>
<td style="width: 52%; text-align: center; font-size: 14px; color: #136456; font-weight: bold; font-family: 'Cairo', Arial, sans-serif;"><t t-esc="sum(social_security) if len(social_security) else '-'"/></td>
</tr>
</table>
</td>
@ -328,7 +328,7 @@
<table class="data-row-table" style="width: 100%; height: 40px; box-shadow: 0 0 0 1px #136456; background-color: white !important; border-collapse: separate; border-spacing: 0; border-radius: 30px; overflow: hidden; direction: rtl; table-layout: fixed;" cellpadding="0" cellspacing="0">
<tr>
<td class="label-cell-dark" style="width: 48%; height: 40px; background-color: #136456 !important; color: white !important; text-align: center; font-size: 15px; font-weight: bold; padding: 5px 15px; font-family: 'Cairo', Arial, sans-serif; border-radius: 30px 0px 0px 30px; overflow: hidden;">راتب الأم</td>
<td style="width: 52%; text-align: center; font-size: 14px; color: #136456; font-weight: bold; font-family: 'Cairo', Arial, sans-serif;"><t t-esc="sum(mother_salary.mapped('salary_amount')) if mother_salary else '-'"/></td>
<td style="width: 52%; text-align: center; font-size: 14px; color: #136456; font-weight: bold; font-family: 'Cairo', Arial, sans-serif;"><t t-esc="sum(mother_salary) if len(mother_salary) else '-'"/></td>
</tr>
</table>
</td>
@ -339,7 +339,7 @@
<table class="data-row-table" style="width: 100%; height: 40px; box-shadow: 0 0 0 1px #136456; background-color: white !important; border-collapse: separate; border-spacing: 0; border-radius: 30px; overflow: hidden; direction: rtl; table-layout: fixed;" cellpadding="0" cellspacing="0">
<tr>
<td class="label-cell-dark" style="width: 48%; height: 40px; background-color: #136456 !important; color: white !important; text-align: center; font-size: 15px; font-weight: bold; padding: 5px 15px; font-family: 'Cairo', Arial, sans-serif; border-radius: 30px 0px 0px 30px; overflow: hidden;">الراتب التقاعدي</td>
<td style="width: 52%; text-align: center; font-size: 14px; color: #136456; font-weight: bold; font-family: 'Cairo', Arial, sans-serif;"><t t-esc="sum(retirement.mapped('salary_amount')) if retirement else '-'"/></td>
<td style="width: 52%; text-align: center; font-size: 14px; color: #136456; font-weight: bold; font-family: 'Cairo', Arial, sans-serif;"><t t-esc="sum(retirement) if len(retirement) else '-'"/></td>
</tr>
</table>
</td>
@ -347,7 +347,7 @@
<table class="data-row-table" style="width: 100%; height: 40px; box-shadow: 0 0 0 1px #136456; background-color: white !important; border-collapse: separate; border-spacing: 0; border-radius: 30px; overflow: hidden; direction: rtl; table-layout: fixed;" cellpadding="0" cellspacing="0">
<tr>
<td class="label-cell-dark" style="width: 48%; height: 40px; background-color: #136456 !important; color: white !important; text-align: center; font-size: 15px; font-weight: bold; padding: 5px 15px; font-family: 'Cairo', Arial, sans-serif; border-radius: 30px 0px 0px 30px; overflow: hidden;">التأمينات الاجتماعية</td>
<td style="width: 52%; text-align: center; font-size: 14px; color: #136456; font-weight: bold; font-family: 'Cairo', Arial, sans-serif;"><t t-esc="sum(social_insurance.mapped('salary_amount')) if social_insurance else '-'"/></td>
<td style="width: 52%; text-align: center; font-size: 14px; color: #136456; font-weight: bold; font-family: 'Cairo', Arial, sans-serif;"><t t-esc="sum(social_insurance) if len(social_insurance) else '-'"/></td>
</tr>
</table>
</td>