leads, sales lists, m_data, orders

This commit is contained in:
Kevin Adametz 2020-01-03 17:44:26 +01:00
parent 1a43060996
commit 7ef7a507c7
26 changed files with 860 additions and 178 deletions

View file

@ -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";
}
}