Example #1
0
 /**
  * @before _secure, _vendor
  */
 public function editPackage($package_id)
 {
     $this->seo(array("title" => "Edit Packages", "view" => $this->getLayoutView()));
     $view = $this->getActionView();
     $package = Package::first(array("id = ?" => $package_id, "organization_id = ?" => $this->organization->id));
     if (!$package) {
         $this->redirect("/vendor");
     }
     $tests = Test::all(array(), array("id", "title"));
     $items = Item::all(array("package_id = ?" => $package->id));
     $sorted = array();
     foreach ($items as $i) {
         $sorted[$i->test_id] = $i;
     }
     $fields = $package->render();
     $errors = array();
     $view->set("fields", $fields);
     if (RequestMethods::post("action") == "savePackage") {
         foreach ($fields as $f) {
             $package->{$f}['name'] = RequestMethods::post($f['name']);
         }
         if ($package->validate()) {
             $package->save();
             $view->set("message", "Package Saved Successfully");
         } else {
             $errors = $package->errors;
         }
         $sorted = $this->_saveTests($package, $sorted);
     }
     $view->set("package", $package)->set("items", $sorted)->set("tests", $tests)->set("errors", $errors);
 }
 public static function index()
 {
     // Haetaan kaikki vaatteet tietokannasta
     $items = Item::all();
     // Renderöidään views/item kansiossa sijaitseva tiedosto index.html muuttujan $items datalla
     View::make('items/index.html', array('items' => $items));
 }
 /**
  * Display a listing of items
  *
  * @return Response
  */
 public function index()
 {
     $items = Item::all();
     $categories = Category::all();
     $item = new Item();
     return View::make('items.index', compact('items', 'categories', 'item'));
 }
Example #4
0
 /**
  * Display a list of entries
  *
  * @return  void
  */
 public function displayTask()
 {
     // Get some incoming filters to apply to the entries list
     //
     // The Request::getState() method makes it easy to retain values of
     // certain variables across page accesses. This makes development much
     // simpler because we no longer has to worry about losing variable values
     // if it is left out of a form. The best example is that the form will
     // retain the proper filters even after navigating to the edit entry form
     // and back.
     $filters = array('search' => urldecode(Request::getState($this->_option . '.' . $this->_controller . '.search', 'search', '')), 'state' => urldecode(Request::getState($this->_option . '.' . $this->_controller . '.state', 'state', -1)), 'sort' => Request::getState($this->_option . '.' . $this->_controller . '.sort', 'filter_order', 'name'), 'sort_Dir' => Request::getState($this->_option . '.' . $this->_controller . '.sortdir', 'filter_order_Dir', 'ASC'));
     // Get our model
     // This is the entry point to the database and the
     // table of entries we'll be retrieving data from
     $modeld = Item::all();
     if ($filters['state'] >= 0) {
         $record->whereEquals('state', $filters['state']);
     }
     if ($search = $filters['search']) {
         $record->whereLike('name', $search);
     }
     $rows = $record->ordered('filter_order', 'filter_order_Dir')->paginated()->rows();
     // Output the view
     $this->view->set('rows', $rows)->set('filters', $filters)->display();
 }
Example #5
0
 /**
  * Show the form for editing the specified order.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $items = Item::all();
     $customers = Client::all();
     $order = Order::findOrFail($id);
     return View::make('orders.edit', compact('items', 'customers', 'order'));
 }
 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function create()
 {
     //
     $newId = Itemset::generateId();
     $items = Item::all();
     return View::make('itemset.new', ['id' => $newId, 'items' => $items]);
 }
Example #7
0
 /**
  * Manage Items
  * @before _secure, _admin
  */
 public function manage()
 {
     $this->seo(array("title" => "Items | Manage", "view" => $this->getLayoutView()));
     $view = $this->getActionView();
     $count = Item::count();
     $limit = RequestMethods::get("limit", 20);
     $page = RequestMethods::get("page", 1);
     $items = Item::all(array(), array("id", "name", "price", "tax", "period", "created", "live"), "created", "desc", $limit, $page);
     $view->set("count", $count)->set("page", $page)->set("limit", $limit)->set("items", $items);
 }
 public function run()
 {
     $items = Item::all();
     foreach ($items as $item) {
         $i = Item::find($item->id);
         if ($item->participant) {
             $i->event_id = $item->participant->event_id;
             $i->save();
         }
         if ($item->member) {
             $i->team_id = $item->member->team_id;
             $i->save();
         }
     }
 }
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     //
     $items = Item::all();
     return View::make('item.item', ['items' => $items]);
 }
