From 9551399b0802d38197c3f395858cdad7d3f55c37 Mon Sep 17 00:00:00 2001 From: Andrew Malsbury Date: Sat, 7 Oct 2023 16:11:19 +0000 Subject: [PATCH 01/33] Update add and edit to accomodate type --- post/account.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/post/account.php b/post/account.php index b598b9528..1a5b3a6c1 100644 --- a/post/account.php +++ b/post/account.php @@ -10,8 +10,9 @@ $opening_balance = floatval($_POST['opening_balance']); $currency_code = sanitizeInput($_POST['currency_code']); $notes = sanitizeInput($_POST['notes']); + $type = intval($_POST['type']); - mysqli_query($mysqli,"INSERT INTO accounts SET account_name = '$name', opening_balance = $opening_balance, account_currency_code = '$currency_code', account_notes = '$notes'"); + mysqli_query($mysqli,"INSERT INTO accounts SET account_name = '$name', opening_balance = $opening_balance, account_currency_code = '$currency_code', account_type ='$type', account_notes = '$notes'"); //Logging mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Account', log_action = 'Create', log_description = '$name', log_ip = '$session_ip', log_user_agent = '$session_user_agent', log_user_id = $session_user_id"); @@ -26,9 +27,10 @@ $account_id = intval($_POST['account_id']); $name = sanitizeInput($_POST['name']); + $type = intval($_POST['type']); $notes = sanitizeInput($_POST['notes']); - mysqli_query($mysqli,"UPDATE accounts SET account_name = '$name', account_notes = '$notes' WHERE account_id = $account_id"); + mysqli_query($mysqli,"UPDATE accounts SET account_name = '$name',account_type = '$type', account_notes = '$notes' WHERE account_id = $account_id"); //Logging mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Account', log_action = 'Modify', log_description = '$name', log_ip = '$session_ip', log_user_agent = '$session_user_agent', log_user_id = $session_user_id"); From ccb67d8e5d16b39cb8cb09eca1a304651c463994 Mon Sep 17 00:00:00 2001 From: Andrew Malsbury Date: Sat, 7 Oct 2023 16:13:00 +0000 Subject: [PATCH 02/33] Add type dropdown, and update opening balance star --- account_add_modal.php | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/account_add_modal.php b/account_add_modal.php index ad06e7bc2..ea73ea314 100644 --- a/account_add_modal.php +++ b/account_add_modal.php @@ -21,7 +21,26 @@
- + +
+
+ +
+ +
+
+ +
+
From db5eee0ebb2a06347811a2c198266b48cc231544 Mon Sep 17 00:00:00 2001 From: Andrew Malsbury Date: Sat, 7 Oct 2023 16:13:10 +0000 Subject: [PATCH 03/33] Add type dropdown --- account_edit_modal.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/account_edit_modal.php b/account_edit_modal.php index eb230d981..9f8b9e3c5 100644 --- a/account_edit_modal.php +++ b/account_edit_modal.php @@ -21,6 +21,25 @@
+
+ +
+
+ +
+ +
+
+
From bc95bb4e1546226d10cc5c5c606d718de7925298 Mon Sep 17 00:00:00 2001 From: Andrew Malsbury Date: Sat, 7 Oct 2023 16:13:46 +0000 Subject: [PATCH 04/33] Update Accounts screen to show type --- accounts.php | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/accounts.php b/accounts.php index c750c3e3c..909916a4c 100644 --- a/accounts.php +++ b/accounts.php @@ -43,6 +43,7 @@ "> Name + Type Currency Balance Action @@ -57,6 +58,7 @@ $opening_balance = floatval($row['opening_balance']); $account_currency_code = nullable_htmlentities($row['account_currency_code']); $account_notes = nullable_htmlentities($row['account_notes']); + $account_type = intval($row['account_type']); $sql_payments = mysqli_query($mysqli, "SELECT SUM(payment_amount) AS total_payments FROM payments WHERE payment_account_id = $account_id"); $row = mysqli_fetch_array($sql_payments); @@ -75,6 +77,35 @@ + + + From 29e2e5e0d71adcbe67354162709efc6b17e985ed Mon Sep 17 00:00:00 2001 From: Andrew Malsbury Date: Sat, 7 Oct 2023 16:14:28 +0000 Subject: [PATCH 05/33] Update DB, and added comments for next new guy. --- database_updates.php | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/database_updates.php b/database_updates.php index cb3405e2b..5e63c9b77 100644 --- a/database_updates.php +++ b/database_updates.php @@ -1374,12 +1374,26 @@ mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.8.6'"); } - //if (CURRENT_DATABASE_VERSION == '0.8.6') { + // Update DB to 0.8.7 + if (CURRENT_DATABASE_VERSION == '0.8.6') { // Insert queries here required to update to DB version 0.8.7 + mysqli_query($mysqli, "ALTER TABLE `accounts` ADD `account_type` int(6) DEFAULT NULL AFTER `account_notes`"); // Then, update the database to the next sequential version - //mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.8.7'"); + mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.8.7'"); + } + + // Be sure to change database_version.php to reflect the version you are updating to here + // Please add this same comment block to the bottom of this file, and update the version number. + // Uncomment Below Lines, to add additional database updates + // + //if (CURRENT_DATABASE_VERSION == '0.8.7') { + // Insert queries here required to update to DB version 0.8.9 + // + // Then, update the database to the next sequential version + //mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.8.8'"); //} + // } else { // Up-to-date From 844a85cee7f650c8ea86ecc3a63b2da8f51f67f7 Mon Sep 17 00:00:00 2001 From: Andrew Malsbury Date: Sat, 7 Oct 2023 16:14:39 +0000 Subject: [PATCH 06/33] Update DB --- database_version.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database_version.php b/database_version.php index d74bed2d1..226d5b4a0 100644 --- a/database_version.php +++ b/database_version.php @@ -5,4 +5,4 @@ * It is used in conjunction with database_updates.php */ -DEFINE("LATEST_DATABASE_VERSION", "0.8.6"); +DEFINE("LATEST_DATABASE_VERSION", "0.8.7"); From f8bc2ee4b47ccf83976ce86ff192cc4e4ef2fef9 Mon Sep 17 00:00:00 2001 From: Andrew Malsbury Date: Sat, 7 Oct 2023 16:15:02 +0000 Subject: [PATCH 07/33] Add "account_type" to accounts table --- db.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/db.sql b/db.sql index 0734cb0ff..520b39e00 100644 --- a/db.sql +++ b/db.sql @@ -28,6 +28,7 @@ CREATE TABLE `accounts` ( `opening_balance` decimal(15,2) NOT NULL DEFAULT 0.00, `account_currency_code` varchar(200) NOT NULL, `account_notes` text DEFAULT NULL, + `account_type` int(6) NOT NULL DEFAULT 11, `account_created_at` datetime NOT NULL DEFAULT current_timestamp(), `account_updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp(), `account_archived_at` datetime DEFAULT NULL, From 5d964c928204563de46ae4020a7933ff22d85029 Mon Sep 17 00:00:00 2001 From: Andrew Malsbury Date: Sat, 7 Oct 2023 16:15:50 +0000 Subject: [PATCH 08/33] New Balance sheet report screen --- report_balance_sheet.php | 155 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 155 insertions(+) create mode 100644 report_balance_sheet.php diff --git a/report_balance_sheet.php b/report_balance_sheet.php new file mode 100644 index 000000000..d722c9bb4 --- /dev/null +++ b/report_balance_sheet.php @@ -0,0 +1,155 @@ + + +
+
+

