<?php
	
	namespace App\Http\Model;
	use Illuminate\Database\Eloquent\Model;
	use DB;
	use Auth;
	class StockModel extends Model
	{
		
		public function QPermission($id)
	 	{
		    $QModules=DB::table('modules')->select('Mid')->where('mUrl',$id['url'])->first();
			$Mid=$QModules->Mid;
			return $Qpermission=DB::table('permission')->where('Mid',$Mid)->first();
		}
		public function PurchaseStock()
		{
			return $PurchaseStock=DB::table('itm_item')
			->where('itm_item.itm_type','<>','Production')
			->get();
		}
		public function SaleStockReport()
		{
			return $PurchaseStock=DB::table('itm_item')
			->where('itm_item.itm_type','<>','Purchase')
			->get();
		}
		public function AllStockReport()
		{
			return $PurchaseStock=DB::table('itm_item')
			//->where('itm_item.itm_type','<>','Purchase')
			->get();
		}
		
	}		
	
