Changeset 152 for www/finance/inventory.php
- Timestamp:
- Feb 16, 2009, 2:09:57 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
www/finance/inventory.php
r4 r152 1 1 <?php 2 include ('../global.php');3 include ('../style.php');2 include_once('../global.php'); 3 include_once('include.php'); 4 4 5 ShowHeader('Zařízení sítě','Zařízení'); 5 class FinanceStoragePage extends Page 6 { 7 var $FullTitle = 'Skladové zásoby'; 8 var $ShortTitle = 'Sklad'; 6 9 7 // Seznam segmentů a zařízení 8 $TotalPrice = 0; 9 echo('Výpis skladových zásob:<br><table style="font-size: smaller;" border="1" cellspacing="0" cellpadding="3">'); 10 echo('<tr><th>Název</th><th>Datum<br>zakoupení</th><th>Cena [Kč]</th><th>Počet</th><th>Cena<br> dohromady [Kč]</th></tr>'); 11 $DbResult = $Database->query("SELECT * FROM network_devices WHERE used=2"); 12 while($Row = $DbResult->fetch_array()) 13 { 14 echo('<tr><td>'.$Row['name'].'</td><td align="right">'.HumanDate($Row['date']).'</td><td align="right">'.$Row['price'].'</td><td align="right">'.$Row['count'].'</td><td align="right">'.$Row['count'] * $Row['price'].'</td></tr>'); 15 $TotalPrice = $TotalPrice + $Row['count'] * $Row['price']; 10 function Show() 11 { 12 $TotalPrice = 0; 13 $Output = 'Výpis skladových zásob:<br><table class="WideTable">'; 14 $Output .= '<tr><th>Název</th><th>Datum<br />zakoupení</th><th>Cena [Kč]</th><th>Počet</th><th>Cena<br /> dohromady [Kč]</th></tr>'; 15 $DbResult = $this->Database->query("SELECT * FROM network_devices WHERE used=2"); 16 while($Row = $DbResult->fetch_array()) 17 { 18 $Output .= '<tr><td>'.$Row['name'].'</td><td align="right">'.HumanDate($Row['date']).'</td><td align="right">'.$Row['price'].'</td><td align="right">'.$Row['count'].'</td><td align="right">'.$Row['count'] * $Row['price'].'</td></tr>'; 19 $TotalPrice = $TotalPrice + $Row['count'] * $Row['price']; 20 } 21 22 $Output .= '<tr><td colspan="4"><strong>Celkem:</strong></td><td align="right"><strong>'.$TotalPrice.'</strong></td></tr>'; 23 $Output .= '</table>'; 24 return($Output); 25 } 16 26 } 17 27 18 echo('<tr><td colspan="4"><strong>Celkem:</strong></td><td align="right"><strong>'.$TotalPrice.'</strong></td></tr>');19 echo('</table>');28 $System->AddModule(new FinanceStoragePage()); 29 $System->Modules['FinanceStoragePage']->GetOutput(); 20 30 21 ShowFooter();22 31 ?>
Note:
See TracChangeset
for help on using the changeset viewer.