1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-19 16:01:34 +02:00

Merge branch 'develop' of github.com:invoiceninja/invoiceninja into develop

This commit is contained in:
Hillel Coren 2017-11-07 20:12:53 +02:00
commit 50b51534ad
6 changed files with 22 additions and 8 deletions

View File

@ -42,6 +42,10 @@ Options:
By default the script only checks for errors, adding this option
makes the script apply the fixes.
--fast=true
Skip using phantomjs
*/
/**
@ -144,7 +148,7 @@ class CheckData extends Command
return;
}
if ($this->option('fix') == 'true') {
if ($this->option('fix') == 'true' || $this->option('fast') == 'true') {
return;
}
@ -792,6 +796,7 @@ class CheckData extends Command
{
return [
['fix', null, InputOption::VALUE_OPTIONAL, 'Fix data', null],
['fast', null, InputOption::VALUE_OPTIONAL, 'Fast', null],
['client_id', null, InputOption::VALUE_OPTIONAL, 'Client id', null],
['database', null, InputOption::VALUE_OPTIONAL, 'Database', null],
];

View File

@ -347,6 +347,7 @@ class ClientPortalController extends BaseController
'title' => trans('texts.recurring_invoices'),
'entityType' => ENTITY_RECURRING_INVOICE,
'columns' => Utils::trans($columns),
'sortColumn' => 1,
];
return response()->view('public_list', $data);
@ -374,6 +375,7 @@ class ClientPortalController extends BaseController
'title' => trans('texts.invoices'),
'entityType' => ENTITY_INVOICE,
'columns' => Utils::trans(['invoice_number', 'invoice_date', 'invoice_total', 'balance_due', 'due_date', 'status']),
'sortColumn' => 1,
];
return response()->view('public_list', $data);
@ -418,6 +420,7 @@ class ClientPortalController extends BaseController
'entityType' => ENTITY_PAYMENT,
'title' => trans('texts.payments'),
'columns' => Utils::trans(['invoice', 'transaction_reference', 'method', 'payment_amount', 'payment_date', 'status']),
'sortColumn' => 4,
];
return response()->view('public_list', $data);
@ -502,6 +505,7 @@ class ClientPortalController extends BaseController
'title' => trans('texts.quotes'),
'entityType' => ENTITY_QUOTE,
'columns' => Utils::trans(['quote_number', 'quote_date', 'quote_total', 'due_date', 'status']),
'sortColumn' => 1,
];
return response()->view('public_list', $data);
@ -537,6 +541,7 @@ class ClientPortalController extends BaseController
'title' => trans('texts.credits'),
'entityType' => ENTITY_CREDIT,
'columns' => Utils::trans(['credit_date', 'credit_amount', 'credit_balance', 'notes']),
'sortColumn' => 0,
];
return response()->view('public_list', $data);
@ -572,6 +577,7 @@ class ClientPortalController extends BaseController
'title' => trans('texts.documents'),
'entityType' => ENTITY_DOCUMENT,
'columns' => Utils::trans(['invoice_number', 'name', 'document_date', 'document_size']),
'sortColumn' => 2,
];
return response()->view('public_list', $data);

View File

@ -1203,7 +1203,7 @@ class Invoice extends EntityModel implements BalanceAffecting
}
$invitation = $this->invitations[0];
$link = $invitation->getLink('view', true);
$link = $invitation->getLink('view', true, true);
$pdfString = false;
$phantomjsSecret = env('PHANTOMJS_SECRET');
$phantomjsLink = $link . "?phantomjs=true&phantomjs_secret={$phantomjsSecret}";
@ -1213,8 +1213,10 @@ class Invoice extends EntityModel implements BalanceAffecting
// we see occasional 408 errors
for ($i=1; $i<=5; $i++) {
$pdfString = CurlUtils::phantom('GET', $phantomjsLink);
if ($pdfString) {
if (strpos($pdfString, 'data') === 0) {
break;
} else {
$pdfString = false;
}
}
}
@ -1239,7 +1241,7 @@ class Invoice extends EntityModel implements BalanceAffecting
if ($pdf = Utils::decodePDF($pdfString)) {
return $pdf;
} else {
Utils::logError("PhantomJS - Unable to decode {$phantomjsLink}: {$pdfString}");
Utils::logError("PhantomJS - Unable to decode {$phantomjsLink}");
return false;
}
} else {

View File

@ -12,11 +12,11 @@ We try to follow the `PSR-2 <http://www.php-fig.org/psr/psr-2/>`_ style guidelin
Code
""""
When setting up the app you can choose to either use the self hosted zip or checkout the code from GitHub. The zip includes all third party libraries, whereas checking out the code from GitHub requires using Composer and Bower.
When setting up the app you can choose to either use the self hosted zip or checkout the code from GitHub. The zip includes all third party libraries, whereas checking out the code from GitHub requires using Composer.
We use Gulp to concatenate the JavasScript and CSS files. After making any changes you need to run gulp to re-generate the files.
We use Gulp to concatenate the JavasScript and CSS files. You can download the source files with Bower. After making any changes you need to run ``gulp`` to re-generate the built files.
Most of the system tables are cached (ie, currencies, languages, etc). If you make any changes you need to clear the cache either by loading any page with ?clear_cache=true added at the end of the URL.
Most of the system tables are cached (ie, currencies, languages, etc). If you make any changes you need to run ``php artisan db:seed --class=UpdateSeeder`` and then load any page with ?clear_cache=true added at the end of the URL.
Database
""""""""

View File

@ -7,7 +7,7 @@ To update the app you just need to copy over the latest code. The app tracks the
https://download.invoiceninja.com
.. TIP:: You can use this `shell script <https://pastebin.com/j657uv9A>`_ to automate the update process, consider running it as a daily cron to automatically keep your app up to date.
.. TIP:: We recommend using this `shell script <https://pastebin.com/j657uv9A>`_ to automate the update process, run it as a daily cron to automatically keep your app up to date.
If you're moving servers make sure to copy over the .env file.

View File

@ -54,6 +54,7 @@
->addColumn($columns)
->setUrl(route('api.client.' . $entityType . 's'))
->setOptions('sPaginationType', 'bootstrap')
->setOptions('aaSorting', [[$sortColumn, 'desc']])
->render('datatable') !!}
</div>