mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-14 07:02:34 +01:00
43e57d0117
* minor fix for payment notifications * styleci * Limit Self updating to self hosters only : * Fixes for designs * Minor fixes for self-update
20 lines
444 B
PHP
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;
|
|
}
|
|
}
|