Test Setup Failed
Push — development ( 63d518...d700b6 )
by Ashutosh
11:10 queued 10s
created
app/Http/Controllers/Front/BaseClientController.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     {
60 60
         $end = '--';
61 61
         if ($orders->subscription()->first()) {
62
-            if (strtotime($orders->subscription()->first()->update_ends_at) >1) {
62
+            if (strtotime($orders->subscription()->first()->update_ends_at) > 1) {
63 63
                 $ends = new DateTime($orders->subscription()->first()->update_ends_at);
64 64
                 $tz = \Auth::user()->timezone()->first()->name;
65 65
                 $ends->setTimezone(new DateTimeZone($tz));
@@ -201,27 +201,27 @@  discard block
 block discarded – undo
201 201
             }
202 202
 
203 203
             return \DataTables::of($invoices->get())
204
-             ->addColumn('number', function ($model) {
204
+             ->addColumn('number', function($model) {
205 205
                  return $model->number;
206 206
              })
207
-            ->addColumn('products', function ($model) {
207
+            ->addColumn('products', function($model) {
208 208
                 $invoice = $this->invoice->find($model->id);
209 209
                 $products = $invoice->invoiceItem()->pluck('product_name')->toArray();
210 210
 
211 211
                 return ucfirst(implode(',', $products));
212 212
             })
213
-            ->addColumn('date', function ($model) {
213
+            ->addColumn('date', function($model) {
214 214
                 $date = date_create($model->created_at);
215 215
 
216 216
                 return date_format($date, 'M j, Y, g:i a');
217 217
             })
218
-            ->addColumn('total', function ($model) {
218
+            ->addColumn('total', function($model) {
219 219
                 return $model->grand_total;
220 220
             })
221
-            ->addColumn('status', function ($model) {
221
+            ->addColumn('status', function($model) {
222 222
                 return ucfirst($model->status);
223 223
             })
224
-            ->addColumn('action', function ($model) {
224
+            ->addColumn('action', function($model) {
225 225
                 if (\Auth::user()->role == 'admin') {
226 226
                     $url = '/invoices/show?invoiceid='.$model->id;
227 227
                 } else {
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
             $symbol = $currency['symbol'];
253 253
 
254 254
 
255
-            return view('themes.default1.front.clients.show-invoice', compact('invoice', 'items', 'user','currency','symbol'));
255
+            return view('themes.default1.front.clients.show-invoice', compact('invoice', 'items', 'user', 'currency', 'symbol'));
256 256
         } catch (Exception $ex) {
257 257
             Bugsnag::notifyException($ex);
258 258
 
Please login to merge, or discard this patch.