private function _viewentries()
 {
     //$type = Input::get('type', 'deposit_date');
     $daterange = Input::get('record_range', '');
     //Session::put('ss_select_banktype', $type);
     Larasset::start('header')->css('daterangepicker');
     Larasset::start('footer')->js('moment', 'daterangepicker');
     Larasset::start('footer')->js('dataTables-min', 'dataTables-bootstrap');
     $data['entries'] = Bankentry::with(array('user' => function ($q) {
         $q->select('id', 'name');
     }));
     //Is the person Admin or not
     if (User::permitted('role.admin') !== true) {
         $data['entries'] = $data['entries']->where('user_id', Auth::user()->id);
     }
     if ($daterange !== '' && strpos($daterange, '-') !== FALSE) {
         $fromandto = explode('-', $daterange);
         $from = $fromandto[0];
         $to_plus_1day = strtotime('now') - strtotime('yesterday') + strtotime($fromandto[1]);
         $to = date('Y/n/d', $to_plus_1day);
         $data['from'] = date('Y/n/d', strtotime($fromandto[0]));
         $data['to'] = date('Y/n/d', strtotime($fromandto[1]));
     } else {
         $to = date('Y/n/d', strtotime('today'));
         $from = date('Y/n/d', mktime(0, 0, 0, date('n') - 6, 1, date('y')));
         $data['from'] = $from;
         $data['to'] = $to;
     }
     $data['entries'] = $data['entries']->whereBetween('deposit_date', array(sqldate($from), sqldate($to)));
     $data['entries'] = $data['entries']->orderby('deposit_date', 'desc')->paginate(10);
     //tt($data);
     return $data;
 }
 public function stockUpdate()
 {
     Larasset::start('header')->css('daterangepicker');
     Larasset::start('footer')->js('moment', 'daterangepicker');
     $daterange = Input::get('record_range');
     if (strpos($daterange, '-') !== FALSE) {
         $fromandto = explode('-', $daterange);
         $from = sqldate($fromandto[0]);
         $to_plus_1day = strtotime('now') - strtotime('yesterday') + strtotime($fromandto[1]);
         $to = sqldate(date('Y/n/d', $to_plus_1day));
         $data['todate'] = $fromandto[1];
     } else {
         $from = sqldate(date('Y/n/d', strtotime('first day of this month')));
         $to = sqldate('+1day');
         $data['todate'] = $to;
     }
     $data['fromdate'] = $from;
     $data['todate'] = $to;
     $time = array($data['fromdate'], $data['todate']);
     $activities = Usersactivity::where('activity_type', '=', 'stock')->whereBetween('created_at', $time)->orderBy('id', 'desc')->get();
     //$data = array();
     if ($activities != null) {
         $data['activities'] = $activities;
     }
     $this->layout->title = "Welcome to Admin Area";
     $this->layout->content = View::make('admin.stockupdate_record.index', $data);
 }
Esempio n. 3
0
 /**
  * Display the default page
  *
  * @return Response
  */
 public function index()
 {
     Larasset::start('footer')->js('vegas');
     Larasset::start('header')->css('vegas');
     $this->layout->title = Config::get('software.karanamkiahe') . ' Login';
     $this->layout->content = View::make('login');
 }
 public function addCategory($id, $type)
 {
     Larasset::start('header')->css('magicsuggest');
     Larasset::start('footer')->js('magicsuggest');
     $data['brand_id'] = $id;
     return View::make('admin.create.' . $type, $data);
 }
 private function _getlogo()
 {
     Larasset::start('header')->css('bootstrap_editable');
     $brandID = Input::get('id');
     $brand = Brand::where('id', $brandID)->first();
     $brand->image = imging($brand->brandlogo);
     $brand->islogo = $brand->brandlogo !== '' ? 'yes' : 'no';
     return $brand;
 }
 public function edit()
 {
     Larasset::start('footer')->js('bootstrap-datepicker');
     Larasset::start('header')->css('bootstrap-datepicker');
     $all = Input::all();
     $id = $all['id'];
     //Lets fetch the updated data and return it through ajax
     $data['row'] = Expenditure::where('id', $id)->get()->toArray()[0];
     return View::make('admin.expenditures.expen_edit', $data);
 }
 public function addProducts($brandid, $catid)
 {
     Larasset::start('header')->css('magicsuggest');
     Larasset::start('footer')->js('magicsuggest');
     $productcat = Productcategory::find($catid)->toArray();
     $brand = Brand::find($productcat['brand_id'])->toArray();
     $data['productcat'] = $productcat;
     $data['brand'] = $brand;
     return View::make('admin.create.addproduct', $data);
 }
 private function _view()
 {
     //$type = Input::get('type', 'created_at');
     //$daterange = Input::get('record_range', '');
     //Session::put('ss_select_expen', $type);
     //Larasset::start('header')->css('daterangepicker');
     //Larasset::start('footer')->js('moment', 'daterangepicker');
     Larasset::start('footer')->js('dataTables-min', 'dataTables-bootstrap');
     $data['entries'] = DB::table('vendors')->orderby('id', 'desc')->get();
     return $data;
 }
