forked from daN4cat/PHP-Point-Of-Sale
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.php
More file actions
47 lines (43 loc) · 1.38 KB
/
config.php
File metadata and controls
47 lines (43 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
require_once ("secure_area.php");
class Config extends Secure_area
{
function __construct()
{
parent::__construct('config');
}
function index()
{
$this->load->view("config");
}
function save()
{
$batch_save_data=array(
'company'=>$this->input->post('company'),
'address'=>$this->input->post('address'),
'phone'=>$this->input->post('phone'),
'email'=>$this->input->post('email'),
'fax'=>$this->input->post('fax'),
'website'=>$this->input->post('website'),
'default_tax_1_rate'=>$this->input->post('default_tax_1_rate'),
'default_tax_1_name'=>$this->input->post('default_tax_1_name'),
'default_tax_2_rate'=>$this->input->post('default_tax_2_rate'),
'default_tax_2_name'=>$this->input->post('default_tax_2_name'),
'return_policy'=>$this->input->post('return_policy'),
'language'=>$this->input->post('language'),
'timezone'=>$this->input->post('timezone'),
'print_after_sale'=>$this->input->post('print_after_sale'),
'quickbooks_url'=>$this->input->post('quickbooks_url'),
'quickbooks_secret_key'=>$this->input->post('quickbooks_secret_key')
);
if($this->Appconfig->batch_save($batch_save_data))
{
echo json_encode(array('success'=>true,'message'=>$this->lang->line('config_saved_successfully')));
}
else
{
echo json_encode(array('success'=>false,'message'=>$this->lang->line('config_saved_unsuccessfully')));
}
}
}
?>