mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 02:44:53 +00:00
More Currency Code Updates, would like to do conversions and add currency icons at a later date also set default country so it doesnt have to be selected each time
This commit is contained in:
27
setup.php
27
setup.php
@@ -16,6 +16,13 @@ $countries_array = array(
|
||||
'Canada'
|
||||
);
|
||||
|
||||
$currencies_array = array(
|
||||
'USD'=>'US Dollars',
|
||||
'EUR'=>'Euro',
|
||||
'GBP'=>'British Pounds',
|
||||
'TRY'=>'Turkish Lira'
|
||||
);
|
||||
|
||||
$states_array = array(
|
||||
'AL'=>'Alabama',
|
||||
'AK'=>'Alaska',
|
||||
@@ -183,8 +190,9 @@ if(isset($_POST['add_company_settings'])){
|
||||
$state = strip_tags(mysqli_real_escape_string($mysqli,$_POST['state']));
|
||||
$zip = strip_tags(mysqli_real_escape_string($mysqli,$_POST['zip']));
|
||||
$phone = preg_replace("/[^0-9]/", '',$_POST['phone']);
|
||||
$website = strip_tags(mysqli_real_escape_string($mysqli,$_POST['website']));
|
||||
$email = strip_tags(mysqli_real_escape_string($mysqli,$_POST['email']));
|
||||
$website = strip_tags(mysqli_real_escape_string($mysqli,$_POST['website']));
|
||||
$currency_code = strip_tags(mysqli_real_escape_string($mysqli,$_POST['currency_code']));
|
||||
|
||||
mysqli_query($mysqli,"INSERT INTO companies SET company_name = '$name', company_address = '$address', company_city = '$city', company_state = '$state', company_zip = '$zip', company_country = '$country', company_phone = '$phone', company_email = '$email', company_website = '$website', company_logo = '$path', company_created_at = NOW()");
|
||||
|
||||
@@ -209,7 +217,7 @@ if(isset($_POST['add_company_settings'])){
|
||||
//Create Permissions
|
||||
mysqli_query($mysqli,"INSERT INTO permissions SET permission_level = 5, permission_default_company = $company_id, permission_companies = $company_id, user_id = $user_id");
|
||||
|
||||
mysqli_query($mysqli,"INSERT INTO settings SET company_id = $company_id, config_invoice_prefix = 'INV-', config_invoice_next_number = 1, config_recurring_prefix = 'REC-', config_recurring_next_number = 1, config_invoice_overdue_reminders = '1,3,7', config_quote_prefix = 'QUO-', config_quote_next_number = 1, config_api_key = '$config_api_key', config_recurring_auto_send_invoice = 1, config_default_net_terms = 7, config_send_invoice_reminders = 0, config_enable_cron = 0, config_ticket_next_number = 1, config_base_url = '$config_base_url'");
|
||||
mysqli_query($mysqli,"INSERT INTO settings SET company_id = $company_id, config_default_country = '$country', config_default_currency = '$currency_code', config_invoice_prefix = 'INV-', config_invoice_next_number = 1, config_recurring_prefix = 'REC-', config_recurring_next_number = 1, config_invoice_overdue_reminders = '1,3,7', config_quote_prefix = 'QUO-', config_quote_next_number = 1, config_api_key = '$config_api_key', config_recurring_auto_send_invoice = 1, config_default_net_terms = 7, config_send_invoice_reminders = 0, config_enable_cron = 0, config_ticket_next_number = 1, config_base_url = '$config_base_url'");
|
||||
|
||||
//Create Some Data
|
||||
|
||||
@@ -574,6 +582,21 @@ if(isset($_POST['add_company_settings'])){
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Currency</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-money-bill"></i></span>
|
||||
</div>
|
||||
<select class="form-control select2" name="currency_code" required>
|
||||
<option value="">- Currency -</option>
|
||||
<?php foreach($currencies_array as $currency_code => $currency_name) { ?>
|
||||
<option><?php echo "$currency_code - $currency_name"; ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Logo</label>
|
||||
<input type="file" class="form-control-file" name="file">
|
||||
|
||||
Reference in New Issue
Block a user