Changeset 558
- Timestamp:
- Jul 21, 2013, 10:55:49 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/Version.php
r556 r558 1 1 <?php 2 2 3 $Revision = 55 6; // Subversion revision3 $Revision = 558; // Subversion revision 4 4 $DatabaseRevision = 551; // SQL structure revision 5 $ReleaseTime = '2013-07- 15';5 $ReleaseTime = '2013-07-21'; 6 6 -
trunk/Modules/Finance/Bill.php
r548 r558 32 32 function GenerateHTML() 33 33 { 34 global $SpecificSymbol, $Config;35 36 34 $DbResult = $this->Database->select('FinanceInvoice', '*', '`Id`='.$this->InvoiceId); 37 35 $Invoice = $DbResult->fetch_assoc(); … … 40 38 $Subject = $DbResult->fetch_assoc(); 41 39 42 $DbResult = $this->Database->select('Subject', '*', '`Id`='.$ Config['Finance']['MainSubjectId']);40 $DbResult = $this->Database->select('Subject', '*', '`Id`='.$this->System->Config['Finance']['MainSubjectId']); 43 41 $MainSubject = $DbResult->fetch_assoc(); 44 42 45 43 $DbResult = $this->Database->query('SELECT FinanceBankAccount.*, CONCAT(FinanceBankAccount.Number, "/", FinanceBank.Code) AS NumberFull FROM FinanceBankAccount '. 46 44 'JOIN FinanceBank ON FinanceBank.Id=FinanceBankAccount.Bank '. 47 'WHERE (FinanceBankAccount.`Subject`='.$ Config['Finance']['MainSubjectId'].') AND (FinanceBankAccount.`Use`=1)');45 'WHERE (FinanceBankAccount.`Subject`='.$this->System->Config['Finance']['MainSubjectId'].') AND (FinanceBankAccount.`Use`=1)'); 48 46 $MainSubjectAccount = $DbResult->fetch_assoc(); 49 47 … … 132 130 $Subject = $DbResult->fetch_assoc(); 133 131 134 $DbResult = $this->Database->select('Subject', '*', '`Id`='.$ Config['Finance']['MainSubjectId']);132 $DbResult = $this->Database->select('Subject', '*', '`Id`='.$this->System->Config['Finance']['MainSubjectId']); 135 133 $MainSubject = $DbResult->fetch_assoc(); 136 134 137 135 $DbResult = $this->Database->query('SELECT FinanceBankAccount.*, CONCAT(FinanceBankAccount.Number, "/", FinanceBank.Code) AS NumberFull FROM FinanceBankAccount '. 138 136 'JOIN FinanceBank ON FinanceBank.Id=FinanceBankAccount.Bank '. 139 'WHERE (FinanceBankAccount.`Subject`='.$ Config['Finance']['MainSubjectId'].') AND (FinanceBankAccount.`Use`=1)');137 'WHERE (FinanceBankAccount.`Subject`='.$this->System->Config['Finance']['MainSubjectId'].') AND (FinanceBankAccount.`Use`=1)'); 140 138 $MainSubjectAccount = $DbResult->fetch_assoc(); 141 139 … … 146 144 // $InvoiceItems[$Item['Id']] = $Item; 147 145 //} 146 $BooleanText = array('Ne', 'Ano'); 147 if($Operation['Value'] < 0) 148 $Desc = array( 149 'Type' => 'VÝDAJOVÝ', 150 'Signature' => 'Vydal', 151 'Sign' => -1, 152 'Target' => 'Vydáno komu', 153 ); 154 else $Desc = array( 155 'Type' => 'PŘÍJMOVÝ', 156 'Signature' => 'Přijal', 157 'Sign' => 1, 158 'Target' => 'Přijato od', 159 ); 148 160 149 161 $Output = '<table width="100%" border="1" cellspacing="0" cellpadding="3"><tr><td width="50%">'. … … 157 169 'Plátce DPH: '.$BooleanText[$MainSubject['PayVAT']]. 158 170 '</td><td width="50%" valign="top">'. 159 '<font size="5"><strong> PŘÍJMOVÝPOKLADNÍ DOKLAD</strong></font><br><br>'.160 'Číslo dokladu: '.$ Bill['BillCode'].'<br>'.161 'Datum vystavení: '.HumanDate($ Bill['TimeCreate']).'<br>'.171 '<font size="5"><strong>'.$Desc['Type'].' POKLADNÍ DOKLAD</strong></font><br><br>'. 172 'Číslo dokladu: '.$Operation['BillCode'].'<br>'. 173 'Datum vystavení: '.HumanDate($Operation['Time']).'<br>'. 162 174 '</td></tr>'. 163 '<tr><td colspan="2"><strong> Přijato od:</strong><br>'.175 '<tr><td colspan="2"><strong>'.$Desc['Target'].':</strong><br>'. 164 176 $Subject['Name'].'<br>'. 165 177 $Subject['AddressStreet'].'<br>'. … … 174 186 // $Total += ($Polozka['Quantity'] * $Polozka['Price']); 175 187 //} 188 $Description = $Operation['Text']; 189 $Total = $Operation['Value'] * $Desc['Sign']; 176 190 $Output .= '</td></tr>'. 177 191 '<tr><td colspan="2"><strong>Částka:</strong> '.$Total.' Kč<br><br>'. 178 192 '</td></tr>'. 179 193 '<tr><td colspan="2"><strong>Účel platby:</strong><br>'.$Description.'</td></tr>'. 180 '<tr><td> <br><br>Podpis příjemce:</td><td><br><br>Podpis pokladníka:</td></tr>';194 '<tr><td> </td><td><br><br>'.$Desc['Signature'].':</td></tr>'; 181 195 $Output .= '</table>'; 182 196 return($Output); -
trunk/Modules/Finance/Finance.php
r553 r558 363 363 'Taxable' => array('Type' => 'Boolean', 'Caption' => 'Zdanitelné', 'Default' => ''), 364 364 'Value' => array('Type' => 'Integer', 'Caption' => 'Částka', 'Default' => '0', 'Suffix' => 'Kč'), 365 'File' => array('Type' => 'TFile', 'Caption' => 'Doklad', 'Default' => '', 'Null' => true), 365 366 'Text' => array('Type' => 'String', 'Caption' => 'Popis', 'Default' => ''), 366 367 'Network' => array('Type' => 'Boolean', 'Caption' => 'Týkající sítě', 'Default' => ''), -
trunk/Modules/Finance/Manage.php
r553 r558 393 393 394 394 // FinanceOperations 395 $DbResult = $this->Database->query('SELECT * FROM `FinanceOperation` WHERE (`BillCode` <> "") '. 396 'AND (`Value` != 0) AND (`File` IS NULL) AND (`Generate` = 1)'); 397 while($Row = $DbResult->fetch_assoc()) 398 { 399 $DbResult2 = $this->Database->insert('File', array('Name' => '', 'Size' => 0, 400 'Directory' => $this->System->Modules['Finance']->DirectoryId, 'Time' => 'NOW()')); 401 $FileId = $this->Database->insert_id; 402 $FileName = 'doklad2-'.$FileId.'.pdf'; 403 $Bill = new BillOperation($this->System); 404 $Bill->Database = &$this->System->Database; 405 $Bill->System = &$this->System; 406 $Bill->OperationId = $Row['Id']; 407 $FullFileName = $this->System->Modules['File']->GetDir($this->System->Modules['Finance']->DirectoryId).$FileName; 408 $Bill->SaveToFile($FullFileName); 409 if(file_exists($FullFileName)) 410 { 411 $this->Database->update('File', 'Id='.$FileId, array('Name' => $FileName, 'Size' => filesize($FullFileName))); 412 $this->Database->update('FinanceOperation', 'Id='.$Row['Id'], array('File' => $FileId)); 413 $Output .= '.'; 414 } else $Output .= 'Soubor "'.$FullFileName.'" se nepodařilo uložit.'; 415 } 395 416 return($Output); 396 417 } -
trunk/Modules/Network/HostList.php
r548 r558 15 15 $Output = '<div align="center" style="font-size: small;"><table class="WideTable">'; 16 16 $Output .= '<tr><th>Jméno počítače</th><th>IP adresa</th><th>Typ</th><th>Naposledy online</th><th>Správce</th></tr>'; 17 $DbResult = $this->Database->query('SELECT NetworkDevice.*, User.Name as UserName, NetworkDeviceType.Name AS HostType FROM NetworkDevice LEFT JOIN Member ON Member.Id = NetworkDevice.Member LEFT JOIN User ON Member.ResponsibleUser = User.Id LEFT JOIN NetworkDeviceType ON NetworkDeviceType.Id = NetworkDevice.Type WHERE NetworkDevice.Used = 1 '.$Where.'ORDER BY NetworkDevice.Name'); 17 $DbResult = $this->Database->query('SELECT NetworkDevice.*, User.Name as UserName, NetworkDeviceType.Name AS HostType FROM NetworkDevice '. 18 'LEFT JOIN Member ON Member.Id = NetworkDevice.Member '. 19 'LEFT JOIN User ON Member.ResponsibleUser = User.Id '. 20 'LEFT JOIN NetworkDeviceType ON NetworkDeviceType.Id = NetworkDevice.Type WHERE NetworkDevice.Used = 1 '.$Where.'ORDER BY NetworkDevice.Name'); 18 21 while($Device = $DbResult->fetch_assoc()) 19 22 { -
trunk/Modules/Network/UserHosts.php
r548 r558 15 15 global $Config; 16 16 17 if($this->System->User->User['Id'] == '') return($this->SystemMessage('Nepovolený přístup', 'Nemáte oprávnění pro tuto operaci')); 17 18 $Output = '<div align="center" style="font-size: small;"><table class="WideTable">'; 18 19 $Output .= '<tr><th>Jméno počítače</th><th>Místní adresa</th><th>Veřejná adresa</th><th>Fyzická adresa</th><th>Typ</th><th>Naposledy online</th></tr>'; 19 $DbResult = $this->Database->query('SELECT NetworkDevice.*, NetworkDeviceType.Name AS HostType FROM NetworkDevice LEFT JOIN NetworkDeviceType ON NetworkDeviceType.Id = NetworkDevice.Type WHERE NetworkDevice.Used = 1 AND NetworkDevice.Member = (SELECT Customer FROM UserCustomerRel WHERE User='.$this->System->User->User['Id'].') ORDER BY NetworkDevice.Name'); 20 $DbResult = $this->Database->query('SELECT NetworkDevice.*, NetworkDeviceType.Name AS HostType FROM NetworkDevice '. 21 'LEFT JOIN NetworkDeviceType ON NetworkDeviceType.Id = NetworkDevice.Type '. 22 'WHERE NetworkDevice.Used = 1 AND NetworkDevice.Member = (SELECT Customer FROM UserCustomerRel WHERE User='.$this->System->User->User['Id'].') ORDER BY NetworkDevice.Name'); 20 23 while($Device = $DbResult->fetch_assoc()) 21 24 { 22 25 if($Device['Online'] == 1) $Style = 'color: blue;'; else $Style = ''; 23 $Output .= '<tr><td colspan="4" style="text-align: left; font-weight: bold; '.$Style.'">'.$Device['Name'].'</td><td>'.$Device['HostType'].'</td><td style="text-align: right;">'.HumanDate($Device['LastOnline']).'</td></tr>'; 26 $Output .= '<tr><td colspan="4" style="text-align: left; font-weight: bold; '. 27 $Style.'">'.$Device['Name'].'</td><td>'.$Device['HostType'].'</td><td style="text-align: right;">'.HumanDate($Device['LastOnline']).'</td></tr>'; 24 28 $DbResult2 = $this->Database->query('SELECT * FROM NetworkInterface WHERE Device = '.$Device['Id']); 25 29 while($Interface = $DbResult2->fetch_assoc())
Note:
See TracChangeset
for help on using the changeset viewer.