mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Ensure multidb set in PdfConfiguration
This commit is contained in:
parent
7964069e5b
commit
c4a0a8ee14
@ -137,8 +137,10 @@ class AdjustProductInventory implements ShouldQueue
|
||||
$nmo->company = $this->company;
|
||||
$nmo->settings = $this->company->settings;
|
||||
|
||||
/** @var \App\Models\CompanyUser $cu */
|
||||
|
||||
$this->company->company_users->each(function ($cu) use ($product, $nmo, $notification_level) {
|
||||
|
||||
/** @var \App\Models\CompanyUser $cu */
|
||||
if ($this->checkNotificationExists($cu, $product, ['inventory_all', 'inventory_user', 'inventory_threshold_all', 'inventory_threshold_user']) && (! in_array($product->id, $this->notified_products))) {
|
||||
$nmo->mailable = new NinjaMailer((new InventoryNotificationObject($product, $notification_level, $cu->portalType()))->build());
|
||||
$nmo->to_user = $cu->user;
|
||||
|
@ -12,6 +12,7 @@
|
||||
namespace App\Services\Pdf;
|
||||
|
||||
use App\DataMapper\CompanySettings;
|
||||
use App\Libraries\MultiDB;
|
||||
use App\Models\Client;
|
||||
use App\Models\ClientContact;
|
||||
use App\Models\Country;
|
||||
@ -94,6 +95,8 @@ class PdfConfiguration
|
||||
*/
|
||||
public function init(): self
|
||||
{
|
||||
MultiDB::setDb($this->service->company->db);
|
||||
|
||||
$this->setEntityType()
|
||||
->setDateFormat()
|
||||
->setPdfVariables()
|
||||
|
Loading…
x
Reference in New Issue
Block a user