mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 21:22:58 +01:00
9e9cd37b87
* Working on Quotes * Naming refactor for Quotes * Quote Actions * Quote Pdfs * Quote PDFs * Refunds in Stripe * Fixes tests * Company Ledger work
20 lines
396 B
PHP
20 lines
396 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;
|
|
}
|
|
}
|