[IMP] odex_benefit: IMP benefit
This commit is contained in:
parent
266b5dac7a
commit
876a690120
|
|
@ -121,7 +121,7 @@ class ConfirmBenefitExpense(models.Model):
|
|||
self.ensure_one()
|
||||
for line in self.benefit_expense_line_ids:
|
||||
family = line.family_id
|
||||
income, meals, clotting = 0, 0, 0
|
||||
income, meals, clotting, othaim = 0, 0, 0
|
||||
if not family:
|
||||
continue
|
||||
monthly_meals = 0.0 if family.meal_card else family.family_monthly_meals
|
||||
|
|
@ -130,6 +130,7 @@ class ConfirmBenefitExpense(models.Model):
|
|||
income = family.family_monthly_income
|
||||
if self.meal_expense:
|
||||
meals = monthly_meals
|
||||
othaim = othaime
|
||||
if self.cloth_expense:
|
||||
clotting = family.family_monthly_clotting
|
||||
vals = {
|
||||
|
|
@ -142,7 +143,7 @@ class ConfirmBenefitExpense(models.Model):
|
|||
'family_monthly_income': income,
|
||||
'family_monthly_meals': meals,
|
||||
'family_monthly_clotting': clotting,
|
||||
'family_monthly_othaime': othaime,
|
||||
'family_monthly_othaime': othaim,
|
||||
}
|
||||
line.write(vals)
|
||||
|
||||
|
|
|
|||
|
|
@ -173,68 +173,66 @@
|
|||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-12">
|
||||
<div class="alert"
|
||||
style="padding: 20px; margin-bottom: 20px; border-left: 4px solid #28a745; background-color: #e8f7ef; border-radius: 6px;">
|
||||
<div class="row text-center">
|
||||
<div class="col-3">
|
||||
<div class="d-flex flex-column align-items-center"
|
||||
style="background-color: #e3f2fd; padding: 8px; border-radius: 8px;">
|
||||
<i class="fa fa-money text-success"
|
||||
style="font-size: 20px; margin-bottom: 4px;"/>
|
||||
<span style="font-size: 12px; color: #555;">Total Monthly Income
|
||||
</span>
|
||||
<span class="badge badge-primary"
|
||||
style="font-size: 14px; padding: 4px 8px; margin-top: 3px; border-radius: 8px;">
|
||||
<field name="family_monthly_income" widget="monetary"
|
||||
options="{'currency_field': 'currency_id'}"/>
|
||||
</span>
|
||||
</div>
|
||||
<div class="row text-center">
|
||||
<div class="col-3">
|
||||
<div class="d-flex flex-column align-items-center"
|
||||
style="background-color: #e3f2fd; padding: 8px; border-radius: 8px;">
|
||||
<i class="fa fa-money text-success"
|
||||
style="font-size: 20px; margin-bottom: 4px;"/>
|
||||
<span style="font-size: 12px; color: #555;">Total Monthly Income
|
||||
</span>
|
||||
<span class="badge badge-primary"
|
||||
style="font-size: 14px; padding: 4px 8px; margin-top: 3px; border-radius: 8px;">
|
||||
<field name="family_monthly_income" widget="monetary"
|
||||
options="{'currency_field': 'currency_id'}"/>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Total Monthly Meals -->
|
||||
<div class="col-3">
|
||||
<div class="d-flex flex-column align-items-center"
|
||||
style="background-color: #fff3e0; padding: 8px; border-radius: 8px;">
|
||||
<i class="fa fa-money text-success"
|
||||
style="font-size: 20px; margin-bottom: 4px;"/>
|
||||
<span style="font-size: 12px; color: #555;">Total Monthly Meals
|
||||
</span>
|
||||
<span class="badge badge-warning"
|
||||
style="font-size: 14px; padding: 4px 8px; margin-top: 3px; border-radius: 8px;">
|
||||
<field name="family_monthly_meals" widget="monetary"
|
||||
options="{'currency_field': 'currency_id'}"/>
|
||||
</span>
|
||||
</div>
|
||||
<!-- Total Monthly Meals -->
|
||||
<div class="col-3">
|
||||
<div class="d-flex flex-column align-items-center"
|
||||
style="background-color: #fff3e0; padding: 8px; border-radius: 8px;">
|
||||
<i class="fa fa-money text-success"
|
||||
style="font-size: 20px; margin-bottom: 4px;"/>
|
||||
<span style="font-size: 12px; color: #555;">Total Monthly Meals
|
||||
</span>
|
||||
<span class="badge badge-warning"
|
||||
style="font-size: 14px; padding: 4px 8px; margin-top: 3px; border-radius: 8px;">
|
||||
<field name="family_monthly_meals" widget="monetary"
|
||||
options="{'currency_field': 'currency_id'}"/>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Total Monthly Clothing -->
|
||||
<div class="col-3">
|
||||
<div class="d-flex flex-column align-items-center"
|
||||
style="background-color: #e0f7fa; padding: 8px; border-radius: 8px;">
|
||||
<i class="fa fa-money text-success"
|
||||
style="font-size: 20px; margin-bottom: 4px;"/>
|
||||
<span style="font-size: 12px; color: #555;">Total Monthly Clothing
|
||||
</span>
|
||||
<span class="badge badge-info"
|
||||
style="font-size: 14px; padding: 4px 8px; margin-top: 3px; border-radius: 8px;">
|
||||
<field name="family_monthly_clotting" widget="monetary"
|
||||
options="{'currency_field': 'currency_id'}"/>
|
||||
</span>
|
||||
</div>
|
||||
<!-- Total Monthly Clothing -->
|
||||
<div class="col-3">
|
||||
<div class="d-flex flex-column align-items-center"
|
||||
style="background-color: #e0f7fa; padding: 8px; border-radius: 8px;">
|
||||
<i class="fa fa-money text-success"
|
||||
style="font-size: 20px; margin-bottom: 4px;"/>
|
||||
<span style="font-size: 12px; color: #555;">Total Monthly Clothing
|
||||
</span>
|
||||
<span class="badge badge-info"
|
||||
style="font-size: 14px; padding: 4px 8px; margin-top: 3px; border-radius: 8px;">
|
||||
<field name="family_monthly_clotting" widget="monetary"
|
||||
options="{'currency_field': 'currency_id'}"/>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Monthly Total -->
|
||||
<div class="col-3">
|
||||
<div class="d-flex flex-column align-items-center">
|
||||
<i class="fa fa-calculator text-success"
|
||||
style="font-size: 20px; margin-bottom: 4px;"/>
|
||||
<span style="font-size: 12px; color: #555;">Total</span>
|
||||
<span class="badge badge-success"
|
||||
style="font-size: 14px; padding: 4px 8px; margin-top: 3px; border-radius: 8px;">
|
||||
<field name="family_monthly_total" widget="monetary"
|
||||
options="{'currency_field': 'currency_id'}"/>
|
||||
</span>
|
||||
</div>
|
||||
<!-- Monthly Total -->
|
||||
<div class="col-3">
|
||||
<div class="d-flex flex-column align-items-center"
|
||||
style="background-color: #e8f7ef;padding: 8px; border-radius: 8px;">
|
||||
<i class="fa fa-calculator text-success"
|
||||
style="font-size: 20px; margin-bottom: 4px;"/>
|
||||
<span style="font-size: 12px; color: #555;">Total</span>
|
||||
<span class="badge badge-success"
|
||||
style="font-size: 14px; padding: 4px 8px; margin-top: 3px; border-radius: 8px;">
|
||||
<field name="family_monthly_total" widget="monetary"
|
||||
options="{'currency_field': 'currency_id'}"/>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -260,7 +258,8 @@
|
|||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Othaim Line" attrs="{'invisible': [('state', '=', 'draft')]}">
|
||||
<page string="Othaim Line"
|
||||
attrs="{'invisible': ['|',('state', '=', 'draft'),('meal_expense', '=', False)]}">
|
||||
<div class="row mb-2">
|
||||
<!-- Family Count -->
|
||||
<div class="col-4">
|
||||
|
|
|
|||
Loading…
Reference in New Issue