Reduction of amount for siblings implemented
This commit is contained in:
@@ -12,6 +12,9 @@ class SetParticipationFeesCommand {
|
||||
|
||||
public function execute() : SetParticipationFeesResponse {
|
||||
$response = new SetParticipationFeesResponse();
|
||||
$this->request->event->sibling_reduction = $this->request->siblingReduction;
|
||||
$this->request->event->save();
|
||||
|
||||
$this->cleanBefore();
|
||||
|
||||
$this->request->event->participationFee1()->associate(EventParticipationFee::create([
|
||||
|
||||
@@ -12,13 +12,16 @@ class SetParticipationFeesRequest {
|
||||
public ?array $participationFeeThird;
|
||||
public ?array $participationFeeFourth;
|
||||
|
||||
public bool $siblingReduction;
|
||||
|
||||
public function __construct(Event $event, array $participationFeeFirst) {
|
||||
|
||||
public function __construct(Event $event, array $participationFeeFirst, bool $siblingReduction) {
|
||||
$this->event = $event;
|
||||
$this->participationFeeFirst = $participationFeeFirst;
|
||||
$this->participationFeeSecond = null;
|
||||
$this->participationFeeThird = null;
|
||||
$this->participationFeeFourth = null;
|
||||
$this->siblingReduction = $siblingReduction;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user