Added further refinements to multi-company feature

This commit is contained in:
johnny@pittpc.com
2019-08-14 13:28:25 -04:00
parent 103b110042
commit 01f820b394
47 changed files with 122 additions and 114 deletions

View File

@@ -40,7 +40,7 @@
<option value="">- Account -</option>
<?php
$sql = mysqli_query($mysqli,"SELECT * FROM accounts");
$sql = mysqli_query($mysqli,"SELECT * FROM accounts WHERE company_id = $session_company_id");
while($row = mysqli_fetch_array($sql)){
$account_id = $row['account_id'];
$account_name = $row['account_name'];
@@ -76,7 +76,7 @@
<option value="">- Category -</option>
<?php
$sql = mysqli_query($mysqli,"SELECT * FROM categories WHERE category_type = 'Income'");
$sql = mysqli_query($mysqli,"SELECT * FROM categories WHERE category_type = 'Income' AND company_id = $session_company_id");
while($row = mysqli_fetch_array($sql)){
$category_id = $row['category_id'];
$category_name = $row['category_name'];
@@ -100,7 +100,7 @@
<option value="">- Method of Payment -</option>
<?php
$sql = mysqli_query($mysqli,"SELECT * FROM categories WHERE category_type = 'Payment Method'");
$sql = mysqli_query($mysqli,"SELECT * FROM categories WHERE category_type = 'Payment Method' AND company_id = $session_company_id");
while($row = mysqli_fetch_array($sql)){
$category_name = $row['category_name'];
?>