コード例 #1
0
 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);
 }
コード例 #2
0
 public function getEdit($id)
 {
     $stockInvoices = SalesReturnInvoice::find($id);
     $branches = new Branch();
     $stockDetails = SalesReturnDetail::where('invoice_id', '=', $stockInvoices->invoice_id)->first();
     $stockDetails2 = SalesReturnDetail::where('invoice_id', '=', $stockInvoices->invoice_id)->get();
     // get all stocks
     $invoiceId = $stockInvoices->invoice_id;
     //$invoiceId = 's121513';
     $buyersAll = 0;
     $imports = Import::where('status', '=', 'Activate')->get();
     $productsName = Product::where('product_type', '=', $stockDetails->product_type)->get();
     $stockInfos = new StockInfo();
     $allStockInfos = $stockInfos->getStockInfoDropDown();
     $parties = new Party();
     $partyAll = $parties->getPartiesDropDown();
     $imports = new Import();
     $consignmentAll = $imports->getConsignmentNameDropDown();
     $branches = new Branch();
     $branchAll = $branches->getBranchesDropDown();
     $imports = Import::where('status', '=', 'Activate')->get();
     return view('SalesReturn.edit2', compact('buyersAll', 'invoiceId', 'stockInvoices', 'stockDetails', 'productsName', 'stockDetails2', 'imports', 'partyAll', 'consignmentAll'))->with('branchAll', $branchAll)->with('allStockInfos', $allStockInfos);
     //        return view('Stocks.edit',compact('stock'))
     //            ->with('allStockInfos',$allStockInfos)
     //            ->with('branchAll',$branchAll);
 }