diff --git a/account/application/controllers/Welcome.php b/account/application/controllers/Welcome.php index 1e948ed..0adbe3f 100644 --- a/account/application/controllers/Welcome.php +++ b/account/application/controllers/Welcome.php @@ -180,6 +180,28 @@ class Welcome extends CI_Controller if ($query->num_rows() == 0) { $this->db->query("ALTER TABLE tbl_purchases ADD COLUMN purchase_ref VARCHAR(50)"); } + $query = $this->db->query("SHOW COLUMNS FROM tbl_accounts LIKE 'account_image'"); + + // If the column doesn't exist, alter the table to add it + if ($query->num_rows() == 0) { + $this->db->query("ALTER TABLE tbl_accounts ADD COLUMN account_image text"); + } + + $query = $this->db->query("SHOW COLUMNS FROM tbl_accounts LIKE 'account_number'"); + + // If the column doesn't exist, alter the table to add it + if ($query->num_rows() == 0) { + $this->db->query("ALTER TABLE tbl_accounts ADD COLUMN account_number VARCHAR(50)"); + } + + $query = $this->db->query("SHOW COLUMNS FROM tbl_accounts LIKE 'account_branch'"); + + // If the column doesn't exist, alter the table to add it + if ($query->num_rows() == 0) { + $this->db->query("ALTER TABLE tbl_accounts ADD COLUMN account_branch VARCHAR(50)"); + } + + $query = $this->db->query("SHOW COLUMNS FROM tbl_branches LIKE 'vat'"); // If the column doesn't exist, alter the table to add it diff --git a/account/application/controllers/accounts/Accountheads.php b/account/application/controllers/accounts/Accountheads.php index 8dfb86d..6a876d9 100644 --- a/account/application/controllers/accounts/Accountheads.php +++ b/account/application/controllers/accounts/Accountheads.php @@ -24,12 +24,14 @@ class Accountheads extends CI_Controller // 'account_plcategory' => filter_var($_POST['account_plcategory']), // 'account_currency' => filter_var($_POST['account_currency']), // 'account_partyname' => filter_var($_POST['account_partyname']), - // 'account_partyaddress' => filter_var($_POST['account_partyaddress']), - // 'account_partypan' => filter_var($_POST['account_partypan']), - // 'account_partycontact' => filter_var($_POST['account_partycontact']), - // 'account_partyemail' => filter_var($_POST['account_partyemail']), - // 'account_partycontactperson' => filter_var($_POST['account_partycontactperson']), - // 'account_partycontactpersoncontact' => filter_var($_POST['account_partycontactpersoncontact']), + 'account_number' => filter_var($_POST['account_number']), + 'account_branch' => filter_var($_POST['account_branch']), + 'account_partyaddress' => filter_var($_POST['account_partyaddress']), + 'account_partypan' => filter_var($_POST['account_partypan']), + 'account_partycontact' => filter_var($_POST['account_partycontact']), + 'account_partyemail' => filter_var($_POST['account_partyemail']), + 'account_partycontactperson' => filter_var($_POST['account_partycontactperson']), + 'account_partycontactpersoncontact' => filter_var($_POST['account_partycontactpersoncontact']), 'created_on' => date('Y-m-d H:i:s'), 'created_by' => 'admin', 'remarks' => filter_var($_POST['remarks']), @@ -84,6 +86,8 @@ class Accountheads extends CI_Controller 'account_type' => filter_var($_POST['account_type']), 'account_plcategory' => filter_var($_POST['account_plcategory']), 'account_currency' => filter_var($_POST['account_currency']), + 'account_number' => filter_var($_POST['account_number']), + 'account_branch' => filter_var($_POST['account_branch']), 'account_partyname' => filter_var($_POST['account_partyname']), 'account_partyaddress' => filter_var($_POST['account_partyaddress']), 'account_partypan' => filter_var($_POST['account_partypan']), diff --git a/account/application/views/accounts/accountheads/details.php b/account/application/views/accounts/accountheads/details.php index a3d8b31..9f45e85 100644 --- a/account/application/views/accounts/accountheads/details.php +++ b/account/application/views/accounts/accountheads/details.php @@ -76,6 +76,20 @@ + +