Static analysis cleanup

This commit is contained in:
David Bomba 2023-07-26 13:18:31 +10:00
parent adc72af6ff
commit 2a3c652b0c
7 changed files with 0 additions and 71 deletions

View File

@ -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')]);
}

View File

@ -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;
}
}

View File

@ -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();

View File

@ -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;
}
}

View File

@ -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<int, \App\Models\Client> $clients
* @property-read int|null $clients_count
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Company> $companies
* @property-read int|null $companies_count
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyUser> $company_users
* @property-read int|null $company_users_count
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ClientContact> $contacts
* @property-read int|null $contacts_count
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
* @property-read int|null $documents_count
* @property-read mixed $hashed_id
* @property-read \Illuminate\Notifications\DatabaseNotificationCollection<int, \Illuminate\Notifications\DatabaseNotification> $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<int, \App\Models\Client> $clients
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Company> $companies
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyUser> $company_users
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ClientContact> $contacts
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
* @property-read \Illuminate\Notifications\DatabaseNotificationCollection<int, \Illuminate\Notifications\DatabaseNotification> $notifications
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyToken> $tokens
* @method bool hasPermissionTo(string $permission)

View File

@ -73,7 +73,6 @@ class ApplyPaymentAmount extends AbstractService
->updatePaidToDate($payment->amount)
->setCalculatedStatus()
->applyNumber()
->touchPdf()
->save();
$this->invoice

View File

@ -50,7 +50,6 @@ class MarkSent extends AbstractService
->service()
->applyNumber()
->setDueDate()
->touchPdf()
->setReminder()
->save();