Bug fixes

This commit is contained in:
Hillel Coren 2014-05-25 21:38:40 +03:00
parent d4c31e3bbe
commit 0f5adbf62a
15 changed files with 43 additions and 19 deletions

View File

@ -8,11 +8,11 @@ class ActivityController extends \BaseController {
->join('clients', 'clients.id', '=', 'activities.client_id')
->where('clients.public_id', '=', $clientPublicId)
->where('activities.account_id', '=', Auth::user()->account_id)
->select('activities.message', 'activities.created_at', 'clients.currency_id', 'activities.balance', 'activities.adjustment');
->select('activities.id', 'activities.message', 'activities.created_at', 'clients.currency_id', 'activities.balance', 'activities.adjustment');
return Datatable::query($query)
//->addColumn('blank', function($model) { return ''; })
->addColumn('created_at', function($model) { return Utils::timestampToDateTimeString(strtotime($model->created_at)); })
->addColumn('id', function($model) { return Utils::timestampToDateTimeString(strtotime($model->created_at)); })
->addColumn('message', function($model) { return Utils::decodeActivity($model->message); })
->addColumn('balance', function($model) { return Utils::formatMoney($model->balance, $model->currency_id); })
->addColumn('adjustment', function($model) { return $model->adjustment != 0 ? Utils::formatMoney($model->adjustment, $model->currency_id) : ''; })

View File

@ -99,7 +99,7 @@ class ClientController extends \BaseController {
'showBreadcrumbs' => false,
'client' => $client,
'credit' => $client->getTotalCredit(),
'title' => '- ' . $client->getDisplayName(),
'title' => '- ' . trans('texts.view_client'),
'hasRecurringInvoices' => Invoice::scope()->where('is_recurring', '=', true)->whereClientId($client->id)->count() > 0
);
@ -142,7 +142,7 @@ class ClientController extends \BaseController {
'client' => $client,
'method' => 'PUT',
'url' => 'clients/' . $publicId,
'title' => '- ' . $client->name
'title' => '- ' . trans('texts.edit_client')
];
$data = array_merge($data, self::getViewModel());

View File

@ -105,7 +105,7 @@ class PaymentController extends \BaseController
$config = json_decode($accountGateway->config);
/*
$gateway->setSolutionType ("Sole");
$gateway->setSolutionType("Sole");
$gateway->setLandingPage("Billing");
*/
@ -120,11 +120,13 @@ class PaymentController extends \BaseController
$gateway->$function($val);
}
/*
if (!Utils::isProd())
{
$gateway->setTestMode(true);
}
*/
return $gateway;
}

View File

