yummy, fuckfinals codes not working #5125
This commit is contained in:
parent
6aed676e07
commit
aec6e9fa83
@ -185,8 +185,14 @@ class Crunchbutton_Reward extends Cana_Table{
|
||||
public function getReferredDiscountAmount(){
|
||||
if( $this->code ){
|
||||
$admin = Crunchbutton_Admin::byInviteCode( $this->code )->get( 0 );
|
||||
if( $admin->id_admin ){
|
||||
if( $admin->referral_customer_credit ){
|
||||
return floatval( $admin->referral_customer_credit );
|
||||
} else {
|
||||
$settings = $this->loadSettings();
|
||||
return floatval( $settings[ Crunchbutton_Reward::CONFIG_KEY_GET_REFERRED_DISCOUNT_AMOUNT ] );
|
||||
}
|
||||
|
||||
} else {
|
||||
$user = Crunchbutton_User::byInviteCode( $this->code );
|
||||
if( $user->id_user ){
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user