Skip to content

Commit aa00c13

Browse files
done
1 parent 7fbfc88 commit aa00c13

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

app/Services/ProviderService.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,8 @@ public function attachments ( $model, $item ) {
169169
public function sendEmail ( int $id, string $event, string $entity = null, int $entityId = null, array $items = [] ) {
170170

171171
$provider = $this->find($id);
172-
$supplier = $provider->storeAdmin($provider->supplier_id);
173-
$client = $provider->user;
172+
$admin = $provider->storeAdmin($provider->supplier_id);
173+
$client = $this->withTenant($provider->supplier_id, callback: fn() => $provider->user);
174174

175175
$data = [
176176
'provider' => $provider,
@@ -180,7 +180,7 @@ public function sendEmail ( int $id, string $event, string $entity = null, int $
180180
'items' => count($items)
181181
];
182182

183-
send_email($supplier, [...$data, 'fromMe' => true], 'provider');
183+
send_email($admin, [...$data, 'fromMe' => true], 'provider');
184184
send_email($client, $data, 'provider');
185185

186186
}

0 commit comments

Comments
 (0)