forked from timschofield/webERP-Medical
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGLCodesInquiry.php
69 lines (55 loc) · 1.48 KB
/
GLCodesInquiry.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
/* $Id$*/
include ('includes/session.inc');
$title = _('GL Codes Inquiry');
include('includes/header.inc');
$SQL = "SELECT group_,
accountcode ,
accountname
FROM chartmaster
INNER JOIN accountgroups
ON chartmaster.group_ = accountgroups.groupname
ORDER BY sequenceintb,
accountcode";
$ErrMsg = _('No general ledger accounts were returned by the SQL because');
$AccountsResult = DB_query($SQL,$db,$ErrMsg);
/*show a table of the orders returned by the SQL */
echo '<table cellpadding="2">
<tr>
<th>'._('Group').'</font></th>
<th>'._('Code').'</font></th>
<th>'._('Account Name').'</font></th>
</tr>';
$j = 1;
$k=0; //row colour counter
$ActGrp ='';
while ($myrow=DB_fetch_array($AccountsResult)) {
if ($k==1){
echo '<tr class="EvenTableRows">';
$k=0;
} else {
echo '<tr class="OddTableRows">';
$k++;
}
if ($myrow['group_']== $ActGrp){
printf('<td></td>
<td><font size="2">%s</font></td>
<td><font size="2">%s</font></td>
</tr>',
$myrow['accountcode'],
$myrow['accountname']);
} else {
$ActGrp = $myrow['group_'];
printf('<td><font size="2">%s</font></td>
<td><font size="2">%s</font></td>
<td><font size="2">%s</font></td>
</tr>',
$myrow['group_'],
$myrow['accountcode'],
$myrow['accountname']);
}
}
//end of while loop
echo '</table>';
include('includes/footer.inc');
?>