- +
diff --git a/account/application/controllers/Welcome.php b/account/application/controllers/Welcome.php index 9490757..9824f58 100644 --- a/account/application/controllers/Welcome.php +++ b/account/application/controllers/Welcome.php @@ -234,5 +234,12 @@ class Welcome extends CI_Controller if ($query->num_rows() == 0) { $this->db->query("ALTER TABLE tbl_sales ADD COLUMN vatToggle INT(11)"); } + + $query = $this->db->query("SHOW COLUMNS FROM tbl_accounts LIKE 'account_bank'"); + + // 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_bank VARCHAR(50)"); + } } } diff --git a/account/application/controllers/accounts/Accountheads.php b/account/application/controllers/accounts/Accountheads.php index 6a876d9..ccb5e99 100644 --- a/account/application/controllers/accounts/Accountheads.php +++ b/account/application/controllers/accounts/Accountheads.php @@ -26,6 +26,7 @@ class Accountheads extends CI_Controller // 'account_partyname' => filter_var($_POST['account_partyname']), 'account_number' => filter_var($_POST['account_number']), 'account_branch' => filter_var($_POST['account_branch']), + 'account_bank' => filter_var($_POST['account_bank']), 'account_partyaddress' => filter_var($_POST['account_partyaddress']), 'account_partypan' => filter_var($_POST['account_partypan']), 'account_partycontact' => filter_var($_POST['account_partycontact']), @@ -88,6 +89,7 @@ class Accountheads extends CI_Controller 'account_currency' => filter_var($_POST['account_currency']), 'account_number' => filter_var($_POST['account_number']), 'account_branch' => filter_var($_POST['account_branch']), + 'account_bank' => filter_var($_POST['account_bank']), '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/controllers/inventory/Sales.php b/account/application/controllers/inventory/Sales.php index 8bea4c6..ee682a6 100644 --- a/account/application/controllers/inventory/Sales.php +++ b/account/application/controllers/inventory/Sales.php @@ -32,6 +32,7 @@ class Sales extends CI_Controller 'accounts_id' => filter_var($_POST['accounts_id']), 'sales_date' => filter_var($_POST['salesDate']), 'discount' => filter_var($_POST['discountpercentage']), + 'vatToggle' => filter_var($_POST['vatToggleValue']), 'created_on' => date('Y-m-d H:i:s'), 'created_by' => 'admin', 'remarks' => '', diff --git a/account/application/libraries/BIBAccounts.php b/account/application/libraries/BIBAccounts.php index 6b00ba4..c7d695a 100644 --- a/account/application/libraries/BIBAccounts.php +++ b/account/application/libraries/BIBAccounts.php @@ -608,10 +608,16 @@ class bibaccounts
- + isZero == true) continue; ?>- +