toArray(); unset($quote_array['client']); unset($quote_array['company']); unset($quote_array['hashed_id']); unset($quote_array['id']); foreach($quote_array as $key => $value) $invoice->{$key} = $value; $invoice->due_date = null; $invoice->partial_due_date = null; $invoice->number = null; $invoice->status_id = null; return $invoice; } }