Settings > Company details - your company as it shows on invoices, * quotes and emails: its name and tax ID, address, phone (with its country * code, following the country picked), email, website and logo, and the * client record that stands for it. Saved by edit_company; the logo is taken * off by remove_company_logo (admin/post/settings_company.php). */ require_once "includes/inc_all_admin.php"; $company = settingsCurrent(['company_name', 'company_tax_id', 'company_address', 'company_city', 'company_state', 'company_zip', 'company_country', 'company_phone_country_code', 'company_phone', 'company_email', 'company_website', 'company_logo'], 'companies'); $localization = settingsLocalizationArrays(); $countries = ['' => '- Country -']; foreach ($localization['countries'] as $country_name) { $countries[$country_name] = [$country_name, ' data-iso2="' . escapeHtml($localization['country_iso2'][$country_name] ?? '') . '"']; } $internal_clients = [0 => 'None']; $sql_internal_clients = mysqli_query($mysqli, "SELECT client_id, client_name, client_abbreviation FROM clients WHERE client_archived_at IS NULL OR client_id = " . intval($config_internal_client_id) . " ORDER BY client_name ASC"); while ($row = mysqli_fetch_assoc($sql_internal_clients)) { $internal_clients[intval($row['client_id'])] = [$row['client_name'], selectOptionClient($row['client_id'], $row['client_name'], $row['client_abbreviation'] ?? '')]; } $logo = (string) ($company['company_logo'] ?? ''); $logo_url = $logo !== '' && basename($logo) === $logo && is_file(dirname(__DIR__) . "/uploads/settings/$logo") ? "/uploads/settings/" . rawurlencode($logo) : ''; // The phone, as it is shown - its number formatted for its country, its code apart $phone_code = (string) settingsValue('company_phone_country_code', $company['company_phone_country_code']); $phone = (string) settingsValue('company_phone', formatPhoneNumber((string) $company['company_phone'], $phone_code, false)); echo settingsPageStart('company'); ?>
'fa-building', 'required' => true, 'maxlength' => 200, 'placeholder' => 'Company name', 'autocomplete' => 'organization']) ?> 'fa-balance-scale', 'maxlength' => 200, 'placeholder' => 'Tax ID', 'help' => 'Shown on invoices when Invoices and billing says so.']) ?> 'fa-map-marker-alt', 'maxlength' => 200, 'placeholder' => 'Street address', 'autocomplete' => 'street-address']) ?>
'fa-city', 'maxlength' => 200, 'placeholder' => 'City', 'autocomplete' => 'address-level2']) ?>
'fa-flag', 'maxlength' => 200, 'placeholder' => 'State or province', 'autocomplete' => 'address-level1']) ?>
'fa-mail-bulk', 'maxlength' => 200, 'placeholder' => 'Postal code', 'autocomplete' => 'postal-code']) ?>
'fa-globe-americas', 'search' => true]) ?>
' . '' . '' . '' . '
'; echo settingsField('company_phone', 'Phone', $phone_control, 'Its country code follows the country above until you pick another.'); ?> 'fa-envelope', 'type' => 'email', 'maxlength' => 200, 'placeholder' => 'info@company.com', 'autocomplete' => 'email']) ?> 'fa-globe', 'maxlength' => 200, 'placeholder' => 'company.com', 'autocomplete' => 'url', 'help' => 'Kept without its https://.']) ?> ' : picturePhotoEmpty('Add your logo', 'fa-image'); echo settingsField('company_logo', '', pictureField('company_logo', '', $logo_shows, picturePhotoEmpty('Add your logo', 'fa-image'), ['title' => 'Logo', 'shapes' => 'free', 'box' => 'logo', 'max' => 1200, 'trim' => true, 'accept' => 'image/png,image/jpeg', 'class' => 'itflow-picture-logo', 'id' => 'settings_company_logo']), 'Click it to ' . ($logo_url !== '' ? 'change it' : 'add one') . ' - a PNG or JPG. A wide one prints best, and a PNG keeps a see-through background.'); ?> Take the logo off 'fa-house-user', 'search' => true]) ?>