Ignore:
Timestamp:
Feb 16, 2009, 2:09:57 PM (15 years ago)
Author:
george
Message:
  • Upraveno: Další soubory přepracované do nového systému zobrazování.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • www/finance/inventory.php

    r4 r152  
    11<?php
    2 include('../global.php');
    3 include('../style.php');
     2include_once('../global.php');
     3include_once('include.php');
    44
    5 ShowHeader('Zařízení sítě','Zařízení');
     5class FinanceStoragePage extends Page
     6{
     7  var $FullTitle = 'Skladové zásoby';
     8  var $ShortTitle = 'Sklad';
    69
    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  }
    1626}
    1727
    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();
    2030
    21 ShowFooter();
    2231?>
Note: See TracChangeset for help on using the changeset viewer.