Changeset 61 for www/finance/bills.php
- Timestamp:
- Apr 1, 2008, 8:00:13 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
www/finance/bills.php
r52 r61 1 1 <?php 2 include_once('../style.php');3 2 include('code.php'); 4 3 … … 41 40 $User['psc'].' '.$User['town'].'<br>'; 42 41 if($User['ico'] != 0) $Output .= 'IČO: '.$User['ico'].'<br>'; 42 if($User['dic'] != '') $Output .= 'DIČ: '.$User['dic'].'<br>'; 43 43 $Output .= 44 44 '</td></tr>'. … … 96 96 } 97 97 98 function RegeneratePDF($BillId) 99 { 100 global $Database; 101 102 $PdfData = $this->HtmlToPdf($this->GenerateBill($BillId)); 103 $Database->query('UPDATE finance_bills SET pdf = 0x'.bin2hex($PdfData).' WHERE id='.$BillId); 104 } 105 98 106 function ShowStoredBill($BillId) 99 107 { … … 149 157 while($Item = $DbResult->fetch_array()) 150 158 { 151 echo('<a href="?bill='.$Item['id'].'">faktura '.$Item['id'].'</a> <a href="?billpdf='.$Item['id'].'"> PDF</a> <a href="?billpdf2='.$Item['id'].'">PDF</a><br>');159 echo('<a href="?bill='.$Item['id'].'">faktura '.$Item['id'].'</a> <a href="?billpdf='.$Item['id'].'">Uložené PDF</a> <a href="?billpdf2='.$Item['id'].'">Generované PDF</a> <a href="?regenerate='.$Item['id'].'">Přegenerovat</a><br>'); 152 160 } 153 161 } else … … 159 167 { 160 168 $this->ShowGeneratedBill($_GET['billpdf2']); 169 } else 170 if(array_key_exists('regenerate', $_GET)) 171 { 172 $this->RegeneratePDF($_GET['regenerate']); 161 173 } else 162 174 if(array_key_exists('bill', $_GET)) … … 171 183 ShowHeader('Faktury', 'Faktury'); 172 184 echo('Faktury:<br>'); 173 $DbResult = $Database->select('users', '*, CONCAT(second_name," ", first_name) as fullname' );185 $DbResult = $Database->select('users', '*, CONCAT(second_name," ", first_name) as fullname', '1 ORDER BY fullname'); 174 186 while($User = $DbResult->fetch_array()) 175 187 { … … 182 194 183 195 $InvoiceGenerator = new InvoiceGenerator; 184 //$InvoiceGenerator->ShowPage(); 196 185 197 ?>
Note:
See TracChangeset
for help on using the changeset viewer.