Changeset 558 for trunk/Modules/Finance/Bill.php
- Timestamp:
- Jul 21, 2013, 10:55:49 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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);
Note:
See TracChangeset
for help on using the changeset viewer.