当前位置: 首页>>代码示例>>PHP>>正文


PHP Pool::find方法代码示例

本文整理汇总了PHP中Pool::find方法的典型用法代码示例。如果您正苦于以下问题:PHP Pool::find方法的具体用法?PHP Pool::find怎么用?PHP Pool::find使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Pool的用法示例。


在下文中一共展示了Pool::find方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: post_exphutangarmada

 public function post_exphutangarmada()
 {
     $input = Input::all();
     $shift = 'all';
     $saldohutangbymonth = $this->allQuery($input['date'], Auth::user()->pool_id, $shift, 0, 1000);
     if ($saldohutangbymonth) {
         $objPHPExcel = new PHPExcel();
         $objPHPExcel->getProperties()->setCreator(Auth::user()->fullname)->setLastModifiedBy(Auth::user()->fullname)->setTitle("Laporan Harian " . Pool::find(Auth::user()->pool_id)->pool_name . '-' . date('Y-m-d'))->setSubject("Laporan Harian " . Pool::find(Auth::user()->pool_id)->pool_name . '-' . date('Y-m-d'))->setDescription("Laporan harian operasi pool")->setKeywords("Laporan Harian")->setCategory("");
         $styleArray = array('font' => array('bold' => true, 'color' => array('rgb' => 'FF0000'), 'size' => 16));
         $sheet_active = 0;
         $objPHPExcel->createSheet(NULL, $sheet_active);
         $objPHPExcel->setActiveSheetIndex($sheet_active);
         //title
         $objPHPExcel->getActiveSheet()->mergeCells('A2:J2');
         $objPHPExcel->getActiveSheet()->setCellValue('A2', 'LAPORAN HUTANG ARMADA PER TANGGAL ' . Myfungsi::fulldate(strtotime($input['date'])));
         $objPHPExcel->getActiveSheet()->getStyle('A2')->applyFromArray($styleArray);
         // Coloum header
         $objPHPExcel->getActiveSheet()->mergeCells('A5:A6');
         $objPHPExcel->getActiveSheet()->mergeCells('B5:B6');
         $objPHPExcel->getActiveSheet()->mergeCells('C5:D5');
         $objPHPExcel->getActiveSheet()->mergeCells('E5:E6');
         $objPHPExcel->getActiveSheet()->mergeCells('F5:I5');
         $objPHPExcel->getActiveSheet()->mergeCells('J5:L5');
         $objPHPExcel->getActiveSheet()->mergeCells('M5:O5');
         $objPHPExcel->getActiveSheet()->setCellValue('A5', 'NO');
         $objPHPExcel->getActiveSheet()->setCellValue('B5', 'BAPAK ASUH');
         $objPHPExcel->getActiveSheet()->setCellValue('C5', 'PENGEMUDI');
         $objPHPExcel->getActiveSheet()->setCellValue('C6', 'NIP');
         $objPHPExcel->getActiveSheet()->setCellValue('D6', 'NAMA');
         $objPHPExcel->getActiveSheet()->setCellValue('E5', 'BODY');
         $objPHPExcel->getActiveSheet()->setCellValue('F5', 'PEMAKAIAN SPAREPART ARMADA');
         $objPHPExcel->getActiveSheet()->setCellValue('F6', 'PEMAKAIAN');
         $objPHPExcel->getActiveSheet()->setCellValue('G6', 'TABUNGAN');
         $objPHPExcel->getActiveSheet()->setCellValue('H6', 'BAYAR');
         $objPHPExcel->getActiveSheet()->setCellValue('I6', 'SELISIH');
         $objPHPExcel->getActiveSheet()->setCellValue('J5', 'SETORAN ARMADA');
         $objPHPExcel->getActiveSheet()->setCellValue('J6', 'KS');
         $objPHPExcel->getActiveSheet()->setCellValue('K6', 'BAYAR KS');
         $objPHPExcel->getActiveSheet()->setCellValue('L6', 'SELISIH');
         $objPHPExcel->getActiveSheet()->setCellValue('M5', 'SALDO ARMADA');
         $objPHPExcel->getActiveSheet()->setCellValue('M6', 'SALDO SPAREPART');
         $objPHPExcel->getActiveSheet()->setCellValue('N6', 'SALDO KS');
         $objPHPExcel->getActiveSheet()->setCellValue('O6', 'SALDO AKHIR');
         $objPHPExcel->getActiveSheet()->setCellValue('P5', 'SHIFT');
         $no = 1;
         $starline = 8;
         foreach ($saldohutangbymonth as $saldo) {
             $bpkasuh = Anakasuh::where('status', '=', 1)->where('fleet_id', '=', $saldo->fleet_id)->first();
             $bravo = Driver::find($saldo->bravo_driver_id);
             $saldosp = $saldo->tabungan_sparepart + $saldo->hutang_dp_sparepart + $saldo->cicilan_sparepart - $saldo->pemakaian_part;
             $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(0, $starline, $no);
             $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(1, $starline, $bpkasuh ? User::find($bpkasuh->user_id)->fullname : 'TIDAK ADA BAPAK ASUH');
             $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(2, $starline, $bravo ? $bravo->nip : 'NONE');
             $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(3, $starline, $bravo ? $bravo->name : 'NONE');
             $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(4, $starline, $saldo->taxi_number);
             //pemakaikan sp
             $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(5, $starline, $saldo->pemakaian_part);
             $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(6, $starline, $saldo->tabungan_sparepart);
             $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(7, $starline, $saldo->hutang_dp_sparepart + $saldo->cicilan_sparepart);
             $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(8, $starline, $saldosp);
             //setoran armada
             $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(9, $starline, $saldo->ks);
             $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(10, $starline, $saldo->cicilan_ks);
             $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(11, $starline, $saldo->selisi_ks);
             //saldo armada
             $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(12, $starline, $saldosp);
             $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(13, $starline, $saldo->selisi_ks);
             $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(14, $starline, $saldosp + $saldo->selisi_ks);
             $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(15, $starline, $saldo->shift_id);
             $no++;
             $starline++;
         }
         $objPHPExcel->getActiveSheet()->getStyle('A5:O' . ($starline + 1))->getBorders()->getAllBorders()->setBorderStyle(PHPExcel_Style_Border::BORDER_HAIR);
         $objPHPExcel->getActiveSheet()->getStyle('A5:O6')->getBorders()->getAllBorders()->setBorderStyle(PHPExcel_Style_Border::BORDER_THIN);
         $objPHPExcel->getActiveSheet()->getStyle('A5:O' . ($starline + 1))->getBorders()->getOutline()->setBorderStyle(PHPExcel_Style_Border::BORDER_THIN);
         $objPHPExcel->getActiveSheet()->getStyle('A' . ($starline + 1) . ':O' . ($starline + 1))->getBorders()->getAllBorders()->setBorderStyle(PHPExcel_Style_Border::BORDER_THIN);
         //end
         //SET TANGGAL UNDUH DAN PASSWORD
         $objPHPExcel->getActiveSheet()->setCellValue('B' . ($starline + 10), 'Tanggal Unduh');
         $objPHPExcel->getActiveSheet()->setCellValue('C' . ($starline + 10), ':');
         $objPHPExcel->getActiveSheet()->setCellValue('D' . ($starline + 10), date('Y-m-d H:i:s'));
         $objPHPExcel->getSecurity()->setLockWindows(true);
         $objPHPExcel->getSecurity()->setLockStructure(true);
         $objPHPExcel->getSecurity()->setWorkbookPassword("FreeBlocking");
         $objPHPExcel->getActiveSheet()->getProtection()->setPassword('FreeBlocking');
         $objPHPExcel->getActiveSheet()->getProtection()->setSheet(true);
         // This should be enabled in order to enable any of the following!
         //$objPHPExcel->getActiveSheet()->getProtection()->setSort(true);
         $objPHPExcel->getActiveSheet()->getProtection()->setInsertRows(true);
         //END
         $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
         $objWriter->save(path('public') . 'Laporan-hutang-armada.xls');
         return Response::download(path('public') . 'Laporan-hutang-armada.xls');
     }
     //end if
     //var_dump($saldohutangbymonth);
 }
