diff --git a/app/Http/Controllers/ClientPortal/PaymentController.php b/app/Http/Controllers/ClientPortal/PaymentController.php index 826fb9fb15ff..ef3eb52c87ec 100644 --- a/app/Http/Controllers/ClientPortal/PaymentController.php +++ b/app/Http/Controllers/ClientPortal/PaymentController.php @@ -177,7 +177,6 @@ class PaymentController extends Controller if ($invoices->sum('balance') > 0) { $invoice = $invoices->first(); - $invoice->service()->touchPdf(true); return redirect()->route('client.invoice.show', ['invoice' => $invoice->hashed_id, 'hash' => $request->input('hash')]); } diff --git a/app/Http/Controllers/InvoiceController.php b/app/Http/Controllers/InvoiceController.php index 636f0479531b..d52068faa310 100644 --- a/app/Http/Controllers/InvoiceController.php +++ b/app/Http/Controllers/InvoiceController.php @@ -683,7 +683,6 @@ class InvoiceController extends BaseController return $this->itemResponse($quote); - break; case 'history': // code... break; @@ -717,7 +716,6 @@ class InvoiceController extends BaseController echo Storage::get($file); }, basename($file), ['Content-Type' => 'application/pdf']); - break; case 'restore': $this->invoice_repo->restore($invoice); @@ -742,8 +740,6 @@ class InvoiceController extends BaseController break; case 'cancel': $invoice = $invoice->service()->handleCancellation()->deletePdf()->save(); - // $invoice = $invoice->service()->handleCancellation()->touchPdf()->save(); - if (! $bulk) { $this->itemResponse($invoice); } @@ -765,7 +761,6 @@ class InvoiceController extends BaseController default: return response()->json(['message' => ctrans('texts.action_unavailable', ['action' => $action])], 400); - break; } } diff --git a/app/Jobs/RecurringInvoice/SendRecurring.php b/app/Jobs/RecurringInvoice/SendRecurring.php index 808580736484..c398f0f2d363 100644 --- a/app/Jobs/RecurringInvoice/SendRecurring.php +++ b/app/Jobs/RecurringInvoice/SendRecurring.php @@ -91,9 +91,6 @@ class SendRecurring implements ShouldQueue $invoice = $this->createRecurringInvitations($invoice); - /* 09-01-2022 ensure we create the PDFs at this point in time! */ - $invoice->service()->touchPdf(true); - /* Set next date here to prevent a recurring loop forming */ $this->recurring_invoice->next_send_date = $this->recurring_invoice->nextSendDate(); $this->recurring_invoice->next_send_date_client = $this->recurring_invoice->nextSendDateClient(); diff --git a/app/Jobs/Util/ReminderJob.php b/app/Jobs/Util/ReminderJob.php index 1c10a0a3d5c4..2f80eeb6c628 100644 --- a/app/Jobs/Util/ReminderJob.php +++ b/app/Jobs/Util/ReminderJob.php @@ -205,9 +205,6 @@ class ReminderJob implements ShouldQueue ->markSent() ->save(); - //30-6-2023 - fix for duplicate touching - // $invoice->service()->touchPdf(true); - $enabled_reminder = 'enable_'.$reminder_template; if ($reminder_template == 'endless_reminder') { $enabled_reminder = 'enable_reminder_endless'; @@ -308,14 +305,11 @@ class ReminderJob implements ShouldQueue /**Refresh Invoice values*/ $invoice = $invoice->calc()->getInvoice(); - // $invoice->service()->deletePdf(); 24-11-2022 no need to delete here because we regenerate later anyway nlog('adjusting client balance and invoice balance by #'.$invoice->number.' '.($invoice->balance - $temp_invoice_balance)); $invoice->client->service()->updateBalance($invoice->balance - $temp_invoice_balance); $invoice->ledger()->updateInvoiceBalance($invoice->balance - $temp_invoice_balance, "Late Fee Adjustment for invoice {$invoice->number}"); - $invoice->service()->touchPdf(true); - return $invoice; } } diff --git a/app/Models/User.php b/app/Models/User.php index 9ceb5f9ad2f3..814d501052a1 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -77,16 +77,6 @@ use Illuminate\Foundation\Auth\User as Authenticatable; * @property int $verified_phone_number * @property-read \App\Models\Account $account * @property-read \App\Models\Company $company - * @property-read \Illuminate\Database\Eloquent\Collection $clients - * @property-read int|null $clients_count - * @property-read \Illuminate\Database\Eloquent\Collection $companies - * @property-read int|null $companies_count - * @property-read \Illuminate\Database\Eloquent\Collection $company_users - * @property-read int|null $company_users_count - * @property-read \Illuminate\Database\Eloquent\Collection $contacts - * @property-read int|null $contacts_count - * @property-read \Illuminate\Database\Eloquent\Collection $documents - * @property-read int|null $documents_count * @property-read mixed $hashed_id * @property-read \Illuminate\Notifications\DatabaseNotificationCollection $notifications * @property-read int|null $notifications_count @@ -99,53 +89,9 @@ use Illuminate\Foundation\Auth\User as Authenticatable; * @method static \Illuminate\Database\Eloquent\Builder|User onlyTrashed() * @method static \Illuminate\Database\Eloquent\Builder|User query() * @method static \Illuminate\Database\Eloquent\Builder|User where($column, $value) - * @method static \Illuminate\Database\Eloquent\Builder|User whereAcceptedTermsVersion($value) - * @method static \Illuminate\Database\Eloquent\Builder|User whereAccountId($value) - * @method static \Illuminate\Database\Eloquent\Builder|User whereAvatar($value) - * @method static \Illuminate\Database\Eloquent\Builder|User whereAvatarHeight($value) - * @method static \Illuminate\Database\Eloquent\Builder|User whereAvatarSize($value) - * @method static \Illuminate\Database\Eloquent\Builder|User whereAvatarWidth($value) - * @method static \Illuminate\Database\Eloquent\Builder|User whereConfirmationCode($value) - * @method static \Illuminate\Database\Eloquent\Builder|User whereCreatedAt($value) - * @method static \Illuminate\Database\Eloquent\Builder|User whereCustomValue1($value) - * @method static \Illuminate\Database\Eloquent\Builder|User whereCustomValue2($value) - * @method static \Illuminate\Database\Eloquent\Builder|User whereCustomValue3($value) - * @method static \Illuminate\Database\Eloquent\Builder|User whereCustomValue4($value) - * @method static \Illuminate\Database\Eloquent\Builder|User whereDeletedAt($value) - * @method static \Illuminate\Database\Eloquent\Builder|User whereDeviceToken($value) - * @method static \Illuminate\Database\Eloquent\Builder|User whereEmail($value) - * @method static \Illuminate\Database\Eloquent\Builder|User whereEmailVerifiedAt($value) - * @method static \Illuminate\Database\Eloquent\Builder|User whereFailedLogins($value) - * @method static \Illuminate\Database\Eloquent\Builder|User whereFirstName($value) - * @method static \Illuminate\Database\Eloquent\Builder|User whereGoogle2faSecret($value) - * @method static \Illuminate\Database\Eloquent\Builder|User whereHasPassword($value) - * @method static \Illuminate\Database\Eloquent\Builder|User whereId($value) - * @method static \Illuminate\Database\Eloquent\Builder|User whereIp($value) - * @method static \Illuminate\Database\Eloquent\Builder|User whereIsDeleted($value) - * @method static \Illuminate\Database\Eloquent\Builder|User whereLastConfirmedEmailAddress($value) - * @method static \Illuminate\Database\Eloquent\Builder|User whereLastLogin($value) - * @method static \Illuminate\Database\Eloquent\Builder|User whereLastName($value) - * @method static \Illuminate\Database\Eloquent\Builder|User whereOauthProviderId($value) - * @method static \Illuminate\Database\Eloquent\Builder|User whereOauthUserId($value) - * @method static \Illuminate\Database\Eloquent\Builder|User whereOauthUserRefreshToken($value) - * @method static \Illuminate\Database\Eloquent\Builder|User whereOauthUserToken($value) - * @method static \Illuminate\Database\Eloquent\Builder|User whereOauthUserTokenExpiry($value) - * @method static \Illuminate\Database\Eloquent\Builder|User wherePassword($value) - * @method static \Illuminate\Database\Eloquent\Builder|User wherePhone($value) - * @method static \Illuminate\Database\Eloquent\Builder|User whereReferralCode($value) - * @method static \Illuminate\Database\Eloquent\Builder|User whereRememberToken($value) - * @method static \Illuminate\Database\Eloquent\Builder|User whereSignature($value) - * @method static \Illuminate\Database\Eloquent\Builder|User whereSmsVerificationCode($value) - * @method static \Illuminate\Database\Eloquent\Builder|User whereThemeId($value) - * @method static \Illuminate\Database\Eloquent\Builder|User whereUpdatedAt($value) - * @method static \Illuminate\Database\Eloquent\Builder|User whereVerifiedPhoneNumber($value) * @method static \Illuminate\Database\Eloquent\Builder|User withTrashed() * @method static \Illuminate\Database\Eloquent\Builder|User withoutTrashed() - * @property-read \Illuminate\Database\Eloquent\Collection $clients - * @property-read \Illuminate\Database\Eloquent\Collection $companies * @property-read \Illuminate\Database\Eloquent\Collection $company_users - * @property-read \Illuminate\Database\Eloquent\Collection $contacts - * @property-read \Illuminate\Database\Eloquent\Collection $documents * @property-read \Illuminate\Notifications\DatabaseNotificationCollection $notifications * @property-read \Illuminate\Database\Eloquent\Collection $tokens * @method bool hasPermissionTo(string $permission) diff --git a/app/Services/Invoice/ApplyPaymentAmount.php b/app/Services/Invoice/ApplyPaymentAmount.php index 59f7269d9a57..f075a3992b28 100644 --- a/app/Services/Invoice/ApplyPaymentAmount.php +++ b/app/Services/Invoice/ApplyPaymentAmount.php @@ -73,7 +73,6 @@ class ApplyPaymentAmount extends AbstractService ->updatePaidToDate($payment->amount) ->setCalculatedStatus() ->applyNumber() - ->touchPdf() ->save(); $this->invoice diff --git a/app/Services/Invoice/MarkSent.php b/app/Services/Invoice/MarkSent.php index 87c3a89f0664..79c2fa3fbd82 100644 --- a/app/Services/Invoice/MarkSent.php +++ b/app/Services/Invoice/MarkSent.php @@ -50,7 +50,6 @@ class MarkSent extends AbstractService ->service() ->applyNumber() ->setDueDate() - ->touchPdf() ->setReminder() ->save();