Changeset 748 for trunk/Modules/Finance/Bill.php
- Timestamp:
- Sep 30, 2015, 11:55:11 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Finance/Bill.php
r747 r748 52 52 function GenerateHTML() 53 53 { 54 $DbResult = $this->Database->query('SELECT `FinanceInvoice`.*, `FinanceInvoiceGroup`.`Direction` FROM `FinanceInvoice` '. 54 $Finance = &$this->System->Modules['Finance']; 55 $Finance->LoadMonthParameters(0); 56 57 $DbResult = $this->Database->query('SELECT `FinanceInvoice`.*, `FinanceInvoiceGroup`.`Direction`, `DocumentLineCode`.`Name` AS `BillName` FROM `FinanceInvoice` '. 55 58 'LEFT JOIN `FinanceInvoiceGroup` ON `FinanceInvoiceGroup`.`Id`=`FinanceInvoice`.`Group` '. 59 'LEFT JOIN `DocumentLineCode` ON `DocumentLineCode`.`Id`=`FinanceInvoice`.`BillCode` '. 56 60 'WHERE `FinanceInvoice`.`Id`='.$this->InvoiceId); 57 61 $Invoice = $DbResult->fetch_assoc(); … … 72 76 $SubjectFrom['Account'] = $SubjectFromAccount['NumberFull']; 73 77 74 $Dodavka = array();75 78 $InvoiceItems = array(); 76 $DbResult = $this->Database->select('FinanceInvoiceItem', '*, CEIL(`Price` * `Quantity`) AS `Total`', '`FinanceInvoice`='.$this->InvoiceId);79 $DbResult = $this->Database->select('FinanceInvoiceItem', '*, ROUND(`Price` * `Quantity`, '.$Finance->Rounding.') AS `Total`', '`FinanceInvoice`='.$this->InvoiceId); 77 80 while($Item = $DbResult->fetch_assoc()) 78 81 { … … 108 111 '<tr><td width="50%" valign="top">'. 109 112 '<strong>Platební podmínky:</strong><br>'. 110 'Číslo dokladu: '.$Invoice['Bill Code'].'<br>'.113 'Číslo dokladu: '.$Invoice['BillName'].'<br>'. 111 114 'Variabilní symbol: '.$VarSym.'<br>'. 112 115 'Specifický symbol: '.$this->SpecificSymbol.'<br>'. … … 153 156 function GenerateHTML() 154 157 { 155 $DbResult = $this->Database->query('SELECT `FinanceOperation`.*, `FinanceOperationGroup`.`Direction` FROM `FinanceOperation` '.158 $DbResult = $this->Database->query('SELECT `FinanceOperation`.*, `FinanceOperationGroup`.`Direction`, `DocumentLineCode`.`Name` AS `BillName` FROM `FinanceOperation` '. 156 159 'LEFT JOIN `FinanceOperationGroup` ON `FinanceOperationGroup`.`Id`=`FinanceOperation`.`Group` '. 160 'LEFT JOIN `DocumentLineCode` ON `DocumentLineCode`.`Id`=`FinanceOperation`.`BillCode` '. 157 161 'WHERE `FinanceOperation`.`Id`='.$this->OperationId); 158 162 $Operation = $DbResult->fetch_assoc(); … … 195 199 '</td><td width="50%" valign="top">'. 196 200 '<font size="5"><strong>'.$Desc['Type'].' POKLADNÍ DOKLAD</strong></font><br><br>'. 197 'Číslo dokladu: '.$Operation['Bill Code'].'<br>'.201 'Číslo dokladu: '.$Operation['BillName'].'<br>'. 198 202 'Datum vystavení: '.HumanDate($Operation['Time']).'<br>'. 199 203 '</td></tr>'.
Note:
See TracChangeset
for help on using the changeset viewer.