Changeset 413
- Timestamp:
- Oct 7, 2012, 4:35:04 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/finance/manage.php
r409 r413 105 105 if(array_key_exists('generate', $_GET)) 106 106 { 107 $Output .= $this->System->Modules['Bill']->CreateBill(1, array(array('Description' => 'Poplatek za připojení k síti', 'Price' => 1000, 'Quantity' => 1)), time(), time());107 $Output .= $this->System->Modules['Bill']->CreateBill(1, array(array('Description' => 'Poplatek za připojení k Internetu', 'Price' => 1000, 'Quantity' => 1)), time(), time()); 108 108 } else 109 109 { … … 352 352 $Output .= $TimePeriodText.': '.$Member['MonthlyTotal'].' * '.$Period['MonthCount'].' = '.$PayPerPeriod.'<br />'; 353 353 $BillCode = $Finance->GetNextDocumentLineNumber(6); // Faktury vydané 354 $BillId = $this->System->Modules['Bill']->CreateBill($Member['Subject'], array(array('Description' => 'Připojení k síti', 'Price' => $PayPerPeriod, 'Quantity' => 1)), time(), time() + 3600 * 24 * 15, $BillCode);355 $this->Database->insert('FinanceClaimsLiabilities', array('Value' => $PayPerPeriod, 'Subject' => $Member['Subject'], 'TimeCreation' => 'NOW()', 'TimeDue' => 'DATE_ADD(NOW(), INTERVAL 15 DAY)', 'Text' => 'Připojení k sítiza období '.$TimePeriodText, 'Bill' => $BillId, 'BillCode' => $BillCode));354 $BillId = $this->System->Modules['Bill']->CreateBill($Member['Subject'], array(array('Description' => 'Připojení k Internetu', 'Price' => $PayPerPeriod, 'Quantity' => 1)), time(), time() + 3600 * 24 * 15, $BillCode); 355 $this->Database->insert('FinanceClaimsLiabilities', array('Value' => $PayPerPeriod, 'Subject' => $Member['Subject'], 'TimeCreation' => 'NOW()', 'TimeDue' => 'DATE_ADD(NOW(), INTERVAL 15 DAY)', 'Text' => 'Připojení k Internetu za období '.$TimePeriodText, 'Bill' => $BillId, 'BillCode' => $BillCode)); 356 356 $Output .= $this->SendPaymentEmail($Member['Id']); 357 357 $this->Database->update('Member', 'Id='.$Member['Id'], array('BillingPeriodLastDate' => TimeToMysqlDateTime($Period['To']))); … … 415 415 'Vaše platební období: <strong>'.$this->System->Modules['Finance']->BillingPeriods[$Member['BillingPeriod']]['Name'].'</strong><br />'."\n". 416 416 'Pravidelná platba za období: <strong>'.$MemberPayment['MonthlyTotal'].' Kč</strong><br />'."\n". 417 'Bankovní účet: <strong>2600134781 / 2010</strong> (EUR Slovensko 2600134781 / 8330, Fio banka)<br/>'."\n". 418 'Variabilní symbol: <strong>'.$Member['Subject'].'</strong><br/>'."\n". 417 419 'Stav vašeho účtu: <strong>'.($MemberPayment['Cash'] - $MemberPayment['MonthlyTotal']).' Kč</strong><br /><br />'."\n"; 418 420 $Content .= 'Nové finanční operace:<br/>'. … … 440 442 { 441 443 // FinanceClaimsLiablities 442 $DbResult = $this->Database->query('SELECT * FROM FinanceClaimsLiabilities WHERE (BillCode <> "") AND (Value >= 0) AND (Bill = 0)');444 $DbResult = $this->Database->query('SELECT * FROM FinanceClaimsLiabilities WHERE (BillCode <> "") AND (Value != 0) AND (Bill = 0)'); 443 445 while($Row = $DbResult->fetch_assoc()) 444 446 { -
trunk/finance/user_state.php
r410 r413 59 59 60 60 // 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'; 63 63 $DbResult = $this->Database->query('SELECT SUM(T1.Value) AS Total FROM '.$UserOperationTableQuery); 64 64 $DbRow = $DbResult->fetch_array(); 65 65 $Total = $DbRow['Total']; 66 $Output .= 'Stav účtu: <strong>'.$Total.' Kč</strong<br /><br /> ';66 $Output .= 'Stav účtu: <strong>'.$Total.' Kč</strong<br /><br /><br/>'; 67 67 68 68 … … 79 79 if($Row['Value'] == -0) $Row['Value'] = 0; 80 80 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 = ' '; 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 = ' '; 82 83 $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>'; 83 84 $SumValue = $SumValue + $Row['Value']; -
trunk/finance/zivnost.php
r409 r413 160 160 $DbResult = $this->Database->select('FinanceYear', '*', 'Id='.$_GET['year']); 161 161 $Year = $DbResult->fetch_assoc(); 162 162 163 $Total = 0; 164 $TotalTax = array(0, 0); 165 $TotalCash = array(0, 0); 163 166 $Output .= '<strong>Příjmy za rok '.$Year['Year'].'</strong>'; 164 167 $Output .= '<table style="font-size: smaller;" class="WideTable">'; … … 170 173 $Row['Time'] = explode(' ', $Row['Time']); 171 174 $Row['Time'] = $Row['Time'][0]; 172 $Output .= '<tr><td>'.$Row['Time'].'</td><td>'.$Row['BillCode'].'</td><td>'.$Row['Name'].'</td><td>'.$Row['Text'].'</td><td>'.$Row['Value'].'</td><td>'.$Table[$Row['Taxable']].'</td><td>'.$Table[$Row['Cash']].'</td></tr>'; 173 } 174 $Output .= '</table>'; 175 $Output .= '<tr><td>'.HumanDate($Row['Time']).'</td><td>'.$Row['BillCode'].'</td><td>'.$Row['Name'].'</td><td>'.$Row['Text'].'</td><td>'.$Row['Value'].'</td><td>'.$Table[$Row['Taxable']].'</td><td>'.$Table[$Row['Cash']].'</td></tr>'; 176 $Total += $Row['Value']; 177 $TotalTax[$Row['Taxable']] += $Row['Value']; 178 $TotalCash[$Row['Cash']] += $Row['Value']; 179 } 180 $Output .= '</table><br/>'; 181 $Output .= '<strong>Souhrn</strong><br/>'; 182 $Output .= 'Celkem: '.$Total.' Kč<br/>'; 183 $Output .= ' Daňové: '.$TotalTax[1].' Kč<br/>'; 184 $Output .= ' Nedaňové: '.$TotalTax[0].' Kč<br/>'; 185 $Output .= ' Hotovostní: '.$TotalCash[1].' Kč<br/>'; 186 $Output .= ' Bezhotovostní: '.$TotalCash[0].' Kč<br/>'; 175 187 break; 176 188 case 'Expenses': … … 178 190 $DbResult = $this->Database->select('FinanceYear', '*', 'Id='.$_GET['year']); 179 191 $Year = $DbResult->fetch_assoc(); 180 192 193 $Total = 0; 194 $TotalTax = array(0, 0); 195 $TotalCash = array(0, 0); 181 196 $Output .= '<strong>Výdaje za rok '.$Year['Year'].'</strong>'; 182 197 $Output .= '<table style="font-size: smaller;" class="WideTable">'; … … 188 203 $Row['Time'] = explode(' ', $Row['Time']); 189 204 $Row['Time'] = $Row['Time'][0]; 190 $Output .= '<tr><td>'.$Row['Time'].'</td><td>'.$Row['BillCode'].'</td><td>'.$Row['Name'].'</td><td>'.$Row['Text'].'</td><td>'.$Row['Value'].'</td><td>'.$Table[$Row['Taxable']].'</td><td>'.$Table[$Row['Cash']].'</td></tr>'; 191 } 192 $Output .= '</table>'; 205 $Row['Value'] = $Row['Value'] * -1; 206 $Output .= '<tr><td>'.HumanDate($Row['Time']).'</td><td>'.$Row['BillCode'].'</td><td>'.$Row['Name'].'</td><td>'.$Row['Text'].'</td><td>'.$Row['Value'].'</td><td>'.$Table[$Row['Taxable']].'</td><td>'.$Table[$Row['Cash']].'</td></tr>'; 207 $Total += $Row['Value']; 208 $TotalTax[$Row['Taxable']] += $Row['Value']; 209 $TotalCash[$Row['Cash']] += $Row['Value']; 210 } 211 $Output .= '</table><br/>'; 212 $Output .= '<strong>Souhrn</strong><br/>'; 213 $Output .= 'Celkem: '.$Total.' Kč<br/>'; 214 $Output .= ' Daňové: '.$TotalTax[1].' Kč<br/>'; 215 $Output .= ' Nedaňové: '.$TotalTax[0].' Kč<br/>'; 216 $Output .= ' Hotovostní: '.$TotalCash[1].' Kč<br/>'; 217 $Output .= ' Bezhotovostní: '.$TotalCash[0].' Kč<br/>'; 193 218 break; 194 219 case 'Claims': … … 197 222 $Year = $DbResult->fetch_assoc(); 198 223 224 $Total = 0; 199 225 $Output .= '<strong>Pohledávky za rok '.$Year['Year'].'</strong>'; 200 226 $Output .= '<table style="font-size: smaller;" class="WideTable">'; 201 $Output .= '<tr><th> Kód</th><th>Subjekt</th><th>Text</th><th>Hodnota [Kč]</th><th>Čas vystavení</th><th>Čas splatnosti</th><th>Čas uhrazení</th></tr>';227 $Output .= '<tr><th>Čas vystavení</th><th>Kód</th><th>Subjekt</th><th>Text</th><th>Hodnota [Kč]</th></tr>'; 202 228 $DbResult = $this->Database->query('SELECT * FROM FinanceClaimsLiabilities JOIN Subject ON Subject.Id = FinanceClaimsLiabilities.Subject '. 203 229 'WHERE (Value > 0) AND (FinanceClaimsLiabilities.TimeCreation >= "'.$Year['DateStart'].'") AND (FinanceClaimsLiabilities.TimeCreation <= "'.$Year['DateEnd'].'") ORDER BY TimeCreation'); … … 205 231 { 206 232 if($Row['TimePayment'] == '0000-00-00 00:00:00') $Row['TimePayment'] = ' '; 207 $Output .= '<tr><td>'.$Row['BillCode'].'</td><td>'.$Row['Name'].'</td><td>'.$Row['Text'].'</td><td>'.$Row['Value'].'</td><td>'.$Row['TimeCreation'].'</td><td>'.$Row['TimeDue'].'</td><td>'.$Row['TimePayment'].'</td></tr>'; 208 } 209 $Output .= '</table>'; 233 $Output .= '<tr><td>'.HumanDate($Row['TimeCreation']).'</td><td>'.$Row['BillCode'].'</td><td>'.$Row['Name'].'</td><td>'.$Row['Text'].'</td><td>'.$Row['Value'].'</td></tr>'; 234 $Total += $Row['Value']; 235 } 236 $Output .= '</table><br/>'; 237 $Output .= 'Celkem: '.$Total.' Kč<br/>'; 210 238 break; 211 239 case 'Liabilities': … … 214 242 $Year = $DbResult->fetch_assoc(); 215 243 244 $Total = 0; 216 245 $Output .= '<strong>Závazky za rok '.$Year['Year'].'</strong>'; 217 246 $Output .= '<table style="font-size: smaller;" class="WideTable">'; 218 $Output .= '<tr><th> Kód</th><th>Subjekt</th><th>Text</th><th>Hodnota [Kč]</th><th>Čas vystavení</th><th>Čas splatnosti</th><th>Čas uhrazení</th></tr>';247 $Output .= '<tr><th>Čas vystavení</th><th>Kód</th><th>Subjekt</th><th>Text</th><th>Hodnota [Kč]</th></tr>'; 219 248 $DbResult = $this->Database->query('SELECT * FROM FinanceClaimsLiabilities JOIN Subject ON Subject.Id = FinanceClaimsLiabilities.Subject '. 220 249 'WHERE (Value < 0) AND (FinanceClaimsLiabilities.TimeCreation >= "'.$Year['DateStart'].'") AND (FinanceClaimsLiabilities.TimeCreation <= "'.$Year['DateEnd'].'") ORDER BY TimeCreation'); … … 222 251 { 223 252 if($Row['TimePayment'] == '0000-00-00 00:00:00') $Row['TimePayment'] = ' '; 224 $Output .= '<tr><td>'.$Row['BillCode'].'</td><td>'.$Row['Name'].'</td><td>'.$Row['Text'].'</td><td>'.$Row['Value'].'</td><td>'.$Row['TimeCreation'].'</td><td>'.$Row['TimeDue'].'</td><td>'.$Row['TimePayment'].'</td></tr>'; 225 } 226 $Output .= '</table>'; 253 $Row['Value'] = $Row['Value'] * -1; 254 $Output .= '<tr><td>'.HumanDate($Row['TimeCreation']).'</td><td>'.$Row['BillCode'].'</td><td>'.$Row['Name'].'</td><td>'.$Row['Text'].'</td><td>'.$Row['Value'].'</td></tr>'; 255 $Total += $Row['Value']; 256 } 257 $Output .= '</table><br/>'; 258 $Output .= 'Celkem: '.$Total.' Kč<br/>'; 227 259 break; 228 260 case 'SubjectList': -
trunk/form_classes.php
r409 r413 12 12 'Cash' => array('Type' => 'Boolean', 'Caption' => 'Hotovost', 'Default' => '0'), 13 13 'Taxable' => array('Type' => 'Boolean', 'Caption' => 'Ovlivňující daňový základ', 'Default' => '1'), 14 //'BankAccount' => array('Type' => 'TBankAccount', 'Caption' => 'Bankovní účet', 'Default' => '1'), 14 15 ), 15 16 ), … … 196 197 'Filter' => '1', 197 198 ), 199 'TBankAccount' => array( 200 'Type' => 'Reference', 201 'Table' => 'FinanceBankAccount', 202 'Id' => 'Id', 203 'Name' => 'Comment', 204 'Filter' => '1', 205 ), 198 206 'TNetworkDevice' => array( 199 207 'Type' => 'Reference', -
trunk/system/generators/dhcp.php
r334 r413 11 11 $Routerboard->Debug = true; 12 12 13 $DbResult = $Database->query('SELECT * FROM `NetworkSubnet` '); // WHERE `Member` = 0');13 $DbResult = $Database->query('SELECT * FROM `NetworkSubnet` WHERE `Configure`=1'); 14 14 while($Subnet = $DbResult->fetch_assoc()) 15 15 { -
trunk/webcam/webcam.php
r329 r413 9 9 global $Config; 10 10 // return('<a href="'.$this->System->Config['Web']['RootFolder'].'/webcam/"><img alt="Webkamera školní hřiště" width="140" height="105" src="'.$this->System->Config['Web']['RootFolder'].'/webcam/'.$this->ImageFileName.'" /></a>'); 11 return('<a href="http://www.zdechov.net/kamery/?id=1"><img alt="Webkamera školní hřiště" width="140" height="105" src="http://www.zdechov.net/images/webcam/webcam.jpg" /></a>'); 11 $Output = '<a href="http://www.zdechov.net/kamery/?id=1"><img alt="Webkamera školní hřiště" width="140" height="105" src="http://www.zdechov.net/images/webcam/webcam.jpg" /></a>'; 12 $Output .= '<a href="http://www.zdechov.net/kamery/?id=2"><img alt="Webkamera střed obce obloha" width="140" height="105" src="http://www.zdechov.net/images/webcam/webcam2.jpg" /></a>'; 13 $Output .= '<a href="http://www.zdechov.net/kamery/?id=3"><img alt="Skiareál, motokrosová grapa" width="140" height="79" src="http://www.zdechov.net/images/webcam/webcam3.jpg" /></a>'; 14 $Output .= '<a href="http://www.zdechov.net/kamery/?id=4"><img alt="Fotbalové hřiště" width="140" height="79" src="http://www.zdechov.net/images/webcam/webcam4.jpg" /></a>'; 15 return($Output); 12 16 } 13 17 }
Note:
See TracChangeset
for help on using the changeset viewer.