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

@ -7,6 +7,7 @@ use App\Models\Country;
use App\Models\Product;
use App\Models\ShippingCountry;
use App\Models\UserLevel;
use App\User;
class HTMLHelper
{
@ -254,8 +255,6 @@ class HTMLHelper
return $ret;
}
public static function getSalutation($id){
$values = array('mr' => __('MR'), 'ms' => __('MS'));
$ret = "";
@ -283,6 +282,27 @@ class HTMLHelper
return $ret;
}
public static function getSponsorOptions($id, $all=false){
$values = User::all();
$ret = "";
if($all){
$ret .= '<option value="">'.__('please select').'</option>\n';
}
foreach ($values as $value){
$attr = ($value->id == $id) ? 'selected="selected"' : '';
$to="";
if($value->account){
$to = $value->account->first_name." ".$value->account->last_name." | ";
}
$ret .= '<option value="'.$value->id.'" '.$attr.'>'.$to.$value->email.'</option>\n';
}
return $ret;
}
/*public static function getIndustrySectorsWithoutParents($id = false, $sameId = false, $all = true){
$values = IndustrySector::where('parent_id', null)->get();