From 9603c43277c7946a06ad45c3b2b769149fc0525f Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Mon, 21 Dec 2015 21:57:55 +0200 Subject: [PATCH] Bug fixes --- app/Http/Controllers/ImportController.php | 37 +++++++++------ app/Http/Controllers/PaymentController.php | 13 +++--- app/Http/routes.php | 1 - app/Ninja/Mailers/ContactMailer.php | 2 + app/Ninja/Repositories/ClientRepository.php | 4 +- app/Ninja/Repositories/InvoiceRepository.php | 1 + app/Services/ImportService.php | 44 +++++++++++------- app/Services/PaymentService.php | 11 +++++ public/favicon.ico | Bin 0 -> 32038 bytes resources/lang/en/texts.php | 8 ++-- .../views/accounts/import_export.blade.php | 2 +- .../templates_and_reminders.blade.php | 3 +- resources/views/dashboard.blade.php | 2 +- resources/views/emails/master.blade.php | 4 +- resources/views/master.blade.php | 2 +- .../views/partials/system_settings.blade.php | 4 +- 16 files changed, 87 insertions(+), 51 deletions(-) create mode 100644 public/favicon.ico diff --git a/app/Http/Controllers/ImportController.php b/app/Http/Controllers/ImportController.php index eb400a5e3d..b078fb6f95 100644 --- a/app/Http/Controllers/ImportController.php +++ b/app/Http/Controllers/ImportController.php @@ -22,7 +22,6 @@ class ImportController extends BaseController { $source = Input::get('source'); $files = []; - $skipped = []; foreach (ImportService::$entityTypes as $entityType) { if (Input::file("{$entityType}_file")) { @@ -38,8 +37,8 @@ class ImportController extends BaseController $data = $this->importService->mapCSV($files); return View::make('accounts.import_map', ['data' => $data]); } else { - $skipped = $this->importService->import($source, $files); - return $this->showResult($skipped); + $results = $this->importService->import($source, $files); + return $this->showResult($results); } } catch (Exception $exception) { Utils::logError($exception); @@ -52,11 +51,10 @@ class ImportController extends BaseController { $map = Input::get('map'); $headers = Input::get('headers'); - $skipped = []; try { - $skipped = $this->importService->importCSV($map, $headers); - return $this->showResult($skipped); + $results = $this->importService->importCSV($map, $headers); + return $this->showResult($results); } catch (Exception $exception) { Utils::logError($exception); Session::flash('error', $exception->getMessage()); @@ -64,16 +62,29 @@ class ImportController extends BaseController } } - private function showResult($skipped) + private function showResult($results) { - if (count($skipped)) { - $message = trans('texts.failed_to_import'); - foreach ($skipped as $skip) { - $message .= '
' . json_encode($skip); + $message = ''; + $skipped = []; + + foreach ($results as $entityType => $entityResults) { + if ($count = count($entityResults[RESULT_SUCCESS])) { + $message .= trans("texts.created_{$entityType}s", ['count' => $count]) . '
'; } + if (count($entityResults[RESULT_FAILURE])) { + $skipped = array_merge($skipped, $entityResults[RESULT_FAILURE]); + } + } + + if (count($skipped)) { + $message .= '

' . trans('texts.failed_to_import') . '
'; + foreach ($skipped as $skip) { + $message .= json_encode($skip) . '
'; + } + } + + if ($message) { Session::flash('warning', $message); - } else { - Session::flash('message', trans('texts.imported_file')); } return Redirect::to('/settings/' . ACCOUNT_IMPORT_EXPORT); diff --git a/app/Http/Controllers/PaymentController.php b/app/Http/Controllers/PaymentController.php index 989a464917..6476d1af98 100644 --- a/app/Http/Controllers/PaymentController.php +++ b/app/Http/Controllers/PaymentController.php @@ -512,21 +512,20 @@ class PaymentController extends BaseController try { if (method_exists($gateway, 'completePurchase') - && !$accountGateway->isGateway(GATEWAY_TWO_CHECKOUT) - && !$accountGateway->isGateway(GATEWAY_MOLLIE)) { // TODO: implement webhook + && !$accountGateway->isGateway(GATEWAY_TWO_CHECKOUT)) { $details = $this->paymentService->getPaymentDetails($invitation, $accountGateway); - $response = $gateway->completePurchase($details)->send(); + $response = $this->paymentService->completePurchase($gateway, $accountGateway, $details, $token); $ref = $response->getTransactionReference() ?: $token; - if ($response->isSuccessful()) { + if ($response->isCancelled()) { + // do nothing + } elseif ($response->isSuccessful()) { $payment = $this->paymentService->createPayment($invitation, $ref, $payerId); Session::flash('message', trans('texts.applied_payment')); - - return Redirect::to($invitation->getLink()); } else { $this->error('offsite', $response->getMessage(), $accountGateway); - return Redirect::to($invitation->getLink()); } + return Redirect::to($invitation->getLink()); } else { $payment = $this->paymentService->createPayment($invitation, $token, $payerId); Session::flash('message', trans('texts.applied_payment')); diff --git a/app/Http/routes.php b/app/Http/routes.php index dc981679a9..0bab329d24 100644 --- a/app/Http/routes.php +++ b/app/Http/routes.php @@ -63,7 +63,6 @@ Route::get('/auth_unlink', 'Auth\AuthController@authUnlink'); Route::post('/hook/email_bounced', 'AppController@emailBounced'); Route::post('/hook/email_opened', 'AppController@emailOpened'); - // Laravel auth routes get('/signup', array('as' => 'signup', 'uses' => 'Auth\AuthController@getRegister')); post('/signup', array('as' => 'signup', 'uses' => 'Auth\AuthController@postRegister')); diff --git a/app/Ninja/Mailers/ContactMailer.php b/app/Ninja/Mailers/ContactMailer.php index b92fc1811c..7efc52bfb8 100644 --- a/app/Ninja/Mailers/ContactMailer.php +++ b/app/Ninja/Mailers/ContactMailer.php @@ -25,6 +25,7 @@ class ContactMailer extends Mailer 'firstName', 'invoice', 'quote', + 'dueDate', 'viewLink', 'viewButton', 'paymentLink', @@ -234,6 +235,7 @@ class ContactMailer extends Mailer '$invoice' => $invoice->invoice_number, '$quote' => $invoice->invoice_number, '$link' => $invitation->getLink(), + '$dueDate' => $account->formatDate($invoice->due_date), '$viewLink' => $invitation->getLink(), '$viewButton' => HTML::emailViewButton($invitation->getLink(), $invoice->getEntityType()), '$paymentLink' => $invitation->getLink('payment'), diff --git a/app/Ninja/Repositories/ClientRepository.php b/app/Ninja/Repositories/ClientRepository.php index 58b4bc09b3..3e43d8f34f 100644 --- a/app/Ninja/Repositories/ClientRepository.php +++ b/app/Ninja/Repositories/ClientRepository.php @@ -75,10 +75,12 @@ class ClientRepository extends BaseRepository $client->fill($data); $client->save(); + /* if ( ! isset($data['contact']) && ! isset($data['contacts'])) { return $client; } - + */ + $first = true; $contacts = isset($data['contact']) ? [$data['contact']] : $data['contacts']; $contactIds = []; diff --git a/app/Ninja/Repositories/InvoiceRepository.php b/app/Ninja/Repositories/InvoiceRepository.php index 2142588ec9..31de427be5 100644 --- a/app/Ninja/Repositories/InvoiceRepository.php +++ b/app/Ninja/Repositories/InvoiceRepository.php @@ -317,6 +317,7 @@ class InvoiceRepository extends BaseRepository $total -= $invoice->discount; } else { $total *= (100 - $invoice->discount) / 100; + $total = round($total, 2); } } diff --git a/app/Services/ImportService.php b/app/Services/ImportService.php index 3fd21f0719..ef01758e17 100644 --- a/app/Services/ImportService.php +++ b/app/Services/ImportService.php @@ -56,35 +56,39 @@ class ImportService public function import($source, $files) { - $skipped = []; + $results = []; $imported_files = null; foreach ($files as $entityType => $file) { - $result = $this->execute($source, $entityType, $file); - $skipped = array_merge($skipped, $result); + $results[$entityType] = $this->execute($source, $entityType, $file); } - return $skipped; + return $results; } private function execute($source, $entityType, $file) { - $skipped = []; + $results = [ + RESULT_SUCCESS => [], + RESULT_FAILURE => [], + ]; - Excel::load($file, function ($reader) use ($source, $entityType, &$skipped) { + Excel::load($file, function ($reader) use ($source, $entityType, &$results) { $this->checkData($entityType, count($reader->all())); $maps = $this->createMaps(); - $reader->each(function ($row) use ($source, $entityType, $maps, &$skipped) { + $reader->each(function ($row) use ($source, $entityType, $maps, &$results) { $result = $this->saveData($source, $entityType, $row, $maps); - if ( ! $result) { - $skipped[] = $row; + if ($result) { + $results[RESULT_SUCCESS][] = $result; + } else { + $results[RESULT_FAILURE][] = $row; } }); }); - return $skipped; + return $results; } private function saveData($source, $entityType, $row, $maps) @@ -346,19 +350,21 @@ class ImportService public function importCSV($maps, $headers) { - $skipped = []; + $results = []; foreach ($maps as $entityType => $map) { - $result = $this->executeCSV($entityType, $map, $headers[$entityType]); - $skipped = array_merge($skipped, $result); + $result[$entityType] = $this->executeCSV($entityType, $map, $headers[$entityType]); } - return $skipped; + return $results; } private function executeCSV($entityType, $map, $hasHeaders) { - $skipped = []; + $results = [ + RESULT_SUCCESS => [], + RESULT_FAILURE => [], + ]; $source = IMPORT_CSV; $data = Session::get("{$entityType}-data"); @@ -374,14 +380,16 @@ class ImportService $row = $this->convertToObject($entityType, $row, $map); $result = $this->saveData($source, $entityType, $row, $maps); - if ( ! $result) { - $skipped[] = $row; + if ($result) { + $results[RESULT_SUCCESS][] = $result; + } else { + $results[RESULT_FAILURE][] = $row; } } Session::forget("{$entityType}-data"); - return $skipped; + return $results; } private function convertToObject($entityType, $data, $map) diff --git a/app/Services/PaymentService.php b/app/Services/PaymentService.php index 7f3d9c52d7..d09f30683c 100644 --- a/app/Services/PaymentService.php +++ b/app/Services/PaymentService.php @@ -224,6 +224,17 @@ class PaymentService extends BaseService return $payment; } + public function completePurchase($gateway, $accountGateway, $details, $token) + { + if ($accountGateway->isGateway(GATEWAY_MOLLIE)) { + $details['transactionReference'] = $token; + $response = $gateway->fetchTransaction($details)->send(); + return $gateway->fetchTransaction($details)->send(); + } else { + return $gateway->completePurchase($details)->send(); + } + } + public function autoBillInvoice($invoice) { $client = $invoice->client; diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..464d8b596c2a0d49b7c5dc454b525d417ae6c6b2 GIT binary patch literal 32038 zcmeHP3zW^({-2h6*Ig~E)otBn-PO9QizJU>yeW?i@|Y-5@-|XJ@u$BeZ$gqJ$~y_^ z7V-#r4$U3%N=zDZ)eYk{=0-vh`rglHpR<3n&u@N@bIzP$On0yKJ$wK5{_g#K?C*Y@ z{fdjbCGHP#fBthET#2}ze~61~!cd98_lJmIinz*^gWsj&;+`lL7nhhA_%7QpF7CJ5 zadBnw$s$SsZc)F$K|Z?^ky}iNuTZHpU_4+KAS(zv;Ex5AG;z%^(ux2k0ImVV1+E}| z9H59T?;jDj(j|{mSs$5YAUrXGyt=$`jvP6HVx8U5qetcKsncZOOM^8J)M+~NPn$kNu3WhyD_5?Tx89yAJ9qAq-+uc| z74*dyyXDQvQ)KbtkL8zNeo<-617N+J)A==3<|B=7OhfXql#3;$iIxVNNvSj3_(el{iPe^+DSE>y1Mw$TTSNuv47G(?szTQ19%t&qWkhsp~B2Fj2j!{m)O-jtM0n{|HL*kqPfqvrk6v*&a2-h1<8 z=dN8snN8Ta>kD~r-hAoV>p8iXo-% z1L$teN7|Z)4Nf`$-M-g>w&o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|-1? zFS-n-^R5uzqhwi}6R~gLT!6qZf$fBMkXirCqw^Dg`t(`qe+6xf^C{xj!Ml$8_GP%L zLFf1Ic^;{|N4ny{N&clvS14JSw@ldzvKM!cO}Fra50z}XY|5j@eBLkn3U}uCJ}ck3 z|2iW>M&Q00-vuDpWuG-`j#;$q-+w^e!(!RgLzgbyLelkzrtRT3LRvMC^jz}uP7v?T zu}=6uhid}bv448%>1UMv>;GtfFJ4NG?JIHrp8wbV9Op@E)~r=+gKG@hMmQhje=PH@ z(kZwX#{b_uuTIT<3tI z|Nn3G!sWeMzMo6kiN`fC(xI(V|Fi?%G35KMd>0|V-0AFW)c<k{$%=R$kzfy>G zaL_KV{Ts5^D8%v?x6AAF4f#_Fp$^75$?6mb*^3r3`MLOF-H8t;4EakHA|0szIpN4{ z;z0h+g+K>YOqn7LL;k5Zu?{*$Dz6hhm*CGaW|PABu6W!S3c$L{JbE=JFEk|C<15eEXp6f_?)Dib9>*bZt{LT*^xt_>1RnK*0q=#cKlsOr2 zdw%nsU*&^$?y+#6iF<9_Z{(gU_np5BLI(Ua0OwgelR|l2&uPb!Py2fS|NH)ZY2d%V Ci{T#t literal 0 HcmV?d00001 diff --git a/resources/lang/en/texts.php b/resources/lang/en/texts.php index 1fd8be863b..637258ceaa 100644 --- a/resources/lang/en/texts.php +++ b/resources/lang/en/texts.php @@ -88,7 +88,7 @@ return array( 'company_details' => 'Company Details', 'online_payments' => 'Online Payments', 'notifications' => 'Email Notifications', - 'import_export' => 'Import/Export', + 'import_export' => 'Import/Export/Cancel', 'done' => 'Done', 'save' => 'Save', 'create' => 'Create', @@ -212,7 +212,7 @@ return array( // application messages 'created_client' => 'Successfully created client', - 'created_clients' => 'Successfully created :count clients', + 'created_clients' => 'Successfully created :count client(s)', 'updated_settings' => 'Successfully updated settings', 'removed_logo' => 'Successfully removed logo', 'sent_message' => 'Successfully sent message', @@ -980,5 +980,7 @@ return array( 'button_confirmation_message' => 'Click to confirm your email address.', 'confirm' => 'Confirm', 'email_preferences' => 'Email Preferences', - + + 'created_invoices' => 'Successfully created :count invoice(s)', + ); diff --git a/resources/views/accounts/import_export.blade.php b/resources/views/accounts/import_export.blade.php index edb9ee6023..4dc452c7d4 100644 --- a/resources/views/accounts/import_export.blade.php +++ b/resources/views/accounts/import_export.blade.php @@ -97,7 +97,7 @@

diff --git a/resources/views/accounts/templates_and_reminders.blade.php b/resources/views/accounts/templates_and_reminders.blade.php index ae3602213e..d4b69eb0d7 100644 --- a/resources/views/accounts/templates_and_reminders.blade.php +++ b/resources/views/accounts/templates_and_reminders.blade.php @@ -184,13 +184,14 @@ var keys = {!! json_encode(\App\Ninja\Mailers\ContactMailer::$variableFields) !!}; var vals = [ {!! json_encode($emailFooter) !!}, - "{{ Auth::user()->account->getDisplayName() }}", + "{{ $account->getDisplayName() }}", "Client Name", formatMoney(100), "Contact Name", "First Name", "0001", "0001", + "{{ $account->formatDate($account->getDateTime()) }}", "{{ URL::to('/view/...') }}", '{!! HTML::flatButton('view_invoice', '#0b4d78') !!}', "{{ URL::to('/payment/...') }}", diff --git a/resources/views/dashboard.blade.php b/resources/views/dashboard.blade.php index dcf5782dc4..56f9690610 100644 --- a/resources/views/dashboard.blade.php +++ b/resources/views/dashboard.blade.php @@ -71,7 +71,7 @@

- {{ trans('texts.notifications') }} + {{ trans('texts.activity') }}
{{ trans_choice('texts.invoices_sent', $invoicesSent) }}
diff --git a/resources/views/emails/master.blade.php b/resources/views/emails/master.blade.php index 7d4ea23298..a45aa0add1 100644 --- a/resources/views/emails/master.blade.php +++ b/resources/views/emails/master.blade.php @@ -4,7 +4,7 @@ - @yield('markup') @@ -48,7 +48,7 @@ } -
diff --git a/resources/views/master.blade.php b/resources/views/master.blade.php index ad13a7759d..6d434ef08c 100644 --- a/resources/views/master.blade.php +++ b/resources/views/master.blade.php @@ -6,7 +6,7 @@ @else {{ isset($title) ? ($title . ' | Invoice Ninja') : ('Invoice Ninja | ' . trans('texts.app_title')) }} - + @endif diff --git a/resources/views/partials/system_settings.blade.php b/resources/views/partials/system_settings.blade.php index 81ca2ea40b..c508ba0ee8 100644 --- a/resources/views/partials/system_settings.blade.php +++ b/resources/views/partials/system_settings.blade.php @@ -66,7 +66,7 @@ $('#dbTestResult').html('Working...').css('color', 'black'); // Send / Test Information - $.post( "/setup", data, function( data ) { + $.post( "{{ URL::to('/setup') }}", data, function( data ) { var color = 'red'; if(data == 'Success'){ color = 'green'; @@ -86,7 +86,7 @@ $('#mailTestResult').html('Working...').css('color', 'black'); // Send / Test Information - $.post( "/setup", data, function( data ) { + $.post( "{{ URL::to('/setup') }}", data, function( data ) { var color = 'red'; if(data == 'Sent'){ color = 'green';