08 2024
This commit is contained in:
parent
c1c613a4b9
commit
881fc84207
384 changed files with 50679 additions and 990 deletions
|
|
@ -342,6 +342,25 @@ class Lead extends Model
|
|||
return '<span data-order="0">-</span>';
|
||||
}
|
||||
|
||||
public function getTravelCountryDestco($badge = true){
|
||||
|
||||
$out = "";
|
||||
if($this->bookings->count()){
|
||||
$out .= $badge ? '<span class="badge badge-success">' : '';
|
||||
foreach ($this->bookings as $booking){
|
||||
if($booking->travel_country_id && $booking->travel_country) {
|
||||
$out .= $booking->travel_country->destco;
|
||||
}
|
||||
}
|
||||
$out .= $badge ? '</span>' : '';
|
||||
return $out;
|
||||
}
|
||||
if($this->travel_country){
|
||||
return $badge ? '<span class="badge badge-secondary">'.$this->travel_country->destco.'</span>' : $this->travel_country->destco;
|
||||
}
|
||||
return "-";
|
||||
}
|
||||
|
||||
public function countLeadMailsBy($dir, $subdir=false){
|
||||
if($dir === 11){
|
||||
return $this->lead_mails->where('draft', true)->where('dir', '!=', 12)->count();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue