- modules/fotolab updated imagej to current version & some cod fixes to make it work
[care2x.git] / Care2007 / modules / weberp / GLCodesInquiry.php
blobc54d406aeae3d9927001b4d74a58082d9def0831
1 <?php
3 /* $Revision: 1.7 $ */
5 $PageSecurity = 8;
6 include ('includes/session.inc');
8 $title = _('GL Codes Inquiry');
10 include('includes/header.inc');
12 $SQL = 'SELECT group_,
13 accountcode ,
14 accountname
15 FROM chartmaster INNER JOIN accountgroups ON chartmaster.group_ = accountgroups.groupname
16 ORDER BY sequenceintb,
17 accountcode';
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>
25 <TR>
26 <TD class='tableheader'>"._('Group')."</FONT></TD>
27 <TD class='tableheader'>"._('Code')."</FONT></TD>
28 <TD class='tableheader'>"._('Account Name').'</FONT></TD>
29 </TR>';
31 $j = 1;
32 $k=0; //row colour counter
33 $ActGrp ='';
35 while ($myrow=DB_fetch_array($AccountsResult)) {
36 if ($k==1){
37 echo "<tr bgcolor='#CCCCCC'>";
38 $k=0;
39 } else {
40 echo "<tr bgcolor='#EEEEEE'>";
41 $k++;
44 if ($myrow['group_']== $ActGrp){
45 printf("<td></td>
46 <td><FONT SIZE=2>%s</FONT></td>
47 <td><FONT SIZE=2>%s</FONT></td>
48 </tr>",
49 $myrow['accountcode'],
50 $myrow['accountname']);
51 } else {
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>
56 </tr>",
57 $myrow['group_'],
58 $myrow['accountcode'],
59 $myrow['accountname']);
61 $j++;
62 If ($j == 18){
63 $j=1;
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>';
69 //end of while loop
71 echo '</TABLE></CENTER>';
73 include('includes/footer.inc');