Balance Sheet

+
+ +
+
+
+
+ +
+

+ +

+

Balance Sheet

+
As of
+
+ + + + + + + + + + + + + + = 11 && $account_type <= 19) { + // Display assets account row + echoAccountRow($row, $balance); + $total_assets += $balance; + $formatted_total_assets = numfmt_format_currency($currency_format, $total_assets, $row['account_currency_code']); + } + } + ?> + + + + + + + + + + + = 21 && $account_type <= 29) { + // Display liabilities account row + echoAccountRow($row, $balance); + $total_liabilities += $balance; + $formatted_total_liabilities = numfmt_format_currency($currency_format, $total_liabilities, $row['account_currency_code']); + } + } + ?> + + + + + + + + + + + = 30) { + // Display equity account row + echoAccountRow($row, $balance); + $total_equity += $balance; + $formatted_total_equity = numfmt_format_currency($currency_format, $total_equity, $row['account_currency_code']); + } + } + ?> + + + + + + +
Account TypeAccount NameAccount Balance
Assets
Total Assets
Liabilities
Total Liabilities
Equity
Total Equity
+
+
+
+ + + + "Current Assets", + 12 => "Fixed Assets", + 13 => "Other Assets", + 21 => "Current Liabilities", + 22 => "Long Term Liabilities", + 23 => "Other Liabilities", + 30 => "Equity" + ]; + $account_type_string = $account_type_strings[$accountRow['account_type']] ?? "Unknown"; + $account_name_encoded = urlencode($accountRow['account_name']); + echo " + + $account_type_string + {$accountRow['account_name']} + " . numfmt_format_currency($currency_format, $balance, $accountRow['account_currency_code']) . " + + "; +} + +?> From 3a879088ae7bdd7505d0853c6b4206f7d0d64156 Mon Sep 17 00:00:00 2001 From: Andrew Malsbury Date: Sat, 7 Oct 2023 16:16:04 +0000 Subject: [PATCH 09/33] Add balance sheet to side nav --- reports_side_nav.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/reports_side_nav.php b/reports_side_nav.php index 2629a1931..5d33b301e 100644 --- a/reports_side_nav.php +++ b/reports_side_nav.php @@ -70,6 +70,12 @@

