Ignore:
Timestamp:
Oct 7, 2012, 4:35:04 PM (12 years ago)
Author:
chronos
Message:
  • Upraveno: Zobrazení čísla účtu a variabilního symbolu v emailu.\n* Upraveno: Odesílání emailů pomocí třídy Mail.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/finance/user_state.php

    r410 r413  
    5959   
    6060    // Account state   
    61     $UserOperationTableQuery = '((SELECT Text, Time, Value AS Value, Bill FROM FinanceOperation WHERE (Subject='.$Subject['Id'].')) UNION ALL '.
    62       '(SELECT Text, TimeCreation as Time, -Value as Value, Bill FROM FinanceClaimsLiabilities WHERE (Subject='.$Subject['Id'].')) ORDER BY Time DESC) AS T1';
     61    $UserOperationTableQuery = '((SELECT Text, Time, Value AS Value, Bill, BillCode FROM FinanceOperation WHERE (Subject='.$Subject['Id'].')) UNION ALL '.
     62      '(SELECT Text, TimeCreation as Time, -Value as Value, Bill, BillCode FROM FinanceClaimsLiabilities WHERE (Subject='.$Subject['Id'].')) ORDER BY Time DESC) AS T1';
    6363    $DbResult = $this->Database->query('SELECT SUM(T1.Value) AS Total FROM '.$UserOperationTableQuery);
    6464    $DbRow = $DbResult->fetch_array();
    6565    $Total = $DbRow['Total'];
    66     $Output .= 'Stav účtu: <strong>'.$Total.' Kč</strong<br /><br />';
     66    $Output .= 'Stav účtu: <strong>'.$Total.' Kč</strong<br /><br /><br/>';
    6767
    6868   
     
    7979      if($Row['Value'] == -0) $Row['Value'] = 0;
    8080      if($Row['Value'] > 0) $Row['Value'] = '+'.$Row['Value'];
    81       if($Row['Bill'] > 0) $Invoice = '<a href="bill.php?Id='.$Row['Bill'].'">PDF</a>'; else $Invoice = '&nbsp;';
     81      if($Row['BillCode'] == '') $Row['BillCode'] = 'PDF';
     82      if($Row['Bill'] > 0) $Invoice = '<a href="bill.php?Id='.$Row['Bill'].'">'.$Row['BillCode'].'</a>'; else $Invoice = '&nbsp;';
    8283      $Output .= '<tr><td style="text-align: right;">'.HumanDate($Row['Time']).'</td><td style="text-align: left;">'.$Row['Text'].'</td><td style="text-align: right;">'.$Row['Value'].'</td><td style="text-align: center;">'.$Invoice.'</td></tr>';
    8384      $SumValue = $SumValue + $Row['Value'];
Note: See TracChangeset for help on using the changeset viewer.