@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | $user->profile_pic = $fileName; |
| 108 | 108 | } |
| 109 | 109 | $user->fill($request->input())->save(); |
| 110 | - $response = ['type' => 'success', 'message' =>'Updated Successfully..']; |
|
| 110 | + $response = ['type' => 'success', 'message' =>'Updated Successfully..']; |
|
| 111 | 111 | |
| 112 | 112 | return $response; |
| 113 | 113 | } catch (Exception $ex) { |
@@ -161,27 +161,27 @@ discard block |
||
| 161 | 161 | } |
| 162 | 162 | |
| 163 | 163 | return \DataTables::of($invoices->get()) |
| 164 | - ->addColumn('number', function ($model) { |
|
| 164 | + ->addColumn('number', function($model) { |
|
| 165 | 165 | return $model->number; |
| 166 | 166 | }) |
| 167 | - ->addColumn('products', function ($model) { |
|
| 167 | + ->addColumn('products', function($model) { |
|
| 168 | 168 | $invoice = $this->invoice->find($model->id); |
| 169 | 169 | $products = $invoice->invoiceItem()->pluck('product_name')->toArray(); |
| 170 | 170 | |
| 171 | 171 | return ucfirst(implode(',', $products)); |
| 172 | 172 | }) |
| 173 | - ->addColumn('date', function ($model) { |
|
| 173 | + ->addColumn('date', function($model) { |
|
| 174 | 174 | $date = date_create($model->created_at); |
| 175 | 175 | |
| 176 | 176 | return date_format($date, 'M j, Y, g:i a'); |
| 177 | 177 | }) |
| 178 | - ->addColumn('total', function ($model) { |
|
| 178 | + ->addColumn('total', function($model) { |
|
| 179 | 179 | return $model->grand_total; |
| 180 | 180 | }) |
| 181 | - ->addColumn('status', function ($model) { |
|
| 181 | + ->addColumn('status', function($model) { |
|
| 182 | 182 | return ucfirst($model->status); |
| 183 | 183 | }) |
| 184 | - ->addColumn('action', function ($model) { |
|
| 184 | + ->addColumn('action', function($model) { |
|
| 185 | 185 | if (\Auth::user()->role == 'admin') { |
| 186 | 186 | $url = '/invoices/show?invoiceid='.$model->id; |
| 187 | 187 | } else { |