/**
  * Prepare
  * @param string $dateTime
  * @param string $tz
  *
  * @return string
  */
 public static function created($dateTime, $tz = null)
 {
     $today = Carbon\Carbon::now($tz);
     $createdOn = Carbon\Carbon::parse($dateTime, $tz);
     $difference = (int) $today->diffInSeconds($createdOn);
     $difference = $difference ?: 1;
     if ($difference < 60) {
         return JText::sprintf('COM_SOCIALCOMMUNITY_SECONDS_AGO_D', $difference);
     }
     $difference = $today->diffInMinutes($createdOn);
     if ($difference <= 60) {
         return JText::sprintf('COM_SOCIALCOMMUNITY_MINUTES_AGO_D', $difference);
     }
     $difference = $today->diffInHours($createdOn);
     if ($difference <= 24) {
         return JText::sprintf('COM_SOCIALCOMMUNITY_HOURS_AGO_D', $difference);
     }
     $difference = $today->diffInDays($createdOn);
     if ($difference <= 31) {
         return JText::sprintf('COM_SOCIALCOMMUNITY_DAYS_AGO_D', $difference);
     }
     $difference = $today->diffInMonths($createdOn);
     if ($difference <= 12) {
         return JText::sprintf('COM_SOCIALCOMMUNITY_MONTHS_AGO_D', $difference);
     }
     $difference = $today->diffInYears($createdOn);
     return JText::sprintf('COM_SOCIALCOMMUNITY_YEARS_AGO_D', $difference);
 }
Example #2
1
/**
 * Format date
 * @param $date
 * @return string
 */
function formatDate($date)
{
    return Carbon\Carbon::parse($date)->format('d F, Y');
}
Example #3
0
 /**
  * Format the date.
  * 
  * @param  string $value 
  * @return string
  */
 public function getCreatedAtAttribute($value)
 {
     try {
         return Carbon\Carbon::parse($value)->toFormattedDateString();
     } catch (Exception $e) {
         return $value;
     }
 }
Example #4
0
 function semester()
 {
     $semester = Cache::remember('users', 180, function () {
         $semester = \Modules\Academycycle\Entities\Semester::whereActive(1)->first();
         if (empty($semester)) {
             $semester = new stdClass();
             $semester->id = 0;
             $semester->name = "لا يوجد فصل";
             $semester->start_at = Carbon\Carbon::now();
             $semester->finish_at = Carbon\Carbon::parse('08-08-2016');
         }
         return $semester;
     });
     return $semester;
     // });
 }
Example #5
0
 /**
  * Arrange Fixture.
  *
  * @return void
  */
 protected function arrangeFixture()
 {
     // Given there is...
     // a Business owned by Me (User)
     $this->owner = $this->createUser();
     $this->issuer = $this->createUser();
     $this->business = $this->createBusiness();
     $this->business->owners()->save($this->owner);
     // And the Business provides a Service
     $this->service = $this->makeService();
     $this->business->services()->save($this->service);
     $startAt = Carbon\Carbon::parse('today 09:00 ' . $this->business->timezone)->timezone('UTC');
     $finishAt = Carbon\Carbon::parse('today 18:00 ' . $this->business->timezone)->timezone('UTC');
     // And the Service has Vacancies to be reserved
     $this->vacancy = $this->makeVacancy(['start_at' => $startAt->toDateTimeString(), 'finish_at' => $finishAt->toDateTimeString(), 'date' => $startAt->timezone($this->business->timezone)->toDateString(), 'capacity' => 2]);
     $this->vacancy->service()->associate($this->service);
     $this->business->vacancies()->save($this->vacancy);
     // And a Contact that holds an Appointment for that Service
     $this->contact = $this->createContact();
 }
Example #6
0
 public function getSignIn()
 {
     if (Auth::check()) {
         // Grab the last login history event id for this user. Need to
         // remember that the event 'auth.login' inserted a new entry
         // so the last one is technically last-1
         $last_login = \SeatLoginHistory::where('user_id', Auth::User()->id)->max('id');
         // With the max ID for this user known, lets get the last login
         // entry from their log
         $last_login = \SeatLoginHistory::where('user_id', Auth::User()->id)->where('id', '<', $last_login)->orderBy('id', 'desc')->first();
         // If this user has no last login, we will welcome them, else
         // we will give some information about the last login
         if ($last_login) {
             $welcome_message = 'Welcome back ' . Auth::user()->username . '. Your last login was from ' . $last_login->login_source . ' which was ' . Carbon\Carbon::parse($last_login->login_date)->diffFOrHumans() . ' at ' . $last_login->login_date;
         } else {
             $welcome_message = 'This looks like your first login! Welcome :)';
         }
         // Return the view with the information
         return Redirect::intended('/')->with('success', $welcome_message);
     }
     return View::make('session.login');
 }
