示例#1
0
 public function getLastMonthSales()
 {
     $data['num'] = jual::where('tgl', '>=', Carbon::now()->subMonth()->format('Y-m-d'))->where('status', 1)->sum('totnetto');
     $data['num'] = Helpers::currency($data['num'], 0, 'id');
     $data['tgl1'] = Carbon::parse('First day of this month')->format('Y-m-d');
     $data['tgl1'] = Carbon::now()->subMonth()->format('Y-m-d');
     $data['tgl2'] = Carbon::now()->format('Y-m-d');
     return $data;
 }
示例#2
0
 /**
  * Show Detail
  *
  * @return View
  * @author Y.Brahmantyo A.K
  **/
 public function getShow($id)
 {
     $jual = jual::find($id);
     return view('admin.transaction.penjualan.penjualan-show')->with('jual', $jual);
 }