Changeset 873 for trunk/Modules/Finance/Bill.php
- Timestamp:
- Apr 6, 2020, 11:17:40 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Finance/Bill.php
r748 r873 8 8 function GenerateHTML() 9 9 { 10 return ('');10 return (''); 11 11 } 12 12 … … 22 22 { 23 23 $Encoding = new Encoding(); 24 if ($this->Checked == false) {25 if (CommandExist('htmldoc')) {24 if ($this->Checked == false) { 25 if (CommandExist('htmldoc')) { 26 26 $this->Checked = true; 27 27 } else throw new Exception('htmldoc is not installed.'); … … 29 29 $Output = shell_exec('echo "'.addslashes($Encoding->FromUTF8($HtmlCode)). 30 30 '"|htmldoc --no-numbered --webpage --no-embedfonts --charset 8859-2 -t pdf -'); 31 return ($Output);31 return ($Output); 32 32 } 33 33 } … … 43 43 $Subject['AddressStreet'].'<br>'. 44 44 $Subject['AddressPSC'].' '.$Subject['AddressTown'].'<br>'; 45 if ($Subject['IC'] != 0) $Output .= 'IČ: '.$Subject['IC'].'<br>';46 if ($Subject['DIC'] != '') $Output .= 'DIČ: '.$Subject['DIC'].'<br>';47 if ($Subject['Account'] != '') $Output .= 'Účet: '.$Subject['Account'].'<br>';48 if ($Subject['PayVAT'] != '') $Output .= 'Plátce DPH: '.$BooleanText[$Subject['PayVAT']].'<br>';49 return ($Output);45 if ($Subject['IC'] != 0) $Output .= 'IČ: '.$Subject['IC'].'<br>'; 46 if ($Subject['DIC'] != '') $Output .= 'DIČ: '.$Subject['DIC'].'<br>'; 47 if ($Subject['Account'] != '') $Output .= 'Účet: '.$Subject['Account'].'<br>'; 48 if ($Subject['PayVAT'] != '') $Output .= 'Plátce DPH: '.$BooleanText[$Subject['PayVAT']].'<br>'; 49 return ($Output); 50 50 } 51 51 … … 78 78 $InvoiceItems = array(); 79 79 $DbResult = $this->Database->select('FinanceInvoiceItem', '*, ROUND(`Price` * `Quantity`, '.$Finance->Rounding.') AS `Total`', '`FinanceInvoice`='.$this->InvoiceId); 80 while ($Item = $DbResult->fetch_assoc())80 while ($Item = $DbResult->fetch_assoc()) 81 81 { 82 82 $InvoiceItems[$Item['Id']] = $Item; … … 84 84 85 85 // If direction is in => switch sides 86 if ($Invoice['Direction'] == FINANCE_DIRECTION_OUT)87 { 88 } 89 else if ($Invoice['Direction'] == FINANCE_DIRECTION_IN)86 if ($Invoice['Direction'] == FINANCE_DIRECTION_OUT) 87 { 88 } 89 else if ($Invoice['Direction'] == FINANCE_DIRECTION_IN) 90 90 { 91 91 $Subject = $SubjectTo; … … 121 121 'Datum zdanitel. plnění: '.HumanDate($Invoice['Time']).'<br>'. 122 122 'Datum splatnosti: '.HumanDate($Invoice['TimeDue']).'<br>'; 123 if (($Invoice['PeriodFrom'] != '') and ($Invoice['PeriodTo'] != ''))123 if (($Invoice['PeriodFrom'] != '') and ($Invoice['PeriodTo'] != '')) 124 124 $Output .= 'Fakturované období: '.HumanDate($Invoice['PeriodFrom']).' - '. 125 125 HumanDate($Invoice['PeriodTo']).'<br>'; … … 133 133 134 134 $Total = 0; 135 foreach ($InvoiceItems as $Item)135 foreach ($InvoiceItems as $Item) 136 136 { 137 137 $Output .= '<tr><td>'.$Item['Description'].'</td><td align="right">'. … … 146 146 '</table>'; 147 147 148 return ($Output);148 return ($Output); 149 149 } 150 150 } … … 174 174 175 175 $BooleanText = array('Ne', 'Ano'); 176 if ($Operation['Direction'] == FINANCE_DIRECTION_OUT)176 if ($Operation['Direction'] == FINANCE_DIRECTION_OUT) 177 177 $Desc = array( 178 178 'Type' => 'VÝDAJOVÝ', … … 180 180 'Target' => 'Vydáno komu', 181 181 ); 182 else if ($Operation['Direction'] == FINANCE_DIRECTION_IN)182 else if ($Operation['Direction'] == FINANCE_DIRECTION_IN) 183 183 $Desc = array( 184 184 'Type' => 'PŘÍJMOVÝ', … … 206 206 $Subject['AddressStreet'].'<br>'. 207 207 $Subject['AddressPSC'].' '.$Subject['AddressTown'].'<br>'; 208 if ($Subject['IC'] != 0) $Output .= 'IČ: '.$Subject['IC'].'<br>';209 if ($Subject['DIC'] != '') $Output .= 'DIČ: '.$Subject['DIC'].'<br>';208 if ($Subject['IC'] != 0) $Output .= 'IČ: '.$Subject['IC'].'<br>'; 209 if ($Subject['DIC'] != '') $Output .= 'DIČ: '.$Subject['DIC'].'<br>'; 210 210 $Description = $Operation['Text']; 211 211 $Output .= '</td></tr>'. … … 215 215 '<tr><td> </td><td><br><br>'.$Desc['Signature'].':</td></tr>'; 216 216 $Output .= '</table>'; 217 return ($Output);217 return ($Output); 218 218 } 219 219 }
Note:
See TracChangeset
for help on using the changeset viewer.