Browse/View/Edit chartofaccount records.
[capital-apms.git] / inc / view / chartofaccount.php
blob0432bdb89c4030fd32c30522593c3ec45f01d609
1 <?php
3 param_to_global( 'ac', '#^\d+(\.\d{0,2})?$#', 'ac', 'accountcode', 'id' );
5 // Viewer component for account
6 $viewer = new Viewer("Account", 'chartofaccount');
7 $viewer->SetWhere( "accountcode=$ac");
8 $viewer->GetRecord();
10 $template = <<<EOTEMPLATE
11 <table>
12 <tr>
13 <th class="right">Account:</th>
14 <td class="left">##accountcode.format.%07.2lf##</td>
15 </tr>
16 <tr>
17 <th class="right">Short name:</th>
18 <td class="left">##shortname##</td>
19 </tr>
20 <tr>
21 <th class="right">Name:</th>
22 <td class="left">##name##</td>
23 </tr>
24 <tr>
25 <th class="right">Group:</th>
26 <td class="left"><a href="/view.php?t=accountgroup&id=##accountgroupcode.urlencode##">##accountgroupcode##</a></td>
27 </tr>
28 <tr>
29 <th class="right">High volume:</th>
30 <td class="left">##highvolume##</td>
31 </tr>
32 <tr>
33 <th class="right">Update to:</th>
34 <td class="left">##updateto##</td>
35 </tr>
36 </table>
38 EOTEMPLATE;
40 $viewer->SetTemplate( $template );
41 $viewer->SetTitle("Account $ac - " . $viewer->Record->{'name'});
42 $c->page_title = $viewer->Title;
43 $page_elements[] = $viewer;
45 include_once("menus_entityaccount.php");