Profit & Loss

+ From d63da0712284b6ae8396a7ca2f8542b742956c53 Mon Sep 17 00:00:00 2001 From: Andrew Malsbury Date: Sat, 7 Oct 2023 17:21:31 +0000 Subject: [PATCH 10/33] Updated setup - Cash Account: current asset type --- setup.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.php b/setup.php index aea1a53e0..c3bc029f1 100644 --- a/setup.php +++ b/setup.php @@ -1020,7 +1020,7 @@ //Create Some Data - mysqli_query($mysqli,"INSERT INTO accounts SET account_name = 'Cash', account_currency_code = '$currency_code'"); + mysqli_query($mysqli,"INSERT INTO accounts SET account_name = 'Cash', account_type = '11', account_currency_code = '$currency_code'"); mysqli_query($mysqli,"INSERT INTO categories SET category_name = 'Office Supplies', category_type = 'Expense', category_color = 'blue'"); mysqli_query($mysqli,"INSERT INTO categories SET category_name = 'Travel', category_type = 'Expense', category_color = 'red'"); From 3e96751bf00ae9aecba711d6c903effd8de6c42d Mon Sep 17 00:00:00 2001 From: Andrew Malsbury Date: Sat, 7 Oct 2023 17:31:55 +0000 Subject: [PATCH 11/33] Bug - Liabilities is showing Assets total --- report_balance_sheet.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/report_balance_sheet.php b/report_balance_sheet.php index d722c9bb4..1495d79a7 100644 --- a/report_balance_sheet.php +++ b/report_balance_sheet.php @@ -96,7 +96,7 @@ Total Liabilities - + From 6a485a95b46dca711f8796bffe7b382c40f5240d Mon Sep 17 00:00:00 2001 From: Andrew Malsbury Date: Sat, 7 Oct 2023 17:32:34 +0000 Subject: [PATCH 12/33] Allows for negative numbers for credit cards --- account_add_modal.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/account_add_modal.php b/account_add_modal.php index ea73ea314..24d93fe40 100644 --- a/account_add_modal.php +++ b/account_add_modal.php @@ -45,8 +45,7 @@
- -
+
From 1455e20fad52e088b39b70bfb85b4b1b6c147f29 Mon Sep 17 00:00:00 2001 From: Andrew Malsbury Date: Sat, 7 Oct 2023 18:05:21 +0000 Subject: [PATCH 13/33] Added Total Equities and Liabilities --- report_balance_sheet.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/report_balance_sheet.php b/report_balance_sheet.php index 1495d79a7..b048c7ca8 100644 --- a/report_balance_sheet.php +++ b/report_balance_sheet.php @@ -26,6 +26,7 @@ $total_assets = 0; $total_liabilities = 0; $total_equity = 0; +$currency = $session_company_currency; ?>
@@ -107,7 +108,7 @@ mysqli_data_seek($result_accounts, 0); // Reset the result pointer to the start while ($row = mysqli_fetch_array($result_accounts)) { $balance = $row['opening_balance'] + $row['total_payments'] + $row['total_revenues'] - $row['total_expenses']; - $account_type = $row['account_type']; + $account_type = $row['account_type']; if ($account_type >= 30) { // Display equity account row echoAccountRow($row, $balance); @@ -121,6 +122,18 @@ Total Equity + + + + + + + Total Liabilities and Equity + +
From 2ee87f0f66b7a5e258f526b770fa3296f60a09c3 Mon Sep 17 00:00:00 2001 From: Andrew Malsbury Date: Mon, 9 Oct 2023 20:24:49 +0000 Subject: [PATCH 14/33] Switched to DB controlled Account Types --- account_add_modal.php | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/account_add_modal.php b/account_add_modal.php index 24d93fe40..a969f0f93 100644 --- a/account_add_modal.php +++ b/account_add_modal.php @@ -28,13 +28,16 @@
From f190e100e8c5f59181bbfc787a9c3ea9812ee974 Mon Sep 17 00:00:00 2001 From: Andrew Malsbury Date: Mon, 9 Oct 2023 20:24:54 +0000 Subject: [PATCH 15/33] Switched to DB controlled Account Types --- account_edit_modal.php | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/account_edit_modal.php b/account_edit_modal.php index 9f8b9e3c5..1e807c12b 100644 --- a/account_edit_modal.php +++ b/account_edit_modal.php @@ -28,15 +28,17 @@ + + + + + + + + $label): ?> + + + From 8b6c909d95c3d72ec5c567e6d7f52e92f0c96a6f Mon Sep 17 00:00:00 2001 From: Andrew Malsbury Date: Mon, 9 Oct 2023 20:26:03 +0000 Subject: [PATCH 16/33] Switched to DB controlled Account Types --- accounts.php | 34 +++++----------------------------- 1 file changed, 5 insertions(+), 29 deletions(-) diff --git a/accounts.php b/accounts.php index 909916a4c..cfd3c2445 100644 --- a/accounts.php +++ b/accounts.php @@ -58,7 +58,10 @@ $opening_balance = floatval($row['opening_balance']); $account_currency_code = nullable_htmlentities($row['account_currency_code']); $account_notes = nullable_htmlentities($row['account_notes']); - $account_type = intval($row['account_type']); + $account_type_id = intval($row['account_type']); + + //Find account type name + $account_type = mysqli_query($mysqli, "SELECT * FROM account_types WHERE account_type_id = $account_type_id"); $sql_payments = mysqli_query($mysqli, "SELECT SUM(payment_amount) AS total_payments FROM payments WHERE payment_account_id = $account_id"); $row = mysqli_fetch_array($sql_payments); @@ -77,34 +80,7 @@ - - + From 749281a3e8f89a9fc7db0b4577495f7accd23df8 Mon Sep 17 00:00:00 2001 From: Andrew Malsbury Date: Mon, 9 Oct 2023 20:26:36 +0000 Subject: [PATCH 17/33] Switched to DB controlled Account Types --- database_updates.php | 1 + 1 file changed, 1 insertion(+) diff --git a/database_updates.php b/database_updates.php index 5e63c9b77..97b42530e 100644 --- a/database_updates.php +++ b/database_updates.php @@ -1378,6 +1378,7 @@ if (CURRENT_DATABASE_VERSION == '0.8.6') { // Insert queries here required to update to DB version 0.8.7 mysqli_query($mysqli, "ALTER TABLE `accounts` ADD `account_type` int(6) DEFAULT NULL AFTER `account_notes`"); + mysqli_query($mysqli, "CREATE TABLE `account_types` (`account_type_id` int(11) NOT NULL AUTO_INCREMENT,`account_type_name` varchar(255) NOT NULL,`account_type_description` text DEFAULT NULL,`account_type_created_at` datetime NOT NULL DEFAULT current_timestamp(),`account_type_updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp(),`account_type_archived_at` datetime DEFAULT NULL,PRIMARY KEY (`account_type_id`))"); // Then, update the database to the next sequential version mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.8.7'"); From 81f34e20d72f43685f0a51f19788dc58157865a9 Mon Sep 17 00:00:00 2001 From: Andrew Malsbury Date: Mon, 9 Oct 2023 20:26:48 +0000 Subject: [PATCH 18/33] Updated Version --- database_version.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database_version.php b/database_version.php index 226d5b4a0..d74bed2d1 100644 --- a/database_version.php +++ b/database_version.php @@ -5,4 +5,4 @@ * It is used in conjunction with database_updates.php */ -DEFINE("LATEST_DATABASE_VERSION", "0.8.7"); +DEFINE("LATEST_DATABASE_VERSION", "0.8.6"); From 03c8f47cf010a07fb472ce8b6f4f8802913297e0 Mon Sep 17 00:00:00 2001 From: Andrew Malsbury Date: Mon, 9 Oct 2023 20:27:09 +0000 Subject: [PATCH 19/33] added account types table --- db.sql | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/db.sql b/db.sql index 520b39e00..e6e1c0637 100644 --- a/db.sql +++ b/db.sql @@ -28,14 +28,29 @@ CREATE TABLE `accounts` ( `opening_balance` decimal(15,2) NOT NULL DEFAULT 0.00, `account_currency_code` varchar(200) NOT NULL, `account_notes` text DEFAULT NULL, - `account_type` int(6) NOT NULL DEFAULT 11, + `account_type` int(6) NOT NULL DEFAULT NULL, `account_created_at` datetime NOT NULL DEFAULT current_timestamp(), `account_updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp(), `account_archived_at` datetime DEFAULT NULL, - PRIMARY KEY (`account_id`) + PRIMARY KEY (`account_id`), + CONSTRAINT `fk_accounts_account_type_id` FOREIGN KEY (`account_type`) REFERENCES `account_types` (`account_type_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; + +DROP TABLE IF EXISTS `account_types`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `account_types` ( + `account_type_id` int(11) NOT NULL AUTO_INCREMENT, + `account_type_name` varchar(200) NOT NULL, + `account_type_description` text DEFAULT NULL, + `account_type_created_at` datetime NOT NULL DEFAULT current_timestamp(), + `account_type_updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp(), + `account_type_archived_at` datetime DEFAULT NULL, + PRIMARY KEY (`account_type_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; + -- -- Table structure for table `api_keys` -- From 69272a8800661631997a3b2cd346aec2b9e85467 Mon Sep 17 00:00:00 2001 From: Andrew Malsbury Date: Mon, 9 Oct 2023 20:27:28 +0000 Subject: [PATCH 20/33] added account type post handling --- post.php | 1 + 1 file changed, 1 insertion(+) diff --git a/post.php b/post.php index 021a925b1..a9887ed61 100644 --- a/post.php +++ b/post.php @@ -10,6 +10,7 @@ // Load specific module logic require_once("post/account.php"); +require_once("post/account_type.php"); require_once("post/api.php"); require_once("post/asset.php"); require_once("post/category.php"); From a8e03d46609901d561130e11ad43a7453495c98e Mon Sep 17 00:00:00 2001 From: Andrew Malsbury Date: Mon, 9 Oct 2023 20:27:53 +0000 Subject: [PATCH 21/33] Switched to DB controlled Account Types --- report_balance_sheet.php | 52 ++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/report_balance_sheet.php b/report_balance_sheet.php index b048c7ca8..e6d13c14a 100644 --- a/report_balance_sheet.php +++ b/report_balance_sheet.php @@ -1,32 +1,32 @@
@@ -155,7 +155,7 @@ function echoAccountRow($accountRow, $balance) { 30 => "Equity" ]; $account_type_string = $account_type_strings[$accountRow['account_type']] ?? "Unknown"; - $account_name_encoded = urlencode($accountRow['account_name']); + $account_name_encoded_numml = urlencode($accountRow['account_name']); echo " $account_type_string From 3ef045eea19457b68e0259e8083d9ba2e1a8943a Mon Sep 17 00:00:00 2001 From: Andrew Malsbury Date: Mon, 9 Oct 2023 20:28:12 +0000 Subject: [PATCH 22/33] New Modal --- settings_account_types_add_modal.php | 37 +++++++++++++++++++++++++++ settings_account_types_edit_modal.php | 36 ++++++++++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 settings_account_types_add_modal.php create mode 100644 settings_account_types_edit_modal.php diff --git a/settings_account_types_add_modal.php b/settings_account_types_add_modal.php new file mode 100644 index 000000000..631e691c4 --- /dev/null +++ b/settings_account_types_add_modal.php @@ -0,0 +1,37 @@ + \ No newline at end of file diff --git a/settings_account_types_edit_modal.php b/settings_account_types_edit_modal.php new file mode 100644 index 000000000..d75d805f8 --- /dev/null +++ b/settings_account_types_edit_modal.php @@ -0,0 +1,36 @@ + \ No newline at end of file From 72da87e608cce00d8b3de2c9da8e31ce4f08af4d Mon Sep 17 00:00:00 2001 From: Andrew Malsbury Date: Mon, 9 Oct 2023 20:31:21 +0000 Subject: [PATCH 23/33] New Settings Screen --- settings_account_types.php | 104 +++++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 settings_account_types.php diff --git a/settings_account_types.php b/settings_account_types.php new file mode 100644 index 000000000..55134c03f --- /dev/null +++ b/settings_account_types.php @@ -0,0 +1,104 @@ + + +
+
+

