From 213be12e2a9b687e4135139b40eccd3a55cd8c97 Mon Sep 17 00:00:00 2001 From: Raju Shrestha Date: Fri, 9 Aug 2024 11:53:11 +0545 Subject: [PATCH] edit css --- .../views/accounts/balances/bycategory.php | 37 +++++++------------ .../application/views/translations/list.php | 17 +++------ 2 files changed, 19 insertions(+), 35 deletions(-) diff --git a/account/application/views/accounts/balances/bycategory.php b/account/application/views/accounts/balances/bycategory.php index c0a00a1..94771f3 100644 --- a/account/application/views/accounts/balances/bycategory.php +++ b/account/application/views/accounts/balances/bycategory.php @@ -3,19 +3,16 @@ $drWidth = 250; $crWidth = 250; $AccountCategories = $this->acc->getAccountCategories($acgroup_id); $array = json_decode(json_encode($AccountCategories), true); -$tree=buildCategoryTree($array, false); +$tree = buildCategoryTree($array, false); function buildCategoryTree($categories, $parent_id = 0, $showZero = true) { $tree = array(); - foreach ($categories as $category) { if ($category['parent_category_id'] == $parent_id) { $children = buildCategoryTree($categories, $category['accategory_id'], $showZero); - if (!empty($children)) { $category['children'] = $children; } - if ($showZero && ($category['dr'] !== 0 || $category['cr'] !== 0)) { $tree[] = $category; } elseif (!$showZero && ($category['dr'] !== 0 && $category['cr'] !== 0)) { @@ -23,24 +20,21 @@ function buildCategoryTree($categories, $parent_id = 0, $showZero = true) } } } - return $tree; } - -function displayCategoryTree($tree) { +function displayCategoryTree($tree) +{ echo ''; - foreach ($tree as $category) { - echo ''; echo ''; - echo ''; - echo ''; - echo ''; + echo ''; + echo ''; + echo ''; echo ''; if (isset($category['children']) && !empty($category['children'])) { echo ''; - echo ''; echo ''; @@ -53,12 +47,13 @@ function displayCategoryTree($tree) { .expandable { text-decoration: underline; } +
-
- +
@@ -68,8 +63,8 @@ function displayCategoryTree($tree) {
+ Show Zero Balances +
@@ -77,8 +72,6 @@ function displayCategoryTree($tree) {
- -
- - -
- - \ No newline at end of file + \ No newline at end of file diff --git a/account/application/views/translations/list.php b/account/application/views/translations/list.php index bf0f72b..bcbda1d 100644 --- a/account/application/views/translations/list.php +++ b/account/application/views/translations/list.php @@ -1,37 +1,32 @@
-
-
- -
uri->segment(1) . "/" . $this->uri->segment(2) . "/add","Create New ".$pageTitle); ?>
- +
uri->segment(1) . "/" . $this->uri->segment(2) . "/add", "Create New " . $pageTitle); ?>
-
- db->query("select * from tbl_translations where status=1")->result(); ?>
' . $category['accategory_id'] . '' . $category['accategory_name'] . '' . myCurrency($category['dr']) . '' . myCurrency($category['cr']) . '' . $category['accategory_name'] . '' . myCurrency($category['dr']) . '' . myCurrency($category['cr']) . '
'; + echo ''; displayCategoryTree($category['children']); echo '
- - + + - + - +
translation_id; ?> english; ?>nepali; ?>nepali; ?> uri->segment(2) . "/edit/$id"); ?>" class="btn btn-info btn-xs"> Edit Delete