Exemple #1
0
 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function create()
 {
     $barang = Barang::all()->toArray();
     $gudang = Gudang::all()->toArray();
     $barang_json = json_encode($barang);
     return view('pembelian.ro.create', compact('barang', 'gudang', 'barang_json'));
 }
 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function create()
 {
     $id = $this->ro->max('id');
     $id = $id === null ? 1 : $id + 1;
     // $barang = Barang::all()->toArray();
     $po = $this->po->get()->toArray();
     // dd($po);
     // $barang_json = json_encode($barang);
     $gudang = Gudang::all()->toArray();
     // dd($gudang);
     $supplier = $this->supplier->get(['id', 'nama'])->toArray();
     $data = compact('id', 'po', 'barang_json', 'supplier', 'gudang');
     return view('pembelian.ro.create', $data);
 }
Exemple #3
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $data = Saldo::find($id);
     $gudang = Gudang::all()->toArray();
     $barang = Barang::all()->toArray();
     $batch = Batch::all()->toArray();
     return view('saldo.edit', compact('data', 'barang', 'gudang', 'batch'));
 }