public function getCreate() { $stockInfos = new StockInfo(); $allStockInfos = $stockInfos->getStockInfoDropDown(); $parties = new Party(); $partyAll = $parties->getPartiesDropDown(); $imports = new Import(); $consignmentAll = $imports->getConsignmentNameDropDown(); $branches = new Branch(); $branchAll = $branches->getBranchesDropDown(); return view('SalesReturn.add', compact('allStockInfos', 'consignmentAll'))->with('branchAll', $branchAll)->with('partyAll', $partyAll); }
public function getStockProducts() { $branches = new Branch(); $branchAll = $branches->getBranchesDropDown(); $stockInfos = new StockInfo(); $allStockInfos = $stockInfos->getStockInfoDropDown(); $catogories = new Category(); $categoriesAll = $catogories->getCategoriesDropDown(); $products = new Product(); $productAll = $products->getProductsWithCategories(); return view('Searches.stockProduct', compact('productAll'))->with('categoriesAll', $categoriesAll)->with('allStockInfos', $allStockInfos)->with('branchAll', $branchAll); }
public function getEdit($id) { $buyers = new Party(); $buyersAll = $buyers->getBuyersDropDown(); $products = new Product(); $finishGoods = $products->getFinishGoodsDropDown(); $stockInfos = new StockInfo(); $allStockInfos = $stockInfos->getStockInfoDropDown(); $branches = new Branch(); $branchAll = $branches->getBranchesDropDown(); $sale[0] = Sale::where('invoice_id', '=', $id)->get(); $var = $sale[0]; $saleDetails = SAleDetail::where('invoice_id', '=', $id)->get(); return view('Sales.edit', compact('buyersAll'))->with('finishGoods', $finishGoods)->with('saleDetails', $saleDetails)->with('sale', $var)->with('branchAll', $branchAll)->with('allStockInfos', $allStockInfos); }
public function postStocksproductsresult() { $stockInfos = new StockInfo(); $allStockInfos = $stockInfos->getStockInfoDropDown(); $branches = new Branch(); $branchAll = $branches->getBranchesDropDown(); $catogories = new Category(); $categoriesAll = $catogories->getCategoriesDropDown(); $report = new Report(); $branch_id = Input::get('branch_id'); $stock_info_id = Input::get('stock_info_id'); $category_id = Input::get('category_id'); $product_type = Input::get('product_type'); $results = $report->getStockReportResult($stock_info_id, $product_type, $branch_id, $category_id); return view('Reports.stockProductsReport')->with('stock_info_id', $stock_info_id)->with('branch_id', $branch_id)->with('category_id', $category_id)->with('product_type', $product_type)->with('results', $results)->with('branchAll', $branchAll)->with('allStockInfos', $allStockInfos)->with('categoriesAll', $categoriesAll); }
public function getEdit($id) { $suppliers = new Party(); $suppliersAll = $suppliers->getSuppliersDropDown(); $products = new Product(); $localProducts = $products->getLocalProductsDropDown(); $stockInfos = new StockInfo(); $allStockInfos = $stockInfos->getStockInfoDropDown(); $branches = new Branch(); $branchAll = $branches->getBranchesDropDown(); $purchase[0] = PurchaseInvoice::where('invoice_id', '=', $id)->get(); $var = $purchase[0]; $purchaseDetails = PurchaseInvoiceDetail::where('detail_invoice_id', '=', $id)->get(); if (count($purchaseDetails) < 1) { return Redirect::to('purchases/index'); } return view('PurchaseInvoice.edit', compact('suppliersAll'))->with('localProducts', $localProducts)->with('purchaseDetails', $purchaseDetails)->with('purchase', $var)->with('branchAll', $branchAll)->with('allStockInfos', $allStockInfos); }
public function getEdit($id) { $stockInvoices = StockInvoice::find($id); $branches = new Branch(); $branchAll = $branches->getBranchesDropDown(); $stockDetails = StockDetail::where('invoice_id', '=', $stockInvoices->invoice_id)->first(); $stockDetails2 = StockDetail::where('invoice_id', '=', $stockInvoices->invoice_id)->get(); // get all stocks $stockInfos = new StockInfo(); $allStockInfos = $stockInfos->getStockInfoDropDown(); $invoiceId = $stockInvoices->invoice_id; //$invoiceId = 's121513'; $buyersAll = 0; $imports = Import::where('status', '=', 'Activate')->get(); $productsName = Product::where('product_type', '=', $stockDetails->product_type)->where('branch_id', '=', $stockDetails->branch_id)->get(); return view('Stocks.edit2', compact('buyersAll', 'invoiceId', 'stockInvoices', 'stockDetails', 'productsName', 'stockDetails2', 'imports'))->with('branchAll', $branchAll)->with('allStockInfos', $allStockInfos); // return view('Stocks.edit',compact('stock')) // ->with('allStockInfos',$allStockInfos) // ->with('branchAll',$branchAll); }
public function getEdit($id) { $stock = Stock::find($id); $stockInfos = new StockInfo(); $allStockInfos = $stockInfos->getStockInfoDropDown(); $branches = new Branch(); $branchAll = $branches->getBranchesDropDown(); return view('Stocks.edit', compact('stock'))->with('allStockInfos', $allStockInfos)->with('branchAll', $branchAll); }
public function getDetails($id) { $imports = ImportDetail::where('import_num', '=', $id)->get(); $bankCost = BankCost::where('import_id', '=', $id)->get(); $cnfCost = CnfCost::where('import_id', '=', $id)->get(); $pi = ProformaInvoice::where('import_id', '=', $id)->get(); $otherCost = OtherCost::where('import_id', '=', $id)->get(); $stockInfos = new StockInfo(); $allStockInfos = $stockInfos->getStockInfoDropDown(); return view('Imports.details', compact('imports', 'id'))->with('bankCost', $bankCost)->with('pi', $pi)->with('otherCost', $otherCost)->with('cnfCost', $cnfCost)->with('allStockInfos', $allStockInfos); }