Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
trasher committed Apr 30, 2024
1 parent 0d39959 commit 0751dad
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions galette/lib/Galette/Entity/Contribution.php
Expand Up @@ -1376,10 +1376,10 @@ public function setContributionType(int $type): self
//set type
$this->type = new ContributionsTypes($this->zdb, $type);
//set is_cotis according to type
if ($this->type->extension == 1) {
$this->is_cotis = true;
} else {
if ($this->type->extension == ContributionsTypes::TYPE_DONATION) {
$this->is_cotis = false;
} else {
$this->is_cotis = true;
}

return $this;
Expand Down
14 changes: 7 additions & 7 deletions galette/lib/Galette/Entity/ContributionsTypes.php
Expand Up @@ -65,13 +65,13 @@ class ContributionsTypes

/** @var array<int, array<string, mixed>> */
protected static array $defaults = array(
array('id' => 1, 'libelle' => 'annual fee', 'extension' => '1'),
array('id' => 2, 'libelle' => 'reduced annual fee', 'extension' => '1'),
array('id' => 3, 'libelle' => 'company fee', 'extension' => '1'),
array('id' => 4, 'libelle' => 'donation in kind', 'extension' => 0),
array('id' => 5, 'libelle' => 'donation in money', 'extension' => 0),
array('id' => 6, 'libelle' => 'partnership', 'extension' => 0),
array('id' => 7, 'libelle' => 'annual fee (to be paid)', 'extension' => '1')
array('id' => 1, 'libelle' => 'annual fee', 'extension' => ContributionsTypes::TYPE_DEFAULT),
array('id' => 2, 'libelle' => 'reduced annual fee', 'extension' => ContributionsTypes::TYPE_DEFAULT),
array('id' => 3, 'libelle' => 'company fee', 'extension' => ContributionsTypes::TYPE_DEFAULT),
array('id' => 4, 'libelle' => 'donation in kind', 'extension' => ContributionsTypes::TYPE_DONATION),
array('id' => 5, 'libelle' => 'donation in money', 'extension' => ContributionsTypes::TYPE_DONATION),
array('id' => 6, 'libelle' => 'partnership', 'extension' => ContributionsTypes::TYPE_DONATION),
array('id' => 7, 'libelle' => 'annual fee (to be paid)', 'extension' => ContributionsTypes::TYPE_DEFAULT)
);

/**
Expand Down

0 comments on commit 0751dad

Please sign in to comment.