Changeset 140


Ignore:
Timestamp:
Jan 21, 2009, 10:12:36 AM (15 years ago)
Author:
george
Message:
  • Odstraněno: Stará statistika nahrazena samostatným projektem z vlastního repozitáře.
Location:
www
Files:
8 added
1 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • www

    • Property svn:ignore
      •  

        old new  
        11config.php
        22php_script_error.log
         3statistic
         4
  • www/finance

    • Property svn:ignore set to
      doklady
  • www/finance/bills.php

    r133 r140  
    8383  }
    8484
     85
     86  function GenerateIncomeBill($BillId)
     87  {
     88    global $Database, $SpecificSymbol;
     89 
     90    $DbResult = $Database->select('finance_bills', '*', 'id='.$BillId);
     91    $Bill = $DbResult->fetch_array();
     92 
     93    $DbResult = $Database->select('users', '*', 'id='.$Bill['user_id']);
     94    $User = $DbResult->fetch_array();
     95
     96    $Dodavka = array();
     97    $DbResult = $Database->select('finance_bills_items', '*', 'bill_id='.$BillId);
     98    while($Item = $DbResult->fetch_array())
     99    {
     100      $Dodavka[$Item['id']] = $Item;
     101    }
     102 
     103    $Output = '<table width="100%" border="1"><tr><td>'.
     104      '<strong>Subjekt:</strong><br>'.
     105      $User['subject_name'].'<br>'.
     106      $User['street'].'<br>'.
     107      $User['psc'].' '.$User['town'].'<br>';
     108      if($User['ico'] != 0) $Output .= 'IČ: '.$User['ico'].'<br>';
     109      if($User['dic'] != '') $Output .= 'DIČ: '.$User['dic'].'<br>';
     110      $Output .=
     111      '</td><td>'.
     112      'PŘÍJMOVÝ POKLADNÍ DOKLAD<br><br>'.
     113      'Číslo dokladu: '.$Bill['BillCode'].'<br>'.
     114      'Datum vystavení: '.HumanDate($Bill['time_create']).'<br>'.
     115      '</td></tr>'.
     116      '<tr><td colspan="2"><strong>Přijato od:</strong><br>'.
     117      '</td></tr>'.
     118      '<tr><td colspan="2"><strong>Částka: '.
     119      '<strong>Platební podmínky:</strong><br>'.
     120      'Variabilní symbol: '.$User['id'].'<br>'.
     121      'Specifický symbol: '.$this->SpecificSymbol.'<br>'.
     122      'Konstantní symbol:<br>'.
     123      'Způsob úhrady: převodem'.
     124      '</td><td valign="top">'.
     125      '<br>'.
     126      'Datum zdanitel. plnění: '.HumanDate($Bill['time_create']).'<br>'.
     127      'Datum splatnosti: '.HumanDate($Bill['time_due']).'<br>';
     128      if(($Bill['time_from'] != '0000-00-00 00:00:00') and ($Bill['time_to'] != '0000-00-00 00:00:00'))
     129        $Output .= 'Fakturované období: '.HumanDate($Bill['time_from']).' - '.HumanDate($Bill['time_to']).'<br>';
     130      $Output .= '</td></tr>'.
     131      '<tr><td colspan="2">'.
     132      '<hr>'.
     133      '<br>'.
     134      '<table border="0" width="100%">'.
     135      '<tr><th align="left">Dodávka</th><th align="right">Množství</th><th align="right">Cena/MJ</th><th align="right">Celkem</th></tr>'.
     136      '<tr><td colspan="4"><hr></td></tr>';
     137   
     138    $Total = 0;
     139    foreach($Dodavka as $Polozka)
     140    {
     141      $Output .= '<tr><td>'.$Polozka['description'].'</td><td align="right">'.$Polozka['quantity'].'</td><td align="right">'.$Polozka['price'].'&nbsp;Kč</td><td align="right">'.($Polozka['quantity'] * $Polozka['price']).'&nbsp;Kč</td></tr>';
     142      $Total += ($Polozka['quantity'] * $Polozka['price']);
     143    }
     144    $Output .= '<tr><th colspan="3" align="left">Celkem</th><th align="right">'.$Total.'&nbsp;Kč</th></tr>';
     145    $Output .= '</table>'.
     146      '</td></tr>'.
     147      '<tr><td colspan="2"><hr></td></tr>'.
     148      '</table>';
     149
     150    return($Output);
     151  }
     152
    85153  function CreateBill($UserId, $Items, $TimeFrom, $TimeTo, $BillCode)
    86154  {
  • www/index.php

    r129 r140  
    9797<strong>Důležité odkazy:</strong><br />
    9898<img alt="" src="images/favicons/money.gif" width="16" height="16" /> <a href="finance/">Finance</a><br />
    99 <img alt="" src="images/favicons/chart.gif" width="16" height="16" /> <a href="statistic/trafficview2.php">Statistika</a><br />
     99<img alt="" src="images/favicons/chart.gif" width="16" height="16" /> <a href="http://stat.zdechov.net/centrala/">Statistiky</a><br />
    100100<img alt="" src="images/favicons/prohledavac_sdileni.gif" width="15" height="15" /> <a href="share">Prohledat sdílení</a><br />
    101101<img alt="" src="images/favicons/comp.gif" width="16" height="16" /> <a href="userlist.php">Seznam uživatelů</a><br />
  • www/style.php

    r130 r140  
    137137  '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'."\n".
    138138  '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">'."\n".
     139  '<meta http-equiv="content-type" content="text/html; charset=utf-8" />'.
    139140  '<head><link rel="stylesheet" href="'.$Config['Web']['RootFolder'].'/style.css" type="text/css" media="all" />'."\n".
    140141  '<script type="text/javascript" src="'.$Config['Web']['RootFolder'].'/global.js"></script>'."\n".
Note: See TracChangeset for help on using the changeset viewer.