$prefix = " "; } elseif ($treelevel == 3) { $prefix = " "; } elseif ($treelevel == 4) { $prefix = " "; } if ($showplacefolderindicator == 1 && $placeholder == 1) { $displaytext = $prefix . "[" . $accounts_name . "]"; } else { $displaytext = $prefix . $accounts_name; } if ($showaccountcode == "on") { $accounts_name = $accountcode_full . "-" . $accounts_name; } if ($transactionamt == 0 && $placeholder == 1 && $treelevel == $reportlevel) { $lastbalance = $acc->getAccountDateRangeValue($datefrom, $dateto, $accounts_id, 0, $organization_id); } elseif ($placeholder == 1) { $lastbalance = 0; } switch ($classtype) { case "5A": $totalasset = $totalasset + $lastbalance; if ($placeholder == 0) { $displayamt = changeNegativeNumberFormat($lastbalance, 2); } elseif ($placeholder == 1 && $treelevel < $reportlevel) { $displayamt = ""; } elseif ($placeholder == 1 && $treelevel == $reportlevel) { $displayamt = changeNegativeNumberFormat($lastbalance, 2); } break; case "6L":
if ($classtype == "6L" || $classtype == "7E") { $displayamt[$k] = number_format($transactionamt[$k] * -1, 0, ".", ""); } else { $displayamt[$k] = number_format($transactionamt[$k], 0, ".", ""); } } } elseif ($placeholder == 1 && $treelevel < $reportlevel) { for ($k = 0; $k < $m; $k++) { $displayamt[$k] = ""; } } else { for ($k = 0; $k < $m; $k++) { // $acc->($datefrom1,$dateto1,$accounts_id,0); $datefrom = "0000-00-00"; $dateto = getLastDayByMonth($monthname[$k]); $transactionamt[$k] = $acc->getAccountDateRangeValue($datefrom, $dateto, $accounts_id, 0, $organization_id); //$transactionamt2=$acc->getAccountsPeriodBalance($periodto_id,$accounts_id,0); if ($classtype == "6L" || $classtype == "7E") { $displayamt[$k] = number_format($transactionamt[$k] * -1, 0, ".", ""); } else { $displayamt[$k] = number_format($transactionamt[$k], 0, ".", ""); } } } $tmparray = array(); $data = array($prefix . $displaytext); for ($k = 0; $k < $m; $k++) { $data[] = $displayamt[$k]; } switch ($classtype) { case "5A":
if ($treelevel == 1) { $prefix = ""; } elseif ($treelevel == 2) { $prefix = " "; } elseif ($treelevel == 3) { $prefix = " "; } elseif ($treelevel == 4) { $prefix = " "; } if ($showplacefolderindicator == 1 && $placeholder == 1) { $displaytext = $prefix . "[" . $accounts_name . "]"; } else { $displaytext = $prefix . $accounts_name; } if ($placeholder == 1 && $treelevel == $reportlevel) { $transactionamt1 = $acc->getAccountDateRangeValue($datefrom1, $dateto1, $accounts_id, 0, $organization_id); $transactionamt2 = $acc->getAccountDateRangeValue($datefrom2, $dateto2, $accounts_id, 0, $organization_id); } elseif ($placeholder == 1) { $transactionamt1 = 0; $transactionamt2 = 0; } switch ($classtype) { case "1S": $totalsales1 = $totalsales1 + $transactionamt1; $totalsales2 = $totalsales2 + $transactionamt2; if ($placeholder == 0) { $displayamt1 = changeNegativeNumberFormat($transactionamt1 * -1, 2); $displayamt2 = changeNegativeNumberFormat($transactionamt2 * -1, 2); } elseif ($placeholder == 1 && $treelevel < $reportlevel) { $displayamt1 = ""; $displayamt2 = "";