public function getEdit($id) { $stockInfo = StockInfo::find($id); $branches = new Branch(); $branchAll = $branches->getBranchesDropDown(); return view('StockInfos.edit', compact('stockInfo'))->with('branchAll', $branchAll); }
public function getEdit($id) { $branches = new Branch(); $branchAll = $branches->getBranchesDropDown(); $category = Category::find($id); return view('ProductCategory.edit', compact('branchAll'))->with('category', $category); }
public function getEdit($id) { $users = User::find($id); $branches = new Branch(); $branchAll = $branches->getBranchesDropDown(); return view('Users.edit', compact('branchAll'))->with('userdata', $users); }
public function getCreate() { $branches = new Branch(); $branchAll = $branches->getBranchesDropDown(); $accountCategories = new AccountCategory(); $accountCategoriesAll = $accountCategories->getAccountCategoriesDropDown(); return view('BalanceTransfers.add')->with('branchAll', $branchAll)->with('accountCategoriesAll', $accountCategoriesAll); }
public function getEdit($id) { $account = NameOfAccount::find($id); $accountCategories = new AccountCategory(); $accountCategoriesAll = $accountCategories->getAccountCategoriesDropDown(); $branches = new Branch(); $branchAll = $branches->getBranchesDropDown(); return view('AccountName.edit', compact('account'))->with('accountCategoriesAll', $accountCategoriesAll)->with('branchAll', $branchAll); }
public function getEdit($id) { $categories = new Category(); $allCategory = $categories->getCategoriesDropDown(); $branches = new Branch(); $branchAll = $branches->getBranchesDropDown(); $subCategory = SubCategory::find($id); return view('ProductSubCategory.edit', compact('branchAll'))->with('subCategory', $subCategory)->with('categoryAll', $allCategory); }
public static function addNew(Request $request) { $branch = new Branch(); $branch->name = $request->input('name'); $branch->phone = $request->input('phone'); $branch->fax = $request->input('fax'); $branch->email = $request->input('email'); $branch->save(); return $branch; }
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 getChangeStatus($status, $id) { $branch = Branch::find($id); if ($branch['status'] == $status) { $branch->status = $status == 'Activate' ? 'Deactivate' : 'Activate'; $branch->save(); } return new JsonResponse(array('id' => $branch['id'], 'status' => $branch['status'])); }
/** * Store a newly created resource in storage. * * @return Response */ public function store(Request $request) { $this->validate($request, ['name' => 'required|max:255', 'mobile' => 'numeric|min:10', 'telephone' => 'numeric']); $input = $request->all(); $input['company_id'] = Auth::user()->company->id; $input['account_year_id'] = session('account'); Branch::create($input); flash()->success('Branch Created Successfully !'); return redirect('branch'); }
public function showWaitingRoom(Request $request) { if ($request->session()->get('global_branch') == 'all') { $branches = Branch::all(); } else { $branches[] = Branch::findOrFail($request->session()->get('global_branch')); } $vars = array('branches' => $branches); return view('backend.page.waiting-room')->with($vars); }
/** * Show the form for creating a new resource. * * @return Response */ public function create() { $party = $this->party->orderBy('name', 'asc')->lists('name', 'id'); if (Auth::user()->hasRole('admin')) { $branch = Branch::all()->lists('name', 'id'); } else { $branch = $this->branch->orderBy('name', 'asc')->lists('name', 'id'); } return view('godown.create', compact('party', 'branch')); }
public function doAddStockItem(Request $request) { if (count($request->input('branches')) > 0) { $stock_item = Stock::addNew(["name" => $request->input('name'), "ean" => $request->input('ean'), "low_stock_notification_level" => $request->input('low-stock-number')]); foreach ($request->input('branches') as $branch_id) { $branch = Branch::findOrFail($branch_id); $stock_item->attachToBranch($branch); } } return redirect()->back()->with('stock-item-added', true); }
/** * Display the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function show($id) { // $company = Company::find($id); $branches = Branch::where("company_id", "=", $company->id)->get(); $stacks = Invoicingstack::where("company_id", "=", $company->id)->where("status", "=", 0)->get(); $stack2s = Invoicingstack::where("company_id", "=", $company->id)->get(); $invoice = Bill::where("company_id", "=", $company->id)->get(); $invoiceGroup = Bill::where("company_id", "=", $company->id)->groupBy("invoice_date")->get(); return View("company.companydetail", ['invGp' => $invoiceGroup, 'stacks' => $stacks, 'stack2s' => $stack2s, 'invoices' => $invoice, 'company' => $company, 'branches' => $branches, 'title' => 'Company Detail']); }
/** * Show the form for editing the specified resource. * * @param int $id * @return Response */ public function edit(Request $request) { $branch = Branch::find($request['branchId']); $branch->name = $request['branchName']; $branch->location = $request['branchLocation']; $branch->delivery_charge = $request['delivery_charge']; if ($branch->save()) { $returnData = array('status' => 'ok', 'message' => 'Branch edited', 'branch' => $branch, 'code' => 200); return Response::json($returnData, 200); } else { $returnData = array('status' => 'fail', 'message' => 'Branch not edited', 'code' => 500); return Response::json($returnData, 200); } }
/** * Execute the console command. * * @return mixed */ public function handle() { // Define first day of current month. $date = date('Y-m') . '-01'; // Get all the branches. $branches = Branch::all(); foreach ($branches as $branch) { // Try to get expense. $expense = Expense::where('BranchId', '=', $branch->Id)->where('Date', '=', $date)->first(); if (!$expense) { $default = json_decode($branch->DefaultExpenses); if ($default->regimen == 'cuotafija') { Expense::create(array('Date' => $date, 'BranchId' => $branch->Id, 'Electricity' => $default->electricity, 'Water' => $default->water, 'Telecommunications' => $default->phone, 'Rent' => $default->rent, 'Depreciation' => $default->depreciation, 'Security' => $default->security, 'Government' => $default->government, 'Taxes' => $default->taxes, 'Regimen' => $default->regimen, 'TaxesSettled' => 1)); } else { Expense::create(array('Date' => $date, 'BranchId' => $branch->Id, 'Electricity' => $default->electricity, 'Water' => $default->water, 'Telecommunications' => $default->phone, 'Rent' => $default->rent, 'Depreciation' => $default->depreciation, 'Security' => $default->security, 'Government' => $default->government, 'Taxes' => $default->taxes, 'Regimen' => $default->regimen, 'TaxesSettled' => 0)); } } } }
<th width="">Product Type</th> <th width="">Product Name</th> <th width="">Price</th> <th width="">Quantity</th> <th width="">Remarks</th> <th width="">Action</th> </tr> </thead> @foreach($saleDetails as $saleDetail) <?php $branch = new \App\Branch(); $stocks = new \App\StockInfo(); $stockName = \App\StockInfo::find($saleDetail->stock_info_id); $branchName = \App\Branch::find($saleDetail->branch_id); ?> <tr> <td> {{ $stockName->name }}</td> <td> {{ $saleDetail->product_type }}</td> <td> {{ $saleDetail->product->name }}</td> <td> {{ $saleDetail->price }}</td> <td> {{ $saleDetail->quantity }}</td> <td> @if($saleDetail->remarks) {{ $saleDetail->remarks }} @else {{"Not Available"}} @endif </td> <td> <input type="button" style="width:63px;" value="delete" class="btn red deleteSaleDetail" rel={{$saleDetail->id}} /></td>
@section('content') <div class="row"> <div class="col-md-12"> <!-- BEGIN PAGE TITLE & BREADCRUMB--> <h3 class="page-title"> Sales Due Report </h3> </div> </div> <div class="row"> <div class="col-md-12"> <?php $branches = \App\Branch::find($branch_id); ?> <!-- BEGIN EXAMPLE TABLE PORTLET--> <div class="portlet box light-grey"> <div class="portlet-title"> <div class="caption"><i class="fa fa-reorder"></i>Sales Due Report of Products for {{$branches->name}}</div> <div class="actions"> <a class="btn btn-sm blue hidden-print" onclick="javascript:window.print();">Print <i class="fa fa-print"></i></a> </div> </div> <div class="portlet-body"> <table class="table table-striped table-bordered table-hover" id="stock_products_report_table">
private function saleDetailConvertToArray($salesDetails) { $array = array(); $stockName = StockInfo::find($salesDetails->stock_info_id); $branchName = Branch::find($salesDetails->branch_id); $array['id'] = $salesDetails->id; $array['branch_id'] = $branchName->name; $array['stock_info_id'] = $stockName->name; $array['product_type'] = $salesDetails->product_type; $array['product_id'] = $salesDetails->product->name; $array['price'] = $salesDetails->price; $array['quantity'] = $salesDetails->quantity; $array['remarks'] = $salesDetails->remarks; return $array; }
public static function getWaitingRoomCount() { if (session('global_branch') == 'all') { $branches = Branch::all(); } else { $branches[] = Branch::findOrFail(session('global_branch')); } $waiting_room_total = 0; foreach ($branches as $b) { $waiting_room_total += $b->appointments()->where('status_id', 3)->count(); } return $waiting_room_total; }
<th>Quantity</th> <th>Amount</th> <th>Remarks</th> <th>Action</th> </tr> </thead> <tbody> <?php $total = 0; ?> @foreach($purchaseInvoiceDetails as $purchaseInvoiceDetail ) <?php $stocks = new \App\StockInfo(); $branch = new \App\Branch(); $stockName = \App\StockInfo::find($purchaseInvoiceDetail->stock_info_id); $branchName = \App\Branch::find($purchaseInvoiceDetail->branch_id); $categoryName = \App\Category::find($purchaseInvoiceDetail->product->category_id); $subCategoryName = \App\SubCategory::find($purchaseInvoiceDetail->product->sub_category_id); ?> <tr class="odd gradeX"> <td>{{$branchName->name}}</td> <td>{{$stockName->name}}</td> <td>{{$purchaseInvoiceDetail->product_type}}</td> <td>{{$purchaseInvoiceDetail->product->name.'('.$categoryName->name.')'.'('.$subCategoryName->name.')'}}</td> <td>{{$purchaseInvoiceDetail->price}}</td> <td>{{$purchaseInvoiceDetail->quantity}}</td> <td>{{$purchaseInvoiceDetail->quantity * $purchaseInvoiceDetail->price}}</td> <td> @if($purchaseInvoiceDetail->remarks) {{ $purchaseInvoiceDetail->remarks }} @else
<?php use App\Branch; use App\Worker; use App\UserLevel; use App\Configuration; // Get current branch. $branch = Branch::find(Worker::find(Auth::user()->TypeId)->BranchId); $levels = UserLevel::all(); $config = Configuration::find(0); ?> <script src="{{ URL::to('/') }}/js/admin/configuration.js"></script> <div class="hideable hide" id="configuracion"> <div class="subnavbar"> <div class="subnavbar-inner"> <div class="container"> <ul class="mainnav eirene-subnav"> <li class="active"><a href="#configuracion-expenses"><i class="icon-money"></i><span>Gastos Fijos</span></a></li> <li><a href="#configuracion-permissions"><i class="icon-key"></i><span>Permisos para Usuarios</span> </a></li> <li><a href="#configuracion-general"><i class="icon-list-alt"></i><span>Configuracion General</span> </a></li> </ul> </div> <!-- /container --> </div> <!-- /subnavbar-inner --> </div> <div class="container"> <div class="row v-offset-2"> </div> <div class="main sub-hideable" id="configuracion-expenses"> <div class="main-inner">
<th class="numeric">Req Qty</th> <th class="numeric">Issued</th> <th class="numeric">Remaining</th> <th>Remarks</th> <th>Created By</th> <!-- <th>Status</th>--> <th>Action</th> </tr> </thead> <tbody> <?php $sl = 1; ?> @foreach($requisitions as $requisition ) <?php $branchName = \App\Branch::find($requisition->branch_id); $subCategory = \App\SubCategory::find($requisition->product->sub_category_id); $subCategoryName = '(' . $subCategory->name . ')'; ?> <tr class="odd gradeX"> <td><?php echo $sl; ?> </td> <td>{{$branchName->name}}</td> <td>{{$requisition->product->name."(".$requisition->product->category->name.")".$subCategoryName}}</td> <td>{{$requisition->party->name}}</td> <td>{{$requisition->requisition_id}}</td> <td class="numeric">{{$requisition->requisition_quantity}}</td> <td class="numeric">{{$requisition->issued_quantity}}</td> <td class="numeric">{{$requisition->requisition_quantity-$requisition->issued_quantity}}</td>
<!-- BEGIN PAGE TITLE & BREADCRUMB--> <h3 class="page-title"> Stock Search Result </h3> </div> </div> <div class="row"> <div class="col-md-12"> <!-- BEGIN EXAMPLE TABLE PORTLET--> <div class="portlet box light-grey"> <div class="portlet-title"> <?php $branch = \App\Branch::find($branch); ?> <div class="caption"><i class="fa fa-reorder"></i> Stock Search Result for {{$branch->name}}</div> <div class="actions"> <a class="btn blue" href="/entry">Back</a> </div> </div> <div class="portlet-body"> @if($results) <table class="table table-striped table-bordered table-hover" id="stock_search_result_table"> <thead style="background-color:royalblue"> <tr> <th>Product Name</th>
<th>Particular</th> <th>Purpose</th> <th>Amount</th> <th>Remarks</th> <th>Status</th> <th>Created</th> <th>Action</th> </tr> </thead> <tbody> <?php $sl = 1; ?> @foreach($expenseAll as $expense ) <?php $branch = \App\Branch::find($expense->branch_id); $transaction = \App\Transaction::where('invoice_id', '=', $expense->invoice_id)->first(); ?> <tr class="odd gradeX"> <td><?php echo $sl; ?> </td> <td>{{$branch->name}}</td> <td>{{$expense->invoice_id}}</td> <td>{{$expense->category}}</td> @if($expense->particular) <td>{{$expense->particular}}</td> @else <td>{{"Not Available"}}</td> @endif
public function getAllBranches($table) { $branches = Branch::all(); $tables_ids = []; $guests = []; $branches_ids = []; foreach ($branches as $branche) { if ($branche->position_id == 2) { $branches_ids[] = $branche->id; } } $tables = \DB::table('tables')->whereIn('branche_id', $branches_ids)->get(); foreach ($tables as $tbl) { $tables_ids[] = $tbl->id; } $currentGuest = Que::whereIn('table_id', $tables_ids)->orderBy('the_time')->get(); foreach ($currentGuest as $guest) { $guests[] = $guest->guest_id; } $items = Guest::whereIn('id', $guests)->where('status', '!=', 'token')->get(); return view('distribution.distribution')->with(['items' => $items, 'branches' => $branches, 'branche' => Table::find($table)->branche_id, 'table' => $table]); }
<?php use App\Institution; use App\UserLevel; use App\Worker; use App\Branch; $worker = Worker::find(Auth::user()->TypeId); $branch = Branch::find($worker->BranchId); $regimen = json_decode($branch->DefaultExpenses)->regimen; $permissions = json_decode(UserLevel::find(Auth::user()->UserLevel)->Permissions); ?> <script> var maxDiscount = {{ $permissions->permissions->sales->discount->limit }}; var regimen = "{{ $regimen }}"; </script> <script src="{{ URL::to('/') }}/js/ventas.js"></script> @include('mortuary.forms.payTab') @include('mortuary.forms.createClientInstitutionForm') @include('mortuary.forms.serviceForm') @include('mortuary.forms.cremationForm') @include('mortuary.forms.reservationForm') @include('mortuary.forms.contractForm') <div class="main hideable hide" id="ventas"> <div class="main-inner"> <div class="container"> <div class="row"> <div class="span6"> <div class="row-fluid form-horizontal"> <div class="control-group span12"> <label class="control-label" for="salesClient">Cliente:</label> <div class="controls">
<th>UserName</th> <th>Role</th> <th>Gender</th> <th>Branch</th> <th>Address</th> <th>Status</th> <th>Action</th> </tr> </thead> <tbody> <?php $sl = 1; ?> @foreach($users as $user ) <?php $branchName = \App\Branch::find($user->branch_id); ?> <tr class="odd gradeX"> <td><?php echo $sl; ?> </td> <td>{{$user->name}}</td> <td>{{$user->email}}</td> <td>{{$user->username}}</td> <td>{{$user->role}}</td> @if($user->sex == "m") <td>Male</td> @else <td>Female</td> @endif
/** * Run the database seeds. * * @return void */ public function run() { // \App\Branch::create(['name' => 'denpasar', 'city' => 'denpasar', 'province' => 'bali', 'country' => 'indonesia']); \App\Branch::create(['name' => 'surabaya', 'city' => 'surabaya', 'province' => 'jawatimur', 'country' => 'indonesia']); }