mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
commit
90e1743ee0
@ -206,11 +206,14 @@ class PreviewController extends BaseController
|
|||||||
info("company id = " . auth()->user()->company()->id);
|
info("company id = " . auth()->user()->company()->id);
|
||||||
|
|
||||||
$entity_obj = $class::on(auth()->user()->company()->db)
|
$entity_obj = $class::on(auth()->user()->company()->db)
|
||||||
->withTrashed()
|
|
||||||
->where('id', $this->decodePrimaryKey($request->input('entity_id')))
|
->where('id', $this->decodePrimaryKey($request->input('entity_id')))
|
||||||
->where('company_id', auth()->user()->company()->id)
|
->where('company_id', auth()->user()->company()->id)
|
||||||
|
->withTrashed()
|
||||||
->first();
|
->first();
|
||||||
|
|
||||||
|
if($entity_obj)
|
||||||
|
info("found a valid entity object");
|
||||||
|
|
||||||
$entity_obj = $repo->save($request->all(), $entity_obj);
|
$entity_obj = $repo->save($request->all(), $entity_obj);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user