ithinkdone

This commit is contained in:
Sampanna Rimal
2024-07-16 18:43:54 +05:45
parent 7d973eeed5
commit a44570897c
6 changed files with 206 additions and 42 deletions

View File

@ -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

View File

@ -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']),