mirror of
https://github.com/CatalaLang/catala.git
synced 2024-11-14 13:58:40 +03:00
44 lines
1.4 KiB
Plaintext
44 lines
1.4 KiB
Plaintext
> Include: ../section_132.catala_en
|
|
|
|
### Test
|
|
|
|
```catala
|
|
declaration scope TestSection132_1:
|
|
section_132 scope QualifiedEmployeeDiscount
|
|
|
|
scope TestSection132_1:
|
|
definition section_132.customer_price equals $1500
|
|
definition section_132.employee_price equals $1000
|
|
definition section_132.aggregate_cost equals $900
|
|
definition section_132.discount_type equals Property
|
|
assertion section_132.employee_discount = $500
|
|
assertion section_132.gross_profit_percentage = 0.4
|
|
assertion section_132.qualified_employee_discount = $500
|
|
```
|
|
|
|
```catala
|
|
declaration scope TestSection132_2:
|
|
section_132 scope QualifiedEmployeeDiscount
|
|
|
|
scope TestSection132_2:
|
|
definition section_132.customer_price equals $1500
|
|
definition section_132.employee_price equals $1000
|
|
definition section_132.aggregate_cost equals $1200
|
|
definition section_132.discount_type equals Property
|
|
assertion section_132.employee_discount = $500
|
|
assertion section_132.gross_profit_percentage = 0.2
|
|
assertion section_132.qualified_employee_discount = $300.00
|
|
```
|
|
|
|
```catala
|
|
declaration scope TestSection132_3:
|
|
section_132 scope QualifiedEmployeeDiscount
|
|
|
|
scope TestSection132_3:
|
|
definition section_132.customer_price equals $1500
|
|
definition section_132.employee_price equals $1000
|
|
definition section_132.discount_type equals Services
|
|
assertion section_132.employee_discount = $500
|
|
assertion section_132.qualified_employee_discount = $300
|
|
```
|