This commit is contained in:
Kevin Adametz 2024-08-05 12:05:24 +02:00
parent 04d677d37a
commit bfa3bb1df4
1191 changed files with 637397 additions and 10619 deletions

View file

@ -48,6 +48,7 @@ class PaymentMethod extends Model
'pos' => 'int',
'active' => 'bool',
'default' => 'bool',
'is_abo' => 'bool',
'show_on' => 'array',
];
@ -58,6 +59,7 @@ class PaymentMethod extends Model
'show_on',
'pos',
'default',
'is_abo',
'active'
];
@ -95,7 +97,10 @@ class PaymentMethod extends Model
return $ret;
}
public static function getDefaultAsArray($short=false){
public static function getDefaultAsArray($is_abo=false){
if($is_abo){
return PaymentMethod::where('active', true)->where('default', true)->where('is_abo', $is_abo)->pluck('id');
}
return PaymentMethod::where('active', true)->where('default', true)->pluck('id');
}
}