myaccounts->getAllAccountsTable(3); ?> db->where("status", 1)->where("accategory_id = 2")->where('created_on >=', date('Y-m-d', (strtotime($fiscalStart))))->where('created_on <=', date('Y-m-d', (strtotime($fiscalEnd)))); $CI->db->order_by("account_name ASC"); $Accounts = $CI->db->get("tbl_accounts")->result(); foreach ($Accounts as $Account) { $Account->Group = $CI->db->query("select * from tbl_acgroups where acgroup_id=(select acgroup_id from tbl_accategories where accategory_id = $Account->accategory_id)")->row(); $Account->Category = $CI->db->query("select * from tbl_accategories where accategory_id = $Account->accategory_id")->row(); } ?>
"; $html .= ""; $html .= "SnAccountAccount GroupDrCrBalanceAction"; $html .= ""; $sn = 0; $BalanceTotal = 0; foreach ($Accounts as $Account) : $sn++; $balance = getBalance($Account->account_id); $BalanceTotal += $balance; // pre($Account); $html .= "" . $sn . "" . $Account->account_name . "" . $Account->Category->accategory_name . "" . (($balance >= 0) ? myCurrency($balance) : "") . "" . (($balance < 0) ? myCurrency(abs($balance)) : "") . "" . (myCurrency($balance)) . ""; endforeach; $html .= ""; $html .= "Total" . (($BalanceTotal > 0) ? myCurrency(abs($BalanceTotal)) : "") . "" . (($BalanceTotal < 0) ? myCurrency(abs($BalanceTotal)) : "") . "" . myCurrency($BalanceTotal) . ""; $html .= "\n"; $html .= "
Ledger Details
Ledger Details Goes Here
"; $html .= ''; echo $html; ?>