mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-03 01:34:35 -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)
|
if ($entity instanceof User || $entity->company->is_disabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
$entity->load('company', 'client');
|
|
||||||
|
|
||||||
$backup = new Backup();
|
$backup = new Backup();
|
||||||
|
|
||||||
@ -82,6 +81,7 @@ class ActivityRepository extends BaseRepository
|
|||||||
|| get_class($entity) == Credit::class
|
|| get_class($entity) == Credit::class
|
||||||
|| get_class($entity) == RecurringInvoice::class
|
|| get_class($entity) == RecurringInvoice::class
|
||||||
) {
|
) {
|
||||||
|
$entity->load('company', 'client');
|
||||||
$contact = $entity->client->primary_contact()->first();
|
$contact = $entity->client->primary_contact()->first();
|
||||||
$backup->html_backup = $this->generateHtml($entity);
|
$backup->html_backup = $this->generateHtml($entity);
|
||||||
$backup->amount = $entity->amount;
|
$backup->amount = $entity->amount;
|
||||||
|
@ -322,6 +322,8 @@ class InvoiceService
|
|||||||
|
|
||||||
public function deletePdf()
|
public function deletePdf()
|
||||||
{
|
{
|
||||||
|
$this->invoice->load('invitations');
|
||||||
|
|
||||||
$this->invoice->invitations->each(function ($invitation){
|
$this->invoice->invitations->each(function ($invitation){
|
||||||
|
|
||||||
Storage::disk(config('filesystems.default'))->delete($this->invoice->client->invoice_filepath($invitation) . $this->invoice->numberFormatter().'.pdf');
|
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()
|
public function run()
|
||||||
{
|
{
|
||||||
|
$this->payment->load('company', 'client.contacts');
|
||||||
|
|
||||||
$this->payment->client->contacts->each(function ($contact) {
|
$this->payment->client->contacts->each(function ($contact) {
|
||||||
if ($contact->email) {
|
if ($contact->email) {
|
||||||
EmailPayment::dispatchNow($this->payment, $this->payment->company, $contact);
|
EmailPayment::dispatchNow($this->payment, $this->payment->company, $contact);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user