Unify quote conversion

This commit is contained in:
David Bomba 2025-10-29 16:06:23 +11:00
parent 0b22141492
commit ccce21c0ec
2 changed files with 11 additions and 3 deletions

View File

@ -561,7 +561,8 @@ class QuoteController extends BaseController
$quotes->each(function ($quote, $key) use ($user) {
if ($user->can('edit', $quote) && $quote->service()->isConvertable()) {
$quote->service()->convertToInvoice();
// $quote->service()->convertToInvoice();
$quote->service()->convert()->save();
}
});

View File

@ -162,11 +162,18 @@ class QuoteService
return $this;
}
/**
* convertToInvoice
*
* @NOTE - this method will force the quote to include all invitations for the
* client where ADD TO INVOICE = true
*
*/
public function convertToInvoice()
{
$this->convert();
$this->invoice->service()->createInvitations();
// $this->invoice->service()->createInvitations();
return $this->invoice;
}