开发者ID:acmadi,项目名称:diantaksi,代码行数:97,代码来源:reportops.php

示例2: required_params

<?php

required_params('id');
$pool = Pool::find(Request::$params->id);
if (!$pool->can_be_updated_by(User::$current)) {
    access_denied();
}
if (Request::$post) {
    foreach (Request::$params->pool_post_sequence as $i => $seq) {
        PoolPost::update($i, array('sequence' => $seq));
    }
    $pool->reload();
    $pool->update_pool_links();
    notice("Ordering updated");
    // flash[:notice] = "Ordering updated"
    redirect_to('#show', array('id' => Request::$params->id));
} else {
    $pool_posts = $pool->pool_posts;
}
开发者ID:laiello,项目名称:my-imouto-booru,代码行数:19,代码来源:order.php

示例3: get_expreportdaily

 public function get_expreportdaily($date = false, $user_id = false)
 {
     if (!$date) {
         $date = date('Y-m-d');
     }
     if (!$user_id) {
         $user_id = Auth::user()->id;
     }
     $anakasu = Anakasuh::where('user_id', '=', $user_id)->where('status', '=', 1)->get();
     if (!$anakasu) {
         return false;
     }
     $fleets = array();
     foreach ($anakasu as $fleet) {
         array_push($fleets, $fleet->fleet_id);
     }
     $financials = DB::table('financial_report_daily')->where_in('fleet_id', $fleets)->where('operasi_time', '=', $date)->where_pool_id(Auth::user()->pool_id)->order_by('taxi_number', 'asc')->get();
     $objPHPExcel = new PHPExcel();
     $objPHPExcel->getProperties()->setCreator(Auth::user()->fullname)->setLastModifiedBy(Auth::user()->fullname)->setTitle("Laporan Harian " . Pool::find(Auth::user()->pool_id)->pool_name)->setSubject("Laporan Harian " . Pool::find(Auth::user()->pool_id)->pool_name)->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.")->setKeywords("Laporan Harian")->setCategory("");
     $objPHPExcel->setActiveSheetIndex(0);
     $objPHPExcel->getActiveSheet()->mergeCells('A5:A6');
     $objPHPExcel->getActiveSheet()->mergeCells('B5:B6');
     $objPHPExcel->getActiveSheet()->mergeCells('C5:D5');
     $objPHPExcel->getActiveSheet()->mergeCells('E5:E6');
     $objPHPExcel->getActiveSheet()->mergeCells('F5:G5');
     $objPHPExcel->getActiveSheet()->mergeCells('H5:H6');
     $objPHPExcel->getActiveSheet()->mergeCells('I5:I6');
     $objPHPExcel->getActiveSheet()->mergeCells('J5:J6');
     $objPHPExcel->getActiveSheet()->mergeCells('K5:K6');
     $objPHPExcel->getActiveSheet()->mergeCells('L5:O5');
     $objPHPExcel->getActiveSheet()->mergeCells('P5:R5');
     //$objPHPExcel->getActiveSheet()->mergeCells('R5:R6');
     $objPHPExcel->getActiveSheet()->mergeCells('S5:S6');
     $objPHPExcel->getActiveSheet()->mergeCells('T5:T6');
     $objPHPExcel->getActiveSheet()->mergeCells('U5:U6');
     $objPHPExcel->getActiveSheet()->mergeCells('V5:V6');
     $objPHPExcel->getActiveSheet()->mergeCells('W5:W6');
     $objPHPExcel->getActiveSheet()->setCellValue('A5', 'NO');
     $objPHPExcel->getActiveSheet()->setCellValue('B5', 'BAPAK ASUH');
     $objPHPExcel->getActiveSheet()->setCellValue('C5', 'PENGEMUDI');
     $objPHPExcel->getActiveSheet()->setCellValue('C6', 'NIP');
     $objPHPExcel->getActiveSheet()->setCellValue('D6', 'NAMA');
     $objPHPExcel->getActiveSheet()->setCellValue('E5', 'BODY');
     $objPHPExcel->getActiveSheet()->setCellValue('F5', 'STATUS');
     $objPHPExcel->getActiveSheet()->setCellValue('F6', 'OPS');
     $objPHPExcel->getActiveSheet()->setCellValue('G6', 'BS');
     $objPHPExcel->getActiveSheet()->setCellValue('H5', 'SETORAN MURNI');
     $objPHPExcel->getActiveSheet()->setCellValue('I5', 'TAB SPAREPART');
     $objPHPExcel->getActiveSheet()->setCellValue('J5', 'DENDA JAM');
     $objPHPExcel->getActiveSheet()->setCellValue('K5', 'DP SPAREPART');
     $objPHPExcel->getActiveSheet()->setCellValue('L5', 'BAYAR  CICILAN');
     $objPHPExcel->getActiveSheet()->setCellValue('L6', 'KS');
     $objPHPExcel->getActiveSheet()->setCellValue('M6', 'S-PART');
     $objPHPExcel->getActiveSheet()->setCellValue('N6', 'DP-KSO');
     $objPHPExcel->getActiveSheet()->setCellValue('O6', 'HUT-LAMA');
     $objPHPExcel->getActiveSheet()->setCellValue('P5', 'BAYAR');
     $objPHPExcel->getActiveSheet()->setCellValue('P6', 'STIKER BANDARA');
     $objPHPExcel->getActiveSheet()->setCellValue('Q6', 'CUCI');
     $objPHPExcel->getActiveSheet()->setCellValue('R6', 'LAKA');
     $objPHPExcel->getActiveSheet()->setCellValue('S5', 'HARUS SETOR');
     $objPHPExcel->getActiveSheet()->setCellValue('T5', 'POTONGAN');
     $objPHPExcel->getActiveSheet()->setCellValue('U5', 'SETOR CASH');
     $objPHPExcel->getActiveSheet()->setCellValue('V5', 'KETEKORAN');
     $objPHPExcel->getActiveSheet()->setCellValue('W5', 'KETERANGAN');
     $no = 1;
     $starline = 8;
     foreach ($financials as $finan) {
         $bs = $finan->potongan >= $finan->setoran_wajib ? 'YA' : 'TIDAK';
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(0, $starline, $no);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(1, $starline, '');
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(2, $starline, $finan->nip);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(3, $starline, $finan->name);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(4, $starline, $finan->taxi_number);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(5, $starline, $finan->kode);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(6, $starline, $bs);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(7, $starline, $finan->setoran_wajib);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(8, $starline, $finan->tabungan_sparepart);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(9, $starline, $finan->denda);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(10, $starline, $finan->hutang_dp_sparepart);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(11, $starline, $finan->cicilan_ks);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(12, $starline, $finan->cicilan_sparepart);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(13, $starline, $finan->cicilan_dp_kso);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(14, $starline, $finan->cicilan_hutang_lama);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(15, $starline, $finan->cicilan_lain);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(16, $starline, $finan->biaya_cuci);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(17, $starline, $finan->iuran_laka);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(18, $starline, '=SUM(H' . $starline . ':R' . $starline . ')');
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(19, $starline, $finan->potongan);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(20, $starline, $finan->setoran_cash);
         //$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(20, $starline, $finan->ks);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(21, $starline, '=(U' . $starline . '-(S' . $starline . '-T' . $starline . '))');
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(22, $starline, '');
         //$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(14, $starline, $finan->cicilan_lain);
         $no++;
         $starline++;
     }
     $objPHPExcel->getActiveSheet()->mergeCells('A' . ($starline + 1) . ':G' . ($starline + 1) . '');
     $objPHPExcel->getActiveSheet()->setCellValue('A' . ($starline + 1), 'TOTAL SETORAN ');
     $objPHPExcel->getActiveSheet()->setCellValue('H' . ($starline + 1), '=SUM(H8:H' . $starline . ')');
     $objPHPExcel->getActiveSheet()->setCellValue('I' . ($starline + 1), '=SUM(I8:I' . $starline . ')');
//.........这里部分代码省略.........
开发者ID:acmadi,项目名称:diantaksi,代码行数:101,代码来源:anakasuh.php

示例4: transferMetadata

 public function transferMetadata()
 {
     $this->to = Pool::find($this->params()->to);
     if (!$this->params()->from) {
         $this->from = null;
         return;
     }
     $this->from = Pool::find($this->params()->from);
     $from_posts = $this->from->pool_posts;
     $to_posts = $this->to->pool_posts;
     if ($from_posts->size() == $to_posts->size()) {
         $this->truncated = false;
     } else {
         $this->truncated = true;
         $min_posts = min($from_posts->size(), $to_posts->size());
         $from_posts = $from_posts->slice(0, $min_posts);
         $to_posts = $to_posts->slice(0, $min_posts);
     }
     $this->posts = Post::emptyCollection();
     foreach ($from_posts as $k => $v) {
         $data = [];
         $from = $v->post;
         $to = $to_posts[$k]->post;
         $data['from'] = $from;
         $data['to'] = $to;
         $from_tags = $from->tags;
         $to_tags = $to->tags;
         $tags = $from_tags;
         if ($from->rating != $to->rating) {
             $tags[] = 'rating:' . $to->rating;
         }
         if ($from->is_shown_in_index != $to->is_shown_in_index) {
             $tags[] = $from->is_shown_in_index ? 'show' : 'hide';
         }
         if ($from->parent_id != $to->id) {
             $tags[] = 'child:' . $from->id;
         }
         $data['tags'] = implode(' ', $tags);
         $this->posts[] = $data;
     }
 }
开发者ID:JCQS04,项目名称:myimouto,代码行数:41,代码来源:PoolController.php

示例5: create_page_params

<?php

create_page_params(true);
required_params('id');
if (isset(Request::$params->samples) && Request::$params->samples == 0) {
    unset(Request::$params->samples);
}
$pool = Pool::find(array(Request::$params->id));
if (!$pool) {
    return 404;
}
$browse_mode = User::$current->pool_browse_mode;
// $q = Tag::parse_query("");
$q = array();
$q['pool'] = (int) Request::$params->id;
$q['show_deleted_only'] = false;
if ($browse_mode == 1) {
    $q['limit'] = 1000;
    $q['order'] = "portrait_pool";
} else {
    $q['limit'] = 24;
}
// $count = Post::count_by_sql(Post::generate_sql($q, array('from_api' => true, 'count' => true)));
// WillPaginate::Collection.new(params[:page], q[:limit], count)
$sql = Post::generate_sql($q, array('from_api' => true, 'offset' => $offset, 'limit' => $pagination_limit));
$posts = Post::find_by_sql(array($sql), array('calc_rows' => 'found_posts'));
calc_pages();
set_title($pool->pretty_name());
switch (Request::$format) {
    case 'json':
        render('json', $pool->to_json());
开发者ID:laiello,项目名称:my-imouto-booru,代码行数:31,代码来源:show.php

示例6: get_downloadformat

 public function get_downloadformat($date = false)
 {
     if (!$date) {
         $date = date('Y-m-d');
     }
     $financials = DB::table('financial_report_daily')->where('operasi_time', '=', $date)->where_pool_id(Auth::user()->pool_id)->order_by('taxi_number', 'asc')->get();
     $objPHPExcel = new PHPExcel();
     $objPHPExcel->getProperties()->setCreator(Auth::user()->fullname)->setLastModifiedBy(Auth::user()->fullname)->setTitle("Laporan Harian " . Pool::find(Auth::user()->pool_id)->pool_name)->setSubject("Laporan Harian " . Pool::find(Auth::user()->pool_id)->pool_name)->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.")->setKeywords("Laporan Harian")->setCategory("");
     $objPHPExcel->setActiveSheetIndex(0);
     $objPHPExcel->getActiveSheet()->mergeCells('A5:A6');
     $objPHPExcel->getActiveSheet()->mergeCells('B5:B6');
     $objPHPExcel->getActiveSheet()->mergeCells('C5:D5');
     $objPHPExcel->getActiveSheet()->mergeCells('E5:E6');
     $objPHPExcel->getActiveSheet()->mergeCells('F5:G5');
     $objPHPExcel->getActiveSheet()->mergeCells('H5:H6');
     $objPHPExcel->getActiveSheet()->mergeCells('I5:I6');
     $objPHPExcel->getActiveSheet()->mergeCells('J5:J6');
     $objPHPExcel->getActiveSheet()->mergeCells('K5:K6');
     $objPHPExcel->getActiveSheet()->mergeCells('L5:O5');
     $objPHPExcel->getActiveSheet()->mergeCells('P5:R5');
     $objPHPExcel->getActiveSheet()->mergeCells('S5:S6');
     $objPHPExcel->getActiveSheet()->mergeCells('T5:T6');
     $objPHPExcel->getActiveSheet()->mergeCells('U5:U6');
     $objPHPExcel->getActiveSheet()->mergeCells('V5:V6');
     $objPHPExcel->getActiveSheet()->mergeCells('W5:W6');
     $objPHPExcel->getActiveSheet()->setCellValue('A5', 'NO');
     $objPHPExcel->getActiveSheet()->setCellValue('B5', 'ID CHECKIN');
     $objPHPExcel->getActiveSheet()->setCellValue('C5', 'PENGEMUDI');
     $objPHPExcel->getActiveSheet()->setCellValue('C6', 'NIP');
     $objPHPExcel->getActiveSheet()->setCellValue('D6', 'NAMA');
     $objPHPExcel->getActiveSheet()->setCellValue('E5', 'BODY');
     $objPHPExcel->getActiveSheet()->setCellValue('F5', 'STATUS');
     $objPHPExcel->getActiveSheet()->setCellValue('F6', 'OPS');
     $objPHPExcel->getActiveSheet()->setCellValue('G6', 'BS');
     $objPHPExcel->getActiveSheet()->setCellValue('H5', 'SETORAN MURNI');
     $objPHPExcel->getActiveSheet()->setCellValue('I5', 'TAB SPAREPART');
     $objPHPExcel->getActiveSheet()->setCellValue('J5', 'DENDA JAM');
     $objPHPExcel->getActiveSheet()->setCellValue('K5', 'DP SPAREPART');
     $objPHPExcel->getActiveSheet()->setCellValue('L5', 'BAYAR  CICILAN');
     $objPHPExcel->getActiveSheet()->setCellValue('L6', 'KS');
     $objPHPExcel->getActiveSheet()->setCellValue('M6', 'S-PART');
     $objPHPExcel->getActiveSheet()->setCellValue('N6', 'DP-KSO');
     $objPHPExcel->getActiveSheet()->setCellValue('O6', 'HUT-LAMA');
     $objPHPExcel->getActiveSheet()->setCellValue('P5', 'BAYAR');
     $objPHPExcel->getActiveSheet()->setCellValue('P6', 'STIKER BANDARA');
     $objPHPExcel->getActiveSheet()->setCellValue('Q6', 'CUCI');
     $objPHPExcel->getActiveSheet()->setCellValue('R6', 'LAKA');
     $objPHPExcel->getActiveSheet()->setCellValue('S5', 'HARUS SETOR');
     $objPHPExcel->getActiveSheet()->setCellValue('T5', 'POTONGAN');
     $objPHPExcel->getActiveSheet()->setCellValue('U5', 'SETOR CASH');
     $objPHPExcel->getActiveSheet()->setCellValue('V5', 'KETEKORAN');
     $objPHPExcel->getActiveSheet()->setCellValue('W5', 'KETERANGAN');
     $no = 1;
     $starline = 8;
     foreach ($financials as $finan) {
         $bs = $finan->potongan >= $finan->setoran_wajib ? 'YA' : 'TIDAK';
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(0, $starline, $no);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(1, $starline, $finan->id);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(2, $starline, $finan->nip);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(3, $starline, $finan->name);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(4, $starline, $finan->taxi_number);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(5, $starline, $finan->kode);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(6, $starline, $bs);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(7, $starline, $finan->setoran_wajib);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(8, $starline, $finan->tabungan_sparepart);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(9, $starline, $finan->denda);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(10, $starline, $finan->hutang_dp_sparepart);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(11, $starline, $finan->cicilan_ks);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(12, $starline, $finan->cicilan_sparepart);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(13, $starline, $finan->cicilan_dp_kso);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(14, $starline, $finan->cicilan_hutang_lama);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(15, $starline, $finan->cicilan_lain);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(16, $starline, $finan->biaya_cuci);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(17, $starline, $finan->iuran_laka);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(18, $starline, '=SUM(H' . $starline . ':R' . $starline . ')');
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(19, $starline, $finan->potongan);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(20, $starline, $finan->setoran_cash);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(21, $starline, '=(U' . $starline . '-(S' . $starline . '-T' . $starline . '))');
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(22, $starline, '');
         $no++;
         $starline++;
     }
     $objPHPExcel->getActiveSheet()->getStyle('A5:W' . $starline)->getBorders()->getAllBorders()->setBorderStyle(PHPExcel_Style_Border::BORDER_HAIR);
     $objPHPExcel->getActiveSheet()->getStyle('A5:W6')->getBorders()->getAllBorders()->setBorderStyle(PHPExcel_Style_Border::BORDER_THIN);
     $objPHPExcel->getActiveSheet()->getStyle('A5:W' . $starline)->getBorders()->getOutline()->setBorderStyle(PHPExcel_Style_Border::BORDER_THIN);
     $objPHPExcel->getActiveSheet()->getStyle('A' . $starline . ':W' . $starline)->getBorders()->getAllBorders()->setBorderStyle(PHPExcel_Style_Border::BORDER_THIN);
     $objPHPExcel->getActiveSheet()->setTitle('Laporan Harian Tgl ' . $date);
     $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
     //echo path('public');
     $objWriter->save(path('public') . 'format_uload.xlsx');
     return Response::download(path('public') . 'format_uload.xlsx');
 }
开发者ID:acmadi,项目名称:diantaksi,代码行数:92,代码来源:tools.php

示例7: post_bkbexport

 public function post_bkbexport()
 {
     $data = Input::json();
     $lists = DB::table('wo_listparts')->where('inserted_date_set', '>=', $data->start)->where('inserted_date_set', '<=', $data->end)->where('pool_id', '=', Auth::user()->pool_id)->get();
     $objPHPExcel = new PHPExcel();
     $objPHPExcel->getProperties()->setCreator(Auth::user()->fullname)->setLastModifiedBy(Auth::user()->fullname)->setTitle("Laporan Harian " . Pool::find(Auth::user()->pool_id)->pool_name . '-' . date('Y-m-d'))->setSubject("Laporan Harian " . Pool::find(Auth::user()->pool_id)->pool_name . '-' . date('Y-m-d'))->setDescription("Laporan harian operasi pool")->setKeywords("Laporan Harian")->setCategory("");
     $objPHPExcel->createSheet(NULL, 0);
     $objPHPExcel->setActiveSheetIndex(0);
     $objPHPExcel->getActiveSheet()->setCellValue('A1', 'NO');
     $objPHPExcel->getActiveSheet()->setCellValue('B1', 'TANGGAL');
     $objPHPExcel->getActiveSheet()->setCellValue('C1', 'NOMOR WO');
     $objPHPExcel->getActiveSheet()->setCellValue('D1', 'NOMOR SPAREPART');
     $objPHPExcel->getActiveSheet()->setCellValue('E1', 'NAMA');
     $objPHPExcel->getActiveSheet()->setCellValue('F1', 'BODY');
     $objPHPExcel->getActiveSheet()->setCellValue('G1', 'QTY');
     $objPHPExcel->getActiveSheet()->setCellValue('H1', 'SATUAN');
     $no = 1;
     $starline = 2;
     foreach ($lists as $ls) {
         $fleetname = '';
         if (Fleet::find($ls->fleet_id)) {
             $fleetname = Fleet::find($ls->fleet_id)->taxi_number;
         }
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(0, $starline, $no);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(1, $starline, date('d/m/Y', strtotime($ls->inserted_date_set)));
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(2, $starline, $ls->wo_number);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(3, $starline, "'" . $ls->part_number);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(4, $starline, $ls->name_sparepart);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(5, $starline, $fleetname);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(6, $starline, $ls->qty);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(7, $starline, $ls->satuan);
         $no++;
         $starline++;
     }
     $objPHPExcel->getActiveSheet()->getStyle('A1:H' . ($starline + 1))->getBorders()->getAllBorders()->setBorderStyle(PHPExcel_Style_Border::BORDER_HAIR);
     $objPHPExcel->getActiveSheet()->getStyle('A1:H1')->getBorders()->getAllBorders()->setBorderStyle(PHPExcel_Style_Border::BORDER_THIN);
     $objPHPExcel->getActiveSheet()->getStyle('A1:H' . ($starline + 1))->getBorders()->getOutline()->setBorderStyle(PHPExcel_Style_Border::BORDER_THIN);
     $objPHPExcel->getActiveSheet()->getStyle('A' . ($starline + 1) . ':H' . ($starline + 1))->getBorders()->getAllBorders()->setBorderStyle(PHPExcel_Style_Border::BORDER_THIN);
     $objPHPExcel->getActiveSheet()->setTitle('Laporan');
     $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
     $objWriter->save(path('public') . 'Laporan-BKB' . date('Y-m-d') . '.xls');
     return json_encode(array('url' => 'Laporan-BKB' . date('Y-m-d') . '.xls'));
 }
开发者ID:acmadi,项目名称:diantaksi,代码行数:43,代码来源:warehouses.php

示例8: get_downloadreportbs

 public function get_downloadreportbs($date = false)
 {
     if (!$date) {
         $date = date('Y-m-d');
     }
     $ksos = Kso::where('pool_id', '=', Auth::user()->pool_id)->where('actived', '=', 1)->get();
     $ksoaktif = array();
     foreach ($ksos as $xkso) {
         $ksoaktif[] = $xkso->id;
     }
     $financials = DB::table('financial_report_monthly_bykso')->where('month', '=', date('n', strtotime($date)))->where('year', '=', date('Y', strtotime($date)))->where_pool_id(Auth::user()->pool_id)->where_in('kso_id', $ksoaktif)->order_by('taxi_number', 'asc')->get();
     $objPHPExcel = new PHPExcel();
     $objPHPExcel->getProperties()->setCreator(Auth::user()->fullname)->setLastModifiedBy(Auth::user()->fullname)->setTitle("Laporan Harian " . Pool::find(Auth::user()->pool_id)->pool_name . '-' . date('Y-m-d'))->setSubject("Laporan Harian " . Pool::find(Auth::user()->pool_id)->pool_name . '-' . date('Y-m-d'))->setDescription("Laporan harian operasi pool")->setKeywords("Laporan Harian")->setCategory("");
     $objPHPExcel->createSheet(NULL, 0);
     $objPHPExcel->setActiveSheetIndex(0);
     //$objPHPExcel->getActiveSheet()->getColumnDimension('C')->setVisible(false);
     //$objPHPExcel->getActiveSheet()->getColumnDimension('D')->setVisible(false);
     $objPHPExcel->getActiveSheet()->mergeCells('A5:A6');
     $objPHPExcel->getActiveSheet()->mergeCells('B5:B6');
     $objPHPExcel->getActiveSheet()->mergeCells('C5:D5');
     $objPHPExcel->getActiveSheet()->mergeCells('E5:E6');
     $objPHPExcel->getActiveSheet()->mergeCells('F5:G5');
     $objPHPExcel->getActiveSheet()->mergeCells('H5:H6');
     $objPHPExcel->getActiveSheet()->mergeCells('I5:I6');
     $objPHPExcel->getActiveSheet()->mergeCells('J5:J6');
     $objPHPExcel->getActiveSheet()->mergeCells('K5:K6');
     $objPHPExcel->getActiveSheet()->mergeCells('L5:O5');
     $objPHPExcel->getActiveSheet()->mergeCells('P5:R5');
     //$objPHPExcel->getActiveSheet()->mergeCells('R5:R6');
     $objPHPExcel->getActiveSheet()->mergeCells('S5:S6');
     $objPHPExcel->getActiveSheet()->mergeCells('T5:T6');
     $objPHPExcel->getActiveSheet()->mergeCells('U5:U6');
     $objPHPExcel->getActiveSheet()->mergeCells('V5:V6');
     $objPHPExcel->getActiveSheet()->mergeCells('W5:W6');
     $objPHPExcel->getActiveSheet()->mergeCells('X5:X6');
     $objPHPExcel->getActiveSheet()->setCellValue('A5', 'NO');
     $objPHPExcel->getActiveSheet()->setCellValue('B5', 'BAPAK ASUH');
     $objPHPExcel->getActiveSheet()->setCellValue('C5', 'PENGEMUDI');
     $objPHPExcel->getActiveSheet()->setCellValue('C6', 'NIP');
     $objPHPExcel->getActiveSheet()->setCellValue('D6', 'NAMA');
     $objPHPExcel->getActiveSheet()->setCellValue('E5', 'BODY');
     $objPHPExcel->getActiveSheet()->setCellValue('F5', 'STATUS');
     $objPHPExcel->getActiveSheet()->setCellValue('F6', 'OPS');
     $objPHPExcel->getActiveSheet()->setCellValue('G6', 'BS');
     $objPHPExcel->getActiveSheet()->setCellValue('H5', 'SETORAN MURNI');
     $objPHPExcel->getActiveSheet()->setCellValue('I5', 'TAB SPAREPART');
     $objPHPExcel->getActiveSheet()->setCellValue('J5', 'DENDA JAM');
     $objPHPExcel->getActiveSheet()->setCellValue('K5', 'DP SPAREPART');
     $objPHPExcel->getActiveSheet()->setCellValue('L5', 'BAYAR  CICILAN');
     $objPHPExcel->getActiveSheet()->setCellValue('L6', 'KS');
     $objPHPExcel->getActiveSheet()->setCellValue('M6', 'S-PART');
     $objPHPExcel->getActiveSheet()->setCellValue('N6', 'DP-KSO');
     $objPHPExcel->getActiveSheet()->setCellValue('O6', 'HUT-LAMA');
     $objPHPExcel->getActiveSheet()->setCellValue('P5', 'BAYAR');
     $objPHPExcel->getActiveSheet()->setCellValue('P6', 'STIKER BANDARA & KEAMANAN');
     $objPHPExcel->getActiveSheet()->setCellValue('Q6', 'CUCI');
     $objPHPExcel->getActiveSheet()->setCellValue('R6', 'LAKA');
     $objPHPExcel->getActiveSheet()->setCellValue('S5', 'HARUS SETOR');
     $objPHPExcel->getActiveSheet()->setCellValue('T5', 'POTONGAN');
     $objPHPExcel->getActiveSheet()->setCellValue('U5', 'SETOR CASH');
     $objPHPExcel->getActiveSheet()->setCellValue('V5', 'KETEKORAN');
     $objPHPExcel->getActiveSheet()->setCellValue('W5', 'SETORAN OPS');
     $objPHPExcel->getActiveSheet()->setCellValue('X5', 'SELISIH');
     $no = 1;
     $starline = 8;
     foreach ($financials as $finan) {
         $ks = abs($finan->setoran_cash - ($finan->setoran_wajib + $finan->tabungan_sparepart + $finan->denda + $finan->cicilan_sparepart + $finan->cicilan_ks + $finan->biaya_cuci + $finan->iuran_laka + $finan->cicilan_dp_kso + $finan->cicilan_hutang_lama + $finan->cicilan_lain + $finan->hutang_dp_sparepart - $finan->potongan));
         $bs = 'Tidak';
         if ($ks <= $finan->cicilan_ks) {
             $bs = 'Ya';
         }
         $bpkasuh = Anakasuh::where('status', '=', 1)->where('fleet_id', '=', $finan->fleet_id)->first();
         $bravo = Kso::find($finan->kso_id);
         $nip = 'NN';
         $bravonama = 'NN';
         if ($bravo) {
             $oxx = Driver::find($bravo->bravo_driver_id);
             if ($oxx) {
                 $nip = $oxx->nip;
                 $bravonama = $oxx->name;
             }
         }
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(0, $starline, $no);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(1, $starline, $bpkasuh ? User::find($bpkasuh->user_id)->fullname : 'TIDAK ADA BAPAK ASUH');
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(2, $starline, $nip);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(3, $starline, $bravonama);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(4, $starline, $finan->taxi_number);
         //$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(5, $starline, $finan->kode);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(6, $starline, $bs);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(7, $starline, $finan->setoran_wajib);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(8, $starline, $finan->tabungan_sparepart);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(9, $starline, $finan->denda);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(10, $starline, $finan->hutang_dp_sparepart);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(11, $starline, $finan->cicilan_ks);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(12, $starline, $finan->cicilan_sparepart);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(13, $starline, $finan->cicilan_dp_kso);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(14, $starline, $finan->cicilan_hutang_lama);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(15, $starline, $finan->cicilan_lain);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(16, $starline, $finan->biaya_cuci);
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(17, $starline, $finan->iuran_laka);
//.........这里部分代码省略.........
开发者ID:acmadi,项目名称:diantaksi,代码行数:101,代码来源:financials.php

示例9: get_findbyidCheckins

 public function get_findbyidCheckins($id = false)
 {
     if (!$id) {
         return false;
     }
     $checkin = Checkin::find($id);
     $fleetinfo = Fleet::find($checkin->fleet_id);
     $driverinfo = Driver::find($checkin->driver_id);
     if ($checkin) {
         $checkin_documents = Checkindocument::where_checkin_id($checkin->id)->first();
         $cpy = Checkinphysic::where_checkin_id($checkin->id)->first();
         $sp_pyss = array();
         if ($cpy) {
             $sp_pys = explode(',', $cpy->sparepart_id);
             $ket_pys = explode(',', $cpy->ket);
             foreach ($sp_pys as $k => $v) {
                 $sp_pyss[$v] = $ket_pys[$k];
             }
         }
         $std_doc = explode(',', $checkin_documents->std_document_id);
         $ket_doc = explode(',', $checkin_documents->ket);
         $std_equip = explode(',', $checkin_documents->std_equip_id);
         $std_neat = explode(',', $checkin_documents->std_neats_id);
         $std_docs = array();
         $std_equips = array();
         $std_neats = array();
         foreach ($std_doc as $k => $v) {
             $std_docs[$v] = $ket_doc[$k];
         }
         foreach ($std_equip as $k => $v) {
             $std_equips[$v] = $v;
         }
         foreach ($std_neat as $k => $v) {
             $std_neats[$v] = $v;
         }
         $returndata = array('id' => $checkin->id, 'nip' => $driverinfo->nip, 'name' => $driverinfo->name, 'taxi_number' => $fleetinfo->taxi_number, 'police_number' => $fleetinfo->police_number, 'pool_id' => $checkin->pool_id, 'pool' => Pool::find($checkin->pool_id)->pool_name, 'status' => Checkinstep::find($checkin->checkin_step_id)->checkin_step, 'km_fleet' => $checkin->km_fleet, 'rit' => $checkin->rit, 'incomekm' => $checkin->incomekm, 'checkin_time' => $checkin->checkin_time, 'std_doc_id' => $std_docs, 'std_equip_id' => $std_equips, 'std_neat_id' => $std_neats, 'psy_check' => $sp_pyss, 'checkin' => true, 'checkinid' => $checkin->id, 'operasi_status_id' => $checkin->operasi_status_id, 'fg_bengkel' => $fleetinfo->fg_bengkel);
     } else {
         $returndata = array('id' => $checkin->id, 'nip' => $driverinfo->nip, 'name' => $driverinfo->name, 'taxi_number' => $fleetinfo->taxi_number, 'police_number' => $fleetinfo->police_number, 'pool_id' => $checkin->pool_id, 'pool' => Pool::find($checkin->pool_id)->pool_name, 'status' => Checkinstep::find(1)->checkin_step, 'checkin' => false);
     }
     return json_encode($returndata);
 }
开发者ID:acmadi,项目名称:diantaksi,代码行数:41,代码来源:checkins.php

示例10: destroy

 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     $pool = Pool::find($id);
     $pool->delete();
 }
开发者ID:bhavnasiyeshvant,项目名称:Laraval-Angularjs,代码行数:11,代码来源:PoolsController.php

示例11: post_qzotorisasicetak

 public function post_qzotorisasicetak()
 {
     $data = Input::json();
     $username = $data->username;
     $password = $data->password;
     $ver2 = User::where('username', '=', $username)->first();
     if ($ver2) {
         if (Hash::check($password, $ver2->password)) {
             Log::write('info', Request::ip() . ' User : ' . Auth::user()->fullname . ' Event: Print SPJ otoritas', true);
             $scheduledate = Scheduledate::find($data->id);
             $schedule = Schedule::find($scheduledate->schedule_id);
             $scheduledate->fg_check = 1;
             $scheduledate->save();
             $driverinfo = Driver::find($scheduledate->driver_id);
             $fleetinfo = Fleet::find($schedule->fleet_id);
             $ksoinfo = Kso::where_fleet_id($schedule->fleet_id)->where_actived(1)->first();
             $this->data['driverinfo'] = $driverinfo;
             $this->data['fleetinfo'] = $fleetinfo;
             $this->data['pool'] = Pool::find($schedule->pool_id);
             $codeops = $data->statusops;
             $keterangan = $data->keterangan;
             if ((int) $codeops == 1) {
                 if ($driverinfo->fg_blocked == 1) {
                     $status = 5;
                     $codeops = 7;
                 } else {
                     if ($driverinfo->fg_super_blocked == 1) {
                         $status = 5;
                         $codeops = 7;
                     } else {
                         if ($fleetinfo->fg_blocked == 1) {
                             $status = 5;
                             $codeops = 7;
                         } else {
                             if ($fleetinfo->fg_bengkel == 1) {
                                 $status = 6;
                                 $codeops = 4;
                             } else {
                                 if ($fleetinfo->fg_super_blocked == 1) {
                                     $status = 5;
                                     $codeops = 7;
                                 } else {
                                     $status = 3;
                                     $codeops = $codeops;
                                 }
                             }
                         }
                     }
                 }
             } else {
                 $status = 3;
             }
             $dateopertion = mktime(0, 0, 0, $schedule->month, $scheduledate->date, $schedule->year);
             $checkouts = Checkout::where_fleet_id($schedule->fleet_id)->where_operasi_time(date('Y-m-d', $dateopertion))->first();
             if (!$checkouts) {
                 //insert into to checkouts step
                 $checkouts = new Checkout();
                 $checkouts->kso_id = $ksoinfo->id;
                 $checkouts->operasi_time = date('Y-m-d', $dateopertion);
                 $checkouts->fleet_id = $fleetinfo->id;
                 $checkouts->driver_id = $driverinfo->id;
                 $checkouts->checkout_step_id = $status;
                 $checkouts->shift_id = $scheduledate->shift_id;
                 $checkouts->user_id = Auth::user()->id;
                 $checkouts->pool_id = Auth::user()->pool_id;
                 $checkouts->printspj_time = date('Y-m-d H:i:s', Myfungsi::sysdate());
                 $checkouts->operasi_status_id = $codeops;
                 $checkouts->keterangan = $keterangan;
                 $checkouts->print_out_time = 1;
                 $checkouts->otorisasi_user_id = $ver2->id;
                 $checkouts->save();
                 if ((int) $codeops == 1) {
                     $scheduledate->fg_check = 1;
                     $scheduledate->save();
                 }
                 if ((int) $codeops !== 1) {
                     $cin = Checkin::create(array('kso_id' => $ksoinfo->id, 'fleet_id' => $fleetinfo->id, 'driver_id' => $driverinfo->id, 'checkin_time' => date('Y-m-d H:i:s', Myfungsi::sysdate()), 'shift_id' => $scheduledate->shift_id, 'km_fleet' => 0, 'rit' => 0, 'incomekm' => 0, 'operasi_time' => date('Y-m-d', $dateopertion), 'pool_id' => Auth::user()->pool_id, 'operasi_status_id' => $codeops, 'fg_late' => '', 'checkin_step_id' => 12, 'document_check_user_id' => Auth::user()->id, 'physic_check_user_id' => '', 'bengkel_check_user_id' => '', 'finance_check_user_id' => '', 'keterangan' => $keterangan));
                     if ($cin) {
                         $docs = new Checkindocument();
                         $docs->checkin_id = $cin->id;
                         $docs->save();
                     }
                     //make can't print before setoran
                     $setor = Fleet::find($fleetinfo->id);
                     $setor->fg_setor = 1;
                     $setor->save();
                 }
             } else {
                 if ((int) $codeops !== 1) {
                     $checkinstatus = Checkin::where_fleet_id($schedule->fleet_id)->where_operasi_time(date('Y-m-d', $dateopertion))->first();
                     if (!$checkinstatus) {
                         $cin = Checkin::create(array('kso_id' => $ksoinfo->id, 'fleet_id' => $fleetinfo->id, 'driver_id' => $driverinfo->id, 'checkin_time' => date('Y-m-d H:i:s', Myfungsi::sysdate()), 'shift_id' => $scheduledate->shift_id, 'km_fleet' => 0, 'rit' => 0, 'incomekm' => 0, 'operasi_time' => date('Y-m-d', $dateopertion), 'pool_id' => Auth::user()->pool_id, 'operasi_status_id' => $codeops, 'fg_late' => '', 'checkin_step_id' => 12, 'document_check_user_id' => Auth::user()->id, 'physic_check_user_id' => '', 'bengkel_check_user_id' => '', 'finance_check_user_id' => '', 'keterangan' => $keterangan));
                         if ($cin) {
                             $docs = new Checkindocument();
                             $docs->checkin_id = $cin->id;
                             $docs->save();
                         }
                     }
                 }
                 //reprint after open blocking
//.........这里部分代码省略.........
开发者ID:acmadi,项目名称:diantaksi,代码行数:101,代码来源:checkouts.php


注:本文中的Pool::find方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。