app\models\Invoice::hidePrivateFields PHP Method

hidePrivateFields() public method

public hidePrivateFields ( )
    public function hidePrivateFields()
    {
        $this->setVisible(['invoice_number', 'discount', 'is_amount_discount', 'po_number', 'invoice_date', 'due_date', 'terms', 'invoice_footer', 'public_notes', 'amount', 'balance', 'invoice_items', 'documents', 'expenses', 'client', 'tax_name1', 'tax_rate1', 'tax_name2', 'tax_rate2', 'account', 'invoice_design', 'invoice_design_id', 'invoice_fonts', 'features', 'invoice_type_id', 'custom_value1', 'custom_value2', 'custom_taxes1', 'custom_taxes2', 'partial', 'has_tasks', 'custom_text_value1', 'custom_text_value2', 'has_expenses']);
        $this->client->setVisible(['name', 'id_number', 'vat_number', 'address1', 'address2', 'city', 'state', 'postal_code', 'work_phone', 'payment_terms', 'contacts', 'country', 'currency_id', 'country_id', 'custom_value1', 'custom_value2']);
        $this->account->setVisible(['name', 'website', 'id_number', 'vat_number', 'address1', 'address2', 'city', 'state', 'postal_code', 'work_phone', 'work_email', 'country', 'currency_id', 'custom_label1', 'custom_value1', 'custom_label2', 'custom_value2', 'custom_client_label1', 'custom_client_label2', 'primary_color', 'secondary_color', 'hide_quantity', 'hide_paid_to_date', 'all_pages_header', 'all_pages_footer', 'custom_invoice_label1', 'custom_invoice_label2', 'pdf_email_attachment', 'show_item_taxes', 'custom_invoice_text_label1', 'custom_invoice_text_label2', 'custom_invoice_item_label1', 'custom_invoice_item_label2', 'invoice_embed_documents', 'page_size', 'include_item_taxes_inline', 'invoice_fields']);
        foreach ($this->invoice_items as $invoiceItem) {
            $invoiceItem->setVisible(['product_key', 'notes', 'custom_value1', 'custom_value2', 'cost', 'qty', 'tax_name1', 'tax_rate1', 'tax_name2', 'tax_rate2']);
        }
        foreach ($this->client->contacts as $contact) {
            $contact->setVisible(['first_name', 'last_name', 'email', 'phone']);
        }
        foreach ($this->documents as $document) {
            $document->setVisible(['public_id', 'name']);
        }
        foreach ($this->expenses as $expense) {
            $expense->setVisible(['documents']);
            foreach ($expense->documents as $document) {
                $document->setVisible(['public_id', 'name']);
            }
        }
        return $this;
    }