mirror of
https://github.com/CatalaLang/catala.git
synced 2024-09-20 00:41:05 +03:00
71bb67163c
Command used: `sed -i 's/\([-+*/><=]=\?\)[.$@^€$]/\1/g' **/*/*.catala_*` The overload test, of course, is kept unchanged and ensures that explicit operators still work.
60 lines
2.0 KiB
Plaintext
60 lines
2.0 KiB
Plaintext
```catala
|
|
# Copyright © Aïda Ibrahim and Hugo Gimbert -- LaBRI/CNRS/Université de Bordeaux/Université de Nantes
|
|
```
|
|
```catala-metadata
|
|
declaration enumeration OrganisationType:
|
|
-- Charitable
|
|
--NonProfit
|
|
--NonCharitable
|
|
--ProfitOrg
|
|
|
|
declaration structure NoDrawLottery:
|
|
data typeOrg content OrganisationType
|
|
data grossProceeds content money
|
|
data totalValueOfThePrizes content money
|
|
data proceedsToBenefitingOrg content money
|
|
data maxTickets content integer
|
|
|
|
declaration scope GamingAuthorized:
|
|
input noDrawLottery content NoDrawLottery
|
|
output authorized condition
|
|
internal benefitingOrg content boolean
|
|
internal minimumProceeds content boolean
|
|
internal maxValueOfPrizes content boolean
|
|
internal maxTicketsProduced content boolean
|
|
```
|
|
|
|
A no-draw lottery is a permitted gaming activity for the purposes of section 10 of the
|
|
Act if the following requirements are complied with—
|
|
(a) the gaming activity is conducted by or on behalf of a charitable organisation
|
|
or a non-profit organisation,
|
|
```catala
|
|
scope GamingAuthorized:
|
|
definition benefitingOrg equals noDrawLottery.typeOrg with pattern OrganisationType.Charitable
|
|
or noDrawLottery.typeOrg with pattern OrganisationType.NonProfit
|
|
|
|
```
|
|
(b) not less than 40% of the gross proceeds of the gaming activity are paid to the
|
|
benefiting organisation,
|
|
```catala
|
|
scope GamingAuthorized:
|
|
definition minimumProceeds equals noDrawLottery.proceedsToBenefitingOrg >= noDrawLottery.grossProceeds * 40 %
|
|
|
|
```
|
|
(c) the total value of all of the prizes does not exceed $5,000,
|
|
```catala
|
|
scope GamingAuthorized:
|
|
definition maxValueOfPrizes equals noDrawLottery.totalValueOfThePrizes <= $5,000
|
|
```
|
|
(d) the total number of tickets produced or obtained for sale for the lottery does
|
|
not exceed 3,000.
|
|
```catala
|
|
scope GamingAuthorized:
|
|
definition maxTicketsProduced equals noDrawLottery.maxTickets <= 3000
|
|
|
|
scope GamingAuthorized:
|
|
rule authorized
|
|
under condition benefitingOrg and minimumProceeds and maxValueOfPrizes and maxTicketsProduced
|
|
consequence fulfilled
|
|
```
|