From e3a65e0dd67c4cc76b0b8ccea4d28daa573ee753 Mon Sep 17 00:00:00 2001 From: = <=> Date: Wed, 11 Mar 2015 15:25:48 -0500 Subject: [PATCH 1/3] Modified housekeeping script to email john the data he wants and also fixed project orders so admin can view a project --- app/commands/housekeeping.php | 16 +++++++-- app/controllers/OrderController.php | 13 +------ ...11_140225_create_distributionListTable.php | 35 +++++++++++++++++++ app/models/DistributionList.php | 13 +++++++ app/routes.php | 2 +- .../protolab_requires_order.blade.php | 34 ++++++++++++++++++ vendor/autoload.php | 2 +- vendor/composer/ClassLoader.php | 6 +--- vendor/composer/autoload_classmap.php | 18 ++++++++-- vendor/composer/autoload_real.php | 10 +++--- 10 files changed, 121 insertions(+), 28 deletions(-) create mode 100644 app/database/migrations/2015_03_11_140225_create_distributionListTable.php create mode 100644 app/models/DistributionList.php create mode 100644 app/views/emails/prototypingLab/protolab_requires_order.blade.php diff --git a/app/commands/housekeeping.php b/app/commands/housekeeping.php index a126884..cf5d758 100644 --- a/app/commands/housekeeping.php +++ b/app/commands/housekeeping.php @@ -66,9 +66,21 @@ public function fire() $items = Item::whereIn('OrderID',$order_ids)->where('status','=','7')->get(); if(!$items->isEmpty()){ $checks['LabTagItems'] = true; + //We need to notify the protolab_requires_order distribution list of an open order + //Grab people we need to notify + $protolab_users = DistributionList::where("distributionList","=","protolab_requires_order")->lists("UserID"); + $protolab_users_obj = User::whereIn("id",$protolab_users)->get(); //User objects of anyone on the protolab distribution list + Mail::send('emails.prototypingLab.protolab_requires_order', array('items' => $items), function ($message) use ($protolab_users_obj) { + foreach ($protolab_users_obj as $protolab_user) { + $message->to($protolab_user->Email, $protolab_user->FirstName . ' ' . $protolab_user->LastName); + } + $message->subject('[IPRO Manager] Prototyping Lab Action Required'); + }); } + + //Send that admin email thing if there are any tasks needing work - foreach($checks as $key=>$val){ + /*foreach($checks as $key=>$val){ if($val){ $checks['sendEmail'] = true; } @@ -82,7 +94,7 @@ public function fire() $message->subject('IPRO Manager action required!'); }); $this->info('sending admin email'); - } + }*/ $this->info('successfully completed housekeeping script'); return true; } diff --git a/app/controllers/OrderController.php b/app/controllers/OrderController.php index 1a2982c..fbb4d8a 100644 --- a/app/controllers/OrderController.php +++ b/app/controllers/OrderController.php @@ -10,7 +10,7 @@ public function newOrder($id){ $project = Project::find($id); //Make sure that the user is enrolled if(!$project->isEnrolled()){ - return Redirect::route('dashboard')->with('error',array('You must be enrolled in the class to see that page')); + return Redirect::route('dashboard')->with('error',array('You must be enrolled in the class to place an order')); } //User is already available //Grab the acct info @@ -170,17 +170,8 @@ public function newOrderProcess($id){ public function viewOrder($projectid,$orderid){ //in the function we are going to show the user the order and project. First we confirm the users enrollment in the project. $project = Project::find(intval($projectid)); - if(!$project->isEnrolled()){ - return Redirect::route('dashboard')->with('error',array('You must be enrolled in the class to view that page')); - } - //lets see if the person is enrolled in the project - $projusers = $project->Users()->where('UserID',"=",Auth::id())->get(); - if($projusers->isEmpty()){ - return Redirect::route("dashboard")->with("error",array("You do not have access to view that order")); - } //Now let's pull the order $order = Order::find(intval($orderid)); - //Make sure the order belongs to this project if($order->ClassID != $project->id){ return Redirect::route("dashboard")->with("error",array("You do not have access to view that order")); @@ -193,7 +184,5 @@ public function viewOrder($projectid,$orderid){ View::share("order",$order); View::share("items",$items); return View::make("Orders.view"); - - } } diff --git a/app/database/migrations/2015_03_11_140225_create_distributionListTable.php b/app/database/migrations/2015_03_11_140225_create_distributionListTable.php new file mode 100644 index 0000000..0cd5c60 --- /dev/null +++ b/app/database/migrations/2015_03_11_140225_create_distributionListTable.php @@ -0,0 +1,35 @@ +increments('id'); + $table->string("distributionList"); + $table->integer("UserID")->unsigned(); + $table->timestamps(); + $table->foreign("UserID")->references("id")->on("users"); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('distribution_lists'); + } + +} diff --git a/app/models/DistributionList.php b/app/models/DistributionList.php new file mode 100644 index 0000000..ed8924c --- /dev/null +++ b/app/models/DistributionList.php @@ -0,0 +1,13 @@ + 'required', + 'UserID' => 'required' + ); + public function Users(){ + return $this->belongsTo('User','UserID','id'); + } +} + diff --git a/app/routes.php b/app/routes.php index 0ed032c..752714a 100644 --- a/app/routes.php +++ b/app/routes.php @@ -74,7 +74,7 @@ Route::group(array('prefix'=>'orders'), function(){ //admin/orders group Route::get('/',array('as'=>'admin.orders','uses'=>'AdminOrderController@index')); - Route::get('/{id}','AdminOrderController@manage')->where(array('id' => '[0-9]+')); + Route::get('/{id}',array('as'=>'admin.order.manage','uses'=>'AdminOrderController@manage'))->where(array('id' => '[0-9]+')); Route::post('/{id}/CreateNote',array('before'=>'csrf','as'=>'admin.order.createNote','uses'=>'AdminOrderController@createNote')); Route::group(array('prefix'=>'pickup'), function(){ //admin/orders/pickup route group diff --git a/app/views/emails/prototypingLab/protolab_requires_order.blade.php b/app/views/emails/prototypingLab/protolab_requires_order.blade.php new file mode 100644 index 0000000..ef7269f --- /dev/null +++ b/app/views/emails/prototypingLab/protolab_requires_order.blade.php @@ -0,0 +1,34 @@ +@extends('emails.layout') +@section('TopSentence') + Prototyping Lab Action Required!! +@stop +@section('content') + +
While you were setting things on fire and building potato launchers some items have changed status and now require your attention!! + (For three low low payments of 19.87)
+Below is a listing of the items found within the app that require your attention.
+Order | +Item | +Part Number | +Cost | +Quantity | +Shipping | +Total Cost | +
ORD:{{$item->OrderID}} | +{{$item->Name}} | +{{ $item->PartNumber }} | +${{ number_format($item->Cost,2) }} | +{{ $item->Quantity }} | +${{ number_format($item->Shipping,2) }} | +${{ number_format($item->TotalCost,2) }} | +
-The Ghost of IPRO Manager Ordering
+@stop \ No newline at end of file diff --git a/vendor/autoload.php b/vendor/autoload.php index c2530e2..97c7a1b 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer' . '/autoload_real.php'; -return ComposerAutoloaderInitfa8a7c0137ba3286d4c802f66991b0e8::getLoader(); +return ComposerAutoloaderInitcb39d0333c8a78c0abf24e828c1ba152::getLoader(); diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php index 70d78bc..4433649 100644 --- a/vendor/composer/ClassLoader.php +++ b/vendor/composer/ClassLoader.php @@ -56,11 +56,7 @@ class ClassLoader public function getPrefixes() { - if (!empty($this->prefixesPsr0)) { - return call_user_func_array('array_merge', $this->prefixesPsr0); - } - - return array(); + return call_user_func_array('array_merge', $this->prefixesPsr0); } public function getPrefixesPsr4() diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 06f58da..72c68ab 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -70,6 +70,7 @@ 'CreateBudgetsTable' => $baseDir . '/app/database/migrations/2014_08_08_165319_create_Budgets_table.php', 'CreateClassAccessTypes' => $baseDir . '/app/database/migrations/2014_08_09_102350_create_classAccessTypes.php', 'CreateClassesTable' => $baseDir . '/app/database/migrations/2014_08_06_032316_create_classes_table.php', + 'CreateDistributionListTable' => $baseDir . '/app/database/migrations/2015_03_11_140225_create_distributionListTable.php', 'CreateGLFK' => $baseDir . '/app/database/migrations/2014_08_10_205212_create_GL_FK.php', 'CreateGLTable' => $baseDir . '/app/database/migrations/2014_08_08_165304_create_GL_table.php', 'CreateIproTracksTbl' => $baseDir . '/app/database/migrations/2014_10_09_123507_create_ipro_tracks_tbl.php', @@ -157,6 +158,7 @@ 'GuzzleHttp\\Exception\\ServerException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/ServerException.php', 'GuzzleHttp\\Exception\\TooManyRedirectsException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php', 'GuzzleHttp\\Exception\\TransferException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/TransferException.php', + 'GuzzleHttp\\Exception\\XmlParseException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/XmlParseException.php', 'GuzzleHttp\\HasDataTrait' => $vendorDir . '/guzzlehttp/guzzle/src/HasDataTrait.php', 'GuzzleHttp\\Message\\AbstractMessage' => $vendorDir . '/guzzlehttp/guzzle/src/Message/AbstractMessage.php', 'GuzzleHttp\\Message\\MessageFactory' => $vendorDir . '/guzzlehttp/guzzle/src/Message/MessageFactory.php', @@ -338,7 +340,6 @@ 'Illuminate\\Encryption\\DecryptException' => $vendorDir . '/laravel/framework/src/Illuminate/Encryption/DecryptException.php', 'Illuminate\\Encryption\\Encrypter' => $vendorDir . '/laravel/framework/src/Illuminate/Encryption/Encrypter.php', 'Illuminate\\Encryption\\EncryptionServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php', - 'Illuminate\\Encryption\\InvalidKeyException' => $vendorDir . '/laravel/framework/src/Illuminate/Encryption/InvalidKeyException.php', 'Illuminate\\Events\\Dispatcher' => $vendorDir . '/laravel/framework/src/Illuminate/Events/Dispatcher.php', 'Illuminate\\Events\\EventServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Events/EventServiceProvider.php', 'Illuminate\\Exception\\ExceptionDisplayerInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Exception/ExceptionDisplayerInterface.php', @@ -598,6 +599,7 @@ 'Monolog\\Formatter\\LineFormatter' => $vendorDir . '/monolog/monolog/src/Monolog/Formatter/LineFormatter.php', 'Monolog\\Formatter\\LogglyFormatter' => $vendorDir . '/monolog/monolog/src/Monolog/Formatter/LogglyFormatter.php', 'Monolog\\Formatter\\LogstashFormatter' => $vendorDir . '/monolog/monolog/src/Monolog/Formatter/LogstashFormatter.php', + 'Monolog\\Formatter\\MongoDBFormatter' => $vendorDir . '/monolog/monolog/src/Monolog/Formatter/MongoDBFormatter.php', 'Monolog\\Formatter\\NormalizerFormatter' => $vendorDir . '/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php', 'Monolog\\Formatter\\ScalarFormatter' => $vendorDir . '/monolog/monolog/src/Monolog/Formatter/ScalarFormatter.php', 'Monolog\\Formatter\\WildfireFormatter' => $vendorDir . '/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php', @@ -620,6 +622,7 @@ 'Monolog\\Handler\\FingersCrossed\\ChannelLevelActivationStrategy' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php', 'Monolog\\Handler\\FingersCrossed\\ErrorLevelActivationStrategy' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php', 'Monolog\\Handler\\FirePHPHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php', + 'Monolog\\Handler\\FleepHookHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/FleepHookHandler.php', 'Monolog\\Handler\\FlowdockHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php', 'Monolog\\Handler\\GelfHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/GelfHandler.php', 'Monolog\\Handler\\GroupHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/GroupHandler.php', @@ -628,16 +631,20 @@ 'Monolog\\Handler\\LogEntriesHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/LogEntriesHandler.php', 'Monolog\\Handler\\LogglyHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/LogglyHandler.php', 'Monolog\\Handler\\MailHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/MailHandler.php', + 'Monolog\\Handler\\MandrillHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/MandrillHandler.php', 'Monolog\\Handler\\MissingExtensionException' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/MissingExtensionException.php', 'Monolog\\Handler\\MongoDBHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/MongoDBHandler.php', 'Monolog\\Handler\\NativeMailerHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php', 'Monolog\\Handler\\NewRelicHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php', 'Monolog\\Handler\\NullHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/NullHandler.php', + 'Monolog\\Handler\\PsrHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/PsrHandler.php', 'Monolog\\Handler\\PushoverHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/PushoverHandler.php', 'Monolog\\Handler\\RavenHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/RavenHandler.php', 'Monolog\\Handler\\RedisHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/RedisHandler.php', 'Monolog\\Handler\\RollbarHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/RollbarHandler.php', 'Monolog\\Handler\\RotatingFileHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php', + 'Monolog\\Handler\\SamplingHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/SamplingHandler.php', + 'Monolog\\Handler\\SlackHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/SlackHandler.php', 'Monolog\\Handler\\SocketHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/SocketHandler.php', 'Monolog\\Handler\\StreamHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/StreamHandler.php', 'Monolog\\Handler\\SwiftMailerHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php', @@ -645,6 +652,7 @@ 'Monolog\\Handler\\SyslogUdpHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php', 'Monolog\\Handler\\SyslogUdp\\UdpSocket' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php', 'Monolog\\Handler\\TestHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/TestHandler.php', + 'Monolog\\Handler\\WhatFailureGroupHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php', 'Monolog\\Handler\\ZendMonitorHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php', 'Monolog\\Logger' => $vendorDir . '/monolog/monolog/src/Monolog/Logger.php', 'Monolog\\Processor\\GitProcessor' => $vendorDir . '/monolog/monolog/src/Monolog/Processor/GitProcessor.php', @@ -695,10 +703,12 @@ 'OAuth\\OAuth1\\Service\\Etsy' => $vendorDir . '/lusitanian/oauth/src/OAuth/OAuth1/Service/Etsy.php', 'OAuth\\OAuth1\\Service\\FitBit' => $vendorDir . '/lusitanian/oauth/src/OAuth/OAuth1/Service/FitBit.php', 'OAuth\\OAuth1\\Service\\Flickr' => $vendorDir . '/lusitanian/oauth/src/OAuth/OAuth1/Service/Flickr.php', + 'OAuth\\OAuth1\\Service\\ScoopIt' => $vendorDir . '/lusitanian/oauth/src/OAuth/OAuth1/Service/ScoopIt.php', 'OAuth\\OAuth1\\Service\\ServiceInterface' => $vendorDir . '/lusitanian/oauth/src/OAuth/OAuth1/Service/ServiceInterface.php', 'OAuth\\OAuth1\\Service\\Tumblr' => $vendorDir . '/lusitanian/oauth/src/OAuth/OAuth1/Service/Tumblr.php', 'OAuth\\OAuth1\\Service\\Twitter' => $vendorDir . '/lusitanian/oauth/src/OAuth/OAuth1/Service/Twitter.php', 'OAuth\\OAuth1\\Service\\Xing' => $vendorDir . '/lusitanian/oauth/src/OAuth/OAuth1/Service/Xing.php', + 'OAuth\\OAuth1\\Service\\Yahoo' => $vendorDir . '/lusitanian/oauth/src/OAuth/OAuth1/Service/Yahoo.php', 'OAuth\\OAuth1\\Signature\\Exception\\UnsupportedHashAlgorithmException' => $vendorDir . '/lusitanian/oauth/src/OAuth/OAuth1/Signature/Exception/UnsupportedHashAlgorithmException.php', 'OAuth\\OAuth1\\Signature\\Signature' => $vendorDir . '/lusitanian/oauth/src/OAuth/OAuth1/Signature/Signature.php', 'OAuth\\OAuth1\\Signature\\SignatureInterface' => $vendorDir . '/lusitanian/oauth/src/OAuth/OAuth1/Signature/SignatureInterface.php', @@ -708,8 +718,10 @@ 'OAuth\\OAuth2\\Service\\Amazon' => $vendorDir . '/lusitanian/oauth/src/OAuth/OAuth2/Service/Amazon.php', 'OAuth\\OAuth2\\Service\\Bitly' => $vendorDir . '/lusitanian/oauth/src/OAuth/OAuth2/Service/Bitly.php', 'OAuth\\OAuth2\\Service\\Box' => $vendorDir . '/lusitanian/oauth/src/OAuth/OAuth2/Service/Box.php', + 'OAuth\\OAuth2\\Service\\Buffer' => $vendorDir . '/lusitanian/oauth/src/OAuth/OAuth2/Service/Buffer.php', 'OAuth\\OAuth2\\Service\\Dailymotion' => $vendorDir . '/lusitanian/oauth/src/OAuth/OAuth2/Service/Dailymotion.php', 'OAuth\\OAuth2\\Service\\Dropbox' => $vendorDir . '/lusitanian/oauth/src/OAuth/OAuth2/Service/Dropbox.php', + 'OAuth\\OAuth2\\Service\\Exception\\InvalidAccessTypeException' => $vendorDir . '/lusitanian/oauth/src/OAuth/OAuth2/Service/Exception/InvalidAccessTypeException.php', 'OAuth\\OAuth2\\Service\\Exception\\InvalidAuthorizationStateException' => $vendorDir . '/lusitanian/oauth/src/OAuth/OAuth2/Service/Exception/InvalidAuthorizationStateException.php', 'OAuth\\OAuth2\\Service\\Exception\\InvalidScopeException' => $vendorDir . '/lusitanian/oauth/src/OAuth/OAuth2/Service/Exception/InvalidScopeException.php', 'OAuth\\OAuth2\\Service\\Exception\\MissingRefreshTokenException' => $vendorDir . '/lusitanian/oauth/src/OAuth/OAuth2/Service/Exception/MissingRefreshTokenException.php', @@ -730,6 +742,7 @@ 'OAuth\\OAuth2\\Service\\SalesforceService' => $vendorDir . '/lusitanian/oauth/src/OAuth/OAuth2/Service/Salesforce.php', 'OAuth\\OAuth2\\Service\\ServiceInterface' => $vendorDir . '/lusitanian/oauth/src/OAuth/OAuth2/Service/ServiceInterface.php', 'OAuth\\OAuth2\\Service\\SoundCloud' => $vendorDir . '/lusitanian/oauth/src/OAuth/OAuth2/Service/SoundCloud.php', + 'OAuth\\OAuth2\\Service\\Ustream' => $vendorDir . '/lusitanian/oauth/src/OAuth/OAuth2/Service/Ustream.php', 'OAuth\\OAuth2\\Service\\Vkontakte' => $vendorDir . '/lusitanian/oauth/src/OAuth/OAuth2/Service/Vkontakte.php', 'OAuth\\OAuth2\\Service\\Yammer' => $vendorDir . '/lusitanian/oauth/src/OAuth/OAuth2/Service/Yammer.php', 'OAuth\\OAuth2\\Token\\StdOAuth2Token' => $vendorDir . '/lusitanian/oauth/src/OAuth/OAuth2/Token/StdOAuth2Token.php', @@ -1377,6 +1390,7 @@ 'Predis\\Transaction\\AbortedMultiExecException' => $vendorDir . '/predis/predis/lib/Predis/Transaction/AbortedMultiExecException.php', 'Predis\\Transaction\\MultiExecContext' => $vendorDir . '/predis/predis/lib/Predis/Transaction/MultiExecContext.php', 'Project' => $baseDir . '/app/models/Project.php', + 'ProjectAPIController' => $baseDir . '/app/controllers/ProjectAPIController.php', 'ProjectController' => $baseDir . '/app/controllers/ProjectController.php', 'ProjectPeopleTableSeeder' => $baseDir . '/app/database/seeds/DatabaseSeeder.php', 'ProjectTableSeeder' => $baseDir . '/app/database/seeds/DatabaseSeeder.php', @@ -1681,7 +1695,6 @@ 'Symfony\\Component\\HttpKernel\\CacheWarmer\\CacheWarmerInterface' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmerInterface.php', 'Symfony\\Component\\HttpKernel\\CacheWarmer\\WarmableInterface' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/CacheWarmer/WarmableInterface.php', 'Symfony\\Component\\HttpKernel\\Client' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Client.php', - 'Symfony\\Component\\HttpKernel\\Config\\EnvParametersResource' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Config/EnvParametersResource.php', 'Symfony\\Component\\HttpKernel\\Config\\FileLocator' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Config/FileLocator.php', 'Symfony\\Component\\HttpKernel\\Controller\\ControllerReference' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Controller/ControllerReference.php', 'Symfony\\Component\\HttpKernel\\Controller\\ControllerResolver' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Controller/ControllerResolver.php', @@ -2024,6 +2037,7 @@ 'Whoops\\Util\\Misc' => $vendorDir . '/filp/whoops/src/Whoops/Util/Misc.php', 'Whoops\\Util\\TemplateHelper' => $vendorDir . '/filp/whoops/src/Whoops/Util/TemplateHelper.php', 'classAccessTypesTableSeeder' => $baseDir . '/app/database/seeds/DatabaseSeeder.php', + 'housekeeping' => $baseDir . '/app/commands/housekeeping.php', 'iprotrack' => $baseDir . '/app/models/iprotrack.php', 'ledgerEntry' => $baseDir . '/app/models/LedgerEntry.php', 'ledgerTableSeeder' => $baseDir . '/app/database/seeds/DatabaseSeeder.php', diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index 2ed8c21..854df85 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInitfa8a7c0137ba3286d4c802f66991b0e8 +class ComposerAutoloaderInitcb39d0333c8a78c0abf24e828c1ba152 { private static $loader; @@ -19,9 +19,9 @@ public static function getLoader() return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInitfa8a7c0137ba3286d4c802f66991b0e8', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInitcb39d0333c8a78c0abf24e828c1ba152', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(); - spl_autoload_unregister(array('ComposerAutoloaderInitfa8a7c0137ba3286d4c802f66991b0e8', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInitcb39d0333c8a78c0abf24e828c1ba152', 'loadClassLoader')); $includePaths = require __DIR__ . '/include_paths.php'; array_push($includePaths, get_include_path()); @@ -46,14 +46,14 @@ public static function getLoader() $includeFiles = require __DIR__ . '/autoload_files.php'; foreach ($includeFiles as $file) { - composerRequirefa8a7c0137ba3286d4c802f66991b0e8($file); + composerRequirecb39d0333c8a78c0abf24e828c1ba152($file); } return $loader; } } -function composerRequirefa8a7c0137ba3286d4c802f66991b0e8($file) +function composerRequirecb39d0333c8a78c0abf24e828c1ba152($file) { require $file; } From fe95a314bd849fa1aa9e40817033d9d4852246fd Mon Sep 17 00:00:00 2001 From: = <=> Date: Wed, 11 Mar 2015 16:30:27 -0500 Subject: [PATCH 2/3] Bug fix when using the GL editor --- app/controllers/AdminAccountController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/AdminAccountController.php b/app/controllers/AdminAccountController.php index 81851bd..13f97c7 100644 --- a/app/controllers/AdminAccountController.php +++ b/app/controllers/AdminAccountController.php @@ -13,7 +13,7 @@ function showGLEditor($projectID){ return View::make('admin.accounts.editor'); } - function newGLEntry($accountID){ + function newGLEntry($projectid){ //We need to create a new account GL entry for the speicified account $gl = new ledgerEntry; //Grab the posted entry type @@ -30,7 +30,7 @@ function newGLEntry($accountID){ //Let's get the dollars $money = floatval(Input::get('amount')); $money = number_format($money,2); - $account = Account::find($accountID); + $account = Account::where('ClassID','=',$projectid)->first(); //Let's make it happen if($cd == "CREDIT"){ //Give the account monies From f7ec3f0c02e428c59f1fe4cf92f459358caabe64 Mon Sep 17 00:00:00 2001 From: = <=> Date: Wed, 11 Mar 2015 16:33:49 -0500 Subject: [PATCH 3/3] Bug fix when pulling accounts for the GL editor, pulls correct account and credits/debits the right accounts --- app/controllers/AdminAccountController.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/controllers/AdminAccountController.php b/app/controllers/AdminAccountController.php index 13f97c7..860f9ed 100644 --- a/app/controllers/AdminAccountController.php +++ b/app/controllers/AdminAccountController.php @@ -22,10 +22,10 @@ function newGLEntry($projectid){ $cd = Input::get('creditdebit'); $allowedCD = array('CREDIT','DEBIT'); if(!in_array($entryType, $allowedTypes)){ - return Redirect::to('/admin/accounts/editor/'.$accountID)->with('error',array('That Entry type is not allowed')); + return Redirect::to('/admin/accounts/editor/'.$projectid)->with('error',array('That Entry type is not allowed')); } if(!in_array($cd, $allowedCD)){ - return Redirect::to('/admin/accounts/editor/'.$accountID)->with('error',array('You can only credit or debit an account')); + return Redirect::to('/admin/accounts/editor/'.$projectid)->with('error',array('You can only credit or debit an account')); } //Let's get the dollars $money = floatval(Input::get('amount')); @@ -36,14 +36,14 @@ function newGLEntry($projectid){ //Give the account monies //We can just give monies, no need to check if they can go in because they will $account->Deposit($entryType,$money); - return Redirect::to('/admin/accounts/editor/'.$accountID)->with('success',array('Successfully added General Ledger entry')); + return Redirect::to('/admin/accounts/editor/'.$projectid)->with('success',array('Successfully added General Ledger entry')); }elseif($cd == "DEBIT"){ //Take away monies from the account if($account->Withdrawl($entryType,$money)){ //Success! - return Redirect::to('/admin/accounts/editor/'.$accountID)->with('success',array('Successfully added General Ledger entry')); + return Redirect::to('/admin/accounts/editor/'.$projectid)->with('success',array('Successfully added General Ledger entry')); }else{ - return Redirect::to('/admin/accounts/editor/'.$accountID)->with('error',array('Not enough funds to debit account')); + return Redirect::to('/admin/accounts/editor/'.$projectid)->with('error',array('Not enough funds to debit account')); } } }