mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Bug fixes
This commit is contained in:
parent
d4c31e3bbe
commit
0f5adbf62a
@ -8,11 +8,11 @@ class ActivityController extends \BaseController {
|
|||||||
->join('clients', 'clients.id', '=', 'activities.client_id')
|
->join('clients', 'clients.id', '=', 'activities.client_id')
|
||||||
->where('clients.public_id', '=', $clientPublicId)
|
->where('clients.public_id', '=', $clientPublicId)
|
||||||
->where('activities.account_id', '=', Auth::user()->account_id)
|
->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)
|
return Datatable::query($query)
|
||||||
//->addColumn('blank', function($model) { return ''; })
|
//->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('message', function($model) { return Utils::decodeActivity($model->message); })
|
||||||
->addColumn('balance', function($model) { return Utils::formatMoney($model->balance, $model->currency_id); })
|
->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) : ''; })
|
->addColumn('adjustment', function($model) { return $model->adjustment != 0 ? Utils::formatMoney($model->adjustment, $model->currency_id) : ''; })
|
||||||
|
@ -99,7 +99,7 @@ class ClientController extends \BaseController {
|
|||||||
'showBreadcrumbs' => false,
|
'showBreadcrumbs' => false,
|
||||||
'client' => $client,
|
'client' => $client,
|
||||||
'credit' => $client->getTotalCredit(),
|
'credit' => $client->getTotalCredit(),
|
||||||
'title' => '- ' . $client->getDisplayName(),
|
'title' => '- ' . trans('texts.view_client'),
|
||||||
'hasRecurringInvoices' => Invoice::scope()->where('is_recurring', '=', true)->whereClientId($client->id)->count() > 0
|
'hasRecurringInvoices' => Invoice::scope()->where('is_recurring', '=', true)->whereClientId($client->id)->count() > 0
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -142,7 +142,7 @@ class ClientController extends \BaseController {
|
|||||||
'client' => $client,
|
'client' => $client,
|
||||||
'method' => 'PUT',
|
'method' => 'PUT',
|
||||||
'url' => 'clients/' . $publicId,
|
'url' => 'clients/' . $publicId,
|
||||||
'title' => '- ' . $client->name
|
'title' => '- ' . trans('texts.edit_client')
|
||||||
];
|
];
|
||||||
|
|
||||||
$data = array_merge($data, self::getViewModel());
|
$data = array_merge($data, self::getViewModel());
|
||||||
|
@ -105,7 +105,7 @@ class PaymentController extends \BaseController
|
|||||||
$config = json_decode($accountGateway->config);
|
$config = json_decode($accountGateway->config);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
$gateway->setSolutionType ("Sole");
|
$gateway->setSolutionType("Sole");
|
||||||
$gateway->setLandingPage("Billing");
|
$gateway->setLandingPage("Billing");
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -120,11 +120,13 @@ class PaymentController extends \BaseController
|
|||||||
$gateway->$function($val);
|
$gateway->$function($val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
if (!Utils::isProd())
|
if (!Utils::isProd())
|
||||||
{
|
{
|
||||||
$gateway->setTestMode(true);
|
$gateway->setTestMode(true);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
return $gateway;
|
return $gateway;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -360,6 +360,7 @@ return array(
|
|||||||
'convert_to_invoice' => 'Convert to Invoice',
|
'convert_to_invoice' => 'Convert to Invoice',
|
||||||
'view_invoice' => 'View Invoice',
|
'view_invoice' => 'View Invoice',
|
||||||
'view_quote' => 'View Quote',
|
'view_quote' => 'View Quote',
|
||||||
|
'view_client' => 'View Client',
|
||||||
|
|
||||||
'updated_quote' => 'Successfully updated quote',
|
'updated_quote' => 'Successfully updated quote',
|
||||||
'created_quote' => 'Successfully created quote',
|
'created_quote' => 'Successfully created quote',
|
||||||
|
@ -374,6 +374,7 @@ return array(
|
|||||||
'clone_quote' => 'Clone Quote',
|
'clone_quote' => 'Clone Quote',
|
||||||
'convert_to_invoice' => 'Convert to Invoice',
|
'convert_to_invoice' => 'Convert to Invoice',
|
||||||
'view_invoice' => 'View Invoice',
|
'view_invoice' => 'View Invoice',
|
||||||
|
'view_client' => 'View Client',
|
||||||
'view_quote' => 'View Quote',
|
'view_quote' => 'View Quote',
|
||||||
|
|
||||||
'updated_quote' => 'Successfully updated quote',
|
'updated_quote' => 'Successfully updated quote',
|
||||||
|
@ -358,6 +358,7 @@ return array(
|
|||||||
'convert_to_invoice' => 'Convert to Invoice',
|
'convert_to_invoice' => 'Convert to Invoice',
|
||||||
'view_invoice' => 'View Invoice',
|
'view_invoice' => 'View Invoice',
|
||||||
'view_quote' => 'View Quote',
|
'view_quote' => 'View Quote',
|
||||||
|
'view_client' => 'View Client',
|
||||||
|
|
||||||
'updated_quote' => 'Successfully updated quote',
|
'updated_quote' => 'Successfully updated quote',
|
||||||
'created_quote' => 'Successfully created quote',
|
'created_quote' => 'Successfully created quote',
|
||||||
|
@ -360,6 +360,7 @@ return array(
|
|||||||
'convert_to_invoice' => 'Convert to Invoice',
|
'convert_to_invoice' => 'Convert to Invoice',
|
||||||
'view_invoice' => 'View Invoice',
|
'view_invoice' => 'View Invoice',
|
||||||
'view_quote' => 'View Quote',
|
'view_quote' => 'View Quote',
|
||||||
|
'view_client' => 'View Client',
|
||||||
|
|
||||||
'updated_quote' => 'Successfully updated quote',
|
'updated_quote' => 'Successfully updated quote',
|
||||||
'created_quote' => 'Successfully created quote',
|
'created_quote' => 'Successfully created quote',
|
||||||
|
@ -360,6 +360,7 @@ return array(
|
|||||||
'convert_to_invoice' => 'Convert to Invoice',
|
'convert_to_invoice' => 'Convert to Invoice',
|
||||||
'view_invoice' => 'View Invoice',
|
'view_invoice' => 'View Invoice',
|
||||||
'view_quote' => 'View Quote',
|
'view_quote' => 'View Quote',
|
||||||
|
'view_client' => 'View Client',
|
||||||
|
|
||||||
'updated_quote' => 'Successfully updated quote',
|
'updated_quote' => 'Successfully updated quote',
|
||||||
'created_quote' => 'Successfully created quote',
|
'created_quote' => 'Successfully created quote',
|
||||||
|
@ -361,6 +361,7 @@ return array(
|
|||||||
'convert_to_invoice' => 'Convert to Invoice',
|
'convert_to_invoice' => 'Convert to Invoice',
|
||||||
'view_invoice' => 'View Invoice',
|
'view_invoice' => 'View Invoice',
|
||||||
'view_quote' => 'View Quote',
|
'view_quote' => 'View Quote',
|
||||||
|
'view_client' => 'View Client',
|
||||||
|
|
||||||
'updated_quote' => 'Successfully updated quote',
|
'updated_quote' => 'Successfully updated quote',
|
||||||
'created_quote' => 'Successfully created quote',
|
'created_quote' => 'Successfully created quote',
|
||||||
|
@ -349,6 +349,7 @@ return array(
|
|||||||
'convert_to_invoice' => 'Convert to Invoice',
|
'convert_to_invoice' => 'Convert to Invoice',
|
||||||
'view_invoice' => 'View Invoice',
|
'view_invoice' => 'View Invoice',
|
||||||
'view_quote' => 'View Quote',
|
'view_quote' => 'View Quote',
|
||||||
|
'view_client' => 'View Client',
|
||||||
|
|
||||||
'updated_quote' => 'Successfully updated quote',
|
'updated_quote' => 'Successfully updated quote',
|
||||||
'created_quote' => 'Successfully created quote',
|
'created_quote' => 'Successfully created quote',
|
||||||
|
@ -198,13 +198,24 @@ class InvoiceRepository
|
|||||||
$invoice->client_id = $data['client_id'];
|
$invoice->client_id = $data['client_id'];
|
||||||
$invoice->discount = Utils::parseFloat($data['discount']);
|
$invoice->discount = Utils::parseFloat($data['discount']);
|
||||||
$invoice->invoice_number = trim($data['invoice_number']);
|
$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->is_recurring = $data['is_recurring'] ? true : false;
|
||||||
$invoice->frequency_id = $data['frequency_id'] ? $data['frequency_id'] : 0;
|
$invoice->invoice_date = Utils::toSqlDate($data['invoice_date']);
|
||||||
$invoice->start_date = Utils::toSqlDate($data['start_date']);
|
|
||||||
$invoice->end_date = Utils::toSqlDate($data['end_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->terms = trim($data['terms']);
|
||||||
$invoice->public_notes = trim($data['public_notes']);
|
$invoice->public_notes = trim($data['public_notes']);
|
||||||
$invoice->po_number = trim($data['po_number']);
|
$invoice->po_number = trim($data['po_number']);
|
||||||
|
@ -126,8 +126,6 @@ Route::group(array('prefix' => 'api/v1', 'before' => 'auth.basic'), function()
|
|||||||
Route::resource('clients', 'ClientApiController');
|
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_EMAIL', 'contact@invoiceninja.com');
|
||||||
define('CONTACT_NAME', 'Invoice Ninja');
|
define('CONTACT_NAME', 'Invoice Ninja');
|
||||||
@ -217,7 +215,8 @@ define('NINJA_ACCOUNT_KEY', 'zg4ylmzDkdkPOT8yoKQw9LTWaoZJx79h');
|
|||||||
define('NINJA_GATEWAY_ID', GATEWAY_AUTHORIZE_NET);
|
define('NINJA_GATEWAY_ID', GATEWAY_AUTHORIZE_NET);
|
||||||
define('NINJA_GATEWAY_CONFIG', '{"apiLoginId":"626vWcD5","transactionKey":"4bn26TgL9r4Br4qJ","testMode":"","developerMode":""}');
|
define('NINJA_GATEWAY_CONFIG', '{"apiLoginId":"626vWcD5","transactionKey":"4bn26TgL9r4Br4qJ","testMode":"","developerMode":""}');
|
||||||
define('NINJA_URL', 'https://www.invoiceninja.com');
|
define('NINJA_URL', 'https://www.invoiceninja.com');
|
||||||
define('NINJA_VERSION', '1.1.0');
|
define('NINJA_VERSION', '1.2.0');
|
||||||
|
define('PRO_PLAN_PRICE', 50);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -74,8 +74,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function gatewayLink(url) {
|
function gatewayLink(url) {
|
||||||
//if (url.match('authorize'))
|
var host = new URL(url).hostname;
|
||||||
openUrl(url, '/affiliate/' + new URL(url).hostname);
|
if (host) {
|
||||||
|
openUrl(url, '/affiliate/' + host);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
@ -1,8 +1,11 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<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 charset="utf-8">
|
||||||
<meta property="og:site_name" content="Invoice Ninja"></meta>
|
<meta property="og:site_name" content="Invoice Ninja"></meta>
|
||||||
<meta property="og:url" content="https://www.invoiceninja.com"></meta>
|
<meta property="og:url" content="https://www.invoiceninja.com"></meta>
|
||||||
|
@ -430,7 +430,7 @@
|
|||||||
<h3><img src="{{ asset('images/icon-secure-footer.png') }}" style="margin-right: 8px; margin-top: -5px;"></span>Safe & Secure</h3>
|
<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') }}">
|
<img src="{{ asset('images/ssl-footer.png') }}">
|
||||||
<hr>
|
<hr>
|
||||||
<img src="{{ asset('images/opensource-footer.png') }}">
|
<a href="http://opensource.org/" target="_blank"><img src="{{ asset('images/opensource-footer.png') }}"></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
|
Loading…
x
Reference in New Issue
Block a user