Beispiel #1
0
 public function expenditure(Request $req)
 {
     $perPage = 20;
     $search = ['s' => $req->has('s') ? $req->input('s') : null, 'field' => $req->has('field') ? $req->input('field') : null];
     $data = ['title' => 'Checklist QA - Daftar Pengeluaran Material', 'asset' => new Assets(), 'position' => ['checklist' => 'Checklist QA', 'checklist/expenditure' => 'Pengeluaran'], 'search' => $search, 'active' => 'expenditure', 'js' => ['vendor/jquery-ui-autocomplete-datepicker.min'], 'css' => ['jquery-ui-autocomplete-datepicker.min'], 'fetch' => Pengel::fetch(['search' => $search, 'perPage' => $perPage]), 'count' => ['pener' => Pener::where(['qa_check' => 1, 'visibility' => 1])->count(), 'peneretur' => Peneretur::where(['qa_check' => 1, 'visibility' => 1])->count(), 'pengel' => Pengel::where(['qa_check' => 1, 'visibility' => 1])->count()], 'isSelected' => function ($field) use($search) {
         if (!is_null($search['field'])) {
             if ($search['field'] == $field) {
                 return 'selected="selected"';
             }
         }
     }, 'getNumb' => function () use($perPage, $req) {
         if ($req->has('page') && $req->input('page') != 1) {
             return $req->input('page') * $perPage - $perPage;
         } else {
             return 0;
         }
     }];
     # Pagination config
     $data['fetch']->setPath(url('checklist/expenditure'));
     if ($req->has('s')) {
         $data['fetch']->appends(['field' => $search['field'], 's' => $search['s']]);
     }
     # End of pagination config
     return view('checklist.baseFrame', $data)->nest('dataListContent', 'checklist.expenditure', $data);
 }
Beispiel #2
0
 public function acceptanceReturCreate($pener_id)
 {
     $data = ['title' => 'Form Pengendalian Barang Tidak Sesuai', 'asset' => new Assets(), 'position' => ['material' => 'Material', 'material/acceptance' => 'Penerimaan', 'material/acceptance/retur' => 'Retur', 'material/acceptance/retur/create/' . $pener_id => 'Create'], 'opened' => 'material', 'head' => Pener::fetchHead($pener_id)];
     return view('material.acceptance.retur.create', $data);
 }
Beispiel #3
0
 public function purchasemonthly(Request $req)
 {
     $data = ['title' => 'Laporan Pembelian Bulanan', 'asset' => new Assets(), 'period' => libMonths()[$req->input('month')] . ' ' . $req->input('year'), 'fetchp' => Pener::purchasemonthly(['m' => $req->input('month'), 'y' => $req->input('year')], 'ppn', $req->input('sort_by')), 'fetchn' => Pener::purchasemonthly(['m' => $req->input('month'), 'y' => $req->input('year')], 'nppn', $req->input('sort_by')), 'Peners' => new Peners()];
     return view('printing.purchasemonthly', $data);
 }