Sort dropdowns in add/edit/copy expenses alphabetically

This commit is contained in:
johnny@pittpc.com
2020-04-04 22:57:37 -04:00
parent a14ec04d5a
commit ba863cc86f
4 changed files with 11 additions and 11 deletions

View File

@@ -43,7 +43,7 @@
<option value="">- Account -</option>
<?php
$sql = mysqli_query($mysqli,"SELECT * FROM accounts WHERE company_id = $session_company_id");
$sql = mysqli_query($mysqli,"SELECT * FROM accounts WHERE company_id = $session_company_id ORDER BY account_name ASC");
while($row = mysqli_fetch_array($sql)){
$account_id = $row['account_id'];
$account_name = $row['account_name'];
@@ -115,7 +115,7 @@
<option value="">- Category -</option>
<?php
$sql = mysqli_query($mysqli,"SELECT * FROM categories WHERE category_type = 'Expense' AND company_id = $session_company_id");
$sql = mysqli_query($mysqli,"SELECT * FROM categories WHERE category_type = 'Expense' AND company_id = $session_company_id ORDER BY category_name ASC");
while($row = mysqli_fetch_array($sql)){
$category_id = $row['category_id'];
$category_name = $row['category_name'];