mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-07-10 23:17:08 -04:00
For #3739. More adjustments for removing esc()
This commit is contained in:
@@ -107,10 +107,26 @@ class Cashups extends Secure_Controller
|
||||
// if it's date mode only and not date & time truncate the open and end date to date only
|
||||
if(empty($this->config['date_or_time_format']))
|
||||
{
|
||||
if($cash_ups_info->open_date != null)
|
||||
{
|
||||
$start_date = substr($cash_ups_info->open_date, 0, 10);
|
||||
}
|
||||
else
|
||||
{
|
||||
$start_date = null;
|
||||
}
|
||||
if($cash_ups_info->close_date != null)
|
||||
{
|
||||
$end_date = substr($cash_ups_info->close_date, 0, 10);
|
||||
}
|
||||
else
|
||||
{
|
||||
$end_date = null;
|
||||
}
|
||||
// search for all the payments given the time range
|
||||
$inputs = [
|
||||
'start_date' => substr($cash_ups_info->open_date, 0, 10),
|
||||
'end_date' => substr($cash_ups_info->close_date, 0, 10),
|
||||
'start_date' => $start_date,
|
||||
'end_date' => $end_date,
|
||||
'sale_type' => 'complete',
|
||||
'location_id' => 'all'
|
||||
];
|
||||
|
||||
@@ -86,7 +86,7 @@ class Config extends Secure_Controller
|
||||
|
||||
if(file_exists('license/LICENSE'))
|
||||
{
|
||||
$license[$i]['text'] = file_get_contents('license/LICENSE', NULL, NULL, 0, 2000);
|
||||
$license[$i]['text'] = file_get_contents('license/LICENSE', false, NULL, 0, 2000);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -112,7 +112,7 @@ class Config extends Secure_Controller
|
||||
|
||||
if(file_exists($license_text_file))
|
||||
{
|
||||
$license[$i]['text'] = file_get_contents($license_text_file , NULL, NULL, 0, 2000);
|
||||
$license[$i]['text'] = file_get_contents($license_text_file , false, NULL, 0, 2000);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -329,13 +329,13 @@ class Config extends Secure_Controller
|
||||
$upload_success = !empty($upload_data['error']);
|
||||
|
||||
$batch_save_data = [
|
||||
'company' => $this->request->getPost('company', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'address' => $this->request->getPost('address', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'phone' => $this->request->getPost('phone', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'company' => $this->request->getPost('company'),
|
||||
'address' => $this->request->getPost('address'),
|
||||
'phone' => $this->request->getPost('phone'),
|
||||
'email' => $this->request->getPost('email', FILTER_SANITIZE_EMAIL),
|
||||
'fax' => $this->request->getPost('fax', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'fax' => $this->request->getPost('fax'),
|
||||
'website' => $this->request->getPost('website', FILTER_SANITIZE_URL),
|
||||
'return_policy' => $this->request->getPost('return_policy', FILTER_SANITIZE_FULL_SPECIAL_CHARS)
|
||||
'return_policy' => $this->request->getPost('return_policy')
|
||||
];
|
||||
|
||||
if(!empty($upload_data['orig_name']) && $upload_data['raw_name'] === TRUE)
|
||||
@@ -397,8 +397,8 @@ class Config extends Secure_Controller
|
||||
public function postSaveGeneral(): void
|
||||
{
|
||||
$batch_save_data = [
|
||||
'theme' => $this->request->getPost('theme', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'login_form' => $this->request->getPost('login_form', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'theme' => $this->request->getPost('theme'),
|
||||
'login_form' => $this->request->getPost('login_form'),
|
||||
'default_sales_discount_type' => $this->request->getPost('default_sales_discount_type') != NULL,
|
||||
'default_sales_discount' => $this->request->getPost('default_sales_discount', FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION),
|
||||
'default_receivings_discount_type' => $this->request->getPost('default_receivings_discount_type') != NULL,
|
||||
@@ -411,14 +411,14 @@ class Config extends Secure_Controller
|
||||
'image_max_width' => $this->request->getPost('image_max_width', FILTER_SANITIZE_NUMBER_INT),
|
||||
'image_max_height' => $this->request->getPost('image_max_height', FILTER_SANITIZE_NUMBER_INT),
|
||||
'image_max_size' => $this->request->getPost('image_max_size', FILTER_SANITIZE_NUMBER_INT),
|
||||
'image_allowed_types' => implode('|', $this->request->getPost('image_allowed_types', FILTER_SANITIZE_FULL_SPECIAL_CHARS)),
|
||||
'image_allowed_types' => implode('|', $this->request->getPost('image_allowed_types')),
|
||||
'gcaptcha_enable' => $this->request->getPost('gcaptcha_enable') != NULL,
|
||||
'gcaptcha_secret_key' => $this->request->getPost('gcaptcha_secret_key', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'gcaptcha_site_key' => $this->request->getPost('gcaptcha_site_key', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'suggestions_first_column' => $this->request->getPost('suggestions_first_column', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'suggestions_second_column' => $this->request->getPost('suggestions_second_column', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'suggestions_third_column' => $this->request->getPost('suggestions_third_column', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'giftcard_number' => $this->request->getPost('giftcard_number', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'gcaptcha_secret_key' => $this->request->getPost('gcaptcha_secret_key'),
|
||||
'gcaptcha_site_key' => $this->request->getPost('gcaptcha_site_key'),
|
||||
'suggestions_first_column' => $this->request->getPost('suggestions_first_column'),
|
||||
'suggestions_second_column' => $this->request->getPost('suggestions_second_column'),
|
||||
'suggestions_third_column' => $this->request->getPost('suggestions_third_column'),
|
||||
'giftcard_number' => $this->request->getPost('giftcard_number'),
|
||||
'derive_sale_quantity' => $this->request->getPost('derive_sale_quantity', FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION) != NULL,
|
||||
'multi_pack_enabled' => $this->request->getPost('multi_pack_enabled') != NULL,
|
||||
'include_hsn' => $this->request->getPost('include_hsn') != NULL,
|
||||
@@ -452,8 +452,8 @@ class Config extends Secure_Controller
|
||||
*/
|
||||
public function postCheckNumberLocale(): void
|
||||
{
|
||||
$number_locale = $this->request->getPost('number_locale', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$save_number_locale = $this->request->getPost('save_number_locale', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$number_locale = $this->request->getPost('number_locale');
|
||||
$save_number_locale = $this->request->getPost('save_number_locale');
|
||||
|
||||
$fmt = new NumberFormatter($number_locale, NumberFormatter::CURRENCY);
|
||||
if($number_locale != $save_number_locale)
|
||||
@@ -464,8 +464,8 @@ class Config extends Secure_Controller
|
||||
}
|
||||
else
|
||||
{
|
||||
$currency_symbol = empty($this->request->getPost('currency_symbol')) ? $fmt->getSymbol(NumberFormatter::CURRENCY_SYMBOL) : $this->request->getPost('currency_symbol', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$currency_code = empty($this->request->getPost('currency_code')) ? $fmt->getTextAttribute(NumberFormatter::CURRENCY_CODE) : $this->request->getPost('currency_code', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$currency_symbol = empty($this->request->getPost('currency_symbol')) ? $fmt->getSymbol(NumberFormatter::CURRENCY_SYMBOL) : $this->request->getPost('currency_symbol');
|
||||
$currency_code = empty($this->request->getPost('currency_code')) ? $fmt->getTextAttribute(NumberFormatter::CURRENCY_CODE) : $this->request->getPost('currency_code');
|
||||
}
|
||||
|
||||
if($this->request->getPost('thousands_separator') == 'false')
|
||||
@@ -490,25 +490,25 @@ class Config extends Secure_Controller
|
||||
*/
|
||||
public function postSaveLocale(): void
|
||||
{
|
||||
$exploded = explode(":", $this->request->getPost('language', FILTER_SANITIZE_FULL_SPECIAL_CHARS));
|
||||
$exploded = explode(":", $this->request->getPost('language'));
|
||||
$batch_save_data = [
|
||||
'currency_symbol' => $this->request->getPost('currency_symbol', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'currency_code' => $this->request->getPost('currency_code', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'currency_symbol' => $this->request->getPost('currency_symbol'),
|
||||
'currency_code' => $this->request->getPost('currency_code'),
|
||||
'language_code' => $exploded[0],
|
||||
'language' => $exploded[1],
|
||||
'timezone' => $this->request->getPost('timezone', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'dateformat' => $this->request->getPost('dateformat', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'timeformat' => $this->request->getPost('timeformat', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'timezone' => $this->request->getPost('timezone'),
|
||||
'dateformat' => $this->request->getPost('dateformat'),
|
||||
'timeformat' => $this->request->getPost('timeformat'),
|
||||
'thousands_separator' => !empty($this->request->getPost('thousands_separator', FILTER_SANITIZE_NUMBER_INT)),
|
||||
'number_locale' => $this->request->getPost('number_locale', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'number_locale' => $this->request->getPost('number_locale'),
|
||||
'currency_decimals' => $this->request->getPost('currency_decimals', FILTER_SANITIZE_NUMBER_INT),
|
||||
'tax_decimals' => $this->request->getPost('tax_decimals', FILTER_SANITIZE_NUMBER_INT),
|
||||
'quantity_decimals' => $this->request->getPost('quantity_decimals', FILTER_SANITIZE_NUMBER_INT),
|
||||
'country_codes' => $this->request->getPost('country_codes', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'payment_options_order' => $this->request->getPost('payment_options_order', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'country_codes' => $this->request->getPost('country_codes'),
|
||||
'payment_options_order' => $this->request->getPost('payment_options_order'),
|
||||
'date_or_time_format' => $this->request->getPost('date_or_time_format', FILTER_SANITIZE_NUMBER_INT),
|
||||
'cash_decimals' => $this->request->getPost('cash_decimals', FILTER_SANITIZE_NUMBER_INT),
|
||||
'cash_rounding_code' => $this->request->getPost('cash_rounding_code', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'cash_rounding_code' => $this->request->getPost('cash_rounding_code'),
|
||||
'financial_year' => $this->request->getPost('financial_year', FILTER_SANITIZE_NUMBER_INT)
|
||||
];
|
||||
|
||||
@@ -534,14 +534,14 @@ class Config extends Secure_Controller
|
||||
}
|
||||
|
||||
$batch_save_data = [
|
||||
'protocol' => $this->request->getPost('protocol', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'mailpath' => $this->request->getPost('mailpath', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'smtp_host' => $this->request->getPost('smtp_host', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'smtp_user' => $this->request->getPost('smtp_user', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'protocol' => $this->request->getPost('protocol'),
|
||||
'mailpath' => $this->request->getPost('mailpath'),
|
||||
'smtp_host' => $this->request->getPost('smtp_host'),
|
||||
'smtp_user' => $this->request->getPost('smtp_user'),
|
||||
'smtp_pass' => $password,
|
||||
'smtp_port' => $this->request->getPost('smtp_port', FILTER_SANITIZE_NUMBER_INT),
|
||||
'smtp_timeout' => $this->request->getPost('smtp_timeout', FILTER_SANITIZE_NUMBER_INT),
|
||||
'smtp_crypto' => $this->request->getPost('smtp_crypto', FILTER_SANITIZE_FULL_SPECIAL_CHARS)
|
||||
'smtp_crypto' => $this->request->getPost('smtp_crypto')
|
||||
];
|
||||
|
||||
$success = $this->appconfig->batch_save($batch_save_data);
|
||||
@@ -562,10 +562,10 @@ class Config extends Secure_Controller
|
||||
}
|
||||
|
||||
$batch_save_data = [
|
||||
'msg_msg' => $this->request->getPost('msg_msg', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'msg_uid' => $this->request->getPost('msg_uid', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'msg_msg' => $this->request->getPost('msg_msg'),
|
||||
'msg_uid' => $this->request->getPost('msg_uid'),
|
||||
'msg_pwd' => $password,
|
||||
'msg_src' => $this->request->getPost('msg_src', FILTER_SANITIZE_FULL_SPECIAL_CHARS)
|
||||
'msg_src' => $this->request->getPost('msg_src')
|
||||
];
|
||||
|
||||
$success = $this->appconfig->batch_save($batch_save_data);
|
||||
@@ -602,10 +602,10 @@ class Config extends Secure_Controller
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function ajax_check_mailchimp_api_key(): void
|
||||
public function postCheckMailchimpApiKey(): void
|
||||
{
|
||||
// load mailchimp lists associated to the given api key, already XSS cleaned in the private function
|
||||
$lists = $this->_mailchimp($this->request->getPost('mailchimp_api_key', FILTER_SANITIZE_FULL_SPECIAL_CHARS));
|
||||
$lists = $this->_mailchimp($this->request->getPost('mailchimp_api_key'));
|
||||
$success = count($lists) > 0;
|
||||
|
||||
echo json_encode ([
|
||||
@@ -625,18 +625,18 @@ class Config extends Secure_Controller
|
||||
|
||||
if(check_encryption()) //TODO: Hungarian notation
|
||||
{
|
||||
$api_key_unencrypted = $this->request->getPost('mailchimp_api_key', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$api_key_unencrypted = $this->request->getPost('mailchimp_api_key');
|
||||
if(!empty($api_key_unencrypted))
|
||||
{
|
||||
$api_key = $this->encrypter->encrypt($api_key_unencrypted);
|
||||
$api_key_unencrypted = "";
|
||||
$api_key_unencrypted = '';
|
||||
}
|
||||
|
||||
$list_id_unencrypted = $this->request->getPost('mailchimp_list_id', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$list_id_unencrypted = $this->request->getPost('mailchimp_list_id');
|
||||
if(!empty($list_id_unencrypted))
|
||||
{
|
||||
$list_id = $this->encrypter->encrypt($list_id_unencrypted);
|
||||
$list_id_unencrypted = "";
|
||||
$list_id_unencrypted = '';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -691,7 +691,7 @@ class Config extends Secure_Controller
|
||||
$this->db->transStart();
|
||||
|
||||
$not_to_delete = [];
|
||||
foreach($this->request->getPost(NULL, FILTER_SANITIZE_FULL_SPECIAL_CHARS) as $key => $value)
|
||||
foreach($this->request->getPost(NULL) as $key => $value)
|
||||
{
|
||||
if(strstr($key, 'stock_location'))
|
||||
{
|
||||
@@ -741,7 +741,7 @@ class Config extends Secure_Controller
|
||||
if($dinner_table_enable)
|
||||
{
|
||||
$not_to_delete = [];
|
||||
foreach($this->request->getPost(NULL, FILTER_SANITIZE_FULL_SPECIAL_CHARS) as $key => $value) //TODO: Not sure if this is the best way to filter the array
|
||||
foreach($this->request->getPost(NULL) as $key => $value) //TODO: Not sure if this is the best way to filter the array
|
||||
{
|
||||
if(strstr($key, 'dinner_table') && $key != 'dinner_table_enable')
|
||||
{
|
||||
@@ -785,14 +785,14 @@ class Config extends Secure_Controller
|
||||
|
||||
$batch_save_data = [
|
||||
'default_tax_1_rate' => parse_tax($this->request->getPost('default_tax_1_rate', FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION)),
|
||||
'default_tax_1_name' => $this->request->getPost('default_tax_1_name', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'default_tax_1_name' => $this->request->getPost('default_tax_1_name'),
|
||||
'default_tax_2_rate' => parse_tax($this->request->getPost('default_tax_2_rate', FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION)),
|
||||
'default_tax_2_name' => $this->request->getPost('default_tax_2_name', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'default_tax_2_name' => $this->request->getPost('default_tax_2_name'),
|
||||
'tax_included' => $this->request->getPost('tax_included') != NULL,
|
||||
'use_destination_based_tax' => $this->request->getPost('use_destination_based_tax') != NULL,
|
||||
'default_tax_code' => $this->request->getPost('default_tax_code', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'default_tax_category' => $this->request->getPost('default_tax_category', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'default_tax_jurisdiction' => $this->request->getPost('default_tax_jurisdiction', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'default_tax_code' => $this->request->getPost('default_tax_code'),
|
||||
'default_tax_category' => $this->request->getPost('default_tax_category'),
|
||||
'default_tax_jurisdiction' => $this->request->getPost('default_tax_jurisdiction'),
|
||||
'tax_id' => $this->request->getPost('tax_id', FILTER_SANITIZE_NUMBER_INT)
|
||||
];
|
||||
|
||||
@@ -822,7 +822,7 @@ class Config extends Secure_Controller
|
||||
{
|
||||
$not_to_delete = [];
|
||||
$array_save = [];
|
||||
foreach($this->request->getPost(NULL, FILTER_SANITIZE_FULL_SPECIAL_CHARS) as $key => $value)
|
||||
foreach($this->request->getPost(NULL) as $key => $value)
|
||||
{
|
||||
if(strstr($key, 'customer_reward') && $key != 'customer_reward_enable')
|
||||
{
|
||||
@@ -872,21 +872,21 @@ class Config extends Secure_Controller
|
||||
public function postSaveBarcode(): void
|
||||
{
|
||||
$batch_save_data = [
|
||||
'barcode_type' => $this->request->getPost('barcode_type', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'barcode_type' => $this->request->getPost('barcode_type'),
|
||||
'barcode_width' => $this->request->getPost('barcode_width', FILTER_SANITIZE_NUMBER_INT),
|
||||
'barcode_height' => $this->request->getPost('barcode_height', FILTER_SANITIZE_NUMBER_INT),
|
||||
'barcode_font' => $this->request->getPost('barcode_font', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'barcode_font' => $this->request->getPost('barcode_font'),
|
||||
'barcode_font_size' => $this->request->getPost('barcode_font_size', FILTER_SANITIZE_NUMBER_INT),
|
||||
'barcode_first_row' => $this->request->getPost('barcode_first_row', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'barcode_second_row' => $this->request->getPost('barcode_second_row', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'barcode_third_row' => $this->request->getPost('barcode_third_row', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'barcode_first_row' => $this->request->getPost('barcode_first_row'),
|
||||
'barcode_second_row' => $this->request->getPost('barcode_second_row'),
|
||||
'barcode_third_row' => $this->request->getPost('barcode_third_row'),
|
||||
'barcode_num_in_row' => $this->request->getPost('barcode_num_in_row', FILTER_SANITIZE_NUMBER_INT),
|
||||
'barcode_page_width' => $this->request->getPost('barcode_page_width', FILTER_SANITIZE_NUMBER_INT),
|
||||
'barcode_page_cellspacing' => $this->request->getPost('barcode_page_cellspacing', FILTER_SANITIZE_NUMBER_INT),
|
||||
'barcode_generate_if_empty' => $this->request->getPost('barcode_generate_if_empty') != NULL,
|
||||
'allow_duplicate_barcodes' => $this->request->getPost('allow_duplicate_barcodes') != NULL,
|
||||
'barcode_content' => $this->request->getPost('barcode_content', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'barcode_formats' => json_encode($this->request->getPost('barcode_formats', FILTER_SANITIZE_FULL_SPECIAL_CHARS))
|
||||
'barcode_content' => $this->request->getPost('barcode_content'),
|
||||
'barcode_formats' => json_encode($this->request->getPost('barcode_formats'))
|
||||
];
|
||||
|
||||
$success = $this->appconfig->batch_save($batch_save_data);
|
||||
@@ -900,11 +900,11 @@ class Config extends Secure_Controller
|
||||
public function postSaveReceipt(): void
|
||||
{
|
||||
$batch_save_data = [
|
||||
'receipt_template' => $this->request->getPost('receipt_template', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'receipt_template' => $this->request->getPost('receipt_template'),
|
||||
'receipt_font_size' => $this->request->getPost('receipt_font_size', FILTER_SANITIZE_NUMBER_INT),
|
||||
'print_delay_autoreturn' => $this->request->getPost('print_delay_autoreturn', FILTER_SANITIZE_NUMBER_INT),
|
||||
'email_receipt_check_behaviour' => $this->request->getPost('email_receipt_check_behaviour', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'print_receipt_check_behaviour' => $this->request->getPost('print_receipt_check_behaviour', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'email_receipt_check_behaviour' => $this->request->getPost('email_receipt_check_behaviour'),
|
||||
'print_receipt_check_behaviour' => $this->request->getPost('print_receipt_check_behaviour'),
|
||||
'receipt_show_company_name' => $this->request->getPost('receipt_show_company_name') != NULL,
|
||||
'receipt_show_taxes' => ($this->request->getPost('receipt_show_taxes') != NULL),
|
||||
'receipt_show_tax_ind' => ($this->request->getPost('receipt_show_tax_ind') != NULL),
|
||||
@@ -932,19 +932,19 @@ class Config extends Secure_Controller
|
||||
{
|
||||
$batch_save_data = [
|
||||
'invoice_enable' => $this->request->getPost('invoice_enable') != NULL,
|
||||
'sales_invoice_format' => $this->request->getPost('sales_invoice_format', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'sales_quote_format' => $this->request->getPost('sales_quote_format', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'recv_invoice_format' => $this->request->getPost('recv_invoice_format', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'invoice_default_comments' => $this->request->getPost('invoice_default_comments', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'invoice_email_message' => $this->request->getPost('invoice_email_message', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'line_sequence' => $this->request->getPost('line_sequence', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'sales_invoice_format' => $this->request->getPost('sales_invoice_format'),
|
||||
'sales_quote_format' => $this->request->getPost('sales_quote_format'),
|
||||
'recv_invoice_format' => $this->request->getPost('recv_invoice_format'),
|
||||
'invoice_default_comments' => $this->request->getPost('invoice_default_comments'),
|
||||
'invoice_email_message' => $this->request->getPost('invoice_email_message'),
|
||||
'line_sequence' => $this->request->getPost('line_sequence'),
|
||||
'last_used_invoice_number' => $this->request->getPost('last_used_invoice_number', FILTER_SANITIZE_NUMBER_INT),
|
||||
'last_used_quote_number' => $this->request->getPost('last_used_quote_number', FILTER_SANITIZE_NUMBER_INT),
|
||||
'quote_default_comments' => $this->request->getPost('quote_default_comments', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'quote_default_comments' => $this->request->getPost('quote_default_comments'),
|
||||
'work_order_enable' => $this->request->getPost('work_order_enable') != NULL,
|
||||
'work_order_format' => $this->request->getPost('work_order_format', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'work_order_format' => $this->request->getPost('work_order_format'),
|
||||
'last_used_work_order_number' => $this->request->getPost('last_used_work_order_number', FILTER_SANITIZE_NUMBER_INT),
|
||||
'invoice_type' => $this->request->getPost('invoice_type', FILTER_SANITIZE_FULL_SPECIAL_CHARS)
|
||||
'invoice_type' => $this->request->getPost('invoice_type')
|
||||
];
|
||||
|
||||
$success = $this->appconfig->batch_save($batch_save_data);
|
||||
|
||||
@@ -50,7 +50,7 @@ class Customers extends Persons
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->_list_id = "";
|
||||
$this->_list_id = '';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -97,7 +97,15 @@ class Cashup extends Model
|
||||
$builder->select('COUNT(cash_up.cashup_id) as count');
|
||||
}
|
||||
|
||||
$builder->select('
|
||||
if(!$count_only)
|
||||
{
|
||||
$builder->select('
|
||||
cash_up.cashup_id,
|
||||
');
|
||||
}
|
||||
else
|
||||
{
|
||||
$builder->select('
|
||||
cash_up.cashup_id,
|
||||
MAX(cash_up.open_date) AS open_date,
|
||||
MAX(cash_up.close_date) AS close_date,
|
||||
@@ -117,6 +125,7 @@ class Cashup extends Model
|
||||
MAX(close_employees.first_name) AS close_first_name,
|
||||
MAX(close_employees.last_name) AS close_last_name
|
||||
');
|
||||
}
|
||||
|
||||
$builder->join('people AS open_employees', 'open_employees.person_id = cash_up.open_employee_id', 'LEFT');
|
||||
$builder->join('people AS close_employees', 'close_employees.person_id = cash_up.close_employee_id', 'LEFT');
|
||||
|
||||
@@ -12,7 +12,12 @@
|
||||
<div class="form-group form-group-sm">
|
||||
<?php echo form_label(lang('Config.barcode_type'), 'barcode_type', ['class' => 'control-label col-xs-2']) ?>
|
||||
<div class='col-xs-2'>
|
||||
<?php echo form_dropdown('barcode_type', esc($support_barcode), esc($config['barcode_type']), ['class' => 'form-control input-sm']) ?>
|
||||
<?php echo form_dropdown([
|
||||
'name' => 'barcode_type',
|
||||
'options' => $support_barcode,
|
||||
'selected' => $config['barcode_type'],
|
||||
'extra' => "class='form-control input-sm'"
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -50,12 +55,12 @@
|
||||
<div class="form-group form-group-sm">
|
||||
<?php echo form_label(lang('Config.barcode_font'), 'barcode_font', ['class' => 'control-label col-xs-2 required']) ?>
|
||||
<div class='col-sm-2'>
|
||||
<?php echo form_dropdown(
|
||||
'barcode_font',
|
||||
esc($barcode_fonts),
|
||||
esc($config['barcode_font']),
|
||||
['class' => 'form-control input-sm required']
|
||||
) ?>
|
||||
<?php echo form_dropdown([
|
||||
'name' => 'barcode_font',
|
||||
'options' => $barcode_fonts,
|
||||
'selected' => $config['barcode_font'],
|
||||
'extra' => "class='form-control input-sm' required"
|
||||
]) ?>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<?php echo form_input ([
|
||||
@@ -126,7 +131,7 @@
|
||||
echo form_dropdown ([
|
||||
'name' => 'barcode_formats[]',
|
||||
'id' => 'barcode_formats',
|
||||
'options' => !empty($barcode_formats) ? esc(array_combine($barcode_formats, $barcode_formats)) : [],
|
||||
'options' => !empty($barcode_formats) ? array_combine($barcode_formats, $barcode_formats) : [],
|
||||
'multiple' => 'multiple',
|
||||
'data-role' => 'tagsinput']) ?>
|
||||
</div>
|
||||
|
||||
@@ -7,15 +7,16 @@
|
||||
<div class="form-group form-group-sm">
|
||||
<?php echo form_label(lang('Config.email_protocol'), 'protocol', ['class' => 'control-label col-xs-2']) ?>
|
||||
<div class='col-xs-2'>
|
||||
<?php echo form_dropdown(
|
||||
'protocol', [
|
||||
<?php echo form_dropdown([
|
||||
'name' => 'protocol',
|
||||
'options' => [
|
||||
'mail' => 'mail',
|
||||
'sendmail' => 'sendmail',
|
||||
'smtp' => 'smtp'
|
||||
],
|
||||
esc($config['protocol']),
|
||||
['class' => 'form-control input-sm', 'id' => 'protocol'])
|
||||
?>
|
||||
'selected' => $config['protocol'],
|
||||
'extra' => "class='form-control input-sm' id='protocol'"
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -26,7 +27,7 @@
|
||||
'name' => 'mailpath',
|
||||
'id' => 'mailpath',
|
||||
'class' => 'form-control input-sm',
|
||||
'value' => esc($config['mailpath'])
|
||||
'value' => $config['mailpath']
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -38,7 +39,7 @@
|
||||
'name' => 'smtp_host',
|
||||
'id' => 'smtp_host',
|
||||
'class' => 'form-control input-sm',
|
||||
'value' => esc($config['smtp_host'])
|
||||
'value' => $config['smtp_host']
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -58,14 +59,16 @@
|
||||
<div class="form-group form-group-sm">
|
||||
<?php echo form_label(lang('Config.email_smtp_crypto'), 'smtp_crypto', ['class' => 'control-label col-xs-2']) ?>
|
||||
<div class='col-xs-2'>
|
||||
<?php echo form_dropdown('smtp_crypto', [
|
||||
<?php echo form_dropdown([
|
||||
'name' => 'smtp_crypto',
|
||||
'options' => [
|
||||
'' => 'None',
|
||||
'tls' => 'TLS',
|
||||
'ssl' => 'SSL'
|
||||
],
|
||||
esc($config['smtp_crypto']),
|
||||
['class' => 'form-control input-sm', 'id' => 'smtp_crypto'])
|
||||
?>
|
||||
'selected' => $config['smtp_crypto'],
|
||||
'extra' => "class='form-control input-sm' id='smtp_crypto'"
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -90,7 +93,7 @@
|
||||
'name' => 'smtp_user',
|
||||
'id' => 'smtp_user',
|
||||
'class' => 'form-control input-sm',
|
||||
'value' => esc($config['smtp_user'])
|
||||
'value' => $config['smtp_user']
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -105,7 +108,7 @@
|
||||
'name' => 'smtp_pass',
|
||||
'id' => 'smtp_pass',
|
||||
'class' => 'form-control input-sm',
|
||||
'value' => esc($config['smtp_pass'])
|
||||
'value' => $config['smtp_pass']
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -18,7 +18,12 @@
|
||||
<div class='col-sm-10'>
|
||||
<div class="form-group form-group-sm row">
|
||||
<div class='col-sm-3'>
|
||||
<?php echo form_dropdown('theme', $themes, esc($config['theme']), ['class' => 'form-control input-sm', 'id' => 'theme-change']) ?>
|
||||
<?php echo form_dropdown([
|
||||
'name' => 'theme',
|
||||
'options' => $themes,
|
||||
'selected' => $config['theme'],
|
||||
'extra' => "class='form-control input-sm' id='theme-change'"
|
||||
]) ?>
|
||||
</div>
|
||||
<div class="col-sm-7">
|
||||
<a href="<?php echo 'https://bootswatch.com/3/' . ('bootstrap' == ($config['theme']) ? 'default' : esc($config['theme'])) ?>" target="_blank" rel=”noopener”>
|
||||
@@ -32,15 +37,15 @@
|
||||
<div class="form-group form-group-sm">
|
||||
<?php echo form_label(lang('Config.login_form'), 'login_form', ['class' => 'control-label col-xs-2']) ?>
|
||||
<div class='col-xs-2'>
|
||||
<?php echo form_dropdown(
|
||||
'login_form',
|
||||
[
|
||||
'floating_labels' => lang('Config.floating_labels'),
|
||||
'input_groups' => lang('Config.input_groups')
|
||||
],
|
||||
esc($config['login_form']),
|
||||
['class' => 'form-control input-sm']
|
||||
) ?>
|
||||
<?php echo form_dropdown([
|
||||
'name' => 'login_form',
|
||||
'options' => [
|
||||
'floating_labels' => lang('Config.floating_labels'),
|
||||
'input_groups' => lang('Config.input_groups')
|
||||
],
|
||||
'selected' => $config['login_form'],
|
||||
'extra' => "class='form-control input-sm'"
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -152,27 +157,27 @@
|
||||
<div class="col-sm-10">
|
||||
<div class="form-group form-group-sm row">
|
||||
<div class='col-sm-2'>
|
||||
<?php echo form_dropdown(
|
||||
'notify_vertical_position',
|
||||
[
|
||||
<?php echo form_dropdown([
|
||||
'name' => 'notify_vertical_position',
|
||||
'options' => [
|
||||
'top' => lang('Config.top'),
|
||||
'bottom' => lang('Config.bottom')
|
||||
],
|
||||
esc($config['notify_vertical_position']),
|
||||
['class' => 'form-control input-sm']
|
||||
) ?>
|
||||
'selected' => $config['notify_vertical_position'],
|
||||
'extra' => "class='form-control input-sm'"
|
||||
]) ?>
|
||||
</div>
|
||||
<div class='col-sm-2'>
|
||||
<?php echo form_dropdown(
|
||||
'notify_horizontal_position',
|
||||
[
|
||||
<?php echo form_dropdown([
|
||||
'name' => 'notify_horizontal_position',
|
||||
'options' => [
|
||||
'left' => lang('Config.left'),
|
||||
'center' => lang('Config.center'),
|
||||
'right' => lang('Config.right')
|
||||
],
|
||||
esc($config['notify_horizontal_position']),
|
||||
['class' => 'form-control input-sm']
|
||||
) ?>
|
||||
'selected' => $config['notify_horizontal_position'],
|
||||
'extra' => "class='form-control input-sm'"
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -236,13 +241,16 @@
|
||||
<div class='col-sm-4'>
|
||||
<div class='input-group'>
|
||||
<span class="input-group-addon input-sm"><?php echo lang('Config.image_allowed_file_types') ?></span>
|
||||
<?php echo form_multiselect('image_allowed_types[]', esc($image_allowed_types), esc($selected_image_allowed_types), [
|
||||
'id' => 'image_allowed_types',
|
||||
'class' => 'selectpicker show-menu-arrow',
|
||||
'data-none-selected-text'=>lang('Common.none_selected_text'),
|
||||
'data-selected-text-format' => 'count > 1',
|
||||
'data-style' => 'btn-default btn-sm',
|
||||
'data-width' => '100%'
|
||||
<?php echo form_multiselect([
|
||||
'name' => 'image_allowed_types',
|
||||
'options' => $image_allowed_types,
|
||||
'selected' => $selected_image_allowed_types,
|
||||
'extra' => "id='image_allowed_types'".
|
||||
"class='selectpicker show-menu-arrow'".
|
||||
"data-none-selected-text=".lang('Common.none_selected_text').
|
||||
"data-selected-text-format='count > 1'".
|
||||
"data-style='btn-default btn-sm'".
|
||||
"data-width='100%'"
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -274,7 +282,7 @@
|
||||
'name' => 'gcaptcha_site_key',
|
||||
'id' => 'gcaptcha_site_key',
|
||||
'class' => 'form-control input-sm required',
|
||||
'value' => esc($config['gcaptcha_site_key'])
|
||||
'value' => $config['gcaptcha_site_key']
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -286,7 +294,7 @@
|
||||
'name' => 'gcaptcha_secret_key',
|
||||
'id' => 'gcaptcha_secret_key',
|
||||
'class' => 'form-control input-sm required',
|
||||
'value' => esc($config['gcaptcha_secret_key'])
|
||||
'value' => $config['gcaptcha_secret_key']
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -298,51 +306,51 @@
|
||||
<div class='col-sm-3'>
|
||||
<div class='input-group'>
|
||||
<span class="input-group-addon input-sm"><?php echo lang('Config.suggestions_first_column') ?></span>
|
||||
<?php echo form_dropdown(
|
||||
'suggestions_first_column',
|
||||
[
|
||||
<?php echo form_dropdown([
|
||||
'name' => 'suggestions_first_column',
|
||||
'options' => [
|
||||
'name' => lang('Items.name'),
|
||||
'item_number' => lang('Items.number_information'),
|
||||
'unit_price' => lang('Items.unit_price'),
|
||||
'cost_price' => lang('Items.cost_price')
|
||||
],
|
||||
esc($config['suggestions_first_column']),
|
||||
['class' => 'form-control input-sm']
|
||||
) ?>
|
||||
'selected' => $config['suggestions_first_column'],
|
||||
'extra' => "class='form-control input-sm'"
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class='col-sm-3'>
|
||||
<div class='input-group'>
|
||||
<span class="input-group-addon input-sm"><?php echo lang('Config.suggestions_second_column') ?></span>
|
||||
<?php echo form_dropdown(
|
||||
'suggestions_second_column',
|
||||
[
|
||||
<?php echo form_dropdown([
|
||||
'name' => 'suggestions_second_column',
|
||||
'options' => [
|
||||
'' => lang('Config.none'),
|
||||
'name' => lang('Items.name'),
|
||||
'item_number' => lang('Items.number_information'),
|
||||
'unit_price' => lang('Items.unit_price'),
|
||||
'cost_price' => lang('Items.cost_price')
|
||||
],
|
||||
esc($config['suggestions_second_column']),
|
||||
['class' => 'form-control input-sm']
|
||||
) ?>
|
||||
'selected' => $config['suggestions_second_column'],
|
||||
'extra' => "class='form-control input-sm'"
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class='col-sm-3'>
|
||||
<div class='input-group'>
|
||||
<span class="input-group-addon input-sm"><?php echo lang('Config.suggestions_third_column') ?></span>
|
||||
<?php echo form_dropdown(
|
||||
'suggestions_third_column',
|
||||
[
|
||||
<?php echo form_dropdown([
|
||||
'name' => 'suggestions_third_column',
|
||||
'options' => [
|
||||
'' => lang('Config.none'),
|
||||
'name' => lang('Items.name'),
|
||||
'item_number' => lang('Items.number_information'),
|
||||
'unit_price' => lang('Items.unit_price'),
|
||||
'cost_price' => lang('Items.cost_price')
|
||||
],
|
||||
esc($config['suggestions_third_column']),
|
||||
['class' => 'form-control input-sm']
|
||||
) ?>
|
||||
'selected' => $config['suggestions_third_column'],
|
||||
'extra' => "class='form-control input-sm'"
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -473,12 +481,12 @@ $(document).ready(function()
|
||||
lines_per_page:
|
||||
{
|
||||
required: true,
|
||||
remote: "<?php echo esc("$controller_name/checkNumeric") ?>"
|
||||
remote: "<?= "$controller_name/checkNumeric" ?>"
|
||||
},
|
||||
default_sales_discount:
|
||||
{
|
||||
required: true,
|
||||
remote: "<?php echo esc("$controller_name/checkNumeric") ?>"
|
||||
remote: "<?= "$controller_name/checkNumeric" ?>"
|
||||
},
|
||||
gcaptcha_site_key:
|
||||
{
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
'name' => 'mailchimp_api_key',
|
||||
'id' => 'mailchimp_api_key',
|
||||
'class' => 'form-control input-sm',
|
||||
'value' => esc($mailchimp['api_key'])
|
||||
'value' => $mailchimp['api_key']
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -36,12 +36,12 @@
|
||||
<div class='col-xs-4'>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon input-sm"><span class="glyphicon glyphicon-user"></span></span>
|
||||
<?php echo form_dropdown(
|
||||
'mailchimp_list_id',
|
||||
esc($mailchimp['lists']),
|
||||
esc($mailchimp['list_id']),
|
||||
['id' => 'mailchimp_list_id', 'class' => 'form-control input-sm']
|
||||
) ?>
|
||||
<?php echo form_dropdown([
|
||||
'name' => 'mailchimp_list_id',
|
||||
'options' => $mailchimp['lists'],
|
||||
'selected' => $mailchimp['list_id'],
|
||||
'extra' => "id='mailchimp_list_id' class='form-control input-sm'"
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -61,7 +61,7 @@
|
||||
$(document).ready(function()
|
||||
{
|
||||
$('#mailchimp_api_key').change(function() {
|
||||
$.post("<?php echo esc("$controller_name/ajax_check_mailchimp_api_key") ?>", {
|
||||
$.post("<?= "$controller_name/checkMailchimpApiKey" ?>", {
|
||||
'mailchimp_api_key': $('#mailchimp_api_key').val()
|
||||
},
|
||||
function(response) {
|
||||
|
||||
@@ -25,7 +25,12 @@
|
||||
<div class="form-group form-group-sm">
|
||||
<?php echo form_label(lang('Config.invoice_type'), 'invoice_type', ['class' => 'control-label col-xs-2']) ?>
|
||||
<div class='col-xs-3'>
|
||||
<?php echo form_dropdown('invoice_type', esc($invoice_type_options), esc($config['invoice_type']), ['class' => 'form-control input-sm']) ?>
|
||||
<?php echo form_dropdown([
|
||||
'name' => 'invoice_type',
|
||||
'options' => $invoice_type_options,
|
||||
'selected' => $config['invoice_type'],
|
||||
'extra' => "class='form-control input-sm'"
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -36,7 +41,7 @@
|
||||
'name' => 'recv_invoice_format',
|
||||
'id' => 'recv_invoice_format',
|
||||
'class' => 'form-control input-sm',
|
||||
'value' => esc($config['recv_invoice_format'])
|
||||
'value' => $config['recv_invoice_format']
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -48,7 +53,7 @@
|
||||
'name' => 'invoice_default_comments',
|
||||
'id' => 'invoice_default_comments',
|
||||
'class' => 'form-control input-sm',
|
||||
'value' => esc($config['invoice_default_comments'])
|
||||
'value' => $config['invoice_default_comments']
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -60,7 +65,7 @@
|
||||
'name' => 'invoice_email_message',
|
||||
'id' => 'invoice_email_message',
|
||||
'class' => 'form-control input-sm',
|
||||
'value' => esc($config['invoice_email_message'])
|
||||
'value' => $config['invoice_email_message']
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -68,7 +73,12 @@
|
||||
<div class="form-group form-group-sm">
|
||||
<?php echo form_label(lang('Config.line_sequence'), 'line_sequence', ['class' => 'control-label col-xs-2']) ?>
|
||||
<div class='col-xs-2'>
|
||||
<?php echo form_dropdown('line_sequence', esc($line_sequence_options), esc($config['line_sequence']), ['class' => 'form-control input-sm']) ?>
|
||||
<?php echo form_dropdown([
|
||||
'name' => 'line_sequence',
|
||||
'options' => $line_sequence_options,
|
||||
'selected' => $config['line_sequence'],
|
||||
'extra' => "class='form-control input-sm'"
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -79,7 +89,7 @@
|
||||
'name' => 'sales_invoice_format',
|
||||
'id' => 'sales_invoice_format',
|
||||
'class' => 'form-control input-sm',
|
||||
'value' => esc($config['sales_invoice_format'])
|
||||
'value' => $config['sales_invoice_format']
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -104,7 +114,7 @@
|
||||
'name' => 'sales_quote_format',
|
||||
'id' => 'sales_quote_format',
|
||||
'class' => 'form-control input-sm',
|
||||
'value' => esc($config['sales_quote_format'])
|
||||
'value' => $config['sales_quote_format']
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -129,7 +139,7 @@
|
||||
'name' => 'quote_default_comments',
|
||||
'id' => 'quote_default_comments',
|
||||
'class' => 'form-control input-sm',
|
||||
'value' => esc($config['quote_default_comments'])
|
||||
'value' => $config['quote_default_comments']
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -153,7 +163,7 @@
|
||||
'name' => 'work_order_format',
|
||||
'id' => 'work_order_format',
|
||||
'class' => 'form-control input-sm',
|
||||
'value' => esc($config['work_order_format'])
|
||||
'value' => $config['work_order_format']
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -12,14 +12,14 @@
|
||||
{
|
||||
?>
|
||||
<div class="form-group form-group-sm">
|
||||
<?php echo form_label(esc($license['title']), 'license', ['class' => 'control-label col-xs-3']) ?>
|
||||
<?php echo form_label($license['title'], 'license', ['class' => 'control-label col-xs-3']) ?>
|
||||
<div class='col-xs-6'>
|
||||
<?php echo form_textarea ([
|
||||
'name' => 'license',
|
||||
'id' => 'license_' . $counter++, //TODO: String Interpolation
|
||||
'class' => 'form-control',
|
||||
'readonly' => '',
|
||||
'value' => esc($license['text'])
|
||||
'value' => $license['text']
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -16,8 +16,15 @@
|
||||
<?php echo form_label(lang('Config.number_locale'), 'number_locale', ['class' => 'control-label col-xs-2']) ?>
|
||||
<div class='row'>
|
||||
<div class='col-xs-1'>
|
||||
<?php echo form_input('number_locale', esc($config['number_locale']), ['class' => 'form-control input-sm', 'id' => 'number_locale']) ?>
|
||||
<?php echo form_hidden('save_number_locale', esc($config['number_locale'])) ?>
|
||||
<?php echo form_input([
|
||||
'name' => 'number_locale',
|
||||
'value' => $config['number_locale'],
|
||||
'extra' => "class='form-control input-sm' id='number_locale'"
|
||||
]) ?>
|
||||
<?php echo form_hidden([
|
||||
'name' => 'save_number_locale',
|
||||
'value' => $config['number_locale']
|
||||
]) ?>
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
<label class="control-label">
|
||||
@@ -51,7 +58,7 @@
|
||||
'name' => 'currency_symbol',
|
||||
'id' => 'currency_symbol',
|
||||
'class' => 'form-control input-sm number_locale',
|
||||
'value' => esc($config['currency_symbol'])
|
||||
'value' => $config['currency_symbol']
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -63,7 +70,7 @@
|
||||
'name' => 'currency_code',
|
||||
'id' => 'currency_code',
|
||||
'class' => 'form-control input-sm number_locale',
|
||||
'value' => esc($currency_code)
|
||||
'value' => $currency_code
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -144,32 +151,37 @@
|
||||
<div class="form-group form-group-sm">
|
||||
<?php echo form_label(lang('Config.cash_rounding'), 'cash_rounding_code', ['class' => 'control-label col-xs-2']) ?>
|
||||
<div class='col-xs-2'>
|
||||
<?php echo form_dropdown('cash_rounding_code', esc($rounding_options), $config['cash_rounding_code'], ['class' => 'form-control input-sm']) ?>
|
||||
<?php echo form_dropdown([
|
||||
'name' => 'cash_rounding_code',
|
||||
'options' => $rounding_options,
|
||||
'selected' => $config['cash_rounding_code'],
|
||||
'extra' => "class='form-control input-sm'"
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-group-sm">
|
||||
<?php echo form_label(lang('Config.payment_options_order'), 'payment_options_order', ['class' => 'control-label col-xs-2']) ?>
|
||||
<div class='col-xs-4'>
|
||||
<?php echo form_dropdown(
|
||||
'payment_options_order',
|
||||
[
|
||||
<?php echo form_dropdown([
|
||||
'name' => 'payment_options_order',
|
||||
'options' => [
|
||||
'cashdebitcredit' => lang('Sales.cash') . ' / ' . lang('Sales.debit') . ' / ' . lang('Sales.credit'),
|
||||
'debitcreditcash' => lang('Sales.debit') . ' / ' . lang('Sales.credit') . ' / ' . lang('Sales.cash'),
|
||||
'debitcashcredit' => lang('Sales.debit') . ' / ' . lang('Sales.cash') . ' / ' . lang('Sales.credit'),
|
||||
'creditdebitcash' => lang('Sales.credit') . ' / ' . lang('Sales.debit') . ' / ' . lang('Sales.cash'),
|
||||
'creditcashdebit' => lang('Sales.credit') . ' / ' . lang('Sales.cash') . ' / ' . lang('Sales.debit')
|
||||
],
|
||||
esc($config['payment_options_order']),
|
||||
['class' => 'form-control input-sm']
|
||||
) ?>
|
||||
'selected' => $config['payment_options_order'],
|
||||
'extra' => "class='form-control input-sm'"
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-group-sm">
|
||||
<?php echo form_label(lang('Config.country_codes'), 'country_codes', ['class' => 'control-label col-xs-2']) ?>
|
||||
<div class='col-xs-1'>
|
||||
<?php echo form_input('country_codes', esc($config['country_codes']), ['class' => 'form-control input-sm']) ?>
|
||||
<?php echo form_input('country_codes', $config['country_codes'], ['class' => 'form-control input-sm']) ?>
|
||||
</div>
|
||||
<div class="col-xs-1">
|
||||
<label class="control-label">
|
||||
@@ -194,22 +206,24 @@
|
||||
<div class="form-group form-group-sm">
|
||||
<?php echo form_label(lang('Config.timezone'), 'timezone', ['class' => 'control-label col-xs-2']) ?>
|
||||
<div class='col-xs-4'>
|
||||
<?php echo form_dropdown(
|
||||
'timezone',
|
||||
get_timezones(),
|
||||
$config['timezone'] ? esc($config['timezone']) : date_default_timezone_get(), ['class' => 'form-control input-sm']) ?>
|
||||
<?php echo form_dropdown([
|
||||
'name' => 'timezone',
|
||||
'options' => get_timezones(),
|
||||
'selected' => $config['timezone'] ? $config['timezone'] : date_default_timezone_get(),
|
||||
'extra' => "class='form-control input-sm'"
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-group-sm">
|
||||
<?php echo form_label(lang('Config.datetimeformat'), 'datetimeformat', ['class' => 'control-label col-xs-2']) ?>
|
||||
<div class='col-sm-2'>
|
||||
<?php echo form_dropdown(
|
||||
'dateformat',
|
||||
get_dateformats(),
|
||||
esc($config['dateformat']),
|
||||
['class' => 'form-control input-sm']
|
||||
) ?>
|
||||
<?php echo form_dropdown([
|
||||
'name' => 'dateformat',
|
||||
'options' => get_dateformats(),
|
||||
'selected' => $config['dateformat'],
|
||||
'extra' => "class='form-control input-sm'"
|
||||
]) ?>
|
||||
</div>
|
||||
<div class='col-sm-2'>
|
||||
<?php echo form_dropdown('timeformat',
|
||||
@@ -276,7 +290,7 @@ $(document).ready(function()
|
||||
data['currency_symbol'] = $('#currency_symbol').val();
|
||||
data['currency_code'] = $('#currency_code').val();
|
||||
data['thousands_separator'] = $('#thousands_separator').is(":checked")
|
||||
$.post("<?php echo esc("$controller_name /checkNumberLocale") ?>",
|
||||
$.post("<?= "$controller_name /checkNumberLocale" ?>",
|
||||
data,
|
||||
function(response) {
|
||||
$("input[name='save_number_locale']").val(response.save_number_locale);
|
||||
@@ -296,7 +310,7 @@ $(document).ready(function()
|
||||
required: true,
|
||||
remote:
|
||||
{
|
||||
url: "<?php echo esc("$controller_name/checkNumberLocale") ?>",
|
||||
url: "<?= "$controller_name/checkNumberLocale" ?>",
|
||||
type: 'POST',
|
||||
data: {
|
||||
'number_locale': function() { return $('#number_locale').val(); },
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
'name' => 'msg_uid',
|
||||
'id' => 'msg_uid',
|
||||
'class' => 'form-control input-sm required',
|
||||
'value' => esc($config['msg_uid'])
|
||||
'value' => $config['msg_uid']
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -28,7 +28,7 @@
|
||||
'name' => 'msg_pwd',
|
||||
'id' => 'msg_pwd',
|
||||
'class' => 'form-control input-sm required',
|
||||
'value' => esc($config['msg_pwd'])
|
||||
'value' => $config['msg_pwd']
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -43,7 +43,7 @@
|
||||
'name' => 'msg_src',
|
||||
'id' => 'msg_src',
|
||||
'class' => 'form-control input-sm required',
|
||||
'value' => $config['msg_src'] == NULL ? esc($config['company']) : esc($config['msg_src'])
|
||||
'value' => $config['msg_src'] == NULL ? $config['company'] : $config['msg_src']
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -7,14 +7,15 @@
|
||||
<div class="form-group form-group-sm">
|
||||
<?php echo form_label(lang('Config.receipt_template'), 'receipt_template', ['class' => 'control-label col-xs-2']) ?>
|
||||
<div class='col-xs-2'>
|
||||
<?php echo form_dropdown(
|
||||
'receipt_template', [
|
||||
<?php echo form_dropdown([
|
||||
'name' => 'receipt_template',
|
||||
'options' => [
|
||||
'receipt_default' => lang('Config.receipt_default'),
|
||||
'receipt_short' => lang('Config.receipt_short')
|
||||
],
|
||||
esc($config['receipt_template']),
|
||||
['class' => 'form-control input-sm']
|
||||
) ?>
|
||||
'selected' => $config['receipt_template'],
|
||||
'extra' => "class='form-control input-sm'"
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ $(document).ready(function()
|
||||
},
|
||||
success: function(response) {
|
||||
$.notify({ message: response.message }, { type: response.success ? 'success' : 'danger'});
|
||||
$("#dinner_tables").load('<?php echo esc("config/dinnerTables") ?>', init_add_remove_tables);
|
||||
$("#dinner_tables").load('<?= "config/dinnerTables" ?>', init_add_remove_tables);
|
||||
},
|
||||
dataType: 'json'
|
||||
});
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
'name' => 'tax_id',
|
||||
'id' => 'tax_id',
|
||||
'class' => 'form-control input-sm',
|
||||
'value' => esc($config['tax_id'])
|
||||
'value' => $config['tax_id']
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -43,7 +43,7 @@
|
||||
'name' => 'default_tax_1_name',
|
||||
'id' => 'default_tax_1_name',
|
||||
'class' => 'form-control input-sm',
|
||||
'value' => $config['default_tax_1_name'] !== FALSE ? esc($config['default_tax_1_name']) : lang('Items.sales_tax_1')]) ?>
|
||||
'value' => $config['default_tax_1_name'] !== FALSE ? $config['default_tax_1_name'] : lang('Items.sales_tax_1')]) ?>
|
||||
</div>
|
||||
<div class="col-xs-1 input-group">
|
||||
<?php echo form_input ([
|
||||
@@ -63,7 +63,7 @@
|
||||
'name' => 'default_tax_2_name',
|
||||
'id' => 'default_tax_2_name',
|
||||
'class' => 'form-control input-sm',
|
||||
'value' => $config['default_tax_2_name'] !== FALSE ? esc($config['default_tax_2_name']) : lang('Items.sales_tax_2')
|
||||
'value' => $config['default_tax_2_name'] !== FALSE ? $config['default_tax_2_name'] : lang('Items.sales_tax_2')
|
||||
]) ?>
|
||||
</div>
|
||||
<div class="col-xs-1 input-group">
|
||||
@@ -92,21 +92,36 @@
|
||||
<div class="form-group form-group-sm">
|
||||
<?php echo form_label(lang('Config.default_tax_code'), 'default_tax_code', ['class' => 'control-label col-xs-2']) ?>
|
||||
<div class='col-xs-2'>
|
||||
<?php echo form_dropdown('default_tax_code', esc($tax_code_options), esc($config['default_tax_code']), ['class' => 'form-control input-sm']) ?>
|
||||
<?php echo form_dropdown([
|
||||
'name' => 'default_tax_code',
|
||||
'options' => $tax_code_options,
|
||||
'selected' => $config['default_tax_code'],
|
||||
'extra' => "class='form-control input-sm'"
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-group-sm">
|
||||
<?php echo form_label(lang('Config.default_tax_category'), 'default_tax_category', ['class' => 'control-label col-xs-2']) ?>
|
||||
<div class='col-xs-2'>
|
||||
<?php echo form_dropdown('default_tax_category', esc($tax_category_options), esc($config['default_tax_category']), ['class' => 'form-control input-sm']) ?>
|
||||
<?php echo form_dropdown([
|
||||
'name' => 'default_tax_category',
|
||||
'options' => $tax_category_options,
|
||||
'selected' => $config['default_tax_category'],
|
||||
'extra' => "class='form-control input-sm'"
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-group-sm">
|
||||
<?php echo form_label(lang('Config.default_tax_jurisdiction'), 'default_tax_jurisdiction', ['class' => 'control-label col-xs-2']) ?>
|
||||
<div class='col-xs-2'>
|
||||
<?php echo form_dropdown('default_tax_jurisdiction', esc($tax_jurisdiction_options), esc($config['default_tax_jurisdiction']), ['class' => 'form-control input-sm']) ?>
|
||||
<?php echo form_dropdown([
|
||||
'name' => 'default_tax_jurisdiction',
|
||||
'options' => $tax_jurisdiction_options,
|
||||
'selected' => $config['default_tax_jurisdiction'],
|
||||
'extra' => "class='form-control input-sm'"
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -159,11 +174,11 @@ $(document).ready(function()
|
||||
{
|
||||
default_tax_1_rate:
|
||||
{
|
||||
remote: "<?php echo esc("$controller_name/checkNumeric") ?>"
|
||||
remote: "<?= "$controller_name/checkNumeric" ?>"
|
||||
},
|
||||
default_tax2_rate:
|
||||
{
|
||||
remote: "<?php echo esc("$controller_name/checkNumeric") ?>"
|
||||
remote: "<?= "$controller_name/checkNumeric" ?>"
|
||||
},
|
||||
},
|
||||
|
||||
@@ -171,7 +186,7 @@ $(document).ready(function()
|
||||
{
|
||||
default_tax_1_rate:
|
||||
{
|
||||
number: "<?php echo lang('Config.default_tax_rate_number') ?>"
|
||||
number: "<?= lang('Config.default_tax_rate_number') ?>"
|
||||
},
|
||||
}
|
||||
}));
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
'name' => 'package_id',
|
||||
'options' => $packages,
|
||||
'selected' => $selected_package,
|
||||
'extra' => ['class' => 'form-control']
|
||||
'extra' => "class='form-control input-sm'"
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user