App\Models\Traits\PresentsInvoice::getDefaultInvoiceFields PHP Method

getDefaultInvoiceFields() public method

    public function getDefaultInvoiceFields()
    {
        $fields = [INVOICE_FIELDS_INVOICE => ['invoice.invoice_number', 'invoice.po_number', 'invoice.invoice_date', 'invoice.due_date', 'invoice.balance_due', 'invoice.partial_due'], INVOICE_FIELDS_CLIENT => ['client.client_name', 'client.id_number', 'client.vat_number', 'client.address1', 'client.address2', 'client.city_state_postal', 'client.country', 'client.email'], 'account_fields1' => ['account.company_name', 'account.id_number', 'account.vat_number', 'account.website', 'account.email', 'account.phone'], 'account_fields2' => ['account.address1', 'account.address2', 'account.city_state_postal', 'account.country']];
        if ($this->custom_invoice_text_label1) {
            $fields[INVOICE_FIELDS_INVOICE][] = 'invoice.custom_text_value1';
        }
        if ($this->custom_invoice_text_label2) {
            $fields[INVOICE_FIELDS_INVOICE][] = 'invoice.custom_text_value2';
        }
        if ($this->custom_client_label1) {
            $fields[INVOICE_FIELDS_CLIENT][] = 'client.custom_value1';
        }
        if ($this->custom_client_label2) {
            $fields[INVOICE_FIELDS_CLIENT][] = 'client.custom_value2';
        }
        if ($this->custom_label1) {
            $fields['account_fields2'][] = 'account.custom_value1';
        }
        if ($this->custom_label2) {
            $fields['account_fields2'][] = 'account.custom_value2';
        }
        return $this->applyLabels($fields);
    }