mirror of
https://github.com/CatalaLang/catala.git
synced 2024-11-10 15:04:15 +03:00
106 lines
3.6 KiB
Plaintext
106 lines
3.6 KiB
Plaintext
@@Section 132@@
|
||
|
||
@@Begin metadata@@
|
||
/*
|
||
# We only formalize part (c) here
|
||
declaration enumeration DiscountType:
|
||
-- Property
|
||
-- Services
|
||
|
||
declaration scope QualifiedEmployeeDiscount:
|
||
context customer_price content amount
|
||
context employee_price content amount
|
||
context gross_profit_percentage content decimal
|
||
context qualified_employee_discount content amount
|
||
context employee_discount content amount
|
||
context aggregate_cost content amount
|
||
context discount_type content DiscountType
|
||
*/
|
||
@@End metadata@@
|
||
|
||
|
||
@@(c) Qualified employee discount defined@@+
|
||
For purposes of this section—
|
||
|
||
@(1) Qualified employee discount@
|
||
The term “qualified employee discount” means any employee discount with respect
|
||
to qualified property or services to the extent such discount does not exceed—
|
||
(A) in the case of property, the gross profit percentage of the price at which
|
||
the property is being offered by the employer to customers, or
|
||
/*
|
||
scope QualifiedEmployeeDiscount :
|
||
definition qualified_employee_discount
|
||
under condition discount_type with pattern Property consequence
|
||
equals
|
||
if employee_discount >
|
||
customer_price * gross_profit_percentage
|
||
then customer_price * gross_profit_percentage
|
||
else employee_discount
|
||
*/
|
||
(B) in the case of services, 20 percent of the price at which the services are
|
||
being offered by the employer to customers.
|
||
/*
|
||
scope QualifiedEmployeeDiscount :
|
||
definition qualified_employee_discount
|
||
under condition discount_type with pattern Services consequence
|
||
equals
|
||
if employee_discount >
|
||
customer_price * 20%
|
||
then customer_price * 20%
|
||
else employee_discount
|
||
*/
|
||
@@(2) Gross profit percentage@@++
|
||
|
||
@(A) In general@
|
||
The term “gross profit percentage” means the percent which—
|
||
|
||
(i) the excess of the aggregate sales price of property sold by the employer
|
||
to customers over the aggregate cost of such property to the employer, is of
|
||
|
||
(ii) the aggregate sale price of such property.
|
||
/*
|
||
scope QualifiedEmployeeDiscount
|
||
under condition discount_type with pattern Property :
|
||
assertion customer_price >= aggregate_cost
|
||
|
||
definition gross_profit_percentage equals
|
||
(customer_price - aggregate_cost) / customer_price
|
||
*/
|
||
@(B) Determination of gross profit percentage@
|
||
Gross profit percentage shall be determined on the basis of—
|
||
|
||
(i) all property offered to customers in the ordinary course of the line of
|
||
business of the employer in which the employee is performing services (or a
|
||
reasonable classification of property selected by the employer), and
|
||
|
||
(ii) the employer’s experience during a representative period.
|
||
/*
|
||
# (i) and (ii) are subjective criteria for determining the gross profit
|
||
# percentage ; we do not formalize them
|
||
*/
|
||
@(3) Employee discount defined@
|
||
The term “employee discount” means the amount by which—
|
||
|
||
(A) the price at which the property or services are provided by the employer to
|
||
an employee for use by such employee, is less than
|
||
|
||
(B) the price at which such property or services are being offered by the
|
||
employer to customers.
|
||
/*
|
||
scope QualifiedEmployeeDiscount:
|
||
assertion customer_price >= employee_price
|
||
|
||
definition employee_discount equals
|
||
employee_price - customer_price
|
||
*/
|
||
@(4) Qualified property or services@
|
||
The term “qualified property or services” means any property (other than real
|
||
property and other than personal property of a kind held for investment) or
|
||
services which are offered for sale to customers in the ordinary course of
|
||
the line of business of the employer in which the employee is performing
|
||
services.
|
||
/*
|
||
# Again, this is for subjectively determining what item qualifies for a
|
||
# discount, not formalizing
|
||
*/
|