Example #7
0
    
    //$zip = Zipper::make($path.DS.'GC120915.ZIP')->extractTo($to);
    $zip = Zipper::make($path.DS.'GC120915.ZIP');
    
    return dd($zip->contains('SALESMTDS.DBF'));
    */
    return App\Models\Employee::where('branchid', '0C17FE2D78A711E587FA00FF59FBB323')->get();
});
get('week/{weekno}', function ($weekno) {
    echo $weekno . '<br>';
    $week_start = new DateTime();
    $week_start->setISODate('2015', $weekno);
    echo $week_start->format('Y-m-d');
});
get('last-day-yr/{year}', function ($year) {
    $dt = Carbon\Carbon::parse($year . '-12-31');
    echo $dt->format('Y-m-d') . '<br>';
    echo $dt->toRfc822String() . '<br>';
    echo $dt->weekOfYear . '<br>';
});
get('week', function () {
    $dt = Carbon\Carbon::now();
    for ($i = 0; $i < 7; $i++) {
        $dt->addDay();
    }
    return $dt->weekOfYear;
});
get('email', function () {
    $data = [];
    return Mail::send('emails.welcome', $data, function ($message) {
        $message->subject('Test Email');
Example #8
0
		        <input type="text" name="tags" id="tags" class="form-control" value="{{ implode(",", $post->tag()->lists('name')->all()) }}">
		    </div>	
        </div>
    </div>
</div>
<div class=" col-md-3">
	<div class="panel">
		<div class="panel-heading">
			<div class="panel-title">{{ trans('blog::blog.tables.options')  }}</div>
		</div>
		<div class="panel-body">
			<div class="row">
				<div class="col-md-12">
					<div id="chose_date" class="input-group date">
                        <?php 
$fecha = Carbon\Carbon::parse($post->publish_date);
?>
					    <input type="hidden" name="publish_date" id="publish_date" class="form-control" value="{{$fecha->format('d/m/Y')}}">
					    <p class="pull-left m-r-10">{{ trans('blog::blog.tables.publish_date')  }}: <span id="fecha_publicacion" class="bold">{{$fecha->format('d/m/Y')}}</span></p>
					    <span class="add-on hand" title="Pulsa para cambiar"><i class="fa fa-calendar"></i>
					    </span>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-md-12">
					<p>Fecha de Creación: <span id="" class="bold">{{ $post->created_at->format('d/m/Y')}}</span></p>
				</div>
			</div>
			<div class="row">
				<div class="col-md-12">
Example #9
0
Route::group(['middleware' => ['web']], function () {
    //
    Route::get('/', function () {
        if (Auth::check()) {
            return view('today');
        } else {
            return view('login');
        }
    });
    Route::group(['middleware' => 'auth'], function () {
        Route::get("/brendblussers", function () {
            return view("brendblussers");
        });
        Route::get('/archive', function () {
            $records = \App\Record::get()->groupBy(function ($date) {
                return Carbon\Carbon::parse($date->created_at)->format('y-m-d');
                // grouping by months
            });
            return view('archive', ["records" => $records]);
        });
        Route::get('/adduser', function () {
            return view('adduser');
        });
        Route::post('/adduser', 'UserController@create');
        Route::get('/staff', 'StaffController@index');
        Route::get('/day/{date}', 'ArchiveController@day');
        Route::get('/day/{date}/brendblussers', 'ArchiveController@dayBrendblussers');
        Route::get('/qrcode', "LocationController@form");
    });
    Route::post('/login', 'LoginController@login');
    Route::get('/login', function () {
Example #10
0
function formatTime($time)
{
    if ($time) {
        return Carbon\Carbon::parse($time)->format('H:i');
    } else {
        return null;
    }
}
Example #11
0
			<th>Date</th>
			<th>Action</th>
			<!-- <th>Follow-Up Date</th> -->
			<th>Notes</th>
			<th>Reason</th>
			<th>Sales Invoices</th>
			<th>Status</th>
			
		</tr>
	</thead>
	
	<tbody>
		@foreach ($collection_logs as $cLog)
		<tr>
			<?php 
$date = Carbon\Carbon::parse($cLog->date)->toFormattedDateString();
$salesinvoices = App\SalesInvoiceCollectionLog::join('clients', 'sales_invoice_collection_logs.client_id', '=', 'clients.id')->join('sales_invoices', 'sales_invoice_collection_logs.sales_invoice_id', '=', 'sales_invoices.id')->join('collection_logs', 'sales_invoice_collection_logs.collection_log_id', '=', 'collection_logs.id')->where('sales_invoice_collection_logs.client_id', $cLog->client_id)->where('sales_invoice_collection_logs.collection_log_id', $cLog->id)->select('*')->get();
?>

			<td>{{ $date }}</td>
			<td>{{ $cLog->action }}</td>
			
			<td>{{ $cLog->note }}</td>
			@if ($cLog->Reason == null)
			<td>---------</td>
			@else
			<td>{{ $cLog->Reason->reason }}</td>
			@endif
			<td>
				@foreach($salesinvoices as $salesinvoice)
				<a href="{{ action ('SalesInvoicesController@show', [$salesinvoice->SalesInvoice->id])}}">{{$salesinvoice->SalesInvoice->si_no}}</a>
Example #12
0
                                                                                                        </li>
                                                                                                        <li>
                                                                                                            <?php 
                            echo countComments($comments, $thr->id);
                            ?>
 Comments
                                                                                                        </li>
                                                                                                        <li>
                                                                                                            Started by <a href="#"><?php 
                            echo user($thr->author)->full_name;
                            ?>
</a>
                                                                                                        </li>
                                                                                                        <li>
                                                                                                            <?php 
                            echo Carbon\Carbon::parse($thr->created_at)->format('d F Y H:i');
                            ?>
                                                                                                        </li>
                                                                                                        <li>
                                                                                                            in <a href="#"><?php 
                            echo $thr->category_name;
                            ?>
</a>
                                                                                                        </li>
                                                                                                        <li>
                                                                                                            Status 
                                                                                                            <?php 
                            if ($thr->status == '0') {
                                echo anchor('#', 'Waiting');
                            } else {
                                echo anchor('#', 'Approved');
Example #13
0
                        {!! Form::text('orders',@$project->orders,array('class'=>'form-control')) !!}
                      </div>
                    </div>
                    <div class="form-group">
                      {!! Form::label('deliver_time', trans('ruban.project.deliver_time'),array('class'=>'col-md-2 control-label')) !!}
                      <div class="col-sm-10">
                        {!! Form::text('deliver_time',@$project->deliver_time,array('class'=>'form-control')) !!}
                      </div>
                    </div>
                    <div class="form-group">
                      {!! Form::label('start_date', trans('ruban.project.start_date'),array('class'=>'col-md-2 control-label')) !!}
                      <div class="col-sm-10">
                      @if(@$project->start_date)
                      <?php 
$start_date = Carbon\Carbon::parse(@$project->start_date)->format('d-m-Y');
$end_date = Carbon\Carbon::parse(@$project->end_date)->format('d-m-Y');
?>
                      @endif
                        {!! Form::text('start_date',@$start_date,array('class'=>'form-control','readonly'=>'readonly')) !!}
                      </div>
                    </div>
                    <div class="form-group">
                      {!! Form::label('end_date', trans('ruban.project.end_date'),array('class'=>'col-md-2 control-label')) !!}
                      <div class="col-sm-10">
                        {!! Form::text('end_date',@$end_date,array('class'=>'form-control','readonly'=>'readonly')) !!}
                      </div>
                    </div>
                    <div class="form-group">
                      {!! Form::label('comments', trans('ruban.project.comments'),array('class'=>'col-md-2 control-label')) !!}
                      <div class="col-sm-10">
                        {!! Form::textarea('comments',@$project->comments,array('class'=>'form-control')) !!}
Example #14
0
/////////////
// Service //
/////////////
$factory(Timegridio\Concierge\Models\Service::class, function (Faker\Generator $faker) {
    return ['business_id' => 'factory:Timegridio\\Concierge\\Models\\Business', 'name' => $faker->sentence(2), 'description' => $faker->paragraph, 'prerequisites' => $faker->paragraph, 'duration' => $faker->randomElement([15, 30, 60, 120])];
});
/////////////
// Vacancy //
/////////////
$factory(Timegridio\Concierge\Models\Vacancy::class, function (Faker\Generator $faker) {
    $date = $faker->dateTimeBetween('today', 'today +7 days')->format('Y-m-d');
    return ['business_id' => 'factory:Timegridio\\Concierge\\Models\\Business', 'service_id' => 'factory:Timegridio\\Concierge\\Models\\Service', 'date' => Carbon\Carbon::parse('today 00:00:00')->timezone('UTC')->toDateString(), 'start_at' => Carbon\Carbon::parse('today 00:00:00')->timezone('UTC')->toDateTimeString(), 'finish_at' => Carbon\Carbon::parse('today 18:00:00')->timezone('UTC')->toDateTimeString(), 'capacity' => 1];
});
/////////////////
// Appointment //
/////////////////
$factory(Timegridio\Concierge\Models\Appointment::class, function (Faker\Generator $faker) {
    return ['business_id' => 'factory:Timegridio\\Concierge\\Models\\Business', 'contact_id' => 'factory:Timegridio\\Concierge\\Models\\Contact', 'service_id' => 'factory:Timegridio\\Concierge\\Models\\Service', 'vacancy_id' => 'factory:Timegridio\\Concierge\\Models\\Vacancy', 'status' => $faker->randomElement(['R', 'C', 'A', 'S']), 'start_at' => Carbon\Carbon::parse(date('Y-m-d 08:00:00', strtotime('today +2 days'))), 'duration' => $faker->randomElement([15, 30, 60, 120]), 'comments' => $faker->sentence];
});
////////////
// Domain //
////////////
$factory(Timegridio\Concierge\Models\Domain::class, function ($faker) {
    return ['slug' => str_slug($faker->name), 'owner_id' => 'factory:Timegridio\\Tests\\Models\\User'];
});
///////////////////
// Humanresource //
///////////////////
$factory(Timegridio\Concierge\Models\Humanresource::class, function ($faker) {
    return ['name' => $faker->name, 'business_id' => 'factory:Timegridio\\Concierge\\Models\\Business'];
});
Example #15
0
    @if(count($errors) > 0)
        <ul class='errors'>
            @foreach ($errors->all() as $error)
                @if ($error != "The date does not match the format n/j/Y.")
                	<li><span class='glyphicon glyphicon-exclamation-sign'></span> {{ $error }}</li>
            	@else
            		<li><span class='glyphicon glyphicon-exclamation-sign'></span> The date does not match the format "m/d/yyyy".</li>
            	@endif
            @endforeach
        </ul>
    @endif

	<form action="/blog/edit" method="POST">
		<input type="hidden" value="{{ csrf_token() }}" name="_token">
		<input type="hidden" name="id" value="{{$post->id}}">
		<input type="text" name="title" value="{{$post->title}}" class="form-control">
		<br>
		<label for="date">Date (m/d/yyyy)</label>
		<script>
			<?php 
$date = Carbon\Carbon::parse($post->date);
$dateFormatted = $date->format('n/j/Y');
?>
		</script>
		<input type="text" name="date" class="form-control" value="{{$dateFormatted}}">
		<br>
		<textarea name="text" class="form-control blog-post">{{$post->text}}</textarea>
		<br>
		<input type="submit" class="btn btn-primary" value="Save">
	</form>
@stop
Example #16
0
 @if(@$card->start_date)
                      <?php 
$start_date = Carbon\Carbon::parse(@$card->start_date)->format('d-m-Y');
$end_date = Carbon\Carbon::parse(@$card->end_date)->format('d-m-Y');
?>
                      @endif
<div class="row">
            <!-- left column -->
           <div class="col-md-12">
              <!-- Horizontal Form -->
              <div class="box box-info">
                <div class="box-header with-border">
                  <h3 class="box-title"></h3>
                </div><!-- /.box-header -->
                <!-- form start -->
                  <div class="box-body">
                  <div class="form-group">
                      {!! Form::label('project_id', trans('ruban.project.stitle'),array('class'=>'col-md-2 control-label')) !!}
                      <div class="col-sm-10">
                        {!! Form::select('project_id',@$projects,@$card->project_id,array('class'=>'form-control')) !!}
                      </div>
                    </div>
                    
                    <div class="form-group">
                      {!! Form::label('name', trans('ruban.card.name'),array('class'=>'col-md-2 control-label')) !!}
                      <div class="col-sm-10">
                        {!! Form::text('name',@$card->name,array('class'=>'form-control')) !!}
                      </div>
                    </div>
                    <div class="form-group">
                      {!! Form::label('camps', trans('ruban.card.camps'),array('class'=>'col-md-2 control-label')) !!}
Example #17
0
 function date_in_range($start_date, $end_date)
 {
     // Convert to timestamp
     $start = Carbon\Carbon::parse($start_date);
     $end = Carbon\Carbon::parse($end_date);
     $now = Carbon\Carbon::now();
     if ($now->lt($start)) {
         return -1;
     } elseif ($now->gt($end)) {
         return 1;
     } else {
         return 0;
     }
 }
Example #18
0
Route::post('forms/question', ['uses' => 'FormsController@question']);
Route::post('forms/get-seller', ['uses' => 'FormsController@getSeller']);
Route::get('news', 'NewsController@index');
Route::get('post/{slug}', 'NewsController@getArticle');
Route::get('ogoloshenia', 'NewsController@getOgoloshenia');
Route::get('lang/{locale}', function ($locale) {
    // Проверяем, что у пользователя выбран доступный язык
    if (in_array($locale, \Config::get('app.locales'))) {
        Session::put('locale', $locale);
        // Устанавливаем его в сессии
    }
    return redirect()->back();
    // Возвращаем пользователя назад
});
Route::get('chan2', function () {
    return Carbon\Carbon::parse(Carbon\Carbon::now())->addMinutes(10)->format('Y-m-d H:i');
});
Route::group(['prefix' => 'uploader', 'nocsrf' => true], function () {
    Route::match(['get', 'post'], '/', 'DashboardController@upload');
});
// Роуты аутентификации
Route::get('auth/login', 'Auth\\AuthController@getLogin');
Route::post('auth/login', 'Auth\\AuthController@postLogin');
Route::get('auth/logout', 'Auth\\AuthController@getLogout');
// Роуты регистрации
Route::post('auth/register', 'Auth\\AuthController@postRegister');
Route::get('auctions/register', 'AuctionsController@getRegister');
//Route::get('auth/register', 'Auth\AuthController@getRegister');
// Роуты запроса ссылки для сброса пароля
Route::get('password/email', 'Auth\\PasswordController@getEmail');
Route::post('password/email', 'Auth\\PasswordController@postEmail');
Example #19
0
			        
			      </tr>
			    </thead>
			    <tbody style="color: black;">


				<?php 
$appointments = DB::table('appointments')->join('patients', 'appointments.patients_id', '=', 'patients.id')->join('doctors', 'appointments.doctors_id', '=', 'doctors.id')->select('appointments.*', 'doctors.name as doctors_name', 'patients.name as patients_name')->orderBy('appointments.schedule', 'desc')->get();
?>

			            @foreach($appointments as $variable)
			              
			            <?php 
$myDay = Carbon\Carbon::parse($variable->schedule)->toDateString();
$myTime = Carbon\Carbon::parse($variable->schedule)->toTimeString();
$today = Carbon\Carbon::now()->toDateString();
if ($myDay == $today) {
    $day = 'Today';
    ?>
			                	<tr>
			               	<td>{{$variable->patients_name}}</td>
			        		<td>{{$variable->doctors_name}}</td>
			        		<td>{{$day.' at '.$myTime}}</td>
			               	<td><a class="btn btn-xs btn-success btn-edit" href="check_in/{{$variable->patients_id}}/{{$variable->doctors_id}}/{{$variable->schedule}}">Check-in</a>
			        		</tr>
			                <?php 
} else {
    $day = $variable->schedule;
}
?>
Example #20
0
				@if ($sales_invoice->status == "Delivered" || $sales_invoice->status == "Collected" || $sales_invoice->status == "Check on Hand")
				<tr>
					<th>Date Delivered</th>
					<td><?php 
echo Carbon\Carbon::parse($sales_invoice->date_delivered)->toFormattedDateString();
?>
</td>
				</tr>
				@endif

				@if ($sales_invoice->status == "Collected")
				<tr>
					<th>Date Collected</th>
					<td><?php 
echo Carbon\Carbon::parse($sales_invoice->date_collected)->toFormattedDateString();
?>
</td>
				</tr>
				

				<tr>
					<th>OR Number</th>
					<td>{{ $sales_invoice['or_number'] }}</td>
				</tr>
				@endif

			</tbody>
		</table>
		<br>
		<h3>Item List</h3><hr>
Example #21
0
 public function testGetTotalDaysAlreadyExpired()
 {
     $progress = new Progress();
     $progress->setStart('2013-01-01');
     $progress->setEnd('2013-12-31');
     $this->assertEquals(Carbon\Carbon::parse(Carbon\Carbon::today())->diffInDays(Carbon\Carbon::parse('2013-01-01')), $progress->getTotalDays());
 }
Example #22
0
    });
    /******* end prefix:api ********/
});
/******* end middeware:auth ********/
get('branch', function () {
    return App\User::with(['bossbranch' => function ($query) {
        $query->select('bossid', 'branchid', 'id')->with(['branch' => function ($query) {
            $query->select('code', 'descriptor', 'id');
        }]);
    }])->get();
});
get('getweek', function () {
    return range(14, 17);
    $arr = [];
    for ($i = 2008; $i < 2021; $i++) {
        $date = Carbon\Carbon::parse($i . '-08-27');
        array_push($arr, ['year' => $i, 'day' => $date->endOfYear()->format('Y-m-d D'), 'week' => $date->endOfYear()->weekOfYear, 'wday' => $date->endOfYear()->dayOfWeek, 'lwoy' => lastWeekOfYear($i)]);
    }
    return $arr;
});
get('dailysales/recompute', function () {
    $dss = App\Models\DailySales::all();
    //$dss = App\Models\DailySales::take(10)->get();
    foreach ($dss as $ds) {
        $headspend = $ds->custcount == '0' ? 0 : $ds->sales / $ds->custcount;
        $tipspct = $ds->sales == '0.00' || $ds->sales == '0' ? 0 : $ds->tips / $ds->sales * 100;
        $mancostpct = $ds->sales == '0.00' || $ds->sales == '0' ? 0 : 650 * $ds->empcount / $ds->sales * 100;
        $cospct = 0;
        if (is_null($ds->cos)) {
            $ds->headspend = number_format($headspend, 2);
            $ds->tipspct = number_format($tipspct, 2);
Example #23
0
						<img src="https://image.eveonline.com/Character/<?php 
    echo $admin->character_id;
    ?>
_64.jpg" />
					</td>
					<td><?php 
    echo $admin->name;
    ?>
</td>
					<td>
                        <span data-toggle="tooltip" data-placement="top" title="<?php 
    echo $admin->updated_at;
    ?>
">
                            <?php 
    echo Carbon\Carbon::parse($admin->updated_at)->diffForHumans();
    ?>
                        </span>
					</td>
					<td>
						<?php 
    echo Modal::named('demote_' . $admin->id)->withTitle('Demote ' . $admin->name)->withButton(Button::danger('demote')->setSize('btn-xs'))->withBody(view('modals.admin_user_info_content')->with('user', $admin)->render());
    ?>
					</td>
				</tr>
			<?php 
}
?>
		</tbody>
	</table>
</div>
Example #24
0
 function c($datetime = null)
 {
     return is_null($datetime) ? Carbon\Carbon::now() : Carbon\Carbon::parse($datetime);
 }
            @foreach ($errors->all() as $error)
                <li><span class='glyphicon glyphicon-exclamation-sign'></span> Birthday does not match the format 'm/d/yyyy'</li>
            @endforeach
        </ul>
    @endif

    <form action="/profile/edit" method="POST">
		<input type="hidden" value="{{ csrf_token() }}" name="_token">
		<label for="name">Name:</label>
		<input type="text" name="name" value="{{$user->name}}" class="form-control">
		<br>
		<label for="birthday">Birthday (m/d/yyyy):</label>
			<!--Convert birthday to display in a more human-readable format-->
			<script>
				<?php 
$bd = Carbon\Carbon::parse($user->birthday);
if ($bd->year != "-0001") {
    $bdDisplay = $bd->format('n/j/Y');
} else {
    $bdDisplay = "";
}
?>
			</script>
		<input type="text" name="birthday" value="{{$bdDisplay}}" class="form-control">
		<br>
		<label for="gender">Gender:</label>
		<input type="text" name="gender" value="{{$user->gender}}" class="form-control">
		<br>
		<label for="pronouns">Pronouns:</label>
		<input type="text" name="pronouns" placeholder="ex. she/her/hers" value="{{$user->pronouns}}" class="form-control">
		<br>
Example #26
0
				<th>Status</th>
			</tr>
		</thead>
		<tbody>
		@foreach ($sales_invoices as $sales_invoice)
				<tr>
					<td>@if ($sales_invoice->si_no == 0) ----- @else {{ $sales_invoice->si_no }} @endif</td>
					<td>{{ $sales_invoice->Client->name }}</td>

					<?php 
$date = Carbon\Carbon::parse($sales_invoice->date)->toFormattedDateString();
?>
					<td>{{ $date }}</td>

					<?php 
$duedate = Carbon\Carbon::parse($sales_invoice->due_date)->toFormattedDateString();
?>
					<td>@if ($sales_invoice->status == "Draft" || $sales_invoice->status == "Pending" || $sales_invoice->Client->payment_terms == "PDC") ----- @else {{ $duedate }} @endif</td>
					<td>{{ number_format($sales_invoice->total_amount, 2) }}</td>
					<td>{{ $sales_invoice->Client->payment_terms}}</td>
					<td>{{ $sales_invoice->status }}</td>
				</tr>
			@endforeach
		</tbody>
	</table>		

	<?php 
echo $sales_invoices->render();
?>

	<table id="form-blades">
?>
_128.jpg" />

			</div>
			<div class="col-md-4">
				<h4><?php 
echo $user->name;
?>
</h4>
				<p>Last login:
				<span data-toggle="tooltip" data-placement="top" title="<?php 
echo $user->updated_at;
?>
">
					<?php 
echo Carbon\Carbon::parse($user->updated_at)->diffForHumans();
?>
				</span></p>
			</div>
		</div>

		<div class="modal-footer">
			<button type="button" class="btn btn-default pull-left" data-dismiss="modal">Close</button>
			<?php 
if (!$user->admin) {
    echo BootForm::open(['route' => ['admin.promote_user', 'id' => $user->id]]);
    echo BootForm::hidden('_action', 'promote_user');
    echo Button::submit()->success()->withValue('Promote');
    echo BootForm::close();
} else {
    echo BootForm::open(['route' => ['admin.demote_user', 'id' => $user->id]]);
Example #28
0
                        <span data-toggle="tooltip" data-placement="top" title="<?php 
    echo $site->updated_at;
    ?>
">
                            <?php 
    echo Carbon\Carbon::parse($site->updated_at)->diffForHumans();
    ?>
                        </span>
                    </td>
                    <td>
                        <span data-toggle="tooltip" data-placement="top" title="<?php 
    echo $site->created_at;
    ?>
">
                            <?php 
    echo Carbon\Carbon::parse($site->created_at)->diffForHumans();
    ?>
                        </span>
                    </td>
                    <td>
                        <?php 
    if ($site->sheet->pilots->where('role', 'Bookmarker')->count() == 1) {
        ?>
                            <span class="label label-info" data-toggle="tooltip" data-placement="top" title="Bookmarked">BM</span>
                        <?php 
    }
    ?>

                        <?php 
    if ($site->sheet->pilots->where('role', 'Defanger')->count() == 1) {
        ?>
Example #29
0
 public function getLedgerMonth($corporationID, $date)
 {
     if (!\Auth::isSuperUser()) {
         if (!in_array($corporationID, Session::get('valid_keys')) && !\Auth::hasAccess('wallet_manager')) {
             App::abort(404);
         }
     }
     // TODO: Add check to ensure corporation exists
     // Parse the date
     $month = Carbon\Carbon::parse($date)->month;
     $year = Carbon\Carbon::parse($date)->year;
     // The overall corporation ledger. We will loop over the wallet divisions
     // and get the ledger calculated for each
     $ledgers = array();
     foreach (EveCorporationCorporationSheetWalletDivisions::where('corporationID', $corporationID)->get() as $division) {
         $ledgers[$division->accountKey] = array('divisionName' => $division->description, 'ledger' => DB::table('corporation_walletjournal')->select('refTypeName', DB::raw('sum(`amount`) `total`'))->leftJoin('eve_reftypes', 'corporation_walletjournal.refTypeID', '=', 'eve_reftypes.refTypeID')->where('corporation_walletjournal.accountKey', $division->accountKey)->where(DB::raw('MONTH(date)'), $month)->where(DB::raw('YEAR(date)'), $year)->where('corporation_walletjournal.corporationID', $corporationID)->groupBy('corporation_walletjournal.refTypeID')->orderBy('refTypeName')->get(), 'total' => DB::table('corporation_walletjournal')->select(DB::raw('sum(`amount`) `total`'))->where('corporation_walletjournal.accountKey', $division->accountKey)->where('corporation_walletjournal.corporationID', $corporationID)->where(DB::raw('MONTH(date)'), $month)->where(DB::raw('YEAR(date)'), $year)->pluck('total'));
     }
     // Tax contributions
     $bounty_tax = DB::table('corporation_walletjournal')->select('ownerID2', 'ownerName2', DB::raw('SUM(corporation_walletjournal.amount) total'))->leftJoin('eve_reftypes', 'corporation_walletjournal.refTypeID', '=', 'eve_reftypes.refTypeID')->whereIn('corporation_walletjournal.refTypeID', array(17, 85))->where(DB::raw('MONTH(date)'), $month)->where(DB::raw('YEAR(date)'), $year)->where('corporation_walletjournal.corporationID', $corporationID)->groupBy('corporation_walletjournal.ownerName2')->orderBy('total', 'desc')->get();
     $mission_tax = DB::table('corporation_walletjournal')->select('ownerID2', 'ownerName2', DB::raw('SUM(corporation_walletjournal.amount) total'))->leftJoin('eve_reftypes', 'corporation_walletjournal.refTypeID', '=', 'eve_reftypes.refTypeID')->whereIn('corporation_walletjournal.refTypeID', array(33, 34))->where(DB::raw('MONTH(date)'), $month)->where(DB::raw('YEAR(date)'), $year)->where('corporation_walletjournal.corporationID', $corporationID)->groupBy('corporation_walletjournal.ownerName2')->orderBy('total', 'desc')->get();
     $pi_tax = DB::table('corporation_walletjournal')->select('ownerID1', 'ownerName1', DB::raw('SUM(corporation_walletjournal.amount) total'))->leftJoin('eve_reftypes', 'corporation_walletjournal.refTypeID', '=', 'eve_reftypes.refTypeID')->whereIn('corporation_walletjournal.refTypeID', array(96, 97, 98))->where(DB::raw('MONTH(date)'), $month)->where(DB::raw('YEAR(date)'), $year)->where('corporation_walletjournal.corporationID', $corporationID)->groupBy('corporation_walletjournal.ownerName1')->orderBy('total', 'desc')->get();
     $incursions_tax = DB::table('corporation_walletjournal')->select('ownerID2', 'ownerName2', DB::raw('SUM(corporation_walletjournal.amount) total'))->leftJoin('eve_reftypes', 'corporation_walletjournal.refTypeID', '=', 'eve_reftypes.refTypeID')->where('corporation_walletjournal.refTypeID', 99)->where('corporation_walletjournal.ownerName1', "CONCORD")->where(DB::raw('MONTH(date)'), $month)->where(DB::raw('YEAR(date)'), $year)->where('corporation_walletjournal.corporationID', $corporationID)->groupBy('corporation_walletjournal.ownerName2')->orderBy('total', 'desc')->get();
     return View::make('corporation.ledger.ajax.ledgermonth')->with('corporationID', $corporationID)->with('date', $date)->with('ledgers', $ledgers)->with('bounty_tax', $bounty_tax)->with('mission_tax', $mission_tax)->with('pi_tax', $pi_tax)->with('incursions_tax', $incursions_tax);
 }
Example #30
0
	
	<table class="table table-hover sortable"> 
		<thead>
			<tr>
				<th>Date</th>
				<th>Duration</th>
				<th>Points</th>
			</tr>
		</thead>
		
		<tbody>
			@foreach ($tambay_points as $tambay_point)
			<tr>
				<?php 
$date = Carbon\Carbon::parse($tambay_point->date)->toFormattedDateString();
?>
				<td>{{ $date }}</td>
				<td>{{ $tambay_point->duration }}</td>
				<td>{{ $tambay_point->point }}</td>
				<td>
					{!! Form::open(['route' => ['members.tambay_points.destroy', $member->id, $tambay_point->id], 'method' => 'delete' ]) !!}
						<a><button class="btn btn-danger">Delete</button></a>
					{!! Form::close() !!}
				</td>
			</tr>
			@endforeach
		</tbody> 
	</table>

	<table>