purchasevoucher

This commit is contained in:
Sampanna Rimal
2024-08-06 12:48:20 +05:45
parent d164f3139d
commit 52f9c0dd15
4 changed files with 52 additions and 6 deletions

View File

@ -221,5 +221,18 @@ class Welcome extends CI_Controller
$this->db->query("ALTER TABLE tbl_items ADD COLUMN units_id INT(11)");
}
$query = $this->db->query("SHOW COLUMNS FROM tbl_purchases LIKE 'vatToggle'");
// If the column doesn't exist, alter the table to add it
if ($query->num_rows() == 0) {
$this->db->query("ALTER TABLE tbl_purchases ADD COLUMN vatToggle INT(11)");
}
$query = $this->db->query("SHOW COLUMNS FROM tbl_sales LIKE 'vatToggle'");
// If the column doesn't exist, alter the table to add it
if ($query->num_rows() == 0) {
$this->db->query("ALTER TABLE tbl_sales ADD COLUMN vatToggle INT(11)");
}
}
}