@@ -118,18 +118,18 @@ discard block |
||
118 | 118 | |
119 | 119 | return\ DataTables::of($new_product) |
120 | 120 | |
121 | - ->addColumn('checkbox', function ($model) { |
|
121 | + ->addColumn('checkbox', function($model) { |
|
122 | 122 | return "<input type='checkbox' class='product_checkbox' |
123 | 123 | value=".$model->id.' name=select[] id=check>'; |
124 | 124 | }) |
125 | - ->addColumn('name', function ($model) { |
|
125 | + ->addColumn('name', function($model) { |
|
126 | 126 | return ucfirst($model->name); |
127 | 127 | }) |
128 | - ->addColumn('image', function ($model) { |
|
128 | + ->addColumn('image', function($model) { |
|
129 | 129 | // return $model->image; |
130 | 130 | return "<img src= '$model->image' + height=\"80\"/>"; |
131 | 131 | }) |
132 | - ->addColumn('type', function ($model) { |
|
132 | + ->addColumn('type', function($model) { |
|
133 | 133 | if ($this->type->where('id', $model->type)->first()) { |
134 | 134 | return $this->type->where('id', $model->type)->first()->name; |
135 | 135 | } else { |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | } |
138 | 138 | }) |
139 | 139 | |
140 | - ->addColumn('group', function ($model) { |
|
140 | + ->addColumn('group', function($model) { |
|
141 | 141 | if ($this->group->where('id', $model->group)->first()) { |
142 | 142 | return $this->group->where('id', $model->group)->first()->name; |
143 | 143 | } else { |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | } |
146 | 146 | }) |
147 | 147 | |
148 | - ->addColumn('Action', function ($model) { |
|
148 | + ->addColumn('Action', function($model) { |
|
149 | 149 | $permissions = LicensePermissionsController::getPermissionsForProduct($model->id); |
150 | 150 | $url = ''; |
151 | 151 | if ($permissions['downloadPermission'] == 1) { |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | // Save file Info in Modal popup |
172 | 172 | public function save(Request $request) |
173 | 173 | { |
174 | - $this->validate($request,[ |
|
174 | + $this->validate($request, [ |
|
175 | 175 | 'producttitle' => 'required', |
176 | 176 | 'version' => 'required', |
177 | 177 | // 'filename' => 'required', |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | $from = $request->input('from'); |
109 | 109 | $till = $request->input('till'); |
110 | 110 | |
111 | - return view('themes.default1.invoice.index', compact('name','invoice_no','status','currencies','currency_id','from', |
|
111 | + return view('themes.default1.invoice.index', compact('name', 'invoice_no', 'status', 'currencies', 'currency_id', 'from', |
|
112 | 112 | |
113 | 113 | 'till')); |
114 | 114 | } catch (\Exception $ex) { |
@@ -131,35 +131,35 @@ discard block |
||
131 | 131 | return \DataTables::of($query->take(100)) |
132 | 132 | ->setTotalRecords($query->count()) |
133 | 133 | |
134 | - ->addColumn('checkbox', function ($model) { |
|
134 | + ->addColumn('checkbox', function($model) { |
|
135 | 135 | return "<input type='checkbox' class='invoice_checkbox' |
136 | 136 | value=".$model->id.' name=select[] id=check>'; |
137 | 137 | }) |
138 | - ->addColumn('user_id', function ($model) { |
|
138 | + ->addColumn('user_id', function($model) { |
|
139 | 139 | $first = $this->user->where('id', $model->user_id)->first()->first_name; |
140 | 140 | $last = $this->user->where('id', $model->user_id)->first()->last_name; |
141 | 141 | $id = $this->user->where('id', $model->user_id)->first()->id; |
142 | 142 | |
143 | 143 | return '<a href='.url('clients/'.$id).'>'.ucfirst($first).' '.ucfirst($last).'</a>'; |
144 | 144 | }) |
145 | - ->addColumn('number', function ($model) { |
|
145 | + ->addColumn('number', function($model) { |
|
146 | 146 | return ucfirst($model->number); |
147 | 147 | }) |
148 | 148 | |
149 | - ->addColumn('date', function ($model) { |
|
149 | + ->addColumn('date', function($model) { |
|
150 | 150 | $date = ($model->created_at); |
151 | 151 | |
152 | 152 | return $date; |
153 | 153 | // return "<span style='display:none'>$model->id</span>".$date->format('l, F j, Y H:m'); |
154 | 154 | }) |
155 | - ->addColumn('grand_total', function ($model) { |
|
155 | + ->addColumn('grand_total', function($model) { |
|
156 | 156 | return $model->grand_total; |
157 | 157 | }) |
158 | - ->addColumn('status', function ($model) { |
|
158 | + ->addColumn('status', function($model) { |
|
159 | 159 | return ucfirst($model->status); |
160 | 160 | }) |
161 | 161 | |
162 | - ->addColumn('action', function ($model) { |
|
162 | + ->addColumn('action', function($model) { |
|
163 | 163 | $action = ''; |
164 | 164 | |
165 | 165 | $check = $this->checkExecution($model->id); |
@@ -175,25 +175,25 @@ discard block |
||
175 | 175 | style='color:white;'> </i> View</a>" |
176 | 176 | ." $action"; |
177 | 177 | }) |
178 | - ->filterColumn('user_id', function ($query, $keyword) { |
|
178 | + ->filterColumn('user_id', function($query, $keyword) { |
|
179 | 179 | $sql = 'first_name like ?'; |
180 | 180 | $query->whereRaw($sql, ["%{$keyword}%"]); |
181 | 181 | }) |
182 | 182 | |
183 | - ->filterColumn('status', function ($query, $keyword) { |
|
183 | + ->filterColumn('status', function($query, $keyword) { |
|
184 | 184 | $sql = 'status like ?'; |
185 | 185 | $query->whereRaw($sql, ["%{$keyword}%"]); |
186 | 186 | }) |
187 | 187 | |
188 | - ->filterColumn('number', function ($query, $keyword) { |
|
188 | + ->filterColumn('number', function($query, $keyword) { |
|
189 | 189 | $sql = 'number like ?'; |
190 | 190 | $query->whereRaw($sql, ["%{$keyword}%"]); |
191 | 191 | }) |
192 | - ->filterColumn('grand_total', function ($query, $keyword) { |
|
192 | + ->filterColumn('grand_total', function($query, $keyword) { |
|
193 | 193 | $sql = 'grand_total like ?'; |
194 | 194 | $query->whereRaw($sql, ["%{$keyword}%"]); |
195 | 195 | }) |
196 | - ->filterColumn('date', function ($query, $keyword) { |
|
196 | + ->filterColumn('date', function($query, $keyword) { |
|
197 | 197 | $sql = 'date like ?'; |
198 | 198 | $query->whereRaw($sql, ["%{$keyword}%"]); |
199 | 199 | }) |