projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
0001503: Request - fee account included in bank account table
[fa-stable.git]
/
reporting
/
rep701.php
diff --git
a/reporting/rep701.php
b/reporting/rep701.php
index ca344f7964a0dd64db68a60b3508de7d58d6b21a..2bfffade74b2ee4bb6ff385933db231422bb5263 100644
(file)
--- a/
reporting/rep701.php
+++ b/
reporting/rep701.php
@@
-25,10
+25,10
@@
include_once($path_to_root . "/gl/includes/gl_db.inc");
//----------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------
-function display_type ($type, $typename, &$dec, &$rep, $showbalance)
+function display_type ($type, $typename, &$dec, &$rep, $showbalance
, $level
)
{
$printtitle = 0; //Flag for printing type name
{
$printtitle = 0; //Flag for printing type name
-
+
//Get Accounts directly under this group/type
$result = get_gl_accounts(null, null, $type);
while ($account=db_fetch($result))
//Get Accounts directly under this group/type
$result = get_gl_accounts(null, null, $type);
while ($account=db_fetch($result))
@@
-36,10
+36,15
@@
function display_type ($type, $typename, &$dec, &$rep, $showbalance)
//Print Type Title if it has atleast one non-zero account
if (!$printtitle)
{
//Print Type Title if it has atleast one non-zero account
if (!$printtitle)
{
+ $prefix = '';
+ for ($sp=1; $sp<=$level; $sp++)
+ {
+ $prefix .= ' ';
+ }
$printtitle = 1;
$rep->row -= 4;
$rep->TextCol(0, 1, $type);
$printtitle = 1;
$rep->row -= 4;
$rep->TextCol(0, 1, $type);
- $rep->TextCol(1, 4, $typename);
+ $rep->TextCol(1, 4, $
prefix.$
typename);
$rep->row -= 4;
$rep->Line($rep->row);
$rep->NewLine();
$rep->row -= 4;
$rep->Line($rep->row);
$rep->NewLine();
@@
-52,13
+57,13
@@
function display_type ($type, $typename, &$dec, &$rep, $showbalance)
$balance = get_gl_trans_from_to($begin, ToDay(), $account["account_code"], 0);
}
$rep->TextCol(0, 1, $account['account_code']);
$balance = get_gl_trans_from_to($begin, ToDay(), $account["account_code"], 0);
}
$rep->TextCol(0, 1, $account['account_code']);
- $rep->TextCol(1, 2, $account['account_name']);
+ $rep->TextCol(1, 2, $
prefix.$
account['account_name']);
$rep->TextCol(2, 3, $account['account_code2']);
if ($showbalance == 1)
$rep->AmountCol(3, 4, $balance, $dec);
$rep->NewLine();
}
$rep->TextCol(2, 3, $account['account_code2']);
if ($showbalance == 1)
$rep->AmountCol(3, 4, $balance, $dec);
$rep->NewLine();
}
-
+
//Get Account groups/types under this group/type
$result = get_account_types(false, false, $type);
while ($accounttype=db_fetch($result))
//Get Account groups/types under this group/type
$result = get_account_types(false, false, $type);
while ($accounttype=db_fetch($result))
@@
-74,8
+79,8
@@
function display_type ($type, $typename, &$dec, &$rep, $showbalance)
$rep->Line($rep->row);
$rep->NewLine();
}
$rep->Line($rep->row);
$rep->NewLine();
}
-
- display_type($accounttype["id"], $accounttype["name"]
, $dec, $rep, $showbalance
);
+ $nextlevel = $level + 1;
+ display_type($accounttype["id"], $accounttype["name"]
.' ('.$typename.')', $dec, $rep, $showbalance, $nextlevel
);
}
}
}
}
@@
-126,7
+131,7
@@
function print_Chart_of_Accounts()
$typeresult = get_account_types(false, $class['cid'], -1);
while ($accounttype=db_fetch($typeresult))
{
$typeresult = get_account_types(false, $class['cid'], -1);
while ($accounttype=db_fetch($typeresult))
{
- display_type($accounttype["id"], $accounttype["name"], $dec, $rep, $showbalance);
+ display_type($accounttype["id"], $accounttype["name"], $dec, $rep, $showbalance
, 0
);
}
$rep->NewLine();
}
}
$rep->NewLine();
}