1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-14 07:02:34 +01:00
invoiceninja/app/Factory/CloneQuoteToInvoiceFactory.php
David Bomba 43e57d0117
Fixes for self-update (#3514)
* minor fix for payment notifications

* styleci

* Limit Self updating to self hosters only
:

* Fixes for designs

* Minor fixes for self-update
2020-03-21 16:37:30 +11:00

20 lines
444 B
PHP

<?php
namespace App\Factory;
use App\Models\Invoice;
use App\Models\Quote;
class CloneQuoteToInvoiceFactory
{
public static function create(Quote $quote, $user_id) : ?Invoice
{
$invoice = new Invoice();
$invoice->user_id = $user_id;
$invoice->po_number = $quote->po_number;
$invoice->footer = $quote->footer;
$invoice->line_items = $quote->line_items;
return $invoice;
}
}