Changeset 227


Ignore:
Timestamp:
Jun 1, 2009, 11:07:05 AM (15 years ago)
Author:
george
Message:
  • Opraveno: Stav účtu u měsíčních plateb byl posunut o poslední platbu.
  • Upraveno: Zobrazovat stav účtu ve výpisu uživatele nahoře.
Location:
trunk/finance
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/finance/manage.php

    r226 r227  
    596596        'Vaše platební období: <strong>'.$this->System->Modules['Finance']->BillingPeriods[$Member['BillingPeriod']]['Name'].'</strong><br />'."\n".
    597597        'Pravidelná platba za období: <strong>'.$MemberPayment['MonthlyTotal'].' Kč</strong><br />'."\n".
    598         'Stav vašeho účtu: <strong>'.$MemberPayment['Cash'].' Kč</strong><br /><br />'."\n";
     598        'Stav vašeho účtu: <strong>'.($MemberPayment['Cash'] - $MemberPayment['MonthlyTotal']).' Kč</strong><br /><br />'."\n";
    599599      $Content .= 'Nové finanční operace:<br/>'.
    600600        '<table style="margin-left: auto; margin-right: auto; border-style: solid; border-width: 1px; border-collapse: collapse;"><tr><th style="border-style: solid; border-width: 1px; padding: 1px 5px 1px 5px; text-align: center; font-weight: bold;">Čas</th><th style="border-style: solid; border-width: 1px; padding: 1px 5px 1px 5px; text-align: center;; font-weight: bold;">Popis</th><th style="border-style: solid; border-width: 1px; padding: 1px 5px 1px 5px; text-align: center;; font-weight: bold;">Částka [Kč]</th></tr>'."\n";
  • trunk/finance/user_state.php

    r207 r227  
    4242    $Output = '<table width="100%" border="0" cellspacing="0" cellpadding="3"><tr><td valign="top">';
    4343
     44    $UserOperationTableQuery = '((SELECT Text, Time, Value AS Value, Bill FROM FinanceOperation WHERE (Subject='.$Subject['Id'].')) UNION ALL '.
     45      '(SELECT Text, TimeCreation as Time, -Value as Value, Bill FROM FinanceClaimsLiabilities WHERE (Subject='.$Subject['Id'].')) ORDER BY Time DESC) AS T1';
     46    $DbResult = $this->Database->query('SELECT SUM(T1.Value) AS Total FROM '.$UserOperationTableQuery);
     47    $DbRow = $DbResult->fetch_array();
     48    $Total = $DbRow['Total'];
     49    $Output .= 'Stav účtu: <strong>'.$Total.' Kč</strong<br /><br />';
     50
    4451    // Tabulka operaci
    45     $Output .= 'Výpis operací pro subjekt '.$Subject['Name'].':<br>';
     52    $Output .= 'Výpis operací pro subjekt '.$Subject['Name'].':<br />';
    4653    $Output .= '<table style="font-size: smaller;" class="WideTable"><tr><th>Datum</th><th>Popis</th><th>Částka</th><th>Doklad</th></tr>';
    4754    $Operations = array();
    48     $UserOperationTableQuery = '((SELECT Text, Time, Value AS Value, Bill FROM FinanceOperation WHERE (Subject='.$Subject['Id'].')) UNION ALL '.
    49       '(SELECT Text, TimeCreation as Time, -Value as Value, Bill FROM FinanceClaimsLiabilities WHERE (Subject='.$Subject['Id'].')) ORDER BY Time DESC) AS T1';
    5055    $DbResult = $this->Database->query('SELECT T1.* FROM '.$UserOperationTableQuery);
    5156    while($DbRow = $DbResult->fetch_array())
     
    6065    //echo('<tr><td>&nbsp;</td><td>-'.$Row2['network_device'].'</td><td>Proměnná cena za zařízení</td></tr>
    6166    $Output .= '</table>';
    62     $DbResult = $this->Database->query('SELECT SUM(T1.Value) AS Total FROM '.$UserOperationTableQuery);
    63     $DbRow = $DbResult->fetch_array();
    64     $Total = $DbRow['Total'];
    65     $Output .= '<h3><strong>Stav účtu: </strong>'.$Total.' Kč</h3><br>';
    6667    $Output .= '</td><td valign="top">';
    6768
Note: See TracChangeset for help on using the changeset viewer.