6 include ('includes/session.inc');
8 $title = _('GL Codes Inquiry');
10 include('includes/header.inc');
12 $SQL = 'SELECT group_,
15 FROM chartmaster INNER JOIN accountgroups ON chartmaster.group_ = accountgroups.groupname
16 ORDER BY sequenceintb,
19 $ErrMsg = _('No general ledger accounts were returned by the SQL because');
20 $AccountsResult = DB_query($SQL,$db,$ErrMsg);
22 /*show a table of the orders returned by the SQL */
24 echo "<CENTER><TABLE CELLPADDING=2 COLSPAN=2>
26 <TD class='tableheader'>"._('Group')."</FONT></TD>
27 <TD class='tableheader'>"._('Code')."</FONT></TD>
28 <TD class='tableheader'>"._('Account Name').'</FONT></TD>
32 $k=0; //row colour counter
35 while ($myrow=DB_fetch_array($AccountsResult)) {
37 echo "<tr bgcolor='#CCCCCC'>";
40 echo "<tr bgcolor='#EEEEEE'>";
44 if ($myrow['group_']== $ActGrp){
46 <td><FONT SIZE=2>%s</FONT></td>
47 <td><FONT SIZE=2>%s</FONT></td>
49 $myrow['accountcode'],
50 $myrow['accountname']);
52 $ActGrp = $myrow['group_'];
53 printf("<td><FONT SIZE=2>%s</FONT></td>
54 <td><FONT SIZE=2>%s</FONT></td>
55 <td><FONT SIZE=2>%s</FONT></td>
58 $myrow['accountcode'],
59 $myrow['accountname']);
64 echo "<TR><TD class='tableheader'>"._('Group')."</FONT></TD>
65 <TD class='tableheader'>"._('Code')."</FONT></TD>
66 <TD class='tableheader'>"._('Account Name').'</FONT></TD></TR>';
71 echo '</TABLE></CENTER>';
73 include('includes/footer.inc');