mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-01 03:14:47 -04:00
Fixes for locking
This commit is contained in:
parent
b87421f769
commit
b57c35d5e1
@ -189,10 +189,11 @@ class PreviewController extends BaseController
|
|||||||
$class = RecurringInvoice::class;
|
$class = RecurringInvoice::class;
|
||||||
}
|
}
|
||||||
|
|
||||||
DB::connection(config('database.default'))->beginTransaction();
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
DB::connection(config('database.default'))->beginTransaction();
|
||||||
|
|
||||||
if($request->has('entity_id')){
|
if($request->has('entity_id')){
|
||||||
|
|
||||||
$entity_obj = $class::withTrashed()->whereId($this->decodePrimaryKey($request->input('entity_id')))->company()->first();
|
$entity_obj = $class::withTrashed()->whereId($this->decodePrimaryKey($request->input('entity_id')))->company()->first();
|
||||||
@ -251,9 +252,13 @@ class PreviewController extends BaseController
|
|||||||
->design($template)
|
->design($template)
|
||||||
->build();
|
->build();
|
||||||
|
|
||||||
|
DB::connection(config('database.default'))->rollBack();
|
||||||
|
|
||||||
if (request()->query('html') == 'true') {
|
if (request()->query('html') == 'true') {
|
||||||
return $maker->getCompiledHTML;
|
return $maker->getCompiledHTML;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
catch(\Exception $e){
|
catch(\Exception $e){
|
||||||
|
|
||||||
@ -261,7 +266,6 @@ class PreviewController extends BaseController
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DB::connection(config('database.default'))->rollBack();
|
|
||||||
|
|
||||||
//if phantom js...... inject here..
|
//if phantom js...... inject here..
|
||||||
if (config('ninja.phantomjs_pdf_generation') || config('ninja.pdf_generator') == 'phantom') {
|
if (config('ninja.phantomjs_pdf_generation') || config('ninja.pdf_generator') == 'phantom') {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user