status_id = Quote::STATUS_DRAFT; $quote->number = null; $quote->discount = 0; $quote->is_amount_discount = true; $quote->po_number = ''; $quote->footer = isset($settings) && strlen($settings->quote_footer) > 0 ? $settings->quote_footer : ''; $quote->terms = isset($settings) && strlen($settings->quote_terms) > 0 ? $settings->quote_terms : ''; $quote->public_notes = isset($client) && strlen($client->public_notes) > 0 ? $client->public_notes : ''; $quote->private_notes = ''; $quote->date = null; $quote->due_date = null; $quote->partial_due_date = null; $quote->is_deleted = false; $quote->line_items = json_encode([]); $quote->backup = json_encode([]); $quote->tax_name1 = ''; $quote->tax_rate1 = 0; $quote->tax_name2 = ''; $quote->tax_rate2 = 0; $quote->custom_value1 = 0; $quote->custom_value2 = 0; $quote->custom_value3 = 0; $quote->custom_value4 = 0; $quote->amount = 0; $quote->balance = 0; $quote->partial = 0; $quote->user_id = $user_id; $quote->company_id = $company_id; return $quote; } }