Bug fixes

This commit is contained in:
Hillel Coren 2014-09-14 00:13:09 +03:00
parent b0942449bb
commit 213579ff34
9 changed files with 12 additions and 13 deletions

View File

@ -122,12 +122,10 @@ class PaymentController extends \BaseController
$gateway->$function($val); $gateway->$function($val);
} }
/* if (Utils::isNinjaDev())
if (!Utils::isProd())
{ {
$gateway->setTestMode(true); $gateway->setTestMode(true);
} }
*/
return $gateway; return $gateway;
} }

View File

@ -268,13 +268,13 @@ class Activity extends Eloquent
{ {
$activity = Activity::getBlank($client); $activity = Activity::getBlank($client);
$activity->contact_id = $payment->contact_id; $activity->contact_id = $payment->contact_id;
$activity->message = Utils::encodeActivity($payment->invitation->contact, 'entered ' . $payment->getName()); $activity->message = Utils::encodeActivity($payment->invitation->contact, 'entered ' . $payment->getName() . ' for ', $payment->invoice);
} }
else else
{ {
$activity = Activity::getBlank(); $activity = Activity::getBlank();
$message = $payment->payment_type_id == PAYMENT_TYPE_CREDIT ? 'applied credit' : 'entered ' . $payment->getName(); $message = $payment->payment_type_id == PAYMENT_TYPE_CREDIT ? 'applied credit for ' : 'entered ' . $payment->getName() . ' for ';
$activity->message = Utils::encodeActivity(Auth::user(), $message); $activity->message = Utils::encodeActivity(Auth::user(), $message, $payment->invoice);
} }
$activity->payment_id = $payment->id; $activity->payment_id = $payment->id;

View File

@ -188,7 +188,7 @@ class ClientRepository
public function bulk($ids, $action) public function bulk($ids, $action)
{ {
$clients = Client::scope($ids)->get(); $clients = Client::withTrashed()->scope($ids)->get();
foreach ($clients as $client) foreach ($clients as $client)
{ {

View File

@ -66,7 +66,7 @@ class CreditRepository
return 0; return 0;
} }
$credits = Credit::scope($ids)->get(); $credits = Credit::withTrashed()->scope($ids)->get();
foreach ($credits as $credit) foreach ($credits as $credit)
{ {

View File

@ -435,7 +435,7 @@ class InvoiceRepository
return 0; return 0;
} }
$invoices = Invoice::scope($ids)->get(); $invoices = Invoice::withTrashed()->scope($ids)->get();
foreach ($invoices as $invoice) foreach ($invoices as $invoice)
{ {

View File

@ -112,7 +112,7 @@ class PaymentRepository
return 0; return 0;
} }
$payments = Payment::scope($ids)->get(); $payments = Payment::withTrashed()->scope($ids)->get();
foreach ($payments as $payment) foreach ($payments as $payment)
{ {

View File

@ -385,7 +385,8 @@ Want something changed? We're {{ link_to('https://github.com/hillelcoren/invoice
@endif @endif
@if (!Utils::isNinjaProd() && !Utils::isNinjaDev()) {{-- Per our license, please do not remove or modify this link. --}}
@if (!Utils::isNinja())
<div class="container">{{ trans('texts.powered_by') }} <a href="https://www.invoiceninja.com/?utm_source=powered_by" target="_blank">InvoiceNinja.com</a></div> <div class="container">{{ trans('texts.powered_by') }} <a href="https://www.invoiceninja.com/?utm_source=powered_by" target="_blank">InvoiceNinja.com</a></div>
@endif @endif

View File

@ -93,7 +93,6 @@
@yield('body') @yield('body')
<script type="text/javascript"> <script type="text/javascript">
NINJA.formIsChanged = false; NINJA.formIsChanged = false;
$(function() { $(function() {

View File

@ -121,6 +121,7 @@
<div class="navbar" style="margin-bottom:0px"> <div class="navbar" style="margin-bottom:0px">
<div class="container"> <div class="container">
<div class="navbar-header"> <div class="navbar-header">
{{-- Per our license, please do not remove or modify this link. --}}
<a class="navbar-brand" href="https://www.invoiceninja.com/"><img src="{{ asset('images/invoiceninja-logo.png') }}"></a> <a class="navbar-brand" href="https://www.invoiceninja.com/"><img src="{{ asset('images/invoiceninja-logo.png') }}"></a>
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span> <span class="sr-only">Toggle navigation</span>