forked from timschofield/webERP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGLCodesInquiry.php
62 lines (48 loc) · 1.58 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
<?php
include ('includes/session.php');
$Title = _('GL Codes Inquiry');
$ViewTopic = 'GeneralLedger';
$BookMark = '';
include('includes/header.php');
echo '<p class="page_title_text">
<img src="'.$RootPath.'/css/'.$Theme.'/images/printer.png" title="' . _('Print') . '" alt="" />' . ' ' . _('Print Invoices or Credit Notes (Portrait Mode)') . '
</p>';
$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,$ErrMsg);
/*show a table of the orders returned by the SQL */
echo '<table cellpadding="2">
<thead style="position: -webkit-sticky; position: sticky; top: 0px; z-index: 100;">
<tr>
<th>' . _('Group') . '</th>
<th>' . _('Code') . '</th>
<th>' . _('Account Name') . '</th>
</tr>
</thead>';
$j = 1;
$ActGrp ='';
while ($MyRow=DB_fetch_array($AccountsResult)) {
if ($MyRow['group_']== $ActGrp) {
echo '<tr class="striped_row">
<td></td>
<td>', $MyRow['accountcode'], '</td>
<td>', htmlspecialchars($MyRow['accountname'],ENT_QUOTES,'UTF-8',false), '</td>
</tr>';
} else {
$ActGrp = $MyRow['group_'];
echo '<tr class="striped_row">
<td><b>', $MyRow['group_'], '</b></td>
<td>', $MyRow['accountcode'], '</td>
<td>', htmlspecialchars($MyRow['accountname'],ENT_QUOTES,'UTF-8',false), '</td>
</tr>';
}
}
//end of while loop
echo '</table>';
include('includes/footer.php');
?>