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

@ -130,10 +130,10 @@ class UserCredit extends Model
];
public static $statusTypes = [
0 => 'offen',
1 => 'bezahlt',
2 => 'prüfen',
10 => 'storniert'
0 => 'open',
1 => 'paid',
2 => 'check',
10 => 'cancelled'
];
public static $statusColors = [
@ -145,9 +145,9 @@ class UserCredit extends Model
public static $taxableTypes = [
0 => '',
1 => 'umsatzsteuerpflichtig / DE',
2 => 'nicht umsatzsteuerpflichtig / DE',
3 => 'nicht umsatzsteuerpflichtig / Ausland'
1 => 'umsatzsteuerpflichtig / DE', //payment.to_sales_tax_de
2 => 'nicht umsatzsteuerpflichtig / DE', //payment.not_to_sales_tax_de
3 => 'nicht umsatzsteuerpflichtig / Ausland' //payment.not_to_sales_tax_foreign
];
@ -195,13 +195,22 @@ class UserCredit extends Model
public function getStatusType(){
return isset(self::$statusTypes[$this->status]) ? self::$statusTypes[$this->status] : "";
//trans('payment.cancelled')
return isset(self::$statusTypes[$this->status]) ? __('payment.'.self::$statusTypes[$this->status]) : "";
}
public function getStatusColor(){
return isset(self::$statusColors[$this->status]) ? self::$statusColors[$this->status] : "default";
}
public static function getTransStatusType(){
$ret = [];
foreach(self::$statusTypes as $key=>$val){
$ret[$key] = trans('payment.'.$val);
}
return $ret;
}
public function getDownloadPath($full = false){
if(!$full){
return $this->dir.$this->filename;