Unify quote conversion
This commit is contained in:
parent
0b22141492
commit
ccce21c0ec
|
|
@ -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();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue