mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 19:04:52 +00:00
Added further refinements to multi-company feature
This commit is contained in:
@@ -87,7 +87,7 @@
|
||||
<option value="">- Invoice -</option>
|
||||
<?php
|
||||
|
||||
$sql_invoices = mysqli_query($mysqli,"SELECT * FROM clients, invoices WHERE invoices.client_id = clients.client_id ORDER BY invoice_number DESC");
|
||||
$sql_invoices = mysqli_query($mysqli,"SELECT * FROM clients, invoices WHERE invoices.client_id = clients.client_id AND invoices.company_id = $session_company_id ORDER BY invoice_number DESC");
|
||||
while($row = mysqli_fetch_array($sql_invoices)){
|
||||
$client_id_select = $row['client_id'];
|
||||
$client_name_select = $row['client_name'];
|
||||
@@ -115,7 +115,7 @@
|
||||
<option value="">- Client -</option>
|
||||
<?php
|
||||
|
||||
$sql_clients = mysqli_query($mysqli,"SELECT * FROM clients");
|
||||
$sql_clients = mysqli_query($mysqli,"SELECT * FROM clients WHERE company_id = $session_company_id");
|
||||
while($row = mysqli_fetch_array($sql_clients)){
|
||||
$client_id_select = $row['client_id'];
|
||||
$client_name_select = $row['client_name'];
|
||||
@@ -139,7 +139,7 @@
|
||||
<option value="">- Location -</option>
|
||||
<?php
|
||||
|
||||
$sql_locations = mysqli_query($mysqli,"SELECT * FROM locations, clients WHERE locations.client_id = clients.client_id ORDER BY clients.client_id DESC");
|
||||
$sql_locations = mysqli_query($mysqli,"SELECT * FROM locations, clients WHERE locations.client_id = clients.client_id AND locations.company_id = $session_company_id ORDER BY clients.client_id DESC");
|
||||
while($row = mysqli_fetch_array($sql_locations)){
|
||||
$location_id_select = $row['location_id'];
|
||||
$location_name_select = $row['location_name'];
|
||||
@@ -164,7 +164,7 @@
|
||||
<option value="">- Vendor -</option>
|
||||
<?php
|
||||
|
||||
$sql_vendors = mysqli_query($mysqli,"SELECT * FROM vendors WHERE client_id = 0 ORDER BY vendor_name ASC");
|
||||
$sql_vendors = mysqli_query($mysqli,"SELECT * FROM vendors WHERE client_id = 0 AND company_id = $session_company_id ORDER BY vendor_name ASC");
|
||||
while($row = mysqli_fetch_array($sql_vendors)){
|
||||
$vendor_id_select = $row['vendor_id'];
|
||||
$vendor_name_select = $row['vendor_name'];
|
||||
|
||||
Reference in New Issue
Block a user