diff --git a/app/Http/Controllers/CreditController.php b/app/Http/Controllers/CreditController.php index 1b2a9b88f71b..008ecff23321 100644 --- a/app/Http/Controllers/CreditController.php +++ b/app/Http/Controllers/CreditController.php @@ -515,27 +515,9 @@ class CreditController extends BaseController $credit = CloneCreditFactory::create($credit, auth()->user()->id); return $this->itemResponse($credit); break; - case 'clone_to_quote': - $quote = CloneCreditToQuoteFactory::create($credit, auth()->user()->id); - // todo build the quote transformer and return response here - break; case 'history': # code... break; - case 'delivery_note': - # code... - break; - case 'mark_paid': - if ($credit->balance < 0 || $credit->status_id == Credit::STATUS_PAID || $credit->is_deleted === true) { - return $this->errorResponse(['message' => 'Credit cannot be marked as paid'], 400); - } - //@todo fix and replace - $credit = MarkInvoicePaid::dispatchNow($credit, $credit->company); - - if (!$bulk) { - return $this->itemResponse($credit); - } - break; case 'mark_sent': $credit->service()->markSent()->save(); diff --git a/app/Jobs/Invoice/EmailInvoice.php b/app/Jobs/Invoice/EmailInvoice.php index 277c3c937817..cff3c7d79852 100644 --- a/app/Jobs/Invoice/EmailInvoice.php +++ b/app/Jobs/Invoice/EmailInvoice.php @@ -31,9 +31,9 @@ class EmailInvoice implements ShouldQueue public $company; /** * - * EmailQuote constructor. + * EmailInvoice constructor. * @param BuildEmail $email_builder - * @param QuoteInvitation $quote_invitation + * @param InvoiceInvitation $quote_invitation */ public function __construct(InvoiceEmail $email_builder, InvoiceInvitation $invoice_invitation, Company $company) diff --git a/app/Utils/Traits/MakesInvoiceHtml.php b/app/Utils/Traits/MakesInvoiceHtml.php index 23df06213028..f118c768d299 100644 --- a/app/Utils/Traits/MakesInvoiceHtml.php +++ b/app/Utils/Traits/MakesInvoiceHtml.php @@ -59,7 +59,7 @@ trait MakesInvoiceHtml $html = $this->parseLabelsAndValues($labels, $values, $html); - info($html); +// info($html); return $html; } diff --git a/app/Utils/Traits/MakesInvoiceValues.php b/app/Utils/Traits/MakesInvoiceValues.php index 694a6f45733e..52d060d65e54 100644 --- a/app/Utils/Traits/MakesInvoiceValues.php +++ b/app/Utils/Traits/MakesInvoiceValues.php @@ -732,7 +732,12 @@ trait MakesInvoiceValues return rtrim(config('ninja.app_url'), "/"); } - public function generateCustomCSS() + /** + * Builds CSS to assist with the generation + * of Repeating headers and footers on the PDF + * @return string The css string + */ + public function generateCustomCSS() :string { $settings = $this->client->getMergedSettings(); @@ -800,9 +805,6 @@ trait MakesInvoiceValues }'; $css = ''; -\Log::error($settings->all_pages_header); -\Log::error($settings->all_pages_footer); - if($settings->all_pages_header && $settings->all_pages_footer) $css .= $header_and_footer; elseif($settings->all_pages_header && !$settings->all_pages_footer) @@ -822,8 +824,8 @@ trait MakesInvoiceValues html { '; -// $css .= 'font-size:' . $settings->font_size . 'px;'; - $css .= 'font-size:14px;'; + $css .= 'font-size:' . $settings->font_size . 'px;'; +// $css .= 'font-size:14px;'; $css .= '}';