Changeset 508


Ignore:
Timestamp:
Apr 1, 2013, 8:36:27 PM (12 years ago)
Author:
chronos
Message:
  • Opraveno: Negenerovat faktury pokud fakturovaná částka je nula.
  • Přidáno: Zobrazení akcí při prohlížení položek správy dat.
  • Přidáno: V tabulce Subjektů se nyní zobrazují související platby.
Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Common/Version.php

    r507 r508  
    11<?php
    22
    3 $Revision = 507; // Subversion revision
     3$Revision = 508; // Subversion revision
    44$DatabaseRevision = 507;
    55$ReleaseTime = '2013-04-01';
  • trunk/Modules/FinanceBankAPI/FileImport.php

    r502 r508  
    3030  {   
    3131    if(!$this->System->Modules['User']->CheckPermission('Finance', 'SubjectList')) return('Nemáte oprávnění');
    32    
     32     
    3333    $DbResult = $this->Database->select('FinanceBankAccount', '*', 'Id='.$_GET['id']);
    3434    $BankAccount = $DbResult->fetch_assoc();
  • trunk/Modules/IS/IS.php

    r502 r508  
    1414      return('Nemáte oprávnění');
    1515
    16     $DbResult = $this->Database->select('ISMenuItem', '*');
     16    $DbResult = $this->Database->select('ISMenuItem', '*', '1 ORDER BY Parent,Name');
    1717    while($DbRow = $DbResult->fetch_assoc())
    1818    {
     
    126126  function ShowView($Table, $Id)
    127127  {
     128    if($Table != '') $FormClass = $this->System->FormManager->Classes[$Table];
     129      else return($this->SystemMessage('Chyba', 'Tabulka nenalezena'));
     130   
    128131    $Form = new Form($this->System->FormManager);
    129132    $Form->SetClass($Table);
     
    140143    $Output .= '<li><a href="?a=add"><img alt="Přidat" title="Přidat" src="'.
    141144      $this->System->Link('/images/add.png').'"/>Přidat</a></li>';
     145    if(array_key_exists('ItemActions', $FormClass))
     146    {
     147      foreach($FormClass['ItemActions'] as $Action)
     148        $Output .= '<li><a href="'.$this->System->Link($Action['URL']).'&amp;id='.$Id.'"><img alt="'.$Action['Caption'].'" title="'.$Action['Caption'].'" src="'.
     149            $this->System->Link('/images/action.png').'"/>'.$Action['Caption'].'</a></li>';
     150    } 
    142151    $Output .= '</ul><br/>';
    143152   
  • trunk/finance/manage.php

    r507 r508  
    320320      'ON Subject.Id=Member.Subject LEFT JOIN FinanceBillingPeriod ON '.
    321321      'FinanceBillingPeriod.Id=Member.BillingPeriodNext WHERE (Member.Blocked = 0)'.
    322       'AND (Member.BillingPeriodNext > 1)';
     322      'AND (Member.BillingPeriodNext > 1) AND (MemberPayment.MonthlyTotal != 0)';
    323323   
    324324    $DbResult = $this->Database->query('SELECT COUNT(*) FROM ('.$SQL.') AS T');
     
    404404          $MonthlyTotal -= $Member['MonthlyPlus'];
    405405        }
    406         $PayPerPeriod = $MonthlyTotal * $Period['MonthCount'];
    407    
    408         $TimePeriodText = date('j.n.Y', $Period['From']).' - '.date('j.n.Y', $Period['To']);
    409         $Output .= $TimePeriodText.': '.$MonthlyTotal.' * '.$Period['MonthCount'].' = '.$PayPerPeriod.'<br />';
    410         $this->InsertInvoice($Member['Subject'], time(), time() + 3600 * 24 * INVOICE_DUE_DAYS,
    411           $InvoiceItems, INVOICE_OUT_DOC_LINE, $Period['From'], $Period['To']);
    412    
    413         $Output .= $this->SendPaymentEmail($Member['Id']);
     406        $PayPerPeriod = $MonthlyTotal * $Period['MonthCount']; 
     407        if($PayPerPeriod != 0)
     408        {
     409          $TimePeriodText = date('j.n.Y', $Period['From']).' - '.date('j.n.Y', $Period['To']);
     410          $Output .= $TimePeriodText.': '.$MonthlyTotal.' * '.$Period['MonthCount'].' = '.$PayPerPeriod.'<br />';
     411          $this->InsertInvoice($Member['Subject'], time(), time() + 3600 * 24 * INVOICE_DUE_DAYS,
     412            $InvoiceItems, INVOICE_OUT_DOC_LINE, $Period['From'], $Period['To']);
     413   
     414          $Output .= $this->SendPaymentEmail($Member['Id']);
     415        } else $Output .= '<br />';
    414416        $this->Database->update('Member', 'Id='.$Member['Id'],
    415417          array('BillingPeriodLastDate' => TimeToMysqlDateTime($Period['To'])));
  • trunk/finance/user_state.php

    r507 r508  
    6969    $DbRow = $DbResult->fetch_array();
    7070    $Total = $DbRow['Total'];
    71     $Output .= 'Stav účtu: <strong>'.$Total.' Kč</strong<br /><br /><br/>';
     71    $Output .= 'Stav účtu: <strong>'.round($Total, 2).' Kč</strong<br /><br /><br/>';
    7272   
    7373    // Tabulka operaci
     
    9191      $Output .= '<tr><td style="text-align: right;">'.HumanDate($Row['Time']).'</td>'.
    9292      '<td style="text-align: left;">'.$Row['Text'].'</td>'.
    93       '<td style="text-align: right;">'.$Row['Value'].'</td>'.
     93      '<td style="text-align: right;">'.round($Row['Value'], 2).'</td>'.
    9494      '<td style="text-align: center;">'.$Period.'</td>'.
    9595      '<td style="text-align: center;">'.$Invoice.'</td></tr>';
     
    9797    }
    9898    $Output .= '<tr><td style="text-align: right;" colspan="2"><strong>Celkem za rok</strong></td>'.
    99     '<td style="text-align: right;"><strong>'.$SumValue.'</strong></td>'.
     99    '<td style="text-align: right;"><strong>'.round($SumValue, 2).'</strong></td>'.
    100100    '<td style="text-align: center;">&nbsp;</td>'.
    101101    '<td style="text-align: center;">&nbsp;</td></tr>';
  • trunk/form_classes.php

    r507 r508  
    537537      'Note' => array('Type' => 'String', 'Caption' => 'Poznámka', 'Default' => ''),
    538538      'Customer' => array('Type' => 'TMemberListSubject', 'Caption' => 'Členové', 'Default' => ''),
     539      'Operations' => array('Type' => 'TFinanceOperationListSubject', 'Caption' => 'Platby', 'Default' => ''),
     540      'Invoices' => array('Type' => 'TFinanceInvoiceListSubject', 'Caption' => 'Faktury', 'Default' => ''),
    539541    ),
    540542  ),
     
    12981300    'Filter' => '1',
    12991301  ),
     1302  'TFinanceOperationListSubject' => array(
     1303    'Type' => 'ManyToOne',
     1304    'Table' => 'FinanceOperation',
     1305    'Id' => 'Id',
     1306    'Ref' => 'Subject',
     1307    'Filter' => '1',
     1308  ),
     1309  'TFinanceInvoiceListSubject' => array(
     1310    'Type' => 'ManyToOne',
     1311    'Table' => 'FinanceInvoice',
     1312    'Id' => 'Id',
     1313    'Ref' => 'Subject',
     1314    'Filter' => '1',
     1315  ),
    13001316);
    13011317}
  • trunk/system/generators/dns.php

    r440 r508  
    33if(isset($_SERVER['REMOTE_ADDR'])) die();
    44include('../../Common/Global.php');
     5$Database = &$System->Database;
    56
    67$BaseDomain = 'zdechov.net';
Note: See TracChangeset for help on using the changeset viewer.