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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
<? require("inc/configure.php"); require("inc/global.php"); require("inc/checklogin.php"); if ($logged_in == 0) { //echo 'Not logged in. <a href="login.php">Login</a>'; header('Window-target: _parent'); header('Location: login.php'); exit(); } if (checkObject(7) <> 1){ die("Unauthorized Access"); exit(); } ?> <html> <head> <title><?=$systitle?></title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link rel="stylesheet" href="main.css" type="text/css"> </head> <body bgcolor="#FFFFFF" leftmargin="10" topmargin="10" marginwidth="0" marginheight="0"> <p class="pageheader"><?=receipt?></p> <p class="contentmsg"><?=$msg?></p> <table> <tr><td valign="top" width="780" class="content"> <a href="receiptheader.php"><img src="icons/new.jpg" border="0"></a> </td></tr> </table>
<table width="780" cellpadding="1" cellspacing="1" border="0" bgcolor="#CCCCCC"> <tr><td class="content" bgcolor="#FFFFFF" align="center"><?=receiptno?></td> <td class="content" bgcolor="#FFFFFF" align="center"><?=custno?></td> <td class="content" bgcolor="#FFFFFF" align="center"><?=custname?></td> <td class="content" bgcolor="#FFFFFF" align="center"><?=telno?></td> <td class="content" bgcolor="#FFFFFF" align="center"><?=faxno?></td> <td class="content" bgcolor="#FFFFFF" align="center">Date</td> <td class="content" bgcolor="#FFFFFF" align="center"><?=amount?></td> <td class="content" bgcolor="#FFFFFF" align="center">Status</td> <td class="content" bgcolor="#FFFFFF" align="center"><?=paymentmethod?></td> </tr> <? $sql = "SELECT receiptno , custid , custno , custnameeng , telno , faxno , orderdate , amount , case when a.status = 1 then 'Open' when a.status = 2 then 'Posted' end as status , b.paymentmethod from AR_RECEIPT_HDR a, SYS_PAYMENTMETHOD b where a.paymentmethodid = b.paymentmethodid order by receiptno desc "; $totalamount = 0.0; $result = mysql_query($sql); while ($row = mysql_fetch_array($result,MYSQL_ASSOC)) { ?> <tr><td class="content" bgcolor="#FFFFFF"><a href='receiptheader.php?receiptno=<?=$row{'receiptno'}?>'><b><i><?=$row{'receiptno'}?></i></b></a></td> <td class="content" bgcolor="#FFFFFF"><?=$row{'custno'}?></td> <td class="content" bgcolor="#FFFFFF"><?=$row{'custnameeng'}?></td> <td class="content" bgcolor="#FFFFFF"><?=$row{'telno'}?></td> <td class="content" bgcolor="#FFFFFF"><?=$row{'faxno'}?></td> <td class="content" bgcolor="#FFFFFF"><?=$row{'orderdate'}?></td> <td class="content" bgcolor="#FFFFFF" align="right"><?=number_format($row{'amount'},2)?></td> <td class="content" bgcolor="#FFFFFF"><?=$row{'status'}?></td> <td class="content" bgcolor="#FFFFFF" align='center'><?=$row{'paymentmethod'}?></td> </tr> <? $totalamount = $totalamount + $row{'amount'}; } ?> <tr><td colspan="6" bgcolor="#FFFFFF"></td> <td class="content" bgcolor="#FFFFFF" align="right"><?=number_format($totalamount, 2);?></td> <td bgcolor="#FFFFFF"></td><td bgcolor="#FFFFFF"></td></tr> </table> <br /> <br /> </body> </html>
|