Example #10
0
| and give it the Closure to execute when that URI is requested.
|
*/
/* Sample routes */
Route::get('f**k', function () {
    return (new ProductionItem())->getUnsoldItems();
    return Carbon::now()->addDays(2);
    return $item = ProductionItem::where('production_id', '=', '215')->where('item_id', '=', '10037')->where('status', '=', "pending")->first()->id;
    return ReportsController::generateSalesByRange();
    return View::make('hello');
    return Auth::user()->username;
    return PDF::loadView('items.barcodes')->setPaper('a6')->setOrientation('landscape')->setWarnings(false)->stream('barcodes.pdf');
});
Route::get('tt', function () {
    return Session::get('REGISTER');
    $item = Item::all();
    return PDF::loadView('items.barcodes')->setPaper('a6')->setOrientation('landscape')->setWarnings(false)->stream('barcodes.pdf');
    $prod = new ProductionItem();
    $pending = $prod->getPendingItems();
    $prod_items = $prod->getCurrentProductionsItemId();
    // return $pending[0]->remaining;
    foreach ($pending as $item) {
        print $item->item_id . " ";
        if (in_array($item->item_id, $prod_items)) {
            return "pending";
            exit;
        }
        return "not pending";
        exit;
    }
    $invoiceInfo = ['customer' => 'Raymund Santillan', 'total' => 'Php 150.00'];
Example #11
0
    $locations = Location::all();
    $taxes = Tax::all();
    return View::make('erporders.orderitems', compact('items', 'locations', 'taxes', 'orderitems'));
});
Route::get('purchaseitems/remove/{id}', function ($id) {
    Session::forget('orderitems', $id);
    $orderitems = Session::get('orderitems');
    $items = Item::all();
    $locations = Location::all();
    $taxes = Tax::all();
    return View::make('erporders.orderitems', compact('items', 'locations', 'taxes', 'orderitems'));
});
Route::get('quotationitems/remove/{id}', function ($id) {
    Session::forget('orderitems', $id);
    $orderitems = Session::get('orderitems');
    $items = Item::all();
    $locations = Location::all();
    $taxes = Tax::all();
    return View::make('erporders.orderitems', compact('items', 'locations', 'taxes', 'orderitems'));
});
Route::resource('stocks', 'StocksController');
Route::resource('erporders', 'ErporderssController');
Route::post('erporder/commit', function () {
    $erporder = Session::get('erporder');
    $erporderitems = Session::get('orderitems');
    $total = Input::all();
    // $client = Client: :findorfail(array_get($erporder, 'client'));
    // print_r($total);
    $order = new Erporder();
    $order->order_number = array_get($erporder, 'order_number');
    $order->client()->associate(array_get($erporder, 'client'));
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $items = Item::all();
     return $items;
 }
Example #13
0
 /**
  * Show the form for creating a new stock
  *
  * @return Response
  */
 public function create()
 {
     $items = Item::all();
     $locations = Location::all();
     return View::make('stocks.create', compact('items', 'locations'));
 }
Example #14
0
 public function storeRes()
 {
     $paxMin = Maintenance::where(['name' => 'pax', 'type' => 'min'])->first();
     $paxMax = Maintenance::where(['name' => 'pax', 'type' => 'max'])->first();
     $format = date_format(Carbon::now()->addDays(13), "Y/m/d");
     $dateFromForm = date('Y/m/d', strtotime(Input::get('reservation_start') . ' -1 days'));
     $validator = Validator::make(Input::all(), ['pax' => "max:{$paxMax->value}|min:{$paxMin->value}|integer", 'reservation_start' => 'after:' . $format, 'reservation_end' => 'after:' . $dateFromForm]);
     if ($validator->fails()) {
         //return $validator->messages()->toJson();
         return Redirect::back()->withInput()->withErrors($validator->messages());
     }
     $reservation = new Reservation();
     $reservation->fill(Input::all());
     $reservation->status = 'Payment Pending';
     if ($reservation->save()) {
         $date1 = new DateTime(Input::get('reservation_start'));
         $date2 = new DateTime(Input::get('reservation_end'));
         $diff = $date2->diff($date1)->format("%a");
         $diff += 1;
         $id = Input::get('id');
         $pasta = Menu::where('scat', '=', 'pasta')->get();
         $dessert = Menu::where('scat', '=', 'dessert')->get();
         $bread = Menu::where('scat', '=', 'bread')->get();
         $drink = Menu::where('scat', '=', 'drinks')->get();
         $salad = Menu::where('scat', '=', 'salad')->get();
         $soup = Menu::where('scat', '=', 'soup')->get();
         $vegetable = Menu::where('scat', '=', 'vegetables')->get();
         $chicken = Menu::where('scat', '=', 'chicken')->get();
         $beef = Menu::where('scat', '=', 'beef')->get();
         $fish = Menu::where('scat', '=', 'fish')->get();
         $pork = Menu::where('scat', '=', 'pork')->get();
         $packages = Packages::get();
         $item = Item::all();
         return View::make('admin.reservation_continuation', compact('item', 'packages', 'id', 'diff', 'chicken', 'pork', 'fish', 'beef', 'dessert', 'pasta', 'bread', 'drink', 'salad', 'soup', 'vegetable'));
     }
 }
Example #15
0
    <link rel="stylesheet" href="/css/print.css" type="text/css" media="print">
    <style type="text/css">
    	div .barcode{

    		
    	}
    </style>
</head>
<body >
	<div class="main" style="margin:0 auto;">
	    <div class="main-inner">
	        <div class="container">

				<h2>Item Barcodes</h2><hr/>
				<?php 
$current_items = Item::all();
?>
			
				<div class="row" >
					@foreach($current_items as $item)
					
					<div style="border:1px solid #ccc;padding:10px;width:292px;float:left;">

						<strong style="font-size:15px;"> {{ $item->name }}</strong>
						{{ DNS1D::getBarcodeHTML($item->barcode, "EAN13",3,80) }}
						<div class="barcode" style="letter-spacing:8px;line-height:26px;margin-left:38px;margin-top:10px;font-size:18px;">

							{{ $item->barcode }}
						</div>
						
						
 public static function index()
 {
     $options = array();
     $items = Item::all($options);
     View::make('item/index.html', array('items' => $items));
 }
 public static function show($id)
 {
     $itemtype = ItemType::find($id);
     $items = Item::all(array('itemtype_id' => $id));
     View::make('itemtype/show.html', array('itemtype' => $itemtype, 'items' => $items));
 }
Example #18
0
 public function getAll($f3)
 {
     echo json_encode(Item::all());
 }
Example #19
0
 /**
  * Display a listing of items
  *
  * @return Response
  */
 public function index()
 {
     $items = Item::all();
     return View::make('items.index', compact('items'));
 }
Example #20
0
 /**
  * @before _secure, _admin
  */
 public function managePackage()
 {
     $this->seo(array("title" => "Manage Package", "view" => $this->getLayoutView()));
     $view = $this->getActionView();
     $items = Item::all(array(), array("id", "name"));
     $setItems = array();
     foreach ($items as $i) {
         $setItems["{$i->id}"] = $i;
     }
     $page = Shared\Markup::page(array("model" => "Package", "where" => array()));
     $packages = Package::all(array(), array("*"), "created", "desc", $page["limit"], $page["page"]);
     $view->set("packages", $packages)->set("items", $setItems)->set($page);
 }
 /**
  * Orderts list
  *
  * @return JSON
  */
 public function lists()
 {
     $items = Item::all();
     return $this->respondWithCollection($items, new ItemTransformer());
 }
Example #22
0
 public function purchases()
 {
     $purchases = DB::table('erporders')->join('erporderitems', 'erporders.id', '=', 'erporderitems.erporder_id')->join('items', 'erporderitems.item_id', '=', 'items.id')->join('clients', 'erporders.client_id', '=', 'clients.id')->where('erporders.type', '=', 'purchases')->select('clients.name as client', 'items.name as item', 'quantity', 'clients.address as address', 'clients.phone as phone', 'clients.email as email', 'date', 'erporders.id as id', 'erporders.status', 'discount_amount', 'erporders.order_number as order_number', 'price', 'description', 'erporders.type')->get();
     $items = Item::all();
     $locations = Location::all();
     $organization = Organization::find(1);
     $pdf = PDF::loadView('erpreports.purchasesReport', compact('purchases', 'organization'))->setPaper('a4')->setOrientation('potrait');
     return $pdf->stream('Purchases List.pdf');
 }
 /**
  * Show the form for creating a new stock
  *
  * @return Response
  */
 public function create()
 {
     $items = Item::all();
     $accounts = Account::all();
     return View::make('purchases.create', compact('items', 'accounts'));
 }
Example #24
-9
 public function stock()
 {
     $items = Item::all();
     $organization = Organization::find(1);
     $pdf = PDF::loadView('erpreports.stockReport', compact('items', 'organization'))->setPaper('a4')->setOrientation('potrait');
     return $pdf->stream('Stock Report.pdf');
 }