public function maintenanceSupplier()
 {
     $ids = DB::table('tblSupplier')->select('strSuppId')->orderBy('created_at', 'desc')->orderBy('strSuppId', 'desc')->take(1)->get();
     $ID = $ids["0"]->strSuppId;
     $newID = $this->smart($ID);
     $supplier = MSupplier::all();
     return View::make('supplierMaintenance')->with('suppliers', $supplier)->with('newID', $newID);
 }
 public function maintenanceProduct()
 {
     $ids = DB::table('tblProduct')->select('strProdId')->orderBy('created_at', 'desc')->orderBy('strProdId', 'desc')->take(1)->get();
     $ID = $ids["0"]->strProdId;
     $newID = $this->smart($ID);
     $product = DB::table('tblProduct')->join('tblSupplier', 'tblProduct.strPSupp', '=', 'tblSupplier.strSuppId')->join('tblUOM', 'tblProduct.strPUOM', '=', 'tblUOM.strUOMId')->join('tblProdSerCat', 'tblProduct.strPCategory', '=', 'tblProdSerCat.strCategId')->select('tblProduct.*', 'tblSupplier.strSuppName', 'tblUOM.strUOMDesc', 'tblProdSerCat.strCategName')->get();
     $category = MProdServCat::all();
     $supplier = MSupplier::all();
     $uom = MUOM::all();
     return View::make('productMaintenance')->with('newID', $newID)->with('products', $product)->with('uom', $uom)->with('uom2', $uom)->with('categories', $category)->with('suppliers', $supplier);
 }