Finance Account Types

+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + No Records Here"; + } + + ?> + +
Account Type IDAccount Type NameType GroupDescription
+ +
+
+
+
+ + \ No newline at end of file From e4fc7bca23cde7e32009cf51f22093c9548d91d0 Mon Sep 17 00:00:00 2001 From: Andrew Malsbury Date: Mon, 9 Oct 2023 20:31:31 +0000 Subject: [PATCH 24/33] New settings menu --- settings_side_nav.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/settings_side_nav.php b/settings_side_nav.php index abcc9f8eb..549d645b1 100644 --- a/settings_side_nav.php +++ b/settings_side_nav.php @@ -112,6 +112,13 @@ + +
From bb559a4bdbec5bc59643effb5b79e815ff8ac7f5 Mon Sep 17 00:00:00 2001 From: Andrew Malsbury Date: Mon, 9 Oct 2023 21:42:03 +0000 Subject: [PATCH 29/33] Fixed account type not showing by default on edit --- account_edit_modal.php | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/account_edit_modal.php b/account_edit_modal.php index 1e807c12b..522a3e308 100644 --- a/account_edit_modal.php +++ b/account_edit_modal.php @@ -10,7 +10,6 @@
-
- - + "Current Assets", - 12 => "Fixed Assets", - 13 => "Other Assets", - 21 => "Current Liabilities", - 22 => "Long Term Liabilities", - 23 => "Other Liabilities", - 30 => "Equity" - ]; - $account_type_string = $account_type_strings[$accountRow['account_type']] ?? "Unknown"; - $account_name_encoded_nulled = nullable_htmlentities(urlencode($accountRow['account_name'])); - $account_name_nulled = nullable_htmlentities($accountRow['account_name']); - echo " - - $account_type_string - $account_name_nulled - " . numfmt_format_currency($currency_format, $balance, $accountRow['account_currency_code']) . " - - "; +function print_row($row, $balance, $currency_format) { + $account_name = nullable_htmlentities($row['account_name']); + $formatted_balance = numfmt_format_currency($currency_format, $balance, $row['account_currency_code']); + + echo ""; + echo ""; + echo "$account_name"; + echo "$formatted_balance"; + echo ""; } + ?> From 96e493df4a2806356a7b11f5b6219b6707aca9e1 Mon Sep 17 00:00:00 2001 From: Andrew Malsbury Date: Mon, 9 Oct 2023 23:16:22 +0000 Subject: [PATCH 31/33] Removed a testcase --- account_add_modal.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/account_add_modal.php b/account_add_modal.php index 5db6eb648..d04aa5356 100644 --- a/account_add_modal.php +++ b/account_add_modal.php @@ -59,11 +59,9 @@ From 7b772cf529818a52955fcaa870a8589569a35ade Mon Sep 17 00:00:00 2001 From: Andrew Malsbury Date: Mon, 9 Oct 2023 23:21:48 +0000 Subject: [PATCH 32/33] Something is broken with the confirm-link --- accounts.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accounts.php b/accounts.php index cfd3c2445..79edd340b 100644 --- a/accounts.php +++ b/accounts.php @@ -95,7 +95,7 @@ - + Archive From 74e2866a01b959801714d02081978ccce50fdc06 Mon Sep 17 00:00:00 2001 From: Andrew Malsbury Date: Tue, 10 Oct 2023 16:52:00 +0000 Subject: [PATCH 33/33] Adjusted the type dropdown --- account_add_modal.php | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/account_add_modal.php b/account_add_modal.php index d04aa5356..93ab7166a 100644 --- a/account_add_modal.php +++ b/account_add_modal.php @@ -26,18 +26,15 @@
- + + $account_type_name";}}?>