Ignore:
Timestamp:
Mar 3, 2013, 1:03:25 PM (11 years ago)
Author:
chronos
Message:
  • Upraveno: Zobecněn proces aktualizace dat tabulek při přechodu na nové období. Nyní se používá pole Action jakožto akce přidat, změnit, odebrat a ReplaceId jakožto id položky, které se operace týká.
  • Přidáno: Podpora pro uživatelské akce v seznamech v sekci Správa dat.
  • Upraveno: Řešení procesu generování nových faktur a plateb zákazníků při přechodu na nové období.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/finance/clenove.php

    r479 r497  
    1717      'Subject.Name, NetworkDevice, '.
    1818      '(SELECT GROUP_CONCAT(Service.Name) FROM ServiceCustomerRel LEFT JOIN Service '.
    19       'ON Service.Id=ServiceCustomerRel.Service WHERE ServiceCustomerRel.Customer=Member.Id AND ServiceCustomerRel.Period=0) AS ServicesCurrentMonth, '.
    20       '(SELECT GROUP_CONCAT(Service.Name) FROM ServiceCustomerRel LEFT JOIN Service '.
    21       'ON Service.Id=ServiceCustomerRel.Service WHERE ServiceCustomerRel.Customer=Member.Id AND ServiceCustomerRel.Period=1) AS ServicesNextMonth, '.
     19      'ON Service.Id=ServiceCustomerRel.Service WHERE ServiceCustomerRel.Customer=Member.Id AND '.
     20      'ServiceCustomerRel.Action IS NULL) AS ServicesCurrentMonth, '.
     21      //'(SELECT GROUP_CONCAT(Service.Name) FROM ServiceCustomerRel LEFT JOIN Service '.
     22      //'ON Service.Id=ServiceCustomerRel.Service WHERE ServiceCustomerRel.Customer=Member.Id AND '.
     23      //'ServiceCustomerRel.Period=1) AS ServicesNextMonth, '.
    2224      'User.Name AS FullName FROM MemberPayment LEFT JOIN Member ON '.
    2325      'Member.Id=MemberPayment.Member LEFT JOIN Subject ON Subject.Id=Member.Subject '.
     
    3638      array('Name' => 'Cash', 'Title' => 'Stav účtu [Kč]'),
    3739      array('Name' => 'ServicesCurrentMonth', 'Title' => 'Běžící tarif'),
    38       array('Name' => 'ServicesNextMonth', 'Title' => 'Příští tarif'),
     40      //array('Name' => 'ServicesNextMonth', 'Title' => 'Příští tarif'),
    3941      array('Name' => 'Note', 'Title' => 'Poznámky'),
    4042      array('Name' => 'WWW', 'Title' => 'WWW'),
     
    5557      if($Row['Cash'] < 0) $Row['Cash'] = '<span style="color: red;">'.$Row['Cash'].'</span>';
    5658      $Tarif = $Row['ServicesCurrentMonth'];
    57       $PristiTarif = $Row['ServicesNextMonth'];
     59      //$PristiTarif = $Row['ServicesNextMonth'];
    5860      $Output .= '<tr><td>'.$Row['FullName'].'</td><td><a href="user_state.php?Subject='.$Row['Id'].'">'.$Row['Name'].'</a></td>';
    5961      //<td align="right">'.$Row['network_device'].'</td>
    60       $Output .= '<td align="right">'.$Row['MonthlyTotal'].'</td><td align="right">'.$Row['Cash'].'</td><td align="center">'.$Tarif.'</td><td align="center">'.$PristiTarif.'</td><td>'.$Row['Note'].'</td><td>'.$Row['WWW'].'</td></tr>';
     62      $Output .= '<td align="right">'.$Row['MonthlyTotal'].'</td><td align="right">'.$Row['Cash'].'</td>'.
     63      '<td align="center">'.$Tarif.'</td>'.
     64      //'<td align="center">'.$PristiTarif.'</td>'.
     65      '<td>'.$Row['Note'].'</td><td>'.$Row['WWW'].'</td></tr>';
    6166      $TotalDevice += $Row['NetworkDevice'];
    6267      $TotalMonth += ($Row['MonthlyTotal']);
     
    6469    $Output .= '<tr><td><strong>Celkem</strong></td><td>&nbsp;</td>';
    6570    //<td align="right"><strong>'.$TotalDevice.'</strong></td>
    66     $Output .= '<td align="right"><strong>'.$TotalMonth.'</strong></td><td align="right"><strong>'.$TotalCash.'</strong></td><td align="right">&nbsp;</td><td align="right">&nbsp;</td><td align="right">&nbsp;</td><td align="right">&nbsp;</td></tr>';
     71    $Output .= '<td align="right"><strong>'.$TotalMonth.'</strong></td>'.
     72    '<td align="right"><strong>'.$TotalCash.'</strong></td><td align="right">&nbsp;</td>'.
     73    //'<td align="right">&nbsp;</td>'.
     74    '<td align="right">&nbsp;</td><td align="right">&nbsp;</td></tr>';
    6775    $Output .= '</table>';
    6876    $Output .= $PageList['Output'];
Note: See TracChangeset for help on using the changeset viewer.