Esempio n. 9
0
 protected function setupAssets()
 {
     $css = array('twitter-bootstrap-docs' => 'twitter-bootstrap-2.3.2/css/docs.css', 'twitter-bootstrap' => 'twitter-bootstrap-2.3.2/css/bootstrap.css', 'font-awesome' => 'font-awesome-3.2.1/css/font-awesome.min.css', 'twitter-bootstrap-responsive' => 'twitter-bootstrap-2.3.2/css/bootstrap-responsive.css', 'ace-font' => 'acetheme/css/ace-fonts.css', 'ace-responsive' => 'acetheme/css/ace-responsive.min.css', 'ace-skins' => 'acetheme/css/ace-skins.min.css', 'ace' => 'acetheme/css/ace.min.css', 'bucketcodes' => 'bucketcodes/css/bucketcodes.css', 'magicsuggest' => 'nicolasbize-magicsuggest/src/magicsuggest-1.3.1.css', 'bootstrap_editable' => 'bootstrap_editable/bootstrap-editable/css/bootstrap-editable.css', 'bootstrap-datepicker' => 'acetheme/css/datepicker.css', 'select2' => 'acetheme/css/select2.css', 'daterangepicker' => 'acetheme/css/daterangepicker.css', 'tkeyboard' => 'bucketcodes/css/tkeyboard.css', 'vegas' => 'vegas-master/src/jquery.vegas.css');
     $js = array('jquery' => 'jquery/jquery-2.0.3.min.js', 'twitter-bootstrap' => 'twitter-bootstrap-2.3.2/js/bootstrap.js', 'twitter-typeahead' => 'twitter-typeahead/typeahead.js', 'ace-element' => 'acetheme/js/ace-elements.min.js', 'ace' => 'acetheme/js/ace.min.js', 'jquery-ui' => 'acetheme/js/jquery-ui-1.10.3.custom.min.js', 'ajax-request' => 'bucketcodes/js/ajax-request.js', 'ajax-request-wrapper' => 'bucketcodes/js/ajax-request-wrapper.js', 'ajax-refresh' => 'bucketcodes/js/ajax-refresh.js', 'commonjs' => 'bucketcodes/js/common.js', 'g56_functions' => 'bucketcodes/js/g56_functions.js', 'bootbox' => 'acetheme/js/bootbox.js', 'datatables-bootstrap' => 'acetheme/js/jquery.dataTables.bootstrap.js', 'datatables-min' => 'acetheme/js/jquery.dataTables.min.js', 'debugger' => 'bucketcodes/js/js-debugger.js', 'bootstrap-growl' => 'bootstrap-growl/bootstrap-growl.js', 'magicsuggest' => 'nicolasbize-magicsuggest/src/magicsuggest-1.3.1.js', 'fuelux-loader-required' => 'fuelux/js/loader.min.js', 'bootstrap_editable' => 'bootstrap_editable/bootstrap-editable/js/bootstrap-editable.js', 'jquery-print' => 'jquery.plugin.print/jquery.plugin.print.js', 'jquery-cookies' => 'bucketcodes/js/jquery_cookies.js', 'bootstrap-datepicker' => 'acetheme/js/bootstrap-datepicker.min.js', 'select2' => 'acetheme/js/select2.min.js', 'slimscroll' => 'acetheme/js/jquery.slimscroll.min.js', 'moment' => 'acetheme/js/moment.min.js', 'daterangepicker' => 'acetheme/js/daterangepicker.min.js', 'maskedinput' => 'acetheme/js/jquery.maskedinput.min.js', 'tkeyboard' => 'bucketcodes/js/tkeyboard.js', 'caret' => 'bucketcodes/js/jquery.caret.js', 'ionsound' => 'ionsound/js/ion-sound/ion.sound.min.js', 'vegas' => 'vegas-master/src/jquery.vegas.js');
     Larasset::start()->vendor_dir = 'vendor/';
     Larasset::start()->storecss($css);
     Larasset::start()->storejs($js);
     Larasset::start('header')->css('twitter-bootstrap-docs', 'twitter-bootstrap', 'twitter-bootstrap-responsive', 'font-awesome', 'selectboxit', 'magicsuggest', 'ace-font', 'ace', 'ace-responsive', 'ace-skins', 'bucketcodes', 'tkeyboard');
     Larasset::start('header')->js('jquery');
     Larasset::start('footer')->js('jquery-ui', 'twitter-bootstrap', 'ajax-request', 'ajax-request-wrapper', 'ajax-refresh', 'bootbox', 'debugger', 'ace-element', 'ace', 'moment', 'commonjs', 'g56_functions', 'magicsuggest', 'caret', 'tkeyboard', 'jquery-print', 'ionsound', 'slimscroll', 'bootstrap-growl');
 }
