leads, sales lists, m_data, orders
This commit is contained in:
parent
1a43060996
commit
7ef7a507c7
26 changed files with 860 additions and 178 deletions
|
|
@ -70,6 +70,18 @@ class ShoppingOrder extends Model
|
|||
'weight',
|
||||
];
|
||||
|
||||
protected $txaction_text = [
|
||||
'paid' => "bezahlt",
|
||||
'appointed' => "offen",
|
||||
'failed' => "abbruch",
|
||||
];
|
||||
|
||||
protected $txaction_color = [
|
||||
'paid' => "success",
|
||||
'appointed' => "warning",
|
||||
'failed' => "danger",
|
||||
];
|
||||
|
||||
|
||||
public function shopping_user()
|
||||
{
|
||||
|
|
@ -134,5 +146,20 @@ class ShoppingOrder extends Model
|
|||
}
|
||||
|
||||
|
||||
public function getFormattedTxaction(){
|
||||
if($this->txaction && isset($this->txaction_text[$this->txaction])){
|
||||
return $this->txaction_text[$this->txaction];
|
||||
}
|
||||
return "not";
|
||||
}
|
||||
|
||||
public function getFormattedTxactionColor(){
|
||||
if($this->txaction && isset($this->txaction_color[$this->txaction])){
|
||||
return $this->txaction_color[$this->txaction];
|
||||
}
|
||||
return "danger";
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -112,9 +112,14 @@ class ShoppingUser extends Model
|
|||
return $this->belongsTo('App\Models\Country','shipping_country_id');
|
||||
}
|
||||
|
||||
public function Shopping_orders()
|
||||
public function shopping_orders()
|
||||
{
|
||||
return $this->hasMany('App\Models\ShoppingOrder','shopping_user_id');
|
||||
}
|
||||
|
||||
public function shopping_order()
|
||||
{
|
||||
return $this->hasOne('App\Models\ShoppingOrder','shopping_user_id');
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue