mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
PaymentDriver - Convert quote to invoice on payment
Signed-off-by: Kristián Feldsam <feldsam@gmail.com>
This commit is contained in:
parent
f119a6f74c
commit
d7368851f5
@ -698,6 +698,13 @@ class BasePaymentDriver
|
|||||||
if (! $invoice->canBePaid()) {
|
if (! $invoice->canBePaid()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// check if invoice is quote and if is, them convert it
|
||||||
|
if($invoice->isQuote()) {
|
||||||
|
$invoiceService = app('App\Services\InvoiceService');
|
||||||
|
$invoice = $invoiceService->convertQuote($invoice);
|
||||||
|
}
|
||||||
|
|
||||||
$invoice->markSentIfUnsent();
|
$invoice->markSentIfUnsent();
|
||||||
|
|
||||||
$payment = Payment::createNew($invitation);
|
$payment = Payment::createNew($invitation);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user