Esempio n. 10
0
 public function adminListCustomers()
 {
     Larasset::start('footer')->js('dataTables-min', 'dataTables-bootstrap');
     $allcustomers = Customer::all();
     $data['customers'] = $allcustomers->toArray();
     if (Request::ajax()) {
         return View::make('admin.listcustomers', $data);
     } else {
         $this->layout->title = 'Create, Edit, Delete Staff';
         $this->layout->content = View::make('admin.tab_customermenus', $data);
     }
 }
Esempio n. 11
0
 public function show()
 {
     //Artisan::call('db:dump');
     //tt( Receipt::find(2)->user()->get()->toArray() );
     Larasset::start('footer')->js('jquery-cookies', 'bootstrap_editable');
     $modesArr = Mode::listModes();
     //Cartsession::set();
     foreach ($modesArr as $key => $value) {
         @($data['str_modes'] .= ucwords($value) . ':' . $key . ',');
     }
     $this->layout->title = Systemsetting::getx('name') . ' - Home';
     $this->layout->content = View::make('frontpage', $data);
 }
 public function index()
 {
     Larasset::start('header')->css('daterangepicker');
     Larasset::start('footer')->js('moment', 'daterangepicker');
     Larasset::start('footer')->js('dataTables-min', 'dataTables-bootstrap', 'bootstrap_editable');
     $data['records'] = '';
     $data['fromdate'] = sqldate(date('Y/n/d', strtotime('first day of this month')));
     $data['todate'] = sqldate('+1day');
     if (($record_type = Input::get('record_type')) != NULL) {
         $data = $this->_fetchRecord();
         $data['view_file'] = 'admin.records.records_' . $record_type;
     }
     $this->layout->title = 'Records Area';
     $this->layout->content = View::make('admin.records.records_index', $data);
 }
Esempio n. 13
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     Larasset::start('header')->css('daterangepicker');
     Larasset::start('footer')->js('moment', 'daterangepicker');
     Larasset::start('footer')->js('dataTables-min', 'dataTables-bootstrap', 'bootstrap_editable');
     //Setting Defaults
     $data['records'] = '';
     $data['fromdate'] = '';
     $data['todate'] = sqldate('now');
     $data = $this->_fetchRecord();
     $data['view_file'] = 'sales.sales';
     //Geting dynamic
     if (($record_type = Input::get('record_type')) != NULL) {
         //$data = $this->_fetchRecord();
         $data['view_file'] = 'sales.' . $record_type;
     }
     $this->layout->title = "Sales records";
     $this->layout->content = View::make('sales.sales_index', $data);
 }
Esempio n. 14
0
 public function adminPreviewStaffProfile($staffID)
 {
     Larasset::start('footer')->js('bootstrap_editable', 'bootstrap-datepicker');
     Larasset::start('header')->css('bootstrap_editable', 'bootstrap-datepicker');
     //Lets the details of a staff
     $staff = User::find($staffID);
     //Lets get the staff's Activity
     $activity = Usersactivity::where('user_id', '=', $staffID)->take(10)->orderBy('id', 'desc')->get();
     //tt($activity->toArray());
     //Lets get how much the staff's ever sold
     $salesworth = User::find($staffID)->salelogs()->sum('total_unitprice');
     $data['salesworth'] = 0.0;
     $data['role'] = Role::all()->lists('id', 'name');
     //tt($data['role']);
     if (!empty($salesworth) && $salesworth !== null) {
         $data['salesworth'] = $salesworth;
     }
     $data['staff'] = $staff->toArray();
     $data['activities'] = $activity;
     return View::make('admin.previewstaffprofile', $data);
 }
 private function _processHistory($id, $daterange)
 {
     Larasset::start('header')->css('daterangepicker');
     Larasset::start('footer')->js('moment', 'daterangepicker');
     if (strpos($daterange, '-') !== FALSE) {
         $fromandto = explode('-', $daterange);
         $from = sqldate($fromandto[0]);
         $to_plus_1day = strtotime('now') - strtotime('yesterday') + strtotime($fromandto[1]);
         $to = sqldate(date('Y/n/d', $to_plus_1day));
         $data['todate'] = $fromandto[1];
     } else {
         $from = sqldate(date('Y/n/d', strtotime('first day of this month')));
         $to = sqldate('+1day');
         $data['todate'] = $to;
     }
     $customerlog = Salelog::with(array('product' => function ($q) {
         $q->select('id', 'name', 'productcat_id')->with(array('categories' => function ($qr) {
             $qr->select('id', 'type');
         }));
     }))->where('customer_id', '=', $id)->whereBetween('created_at', array($from, $to))->orderBy('id', 'desc');
     //tt(groupThem($customerlog->get()->toArray(), 'receipt_id'));
     $customerDetails = Customer::where('id', '=', $id)->first();
     //$data['customerhistory'] = $customerlog->get()->toArray();
     $data['customerhistory'] = groupThem($customerlog->get()->toArray(), 'receipt_id');
     $data['customerdetail'] = $customerDetails;
     $data['fromdate'] = $from;
     $this->layout->title = 'Customer History';
     $this->layout->content = View::make('admin.customerhistory', $data);
 }
Esempio n. 16
0
<?php

$geturl = URL::route("getactivatebox");
Larasset::start()->set_inlineScript('
<script>
	$(document).ready(function(){
		var callActivateBox = function (e){
			e.preventDefault();
			e.stopImmediatePropagation();

			var $this = $(this), url = "' . $geturl . '" ;

			$this.off("click.callActivateBox", callActivateBox);

			$.get(url, function(data){
				cloneModalbox( $("#myModal") )
				.css({"width":"600px"})
				.centerModal()
				.find(".modal-body").html( data )
				.end()
				.find(".modal-header h3")
				.text("Activate this software")
				.end()
				.find(".modal-footer [data-ref=\\"submit-form\\"]")
				.attr("data-ref", "activate-software")
				.text("Activate software")
				.end()
				.modal();

				$this.on("click.callActivateBox", callActivateBox);
			});
Esempio n. 17
0
 private function _jsBank(array $assetsArray)
 {
     self::$assetStoreJs = array_merge(self::$assetStoreJs, $assetsArray);
 }
 public function getactivatebox()
 {
     Larasset::start('footer')->js('charlimit', 'maskedinput');
     return View::make('error.gnu_activatebox');
 }