forked from webERP-team/webERP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PeriodsInquiry.php
56 lines (41 loc) · 1.2 KB
/
PeriodsInquiry.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
<?php
include ('includes/session.php');
$Title = _('Periods Inquiry');
include('includes/header.php');
$SQL = "SELECT periodno ,
lastdate_in_period
FROM periods
ORDER BY periodno";
$ErrMsg = _('No periods were returned by the SQL because');
$PeriodsResult = DB_query($SQL,$ErrMsg);
echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/transactions.png" title="' . $Title . '" alt="" />' . ' '
. $Title . '</p>';
/*show a table of the orders returned by the SQL */
$NumberOfPeriods = DB_num_rows($PeriodsResult);
$PeriodsInTable = round($NumberOfPeriods/3,0);
$TableHeader = '<tr><th>' . _('Period Number') . '</th>
<th>' . _('Date of Last Day') . '</th>
</tr>';
echo '<table><tr>';
for ($i=0;$i<3;$i++) {
echo '<td valign="top">';
echo '<table cellpadding="2" class="selection">';
echo $TableHeader;
$j=0;
while ($myrow=DB_fetch_array($PeriodsResult)){
echo '<tr class="striped_row">
<td>' . $myrow['periodno'] . '</td>
<td>' . ConvertSQLDate($myrow['lastdate_in_period']) . '</td>
</tr>';
$j++;
if ($j==$PeriodsInTable){
break;
}
}
echo '</table>';
echo '</td>';
}
echo '</tr></table>';
//end of while loop
include('includes/footer.php');
?>