testemich Promotion

This commit is contained in:
Kevin Adametz 2022-04-14 13:21:17 +02:00
parent 38e7fd504a
commit a0f4eda6ea
83 changed files with 1690 additions and 504 deletions

View file

@ -251,4 +251,33 @@ class ShoppingUser extends Model
}
return "free";
}
public function getOrderPaymentFor() {
switch($this->is_from){
case 'wizard':
return 1;
case 'membership':
return 2;
case 'user_order':
if($this->is_for === 'cr'){
return 3;
}
if($this->is_for === 'mp'){
return 4;
}
if($this->is_for === 'me'){
return 5;
}
if($this->is_for === 'ot'){
return 6;
}
return 0;
case 'shopping':
return $this->is_for === 'pr' ? 7 : 8; //7 Promotion
case 'extern':
return 10;
}
return 0;
}
}