@ -360,6 +360,7 @@ return array(
'convert_to_invoice' => 'Convert to Invoice',
'view_invoice' => 'View Invoice',
'view_quote' => 'View Quote',
'view_client' => 'View Client',
'updated_quote' => 'Successfully updated quote',
'created_quote' => 'Successfully created quote',

View File

@ -374,6 +374,7 @@ return array(
'clone_quote' => 'Clone Quote',
'convert_to_invoice' => 'Convert to Invoice',
'view_invoice' => 'View Invoice',
'view_client' => 'View Client',
'view_quote' => 'View Quote',
'updated_quote' => 'Successfully updated quote',

View File

@ -358,6 +358,7 @@ return array(
'convert_to_invoice' => 'Convert to Invoice',
'view_invoice' => 'View Invoice',
'view_quote' => 'View Quote',
'view_client' => 'View Client',
'updated_quote' => 'Successfully updated quote',
'created_quote' => 'Successfully created quote',

View File

@ -360,6 +360,7 @@ return array(
'convert_to_invoice' => 'Convert to Invoice',
'view_invoice' => 'View Invoice',
'view_quote' => 'View Quote',
'view_client' => 'View Client',
'updated_quote' => 'Successfully updated quote',
'created_quote' => 'Successfully created quote',

View File

@ -360,6 +360,7 @@ return array(
'convert_to_invoice' => 'Convert to Invoice',
'view_invoice' => 'View Invoice',
'view_quote' => 'View Quote',
'view_client' => 'View Client',
'updated_quote' => 'Successfully updated quote',
'created_quote' => 'Successfully created quote',

View File

@ -361,6 +361,7 @@ return array(
'convert_to_invoice' => 'Convert to Invoice',
'view_invoice' => 'View Invoice',
'view_quote' => 'View Quote',
'view_client' => 'View Client',
'updated_quote' => 'Successfully updated quote',
'created_quote' => 'Successfully created quote',

View File

@ -349,6 +349,7 @@ return array(
'convert_to_invoice' => 'Convert to Invoice',
'view_invoice' => 'View Invoice',
'view_quote' => 'View Quote',
'view_client' => 'View Client',
'updated_quote' => 'Successfully updated quote',
'created_quote' => 'Successfully created quote',

View File

@ -198,13 +198,24 @@ class InvoiceRepository
$invoice->client_id = $data['client_id'];
$invoice->discount = Utils::parseFloat($data['discount']);
$invoice->invoice_number = trim($data['invoice_number']);
$invoice->invoice_date = Utils::toSqlDate($data['invoice_date']);
$invoice->due_date = Utils::toSqlDate($data['due_date']);
$invoice->is_recurring = $data['is_recurring'] ? true : false;
$invoice->frequency_id = $data['frequency_id'] ? $data['frequency_id'] : 0;
$invoice->start_date = Utils::toSqlDate($data['start_date']);
$invoice->end_date = Utils::toSqlDate($data['end_date']);
$invoice->invoice_date = Utils::toSqlDate($data['invoice_date']);
if ($invoice->is_recurring)
{
$invoice->frequency_id = $data['frequency_id'] ? $data['frequency_id'] : 0;
$invoice->start_date = Utils::toSqlDate($data['start_date']);
$invoice->end_date = Utils::toSqlDate($data['end_date']);
$invoice->due_date = null;
}
else
{
$invoice->due_date = Utils::toSqlDate($data['due_date']);
$invoice->frequency_id = 0;
$invoice->start_date = null;
$invoice->end_date = null;
}
$invoice->terms = trim($data['terms']);
$invoice->public_notes = trim($data['public_notes']);
$invoice->po_number = trim($data['po_number']);

View File

@ -126,8 +126,6 @@ Route::group(array('prefix' => 'api/v1', 'before' => 'auth.basic'), function()
Route::resource('clients', 'ClientApiController');
});
// If you're self hosting set this to a value you think is fair
define('PRO_PLAN_PRICE', 50);
define('CONTACT_EMAIL', 'contact@invoiceninja.com');
define('CONTACT_NAME', 'Invoice Ninja');
@ -217,7 +215,8 @@ define('NINJA_ACCOUNT_KEY', 'zg4ylmzDkdkPOT8yoKQw9LTWaoZJx79h');
define('NINJA_GATEWAY_ID', GATEWAY_AUTHORIZE_NET);
define('NINJA_GATEWAY_CONFIG', '{"apiLoginId":"626vWcD5","transactionKey":"4bn26TgL9r4Br4qJ","testMode":"","developerMode":""}');
define('NINJA_URL', 'https://www.invoiceninja.com');
define('NINJA_VERSION', '1.1.0');
define('NINJA_VERSION', '1.2.0');
define('PRO_PLAN_PRICE', 50);
/*

View File

@ -74,8 +74,10 @@
}
function gatewayLink(url) {
//if (url.match('authorize'))
openUrl(url, '/affiliate/' + new URL(url).hostname);
var host = new URL(url).hostname;
if (host) {
openUrl(url, '/affiliate/' + host);
}
}
$(document).ready(function() {

View File

@ -1,8 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Invoice Ninja {{ isset($title) ? $title : ' - Free and Open-Source Online Invoicing' }}</title>
<title>Invoice Ninja {{ isset($title) ? $title : ' - Free and Open-Source Online Invoicing' }}</title>
<!-- Source: https://github.com/hillelcoren/invoice-ninja -->
<!-- Version: {{ NINJA_VERSION }} -->
<meta charset="utf-8">
<meta property="og:site_name" content="Invoice Ninja"></meta>
<meta property="og:url" content="https://www.invoiceninja.com"></meta>

View File

@ -430,7 +430,7 @@
<h3><img src="{{ asset('images/icon-secure-footer.png') }}" style="margin-right: 8px; margin-top: -5px;"></span>Safe & Secure</h3>
<img src="{{ asset('images/ssl-footer.png') }}">
<hr>
<img src="{{ asset('images/opensource-footer.png') }}">
<a href="http://opensource.org/" target="_blank"><img src="{{ asset('images/opensource-footer.png') }}"></a>
</div>
<!--