mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Fixes for testS
This commit is contained in:
parent
e6be94ad22
commit
d93928ffbe
@ -73,7 +73,6 @@ class ActivityRepository extends BaseRepository
|
||||
if ($entity instanceof User || $entity->company->is_disabled)
|
||||
return;
|
||||
|
||||
$entity->load('company', 'client');
|
||||
|
||||
$backup = new Backup();
|
||||
|
||||
@ -82,6 +81,7 @@ class ActivityRepository extends BaseRepository
|
||||
|| get_class($entity) == Credit::class
|
||||
|| get_class($entity) == RecurringInvoice::class
|
||||
) {
|
||||
$entity->load('company', 'client');
|
||||
$contact = $entity->client->primary_contact()->first();
|
||||
$backup->html_backup = $this->generateHtml($entity);
|
||||
$backup->amount = $entity->amount;
|
||||
|
@ -322,6 +322,8 @@ class InvoiceService
|
||||
|
||||
public function deletePdf()
|
||||
{
|
||||
$this->invoice->load('invitations');
|
||||
|
||||
$this->invoice->invitations->each(function ($invitation){
|
||||
|
||||
Storage::disk(config('filesystems.default'))->delete($this->invoice->client->invoice_filepath($invitation) . $this->invoice->numberFormatter().'.pdf');
|
||||
|
@ -32,6 +32,8 @@ class SendEmail
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$this->payment->load('company', 'client.contacts');
|
||||
|
||||
$this->payment->client->contacts->each(function ($contact) {
|
||||
if ($contact->email) {
|
||||
EmailPayment::dispatchNow($this->payment, $this->payment->company, $contact);
|
||||
|
Loading…
x
Reference in New Issue
Block a user