1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Fixes for preview

This commit is contained in:
David Bomba 2021-08-05 22:55:40 +10:00
parent 55c7c23475
commit 9a55743e3b

View File

@ -200,7 +200,7 @@ class PreviewController extends BaseController
try {
DB::connection($company->db)->beginTransaction();
DB::connection(config('database.default'))->beginTransaction();
if($request->has('entity_id')){
@ -267,7 +267,7 @@ class PreviewController extends BaseController
->design($template)
->build();
DB::connection($company->db)->rollBack();
DB::connection(config('database.default'))->rollBack();
if (request()->query('html') == 'true') {
return $maker->getCompiledHTML;
@ -277,7 +277,7 @@ class PreviewController extends BaseController
}
catch(\Exception $e){
DB::connection($company->db)->rollBack();
DB::connection(config('database.default'))->rollBack();
return;
}