purchasevoucher
This commit is contained in:
@ -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)");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -24,6 +24,7 @@ class Purchases extends CI_Controller
|
||||
$this->db->where('purchases_id', $id);
|
||||
$data['PurchaseDetails'] = $this->db->get("tbl_purchasedetails")->result();
|
||||
$data['pageTitle'] = "View Purchase";
|
||||
// print_r($data);die;
|
||||
loadView("inventory/purchases/view", $data);
|
||||
break;
|
||||
case 'create':
|
||||
@ -35,6 +36,7 @@ class Purchases extends CI_Controller
|
||||
'purchase_date' => filter_var($_POST['purchase_date']),
|
||||
'discount' => filter_var($_POST['discountpercentage']),
|
||||
'created_on' => date('Y-m-d H:i:s'),
|
||||
'vatToggle' => filter_var($_POST['vatToggleValue']),
|
||||
'created_by' => 'admin',
|
||||
'remarks' => '',
|
||||
'status' => 1,
|
||||
|
Reference in New Issue
Block a user