Пример #1
0
 public function postRepairReportAdd($repair_id)
 {
     $repair = DurableRepair::find($repair_id);
     $repair->repair_opr = Input::get('repair_opr');
     $repair->repair_result = Input::get('repair_result');
     $repair->repair_result_detail1 = Input::get('repair_result_detail1');
     $repair->repair_device_type = Input::get('repair_device_type', '');
     $repair->repair_result_detail3 = Input::get('repair_result_detail3');
     $repair->repair_out = Input::get('repair_out', '0');
     $repair->repair_in = Input::get('repair_in', '0');
     $repair->buy_replace = Input::get('buy_replace', '0');
     $repair->repair_location = Input::get('repair_location');
     $repair->repair_location_name = Input::get('repair_location_name');
     $repair->repair_location_tel = Input::get('repair_location_tel');
     if (Input::has('hdd_repair_date_end')) {
         $repair->repair_date_end = \Helpers\Helper::fromJSDate(Input::get('hdd_repair_date_end'));
     }
     $repair->repair_price_about = Input::get('repair_price_about');
     $repair->repair_out_status = Input::get('repair_out_status');
     $repair->repair_out_problem = Input::get('repair_out_problem');
     $repair->cause_id = Input::get('cause_id');
     $repair->repair_cost = 0;
     if (Input::has('repair_cost')) {
         $repair->repair_cost = Input::get('repair_cost');
     }
     $repair->repair_comment = Input::get('repair_comment');
     $repair->insert_report_date = date("Y-m-d");
     $repair->insert_report_time = date("H:i:s");
     $repair->insert_report_id = Sentry::getUser()->id;
     $repair->repair_status_report = '1';
     $repair->repair_status = Input::get('repair_status');
     $repair->ruin_type = Input::get('ruin_type');
     $repair->symptom = Input::get('symptoms_id');
     $repair->repair_care = Input::get('repair_care');
     $repair->save();
     if ($repair->repair_result == "3" && $repair->repair_out == "1") {
         return Redirect::to('durable/repair-out');
     }
     return Redirect::to('durable/repair-list' . '#' . $repair->repair_id);
 }
Пример #2
0
 public function getSelecthelpdeskpost($a)
 {
     return \Helpers\Helper::fromJSDate($a);
 }
Пример #3
0
 public function date()
 {
     return \Helpers\Helper::convertDateToRussianDateFormat($this->created_at);
 }
Пример #4
0
if ($repair->repair_result == 3 && $repair->repair_out == 1) {
    echo $repair->repair_location_tel;
}
?>
</td>
        <td width="19%" align="left" class="text20">จะแล้วเสร็จประมาณวันที่</td>
        <td width="6%" align="center" class="text22Bold" style="border-bottom:1px dotted;"><?php 
if ($repair->repair_result == 3 && $repair->repair_out == 1) {
    echo $de[2];
}
?>
</td>
        <td width="4%" align="left" class="text20">เดือน</td>
        <td width="12%" align="center" class="text22Bold" style="border-bottom:1px dotted;"><?php 
if ($repair->repair_result == 3 && $repair->repair_out == 1) {
    echo \Helpers\Helper::MonthThai($de[1], true);
}
?>
</td>
        <td width="4%" align="left" class="text20">พ.ศ.</td>
        <td width="7%" align="center" class="text22Bold" style="border-bottom:1px dotted;"><?php 
if ($repair->repair_result == 3 && $repair->repair_out == 1) {
    echo $de[0] + 543;
}
?>
</td>
        <td width="11%" align="left" class="text20">ราคาประมาณ</td>
        <td width="10%" align="center" class="text22Bold" style="border-bottom:1px dotted;"><?php 
if ($repair->repair_result == 3 && $repair->repair_out == 1) {
    echo number_format($repair->repair_price_about);
}
Пример #5
0
 public function postJobDeptNotsummaryExport()
 {
     $ds1 = Helper::fromFullDate(Input::get('ds1'));
     $ds2 = Helper::fromFullDate(Input::get('ds2'));
     $subdept = Input::get('subdept');
     $drepair = DurableRepair::whereBetween('repair_date', array($ds1, $ds2))->select('tb_durable_kind.durable_kind_name', 'tb_durable_repair.repair_cost', 'tb_durable_repair.durable_id', 'tb_sub_dept.sub_dept_name', 'tb_durable.durable_name', 'tb_durable.brand_id', 'tb_durable.durable_model', 'tb_durable.serial_number', 'symptom.symptom_name', 'tb_durable_repair.ruin', 'tb_durable_repair.repair_id', 'tb_technical.technic_name', 'tb_durable_repair.repair_technician_get_date', DB::raw('concat(tb_durable_repair.close_job_date," ",tb_durable_repair.close_job_time) as close_job_date'), DB::raw('datediff(concat(tb_durable_repair.close_job_date," ",tb_durable_repair.close_job_time),tb_durable_repair.repair_technician_get_date) as datediffs'))->leftJoin('tb_durable', 'tb_durable.durable_id', '=', 'tb_durable_repair.durable_id')->leftJoin('tb_sub_dept', 'tb_sub_dept.sub_dept_id', '=', 'tb_durable_repair.sub_dept_id')->leftJoin('symptom', 'symptom.symptom_id', '=', 'tb_durable_repair.symptom')->leftJoin('tb_technical', 'tb_technical.technic_id', '=', 'tb_durable_repair.repair_technician_name')->whereNull('close_job_date')->leftJoin('tb_durable_kind', function ($join) {
         $join->on('tb_durable_kind.durable_kind_id', '=', 'tb_durable.durable_kind_id')->on('tb_durable_kind.durable_type_id', '=', 'tb_durable.durable_type_id');
     });
     if ($subdept != "all") {
         $drepair = $drepair->where('tb_durable_repair.sub_dept_id', '=', $subdept);
     }
     $drepair = $drepair->orderBy('tb_durable_repair.sub_dept_id', 'desc')->get()->toArray();
     if (Input::get('export') == 'excel') {
         $export = 'jobdept_notsummary_excel';
     } else {
         $export = 'jobdept_notsummary_print';
     }
     return View::make('report.' . $export)->with(compact('drepair'))->withInput(Input::all());
 }
Пример #6
0
								</div>
								<label for="repair_location_tel" class="col-sm-1 control-label">โทร</label>
							    <div class="col-sm-2">
									<input type="text" class="form-control" name="repair_location_tel" id="repair_location_tel" value="{{$repair->repair_location_tel}}">
								</div>
						   	</div>
						</div>
						<div class="form-group">
							<div class="validate-group">
								<label for="repair_date_end" class="col-sm-3 control-label">เสร็จประมาณวันที่</label>
							    <div class="col-sm-3">
							    	<?php 
$repair_date_end = "";
if ($repair->repair_date_end != "" && $repair->repair_date_end != '0000-00-00') {
    $cdate = \Carbon\Carbon::createFromFormat('Y-m-d', $repair->repair_date_end);
    $repair_date_end = $cdate->day . " " . \Helpers\Helper::MonthThai($cdate->month, true) . " " . ($cdate->year + 543);
}
?>
									<input type="text" class="form-control datepickers" name="repair_date_end" id="repair_date_end" value="{{$repair_date_end}}">
								</div>
								<label for="repair_price_about" class="col-sm-1 control-label">ราคาประมาณ </label>
							    <div class="col-sm-2">
									<input type="text" class="form-control" name="repair_price_about" id="repair_price_about" value="{{$repair->repair_price_about}}">
								</div>
						   	</div>
						</div>
						<div class="form-group">
							<div class="repair_location_name-group">
								<label for="ruin" class="col-sm-3 control-label">ชื่อผู้ติดต่อ</label>
							    <div class="col-sm-3">
									<input type="text" class="form-control" name="repair_location_name" id="repair_location_name" value="{{$repair->repair_location_name}}">
Пример #7
0
    <p></p>


@if ($posts)
    <?php 
$month = "";
$year = "";
?>
    @foreach ($posts as $post)
        <?php 
$date = date_parse($post->created_at);
if ($date['year'] != $year) {
    $year = $date['year'];
    echo '<h2>' . $year . '</h2>';
}
if ($date['month'] != $month) {
    $month = $date['month'];
    echo '<h3>' . \Helpers\Helper::convertMonthToRussianMonthNameSingle($month) . '</h3>';
}
?>
        <p>
            <a href="{{ action('PostController@show', $post->id) }}">{{ $post->title }}</a>
        </p>
    @endforeach
</article>
@else
    </article>
    <div class="alert alert-danger">{{ trans('post.not_found') }}</div>
@endif
@stop
Пример #8
0
function FormatDateShort($str)
{
    return \Helpers\Helper::toDateThai($str);
}
 public function replyMail($mee, $subject, $film, $review)
 {
     $me = User::where('id', $mee)->first();
     $user = User::where('id', $subject)->first();
     $movie = Movie::where('fl_id', $film)->first();
     if ($movie->fl_image) {
         $filmImage = 'http://www.berdict.com/public/uploads/movie/' . $movie->fl_year . '/' . $movie->fl_image;
     } else {
         $filmImage = 'http://www.berdict.com/public/berdict/img/default_poster.jpg';
     }
     $filmUrl = 'http://www.berdict.com/movie/' . $movie->fl_id . '/' . \Helpers\Helper::cleanUrl($movie->fl_name);
     $subjectEmail = $user->usr_email;
     $subjectName = $user->usr_fname . ' ' . $user->usr_lname;
     $emailSubject = 'Hey ' . $user->usr_fname . '! ' . $me->usr_fname . ' ' . $me->usr_lname . ' replied to your review for ' . $movie->fl_name;
     $data = array('subjectName' => $user->usr_fname, 'filmName' => $movie->fl_name, 'filmYear' => $movie->fl_year, 'filmUrl' => $filmUrl, 'filmImage' => $filmImage, 'filmReview' => $review->fr_review, 'reviewId' => $review->fr_id, 'objectId' => $me->id, 'objectName' => $me->usr_fname . ' ' . $me->usr_lname, 'objectUsername' => $me->username, 'filmName' => $movie->fl_name);
     Mail::later(10, 'emails.reply', $data, function ($message) use($subjectEmail, $subjectName, $emailSubject) {
         $message->to($subjectEmail, $subjectName);
         $message->subject($emailSubject);
         $message->from('*****@*****.**', 'Berdict');
     });
 }